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

```c
check[30], c, n, a, xor_sum, A, B, 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;
    check[__builtin_popcount(a ^ (a - 1)) - 1] = 1;
  }

  for (B = 29; B >= 0; B--)
    if (check[B] && ((1 << B) & xor_sum))
      xor_sum ^= (1 << (B + 1)) - 1, A++;

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

Assembly Code:

```assembly
	.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)
	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	A(%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, B(%rip)
	testb	%dl, %dl
	je	.L11
	movl	%esi, A(%rip)
	movl	%ebp, xor_sum(%rip)
.L11:
	movl	xor_sum(%rip), %eax
	movl	$-1, %esi
	testl	%eax, %eax
	jne	.L12
	movl	A(%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	B
	.align 4
	.type	B, @object
	.size	B, 4
B:
	.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	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:
```

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.
Optimized Assembly Code:

user
```assembly
	.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)
	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	A(%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, B(%rip)
	testb	%dl, %dl
	je	.L11
	movl	%esi, A(%rip)
	movl	%ebp, xor_sum(%rip)
.L11:
	movl	xor_sum(%rip), %eax
	movl	$-1, %esi
	testl	%eax, %eax
	jne	.L12
	movl	A(%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	B
	.align 4
	.type	B, @object
	.size	B, 4
B:
	.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	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
```assembly
	.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)
	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	A(%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, B(%rip)
	testb	%dl, %dl
	je	.L11
	movl	%esi, A(%rip)
	movl	%ebp, xor_sum(%rip)
.L11:
	movl	xor_sum(%rip), %eax
	movl	$-1, %esi
	testl	%eax, %eax
	jne	.L12
	movl	A(%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	B
	.align 4
	.type	B, @object
	.size	B, 4
B:
	.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	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:
```
```c
check[30], c, n, a, xor_sum, A, B, 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;
    check[__builtin_popcount(a ^ (a - 1)) - 1] = 1;
  }

  for (B = 29; B >= 0; B--)
    if (check[B] && ((1 << B) & xor_sum))
      xor_sum ^= (1 << (B + 1)) - 1, A++;

  printf("%d\n", xor_sum ? -1 : A);
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
check[30], c, n, a, xor_sum, A, B, 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;
    check[__builtin_popcount(a ^ (a - 1)) - 1] = 1;
  }

  for (B = 29; B >= 0; B--)
    if (check[B] && ((1 << B) & xor_sum))
      xor_sum ^= (1 << (B + 1)) - 1, A++;

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

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.
Optimized Assembly Code:

3
2
3
4

3

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

```c
check[30], c, n, a, xor_sum, A, B, 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;
    check[__builtin_popcount(a ^ (a - 1)) - 1] = 1;
  }

  for (B = 29; B >= 0; B--)
    if (check[B] && ((1 << B) & xor_sum))
      xor_sum ^= (1 << (B + 1)) - 1, A++;

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

Assembly Code:

```assembly
	.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)
	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	A(%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, B(%rip)
	testb	%dl, %dl
	je	.L11
	movl	%esi, A(%rip)
	movl	%ebp, xor_sum(%rip)
.L11:
	movl	xor_sum(%rip), %eax
	movl	$-1, %esi
	testl	%eax, %eax
	jne	.L12
	movl	A(%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	B
	.align 4
	.type	B, @object
	.size	B, 4
B:
	.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	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:
```

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.
Optimized Assembly Code:

train
```assembly
	.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)
	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	A(%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, B(%rip)
	testb	%dl, %dl
	je	.L11
	movl	%esi, A(%rip)
	movl	%ebp, xor_sum(%rip)
.L11:
	movl	xor_sum(%rip), %eax
	movl	$-1, %esi
	testl	%eax, %eax
	jne	.L12
	movl	A(%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	B
	.align 4
	.type	B, @object
	.size	B, 4
B:
	.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	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:
```