LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/janmojzis[P]mcencrypt/decrypt.c
// Function: decrypt
int decrypt(unsigned char *e, const unsigned char *sk, const unsigned char *c)
{
	int i, w = 0; 
	uint16_t check;	

	unsigned char r[ SYS_N/8 ];

	gf g[ SYS_T+1 ];
	gf L[ SYS_N ];

	gf s[ SYS_T*2 ];
	gf s_cmp[ SYS_T*2 ];
	gf locator[ SYS_T+1 ];
	gf images[ SYS_N ];

	gf t;

	/* // */

	for (i = 0; i < SYND_BYTES; i++)       r[i] = c[i];
	for (i = SYND_BYTES; i < SYS_N/8; i++) r[i] = 0;

	for (i = 0; i < SYS_T; i++) { g[i] = load2(sk); g[i] &= GFMASK; sk += 2; } g[ SYS_T ] = 1;

	support_gen(L, sk);

	synd(s, g, L, r);

	bm(locator, s);

	root(images, locator, L);

	/* // */
	
	for (i = 0; i < SYS_N/8; i++) 
		e[i] = 0;

	for (i = 0; i < SYS_N; i++)
	{
		t = gf_iszero(images[i]) & 1;

		e[ i/8 ] |= t << (i%8);
		w += t;

	}

	synd(s_cmp, g, L, e);

	/* // */

	check = w;
	check ^= SYS_T;

	for (i = 0; i < SYS_T*2; i++)
		check |= s[i] ^ s_cmp[i]; 

	check -= 1;
	check >>= 15;

	return check ^ 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x8a20, %rsp           # imm = 0x8A20
movq %rdx, %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x620(%rsp), %rdi
movl $0xd0, %edx
movq %rax, %rsi
callq 0x10a0
leaq 0x6f0(%rsp), %rdi
xorl %r12d, %r12d
movl $0x330, %edx            # imm = 0x330
xorl %esi, %esi
callq 0x1070
leaq (%r14,%r12), %rdi
callq 0x6f28
andl $0x1fff, %eax           # imm = 0x1FFF
movw %ax, (%rsp,%r12)
addq $0x2, %r12
cmpq $0x100, %r12            # imm = 0x100
jne 0x495c
movq %rsp, %r15
movw $0x1, 0x100(%r15)
addq %r12, %r14
leaq 0x4a20(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x1896
leaq 0x310(%rsp), %r14
leaq 0x620(%rsp), %rcx
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x6d8c
leaq 0x510(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x198c
leaq 0xa20(%rsp), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x6ac1
xorl %r14d, %r14d
movl $0x400, %edx            # imm = 0x400
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1070
xorl %ebp, %ebp
movzwl 0xa20(%rsp,%r14,2), %edi
callq 0x52a8
andl $0x1, %eax
movl %r14d, %ecx
andb $0x7, %cl
movl %eax, %edx
shlb %cl, %dl
movl %r14d, %ecx
shrl $0x3, %ecx
orb %dl, (%rbx,%rcx)
addl %eax, %ebp
incq %r14
cmpq $0x2000, %r14           # imm = 0x2000
jne 0x49f7
leaq 0x110(%rsp), %rdi
movq %rsp, %rsi
leaq 0x4a20(%rsp), %rdx
movq %rbx, %rcx
callq 0x6d8c
xorl $0x80, %ebp
movzwl %bp, %eax
movd %eax, %xmm0
xorl %eax, %eax
movdqa 0x110(%rsp,%rax,2), %xmm1
pxor 0x310(%rsp,%rax,2), %xmm1
por %xmm1, %xmm0
addq $0x8, %rax
cmpq $0x100, %rax            # imm = 0x100
jne 0x4a53
pshufd $0xee, %xmm0, %xmm1     # xmm1 = xmm0[2,3,2,3]
por %xmm0, %xmm1
pshufd $0x55, %xmm1, %xmm0     # xmm0 = xmm1[1,1,1,1]
por %xmm1, %xmm0
movdqa %xmm0, %xmm1
psrld $0x10, %xmm1
por %xmm0, %xmm1
movd %xmm1, %eax
negl %eax
movzwl %ax, %eax
shrl $0xf, %eax
addq $0x8a20, %rsp           # imm = 0x8A20
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/janmojzis[P]mcencrypt/die.c
// Function: die_usage
void die_usage(const char *name, const char *why, const char *usage) {
    cleanup();
    outs(name);
    outs(": usage: ");
    outs(name);
    outs(" ");
    outs(usage);
    outs("\n");
    outs(name);
    outs(": fatal: ");
    outs(why);
    outs(": ");
    outs(e_str(errno));
    outs("\n");
    flush();
    _exit(111);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
callq 0x122c
movq %r15, %rdi
callq 0x4b55
leaq 0x395e(%rip), %rdi      # 0x8430
callq 0x4b55
movq %r15, %rdi
callq 0x4b55
leaq 0x3952(%rip), %rdi      # 0x8438
callq 0x4b55
movq %r14, %rdi
callq 0x4b55
leaq 0x3940(%rip), %r14      # 0x843a
movq %r14, %rdi
callq 0x4b55
movq %r15, %rdi
callq 0x4b55
leaq 0x392b(%rip), %rdi      # 0x843c
callq 0x4b55
movq %rbx, %rdi
callq 0x4b55
leaq 0x3912(%rip), %rdi      # 0x8437
callq 0x4b55
callq 0x1040
movl (%rax), %edi
callq 0x4ca4
movq %rax, %rdi
callq 0x4b55
movq %r14, %rdi
callq 0x4b55
callq 0x4baa
movl $0x6f, %edi
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/janmojzis[P]mcencrypt/die.c
// Function: outs
static void outs(const char *x) {

    long long i;

    for(i = 0; x[i]; ++i) {
        if (buflen >= sizeof buf) flush();
        buf[buflen++] = x[i];
    }
}

// Assembly:
movb (%rdi), %al
testb %al, %al
je 0x4ba9
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x251fc7(%rip), %rcx    # 0x256b30
incq %rbx
leaq 0x251fcd(%rip), %r14    # 0x256b40
cmpq $0x100, %rcx            # imm = 0x100
jb 0x4b8b
callq 0x4baa
movb -0x1(%rbx), %al
movq 0x251fa5(%rip), %rcx    # 0x256b30
movb %al, (%rcx,%r14)
incq %rcx
movq %rcx, 0x251f97(%rip)    # 0x256b30
movb (%rbx), %al
incq %rbx
testb %al, %al
jne 0x4b73
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/janmojzis[P]mcencrypt/die.c
// Function: die_temp
void die_temp(const char *name, const char *why) {
    cleanup();
    outs(name);
    outs(": fatal: ");
    outs(why);
    if (errno) {
        outs(": ");
        outs(e_str(errno));
    }
    outs("\n");
    flush();
    _exit(111);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x122c
movq %r14, %rdi
callq 0x4b55
leaq 0x383f(%rip), %rdi      # 0x843c
callq 0x4b55
movq %rbx, %rdi
callq 0x4b55
callq 0x1040
cmpl $0x0, (%rax)
je 0x4c32
movq %rax, %rbx
leaq 0x3819(%rip), %rdi      # 0x8437
callq 0x4b55
movl (%rbx), %edi
callq 0x4ca4
movq %rax, %rdi
callq 0x4b55
leaq 0x3801(%rip), %rdi      # 0x843a
callq 0x4b55
callq 0x4baa
movl $0x6f, %edi
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/janmojzis[P]mcencrypt/die.c
// Function: die_perm
void die_perm(const char *name, const char *why) {
    cleanup();
    outs(name);
    outs(": fatal: ");
    outs(why);
    outs("\n");
    flush();
    _exit(100);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x122c
movq %r14, %rdi
callq 0x4b55
leaq 0x37d1(%rip), %rdi      # 0x843c
callq 0x4b55
movq %rbx, %rdi
callq 0x4b55
leaq 0x37bb(%rip), %rdi      # 0x843a
callq 0x4b55
callq 0x4baa
movl $0x64, %edi
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/janmojzis[P]mcencrypt/encrypt.c
// Function: syndrome
void syndrome(unsigned char *s, const unsigned char *pk, unsigned char *e)
{
	unsigned char b, row[SYS_N/8];
	const unsigned char *pk_ptr = pk;

	int i, j;

	for (i = 0; i < SYND_BYTES; i++)
		s[i] = 0;

	for (i = 0; i < PK_NROWS; i++)	
	{
		for (j = 0; j < SYS_N/8; j++) 
			row[j] = 0;

		for (j = 0; j < PK_ROW_BYTES; j++) 
			row[ SYS_N/8 - PK_ROW_BYTES + j ] = pk_ptr[j];

		row[i/8] |= 1 << (i%8);
		
		b = 0;
		for (j = 0; j < SYS_N/8; j++)
			b ^= row[j] & e[j];

		b ^= b >> 4;
		b ^= b >> 2;
		b ^= b >> 1;
		b &= 1;

		s[ i/8 ] |= (b << (i%8));

		pk_ptr += PK_ROW_BYTES;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %ebp, %ebp
movl $0xd0, %edx
xorl %esi, %esi
callq 0x1070
leaq 0xd0(%rsp), %r12
movq %rsp, %r13
movl $0xd0, %edx
movq %r13, %rdi
xorl %esi, %esi
callq 0x1070
movl $0x330, %edx            # imm = 0x330
movq %r12, %rdi
movq %r14, %rsi
callq 0x10a0
movl %ebp, %ecx
andl $0x7, %ecx
movl $0x1, %edx
shll %cl, %edx
movl %ebp, %eax
shrl $0x3, %eax
orb %dl, (%rsp,%rax)
pxor %xmm0, %xmm0
xorl %edx, %edx
movdqu (%rbx,%rdx), %xmm1
pand (%rsp,%rdx), %xmm1
pxor %xmm1, %xmm0
addq $0x10, %rdx
cmpq $0x400, %rdx            # imm = 0x400
jne 0x5048
pshufd $0xee, %xmm0, %xmm1     # xmm1 = xmm0[2,3,2,3]
pxor %xmm0, %xmm1
pshufd $0x55, %xmm1, %xmm0     # xmm0 = xmm1[1,1,1,1]
pxor %xmm1, %xmm0
movdqa %xmm0, %xmm1
psrld $0x10, %xmm1
pxor %xmm0, %xmm1
movdqa %xmm1, %xmm0
psrlw $0x8, %xmm0
pxor %xmm1, %xmm0
movd %xmm0, %edx
movl %edx, %esi
shrb $0x4, %sil
xorb %dl, %sil
movl %esi, %edx
shrb $0x2, %dl
xorb %sil, %dl
movl %edx, %esi
shrb %sil
xorb %dl, %sil
andb $0x1, %sil
movzbl %sil, %edx
shll %cl, %edx
orb %dl, (%r15,%rax)
addq $0x330, %r14            # imm = 0x330
incl %ebp
cmpl $0x680, %ebp            # imm = 0x680
jne 0x500f
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/janmojzis[P]mcencrypt/fsyncfd.c
// Function: fsyncfd
int fsyncfd(int fd) {

    struct stat st;

    if (fstat(fd, &st) == 0 && S_ISREG(st.st_mode)) {
        if (fsync(fd) == -1) return -1;
    }
    return 0;
}

// Assembly:
pushq %rbx
subq $0x90, %rsp
movl %edi, %ebx
movq %rsp, %rsi
callq 0x1120
testl %eax, %eax
jne 0x5296
movl $0xf000, %eax           # imm = 0xF000
andl 0x18(%rsp), %eax
cmpl $0x8000, %eax           # imm = 0x8000
jne 0x5296
movl %ebx, %edi
callq 0x10f0
cmpl $-0x1, %eax
je 0x52a1
xorl %eax, %eax
addq $0x90, %rsp
popq %rbx
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x5298
// File: /workspace/github_c_makefile_star2_O3/janmojzis[P]mcencrypt/gf.c
// Function: gf_mul
gf gf_mul(gf in0, gf in1)
{
	int i;

	uint64_t tmp;
	uint64_t t0;
	uint64_t t1;
	uint64_t t;

	t0 = in0;
	t1 = in1;

	tmp = t0 * (t1 & 1);

	for (i = 1; i < GFBITS; i++)
		tmp ^= (t0 * (t1 & (1 << i)));

	/* // */

	t = tmp & 0x1FF0000;
	tmp ^= (t >> 9) ^ (t >> 10) ^ (t >> 12) ^ (t >> 13);

	t = tmp & 0x000E000;
	tmp ^= (t >> 9) ^ (t >> 10) ^ (t >> 12) ^ (t >> 13);

	return tmp & GFMASK;
}

// Assembly:
xorl %edx, %edx
testb $0x1, %sil
cmovnel %edi, %edx
movl $0x1, %ecx
movl $0x1, %eax
shll %cl, %eax
andl %esi, %eax
imull %edi, %eax
xorl %eax, %edx
incl %ecx
cmpl $0xd, %ecx
jne 0x52c2
movl %edx, %eax
andl $0x1ff0000, %eax        # imm = 0x1FF0000
movl %eax, %ecx
shrl $0x9, %ecx
movl %eax, %esi
shrl $0xa, %esi
xorl %ecx, %esi
movl %eax, %ecx
shrl $0xc, %ecx
shrl $0xd, %eax
xorl %ecx, %eax
xorl %esi, %eax
xorl %edx, %eax
movl %eax, %ecx
andl $0xe000, %ecx           # imm = 0xE000
movl %ecx, %edx
shrl $0x9, %edx
movl %ecx, %esi
shrl $0xa, %esi
movl %ecx, %edi
shrl $0xc, %edi
xorl %edx, %edi
shrl $0xd, %ecx
andl $0x1fff, %eax           # imm = 0x1FFF
xorl %esi, %eax
xorl %edi, %eax
xorl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/janmojzis[P]mcencrypt/gf.c
// Function: GF_mul
void GF_mul(gf *out, gf *in0, gf *in1)
{
	int i, j;

	gf prod[255];

	for (i = 0; i < 255; i++)
		prod[i] = 0;

	for (i = 0; i < 128; i++)
		for (j = 0; j < 128; j++)
			prod[i+j] ^= gf_mul(in0[i], in1[j]);

	/* // */
 
	for (i = 254; i >= 128; i--)
	{
		prod[i - 123] ^= gf_mul(prod[i], (gf) 7682);
		prod[i - 125] ^= gf_mul(prod[i], (gf) 2159);
		prod[i - 128] ^= gf_mul(prod[i], (gf) 3597);
	}

	for (i = 0; i < 128; i++)
		out[i] = prod[i];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, 0x8(%rsp)
leaq 0x10(%rsp), %r12
xorl %r13d, %r13d
movl $0x1fe, %edx            # imm = 0x1FE
movq %r12, %rdi
xorl %esi, %esi
callq 0x1070
movzwl (%r15,%r13,2), %ebp
xorl %ebx, %ebx
movzwl (%r14,%rbx,2), %esi
movl %ebp, %edi
callq 0x52b4
xorw %ax, (%r12,%rbx,2)
incq %rbx
cmpq $0x80, %rbx
jne 0x5a3c
incq %r13
addq $0x2, %r12
cmpq $0x80, %r13
jne 0x5a35
movl $0xff, %r14d
movzwl 0xe(%rsp,%r14,2), %ebp
movl %ebp, %edi
movl $0x1e02, %esi           # imm = 0x1E02
callq 0x52b4
xorw %ax, -0xe8(%rsp,%r14,2)
movl %ebp, %edi
movl $0x86f, %esi            # imm = 0x86F
callq 0x52b4
xorw %ax, -0xec(%rsp,%r14,2)
movl %ebp, %edi
movl $0xe0d, %esi            # imm = 0xE0D
callq 0x52b4
xorw %ax, -0xf2(%rsp,%r14,2)
decq %r14
cmpq $0x80, %r14
ja 0x5a6f
leaq 0x10(%rsp), %rsi
movl $0x100, %edx            # imm = 0x100
movq 0x8(%rsp), %rdi
callq 0x10a0
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/janmojzis[P]mcencrypt/memreadall.c
// Function: memreadall
unsigned char *memreadall(unsigned long long *len, int fd) {

    unsigned char *buf = 0;
    unsigned char *newbuf;
    unsigned long long bufalloc = 0;
    unsigned long long pos = 0;
    long long r;

    for (;;) {
        if (bufalloc <= pos + CHUNK) {
            while (bufalloc <= pos + CHUNK) {
                bufalloc = bufalloc * 2 + CHUNK;
                if (bufalloc != (unsigned long long)(size_t)bufalloc) goto nomem;
                if (bufalloc >= MAX) goto nomem;
            }
            newbuf = realloc(buf, bufalloc);
            if (!newbuf) goto nomem;
            buf = newbuf;
        }

        r = read(fd, buf + pos, CHUNK);
        if (r == -1) { free(buf); return 0; }
        if (r == 0) { *len = pos; return buf; }
        pos += r;
    }
    

nomem:
    errno = ENOMEM;
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
xorl %ebx, %ebx
xorl %r15d, %r15d
xorl %r12d, %r12d
leaq 0x1000(%r12), %rax
cmpq %rax, %r15
ja 0x5b75
cmpq %rax, %r15
ja 0x5b62
leaq 0x1000(,%r15,2), %r15
movq %r15, %rcx
shrq $0x3e, %rcx
je 0x5b4a
jmp 0x5b95
movq %rbx, %rdi
movq %r15, %rsi
callq 0x10c0
movq %rax, %rbx
testq %rax, %rax
je 0x5b95
leaq (%rbx,%r12), %rsi
movl $0x1000, %edx           # imm = 0x1000
movl %ebp, %edi
callq 0x1090
testq %rax, %rax
je 0x5bae
cmpq $-0x1, %rax
je 0x5bb3
addq %rax, %r12
jmp 0x5b3d
callq 0x1040
movl $0xc, (%rax)
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r12, (%r14)
jmp 0x5ba2
movq %rbx, %rdi
callq 0x1030
jmp 0x5ba0
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/janmojzis[P]mcencrypt/operations.c
// Function: crypto_kem_mceliece8192128sha512_enc
int crypto_kem_mceliece8192128sha512_enc(
       unsigned char *c,
       unsigned char *key,
       const unsigned char *pk
)
{
	unsigned char two_e[ 1 + SYS_N/8 ] = {2};
	unsigned char *e = two_e + 1;
	unsigned char one_ec[ 1 + SYS_N/8 + (SYND_BYTES + 32) ] = {1};
	unsigned char conf[64];
    long long i;

	/* // */

	encrypt(c, pk, e);

	crypto_hash_sha512(conf, two_e, sizeof(two_e)); 
    for (i = 0; i < 32; ++i) c[SYND_BYTES + i] = conf[i];

	memcpy(one_ec + 1,e,SYS_N/8);
	memcpy(one_ec + 1 + SYS_N/8,c,SYND_BYTES + 32);

	crypto_hash_sha512(key, one_ec, sizeof one_ec);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x948, %rsp            # imm = 0x948
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x540(%rsp), %r12
movl $0x401, %edx            # imm = 0x401
movq %r12, %rdi
xorl %esi, %esi
callq 0x1070
movb $0x2, (%r12)
leaq 0x541(%rsp), %r13
leaq 0x41(%rsp), %rbp
movb $0x1, -0x1(%rbp)
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x50e1
movq %rsp, %r15
movl $0x401, %edx            # imm = 0x401
movq %r15, %rdi
movq %r12, %rsi
callq 0x460c
movaps (%r15), %xmm0
movaps 0x10(%r15), %xmm1
movups %xmm0, 0xd0(%r14)
movups %xmm1, 0xe0(%r14)
movl $0x400, %edx            # imm = 0x400
movq %rbp, %rdi
movq %r13, %rsi
callq 0x10a0
leaq 0x441(%rsp), %rdi
movl $0xf0, %edx
movq %r14, %rsi
callq 0x10a0
leaq 0x40(%rsp), %rsi
movl $0x4f1, %edx            # imm = 0x4F1
movq %rbx, %rdi
callq 0x460c
xorl %eax, %eax
addq $0x948, %rsp            # imm = 0x948
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/janmojzis[P]mcencrypt/poly1305.c
// Function: poly1305
void poly1305(unsigned char *o, const unsigned char *m, unsigned long long n, const unsigned char *k) {

    poly1305_ctx ctx;

    poly1305_init(&ctx, k);
    poly1305_blocks(&ctx, m, n);
    poly1305_final(&ctx, o);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rsp, %r12
movq %r12, %rdi
movq %rcx, %rsi
callq 0x6398
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x643d
movq %r12, %rdi
movq %r15, %rsi
callq 0x66ed
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/janmojzis[P]mcencrypt/poly1305.c
// Function: poly1305_verify
int poly1305_verify(const unsigned char *h, const unsigned char *in, unsigned long long l, const unsigned char *k) {

    unsigned char correct[16];
    unsigned int d = 0;
    long long i;

    poly1305(correct, in, l, k);

    for (i = 0; i < 16; ++i) d |= correct[i] ^ h[i];
    return (1 & ((d - 1) >> 8)) - 1;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x6880
pxor %xmm0, %xmm0
xorl %eax, %eax
pxor %xmm1, %xmm1
movl (%rbx,%rax), %ecx
xorl (%rsp,%rax), %ecx
movd %ecx, %xmm2
punpcklbw %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1],xmm2[2],xmm0[2],xmm2[3],xmm0[3],xmm2[4],xmm0[4],xmm2[5],xmm0[5],xmm2[6],xmm0[6],xmm2[7],xmm0[7]
punpcklwd %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1],xmm2[2],xmm0[2],xmm2[3],xmm0[3]
por %xmm2, %xmm1
addq $0x4, %rax
cmpq $0x10, %rax
jne 0x68e7
pshufd $0xee, %xmm1, %xmm0     # xmm0 = xmm1[2,3,2,3]
por %xmm1, %xmm0
pshufd $0x55, %xmm0, %xmm1     # xmm1 = xmm0[1,1,1,1]
por %xmm0, %xmm1
movd %xmm1, %ecx
decl %ecx
xorl %eax, %eax
btl $0x8, %ecx
adcl $-0x1, %eax
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O3/janmojzis[P]mcencrypt/randombytes.c
// Function: randombytes
void randombytes(void *xv, unsigned long long xlen) {

    long long i;
    unsigned char *x = xv;

    if (fd == -1) {
        for (;;) {
#ifdef O_CLOEXEC
            fd = open("/dev/urandom", O_RDONLY | O_CLOEXEC);
#else
            fd = open("/dev/urandom", O_RDONLY);
            fcntl(fd, F_SETFD, 1);
#endif
            if (fd != -1) break;
            sleep(1);
        }
    }

    while (xlen > 0) {
        if (xlen < 1048576) i = xlen; else i = 1048576;

        i = read(fd, x, i);
        if (i < 1) {
            sleep(1);
            continue;
        }

        x += i;
        xlen -= i;
    }
    __asm__ __volatile__("" : : "r"(xv) : "memory");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
cmpl $-0x1, 0x4762(%rip)     # 0xb0a8
jne 0x6991
leaq 0x24f1(%rip), %rdi      # 0x8e40
movl $0x80000, %esi          # imm = 0x80000
xorl %eax, %eax
callq 0x1100
movl %eax, 0x4747(%rip)      # 0xb0a8
cmpl $-0x1, %eax
jne 0x6991
leaq 0x24d3(%rip), %r15      # 0x8e40
movl $0x1, %edi
callq 0x1110
movq %r15, %rdi
movl $0x80000, %esi          # imm = 0x80000
xorl %eax, %eax
callq 0x1100
movl %eax, 0x471c(%rip)      # 0xb0a8
cmpl $-0x1, %eax
je 0x696d
testq %r14, %r14
je 0x69d6
movl $0x100000, %r13d        # imm = 0x100000
movq %rbx, %r15
cmpq %r13, %r14
movl $0x100000, %r12d        # imm = 0x100000
cmovbq %r14, %r12
movl 0x46f6(%rip), %edi      # 0xb0a8
movq %r15, %rsi
movq %r12, %rdx
callq 0x1090
testq %rax, %rax
jg 0x69ce
movl $0x1, %edi
callq 0x1110
jmp 0x69ac
addq %rax, %r15
subq %rax, %r14
jne 0x699f
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/janmojzis[P]mcencrypt/readblock.c
// Function: readblock
long long readblock(int fd, void *x, long long xlen) {

    long long r;
    char *buf = x;

    while (xlen > 0) {
        r = xlen;
        if (r > 1048576) r = 1048576; 
        r = read(fd, buf, r);
        if (r == 0) break;
        if (r == -1) {
            if (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK) {
                struct pollfd p;
                p.fd = fd;
                p.events = POLLIN;
                poll(&p, 1, -1);
                continue;
            }
            return -1;
        }
        buf += r; xlen -= r;
    }
    return (buf - (char *)x);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rsi, %r14
testq %rdx, %rdx
jle 0x6a67
movq %rdx, %r15
movl %edi, %ebp
movl $0x100000, %eax         # imm = 0x100000
movq %rsp, %r12
movq %rbx, %r14
cmpq %rax, %r15
movl $0x100000, %r13d        # imm = 0x100000
cmovbq %r15, %r13
movl %ebp, %edi
movq %r14, %rsi
movq %r13, %rdx
callq 0x1090
cmpq $-0x1, %rax
jne 0x6a55
callq 0x1040
movl (%rax), %eax
cmpl $0xb, %eax
je 0x6a37
cmpl $0x4, %eax
jne 0x6a6c
movl %ebp, (%rsp)
movw $0x1, 0x4(%rsp)
movl $0x1, %esi
movq %r12, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x10d0
jmp 0x6a13
testq %rax, %rax
je 0x6a67
addq %rax, %r14
subq %rax, %r15
movl $0x100000, %eax         # imm = 0x100000
jg 0x6a06
subq %rbx, %r14
jmp 0x6a73
movq $-0x1, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/janmojzis[P]mcencrypt/root.c
// Function: eval
gf eval(gf *f, gf a)
{
	int i;
	gf r;
	
	r = f[ SYS_T ];

	for (i = SYS_T-1; i >= 0; i--)
	{
		r = gf_mul(r, a);
		r = gf_add(r, f[i]);
	}

	return r;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movzwl 0x100(%rdi), %eax
movl $0x7f, %r14d
movzwl %si, %ebp
movzwl %ax, %edi
movl %ebp, %esi
callq 0x52b4
movzwl (%rbx,%r14,2), %esi
movzwl %ax, %edi
callq 0x52af
addq $-0x1, %r14
jb 0x6a9f
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/janmojzis[P]mcencrypt/synd.c
// Function: synd
void synd(gf *out, gf *f, gf *L, unsigned char *r)
{
	int i, j;
	gf e, e_inv, c;

	for (j = 0; j < 2*SYS_T; j++)
		out[j] = 0;

	for (i = 0; i < SYS_N; i++)
	{
		c = (r[i/8] >> (i%8)) & 1;

		e = eval(f, L[i]);
		e_inv = gf_inv(gf_mul(e,e));

		for (j = 0; j < 2*SYS_T; j++)
		{
			out[j] = gf_add(out[j], gf_mul(e_inv, c));
			e_inv = gf_mul(e_inv, L[i]);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x10(%rsp)
movq %rdx, %r15
movq %rsi, 0x8(%rsp)
movq %rdi, %r12
movq $0x0, (%rsp)
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
callq 0x1070
movq (%rsp), %rdx
movl %edx, %eax
shrl $0x3, %eax
movq 0x10(%rsp), %rcx
movzbl (%rcx,%rax), %eax
movl %edx, %ecx
andl $0x7, %ecx
xorl %ebx, %ebx
btl %ecx, %eax
setb %bl
movzwl (%r15,%rdx,2), %esi
movq 0x8(%rsp), %rdi
callq 0x6a88
movzwl %ax, %edi
movl %edi, %esi
callq 0x52b4
movzwl %ax, %edi
callq 0x59f8
movzwl %bx, %ebp
xorl %r14d, %r14d
movzwl (%r12,%r14,2), %r13d
movzwl %ax, %ebx
movl %ebx, %edi
movl %ebp, %esi
callq 0x52b4
movzwl %ax, %esi
movl %r13d, %edi
callq 0x52af
movw %ax, (%r12,%r14,2)
movq (%rsp), %rax
movzwl (%r15,%rax,2), %esi
movl %ebx, %edi
callq 0x52b4
incq %r14
cmpq $0x100, %r14            # imm = 0x100
jne 0x6e04
movq (%rsp), %rcx
incq %rcx
movq %rcx, (%rsp)
cmpq $0x2000, %rcx           # imm = 0x2000
jne 0x6dbe
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/janmojzis[P]mcencrypt/writeall.c
// Function: writeall
int writeall(int fd, const void *xv, long long xlen) {

    const unsigned char *x = xv;
    long long w;
    while (xlen > 0) {
        w = xlen;
        if (w > 1048576) w = 1048576;
        w = write(fd, x, w);
        if (w < 0) {
            if (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK) {
                struct pollfd p;
                p.fd = fd;
                p.events = POLLOUT | POLLERR;
                poll(&p, 1, -1);
                continue;
            }
            return -1;
        }
        x += w;
        xlen -= w;
    }
    return 0;
}

// Assembly:
xorl %eax, %eax
testq %rdx, %rdx
jle 0x7043
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %ebp
movl $0x100000, %ebx         # imm = 0x100000
movq %rsp, %r12
cmpq %rbx, %r14
movl $0x100000, %r13d        # imm = 0x100000
cmovbq %r14, %r13
movl %ebp, %edi
movq %r15, %rsi
movq %r13, %rdx
callq 0x1060
testq %rax, %rax
jns 0x7024
callq 0x1040
movq %rax, %rbx
movl (%rbx), %eax
cmpl $0xb, %eax
je 0x6ff1
cmpl $0x4, %eax
jne 0x7030
movl %ebp, (%rsp)
movw $0xc, 0x4(%rsp)
movl $0x1, %esi
movq %r12, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x10d0
movl %ebp, %edi
movq %r15, %rsi
movq %r13, %rdx
callq 0x1060
testq %rax, %rax
js 0x6fe5
movl $0x100000, %ebx         # imm = 0x100000
addq %rax, %r15
subq %rax, %r14
jg 0x6fbe
xorl %eax, %eax
jmp 0x7035
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/s3lase[P]v6shell/sh6.c
// Function: syntax
static struct tnode *
syntax(char **p1, char **p2)
{

	while (p1 < p2)
		if (any(**p1, EOC))
			p1++;
		else
			return syn1(p1, p2);
	return NULL;
}

// Assembly:
cmpq %rsi, %rdi
jae 0x2a52
leaq 0x2763(%rip), %rax      # 0x518b
movq (%rdi), %rcx
movb (%rcx), %cl
movq %rax, %rdx
movb (%rdx), %r8b
testb %r8b, %r8b
je 0x2a40
incq %rdx
cmpb %cl, %r8b
jne 0x2a30
testb %r8b, %r8b
je 0x34fb
addq $0x8, %rdi
cmpq %rsi, %rdi
jb 0x2a28
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/s3lase[P]v6shell/sh6.c
// Function: tfree
static void
tfree(struct tnode *t)
{

	if (t == NULL)
		return;
	switch (t->ntype) {
	case TLIST:
	case TPIPE:
		tfree(t->nleft);
		tfree(t->nright);
		break;
	case TCOMMAND:
		free(t->nav);
		break;
	case TSUBSHELL:
		tfree(t->nsub);
		break;
	}
	free(t);
}

// Assembly:
testq %rdi, %rdi
je 0x32af
pushq %rbx
movq %rdi, %rbx
movl 0x34(%rdi), %eax
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0x32b0
cmpl $0x3, %eax
je 0x32c3
cmpl $0x4, %eax
jne 0x32cc
movq 0x10(%rbx), %rdi
jmp 0x32bc
retq
movq (%rbx), %rdi
callq 0x328b
movq 0x8(%rbx), %rdi
callq 0x328b
jmp 0x32cc
movq 0x28(%rbx), %rdi
callq 0x2050
movq %rbx, %rdi
popq %rbx
jmp 0x2050
// File: /workspace/github_c_makefile_star2_O3/s3lase[P]v6shell/sh6.c
// Function: xgetc
static char
xgetc(bool dolsub)
{
	int n;
	char c;

	if (peekc != EOS) {
		c = peekc;
		peekc = EOS;
		return c;
	}

	if (wordp >= &word[WORDMAX - 5]) {
		wordp -= 10;
		while (xgetc(!DOLSUB) != EOL)
			;	/* nothing */
		wordp += 10;
		error_message = ERR_TMARGS;
		goto geterr;
	}
	if (linep >= &line[LINEMAX - 5]) {
		linep -= 10;
		while (xgetc(!DOLSUB) != EOL)
			;	/* nothing */
		linep += 10;
		error_message = ERR_TMCHARS;
		goto geterr;
	}

getd:
	if (dolp != NULL) {
		c = *dolp++ & ASCII;
		if (c != EOS)
			return c;
		dolp = NULL;
	}
	c = readc();
	if (c == DOLLAR && dolsub) {
		c = readc();
		if (c >= '0' && c <= '9') {
			n = c - '0';
			if (IS_DIGIT(n, c) && n < dolc)
				dolp = (n > 0) ? dolv[n] : name;
			goto getd;
		}
		if (c == DOLLAR) {
			dolp = apid;
			goto getd;
		}
	}
	/* Ignore all EOS/NUL characters. */
	if (c == EOS) do {
		if (++nul_count >= LINEMAX) {
			error_message = ERR_TMCHARS;
			goto geterr;
		}
		c = readc();
	} while (c == EOS);
	return c;

geterr:
	error = true;
	return EOL;
}

// Assembly:
movb 0x670d(%rip), %al       # 0x99e8
testb %al, %al
je 0x32e7
movb $0x0, 0x6702(%rip)      # 0x99e8
retq
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x66da(%rip), %rax      # 0x99d0
leaq 0x66ab(%rip), %rcx      # 0x99a8
cmpq %rcx, %rax
jae 0x33ce
movq 0x46b3(%rip), %rax      # 0x79c0
leaq 0x46a7(%rip), %rcx      # 0x79bb
cmpq %rcx, %rax
jae 0x33f9
movl %edi, %ebx
leaq 0x1e5a(%rip), %r14      # 0x5180
leaq 0x3e53(%rip), %r15      # 0x7180
leaq 0x66cc(%rip), %r12      # 0x9a00
movq 0x66b5(%rip), %rax      # 0x99f0
testq %rax, %rax
je 0x3360
leaq 0x1(%rax), %rcx
movq %rcx, 0x66a5(%rip)      # 0x99f0
movb (%rax), %al
andb $0x7f, %al
jne 0x3435
movq $0x0, 0x6690(%rip) # 0x99f0
callq 0x346d
cmpb $0x24, %al
jne 0x3441
testb %bl, %bl
je 0x3441
callq 0x346d
leal -0x30(%rax), %ecx
cmpb $0x9, %cl
jbe 0x3396
cmpb $0x24, %al
jne 0x3441
movq %r12, 0x665f(%rip)      # 0x99f0
movq %r12, %rax
jmp 0x333b
movzbl %al, %ecx
addl $-0x30, %ecx
cmpb %al, (%rcx,%r14)
jne 0x3334
cmpl 0x3de8(%rip), %ecx      # 0x7190
jge 0x3334
leaq (,%rcx,8), %rcx
addq 0x3dcf(%rip), %rcx      # 0x7188
cmpb $0x31, %al
cmovbq %r15, %rcx
movq (%rcx), %rax
movq %rax, 0x6627(%rip)      # 0x99f0
jmp 0x3334
addq $-0x50, %rax
movq %rax, 0x65f7(%rip)      # 0x99d0
leaq 0x1d7e(%rip), %rbx      # 0x515e
leaq 0x65e9(%rip), %r14      # 0x99d0
xorl %edi, %edi
callq 0x32d5
cmpb $0xa, %al
jne 0x33e7
movl $0x50, %eax
jmp 0x3422
addq $-0xa, %rax
movq %rax, 0x45bc(%rip)      # 0x79c0
leaq 0x1d61(%rip), %rbx      # 0x516c
leaq 0x45ae(%rip), %r14      # 0x79c0
xorl %edi, %edi
callq 0x32d5
cmpb $0xa, %al
jne 0x3412
movl $0xa, %eax
addq %rax, (%r14)
movq %rbx, 0x65b4(%rip)      # 0x99e0
movb $0x1, 0x65a5(%rip)      # 0x99d8
movb $0xa, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
testb %al, %al
jne 0x3435
leaq 0x1d20(%rip), %rbx      # 0x516c
movl 0x658a(%rip), %eax      # 0x99dc
leal 0x1(%rax), %ecx
movl %ecx, 0x6581(%rip)      # 0x99dc
cmpl $0x7fe, %eax            # imm = 0x7FE
jg 0x3425
callq 0x346d
testb %al, %al
je 0x344c
jmp 0x3435
// File: /workspace/github_c_makefile_star2_O3/s3lase[P]v6shell/sh6.c
// Function: readc
static char
readc(void)
{
	char c;

	if (argv2p != NULL) {
		if (argv2p == (char *)-1)
			exit(status);
		if ((c = (*argv2p++ & ASCII)) == EOS) {
			argv2p = (char *)-1;
			c = EOL;
		}
		return c;
	}
	if (one_line_flag == 1)
		exit(status);
	if (read(FD0, &c, (size_t)1) != 1)
		exit(status);
	if ((c &= ASCII) == EOL && one_line_flag == 2)
		one_line_flag = 1;

	return c;
}

// Assembly:
pushq %rax
movq 0x3d23(%rip), %rax      # 0x7198
testq %rax, %rax
je 0x34af
cmpq $-0x1, %rax
je 0x34f0
leaq 0x1(%rax), %rcx
movq %rcx, 0x3d0d(%rip)      # 0x7198
movb (%rax), %al
andb $0x7f, %al
xorl %edx, %edx
cmpb $0x1, %al
sbbq %rdx, %rdx
orq %rcx, %rdx
testb %al, %al
movq %rdx, 0x3cf6(%rip)      # 0x7198
movzbl %al, %ecx
movl $0xa, %eax
cmovnel %ecx, %eax
jmp 0x34ee
cmpl $0x1, 0x3cea(%rip)      # 0x71a0
je 0x34f0
leaq 0x7(%rsp), %rsi
movl $0x1, %edx
xorl %edi, %edi
callq 0x21a0
cmpq $0x1, %rax
jne 0x34f0
movb 0x7(%rsp), %al
andb $0x7f, %al
cmpb $0xa, %al
jne 0x34ee
cmpl $0x2, 0x3cc0(%rip)      # 0x71a0
jne 0x34ee
movl $0x1, 0x3cb4(%rip)      # 0x71a0
movb $0xa, %al
popq %rcx
retq
movl 0x3cbe(%rip), %edi      # 0x71b4
callq 0x2250
// File: /workspace/github_c_makefile_star2_O3/s3lase[P]v6shell/sh6.c
// Function: syn1
static struct tnode *
syn1(char **p1, char **p2)
{
	struct tnode *t;
	int c, subcnt;
	char **p;

	subcnt = 0;
	for (p = p1; p < p2; p++)
		switch (**p) {
		case LPARENTHESIS:
			subcnt++;
			continue;

		case RPARENTHESIS:
			subcnt--;
			if (subcnt < 0)
				goto synerr;
			continue;

		case SEMICOLON:
		case AMPERSAND:
		case EOL:
			if (subcnt == 0) {
				c = **p;
				t = talloc();
				t->ntype  = TLIST;
				t->nleft  = syn2(p1, p);
				if (c == AMPERSAND && t->nleft != NULL)
					t->nleft->nflags |= FAND | FINTR | FPRS;
				t->nright = syntax(p + 1, p2);
				t->nflags = 0;
				return t;
			}
			break;
		}

	if (subcnt == 0)
		return syn2(p1, p2);

synerr:
	error = true;
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
cmpq %rsi, %rdi
jae 0x3564
xorl %eax, %eax
movq %r15, %r14
movq (%r14), %rcx
movb (%rcx), %bpl
movzbl %bpl, %ecx
cmpl $0x27, %ecx
jle 0x3535
cmpl $0x3b, %ecx
je 0x353f
cmpl $0x29, %ecx
je 0x3545
cmpl $0x28, %ecx
jne 0x354b
incl %eax
jmp 0x354b
cmpl $0xa, %ecx
je 0x353f
cmpl $0x26, %ecx
jne 0x354b
testl %eax, %eax
jne 0x354b
jmp 0x3574
testl %eax, %eax
jle 0x3558
decl %eax
addq $0x8, %r14
cmpq %rbx, %r14
jb 0x3513
testl %eax, %eax
je 0x3564
movb $0x1, 0x6479(%rip)      # 0x99d8
xorl %r12d, %r12d
jmp 0x35d8
movq %r15, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x35e4
movl $0x38, %edi
callq 0x36a4
movq %rax, %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rax)
movups %xmm0, 0x8(%rax)
movups %xmm0, 0x18(%rax)
movl $0x1, 0x34(%rax)
movq %r15, %rdi
movq %r14, %rsi
callq 0x35e4
movq %rax, (%r12)
cmpb $0x26, %bpl
setne %cl
testq %rax, %rax
sete %dl
orb %cl, %dl
jne 0x35bb
orb $-0x3f, 0x30(%rax)
addq $0x8, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2a1c
movq %rax, 0x8(%r12)
movl $0x0, 0x30(%r12)
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/s3lase[P]v6shell/sh6.c
// Function: syn2
static struct tnode *
syn2(char **p1, char **p2)
{
	struct tnode *t;
	int subcnt;
	char **p;

	subcnt = 0;
	for (p = p1; p < p2; p++)
		switch (**p) {
		case LPARENTHESIS:
			subcnt++;
			continue;

		case RPARENTHESIS:
			subcnt--;
			continue;

		case VERTICALBAR:
		case CARET:
			if (subcnt == 0) {
				t = talloc();
				t->ntype  = TPIPE;
				t->nleft  = syn3(p1, p);
				t->nright = syn2(p + 1, p2);
				t->nflags = 0;
				return t;
			}
			break;
		}

	return syn3(p1, p2);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
cmpq %rsi, %rdi
jae 0x3630
xorl %eax, %eax
movq %r15, %r14
movq (%r14), %rcx
movzbl (%rcx), %ecx
cmpl $0x5d, %ecx
jg 0x3615
cmpl $0x28, %ecx
je 0x3625
cmpl $0x29, %ecx
jne 0x3627
decl %eax
jmp 0x3627
cmpl $0x5e, %ecx
je 0x361f
cmpl $0x7c, %ecx
jne 0x3627
testl %eax, %eax
jne 0x3627
jmp 0x3646
incl %eax
addq $0x8, %r14
cmpq %rbx, %r14
jb 0x35fc
movq %r15, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x36ee
movl $0x38, %edi
callq 0x36a4
movq %rax, %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rax)
movups %xmm0, 0x8(%rax)
movups %xmm0, 0x18(%rax)
movl $0x2, 0x34(%rax)
movq %r15, %rdi
movq %r14, %rsi
callq 0x36ee
movq %rax, (%r12)
addq $0x8, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x35e4
movq %rax, 0x8(%r12)
movl $0x0, 0x30(%r12)
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/s3lase[P]v6shell/sh6.c
// Function: pwait
static void
pwait(pid_t cp)
{
	pid_t tp;
	int s;

	if (cp == 0)
		return;
	for (;;) {
		tp = wait(&s);
		if (tp == -1)
			break;
		if (s != 0) {
			if (WIFSIGNALED(s) != 0)
				status = prsig(s, tp, cp);
			else if (WIFEXITED(s) != 0)
				status = WEXITSTATUS(s);
			if (status >= FC_ERR) {
				if (status == FC_ERR)
					status = SH_ERR;
				err(status, NULL);
			}
		} else
			status = SH_TRUE;
		if (tp == cp)
			break;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edi, %r12d
leaq 0xc(%rsp), %r14
leaq 0x1851(%rip), %r13      # 0x518e
movq %r14, %rdi
callq 0x2280
cmpl $-0x1, %eax
je 0x3a60
movl %eax, %ebp
movl 0xc(%rsp), %ebx
testq %rbx, %rbx
je 0x39a6
movl %ebx, %r15d
andl $0x7f, %r15d
movl %r15d, %eax
shll $0x18, %eax
addl $0x1000000, %eax        # imm = 0x1000000
cmpl $0x2000000, %eax        # imm = 0x2000000
jl 0x39b5
cmpl $0xd, %r15d
jbe 0x39c2
movl $0x21, %esi
leaq 0x10(%rsp), %rdi
leaq 0x18e7(%rip), %rdx      # 0x5270
movl %r15d, %ecx
xorl %eax, %eax
callq 0x2130
leaq 0x18dd(%rip), %rcx      # 0x5277
cmpl $0x21, %eax
jae 0x39d2
leaq 0x10(%rsp), %rcx
jmp 0x39d2
movl $0x0, 0x3804(%rip)      # 0x71b4
jmp 0x3a57
testl %r15d, %r15d
je 0x3a12
movl 0x37f4(%rip), %edi      # 0x71b4
jmp 0x3a1b
leaq 0x33b7(%rip), %rax      # 0x6d80
movq (%rax,%r15,8), %rcx
cmpb $0x0, (%rcx)
je 0x3a29
movq %r13, %r8
testb %bl, %bl
jns 0x39e0
leaq 0x18c1(%rip), %r8       # 0x52a1
movl $0x2, %edi
cmpl %r12d, %ebp
jne 0x3a00
leaq 0x18aa(%rip), %rsi      # 0x529b
movq %rcx, %rdx
movq %r8, %rcx
xorl %eax, %eax
callq 0x3c82
jmp 0x3a3f
leaq 0x1890(%rip), %rsi      # 0x5297
movl %ebp, %edx
xorl %eax, %eax
callq 0x3c82
jmp 0x3a3f
movzbl %bh, %edi
movl %edi, 0x3799(%rip)      # 0x71b4
cmpl $0x7c, %edi
jl 0x3a57
movl $0x2, %eax
je 0x3a46
jmp 0x3a4e
movl $0x2, %edi
leaq 0x19d8(%rip), %rsi      # 0x540d
movq %r13, %rdx
xorl %eax, %eax
callq 0x3c82
leal 0x80(%r15), %eax
movl %eax, 0x3768(%rip)      # 0x71b4
movl %eax, %edi
xorl %esi, %esi
xorl %eax, %eax
callq 0x3ac8
cmpl %r12d, %ebp
jne 0x393d
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/s3lase[P]v6shell/sh6.c
// Function: sh_errexit
static void
sh_errexit(int es)
{

#ifdef	DEBUG
	fd_print(FD2, "sh_errexit: es == %d;\n", es);
#endif

	status = es;
	if (prompt == NULL) {
		(void)lseek(FD0, (off_t)0, SEEK_END);
		EXIT(status);
	}
	if (getpid() != getmypid())
		_exit(status);
}

// Assembly:
pushq %rbx
movl %edi, 0x373e(%rip)      # 0x71b4
cmpq $0x0, 0x372a(%rip)      # 0x71a8
je 0x3a92
callq 0x20e0
movl %eax, %ebx
callq 0x3d25
cmpl %eax, %ebx
jne 0x3abb
popq %rbx
retq
xorl %edi, %edi
xorl %esi, %esi
movl $0x2, %edx
callq 0x2150
callq 0x20e0
movl %eax, %ebx
callq 0x3d25
movl 0x3702(%rip), %edi      # 0x71b4
cmpl %eax, %ebx
jne 0x3ac1
callq 0x2250
movl 0x36f3(%rip), %edi      # 0x71b4
callq 0x2080
nop
// File: /workspace/github_c_makefile_star2_O3/somethingnew2-0[P]CS537-P4/client.c
// Function: main
int main(int argc, char *argv[])
{
  char *host, *filename;
  int port;
  int clientfd;

  if (argc != 4) {
    fprintf(stderr, "Usage: %s <host> <port> <filename>\n", argv[0]);
    exit(1);
  }

  host = argv[1];
  port = atoi(argv[2]);
  filename = argv[3];

  /* Open a single connection to the specified host and port */
  clientfd = Open_clientfd(host, port);
  
  clientSend(clientfd, filename);
  clientPrint(clientfd);
    
  Close(clientfd);

  exit(0);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
cmpl $0x4, %edi
jne 0x1607
movq 0x8(%rbx), %r14
movq 0x10(%rbx), %rdi
callq 0x11c0
movq 0x18(%rbx), %rbx
movq %r14, %rdi
movl %eax, %esi
callq 0x1d43
movl %eax, %ebp
movl %eax, %edi
movq %rbx, %rsi
callq 0x140c
movl %ebp, %edi
callq 0x1486
movl %ebp, %edi
callq 0x17ce
xorl %edi, %edi
callq 0x1200
movq 0x29ea(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq (%rbx), %rdx
leaq 0xa34(%rip), %rsi       # 0x204f
xorl %eax, %eax
callq 0x1110
movl $0x1, %edi
callq 0x1200
// File: /workspace/github_c_makefile_star2_O3/somethingnew2-0[P]CS537-P4/cs537.c
// Function: rio_readn
ssize_t rio_readn(int fd, void *usrbuf, size_t n) 
{
    size_t nleft = n;
    ssize_t nread;
    char *bufp = usrbuf;

    while (nleft > 0) {
        if ((nread = read(fd, bufp, nleft)) < 0) {
            if (errno == EINTR) /* interrupted by sig handler return */
                nread = 0;      /* and call read() again */
            else
                return -1;      /* errno set by read() */ 
        } 
        else if (nread == 0)
            break;              /* EOF */
        nleft -= nread;
        bufp += nread;
    }
    return (n - nleft);         /* return >= 0 */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
testq %rdx, %rdx
je 0x197b
movq %rsi, %r15
movl %edi, %ebp
movq %rbx, %r14
movl %ebp, %edi
movq %r15, %rsi
movq %r14, %rdx
callq 0x10e0
testq %rax, %rax
js 0x1967
jne 0x1973
jmp 0x197e
callq 0x1030
cmpl $0x4, (%rax)
jne 0x198f
xorl %eax, %eax
addq %rax, %r15
subq %rax, %r14
jne 0x1951
xorl %r14d, %r14d
subq %r14, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq $-0x1, %rbx
jmp 0x1981
// File: /workspace/github_c_makefile_star2_O3/somethingnew2-0[P]CS537-P4/cs537.c
// Function: rio_writen
ssize_t rio_writen(int fd, void *usrbuf, size_t n) 
{
    size_t nleft = n;
    ssize_t nwritten;
    char *bufp = usrbuf;

    while (nleft > 0) {
        if ((nwritten = write(fd, bufp, nleft)) <= 0) {
            if (errno == EINTR)  /* interrupted by sig handler return */
                nwritten = 0;    /* and call write() again */
            else
                return -1;       /* errorno set by write() */
        }
        nleft -= nwritten;
        bufp += nwritten;
    }
    return n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdx, %rdx
je 0x19d7
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
movq %rdx, %r15
movl %ebp, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1060
testq %rax, %rax
jg 0x19cd
callq 0x1030
cmpl $0x4, (%rax)
jne 0x19db
xorl %eax, %eax
addq %rax, %r14
subq %rax, %r15
jne 0x19af
jmp 0x19e2
xorl %ebx, %ebx
jmp 0x19e2
movq $-0x1, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/somethingnew2-0[P]CS537-P4/cs537.c
// Function: rio_readnb
ssize_t rio_readnb(rio_t *rp, void *usrbuf, size_t n) 
{
    size_t nleft = n;
    ssize_t nread;
    char *bufp = usrbuf;
    
    while (nleft > 0) {
        if ((nread = rio_read(rp, bufp, nleft)) < 0) {
            if (errno == EINTR) /* interrupted by sig handler return */
                nread = 0;      /* call read() again */
            else
                return -1;      /* errno set by read() */ 
        } 
        else if (nread == 0)
            break;              /* EOF */
        nleft -= nread;
        bufp += nread;
    }
    return (n - nleft);         /* return >= 0 */
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
testq %rdx, %rdx
je 0x1a46
movq %rsi, %r15
movq %rdi, %r12
movq %rbx, %r14
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1a64
testq %rax, %rax
js 0x1a32
jne 0x1a3e
jmp 0x1a49
callq 0x1030
cmpl $0x4, (%rax)
jne 0x1a5b
xorl %eax, %eax
addq %rax, %r15
subq %rax, %r14
jne 0x1a1b
xorl %r14d, %r14d
subq %r14, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq $-0x1, %rbx
jmp 0x1a4c
// File: /workspace/github_c_makefile_star2_O3/somethingnew2-0[P]CS537-P4/cs537.c
// Function: rio_read
static ssize_t rio_read(rio_t *rp, char *usrbuf, size_t n)
{
    int cnt;

    while (rp->rio_cnt <= 0) {  /* refill if buf is empty */
        rp->rio_cnt = read(rp->rio_fd, rp->rio_buf, 
                           sizeof(rp->rio_buf));
        if (rp->rio_cnt < 0) {
            if (errno != EINTR) /* interrupted by sig handler return */
                return -1;
        }
        else if (rp->rio_cnt == 0)  /* EOF */
            return 0;
        else 
            rp->rio_bufptr = rp->rio_buf; /* reset buffer ptr */
    }

    /* Copy min(n, rp->rio_cnt) bytes from internal buf to user buf */
    cnt = n;          
    if (rp->rio_cnt < n)   
        cnt = rp->rio_cnt;
    memcpy(usrbuf, rp->rio_bufptr, cnt);
    rp->rio_bufptr += cnt;
    rp->rio_cnt -= cnt;
    return cnt;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movl 0x4(%rdi), %eax
testl %eax, %eax
jle 0x1aae
movl %eax, %ecx
cmpq %r15, %rcx
cmovael %r15d, %eax
movq 0x8(%rbx), %rsi
movslq %eax, %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x1130
addq %r15, 0x8(%rbx)
subl %r15d, 0x4(%rbx)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x10(%rbx), %r12
movl (%rbx), %edi
movl $0x2000, %edx           # imm = 0x2000
movq %r12, %rsi
callq 0x10e0
movl %eax, 0x4(%rbx)
testl %eax, %eax
jns 0x1adb
callq 0x1030
cmpl $0x4, (%rax)
je 0x1ab2
movq $-0x1, %r15
jmp 0x1a9f
je 0x1ae3
movq %r12, 0x8(%rbx)
jmp 0x1a7c
xorl %r15d, %r15d
jmp 0x1a9f
// File: /workspace/github_c_makefile_star2_O3/somethingnew2-0[P]CS537-P4/cs537.c
// Function: open_clientfd
int open_clientfd(char *hostname, int port) 
{
    int clientfd;
    struct hostent *hp;
    struct sockaddr_in serveraddr;

    if ((clientfd = socket(AF_INET, SOCK_STREAM, 0)) < 0)
        return -1; /* check errno for cause of error */

    /* Fill in the server's IP address and port */
    if ((hp = gethostbyname(hostname)) == NULL)
        return -2; /* check h_errno for cause of error */
    bzero((char *) &serveraddr, sizeof(serveraddr));
    serveraddr.sin_family = AF_INET;
    bcopy((char *)hp->h_addr, 
          (char *)&serveraddr.sin_addr.s_addr, hp->h_length);
    serveraddr.sin_port = htons(port);

    /* Establish a connection with the server */
    if (connect(clientfd, (SA *) &serveraddr, sizeof(serveraddr)) < 0)
        return -1;
    return clientfd;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebp
movq %rdi, %r14
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x1270
testl %eax, %eax
js 0x1c7e
movl %eax, %ebx
movq %r14, %rdi
callq 0x1100
testq %rax, %rax
je 0x1c85
leaq 0x4(%rsp), %r14
movl $0x0, 0x8(%r14)
movq $0x0, (%r14)
movw $0x2, -0x4(%r14)
movq 0x18(%rax), %rcx
movq (%rcx), %rsi
movslq 0x14(%rax), %rdx
movq %r14, %rdi
callq 0x1190
rolw $0x8, %bp
movw %bp, -0x2(%r14)
movq %rsp, %rsi
movl %ebx, %edi
movl $0x10, %edx
callq 0x1210
testl %eax, %eax
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovnsl %ebx, %eax
jmp 0x1c8a
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x1c8a
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/somethingnew2-0[P]CS537-P4/cs537.c
// Function: open_listenfd
int open_listenfd(int port) 
{
    int listenfd, optval=1;
    struct sockaddr_in serveraddr;
  
    /* Create a socket descriptor */
    if ((listenfd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
      fprintf(stderr, "socket failed\n");
      return -1;
    }
 
    /* Eliminates "Address already in use" error from bind. */
    if (setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, 
                   (const void *)&optval , sizeof(int)) < 0) {
      fprintf(stderr, "setsockopt failed\n");
      return -1;
    }

    /* Listenfd will be an endpoint for all requests to port
       on any IP address for this host */
    bzero((char *) &serveraddr, sizeof(serveraddr));
    serveraddr.sin_family = AF_INET; 
    serveraddr.sin_addr.s_addr = htonl(INADDR_ANY); 
    serveraddr.sin_port = htons((unsigned short)port); 
    if (bind(listenfd, (SA *)&serveraddr, sizeof(serveraddr)) < 0) {
      fprintf(stderr, "bind failed\n");
      return -1;
    }

    /* Make it a listening socket ready to accept connection requests */
    if (listen(listenfd, LISTENQ) < 0) {
      fprintf(stderr, "listen failed\n");
      return -1;
    }
    return listenfd;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movl %edi, %ebp
movl $0x1, 0x4(%rsp)
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x1270
testl %eax, %eax
js 0x1d22
movl %eax, %ebx
leaq 0x4(%rsp), %rcx
movl %eax, %edi
movl $0x1, %esi
movl $0x2, %edx
movl $0x4, %r8d
callq 0x1040
testl %eax, %eax
js 0x1d29
leaq 0x8(%rsp), %rsi
movq $0x0, 0x8(%rsi)
movw $0x2, (%rsi)
movl $0x0, 0x4(%rsi)
rolw $0x8, %bp
movw %bp, 0x2(%rsi)
movl %ebx, %edi
movl $0x10, %edx
callq 0x1180
testl %eax, %eax
js 0x1d30
movl %ebx, %edi
movl $0x400, %esi            # imm = 0x400
callq 0x1160
testl %eax, %eax
jns 0x1d3a
callq 0x1290
jmp 0x1d35
callq 0x12f6
jmp 0x1d35
callq 0x12d4
jmp 0x1d35
callq 0x12b2
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/somethingnew2-0[P]CS537-P4/cs537.c
// Function: Open_clientfd
int Open_clientfd(char *hostname, int port) 
{
    int rc;

    if ((rc = open_clientfd(hostname, port)) < 0) {
        if (rc == -1)
            unix_error("Open_clientfd Unix error");
        else        
            dns_error("Open_clientfd DNS error");
    }
    return rc;
}

// Assembly:
pushq %rax
callq 0x1bfb
testl %eax, %eax
js 0x1d4f
popq %rcx
retq
cmpl $-0x1, %eax
jne 0x1d60
leaq 0x4e0(%rip), %rdi       # 0x223b
callq 0x162c
leaq 0x4ed(%rip), %rdi       # 0x2254
callq 0x169b