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>

typedef long long Int;

Int min(Int a, Int b)
{
  return a<b ? a : b;
}

Int dif(Int a, Int b)
{
  return a>b ? a-b : b-a;
}

int main(void)
{
  Int n, a, b;
  scanf("%lld%lld%lld", &n, &a, &b);
    
  if (dif(a,b) % 2 == 0) {
    printf("%lld", dif(a,b)/2);
    return 0;
  }
  
  printf("%lld", min(dif(2-a,b+1), dif(2*n-a,b-1))/2);
  
  return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	min
	.type	min, @function
min:
.LFB23:
	.cfi_startproc
	endbr64
	cmpq	%rdi, %rsi
	movq	%rdi, %rax
	cmovle	%rsi, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	min, .-min
	.p2align 4
	.globl	dif
	.type	dif, @function
dif:
.LFB24:
	.cfi_startproc
	endbr64
	movq	%rdi, %rdx
	movq	%rsi, %rax
	subq	%rsi, %rdx
	subq	%rdi, %rax
	cmpq	%rsi, %rdi
	cmovg	%rdx, %rax
	ret
	.cfi_endproc
.LFE24:
	.size	dif, .-dif
	.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:
.LFB25:
	.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	16(%rsp), %rax
	movq	8(%rsp), %rcx
	movq	%rax, %rdx
	movq	%rcx, %rsi
	subq	%rax, %rsi
	subq	%rcx, %rdx
	cmpq	%rcx, %rax
	cmovl	%rsi, %rdx
	testb	$1, %dl
	je	.L17
	movq	(%rsp), %rdi
	leaq	-1(%rax), %rsi
	leaq	(%rdi,%rdi), %rdx
	movq	%rsi, %rdi
	subq	%rcx, %rdx
	movq	%rdx, %r8
	subq	%rdx, %rdi
	subq	%rsi, %r8
	cmpq	%rdx, %rsi
	movl	$2, %esi
	cmovl	%r8, %rdi
	addq	$1, %rax
	subq	%rcx, %rsi
	movq	%rsi, %rcx
	movq	%rax, %rdx
	subq	%rax, %rcx
	subq	%rsi, %rdx
	cmpq	%rsi, %rax
	cmovl	%rcx, %rdx
	cmpq	%rdi, %rdx
	cmovg	%rdi, %rdx
.L17:
	sarq	%rdx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.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
	.p2align 4
	.globl	min
	.type	min, @function
min:
.LFB23:
	.cfi_startproc
	endbr64
	cmpq	%rdi, %rsi
	movq	%rdi, %rax
	cmovle	%rsi, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	min, .-min
	.p2align 4
	.globl	dif
	.type	dif, @function
dif:
.LFB24:
	.cfi_startproc
	endbr64
	movq	%rdi, %rdx
	movq	%rsi, %rax
	subq	%rsi, %rdx
	subq	%rdi, %rax
	cmpq	%rsi, %rdi
	cmovg	%rdx, %rax
	ret
	.cfi_endproc
.LFE24:
	.size	dif, .-dif
	.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:
.LFB25:
	.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	16(%rsp), %rax
	movq	8(%rsp), %rcx
	movq	%rax, %rdx
	movq	%rcx, %rsi
	subq	%rax, %rsi
	subq	%rcx, %rdx
	cmpq	%rcx, %rax
	cmovl	%rsi, %rdx
	testb	$1, %dl
	je	.L17
	movq	(%rsp), %rdi
	leaq	-1(%rax), %rsi
	leaq	(%rdi,%rdi), %rdx
	movq	%rsi, %rdi
	subq	%rcx, %rdx
	movq	%rdx, %r8
	subq	%rdx, %rdi
	subq	%rsi, %r8
	cmpq	%rdx, %rsi
	movl	$2, %esi
	cmovl	%r8, %rdi
	addq	$1, %rax
	subq	%rcx, %rsi
	movq	%rsi, %rcx
	movq	%rax, %rdx
	subq	%rax, %rcx
	subq	%rsi, %rdx
	cmpq	%rsi, %rax
	cmovl	%rcx, %rdx
	cmpq	%rdi, %rdx
	cmovg	%rdi, %rdx
.L17:
	sarq	%rdx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.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
	.p2align 4
	.globl	min
	.type	min, @function
min:
.LFB23:
	.cfi_startproc
	endbr64
	cmpq	%rdi, %rsi
	movq	%rdi, %rax
	cmovle	%rsi, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	min, .-min
	.p2align 4
	.globl	dif
	.type	dif, @function
dif:
.LFB24:
	.cfi_startproc
	endbr64
	movq	%rdi, %rdx
	movq	%rsi, %rax
	subq	%rsi, %rdx
	subq	%rdi, %rax
	cmpq	%rsi, %rdi
	cmovg	%rdx, %rax
	ret
	.cfi_endproc
.LFE24:
	.size	dif, .-dif
	.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:
.LFB25:
	.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	16(%rsp), %rax
	movq	8(%rsp), %rcx
	movq	%rax, %rdx
	movq	%rcx, %rsi
	subq	%rax, %rsi
	subq	%rcx, %rdx
	cmpq	%rcx, %rax
	cmovl	%rsi, %rdx
	testb	$1, %dl
	je	.L17
	movq	(%rsp), %rdi
	leaq	-1(%rax), %rsi
	leaq	(%rdi,%rdi), %rdx
	movq	%rsi, %rdi
	subq	%rcx, %rdx
	movq	%rdx, %r8
	subq	%rdx, %rdi
	subq	%rsi, %r8
	cmpq	%rdx, %rsi
	movl	$2, %esi
	cmovl	%r8, %rdi
	addq	$1, %rax
	subq	%rcx, %rsi
	movq	%rsi, %rcx
	movq	%rax, %rdx
	subq	%rax, %rcx
	subq	%rsi, %rdx
	cmpq	%rsi, %rax
	cmovl	%rcx, %rdx
	cmpq	%rdi, %rdx
	cmovg	%rdi, %rdx
.L17:
	sarq	%rdx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.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>

typedef long long Int;

Int min(Int a, Int b)
{
  return a<b ? a : b;
}

Int dif(Int a, Int b)
{
  return a>b ? a-b : b-a;
}

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

```c
#include <stdio.h>

typedef long long Int;

Int min(Int a, Int b)
{
  return a<b ? a : b;
}

Int dif(Int a, Int b)
{
  return a>b ? a-b : b-a;
}

int main(void)
{
  Int n, a, b;
  scanf("%lld%lld%lld", &n, &a, &b);
    
  if (dif(a,b) % 2 == 0) {
    printf("%lld", dif(a,b)/2);
    return 0;
  }
  
  printf("%lld", min(dif(2-a,b+1), dif(2*n-a,b-1))/2);
  
  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>

typedef long long Int;

Int min(Int a, Int b)
{
  return a<b ? a : b;
}

Int dif(Int a, Int b)
{
  return a>b ? a-b : b-a;
}

int main(void)
{
  Int n, a, b;
  scanf("%lld%lld%lld", &n, &a, &b);
    
  if (dif(a,b) % 2 == 0) {
    printf("%lld", dif(a,b)/2);
    return 0;
  }
  
  printf("%lld", min(dif(2-a,b+1), dif(2*n-a,b-1))/2);
  
  return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	min
	.type	min, @function
min:
.LFB23:
	.cfi_startproc
	endbr64
	cmpq	%rdi, %rsi
	movq	%rdi, %rax
	cmovle	%rsi, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	min, .-min
	.p2align 4
	.globl	dif
	.type	dif, @function
dif:
.LFB24:
	.cfi_startproc
	endbr64
	movq	%rdi, %rdx
	movq	%rsi, %rax
	subq	%rsi, %rdx
	subq	%rdi, %rax
	cmpq	%rsi, %rdi
	cmovg	%rdx, %rax
	ret
	.cfi_endproc
.LFE24:
	.size	dif, .-dif
	.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:
.LFB25:
	.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	16(%rsp), %rax
	movq	8(%rsp), %rcx
	movq	%rax, %rdx
	movq	%rcx, %rsi
	subq	%rax, %rsi
	subq	%rcx, %rdx
	cmpq	%rcx, %rax
	cmovl	%rsi, %rdx
	testb	$1, %dl
	je	.L17
	movq	(%rsp), %rdi
	leaq	-1(%rax), %rsi
	leaq	(%rdi,%rdi), %rdx
	movq	%rsi, %rdi
	subq	%rcx, %rdx
	movq	%rdx, %r8
	subq	%rdx, %rdi
	subq	%rsi, %r8
	cmpq	%rdx, %rsi
	movl	$2, %esi
	cmovl	%r8, %rdi
	addq	$1, %rax
	subq	%rcx, %rsi
	movq	%rsi, %rcx
	movq	%rax, %rdx
	subq	%rax, %rcx
	subq	%rsi, %rdx
	cmpq	%rsi, %rax
	cmovl	%rcx, %rdx
	cmpq	%rdi, %rdx
	cmovg	%rdi, %rdx
.L17:
	sarq	%rdx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.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
	.p2align 4
	.globl	min
	.type	min, @function
min:
.LFB23:
	.cfi_startproc
	endbr64
	cmpq	%rdi, %rsi
	movq	%rdi, %rax
	cmovle	%rsi, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	min, .-min
	.p2align 4
	.globl	dif
	.type	dif, @function
dif:
.LFB24:
	.cfi_startproc
	endbr64
	movq	%rdi, %rdx
	movq	%rsi, %rax
	subq	%rsi, %rdx
	subq	%rdi, %rax
	cmpq	%rsi, %rdi
	cmovg	%rdx, %rax
	ret
	.cfi_endproc
.LFE24:
	.size	dif, .-dif
	.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:
.LFB25:
	.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	16(%rsp), %rax
	movq	8(%rsp), %rcx
	movq	%rax, %rdx
	movq	%rcx, %rsi
	subq	%rax, %rsi
	subq	%rcx, %rdx
	cmpq	%rcx, %rax
	cmovl	%rsi, %rdx
	testb	$1, %dl
	je	.L17
	movq	(%rsp), %rdi
	leaq	-1(%rax), %rsi
	leaq	(%rdi,%rdi), %rdx
	movq	%rsi, %rdi
	subq	%rcx, %rdx
	movq	%rdx, %r8
	subq	%rdx, %rdi
	subq	%rsi, %r8
	cmpq	%rdx, %rsi
	movl	$2, %esi
	cmovl	%r8, %rdi
	addq	$1, %rax
	subq	%rcx, %rsi
	movq	%rsi, %rcx
	movq	%rax, %rdx
	subq	%rax, %rcx
	subq	%rsi, %rdx
	cmpq	%rsi, %rax
	cmovl	%rcx, %rdx
	cmpq	%rdi, %rdx
	cmovg	%rdi, %rdx
.L17:
	sarq	%rdx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.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:
```