LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: lns[P]team-tactic-topic-model/./lda.cpp
// Function: LDA<unsigned int, unsigned int, unsigned char>::set_K(unsigned char)
void set_K(topic_t K)
	{
		topic.clear();
		topic.resize(K);
		theta.clear();
		for(topic_t k=0;k<K;k++) {
			theta.push_back(vector<uint32_t>());
			theta[k].resize(dat.size());
			topic[k].make(n_word,n_player);
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x48(%rbp)
addq $0x70, %rdi
callq 0x4a00
movq -0x48(%rbp), %rdi
addq $0x70, %rdi
movzbl -0x9(%rbp), %eax
movl %eax, %esi
callq 0x4a20
movq -0x48(%rbp), %rdi
addq $0x88, %rdi
callq 0x4ab0
movb $0x0, -0xa(%rbp)
movzbl -0xa(%rbp), %eax
movzbl -0x9(%rbp), %ecx
cmpl %ecx, %eax
jge 0x1e48
movq -0x48(%rbp), %rax
addq $0x88, %rax
movq %rax, -0x58(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x30(%rbp)
movq $0x0, -0x20(%rbp)
leaq -0x30(%rbp), %rdi
movq %rdi, -0x50(%rbp)
callq 0x4b00
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x4ad0
jmp 0x1dc3
leaq -0x30(%rbp), %rdi
callq 0x2990
movq -0x48(%rbp), %rdi
addq $0x88, %rdi
movzbl -0xa(%rbp), %eax
movl %eax, %esi
callq 0x4b20
movq -0x48(%rbp), %rdi
movq %rax, -0x60(%rbp)
addq $0x58, %rdi
callq 0x1d00
movq -0x60(%rbp), %rdi
movq %rax, %rsi
callq 0x4b40
movq -0x48(%rbp), %rdi
addq $0x70, %rdi
movzbl -0xa(%rbp), %eax
movl %eax, %esi
callq 0x4bd0
movq %rax, %rdi
movq -0x48(%rbp), %rax
movl 0x4(%rax), %esi
movl 0x8(%rax), %edx
callq 0x4bf0
movb -0xa(%rbp), %al
addb $0x1, %al
movb %al, -0xa(%rbp)
jmp 0x1d7a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x2990
jmp 0x1e4e
addq $0x60, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x11b0
nopw (%rax,%rax)
// File: lns[P]team-tactic-topic-model/./lda.cpp
// Function: LDA<unsigned int, unsigned int, unsigned char>::config(Prior const&, unsigned int)
void config(const Prior& p, uint32_t buffer_size)
	{
		prior = p;
		pct_log_a.make(buffer_size,log,prior.alpha);
		pct_log_b.make(buffer_size,log,prior.beta);
		pct_log_Nb.make(buffer_size,log,n_word*prior.beta);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rdx
movq %rdx, 0x50(%rax)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups 0x20(%rcx), %xmm2
movups 0x30(%rcx), %xmm3
movups %xmm3, 0x40(%rax)
movups %xmm2, 0x30(%rax)
movups %xmm1, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movq %rax, %rdi
addq $0xa0, %rdi
movl -0x14(%rbp), %esi
movsd 0x10(%rax), %xmm0
movq 0xd101(%rip), %rdx      # 0xefe0
movq %rdx, -0x28(%rbp)
callq 0x6b20
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rax
movq %rax, %rdi
addq $0xc0, %rdi
movl -0x14(%rbp), %esi
movsd 0x18(%rax), %xmm0
callq 0x6b20
movq -0x20(%rbp), %rax
movq %rax, %rdi
addq $0xe0, %rdi
movl -0x14(%rbp), %esi
movl 0x4(%rax), %ecx
cvtsi2sd %rcx, %xmm0
mulsd 0x18(%rax), %xmm0
movq 0xd0b4(%rip), %rdx      # 0xefe0
callq 0x6b20
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: lns[P]team-tactic-topic-model/./lda.cpp
// Function: LDA<unsigned int, unsigned int, unsigned char>::gibbs(bool)
void gibbs(bool first_run=false)
	{
		static vector<uint32_t> x;
		if(x.size()!=dat.size()) {
			x.clear();
			for(uint32_t d=0;d<dat.size();d++)
				x.push_back(d);
		}
		shuffle(&(x[0]),dat.size());
		for(uint32_t d=0;d<dat.size();d++)
			for(uint32_t i=0;i<dat[x[d]].size();i++)
				reassign(x[d],i,first_run);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpb $0x0, 0xd1b5(%rip)      # 0xf138
jne 0x1fc8
leaq 0xd1ac(%rip), %rdi      # 0xf138
callq 0x11d0
cmpl $0x0, %eax
je 0x1fc8
leaq 0xd183(%rip), %rdi      # 0xf120
callq 0x4b00
leaq 0x9e7(%rip), %rdi       # 0x2990
leaq 0xd170(%rip), %rsi      # 0xf120
leaq 0xd149(%rip), %rdx      # 0xf100
callq 0x10f0
leaq 0xd175(%rip), %rdi      # 0xf138
callq 0x10a0
leaq 0xd151(%rip), %rdi      # 0xf120
callq 0x6230
movq -0x20(%rbp), %rdi
movq %rax, -0x28(%rbp)
addq $0x58, %rdi
callq 0x1d00
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpq %rcx, %rax
je 0x2041
leaq 0xd128(%rip), %rdi      # 0xf120
callq 0x6c20
movl $0x0, -0x10(%rbp)
movq -0x20(%rbp), %rdi
movl -0x10(%rbp), %eax
movq %rax, -0x30(%rbp)
addq $0x58, %rdi
callq 0x1d00
movq %rax, %rcx
movq -0x30(%rbp), %rax
cmpq %rcx, %rax
jae 0x203f
leaq 0xd0f5(%rip), %rdi      # 0xf120
leaq -0x10(%rbp), %rsi
callq 0x6c40
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x2004
jmp 0x2041
leaq 0xd0d8(%rip), %rdi      # 0xf120
xorl %eax, %eax
movl %eax, %esi
callq 0x6d40
movq -0x20(%rbp), %rdi
movq %rax, -0x38(%rbp)
addq $0x58, %rdi
callq 0x1d00
movq -0x38(%rbp), %rdi
movl %eax, %esi
callq 0x6cb0
movl $0x0, -0x14(%rbp)
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %eax
movq %rax, -0x40(%rbp)
addq $0x58, %rdi
callq 0x1d00
movq %rax, %rcx
movq -0x40(%rbp), %rax
cmpq %rcx, %rax
jae 0x2126
movl $0x0, -0x18(%rbp)
movq -0x20(%rbp), %rax
movl -0x18(%rbp), %ecx
movq %rcx, -0x48(%rbp)
addq $0x58, %rax
movq %rax, -0x50(%rbp)
movl -0x14(%rbp), %eax
movl %eax, %esi
leaq 0xd062(%rip), %rdi      # 0xf120
callq 0x6d40
movq -0x50(%rbp), %rdi
movl (%rax), %eax
movl %eax, %esi
callq 0x36d0
movq %rax, %rdi
callq 0x4700
movq %rax, %rcx
movq -0x48(%rbp), %rax
cmpq %rcx, %rax
jae 0x2116
movl -0x14(%rbp), %eax
movl %eax, %esi
leaq 0xd030(%rip), %rdi      # 0xf120
callq 0x6d40
movq -0x20(%rbp), %rdi
movl (%rax), %esi
movl -0x18(%rbp), %edx
movb -0x9(%rbp), %al
andb $0x1, %al
movzbl %al, %ecx
callq 0x6d60
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x209f
jmp 0x2118
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2074
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: lns[P]team-tactic-topic-model/./lda.cpp
// Function: LDA<unsigned int, unsigned int, unsigned char>::output_topics(_IO_FILE*)
void output_topics(FILE* fo)
	{
		for(topic_t k=0;k<topic.size();k++) {
			for(word_t w=0;w<n_word-1;w++)
				fprintf(fo,"%u\t",topic[k].c[w]);
			fprintf(fo,"%u\n",topic[k].c[n_word-1]);
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movb $0x0, -0x11(%rbp)
movq -0x20(%rbp), %rdi
movzbl -0x11(%rbp), %eax
movq %rax, -0x28(%rbp)
addq $0x70, %rdi
callq 0x1e60
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpq %rcx, %rax
jae 0x2218
movl $0x0, -0x18(%rbp)
movq -0x20(%rbp), %rcx
movl -0x18(%rbp), %eax
movl 0x4(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jae 0x21cb
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
addq $0x70, %rdi
movzbl -0x11(%rbp), %eax
movl %eax, %esi
callq 0x4bd0
movq -0x30(%rbp), %rdi
movq 0x8(%rax), %rax
movl -0x18(%rbp), %ecx
movl (%rax,%rcx,4), %edx
leaq 0x8071(%rip), %rsi      # 0xa22a
movb $0x0, %al
callq 0x1170
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x2178
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
addq $0x70, %rdi
movzbl -0x11(%rbp), %eax
movl %eax, %esi
callq 0x4bd0
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %rdi
movq 0x8(%rax), %rax
movl 0x4(%rcx), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %edx
leaq 0x7fbd(%rip), %rsi      # 0xa1c1
movb $0x0, %al
callq 0x1170
movb -0x11(%rbp), %al
addb $0x1, %al
movb %al, -0x11(%rbp)
jmp 0x214c
addq $0x40, %rsp
popq %rbp
retq
nop
// File: lns[P]team-tactic-topic-model/./lda.cpp
// Function: LDA<unsigned int, unsigned int, unsigned char>::output_positions(_IO_FILE*)
void output_positions(FILE* fo)
	{
		double kappa0 = prior.kappa0;
		double mu0_x = prior.mu0_x;
		double mu0_y = prior.mu0_y;
		for(topic_t k=0;k<topic.size();k++) {
			for(player_t p=0;p<n_player;p++) {
				uint32_t n = topic[k].n[p];
				fprintf(fo,"%le\t%le",
						(kappa0*mu0_x+topic[k].x[p])/(kappa0+n),
						(kappa0*mu0_y+topic[k].y[p])/(kappa0+n));
				if(p!=n_player-1)
					fprintf(fo,"\t");
				else
					fprintf(fo,"\n");
			}
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movsd 0x30(%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
movsd 0x20(%rax), %xmm0
movsd %xmm0, -0x20(%rbp)
movsd 0x28(%rax), %xmm0
movsd %xmm0, -0x28(%rbp)
movb $0x0, -0x29(%rbp)
movq -0x40(%rbp), %rdi
movzbl -0x29(%rbp), %eax
movq %rax, -0x48(%rbp)
addq $0x70, %rdi
callq 0x1e60
movq %rax, %rcx
movq -0x48(%rbp), %rax
cmpq %rcx, %rax
jae 0x23e6
movl $0x0, -0x30(%rbp)
movq -0x40(%rbp), %rcx
movl -0x30(%rbp), %eax
cmpl 0x8(%rcx), %eax
jae 0x23d7
movq -0x40(%rbp), %rdi
addq $0x70, %rdi
movq %rdi, -0x70(%rbp)
movzbl -0x29(%rbp), %eax
movl %eax, %esi
callq 0x4bd0
movq -0x70(%rbp), %rdi
movq 0x10(%rax), %rax
movl -0x30(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x80(%rbp)
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
movzbl -0x29(%rbp), %eax
movl %eax, %esi
callq 0x4bd0
movsd -0x80(%rbp), %xmm0
movsd -0x78(%rbp), %xmm2
movq -0x70(%rbp), %rdi
movq 0x18(%rax), %rax
movl -0x30(%rbp), %ecx
movss (%rax,%rcx,4), %xmm1
cvtss2sd %xmm1, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd -0x18(%rbp), %xmm1
movsd %xmm1, -0x68(%rbp)
movl -0x34(%rbp), %eax
cvtsi2sd %rax, %xmm2
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rbp)
movsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x60(%rbp)
movzbl -0x29(%rbp), %eax
movl %eax, %esi
callq 0x4bd0
movsd -0x68(%rbp), %xmm1
movsd -0x60(%rbp), %xmm3
movq -0x58(%rbp), %rdi
movsd -0x50(%rbp), %xmm0
movq 0x20(%rax), %rax
movl -0x30(%rbp), %ecx
movss (%rax,%rcx,4), %xmm2
cvtss2sd %xmm2, %xmm2
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
movsd -0x18(%rbp), %xmm2
movl -0x34(%rbp), %eax
cvtsi2sd %rax, %xmm3
addsd %xmm3, %xmm2
divsd %xmm2, %xmm1
leaq 0x7ea5(%rip), %rsi      # 0xa22e
movb $0x2, %al
callq 0x1170
movq -0x40(%rbp), %rcx
movl -0x30(%rbp), %eax
movl 0x8(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
je 0x23b5
movq -0x10(%rbp), %rdi
leaq 0x7e80(%rip), %rsi      # 0xa22c
movb $0x0, %al
callq 0x1170
jmp 0x23c7
movq -0x10(%rbp), %rdi
leaq 0x7dcc(%rip), %rsi      # 0xa18c
movb $0x0, %al
callq 0x1170
jmp 0x23c9
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x2289
jmp 0x23d9
movb -0x29(%rbp), %al
addb $0x1, %al
movb %al, -0x29(%rbp)
jmp 0x225d
addq $0x80, %rsp
popq %rbp
retq
nop
// File: lns[P]team-tactic-topic-model/./lda.cpp
// Function: LDA<unsigned int, unsigned int, unsigned char>::output_assignments(_IO_FILE*)
void output_assignments(FILE* fo)
	{
		for(uint32_t d=0;d<dat.size();d++) {
			for(uint32_t i=0;i<dat[d].size()-1;i++)
				fprintf(fo,"%u ",dat[d][i].z);
			fprintf(fo,"%u\n",dat[d][dat[d].size()-1].z);
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %eax
movq %rax, -0x28(%rbp)
addq $0x58, %rdi
callq 0x1d00
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpq %rcx, %rax
jae 0x251f
movl $0x0, -0x18(%rbp)
movq -0x20(%rbp), %rdi
movl -0x18(%rbp), %eax
movq %rax, -0x30(%rbp)
addq $0x58, %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0x36d0
movq %rax, %rdi
callq 0x4700
movq %rax, %rcx
movq -0x30(%rbp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x24b3
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
addq $0x58, %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0x36d0
movq %rax, %rdi
movl -0x18(%rbp), %eax
movl %eax, %esi
callq 0x8290
movq -0x38(%rbp), %rdi
movzbl 0x8(%rax), %edx
leaq 0x7d95(%rip), %rsi      # 0xa236
movb $0x0, %al
callq 0x1170
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x243a
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
addq $0x58, %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0x36d0
movq -0x20(%rbp), %rdi
movq %rax, -0x48(%rbp)
addq $0x58, %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0x36d0
movq %rax, %rdi
callq 0x4700
movq -0x48(%rbp), %rdi
movq %rax, %rsi
subq $0x1, %rsi
callq 0x8290
movq -0x40(%rbp), %rdi
movzbl 0x8(%rax), %edx
leaq 0x7cb7(%rip), %rsi      # 0xa1c1
movb $0x0, %al
callq 0x1170
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x240f
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: lns[P]team-tactic-topic-model/./lda.cpp
// Function: LDA<unsigned int, unsigned int, unsigned char>::output_theta(_IO_FILE*)
void output_theta(FILE* fo)
	{
		for(uint32_t d=0;d<dat.size();d++) {
			for(topic_t k=0;k<topic.size()-1;k++)
				fprintf(fo,"%u\t",theta[k][d]);
			fprintf(fo,"%u\n",theta[topic.size()-1][d]);
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %eax
movq %rax, -0x28(%rbp)
addq $0x58, %rdi
callq 0x1d00
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpq %rcx, %rax
jae 0x2646
movb $0x0, -0x15(%rbp)
movq -0x20(%rbp), %rdi
movzbl -0x15(%rbp), %eax
movq %rax, -0x30(%rbp)
addq $0x70, %rdi
callq 0x1e60
movq %rax, %rcx
movq -0x30(%rbp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x25e5
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
addq $0x88, %rdi
movzbl -0x15(%rbp), %eax
movl %eax, %esi
callq 0x4b20
movq %rax, %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0x6d40
movq -0x38(%rbp), %rdi
movl (%rax), %edx
leaq 0x7c56(%rip), %rsi      # 0xa22a
movb $0x0, %al
callq 0x1170
movb -0x15(%rbp), %al
addb $0x1, %al
movb %al, -0x15(%rbp)
jmp 0x2577
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq %rdi, %rax
addq $0x88, %rax
movq %rax, -0x48(%rbp)
addq $0x70, %rdi
callq 0x1e60
movq -0x48(%rbp), %rdi
movq %rax, %rsi
subq $0x1, %rsi
callq 0x4b20
movq %rax, %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0x6d40
movq -0x40(%rbp), %rdi
movl (%rax), %edx
leaq 0x7b90(%rip), %rsi      # 0xa1c1
movb $0x0, %al
callq 0x1170
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x254f
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: lns[P]team-tactic-topic-model/./lda.cpp
// Function: Topic::destroy()
void destroy()
	{
		delete[] c;
		delete[] n;
		delete[] x;
		delete[] y;
		delete[] xx;
		delete[] xy;
		delete[] yy;
		memset(this,0,sizeof(*this));
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0x2dfb
movq -0x10(%rbp), %rdi
callq 0x1150
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x2e16
movq -0x20(%rbp), %rdi
callq 0x1150
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x2e31
movq -0x28(%rbp), %rdi
callq 0x1150
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0x2e4c
movq -0x30(%rbp), %rdi
callq 0x1150
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x2e67
movq -0x38(%rbp), %rdi
callq 0x1150
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
je 0x2e82
movq -0x40(%rbp), %rdi
callq 0x1150
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, %rax
je 0x2e9d
movq -0x48(%rbp), %rdi
callq 0x1150
movq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0x40, %edx
callq 0x1090
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: lns[P]team-tactic-topic-model/./lda.cpp
// Function: Topic::make(unsigned int, unsigned int)
void make(uint32_t n_word, uint32_t n_player)
	{
		destroy();
		c_sum = 0;
		c = new uint32_t[n_word]();
		n = new uint32_t[n_player]();
		x = new float[n_player]();
		y = new float[n_player]();
		xx= new float[n_player]();
		xy= new float[n_player]();
		yy= new float[n_player]();
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
callq 0x2dd0
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
movl -0xc(%rbp), %eax
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
movq %rdi, -0x88(%rbp)
callq 0x1030
movq -0x88(%rbp), %rdx
movq %rax, %rdi
movq %rdi, -0x80(%rbp)
xorl %esi, %esi
callq 0x1090
movq -0x80(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0x10(%rbp), %eax
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
movq %rdi, -0x78(%rbp)
callq 0x1030
movq -0x78(%rbp), %rdx
movq %rax, %rdi
movq %rdi, -0x70(%rbp)
xorl %esi, %esi
callq 0x1090
movq -0x70(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movl -0x10(%rbp), %eax
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
movq %rdi, -0x68(%rbp)
callq 0x1030
movq -0x68(%rbp), %rdx
movq %rax, %rdi
movq %rdi, -0x60(%rbp)
xorl %esi, %esi
callq 0x1090
movq -0x60(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movl -0x10(%rbp), %eax
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
movq %rdi, -0x58(%rbp)
callq 0x1030
movq -0x58(%rbp), %rdx
movq %rax, %rdi
movq %rdi, -0x50(%rbp)
xorl %esi, %esi
callq 0x1090
movq -0x50(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movl -0x10(%rbp), %eax
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
movq %rdi, -0x48(%rbp)
callq 0x1030
movq -0x48(%rbp), %rdx
movq %rax, %rdi
movq %rdi, -0x40(%rbp)
xorl %esi, %esi
callq 0x1090
movq -0x40(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x28(%rax)
movl -0x10(%rbp), %eax
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
movq %rdi, -0x38(%rbp)
callq 0x1030
movq -0x38(%rbp), %rdx
movq %rax, %rdi
movq %rdi, -0x30(%rbp)
xorl %esi, %esi
callq 0x1090
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x30(%rax)
movl -0x10(%rbp), %eax
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
movq %rdi, -0x28(%rbp)
callq 0x1030
movq -0x28(%rbp), %rdx
movq %rax, %rdi
movq %rdi, -0x20(%rbp)
xorl %esi, %esi
callq 0x1090
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x38(%rax)
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: lns[P]team-tactic-topic-model/./pct.cpp
// Function: PCT::make(unsigned int, double (*)(double), double)
void make(uint32_t _len, double (*_func)(double), double _delta)
	{
		len = _len;
		func = _func;
		delta = _delta;
		destroy();
		x = new double[len];
		for(uint32_t i=0;i<len;i++)
			x[i] = i + delta;
		for(uint32_t i=0;i<len;i++)
			x[i] = func(x[i]);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movsd %xmm0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movl -0xc(%rbp), %eax
movl %eax, (%rdi)
movq -0x18(%rbp), %rax
movq %rax, 0x8(%rdi)
movsd -0x20(%rbp), %xmm0
movsd %xmm0, 0x10(%rdi)
callq 0x2810
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x1030
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x18(%rax)
movl $0x0, -0x24(%rbp)
movq -0x30(%rbp), %rcx
movl -0x24(%rbp), %eax
cmpl (%rcx), %eax
jae 0x6bc8
movq -0x30(%rbp), %rax
movl -0x24(%rbp), %ecx
cvtsi2sd %rcx, %xmm0
addsd 0x10(%rax), %xmm0
movq 0x18(%rax), %rax
movl -0x24(%rbp), %ecx
movsd %xmm0, (%rax,%rcx,8)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x6b95
movl $0x0, -0x28(%rbp)
movq -0x30(%rbp), %rcx
movl -0x28(%rbp), %eax
cmpl (%rcx), %eax
jae 0x6c0b
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rax
movq 0x18(%rcx), %rcx
movl -0x28(%rbp), %edx
movsd (%rcx,%rdx,8), %xmm0
callq *%rax
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x28(%rbp), %ecx
movsd %xmm0, (%rax,%rcx,8)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x6bcf
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: lns[P]team-tactic-topic-model/./rng.cpp
// Function: void shuffle<unsigned int>(unsigned int*, unsigned int)
void shuffle(T* x, uint32_t len)
{
	for(uint32_t i=0;i<len-1;i++)
	{
		uint32_t j = i+lcg64()%(len-1-i);
		// swap x[i] & x[j]
		T t = x[i];
		x[i] = x[j];
		x[j] = t;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jae 0x6d32
movl -0x10(%rbp), %eax
movq %rax, -0x20(%rbp)
callq 0x81c0
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
subl -0x10(%rbp), %ecx
movl %ecx, %ecx
xorl %edx, %edx
divq %rcx
movq -0x20(%rbp), %rax
addq %rdx, %rax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
movl (%rax,%rcx,4), %edx
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
movl -0x18(%rbp), %edx
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x6cc6
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: lns[P]team-tactic-topic-model/./rng.cpp
// Function: lcg64()
inline uint64_t lcg64(void)
{
	uint64_t * const r = &__lcg64_r;
	const uint64_t a = A_Default;
	const uint64_t b = 1;
	(*r) = ((*r)*a + b);
	return (*r);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x6f4d(%rip), %rax      # 0xf118
movq %rax, -0x8(%rbp)
movabsq $-0x42e60443a3f800b, %rax # imm = 0xFBD19FBBC5C07FF5
movq %rax, -0x10(%rbp)
movq $0x1, -0x18(%rbp)
movabsq $-0x42e60443a3f800b, %rax # imm = 0xFBD19FBBC5C07FF5
imulq 0x6f21(%rip), %rax      # 0xf118
addq $0x1, %rax
movq %rax, 0x6f16(%rip)      # 0xf118
movq 0x6f0f(%rip), %rax      # 0xf118
popq %rbp
retq
nopl (%rax,%rax)
// File: lns[P]team-tactic-topic-model/./rng.cpp
// Function: void prop_exp<double>(double*, unsigned int)
inline void prop_exp(T* x, uint32_t len)
{
	T mean = 0;
	for(uint32_t i=0;i<len;i++)
		if(std::isfinite(x[i]))
			mean += x[i];
	mean /= len;
	for(uint32_t i=0;i<len;i++)
		x[i] = exp(x[i]-mean);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jae 0x8420
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
movsd (%rax,%rcx,8), %xmm0
callq 0x90b0
testb $0x1, %al
jne 0x83fd
jmp 0x8413
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
movsd (%rax,%rcx,8), %xmm0
addsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x18(%rbp)
jmp 0x8415
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x83de
movl -0xc(%rbp), %eax
cvtsi2sd %rax, %xmm1
movsd -0x18(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0xc(%rbp), %eax
jae 0x8472
movq -0x8(%rbp), %rax
movl -0x20(%rbp), %ecx
movsd (%rax,%rcx,8), %xmm0
subsd -0x18(%rbp), %xmm0
callq 0x11c0
movq -0x8(%rbp), %rax
movl -0x20(%rbp), %ecx
movsd %xmm0, (%rax,%rcx,8)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x843d
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: wenzhelu[P]RUDP/main.cpp
// Function: main
int main(int argc, const char **argv) {
    RUDP protocol;
//    protocol.sender->send("/Users/wenzhelu/doc/SP2018/hw2.tar.gz");
//    protocol.sender->send("/Users/wenzhelu/vimrc_bak");
//    protocol.sender->send("/Users/wenzhelu/doc/manuals/bash.pdf");
    protocol.init(100000000, "6666", "144.202.116.155", "6666");
    protocol.sender->send("./bash.pdf");
    while(1);
    return 1;
//#endif
    
//    
//        using namespace std;
//        cout << "usage:\n ./rudp local_port remote_ip remote_port" << endl;
//    }
//    protocol.init(30000, argv[1], argv[2], argv[3]);
//
//    // until now the protocol have nothing to do,
//    // we have to make it send something
////    string s = "aaaaaaa";
////    protocol.sender->send(s.data(), 7);
//    while (1);
//
////    protocol.shutdown();
////    protocol.cleanUp();
//
//    return 0;
    // all send tasks done, shutdown
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x670, %rsp            # imm = 0x670
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x658(%rbp), %rdi
movq %rdi, -0x670(%rbp)
callq 0x2620
movq -0x670(%rbp), %rdi
leaq 0x5a4f(%rip), %rcx      # 0x8009
leaq 0x5a43(%rip), %r8       # 0x8004
movl $0x5f5e100, %esi        # imm = 0x5F5E100
movq %r8, %rdx
callq 0x4430
jmp 0x25d0
movq -0x48(%rbp), %rdi
leaq 0x5a3e(%rip), %rsi      # 0x8019
callq 0x5840
jmp 0x25e2
jmp 0x25e4
jmp 0x25e6
jmp 0x25e4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x660(%rbp)
movl %eax, -0x664(%rbp)
leaq -0x658(%rbp), %rdi
callq 0x2640
movq -0x660(%rbp), %rdi
callq 0x23a0
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: wenzhelu[P]RUDP/Listener.cpp
// Function: Listener::update(unsigned int)
void Listener::update(unsigned int ack)
{
    if(master->status==statusEnum::SLOW_START)
    {
        //        master->slowStartNum++;
        if(ack==master->sendBase)
        {
            this->duplicateACK+=1;
            if(this->duplicateACK==3)
                this->fastRecovery();
        }
        else
        {
            this->index(ack);
            if(master->cWnd>=master->throughput)
                master->status=statusEnum::CONG_AVOID;
        }
    }
    else if(master->status==statusEnum::FAST_REC)
    {
        if(ack==master->sendBase)
            ;
        else
        {
            
            master->status=statusEnum::CONG_AVOID;
            this->linear(ack);
        }
        
    }
    else
    {
        //        master->congestNum++;
        if(ack==master->sendBase)
        {
            this->duplicateACK+=1;
            if(this->duplicateACK==3)
                this->fastRecovery();
        }
        else
        {
            this->linear(ack);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0x20(%rax), %rax
cmpl $0x0, 0xc(%rax)
jne 0x329e
movq -0x18(%rbp), %rcx
movl -0xc(%rbp), %eax
movq 0x20(%rcx), %rcx
cmpl (%rcx), %eax
jne 0x326b
movq -0x18(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
cmpl $0x3, (%rax)
jne 0x3269
movq -0x18(%rbp), %rdi
callq 0x3320
jmp 0x329c
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x3370
movq -0x18(%rbp), %rcx
movq 0x20(%rcx), %rax
movl 0x10(%rax), %eax
movq 0x20(%rcx), %rcx
cmpl 0x8(%rcx), %eax
jb 0x329a
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movl $0x2, 0xc(%rax)
jmp 0x329c
jmp 0x3310
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
cmpl $0x1, 0xc(%rax)
jne 0x32d6
movq -0x18(%rbp), %rcx
movl -0xc(%rbp), %eax
movq 0x20(%rcx), %rcx
cmpl (%rcx), %eax
jne 0x32bd
jmp 0x32d4
movq -0x18(%rbp), %rdi
movq 0x20(%rdi), %rax
movl $0x2, 0xc(%rax)
movl -0xc(%rbp), %esi
callq 0x33d0
jmp 0x330e
movq -0x18(%rbp), %rcx
movl -0xc(%rbp), %eax
movq 0x20(%rcx), %rcx
cmpl (%rcx), %eax
jne 0x3300
movq -0x18(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
cmpl $0x3, (%rax)
jne 0x32fe
movq -0x18(%rbp), %rdi
callq 0x3320
jmp 0x330c
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x33d0
jmp 0x330e
jmp 0x3310
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: wenzhelu[P]RUDP/Listener.cpp
// Function: Listener::fastRecovery()
void Listener::fastRecovery()
{
    this->duplicateACK=0;
    master->throughput=master->cWnd/2;
    master->cWnd=master->throughput;
    master->status=statusEnum::FAST_REC;
    master->sender->resend = true;
    debug_print("Duplicate ACK happens\n", nullptr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
movq 0x20(%rax), %rcx
movl 0x10(%rcx), %edx
shrl %edx
movq 0x20(%rax), %rcx
movl %edx, 0x8(%rcx)
movq 0x20(%rax), %rcx
movl 0x8(%rcx), %edx
movq 0x20(%rax), %rcx
movl %edx, 0x10(%rcx)
movq 0x20(%rax), %rcx
movl $0x1, 0xc(%rcx)
movq 0x20(%rax), %rax
movq 0x610(%rax), %rax
movb $0x1, 0x39(%rax)
jmp 0x336c
popq %rbp
retq
nop
// File: wenzhelu[P]RUDP/Listener.cpp
// Function: Listener::index(unsigned int)
void Listener::index(unsigned int ack)
{
    master->cWnd+=(ack-master->sendBase);
    if(master->cWnd>master->winSize)
        master->cWnd=master->winSize;
    master->sendBase=ack;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movl -0xc(%rbp), %edx
movq 0x20(%rcx), %rax
subl (%rax), %edx
movq 0x20(%rcx), %rax
addl 0x10(%rax), %edx
movl %edx, 0x10(%rax)
movq 0x20(%rcx), %rax
movl 0x10(%rax), %eax
movq 0x20(%rcx), %rcx
cmpl 0x4(%rcx), %eax
jbe 0x33b8
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rcx
movl 0x4(%rcx), %ecx
movq 0x20(%rax), %rax
movl %ecx, 0x10(%rax)
movq -0x18(%rbp), %rax
movl -0xc(%rbp), %ecx
movq 0x20(%rax), %rax
movl %ecx, (%rax)
popq %rbp
retq
nopw (%rax,%rax)
// File: wenzhelu[P]RUDP/Listener.cpp
// Function: Listener::linear(unsigned int)
void Listener::linear(unsigned int ack)
{
    this->ACKcwnd+=(ack-master->sendBase);
    master->cWnd+=(ACKcwnd*master->PACKET_SIZE)/master->cWnd;
    if(master->cWnd>master->winSize)
        master->cWnd=master->winSize;
    this->ACKcwnd=0;
    master->sendBase=ack;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movl -0xc(%rbp), %eax
movq 0x20(%rcx), %rdx
subl (%rdx), %eax
addl 0x4(%rcx), %eax
movl %eax, 0x4(%rcx)
imull $0x5b4, 0x4(%rcx), %eax # imm = 0x5B4
movq 0x20(%rcx), %rsi
xorl %edx, %edx
divl 0x10(%rsi)
movl %eax, %edx
movq 0x20(%rcx), %rax
addl 0x10(%rax), %edx
movl %edx, 0x10(%rax)
movq 0x20(%rcx), %rax
movl 0x10(%rax), %eax
movq 0x20(%rcx), %rcx
cmpl 0x4(%rcx), %eax
jbe 0x3430
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rcx
movl 0x4(%rcx), %ecx
movq 0x20(%rax), %rax
movl %ecx, 0x10(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x4(%rax)
movl -0xc(%rbp), %ecx
movq 0x20(%rax), %rax
movl %ecx, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: wenzhelu[P]RUDP/RUDP.cpp
// Function: RUDP::shutdown()
void RUDP::shutdown() {
    // stop protocol running
    close = true;
    th_sender->join();
    th_listener->join();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movb $0x1, 0x620(%rax)
movq 0x638(%rax), %rdi
callq 0x2390
movq -0x10(%rbp), %rax
movq 0x630(%rax), %rdi
callq 0x2390
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: wenzhelu[P]RUDP/RUDP.cpp
// Function: RUDP::cleanUp()
void RUDP::cleanUp() {
    // release resources like socket and heap memory
    sock->closeSock();
    delete th_listener;
    delete th_sender;
    delete sender;
    delete listener;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0x628(%rax), %rdi
callq 0x6fd0
movq -0x18(%rbp), %rax
movq 0x630(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0x4727
movq -0x10(%rbp), %rdi
callq 0x4940
movq -0x10(%rbp), %rdi
callq 0x2220
movq -0x18(%rbp), %rax
movq 0x638(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x474e
movq -0x20(%rbp), %rdi
callq 0x4940
movq -0x20(%rbp), %rdi
callq 0x2220
movq -0x18(%rbp), %rax
movq 0x610(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x476c
movq -0x28(%rbp), %rdi
callq 0x2220
movq -0x18(%rbp), %rax
movq 0x618(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0x478a
movq -0x30(%rbp), %rdi
callq 0x2220
addq $0x30, %rsp
popq %rbp
retq
// File: wenzhelu[P]RUDP/sender.cpp
// Function: Sender::beginTask()
void Sender::beginTask() {
    diff = master->sendBase;
    curPtr = master->sendBase;
    timerBase = master->sendBase;
    sendTime = system_clock::now();
    th_timer = new thread(&Sender::timing, this);
    pending = true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq 0x48(%rax), %rcx
movl (%rcx), %ecx
movl %ecx, 0x40(%rax)
movq 0x48(%rax), %rcx
movl (%rcx), %ecx
movl %ecx, 0x3c(%rax)
movq 0x48(%rax), %rcx
movl (%rcx), %ecx
movl %ecx, 0x58(%rax)
callq 0x2060
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, 0x60(%rax)
movl $0x8, %edi
callq 0x2250
movq %rax, %rdi
movq -0x48(%rbp), %rax
movq %rdi, %rcx
movq %rcx, -0x40(%rbp)
leaq 0x5a(%rip), %rcx        # 0x5680
movq %rcx, -0x20(%rbp)
movq $0x0, -0x18(%rbp)
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rsi
leaq -0x28(%rbp), %rdx
callq 0x5e30
jmp 0x5645
movq -0x48(%rbp), %rax
movq -0x40(%rbp), %rcx
movq %rcx, 0x50(%rax)
movb $0x1, 0x38(%rax)
addq $0x50, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x2220
movq -0x30(%rbp), %rdi
callq 0x23a0
nopl (%rax)
// File: wenzhelu[P]RUDP/sender.cpp
// Function: Sender::timing()
void Sender::timing() {
    // timer loop in this function
    while (pending) {
        tp cur = system_clock::now();
        if (getDurMs(sendTime, cur) >= master->TimeOut) {
            // time to check sendBase
            // aggressive mode:
            // set up a begin send time before sending the file
            // then every send time later on is set by timer.
            // we continuously check timerBase and sendBase every RTT
            // if sendBase larger than sendBase, we have a time out.
            // Why called aggressive mode? we make timer very active and
            // not rely on "send" behavior to avoid stuck in sending.
//            debug_print("timerBase: %u, sendBase: %u\n", timerBase, master->sendBase);
            if (timerBase >= master->sendBase) {
                // data loss timeout!
                master->status = SLOW_START;
                master->throughput = master->cWnd >> 1;
                master->cWnd = RUDP::PACKET_SIZE;
//                debug_print("Timeout! Send base: %u, cWnd: %u, throughput: %u\n", master->sendBase, master->cWnd, master->throughput);
                resend = true;
            } else {
                timerBase = master->sendBase;
                sendTime = cur;
            }
        }
        this_thread::sleep_for(milliseconds(master->TimeOut)); // experimental sleep time
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
testb $0x1, 0x38(%rax)
je 0x5745
callq 0x2060
movq -0x20(%rbp), %rdi
movq %rax, -0x10(%rbp)
movq %rdi, %rsi
addq $0x60, %rsi
leaq -0x10(%rbp), %rdx
callq 0x5580
movq -0x20(%rbp), %rcx
movq 0x48(%rcx), %rcx
cmpl 0x18(%rcx), %eax
jb 0x5722
movq -0x20(%rbp), %rcx
movl 0x58(%rcx), %eax
movq 0x48(%rcx), %rcx
cmpl (%rcx), %eax
jb 0x570b
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rcx
movl $0x0, 0xc(%rcx)
movq 0x48(%rax), %rcx
movl 0x10(%rcx), %edx
shrl %edx
movq 0x48(%rax), %rcx
movl %edx, 0x8(%rcx)
movq 0x48(%rax), %rcx
movl $0x5b4, 0x10(%rcx)      # imm = 0x5B4
movb $0x1, 0x39(%rax)
jmp 0x5720
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rcx
movl (%rcx), %ecx
movl %ecx, 0x58(%rax)
movq -0x10(%rbp), %rcx
movq %rcx, 0x60(%rax)
jmp 0x5722
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rsi
addq $0x18, %rsi
leaq -0x18(%rbp), %rdi
callq 0x5f30
leaq -0x18(%rbp), %rdi
callq 0x3470
jmp 0x5694
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: wenzhelu[P]RUDP/sender.cpp
// Function: Sender::endTask()
void Sender::endTask() {
    // all buffer received
    // no data pending to send
    // unlock busy
    pending = false;
    delete [] userBuff;
    userBuff = nullptr;
    userDataLen = 0;
    diff = 0;
    master->startTimes.clear();
    th_timer->join();   // must wait for thread ends before deleting
    delete th_timer;
    // sending finish signal
    master->setDataBit(0);
    master->setFinBit(1);
    master->sock->write(master->buff, RUDP::PACKET_SIZE);
    master->setFinBit(0);
    busy.unlock();
    debug_print("send one file end\n", nullptr);
    debug_print("RTT: %u\n, slow start packets: %u, congestion avoidance packets: %u\n", master->RTT, master->slowStartNum, master->congestNum);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movb $0x0, 0x38(%rax)
movq (%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0x577e
movq -0x10(%rbp), %rdi
callq 0x22d0
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movl $0x0, 0x8(%rax)
movl $0x0, 0x40(%rax)
movq 0x48(%rax), %rdi
addq $0x20, %rdi
callq 0x5ef0
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0x2390
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x57d5
movq -0x20(%rbp), %rdi
callq 0x4940
movq -0x20(%rbp), %rdi
callq 0x2220
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rdi
xorl %esi, %esi
callq 0x4300
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rdi
movl $0x1, %esi
callq 0x4390
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rcx
movq 0x628(%rcx), %rdi
movq 0x48(%rax), %rsi
addq $0x50, %rsi
movl $0x5b4, %edx            # imm = 0x5B4
callq 0x6f70
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rdi
xorl %esi, %esi
callq 0x4390
movq -0x18(%rbp), %rdi
addq $0x10, %rdi
callq 0x5f10
jmp 0x5835
jmp 0x5837
jmp 0x5839
addq $0x20, %rsp
popq %rbp
retq
nop
// File: wenzhelu[P]RUDP/sender.cpp
// Function: Sender::send(char const*)
void Sender::send(const char *file) {
    busy.lock();
    std::fstream fs(file);
    struct stat st;
    stat(file, &st);
    userBuff = new char[st.st_size];
    size_t pt = 0;

    while (fs.good()) {
        fs.read(userBuff + pt, 4096);
        pt += fs.gcount();
    }

    if (!fs.eof())
        std::cout << "read file error" << std::endl;

    userDataLen = st.st_size;
    fs.close();
    
    // after data copying
    beginTask();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x300, %rsp            # imm = 0x300
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x2e0(%rbp)
addq $0x10, %rdi
callq 0x5f50
movq -0x10(%rbp), %rax
movq %rax, -0x2d8(%rbp)
movl $0x8, %edi
movl $0x10, %esi
callq 0x3450
movq -0x2d8(%rbp), %rsi
movl %eax, %edx
leaq -0x220(%rbp), %rdi
callq 0x22f0
movq -0x10(%rbp), %rdi
leaq -0x2b0(%rbp), %rsi
callq 0x21f0
movq -0x280(%rbp), %rdi
testq %rdi, %rdi
movq $-0x1, %rax
cmovsq %rax, %rdi
callq 0x2030
movq %rax, -0x2d0(%rbp)
jmp 0x58c9
movq -0x2e0(%rbp), %rax
movq -0x2d0(%rbp), %rcx
movq %rcx, (%rax)
movq $0x0, -0x2c8(%rbp)
movq -0x220(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x220(%rbp,%rax), %rdi
callq 0x2380
movb %al, -0x2e1(%rbp)
jmp 0x5905
movb -0x2e1(%rbp), %al
testb $0x1, %al
jne 0x5911
jmp 0x5987
movq -0x2e0(%rbp), %rax
movq (%rax), %rsi
movq -0x2c8(%rbp), %rax
addq %rax, %rsi
leaq -0x220(%rbp), %rdi
movl $0x1000, %edx           # imm = 0x1000
callq 0x22c0
jmp 0x5938
leaq -0x220(%rbp), %rdi
callq 0x23f0
movq %rax, -0x2f0(%rbp)
jmp 0x594d
movq -0x2f0(%rbp), %rax
addq -0x2c8(%rbp), %rax
movq %rax, -0x2c8(%rbp)
jmp 0x58e5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b8(%rbp)
movl %eax, -0x2bc(%rbp)
leaq -0x220(%rbp), %rdi
callq 0x20c0
jmp 0x5a27
movq -0x220(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x220(%rbp,%rax), %rdi
callq 0x23c0
movb %al, -0x2f1(%rbp)
jmp 0x59a7
movb -0x2f1(%rbp), %al
testb $0x1, %al
jne 0x59e6
jmp 0x59b3
movq 0x661e(%rip), %rdi      # 0xbfd8
leaq 0x2717(%rip), %rsi      # 0x80d8
callq 0x2240
movq %rax, -0x300(%rbp)
jmp 0x59cf
movq -0x300(%rbp), %rdi
movq 0x65e3(%rip), %rsi      # 0xbfc0
callq 0x2280
jmp 0x59e4
jmp 0x59e6
movq -0x2e0(%rbp), %rax
movl -0x280(%rbp), %ecx
movl %ecx, 0x8(%rax)
leaq -0x220(%rbp), %rdi
callq 0x2080
jmp 0x5a04
movq -0x2e0(%rbp), %rdi
callq 0x55c0
jmp 0x5a12
leaq -0x220(%rbp), %rdi
callq 0x20c0
addq $0x300, %rsp            # imm = 0x300
popq %rbp
retq
movq -0x2b8(%rbp), %rdi
callq 0x23a0
nopw %cs:(%rax,%rax)
// File: wenzhelu[P]RUDP/sender.cpp
// Function: Sender::send(char const*, unsigned long)
void Sender::send(const char *buffer, size_t len) {
    busy.lock();
    userBuff = new char[len];
    memcpy(userBuff, buffer, len);
    userDataLen = len;
    
    // after data copying
    beginTask();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
addq $0x10, %rdi
callq 0x5f50
movq -0x18(%rbp), %rdi
callq 0x2030
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x21d0
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movl %eax, 0x8(%rdi)
callq 0x55c0
addq $0x20, %rsp
popq %rbp
retq
nop
// File: wenzhelu[P]RUDP/UDPSock.cpp
// Function: Usock::init(char const*, char const*, char const*)
int Usock::init(const char *localPort, const char *remoteIp, const char *remotePort) {
    
    // init of the usock do three things:
    // 1.setup socket
    // 2.bind socket to certain port
    // 3.initialize remote information
    
    if ((socket_fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) {
        printf("socket setup error\n");
        return -1;
    }
    
    local.sin_addr.s_addr = INADDR_ANY;
    local.sin_family = AF_INET;
    local.sin_port = htons(atoi(localPort));
    if (bind(socket_fd, (struct sockaddr *) &local, sizeof(local)) < 0) {
        printf("server binding error\n");
        return -1;
    }
    
    remote.sin_addr.s_addr = inet_addr(remoteIp);
    remote.sin_family = AF_INET;
    remote.sin_port = htons(atoi(remotePort));
    
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x2, %esi
movl $0x11, %edx
movl %esi, %edi
callq 0x20d0
movq -0x30(%rbp), %rcx
movl %eax, (%rcx)
cmpl $0x0, %eax
jge 0x6e96
leaq 0x1266(%rip), %rdi      # 0x80e9
movb $0x0, %al
callq 0x2050
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6f27
movq -0x30(%rbp), %rax
movl $0x0, 0x8(%rax)
movw $0x2, 0x4(%rax)
movq -0x18(%rbp), %rdi
callq 0x2360
movzwl %ax, %edi
callq 0x2070
movq -0x30(%rbp), %rsi
movw %ax, 0x6(%rsi)
movl (%rsi), %edi
addq $0x4, %rsi
movl $0x10, %edx
callq 0x20a0
cmpl $0x0, %eax
jge 0x6eec
leaq 0x1221(%rip), %rdi      # 0x80fd
movb $0x0, %al
callq 0x2050
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6f27
movq -0x20(%rbp), %rdi
callq 0x2260
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x18(%rax)
movw $0x2, 0x14(%rax)
movq -0x28(%rbp), %rdi
callq 0x2360
movzwl %ax, %edi
callq 0x2070
movw %ax, %cx
movq -0x30(%rbp), %rax
movw %cx, 0x16(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: wenzhelu[P]RUDP/UDPSock.cpp
// Function: Usock::write(char*, unsigned long)
size_t Usock::write(char *buff, size_t len) {
    size_t written = sendto(socket_fd, buff, len, 0, (struct sockaddr *)&remote, sizeof(remote));
    if (written != len) {
        debug_print("write socket error\n", NULL);
    }
    return written;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %r8
movl (%r8), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
addq $0x14, %r8
xorl %ecx, %ecx
movl $0x10, %r9d
callq 0x2090
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0x6fb8
jmp 0x6fb4
jmp 0x6fb6
jmp 0x6fb8
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: eschwabe[P]interview-practice/src/zeromatrix.cpp
// Function: PropogateZeros(int**, int, int)
void PropogateZeros(int* matrix[], int M, int N) {
    bool* zrows = new bool[M];
    bool* zcols = new bool[N];
    for(int row = 0; row < M; row++) {
        for(int col = 0; col < N; col++) {
            if(matrix[row][col] == 0) {
                zrows[row] = true;
                zcols[col] = true;
            }
        }
    }

    // zero rows
    for(int row = 0; row < M; row++) {
        if(zrows[row]) {
            for(int col = 0; col < N; col++) {
                matrix[row][col] = 0;
            }
        }
    }

    // zero cols
    for(int col = 0; col < N; col++) {
        if(zcols[col]) {
            for(int row = 0; row < M; row++) {
                matrix[row][col] = 0;
            }
        }
    }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movslq -0xc(%rbp), %rdi
callq 0x1030
movq %rax, -0x18(%rbp)
movslq -0x10(%rbp), %rdi
callq 0x1030
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x1272
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x1265
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x28(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x1258
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
movb $0x1, (%rax,%rcx)
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
movb $0x1, (%rax,%rcx)
jmp 0x125a
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x1222
jmp 0x1267
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x1213
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x12cf
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
testb $0x1, (%rax,%rcx)
je 0x12c2
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x12c0
movq -0x8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x1296
jmp 0x12c2
jmp 0x12c4
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1279
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x132c
movq -0x20(%rbp), %rax
movslq -0x34(%rbp), %rcx
testb $0x1, (%rax,%rcx)
je 0x131f
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x131d
movq -0x8(%rbp), %rax
movslq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x34(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x12f3
jmp 0x131f
jmp 0x1321
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x12d6
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: eschwabe[P]interview-practice/src/zeromatrix.cpp
// Function: PrintMatrix(int**, int, int)
void PrintMatrix(int* matrix[], int M, int N) {
    for(int row = 0; row < M; row++) {
        for(int col = 0; col < N; col++) {
            cout << setw(3) << matrix[row][col] << " ";
        }
        cout << endl;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x13e6
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x13c5
movl $0x3, %edi
callq 0x14d0
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %esi
movq 0x2c4d(%rip), %rdi      # 0x3fd8
callq 0x1070
movq %rax, %rdi
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %esi
callq 0x1090
movq %rax, %rdi
leaq 0xc4f(%rip), %rsi       # 0x2004
callq 0x1050
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x136c
movq 0x2c0c(%rip), %rdi      # 0x3fd8
movq 0x2bf5(%rip), %rsi      # 0x3fc8
callq 0x1060
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1359
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)