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

```c
check[30], c, n, a, xor_sum, ans, bit, i;
main() {
  while (1) {
    c = getchar_unlocked();
    if (48 <= c && c <= 57)
      n = n * 10 + c - 48;
    else
      break;
  }

  for (i = 0; i < n; i++) {
    a = 0;
    while (1) {
      c = getchar_unlocked();
      if (48 <= c && c <= 57)
        a = a * 10 + c - 48;
      else
        break;
    }
    xor_sum ^= a;
    a = a ^ (a - 1);

    check[__builtin_popcount(a) - 1] = 1;
  }

  for (bit = 29; bit >= 0; bit--) {
    if (check[bit] && ((1 << bit) & xor_sum)) {
      xor_sum ^= (1 << (bit + 1)) - 1;
      ans += 1;
    }
  }

  printf("%d\n", xor_sum ? -1 : ans);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	check
	.bss
	.align 32
	.type	check, @object
	.size	check, 120
check:
	.zero	120
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	xor_sum
	.align 4
	.type	xor_sum, @object
	.size	xor_sum, 4
xor_sum:
	.zero	4
	.globl	ans
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.zero	4
	.globl	bit
	.align 4
	.type	bit, @object
	.size	bit, 4
bit:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	__popcountdi2
	.section	.rodata
.LC0:
	.string	"%d\n"
	.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
.L3:
	movl	$0, %eax
	call	getchar_unlocked@PLT
	movl	%eax, c(%rip)
	movl	c(%rip), %eax
	cmpl	$47, %eax
	jle	.L2
	movl	c(%rip), %eax
	cmpl	$57, %eax
	jg	.L2
	movl	n(%rip), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movl	c(%rip), %eax
	addl	%edx, %eax
	subl	$48, %eax
	movl	%eax, n(%rip)
	jmp	.L3
.L2:
	movl	$0, i(%rip)
	jmp	.L4
.L7:
	movl	$0, a(%rip)
.L6:
	movl	$0, %eax
	call	getchar_unlocked@PLT
	movl	%eax, c(%rip)
	movl	c(%rip), %eax
	cmpl	$47, %eax
	jle	.L5
	movl	c(%rip), %eax
	cmpl	$57, %eax
	jg	.L5
	movl	a(%rip), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movl	c(%rip), %eax
	addl	%edx, %eax
	subl	$48, %eax
	movl	%eax, a(%rip)
	jmp	.L6
.L5:
	movl	xor_sum(%rip), %edx
	movl	a(%rip), %eax
	xorl	%edx, %eax
	movl	%eax, xor_sum(%rip)
	movl	a(%rip), %eax
	leal	-1(%rax), %edx
	movl	a(%rip), %eax
	xorl	%edx, %eax
	movl	%eax, a(%rip)
	movl	a(%rip), %eax
	movl	%eax, %eax
	movq	%rax, %rdi
	call	__popcountdi2@PLT
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	check(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L4:
	movl	i(%rip), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jl	.L7
	movl	$29, bit(%rip)
	jmp	.L8
.L10:
	movl	bit(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	check(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L9
	movl	xor_sum(%rip), %edx
	movl	bit(%rip), %eax
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L9
	movl	bit(%rip), %eax
	addl	$1, %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	leal	-1(%rax), %edx
	movl	xor_sum(%rip), %eax
	xorl	%edx, %eax
	movl	%eax, xor_sum(%rip)
	movl	ans(%rip), %eax
	addl	$1, %eax
	movl	%eax, ans(%rip)
.L9:
	movl	bit(%rip), %eax
	subl	$1, %eax
	movl	%eax, bit(%rip)
.L8:
	movl	bit(%rip), %eax
	testl	%eax, %eax
	jns	.L10
	movl	xor_sum(%rip), %eax
	testl	%eax, %eax
	jne	.L11
	movl	ans(%rip), %eax
	jmp	.L12
.L11:
	movl	$-1, %eax
.L12:
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.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
	.globl	__popcountdi2
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L24:
	movl	n(%rip), %edx
	leal	(%rdx,%rdx,4), %edx
	leal	-48(%rax,%rdx,2), %eax
	movl	%eax, n(%rip)
.L3:
	xorl	%eax, %eax
	call	getchar_unlocked@PLT
	leal	-48(%rax), %edx
	movl	%eax, c(%rip)
	cmpl	$9, %edx
	jbe	.L24
	movl	n(%rip), %r9d
	movl	$0, i(%rip)
	testl	%r9d, %r9d
	jle	.L4
	leaq	check(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L7:
	xorl	%eax, %eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L25:
	movl	a(%rip), %edx
	leal	(%rdx,%rdx,4), %edx
	leal	-48(%rax,%rdx,2), %eax
.L6:
	movl	%eax, a(%rip)
	xorl	%eax, %eax
	call	getchar_unlocked@PLT
	leal	-48(%rax), %edx
	movl	%eax, c(%rip)
	cmpl	$9, %edx
	jbe	.L25
	movl	a(%rip), %eax
	movl	xor_sum(%rip), %ebp
	leal	-1(%rax), %edi
	xorl	%eax, %ebp
	xorl	%eax, %edi
	movl	%ebp, xor_sum(%rip)
	movl	%edi, a(%rip)
	call	__popcountdi2@PLT
	subl	$1, %eax
	cltq
	movl	$1, (%rbx,%rax,4)
	movl	i(%rip), %eax
	addl	$1, %eax
	cmpl	n(%rip), %eax
	movl	%eax, i(%rip)
	jl	.L7
.L8:
	movl	ans(%rip), %esi
	movl	$29, %eax
	xorl	%edx, %edx
	movl	$1, %edi
	.p2align 4,,10
	.p2align 3
.L10:
	movl	(%rbx,%rax,4), %r8d
	movl	%eax, %ecx
	testl	%r8d, %r8d
	je	.L9
	btl	%eax, %ebp
	jnc	.L9
	addl	$1, %ecx
	movl	%edi, %edx
	addl	$1, %esi
	sall	%cl, %edx
	subl	$1, %edx
	xorl	%edx, %ebp
	movl	$1, %edx
.L9:
	subq	$1, %rax
	jnb	.L10
	movl	$-1, bit(%rip)
	testb	%dl, %dl
	je	.L11
	movl	%esi, ans(%rip)
	movl	%ebp, xor_sum(%rip)
.L11:
	movl	xor_sum(%rip), %eax
	movl	$-1, %esi
	testl	%eax, %eax
	jne	.L12
	movl	ans(%rip), %esi
.L12:
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	printf@PLT
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L4:
	.cfi_restore_state
	movl	xor_sum(%rip), %ebp
	leaq	check(%rip), %rbx
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	bit
	.align 4
	.type	bit, @object
	.size	bit, 4
bit:
	.zero	4
	.globl	ans
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.zero	4
	.globl	xor_sum
	.align 4
	.type	xor_sum, @object
	.size	xor_sum, 4
xor_sum:
	.zero	4
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	check
	.align 32
	.type	check, @object
	.size	check, 120
check:
	.zero	120
	.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
	.globl	__popcountdi2
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L24:
	movl	n(%rip), %edx
	leal	(%rdx,%rdx,4), %edx
	leal	-48(%rax,%rdx,2), %eax
	movl	%eax, n(%rip)
.L3:
	xorl	%eax, %eax
	call	getchar_unlocked@PLT
	leal	-48(%rax), %edx
	movl	%eax, c(%rip)
	cmpl	$9, %edx
	jbe	.L24
	movl	n(%rip), %r9d
	movl	$0, i(%rip)
	testl	%r9d, %r9d
	jle	.L4
	leaq	check(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L7:
	xorl	%eax, %eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L25:
	movl	a(%rip), %edx
	leal	(%rdx,%rdx,4), %edx
	leal	-48(%rax,%rdx,2), %eax
.L6:
	movl	%eax, a(%rip)
	xorl	%eax, %eax
	call	getchar_unlocked@PLT
	leal	-48(%rax), %edx
	movl	%eax, c(%rip)
	cmpl	$9, %edx
	jbe	.L25
	movl	a(%rip), %eax
	movl	xor_sum(%rip), %ebp
	leal	-1(%rax), %edi
	xorl	%eax, %ebp
	xorl	%eax, %edi
	movl	%ebp, xor_sum(%rip)
	movl	%edi, a(%rip)
	call	__popcountdi2@PLT
	subl	$1, %eax
	cltq
	movl	$1, (%rbx,%rax,4)
	movl	i(%rip), %eax
	addl	$1, %eax
	cmpl	n(%rip), %eax
	movl	%eax, i(%rip)
	jl	.L7
.L8:
	movl	ans(%rip), %esi
	movl	$29, %eax
	xorl	%edx, %edx
	movl	$1, %edi
	.p2align 4,,10
	.p2align 3
.L10:
	movl	(%rbx,%rax,4), %r8d
	movl	%eax, %ecx
	testl	%r8d, %r8d
	je	.L9
	btl	%eax, %ebp
	jnc	.L9
	addl	$1, %ecx
	movl	%edi, %edx
	addl	$1, %esi
	sall	%cl, %edx
	subl	$1, %edx
	xorl	%edx, %ebp
	movl	$1, %edx
.L9:
	subq	$1, %rax
	jnb	.L10
	movl	$-1, bit(%rip)
	testb	%dl, %dl
	je	.L11
	movl	%esi, ans(%rip)
	movl	%ebp, xor_sum(%rip)
.L11:
	movl	xor_sum(%rip), %eax
	movl	$-1, %esi
	testl	%eax, %eax
	jne	.L12
	movl	ans(%rip), %esi
.L12:
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	printf@PLT
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L4:
	.cfi_restore_state
	movl	xor_sum(%rip), %ebp
	leaq	check(%rip), %rbx
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	bit
	.align 4
	.type	bit, @object
	.size	bit, 4
bit:
	.zero	4
	.globl	ans
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.zero	4
	.globl	xor_sum
	.align 4
	.type	xor_sum, @object
	.size	xor_sum, 4
xor_sum:
	.zero	4
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	check
	.align 32
	.type	check, @object
	.size	check, 120
check:
	.zero	120
	.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:

check[30], c, n, a, xor_sum, ans, bit, i;
main() {
  while (1) {
    c = getchar_unlocked();
    if (48 <= c && c <= 57)
      n = n * 10 + c - 48;
    else
      break;
  }

  for (i = 0; i < n; i++) {
    a = 0;
    while (1) {
      c = getchar_unlocked();
      if (48 <= c && c <= 57)
        a = a * 10 + c - 48;
      else
        break;
    }
    xor_sum ^= a;
    a = a ^ (a - 1);

    check[__builtin_popcount(a) - 1] = 1;
  }

  for (bit = 29; bit >= 0; bit--) {
    if (check[bit] && ((1 << bit) & xor_sum)) {
      xor_sum ^= (1 << (bit + 1)) - 1;
      ans += 1;
    }
  }

  printf("%d\n", xor_sum ? -1 : ans);
}
3
2
3
4

3

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

```c
check[30], c, n, a, xor_sum, ans, bit, i;
main() {
  while (1) {
    c = getchar_unlocked();
    if (48 <= c && c <= 57)
      n = n * 10 + c - 48;
    else
      break;
  }

  for (i = 0; i < n; i++) {
    a = 0;
    while (1) {
      c = getchar_unlocked();
      if (48 <= c && c <= 57)
        a = a * 10 + c - 48;
      else
        break;
    }
    xor_sum ^= a;
    a = a ^ (a - 1);

    check[__builtin_popcount(a) - 1] = 1;
  }

  for (bit = 29; bit >= 0; bit--) {
    if (check[bit] && ((1 << bit) & xor_sum)) {
      xor_sum ^= (1 << (bit + 1)) - 1;
      ans += 1;
    }
  }

  printf("%d\n", xor_sum ? -1 : ans);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	check
	.bss
	.align 32
	.type	check, @object
	.size	check, 120
check:
	.zero	120
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	xor_sum
	.align 4
	.type	xor_sum, @object
	.size	xor_sum, 4
xor_sum:
	.zero	4
	.globl	ans
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.zero	4
	.globl	bit
	.align 4
	.type	bit, @object
	.size	bit, 4
bit:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	__popcountdi2
	.section	.rodata
.LC0:
	.string	"%d\n"
	.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
.L3:
	movl	$0, %eax
	call	getchar_unlocked@PLT
	movl	%eax, c(%rip)
	movl	c(%rip), %eax
	cmpl	$47, %eax
	jle	.L2
	movl	c(%rip), %eax
	cmpl	$57, %eax
	jg	.L2
	movl	n(%rip), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movl	c(%rip), %eax
	addl	%edx, %eax
	subl	$48, %eax
	movl	%eax, n(%rip)
	jmp	.L3
.L2:
	movl	$0, i(%rip)
	jmp	.L4
.L7:
	movl	$0, a(%rip)
.L6:
	movl	$0, %eax
	call	getchar_unlocked@PLT
	movl	%eax, c(%rip)
	movl	c(%rip), %eax
	cmpl	$47, %eax
	jle	.L5
	movl	c(%rip), %eax
	cmpl	$57, %eax
	jg	.L5
	movl	a(%rip), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movl	c(%rip), %eax
	addl	%edx, %eax
	subl	$48, %eax
	movl	%eax, a(%rip)
	jmp	.L6
.L5:
	movl	xor_sum(%rip), %edx
	movl	a(%rip), %eax
	xorl	%edx, %eax
	movl	%eax, xor_sum(%rip)
	movl	a(%rip), %eax
	leal	-1(%rax), %edx
	movl	a(%rip), %eax
	xorl	%edx, %eax
	movl	%eax, a(%rip)
	movl	a(%rip), %eax
	movl	%eax, %eax
	movq	%rax, %rdi
	call	__popcountdi2@PLT
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	check(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L4:
	movl	i(%rip), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jl	.L7
	movl	$29, bit(%rip)
	jmp	.L8
.L10:
	movl	bit(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	check(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L9
	movl	xor_sum(%rip), %edx
	movl	bit(%rip), %eax
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L9
	movl	bit(%rip), %eax
	addl	$1, %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	leal	-1(%rax), %edx
	movl	xor_sum(%rip), %eax
	xorl	%edx, %eax
	movl	%eax, xor_sum(%rip)
	movl	ans(%rip), %eax
	addl	$1, %eax
	movl	%eax, ans(%rip)
.L9:
	movl	bit(%rip), %eax
	subl	$1, %eax
	movl	%eax, bit(%rip)
.L8:
	movl	bit(%rip), %eax
	testl	%eax, %eax
	jns	.L10
	movl	xor_sum(%rip), %eax
	testl	%eax, %eax
	jne	.L11
	movl	ans(%rip), %eax
	jmp	.L12
.L11:
	movl	$-1, %eax
.L12:
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.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	check
	.bss
	.align 32
	.type	check, @object
	.size	check, 120
check:
	.zero	120
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	xor_sum
	.align 4
	.type	xor_sum, @object
	.size	xor_sum, 4
xor_sum:
	.zero	4
	.globl	ans
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.zero	4
	.globl	bit
	.align 4
	.type	bit, @object
	.size	bit, 4
bit:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	__popcountdi2
	.section	.rodata
.LC0:
	.string	"%d\n"
	.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
.L3:
	movl	$0, %eax
	call	getchar_unlocked@PLT
	movl	%eax, c(%rip)
	movl	c(%rip), %eax
	cmpl	$47, %eax
	jle	.L2
	movl	c(%rip), %eax
	cmpl	$57, %eax
	jg	.L2
	movl	n(%rip), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movl	c(%rip), %eax
	addl	%edx, %eax
	subl	$48, %eax
	movl	%eax, n(%rip)
	jmp	.L3
.L2:
	movl	$0, i(%rip)
	jmp	.L4
.L7:
	movl	$0, a(%rip)
.L6:
	movl	$0, %eax
	call	getchar_unlocked@PLT
	movl	%eax, c(%rip)
	movl	c(%rip), %eax
	cmpl	$47, %eax
	jle	.L5
	movl	c(%rip), %eax
	cmpl	$57, %eax
	jg	.L5
	movl	a(%rip), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movl	c(%rip), %eax
	addl	%edx, %eax
	subl	$48, %eax
	movl	%eax, a(%rip)
	jmp	.L6
.L5:
	movl	xor_sum(%rip), %edx
	movl	a(%rip), %eax
	xorl	%edx, %eax
	movl	%eax, xor_sum(%rip)
	movl	a(%rip), %eax
	leal	-1(%rax), %edx
	movl	a(%rip), %eax
	xorl	%edx, %eax
	movl	%eax, a(%rip)
	movl	a(%rip), %eax
	movl	%eax, %eax
	movq	%rax, %rdi
	call	__popcountdi2@PLT
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	check(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L4:
	movl	i(%rip), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jl	.L7
	movl	$29, bit(%rip)
	jmp	.L8
.L10:
	movl	bit(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	check(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L9
	movl	xor_sum(%rip), %edx
	movl	bit(%rip), %eax
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L9
	movl	bit(%rip), %eax
	addl	$1, %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	leal	-1(%rax), %edx
	movl	xor_sum(%rip), %eax
	xorl	%edx, %eax
	movl	%eax, xor_sum(%rip)
	movl	ans(%rip), %eax
	addl	$1, %eax
	movl	%eax, ans(%rip)
.L9:
	movl	bit(%rip), %eax
	subl	$1, %eax
	movl	%eax, bit(%rip)
.L8:
	movl	bit(%rip), %eax
	testl	%eax, %eax
	jns	.L10
	movl	xor_sum(%rip), %eax
	testl	%eax, %eax
	jne	.L11
	movl	ans(%rip), %eax
	jmp	.L12
.L11:
	movl	$-1, %eax
.L12:
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.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:
