Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
#define NOT_FREE 1
#define FREE 0
#define N 8

void putqueen(int);
void printboard(void);

int row[N], col[N], dpos[2*N-1], dneg[2*N-1], Q[N][N];

int main(){
  int k, i, r, c, j;

  scanf("%d", &k);

  for(i = 0; i < k; i++){
    scanf("%d%d", &r, &c);
    Q[r][c] = NOT_FREE;
  }

  putqueen(0);

  return 0;
}

void putqueen(int i){
  int j;

  if(i == N){
    printboard();
    return;
  }

  for(j = 0; j < N; j++){
    if(col[j] == NOT_FREE || dpos[i+j] == NOT_FREE || dneg[i-j+N-1] == NOT_FREE)
      continue;
    row[i] = j;
    col[j] = dpos[i+j] = dneg[i-j+N-1] = NOT_FREE;
    putqueen(i+1);
    col[j] = dpos[i+j] = dneg[i-j+N-1] = FREE;
  }
}

void printboard(){
  int i, j;

  for(i = 0; i < N; i++){
    for(j = 0; j < N; j++){
      if(Q[i][j] == NOT_FREE){
	if(row[i] != j)
	  return;
      }
    }
  }

  for(i = 0; i < N; i++){
    for(j = 0; j < N; j++){
      if(row[i] == j)
	printf("Q");
      else
	printf(".");
    }
    printf("\n");
  }
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	row
	.bss
	.align 32
	.type	row, @object
	.size	row, 32
row:
	.zero	32
	.globl	col
	.align 32
	.type	col, @object
	.size	col, 32
col:
	.zero	32
	.globl	dpos
	.align 32
	.type	dpos, @object
	.size	dpos, 60
dpos:
	.zero	60
	.globl	dneg
	.align 32
	.type	dneg, @object
	.size	dneg, 60
dneg:
	.zero	60
	.globl	Q
	.align 32
	.type	Q, @object
	.size	Q, 256
Q:
	.zero	256
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L2
.L3:
	leaq	-16(%rbp), %rdx
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %eax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	Q(%rip), %rax
	movl	$1, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L2:
	movl	-24(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L3
	movl	$0, %edi
	call	putqueen
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	putqueen
	.type	putqueen, @function
putqueen:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	cmpl	$8, -20(%rbp)
	jne	.L7
	call	printboard
	jmp	.L6
.L7:
	movl	$0, -4(%rbp)
	jmp	.L9
.L13:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	col(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	je	.L14
	movl	-20(%rbp), %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dpos(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	je	.L14
	movl	-20(%rbp), %eax
	subl	-4(%rbp), %eax
	addl	$7, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dneg(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	je	.L14
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	row(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	subl	-4(%rbp), %eax
	leal	7(%rax), %edx
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	dneg(%rip), %rax
	movl	$1, (%rcx,%rax)
	movl	-20(%rbp), %ecx
	movl	-4(%rbp), %eax
	addl	%ecx, %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	dneg(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%eax, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	dpos(%rip), %rcx
	movl	%edx, (%rsi,%rcx)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dpos(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	col(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	putqueen
	movl	-20(%rbp), %eax
	subl	-4(%rbp), %eax
	leal	7(%rax), %edx
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	dneg(%rip), %rax
	movl	$0, (%rcx,%rax)
	movl	-20(%rbp), %ecx
	movl	-4(%rbp), %eax
	addl	%ecx, %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	dneg(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%eax, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	dpos(%rip), %rcx
	movl	%edx, (%rsi,%rcx)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dpos(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	col(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	jmp	.L12
.L14:
	nop
.L12:
	addl	$1, -4(%rbp)
.L9:
	cmpl	$7, -4(%rbp)
	jle	.L13
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	putqueen, .-putqueen
	.globl	printboard
	.type	printboard, @function
printboard:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -8(%rbp)
	jmp	.L16
.L21:
	movl	$0, -4(%rbp)
	jmp	.L17
.L20:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	Q(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	jne	.L18
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	row(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4(%rbp)
	jne	.L28
.L18:
	addl	$1, -4(%rbp)
.L17:
	cmpl	$7, -4(%rbp)
	jle	.L20
	addl	$1, -8(%rbp)
.L16:
	cmpl	$7, -8(%rbp)
	jle	.L21
	movl	$0, -8(%rbp)
	jmp	.L22
.L27:
	movl	$0, -4(%rbp)
	jmp	.L23
.L26:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	row(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4(%rbp)
	jne	.L24
	movl	$81, %edi
	call	putchar@PLT
	jmp	.L25
.L24:
	movl	$46, %edi
	call	putchar@PLT
.L25:
	addl	$1, -4(%rbp)
.L23:
	cmpl	$7, -4(%rbp)
	jle	.L26
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -8(%rbp)
.L22:
	cmpl	$7, -8(%rbp)
	jle	.L27
	jmp	.L15
.L28:
	nop
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	printboard, .-printboard
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.p2align 4
	.globl	printboard
	.type	printboard, @function
printboard:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	Q(%rip), %rax
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	row(%rip), %rbp
	leaq	256(%rax), %rcx
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rbp, %rdx
.L2:
	cmpl	$1, (%rax)
	je	.L47
	cmpl	$1, 4(%rax)
	jne	.L7
	cmpl	$1, (%rdx)
	jne	.L1
	cmpl	$1, 8(%rax)
	je	.L1
	cmpl	$1, 12(%rax)
	je	.L1
.L11:
	cmpl	$1, 16(%rax)
	jne	.L13
	cmpl	$4, (%rdx)
	jne	.L1
	cmpl	$1, 20(%rax)
	je	.L1
	cmpl	$1, 24(%rax)
	je	.L1
.L17:
	cmpl	$1, 28(%rax)
	jne	.L19
	cmpl	$7, (%rdx)
	jne	.L1
.L19:
	addq	$32, %rax
	addq	$4, %rdx
	cmpq	%rcx, %rax
	jne	.L2
	leaq	32+row(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L3:
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L23:
	cmpl	%ebx, 0(%rbp)
	je	.L48
	movl	$46, %edi
	addl	$1, %ebx
	call	putchar@PLT
	cmpl	$8, %ebx
	jne	.L23
.L22:
	movl	$10, %edi
	addq	$4, %rbp
	call	putchar@PLT
	cmpq	%r12, %rbp
	jne	.L3
.L1:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	cmpl	$1, 8(%rax)
	jne	.L9
	cmpl	$2, (%rdx)
	jne	.L1
	cmpl	$1, 12(%rax)
	je	.L1
	cmpl	$1, 16(%rax)
	je	.L1
.L13:
	cmpl	$1, 20(%rax)
	jne	.L15
	cmpl	$5, (%rdx)
	jne	.L1
	cmpl	$1, 24(%rax)
	je	.L1
.L38:
	cmpl	$1, 28(%rax)
	jne	.L19
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L47:
	movl	(%rdx), %esi
	testl	%esi, %esi
	jne	.L1
	cmpl	$1, 4(%rax)
	je	.L1
	cmpl	$1, 8(%rax)
	je	.L1
.L9:
	cmpl	$1, 12(%rax)
	jne	.L11
	cmpl	$3, (%rdx)
	jne	.L1
	cmpl	$1, 16(%rax)
	je	.L1
	cmpl	$1, 20(%rax)
	je	.L1
.L15:
	cmpl	$1, 24(%rax)
	jne	.L17
	cmpl	$6, (%rdx)
	je	.L38
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L48:
	movl	$81, %edi
	addl	$1, %ebx
	call	putchar@PLT
	cmpl	$8, %ebx
	jne	.L23
	jmp	.L22
	.cfi_endproc
.LFE25:
	.size	printboard, .-printboard
	.p2align 4
	.type	putqueen.part.0, @function
putqueen.part.0:
.LFB27:
	.cfi_startproc
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%edi, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	cmpl	$7, %edi
	je	.L50
	leal	7(%r13), %eax
	addl	$1, %edi
	leaq	col(%rip), %r12
	xorl	%ebx, %ebx
	movl	%eax, 12(%rsp)
	leaq	dpos(%rip), %rdx
	leaq	dneg(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L52:
	cmpl	$1, (%r12)
	je	.L51
	leal	0(%r13,%rbx), %ebp
	movslq	%ebp, %rbp
	cmpl	$1, (%rdx,%rbp,4)
	je	.L51
	movl	12(%rsp), %r15d
	subl	%ebx, %r15d
	movslq	%r15d, %r15
	cmpl	$1, (%r14,%r15,4)
	je	.L51
	movslq	%r13d, %rsi
	leaq	row(%rip), %rax
	movl	%edi, 8(%rsp)
	movl	$1, (%rdx,%rbp,4)
	movl	%ebx, (%rax,%rsi,4)
	movl	$1, (%r14,%r15,4)
	movl	$1, (%r12)
	call	putqueen.part.0
	leaq	dpos(%rip), %rdx
	movl	8(%rsp), %edi
	movl	$0, (%r14,%r15,4)
	movl	$0, (%rdx,%rbp,4)
	movl	$0, (%r12)
.L51:
	addl	$1, %ebx
	addq	$4, %r12
	cmpl	$8, %ebx
	jne	.L52
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L50:
	.cfi_restore_state
	leaq	col(%rip), %r12
	xorl	%ebx, %ebx
	leaq	dpos(%rip), %r15
	leaq	dneg(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L55:
	cmpl	$1, (%r12)
	je	.L54
	leal	7(%rbx), %ebp
	movslq	%ebp, %rbp
	cmpl	$1, (%r15,%rbp,4)
	je	.L54
	movl	$14, %r13d
	subl	%ebx, %r13d
	movslq	%r13d, %r13
	cmpl	$1, (%r14,%r13,4)
	je	.L54
	movl	$1, (%r15,%rbp,4)
	movl	%ebx, 28+row(%rip)
	movl	$1, (%r14,%r13,4)
	movl	$1, (%r12)
	call	printboard
	movl	$0, (%r14,%r13,4)
	movl	$0, (%r15,%rbp,4)
	movl	$0, (%r12)
.L54:
	addl	$1, %ebx
	addq	$4, %r12
	cmpl	$8, %ebx
	jne	.L55
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE27:
	.size	putqueen.part.0, .-putqueen.part.0
	.p2align 4
	.globl	putqueen
	.type	putqueen, @function
putqueen:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	$8, %edi
	je	.L61
	jmp	putqueen.part.0
	.p2align 4,,10
	.p2align 3
.L61:
	jmp	printboard
	.cfi_endproc
.LFE24:
	.size	putqueen, .-putqueen
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L63
	xorl	%ebx, %ebx
	leaq	20(%rsp), %r14
	leaq	16(%rsp), %r13
	leaq	.LC1(%rip), %r12
	leaq	Q(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L64:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rax
	movslq	16(%rsp), %rdx
	addl	$1, %ebx
	leaq	(%rax,%rdx,8), %rax
	movl	$1, 0(%rbp,%rax,4)
	cmpl	%ebx, 12(%rsp)
	jg	.L64
.L63:
	xorl	%edi, %edi
	call	putqueen.part.0
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L68
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L68:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	Q
	.bss
	.align 32
	.type	Q, @object
	.size	Q, 256
Q:
	.zero	256
	.globl	dneg
	.align 32
	.type	dneg, @object
	.size	dneg, 60
dneg:
	.zero	60
	.globl	dpos
	.align 32
	.type	dpos, @object
	.size	dpos, 60
dpos:
	.zero	60
	.globl	col
	.align 32
	.type	col, @object
	.size	col, 32
col:
	.zero	32
	.globl	row
	.align 32
	.type	row, @object
	.size	row, 32
row:
	.zero	32
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.p2align 4
	.globl	printboard
	.type	printboard, @function
printboard:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	Q(%rip), %rax
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	row(%rip), %rbp
	leaq	256(%rax), %rcx
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rbp, %rdx
.L2:
	cmpl	$1, (%rax)
	je	.L47
	cmpl	$1, 4(%rax)
	jne	.L7
	cmpl	$1, (%rdx)
	jne	.L1
	cmpl	$1, 8(%rax)
	je	.L1
	cmpl	$1, 12(%rax)
	je	.L1
.L11:
	cmpl	$1, 16(%rax)
	jne	.L13
	cmpl	$4, (%rdx)
	jne	.L1
	cmpl	$1, 20(%rax)
	je	.L1
	cmpl	$1, 24(%rax)
	je	.L1
.L17:
	cmpl	$1, 28(%rax)
	jne	.L19
	cmpl	$7, (%rdx)
	jne	.L1
.L19:
	addq	$32, %rax
	addq	$4, %rdx
	cmpq	%rcx, %rax
	jne	.L2
	leaq	32+row(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L3:
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L23:
	cmpl	%ebx, 0(%rbp)
	je	.L48
	movl	$46, %edi
	addl	$1, %ebx
	call	putchar@PLT
	cmpl	$8, %ebx
	jne	.L23
.L22:
	movl	$10, %edi
	addq	$4, %rbp
	call	putchar@PLT
	cmpq	%r12, %rbp
	jne	.L3
.L1:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	cmpl	$1, 8(%rax)
	jne	.L9
	cmpl	$2, (%rdx)
	jne	.L1
	cmpl	$1, 12(%rax)
	je	.L1
	cmpl	$1, 16(%rax)
	je	.L1
.L13:
	cmpl	$1, 20(%rax)
	jne	.L15
	cmpl	$5, (%rdx)
	jne	.L1
	cmpl	$1, 24(%rax)
	je	.L1
.L38:
	cmpl	$1, 28(%rax)
	jne	.L19
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L47:
	movl	(%rdx), %esi
	testl	%esi, %esi
	jne	.L1
	cmpl	$1, 4(%rax)
	je	.L1
	cmpl	$1, 8(%rax)
	je	.L1
.L9:
	cmpl	$1, 12(%rax)
	jne	.L11
	cmpl	$3, (%rdx)
	jne	.L1
	cmpl	$1, 16(%rax)
	je	.L1
	cmpl	$1, 20(%rax)
	je	.L1
.L15:
	cmpl	$1, 24(%rax)
	jne	.L17
	cmpl	$6, (%rdx)
	je	.L38
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L48:
	movl	$81, %edi
	addl	$1, %ebx
	call	putchar@PLT
	cmpl	$8, %ebx
	jne	.L23
	jmp	.L22
	.cfi_endproc
.LFE25:
	.size	printboard, .-printboard
	.p2align 4
	.type	putqueen.part.0, @function
putqueen.part.0:
.LFB27:
	.cfi_startproc
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%edi, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	cmpl	$7, %edi
	je	.L50
	leal	7(%r13), %eax
	addl	$1, %edi
	leaq	col(%rip), %r12
	xorl	%ebx, %ebx
	movl	%eax, 12(%rsp)
	leaq	dpos(%rip), %rdx
	leaq	dneg(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L52:
	cmpl	$1, (%r12)
	je	.L51
	leal	0(%r13,%rbx), %ebp
	movslq	%ebp, %rbp
	cmpl	$1, (%rdx,%rbp,4)
	je	.L51
	movl	12(%rsp), %r15d
	subl	%ebx, %r15d
	movslq	%r15d, %r15
	cmpl	$1, (%r14,%r15,4)
	je	.L51
	movslq	%r13d, %rsi
	leaq	row(%rip), %rax
	movl	%edi, 8(%rsp)
	movl	$1, (%rdx,%rbp,4)
	movl	%ebx, (%rax,%rsi,4)
	movl	$1, (%r14,%r15,4)
	movl	$1, (%r12)
	call	putqueen.part.0
	leaq	dpos(%rip), %rdx
	movl	8(%rsp), %edi
	movl	$0, (%r14,%r15,4)
	movl	$0, (%rdx,%rbp,4)
	movl	$0, (%r12)
.L51:
	addl	$1, %ebx
	addq	$4, %r12
	cmpl	$8, %ebx
	jne	.L52
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L50:
	.cfi_restore_state
	leaq	col(%rip), %r12
	xorl	%ebx, %ebx
	leaq	dpos(%rip), %r15
	leaq	dneg(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L55:
	cmpl	$1, (%r12)
	je	.L54
	leal	7(%rbx), %ebp
	movslq	%ebp, %rbp
	cmpl	$1, (%r15,%rbp,4)
	je	.L54
	movl	$14, %r13d
	subl	%ebx, %r13d
	movslq	%r13d, %r13
	cmpl	$1, (%r14,%r13,4)
	je	.L54
	movl	$1, (%r15,%rbp,4)
	movl	%ebx, 28+row(%rip)
	movl	$1, (%r14,%r13,4)
	movl	$1, (%r12)
	call	printboard
	movl	$0, (%r14,%r13,4)
	movl	$0, (%r15,%rbp,4)
	movl	$0, (%r12)
.L54:
	addl	$1, %ebx
	addq	$4, %r12
	cmpl	$8, %ebx
	jne	.L55
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE27:
	.size	putqueen.part.0, .-putqueen.part.0
	.p2align 4
	.globl	putqueen
	.type	putqueen, @function
putqueen:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	$8, %edi
	je	.L61
	jmp	putqueen.part.0
	.p2align 4,,10
	.p2align 3
.L61:
	jmp	printboard
	.cfi_endproc
.LFE24:
	.size	putqueen, .-putqueen
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L63
	xorl	%ebx, %ebx
	leaq	20(%rsp), %r14
	leaq	16(%rsp), %r13
	leaq	.LC1(%rip), %r12
	leaq	Q(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L64:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rax
	movslq	16(%rsp), %rdx
	addl	$1, %ebx
	leaq	(%rax,%rdx,8), %rax
	movl	$1, 0(%rbp,%rax,4)
	cmpl	%ebx, 12(%rsp)
	jg	.L64
.L63:
	xorl	%edi, %edi
	call	putqueen.part.0
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L68
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L68:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	Q
	.bss
	.align 32
	.type	Q, @object
	.size	Q, 256
Q:
	.zero	256
	.globl	dneg
	.align 32
	.type	dneg, @object
	.size	dneg, 60
dneg:
	.zero	60
	.globl	dpos
	.align 32
	.type	dpos, @object
	.size	dpos, 60
dpos:
	.zero	60
	.globl	col
	.align 32
	.type	col, @object
	.size	col, 32
col:
	.zero	32
	.globl	row
	.align 32
	.type	row, @object
	.size	row, 32
row:
	.zero	32
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include<stdio.h>
#define NOT_FREE 1
#define FREE 0
#define N 8

void putqueen(int);
void printboard(void);

int row[N], col[N], dpos[2*N-1], dneg[2*N-1], Q[N][N];

int main(){
  int k, i, r, c, j;

  scanf("%d", &k);

  for(i = 0; i < k; i++){
    scanf("%d%d", &r, &c);
    Q[r][c] = NOT_FREE;
  }

  putqueen(0);

  return 0;
}

void putqueen(int i){
  int j;

  if(i == N){
    printboard();
    return;
  }

  for(j = 0; j < N; j++){
    if(col[j] == NOT_FREE || dpos[i+j] == NOT_FREE || dneg[i-j+N-1] == NOT_FREE)
      continue;
    row[i] = j;
    col[j] = dpos[i+j] = dneg[i-j+N-1] = NOT_FREE;
    putqueen(i+1);
    col[j] = dpos[i+j] = dneg[i-j+N-1] = FREE;
  }
}

void printboard(){
  int i, j;

  for(i = 0; i < N; i++){
    for(j = 0; j < N; j++){
      if(Q[i][j] == NOT_FREE){
	if(row[i] != j)
	  return;
      }
    }
  }

  for(i = 0; i < N; i++){
    for(j = 0; j < N; j++){
      if(row[i] == j)
	printf("Q");
      else
	printf(".");
    }
    printf("\n");
  }
}
2
1 4
5 3
 2
0 4
5 3
 2
0 4
5 2
 2
1 4
6 3
 2
1 0
5 3
 2
2 4
6 3
 2
0 0
5 1
 2
3 0
5 5
 2
0 4
4 3
 2
2 0
5 5

..Q.....
....Q...
.Q......
.......Q
.....Q..
...Q....
......Q.
Q.......
 ....Q...
.Q......
.....Q..
Q.......
......Q.
...Q....
.......Q
..Q.....
 ....Q...
.Q......
...Q....
.....Q..
.......Q
..Q.....
Q.......
......Q.
 ..Q.....
....Q...
.Q......
.......Q
Q.......
......Q.
...Q....
.....Q..
 ......Q.
Q.......
..Q.....
.......Q
.....Q..
...Q....
.Q......
....Q...
 .......Q
.Q......
....Q...
..Q.....
Q.......
......Q.
...Q....
.....Q..
 Q.......
......Q.
...Q....
.....Q..
.......Q
.Q......
....Q...
..Q.....
 ....Q...
.......Q
...Q....
Q.......
..Q.....
.....Q..
.Q......
......Q.
 ....Q...
.Q......
.......Q
Q.......
...Q....
......Q.
..Q.....
.....Q..
 ....Q...
......Q.
Q.......
..Q.....
.......Q
.....Q..
...Q....
.Q......

Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
#define NOT_FREE 1
#define FREE 0
#define N 8

void putqueen(int);
void printboard(void);

int row[N], col[N], dpos[2*N-1], dneg[2*N-1], Q[N][N];

int main(){
  int k, i, r, c, j;

  scanf("%d", &k);

  for(i = 0; i < k; i++){
    scanf("%d%d", &r, &c);
    Q[r][c] = NOT_FREE;
  }

  putqueen(0);

  return 0;
}

void putqueen(int i){
  int j;

  if(i == N){
    printboard();
    return;
  }

  for(j = 0; j < N; j++){
    if(col[j] == NOT_FREE || dpos[i+j] == NOT_FREE || dneg[i-j+N-1] == NOT_FREE)
      continue;
    row[i] = j;
    col[j] = dpos[i+j] = dneg[i-j+N-1] = NOT_FREE;
    putqueen(i+1);
    col[j] = dpos[i+j] = dneg[i-j+N-1] = FREE;
  }
}

void printboard(){
  int i, j;

  for(i = 0; i < N; i++){
    for(j = 0; j < N; j++){
      if(Q[i][j] == NOT_FREE){
	if(row[i] != j)
	  return;
      }
    }
  }

  for(i = 0; i < N; i++){
    for(j = 0; j < N; j++){
      if(row[i] == j)
	printf("Q");
      else
	printf(".");
    }
    printf("\n");
  }
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	row
	.bss
	.align 32
	.type	row, @object
	.size	row, 32
row:
	.zero	32
	.globl	col
	.align 32
	.type	col, @object
	.size	col, 32
col:
	.zero	32
	.globl	dpos
	.align 32
	.type	dpos, @object
	.size	dpos, 60
dpos:
	.zero	60
	.globl	dneg
	.align 32
	.type	dneg, @object
	.size	dneg, 60
dneg:
	.zero	60
	.globl	Q
	.align 32
	.type	Q, @object
	.size	Q, 256
Q:
	.zero	256
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L2
.L3:
	leaq	-16(%rbp), %rdx
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %eax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	Q(%rip), %rax
	movl	$1, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L2:
	movl	-24(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L3
	movl	$0, %edi
	call	putqueen
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	putqueen
	.type	putqueen, @function
putqueen:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	cmpl	$8, -20(%rbp)
	jne	.L7
	call	printboard
	jmp	.L6
.L7:
	movl	$0, -4(%rbp)
	jmp	.L9
.L13:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	col(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	je	.L14
	movl	-20(%rbp), %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dpos(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	je	.L14
	movl	-20(%rbp), %eax
	subl	-4(%rbp), %eax
	addl	$7, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dneg(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	je	.L14
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	row(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	subl	-4(%rbp), %eax
	leal	7(%rax), %edx
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	dneg(%rip), %rax
	movl	$1, (%rcx,%rax)
	movl	-20(%rbp), %ecx
	movl	-4(%rbp), %eax
	addl	%ecx, %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	dneg(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%eax, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	dpos(%rip), %rcx
	movl	%edx, (%rsi,%rcx)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dpos(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	col(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	putqueen
	movl	-20(%rbp), %eax
	subl	-4(%rbp), %eax
	leal	7(%rax), %edx
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	dneg(%rip), %rax
	movl	$0, (%rcx,%rax)
	movl	-20(%rbp), %ecx
	movl	-4(%rbp), %eax
	addl	%ecx, %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	dneg(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%eax, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	dpos(%rip), %rcx
	movl	%edx, (%rsi,%rcx)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dpos(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	col(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	jmp	.L12
.L14:
	nop
.L12:
	addl	$1, -4(%rbp)
.L9:
	cmpl	$7, -4(%rbp)
	jle	.L13
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	putqueen, .-putqueen
	.globl	printboard
	.type	printboard, @function
printboard:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -8(%rbp)
	jmp	.L16
.L21:
	movl	$0, -4(%rbp)
	jmp	.L17
.L20:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	Q(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	jne	.L18
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	row(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4(%rbp)
	jne	.L28
.L18:
	addl	$1, -4(%rbp)
.L17:
	cmpl	$7, -4(%rbp)
	jle	.L20
	addl	$1, -8(%rbp)
.L16:
	cmpl	$7, -8(%rbp)
	jle	.L21
	movl	$0, -8(%rbp)
	jmp	.L22
.L27:
	movl	$0, -4(%rbp)
	jmp	.L23
.L26:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	row(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4(%rbp)
	jne	.L24
	movl	$81, %edi
	call	putchar@PLT
	jmp	.L25
.L24:
	movl	$46, %edi
	call	putchar@PLT
.L25:
	addl	$1, -4(%rbp)
.L23:
	cmpl	$7, -4(%rbp)
	jle	.L26
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -8(%rbp)
.L22:
	cmpl	$7, -8(%rbp)
	jle	.L27
	jmp	.L15
.L28:
	nop
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	printboard, .-printboard
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.globl	row
	.bss
	.align 32
	.type	row, @object
	.size	row, 32
row:
	.zero	32
	.globl	col
	.align 32
	.type	col, @object
	.size	col, 32
col:
	.zero	32
	.globl	dpos
	.align 32
	.type	dpos, @object
	.size	dpos, 60
dpos:
	.zero	60
	.globl	dneg
	.align 32
	.type	dneg, @object
	.size	dneg, 60
dneg:
	.zero	60
	.globl	Q
	.align 32
	.type	Q, @object
	.size	Q, 256
Q:
	.zero	256
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L2
.L3:
	leaq	-16(%rbp), %rdx
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %eax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	Q(%rip), %rax
	movl	$1, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L2:
	movl	-24(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L3
	movl	$0, %edi
	call	putqueen
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	putqueen
	.type	putqueen, @function
putqueen:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	cmpl	$8, -20(%rbp)
	jne	.L7
	call	printboard
	jmp	.L6
.L7:
	movl	$0, -4(%rbp)
	jmp	.L9
.L13:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	col(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	je	.L14
	movl	-20(%rbp), %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dpos(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	je	.L14
	movl	-20(%rbp), %eax
	subl	-4(%rbp), %eax
	addl	$7, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dneg(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	je	.L14
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	row(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	subl	-4(%rbp), %eax
	leal	7(%rax), %edx
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	dneg(%rip), %rax
	movl	$1, (%rcx,%rax)
	movl	-20(%rbp), %ecx
	movl	-4(%rbp), %eax
	addl	%ecx, %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	dneg(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%eax, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	dpos(%rip), %rcx
	movl	%edx, (%rsi,%rcx)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dpos(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	col(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	putqueen
	movl	-20(%rbp), %eax
	subl	-4(%rbp), %eax
	leal	7(%rax), %edx
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	dneg(%rip), %rax
	movl	$0, (%rcx,%rax)
	movl	-20(%rbp), %ecx
	movl	-4(%rbp), %eax
	addl	%ecx, %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	dneg(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%eax, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	dpos(%rip), %rcx
	movl	%edx, (%rsi,%rcx)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dpos(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	col(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	jmp	.L12
.L14:
	nop
.L12:
	addl	$1, -4(%rbp)
.L9:
	cmpl	$7, -4(%rbp)
	jle	.L13
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	putqueen, .-putqueen
	.globl	printboard
	.type	printboard, @function
printboard:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -8(%rbp)
	jmp	.L16
.L21:
	movl	$0, -4(%rbp)
	jmp	.L17
.L20:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	Q(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	jne	.L18
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	row(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4(%rbp)
	jne	.L28
.L18:
	addl	$1, -4(%rbp)
.L17:
	cmpl	$7, -4(%rbp)
	jle	.L20
	addl	$1, -8(%rbp)
.L16:
	cmpl	$7, -8(%rbp)
	jle	.L21
	movl	$0, -8(%rbp)
	jmp	.L22
.L27:
	movl	$0, -4(%rbp)
	jmp	.L23
.L26:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	row(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4(%rbp)
	jne	.L24
	movl	$81, %edi
	call	putchar@PLT
	jmp	.L25
.L24:
	movl	$46, %edi
	call	putchar@PLT
.L25:
	addl	$1, -4(%rbp)
.L23:
	cmpl	$7, -4(%rbp)
	jle	.L26
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -8(%rbp)
.L22:
	cmpl	$7, -8(%rbp)
	jle	.L27
	jmp	.L15
.L28:
	nop
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	printboard, .-printboard
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
