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 max(int a,int b){
	return a>b?a:b;
}
int ABS(int a){
	return 0<a?a:-a;
}
int main(void){
	int n,i,j,k;
	int H,flag;
	int x[100],y[100],h[100];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d%d%d",&x[i],&y[i],&h[i]);
	}
	for(i=0;i<=100;i++){
		for(j=0;j<=100;j++){
			for(k=0;h[k]==0;k++);
			H=h[k]+ABS(x[k]-i)+ABS(y[k]-j);
			for(k=0,flag=1;k<n;k++){
				if(h[k]!=max(H-ABS(x[k]-i)-ABS(y[k]-j),0)){
					flag=0;
					break;
				}
			}
			if(flag==1){
				printf("%d %d %d",i,j,H);
				return 0;
			}
		}
	}
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	max
	.type	max, @function
max:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	max, .-max
	.globl	ABS
	.type	ABS, @function
ABS:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	ABS, .-ABS
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d%d"
.LC2:
	.string	"%d %d %d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r12
	pushq	%rbx
	subq	$1248, %rsp
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-1256(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -1252(%rbp)
	jmp	.L6
.L7:
	leaq	-432(%rbp), %rdx
	movl	-1252(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-832(%rbp), %rdx
	movl	-1252(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-1232(%rbp), %rsi
	movl	-1252(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rsi, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -1252(%rbp)
.L6:
	movl	-1256(%rbp), %eax
	cmpl	%eax, -1252(%rbp)
	jl	.L7
	movl	$0, -1252(%rbp)
	jmp	.L8
.L19:
	movl	$0, -1248(%rbp)
	jmp	.L9
.L18:
	movl	$0, -1244(%rbp)
	jmp	.L10
.L11:
	addl	$1, -1244(%rbp)
.L10:
	movl	-1244(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	testl	%eax, %eax
	je	.L11
	movl	-1244(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %ebx
	movl	-1244(%rbp), %eax
	cltq
	movl	-1232(%rbp,%rax,4), %eax
	subl	-1252(%rbp), %eax
	movl	%eax, %edi
	call	ABS
	addl	%eax, %ebx
	movl	-1244(%rbp), %eax
	cltq
	movl	-832(%rbp,%rax,4), %eax
	subl	-1248(%rbp), %eax
	movl	%eax, %edi
	call	ABS
	addl	%ebx, %eax
	movl	%eax, -1236(%rbp)
	movl	$0, -1244(%rbp)
	movl	$1, -1240(%rbp)
	jmp	.L12
.L15:
	movl	-1244(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %ebx
	movl	-1244(%rbp), %eax
	cltq
	movl	-1232(%rbp,%rax,4), %eax
	subl	-1252(%rbp), %eax
	movl	%eax, %edi
	call	ABS
	movl	%eax, %edx
	movl	-1236(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, %r12d
	movl	-1244(%rbp), %eax
	cltq
	movl	-832(%rbp,%rax,4), %eax
	subl	-1248(%rbp), %eax
	movl	%eax, %edi
	call	ABS
	movl	%eax, %edx
	movl	%r12d, %eax
	subl	%edx, %eax
	movl	$0, %esi
	movl	%eax, %edi
	call	max
	cmpl	%eax, %ebx
	je	.L13
	movl	$0, -1240(%rbp)
	jmp	.L14
.L13:
	addl	$1, -1244(%rbp)
.L12:
	movl	-1256(%rbp), %eax
	cmpl	%eax, -1244(%rbp)
	jl	.L15
.L14:
	cmpl	$1, -1240(%rbp)
	jne	.L16
	movl	-1236(%rbp), %ecx
	movl	-1248(%rbp), %edx
	movl	-1252(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L17
.L16:
	addl	$1, -1248(%rbp)
.L9:
	cmpl	$100, -1248(%rbp)
	jle	.L18
	addl	$1, -1252(%rbp)
.L8:
	cmpl	$100, -1252(%rbp)
	jle	.L19
	movl	$0, %eax
.L17:
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	addq	$1248, %rsp
	popq	%rbx
	popq	%r12
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	max
	.type	max, @function
max:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%edi, %esi
	movl	%edi, %eax
	cmovge	%esi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	max, .-max
	.p2align 4
	.globl	ABS
	.type	ABS, @function
ABS:
.LFB24:
	.cfi_startproc
	endbr64
	movl	%edi, %eax
	negl	%eax
	cmovs	%edi, %eax
	ret
	.cfi_endproc
.LFE24:
	.size	ABS, .-ABS
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d%d"
.LC2:
	.string	"%d %d %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	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	$1240, %rsp
	.cfi_def_cfa_offset 1296
	movq	%fs:40, %rax
	movq	%rax, 1224(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edi
	testl	%edi, %edi
	jle	.L5
	xorl	%r13d, %r13d
	xorl	%r15d, %r15d
	leaq	816(%rsp), %rbx
	leaq	416(%rsp), %r12
	leaq	16(%rsp), %rbp
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L6:
	leaq	(%rbx,%r13), %rcx
	leaq	(%r12,%r13), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	leaq	0(%rbp,%r13), %rsi
	addl	$1, %r15d
	addq	$4, %r13
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edi
	cmpl	%r15d, %edi
	jg	.L6
.L5:
	movl	816(%rsp), %r11d
	xorl	%r10d, %r10d
	movslq	%edi, %rsi
.L7:
	xorl	%r9d, %r9d
	.p2align 4,,10
	.p2align 3
.L14:
	movl	$1, %eax
	leaq	816(%rsp), %rbx
	movl	%r11d, %edx
	xorl	%ecx, %ecx
	testl	%r11d, %r11d
	jne	.L12
	.p2align 4,,10
	.p2align 3
.L8:
	movslq	%eax, %rcx
	addq	$1, %rax
	movl	-4(%rbx,%rax,4), %edx
	testl	%edx, %edx
	je	.L8
.L12:
	movl	16(%rsp,%rcx,4), %eax
	subl	%r10d, %eax
	movl	%eax, %r8d
	negl	%r8d
	cmovs	%eax, %r8d
	movl	416(%rsp,%rcx,4), %eax
	subl	%r9d, %eax
	addl	%edx, %r8d
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%eax, %r8d
	testl	%edi, %edi
	jle	.L9
	xorl	%ecx, %ecx
	leaq	816(%rsp), %rbx
	leaq	16(%rsp), %rbp
	leaq	416(%rsp), %r12
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L31:
	addq	$1, %rcx
	cmpq	%rcx, %rsi
	je	.L9
.L11:
	movl	0(%rbp,%rcx,4), %eax
	subl	%r10d, %eax
	movl	%eax, %edx
	negl	%edx
	cmovs	%eax, %edx
	movl	%r8d, %eax
	subl	%edx, %eax
	movl	(%r12,%rcx,4), %edx
	subl	%r9d, %edx
	movl	%edx, %r13d
	negl	%r13d
	cmovns	%r13d, %edx
	subl	%edx, %eax
	movl	$0, %edx
	cmovs	%edx, %eax
	cmpl	%eax, (%rbx,%rcx,4)
	je	.L31
	addl	$1, %r9d
	cmpl	$101, %r9d
	jne	.L14
	addl	$1, %r10d
	cmpl	$101, %r10d
	jne	.L7
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L9:
	movl	%r9d, %ecx
	movl	%r10d, %edx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
.L13:
	movq	1224(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	addq	$1240, %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
.L32:
	.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
	.file	"temp.c"
	.text
	.p2align 4
	.globl	max
	.type	max, @function
max:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%edi, %esi
	movl	%edi, %eax
	cmovge	%esi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	max, .-max
	.p2align 4
	.globl	ABS
	.type	ABS, @function
ABS:
.LFB24:
	.cfi_startproc
	endbr64
	movl	%edi, %eax
	negl	%eax
	cmovs	%edi, %eax
	ret
	.cfi_endproc
.LFE24:
	.size	ABS, .-ABS
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d%d"
.LC2:
	.string	"%d %d %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	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	$1240, %rsp
	.cfi_def_cfa_offset 1296
	movq	%fs:40, %rax
	movq	%rax, 1224(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edi
	testl	%edi, %edi
	jle	.L5
	xorl	%r13d, %r13d
	xorl	%r15d, %r15d
	leaq	816(%rsp), %rbx
	leaq	416(%rsp), %r12
	leaq	16(%rsp), %rbp
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L6:
	leaq	(%rbx,%r13), %rcx
	leaq	(%r12,%r13), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	leaq	0(%rbp,%r13), %rsi
	addl	$1, %r15d
	addq	$4, %r13
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edi
	cmpl	%r15d, %edi
	jg	.L6
.L5:
	movl	816(%rsp), %r11d
	xorl	%r10d, %r10d
	movslq	%edi, %rsi
.L7:
	xorl	%r9d, %r9d
	.p2align 4,,10
	.p2align 3
.L14:
	movl	$1, %eax
	leaq	816(%rsp), %rbx
	movl	%r11d, %edx
	xorl	%ecx, %ecx
	testl	%r11d, %r11d
	jne	.L12
	.p2align 4,,10
	.p2align 3
.L8:
	movslq	%eax, %rcx
	addq	$1, %rax
	movl	-4(%rbx,%rax,4), %edx
	testl	%edx, %edx
	je	.L8
.L12:
	movl	16(%rsp,%rcx,4), %eax
	subl	%r10d, %eax
	movl	%eax, %r8d
	negl	%r8d
	cmovs	%eax, %r8d
	movl	416(%rsp,%rcx,4), %eax
	subl	%r9d, %eax
	addl	%edx, %r8d
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%eax, %r8d
	testl	%edi, %edi
	jle	.L9
	xorl	%ecx, %ecx
	leaq	816(%rsp), %rbx
	leaq	16(%rsp), %rbp
	leaq	416(%rsp), %r12
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L31:
	addq	$1, %rcx
	cmpq	%rcx, %rsi
	je	.L9
.L11:
	movl	0(%rbp,%rcx,4), %eax
	subl	%r10d, %eax
	movl	%eax, %edx
	negl	%edx
	cmovs	%eax, %edx
	movl	%r8d, %eax
	subl	%edx, %eax
	movl	(%r12,%rcx,4), %edx
	subl	%r9d, %edx
	movl	%edx, %r13d
	negl	%r13d
	cmovns	%r13d, %edx
	subl	%edx, %eax
	movl	$0, %edx
	cmovs	%edx, %eax
	cmpl	%eax, (%rbx,%rcx,4)
	je	.L31
	addl	$1, %r9d
	cmpl	$101, %r9d
	jne	.L14
	addl	$1, %r10d
	cmpl	$101, %r10d
	jne	.L7
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L9:
	movl	%r9d, %ecx
	movl	%r10d, %edx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
.L13:
	movq	1224(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	addq	$1240, %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
.L32:
	.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:

#include<stdio.h>
int max(int a,int b){
	return a>b?a:b;
}
int ABS(int a){
	return 0<a?a:-a;
}
int main(void){
	int n,i,j,k;
	int H,flag;
	int x[100],y[100],h[100];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d%d%d",&x[i],&y[i],&h[i]);
	}
	for(i=0;i<=100;i++){
		for(j=0;j<=100;j++){
			for(k=0;h[k]==0;k++);
			H=h[k]+ABS(x[k]-i)+ABS(y[k]-j);
			for(k=0,flag=1;k<n;k++){
				if(h[k]!=max(H-ABS(x[k]-i)-ABS(y[k]-j),0)){
					flag=0;
					break;
				}
			}
			if(flag==1){
				printf("%d %d %d",i,j,H);
				return 0;
			}
		}
	}
}
2
-1 0 100
2 1 98
 3
99 1 191
000 1 192
99 0 192
 2
-2 0 100
2 2 98
 3
99 1 191
000 1 154
99 0 192
 3
99 1 191
000 1 210
99 0 192
 2
-1 -1 101
2 3 98
 3
99 1 191
000 1 180
99 0 192
 3
99 1 191
010 1 154
99 0 192
 3
99 1 191
000 1 236
99 0 192
 3
99 1 191
010 1 236
99 0 192

0 0 101 49 0 242 0 0 102 68 0 223 40 0 251 0 0 103 55 0 236 73 0 218 27 0 264 32 0 259
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 max(int a,int b){
	return a>b?a:b;
}
int ABS(int a){
	return 0<a?a:-a;
}
int main(void){
	int n,i,j,k;
	int H,flag;
	int x[100],y[100],h[100];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d%d%d",&x[i],&y[i],&h[i]);
	}
	for(i=0;i<=100;i++){
		for(j=0;j<=100;j++){
			for(k=0;h[k]==0;k++);
			H=h[k]+ABS(x[k]-i)+ABS(y[k]-j);
			for(k=0,flag=1;k<n;k++){
				if(h[k]!=max(H-ABS(x[k]-i)-ABS(y[k]-j),0)){
					flag=0;
					break;
				}
			}
			if(flag==1){
				printf("%d %d %d",i,j,H);
				return 0;
			}
		}
	}
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	max
	.type	max, @function
max:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	max, .-max
	.globl	ABS
	.type	ABS, @function
ABS:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	ABS, .-ABS
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d%d"
.LC2:
	.string	"%d %d %d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r12
	pushq	%rbx
	subq	$1248, %rsp
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-1256(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -1252(%rbp)
	jmp	.L6
.L7:
	leaq	-432(%rbp), %rdx
	movl	-1252(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-832(%rbp), %rdx
	movl	-1252(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-1232(%rbp), %rsi
	movl	-1252(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rsi, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -1252(%rbp)
.L6:
	movl	-1256(%rbp), %eax
	cmpl	%eax, -1252(%rbp)
	jl	.L7
	movl	$0, -1252(%rbp)
	jmp	.L8
.L19:
	movl	$0, -1248(%rbp)
	jmp	.L9
.L18:
	movl	$0, -1244(%rbp)
	jmp	.L10
.L11:
	addl	$1, -1244(%rbp)
.L10:
	movl	-1244(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	testl	%eax, %eax
	je	.L11
	movl	-1244(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %ebx
	movl	-1244(%rbp), %eax
	cltq
	movl	-1232(%rbp,%rax,4), %eax
	subl	-1252(%rbp), %eax
	movl	%eax, %edi
	call	ABS
	addl	%eax, %ebx
	movl	-1244(%rbp), %eax
	cltq
	movl	-832(%rbp,%rax,4), %eax
	subl	-1248(%rbp), %eax
	movl	%eax, %edi
	call	ABS
	addl	%ebx, %eax
	movl	%eax, -1236(%rbp)
	movl	$0, -1244(%rbp)
	movl	$1, -1240(%rbp)
	jmp	.L12
.L15:
	movl	-1244(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %ebx
	movl	-1244(%rbp), %eax
	cltq
	movl	-1232(%rbp,%rax,4), %eax
	subl	-1252(%rbp), %eax
	movl	%eax, %edi
	call	ABS
	movl	%eax, %edx
	movl	-1236(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, %r12d
	movl	-1244(%rbp), %eax
	cltq
	movl	-832(%rbp,%rax,4), %eax
	subl	-1248(%rbp), %eax
	movl	%eax, %edi
	call	ABS
	movl	%eax, %edx
	movl	%r12d, %eax
	subl	%edx, %eax
	movl	$0, %esi
	movl	%eax, %edi
	call	max
	cmpl	%eax, %ebx
	je	.L13
	movl	$0, -1240(%rbp)
	jmp	.L14
.L13:
	addl	$1, -1244(%rbp)
.L12:
	movl	-1256(%rbp), %eax
	cmpl	%eax, -1244(%rbp)
	jl	.L15
.L14:
	cmpl	$1, -1240(%rbp)
	jne	.L16
	movl	-1236(%rbp), %ecx
	movl	-1248(%rbp), %edx
	movl	-1252(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L17
.L16:
	addl	$1, -1248(%rbp)
.L9:
	cmpl	$100, -1248(%rbp)
	jle	.L18
	addl	$1, -1252(%rbp)
.L8:
	cmpl	$100, -1252(%rbp)
	jle	.L19
	movl	$0, %eax
.L17:
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	addq	$1248, %rsp
	popq	%rbx
	popq	%r12
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	max
	.type	max, @function
max:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	max, .-max
	.globl	ABS
	.type	ABS, @function
ABS:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	ABS, .-ABS
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d%d"
.LC2:
	.string	"%d %d %d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r12
	pushq	%rbx
	subq	$1248, %rsp
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-1256(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -1252(%rbp)
	jmp	.L6
.L7:
	leaq	-432(%rbp), %rdx
	movl	-1252(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-832(%rbp), %rdx
	movl	-1252(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-1232(%rbp), %rsi
	movl	-1252(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rsi, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -1252(%rbp)
.L6:
	movl	-1256(%rbp), %eax
	cmpl	%eax, -1252(%rbp)
	jl	.L7
	movl	$0, -1252(%rbp)
	jmp	.L8
.L19:
	movl	$0, -1248(%rbp)
	jmp	.L9
.L18:
	movl	$0, -1244(%rbp)
	jmp	.L10
.L11:
	addl	$1, -1244(%rbp)
.L10:
	movl	-1244(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	testl	%eax, %eax
	je	.L11
	movl	-1244(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %ebx
	movl	-1244(%rbp), %eax
	cltq
	movl	-1232(%rbp,%rax,4), %eax
	subl	-1252(%rbp), %eax
	movl	%eax, %edi
	call	ABS
	addl	%eax, %ebx
	movl	-1244(%rbp), %eax
	cltq
	movl	-832(%rbp,%rax,4), %eax
	subl	-1248(%rbp), %eax
	movl	%eax, %edi
	call	ABS
	addl	%ebx, %eax
	movl	%eax, -1236(%rbp)
	movl	$0, -1244(%rbp)
	movl	$1, -1240(%rbp)
	jmp	.L12
.L15:
	movl	-1244(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %ebx
	movl	-1244(%rbp), %eax
	cltq
	movl	-1232(%rbp,%rax,4), %eax
	subl	-1252(%rbp), %eax
	movl	%eax, %edi
	call	ABS
	movl	%eax, %edx
	movl	-1236(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, %r12d
	movl	-1244(%rbp), %eax
	cltq
	movl	-832(%rbp,%rax,4), %eax
	subl	-1248(%rbp), %eax
	movl	%eax, %edi
	call	ABS
	movl	%eax, %edx
	movl	%r12d, %eax
	subl	%edx, %eax
	movl	$0, %esi
	movl	%eax, %edi
	call	max
	cmpl	%eax, %ebx
	je	.L13
	movl	$0, -1240(%rbp)
	jmp	.L14
.L13:
	addl	$1, -1244(%rbp)
.L12:
	movl	-1256(%rbp), %eax
	cmpl	%eax, -1244(%rbp)
	jl	.L15
.L14:
	cmpl	$1, -1240(%rbp)
	jne	.L16
	movl	-1236(%rbp), %ecx
	movl	-1248(%rbp), %edx
	movl	-1252(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L17
.L16:
	addl	$1, -1248(%rbp)
.L9:
	cmpl	$100, -1248(%rbp)
	jle	.L18
	addl	$1, -1252(%rbp)
.L8:
	cmpl	$100, -1252(%rbp)
	jle	.L19
	movl	$0, %eax
.L17:
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	addq	$1248, %rsp
	popq	%rbx
	popq	%r12
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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:
