// File: /workspace/github_cpp_makefile_star2_O2/xiangzejun[P]Optimizing_Implementations_of_Linear_Layers/main.cpp
// Function: main
int main()
{
	int counter = 100000;
	struct timeval start;
	struct timeval end;
	gettimeofday(&start, NULL);

	int num = 0;
	cout<<FILENAME<<endl;
	// while((num++) < 1)
	// srand(time(0));
	while(true)
	{
		vector<ROW> m = get_matrix();


		vector<xpair> seq = reduce(m);

		vector<ROW> tmp_m = get_reduced_matrix(seq, m);

		cout << "minimal = " << counter << "   current = " << seq.size() << endl << endl;

		if(seq.size() < counter)
		{
			counter = seq.size();
			print_seq(m, tmp_m, seq);
		}
	}

	gettimeofday(&end, NULL);
	float time  = 1000000 * (end.tv_sec - start.tv_sec) + end.tv_usec - start.tv_usec;
	time /= 1000000;
	cout << "Time used = " << time << endl;

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
leaq 0xd8(%rsp), %rdi
xorl %esi, %esi
callq 0x2220
movq 0x6b55(%rip), %rdi      # 0x8fd8
leaq 0x3b7a(%rip), %rsi      # 0x6004
callq 0x2150
movq %rax, %rdi
callq 0x20a0
movl $0x186a0, %ebx          # imm = 0x186A0
leaq 0xc0(%rsp), %r14
movq %rsp, %r12
leaq 0x78(%rsp), %r13
movq %r14, %rdi
callq 0x3f58
leaq 0xa8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x29e4
movq %r12, %rdi
movq %r15, %rsi
callq 0x54fd
movq %r15, %rdi
callq 0x2bbe
leaq 0x60(%rsp), %rdi
movq %r12, %rsi
callq 0x2a34
leaq 0x90(%rsp), %rbp
movq %rbp, %rdi
movq %r14, %rsi
callq 0x29e4
leaq 0x18(%rsp), %rdi
leaq 0x60(%rsp), %r15
movq %r15, %rsi
movq %rbp, %rdx
callq 0x4050
movq %rbp, %rdi
callq 0x2bbe
movq %r15, %rdi
callq 0x2c54
movq 0x6ab2(%rip), %rdi      # 0x8fd8
leaq 0x3adf(%rip), %rsi      # 0x600c
callq 0x2150
movq %rax, %rdi
movl %ebx, %esi
callq 0x2250
movq %rax, %rdi
leaq 0x3ad1(%rip), %rsi      # 0x6017
callq 0x2150
movq %rax, %rdi
movq 0x8(%rsp), %rax
subq (%rsp), %rax
cqto
pushq $0xc
popq %rcx
idivq %rcx
movq %rax, %rsi
callq 0x20e0
movq %rax, %rdi
callq 0x20a0
movq %rax, %rdi
callq 0x20a0
movq 0x8(%rsp), %rax
subq (%rsp), %rax
cqto
pushq $0xc
popq %rcx
idivq %rcx
movq %rax, %r15
movslq %ebx, %rax
cmpq %rax, %r15
jae 0x25f3
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x29e4
leaq 0x30(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x29e4
movq %r13, %rdi
movq %r12, %rsi
callq 0x2a34
leaq 0x48(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rbp
leaq 0x30(%rsp), %r13
movq %r13, %rsi
movq %rbp, %rdx
callq 0x26a6
movq %rbp, %rdi
callq 0x2c54
movq %r13, %rdi
callq 0x2bbe
movq %rbx, %rdi
callq 0x2bbe
movl %r15d, %ebx
movq %rbp, %r13
leaq 0x18(%rsp), %rdi
callq 0x2bbe
movq %r12, %rdi
callq 0x2c54
movq %r14, %rdi
callq 0x2bbe
jmp 0x24ac
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x2c54
jmp 0x2624
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2bbe
jmp 0x2633
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x2bbe
jmp 0x267f
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x2bbe
jmp 0x2654
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x2c54
jmp 0x2689
movq %rax, %rbx
jmp 0x2689
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x2bbe
jmp 0x2691
movq %rax, %rbx
jmp 0x2691
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x2bbe
movq %rsp, %rdi
callq 0x2c54
leaq 0xc0(%rsp), %rdi
callq 0x2bbe
movq %rbx, %rdi
callq 0x2270