LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/janmojzis[P]mcencrypt/gf.c
// Function: gf_frac
gf gf_frac(gf den, gf num)
{
	gf tmp_11;
	gf tmp_1111;
	gf out;

	tmp_11 = gf_sqmul(den, den); /* // 11 */
	tmp_1111 = gf_sq2mul(tmp_11, tmp_11); /* // 1111 */
	out = gf_sq2(tmp_1111); 
	out = gf_sq2mul(out, tmp_1111); /* // 11111111 */
	out = gf_sq2(out);
	out = gf_sq2mul(out, tmp_1111); /* // 111111111111 */

	return gf_sqmul(out, num); /* // 1111111111110 */
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %esi
callq 0x5018
movzwl %ax, %edi
movl %edi, %esi
callq 0x50dd
movzwl %ax, %ebp
movl %ebp, %edi
callq 0x51fd
movzwl %ax, %edi
movl %ebp, %esi
callq 0x50dd
movzwl %ax, %edi
callq 0x51fd
movzwl %ax, %edi
movl %ebp, %esi
callq 0x50dd
movzwl %ax, %edi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5018
// File: /workspace/github_c_makefile_star2_O2/janmojzis[P]mcencrypt/gf.c
// Function: gf_sqmul
static inline gf gf_sqmul(gf in, gf m)
{
	int i;

	uint64_t x;
	uint64_t t0;
	uint64_t t1;
	uint64_t t;

	const uint64_t M[] = {0x0000001FF0000000,
	                      0x000000000FF80000, 
	                      0x000000000007E000}; 

	t0 = in;
	t1 = m;

	x = (t1 << 6) * (t0 & (1 << 6));
	
	t0 ^= (t0 << 7);

	x ^= (t1 * (t0 & (0x04001)));
	x ^= (t1 * (t0 & (0x08002))) << 1;
	x ^= (t1 * (t0 & (0x10004))) << 2;
	x ^= (t1 * (t0 & (0x20008))) << 3;
	x ^= (t1 * (t0 & (0x40010))) << 4;
	x ^= (t1 * (t0 & (0x80020))) << 5;

	for (i = 0; i < 3; i++)
	{
		t = x & M[i];
		x ^= (t >> 9) ^ (t >> 10) ^ (t >> 12) ^ (t >> 13);
	}

	return x & GFMASK;
}

// Assembly:
movl %esi, %ecx
movl %edi, %eax
shll $0x7, %eax
xorl %edi, %eax
movl %edi, %edx
andl $0x40, %edx
imull %esi, %edx
shll $0x6, %edx
movl %eax, %esi
andl $0x4001, %esi           # imm = 0x4001
imulq %rcx, %rsi
xorq %rdx, %rsi
movl %eax, %edx
andl $0x8002, %edx           # imm = 0x8002
imulq %rcx, %rdx
addq %rdx, %rdx
xorq %rsi, %rdx
movl %eax, %esi
andl $0x10004, %esi          # imm = 0x10004
imulq %rcx, %rsi
shlq $0x2, %rsi
movl %eax, %edi
andl $0x20008, %edi          # imm = 0x20008
imulq %rcx, %rdi
shlq $0x3, %rdi
xorq %rsi, %rdi
xorq %rdx, %rdi
movl %eax, %edx
andl $0x40010, %edx          # imm = 0x40010
imulq %rcx, %rdx
shlq $0x4, %rdx
andl $0x80020, %eax          # imm = 0x80020
imulq %rcx, %rax
shlq $0x5, %rax
xorq %rdx, %rax
xorq %rdi, %rax
xorl %ecx, %ecx
leaq 0x2c81(%rip), %rdx      # 0x7d20
cmpq $0x18, %rcx
je 0x50d7
movq (%rcx,%rdx), %rsi
andq %rax, %rsi
movq %rsi, %rdi
shrq $0x9, %rdi
movq %rsi, %r8
shrq $0xa, %r8
xorq %rdi, %r8
movq %rsi, %rdi
shrq $0xc, %rdi
shrq $0xd, %rsi
xorq %rdi, %rsi
xorq %r8, %rsi
xorq %rsi, %rax
addq $0x8, %rcx
jmp 0x509f
andl $0x1fff, %eax           # imm = 0x1FFF
retq
// File: /workspace/github_c_makefile_star2_O2/janmojzis[P]mcencrypt/gf.c
// Function: gf_sq2mul
static inline gf gf_sq2mul(gf in, gf m)
{
	int i;

	uint64_t x;
	uint64_t t0;
	uint64_t t1;
	uint64_t t;

	const uint64_t M[] = {0x1FF0000000000000,
		              0x000FF80000000000, 
		              0x000007FC00000000, 
	                      0x00000003FE000000, 
	                      0x0000000001FE0000,
	                      0x000000000001E000};

	t0 = in;
	t1 = m;

	x = (t1 << 18) * (t0 & (1 << 6));

	t0 ^= (t0 << 21);

	x ^= (t1 * (t0 & (0x010000001)));
	x ^= (t1 * (t0 & (0x020000002))) << 3;
	x ^= (t1 * (t0 & (0x040000004))) << 6;
	x ^= (t1 * (t0 & (0x080000008))) << 9;
	x ^= (t1 * (t0 & (0x100000010))) << 12;
	x ^= (t1 * (t0 & (0x200000020))) << 15;

	for (i = 0; i < 6; i++)
	{
		t = x & M[i];
		x ^= (t >> 9) ^ (t >> 10) ^ (t >> 12) ^ (t >> 13);
	}

	return x & GFMASK;
}

// Assembly:
movabsq $0x1ff0000000000000, %rax # imm = 0x1FF0000000000000
movq %rax, -0x38(%rsp)
movabsq $0xff80000000000, %rax  # imm = 0xFF80000000000
movq %rax, -0x30(%rsp)
movabsq $0x7fc00000000, %rax    # imm = 0x7FC00000000
movq %rax, -0x28(%rsp)
movabsq $0x3fe000000, %rax      # imm = 0x3FE000000
movq %rax, -0x20(%rsp)
movl %edi, %eax
movl %esi, %ecx
imulq $0x200001, %rax, %rdi   # imm = 0x200001
movl %eax, %esi
andl $0x40, %esi
imulq %rcx, %rsi
shlq $0x12, %rsi
movl %edi, %edx
movl %edi, %r9d
movl %edi, %r8d
movabsq $0x100000010, %r10      # imm = 0x100000010
andq %rdi, %r10
movabsq $0x200000020, %rax      # imm = 0x200000020
andq %rdi, %rax
andl $0x10000001, %edi       # imm = 0x10000001
imulq %rcx, %rdi
xorq %rsi, %rdi
andl $0x20000002, %edx       # imm = 0x20000002
imulq %rcx, %rdx
shlq $0x3, %rdx
xorq %rdi, %rdx
andl $0x40000004, %r9d       # imm = 0x40000004
imulq %rcx, %r9
shlq $0x6, %r9
andl $0x80000008, %r8d       # imm = 0x80000008
imulq %rcx, %r8
shlq $0x9, %r8
xorq %r9, %r8
movq $0x1fe0000, -0x18(%rsp) # imm = 0x1FE0000
movq $0x1e000, -0x10(%rsp)   # imm = 0x1E000
xorq %rdx, %r8
imulq %rcx, %r10
shlq $0xc, %r10
imulq %rcx, %rax
shlq $0xf, %rax
xorq %r10, %rax
xorq %r8, %rax
xorl %ecx, %ecx
cmpq $0x6, %rcx
je 0x51f7
movq -0x38(%rsp,%rcx,8), %rdx
andq %rax, %rdx
movq %rdx, %rsi
shrq $0x9, %rsi
movq %rdx, %rdi
shrq $0xa, %rdi
xorq %rsi, %rdi
movq %rdx, %rsi
shrq $0xc, %rsi
shrq $0xd, %rdx
xorq %rsi, %rdx
xorq %rdi, %rdx
xorq %rdx, %rax
incq %rcx
jmp 0x51bf
andl $0x1fff, %eax           # imm = 0x1FFF
retq
// File: /workspace/github_c_makefile_star2_O2/janmojzis[P]mcencrypt/gf.c
// Function: gf_sq2
static inline gf gf_sq2(gf in)
{
	int i;

	const uint64_t B[] = {0x1111111111111111, 
	                      0x0303030303030303, 
	                      0x000F000F000F000F, 
	                      0x000000FF000000FF};

	const uint64_t M[] = {0x0001FF0000000000, 
	                      0x000000FF80000000, 
	                      0x000000007FC00000, 
	                      0x00000000003FE000};

	uint64_t x = in; 
	uint64_t t;

	x = (x | (x << 24)) & B[3];
	x = (x | (x << 12)) & B[2];
	x = (x | (x << 6)) & B[1];
	x = (x | (x << 3)) & B[0];

	for (i = 0; i < 4; i++)
	{
		t = x & M[i];
		x ^= (t >> 9) ^ (t >> 10) ^ (t >> 12) ^ (t >> 13);
	}

	return x & GFMASK;
}

// Assembly:
movl %edi, %eax
imulq $0x1000001, %rax, %rcx  # imm = 0x1000001
movabsq $0x1000001000, %rdx     # imm = 0x1000001000
imulq %rax, %rdx
orq %rcx, %rdx
movabsq $0x7000f000f000f, %rax  # imm = 0x7000F000F000F
andq %rdx, %rax
imulq $0x41, %rax, %rcx
imulq $0x208, %rax, %rax      # imm = 0x208
movabsq $0x10101010101010, %rdx # imm = 0x10101010101010
andq %rax, %rdx
movabsq $0x101010101010101, %rax # imm = 0x101010101010101
andq %rcx, %rax
orq %rdx, %rax
xorl %ecx, %ecx
leaq 0x2aeb(%rip), %rdx      # 0x7d40
cmpq $0x20, %rcx
je 0x528d
movq (%rcx,%rdx), %rsi
andq %rax, %rsi
movq %rsi, %rdi
shrq $0x9, %rdi
movq %rsi, %r8
shrq $0xa, %r8
xorq %rdi, %r8
movq %rsi, %rdi
shrq $0xc, %rdi
shrq $0xd, %rsi
xorq %rdi, %rsi
xorq %r8, %rsi
xorq %rsi, %rax
addq $0x8, %rcx
jmp 0x5255
andl $0x1fff, %eax           # imm = 0x1FFF
retq
// File: /workspace/github_c_makefile_star2_O2/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)
xorl %eax, %eax
cmpq $0xff, %rax
je 0x52cc
andw $0x0, 0x10(%rsp,%rax,2)
incq %rax
jmp 0x52b9
leaq 0x10(%rsp), %r12
xorl %r13d, %r13d
cmpq $0x80, %r13
je 0x530c
movzwl (%r15,%r13,2), %ebp
xorl %ebx, %ebx
cmpq $0x80, %rbx
je 0x5303
movzwl (%r14,%rbx,2), %esi
movl %ebp, %edi
callq 0x4ebc
xorw %ax, (%r12,%rbx,2)
incq %rbx
jmp 0x52e4
incq %r13
addq $0x2, %r12
jmp 0x52d4
movl $0xfe, %r14d
cmpq $0x7f, %r14
jbe 0x5362
movzwl 0x10(%rsp,%r14,2), %ebp
movl %ebp, %edi
movl $0x1e02, %esi           # imm = 0x1E02
callq 0x4ebc
xorw %ax, -0xe6(%rsp,%r14,2)
movl %ebp, %edi
movl $0x86f, %esi            # imm = 0x86F
callq 0x4ebc
xorw %ax, -0xea(%rsp,%r14,2)
movl %ebp, %edi
movl $0xe0d, %esi            # imm = 0xE0D
callq 0x4ebc
xorw %ax, -0xf0(%rsp,%r14,2)
decq %r14
jmp 0x5312
xorl %eax, %eax
movq 0x8(%rsp), %rdx
cmpq $0x80, %rax
je 0x537f
movzwl 0x10(%rsp,%rax,2), %ecx
movw %cx, (%rdx,%rax,2)
incq %rax
jmp 0x5369
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/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 0x541d
cmpq %rax, %r15
ja 0x540a
leaq 0x1000(,%r15,2), %r15
movq %r15, %rcx
shrq $0x3e, %rcx
je 0x53f2
jmp 0x543d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x10c0
movq %rax, %rbx
testq %rax, %rax
je 0x543d
leaq (%rbx,%r12), %rsi
movl $0x1000, %edx           # imm = 0x1000
movl %ebp, %edi
callq 0x1090
testq %rax, %rax
je 0x5456
cmpq $-0x1, %rax
je 0x545b
addq %rax, %r12
jmp 0x53e5
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 0x544a
movq %rbx, %rdi
callq 0x1030
jmp 0x5448
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/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, %r12
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x540(%rsp), %r13
xorl %ebp, %ebp
movl $0x401, %edx            # imm = 0x401
movq %r13, %rdi
xorl %esi, %esi
callq 0x1070
movb $0x2, (%r13)
leaq 0x541(%rsp), %r15
movb $0x1, 0x40(%rsp)
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x4d4e
movq %rsp, %rdi
movl $0x401, %edx            # imm = 0x401
movq %r13, %rsi
callq 0x42ec
cmpq $0x20, %rbp
je 0x54e1
movb (%rsp,%rbp), %al
movb %al, 0xd0(%r14,%rbp)
incq %rbp
jmp 0x54cb
leaq 0x41(%rsp), %rdi
movl $0x400, %edx            # imm = 0x400
movq %r15, %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 0x42ec
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_O2/janmojzis[P]mcencrypt/operations.c
// Function: crypto_kem_mceliece8192128sha512_dec
int crypto_kem_mceliece8192128sha512_dec(
       unsigned char *key,
       const unsigned char *c,
       const unsigned char *sk
)
{
	int i;

	unsigned char ret_confirm = 0;
	unsigned char ret_decrypt = 0;

	uint16_t m;

	unsigned char conf[64];
	unsigned char two_e[ 1 + SYS_N/8 ] = {2};
	unsigned char *e = two_e + 1;
	unsigned char preimage[ 1 + SYS_N/8 + (SYND_BYTES + 32) ];

	/* // */

	ret_decrypt = decrypt(e, sk + SYS_N/8, c);

	crypto_hash_sha512(conf, two_e, sizeof(two_e)); 

	for (i = 0; i < 32; i++)
		ret_confirm |= conf[i] ^ c[SYND_BYTES + i];

	m = ret_decrypt | ret_confirm;
	m -= 1;
	m >>= 8;

	{
		unsigned char *x = preimage;
		*x++ = (~m & 0) |  (m & 1);
		for (i = 0; i < SYS_N/8; i++) 
			*x++ = (~m & sk[i]) | (m & e[i]);
		for (i = 0; i < SYND_BYTES + 32; i++) 
			*x++ = c[i];
	}

	crypto_hash_sha512(key, preimage, sizeof(preimage)); 

	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, %r14
movq %rdi, %rbx
leaq 0x540(%rsp), %r12
xorl %r13d, %r13d
movl $0x401, %edx            # imm = 0x401
movq %r12, %rdi
xorl %esi, %esi
callq 0x1070
movb $0x2, (%r12)
leaq 0x541(%rsp), %rdi
leaq 0x400(%r15), %rsi
movq %r14, %rdx
callq 0x45e8
movl %eax, %ebp
movq %rsp, %rdi
movl $0x401, %edx            # imm = 0x401
movq %r12, %rsi
callq 0x42ec
xorl %eax, %eax
cmpq $0x20, %r13
je 0x55ab
movb 0xd0(%r14,%r13), %cl
xorb (%rsp,%r13), %cl
orb %cl, %al
incq %r13
jmp 0x5592
movzbl %bpl, %edx
movzbl %al, %ecx
orl %edx, %ecx
addl $0xffff, %ecx           # imm = 0xFFFF
shrl $0x8, %ecx
movl %ecx, %edx
notl %edx
movl %ecx, %eax
andb $0x1, %al
movb %al, 0x40(%rsp)
xorl %eax, %eax
cmpq $0x400, %rax            # imm = 0x400
je 0x55f0
movzbl (%r15,%rax), %esi
andl %edx, %esi
movzbl 0x541(%rsp,%rax), %edi
andl %ecx, %edi
orl %esi, %edi
movb %dil, 0x41(%rsp,%rax)
incq %rax
jmp 0x55cb
pushq $0x1
popq %rcx
cmpq $0xf1, %rcx
je 0x5612
leaq (%rsp,%rcx), %rdx
addq $0x40, %rdx
movb -0x1(%r14,%rcx), %sil
movb %sil, (%rdx,%rax)
incq %rcx
jmp 0x55f3
leaq 0x40(%rsp), %rsi
movl $0x4f1, %edx            # imm = 0x4F1
movq %rbx, %rdi
callq 0x42ec
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_O2/janmojzis[P]mcencrypt/poly1305.c
// Function: poly1305_init
void poly1305_init(poly1305_ctx *ctx, const unsigned char *k) {

    /* r &= 0xffffffc0ffffffc0ffffffc0fffffff */
    ctx->r[0] = (unpack(k +  0)     ) & 0x3ffffff;
    ctx->r[1] = (unpack(k +  3) >> 2) & 0x3ffff03;
    ctx->r[2] = (unpack(k +  6) >> 4) & 0x3ffc0ff;
    ctx->r[3] = (unpack(k +  9) >> 6) & 0x3f03fff;
    ctx->r[4] = (unpack(k + 12) >> 8) & 0x00fffff;

    ctx->s[1] = ctx->r[1] * 5;
    ctx->s[2] = ctx->r[2] * 5;
    ctx->s[3] = ctx->r[3] * 5;
    ctx->s[4] = ctx->r[4] * 5;

    /* h = 0 */
    ctx->h[0] = 0;
    ctx->h[1] = 0;
    ctx->h[2] = 0;
    ctx->h[3] = 0;
    ctx->h[4] = 0;

    ctx->pad[0] = unpack(k + 16);
    ctx->pad[1] = unpack(k + 20);
    ctx->pad[2] = unpack(k + 24);
    ctx->pad[3] = unpack(k + 28);
}

// Assembly:
movl (%rsi), %eax
andl $0x3ffffff, %eax        # imm = 0x3FFFFFF
movq %rax, 0x28(%rdi)
movl 0x3(%rsi), %eax
shrl $0x2, %eax
andl $0x3ffff03, %eax        # imm = 0x3FFFF03
movq %rax, 0x30(%rdi)
movl 0x6(%rsi), %ecx
shrl $0x4, %ecx
andl $0x3ffc0ff, %ecx        # imm = 0x3FFC0FF
movq %rcx, 0x38(%rdi)
movl 0x9(%rsi), %edx
shrl $0x6, %edx
andl $0x3f03fff, %edx        # imm = 0x3F03FFF
movq %rdx, 0x40(%rdi)
movl 0xc(%rsi), %r8d
shrl $0x8, %r8d
andl $0xfffff, %r8d          # imm = 0xFFFFF
movq %r8, 0x48(%rdi)
leaq (%rax,%rax,4), %rax
movq %rax, 0x58(%rdi)
leaq (%rcx,%rcx,4), %rax
movq %rax, 0x60(%rdi)
leaq (%rdx,%rdx,4), %rax
movq %rax, 0x68(%rdi)
leaq (%r8,%r8,4), %rax
movq %rax, 0x70(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movups %xmm0, 0x10(%rdi)
andq $0x0, 0x20(%rdi)
movl 0x10(%rsi), %eax
movq %rax, 0x78(%rdi)
movl 0x14(%rsi), %eax
movq %rax, 0x80(%rdi)
movl 0x18(%rsi), %eax
movq %rax, 0x88(%rdi)
movl 0x1c(%rsi), %eax
movq %rax, 0x90(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x5a50
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x5af2
movq %r12, %rdi
movq %r15, %rsi
callq 0x5db1
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x5f44
xorl %ecx, %ecx
xorl %eax, %eax
cmpq $0x10, %rax
je 0x5fbb
movb (%rbx,%rax), %dl
xorb (%rsp,%rax), %dl
movzbl %dl, %edx
orl %edx, %ecx
incq %rax
jmp 0x5fa5
decl %ecx
xorl %eax, %eax
btl $0x8, %ecx
adcl $-0x1, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
cmpl $-0x1, 0x50bf(%rip)     # 0xb0a0
je 0x6029
movq %rbx, %r15
movl $0x100000, %r12d        # imm = 0x100000
cmpq %r12, %r14
cmovbq %r14, %r12
testq %r14, %r14
jne 0x6002
jmp 0x6020
pushq $0x1
popq %rdi
callq 0x1100
movl 0x5098(%rip), %edi      # 0xb0a0
movq %r15, %rsi
movq %r12, %rdx
callq 0x1090
testq %rax, %rax
jle 0x5ffa
addq %rax, %r15
subq %rax, %r14
jmp 0x5fe6
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1d30(%rip), %r15      # 0x7d60
pushq $0x1
popq %rbp
movq %r15, %rdi
movl $0x80000, %esi          # imm = 0x80000
xorl %eax, %eax
callq 0x10f0
movl %eax, 0x5058(%rip)      # 0xb0a0
cmpl $-0x1, %eax
jne 0x5fe3
movl %ebp, %edi
callq 0x1100
jmp 0x6033
nop
// File: /workspace/github_c_makefile_star2_O2/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
subq $0x18, %rsp
movq %rsi, %r14
movl %edi, %ebp
movl $0x100000, %eax         # imm = 0x100000
movq %rsp, %r12
pushq $0x1
popq %r13
pushq $-0x1
popq %rbx
movq %rsi, 0x8(%rsp)
cmpq %rax, %rdx
movl $0x100000, %r15d        # imm = 0x100000
cmovbq %rdx, %r15
movq %rdx, 0x10(%rsp)
testq %rdx, %rdx
jle 0x60ea
movl %ebp, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1090
cmpq $-0x1, %rax
jne 0x60d3
callq 0x1040
movl (%rax), %eax
cmpl $0xb, %eax
je 0x60ba
cmpl $0x4, %eax
jne 0x60f1
movl %ebp, (%rsp)
movw $0x1, 0x4(%rsp)
movq %r12, %rdi
movq %r13, %rsi
movl %ebx, %edx
callq 0x10d0
jmp 0x6096
testq %rax, %rax
je 0x60ea
addq %rax, %r14
movq 0x10(%rsp), %rdx
subq %rax, %rdx
movl $0x100000, %eax         # imm = 0x100000
jmp 0x607f
subq 0x8(%rsp), %r14
jmp 0x60f5
pushq $-0x1
popq %r14
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x7f
popq %r14
movzwl %si, %ebp
testl %r14d, %r14d
js 0x6140
movzwl %ax, %edi
movl %ebp, %esi
callq 0x4ebc
movl %r14d, %ecx
movzwl (%rbx,%rcx,2), %esi
movzwl %ax, %edi
callq 0x4eb7
decl %r14d
jmp 0x611d
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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, (%rsp)
movq %rsi, 0x8(%rsp)
movq %rdi, %r12
xorl %eax, %eax
cmpq $0x100, %rax            # imm = 0x100
je 0x6444
andw $0x0, (%r12,%rax,2)
incq %rax
jmp 0x6431
xorl %r15d, %r15d
cmpq $0x2000, %r15           # imm = 0x2000
je 0x64e3
movl %r15d, %eax
shrl $0x3, %eax
movq 0x10(%rsp), %rcx
movzbl (%rcx,%rax), %eax
movl %r15d, %ecx
andl $0x7, %ecx
xorl %ebx, %ebx
btl %ecx, %eax
setb %bl
movq (%rsp), %rax
movzwl (%rax,%r15,2), %esi
movq 0x8(%rsp), %rdi
callq 0x6108
movzwl %ax, %edi
movl %edi, %esi
callq 0x4ebc
movzwl %ax, %edi
callq 0x5293
movzwl %bx, %ebp
xorl %r14d, %r14d
cmpq $0x100, %r14            # imm = 0x100
je 0x64db
movzwl (%r12,%r14,2), %r13d
movzwl %ax, %ebx
movl %ebx, %edi
movl %ebp, %esi
callq 0x4ebc
movzwl %ax, %esi
movl %r13d, %edi
callq 0x4eb7
movw %ax, (%r12,%r14,2)
movq (%rsp), %rax
movzwl (%rax,%r15,2), %esi
movl %ebx, %edi
callq 0x4ebc
incq %r14
jmp 0x649c
incq %r15
jmp 0x6447
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/janmojzis[P]mcencrypt/transpose.c
// Function: transpose_64x64
void transpose_64x64(uint64_t * out, uint64_t * in)
{
	int i, j, s, d;

	uint64_t x, y;
	uint64_t masks[6][2] = {
	                        {0x5555555555555555, 0xAAAAAAAAAAAAAAAA},
	                        {0x3333333333333333, 0xCCCCCCCCCCCCCCCC},
	                        {0x0F0F0F0F0F0F0F0F, 0xF0F0F0F0F0F0F0F0},
	                        {0x00FF00FF00FF00FF, 0xFF00FF00FF00FF00},
	                        {0x0000FFFF0000FFFF, 0xFFFF0000FFFF0000},
	                        {0x00000000FFFFFFFF, 0xFFFFFFFF00000000}
	                       };

	for (i = 0; i < 64; i++)
		out[i] = in[i];

	for (d = 5; d >= 0; d--)
	{
		s = 1 << d;

		for (i = 0; i < 64; i += s*2)
		for (j = i; j < i+s; j++)
		{
			x = (out[j] & masks[d][0]) | ((out[j+s] & masks[d][0]) << s);
			y = ((out[j] & masks[d][1]) >> s) | (out[j+s] & masks[d][1]);

			out[j+0] = x;
			out[j+s] = y;
		}
	}
}

// Assembly:
xorl %eax, %eax
cmpq $0x40, %rax
je 0x6509
movq (%rsi,%rax,8), %rcx
movq %rcx, (%rdi,%rax,8)
incq %rax
jmp 0x64f6
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl $0x5, %ecx
testl %ecx, %ecx
js 0x65af
movl $0x1, %eax
movl %eax, %edx
shll %cl, %edx
movl %ecx, %r10d
shlq $0x4, %r10
leaq 0x1839(%rip), %rax      # 0x7d70
addq %rax, %r10
movl $0x2, %r11d
movl %ecx, -0x4(%rsp)
shll %cl, %r11d
movslq %r11d, %r11
movslq %edx, %rbx
leaq (%rdi,%rbx,8), %r14
xorl %r15d, %r15d
cmpq $0x3f, %r15
jg 0x65a4
leaq (%r15,%rbx), %r12
movq %r15, %r13
cmpq %r12, %r13
jge 0x659f
movq (%rdi,%r13,8), %rbp
movq (%r10), %rsi
movq 0x8(%r10), %r8
movq (%r14,%r13,8), %rax
movq %rax, %r9
andq %rsi, %r9
movl %edx, %ecx
shlq %cl, %r9
andq %rbp, %rsi
orq %rsi, %r9
andq %r8, %rbp
shrq %cl, %rbp
andq %rax, %r8
orq %rbp, %r8
movq %r9, (%rdi,%r13,8)
movq %r8, (%r14,%r13,8)
incq %r13
jmp 0x6561
addq %r11, %r15
jmp 0x6554
movl -0x4(%rsp), %ecx
decl %ecx
jmp 0x6518
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/janmojzis[P]mcencrypt/util.c
// Function: load8
uint64_t load8(const unsigned char * in)
{
	int i;
	uint64_t ret = in[7];

	for (i = 6; i >= 0; i--)
	{
		ret <<= 8;
		ret |= in[i];
	}

	return ret;
}

// Assembly:
movzbl 0x7(%rdi), %eax
pushq $0x6
popq %rcx
testl %ecx, %ecx
js 0x65f0
shlq $0x8, %rax
movl %ecx, %edx
movzbl (%rdi,%rdx), %edx
orq %rdx, %rax
decl %ecx
jmp 0x65db
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movl %edi, %ebp
movl $0x100000, %eax         # imm = 0x100000
leaq 0x8(%rsp), %r12
pushq $0x1
popq %r13
pushq $-0x1
popq %rbx
cmpq %rax, %rdx
movl $0x100000, %r14d        # imm = 0x100000
cmovbq %rdx, %r14
testq %rdx, %rdx
jle 0x66ba
movq %rdx, 0x10(%rsp)
movl %ebp, %edi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1060
testq %rax, %rax
jns 0x66a8
callq 0x1040
movl (%rax), %eax
cmpl $0xb, %eax
je 0x668e
cmpl $0x4, %eax
jne 0x66bc
movl %ebp, 0x8(%rsp)
movw $0xc, 0xc(%rsp)
movq %r12, %rdi
movq %r13, %rsi
movl %ebx, %edx
callq 0x10d0
jmp 0x666b
addq %rax, %r15
movq 0x10(%rsp), %rdx
subq %rax, %rdx
movl $0x100000, %eax         # imm = 0x100000
jmp 0x6654
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x279a(%rip), %r15      # 0x518e
cmpq %rbx, %r14
jae 0x2a11
movq (%r14), %rax
movsbl (%rax), %edi
movq %r15, %rsi
callq 0x3347
testb %al, %al
je 0x2a19
addq $0x8, %r14
jmp 0x29f4
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x33e5
// File: /workspace/github_c_makefile_star2_O2/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 0x318e
pushq %rbx
movq %rdi, %rbx
movl 0x34(%rdi), %eax
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0x318f
cmpl $0x3, %eax
je 0x31a2
cmpl $0x4, %eax
jne 0x31ab
movq 0x10(%rbx), %rdi
jmp 0x319b
retq
movq (%rbx), %rdi
callq 0x316a
movq 0x8(%rbx), %rdi
callq 0x316a
jmp 0x31ab
movq 0x28(%rbx), %rdi
callq 0x2050
movq %rbx, %rdi
popq %rbx
jmp 0x2050
// File: /workspace/github_c_makefile_star2_O2/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 0x782e(%rip), %al       # 0xa9e8
testb %al, %al
je 0x31c6
movb $0x0, 0x7823(%rip)      # 0xa9e8
retq
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x77fb(%rip), %rax      # 0xa9d0
leaq 0x77cc(%rip), %rcx      # 0xa9a8
cmpq %rcx, %rax
jae 0x32aa
movq 0x57d4(%rip), %rax      # 0x89c0
leaq 0x57c8(%rip), %rcx      # 0x89bb
cmpq %rcx, %rax
jae 0x32d4
movl %edi, %ebx
leaq 0x1f7e(%rip), %r14      # 0x5183
leaq 0x4f74(%rip), %r15      # 0x8180
leaq 0x77ed(%rip), %r12      # 0xaa00
movq 0x77d6(%rip), %rax      # 0xa9f0
testq %rax, %rax
je 0x323c
leaq 0x1(%rax), %rcx
movq %rcx, 0x77c6(%rip)      # 0xa9f0
movb (%rax), %al
andb $0x7f, %al
jne 0x330f
andq $0x0, 0x77b4(%rip)      # 0xa9f0
callq 0x335b
cmpb $0x24, %al
jne 0x331b
testb %bl, %bl
je 0x331b
callq 0x335b
leal -0x30(%rax), %ecx
cmpb $0x9, %cl
jbe 0x3272
cmpb $0x24, %al
jne 0x331b
movq %r12, 0x7783(%rip)      # 0xa9f0
movq %r12, %rax
jmp 0x321a
movzbl %al, %ecx
addl $-0x30, %ecx
cmpb %al, (%rcx,%r14)
jne 0x3213
cmpl 0x4f0c(%rip), %ecx      # 0x8190
jge 0x3213
leaq (,%rcx,8), %rcx
addq 0x4ef3(%rip), %rcx      # 0x8188
cmpb $0x31, %al
cmovbq %r15, %rcx
movq (%rcx), %rax
movq %rax, 0x774b(%rip)      # 0xa9f0
jmp 0x3213
addq $-0x50, %rax
movq %rax, 0x771b(%rip)      # 0xa9d0
leaq 0x1ea5(%rip), %rbx      # 0x5161
pushq $0x50
popq %r14
leaq 0x7709(%rip), %r15      # 0xa9d0
xorl %edi, %edi
callq 0x31b4
cmpb $0xa, %al
jne 0x32c7
jmp 0x32fc
addq $-0xa, %rax
movq %rax, 0x56e1(%rip)      # 0x89c0
leaq 0x1e89(%rip), %rbx      # 0x516f
pushq $0xa
popq %r14
leaq 0x56cf(%rip), %r15      # 0x89c0
xorl %edi, %edi
callq 0x31b4
cmpb $0xa, %al
jne 0x32f1
addq %r14, (%r15)
movq %rbx, 0x76da(%rip)      # 0xa9e0
movb $0x1, 0x76cb(%rip)      # 0xa9d8
movb $0xa, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
testb %al, %al
jne 0x330f
leaq 0x1e49(%rip), %rbx      # 0x516f
movl 0x76b0(%rip), %eax      # 0xa9dc
leal 0x1(%rax), %ecx
movl %ecx, 0x76a7(%rip)      # 0xa9dc
cmpl $0x7fe, %eax            # imm = 0x7FE
jg 0x32ff
callq 0x335b
testb %al, %al
je 0x3326
jmp 0x330f
// File: /workspace/github_c_makefile_star2_O2/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 0x4e35(%rip), %rax      # 0x8198
testq %rax, %rax
je 0x339b
cmpq $-0x1, %rax
je 0x33da
leaq 0x1(%rax), %rcx
movq %rcx, 0x4e1f(%rip)      # 0x8198
movb (%rax), %al
andb $0x7f, %al
xorl %edx, %edx
cmpb $0x1, %al
sbbq %rdx, %rdx
orq %rcx, %rdx
testb %al, %al
movq %rdx, 0x4e08(%rip)      # 0x8198
movzbl %al, %ecx
pushq $0xa
popq %rax
cmovnel %ecx, %eax
jmp 0x33d8
cmpl $0x1, 0x4dfe(%rip)      # 0x81a0
je 0x33da
leaq 0x7(%rsp), %rsi
pushq $0x1
popq %rdx
xorl %edi, %edi
callq 0x21a0
cmpq $0x1, %rax
jne 0x33da
movb 0x7(%rsp), %al
andb $0x7f, %al
cmpb $0xa, %al
jne 0x33d8
cmpl $0x2, 0x4dd6(%rip)      # 0x81a0
jne 0x33d8
movl $0x1, 0x4dca(%rip)      # 0x81a0
movb $0xa, %al
popq %rcx
retq
movl 0x4dd4(%rip), %edi      # 0x81b4
callq 0x2250
// File: /workspace/github_c_makefile_star2_O2/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
xorl %eax, %eax
movq %rdi, %r14
cmpq %rbx, %r14
jae 0x3432
movq (%r14), %rcx
movzbl (%rcx), %ebp
cmpl $0xa, %ebp
je 0x3420
cmpl $0x26, %ebp
je 0x3420
cmpl $0x3b, %ebp
je 0x3420
cmpl $0x29, %ebp
je 0x3426
cmpl $0x28, %ebp
jne 0x342c
incl %eax
jmp 0x342c
testl %eax, %eax
jne 0x342c
jmp 0x3442
testl %eax, %eax
jle 0x3436
decl %eax
addq $0x8, %r14
jmp 0x33f8
testl %eax, %eax
je 0x349b
movb $0x1, 0x759b(%rip)      # 0xa9d8
xorl %r12d, %r12d
jmp 0x348f
callq 0x34ab
movq %rax, %r12
movl $0x1, 0x34(%rax)
movq %r15, %rdi
movq %r14, %rsi
callq 0x34c9
movq %rax, (%r12)
cmpb $0x26, %bpl
setne %cl
testq %rax, %rax
sete %dl
orb %cl, %dl
jne 0x3475
orb $-0x3f, 0x30(%rax)
addq $0x8, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x29e2
movq %rax, 0x8(%r12)
andl $0x0, 0x30(%r12)
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x34c9
// File: /workspace/github_c_makefile_star2_O2/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
xorl %eax, %eax
movq %rdi, %r14
cmpq %rbx, %r14
jae 0x350d
movq (%r14), %rcx
movzbl (%rcx), %ecx
cmpl $0x7c, %ecx
je 0x34ff
cmpl $0x29, %ecx
je 0x3505
cmpl $0x5e, %ecx
je 0x34ff
cmpl $0x28, %ecx
jne 0x3507
incl %eax
jmp 0x3507
testl %eax, %eax
jne 0x3507
jmp 0x3523
decl %eax
addq $0x8, %r14
jmp 0x34dc
movq %r15, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x35b0
callq 0x34ab
movq %rax, %r12
movl $0x2, 0x34(%rax)
movq %r15, %rdi
movq %r14, %rsi
callq 0x35b0
movq %rax, (%r12)
addq $0x8, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x34c9
movq %rax, 0x8(%r12)
andl $0x0, 0x30(%r12)
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/sh6.c
// Function: ascan
static void
ascan(char *ap, int (*func)(int))
{
	char c;

	if (ap == NULL)
		return;
	while ((c = *ap) != EOS)
		*ap++ = (*func)(c);
}

// Assembly:
testq %rdi, %rdi
je 0x37bc
movb (%rdi), %al
testb %al, %al
je 0x37bc
andb $0x7f, %al
movb %al, (%rdi)
incq %rdi
jmp 0x37ad
retq
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/sh6.c
// Function: vscan
static void
vscan(char **vp, int (*func)(int))
{
	char *ap, c;

	if (vp == NULL)
		return;
	while ((ap = *vp++) != NULL)
		while ((c = *ap) != EOS)
			*ap++ = (*func)(c);
}

// Assembly:
testq %rdi, %rdi
je 0x37f6
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%r14), %r15
testq %r15, %r15
je 0x37f1
addq $0x8, %r14
movsbl (%r15), %edi
testl %edi, %edi
je 0x37d3
callq *%rbx
movb %al, (%r15)
incq %r15
jmp 0x37df
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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, %ebp
leaq 0xc(%rsp), %r14
pushq $0x2
popq %r15
movq %r14, %rdi
callq 0x2280
cmpl $-0x1, %eax
je 0x3933
movl %eax, %r13d
movl 0xc(%rsp), %ebx
testq %rbx, %rbx
je 0x3878
movl %ebx, %r12d
andl $0x7f, %r12d
movl %r12d, %eax
shll $0x18, %eax
addl $0x1000000, %eax        # imm = 0x1000000
cmpl $0x2000000, %eax        # imm = 0x2000000
jl 0x3884
cmpl $0xd, %r12d
jbe 0x3891
leaq 0x10(%rsp), %rdi
pushq $0x21
popq %rsi
leaq 0x1a18(%rip), %rdx      # 0x5273
movl %r12d, %ecx
xorl %eax, %eax
callq 0x2130
leaq 0x1a0e(%rip), %rcx      # 0x527a
cmpl $0x21, %eax
jae 0x38a1
leaq 0x10(%rsp), %rcx
jmp 0x38a1
andl $0x0, 0x4935(%rip)      # 0x81b4
jmp 0x392a
testl %r12d, %r12d
je 0x38e4
movl 0x4925(%rip), %edi      # 0x81b4
jmp 0x38ed
leaq 0x44e8(%rip), %rax      # 0x7d80
movq (%rax,%r12,8), %rcx
cmpb $0x0, (%rcx)
je 0x38f9
leaq 0x18e9(%rip), %r8       # 0x5191
testb %bl, %bl
jns 0x38b3
leaq 0x19f1(%rip), %r8       # 0x52a4
movl %r15d, %edi
cmpl %ebp, %r13d
jne 0x38d1
leaq 0x19dc(%rip), %rsi      # 0x529e
movq %rcx, %rdx
movq %r8, %rcx
xorl %eax, %eax
callq 0x3b68
jmp 0x3911
leaq 0x19c2(%rip), %rsi      # 0x529a
movl %r13d, %edx
xorl %eax, %eax
callq 0x3b68
jmp 0x3911
movzbl %bh, %edi
movl %edi, 0x48c7(%rip)      # 0x81b4
cmpl $0x7c, %edi
jl 0x392a
movl %r15d, %eax
je 0x3919
jmp 0x3921
movl %r15d, %edi
leaq 0x1b0d(%rip), %rsi      # 0x5410
leaq 0x1887(%rip), %rdx      # 0x5191
xorl %eax, %eax
callq 0x3b68
leal 0x80(%r12), %eax
movl %eax, 0x4895(%rip)      # 0x81b4
movl %eax, %edi
xorl %esi, %esi
xorl %eax, %eax
callq 0x39b8
cmpl %ebp, %r13d
jne 0x3810
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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, 0x484d(%rip)      # 0x81b4
cmpq $0x0, 0x4839(%rip)      # 0x81a8
je 0x3983
callq 0x20e0
movl %eax, %ebx
callq 0x3c0b
cmpl %eax, %ebx
jne 0x39aa
popq %rbx
retq
pushq $0x2
popq %rdx
xorl %edi, %edi
xorl %esi, %esi
callq 0x2150
callq 0x20e0
movl %eax, %ebx
callq 0x3c0b
movl 0x4813(%rip), %edi      # 0x81b4
cmpl %eax, %ebx
jne 0x39b0
callq 0x2250
movl 0x4804(%rip), %edi      # 0x81b4
callq 0x2080
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/sasignal.c
// Function: sasignal
action_type
sasignal(int sig, action_type act)
{
	struct sigaction a, oa;

	(void)memset(&a, 0, sizeof(a));
	(void)sigemptyset(&a.sa_mask);
	(void)sigaddset(&a.sa_mask, sig);

	a.sa_handler = act;
	a.sa_flags   = SA_RESTART;

	if (sigaction(sig, &a, &oa) < 0)
		return SIG_ERR;

	return oa.sa_handler;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movq %rsi, %rbx
movl %edi, %ebp
leaq 0xa0(%rsp), %r14
movl $0x98, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x2160
leaq 0xa8(%rsp), %r15
movq %r15, %rdi
callq 0x21d0
movq %r15, %rdi
movl %ebp, %esi
callq 0x2290
movq %rbx, -0x8(%r15)
movl $0x10000000, 0x80(%r15) # imm = 0x10000000
leaq 0x8(%rsp), %rdx
movl %ebp, %edi
movq %r14, %rsi
callq 0x20b0
testl %eax, %eax
js 0x41f4
movq 0x8(%rsp), %rax
jmp 0x41f7
pushq $-0x1
popq %rax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/somethingnew2-0[P]CS537-P4/client.c
// Function: clientSend
void clientSend(int fd, char *filename)
{
  char buf[MAXLINE];
  char hostname[MAXLINE];

  Gethostname(hostname, MAXLINE);

  /* Form and send the HTTP request */
  sprintf(buf, "GET %s HTTP/1.1\n", filename);
  sprintf(buf, "%shost: %s\n\r\n", buf, hostname);
  Rio_writen(fd, buf, strlen(buf));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x4008, %rsp           # imm = 0x4008
movq %rsi, %r14
movl %edi, %ebx
movq %rsp, %r15
movl $0x2000, %esi           # imm = 0x2000
movq %r15, %rdi
callq 0x1639
leaq 0xc4e(%rip), %rsi       # 0x2004
leaq 0x2000(%rsp), %r12
movq %r12, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x1200
leaq 0xc43(%rip), %rsi       # 0x2015
movq %r12, %rdi
movq %r12, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x1200
movq %r12, %rdi
callq 0x1080
movl %ebx, %edi
movq %r12, %rsi
movq %rax, %rdx
callq 0x1ad9
addq $0x4008, %rsp           # imm = 0x4008
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/somethingnew2-0[P]CS537-P4/client.c
// Function: clientPrint
void clientPrint(int fd)
{
  rio_t rio;
  char buf[MAXBUF];  
  int length = 0;
  int n;
  
  Rio_readinitb(&rio, fd);

  /* Read and display the HTTP Header */
  n = Rio_readlineb(&rio, buf, MAXBUF);
  while (strcmp(buf, "\r\n") && (n > 0)) {
    printf("Header: %s", buf);
    n = Rio_readlineb(&rio, buf, MAXBUF);

    /* If you want to look for certain HTTP tags... */
    if (sscanf(buf, "Content-Length: %d ", &length) == 1) {
      printf("Length = %d\n", length);
    }
  }

  /* Read and display the HTTP Body */
  n = Rio_readlineb(&rio, buf, MAXBUF);
  while (n > 0) {
    printf("%s", buf);
    n = Rio_readlineb(&rio, buf, MAXBUF);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4028, %rsp           # imm = 0x4028
movl %edi, %esi
leaq 0xc(%rsp), %rax
andl $0x0, (%rax)
leaq 0x2018(%rsp), %rbx
movq %rbx, %rdi
callq 0x1af5
leaq 0x10(%rsp), %r15
movl $0x2000, %edx           # imm = 0x2000
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1b1d
movq %rax, %r14
leaq 0xbd0(%rip), %r12       # 0x2020
pushq $0x3
popq %r13
leaq 0xbc8(%rip), %rbp       # 0x2023
leaq 0xbcc(%rip), %rbx       # 0x202e
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x1170
testl %eax, %eax
je 0x14dc
testl %r14d, %r14d
jle 0x14dc
movq %rbp, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x10b0
movl $0x2000, %edx           # imm = 0x2000
leaq 0x2018(%rsp), %rdi
movq %r15, %rsi
callq 0x1b1d
movq %rax, %r14
movq %r15, %rdi
movq %rbx, %rsi
leaq 0xc(%rsp), %rdx
xorl %eax, %eax
callq 0x1150
cmpl $0x1, %eax
jne 0x1462
movl 0xc(%rsp), %esi
leaq 0xb82(%rip), %rdi       # 0x2042
xorl %eax, %eax
callq 0x10b0
jmp 0x1462
leaq 0xb5b(%rip), %rdi       # 0x202b
leaq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x10b0
leaq 0x2018(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl $0x2000, %edx           # imm = 0x2000
callq 0x1b1d
testl %eax, %eax
jg 0x14c9
addq $0x4028, %rsp           # imm = 0x4028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x1551
movq 0x8(%rbx), %r14
movq 0x10(%rbx), %rdi
callq 0x11d0
movq 0x18(%rbx), %rbx
movq %r14, %rdi
movl %eax, %esi
callq 0x1c96
movl %eax, %ebp
movl %eax, %edi
movq %rbx, %rsi
callq 0x138c
movl %ebp, %edi
callq 0x1406
movl %ebp, %edi
callq 0x1716
xorl %edi, %edi
callq 0x1210
movq 0x2aa0(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq (%rbx), %rdx
leaq 0xaea(%rip), %rsi       # 0x204f
xorl %eax, %eax
callq 0x1110
pushq $0x1
popq %rdi
callq 0x1210
// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movl %edi, %ebp
pushq $-0x1
popq %r14
movq %rdx, %r12
testq %r12, %r12
je 0x18c8
movl %ebp, %edi
movq %r15, %rsi
movq %r12, %rdx
callq 0x10e0
testq %rax, %rax
js 0x18b4
jne 0x18c0
jmp 0x18c8
callq 0x1030
cmpl $0x4, (%rax)
jne 0x18ce
xorl %eax, %eax
subq %rax, %r12
addq %rax, %r15
jmp 0x1899
subq %r12, %rbx
movq %rbx, %r14
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
pushq $-0x1
popq %r12
movq %rdx, %r15
testq %r15, %r15
je 0x191f
movl %ebp, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1060
testq %rax, %rax
jg 0x1914
callq 0x1030
cmpl $0x4, (%rax)
jne 0x191c
xorl %eax, %eax
subq %rax, %r15
addq %rax, %r14
jmp 0x18f1
movq %r12, %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
pushq $-0x1
popq %r14
movq %rdx, %r13
testq %r13, %r13
je 0x1983
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x1996
testq %rax, %rax
js 0x196f
jne 0x197b
jmp 0x1983
callq 0x1030
cmpl $0x4, (%rax)
jne 0x1989
xorl %eax, %eax
subq %rax, %r13
addq %rax, %r15
jmp 0x1953
subq %r13, %rbx
movq %rbx, %r14
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq