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

#define MAX(a,b) ((a) > (b) ? (a) : (b))
#define MIN(a,b) ((a) < (b) ? (a) : (b))

int main(void) {
	long long n, a, b;
	
	scanf("%lld %lld %lld", &n, &a, &b);
	if (a % 2 == b % 2) {
		printf("%lld\n", MAX(a-b,b-a) / 2);
	} else {
		printf("%lld\n", MIN(MIN(n-a,n-b),MIN(a-1,b-1))+(MAX(a,b)-MIN(a,b))/2+1);
	}
	
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld %lld %lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.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), %rsi
	movq	%rcx, %rax
	movq	%rsi, %rdi
	shrq	$63, %rax
	shrq	$63, %rdi
	leaq	(%rcx,%rax), %rdx
	andl	$1, %edx
	subq	%rax, %rdx
	leaq	(%rsi,%rdi), %rax
	andl	$1, %eax
	subq	%rdi, %rax
	cmpq	%rax, %rdx
	je	.L10
	movq	(%rsp), %rax
	leaq	-1(%rcx), %rdi
	cmpq	%rsi, %rcx
	jge	.L11
.L5:
	subq	%rsi, %rax
.L6:
	cmpq	%rsi, %rcx
	movq	%rsi, %rdx
	cmovge	%rcx, %rdx
	cmovg	%rsi, %rcx
	movq	%rdx, %rsi
	subq	%rcx, %rsi
	movq	%rsi, %rdx
	shrq	$63, %rdx
	addq	%rsi, %rdx
	leaq	.LC1(%rip), %rsi
	sarq	%rdx
	cmpq	%rdi, %rax
	cmovg	%rdi, %rax
	movl	$1, %edi
	leaq	1(%rdx,%rax), %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L3:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L11:
	.cfi_restore_state
	leaq	-1(%rsi), %rdi
	jle	.L5
	subq	%rcx, %rax
	jmp	.L6
.L10:
	movq	%rsi, %rax
	movl	$1, %edi
	subq	%rcx, %rax
	subq	%rsi, %rcx
	leaq	.LC1(%rip), %rsi
	cmpq	%rcx, %rax
	cmovl	%rcx, %rax
	movl	$2, %ecx
	cqto
	idivq	%rcx
	movq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L12:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.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), %rsi
	movq	%rcx, %rax
	movq	%rsi, %rdi
	shrq	$63, %rax
	shrq	$63, %rdi
	leaq	(%rcx,%rax), %rdx
	andl	$1, %edx
	subq	%rax, %rdx
	leaq	(%rsi,%rdi), %rax
	andl	$1, %eax
	subq	%rdi, %rax
	cmpq	%rax, %rdx
	je	.L10
	movq	(%rsp), %rax
	leaq	-1(%rcx), %rdi
	cmpq	%rsi, %rcx
	jge	.L11
.L5:
	subq	%rsi, %rax
.L6:
	cmpq	%rsi, %rcx
	movq	%rsi, %rdx
	cmovge	%rcx, %rdx
	cmovg	%rsi, %rcx
	movq	%rdx, %rsi
	subq	%rcx, %rsi
	movq	%rsi, %rdx
	shrq	$63, %rdx
	addq	%rsi, %rdx
	leaq	.LC1(%rip), %rsi
	sarq	%rdx
	cmpq	%rdi, %rax
	cmovg	%rdi, %rax
	movl	$1, %edi
	leaq	1(%rdx,%rax), %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L3:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L11:
	.cfi_restore_state
	leaq	-1(%rsi), %rdi
	jle	.L5
	subq	%rcx, %rax
	jmp	.L6
.L10:
	movq	%rsi, %rax
	movl	$1, %edi
	subq	%rcx, %rax
	subq	%rsi, %rcx
	leaq	.LC1(%rip), %rsi
	cmpq	%rcx, %rax
	cmovl	%rcx, %rax
	movl	$2, %ecx
	cqto
	idivq	%rcx
	movq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L12:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.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), %rsi
	movq	%rcx, %rax
	movq	%rsi, %rdi
	shrq	$63, %rax
	shrq	$63, %rdi
	leaq	(%rcx,%rax), %rdx
	andl	$1, %edx
	subq	%rax, %rdx
	leaq	(%rsi,%rdi), %rax
	andl	$1, %eax
	subq	%rdi, %rax
	cmpq	%rax, %rdx
	je	.L10
	movq	(%rsp), %rax
	leaq	-1(%rcx), %rdi
	cmpq	%rsi, %rcx
	jge	.L11
.L5:
	subq	%rsi, %rax
.L6:
	cmpq	%rsi, %rcx
	movq	%rsi, %rdx
	cmovge	%rcx, %rdx
	cmovg	%rsi, %rcx
	movq	%rdx, %rsi
	subq	%rcx, %rsi
	movq	%rsi, %rdx
	shrq	$63, %rdx
	addq	%rsi, %rdx
	leaq	.LC1(%rip), %rsi
	sarq	%rdx
	cmpq	%rdi, %rax
	cmovg	%rdi, %rax
	movl	$1, %edi
	leaq	1(%rdx,%rax), %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L3:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L11:
	.cfi_restore_state
	leaq	-1(%rsi), %rdi
	jle	.L5
	subq	%rcx, %rax
	jmp	.L6
.L10:
	movq	%rsi, %rax
	movl	$1, %edi
	subq	%rcx, %rax
	subq	%rsi, %rcx
	leaq	.LC1(%rip), %rsi
	cmpq	%rcx, %rax
	cmovl	%rcx, %rax
	movl	$2, %ecx
	cqto
	idivq	%rcx
	movq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L12:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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>
#include <stdlib.h>
#include <math.h>

#define MAX(a,b) ((a) > (b) ? (a) : (b))
#define MIN(a,b) ((a) < (b) ? (a) : (b))

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

```c
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

#define MAX(a,b) ((a) > (b) ? (a) : (b))
#define MIN(a,b) ((a) < (b) ? (a) : (b))

int main(void) {
	long long n, a, b;
	
	scanf("%lld %lld %lld", &n, &a, &b);
	if (a % 2 == b % 2) {
		printf("%lld\n", MAX(a-b,b-a) / 2);
	} else {
		printf("%lld\n", MIN(MIN(n-a,n-b),MIN(a-1,b-1))+(MAX(a,b)-MIN(a,b))/2+1);
	}
	
	return 0;
}```

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

#define MAX(a,b) ((a) > (b) ? (a) : (b))
#define MIN(a,b) ((a) < (b) ? (a) : (b))

int main(void) {
	long long n, a, b;
	
	scanf("%lld %lld %lld", &n, &a, &b);
	if (a % 2 == b % 2) {
		printf("%lld\n", MAX(a-b,b-a) / 2);
	} else {
		printf("%lld\n", MIN(MIN(n-a,n-b),MIN(a-1,b-1))+(MAX(a,b)-MIN(a,b))/2+1);
	}
	
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld %lld %lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.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), %rsi
	movq	%rcx, %rax
	movq	%rsi, %rdi
	shrq	$63, %rax
	shrq	$63, %rdi
	leaq	(%rcx,%rax), %rdx
	andl	$1, %edx
	subq	%rax, %rdx
	leaq	(%rsi,%rdi), %rax
	andl	$1, %eax
	subq	%rdi, %rax
	cmpq	%rax, %rdx
	je	.L10
	movq	(%rsp), %rax
	leaq	-1(%rcx), %rdi
	cmpq	%rsi, %rcx
	jge	.L11
.L5:
	subq	%rsi, %rax
.L6:
	cmpq	%rsi, %rcx
	movq	%rsi, %rdx
	cmovge	%rcx, %rdx
	cmovg	%rsi, %rcx
	movq	%rdx, %rsi
	subq	%rcx, %rsi
	movq	%rsi, %rdx
	shrq	$63, %rdx
	addq	%rsi, %rdx
	leaq	.LC1(%rip), %rsi
	sarq	%rdx
	cmpq	%rdi, %rax
	cmovg	%rdi, %rax
	movl	$1, %edi
	leaq	1(%rdx,%rax), %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L3:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L11:
	.cfi_restore_state
	leaq	-1(%rsi), %rdi
	jle	.L5
	subq	%rcx, %rax
	jmp	.L6
.L10:
	movq	%rsi, %rax
	movl	$1, %edi
	subq	%rcx, %rax
	subq	%rsi, %rcx
	leaq	.LC1(%rip), %rsi
	cmpq	%rcx, %rax
	cmovl	%rcx, %rax
	movl	$2, %ecx
	cqto
	idivq	%rcx
	movq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L12:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.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), %rsi
	movq	%rcx, %rax
	movq	%rsi, %rdi
	shrq	$63, %rax
	shrq	$63, %rdi
	leaq	(%rcx,%rax), %rdx
	andl	$1, %edx
	subq	%rax, %rdx
	leaq	(%rsi,%rdi), %rax
	andl	$1, %eax
	subq	%rdi, %rax
	cmpq	%rax, %rdx
	je	.L10
	movq	(%rsp), %rax
	leaq	-1(%rcx), %rdi
	cmpq	%rsi, %rcx
	jge	.L11
.L5:
	subq	%rsi, %rax
.L6:
	cmpq	%rsi, %rcx
	movq	%rsi, %rdx
	cmovge	%rcx, %rdx
	cmovg	%rsi, %rcx
	movq	%rdx, %rsi
	subq	%rcx, %rsi
	movq	%rsi, %rdx
	shrq	$63, %rdx
	addq	%rsi, %rdx
	leaq	.LC1(%rip), %rsi
	sarq	%rdx
	cmpq	%rdi, %rax
	cmovg	%rdi, %rax
	movl	$1, %edi
	leaq	1(%rdx,%rax), %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L3:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L11:
	.cfi_restore_state
	leaq	-1(%rsi), %rdi
	jle	.L5
	subq	%rcx, %rax
	jmp	.L6
.L10:
	movq	%rsi, %rax
	movl	$1, %edi
	subq	%rcx, %rax
	subq	%rsi, %rcx
	leaq	.LC1(%rip), %rsi
	cmpq	%rcx, %rax
	cmovl	%rcx, %rax
	movl	$2, %ecx
	cqto
	idivq	%rcx
	movq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L12:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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:
```