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>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <limits.h>
#define swap(type,a,b) do{type t=a;a=b;b=t;}while(0);
#define MAX(a,b) (((a)>(b))?(a):(b))
#define MIN(a,b) (((a)<(b))?(a):(b))
#define ll long long
#define INF 100000000
#define FOR(i,a,n) for(i=(a);i<(n);i++)
int comp(const void* a,const void* b){
	return *(int*)a-*(int*)b;
}
void fill(int a[],int b,int c){
	int i;
	FOR(i,0,b) a[i]=c;
	return;
}
int a[300][300];
int used[300];
int n,m,res=INF;
void dfs(int cnt){
	int b[300],num=0,max,i,j;
	if(cnt==m) return;
	FOR(i,0,m) b[i]=0;
	FOR(i,0,n){
		FOR(j,0,m){
			if(!used[a[i][j]]){
				b[a[i][j]]++;
				break;
			}
		}
	}
	FOR(i,0,m){
		if(num<b[i]){
			num=b[i];
			max=i;
		}
	}
	res=MIN(res,num);
	used[max]=1;
	dfs(cnt+1);
	return;
}
int main(void)
{
	int i,j;
	scanf("%d%d",&n,&m);
	FOR(i,0,n){
		FOR(j,0,m){
			scanf("%d",&a[i][j]);
			a[i][j]--;
		}
	}
	dfs(0);
	printf("%d\n",res);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	comp
	.type	comp, @function
comp:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	comp, .-comp
	.globl	fill
	.type	fill, @function
fill:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L4
.L5:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-32(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -4(%rbp)
.L4:
	movl	-4(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L5
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	fill, .-fill
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 360000
a:
	.zero	360000
	.globl	used
	.align 32
	.type	used, @object
	.size	used, 1200
used:
	.zero	1200
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	res
	.data
	.align 4
	.type	res, @object
	.size	res, 4
res:
	.long	100000000
	.text
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1248, %rsp
	movl	%edi, -1236(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -1232(%rbp)
	movl	m(%rip), %eax
	cmpl	%eax, -1236(%rbp)
	je	.L23
	movl	$0, -1224(%rbp)
	jmp	.L10
.L11:
	movl	-1224(%rbp), %eax
	cltq
	movl	$0, -1216(%rbp,%rax,4)
	addl	$1, -1224(%rbp)
.L10:
	movl	m(%rip), %eax
	cmpl	%eax, -1224(%rbp)
	jl	.L11
	movl	$0, -1224(%rbp)
	jmp	.L12
.L17:
	movl	$0, -1220(%rbp)
	jmp	.L13
.L16:
	movl	-1220(%rbp), %eax
	movslq	%eax, %rdx
	movl	-1224(%rbp), %eax
	cltq
	imulq	$300, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	used(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L14
	movl	-1220(%rbp), %eax
	movslq	%eax, %rdx
	movl	-1224(%rbp), %eax
	cltq
	imulq	$300, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	movl	-1216(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -1216(%rbp,%rax,4)
	jmp	.L15
.L14:
	addl	$1, -1220(%rbp)
.L13:
	movl	m(%rip), %eax
	cmpl	%eax, -1220(%rbp)
	jl	.L16
.L15:
	addl	$1, -1224(%rbp)
.L12:
	movl	n(%rip), %eax
	cmpl	%eax, -1224(%rbp)
	jl	.L17
	movl	$0, -1224(%rbp)
	jmp	.L18
.L20:
	movl	-1224(%rbp), %eax
	cltq
	movl	-1216(%rbp,%rax,4), %eax
	cmpl	%eax, -1232(%rbp)
	jge	.L19
	movl	-1224(%rbp), %eax
	cltq
	movl	-1216(%rbp,%rax,4), %eax
	movl	%eax, -1232(%rbp)
	movl	-1224(%rbp), %eax
	movl	%eax, -1228(%rbp)
.L19:
	addl	$1, -1224(%rbp)
.L18:
	movl	m(%rip), %eax
	cmpl	%eax, -1224(%rbp)
	jl	.L20
	movl	res(%rip), %edx
	movl	-1232(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, res(%rip)
	movl	-1228(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	used(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	-1236(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	dfs
	jmp	.L7
.L23:
	nop
.L7:
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	dfs, .-dfs
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	leaq	m(%rip), %rax
	movq	%rax, %rdx
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -8(%rbp)
	jmp	.L25
.L28:
	movl	$0, -4(%rbp)
	jmp	.L26
.L27:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$300, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$300, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$300, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L26:
	movl	m(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L27
	addl	$1, -8(%rbp)
.L25:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L28
	movl	$0, %edi
	call	dfs
	movl	res(%rip), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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	comp
	.type	comp, @function
comp:
.LFB51:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	comp, .-comp
	.p2align 4
	.globl	fill
	.type	fill, @function
fill:
.LFB52:
	.cfi_startproc
	endbr64
	movl	%esi, %ecx
	testl	%esi, %esi
	jle	.L3
	leal	-1(%rsi), %eax
	cmpl	$2, %eax
	jbe	.L8
	shrl	$2, %esi
	movd	%edx, %xmm1
	movq	%rdi, %rax
	subl	$1, %esi
	pshufd	$0, %xmm1, %xmm0
	salq	$4, %rsi
	leaq	16(%rdi,%rsi), %rsi
	.p2align 4,,10
	.p2align 3
.L6:
	movups	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rsi, %rax
	jne	.L6
	movl	%ecx, %eax
	andl	$-4, %eax
	testb	$3, %cl
	je	.L10
.L5:
	movslq	%eax, %rsi
	movl	%edx, (%rdi,%rsi,4)
	leaq	0(,%rsi,4), %r8
	leal	1(%rax), %esi
	cmpl	%esi, %ecx
	jle	.L3
	addl	$2, %eax
	movl	%edx, 4(%rdi,%r8)
	cmpl	%eax, %ecx
	jle	.L3
	movl	%edx, 8(%rdi,%r8)
.L3:
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	ret
.L8:
	xorl	%eax, %eax
	jmp	.L5
	.cfi_endproc
.LFE52:
	.size	fill, .-fill
	.p2align 4
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB53:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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	$1256, %rsp
	.cfi_def_cfa_offset 1312
	movl	m(%rip), %ebp
	movq	%fs:40, %rax
	movq	%rax, 1240(%rsp)
	xorl	%eax, %eax
	cmpl	%ebp, %edi
	je	.L11
	leal	-1(%rbp), %r14d
	leaq	4+a(%rip), %rdx
	movq	$-4, %r15
	movl	n(%rip), %r12d
	leaq	4(,%r14,4), %rax
	movl	res(%rip), %r13d
	movl	%edi, %r9d
	leaq	used(%rip), %rbx
	movq	%rax, 16(%rsp)
	leaq	0(,%r14,4), %rax
	leaq	(%rdx,%rax), %rcx
	subq	%rax, %r15
	movq	%rcx, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L26:
	testl	%ebp, %ebp
	jle	.L36
	movq	16(%rsp), %rdx
	leaq	32(%rsp), %rdi
	xorl	%esi, %esi
	movl	%r9d, 12(%rsp)
	movl	%r8d, 8(%rsp)
	call	memset@PLT
	testl	%r12d, %r12d
	movl	8(%rsp), %r8d
	movl	12(%rsp), %r9d
	movq	%rax, %rdi
	jle	.L15
.L27:
	movq	24(%rsp), %rsi
	xorl	%edi, %edi
	.p2align 4,,10
	.p2align 3
.L16:
	leaq	(%r15,%rsi), %rax
	testl	%ebp, %ebp
	jg	.L19
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L17:
	addq	$4, %rax
	cmpq	%rsi, %rax
	je	.L18
.L19:
	movslq	(%rax), %rdx
	movl	(%rbx,%rdx,4), %ecx
	testl	%ecx, %ecx
	jne	.L17
	addl	$1, 32(%rsp,%rdx,4)
.L18:
	addl	$1, %edi
	addq	$1200, %rsi
	cmpl	%edi, %r12d
	jg	.L16
	leaq	32(%rsp), %rdi
	testl	%ebp, %ebp
	jle	.L28
.L15:
	xorl	%eax, %eax
	xorl	%esi, %esi
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L30:
	movq	%rdx, %rax
.L24:
	movl	(%rdi,%rax,4), %edx
	cmpl	%esi, %edx
	jle	.L23
	movl	%eax, %r8d
	movl	%edx, %esi
.L23:
	leaq	1(%rax), %rdx
	cmpq	%rax, %r14
	jne	.L30
.L22:
	cmpl	%esi, %r13d
	movslq	%r8d, %rax
	cmovg	%esi, %r13d
	addl	$1, %r9d
	movl	$1, (%rbx,%rax,4)
	cmpl	%r9d, %ebp
	jne	.L26
	movl	%r13d, res(%rip)
.L11:
	movq	1240(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L37
	addq	$1256, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L36:
	.cfi_restore_state
	testl	%r12d, %r12d
	jg	.L27
.L28:
	xorl	%esi, %esi
	jmp	.L22
.L37:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE53:
	.size	dfs, .-dfs
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB54:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	m(%rip), %rdx
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %rdi
	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	$8, %rsp
	.cfi_def_cfa_offset 64
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L39
	movl	m(%rip), %eax
	xorl	%r14d, %r14d
	xorl	%r13d, %r13d
	leaq	a(%rip), %r15
	leaq	.LC1(%rip), %r12
	testl	%eax, %eax
	jle	.L39
	.p2align 4,,10
	.p2align 3
.L43:
	leaq	(%r15,%r14,4), %rbx
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L41:
	movq	%rbx, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	m(%rip), %eax
	subl	$1, (%rbx)
	addq	$4, %rbx
	cmpl	%ebp, %eax
	jg	.L41
	addl	$1, %r13d
	cmpl	n(%rip), %r13d
	jge	.L39
	addq	$300, %r14
	testl	%eax, %eax
	jg	.L43
.L39:
	xorl	%edi, %edi
	call	dfs
	movl	res(%rip), %edx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	addq	$8, %rsp
	.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
	.cfi_endproc
.LFE54:
	.size	main, .-main
	.globl	res
	.data
	.align 4
	.type	res, @object
	.size	res, 4
res:
	.long	100000000
	.globl	m
	.bss
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	used
	.align 32
	.type	used, @object
	.size	used, 1200
used:
	.zero	1200
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 360000
a:
	.zero	360000
	.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	comp
	.type	comp, @function
comp:
.LFB51:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	comp, .-comp
	.p2align 4
	.globl	fill
	.type	fill, @function
fill:
.LFB52:
	.cfi_startproc
	endbr64
	movl	%esi, %ecx
	testl	%esi, %esi
	jle	.L3
	leal	-1(%rsi), %eax
	cmpl	$2, %eax
	jbe	.L8
	shrl	$2, %esi
	movd	%edx, %xmm1
	movq	%rdi, %rax
	subl	$1, %esi
	pshufd	$0, %xmm1, %xmm0
	salq	$4, %rsi
	leaq	16(%rdi,%rsi), %rsi
	.p2align 4,,10
	.p2align 3
.L6:
	movups	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rsi, %rax
	jne	.L6
	movl	%ecx, %eax
	andl	$-4, %eax
	testb	$3, %cl
	je	.L10
.L5:
	movslq	%eax, %rsi
	movl	%edx, (%rdi,%rsi,4)
	leaq	0(,%rsi,4), %r8
	leal	1(%rax), %esi
	cmpl	%esi, %ecx
	jle	.L3
	addl	$2, %eax
	movl	%edx, 4(%rdi,%r8)
	cmpl	%eax, %ecx
	jle	.L3
	movl	%edx, 8(%rdi,%r8)
.L3:
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	ret
.L8:
	xorl	%eax, %eax
	jmp	.L5
	.cfi_endproc
.LFE52:
	.size	fill, .-fill
	.p2align 4
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB53:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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	$1256, %rsp
	.cfi_def_cfa_offset 1312
	movl	m(%rip), %ebp
	movq	%fs:40, %rax
	movq	%rax, 1240(%rsp)
	xorl	%eax, %eax
	cmpl	%ebp, %edi
	je	.L11
	leal	-1(%rbp), %r14d
	leaq	4+a(%rip), %rdx
	movq	$-4, %r15
	movl	n(%rip), %r12d
	leaq	4(,%r14,4), %rax
	movl	res(%rip), %r13d
	movl	%edi, %r9d
	leaq	used(%rip), %rbx
	movq	%rax, 16(%rsp)
	leaq	0(,%r14,4), %rax
	leaq	(%rdx,%rax), %rcx
	subq	%rax, %r15
	movq	%rcx, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L26:
	testl	%ebp, %ebp
	jle	.L36
	movq	16(%rsp), %rdx
	leaq	32(%rsp), %rdi
	xorl	%esi, %esi
	movl	%r9d, 12(%rsp)
	movl	%r8d, 8(%rsp)
	call	memset@PLT
	testl	%r12d, %r12d
	movl	8(%rsp), %r8d
	movl	12(%rsp), %r9d
	movq	%rax, %rdi
	jle	.L15
.L27:
	movq	24(%rsp), %rsi
	xorl	%edi, %edi
	.p2align 4,,10
	.p2align 3
.L16:
	leaq	(%r15,%rsi), %rax
	testl	%ebp, %ebp
	jg	.L19
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L17:
	addq	$4, %rax
	cmpq	%rsi, %rax
	je	.L18
.L19:
	movslq	(%rax), %rdx
	movl	(%rbx,%rdx,4), %ecx
	testl	%ecx, %ecx
	jne	.L17
	addl	$1, 32(%rsp,%rdx,4)
.L18:
	addl	$1, %edi
	addq	$1200, %rsi
	cmpl	%edi, %r12d
	jg	.L16
	leaq	32(%rsp), %rdi
	testl	%ebp, %ebp
	jle	.L28
.L15:
	xorl	%eax, %eax
	xorl	%esi, %esi
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L30:
	movq	%rdx, %rax
.L24:
	movl	(%rdi,%rax,4), %edx
	cmpl	%esi, %edx
	jle	.L23
	movl	%eax, %r8d
	movl	%edx, %esi
.L23:
	leaq	1(%rax), %rdx
	cmpq	%rax, %r14
	jne	.L30
.L22:
	cmpl	%esi, %r13d
	movslq	%r8d, %rax
	cmovg	%esi, %r13d
	addl	$1, %r9d
	movl	$1, (%rbx,%rax,4)
	cmpl	%r9d, %ebp
	jne	.L26
	movl	%r13d, res(%rip)
.L11:
	movq	1240(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L37
	addq	$1256, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L36:
	.cfi_restore_state
	testl	%r12d, %r12d
	jg	.L27
.L28:
	xorl	%esi, %esi
	jmp	.L22
.L37:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE53:
	.size	dfs, .-dfs
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB54:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	m(%rip), %rdx
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %rdi
	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	$8, %rsp
	.cfi_def_cfa_offset 64
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L39
	movl	m(%rip), %eax
	xorl	%r14d, %r14d
	xorl	%r13d, %r13d
	leaq	a(%rip), %r15
	leaq	.LC1(%rip), %r12
	testl	%eax, %eax
	jle	.L39
	.p2align 4,,10
	.p2align 3
.L43:
	leaq	(%r15,%r14,4), %rbx
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L41:
	movq	%rbx, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	m(%rip), %eax
	subl	$1, (%rbx)
	addq	$4, %rbx
	cmpl	%ebp, %eax
	jg	.L41
	addl	$1, %r13d
	cmpl	n(%rip), %r13d
	jge	.L39
	addq	$300, %r14
	testl	%eax, %eax
	jg	.L43
.L39:
	xorl	%edi, %edi
	call	dfs
	movl	res(%rip), %edx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	addq	$8, %rsp
	.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
	.cfi_endproc
.LFE54:
	.size	main, .-main
	.globl	res
	.data
	.align 4
	.type	res, @object
	.size	res, 4
res:
	.long	100000000
	.globl	m
	.bss
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	used
	.align 32
	.type	used, @object
	.size	used, 1200
used:
	.zero	1200
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 360000
a:
	.zero	360000
	.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>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <limits.h>
#define swap(type,a,b) do{type t=a;a=b;b=t;}while(0);
#define MAX(a,b) (((a)>(b))?(a):(b))
#define MIN(a,b) (((a)<(b))?(a):(b))
#define ll long long
#define INF 100000000
#define FOR(i,a,n) for(i=(a);i<(n);i++)
int comp(const void* a,const void* b){
	return *(int*)a-*(int*)b;
}
void fill(int a[],int b,int c){
	int i;
	FOR(i,0,b) a[i]=c;
	return;
}
int a[300][300];
int used[300];
int n,m,res=INF;
void dfs(int cnt){
	int b[300],num=0,max,i,j;
	if(cnt==m) return;
	FOR(i,0,m) b[i]=0;
	FOR(i,0,n){
		FOR(j,0,m){
			if(!used[a[i][j]]){
				b[a[i][j]]++;
				break;
			}
		}
	}
	FOR(i,0,m){
		if(num<b[i]){
			num=b[i];
			max=i;
		}
	}
	res=MIN(res,num);
	used[max]=1;
	dfs(cnt+1);
	return;
}
int main(void)
{
	int i,j;
	scanf("%d%d",&n,&m);
	FOR(i,0,n){
		FOR(j,0,m){
			scanf("%d",&a[i][j]);
			a[i][j]--;
		}
	}
	dfs(0);
	printf("%d\n",res);
	return 0;
}
2 5
5 1 3 4 2
2 5 3 1 4
2 3 1 4 5
2 5 4 3 1
 2 3
2 1 3
2 1 3
2 1 3
 2 5
5 1 3 4 2
2 5 3 1 4
2 3 1 6 5
2 5 4 3 1
 2 5
5 1 3 4 2
2 5 3 1 4
2 3 1 6 7
2 5 4 3 1
 2 5
5 1 3 4 2
2 5 3 1 4
2 0 1 4 5
2 5 4 3 1
 2 5
5 1 3 4 2
2 5 3 1 4
2 3 1 4 5
2 5 5 3 1
 2 5
5 1 3 4 2
2 5 3 1 4
2 3 1 6 10
2 5 4 3 1
 2 5
5 1 3 4 2
2 5 3 1 4
4 0 1 4 5
2 5 4 3 1
 2 5
5 1 3 4 2
2 5 3 1 4
2 3 1 6 10
2 5 4 2 1
 2 5
5 1 3 4 2
2 5 3 1 4
2 3 1 6 8
2 5 4 2 1

1
 2
 1
 1
 1
 1
 1
 1
 1
 1

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>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <limits.h>
#define swap(type,a,b) do{type t=a;a=b;b=t;}while(0);
#define MAX(a,b) (((a)>(b))?(a):(b))
#define MIN(a,b) (((a)<(b))?(a):(b))
#define ll long long
#define INF 100000000
#define FOR(i,a,n) for(i=(a);i<(n);i++)
int comp(const void* a,const void* b){
	return *(int*)a-*(int*)b;
}
void fill(int a[],int b,int c){
	int i;
	FOR(i,0,b) a[i]=c;
	return;
}
int a[300][300];
int used[300];
int n,m,res=INF;
void dfs(int cnt){
	int b[300],num=0,max,i,j;
	if(cnt==m) return;
	FOR(i,0,m) b[i]=0;
	FOR(i,0,n){
		FOR(j,0,m){
			if(!used[a[i][j]]){
				b[a[i][j]]++;
				break;
			}
		}
	}
	FOR(i,0,m){
		if(num<b[i]){
			num=b[i];
			max=i;
		}
	}
	res=MIN(res,num);
	used[max]=1;
	dfs(cnt+1);
	return;
}
int main(void)
{
	int i,j;
	scanf("%d%d",&n,&m);
	FOR(i,0,n){
		FOR(j,0,m){
			scanf("%d",&a[i][j]);
			a[i][j]--;
		}
	}
	dfs(0);
	printf("%d\n",res);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	comp
	.type	comp, @function
comp:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	comp, .-comp
	.globl	fill
	.type	fill, @function
fill:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L4
.L5:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-32(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -4(%rbp)
.L4:
	movl	-4(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L5
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	fill, .-fill
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 360000
a:
	.zero	360000
	.globl	used
	.align 32
	.type	used, @object
	.size	used, 1200
used:
	.zero	1200
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	res
	.data
	.align 4
	.type	res, @object
	.size	res, 4
res:
	.long	100000000
	.text
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1248, %rsp
	movl	%edi, -1236(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -1232(%rbp)
	movl	m(%rip), %eax
	cmpl	%eax, -1236(%rbp)
	je	.L23
	movl	$0, -1224(%rbp)
	jmp	.L10
.L11:
	movl	-1224(%rbp), %eax
	cltq
	movl	$0, -1216(%rbp,%rax,4)
	addl	$1, -1224(%rbp)
.L10:
	movl	m(%rip), %eax
	cmpl	%eax, -1224(%rbp)
	jl	.L11
	movl	$0, -1224(%rbp)
	jmp	.L12
.L17:
	movl	$0, -1220(%rbp)
	jmp	.L13
.L16:
	movl	-1220(%rbp), %eax
	movslq	%eax, %rdx
	movl	-1224(%rbp), %eax
	cltq
	imulq	$300, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	used(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L14
	movl	-1220(%rbp), %eax
	movslq	%eax, %rdx
	movl	-1224(%rbp), %eax
	cltq
	imulq	$300, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	movl	-1216(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -1216(%rbp,%rax,4)
	jmp	.L15
.L14:
	addl	$1, -1220(%rbp)
.L13:
	movl	m(%rip), %eax
	cmpl	%eax, -1220(%rbp)
	jl	.L16
.L15:
	addl	$1, -1224(%rbp)
.L12:
	movl	n(%rip), %eax
	cmpl	%eax, -1224(%rbp)
	jl	.L17
	movl	$0, -1224(%rbp)
	jmp	.L18
.L20:
	movl	-1224(%rbp), %eax
	cltq
	movl	-1216(%rbp,%rax,4), %eax
	cmpl	%eax, -1232(%rbp)
	jge	.L19
	movl	-1224(%rbp), %eax
	cltq
	movl	-1216(%rbp,%rax,4), %eax
	movl	%eax, -1232(%rbp)
	movl	-1224(%rbp), %eax
	movl	%eax, -1228(%rbp)
.L19:
	addl	$1, -1224(%rbp)
.L18:
	movl	m(%rip), %eax
	cmpl	%eax, -1224(%rbp)
	jl	.L20
	movl	res(%rip), %edx
	movl	-1232(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, res(%rip)
	movl	-1228(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	used(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	-1236(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	dfs
	jmp	.L7
.L23:
	nop
.L7:
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	dfs, .-dfs
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	leaq	m(%rip), %rax
	movq	%rax, %rdx
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -8(%rbp)
	jmp	.L25
.L28:
	movl	$0, -4(%rbp)
	jmp	.L26
.L27:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$300, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$300, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$300, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L26:
	movl	m(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L27
	addl	$1, -8(%rbp)
.L25:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L28
	movl	$0, %edi
	call	dfs
	movl	res(%rip), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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	comp
	.type	comp, @function
comp:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	comp, .-comp
	.globl	fill
	.type	fill, @function
fill:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L4
.L5:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-32(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -4(%rbp)
.L4:
	movl	-4(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L5
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	fill, .-fill
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 360000
a:
	.zero	360000
	.globl	used
	.align 32
	.type	used, @object
	.size	used, 1200
used:
	.zero	1200
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	res
	.data
	.align 4
	.type	res, @object
	.size	res, 4
res:
	.long	100000000
	.text
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1248, %rsp
	movl	%edi, -1236(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -1232(%rbp)
	movl	m(%rip), %eax
	cmpl	%eax, -1236(%rbp)
	je	.L23
	movl	$0, -1224(%rbp)
	jmp	.L10
.L11:
	movl	-1224(%rbp), %eax
	cltq
	movl	$0, -1216(%rbp,%rax,4)
	addl	$1, -1224(%rbp)
.L10:
	movl	m(%rip), %eax
	cmpl	%eax, -1224(%rbp)
	jl	.L11
	movl	$0, -1224(%rbp)
	jmp	.L12
.L17:
	movl	$0, -1220(%rbp)
	jmp	.L13
.L16:
	movl	-1220(%rbp), %eax
	movslq	%eax, %rdx
	movl	-1224(%rbp), %eax
	cltq
	imulq	$300, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	used(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L14
	movl	-1220(%rbp), %eax
	movslq	%eax, %rdx
	movl	-1224(%rbp), %eax
	cltq
	imulq	$300, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	movl	-1216(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -1216(%rbp,%rax,4)
	jmp	.L15
.L14:
	addl	$1, -1220(%rbp)
.L13:
	movl	m(%rip), %eax
	cmpl	%eax, -1220(%rbp)
	jl	.L16
.L15:
	addl	$1, -1224(%rbp)
.L12:
	movl	n(%rip), %eax
	cmpl	%eax, -1224(%rbp)
	jl	.L17
	movl	$0, -1224(%rbp)
	jmp	.L18
.L20:
	movl	-1224(%rbp), %eax
	cltq
	movl	-1216(%rbp,%rax,4), %eax
	cmpl	%eax, -1232(%rbp)
	jge	.L19
	movl	-1224(%rbp), %eax
	cltq
	movl	-1216(%rbp,%rax,4), %eax
	movl	%eax, -1232(%rbp)
	movl	-1224(%rbp), %eax
	movl	%eax, -1228(%rbp)
.L19:
	addl	$1, -1224(%rbp)
.L18:
	movl	m(%rip), %eax
	cmpl	%eax, -1224(%rbp)
	jl	.L20
	movl	res(%rip), %edx
	movl	-1232(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, res(%rip)
	movl	-1228(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	used(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	-1236(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	dfs
	jmp	.L7
.L23:
	nop
.L7:
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	dfs, .-dfs
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	leaq	m(%rip), %rax
	movq	%rax, %rdx
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -8(%rbp)
	jmp	.L25
.L28:
	movl	$0, -4(%rbp)
	jmp	.L26
.L27:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$300, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$300, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$300, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L26:
	movl	m(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L27
	addl	$1, -8(%rbp)
.L25:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L28
	movl	$0, %edi
	call	dfs
	movl	res(%rip), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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:
