LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leal 0x1(%rbx), %eax
leal 0x4(%rbx), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
movq 0x8(%rdx), %r15
andl $-0x4, %ecx
negl %ecx
addl %ebx, %ecx
addl $0x2, %ecx
leaq 0x1886(%rip), %rsi      # 0x6866
movl %ebx, %edx
xorl %eax, %eax
callq 0x2180
leaq 0x47d0(%rip), %r12      # 0x97c0
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movl $0x2, %ecx
callq 0x539d
movl $0x2c, %edi
movq %r14, %rsi
callq 0x2160
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movl $0x3, %ecx
callq 0x539d
movl $0x2c, %edi
movq %r14, %rsi
callq 0x2160
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x539d
leal 0xf(%rbx), %eax
testl %ebx, %ebx
cmovnsl %ebx, %eax
andl $-0x10, %eax
movl %ebx, %ecx
subl %eax, %ecx
movslq %ecx, %rax
leaq 0x13e7(%rip), %rcx      # 0x6440
movslq (%rcx,%rax,4), %rax
leaq 0x141c(%rip), %rdx      # 0x6480
movslq (%rdx,%rax,4), %rcx
addq %rdx, %rcx
leaq 0x1801(%rip), %rsi      # 0x6873
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2180
// File: /workspace/github_c_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movq 0x8(%rdx), %r15
xorl %ebp, %ebp
leaq 0x479d(%rip), %r12      # 0x9840
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movl %ebp, %ecx
callq 0x539d
incl %ebp
cmpl $0x4, %ebp
jne 0x50a3
leal 0x3(%rbx), %eax
leal 0xf(%rbx), %edx
testl %ebx, %ebx
cmovnsl %ebx, %eax
cmovnsl %ebx, %edx
andl $-0x4, %eax
movl %ebx, %ecx
subl %eax, %ecx
movslq %ecx, %rax
leaq 0x3cd7(%rip), %rcx      # 0x8db0
movq (%rcx,%rax,8), %rcx
andl $-0x10, %edx
movl %ebx, %eax
subl %edx, %eax
cltq
leaq 0x1353(%rip), %rdx      # 0x6440
movslq (%rdx,%rax,4), %rax
leaq 0x1398(%rip), %rdx      # 0x6490
movslq (%rdx,%rax,4), %r8
addq %rdx, %r8
leaq 0x1792(%rip), %rsi      # 0x6898
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2180
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x1255(%rip), %rdi      # 0x668e
movl $0xb, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x21f0
leaq 0x1248(%rip), %rsi      # 0x669a
leaq 0xf84(%rip), %r8        # 0x63dd
movq %rbx, %rdi
movl $0x2, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x2180
xorl %ebp, %ebp
testl %r14d, %r14d
setne %bpl
leaq 0x125b(%rip), %rax      # 0x66d5
leaq 0x1259(%rip), %rdx      # 0x66da
cmovneq %rax, %rdx
leaq 0x123e(%rip), %rsi      # 0x66ca
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2180
leaq 0x1244(%rip), %rsi      # 0x66e1
movq %rbx, %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2180
movq 0x67d0(%rip), %rax      # 0xbc80
movl (%rax), %edx
movl $0x63, %r14d
cmpl %r14d, %edx
cmovgel %r14d, %edx
leaq 0x122a(%rip), %rsi      # 0x66f0
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2180
movq 0x67a9(%rip), %rax      # 0xbc80
movl 0x4(%rax), %eax
cmpl $0x63, %eax
cmovll %eax, %r14d
leaq 0x1217(%rip), %rsi      # 0x66ff
movq %rbx, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x2180
leaq 0x1210(%rip), %rdi      # 0x670c
movl $0x1a, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x21f0
leaq 0x1212(%rip), %rdi      # 0x6727
movl $0xc, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x21f0
leaq 0x1206(%rip), %rdi      # 0x6734
movl $0xd, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x21f0
movq 0x6739(%rip), %rax      # 0xbc80
xorl (%rax), %ebp
xorl 0x4(%rax), %ebp
leaq 0x11ef(%rip), %rsi      # 0x6742
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x2180
movq 0x671a(%rip), %rax      # 0xbc80
movl (%rax), %edx
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x5573
// File: /workspace/github_c_makefile_star2_O3/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 %esi, %ebp
incl %ebp
cmpl %edx, %ebp
jge 0x55c7
movl %edx, %ebx
movq %rdi, %r14
leaq 0x11bd(%rip), %r15      # 0x674f
leaq 0x11c9(%rip), %r12      # 0x6762
movl %ebp, %r13d
xorl $0xe, %r13d
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x2180
movq %r14, %rdi
movq %r12, %rsi
movl %ebp, %edx
movl %r13d, %ecx
xorl %eax, %eax
callq 0x2180
incl %ebp
cmpl %ebp, %ebx
jne 0x5599
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1203(%rip), %rdi      # 0x695e
xorl %esi, %esi
xorl %eax, %eax
callq 0x2190
testl %eax, %eax
js 0x579d
movl %eax, %ebx
leaq 0x10(%rsp), %rsi
movl $0x28, %edx
movl %eax, %edi
callq 0x2130
cmpl $0x28, %eax
jne 0x579d
movl %ebx, %edi
callq 0x2110
leaq 0x10(%rsp), %rdi
movl $0x28, %esi
movl $0x140, %edx            # imm = 0x140
callq 0x44e3
jmp 0x580b
callq 0x2070
leaq 0xc(%rsp), %rdi
movl %eax, (%rdi)
movl $0x4, %esi
movl $0x8, %edx
callq 0x44e3
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x5630
movl 0x40fd(%rip), %edx      # 0x98c8
shrl %edx
addl $0x6, %edx
movq %rbx, %rdi
movl $0x10, %esi
callq 0x44e3
leaq 0x6414(%rip), %rax      # 0xbbf8
movq (%rax), %rdi
testq %rdi, %rdi
je 0x580b
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rcx
movl 0x40cb(%rip), %r8d      # 0x98c8
leaq 0x1128(%rip), %rsi      # 0x692c
xorl %eax, %eax
callq 0x2180
addq $0x40, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x10, %edx
jne 0x30aa
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
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
movq %r9, %r12
movq %rcx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x1d0(%rsp), %rsi
addq $-0x8, %r8
movq %r8, (%r14)
leaq 0x10(%rsp), %rdi
movl $0x10, %edx
callq 0x1090
movl %eax, %ecx
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
testl %ecx, %ecx
jne 0x3719
movq 0x1c8(%rsp), %rcx
movq 0x1c0(%rsp), %rdx
leaq 0x10(%rsp), %r13
movl $0x8, %r8d
movq %r13, %rdi
movq %r12, %rsi
callq 0x1050
movq (%r14), %rdx
movl $0x2, (%rsp)
leaq 0x8(%rsp), %r8
movl $0x8, %r9d
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rcx
callq 0x10b0
addq (%r14), %rbx
xorl %eax, %eax
movb 0x8(%rsp,%rax), %cl
cmpb (%rbx,%rax), %cl
jne 0x3714
incq %rax
cmpq $0x8, %rax
jne 0x36fe
xorl %eax, %eax
jmp 0x3719
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x30d0(%rip), %rdi      # 0x6850
xorl %eax, %eax
callq 0x1030
movq 0x138(%rbx), %rsi
leaq 0x30d2(%rip), %rdi      # 0x6867
xorl %eax, %eax
callq 0x1030
movq 0x148(%rbx), %rsi
leaq 0x30dd(%rip), %rdi      # 0x6887
xorl %eax, %eax
callq 0x1030
movq 0x158(%rbx), %rsi
leaq 0x30de(%rip), %rdi      # 0x689d
xorl %eax, %eax
callq 0x1030
movq 0x168(%rbx), %rsi
leaq 0x30e3(%rip), %rdi      # 0x68b7
xorl %eax, %eax
callq 0x1030
movl 0x178(%rbx), %esi
leaq 0x30ea(%rip), %rdi      # 0x68d2
xorl %eax, %eax
popq %rbx
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
leaq 0x3777(%rip), %rdi      # 0x60d6
callq 0x2b88
movq 0x768d(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
callq 0x2250
movaps 0x3696(%rip), %xmm0     # 0x6010
movq %rsp, %rdi
movaps %xmm0, (%rdi)
movaps 0x3699(%rip), %xmm0     # 0x6020
movaps %xmm0, 0x10(%rdi)
movl $0x20, %esi
callq 0x39bb
testq %rax, %rax
je 0x2a2b
movq %rax, %rbx
callq 0x41a0
testq %rax, %rax
je 0x2a33
movq %rax, %r14
xorl %r15d, %r15d
movq %rax, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x41aa
subq $0x8, %rsp
leaq 0x239(%rip), %rax       # 0x2c06
leaq 0x3d9c(%rip), %rsi      # 0x6770
leaq 0x20d(%rip), %r9        # 0x2be8
movl $0x2000000, %edi        # imm = 0x2000000
movl $0xb, %edx
movl $0x9c4000, %ecx         # imm = 0x9C4000
movl $0x1, %r8d
pushq %r14
pushq $0x0
pushq %rax
callq 0x4f1c
addq $0x20, %rsp
testl %eax, %eax
je 0x2a21
leaq 0x36e9(%rip), %rdi      # 0x60f2
xorl %eax, %eax
callq 0x54b7
callq 0x21c0
movl $0x0, (%rax)
movl $0x1, %r15d
movq %r14, %rdi
callq 0x44fc
jmp 0x2a39
movl $0x1, %r15d
jmp 0x2a41
movl $0x1, %r15d
movq %rbx, %rdi
callq 0x3a5b
movl %r15d, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x7000(%rip), %r14      # 0x9a60
movq %r14, %rdi
xorl %esi, %esi
callq 0x2c43
xorl %ebx, %ebx
testq %rax, %rax
setne %bl
leaq 0x70c7(%rip), %r15      # 0x9b40
movq %r15, %rdi
xorl %esi, %esi
callq 0x2c43
leal 0x1(%rbx), %ebp
testq %rax, %rax
cmovel %ebx, %ebp
leaq 0x718d(%rip), %r12      # 0x9c20
movabsq $-0x123456789abcdf0, %rbx # imm = 0xFEDCBA9876543210
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2c43
cmpq $0x1, %rax
sbbl $-0x1, %ebp
leaq 0x724a(%rip), %r13      # 0x9d00
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2c43
cmpq $0x1, %rax
sbbl $-0x1, %ebp
movq %r14, %rdi
xorl %esi, %esi
callq 0x2db5
cmpq $0x1, %rax
sbbl $-0x1, %ebp
movq %r15, %rdi
xorl %esi, %esi
callq 0x2db5
cmpq $0x1, %rax
sbbl $-0x1, %ebp
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2db5
cmpq $0x1, %rax
sbbl $-0x1, %ebp
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2db5
cmpq $0x1, %rax
sbbl $-0x1, %ebp
movl $0x10, %edi
callq 0x2ff7
movq %rax, %rbx
movl $0x20, %edi
callq 0x2ff7
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_O3/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 0x418b(%rip), %rdi      # 0x6d22
xorl %eax, %eax
callq 0x2030
leaq 0x76a7(%rip), %r14      # 0xa24c
leaq 0x3b96(%rip), %rbx      # 0x6742
cmpl $0x0, (%r14)
jne 0x2bdb
leaq 0x7697(%rip), %r15      # 0xa250
cmpl $0x0, (%r15)
je 0x2bc8
leaq 0x3b67(%rip), %rbx      # 0x672d
jmp 0x2bdb
callq 0x38c8
movl %eax, (%r14)
movl $0x1, (%r15)
testl %eax, %eax
je 0x2bbf
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2080
// File: /workspace/github_c_makefile_star2_O3/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:
testq %rcx, %rcx
je 0x2c40
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x4292
decq %rbx
jne 0x2c1f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x34a0(%rip), %rdi      # 0x6103
callq 0x2b88
leaq 0x80(%rsp), %rbx
leaq 0x60(%rsp), %r15
leaq 0x40(%rsp), %r12
xorl %ebp, %ebp
movq $0x0, 0x20(%rsp)
movq 0x10(%r14,%rbp), %rax
movq %rax, 0x10(%rsp)
movups (%r14,%rbp), %xmm0
movups %xmm0, (%rsp)
leaq 0x38(%rsp), %rdi
leaq 0x30(%rsp), %rsi
movq %rbx, %rdx
movq %r15, %rcx
callq 0x36fa
testl %eax, %eax
jne 0x2d7b
movq 0x30(%rsp), %rsi
shlq $0x3, %rsi
movq 0x8(%r14,%rbp), %rdx
leaq 0x3465(%rip), %rdi      # 0x612f
xorl %eax, %eax
callq 0x2030
movq 0x8(%r14,%rbp), %rdi
callq 0x2140
movq %rax, %r13
movq %rbx, %rdx
movq 0x38(%rsp), %rbx
movq %rbx, %rdi
movq 0x28(%rsp), %rsi
movq %r12, %rcx
movq %rax, %r8
callq 0x4520
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x2170
testl %eax, %eax
je 0x2d42
leaq 0x3a50(%rip), %rdi      # 0x6762
callq 0x2080
leaq 0x3436(%rip), %rdi      # 0x6154
movq %r12, %rsi
movq %r13, %rdx
callq 0x386d
leaq 0x3433(%rip), %rdi      # 0x6163
movq %r15, %rsi
movq %r13, %rdx
callq 0x386d
incq 0x20(%rsp)
jmp 0x2d4e
leaq 0x3a10(%rip), %rdi      # 0x6759
callq 0x2080
movq %rbx, %rdi
callq 0x3a5b
addq $0x18, %rbp
cmpq $0xd8, %rbp
leaq 0x80(%rsp), %rbx
leaq 0x60(%rsp), %r15
leaq 0x40(%rsp), %r12
jne 0x2c85
jmp 0x2d9e
leaq 0x339e(%rip), %rdi      # 0x6120
xorl %eax, %eax
callq 0x54b7
callq 0x21c0
movl $0x0, (%rax)
movl $0x1, %eax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]libcperciva/tests/crypto_aesctr/main.c
// Function: parse_testcase
static int
parse_testcase(const struct testcase testcase,
    struct crypto_aes_key ** key_exp_p, size_t * keylen_p,
    uint8_t plaintext_arr[static MAX_PLAINTEXT_LENGTH],
    uint8_t ciphertext_arr[static MAX_PLAINTEXT_LENGTH])
{
	uint8_t key_unexpanded[32]; /* We will use 16 or 32 of these bytes. */
	const size_t len = strlen(testcase.plaintext_str);

	/* Determine key length. */
	*keylen_p = strlen(testcase.keytext_hex) / 2;

	/* Sanity check. */
	assert((*keylen_p == 16) || (*keylen_p == 32));
	assert(len <= MAX_PLAINTEXT_LENGTH);

	/* Prepare the key. */
	if (unhexify(testcase.keytext_hex, key_unexpanded, *keylen_p)) {
		warn0("unhexify(%s)", testcase.keytext_hex);
		goto err0;
	}
	if ((*key_exp_p = crypto_aes_key_expand(key_unexpanded, *keylen_p))
	    == NULL) {
		warn0("crypto_aes_key_expand");
		goto err0;
	}

	/* Prepare the arrays. */
	memcpy(plaintext_arr, testcase.plaintext_str, len);
	if (unhexify(testcase.ciphertext_hex, ciphertext_arr, len)) {
		warn0("unhexify(%s)", testcase.ciphertext_hex);
		goto err1;
	}

	/* Clean up.  Irrelevant for a test, but it's a good habit. */
	insecure_memzero(key_unexpanded, 32);

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, 0x8(%rsp)
movq %rdx, %r12
movq %rsi, %rbp
movq %rdi, %rbx
movq 0x78(%rsp), %r13
movq %r13, %rdi
callq 0x2140
movq %rax, %r15
movq 0x70(%rsp), %r14
movq %r14, %rdi
callq 0x2140
shrq %rax
movq %rax, (%rbp)
cmpq $0x10, %rax
je 0x374a
cmpq $0x20, %rax
jne 0x384e
cmpq $0x21, %r15
jae 0x382f
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
movq %rax, %rdx
callq 0x4e5b
testl %eax, %eax
je 0x3798
leaq 0x2ab0(%rip), %rdi      # 0x621f
movq %r14, %rsi
xorl %eax, %eax
callq 0x54b7
callq 0x21c0
movl $0x0, (%rax)
movl $0x1, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rbp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x39bb
movq %rax, (%rbx)
testq %rax, %rax
je 0x37ff
leaq 0x70(%rsp), %r14
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x2240
movq 0x10(%r14), %r14
movq %r14, %rdi
movq 0x8(%rsp), %rsi
movq %r15, %rdx
callq 0x4e5b
testl %eax, %eax
je 0x3812
leaq 0x2a3f(%rip), %rdi      # 0x621f
movq %r14, %rsi
xorl %eax, %eax
callq 0x54b7
callq 0x21c0
movl $0x0, (%rax)
movq (%rbx), %rdi
callq 0x3a5b
jmp 0x3784
leaq 0x2a26(%rip), %rdi      # 0x622c
xorl %eax, %eax
callq 0x54b7
jmp 0x3779
leaq 0x6a1f(%rip), %rax      # 0xa238
movq (%rax), %rax
leaq 0x10(%rsp), %rdi
movl $0x20, %esi
callq *%rax
xorl %eax, %eax
jmp 0x3789
leaq 0x29cd(%rip), %rdi      # 0x6203
leaq 0x295b(%rip), %rsi      # 0x6198
leaq 0x295b(%rip), %rcx      # 0x619f
movl $0xd8, %edx
callq 0x20a0
leaq 0x291c(%rip), %rdi      # 0x6171
leaq 0x293c(%rip), %rsi      # 0x6198
leaq 0x293c(%rip), %rcx      # 0x619f
movl $0xd7, %edx
callq 0x20a0
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]libcperciva/tests/crypto_aesctr/main.c
// Function: print_arr
static void
print_arr(const char * name, const uint8_t * arr, size_t len)
{
	size_t i;

	printf("%s", name);
	for (i = 0; i < len; i++)
		printf("%02x", arr[i]);
	printf("\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %rsi
leaq 0x349d(%rip), %rdi      # 0x6d22
xorl %eax, %eax
callq 0x2030
testq %rbx, %rbx
je 0x38b2
leaq 0x29aa(%rip), %r15      # 0x6242
xorl %r12d, %r12d
movzbl (%r14,%r12), %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x2030
incq %r12
cmpq %r12, %rbx
jne 0x389b
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x20b0
nop
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]libcperciva/liball/../crypto/crypto_aes.c
// Function: hwaccel_init
static void
hwaccel_init(void)
{

	/* If we've already set hwaccel, we're finished. */
	if (hwaccel != HW_UNSET)
		return;

	/* Default to software. */
	hwaccel = HW_SOFTWARE;

#if defined(CPUSUPPORT_X86_AESNI)
	CPUSUPPORT_VALIDATE(hwaccel, HW_X86_AESNI, cpusupport_x86_aesni(),
	    functest(x86_aesni_oneshot));
#endif
#if defined(CPUSUPPORT_ARM_AES)
	CPUSUPPORT_VALIDATE(hwaccel, HW_ARM_AES, cpusupport_arm_aes(),
	    functest(arm_aes_oneshot));
#endif

	/*
	 * If we're here, we're not using any intrinsics.  Test OpenSSL; if
	 * there's an error, print a warning and abort.
	 */
	if (functest(openssl_oneshot)) {
		warn0("OpenSSL gives incorrect AES values.");
		abort();
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x2, 0x6841(%rip)      # 0xa150
jne 0x399b
movl $0x0, 0x6831(%rip)      # 0xa150
leaq 0x6926(%rip), %rbx      # 0xa24c
cmpl $0x0, (%rbx)
je 0x3956
leaq 0x229(%rip), %rdi       # 0x3b5b
callq 0x3a95
testl %eax, %eax
je 0x3991
leaq 0x2efe(%rip), %rdi      # 0x6840
xorl %eax, %eax
callq 0x54b7
callq 0x21c0
movl $0x0, (%rax)
jmp 0x3963
leaq 0x68f3(%rip), %r14      # 0xa250
cmpl $0x0, (%r14)
je 0x39a3
leaq 0x22e(%rip), %rdi       # 0x3b98
callq 0x3a95
testl %eax, %eax
je 0x399b
leaq 0x2ef5(%rip), %rdi      # 0x686f
xorl %eax, %eax
callq 0x54b7
callq 0x21c0
movl $0x0, (%rax)
callq 0x2060
movl $0x1, 0x67b5(%rip)      # 0xa150
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x38c8
movl %eax, (%rbx)
movl $0x1, (%r14)
testl %eax, %eax
jne 0x392b
jmp 0x3963
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]libcperciva/liball/../crypto/crypto_aes.c
// Function: crypto_aes_key_expand
struct crypto_aes_key *
crypto_aes_key_expand(const uint8_t * key_unexpanded, size_t len)
{
	AES_KEY * kexp;

	/* Sanity-check. */
	assert((len == 16) || (len == 32));

#ifdef HWACCEL
	/* Ensure that we've chosen the type of hardware acceleration. */
	hwaccel_init();

#ifdef CPUSUPPORT_X86_AESNI
	if (hwaccel == HW_X86_AESNI)
		return (crypto_aes_key_expand_aesni(key_unexpanded, len));
#endif
#ifdef CPUSUPPORT_ARM_AES
	if (hwaccel == HW_ARM_AES)
		return (crypto_aes_key_expand_arm(key_unexpanded, len));
#endif
#endif /* HWACCEL */

	/* Allocate structure. */
	if ((kexp = malloc(sizeof(AES_KEY))) == NULL)
		goto err0;

	/* Expand the key. */
	if (AES_set_encrypt_key(key_unexpanded, (int)(len * 8), kexp) != 0)
		goto err1;

	/* Success! */
	return ((void *)kexp);

err1:
	free(kexp);
err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
cmpq $0x10, %rsi
je 0x39d2
cmpq $0x20, %rbx
jne 0x3a2a
callq 0x3904
cmpl $0x1, 0x6772(%rip)      # 0xa150
jne 0x39f0
movq %r15, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x3bf8
movl $0xf4, %edi
callq 0x20d0
testq %rax, %rax
je 0x3a1e
movq %rax, %r14
shll $0x3, %ebx
movq %r15, %rdi
movl %ebx, %esi
movq %rax, %rdx
callq 0x2260
testl %eax, %eax
je 0x3a21
movq %r14, %rdi
callq 0x2130
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2d97(%rip), %rdi      # 0x67c8
leaq 0x2dab(%rip), %rsi      # 0x67e3
leaq 0x2dbb(%rip), %rcx      # 0x67fa
movl $0xf1, %edx
callq 0x20a0
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]libcperciva/liball/../crypto/crypto_aes.c
// Function: functest
static int
functest(int (* func)(const uint8_t *, size_t, const uint8_t[16], uint8_t[16]))
{
	struct aes_test * knowngood;
	uint8_t ctext[16];
	size_t i;

	for (i = 0; i < sizeof(testcases) / sizeof(testcases[0]); i++) {
		knowngood = &testcases[i];

		/* Sanity-check. */
		assert((knowngood->len == 16) || (knowngood->len == 32));

		/* Expand the key and encrypt with the provided function. */
		if (func(knowngood->key, knowngood->len, knowngood->ptext,
		    ctext))
			goto err0;

		/* Does the output match the known good value? */
		if (memcmp(knowngood->ctext, ctext, 16))
			goto err0;
	}

	/* Success! */
	return (0);

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

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorl %r12d, %r12d
leaq 0x66b1(%rip), %r13      # 0xa160
movq %rsp, %r14
xorl %eax, %eax
leaq (%rax,%rax,8), %rax
movq 0x20(%r13,%rax,8), %rsi
cmpq $0x10, %rsi
je 0x3ac9
cmpq $0x20, %rsi
jne 0x3b3c
leaq (,%rax,8), %r15
addq %r13, %r15
leaq 0x28(%r15), %rdx
movq %r15, %rdi
movq %r14, %rcx
callq *%rbx
testl %eax, %eax
jne 0x3b29
movdqu 0x38(%r15), %xmm0
pcmpeqb (%rsp), %xmm0
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
sete %cl
xorb $0x1, %r12b
movl $0x1, %eax
testb %r12b, %cl
movb $0x1, %r12b
jne 0x3ab4
movq (%rsp), %rcx
movq 0x8(%rsp), %rdx
xorq 0x38(%r15), %rcx
xorq 0x40(%r15), %rdx
xorl %eax, %eax
orq %rcx, %rdx
setne %al
negl %eax
jmp 0x3b2e
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x2d50(%rip), %rdi      # 0x6893
leaq 0x2c99(%rip), %rsi      # 0x67e3
leaq 0x2d73(%rip), %rcx      # 0x68c4
movl $0x54, %edx
callq 0x20a0
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]libcperciva/liball/../crypto/crypto_aes.c
// Function: x86_aesni_oneshot
static int
x86_aesni_oneshot(const uint8_t * key_unexpanded, size_t len,
    const uint8_t ptext[16], uint8_t ctext[16])
{
	void * kexp_hw;

	/* Expand the key and encrypt with hardware intrinsics. */
	if ((kexp_hw = crypto_aes_key_expand_aesni(key_unexpanded, len))
	    == NULL)
		goto err0;
	crypto_aes_encrypt_block_aesni(ptext, ctext, kexp_hw);
	crypto_aes_key_free_aesni(kexp_hw);

	/* Success! */
	return (0);

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

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
callq 0x3bf8
testq %rax, %rax
je 0x3b8d
movq %rax, %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x4168
movq %r15, %rdi
callq 0x417c
xorl %eax, %eax
jmp 0x3b92
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]libcperciva/liball/../crypto/crypto_aes.c
// Function: openssl_oneshot
static int
openssl_oneshot(const uint8_t * key_unexpanded, size_t len,
    const uint8_t ptext[16], uint8_t * ctext)
{
	AES_KEY kexp_actual;
	AES_KEY * kexp = &kexp_actual;

	/* Expand the key, encrypt, and clean up. */
	if (AES_set_encrypt_key(key_unexpanded, (int)(len * 8), kexp) != 0)
		goto err0;
	AES_encrypt(ptext, ctext, kexp);
	insecure_memzero(kexp, sizeof(AES_KEY));

	/* Success! */
	return (0);

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

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rcx, %rbx
movq %rdx, %r14
shll $0x3, %esi
leaq 0xc(%rsp), %rdx
callq 0x2260
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x3beb
leaq 0xc(%rsp), %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x2160
leaq 0x665c(%rip), %rax      # 0xa238
movq (%rax), %rax
movl $0xf4, %esi
movq %r15, %rdi
callq *%rax
xorl %eax, %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]libcperciva/liball/../crypto/crypto_aesctr.c
// Function: crypto_aesctr_init2
void
crypto_aesctr_init2(struct crypto_aesctr * stream,
    const struct crypto_aes_key * key, uint64_t nonce)
{

	/* If the key is NULL, retain the previous AES key. */
	if (key != NULL)
		stream->key = key;

	/* Set nonce as provided and reset bytectr. */
	be64enc(stream->pblk, nonce);
	stream->bytectr = 0;

	/*
	 * Set the counter such that the least significant byte will wrap once
	 * incremented.
	 */
	stream->pblk[15] = 0xff;

#ifdef HWACCEL
	hwaccel_init();
#endif

	/* Sanity check. */
	assert(stream->key != NULL);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testq %rsi, %rsi
je 0x41b6
movq %rsi, (%rbx)
bswapq %rdx
movq %rdx, 0x20(%rbx)
movq $0x0, 0x8(%rbx)
movb $-0x1, 0x2f(%rbx)
cmpl $0x2, 0x6020(%rip)      # 0xa1f0
jne 0x41f4
movl $0x0, 0x6014(%rip)      # 0xa1f0
callq 0x38f0
testl %eax, %eax
je 0x41f4
cmpl $0x1, %eax
jne 0x421b
movl $0x1, 0x5ffc(%rip)      # 0xa1f0
cmpq $0x0, (%rbx)
je 0x41fc
popq %rbx
retq
leaq 0x2732(%rip), %rdi      # 0x6935
leaq 0x273f(%rip), %rsi      # 0x6949
leaq 0x2752(%rip), %rcx      # 0x6963
movl $0x80, %edx
callq 0x20a0
leaq 0x2881(%rip), %rdi      # 0x6aa3
leaq 0x2720(%rip), %rsi      # 0x6949
leaq 0x2843(%rip), %rcx      # 0x6a73
movl $0x48, %edx
callq 0x20a0
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]libcperciva/liball/../crypto/crypto_aesctr.c
// Function: crypto_aesctr_init
struct crypto_aesctr *
crypto_aesctr_init(const struct crypto_aes_key * key, uint64_t nonce)
{
	struct crypto_aesctr * stream;

	/* Sanity check. */
	assert(key != NULL);

	/* Allocate memory. */
	if ((stream = crypto_aesctr_alloc()) == NULL)
		goto err0;

	/* Initialize values. */
	crypto_aesctr_init2(stream, key, nonce);

	/* Success! */
	return (stream);

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

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x4273
movq %rsi, %rbx
movq %rdi, %r14
movl $0x30, %edi
callq 0x20d0
movq %rax, %r15
testq %rax, %rax
je 0x426a
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x41aa
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x26c3(%rip), %rdi      # 0x693d
leaq 0x26c8(%rip), %rsi      # 0x6949
leaq 0x2735(%rip), %rcx      # 0x69bd
movl $0x90, %edx
callq 0x20a0
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]libcperciva/liball/../crypto/crypto_aesctr.c
// Function: crypto_aesctr_buf
void
crypto_aesctr_buf(const struct crypto_aes_key * key, uint64_t nonce,
    const uint8_t * inbuf, uint8_t * outbuf, size_t buflen)
{
	struct crypto_aesctr stream_rec;
	struct crypto_aesctr * stream = &stream_rec;

	/* Sanity check. */
	assert(key != NULL);

	/* Initialize values. */
	crypto_aesctr_init2(stream, key, nonce);

	/* Perform the encryption. */
	crypto_aesctr_stream(stream, inbuf, outbuf, buflen);

	/* Zero potentially sensitive information. */
	insecure_memzero(stream, sizeof(struct crypto_aesctr));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
testq %rdi, %rdi
je 0x457d
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %rdx
movq %rdi, %rsi
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x41aa
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x4292
leaq 0x5cd4(%rip), %rax      # 0xa238
movq (%rax), %rax
movl $0x30, %esi
movq %r12, %rdi
callq *%rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x23b9(%rip), %rdi      # 0x693d
leaq 0x23be(%rip), %rsi      # 0x6949
leaq 0x247d(%rip), %rcx      # 0x6a0f
movl $0xed, %edx
callq 0x20a0
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]libcperciva/liball/../crypto/crypto_aesctr_aesni.c
// Function: crypto_aesctr_aesni_stream
void
crypto_aesctr_aesni_stream(struct crypto_aesctr * stream, const uint8_t * inbuf,
    uint8_t * outbuf, size_t buflen)
{

	/* Process any bytes before we can process a whole block. */
	if (crypto_aesctr_stream_pre_wholeblock(stream, &inbuf, &outbuf,
	    &buflen))
		return;

	/* Process whole blocks of 16 bytes. */
	if (buflen >= 16)
		crypto_aesctr_aesni_stream_wholeblocks(stream, &inbuf,
		    &outbuf, &buflen);

	/* Process any final bytes after finishing all whole blocks. */
	crypto_aesctr_stream_post_wholeblock(stream, &inbuf, &outbuf, &buflen);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbp
movq 0x8(%rdi), %r14
movq %r14, %rdx
andq $0xf, %rdx
je 0x4632
leaq (%rdx,%rcx), %rax
cmpq $0x10, %rax
ja 0x45f8
testq %rcx, %rcx
je 0x45f0
leaq (%rdx,%rbp), %rax
addq $0x10, %rax
xorl %esi, %esi
movb (%rax,%rsi), %dl
xorb (%r12,%rsi), %dl
movb %dl, (%r15,%rsi)
incq %rsi
cmpq %rsi, %rcx
jne 0x45d9
movq 0x8(%rbp), %r14
addq %rcx, %r14
jmp 0x4748
movl $0x10, %eax
subq %rdx, %rax
leaq (%rdx,%rbp), %rdi
addq $0x10, %rdi
xorl %edx, %edx
movb (%rdi,%rdx), %sil
xorb (%r12,%rdx), %sil
movb %sil, (%r15,%rdx)
incq %rdx
cmpq %rdx, %rax
jne 0x460a
movq 0x8(%rbp), %r14
addq %rax, %r14
movq %r14, 0x8(%rbp)
addq %rax, %r12
addq %rax, %r15
subq %rax, %rcx
cmpq $0x10, %rcx
jb 0x46b0
movq 0x20(%rbp), %xmm0
movdqa %xmm0, 0x10(%rsp)
shrq $0x4, %r14
movq %rbp, %rbx
movq %rcx, 0x8(%rsp)
movq %rcx, %rbp
shrq $0x4, %rbp
movq %r14, %r13
bswapq %r13
movq %r13, %xmm1
movdqa 0x10(%rsp), %xmm0
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movq (%rbx), %rdi
callq 0x40e5
movdqu (%r12), %xmm1
pxor %xmm0, %xmm1
movdqu %xmm1, (%r15)
incq %r14
addq $0x10, %r12
addq $0x10, %r15
decq %rbp
jne 0x4656
movq 0x8(%rsp), %rcx
movq %rcx, %r14
andq $-0x10, %r14
andl $0xf, %ecx
movq %r13, 0x28(%rbx)
addq 0x8(%rbx), %r14
movq %r14, 0x8(%rbx)
movq %rbx, %rbp
testq %rcx, %rcx
je 0x474c
testb $0xf, %r14b
jne 0x475b
movq %rcx, %rbx
incb 0x2f(%rbp)
jne 0x4716
movl %r14d, %eax
shrl $0x4, %eax
movb %al, 0x2f(%rbp)
movl %r14d, %eax
shrl $0xc, %eax
movb %al, 0x2e(%rbp)
movl %r14d, %eax
shrl $0x14, %eax
movb %al, 0x2d(%rbp)
movq %r14, %rax
shrq $0x1c, %rax
movb %al, 0x2c(%rbp)
movq %r14, %rax
shrq $0x24, %rax
movb %al, 0x2b(%rbp)
movq %r14, %rax
shrq $0x2c, %rax
movb %al, 0x2a(%rbp)
movq %r14, %rax
shrq $0x34, %rax
movb %al, 0x29(%rbp)
shrq $0x3c, %r14
movb %r14b, 0x28(%rbp)
leaq 0x20(%rbp), %rdi
leaq 0x10(%rbp), %r13
movq (%rbp), %rdx
movq %r13, %rsi
callq 0x3a49
xorl %eax, %eax
movq %rbx, %r14
movb (%r13,%rax), %cl
xorb (%r12,%rax), %cl
movb %cl, (%r15,%rax)
incq %rax
cmpq %rax, %r14
jne 0x472f
addq 0x8(%rbp), %r14
movq %r14, 0x8(%rbp)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2329(%rip), %rdi      # 0x6a8b
leaq 0x233c(%rip), %rsi      # 0x6aa5
leaq 0x2356(%rip), %rcx      # 0x6ac6
movl $0x15, %edx
callq 0x20a0
nop
// File: /workspace/github_c_makefile_star2_O3/vrancurel[P]ec/gf.c
// Function: setup_tables
int setup_tables()
{
  u_int b, log, x_to_w, prim_poly;

  switch(W) {
  case 4:  prim_poly = prim_poly_4;  break;
  case 8:  prim_poly = prim_poly_8;  break;
  case 16: prim_poly = prim_poly_16; break;
  default: return -1;
  }
  x_to_w = 1 << W;
  gflog  = (unsigned short *) xmalloc (sizeof(unsigned short) * x_to_w);
  gfilog = (unsigned short *) xmalloc (sizeof(unsigned short) * x_to_w);
  b = 1;
  for (log = 0; log < x_to_w-1; log++) {
    gflog[b] = (unsigned short) log;
    gfilog[log] = (unsigned short) b;
    b = b << 1;
    if (b & x_to_w) b = b ^ prim_poly;
  }
  return 0; 
}

// Assembly:
pushq %rbx
movl 0x3d27(%rip), %ebx      # 0x50d0
movl $0x20, %edi
callq 0x2d06
movq %rax, 0x3d2e(%rip)      # 0x50e8
movl $0x20, %edi
callq 0x2d06
movq %rax, 0x3d25(%rip)      # 0x50f0
movl $0x1, %ecx
xorl %edx, %edx
movq 0x3d0f(%rip), %rsi      # 0x50e8
movl %ecx, %edi
movw %dx, (%rsi,%rdi,2)
movw %cx, (%rax,%rdx,2)
leal (%rcx,%rcx), %edi
shll $0x1c, %ecx
sarl $0x1f, %ecx
andl %ebx, %ecx
xorl %edi, %ecx
incq %rdx
cmpq $0xf, %rdx
jne 0x13d9
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/vrancurel[P]ec/gf.c
// Function: dump_tables
void dump_tables()
{
  u_int log, x_to_w;

  x_to_w = 1 << W;
  for (log = 0; log < x_to_w-1; log++) {
    printf("%d ", gflog[log]);
  }
  printf("\n");
  for (log = 0; log < x_to_w-1; log++) {
    printf("%d ", gfilog[log]);
  }
  printf("\n");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x1bfc(%rip), %rbx      # 0x3004
xorl %r14d, %r14d
movq 0x3cd6(%rip), %rax      # 0x50e8
movzwl (%rax,%r14,2), %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1070
incq %r14
cmpq $0xf, %r14
jne 0x140b
movl $0xa, %edi
callq 0x1040
leaq 0x1bc9(%rip), %rbx      # 0x3004
xorl %r14d, %r14d
movq 0x3cab(%rip), %rax      # 0x50f0
movzwl (%rax,%r14,2), %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1070
incq %r14
cmpq $0xf, %r14
jne 0x143e
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O3/vrancurel[P]ec/gf.c
// Function: gmul
int gmul(int a, int b)
{
  int sum_log;
  if (a == 0 || b == 0) return 0;
  sum_log = gflog[a] + gflog[b];
  if (sum_log >= NW-1) sum_log -= NW-1;
  return gfilog[sum_log];
}

// Assembly:
testl %edi, %edi
sete %cl
testl %esi, %esi
sete %dl
xorl %eax, %eax
orb %cl, %dl
jne 0x14ab
movq 0x3c63(%rip), %rax      # 0x50e8
movslq %edi, %rcx
movzwl (%rax,%rcx,2), %ecx
movslq %esi, %rdx
movzwl (%rax,%rdx,2), %eax
leal (%rax,%rcx), %edx
cmpl $0xf, %edx
leal -0xf(%rax,%rcx), %eax
cmovbl %edx, %eax
movq 0x3c49(%rip), %rcx      # 0x50f0
movzwl (%rcx,%rax,2), %eax
retq
// File: /workspace/github_c_makefile_star2_O3/vrancurel[P]ec/gf.c
// Function: gdiv
int gdiv(int a, int b)
{
  int diff_log;
  if (a == 0) return 0;
  if (b == 0) return -1;
  diff_log = gflog[a] - gflog[b];
  if (diff_log < 0) diff_log += NW-1;
  return gfilog[diff_log];
}

// Assembly:
testl %edi, %edi
je 0x14e1
testl %esi, %esi
je 0x14e4
movq 0x3c2d(%rip), %rax      # 0x50e8
movslq %edi, %rcx
movzwl (%rax,%rcx,2), %ecx
movslq %esi, %rdx
movzwl (%rax,%rdx,2), %eax
subl %eax, %ecx
leal 0xf(%rcx), %eax
testl %ecx, %ecx
cmovnsl %ecx, %eax
movq 0x3c16(%rip), %rcx      # 0x50f0
cltq
movzwl (%rcx,%rax,2), %eax
retq
xorl %eax, %eax
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O3/vrancurel[P]ec/gf.c
// Function: gpow
int gpow(int a, int b)
{
  int r, i;

  if (0 == b)
    return 1;

  if (1 == b)
    return a;

  r = a;
  for (i = 1; i < b;i++) {
    r = gmul(r, a);
  }

  return r;
}

// Assembly:
testl %esi, %esi
je 0x1543
cmpl $0x1, %esi
je 0x1540
jle 0x1540
movq 0x3bec(%rip), %rcx      # 0x50e8
movslq %edi, %rdx
movq 0x3bea(%rip), %r8       # 0x50f0
decl %esi
movl %edi, %r9d
xorl %eax, %eax
testl %edi, %edi
je 0x1538
testl %r9d, %r9d
je 0x1538
movslq %r9d, %rax
movzwl (%rcx,%rax,2), %eax
movzwl (%rcx,%rdx,2), %r9d
leal (%r9,%rax), %r10d
cmpl $0xf, %r10d
leal -0xf(%r9,%rax), %eax
cmovbl %r10d, %eax
movzwl (%r8,%rax,2), %eax
movl %eax, %r9d
decl %esi
jne 0x150b
retq
movl %edi, %eax
retq
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/vrancurel[P]ec/mat.c
// Function: mat_dump
void mat_dump(t_mat *mat)
{
  int i, j;
  
  for (i = 0;i < mat->n_rows;i++) {
    for (j = 0;j < mat->n_cols;j++) {
      printf("%d ", MAT_ITEM(mat, i, j));
    }
    printf("\n");
  }
}

// Assembly:
cmpl $0x0, (%rdi)
je 0x24d2
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xb7a(%rip), %r14       # 0x3004
xorl %ebp, %ebp
movl 0x4(%rbx), %eax
testl %eax, %eax
je 0x24b8
xorl %r15d, %r15d
movq 0x8(%rbx), %rcx
imull %ebp, %eax
addl %r15d, %eax
movl (%rcx,%rax,4), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1070
incl %r15d
movl 0x4(%rbx), %eax
cmpl %eax, %r15d
jb 0x2496
movl $0xa, %edi
callq 0x1040
incl %ebp
cmpl (%rbx), %ebp
jb 0x248c
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vrancurel[P]ec/mat.c
// Function: mat_vandermonde
t_mat *mat_vandermonde(u_int n_rows, u_int n_cols)
{
  t_mat *mat;
  int i, j;
  
  mat = mat_xcalloc(n_rows, n_cols);
  for (i = 0;i < n_rows;i++) {
    for (j = 0;j < n_cols;j++) {
      MAT_ITEM(mat, i, j) = gpow(j + 1, i); 
    }
  }
  return mat;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %ebp
callq 0x2407
movq %rax, %r14
testl %ebp, %ebp
je 0x2529
xorl %r15d, %r15d
testl %ebx, %ebx
je 0x2521
xorl %r13d, %r13d
leal 0x1(%r13), %r12d
movl %r12d, %edi
movl %r15d, %esi
callq 0x14ea
movq 0x8(%r14), %rcx
movl 0x4(%r14), %edx
imull %r15d, %edx
addl %r13d, %edx
movl %eax, (%rcx,%rdx,4)
movl %r12d, %r13d
cmpl %r12d, %ebx
jne 0x24f8
incl %r15d
cmpl %ebp, %r15d
jne 0x24f1
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vrancurel[P]ec/mat.c
// Function: mat_cauchy
t_mat *mat_cauchy(u_int n_rows, u_int n_cols)
{
  t_mat *mat;
  int i, j;

  mat = mat_xcalloc(n_rows, n_cols);
  for (i = 0;i < n_rows;i++) {
    for (j = 0;j < n_cols;j++) {
      MAT_ITEM(mat, i, j) = gdiv(1, (i ^ (j + n_rows)));
    }
  }

  /* do optimise */
  // convert 1st row to all 1s
  for (j = 0;j < n_cols;j++) {
    for (i = 0;i < n_rows;i++) {
      MAT_ITEM(mat, i, j) = gdiv(MAT_ITEM(mat, i, j), MAT_ITEM(mat, 0, j));
    }
  }
  // convert 1st element of each row to 1
  for (i = 1;i < n_rows;i++) {
    for (j = 0;j < n_cols;j++) {
      MAT_ITEM(mat, i, j) = gdiv(MAT_ITEM(mat, i, j), MAT_ITEM(mat, i, 0));
    }
  }

  return mat;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %r14d
callq 0x2407
movq %rax, %r15
testl %r14d, %r14d
je 0x2591
xorl %ebp, %ebp
testl %ebx, %ebx
je 0x258a
xorl %r12d, %r12d
leal (%r14,%r12), %esi
xorl %ebp, %esi
movl $0x1, %edi
callq 0x14ac
movq 0x8(%r15), %rcx
movl 0x4(%r15), %edx
imull %ebp, %edx
addl %r12d, %edx
movl %eax, (%rcx,%rdx,4)
incl %r12d
cmpl %r12d, %ebx
jne 0x2561
incl %ebp
cmpl %r14d, %ebp
jne 0x255a
testl %ebx, %ebx
je 0x25dc
movl %ebx, %r12d
xorl %r13d, %r13d
testl %r14d, %r14d
je 0x25d4
movq 0x8(%r15), %rcx
xorl %ebp, %ebp
movl 0x4(%r15), %eax
imull %ebp, %eax
addl %r13d, %eax
movl (%rcx,%rax,4), %edi
movl (%rcx,%r13,4), %esi
callq 0x14ac
movq 0x8(%r15), %rcx
movl 0x4(%r15), %edx
imull %ebp, %edx
addl %r13d, %edx
movl %eax, (%rcx,%rdx,4)
incl %ebp
cmpl %ebp, %r14d
jne 0x25a6
incq %r13
cmpq %r12, %r13
jne 0x259b
cmpl $0x2, %r14d
jb 0x2628
movl $0x1, %ebp
testl %ebx, %ebx
je 0x2621
movq 0x8(%r15), %rcx
xorl %r12d, %r12d
movl 0x4(%r15), %eax
imull %ebp, %eax
leal (%r12,%rax), %edx
movl (%rcx,%rdx,4), %edi
movl (%rcx,%rax,4), %esi
callq 0x14ac
movq 0x8(%r15), %rcx
movl 0x4(%r15), %edx
imull %ebp, %edx
addl %r12d, %edx
movl %eax, (%rcx,%rdx,4)
incl %r12d
cmpl %r12d, %ebx
jne 0x25f2
incl %ebp
cmpl %r14d, %ebp
jne 0x25e7
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vrancurel[P]ec/mat.c
// Function: mat_check_row_is_identity
int mat_check_row_is_identity(t_mat *mat, int row)
{
  int j;

  for (j = 0;j < mat->n_cols;j++) {
    if (MAT_ITEM(mat, row, j) != ((j == row) ? 1 : 0))
      return 0;
  }
  return 1;
}

// Assembly:
movl 0x4(%rdi), %ecx
movl $0x1, %eax
testq %rcx, %rcx
je 0x2671
movq 0x8(%rdi), %rdx
movl %ecx, %edi
imull %esi, %edi
movl %esi, %esi
xorl %r8d, %r8d
leal (%rdi,%r8), %r9d
xorl %r10d, %r10d
cmpq %r8, %rsi
sete %r10b
cmpl %r10d, (%rdx,%r9,4)
jne 0x2672
incq %r8
cmpq %r8, %rcx
jne 0x2655
retq
xorl %eax, %eax
retq