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

```c
#include <stdio.h>
#define Ma(x,y) ((x)>(y)?(x):(y))
#define mi(x,y) ((x)<(y)?(x):(y))

int main() {
	long long n,a,b,ans;
	scanf("%lld %lld %lld", &n, &a, &b);
	if ((a - b) % 2==0)ans = Ma((a - b) / 2, (b - a) / 2);
	else if (a + b - 1 <= n)ans = (a + b - 1) / 2;
	else ans = n + (1 - a - b) / 2;
	printf("%lld", ans);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld %lld %lld"
.LC1:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rcx
	leaq	8(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rcx
	movq	16(%rsp), %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	testb	$1, %al
	jne	.L2
	movq	%rdx, %rax
	subq	%rcx, %rax
	movl	$2, %ecx
	cqto
	idivq	%rcx
	movq	%rax, %r8
	negq	%r8
	cmovs	%rax, %r8
.L3:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L8
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	movq	(%rsp), %rsi
	leaq	-1(%rcx,%rdx), %r8
	cmpq	%rsi, %r8
	jg	.L4
	movq	%r8, %rax
	movl	$2, %ecx
	cqto
	idivq	%rcx
	movq	%rax, %r8
	jmp	.L3
.L4:
	movl	$1, %eax
	subq	%rcx, %rax
	movl	$2, %ecx
	subq	%rdx, %rax
	cqto
	idivq	%rcx
	leaq	(%rax,%rsi), %r8
	jmp	.L3
.L8:
	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:
```

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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld %lld %lld"
.LC1:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rcx
	leaq	8(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rcx
	movq	16(%rsp), %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	testb	$1, %al
	jne	.L2
	movq	%rdx, %rax
	subq	%rcx, %rax
	movl	$2, %ecx
	cqto
	idivq	%rcx
	movq	%rax, %r8
	negq	%r8
	cmovs	%rax, %r8
.L3:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L8
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	movq	(%rsp), %rsi
	leaq	-1(%rcx,%rdx), %r8
	cmpq	%rsi, %r8
	jg	.L4
	movq	%r8, %rax
	movl	$2, %ecx
	cqto
	idivq	%rcx
	movq	%rax, %r8
	jmp	.L3
.L4:
	movl	$1, %eax
	subq	%rcx, %rax
	movl	$2, %ecx
	subq	%rdx, %rax
	cqto
	idivq	%rcx
	leaq	(%rax,%rsi), %r8
	jmp	.L3
.L8:
	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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld %lld %lld"
.LC1:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rcx
	leaq	8(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rcx
	movq	16(%rsp), %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	testb	$1, %al
	jne	.L2
	movq	%rdx, %rax
	subq	%rcx, %rax
	movl	$2, %ecx
	cqto
	idivq	%rcx
	movq	%rax, %r8
	negq	%r8
	cmovs	%rax, %r8
.L3:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L8
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	movq	(%rsp), %rsi
	leaq	-1(%rcx,%rdx), %r8
	cmpq	%rsi, %r8
	jg	.L4
	movq	%r8, %rax
	movl	$2, %ecx
	cqto
	idivq	%rcx
	movq	%rax, %r8
	jmp	.L3
.L4:
	movl	$1, %eax
	subq	%rcx, %rax
	movl	$2, %ecx
	subq	%rdx, %rax
	cqto
	idivq	%rcx
	leaq	(%rax,%rsi), %r8
	jmp	.L3
.L8:
	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:
```
```c
#include <stdio.h>
#define Ma(x,y) ((x)>(y)?(x):(y))
#define mi(x,y) ((x)<(y)?(x):(y))

int main() {
	long long n,a,b,ans;
	scanf("%lld %lld %lld", &n, &a, &b);
	if ((a - b) % 2==0)ans = Ma((a - b) / 2, (b - a) / 2);
	else if (a + b - 1 <= n)ans = (a + b - 1) / 2;
	else ans = n + (1 - a - b) / 2;
	printf("%lld", ans);
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#define Ma(x,y) ((x)>(y)?(x):(y))
#define mi(x,y) ((x)<(y)?(x):(y))

int main() {
	long long n,a,b,ans;
	scanf("%lld %lld %lld", &n, &a, &b);
	if ((a - b) % 2==0)ans = Ma((a - b) / 2, (b - a) / 2);
	else if (a + b - 1 <= n)ans = (a + b - 1) / 2;
	else ans = n + (1 - a - b) / 2;
	printf("%lld", ans);
}```

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:

4 2 3
 5 2 8
 6 3 3
 6 3 5
 1 2 5
 0 3 4
 2 -1 0
 5 2 16
 5 2 27
 10 4 5

2 3 0 1 -2 -3 -1 7 -9 4
Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#define Ma(x,y) ((x)>(y)?(x):(y))
#define mi(x,y) ((x)<(y)?(x):(y))

int main() {
	long long n,a,b,ans;
	scanf("%lld %lld %lld", &n, &a, &b);
	if ((a - b) % 2==0)ans = Ma((a - b) / 2, (b - a) / 2);
	else if (a + b - 1 <= n)ans = (a + b - 1) / 2;
	else ans = n + (1 - a - b) / 2;
	printf("%lld", ans);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld %lld %lld"
.LC1:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rcx
	leaq	8(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rcx
	movq	16(%rsp), %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	testb	$1, %al
	jne	.L2
	movq	%rdx, %rax
	subq	%rcx, %rax
	movl	$2, %ecx
	cqto
	idivq	%rcx
	movq	%rax, %r8
	negq	%r8
	cmovs	%rax, %r8
.L3:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L8
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	movq	(%rsp), %rsi
	leaq	-1(%rcx,%rdx), %r8
	cmpq	%rsi, %r8
	jg	.L4
	movq	%r8, %rax
	movl	$2, %ecx
	cqto
	idivq	%rcx
	movq	%rax, %r8
	jmp	.L3
.L4:
	movl	$1, %eax
	subq	%rcx, %rax
	movl	$2, %ecx
	subq	%rdx, %rax
	cqto
	idivq	%rcx
	leaq	(%rax,%rsi), %r8
	jmp	.L3
.L8:
	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:
```

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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld %lld %lld"
.LC1:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rcx
	leaq	8(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rcx
	movq	16(%rsp), %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	testb	$1, %al
	jne	.L2
	movq	%rdx, %rax
	subq	%rcx, %rax
	movl	$2, %ecx
	cqto
	idivq	%rcx
	movq	%rax, %r8
	negq	%r8
	cmovs	%rax, %r8
.L3:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L8
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	movq	(%rsp), %rsi
	leaq	-1(%rcx,%rdx), %r8
	cmpq	%rsi, %r8
	jg	.L4
	movq	%r8, %rax
	movl	$2, %ecx
	cqto
	idivq	%rcx
	movq	%rax, %r8
	jmp	.L3
.L4:
	movl	$1, %eax
	subq	%rcx, %rax
	movl	$2, %ecx
	subq	%rdx, %rax
	cqto
	idivq	%rcx
	leaq	(%rax,%rsi), %r8
	jmp	.L3
.L8:
	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:
```