LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/hansvanstaveren[P]BigDeal/collect.c
// Function: collect_more
void
collect_more(byte *bp, int nbytes, int entropybits)
/*
 * Throw a bunch of information into the machine.
 * The user supplies a hopefully pessimistic estimate of the entropy
 */
{

	nrandombits += entropybits;
#ifdef BIGDEALX
	if (flog) {
		int i;

		fprintf(flog, "collect_more(");
		for (i=0; i < nbytes; i++)
			fprintf(flog, "%02x", bp[i]);
		fprintf(flog, ", %d, %d) -> %d\n", nbytes, entropybits, nrandombits);
	}
#endif
	while(nbytes > 0) {
		collect_byte(*bp);
		nbytes--;
		bp++;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %esi, %ebx
addl %edx, 0x78bb(%rip)      # 0xbc3c
movq %rdi, %r14
leaq 0x78b5(%rip), %r13      # 0xbc40
leaq 0x788e(%rip), %r15      # 0xbc20
movq %rsp, %r12
testl %ebx, %ebx
jle 0x43e9
movb (%r14), %al
incl 0x7896(%rip)            # 0xbc38
movslq 0x788b(%rip), %rcx      # 0xbc34
leal 0x1(%rcx), %edx
movl %edx, 0x7882(%rip)      # 0xbc34
movb %al, (%rcx,%r13)
cmpl $0x40, %edx
jne 0x43e2
xorl %eax, %eax
cmpq $0x40, %rax
je 0x43d0
movl (%rax,%r13), %ecx
movl %ecx, (%rsp,%rax)
addq $0x4, %rax
jmp 0x43bd
movq %r15, %rdi
movq %r12, %rsi
callq 0x22fe
andl $0x0, 0x7852(%rip)      # 0xbc34
decl %ebx
incq %r14
jmp 0x4395
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/hansvanstaveren[P]BigDeal/collect.c
// Function: collect_finish
void
collect_finish(byte *hash)
/*
 * Halt the hashing engine
 * Extract the result into hash[]
 */
{
	int i;

	MDfinish(MDbuf, variousbytes, nhashbytes, 0);
#ifdef BIGDEALX
	if (flog)
		fprintf(flog, "collected %d random bits, from %d bytes of data\n",
			nrandombits, nhashbytes);

#endif
	for (i=0; i<RMDbytes; i+=4) {
		hash[i]   =  MDbuf[i>>2];         /* implicit cast to byte  */
		hash[i+1] = (MDbuf[i>>2] >>  8);  /*  extracts the 8 least  */
		hash[i+2] = (MDbuf[i>>2] >> 16);  /*  significant bits.     */
		hash[i+3] = (MDbuf[i>>2] >> 24);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x7833(%rip), %edx      # 0xbc38
leaq 0x7814(%rip), %r14      # 0xbc20
leaq 0x782d(%rip), %rsi      # 0xbc40
xorl %r15d, %r15d
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x35ef
cmpq $0x13, %r15
ja 0x4452
movb (%r15,%r14), %al
movb %al, (%rbx,%r15)
movb 0x1(%r15,%r14), %al
movb %al, 0x1(%rbx,%r15)
movb 0x2(%r15,%r14), %al
movb %al, 0x2(%rbx,%r15)
movb 0x3(%r15,%r14), %al
movb %al, 0x3(%rbx,%r15)
addq $0x4, %r15
jmp 0x4420
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/hansvanstaveren[P]BigDeal/output.c
// Function: init_kops
void
init_kops(FILE *out) {
    int nb = prparp->pp_nboards;

    putc(nb&0xff, out);
    putc((nb>>8)&0xff, out);
    out_fill(out, ' ', 11);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x781a(%rip), %rax      # 0xbc80
movl 0x8(%rax), %ebp
movl $0xff, %r14d
movl %ebp, %edi
andl %r14d, %edi
movq %rbx, %rsi
callq 0x2150
shrl $0x8, %ebp
andl %r14d, %ebp
movl %ebp, %edi
movq %rbx, %rsi
callq 0x2150
pushq $0x20
popq %rsi
pushq $0xb
popq %rdx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x449b
// File: /workspace/github_c_makefile_star2_O2/hansvanstaveren[P]BigDeal/output.c
// Function: output_help
void
output_help(void) {
	of_p ofp;

	printf("%-8s%8s    Explanation\n\n", "Name", "Suffix");
	/* For all formats: */
	for (ofp=output_formats; ofp->of_name; ofp++) {
		printf("%-8s%8s    %s\n",
			ofp->of_name,
			ofp->of_suffix? ofp->of_suffix : "",
			ofp->of_help);
	}
	printf("\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0x1f93(%rip), %rdi      # 0x6460
leaq 0x1fa5(%rip), %rsi      # 0x6479
leaq 0x1fa3(%rip), %rdx      # 0x647e
xorl %eax, %eax
callq 0x20c0
leaq 0x4dc7(%rip), %r14      # 0x92b0
leaq 0x1eed(%rip), %r15      # 0x63dd
leaq 0x1f8e(%rip), %rbx      # 0x6485
movq (%r14), %rsi
testq %rsi, %rsi
je 0x451e
movq 0x18(%r14), %rdx
movq 0x28(%r14), %rcx
testq %rdx, %rdx
cmoveq %r15, %rdx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x20c0
addq $0x48, %r14
jmp 0x44f7
pushq $0xa
popq %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2030
// File: /workspace/github_c_makefile_star2_O2/hansvanstaveren[P]BigDeal/output.c
// Function: output_specify_formats
int
output_specify_formats(char *format_string, int for_real)
/*
 * Comma separated list of output formats to use
 *
 * Return value is used to check validity of string
 */
{
	char **ofvector;
	of_p ofp;
	int found;
	int retval;

	retval = 1;	/* While all OK */
	for(ofvector = tokenize(format_string, ','); *ofvector; ofvector++) {
		found = 0;
		for (ofp=output_formats; ofp->of_name; ofp++) {
			if (strcmp(ofp->of_name, *ofvector) == 0) {
				if (suf_in_use(ofp->of_name, ofp->of_suffix)) {
					retval = 0;
				} else {
					ofp->of_flags |= OFF_USEIT;
				}
				found++;
				break;
			}
		}
		if (!found) {
			fprintf(stderr, "Format %s unknown\n", *ofvector);
			retval = 0;
		}
	}

	if (!for_real) {
		/*
		 * This was just a test, clean up
		 */
		for (ofp=output_formats; ofp->of_name; ofp++) {
			ofp->of_flags &= ~OFF_USEIT;
		}
	}

	return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rax
leaq 0x774d(%rip), %rbx      # 0xbc90
pushq $0x1
popq %r14
pushq $0x2c
popq %rbp
movl %esi, 0xc(%rsp)
movq %rax, (%rbx)
movq %rax, %rdi
movl %ebp, %esi
callq 0x20b0
testq %rax, %rax
je 0x4595
movq %rax, %rcx
incq %rax
movb $0x0, (%rcx)
addq $0x8, %rbx
incq %r14
cmpq $0xb, %r14
jne 0x454e
movq 0x4a73(%rip), %rcx      # 0x8ff0
movq (%rcx), %rdi
leaq 0x22e3(%rip), %rsi      # 0x686a
movq %rax, %rdx
xorl %eax, %eax
callq 0x2170
pushq $0xa
popq %r14
leaq 0x76f4(%rip), %rbx      # 0xbc90
andq $0x0, (%rbx,%r14,8)
pushq $0x1
popq %rax
movl %eax, 0x8(%rsp)
leaq 0x4d01(%rip), %rbp      # 0x92b0
movq (%rbx), %r15
testq %r15, %r15
je 0x4691
movq %rbp, %r14
movq (%r14), %r12
testq %r12, %r12
je 0x4633
movq %r12, %rdi
movq %r15, %rsi
callq 0x2140
testl %eax, %eax
je 0x45db
addq $0x48, %r14
jmp 0x45be
movq %rbx, 0x10(%rsp)
movq 0x18(%r14), %r13
movq %rbp, %rbx
movq (%rbp), %r15
testq %r15, %r15
je 0x461d
testb $0x1, 0x8(%rbp)
je 0x4617
movq 0x18(%rbp), %rdi
testq %rdi, %rdi
je 0x4612
testq %r13, %r13
je 0x4617
movq %r13, %rsi
callq 0x2140
testl %eax, %eax
jne 0x4617
jmp 0x4658
testq %r13, %r13
je 0x4658
addq $0x48, %rbp
jmp 0x45e7
orb $0x1, 0x8(%r14)
movq %rbx, %rbp
movq 0x10(%rsp), %rbx
addq $0x8, %rbx
jmp 0x45af
movq 0x49b6(%rip), %rax      # 0x8ff0
movq (%rax), %rdi
movl $0x0, 0x8(%rsp)
leaq 0x1e48(%rip), %rsi      # 0x6494
movq %r15, %rdx
xorl %eax, %eax
callq 0x2170
jmp 0x462a
testq %r13, %r13
movq 0x498e(%rip), %rax      # 0x8ff0
movq (%rax), %rdi
leaq 0x2248(%rip), %rax      # 0x68b4
cmoveq %rax, %r13
movl $0x0, 0x8(%rsp)
leaq 0x2209(%rip), %rsi      # 0x6888
movq %r12, %rdx
movq %r15, %rcx
movq %r13, %r8
xorl %eax, %eax
callq 0x2170
jmp 0x4622
cmpl $0x0, 0xc(%rsp)
je 0x46ab
movl 0x8(%rsp), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4bfe(%rip), %rax      # 0x92b0
cmpq $0x0, (%rax)
je 0x4698
andb $-0x2, 0x8(%rax)
addq $0x48, %rax
jmp 0x46b2
// File: /workspace/github_c_makefile_star2_O2/hansvanstaveren[P]BigDeal/output.c
// Function: print_dlm
static void
print_dlm(FILE *out, int boardno, hr_p hrp)
/*
 * Writes out one DLM record, including "checksum"
 * Record is mainly one lower case character per two cards
 */
{
	dl_byc *dbcp = hrp->hr_value.hv_dbcp;
	int i;
	int c;
	int checksum;

	if (boardno>99)	/* Format cannot do more than 99 */
		return;
	fprintf(out, "Duplicates %02d=0\n", boardno);
	fprintf(out, "Board %02d=", boardno);
	checksum = boardno;
	for(i=0; i<NCARDSPERDECK/2; i++) {
		c = 'a';
		c += dbcp->dc_card[2*i+0]<<2;
		c += dbcp->dc_card[2*i+1]<<0;
		putc(c, out);
		checksum ^= c;
	}
	fprintf(out, "%03d\n", checksum);
}

// Assembly:
cmpl $0x63, %esi
jle 0x4a3c
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movq 0x8(%rdx), %r15
leaq 0x1cbb(%rip), %rsi      # 0x670f
xorl %r12d, %r12d
movl %ebx, %edx
xorl %eax, %eax
callq 0x2170
leaq 0x1ce6(%rip), %rsi      # 0x674d
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x2170
cmpq $0x1a, %r12
je 0x4a9b
movzbl (%r15,%r12,2), %eax
movzbl 0x1(%r15,%r12,2), %ecx
leal (%rcx,%rax,4), %ebp
addl $0x61, %ebp
movl %ebp, %edi
movq %r14, %rsi
callq 0x2150
xorl %ebp, %ebx
incq %r12
jmp 0x4a73
leaq 0x1ca5(%rip), %rsi      # 0x6747
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2170
// File: /workspace/github_c_makefile_star2_O2/hansvanstaveren[P]BigDeal/output.c
// Function: print_bri
static void
print_bri(FILE *out, int boardno, hr_p hrp)
/*
 * Writes out "bri" format, including filler
 *
 * It is unknown whether the strange half space, half zero fill
 * is actually necessary. This is just the way I saw my first BRI file
 */
{
	dl_byh *dbhp = hrp->hr_value.hv_dbhp;

	out_bri(out, dbhp);
	out_fill(out, ' ', 32);
	out_fill(out, 0, 18);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdx), %rsi
callq 0x4fbf
pushq $0x20
popq %rdx
movq %rbx, %rdi
movl %edx, %esi
callq 0x449b
pushq $0x12
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
jmp 0x449b
// File: /workspace/github_c_makefile_star2_O2/hansvanstaveren[P]BigDeal/output.c
// Function: print_pbn
static void
print_pbn(FILE *out, int boardno, hr_p hrp) {
	dl_byh *dbhp = hrp->hr_value.hv_dbhp;

	out_pbn_rec(out,"Event", 0);
	out_pbn_rec(out,"Site", 0);
	out_pbn_rec(out,"Date", 0);
	fprintf(out, "[Board \"%d\"]\n", boardno);
	out_pbn_rec(out,"West", 0);
	out_pbn_rec(out,"North", 0);
	out_pbn_rec(out,"East", 0);
	out_pbn_rec(out,"South", 0);
	out_pbn_rec(out,"Dealer", dealerstr[boardno%4]);
	out_pbn_rec(out,"Vulnerable", pbn_vulnrep[vuln_index[boardno%16]]);
	fprintf(out, "[Deal \"N");
	out_pbn(out, dbhp);
	fprintf(out, "\"]\n");
	out_pbn_rec(out,"Scoring", 0);
	out_pbn_rec(out,"Declarer", 0);
	out_pbn_rec(out,"Contract", 0);
	out_pbn_rec(out,"Result", 0);
	fprintf(out, "\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq 0x8(%rdx), %r14
leaq 0x1c41(%rip), %rsi      # 0x679a
xorl %edx, %edx
callq 0x527f
leaq 0x1c39(%rip), %rsi      # 0x67a0
movq %rbx, %rdi
xorl %edx, %edx
callq 0x527f
leaq 0x1c2d(%rip), %rsi      # 0x67a5
movq %rbx, %rdi
xorl %edx, %edx
callq 0x527f
leaq 0x1c21(%rip), %rsi      # 0x67aa
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x2170
leaq 0x1c1c(%rip), %rsi      # 0x67b8
movq %rbx, %rdi
xorl %edx, %edx
callq 0x527f
leaq 0x1c10(%rip), %rsi      # 0x67bd
movq %rbx, %rdi
xorl %edx, %edx
callq 0x527f
leaq 0x1c05(%rip), %rsi      # 0x67c3
movq %rbx, %rdi
xorl %edx, %edx
callq 0x527f
leaq 0x1bf9(%rip), %rsi      # 0x67c8
movq %rbx, %rdi
xorl %edx, %edx
callq 0x527f
pushq $0x4
popq %rcx
movl %ebp, %eax
cltd
idivl %ecx
movslq %edx, %rax
leaq 0x41c5(%rip), %rcx      # 0x8db0
movq (%rcx,%rax,8), %rdx
leaq 0x1bd8(%rip), %rsi      # 0x67ce
movq %rbx, %rdi
callq 0x527f
pushq $0x10
popq %rcx
movl %ebp, %eax
cltd
idivl %ecx
movslq %edx, %rax
leaq 0x17f0(%rip), %rcx      # 0x6400
movslq (%rcx,%rax,4), %rax
leaq 0x17d5(%rip), %rcx      # 0x63f0
movslq (%rcx,%rax,4), %rdx
addq %rcx, %rdx
leaq 0x1bac(%rip), %rsi      # 0x67d5
movq %rbx, %rdi
callq 0x527f
leaq 0x1ba8(%rip), %rdi      # 0x67e0
pushq $0x8
popq %rsi
pushq $0x1
popq %r15
movq %r15, %rdx
movq %rbx, %rcx
callq 0x21e0
leaq 0x4adf(%rip), %rdx      # 0x9730
movq %rbx, %rdi
movq %r14, %rsi
callq 0x501a
leaq 0x1b51(%rip), %rdi      # 0x67b4
pushq $0x3
popq %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x21e0
leaq 0x1b71(%rip), %rsi      # 0x67e9
movq %rbx, %rdi
xorl %edx, %edx
callq 0x527f
leaq 0x1b68(%rip), %rsi      # 0x67f1
movq %rbx, %rdi
xorl %edx, %edx
callq 0x527f
leaq 0x1b60(%rip), %rsi      # 0x67fa
movq %rbx, %rdi
xorl %edx, %edx
callq 0x527f
leaq 0x1b58(%rip), %rsi      # 0x6803
movq %rbx, %rdi
xorl %edx, %edx
callq 0x527f
pushq $0xa
popq %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2110
// File: /workspace/github_c_makefile_star2_O2/hansvanstaveren[P]BigDeal/output.c
// Function: print_lin
static void
print_lin(FILE *out, int boardno, hr_p hrp)
/*
 * Write out the "pbn" record, with furnishings
 */
{
	dl_byh *dbhp = hrp->hr_value.hv_dbhp;

	fprintf(out, "qx|o%d|md|%d", boardno, (boardno+1)%4+1);
	out_handrep(out, dbhp, lin_suitstr, cardrep_int, COMPASS_SOUTH);
	putc(',', out);
	out_handrep(out, dbhp, lin_suitstr, cardrep_int, COMPASS_WEST);
	putc(',', out);
	out_handrep(out, dbhp, lin_suitstr, cardrep_int, COMPASS_NORTH);
	fprintf(out, "|rh||ah|Board %d|sv|%s|pg||\n", boardno, lin_vulnrep[vuln_index[boardno%16]]);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movq 0x8(%rdx), %r15
leal 0x1(%rbx), %eax
pushq $0x4
popq %rcx
cltd
idivl %ecx
leal 0x1(%rdx), %ecx
leaq 0x1b38(%rip), %rsi      # 0x6826
movl %ebx, %edx
xorl %eax, %eax
callq 0x2170
leaq 0x4ac2(%rip), %r12      # 0x97c0
pushq $0x2
popq %rcx
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x5050
pushq $0x2c
popq %rbp
movl %ebp, %edi
movq %r14, %rsi
callq 0x2150
pushq $0x3
popq %rcx
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x5050
movl %ebp, %edi
movq %r14, %rsi
callq 0x2150
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x5050
pushq $0x10
popq %rcx
movl %ebx, %eax
cltd
idivl %ecx
movslq %edx, %rax
leaq 0x16a7(%rip), %rcx      # 0x6400
movslq (%rcx,%rax,4), %rax
leaq 0x16dc(%rip), %rdx      # 0x6440
movslq (%rdx,%rax,4), %rcx
addq %rdx, %rcx
leaq 0x1ac1(%rip), %rsi      # 0x6833
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2170
// File: /workspace/github_c_makefile_star2_O2/hansvanstaveren[P]BigDeal/output.c
// Function: print_csv
static void
print_csv(FILE *out, int boardno, hr_p hrp)
/*
 * Write out a CSV record
 */
{
	dl_byh *dbhp = hrp->hr_value.hv_dbhp;

	out_cardrep(out, dbhp, csv_suitstr, cardrep_int);
	fprintf(out, "\",\"%d\",\"%s/%s\"\n",
		boardno,
		dealerstr[boardno%4],
		csv_vulnrep[vuln_index[boardno%16]]);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq 0x8(%rdx), %rsi
leaq 0x4aa6(%rip), %rdx      # 0x9840
callq 0x501a
pushq $0x4
popq %rcx
movl %ebx, %eax
cltd
idivl %ecx
movslq %edx, %rax
leaq 0x3fff(%rip), %rcx      # 0x8db0
movq (%rcx,%rax,8), %rcx
pushq $0x10
popq %rsi
movl %ebx, %eax
cltd
idivl %esi
movslq %edx, %rax
leaq 0x1639(%rip), %rdx      # 0x6400
movslq (%rdx,%rax,4), %rax
leaq 0x167e(%rip), %rdx      # 0x6450
movslq (%rdx,%rax,4), %r8
addq %rdx, %r8
leaq 0x1a78(%rip), %rsi      # 0x6858
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2170
// File: /workspace/github_c_makefile_star2_O2/hansvanstaveren[P]BigDeal/output.c
// Function: print_ber
static void
print_ber(FILE *out, int boardno, hr_p hrp)
/*
 * Writes out "ber" format, no filler or separators
 */
{
	dl_byc *dbcp = hrp->hr_value.hv_dbcp;
	int i;

	for(i=0; i<NCARDSPERDECK; i++)
		putc('1' + dbcp->dc_card[i], out);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdx), %r14
xorl %r15d, %r15d
cmpq $0x34, %r15
je 0x4e1d
movzbl (%r14,%r15), %edi
addl $0x31, %edi
movq %rbx, %rsi
callq 0x2150
incq %r15
jmp 0x4e02
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/hansvanstaveren[P]BigDeal/output.c
// Function: print_borel
static void
print_borel(FILE *out, int boardno, hr_p hrp)
/*
 * Write out a "bhg" record
 */
{
	dl_byh *dbhp = hrp->hr_value.hv_dbhp;
	int i, j, compass, card;

	for (i=0; i<NCOMPASS; i++) {
		/*
		 * Start at dealer of this hand
		 */
		compass = (boardno - 1 + i) % NCOMPASS;
		for (j=0; j<NCARDSPERHAND; j++) {
			card = dbhp->dh_hand[compass][j];
			putc(card <= 2*NCARDSPERHAND ?
				'A'+card-1 : 'a'+card-2*NCARDSPERHAND-1,
				out);
		}
	}
	fprintf(out, "\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
movq 0x8(%rdx), %r15
decl %r14d
xorl %r12d, %r12d
cmpl $0x4, %r12d
je 0x4e91
leal (%r14,%r12), %eax
cltd
pushq $0x4
popq %rcx
idivl %ecx
movslq %edx, %rax
imulq $0xd, %rax, %r13
addq %r15, %r13
xorl %ebp, %ebp
cmpq $0xd, %rbp
je 0x4e8c
movzbl (%r13,%rbp), %eax
movl %eax, %ecx
orl $0x40, %ecx
leal 0x46(%rax), %edi
cmpl $0x1b, %eax
cmovbl %ecx, %edi
movq %rbx, %rsi
callq 0x2150
incq %rbp
jmp 0x4e65
incl %r12d
jmp 0x4e49
pushq $0xa
popq %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2110
// File: /workspace/github_c_makefile_star2_O2/hansvanstaveren[P]BigDeal/output.c
// Function: print_dup_common
static void
print_dup_common(FILE *out, int boardno, dl_byh *dbhp, int not_on_screen)
/*
 * Write out a "dup" record
 * This is actually a BRI, followed by a DGE, and some padding
 */
{

	/*
	 * Horribly convoluted hack upon hack format
	 *
	 * Duplimate, generation X
	 */
	out_bri(out, dbhp);
	if (boardno == 1 && not_on_screen) {
		out_fill(out, ' ', 68);
	} else {
		out_dge(out, dbhp);
	}
	putc('Y', out);		/* Y to Random Hands */
	putc('N', out);		/* N to reverse order */
	putc('1', out);		/* Start at board 1 */
	putc(' ', out);
	putc(' ', out);
	putc('0', out);		/* No copies immediate */
	putc(' ', out);
	putc('0' + (prparp->pp_nboards/10)%10, out);/* tens of number */
	putc('0' + prparp->pp_nboards%10, out);	/* units of number */
	putc(' ', out);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r14
movl %esi, %r15d
movq %rdi, %rbx
movq %rdx, %rsi
callq 0x4fbf
cmpl $0x1, %r15d
setne %al
testl %ebp, %ebp
sete %cl
orb %al, %cl
jne 0x4f19
pushq $0x20
popq %rsi
pushq $0x44
popq %rdx
movq %rbx, %rdi
callq 0x449b
jmp 0x4f24
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5011
pushq $0x59
popq %rdi
movq %rbx, %rsi
callq 0x2150
pushq $0x4e
popq %rdi
movq %rbx, %rsi
callq 0x2150
pushq $0x31
popq %rdi
movq %rbx, %rsi
callq 0x2150
pushq $0x20
popq %rbp
movl %ebp, %edi
movq %rbx, %rsi
callq 0x2150
movl %ebp, %edi
movq %rbx, %rsi
callq 0x2150
pushq $0x30
popq %rdi
movq %rbx, %rsi
callq 0x2150
movl %ebp, %edi
movq %rbx, %rsi
callq 0x2150
movq 0x6d08(%rip), %rax      # 0xbc80
movl 0x8(%rax), %eax
pushq $0xa
popq %r14
cltd
idivl %r14d
cltd
idivl %r14d
leal 0x30(%rdx), %edi
movq %rbx, %rsi
callq 0x2150
movq 0x6ce7(%rip), %rax      # 0xbc80
movl 0x8(%rax), %eax
cltd
idivl %r14d
leal 0x30(%rdx), %edi
movq %rbx, %rsi
callq 0x2150
movl %ebp, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2150
// File: /workspace/github_c_makefile_star2_O2/hansvanstaveren[P]BigDeal/output.c
// Function: out_bri
static void
out_bri(FILE *out, dl_byh *dbhp)
/*
 * Write out the "bri" record, no filler
 */
{
	int compass, i;

	/*
	 * Note the <COMPASS_WEST
	 * In this format only the hands of North, East and South are given
	 * West is left as an exercise for the Duplimate
	 * (West just gets what is left over)
	 */
	for (compass=COMPASS_NORTH; compass<COMPASS_WEST; compass++)
		for (i=0; i<NCARDSPERHAND; i++)
			fprintf(out,"%02d",dbhp->dh_hand[compass][i]);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x1666(%rip), %r15      # 0x663b
xorl %r12d, %r12d
cmpq $0x3, %r12
je 0x5007
xorl %r13d, %r13d
cmpq $0xd, %r13
je 0x4ffe
movzbl (%rbx,%r13), %edx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x2170
incq %r13
jmp 0x4fe1
incq %r12
addq $0xd, %rbx
jmp 0x4fd8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/hansvanstaveren[P]BigDeal/output.c
// Function: out_handrep
static void
out_handrep(FILE *out, dl_byh *dbhp, char *suitstr[NCOMPASS][NSUIT], char *cardrep, int compass)
/*
 * Write out a "dge", "lin" or "pbn" single hand
 */
{
	int suit;
	int i;
	int card, card_in_suit;

	for (suit=SUIT_SPADES; suit<=SUIT_CLUBS; suit++) {
		fputs(suitstr[compass][suit], out);
		for (i=0; i<NCARDSPERHAND; i++) {
			/*
			 * Get card in this position for player
			 * If it is part of the suit we are working on
			 * (1..13 for spades, upto 40..52 for clubs)
			 * print it.
			 */
			card = dbhp->dh_hand[compass][i];
			card_in_suit = card - 13*suit;
			if (card_in_suit > 0 && card_in_suit <= 13)
				putc(cardrep[card_in_suit-1], out);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq %ecx, %rax
imulq $0xd, %rax, %r15
addq %rsi, %r15
xorl %r12d, %r12d
shlq $0x5, %rax
addq %rdx, %rax
movq %rax, (%rsp)
leaq 0x15c3(%rip), %r13      # 0x6640
cmpq $0x4, %r12
je 0x50cb
movq (%rsp), %rax
movq (%rax,%r12,8), %rdi
movq %rbx, %rsi
callq 0x20e0
imull $-0xd, %r12d, %ebp
xorl %r14d, %r14d
cmpq $0xd, %r14
je 0x50c6
movzbl (%r15,%r14), %eax
leal (%rax,%rbp), %ecx
decl %ecx
cmpl $0xc, %ecx
ja 0x50c1
addl %ebp, %eax
movl %eax, %eax
movsbl -0x1(%rax,%r13), %edi
movq %rbx, %rsi
callq 0x2150
incq %r14
jmp 0x509a
incq %r12
jmp 0x507d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/hansvanstaveren[P]BigDeal/output.c
// Function: init_dlmcommon
static void
init_dlmcommon(FILE *out, int dups, int show)
{
	int checksum;

	/*
	 * Very badly documented, sorry(not my fault)
	 */
	fprintf(out, "[Document]\n");
	fprintf(out, "Headline=Generated by Big Deal version %d.%d%s\n",
		VERSION_MAJOR, VERSION_MINOR, VERSION_PAREN);
	fprintf(out, "Status=%s\n", show ? "Show" : "Sealed");
	fprintf(out, "Duplicates=%d\n", dups);
	fprintf(out, "From board=%d\n",
		prparp->pp_lowboard<=99 ? prparp->pp_lowboard : 99);
	fprintf(out, "To board=%d\n",
		prparp->pp_highboard<=99 ? prparp->pp_highboard : 99);
	fprintf(out, "Next board to duplimate=0\n");
	fprintf(out, "PrintOuts=0\n");
	fprintf(out, "Crypto key=0\n");
	checksum = dups ^ prparp->pp_lowboard ^ prparp->pp_highboard;
	if (show)
		checksum ^= 1;	/* XOR with 1 if show */
	fprintf(out, "Checksum=%d\n", checksum);
	fill_dlm(out, 0, prparp->pp_lowboard);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %rbx
leaq 0x1560(%rip), %rdi      # 0x664e
pushq $0xb
popq %rsi
pushq $0x1
popq %r14
movq %r14, %rdx
movq %rbx, %rcx
callq 0x21e0
leaq 0x1553(%rip), %rsi      # 0x665a
leaq 0x12cf(%rip), %r8       # 0x63dd
pushq $0x2
popq %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x2170
xorl %ebp, %ebp
testl %r15d, %r15d
setne %bpl
leaq 0x1568(%rip), %rax      # 0x6695
leaq 0x1566(%rip), %rdx      # 0x669a
cmovneq %rax, %rdx
leaq 0x154b(%rip), %rsi      # 0x668a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2170
leaq 0x1551(%rip), %rsi      # 0x66a1
movq %rbx, %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2170
movq 0x6b1d(%rip), %rax      # 0xbc80
movl (%rax), %edx
pushq $0x63
popq %r15
cmpl %r15d, %edx
cmovgel %r15d, %edx
leaq 0x1539(%rip), %rsi      # 0x66b0
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2170
movq 0x6af8(%rip), %rax      # 0xbc80
movl 0x4(%rax), %eax
cmpl $0x63, %eax
cmovll %eax, %r15d
leaq 0x1526(%rip), %rsi      # 0x66bf
movq %rbx, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0x2170
leaq 0x151f(%rip), %rdi      # 0x66cc
pushq $0x1a
popq %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x21e0
leaq 0x1525(%rip), %rdi      # 0x66e7
pushq $0xc
popq %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x21e0
leaq 0x151d(%rip), %rdi      # 0x66f4
pushq $0xd
popq %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x21e0
movq 0x6a94(%rip), %rax      # 0xbc80
xorl (%rax), %ebp
xorl 0x4(%rax), %ebp
leaq 0x150a(%rip), %rsi      # 0x6702
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x2170
movq 0x6a75(%rip), %rax      # 0xbc80
movl (%rax), %edx
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x521e
// File: /workspace/github_c_makefile_star2_O2/hansvanstaveren[P]BigDeal/output.c
// Function: fill_dlm
static void
fill_dlm(FILE *out, int lowbrd, int highbrd)
{
	int i;
	int checksum;

	for (i=lowbrd+1; i<highbrd; i++) {
		checksum = i^14;	/* KGB calculated */
		fprintf(out, "Duplicates %02d=0\n", i);
		fprintf(out, "Board %02d=aaaaaabffffffkkkkkklpppppp%03d\n",
			i, checksum);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
incl %ebp
leaq 0x14d6(%rip), %r15      # 0x670f
leaq 0x14e2(%rip), %r12      # 0x6722
cmpl %ebx, %ebp
jge 0x5270
movl %ebp, %r13d
xorl $0xe, %r13d
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x2170
movq %r14, %rdi
movq %r12, %rsi
movl %ebp, %edx
movl %r13d, %ecx
xorl %eax, %eax
callq 0x2170
incl %ebp
jmp 0x5240
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/hansvanstaveren[P]BigDeal/output.c
// Function: print_kops_cds
static void
print_kops_cds(FILE *out, dl_byc *dbcp, int rotoffset) {
    int card, byte, suit, cardno, cardpos;

    for (card=0; card<NCARDSPERHAND; card++) {
	byte = 0;
	for (suit=0; suit<NSUIT; suit++) {
	    cardno = NCARDSPERHAND*suit+card;
	    cardpos = dbcp->dc_card[cardno];
	    cardpos = (cardpos+rotoffset)%NSUIT;
	    byte |= cardpos << 2*(NSUIT-1-suit);
	}
	putc(byte, out);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
pushq $0x6
popq %rbp
cmpq $0xd, %r12
je 0x52f0
xorl %eax, %eax
movl %ebp, %ecx
xorl %edi, %edi
cmpq $0x34, %rax
je 0x52e0
movzbl (%r14,%rax), %edx
addl %ebx, %edx
andl $0x3, %edx
shll %cl, %edx
orl %edx, %edi
addl $-0x2, %ecx
addq $0xd, %rax
jmp 0x52c3
movq %r15, %rsi
callq 0x2150
incq %r12
incq %r14
jmp 0x52b7
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/hansvanstaveren[P]BigDeal/unix.c
// Function: gettod
void
gettod(struct timeval *tp)
/*
 * Fill in *tp with gettimeofday values
 * Side effect: calculate approx precision
 */
{
	int b;

	gettimeofday(tp, (struct timezone *) 0);
	/* Find how many bits are set in usec field */
	for(b = 0; b < 20; b++) {
		if (tp->tv_usec&(1<<b))
			break;
	}
	if (20-b > subsecbits) {
		subsecbits = 20-b;
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
xorl %esi, %esi
callq 0x20d0
pushq $-0x14
popq %rax
testl %eax, %eax
je 0x531d
leal 0x14(%rax), %ecx
movl 0x8(%rbx), %edx
btl %ecx, %edx
jb 0x531d
incl %eax
jmp 0x530a
negl %eax
cmpl 0x45a3(%rip), %eax      # 0x98c8
jle 0x532d
movl %eax, 0x459b(%rip)      # 0x98c8
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/hansvanstaveren[P]BigDeal/unix.c
// Function: getchtm
int
getchtm(int *nbits)
/*
 * Read one character from standard input
 * Time the wait, and use bits for random
 * MUST be in cbreak mode for this to work
 */
{
	struct timeval t1, t2;
	long sdiff, mdiff;
	int c;
	long shift;
	int b;

	gettod(&t1);
	c = getchar();
	gettod(&t2);
	mdiff = t2.tv_usec - t1.tv_usec;
	sdiff = t2.tv_sec - t1.tv_sec;
	if (sdiff > 1000)
		sdiff = 1000;
	mdiff += sdiff * 1000000;
	/*
	 * Everything slower than 1/8 second can be faked
	 * Trust at most half of the rest
	 */
	for (shift = mdiff, b= 0; shift>3 ; shift >>= 2, b++)
		;
	if (b <= MAX_INTERVAL_ENTROPY)
		*nbits = b;
	else
		*nbits = MAX_INTERVAL_ENTROPY;
	collect_more((byte *) &t1, sizeof(t1), 0);
	collect_more((byte *) &t2, sizeof(t2), 0);
	if (flog)
		fprintf(flog, "Collected character %d, timediff %ld, timebits %d\n",
			c, mdiff, *nbits);
	return c;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %r14
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x52fc
callq 0x2160
movl %eax, %ebx
movq %rsp, %r12
movq %r12, %rdi
callq 0x52fc
movq (%r12), %rax
movq 0x8(%r12), %rcx
subq 0x8(%r15), %rcx
subq (%r15), %rax
movl $0x3e8, %edx            # imm = 0x3E8
cmpq %rdx, %rax
cmovgeq %rdx, %rax
imulq $0xf4240, %rax, %r15    # imm = 0xF4240
addq %rcx, %r15
xorl %eax, %eax
movq %r15, %rcx
cmpq $0x4, %rcx
jl 0x5396
shrq $0x2, %rcx
incl %eax
jmp 0x5388
cmpl $0x6, %eax
pushq $0x6
popq %rcx
cmovbl %eax, %ecx
movl %ecx, (%r14)
leaq 0x10(%rsp), %rdi
pushq $0x10
popq %rbp
movl %ebp, %esi
xorl %edx, %edx
callq 0x436c
movq %rsp, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x436c
leaq 0x6832(%rip), %rax      # 0xbbf8
movq (%rax), %rdi
testq %rdi, %rdi
je 0x53e4
movl (%r14), %r8d
leaq 0x14f8(%rip), %rsi      # 0x68d0
movl %ebx, %edx
movq %r15, %rcx
xorl %eax, %eax
callq 0x2170
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/hansvanstaveren[P]BigDeal/unix.c
// Function: os_collect
void
os_collect(void) {
	int pid;
	struct timeval t;

	if (os_dev_random()) {
		return;
	}
	pid = getpid();
	/* Trust about 8 bits of randomness in pid */
	collect_more((byte *) &pid, sizeof(pid), 8);
	gettod(&t);
	/* Trust 6 bits of seconds, and half the subsecond bits */
	collect_more((byte *) &t, sizeof(t), 6+subsecbits/2);
	if (flog)
		fprintf(flog, "First TOD=(%ld, %ld), subsecbits = %d\n",
			t.tv_sec, t.tv_usec, subsecbits);
}

// Assembly:
pushq %rbx
subq $0x40, %rsp
leaq 0x1536(%rip), %rdi      # 0x6935
xorl %esi, %esi
xorl %eax, %eax
callq 0x2180
testl %eax, %eax
js 0x543d
movl %eax, %ebx
leaq 0x10(%rsp), %rsi
pushq $0x28
popq %rdx
movl %eax, %edi
callq 0x2120
cmpl $0x28, %eax
jne 0x543d
movl %ebx, %edi
callq 0x2100
leaq 0x10(%rsp), %rdi
pushq $0x28
popq %rsi
movl $0x140, %edx            # imm = 0x140
callq 0x436c
jmp 0x54a5
callq 0x2070
leaq 0xc(%rsp), %rdi
movl %eax, (%rdi)
pushq $0x4
popq %rsi
pushq $0x8
popq %rdx
callq 0x436c
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x52fc
movl 0x4461(%rip), %edx      # 0x98c8
shrl %edx
addl $0x6, %edx
pushq $0x10
popq %rsi
movq %rbx, %rdi
callq 0x436c
leaq 0x677a(%rip), %rax      # 0xbbf8
movq (%rax), %rdi
testq %rdi, %rdi
je 0x54a5
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rcx
movl 0x4431(%rip), %r8d      # 0x98c8
leaq 0x1465(%rip), %rsi      # 0x6903
xorl %eax, %eax
callq 0x2170
addq $0x40, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/hansvanstaveren[P]BigDeal/unix.c
// Function: cbreak
void
cbreak(void)
/*
 * Set terminal to state where characters can be read one at a time
 * Also disable echo
 */
{
	struct termios newtios;

	newtios = tios;

	/* fiddle newtios */
	newtios.c_lflag &= ~(ICANON|ECHO);
	newtios.c_cc[VMIN] = 1;
	newtios.c_cc[VTIME] = 0;
	ioctl(0, STTY, &newtios);
}

// Assembly:
subq $0x48, %rsp
movups 0x6832(%rip), %xmm0     # 0xbce8
movq %rsp, %rdx
movaps %xmm0, (%rdx)
movups 0x6835(%rip), %xmm0     # 0xbcf8
movaps %xmm0, 0x10(%rdx)
movups 0x6846(%rip), %xmm0     # 0xbd14
movups %xmm0, 0x2c(%rdx)
movups 0x682f(%rip), %xmm0     # 0xbd08
movaps %xmm0, 0x20(%rdx)
andb $-0xb, 0xc(%rdx)
movw $0x100, 0x16(%rdx)      # imm = 0x100
movl $0x5404, %esi           # imm = 0x5404
xorl %edi, %edi
xorl %eax, %eax
callq 0x20f0
addq $0x48, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/aes128n8t8clocv2/ref/cloc.c
// Function: ae_init
int ae_init(ae_cxt* cxt, const byte* userkey, int keylen)
{
	if(keylen != STATE_LEN){
		return KEY_ERROR;
	}
	cxt->userkey = (byte*)userkey;
	cxt->pt_ekey = &(cxt->ekey);
	AES_set_encrypt_key(userkey, keylen*8, cxt->pt_ekey); /* set the encryption key */
	cxt->klen = keylen;
    
	return SUCCESS;
}

// Assembly:
cmpl $0x10, %edx
jne 0x3086
pushq %rbx
movq %rdi, %rbx
movq %rsi, 0x120(%rdi)
leaq 0x20(%rdi), %rdx
movq %rdx, 0x118(%rdi)
movq %rsi, %rdi
movl $0x80, %esi
callq 0x10a0
movl $0x10, 0x128(%rbx)
xorl %eax, %eax
popq %rbx
retq
pushq $-0x1
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/aes128n8t8clocv2/ref/encrypt.c
// Function: crypto_aead_encrypt
int crypto_aead_encrypt(
		unsigned char *c, unsigned long long *clen,
		const unsigned char *m, unsigned long long mlen,
		const unsigned char *ad, unsigned long long adlen,
		const unsigned char *nsec,                          //not relavent to CLOC
		const unsigned char *npub,
		const unsigned char *k
		)
{
    /* set ciphertext length */
    *clen = mlen + CRYPTO_ABYTES;
    
    unsigned char tag[CRYPTO_ABYTES];
    ae_cxt cxt;
    
    /* set key and compute round keys */
    if(ae_init(&cxt, k, CRYPTO_KEYBYTES))
        return RETURN_KEYSIZE_ERR;
    
    /* process the associated data */
    process_ad(&cxt, ad, adlen, npub, CRYPTO_NPUBBYTES);
    
    /* encrypt message */
    ae_encrypt(&cxt, (unsigned char*)m, mlen, c, tag, CRYPTO_ABYTES, ENC);
    
    /* copy the tag to the end of ciphertext */
    memcpy(c+mlen, tag, CRYPTO_ABYTES);
	return RETURN_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %r9, %r12
movq %r8, %r13
movq %rcx, %rbx
movq %rdx, %r15
movq %rdi, %r14
movq 0x1e0(%rsp), %rax
addq $0x8, %rcx
movq %rcx, (%rsi)
leaq 0x18(%rsp), %rdi
pushq $0x10
popq %rdx
movq %rax, %rsi
callq 0x1090
testl %eax, %eax
je 0x35e0
pushq $-0x3
popq %rax
jmp 0x362f
movq 0x1d8(%rsp), %rcx
leaq 0x18(%rsp), %rbp
pushq $0x8
popq %r8
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r8, %r13
callq 0x1050
movl $0x1, (%rsp)
leaq 0x10(%rsp), %r12
movq %rbp, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
movq %r12, %r8
movq %r13, %r9
callq 0x10b0
movq (%r12), %rax
movq %rax, (%r14,%rbx)
xorl %eax, %eax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/aes128n8t8clocv2/ref/encrypt.c
// Function: crypto_aead_decrypt
int crypto_aead_decrypt(
		unsigned char *m,unsigned long long *mlen,
		unsigned char *nsec,                                //not relavent to CLOC
		const unsigned char *c,unsigned long long clen,
		const unsigned char *ad,unsigned long long adlen,
		const unsigned char *npub,
		const unsigned char *k
		)
{
    /* set plaintext length */
    *mlen = clen - CRYPTO_ABYTES;
    
    unsigned char tag[CRYPTO_ABYTES];
    ae_cxt cxt;
    
    /* set key and compute round keys */
    if(ae_init(&cxt, k, CRYPTO_KEYBYTES))
        return RETURN_KEYSIZE_ERR;
    
    /* process the associated data */
    process_ad(&cxt, ad, adlen, npub, CRYPTO_NPUBBYTES);
    
    /* decrypt ciphertext */
    ae_encrypt(&cxt, m, *mlen, (unsigned char*)c, tag, CRYPTO_ABYTES, DEC);
    
    /* compare the tag */
    int i;
    for(i = 0; i < CRYPTO_ABYTES; i++)
        if(tag[i] != c[(*mlen) + i]){
            return RETURN_TAG_NO_MATCH;
        }
    
	return RETURN_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %r9, %r12
movq %rcx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x1e0(%rsp), %rsi
addq $-0x8, %r8
movq %r8, (%r14)
leaq 0x18(%rsp), %rdi
pushq $0x10
popq %rdx
callq 0x1090
testl %eax, %eax
je 0x3683
pushq $-0x3
popq %rax
jmp 0x36f0
movq 0x1d8(%rsp), %rcx
movq 0x1d0(%rsp), %rdx
leaq 0x18(%rsp), %r13
pushq $0x8
popq %rbp
movq %r13, %rdi
movq %r12, %rsi
movq %rbp, %r8
callq 0x1050
movq (%r14), %rdx
movl $0x2, (%rsp)
leaq 0x10(%rsp), %r8
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rcx
movq %rbp, %r9
callq 0x10b0
xorl %eax, %eax
pushq $-0x1
popq %rcx
xorl %edx, %edx
cmpq $0x8, %rdx
je 0x36f0
movb 0x10(%rsp,%rdx), %sil
movq (%r14), %rdi
addq %rbx, %rdi
leaq 0x1(%rdx), %r8
cmpb (%rdx,%rdi), %sil
movq %r8, %rdx
je 0x36d0
movl %ecx, %eax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/aes128n8t8clocv2/ref/utils.c
// Function: print_cxt
void print_cxt(const ae_cxt* cxt)
{
	printf("user key of %d bytes:\n", cxt->klen);
	pstate(cxt->userkey, cxt->klen);
	printf("associated data of %llu bytes:\n", cxt->adlen);
	pstate(cxt->ad, cxt->adlen);
	printf("nonce of %llu bytes:\n", cxt->nlen);
	pstate(cxt->nonce, cxt->nlen);
	printf("plaintext of %llu bytes:\n", cxt->ptlen);
	pstate(cxt->pt, cxt->ptlen);
	printf("ciphertext of %llu bytes:\n", cxt->ctlen);
	pstate(cxt->ct, cxt->ctlen);
	printf("MAC of %d bytes:\n", cxt->tlen);
	pstate(cxt->tag, cxt->tlen);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x128(%rdi), %esi
leaq 0x30fc(%rip), %rdi      # 0x6850
xorl %eax, %eax
callq 0x1030
movq 0x138(%rbx), %rsi
leaq 0x30fe(%rip), %rdi      # 0x6867
xorl %eax, %eax
callq 0x1030
movq 0x148(%rbx), %rsi
leaq 0x3109(%rip), %rdi      # 0x6887
xorl %eax, %eax
callq 0x1030
movq 0x158(%rbx), %rsi
leaq 0x310a(%rip), %rdi      # 0x689d
xorl %eax, %eax
callq 0x1030
movq 0x168(%rbx), %rsi
leaq 0x310f(%rip), %rdi      # 0x68b7
xorl %eax, %eax
callq 0x1030
movl 0x178(%rbx), %esi
leaq 0x3116(%rip), %rdi      # 0x68d2
xorl %eax, %eax
popq %rbx
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]libcperciva/tests/crypto_aesctr/main.c
// Function: perftest
static int
perftest(void)
{
	struct crypto_aesctr * aesctr;
	struct crypto_aes_key * key_exp;
	uint8_t key_unexpanded[32];
	size_t i;

	/* Inform user about the hardware optimization status. */
	print_hardware("Performance test of AES-CTR");
	fflush(stdout);

	/* Prepare the key.  We're only performance-testing 256-bit keys. */
	for (i = 0; i < 32; i++)
		key_unexpanded[i] = (uint8_t)i;
	if ((key_exp = crypto_aes_key_expand(key_unexpanded, 32)) == NULL)
		goto err0;

	/* Prepare the aesctr object. */
	if ((aesctr = crypto_aesctr_alloc()) == NULL)
		goto err1;
	crypto_aesctr_init2(aesctr, key_exp, 0);

	/* Time the function. */
	if (perftest_buffers(nbytes_perftest, perfsizes, num_perf,
	    nbytes_warmup, 1, perftest_init, perftest_func, NULL, aesctr)) {
		warn0("perftest_buffers");
		goto err2;
	}

	/* Clean up. */
	crypto_aesctr_free(aesctr);
	crypto_aes_key_free(key_exp);

	/* Success! */
	return (0);

err2:
	crypto_aesctr_free(aesctr);
err1:
	crypto_aes_key_free(key_exp);
err0:
	/* Failure! */
	return (1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
leaq 0x2b6c(%rip), %rdi      # 0x500a
callq 0x26ae
movq 0x6b4e(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
callq 0x2250
xorl %eax, %eax
cmpq $0x20, %rax
je 0x24c2
movb %al, (%rsp,%rax)
incq %rax
jmp 0x24b4
movq %rsp, %rdi
pushq $0x20
popq %rsi
callq 0x2f5a
testq %rax, %rax
je 0x2557
movq %rax, %rbx
callq 0x3708
testq %rax, %rax
je 0x255d
movq %rax, %r14
xorl %r15d, %r15d
movq %rax, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3710
subq $0x8, %rsp
leaq 0x22b(%rip), %rax       # 0x272c
leaq 0x3198(%rip), %rsi      # 0x56a0
leaq 0x1ff(%rip), %r9        # 0x270e
pushq $0xb
popq %rdx
pushq $0x1
popq %rbp
movl $0x2000000, %edi        # imm = 0x2000000
movl $0x9c4000, %ecx         # imm = 0x9C4000
movl %ebp, %r8d
pushq %r14
pushq $0x0
pushq %rax
callq 0x458c
addq $0x20, %rsp
testl %eax, %eax
je 0x254d
leaq 0x2aeb(%rip), %rdi      # 0x5026
xorl %eax, %eax
callq 0x4b64
callq 0x21c0
andl $0x0, (%rax)
movl %ebp, %r15d
movq %r14, %rdi
callq 0x396b
jmp 0x2561
pushq $0x1
popq %r15
jmp 0x2569
pushq $0x1
popq %r15
movq %rbx, %rdi
callq 0x2ffa
movl %r15d, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]libcperciva/tests/crypto_aesctr/main.c
// Function: selftest
static int
selftest(void)
{
	uint64_t nonce;
	size_t num_tests;
	int failures = 0;

	/* Test with nonce = 0. */
	num_tests = sizeof(tests_128) / sizeof(tests_128[0]);
	if (selftest_cases(tests_128, num_tests, 0))
		failures++;
	num_tests = sizeof(tests_256) / sizeof(tests_256[0]);
	if (selftest_cases(tests_256, num_tests, 0))
		failures++;

	/* Test with nonce = 0xfedcba9876543210. */
	nonce = 0xfedcba9876543210;
	num_tests = sizeof(tests_128_nonce) / sizeof(tests_128_nonce[0]);
	if (selftest_cases(tests_128_nonce, num_tests, nonce))
		failures++;
	num_tests = sizeof(tests_256_nonce) / sizeof(tests_256_nonce[0]);
	if (selftest_cases(tests_256_nonce, num_tests, nonce))
		failures++;

	/* Test with nonce = 0, re-using the same object. */
	num_tests = sizeof(tests_128) / sizeof(tests_128[0]);
	if (selftest_cases_singleobj(tests_128, num_tests, 0))
		failures++;
	num_tests = sizeof(tests_256) / sizeof(tests_256[0]);
	if (selftest_cases_singleobj(tests_256, num_tests, 0))
		failures++;

	/* Test with nonce = 0xfedcba9876543210. */
	nonce = 0xfedcba9876543210;
	num_tests = sizeof(tests_128_nonce) / sizeof(tests_128_nonce[0]);
	if (selftest_cases_singleobj(tests_128_nonce, num_tests, nonce))
		failures++;
	num_tests = sizeof(tests_256_nonce) / sizeof(tests_256_nonce[0]);
	if (selftest_cases_singleobj(tests_256_nonce, num_tests, nonce))
		failures++;

	/* Test unaligned access. */
	if (selftest_unaligned_access(16))
		failures++;
	if (selftest_unaligned_access(32))
		failures++;

	/* Report overall success to exit code. */
	if (failures)
		return (1);
	else
		return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x64d7(%rip), %r14      # 0x8a60
movq %r14, %rdi
xorl %esi, %esi
callq 0x2767
xorl %ebx, %ebx
testq %rax, %rax
setne %bl
leaq 0x659e(%rip), %r15      # 0x8b40
movq %r15, %rdi
xorl %esi, %esi
callq 0x2767
leal 0x1(%rbx), %ebp
testq %rax, %rax
cmovel %ebx, %ebp
leaq 0x6664(%rip), %r12      # 0x8c20
movabsq $-0x123456789abcdf0, %rbx # imm = 0xFEDCBA9876543210
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2767
cmpq $0x1, %rax
sbbl $-0x1, %ebp
leaq 0x6721(%rip), %r13      # 0x8d00
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2767
cmpq $0x1, %rax
sbbl $-0x1, %ebp
movq %r14, %rdi
xorl %esi, %esi
callq 0x28d5
cmpq $0x1, %rax
sbbl $-0x1, %ebp
movq %r15, %rdi
xorl %esi, %esi
callq 0x28d5
cmpq $0x1, %rax
sbbl $-0x1, %ebp
movq %r12, %rdi
movq %rbx, %rsi
callq 0x28d5
cmpq $0x1, %rax
sbbl $-0x1, %ebp
movq %r13, %rdi
movq %rbx, %rsi
callq 0x28d5
cmpq $0x1, %rax
sbbl $-0x1, %ebp
pushq $0x10
popq %rdi
callq 0x2b12
movq %rax, %rbx
pushq $0x20
popq %rdi
callq 0x2b12
testq %rax, %rax
setne %al
orl %ebp, %ebx
setne %cl
orb %al, %cl
movzbl %cl, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]libcperciva/tests/crypto_aesctr/main.c
// Function: print_hardware
static void
print_hardware(const char * str)
{

	/* Inform the user of the general topic... */
	printf("%s", str);

	/* ... and whether we're using hardware acceleration or not. */
#if defined(CPUSUPPORT_CONFIG_FILE)
#ifdef CPUSUPPORT_X86_AESNI
	if (cpusupport_x86_aesni())
		printf(" using hardware AESNI.\n");
	else
#endif
#ifdef CPUSUPPORT_ARM_AES
	if (cpusupport_arm_aes())
		printf(" using hardware ARM-AES.\n");
	else
#endif
		printf(" using software AES.\n");
#else
	printf(" with unknown hardware acceleration status.\n");
#endif /* CPUSUPPORT_CONFIG_FILE */
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rsi
leaq 0x3582(%rip), %rdi      # 0x5c3f
xorl %eax, %eax
callq 0x2030
leaq 0x6b81(%rip), %r14      # 0x924c
leaq 0x2fa4(%rip), %rbx      # 0x5676
cmpl $0x0, (%r14)
jne 0x2701
leaq 0x6b71(%rip), %r15      # 0x9250
cmpl $0x0, (%r15)
je 0x26ee
leaq 0x2f75(%rip), %rbx      # 0x5661
jmp 0x2701
callq 0x2e74
movl %eax, (%r14)
movl $0x1, (%r15)
testl %eax, %eax
je 0x26e5
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2080
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]libcperciva/tests/crypto_aesctr/main.c
// Function: perftest_func
static int
perftest_func(void * cookie, uint8_t * buf, size_t buflen, size_t nreps)
{
	struct crypto_aesctr * aesctr = cookie;
	size_t i;

	/* Do the encryption. */
	for (i = 0; i < nreps; i++)
		crypto_aesctr_stream(aesctr, buf, buf, buflen);

	/* Success! */
	return (0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
subq $0x1, %rbx
jb 0x2759
movq %r12, %rdi
movq %r15, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x37f7
jmp 0x2740
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]libcperciva/tests/crypto_aesctr/main.c
// Function: selftest_cases
static size_t
selftest_cases(const struct testcase * tests, size_t num_tests, uint64_t nonce)
{
	struct crypto_aes_key * key_exp;
	uint8_t plaintext_arr[MAX_PLAINTEXT_LENGTH];
	uint8_t ciphertext_arr[MAX_PLAINTEXT_LENGTH];
	uint8_t cbuf[MAX_PLAINTEXT_LENGTH];
	size_t keylen;
	size_t i;
	size_t len;
	size_t failures = 0;

	/* Inform user about the hardware optimization status. */
	print_hardware("Checking test vectors of AES");

	/* Run regular test cases. */
	for (i = 0; i < num_tests; i++) {
		/* Prepare for the test case. */
		if (parse_testcase(tests[i], &key_exp, &keylen,
		    plaintext_arr, ciphertext_arr)) {
			warn0("parse_testcase");
			goto err0;
		}
		printf("Computing %zu-bit AES-CTR of \"%s\"...",
		    keylen * 8, tests[i].plaintext_str);

		/* Plaintext length. */
		len = strlen(tests[i].plaintext_str);

		/* Encrypt with AES-CTR. */
		crypto_aesctr_buf(key_exp, nonce, plaintext_arr,
		    cbuf, len);

		/* Check result. */
		if (memcmp(cbuf, ciphertext_arr, len)) {
			printf(" FAILED!\n");
			print_arr("Computed AES:\t", cbuf, len);
			print_arr("Correct AES:\t", ciphertext_arr, len);
			failures++;
		} else {
			printf(" PASSED!\n");
		}

		/* Clean up. */
		crypto_aes_key_free(key_exp);
	}

	return (failures);

err0:
	/* Failure! */
	return (1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, 0x28(%rsp)
movq %rdi, %r14
leaq 0x28b0(%rip), %rdi      # 0x5037
callq 0x26ae
leaq 0x80(%rsp), %rbx
leaq 0x60(%rsp), %r12
leaq 0x40(%rsp), %rbp
xorl %r15d, %r15d
movq $0x0, 0x20(%rsp)
cmpq $0xd8, %r15
je 0x28a3
movq 0x10(%r14,%r15), %rax
movq %rax, 0x10(%rsp)
movups (%r14,%r15), %xmm0
movups %xmm0, (%rsp)
leaq 0x38(%rsp), %rdi
leaq 0x30(%rsp), %rsi
movq %rbx, %rdx
movq %r12, %rcx
callq 0x2cb3
testl %eax, %eax
jne 0x28aa
movq 0x30(%rsp), %rsi
shlq $0x3, %rsi
movq 0x8(%r14,%r15), %rdx
leaq 0x2867(%rip), %rdi      # 0x5063
xorl %eax, %eax
callq 0x2030
movq 0x8(%r14,%r15), %rdi
callq 0x2140
movq %rax, %r13
movq %rbx, %rdx
movq 0x38(%rsp), %rbx
movq %rbx, %rdi
movq 0x28(%rsp), %rsi
movq %rbp, %rcx
movq %rax, %r8
callq 0x398d
movq %rbp, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x2170
testl %eax, %eax
je 0x2874
leaq 0x2e52(%rip), %rdi      # 0x5696
callq 0x2080
leaq 0x2838(%rip), %rdi      # 0x5088
movq %rbp, %rsi
movq %r13, %rdx
callq 0x2e1c
leaq 0x2835(%rip), %rdi      # 0x5097
movq %r12, %rsi
movq %r13, %rdx
callq 0x2e1c
incq 0x20(%rsp)
jmp 0x2880
leaq 0x2e12(%rip), %rdi      # 0x568d
callq 0x2080
movq %rbx, %rdi
callq 0x2ffa
addq $0x18, %r15
leaq 0x80(%rsp), %rbx
leaq 0x60(%rsp), %r12
leaq 0x40(%rsp), %rbp
jmp 0x27aa
movq 0x20(%rsp), %rax
jmp 0x28c3
leaq 0x27a3(%rip), %rdi      # 0x5054
xorl %eax, %eax
callq 0x4b64
callq 0x21c0
andl $0x0, (%rax)
pushq $0x1
popq %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq