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>
#include <stdlib.h>
#include <string.h>

typedef struct data
{
  int k;
  int s;
  int p;
} DATA;

int count_bit(int n)
{
  int count = 0;

  while(n)
  {
    count += n & 1;
    n >>= 1;
  }

  return count;
}

int main(int argc, char **argv)
{
  int i = 0;
  int j = 0;
  int n = 0;
  int m = 0;
  DATA d[10] = {0};
  int s = 0;
  int count = 0;

  scanf("%d %d", &n, &m);

  for(i = 0; i < m; i++)
  {
    scanf("%d", &d[i].k);
    for(j = 0; j < d[i].k; j++)
    {
      scanf("%d", &s);
      d[i].s |= (1 << (s - 1));
    }
  }
  for(i = 0; i < m; i++)
  {
      scanf("%d", &d[i].p);
  }

  for(i = 0; i < (1 << n); i++)
  {
    for(j = 0; j < m; j++)
    {
      if((count_bit(i & d[j].s) & 1) != d[j].p)
      {
        break;
      }
    }
    if(j == m) count++;
  }
  printf("%d\n", count);

  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	count_bit
	.type	count_bit, @function
count_bit:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L2
.L3:
	movl	-20(%rbp), %eax
	andl	$1, %eax
	addl	%eax, -4(%rbp)
	sarl	-20(%rbp)
.L2:
	cmpl	$0, -20(%rbp)
	jne	.L3
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	count_bit, .-count_bit
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$176, %rsp
	movl	%edi, -164(%rbp)
	movq	%rsi, -176(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -140(%rbp)
	movl	$0, -136(%rbp)
	movl	$0, -152(%rbp)
	movl	$0, -148(%rbp)
	leaq	-128(%rbp), %rdx
	movl	$0, %eax
	movl	$15, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$0, -144(%rbp)
	movl	$0, -132(%rbp)
	leaq	-148(%rbp), %rdx
	leaq	-152(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -140(%rbp)
	jmp	.L6
.L9:
	leaq	-128(%rbp), %rcx
	movl	-140(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -136(%rbp)
	jmp	.L7
.L8:
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-140(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$124, %rax
	movl	(%rax), %edx
	movl	-144(%rbp), %eax
	subl	$1, %eax
	movl	$1, %esi
	movl	%eax, %ecx
	sall	%cl, %esi
	movl	%esi, %eax
	movl	%edx, %ecx
	orl	%eax, %ecx
	movl	-140(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$124, %rax
	movl	%ecx, (%rax)
	addl	$1, -136(%rbp)
.L7:
	movl	-140(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	addq	$-128, %rax
	movl	(%rax), %eax
	cmpl	%eax, -136(%rbp)
	jl	.L8
	addl	$1, -140(%rbp)
.L6:
	movl	-148(%rbp), %eax
	cmpl	%eax, -140(%rbp)
	jl	.L9
	movl	$0, -140(%rbp)
	jmp	.L10
.L11:
	leaq	-128(%rbp), %rcx
	movl	-140(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	addq	$8, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -140(%rbp)
.L10:
	movl	-148(%rbp), %eax
	cmpl	%eax, -140(%rbp)
	jl	.L11
	movl	$0, -140(%rbp)
	jmp	.L12
.L18:
	movl	$0, -136(%rbp)
	jmp	.L13
.L16:
	movl	-136(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$124, %rax
	movl	(%rax), %eax
	andl	-140(%rbp), %eax
	movl	%eax, %edi
	call	count_bit
	andl	$1, %eax
	movl	%eax, %ecx
	movl	-136(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$120, %rax
	movl	(%rax), %eax
	cmpl	%eax, %ecx
	jne	.L21
	addl	$1, -136(%rbp)
.L13:
	movl	-148(%rbp), %eax
	cmpl	%eax, -136(%rbp)
	jl	.L16
	jmp	.L15
.L21:
	nop
.L15:
	movl	-148(%rbp), %eax
	cmpl	%eax, -136(%rbp)
	jne	.L17
	addl	$1, -132(%rbp)
.L17:
	addl	$1, -140(%rbp)
.L12:
	movl	-152(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	cmpl	%eax, -140(%rbp)
	jl	.L18
	movl	-132(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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
	.p2align 4
	.globl	count_bit
	.type	count_bit, @function
count_bit:
.LFB51:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
	testl	%edi, %edi
	je	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	movl	%edi, %edx
	andl	$1, %edx
	addl	%edx, %eax
	sarl	%edi
	jne	.L3
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	ret
	.cfi_endproc
.LFE51:
	.size	count_bit, .-count_bit
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$15, %ecx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	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	$152, %rsp
	.cfi_def_cfa_offset 208
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	leaq	8(%rsp), %rdx
	movl	$0, 4(%rsp)
	movq	%rbx, %rdi
	leaq	4(%rsp), %rsi
	movl	$0, 8(%rsp)
	movl	$0, 12(%rsp)
	rep stosq
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r9d
	testl	%r9d, %r9d
	jle	.L8
	xorl	%r14d, %r14d
	leaq	.LC1(%rip), %rbp
	leaq	12(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	xorl	%r15d, %r15d
	call	__isoc99_scanf@PLT
	movl	(%rbx), %eax
	movl	$1, %r12d
	testl	%eax, %eax
	jle	.L12
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	leal	-1(%rax), %ecx
	movl	%r12d, %eax
	sall	%cl, %eax
	orl	%eax, 4(%rbx)
	cmpl	%r15d, (%rbx)
	jg	.L9
.L12:
	movl	8(%rsp), %r9d
	addl	$1, %r14d
	addq	$12, %rbx
	cmpl	%r14d, %r9d
	jg	.L10
	testl	%r9d, %r9d
	jle	.L8
	leaq	24(%rsp), %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r9d
	addq	$12, %r12
	cmpl	%ebx, %r9d
	jg	.L13
.L8:
	movl	4(%rsp), %ecx
	movl	$1, %r10d
	xorl	%r11d, %r11d
	xorl	%r8d, %r8d
	sall	%cl, %r10d
	testl	%r10d, %r10d
	jle	.L15
	.p2align 4,,10
	.p2align 3
.L14:
	leaq	20(%rsp), %rsi
	xorl	%edi, %edi
	testl	%r9d, %r9d
	jle	.L40
	.p2align 4,,10
	.p2align 3
.L19:
	movl	%r8d, %eax
	andl	(%rsi), %eax
	je	.L16
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L17:
	movl	%eax, %ecx
	andl	$1, %ecx
	addl	%ecx, %edx
	sarl	%eax
	jne	.L17
	movl	%edx, %eax
	andl	$1, %eax
.L16:
	cmpl	%eax, 4(%rsi)
	jne	.L18
	addl	$1, %edi
	addq	$12, %rsi
	cmpl	%r9d, %edi
	jne	.L19
.L20:
	addl	$1, %r11d
.L18:
	addl	$1, %r8d
	cmpl	%r10d, %r8d
	jne	.L14
.L15:
	xorl	%eax, %eax
	movl	%r11d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L41
	addq	$152, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	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
.L40:
	.cfi_restore_state
	jne	.L18
	jmp	.L20
.L41:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.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:

rule
	.file	"temp.c"
	.text
	.p2align 4
	.globl	count_bit
	.type	count_bit, @function
count_bit:
.LFB51:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
	testl	%edi, %edi
	je	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	movl	%edi, %edx
	andl	$1, %edx
	addl	%edx, %eax
	sarl	%edi
	jne	.L3
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	ret
	.cfi_endproc
.LFE51:
	.size	count_bit, .-count_bit
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$15, %ecx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	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	$152, %rsp
	.cfi_def_cfa_offset 208
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	leaq	8(%rsp), %rdx
	movl	$0, 4(%rsp)
	movq	%rbx, %rdi
	leaq	4(%rsp), %rsi
	movl	$0, 8(%rsp)
	movl	$0, 12(%rsp)
	rep stosq
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r9d
	testl	%r9d, %r9d
	jle	.L8
	xorl	%r14d, %r14d
	leaq	.LC1(%rip), %rbp
	leaq	12(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	xorl	%r15d, %r15d
	call	__isoc99_scanf@PLT
	movl	(%rbx), %eax
	movl	$1, %r12d
	testl	%eax, %eax
	jle	.L12
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	leal	-1(%rax), %ecx
	movl	%r12d, %eax
	sall	%cl, %eax
	orl	%eax, 4(%rbx)
	cmpl	%r15d, (%rbx)
	jg	.L9
.L12:
	movl	8(%rsp), %r9d
	addl	$1, %r14d
	addq	$12, %rbx
	cmpl	%r14d, %r9d
	jg	.L10
	testl	%r9d, %r9d
	jle	.L8
	leaq	24(%rsp), %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r9d
	addq	$12, %r12
	cmpl	%ebx, %r9d
	jg	.L13
.L8:
	movl	4(%rsp), %ecx
	movl	$1, %r10d
	xorl	%r11d, %r11d
	xorl	%r8d, %r8d
	sall	%cl, %r10d
	testl	%r10d, %r10d
	jle	.L15
	.p2align 4,,10
	.p2align 3
.L14:
	leaq	20(%rsp), %rsi
	xorl	%edi, %edi
	testl	%r9d, %r9d
	jle	.L40
	.p2align 4,,10
	.p2align 3
.L19:
	movl	%r8d, %eax
	andl	(%rsi), %eax
	je	.L16
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L17:
	movl	%eax, %ecx
	andl	$1, %ecx
	addl	%ecx, %edx
	sarl	%eax
	jne	.L17
	movl	%edx, %eax
	andl	$1, %eax
.L16:
	cmpl	%eax, 4(%rsi)
	jne	.L18
	addl	$1, %edi
	addq	$12, %rsi
	cmpl	%r9d, %edi
	jne	.L19
.L20:
	addl	$1, %r11d
.L18:
	addl	$1, %r8d
	cmpl	%r10d, %r8d
	jne	.L14
.L15:
	xorl	%eax, %eax
	movl	%r11d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L41
	addq	$152, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	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
.L40:
	.cfi_restore_state
	jne	.L18
	jmp	.L20
.L41:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.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:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

typedef struct data
{
  int k;
  int s;
  int p;
} DATA;

int count_bit(int n)
{
  int count = 0;

  while(n)
  {
    count += n & 1;
    n >>= 1;
  }

  return count;
}

int main(int argc, char **argv)
{
  int i = 0;
  int j = 0;
  int n = 0;
  int m = 0;
  DATA d[10] = {0};
  int s = 0;
  int count = 0;

  scanf("%d %d", &n, &m);

  for(i = 0; i < m; i++)
  {
    scanf("%d", &d[i].k);
    for(j = 0; j < d[i].k; j++)
    {
      scanf("%d", &s);
      d[i].s |= (1 << (s - 1));
    }
  }
  for(i = 0; i < m; i++)
  {
      scanf("%d", &d[i].p);
  }

  for(i = 0; i < (1 << n); i++)
  {
    for(j = 0; j < m; j++)
    {
      if((count_bit(i & d[j].s) & 1) != d[j].p)
      {
        break;
      }
    }
    if(j == m) count++;
  }
  printf("%d\n", count);

  return 0;
}

2 2
2 1 2
1 2
0 0
 4 2
2 1 2
1 2
0 1
 5 2
1 1 2 5
2 2 3
1 0
 2 3
2 1 2
1 1
1 2
0 0 -1
 4 0
1 1 2
1 2
0 1
 1 0
0 1 4
1 1
0 1
0 0 -1
 9 2
3 1 2 5
2 2 3
1 0
 7 2
2 1 2
1 1
0 1
 8 0
2 1 2
1 1
1 2
0 0 -1
 6 0
-4 0 2
-1 4
1 0
0 0 -2

1
 4
 0
 0
 16
 2
 128
 32
 256
 64

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>
#include <stdlib.h>
#include <string.h>

typedef struct data
{
  int k;
  int s;
  int p;
} DATA;

int count_bit(int n)
{
  int count = 0;

  while(n)
  {
    count += n & 1;
    n >>= 1;
  }

  return count;
}

int main(int argc, char **argv)
{
  int i = 0;
  int j = 0;
  int n = 0;
  int m = 0;
  DATA d[10] = {0};
  int s = 0;
  int count = 0;

  scanf("%d %d", &n, &m);

  for(i = 0; i < m; i++)
  {
    scanf("%d", &d[i].k);
    for(j = 0; j < d[i].k; j++)
    {
      scanf("%d", &s);
      d[i].s |= (1 << (s - 1));
    }
  }
  for(i = 0; i < m; i++)
  {
      scanf("%d", &d[i].p);
  }

  for(i = 0; i < (1 << n); i++)
  {
    for(j = 0; j < m; j++)
    {
      if((count_bit(i & d[j].s) & 1) != d[j].p)
      {
        break;
      }
    }
    if(j == m) count++;
  }
  printf("%d\n", count);

  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	count_bit
	.type	count_bit, @function
count_bit:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L2
.L3:
	movl	-20(%rbp), %eax
	andl	$1, %eax
	addl	%eax, -4(%rbp)
	sarl	-20(%rbp)
.L2:
	cmpl	$0, -20(%rbp)
	jne	.L3
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	count_bit, .-count_bit
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$176, %rsp
	movl	%edi, -164(%rbp)
	movq	%rsi, -176(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -140(%rbp)
	movl	$0, -136(%rbp)
	movl	$0, -152(%rbp)
	movl	$0, -148(%rbp)
	leaq	-128(%rbp), %rdx
	movl	$0, %eax
	movl	$15, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$0, -144(%rbp)
	movl	$0, -132(%rbp)
	leaq	-148(%rbp), %rdx
	leaq	-152(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -140(%rbp)
	jmp	.L6
.L9:
	leaq	-128(%rbp), %rcx
	movl	-140(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -136(%rbp)
	jmp	.L7
.L8:
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-140(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$124, %rax
	movl	(%rax), %edx
	movl	-144(%rbp), %eax
	subl	$1, %eax
	movl	$1, %esi
	movl	%eax, %ecx
	sall	%cl, %esi
	movl	%esi, %eax
	movl	%edx, %ecx
	orl	%eax, %ecx
	movl	-140(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$124, %rax
	movl	%ecx, (%rax)
	addl	$1, -136(%rbp)
.L7:
	movl	-140(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	addq	$-128, %rax
	movl	(%rax), %eax
	cmpl	%eax, -136(%rbp)
	jl	.L8
	addl	$1, -140(%rbp)
.L6:
	movl	-148(%rbp), %eax
	cmpl	%eax, -140(%rbp)
	jl	.L9
	movl	$0, -140(%rbp)
	jmp	.L10
.L11:
	leaq	-128(%rbp), %rcx
	movl	-140(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	addq	$8, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -140(%rbp)
.L10:
	movl	-148(%rbp), %eax
	cmpl	%eax, -140(%rbp)
	jl	.L11
	movl	$0, -140(%rbp)
	jmp	.L12
.L18:
	movl	$0, -136(%rbp)
	jmp	.L13
.L16:
	movl	-136(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$124, %rax
	movl	(%rax), %eax
	andl	-140(%rbp), %eax
	movl	%eax, %edi
	call	count_bit
	andl	$1, %eax
	movl	%eax, %ecx
	movl	-136(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$120, %rax
	movl	(%rax), %eax
	cmpl	%eax, %ecx
	jne	.L21
	addl	$1, -136(%rbp)
.L13:
	movl	-148(%rbp), %eax
	cmpl	%eax, -136(%rbp)
	jl	.L16
	jmp	.L15
.L21:
	nop
.L15:
	movl	-148(%rbp), %eax
	cmpl	%eax, -136(%rbp)
	jne	.L17
	addl	$1, -132(%rbp)
.L17:
	addl	$1, -140(%rbp)
.L12:
	movl	-152(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	cmpl	%eax, -140(%rbp)
	jl	.L18
	movl	-132(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	count_bit
	.type	count_bit, @function
count_bit:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L2
.L3:
	movl	-20(%rbp), %eax
	andl	$1, %eax
	addl	%eax, -4(%rbp)
	sarl	-20(%rbp)
.L2:
	cmpl	$0, -20(%rbp)
	jne	.L3
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	count_bit, .-count_bit
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$176, %rsp
	movl	%edi, -164(%rbp)
	movq	%rsi, -176(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -140(%rbp)
	movl	$0, -136(%rbp)
	movl	$0, -152(%rbp)
	movl	$0, -148(%rbp)
	leaq	-128(%rbp), %rdx
	movl	$0, %eax
	movl	$15, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$0, -144(%rbp)
	movl	$0, -132(%rbp)
	leaq	-148(%rbp), %rdx
	leaq	-152(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -140(%rbp)
	jmp	.L6
.L9:
	leaq	-128(%rbp), %rcx
	movl	-140(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -136(%rbp)
	jmp	.L7
.L8:
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-140(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$124, %rax
	movl	(%rax), %edx
	movl	-144(%rbp), %eax
	subl	$1, %eax
	movl	$1, %esi
	movl	%eax, %ecx
	sall	%cl, %esi
	movl	%esi, %eax
	movl	%edx, %ecx
	orl	%eax, %ecx
	movl	-140(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$124, %rax
	movl	%ecx, (%rax)
	addl	$1, -136(%rbp)
.L7:
	movl	-140(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	addq	$-128, %rax
	movl	(%rax), %eax
	cmpl	%eax, -136(%rbp)
	jl	.L8
	addl	$1, -140(%rbp)
.L6:
	movl	-148(%rbp), %eax
	cmpl	%eax, -140(%rbp)
	jl	.L9
	movl	$0, -140(%rbp)
	jmp	.L10
.L11:
	leaq	-128(%rbp), %rcx
	movl	-140(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	addq	$8, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -140(%rbp)
.L10:
	movl	-148(%rbp), %eax
	cmpl	%eax, -140(%rbp)
	jl	.L11
	movl	$0, -140(%rbp)
	jmp	.L12
.L18:
	movl	$0, -136(%rbp)
	jmp	.L13
.L16:
	movl	-136(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$124, %rax
	movl	(%rax), %eax
	andl	-140(%rbp), %eax
	movl	%eax, %edi
	call	count_bit
	andl	$1, %eax
	movl	%eax, %ecx
	movl	-136(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$120, %rax
	movl	(%rax), %eax
	cmpl	%eax, %ecx
	jne	.L21
	addl	$1, -136(%rbp)
.L13:
	movl	-148(%rbp), %eax
	cmpl	%eax, -136(%rbp)
	jl	.L16
	jmp	.L15
.L21:
	nop
.L15:
	movl	-148(%rbp), %eax
	cmpl	%eax, -136(%rbp)
	jne	.L17
	addl	$1, -132(%rbp)
.L17:
	addl	$1, -140(%rbp)
.L12:
	movl	-152(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	cmpl	%eax, -140(%rbp)
	jl	.L18
	movl	-132(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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:
