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>

int main()
{
  unsigned int a, b, n, m, o, x;
  fscanf(stdin, "%u %u", &n, &m);
  char buf[100];
  buf[32]=buf[65]=buf[98]='\n';
  buf[99]='\0';
  a = n & m;
  o = n | m;
  x = n ^ m;
  int i=0;
  for (b = 2147483648U; b>0; b>>=1) {
    buf[i] = '0'+ a/b;
    buf[i+33] = '0'+ o/b;
    buf[i+66] = '0'+ x/b;
    a%=b;
    o%=b;
    x%=b;
    i++;
  }
  fputs(buf, stdout);
  return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%u %u"
	.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	$144, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	stdin(%rip), %rax
	leaq	-136(%rbp), %rcx
	leaq	-140(%rbp), %rdx
	leaq	.LC0(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_fscanf@PLT
	movb	$10, -14(%rbp)
	movzbl	-14(%rbp), %eax
	movb	%al, -47(%rbp)
	movzbl	-47(%rbp), %eax
	movb	%al, -80(%rbp)
	movb	$0, -13(%rbp)
	movl	-140(%rbp), %edx
	movl	-136(%rbp), %eax
	andl	%edx, %eax
	movl	%eax, -132(%rbp)
	movl	-140(%rbp), %edx
	movl	-136(%rbp), %eax
	orl	%edx, %eax
	movl	%eax, -124(%rbp)
	movl	-140(%rbp), %edx
	movl	-136(%rbp), %eax
	xorl	%edx, %eax
	movl	%eax, -120(%rbp)
	movl	$0, -116(%rbp)
	movl	$-2147483648, -128(%rbp)
	jmp	.L2
.L3:
	movl	-132(%rbp), %eax
	movl	$0, %edx
	divl	-128(%rbp)
	addl	$48, %eax
	movl	%eax, %edx
	movl	-116(%rbp), %eax
	cltq
	movb	%dl, -112(%rbp,%rax)
	movl	-124(%rbp), %eax
	movl	$0, %edx
	divl	-128(%rbp)
	leal	48(%rax), %edx
	movl	-116(%rbp), %eax
	addl	$33, %eax
	cltq
	movb	%dl, -112(%rbp,%rax)
	movl	-120(%rbp), %eax
	movl	$0, %edx
	divl	-128(%rbp)
	leal	48(%rax), %edx
	movl	-116(%rbp), %eax
	addl	$66, %eax
	cltq
	movb	%dl, -112(%rbp,%rax)
	movl	-132(%rbp), %eax
	movl	$0, %edx
	divl	-128(%rbp)
	movl	%edx, -132(%rbp)
	movl	-124(%rbp), %eax
	movl	$0, %edx
	divl	-128(%rbp)
	movl	%edx, -124(%rbp)
	movl	-120(%rbp), %eax
	movl	$0, %edx
	divl	-128(%rbp)
	movl	%edx, -120(%rbp)
	addl	$1, -116(%rbp)
	shrl	-128(%rbp)
.L2:
	cmpl	$0, -128(%rbp)
	jne	.L3
	movq	stdout(%rip), %rdx
	leaq	-112(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	fputs@PLT
	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
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%u %u"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	.LC0(%rip), %rsi
	addq	$-128, %rsp
	.cfi_def_cfa_offset 144
	movq	stdin(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rcx
	leaq	8(%rsp), %rdx
	call	__isoc99_fscanf@PLT
	movb	$10, 81(%rsp)
	movl	$10, %eax
	leaq	16(%rsp), %r9
	movl	8(%rsp), %ebx
	movl	8(%rsp), %esi
	movb	$10, 48(%rsp)
	movq	%r9, %r8
	movw	%ax, 114(%rsp)
	orl	12(%rsp), %ebx
	leaq	48(%rsp), %r10
	movl	$-2147483648, %ecx
	movl	8(%rsp), %eax
	xorl	12(%rsp), %esi
	andl	12(%rsp), %eax
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%edx, %edx
	addq	$1, %r8
	divl	%ecx
	addl	$48, %eax
	movl	%edx, %r11d
	xorl	%edx, %edx
	movb	%al, -1(%r8)
	movl	%ebx, %eax
	divl	%ecx
	leal	48(%rax), %edi
	movl	%edx, %ebx
	movl	%esi, %eax
	xorl	%edx, %edx
	divl	%ecx
	movb	%dil, 32(%r8)
	shrl	%ecx
	movl	%eax, %esi
	movl	%r11d, %eax
	addl	$48, %esi
	movb	%sil, 65(%r8)
	movl	%edx, %esi
	cmpq	%r10, %r8
	jne	.L2
	movq	stdout(%rip), %rsi
	movq	%r9, %rdi
	call	fputs@PLT
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L7
	subq	$-128, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L7:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%u %u"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	.LC0(%rip), %rsi
	addq	$-128, %rsp
	.cfi_def_cfa_offset 144
	movq	stdin(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rcx
	leaq	8(%rsp), %rdx
	call	__isoc99_fscanf@PLT
	movb	$10, 81(%rsp)
	movl	$10, %eax
	leaq	16(%rsp), %r9
	movl	8(%rsp), %ebx
	movl	8(%rsp), %esi
	movb	$10, 48(%rsp)
	movq	%r9, %r8
	movw	%ax, 114(%rsp)
	orl	12(%rsp), %ebx
	leaq	48(%rsp), %r10
	movl	$-2147483648, %ecx
	movl	8(%rsp), %eax
	xorl	12(%rsp), %esi
	andl	12(%rsp), %eax
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%edx, %edx
	addq	$1, %r8
	divl	%ecx
	addl	$48, %eax
	movl	%edx, %r11d
	xorl	%edx, %edx
	movb	%al, -1(%r8)
	movl	%ebx, %eax
	divl	%ecx
	leal	48(%rax), %edi
	movl	%edx, %ebx
	movl	%esi, %eax
	xorl	%edx, %edx
	divl	%ecx
	movb	%dil, 32(%r8)
	shrl	%ecx
	movl	%eax, %esi
	movl	%r11d, %eax
	addl	$48, %esi
	movb	%sil, 65(%r8)
	movl	%edx, %esi
	cmpq	%r10, %r8
	jne	.L2
	movq	stdout(%rip), %rsi
	movq	%r9, %rdi
	call	fputs@PLT
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L7
	subq	$-128, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L7:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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>

int main()
{
  unsigned int a, b, n, m, o, x;
  fscanf(stdin, "%u %u", &n, &m);
  char buf[100];
  buf[32]=buf[65]=buf[98]='\n';
  buf[99]='\0';
  a = n & m;
  o = n | m;
  x = n ^ m;
  int i=0;
  for (b = 2147483648U; b>0; b>>=1) {
    buf[i] = '0'+ a/b;
    buf[i+33] = '0'+ o/b;
    buf[i+66] = '0'+ x/b;
    a%=b;
    o%=b;
    x%=b;
    i++;
  }
  fputs(buf, stdout);
  return 0;
}


13 10
 20 10
 20 1
 15 1
 1 1
 2 1
 2 0
 1 0
 -1 1
 -1 2

00000000000000000000000000001000
00000000000000000000000000001111
00000000000000000000000000000111
 00000000000000000000000000000000
00000000000000000000000000011110
00000000000000000000000000011110
 00000000000000000000000000000000
00000000000000000000000000010101
00000000000000000000000000010101
 00000000000000000000000000000001
00000000000000000000000000001111
00000000000000000000000000001110
 00000000000000000000000000000001
00000000000000000000000000000001
00000000000000000000000000000000
 00000000000000000000000000000000
00000000000000000000000000000011
00000000000000000000000000000011
 00000000000000000000000000000000
00000000000000000000000000000010
00000000000000000000000000000010
 00000000000000000000000000000000
00000000000000000000000000000001
00000000000000000000000000000001
 00000000000000000000000000000001
11111111111111111111111111111111
11111111111111111111111111111110
 00000000000000000000000000000010
11111111111111111111111111111111
11111111111111111111111111111101

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>

int main()
{
  unsigned int a, b, n, m, o, x;
  fscanf(stdin, "%u %u", &n, &m);
  char buf[100];
  buf[32]=buf[65]=buf[98]='\n';
  buf[99]='\0';
  a = n & m;
  o = n | m;
  x = n ^ m;
  int i=0;
  for (b = 2147483648U; b>0; b>>=1) {
    buf[i] = '0'+ a/b;
    buf[i+33] = '0'+ o/b;
    buf[i+66] = '0'+ x/b;
    a%=b;
    o%=b;
    x%=b;
    i++;
  }
  fputs(buf, stdout);
  return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%u %u"
	.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	$144, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	stdin(%rip), %rax
	leaq	-136(%rbp), %rcx
	leaq	-140(%rbp), %rdx
	leaq	.LC0(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_fscanf@PLT
	movb	$10, -14(%rbp)
	movzbl	-14(%rbp), %eax
	movb	%al, -47(%rbp)
	movzbl	-47(%rbp), %eax
	movb	%al, -80(%rbp)
	movb	$0, -13(%rbp)
	movl	-140(%rbp), %edx
	movl	-136(%rbp), %eax
	andl	%edx, %eax
	movl	%eax, -132(%rbp)
	movl	-140(%rbp), %edx
	movl	-136(%rbp), %eax
	orl	%edx, %eax
	movl	%eax, -124(%rbp)
	movl	-140(%rbp), %edx
	movl	-136(%rbp), %eax
	xorl	%edx, %eax
	movl	%eax, -120(%rbp)
	movl	$0, -116(%rbp)
	movl	$-2147483648, -128(%rbp)
	jmp	.L2
.L3:
	movl	-132(%rbp), %eax
	movl	$0, %edx
	divl	-128(%rbp)
	addl	$48, %eax
	movl	%eax, %edx
	movl	-116(%rbp), %eax
	cltq
	movb	%dl, -112(%rbp,%rax)
	movl	-124(%rbp), %eax
	movl	$0, %edx
	divl	-128(%rbp)
	leal	48(%rax), %edx
	movl	-116(%rbp), %eax
	addl	$33, %eax
	cltq
	movb	%dl, -112(%rbp,%rax)
	movl	-120(%rbp), %eax
	movl	$0, %edx
	divl	-128(%rbp)
	leal	48(%rax), %edx
	movl	-116(%rbp), %eax
	addl	$66, %eax
	cltq
	movb	%dl, -112(%rbp,%rax)
	movl	-132(%rbp), %eax
	movl	$0, %edx
	divl	-128(%rbp)
	movl	%edx, -132(%rbp)
	movl	-124(%rbp), %eax
	movl	$0, %edx
	divl	-128(%rbp)
	movl	%edx, -124(%rbp)
	movl	-120(%rbp), %eax
	movl	$0, %edx
	divl	-128(%rbp)
	movl	%edx, -120(%rbp)
	addl	$1, -116(%rbp)
	shrl	-128(%rbp)
.L2:
	cmpl	$0, -128(%rbp)
	jne	.L3
	movq	stdout(%rip), %rdx
	leaq	-112(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	fputs@PLT
	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
	.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
	.section	.rodata
.LC0:
	.string	"%u %u"
	.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	$144, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	stdin(%rip), %rax
	leaq	-136(%rbp), %rcx
	leaq	-140(%rbp), %rdx
	leaq	.LC0(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_fscanf@PLT
	movb	$10, -14(%rbp)
	movzbl	-14(%rbp), %eax
	movb	%al, -47(%rbp)
	movzbl	-47(%rbp), %eax
	movb	%al, -80(%rbp)
	movb	$0, -13(%rbp)
	movl	-140(%rbp), %edx
	movl	-136(%rbp), %eax
	andl	%edx, %eax
	movl	%eax, -132(%rbp)
	movl	-140(%rbp), %edx
	movl	-136(%rbp), %eax
	orl	%edx, %eax
	movl	%eax, -124(%rbp)
	movl	-140(%rbp), %edx
	movl	-136(%rbp), %eax
	xorl	%edx, %eax
	movl	%eax, -120(%rbp)
	movl	$0, -116(%rbp)
	movl	$-2147483648, -128(%rbp)
	jmp	.L2
.L3:
	movl	-132(%rbp), %eax
	movl	$0, %edx
	divl	-128(%rbp)
	addl	$48, %eax
	movl	%eax, %edx
	movl	-116(%rbp), %eax
	cltq
	movb	%dl, -112(%rbp,%rax)
	movl	-124(%rbp), %eax
	movl	$0, %edx
	divl	-128(%rbp)
	leal	48(%rax), %edx
	movl	-116(%rbp), %eax
	addl	$33, %eax
	cltq
	movb	%dl, -112(%rbp,%rax)
	movl	-120(%rbp), %eax
	movl	$0, %edx
	divl	-128(%rbp)
	leal	48(%rax), %edx
	movl	-116(%rbp), %eax
	addl	$66, %eax
	cltq
	movb	%dl, -112(%rbp,%rax)
	movl	-132(%rbp), %eax
	movl	$0, %edx
	divl	-128(%rbp)
	movl	%edx, -132(%rbp)
	movl	-124(%rbp), %eax
	movl	$0, %edx
	divl	-128(%rbp)
	movl	%edx, -124(%rbp)
	movl	-120(%rbp), %eax
	movl	$0, %edx
	divl	-128(%rbp)
	movl	%edx, -120(%rbp)
	addl	$1, -116(%rbp)
	shrl	-128(%rbp)
.L2:
	cmpl	$0, -128(%rbp)
	jne	.L3
	movq	stdout(%rip), %rdx
	leaq	-112(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	fputs@PLT
	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
	.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:
