LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/orestesleal[P]base64/base64.c
// Function: encode_wr_file
void encode_wr_file(const char *src, const char *dst, unsigned char mode)
{
	struct finfo *fd;
	char *enc_buf;
	int ofd;
	size_t wr;
	int flags = O_CREAT | O_RDWR;
	int perms = S_IRUSR | O_TRUNC | S_IWUSR; 
	
	if ((fd = get_file(src)) == NULL) { /* load the input file 'src' */
		fprintf(stderr, "error: get_file() failed to load %s in main memory\n", src);
		exit(EXIT_FAILURE);
	}
	enc_buf = alloc(fd->size*2); /* buffer for the encoded string */
	switch (mode) {
		case BASE64:
			b64_enc((unsigned char *)fd->addr, enc_buf, fd->size);
			break;
		case BASE32:
			b32_enc((unsigned char *)fd->addr, (unsigned char *)enc_buf, fd->size);
			break;
		case BASE16:
			b16_enc(fd->addr, enc_buf, fd->size); 
			break;
		default:
			fprintf(stderr, "error: encoding %d mode not supported\n", mode);
			exit(EXIT_FAILURE);
	}
    if ((ofd = open(dst, flags, perms)) == -1) {
   		fprintf(stderr, "open(2) error, can't create or truncate %s\n", dst);
	    exit(EXIT_FAILURE);
	}
	if ((wr = write(ofd, enc_buf, strlen(enc_buf))) == -1) {
		fprintf(stderr, "write(2) error, can't write to %s\n", dst);
		exit(EXIT_FAILURE);
	}
	close(ofd);
	free(enc_buf);
	free(fd);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r13d
movq %rsi, %rbx
movq %rdi, %r15
callq 0x1ecd
testq %rax, %rax
je 0x1e67
movq %rax, %r14
movl 0x8(%rax), %r12d
leal (%r12,%r12), %edi
callq 0x2013
movq %rax, %r15
cmpb $0x3, %r13b
je 0x1dfd
movzbl %r13b, %edx
cmpl $0x2, %edx
je 0x1ded
cmpl $0x1, %edx
jne 0x1eb3
movq (%r14), %rdi
movq %r15, %rsi
movl %r12d, %edx
callq 0x17ca
jmp 0x1e0b
movq (%r14), %rdi
movq %r15, %rsi
movl %r12d, %edx
callq 0x1a3b
jmp 0x1e0b
movq (%r14), %rdi
movq %r15, %rsi
movl %r12d, %edx
callq 0x1ca1
pushq $0x42
popq %rsi
movq %rbx, %rdi
movl $0x380, %edx            # imm = 0x380
xorl %eax, %eax
callq 0x10b0
cmpl $-0x1, %eax
je 0x1e7d
movl %eax, %r12d
movq %r15, %rdi
callq 0x1050
movl %r12d, %edi
movq %r15, %rsi
movq %rax, %rdx
callq 0x1040
cmpq $-0x1, %rax
je 0x1e90
movl %r12d, %edi
callq 0x1060
movq %r15, %rdi
callq 0x1030
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1030
movq 0x318a(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x129c(%rip), %rsi      # 0x3114
movq %r15, %rdx
jmp 0x1ea4
movq 0x3174(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x11a3(%rip), %rsi      # 0x3031
jmp 0x1ea1
movq 0x3161(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x11bc(%rip), %rsi      # 0x305d
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1080
pushq $0x1
popq %rdi
callq 0x10c0
movq 0x313e(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x1284(%rip), %rsi      # 0x3148
xorl %eax, %eax
callq 0x1080
jmp 0x1eab
// File: /workspace/github_c_makefile_star2_O2/orestesleal[P]base64/base64.c
// Function: get_file
struct finfo *get_file(const char *f)
{
	int fd;
	struct stat fp;
	char *addr; 
	struct finfo *st_addr;
	size_t rd;

	if ((fd = open(f, O_RDONLY)) == -1) {
		fprintf(stderr, "open(2) failed for file %s\n", f);
		return NULL;
	}
	stat(f, &fp); /* get file info with stat(2) */
	if ((addr = (char *)malloc(fp.st_size)) == NULL) {
		fprintf(stderr, "malloc(3) failed allocating %d bytes\n", (int)fp.st_size);
		close(fd);
		return NULL;
	}
	if ((rd = read(fd, addr, fp.st_size)) == -1) {
		fprintf(stderr, "read(2) failed reading %s with %d bytes into memory\n", f, (int)fp.st_size);
		close(fd);
		free(addr);
		return NULL;
	}
	if ((st_addr = (struct finfo *)malloc(sizeof(struct finfo))) == NULL) {
		fprintf(stderr, "malloc(3) failed allocating the returned structure\n");
		close(fd);
		free(addr);
		return NULL;
	}
	close(fd);
	st_addr->addr = addr;
	st_addr->size = fp.st_size;
	return st_addr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, %r12
xorl %esi, %esi
xorl %eax, %eax
callq 0x10b0
cmpl $-0x1, %eax
je 0x1f64
movl %eax, %ebx
leaq -0xb8(%rbp), %r14
movq %r12, %rdi
movq %r14, %rsi
callq 0x1090
movq 0x30(%r14), %r13
movq %r13, %rdi
callq 0x10a0
testq %rax, %rax
je 0x1f84
movq %rax, %r14
movl %ebx, %edi
movq %rax, %rsi
movq %r13, %rdx
callq 0x1070
cmpq $-0x1, %rax
je 0x1fab
pushq $0x10
popq %rdi
callq 0x10a0
testq %rax, %rax
je 0x1fe0
movq %rax, %r15
movl %ebx, %edi
callq 0x1060
movq %r14, (%r15)
movq %r13, 0x8(%r15)
movq %r15, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x308d(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x1222(%rip), %rsi      # 0x3197
xorl %r15d, %r15d
movq %r12, %rdx
xorl %eax, %eax
callq 0x1080
jmp 0x1f4f
movq 0x306d(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x121e(%rip), %rsi      # 0x31b3
xorl %r15d, %r15d
movl %r13d, %edx
xorl %eax, %eax
callq 0x1080
movl %ebx, %edi
callq 0x1060
jmp 0x1f4f
movq 0x3046(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x121d(%rip), %rsi      # 0x31d9
xorl %r15d, %r15d
movq %r12, %rdx
movl %r13d, %ecx
xorl %eax, %eax
callq 0x1080
movl %ebx, %edi
callq 0x1060
movq %r14, %rdi
callq 0x1030
jmp 0x1f4f
movq 0x3011(%rip), %rax      # 0x4ff8
movq (%rax), %rcx
leaq 0x121d(%rip), %rdi      # 0x320e
pushq $0x33
popq %rsi
pushq $0x1
popq %rdx
callq 0x10d0
movl %ebx, %edi
callq 0x1060
movq %r14, %rdi
callq 0x1030
xorl %r15d, %r15d
jmp 0x1f4f
// File: /workspace/github_c_makefile_star2_O2/orestesleal[P]base64/base64.c
// Function: alloc
char *alloc(unsigned int size)
{
    char *ptr = (char *)malloc(size);
    if (ptr == NULL) {
		fprintf(stderr, "malloc: error, can't allocate %d bytes\n", size);
		exit(EXIT_FAILURE);
	}
	return ptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl %edi, %edi
callq 0x10a0
testq %rax, %rax
je 0x202e
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq 0x2fc3(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x1130(%rip), %rsi      # 0x316f
movl %ebx, %edx
xorl %eax, %eax
callq 0x1080
pushq $0x1
popq %rdi
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O2/orestesleal[P]base64/base64.c
// Function: decode_rd_file
void decode_rd_file(const char *src, const char *dst, unsigned char mode)
{
	struct finfo *fd;
	char *dec_buf;
	int ofd;
	size_t wr;
	size_t dec; /* number of decoded bytes */
	int flags = O_CREAT | O_RDWR;
    int perms = S_IRUSR | O_TRUNC | S_IWUSR;

	if ((fd = get_file(src)) == NULL) {
		fprintf(stderr, "get_file() failed loading %s in main memory\n", src);
		exit(EXIT_FAILURE);
	}

	dec_buf = alloc(fd->size); 
	switch (mode) {
		case BASE64:
			dec = b64_dec((unsigned char *)fd->addr, dec_buf, fd->size); 
			break;
		case BASE32:
			dec = b32_dec((unsigned char *)fd->addr, dec_buf, fd->size); 
			break;
		case BASE16:
			dec = b16_dec(fd->addr, dec_buf, fd->size); 
			break;
		default:
			fprintf(stderr,"error: mode %d not supported\n", mode);
			exit(EXIT_FAILURE);
	}

    if ((ofd = open(dst, flags, perms)) == -1) {
      	fprintf(stderr, "open(2) error, can't create or truncate %s\n", dst);
      	exit(EXIT_FAILURE);
	}
	/* write the contents of `dec_buf` into the file requested on dst */
	if ((wr = write(ofd, dec_buf, dec)) == -1) {
		fprintf(stderr, "write(2) error, can't write to %s\n", dst);
		exit(EXIT_FAILURE);
	}
	close(ofd);
	free(dec_buf);
	free(fd);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r13d
movq %rsi, %rbx
movq %rdi, %r15
callq 0x1ecd
testq %rax, %rax
je 0x2123
movq %rax, %r14
movl 0x8(%rax), %r12d
movl %r12d, %edi
callq 0x2013
movq %rax, %r15
cmpb $0x3, %r13b
je 0x20bf
movzbl %r13b, %edx
cmpl $0x2, %edx
je 0x20af
cmpl $0x1, %edx
jne 0x216f
movq (%r14), %rdi
movq %r15, %rsi
movl %r12d, %edx
callq 0x18c7
jmp 0x20cd
movq (%r14), %rdi
movq %r15, %rsi
movl %r12d, %edx
callq 0x1b73
jmp 0x20cd
movq (%r14), %rdi
movq %r15, %rsi
movl %r12d, %edx
callq 0x1ce2
movl %eax, %r12d
pushq $0x42
popq %rsi
movq %rbx, %rdi
movl $0x380, %edx            # imm = 0x380
xorl %eax, %eax
callq 0x10b0
cmpl $-0x1, %eax
je 0x2139
movl %eax, %r13d
movl %r12d, %edx
movl %eax, %edi
movq %r15, %rsi
callq 0x1040
cmpq $-0x1, %rax
je 0x214c
movl %r13d, %edi
callq 0x1060
movq %r15, %rdi
callq 0x1030
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1030
movq 0x2ece(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0xed0(%rip), %rsi       # 0x3004
movq %r15, %rdx
jmp 0x2160
movq 0x2eb8(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0xee7(%rip), %rsi       # 0x3031
jmp 0x215d
movq 0x2ea5(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0xf00(%rip), %rsi       # 0x305d
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1080
pushq $0x1
popq %rdi
callq 0x10c0
movq 0x2e82(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x10c2(%rip), %rsi      # 0x3242
xorl %eax, %eax
callq 0x1080
jmp 0x2167
// File: /workspace/github_c_makefile_star2_O2/ulisses[P]ftp-client-server/apl.c
// Function: trataPedido
void trataPedido(char *cmd, char *ip){
	int pid, status;
	if((pid = fork())==0){
		int res;
		res = execl("./clientc2", "-te", "0", "-tp", "0", ip, cmd, NULL);
		if(res < 0){
			perror("execl");
		}
		exit(0);
	}
	wait(&status);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x10a0
testl %eax, %eax
je 0x11e8
leaq -0x14(%rbp), %rdi
callq 0x1090
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
andq $0x0, 0x8(%rsp)
movq %r14, (%rsp)
leaq 0xe0b(%rip), %rdi       # 0x2004
leaq 0xe0f(%rip), %rsi       # 0x200f
leaq 0xe0e(%rip), %rcx       # 0x2015
leaq 0xe05(%rip), %rdx       # 0x2013
movq %rdx, %r8
movq %rbx, %r9
xorl %eax, %eax
callq 0x1080
testl %eax, %eax
jns 0x122b
leaq 0xdf3(%rip), %rdi       # 0x2019
callq 0x1060
xorl %edi, %edi
callq 0x1070
// File: /workspace/github_c_makefile_star2_O2/ulisses[P]ftp-client-server/apl.c
// Function: main
int main(int argc, char *argv[]){
	if(argc ==1){
		printf("erro: ./apl endereco_ip_servidor\n");
		return 0;
	}
	else {
		int sair = 0;
		char *ip = argv[1];
		char cmd[50];
		while(!sair){
			printf(">>");
			fgets(cmd, 50, stdin);
			if(strstr(cmd, "sair")) sair = 1;
			else trataPedido(cmd, ip);
		}
	return 1;
		
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
cmpl $0x1, %edi
jne 0x1258
leaq 0xdd8(%rip), %rdi       # 0x2027
callq 0x1030
xorl %eax, %eax
jmp 0x12ae
movq 0x8(%rsi), %rbx
movq 0x2d7d(%rip), %r14      # 0x3fe0
leaq -0x60(%rbp), %r15
pushq $0x32
popq %r12
leaq 0xdb0(%rip), %r13       # 0x2022
leaq 0xda6(%rip), %rdi       # 0x201f
xorl %eax, %eax
callq 0x1040
movq (%r14), %rdx
movq %r15, %rdi
movl %r12d, %esi
callq 0x1050
movq %r15, %rdi
movq %r13, %rsi
callq 0x10b0
testq %rax, %rax
jne 0x12ab
movq %r15, %rdi
movq %rbx, %rsi
callq 0x11bc
jmp 0x1272
pushq $0x1
popq %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/paeq160/ref/encrypt.cpp
// Function: AES_Round(unsigned char*)
void AES_Round(unsigned char* state)  //SubBytes-ShiftRows-MixColumns
{
	unsigned char tmp[4][4];

	for(unsigned i=0; i<4; ++i)
	{
		for(unsigned j=0; j<4; ++j)
			tmp[j][i] = state[4*i+j];//AES state conversion
	}
	for(unsigned i=0; i<4; ++i)//Columnwise loop
	 {
	 	state[4*i] = mul[sbox[tmp[0][i]]][2] ^ mul[sbox[tmp[3][(i+3)%4]]][1] ^
						mul[sbox[tmp[2][(i+2)%4]]][1] ^ mul[sbox[tmp[1][(i+1)%4]]][3];
		state[4*i+1] = mul[sbox[tmp[1][(i+1)%4]]][2] ^ mul[sbox[tmp[0][i]]][1] ^
					mul[sbox[tmp[3][(i+3)%4]]][1] ^ mul[sbox[tmp[2][(i+2)%4]]][3];
		state[4*i+2] = mul[sbox[tmp[2][(i+2)%4]]][2] ^ mul[sbox[tmp[1][(i+1)%4]]][1] ^
					mul[sbox[tmp[0][i]]][1] ^ mul[sbox[tmp[3][(i+3)%4]]][3];
		state[4*i+3] = mul[sbox[tmp[3][(i+3)%4]]][2] ^ mul[sbox[tmp[2][(i+2)%4]]][1] ^
					mul[sbox[tmp[1][(i+1)%4]]][1] ^ mul[sbox[tmp[0][i]]][3];
	 }

}

// Assembly:
pushq %rbx
leaq -0x10(%rsp), %rax
xorl %ecx, %ecx
movq %rdi, %rdx
cmpq $0x4, %rcx
je 0x11be
xorl %esi, %esi
cmpq $0x4, %rsi
je 0x11b2
movb (%rdx,%rsi), %r8b
movb %r8b, (%rax,%rsi,4)
incq %rsi
jmp 0x119f
incq %rcx
addq $0x4, %rdx
incq %rax
jmp 0x1197
xorl %eax, %eax
leaq 0x1e39(%rip), %rcx      # 0x3000
movq 0x3e2a(%rip), %rdx      # 0x4ff8
cmpq $0x4, %rax
je 0x1292
movzbl -0x10(%rsp,%rax), %esi
movzbl (%rsi,%rcx), %esi
shll $0x8, %esi
leal -0x1(%rax), %r8d
andl $0x3, %r8d
movzbl -0x4(%rsp,%r8), %r8d
movzbl (%r8,%rcx), %r8d
shll $0x8, %r8d
movb 0x1(%rdx,%r8), %r11b
xorb 0x2(%rdx,%rsi), %r11b
movq %rax, %r9
xorq $0x2, %r9
movzbl -0x8(%rsp,%r9), %r9d
movzbl (%r9,%rcx), %r10d
shll $0x8, %r10d
xorb 0x1(%rdx,%r10), %r11b
leaq 0x1(%rax), %r9
movl %r9d, %ebx
andl $0x3, %ebx
movzbl -0xc(%rsp,%rbx), %ebx
movzbl (%rbx,%rcx), %ebx
shll $0x8, %ebx
xorb 0x3(%rdx,%rbx), %r11b
movb %r11b, (%rdi,%rax,4)
movb 0x1(%rdx,%rsi), %r11b
xorb 0x2(%rdx,%rbx), %r11b
xorb 0x1(%rdx,%r8), %r11b
xorb 0x3(%rdx,%r10), %r11b
movb %r11b, 0x1(%rdi,%rax,4)
movb 0x1(%rdx,%rbx), %r11b
xorb 0x2(%rdx,%r10), %r11b
xorb 0x1(%rdx,%rsi), %r11b
xorb 0x3(%rdx,%r8), %r11b
movb %r11b, 0x2(%rdi,%rax,4)
movb 0x1(%rdx,%r10), %r10b
xorb 0x2(%rdx,%r8), %r10b
xorb 0x1(%rdx,%rbx), %r10b
xorb 0x3(%rdx,%rsi), %r10b
movb %r10b, 0x3(%rdi,%rax,4)
movq %r9, %rax
jmp 0x11ce
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/paeq160/ref/encrypt.cpp
// Function: gmul_o(unsigned char, unsigned char)
unsigned char gmul_o(unsigned char a, unsigned char b) {
	unsigned char p = 0;
	unsigned char counter;
	unsigned char hi_bit_set;
	for(counter = 0; counter < 8; counter++) {
		if((b & 1) == 1) 
			p ^= a;
		hi_bit_set = (a & 0x80);
		a <<= 1;
		if(hi_bit_set == 0x80) 
			a ^= 0x1b;		
		b >>= 1;
	}
	return p;
}

// Assembly:
movb $0x8, %cl
xorl %eax, %eax
subb $0x1, %cl
jb 0x145e
movl %esi, %edx
andb $0x1, %dl
negb %dl
andb %dil, %dl
xorb %dl, %al
leal (%rdi,%rdi), %edx
movzbl %dl, %r8d
xorb $0x1b, %dl
testb %dil, %dil
movzbl %dl, %edi
cmovnsl %r8d, %edi
shrb %sil
jmp 0x1434
retq
// File: /workspace/github_c_makefile_star2_O2/rakitzis[P]rc/builtins.c
// Function: isbuiltin
extern builtin_t *isbuiltin(char *s) {
    int i;
    for (i = 0; i < arraysize(builtins); i++)
	if (streq(builtins[i].name, s))
	    return builtins[i].p;
    return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
movb (%rdi), %bpl
pushq $0x8
popq %r15
xorl %ebx, %ebx
leaq 0x15d29(%rip), %r12     # 0x191e0
cmpq $0x118, %r15            # imm = 0x118
je 0x34e0
movq (%r15,%r12), %rdi
cmpb %bpl, (%rdi)
jne 0x34d5
movq %r14, %rsi
callq 0x31f0
testl %eax, %eax
je 0x34db
addq $0x10, %r15
jmp 0x34b7
movq -0x8(%r15,%r12), %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/rakitzis[P]rc/builtins.c
// Function: funcall
extern void funcall(char **av) {
	Jbwrap j;
	Estack e1, e2;
	Edata jreturn, star;
	if (sigsetjmp(j.j, 1))
		return;
	starassign(*av, av+1, TRUE);
	jreturn.jb = &j;
	star.name = "*";
	except(eReturn, jreturn, &e1);
	except(eVarstack, star, &e2);
	walk(treecpy(fnlookup(*av), nalloc), TRUE);
	varrm("*", TRUE);
	unexcept(eVarstack);
	unexcept(eReturn);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rdi, %r14
leaq 0x38(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x3370
testl %eax, %eax
jne 0x3589
movq (%r14), %rdi
leaq 0x8(%r14), %rsi
pushq $0x1
popq %rbp
movl %ebp, %edx
callq 0xc328
pushq $0x2
popq %rbx
leaq 0x38(%rsp), %rsi
leaq 0x20(%rsp), %rdx
movl %ebx, %edi
callq 0x43bc
leaq 0xab21(%rip), %r12      # 0xe05c
pushq $0x3
popq %r15
leaq 0x8(%rsp), %rdx
movl %r15d, %edi
movq %r12, %rsi
callq 0x43bc
movq (%r14), %rdi
callq 0x4e40
leaq 0x63ca(%rip), %rsi      # 0x9928
movq %rax, %rdi
callq 0xbc1d
movq %rax, %rdi
movl %ebp, %esi
callq 0xc950
movq %r12, %rdi
movl %ebp, %esi
callq 0xc2ae
movl %r15d, %edi
callq 0x43f0
movl %ebx, %edi
callq 0x43f0
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/rakitzis[P]rc/builtins.c
// Function: b_dot
extern void b_dot(char **av) {
	int fd;
	bool old_i = interactive, i = FALSE;
	Estack e;
	Edata star;
	av++;
	if (*av == NULL)
		return;
	if (streq(*av, "-i")) {
		av++;
		i = TRUE;
	}
	if (dasheye) { /* rc -i file has to do the right thing. reset the dasheye state to FALSE, though. */
		dasheye = FALSE;
		i = TRUE;
	}
	if (*av == NULL)
		return;
	fd = rc_open(*av, rFrom);
	if (fd < 0) {
		uerror(*av);
		set(FALSE);
		return;
	}
	starassign(*av, av+1, TRUE);
	interactive = i;
	pushfd(fd);
	star.name = "*";
	except(eVarstack, star, &e);
	doit(TRUE);
	varrm("*", TRUE);
	unexcept(eVarstack);
	interactive = old_i;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x3664
leaq 0x8(%rdi), %rbx
xorl %r15d, %r15d
cmpb $0x2d, (%rax)
jne 0x35db
cmpb $0x69, 0x1(%rax)
jne 0x35db
addq $0x10, %rdi
xorl %r15d, %r15d
cmpb $0x0, 0x2(%rax)
sete %r15b
cmoveq %rdi, %rbx
leaq 0x165f6(%rip), %rax     # 0x19bd8
cmpl $0x0, (%rax)
je 0x35ee
andl $0x0, (%rax)
pushq $0x1
popq %r15
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3664
leaq 0x165d7(%rip), %r12     # 0x19bd4
movl (%r12), %r13d
xorl %esi, %esi
callq 0x9afc
movq (%rbx), %rdi
testl %eax, %eax
js 0x3673
movl %eax, %ebp
addq $0x8, %rbx
pushq $0x1
popq %r14
movq %rbx, %rsi
movl %r14d, %edx
callq 0xc328
movl %r15d, (%r12)
movl %ebp, %edi
callq 0x7ef0
leaq 0xaa26(%rip), %rbx      # 0xe05c
pushq $0x3
popq %rbp
movq %rsp, %rdx
movl %ebp, %edi
movq %rbx, %rsi
callq 0x43bc
movl %r14d, %edi
callq 0x80bf
movq %rbx, %rdi
movl %r14d, %esi
callq 0xc2ae
movl %ebp, %edi
callq 0x43f0
movl %r13d, (%r12)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xbe9d
xorl %edi, %edi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xb43a
// File: /workspace/github_c_makefile_star2_O2/rakitzis[P]rc/builtins.c
// Function: b_echo
static void b_echo(char **av) {
    char *format = "%A\n";
    if (*++av != NULL) {
	if (streq(*av, "-n"))
	    format = "%A", av++;
	else if (streq(*av, "--"))
	    av++;
    }
    fprint(1, format, av);
    set(TRUE);
}

// Assembly:
leaq 0x8(%rdi), %rdx
movq 0x8(%rdi), %rax
leaq 0xa817(%rip), %rsi      # 0xe0ef
testq %rax, %rax
je 0x3910
cmpb $0x2d, (%rax)
jne 0x3910
cmpb $0x6e, 0x1(%rax)
jne 0x38ee
cmpb $0x0, 0x2(%rax)
je 0x3902
cmpb $0x2d, 0x1(%rax)
jne 0x3910
addq $0x10, %rdi
cmpb $0x0, 0x2(%rax)
cmoveq %rdi, %rdx
jmp 0x3910
addq $0x10, %rdi
leaq 0xa7e6(%rip), %rsi      # 0xe0f3
movq %rdi, %rdx
pushq %rbx
pushq $0x1
popq %rbx
movl %ebx, %edi
xorl %eax, %eax
callq 0xa8f6
movl %ebx, %edi
popq %rbx
jmp 0xb43a
// File: /workspace/github_c_makefile_star2_O2/rakitzis[P]rc/builtins.c
// Function: b_eval
static void b_eval(char **av) {
	bool i = interactive;
	if (av[1] == NULL)
		return;
	interactive = FALSE;
	pushstring(av + 1, i); /* don't reset line numbers on noninteractive eval */
	doit(TRUE);
	interactive = i;
}

// Assembly:
cmpq $0x0, 0x8(%rdi)
je 0x395b
pushq %r14
pushq %rbx
pushq %rax
addq $0x8, %rdi
leaq 0x16299(%rip), %r14     # 0x19bd4
movl (%r14), %ebx
andl $0x0, (%r14)
movl %ebx, %esi
callq 0x7f86
pushq $0x1
popq %rdi
callq 0x80bf
movl %ebx, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/rakitzis[P]rc/builtins.c
// Function: b_newpgrp
static void b_newpgrp(char **av) {
	if (av[1] != NULL) {
		arg_count("newpgrp");
		return;
	}
	setpgid(rc_pid, rc_pid); /* XXX check return value */
	tcsetpgrp(2, rc_pid); /* XXX check return value */
}

// Assembly:
cmpq $0x0, 0x8(%rdi)
je 0x3d3f
leaq 0xa34d(%rip), %rdi      # 0xe087
jmp 0x4234
pushq %rbx
leaq 0x15e79(%rip), %rbx     # 0x19bc0
movl (%rbx), %edi
movl %edi, %esi
callq 0x3320
movl (%rbx), %esi
pushq $0x2
popq %rdi
popq %rbx
jmp 0x32e0
// File: /workspace/github_c_makefile_star2_O2/rakitzis[P]rc/builtins.c
// Function: b_shift
static void b_shift(char **av) {
	int shift = (av[1] == NULL ? 1 : a2u(av[1]));
	List *s, *dollarzero;
	if (av[1] != NULL && av[2] != NULL) {
		arg_count("shift");
		return;
	}
	if (shift < 0) {
		badnum(av[1]);
		return;
	}
	s = varlookup("*")->n;
	dollarzero = varlookup("0");
	while (s != NULL && shift != 0) {
		s = s->n;
		--shift;
	}
	if (s == NULL && shift != 0) {
		fprint(2, "rc: cannot shift\n");
		set(FALSE);
	} else {
		varassign("*", append(dollarzero, s), FALSE);
		set(TRUE);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x3dcc
pushq $0xa
popq %rsi
callq 0xbf32
movl %eax, %ebx
movq 0x8(%r14), %rdx
testq %rdx, %rdx
je 0x3db5
cmpq $0x0, 0x10(%r14)
je 0x3db5
leaq 0xa2ed(%rip), %rdi      # 0xe096
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4234
testl %ebx, %ebx
jns 0x3dcf
leaq 0xa460(%rip), %rsi      # 0xe220
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0xa8f6
jmp 0x3e1e
pushq $0x1
popq %rbx
leaq 0xa286(%rip), %rdi      # 0xe05c
callq 0xc16d
movq 0x10(%rax), %r14
leaq 0xf1db(%rip), %rdi      # 0x12fc1
callq 0xc16d
movl %ebx, %ecx
addl $-0x1, %ecx
setb %dl
testq %r14, %r14
je 0x3e04
testb %dl, %dl
je 0x3e04
movq 0x10(%r14), %r14
movl %ecx, %ebx
jmp 0x3ded
testq %r14, %r14
jne 0x3e22
testl %ebx, %ebx
je 0x3e22
leaq 0xa3fa(%rip), %rsi      # 0xe20e
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0xa8f6
xorl %edi, %edi
jmp 0x3e41
movq %rax, %rdi
movq %r14, %rsi
callq 0x642e
leaq 0xa228(%rip), %rdi      # 0xe05c
movq %rax, %rsi
xorl %edx, %edx
callq 0xbfac
pushq $0x1
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xb43a
// File: /workspace/github_c_makefile_star2_O2/rakitzis[P]rc/builtins.c
// Function: b_umask
static void b_umask(char **av) {
    int i;
    if (*++av == NULL) {
	set(TRUE);
	i = umask(0);
	umask(i);
	fprint(1, "0%o\n", i);
    } else if (av[1] == NULL) {
	i = o2u(*av);
	if ((unsigned int) i > 0777) {
	    fprint(2, "bad umask\n");
	    set(FALSE);
	} else {
	    umask(i);
	    set(TRUE);
	}
    } else {
	arg_count("umask");
	return;
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rax
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x3e75
cmpq $0x0, 0x10(%rax)
je 0x3ea7
leaq 0xa232(%rip), %rdi      # 0xe09c
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x4234
pushq $0x1
popq %rbx
movl %ebx, %edi
callq 0xb43a
xorl %edi, %edi
callq 0x3200
movl %eax, %ebp
movl %eax, %edi
callq 0x3200
leaq 0xa3a4(%rip), %rsi      # 0xe23a
movl %ebx, %edi
movl %ebp, %edx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xa8f6
pushq $0x8
popq %rsi
callq 0xbf32
cmpl $0x200, %eax            # imm = 0x200
jb 0x3ecb
leaq 0xa382(%rip), %rsi      # 0xe23f
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0xa8f6
xorl %edi, %edi
jmp 0x3ed5
movl %eax, %edi
callq 0x3200
pushq $0x1
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xb43a
// File: /workspace/github_c_makefile_star2_O2/rakitzis[P]rc/builtins.c
// Function: b_wait
static void b_wait(char **av) {
	if (*++av == NULL)
		waitforall();
	else
		waitfor(av);
        sigchk();
}

// Assembly:
pushq %rax
cmpq $0x0, 0x8(%rdi)
je 0x3ef3
addq $0x8, %rdi
callq 0xc829
jmp 0x3ef8
callq 0xc7d1
popq %rax
jmp 0xb266
// File: /workspace/github_c_makefile_star2_O2/rakitzis[P]rc/builtins.c
// Function: printlimit
static void printlimit(const struct Limit *limit, bool hard) {
	struct rlimit rlim;
	rlim_t lim;
	getrlimit(limit->flag, &rlim);
	if (hard)
		lim = rlim.rlim_max;
	else
		lim = rlim.rlim_cur;
	if (lim == RLIM_INFINITY)
		fprint(1, "%s \tunlimited\n", limit->name);
	else {
		const struct Suffix *suf;
		for (suf = limit->suffix; suf != NULL; suf = suf->next)
			if (lim % suf->amount == 0 && (lim != 0 || suf->amount > 1)) {
				lim /= suf->amount;
				break;
			}
		fprint(1, RLIM_FMT, limit->name, (RLIM_CONV)lim, (suf == NULL || lim == 0) ? "" : suf->name);
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movl 0x8(%rdi), %edi
movq %rsp, %r14
movq %r14, %rsi
callq 0x3340
testl %ebp, %ebp
leaq 0x8(%rsp), %rax
cmoveq %r14, %rax
movq (%rax), %rcx
cmpq $-0x1, %rcx
je 0x42c2
leaq 0x10(%rbx), %rsi
movq (%rsi), %rsi
testq %rsi, %rsi
je 0x42d8
testq %rcx, %rcx
setne %r8b
movq 0x8(%rsi), %rdi
movq %rcx, %rax
xorl %edx, %edx
divq %rdi
cmpq $0x2, %rdi
setge %r9b
testq %rdx, %rdx
jne 0x4284
orb %r9b, %r8b
je 0x4284
movq (%rbx), %rdx
cmpq %rcx, %rdi
jbe 0x42e4
leaq 0xab67(%rip), %r8       # 0xee27
jmp 0x42e8
movq (%rbx), %rdx
leaq 0x9f1e(%rip), %rsi      # 0xe1ea
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0xa8f6
jmp 0x42fc
movq (%rbx), %rdx
leaq 0xab45(%rip), %r8       # 0xee27
jmp 0x42eb
movq 0x10(%rsi), %r8
movq %rax, %rcx
leaq 0x9f07(%rip), %rsi      # 0xe1f9
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0xa8f6
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/rakitzis[P]rc/except.c
// Function: except
extern void except(ecodes e, Edata data, Estack *ex) {
	ex->prev = estack;
	estack = ex;
	estack->e = e;
	estack->data = data;
	if (e == eError || e == eBreak || e == eReturn || e == eContinue)
		estack->interactive = interactive;
}

// Assembly:
movq 0x153b5(%rip), %rax     # 0x19778
movq %rax, 0x10(%rdx)
movq %rdx, 0x153aa(%rip)     # 0x19778
movl %edi, (%rdx)
movq %rsi, 0x8(%rdx)
cmpl $0x7, %edi
ja 0x43ef
movl $0x87, %eax
btl %edi, %eax
jae 0x43ef
leaq 0x157ea(%rip), %rax     # 0x19bd4
movl (%rax), %eax
movl %eax, 0x4(%rdx)
retq
// File: /workspace/github_c_makefile_star2_O2/rakitzis[P]rc/except.c
// Function: unexcept
extern void unexcept(ecodes e) {
	assert(e == estack->e);
	switch (estack->e) {
	default:
		break;
	case eError:
		interactive = estack->interactive;
		break;
	case eArena:
		restoreblock(estack->data.b);
		break;
	case eFifo:
		unlink(estack->data.name);
		break;
	case eFd:
		close(estack->data.fd);
		break;
	}
	estack = estack->prev;
}

// Assembly:
pushq %rax
movq 0x15380(%rip), %rax     # 0x19778
cmpl %edi, (%rax)
jne 0x4453
cmpl $0x6, %edi
ja 0x443f
movl %edi, %ecx
leaq 0x9f2e(%rip), %rdx      # 0xe338
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl 0x4(%rax), %eax
leaq 0x157b7(%rip), %rcx     # 0x19bd4
movl %eax, (%rcx)
jmp 0x443f
movq 0x8(%rax), %rdi
callq 0x3050
jmp 0x443f
movq 0x8(%rax), %rdi
callq 0x9a71
jmp 0x443f
movl 0x8(%rax), %edi
callq 0x3170
movq 0x15332(%rip), %rax     # 0x19778
movq 0x10(%rax), %rax
movq %rax, 0x15327(%rip)     # 0x19778
popq %rax
retq
leaq 0x9f0a(%rip), %rdi      # 0xe364
leaq 0x9f12(%rip), %rsi      # 0xe373
leaq 0x9f14(%rip), %rcx      # 0xe37c
pushq $0x20
popq %rdx
callq 0x3140
// File: /workspace/github_c_makefile_star2_O2/rakitzis[P]rc/except.c
// Function: rc_raise
extern void rc_raise(ecodes e) {
	if (e == eError && rc_pid != getpid())
		exit(1); /* child processes exit on an error/signal */
	for (; estack != NULL; estack = estack->prev)
		if (estack->e != e) {
			if (e == eBreak && (estack->e != eArena && estack->e != eVarstack && estack->e != eContinue))
				rc_error("break outside of loop");
			else if (e == eContinue && (estack->e != eVarstack))
				rc_error("continue outside of loop");
			else if (e == eReturn && estack->e == eError) /* can return from loops inside functions */
				rc_error("return outside of function");
			switch (estack->e) {
			default:
				break;
			case eVarstack:
				varrm(estack->data.name, TRUE);
				break;
			case eArena:
				restoreblock(estack->data.b);
				break;
			case eFifo:
				unlink(estack->data.name);
				break;
			case eFd:
				close(estack->data.fd);
				break;
			}
		} else {
			if (e == eError && !estack->interactive) {
				popinput();
			} else {
				Jbwrap *j = estack->data.jb;

				interactive = estack->interactive;
				estack = estack->prev;
				siglongjmp(j->j, 1);
			}
		}
	rc_exit(1); /* top of exception stack */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
testl %edi, %edi
jne 0x4497
leaq 0x15738(%rip), %rax     # 0x19bc0
movl (%rax), %ebp
callq 0x30d0
cmpl %eax, %ebp
jne 0x45af
movq 0x152da(%rip), %rax     # 0x19778
leaq 0x9f03(%rip), %r14      # 0xe3a8
leaq 0x9ea8(%rip), %r15      # 0xe354
leaq 0x9f0e(%rip), %r12      # 0xe3c1
leaq 0x9ed8(%rip), %r13      # 0xe392
movl $0x98, %ebp
testq %rax, %rax
je 0x4579
movl (%rax), %ecx
cmpl %ebx, %ecx
jne 0x44f4
movl 0x4(%rax), %ecx
movl %ebx, %edx
orl %ecx, %edx
jne 0x458f
callq 0x7fed
movq 0x15291(%rip), %rax     # 0x19778
movq 0x10(%rax), %rax
movq %rax, 0x15286(%rip)     # 0x19778
jmp 0x44bf
cmpl $0x7, %ebx
je 0x451e
cmpl $0x2, %ebx
je 0x4515
cmpl $0x1, %ebx
jne 0x452b
movq %r13, %rdi
cmpl $0x7, %ecx
ja 0x4526
btl %ecx, %ebp
movq %r13, %rdi
jb 0x452b
jmp 0x4526
movq %r12, %rdi
testl %ecx, %ecx
jne 0x452b
jmp 0x4526
movq %r14, %rdi
cmpl $0x3, %ecx
je 0x452b
callq 0x45b7
movq 0x15246(%rip), %rax     # 0x19778
movl (%rax), %ecx
addl $-0x3, %ecx
cmpl $0x3, %ecx
ja 0x44e0
movslq (%r15,%rcx,4), %rcx
addq %r15, %rcx
jmpq *%rcx
movq 0x8(%rax), %rdi
pushq $0x1
popq %rsi
callq 0xc2ae
jmp 0x44e0
movq 0x8(%rax), %rdi
callq 0x3050
jmp 0x44e0
movl 0x8(%rax), %edi
callq 0x3170
jmp 0x44e0
movq 0x8(%rax), %rdi
callq 0x9a71
jmp 0x44e0
pushq $0x1
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4d65
movq 0x8(%rax), %rdi
leaq 0x1563a(%rip), %rdx     # 0x19bd4
movl %ecx, (%rdx)
movq 0x10(%rax), %rax
movq %rax, 0x151d1(%rip)     # 0x19778
pushq $0x1
popq %rsi
callq 0x3130
pushq $0x1
popq %rdi
callq 0x3330
// File: /workspace/github_c_makefile_star2_O2/rakitzis[P]rc/except.c
// Function: rc_error
extern void rc_error(char *s) {
	pr_error(s, -1);
	set(FALSE);
	redirq = NULL;
	cond = FALSE; /* no longer inside conditional */
	rc_raise(eError);
}

// Assembly:
pushq %rax
pushq $-0x1
popq %rsi
callq 0xbe58
xorl %edi, %edi
callq 0xb43a
leaq 0x154fa(%rip), %rax     # 0x19ac8
andq $0x0, (%rax)
leaq 0x169ff(%rip), %rax     # 0x1afd8
andl $0x0, (%rax)
xorl %edi, %edi
popq %rax
jmp 0x4470
// File: /workspace/github_c_makefile_star2_O2/rakitzis[P]rc/except.c
// Function: clearflow
extern void clearflow() {
	Estack **e = &estack;
	while (*e != NULL)
		switch ((*e)->e) {
		case eBreak: case eContinue: case eReturn:
			*e = (*e)->prev;
			break;
		default:
			e = &(*e)->prev;
		}
}

// Assembly:
leaq 0x1518d(%rip), %rcx     # 0x19778
movl $0x86, %eax
movq (%rcx), %rdx
testq %rdx, %rdx
je 0x4616
movl (%rdx), %esi
cmpl $0x7, %esi
ja 0x460d
btl %esi, %eax
jae 0x460d
movq 0x10(%rdx), %rdx
movq %rdx, (%rcx)
jmp 0x45f3
addq $0x10, %rdx
movq %rdx, %rcx
jmp 0x45f0
retq
// File: /workspace/github_c_makefile_star2_O2/rakitzis[P]rc/except.c
// Function: pop_cmdarg
extern void pop_cmdarg(bool remove) {
	for (; estack != NULL; estack = estack->prev)
		switch (estack->e) {
		case eFifo:
			if (remove)
				unlink(estack->data.name);
			break;
		case eFd:
			if (remove)
				close(estack->data.fd);
			break;
		default:
			return;
		}
}

// Assembly:
pushq %rbx
movl %edi, %ebx
movq 0x15142(%rip), %rax     # 0x19778
testq %rax, %rax
je 0x4676
movl (%rax), %ecx
cmpl $0x6, %ecx
je 0x4656
cmpl $0x5, %ecx
jne 0x4676
testl %ebx, %ebx
je 0x4662
movq 0x8(%rax), %rdi
callq 0x3050
jmp 0x4662
testl %ebx, %ebx
je 0x4662
movl 0x8(%rax), %edi
callq 0x3170
movq 0x1510f(%rip), %rax     # 0x19778
movq 0x10(%rax), %rax
movq %rax, 0x15104(%rip)     # 0x19778
jmp 0x4636
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/rakitzis[P]rc/except.c
// Function: sigint
extern void sigint(int s) {
	if (s != SIGINT)
		panic("s != SIGINT in sigint catcher");
	/* this is the newline you see when you hit ^C while typing a command */
	if (interactive && nl_on_intr)
		fprint(2, "\n");
	nl_on_intr = TRUE;
	redirq = NULL;
	cond = FALSE;
	rc_raise(eError);
}

// Assembly:
pushq %rax
cmpl $0x2, %edi
je 0x468a
leaq 0x9d57(%rip), %rdi      # 0xe3dc
callq 0xbeea
leaq 0x15543(%rip), %rax     # 0x19bd4
cmpl $0x0, (%rax)
je 0x46b0
cmpl $0x0, 0x14c53(%rip)     # 0x192f0
je 0x46b0
leaq 0xef1e(%rip), %rsi      # 0x135c4
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0xa8f6
movl $0x1, 0x14c36(%rip)     # 0x192f0
leaq 0x15407(%rip), %rax     # 0x19ac8
andq $0x0, (%rax)
leaq 0x1690c(%rip), %rax     # 0x1afd8
andl $0x0, (%rax)
xorl %edi, %edi
popq %rax
jmp 0x4470
nop
// File: /workspace/github_c_makefile_star2_O2/rakitzis[P]rc/fn.c
// Function: inithandler
extern void inithandler() {
	int i;
	null.type = nBody;
	null.u[0].p = null.u[1].p = NULL;
	for (i = 1; i < NUMOFSIGNALS; i++)
		if (i != SIGCHLD && sighandlers[i] == SIG_IGN)
			fnassign(signals[i].name, NULL); /* ignore incoming ignored signals */
	if (interactive || sighandlers[SIGINT] != SIG_IGN) {
		def_sigint = sigint;
		fnrm("sigint"); /* installs SIGINT catcher if not inherited ignored */
	}
	if (!dashdee) {
		if (interactive || sighandlers[SIGQUIT] != SIG_IGN) {
			def_sigquit = dud_handler;
			fnrm("sigquit"); /* "ignores" SIGQUIT unless inherited ignored */
		}
		if (interactive) {
			def_sigterm = dud_handler;
			fnrm("sigterm"); /* ditto for SIGTERM */
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl $0x4, 0x14dd1(%rip)     # 0x19780
xorps %xmm0, %xmm0
movups %xmm0, 0x14dcf(%rip)    # 0x19788
leaq 0x14990(%rip), %r14     # 0x19350
addq $0x10, %r14
pushq $0x1
popq %r15
leaq 0x15bd1(%rip), %rbx     # 0x1a5a0
cmpq $0x11, %r15
je 0x49ec
cmpq $0x41, %r15
je 0x49f5
cmpq $0x1, (%rbx,%r15,8)
jne 0x49ec
movq (%r14), %rdi
xorl %esi, %esi
callq 0x4a7a
incq %r15
addq $0x10, %r14
jmp 0x49cf
leaq 0x151d8(%rip), %r14     # 0x19bd4
cmpl $0x0, (%r14)
jne 0x4a09
cmpq $0x1, 0x10(%rbx)
je 0x4a23
leaq -0x398(%rip), %rax      # 0x4678
movq %rax, 0x14d91(%rip)     # 0x197a8
leaq 0x99e9(%rip), %rdi      # 0xe407
callq 0x4ba4
leaq 0x1519e(%rip), %rax     # 0x19bc8
cmpl $0x0, (%rax)
je 0x4a35
popq %rbx
popq %r14
popq %r15
retq
cmpl $0x0, (%r14)
jne 0x4a42
cmpq $0x1, 0x18(%rbx)
je 0x4a2f
leaq 0x227(%rip), %rbx       # 0x4c70
movq %rbx, 0x14d60(%rip)     # 0x197b0
leaq 0x99b7(%rip), %rdi      # 0xe40e
callq 0x4ba4
cmpl $0x0, (%r14)
je 0x4a2f
movq %rbx, 0x14d4f(%rip)     # 0x197b8
leaq 0x99a6(%rip), %rdi      # 0xe416
popq %rbx
popq %r14
popq %r15
jmp 0x4ba4
// File: /workspace/github_c_makefile_star2_O2/rakitzis[P]rc/fn.c
// Function: fnassign
extern void fnassign(char *name, Node *def) {
	Node *newdef = treecpy(def == NULL ? &null : def, ealloc); /* important to do the treecopy first */
	rc_Function *new = get_fn_place(name);
	int i;
	new->def = newdef;
	new->extdef = NULL;
	if (strncmp(name, "sig", conststrlen("sig")) == 0) { /* slight optimization */
		if (streq(name, "sigchld") || streq(name, "sigcld"))
			rc_error("can't trap SIGCHLD");
		if (streq(name, "sigexit"))
			runexit = TRUE;
		for (i = 1; i < NUMOFSIGNALS; i++) /* zero is a bogus signal */
			if (streq(signals[i].name, name)) {
				handlers[i] = newdef;
				if (def == NULL)
					rc_signal(i, SIG_IGN);
				else
					rc_signal(i, fn_handler);
				break;
			}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testq %rsi, %rsi
leaq 0x14ceb(%rip), %rdi     # 0x19780
cmovneq %rsi, %rdi
leaq 0x4fe3(%rip), %rsi      # 0x9a83
callq 0xbc1d
movq %rax, %r15
movq %r14, %rdi
callq 0x7054
movq %r15, (%rax)
andq $0x0, 0x8(%rax)
cmpb $0x73, (%r14)
jne 0x4b63
cmpb $0x69, 0x1(%r14)
jne 0x4b63
cmpb $0x67, 0x2(%r14)
jne 0x4b63
leaq 0x9947(%rip), %rsi      # 0xe426
movq %r14, %rdi
callq 0x31f0
testl %eax, %eax
je 0x4afe
leaq 0x993c(%rip), %rsi      # 0xe42e
movq %r14, %rdi
callq 0x31f0
testl %eax, %eax
jne 0x4b13
leaq 0x9930(%rip), %rdi      # 0xe435
callq 0x45b7
movb (%r14), %bpl
cmpb $0x73, %bpl
jne 0x4b30
leaq 0x9904(%rip), %rsi      # 0xe41e
movq %r14, %rdi
callq 0x31f0
movb $0x73, %bpl
testl %eax, %eax
jne 0x4b30
movb $0x1, 0x14e98(%rip)     # 0x199c8
leaq 0x14819(%rip), %r13     # 0x19350
addq $0x10, %r13
pushq $0x1
popq %r12
cmpq $0x41, %r12
je 0x4b63
movq (%r13), %rdi
cmpb %bpl, (%rdi)
jne 0x4b5a
movq %r14, %rsi
callq 0x31f0
testl %eax, %eax
je 0x4b72
incq %r12
addq $0x10, %r13
jmp 0x4b3f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testq %rbx, %rbx
leaq 0x14c44(%rip), %rax     # 0x197c0
movq %r15, (%rax,%r12,8)
leaq 0x215(%rip), %rax       # 0x4d9c
pushq $0x1
popq %rsi
cmovneq %rax, %rsi
movl %r12d, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xb30f
// File: /workspace/github_c_makefile_star2_O2/rakitzis[P]rc/fn.c
// Function: fnrm
extern void fnrm(char *name) {
	int i;
	for (i = 1; i < NUMOFSIGNALS; i++)
		if (streq(signals[i].name, name)) {
			handlers[i] = NULL;
			switch (i) {
			case SIGINT:
				rc_signal(i, def_sigint);
				break;
			case SIGQUIT:
				rc_signal(i, def_sigquit);
				break;
			case SIGTERM:
				rc_signal(i, def_sigterm);
				break;
			default:
				rc_signal(i, SIG_DFL);
			}
		}
	if (streq(name, "sigexit"))
		runexit = FALSE;
	delete_fn(name);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x14797(%rip), %r13     # 0x19350
addq $0x10, %r13
pushq $0x1
popq %r14
leaq 0x14bf8(%rip), %rbp     # 0x197c0
pushq $0x3
popq %r15
pushq $0x2
popq %r12
cmpq $0x41, %r14
je 0x4c3b
movq (%r13), %rdi
movb (%rdi), %al
cmpb (%rbx), %al
jne 0x4c32
movq %rbx, %rsi
callq 0x31f0
testl %eax, %eax
jne 0x4c32
andq $0x0, (%rbp,%r14,8)
cmpl $0xf, %r14d
je 0x4c1c
cmpl $0x3, %r14d
je 0x4c10
cmpl $0x2, %r14d
jne 0x4c28
movq 0x14b9d(%rip), %rsi     # 0x197a8
movl %r12d, %edi
jmp 0x4c2d
movq 0x14b99(%rip), %rsi     # 0x197b0
movl %r15d, %edi
jmp 0x4c2d
movq 0x14b95(%rip), %rsi     # 0x197b8
pushq $0xf
popq %rdi
jmp 0x4c2d
movl %r14d, %edi
xorl %esi, %esi
callq 0xb30f
incq %r14
addq $0x10, %r13
jmp 0x4bd0
cmpb $0x73, (%rbx)
jne 0x4c5a
leaq 0x97d7(%rip), %rsi      # 0xe41e
movq %rbx, %rdi
callq 0x31f0
testl %eax, %eax
jne 0x4c5a
movb $0x0, 0x14d6e(%rip)     # 0x199c8
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x73a6
// File: /workspace/github_c_makefile_star2_O2/rakitzis[P]rc/fn.c
// Function: setsigdefaults
extern void setsigdefaults(bool sysvbackground) {
	int i;
	/*
	   General housekeeping: setsigdefaults happens after fork(),
	   so it's a convenient place to clean up open file descriptors.
	   (history file, scripts, etc.)
	*/
	closefds();
	/*
	   Restore signals to SIG_DFL, paying close attention to
	   a few quirks: SIGINT, SIGQUIT and are treated specially
	   depending on whether we are doing v7-style backgrounding
	   or not; the default action for SIGINT, SIGQUIT and SIGTERM
	   must be set to the appropriate action; finally, care must
	   be taken not to set to SIG_DFL any signals which are being
	   ignored.
	*/
	for (i = 1; i < NUMOFSIGNALS; i++)
		if (sighandlers[i] != SIG_IGN) {
			handlers[i] = NULL;
			switch (i) {
			case SIGINT:
				if (sysvbackground) {
					def_sigint = SIG_IGN;
					fnassign("sigint", NULL); /* ignore */
				} else {
					def_sigint = SIG_DFL;
					goto sigcommon;
				}
				break;
			case SIGQUIT:
				if (sysvbackground) {
					def_sigquit = SIG_IGN;
					fnassign("sigquit", NULL); /* ignore */
				} else {
					def_sigquit = SIG_DFL;
					goto sigcommon;
				}
				break;
			case SIGTERM:
				def_sigterm = SIG_DFL;
				/* FALLTHROUGH */
			sigcommon:
			default:
				if (sighandlers[i] != SIG_DFL) {
					rc_signal(i, SIG_DFL);
					delete_fn(signals[i].name);
				}
			}
		}
	delete_fn("sigexit");
	runexit = FALSE; /* No sigexit on subshells */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
callq 0x82d2
leaq 0x146c6(%rip), %r13     # 0x19350
addq $0x10, %r13
pushq $0x1
popq %r14
leaq 0x15907(%rip), %rbp     # 0x1a5a0
leaq 0x14b20(%rip), %r15     # 0x197c0
leaq 0x14b11(%rip), %r12     # 0x197b8
cmpq $0x41, %r14
je 0x4d43
movq (%rbp,%r14,8), %rax
cmpq $0x1, %rax
je 0x4d37
andq $0x0, (%r15,%r14,8)
movq %r12, %rcx
cmpl $0xf, %r14d
je 0x4d1b
cmpl $0x3, %r14d
je 0x4cf5
cmpl $0x2, %r14d
jne 0x4d1f
leaq 0x14acb(%rip), %rcx     # 0x197a8
testl %ebx, %ebx
je 0x4d1b
movq $0x1, 0x14abc(%rip) # 0x197a8
leaq 0x9714(%rip), %rdi      # 0xe407
jmp 0x4d12
leaq 0x14ab4(%rip), %rcx     # 0x197b0
testl %ebx, %ebx
je 0x4d1b
movq $0x1, 0x14aa5(%rip) # 0x197b0
leaq 0x96fc(%rip), %rdi      # 0xe40e
xorl %esi, %esi
callq 0x4a7a
jmp 0x4d37
andq $0x0, (%rcx)
testq %rax, %rax
je 0x4d37
movl %r14d, %edi
xorl %esi, %esi
callq 0xb30f
movq (%r13), %rdi
callq 0x73a6
incq %r14
addq $0x10, %r13
jmp 0x4ca7
leaq 0x96d4(%rip), %rdi      # 0xe41e
callq 0x73a6
movb $0x0, 0x14c72(%rip)     # 0x199c8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/rakitzis[P]rc/fn.c
// Function: rc_exit
extern void rc_exit(int stat) {
	if (runexit) {
		char *sig[2];
		sig[0] = "sigexit";
		sig[1] = NULL;
		runexit = FALSE;
		funcall(sig);
		stat = getstatus();
	}
	exit(stat);
}

// Assembly:
subq $0x18, %rsp
cmpb $0x1, 0x14c58(%rip)     # 0x199c8
jne 0x4d97
leaq 0x96a5(%rip), %rax      # 0xe41e
movq %rsp, %rdi
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x14c3d(%rip)     # 0x199c8
callq 0x34ec
callq 0xb3ff
movl %eax, %edi
callq 0x3330
// File: /workspace/github_c_makefile_star2_O2/rakitzis[P]rc/fn.c
// Function: fn_handler
static void fn_handler(int s) {
	char *sig[2];
	int olderrno;
	if (s < 1 || s >= NUMOFSIGNALS)
		panic("unknown signal");
	olderrno = errno;
	sig[0] = signals[s].name;
	sig[1] = NULL;
	funcall(sig);
	errno = olderrno;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
leal -0x41(%rbx), %eax
cmpl $-0x41, %eax
ja 0x4dba
leaq 0x96bb(%rip), %rdi      # 0xe470
callq 0xbeea
callq 0x3040
movq %rax, %r14
movl (%rax), %ebp
movslq %ebx, %rax
shlq $0x4, %rax
leaq 0x1457e(%rip), %rcx     # 0x19350
movq (%rcx,%rax), %rax
movq %rsp, %rdi
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
callq 0x34ec
movl %ebp, (%r14)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/rakitzis[P]rc/fn.c
// Function: fnassign_string
extern void fnassign_string(char *extdef) {
	char *name = get_name(extdef+3); /* +3 to skip over "fn_" */
	rc_Function *new;
	if (name == NULL)
		return;
	new = get_fn_place(name);
	new->def = NULL;
	new->extdef = ecpy(extdef);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
addq $0x3, %rdi
callq 0x5008
testq %rax, %rax
je 0x4e3a
movq %rax, %rdi
callq 0x7054
movq %rax, %r14
andq $0x0, (%rax)
movq %rbx, %rdi
callq 0x30f0
leaq 0x1(%rax), %rdi
callq 0x9a83
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3070
movq %r15, 0x8(%r14)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/rakitzis[P]rc/fn.c
// Function: fnlookup
extern Node *fnlookup(char *name) {
	rc_Function *look = lookup_fn(name);
	Node *ret;
	if (look == NULL)
		return NULL; /* not found */
	if (look->def != NULL)
		return look->def;
	if (look->extdef == NULL) /* function was set to null, e.g., fn foo {} */
		return &null;
	ret = parse_fn(look->extdef);
	if (ret == NULL) {
		efree(look->extdef);
		look->extdef = NULL;
		return &null;
	} else {
		return look->def = treecpy(ret, ealloc); /* Need to take it out of nalloc space */
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x14c85(%rip), %rax     # 0x19ad0
movq (%rax), %rsi
callq 0x6fc7
testq %rax, %rax
je 0x4e94
movq %rax, %rbx
movq (%rax), %r14
testq %r14, %r14
jne 0x4e97
movq 0x8(%rbx), %rdi
leaq 0x14912(%rip), %r14     # 0x19780
testq %rdi, %rdi
je 0x4e97
callq 0x51d5
testq %rax, %rax
je 0x4ea2
leaq 0x4bff(%rip), %rsi      # 0x9a83
movq %rax, %rdi
callq 0xbc1d
movq %rax, %r14
movq %rax, (%rbx)
jmp 0x4e97
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x8(%rbx), %rdi
callq 0x9a5c
andq $0x0, 0x8(%rbx)
jmp 0x4e97
// File: /workspace/github_c_makefile_star2_O2/rakitzis[P]rc/fn.c
// Function: fnlookup_string
extern char *fnlookup_string(char *name) {
	rc_Function *look = lookup_fn(name);

	if (look == NULL)
		return NULL;
	if (look->extdef != NULL)
		return look->extdef;
	return look->extdef = mprint("fn_%F={%T}", name, look->def);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x14c10(%rip), %rax     # 0x19ad0
movq (%rax), %rsi
callq 0x6fc7
testq %rax, %rax
je 0x4ef3
movq %rax, %r14
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0x4ef5
movq (%r14), %rdx
leaq 0x9565(%rip), %rdi      # 0xe448
movq %rbx, %rsi
xorl %eax, %eax
callq 0xa9f3
movq %rax, 0x8(%r14)
jmp 0x4ef5
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/rakitzis[P]rc/fn.c
// Function: whatare_all_signals
extern void whatare_all_signals() {
	int i;
	for (i = 1; i < NUMOFSIGNALS; i++)
		if (*signals[i].name != '\0') {
			if (sighandlers[i] == SIG_IGN)
				fprint(1, "fn %s {}\n", signals[i].name);
			else if (sighandlers[i] == fn_handler)
				fprint(1, "fn %S {%T}\n", signals[i].name, handlers[i]);
			else
				fprint(1, "fn %s\n", signals[i].name);
		}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x14441(%rip), %r12     # 0x19350
leaq 0x1568a(%rip), %r13     # 0x1a5a0
pushq $0x1
popq %rbp
leaq -0x184(%rip), %r14      # 0x4d9c
leaq 0x9542(%rip), %r15      # 0xe469
xorl %ebx, %ebx
cmpq $0x200, %rbx            # imm = 0x200
je 0x4f87
movq 0x10(%r12,%rbx,2), %rdx
cmpb $0x0, (%rdx)
je 0x4f81
movq 0x8(%r13,%rbx), %rax
cmpq $0x1, %rax
je 0x4f53
cmpq %r14, %rax
je 0x4f65
movl %ebp, %edi
movq %r15, %rsi
jmp 0x4f5c
movl %ebp, %edi
leaq 0x94f7(%rip), %rsi      # 0xe453
xorl %eax, %eax
callq 0xa8f6
jmp 0x4f81
leaq 0x14854(%rip), %rax     # 0x197c0
movq 0x8(%rbx,%rax), %rcx
movl %ebp, %edi
leaq 0x94e3(%rip), %rsi      # 0xe45d
xorl %eax, %eax
callq 0xa8f6
addq $0x8, %rbx
jmp 0x4f29
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/rakitzis[P]rc/footobar.c
// Function: list2array
extern char **list2array(List *s, bool print) {
	char **argv, **av;

	if (print)
		fprint(2, "%L\n", s, " ");
	/*
	   Allocate 3 extra spots (2 for the fake execve & 1 for defaulting to
	   sh) and hide these from exec().
	*/
	argv = av = (char **) nalloc((listnel(s) + 4) * sizeof *av) + 3;
	while (s != NULL) {
		*av++ = s->w;
		s = s->n;
	}
	*av = NULL;
	return argv;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testl %esi, %esi
je 0x4fcf
leaq 0xe736(%rip), %rsi      # 0x136f1
leaq 0xe5ff(%rip), %rcx      # 0x135c1
pushq $0x2
popq %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0xa8f6
movq %rbx, %rdi
callq 0x922f
cltq
leaq 0x20(,%rax,8), %rdi
callq 0x9928
addq $0x18, %rax
movq %rax, %rcx
testq %rbx, %rbx
je 0x5002
movq (%rbx), %rdx
movq %rdx, (%rcx)
addq $0x8, %rcx
movq 0x10(%rbx), %rbx
jmp 0x4fed
andq $0x0, (%rcx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/rakitzis[P]rc/footobar.c
// Function: get_name
extern char *get_name(char *s) {
	char *eq = strchr(s, '=');
	char *r, *result;
	int c;
	
	if (eq == NULL)
		return NULL;
	r = result = nalloc(eq - s + 1);
	while (1)
		switch (c = *s++) {
		case '=':
			*r++ = '\0';
			return result;
#if PROTECT_ENV
		case '_':
			if (*s == '_') {
				static const char hexchar[] = "0123456789abcdef";
				char *h1 = strchr(hexchar, s[1]);
				char *h2 = strchr(hexchar, s[2]);
				if (h1 != NULL && h2 != NULL) {
					*r++ = ((h1 - hexchar) << 4) | (h2 - hexchar);
					s += 3;
					break;
				}
			}
			/* FALLTHROUGH */
#endif
		default:
			*r++ = c;
			break;
		}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x3d
popq %rsi
callq 0x3120
testq %rax, %rax
je 0x50c8
subq %r14, %rax
incq %rax
movq %rax, %rdi
callq 0x9928
movq %rax, (%rsp)
movq %rax, %rbp
pushq $0x11
popq %r15
leaq 0x1(%r14), %rbx
movzbl (%r14), %r12d
cmpl $0x5f, %r12d
je 0x5056
cmpl $0x3d, %r12d
jne 0x50b2
jmp 0x50be
cmpb $0x5f, (%rbx)
jne 0x50b2
movsbl 0x2(%r14), %esi
leaq 0x94b9(%rip), %rdi      # 0xe520
movq %r15, %rdx
callq 0x31b0
movq %rax, %r13
movsbl 0x3(%r14), %esi
leaq 0x94a2(%rip), %rdi      # 0xe520
movq %r15, %rdx
callq 0x31b0
testq %r13, %r13
setne %cl
testq %rax, %rax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x50b2
shll $0x4, %r13d
leaq 0x947c(%rip), %rcx      # 0xe520
subl %ecx, %eax
orl %r13d, %eax
movb %al, (%rbp)
addq $0x4, %r14
jmp 0x50b9
movb %r12b, (%rbp)
movq %rbx, %r14
incq %rbp
jmp 0x5040
movb $0x0, (%rbp)
movq (%rsp), %rax
jmp 0x50ca
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq