LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/aimant.c
// Function: sink_close
void sink_close(struct sink *x)
{
	assert(x->sp->pid > 0);

	/* we are no more interested in tap output
	 */
	subprocess_close_child_fdin(x->sp);

	assert(subprocess_terminate(x->sp) == 0);

	x->fd = -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x20(%rax)
jle 0x2598
jmp 0x25b7
leaq 0xdb0d(%rip), %rdi      # 0x100ac
leaq 0xdab6(%rip), %rsi      # 0x1005c
movl $0x5e, %edx
leaq 0xdb09(%rip), %rcx      # 0x100bb
callq 0x21a0
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
callq 0x91d0
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
callq 0x9ed0
cmpl $0x0, %eax
jne 0x25d8
jmp 0x25f7
leaq 0xdafb(%rip), %rdi      # 0x100da
leaq 0xda76(%rip), %rsi      # 0x1005c
movl $0x64, %edx
leaq 0xdac9(%rip), %rcx      # 0x100bb
callq 0x21a0
movq -0x8(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/aimant.c
// Function: fd_tap_open
int fd_tap_open(struct fd_tap *x, int fd)
{
	memset(x, 0, sizeof(struct fd_tap));
	x->fd = fd;
	assert(make_fd_non_blocking(x->fd) == 0);
	DEBUG_INFO("fd_tap_open(x,fd=%i): done", fd);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movl $0xc, %edx
callq 0x21c0
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movl (%rax), %edi
callq 0x6d50
cmpl $0x0, %eax
jne 0x264a
jmp 0x2669
leaq 0xdaaa(%rip), %rdi      # 0x100fb
leaq 0xda04(%rip), %rsi      # 0x1005c
movl $0x6d, %edx
leaq 0xdab8(%rip), %rcx      # 0x1011c
callq 0x21a0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/aimant.c
// Function: file_tap_open
int file_tap_open(struct file_tap *x, const char *path)
{
	assert(x->path->s == NULL);
	memset(x, 0, sizeof(struct file_tap));
	str_copyz(x->path, path);
	x->fd = open(x->path->s, O_RDONLY);
	assert(x->fd > 0);
	assert(make_fd_non_blocking(x->fd) == 0);
	DEBUG_INFO("file_tap_open(x,path=[%s]): done", path);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x26fd
jmp 0x271c
leaq 0xda6c(%rip), %rdi      # 0x10170
leaq 0xd951(%rip), %rsi      # 0x1005c
movl $0x7c, %edx
leaq 0xda6c(%rip), %rcx      # 0x10183
callq 0x21a0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x21c0
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rsi
callq 0xe5d0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
movb $0x0, %al
callq 0x22f0
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, (%rax)
jle 0x2761
jmp 0x2780
leaq 0xda4e(%rip), %rdi      # 0x101b6
leaq 0xd8ed(%rip), %rsi      # 0x1005c
movl $0x80, %edx
leaq 0xda08(%rip), %rcx      # 0x10183
callq 0x21a0
movq -0x8(%rbp), %rax
movl (%rax), %edi
callq 0x6d50
cmpl $0x0, %eax
jne 0x2792
jmp 0x27b1
leaq 0xd962(%rip), %rdi      # 0x100fb
leaq 0xd8bc(%rip), %rsi      # 0x1005c
movl $0x81, %edx
leaq 0xd9d7(%rip), %rcx      # 0x10183
callq 0x21a0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/aimant.c
// Function: file_tap_close
void file_tap_close(struct file_tap *x)
{
	assert(x->path->len);
	assert(x->fd >= 0);
	close(x->fd);
	x->fd = -1;
	str_free(x->path);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0x27d8
jmp 0x27f7
leaq 0xd9e1(%rip), %rdi      # 0x101c0
leaq 0xd876(%rip), %rsi      # 0x1005c
movl $0x88, %edx
leaq 0xd9db(%rip), %rcx      # 0x101cd
callq 0x21a0
movq -0x8(%rbp), %rax
cmpl $0x0, (%rax)
jl 0x2802
jmp 0x2821
leaq 0xd939(%rip), %rdi      # 0x10142
leaq 0xd84c(%rip), %rsi      # 0x1005c
movl $0x89, %edx
leaq 0xd9b1(%rip), %rcx      # 0x101cd
callq 0x21a0
movq -0x8(%rbp), %rax
movl (%rax), %edi
callq 0x21d0
movq -0x8(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
callq 0xe4e0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/aimant.c
// Function: cat_tap_open
int cat_tap_open(struct cat_tap *x, const char *path, int seek_end)
{
	int pid;

	assert(x->path->s == NULL);
	assert(x->sp->argv == NULL); /* not used since we won't execve */
	memset(x, 0, sizeof(struct cat_tap));

	str_copyz(x->path, path);

	if ((pid = subprocess_fork0(x->sp)) == 0) {
		/* child
		 */
		int i;
		for (i = getdtablesize(); i >= 0; i--) {
			if (i <= STDERR_FILENO) continue;
			close(i);
		}
		if (seek_end) {
		  assert(tail_fn0(x->path->s) == 0);
		} else {
		  assert(tail_f(x->path->s) == 0);
		}
		exit(0);
	} else if (pid < 0) {
		return -1;
	}

	x->fd = x->sp->child_fdout;

	DEBUG_INFO("cat_tap_open(x, path=[%s]): done, pid=%i", path, x->sp->pid);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x2870
jmp 0x288f
leaq 0xd8f9(%rip), %rdi      # 0x10170
leaq 0xd7de(%rip), %rsi      # 0x1005c
movl $0x97, %edx
leaq 0xd96a(%rip), %rcx      # 0x101f4
callq 0x21a0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x289c
jmp 0x28bb
leaq 0xd7a5(%rip), %rdi      # 0x10048
leaq 0xd7b2(%rip), %rsi      # 0x1005c
movl $0x98, %edx
leaq 0xd93e(%rip), %rcx      # 0x101f4
callq 0x21a0
movq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0x58, %edx
callq 0x21c0
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rsi
callq 0xe5d0
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
callq 0x97d0
movl %eax, -0x20(%rbp)
cmpl $0x0, %eax
jne 0x2995
callq 0x23a0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jl 0x291e
cmpl $0x2, -0x24(%rbp)
jg 0x290b
jmp 0x2913
movl -0x24(%rbp), %edi
callq 0x21d0
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x28fd
cmpl $0x0, -0x1c(%rbp)
je 0x2959
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x29d0
cmpl $0x0, %eax
jne 0x2938
jmp 0x2957
leaq 0xd8eb(%rip), %rdi      # 0x1022a
leaq 0xd716(%rip), %rsi      # 0x1005c
movl $0xa6, %edx
leaq 0xd8a2(%rip), %rcx      # 0x101f4
callq 0x21a0
jmp 0x298e
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x29f0
cmpl $0x0, %eax
jne 0x296d
jmp 0x298c
leaq 0xd8d0(%rip), %rdi      # 0x10244
leaq 0xd6e1(%rip), %rsi      # 0x1005c
movl $0xa8, %edx
leaq 0xd86d(%rip), %rcx      # 0x101f4
callq 0x21a0
jmp 0x298e
xorl %edi, %edi
callq 0x2350
cmpl $0x0, -0x20(%rbp)
jge 0x29a4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x29ba
jmp 0x29a6
movq -0x10(%rbp), %rax
movl 0x44(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/aimant.c
// Function: cat_tap_close
void cat_tap_close(struct cat_tap *x)
{
	assert(x->sp->pid > 0);
	assert(x->sp->argv == NULL);

	/* we are no more interested in tap output
	 */
	subprocess_close_child_fdout(x->sp);
	subprocess_close_child_fderr(x->sp);

	DEBUG_INFO("sending SIGTERM to cat_tap pid %i", x->sp->pid);
	assert(kill(x->sp->pid, SIGTERM) == 0);

	assert(subprocess_terminate(x->sp) == 0);

	x->fd = -1;
	str_free(x->path);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x30(%rax)
jle 0x2a28
jmp 0x2a47
leaq 0xd67d(%rip), %rdi      # 0x100ac
leaq 0xd626(%rip), %rsi      # 0x1005c
movl $0xb8, %edx
leaq 0xd81a(%rip), %rcx      # 0x1025c
callq 0x21a0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x2a54
jmp 0x2a73
leaq 0xd5ed(%rip), %rdi      # 0x10048
leaq 0xd5fa(%rip), %rsi      # 0x1005c
movl $0xb9, %edx
leaq 0xd7ee(%rip), %rcx      # 0x1025c
callq 0x21a0
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
callq 0x9280
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
callq 0x9310
movq -0x8(%rbp), %rax
movl 0x30(%rax), %edi
movl $0xf, %esi
callq 0x2270
cmpl $0x0, %eax
jne 0x2aa5
jmp 0x2ac4
leaq 0xd7d5(%rip), %rdi      # 0x10281
leaq 0xd5a9(%rip), %rsi      # 0x1005c
movl $0xc1, %edx
leaq 0xd79d(%rip), %rcx      # 0x1025c
callq 0x21a0
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
callq 0x9ed0
cmpl $0x0, %eax
jne 0x2ad8
jmp 0x2af7
leaq 0xd5fb(%rip), %rdi      # 0x100da
leaq 0xd576(%rip), %rsi      # 0x1005c
movl $0xc3, %edx
leaq 0xd76a(%rip), %rcx      # 0x1025c
callq 0x21a0
movq -0x8(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
callq 0xe4e0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/aimant.c
// Function: fd_tap_read
int fd_tap_read(struct fd_tap *x, void *buf, int bufsz)
{
	int n = read(x->fd, buf, bufsz);
	if (n < 0) {
		int save_errno = errno;
		assert(n == -1);
		if (errno == EAGAIN) return -1;
		if (errno == EINTR) return -1;
		DEBUG("read(), errno=%i", save_errno);
		errno = save_errno;
		perror("read()");
		exit(1);
	}
	if (n) {
		x->bytes_read += n;
		//get_current_timeval(x->time_read);
	} else {
		assert(x->got_eof == 0);
		x->got_eof = 1;
	}
	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %edi
movq -0x18(%rbp), %rsi
movslq -0x1c(%rbp), %rdx
callq 0x21f0
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jge 0x2bf5
callq 0x2070
movl (%rax), %eax
movl %eax, -0x24(%rbp)
cmpl $-0x1, -0x20(%rbp)
jne 0x2b65
jmp 0x2b84
leaq 0xd734(%rip), %rdi      # 0x102a0
leaq 0xd4e9(%rip), %rsi      # 0x1005c
movl $0xce, %edx
leaq 0xd729(%rip), %rcx      # 0x102a8
callq 0x21a0
callq 0x2070
cmpl $0xb, (%rax)
jne 0x2b9a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2c46
callq 0x2070
cmpl $0x4, (%rax)
jne 0x2bb0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2c46
jmp 0x2bb2
movl -0x24(%rbp), %ecx
leaq 0xd4a0(%rip), %rdi      # 0x1005c
movl $0xd1, %esi
leaq 0xde0f(%rip), %rdx      # 0x109d7
movb $0x0, %al
callq 0xdfe0
movl -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
callq 0x2070
movl -0x28(%rbp), %ecx
movl %ecx, (%rax)
leaq 0xde09(%rip), %rdi      # 0x109ef
callq 0x2310
movl $0x1, %edi
callq 0x2350
cmpl $0x0, -0x20(%rbp)
je 0x2c0a
movl -0x20(%rbp), %ecx
movq -0x10(%rbp), %rax
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
jmp 0x2c40
movq -0x10(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x2c16
jmp 0x2c35
leaq 0xd6b9(%rip), %rdi      # 0x102d6
leaq 0xd438(%rip), %rsi      # 0x1005c
movl $0xda, %edx
leaq 0xd678(%rip), %rcx      # 0x102a8
callq 0x21a0
movq -0x10(%rbp), %rax
movl $0x1, 0x8(%rax)
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/aimant.c
// Function: buffer_new
struct buffer *buffer_new(struct buffer *tail, int id, void *buf, int bufsz)
{
	struct buffer *r = buffer_new0(tail);
	r->id = id;
#if 0
	DEBUG_INFO("%i -> %i", r->_position, tail ? tail->_position : -1);
	str_copyf(r->buf, "%s got %i bytes\n", id, bufsz);
#else
	str_copyn(r->buf, buf, bufsz);
#endif
	r->pos = 0;
	return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2f00
movq %rax, -0x28(%rbp)
movl -0xc(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x28(%rbp), %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0xe540
movq -0x28(%rbp), %rax
movl $0x0, 0x28(%rax)
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/aimant.c
// Function: buffer_free
void buffer_free(struct buffer *x)
{
	while (x) {
		struct buffer *t = x->tail;
		str_free(x->buf);
		free(x);
		x = t;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x35bf
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
callq 0xe4e0
movq -0x8(%rbp), %rdi
callq 0x2050
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x358c
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/aimant.c
// Function: buffer_queue_free
void buffer_queue_free(struct buffer_queue *x)
{
	if (x) {
		buffer_free(x->enqueue);
		buffer_free(x->dequeue);
		free(x);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x3605
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x3580
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x3580
movq -0x8(%rbp), %rdi
callq 0x2050
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/aimant.c
// Function: read_exact
static int read_exact(int fd, void *buf, int len)
{
	int i, got=0;
	do {
		if ((i = read(fd, buf + got, len - got)) <= 0)
			return i;
		got += i;
	} while (got < len);
	return len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
movslq -0x1c(%rbp), %rax
addq %rax, %rsi
movl -0x14(%rbp), %eax
subl -0x1c(%rbp), %eax
movslq %eax, %rdx
callq 0x21f0
movl %eax, -0x18(%rbp)
cmpl $0x0, %eax
jg 0x68f5
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x690c
movl -0x18(%rbp), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jl 0x68c9
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/aimant.c
// Function: tail0
static int tail0(char *filename, int seek_end)
{
	int fd;

	if ((fd = open(filename, O_RDONLY)) < 0) {
		int save_errno = errno;
		assert(fd == -1);
		DEBUG("open(filename=[%s], O_RDONLY), errno=%i", filename, save_errno);
		errno = save_errno;
		perror(filename);
		return -1;
	}

	if (seek_end && lseek(fd, 0, SEEK_END) < 0) {
		int save_errno = errno;
		errno = save_errno;
		DEBUG("lseek(fd=%i, 0, SEEK_END), errno=%i", fd, save_errno);
		perror("lseek(fd, 0, SEEK_END)");

		assert(close(fd) == 0);
		fd = -1;
		return 1;
	}

	tail0loop(fd, STDOUT_FILENO);

	assert(close(fd) == 0);
	fd = -1;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
movb $0x0, %al
callq 0x22f0
movl %eax, -0x18(%rbp)
cmpl $0x0, %eax
jge 0x69be
callq 0x2070
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
cmpl $-0x1, -0x18(%rbp)
jne 0x6956
jmp 0x6975
leaq 0xa0d1(%rip), %rdi      # 0x10a2e
leaq 0x96f8(%rip), %rsi      # 0x1005c
movl $0x550, %edx            # imm = 0x550
leaq 0xa4c8(%rip), %rcx      # 0x10e38
callq 0x21a0
jmp 0x6977
movq -0x10(%rbp), %rcx
movl -0x1c(%rbp), %r8d
leaq 0x96d6(%rip), %rdi      # 0x1005c
movl $0x551, %esi            # imm = 0x551
leaq 0xa4bd(%rip), %rdx      # 0x10e4f
movb $0x0, %al
callq 0xdfe0
movl -0x1c(%rbp), %eax
movl %eax, -0x24(%rbp)
callq 0x2070
movl -0x24(%rbp), %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rdi
callq 0x2310
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6ab1
cmpl $0x0, -0x14(%rbp)
je 0x6a68
movl -0x18(%rbp), %edi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x2180
cmpq $0x0, %rax
jge 0x6a68
callq 0x2070
movl (%rax), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x28(%rbp)
callq 0x2070
movl -0x28(%rbp), %ecx
movl %ecx, (%rax)
movl -0x18(%rbp), %ecx
movl -0x20(%rbp), %r8d
leaq 0x9651(%rip), %rdi      # 0x1005c
movl $0x55a, %esi            # imm = 0x55A
leaq 0xa460(%rip), %rdx      # 0x10e77
movb $0x0, %al
callq 0xdfe0
leaq 0xa476(%rip), %rdi      # 0x10e9b
callq 0x2310
movl -0x18(%rbp), %edi
callq 0x21d0
cmpl $0x0, %eax
jne 0x6a39
jmp 0x6a58
leaq 0xa0fb(%rip), %rdi      # 0x10b3b
leaq 0x9615(%rip), %rsi      # 0x1005c
movl $0x55d, %edx            # imm = 0x55D
leaq 0xa3e5(%rip), %rcx      # 0x10e38
callq 0x21a0
movl $0xffffffff, -0x18(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0x4(%rbp)
jmp 0x6ab1
movl -0x18(%rbp), %edi
movl $0x1, %esi
callq 0x6ac0
movl -0x18(%rbp), %edi
callq 0x21d0
cmpl $0x0, %eax
jne 0x6a84
jmp 0x6aa3
leaq 0xa0b0(%rip), %rdi      # 0x10b3b
leaq 0x95ca(%rip), %rsi      # 0x1005c
movl $0x564, %edx            # imm = 0x564
leaq 0xa39a(%rip), %rcx      # 0x10e38
callq 0x21a0
movl $0xffffffff, -0x18(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/subprocess.c
// Function: make_fd_non_blocking
int make_fd_non_blocking(int fd)
{
	int flags, s;

	if ((flags = fcntl(fd, F_GETFL, 0)) == -1) {
		perror("fcntl(fd, F_GETFL, 0)");
		return __LINE__;
	}

	flags |= O_NONBLOCK;
	if ((s = fcntl(fd, F_SETFL, flags)) == -1) {
		perror("fcntl(fd, F_SETFL, flags)");
		return __LINE__;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movl -0x8(%rbp), %edi
movl $0x3, %esi
xorl %edx, %edx
movb $0x0, %al
callq 0x20f0
movl %eax, -0xc(%rbp)
cmpl $-0x1, %eax
jne 0x6d89
leaq 0xa1d3(%rip), %rdi      # 0x10f4e
callq 0x2310
movl $0x45, -0x4(%rbp)
jmp 0x6dca
movl -0xc(%rbp), %eax
orl $0x800, %eax            # imm = 0x800
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %edi
movl -0xc(%rbp), %edx
movl $0x4, %esi
movb $0x0, %al
callq 0x20f0
movl %eax, -0x10(%rbp)
cmpl $-0x1, %eax
jne 0x6dc3
leaq 0xa1af(%rip), %rdi      # 0x10f64
callq 0x2310
movl $0x4b, -0x4(%rbp)
jmp 0x6dca
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/subprocess.c
// Function: child_new
struct child *child_new(struct subprocess *sp)
{
	struct child *c = child_new0();
	assert(c);
	c->sp = sp;
	return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
callq 0x8d40
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x8e5e
jmp 0x8e7d
leaq 0x8fa7(%rip), %rdi      # 0x11e0c
leaq 0x812c(%rip), %rsi      # 0x10f98
movl $0x6f, %edx
leaq 0x8362(%rip), %rcx      # 0x111da
callq 0x21a0
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/subprocess.c
// Function: children_search_by_pid
struct child *children_search_by_pid(struct children * rbtree, int key)
{
	struct child *ret;
	int cmp;
	ret = rbtree->rbt_root;
	while (ret != &rbtree->rbt_nil && (cmp = child_cmp_by_pid(key, ret)) != 0) {
		if (cmp < 0) {
			ret = rbtn_left_get(struct child, _meta, ret);
		} else {
			ret = rbtn_right_get(struct child, _meta, ret);
		}
	}
	if (ret == &rbtree->rbt_nil) {
		ret = NULL;
	}
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rdx
addq $0x8, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0x1d(%rbp)
je 0x8f48
movl -0xc(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x8ee0
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
setne %al
movb %al, -0x1d(%rbp)
movb -0x1d(%rbp), %al
testb $0x1, %al
jne 0x8f51
jmp 0x8f76
cmpl $0x0, -0x1c(%rbp)
jge 0x8f64
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x8f74
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
andq $-0x2, %rax
movq %rax, -0x18(%rbp)
jmp 0x8f1a
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
addq $0x8, %rcx
cmpq %rcx, %rax
jne 0x8f8f
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/subprocess.c
// Function: children_free
void children_free(struct children * x)
{
    if (x) {
	struct child *c, *n;
	for (c = children_first(x); c; c = n) {
	    n = children_next(x, c);
	    children_remove(x, c);
	    child_free(c);
	}
	free(x);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x9001
movq -0x8(%rbp), %rdi
callq 0x6e60
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x8ff8
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x6f50
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x78d0
movq -0x10(%rbp), %rdi
callq 0x8ea0
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x8fc0
movq -0x8(%rbp), %rdi
callq 0x2050
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/subprocess.c
// Function: interrupt_safe_sleep
void interrupt_safe_sleep(int msec)
{
	int r;
	struct timeval start;
	struct timeval current;
	struct timeval tv;
	long usec;
	long dmsec;

	get_current_timeval(&start);

	DEBUG_INFO("interrupt_safe_sleep(%u)", msec);

	tv.tv_sec = 0;
	tv.tv_usec = msec * 1000;
	r = select(0, NULL, NULL, NULL, &tv);
	while (r < 0) {
		assert(r == -1);
		assert(errno == EINTR);

		get_current_timeval(&current);
		if ((dmsec = DELTA_MSEC(&current, &start)) >= msec) {
			break;
		}

		DEBUG_INFO("resuming interrupt safe sleep, %li milliseconds to go, total %i", msec - dmsec, msec);
		tv.tv_sec = 0;
		tv.tv_usec = (msec - dmsec) * 1000;
		r = select(0, NULL, NULL, NULL, &tv);
	}

	get_current_timeval(&current);
	usec = DELTA_USEC(&current, &start);
	DEBUG_INFO("%li milliseconds elapsed (%lu usecs)", usec / 1000, usec);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0x4(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x9010
movq $0x0, -0x38(%rbp)
imull $0x3e8, -0x4(%rbp), %eax # imm = 0x3E8
cltq
movq %rax, -0x30(%rbp)
xorl %edi, %edi
xorl %eax, %eax
movl %eax, %ecx
leaq -0x38(%rbp), %r8
movq %rcx, %rsi
movq %rcx, %rdx
callq 0x2280
movl %eax, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
jge 0x919e
cmpl $-0x1, -0x8(%rbp)
jne 0x90e3
jmp 0x9102
leaq 0x8a8b(%rip), %rdi      # 0x11b75
leaq 0x7ea7(%rip), %rsi      # 0x10f98
movl $0x17e, %edx            # imm = 0x17E
leaq 0x815c(%rip), %rcx      # 0x11259
callq 0x21a0
callq 0x2070
cmpl $0x4, (%rax)
jne 0x910e
jmp 0x912d
leaq 0x8163(%rip), %rdi      # 0x11278
leaq 0x7e7c(%rip), %rsi      # 0x10f98
movl $0x17f, %edx            # imm = 0x17F
leaq 0x8131(%rip), %rcx      # 0x11259
callq 0x21a0
leaq -0x28(%rbp), %rdi
callq 0x9010
movq -0x28(%rbp), %rax
subq -0x18(%rbp), %rax
imulq $0xf4240, %rax, %rax    # imm = 0xF4240
addq -0x20(%rbp), %rax
subq -0x10(%rbp), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
cqto
idivq %rcx
movq %rax, -0x48(%rbp)
movslq -0x4(%rbp), %rcx
cmpq %rcx, %rax
jl 0x9166
jmp 0x919e
movq $0x0, -0x38(%rbp)
movslq -0x4(%rbp), %rax
subq -0x48(%rbp), %rax
imulq $0x3e8, %rax, %rax      # imm = 0x3E8
movq %rax, -0x30(%rbp)
xorl %edi, %edi
xorl %eax, %eax
movl %eax, %ecx
leaq -0x38(%rbp), %r8
movq %rcx, %rsi
movq %rcx, %rdx
callq 0x2280
movl %eax, -0x8(%rbp)
jmp 0x90d1
leaq -0x28(%rbp), %rdi
callq 0x9010
movq -0x28(%rbp), %rax
subq -0x18(%rbp), %rax
imulq $0xf4240, %rax, %rax    # imm = 0xF4240
addq -0x20(%rbp), %rax
subq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/subprocess.c
// Function: subprocess_close_child_fdin
void subprocess_close_child_fdin(struct subprocess *sp)
{
	assert(sp->pid > 0);
	if (sp->child_fdin >= 0) {
		assert(xclose(sp->child_fdin) == 0);
		sp->child_fdin = -1;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jle 0x91e8
jmp 0x9207
leaq 0x774a(%rip), %rdi      # 0x10939
leaq 0x7da2(%rip), %rsi      # 0x10f98
movl $0x193, %edx            # imm = 0x193
leaq 0x8085(%rip), %rcx      # 0x11287
callq 0x21a0
movq -0x8(%rbp), %rax
cmpl $0x0, 0x28(%rax)
jl 0x924e
movq -0x8(%rbp), %rax
movl 0x28(%rax), %edi
callq 0x9260
cmpl $0x0, %eax
jne 0x9224
jmp 0x9243
leaq 0x8092(%rip), %rdi      # 0x112bd
leaq 0x7d66(%rip), %rsi      # 0x10f98
movl $0x195, %edx            # imm = 0x195
leaq 0x8049(%rip), %rcx      # 0x11287
callq 0x21a0
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x28(%rax) # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/subprocess.c
// Function: subprocess_close_child_fdout
void subprocess_close_child_fdout(struct subprocess *sp)
{
	assert(sp->pid > 0);
	if (sp->child_fdout >= 0) {
		assert(xclose(sp->child_fdout) == 0);
		sp->child_fdout = -1;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jle 0x9298
jmp 0x92b7
leaq 0x769a(%rip), %rdi      # 0x10939
leaq 0x7cf2(%rip), %rsi      # 0x10f98
movl $0x19c, %edx            # imm = 0x19C
leaq 0x8027(%rip), %rcx      # 0x112d9
callq 0x21a0
movq -0x8(%rbp), %rax
cmpl $0x0, 0x2c(%rax)
jl 0x92fe
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %edi
callq 0x9260
cmpl $0x0, %eax
jne 0x92d4
jmp 0x92f3
leaq 0x8035(%rip), %rdi      # 0x11310
leaq 0x7cb6(%rip), %rsi      # 0x10f98
movl $0x19e, %edx            # imm = 0x19E
leaq 0x7feb(%rip), %rcx      # 0x112d9
callq 0x21a0
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x2c(%rax) # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/subprocess.c
// Function: subprocess_close_child_fderr
void subprocess_close_child_fderr(struct subprocess *sp)
{
	assert(sp->pid > 0);
	if (sp->child_fderr >= 0) {
		assert(xclose(sp->child_fderr) == 0);
		sp->child_fderr = -1;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jle 0x9328
jmp 0x9347
leaq 0x760a(%rip), %rdi      # 0x10939
leaq 0x7c62(%rip), %rsi      # 0x10f98
movl $0x1a5, %edx            # imm = 0x1A5
leaq 0x7feb(%rip), %rcx      # 0x1132d
callq 0x21a0
movq -0x8(%rbp), %rax
cmpl $0x0, 0x30(%rax)
jl 0x938e
movq -0x8(%rbp), %rax
movl 0x30(%rax), %edi
callq 0x9260
cmpl $0x0, %eax
jne 0x9364
jmp 0x9383
leaq 0x7ff9(%rip), %rdi      # 0x11364
leaq 0x7c26(%rip), %rsi      # 0x10f98
movl $0x1a7, %edx            # imm = 0x1A7
leaq 0x7faf(%rip), %rcx      # 0x1132d
callq 0x21a0
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x30(%rax) # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/subprocess.c
// Function: subprocess_read_selfpipe
int subprocess_read_selfpipe()
{
	if (got_SIGCHLD) {
		/* this may seem paranoid, but, is certainly the right
		 * thing (sigprocmask) to do
		 */
		sigprocmask(SIG_BLOCK, sigset_SIGCHLD, NULL);
		if (got_SIGCHLD) got_SIGCHLD = 0;
		/* we can clear got_SIGCHLD early, since this is the
		 * only place where it is checked for
		 */
		sigprocmask(SIG_UNBLOCK, sigset_SIGCHLD, NULL);
		return subprocess_read_selfpipe0();
	}
	DEBUG_INFO("subprocess_read_selfpipe(): nothing new");
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl 0xd3d2(%rip), %eax      # 0x16780
cmpl $0x0, %eax
je 0x93f9
xorl %edi, %edi
leaq 0xd3d4(%rip), %rsi      # 0x16790
xorl %eax, %eax
movl %eax, %edx
callq 0x2040
movl 0xd3b5(%rip), %eax      # 0x16780
cmpl $0x0, %eax
je 0x93da
movl $0x0, 0xd3a6(%rip)      # 0x16780
movl $0x1, %edi
leaq 0xd3aa(%rip), %rsi      # 0x16790
xorl %eax, %eax
movl %eax, %edx
callq 0x2040
callq 0xb070
movl %eax, -0x4(%rbp)
jmp 0x9400
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/subprocess.c
// Function: subprocess_exit_debug
void subprocess_exit_debug(struct subprocess *sp)
{
	int status = sp->exit_status;

	assert(sp->pid > 0);
	assert(sp->waitpid_pid == sp->pid); /* must be terminated */

	if (WIFEXITED(status)) {
		if (WEXITSTATUS(status) != EXIT_SUCCESS) {
			DEBUG_INFO("child %i exited with error, exit status = %i", sp->pid, WEXITSTATUS(status));
		} else {
			DEBUG_INFO("child %i exited with EXIT_SUCCESS", sp->pid);
		}
	} else if (WIFSIGNALED(status)) {
		printf("child %i was killed by signal %d\n", sp->pid, WTERMSIG(status));
	} else if (WIFSTOPPED(status)) {
		printf("child %i was stopped by signal %d\n", sp->pid, WSTOPSIG(status));
#ifdef WIFCONTINUED
	} else if (WIFCONTINUED(status)) {
		printf("continued\n");
#endif
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jle 0xa182
jmp 0xa1a1
leaq 0x67b0(%rip), %rdi      # 0x10939
leaq 0x6e08(%rip), %rsi      # 0x10f98
movl $0x437, %edx            # imm = 0x437
leaq 0x75f2(%rip), %rcx      # 0x1178e
callq 0x21a0
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jne 0xa1b3
jmp 0xa1d2
leaq 0x7504(%rip), %rdi      # 0x116be
leaq 0x6dd7(%rip), %rsi      # 0x10f98
movl $0x438, %edx            # imm = 0x438
leaq 0x75c1(%rip), %rcx      # 0x1178e
callq 0x21a0
movl -0xc(%rbp), %eax
andl $0x7f, %eax
cmpl $0x0, %eax
jne 0xa1f3
movl -0xc(%rbp), %eax
andl $0xff00, %eax           # imm = 0xFF00
sarl $0x8, %eax
cmpl $0x0, %eax
je 0xa1ef
jmp 0xa1f1
jmp 0xa1f1
jmp 0xa270
movl -0xc(%rbp), %eax
andl $0x7f, %eax
addl $0x1, %eax
movsbl %al, %eax
sarl %eax
cmpl $0x0, %eax
jle 0xa223
movq -0x8(%rbp), %rax
movl 0x18(%rax), %esi
movl -0xc(%rbp), %edx
andl $0x7f, %edx
leaq 0x75a4(%rip), %rdi      # 0x117be
movb $0x0, %al
callq 0x2160
jmp 0xa26e
movl -0xc(%rbp), %eax
andl $0xff, %eax
cmpl $0x7f, %eax
jne 0xa253
movq -0x8(%rbp), %rax
movl 0x18(%rax), %esi
movl -0xc(%rbp), %edx
andl $0xff00, %edx           # imm = 0xFF00
sarl $0x8, %edx
leaq 0x7596(%rip), %rdi      # 0x117e0
movb $0x0, %al
callq 0x2160
jmp 0xa26c
cmpl $0xffff, -0xc(%rbp)     # imm = 0xFFFF
jne 0xa26a
leaq 0x75a0(%rip), %rdi      # 0x11803
movb $0x0, %al
callq 0x2160
jmp 0xa26c
jmp 0xa26e
jmp 0xa270
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/subprocess.c
// Function: subprocess_run
int subprocess_run(struct subprocess *sp, struct subprocess_callbacks *cb)
{
	int r;

	/* fork
	 */
	assert(subprocess_fork(sp) == 0);

	/* process child communication
	 */
	r = loop_child_pipes(sp, cb);
	DEBUG_INFO("loop_child_pipes() done, returned %i, pid=%i", r, sp->pid);
	if (r) {
		/* error while processing child communication
		 */
		exit(1);
	}

	assert(subprocess_terminate(sp) == 0);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x9cd0
cmpl $0x0, %eax
jne 0xa2a0
jmp 0xa2bf
leaq 0x7567(%rip), %rdi      # 0x1180e
leaq 0x6cea(%rip), %rsi      # 0x10f98
movl $0x451, %edx            # imm = 0x451
leaq 0x756d(%rip), %rcx      # 0x11827
callq 0x21a0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xa320
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0xa2df
movl $0x1, %edi
callq 0x2350
movq -0x8(%rbp), %rdi
callq 0x9ed0
cmpl $0x0, %eax
jne 0xa2ef
jmp 0xa30e
leaq 0x7578(%rip), %rdi      # 0x1186e
leaq 0x6c9b(%rip), %rsi      # 0x10f98
movl $0x45d, %edx            # imm = 0x45D
leaq 0x751e(%rip), %rcx      # 0x11827
callq 0x21a0
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/subprocess.c
// Function: sigaction_SIGCHLD
static void sigaction_SIGCHLD(int n, siginfo_t *si, void *vp)
{
	char msg[] = "sigaction_SIGCHLD(), pid_gone=-1234567890\n";

	//assert(sizeof(si->si_pid) == sizeof(int));

	backfill_u4_dec(msg + sizeof(msg) - 2 /* "\n\0" */, si->si_pid, ' ');
	write_exact(STDERR_FILENO, msg, sizeof(msg) - 1);

	if (selfpipe[1] != -1) {
		int r = write(selfpipe[1], (void*)&si->si_pid, sizeof(si->si_pid));
		if (r == -1 && errno == EAGAIN) {
			char msg[] = "sigaction_SIGCHLD(), pipe buffer is full, drained -1234567890 bytes\n";
			char buf[4096];
			r = read(selfpipe[0], buf, sizeof(buf));
			backfill_u4_dec(msg + sizeof(msg) - 8 /* " bytes\n\0" */, r, ' ');
			write_exact(STDERR_FILENO, msg, sizeof(msg) - 1);
		}
	}

	got_SIGCHLD = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10a0, %rsp           # imm = 0x10A0
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x50(%rbp), %rdi
leaq 0x668f(%rip), %rsi      # 0x11be0
movl $0x2b, %edx
callq 0x2260
leaq -0x50(%rbp), %rdi
addq $0x2b, %rdi
addq $-0x2, %rdi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %esi
movl $0x20, %edx
callq 0xb640
leaq -0x50(%rbp), %rsi
movl $0x2, %edi
movl $0x2a, %edx
callq 0xb7f0
cmpl $-0x1, 0xb18a(%rip)     # 0x1671c
je 0xb629
movl 0xb17e(%rip), %edi      # 0x1671c
movq -0x10(%rbp), %rsi
addq $0x10, %rsi
movl $0x4, %edx
callq 0x2110
movl %eax, -0x54(%rbp)
cmpl $-0x1, -0x54(%rbp)
jne 0xb627
callq 0x2070
cmpl $0xb, (%rax)
jne 0xb627
leaq -0xa0(%rbp), %rdi
leaq 0x663f(%rip), %rsi      # 0x11c10
movl $0x45, %edx
callq 0x2260
movl 0xb137(%rip), %edi      # 0x16718
leaq -0x10a0(%rbp), %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0x21f0
movl %eax, -0x54(%rbp)
leaq -0xa0(%rbp), %rdi
addq $0x45, %rdi
addq $-0x8, %rdi
movl -0x54(%rbp), %esi
movl $0x20, %edx
callq 0xb640
leaq -0xa0(%rbp), %rsi
movl $0x2, %edi
movl $0x44, %edx
callq 0xb7f0
jmp 0xb629
movl $0x1, 0xb14d(%rip)      # 0x16780
addq $0x10a0, %rsp           # imm = 0x10A0
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/subprocess.c
// Function: backfill_u4_dec
static void backfill_u4_dec(char *s, int v, int pad)
{
	char *r = s - 11;
	assert(s);
	if (v > 0) {
		while (v) {
			*--s = DEC_DIGIT(v % 10);
			v = v / 10;
		}
	} else if (v < 0) {
		unsigned int x = -v;
		while (x) {
			*--s = DEC_DIGIT(x % 10);
			x = x / 10;
		}
		*--s = '-';
	} else {
		*--s = '0';
	}
	while (r < s) {
		*--s = pad;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq $-0xb, %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xb667
jmp 0xb686
leaq 0x6dcc(%rip), %rdi      # 0x1243a
leaq 0x5923(%rip), %rsi      # 0x10f98
movl $0xd5, %edx
leaq 0x63b0(%rip), %rcx      # 0x11a31
callq 0x21a0
cmpl $0x0, -0xc(%rbp)
jle 0xb708
jmp 0xb68e
cmpl $0x0, -0xc(%rbp)
je 0xb703
movl -0xc(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jl 0xb6d2
movl -0xc(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
cmpl $0xa, %edx
jge 0xb6d2
movl -0xc(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
movslq %edx, %rcx
leaq 0x638f(%rip), %rax      # 0x11a58
movsbl (%rax,%rcx), %eax
movl %eax, -0x20(%rbp)
jmp 0xb6dc
movl $0x3f, %eax
movl %eax, -0x20(%rbp)
jmp 0xb6dc
movl -0x20(%rbp), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, -0x1(%rax)
movl -0xc(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
movl %eax, -0xc(%rbp)
jmp 0xb68e
jmp 0xb7be
cmpl $0x0, -0xc(%rbp)
jge 0xb7a9
xorl %eax, %eax
subl -0xc(%rbp), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0xb794
movl -0x1c(%rbp), %eax
movl $0xa, %ecx
xorl %edx, %edx
divl %ecx
cmpl $0x0, %edx
jb 0xb762
movl -0x1c(%rbp), %eax
movl $0xa, %ecx
xorl %edx, %edx
divl %ecx
cmpl $0xa, %edx
jae 0xb762
movl -0x1c(%rbp), %eax
movl $0xa, %ecx
xorl %edx, %edx
divl %ecx
movl %edx, %eax
movl %eax, %ecx
leaq 0x62ff(%rip), %rax      # 0x11a58
movsbl (%rax,%rcx), %eax
movl %eax, -0x24(%rbp)
jmp 0xb76c
movl $0x3f, %eax
movl %eax, -0x24(%rbp)
jmp 0xb76c
movl -0x24(%rbp), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, -0x1(%rax)
movl -0x1c(%rbp), %eax
movl $0xa, %ecx
xorl %edx, %edx
divl %ecx
movl %eax, -0x1c(%rbp)
jmp 0xb71a
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x8(%rbp)
movb $0x2d, -0x1(%rax)
jmp 0xb7bc
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x8(%rbp)
movb $0x30, -0x1(%rax)
jmp 0xb7be
jmp 0xb7c0
movq -0x18(%rbp), %rax
cmpq -0x8(%rbp), %rax
jae 0xb7e3
movl -0x10(%rbp), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, -0x1(%rax)
jmp 0xb7c0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/str.c
// Function: str_alloc
void str_alloc(struct str *x, int n)
{
  if (x->s) {
    if (n > x->a) {
      int i = n + (n >> 3) + 30;
      void *p = realloc_(x->s, x->len, i);
      if (p) {
        x->a = i;
        x->s = p;
        return;
      }
      FATAL("memory allocation failed"); /* it's better be safer than sorry */
    }
    return;
  }
  x->s = malloc(n);
  assert(x->s);
  x->a = n;
  x->len = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0xe422
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jle 0xe420
movl -0xc(%rbp), %eax
movl -0xc(%rbp), %ecx
sarl $0x3, %ecx
addl %ecx, %eax
addl $0x1e, %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x8(%rax), %esi
movl -0x10(%rbp), %edx
callq 0xe480
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xe3e9
movl -0x10(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
jmp 0xe475
jmp 0xe3eb
movq 0x7c06(%rip), %rax      # 0x15ff8
movq (%rax), %rdi
leaq 0x400c(%rip), %rsi      # 0x12408
leaq 0x4015(%rip), %rdx      # 0x12418
movl $0x7b, %ecx
leaq 0x400f(%rip), %r8       # 0x1241e
movb $0x0, %al
callq 0x2230
movl $0x1, %edi
callq 0x2350
jmp 0xe475
movslq -0xc(%rbp), %rdi
callq 0x22a0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0xe441
jmp 0xe460
leaq 0x3fef(%rip), %rdi      # 0x12437
leaq 0x3fc9(%rip), %rsi      # 0x12418
movl $0x80, %edx
leaq 0x3fe1(%rip), %rcx      # 0x1243c
callq 0x21a0
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/str.c
// Function: realloc_
static void *realloc_(void *x, int m, int n)
{
  void *y = malloc(n);
  if (!y) return NULL;
  memcpy(y, x, m);
  free(x);
  return y;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movslq -0x18(%rbp), %rdi
callq 0x22a0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xe4b0
movq $0x0, -0x8(%rbp)
jmp 0xe4d2
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rdx
callq 0x2260
movq -0x10(%rbp), %rdi
callq 0x2050
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/str.c
// Function: str_free
void str_free(struct str *x)
{
  if (x->s) {
    void *p = x->s;
    x->s = NULL;
    x->len = 0;
    x->a = 0;
    free(p);
    p = NULL;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0xe533
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x10(%rbp), %rdi
callq 0x2050
movq $0x0, -0x10(%rbp)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/str.c
// Function: str_copyn
void str_copyn(struct str *sa, const char *s, int n)
{
  str_alloc(sa, n + 1);
  memcpy(sa->s, s, n);
  sa->len = n;
  sa->s[n] = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
addl $0x1, %esi
callq 0xe370
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rdx
callq 0x2260
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x14(%rbp), %rcx
movb $0x0, (%rax,%rcx)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/str.c
// Function: str_copyc
void str_copyc(struct str *sa, int c)
{
  if (sa->len == 0) {
    str_alloc(sa, 1);
  }
  sa->s[0] = c;
  sa->len = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0xe637
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0xe370
movl -0xc(%rbp), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq (%rax), %rax
movb %cl, (%rax)
movq -0x8(%rbp), %rax
movl $0x1, 0x8(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/str.c
// Function: str_catn
void str_catn(struct str *sa, const char *s, int n)
{
  if (!sa->s) {
    str_copyn(sa, s, n);
    return;
  }
  str_alloc(sa, sa->len + n + 1);
  memcpy(sa->s + sa->len, s, n);
  sa->len += n;
  sa->s[sa->len] = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
jne 0xe68f
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0xe540
jmp 0xe6e4
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x8(%rax), %esi
addl -0x14(%rbp), %esi
addl $0x1, %esi
callq 0xe370
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movslq 0x8(%rax), %rax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rdx
callq 0x2260
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movslq 0x8(%rcx), %rcx
movb $0x0, (%rax,%rcx)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/str.c
// Function: str_catc
void str_catc(struct str *sa, int c)
{
  if ((sa->len + 1) >= sa->a) {
    str_alloc(sa, sa->len + 2);
  }
  sa->s[sa->len++] = c;
  sa->s[sa->len] = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
addl $0x1, %eax
movq -0x8(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jl 0xe795
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x8(%rax), %esi
addl $0x2, %esi
callq 0xe370
movl -0xc(%rbp), %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rsi
movl 0x8(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x8(%rsi)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movslq 0x8(%rcx), %rcx
movb $0x0, (%rax,%rcx)
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/str.c
// Function: str_diffn
int str_diffn(struct str *a, char *b, int bl)
{
  int x = a->len - bl;
  int y = 0;

  if (x > 0) {
    x = 1;
    y = bdiff(a->s, bl, b);
  } else if (x < 0) {
    x = -1;
    y = bdiff(a->s, a->len, b);
  } else {
    y = bdiff(a->s, a->len, b);
  }
  return y ? y : x;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
subl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
cmpl $0x0, -0x18(%rbp)
jle 0xedfc
movl $0x1, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movl -0x14(%rbp), %esi
movq -0x10(%rbp), %rdx
callq 0xee60
movl %eax, -0x1c(%rbp)
jmp 0xee41
cmpl $0x0, -0x18(%rbp)
jge 0xee25
movl $0xffffffff, -0x18(%rbp) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x8(%rax), %esi
movq -0x10(%rbp), %rdx
callq 0xee60
movl %eax, -0x1c(%rbp)
jmp 0xee3f
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x8(%rax), %esi
movq -0x10(%rbp), %rdx
callq 0xee60
movl %eax, -0x1c(%rbp)
jmp 0xee41
cmpl $0x0, -0x1c(%rbp)
je 0xee4f
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
jmp 0xee55
movl -0x18(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/str.c
// Function: bdiff
static int bdiff(const void *s, int n, const void *t)
{
  const char *x=s;
  const char *y=t;
  for (;;) {
    if (!n)
      return 0;
    if (*x != *y)
      break;
    ++x;
    ++y;
    --n;
  }
  return ((int)(unsigned char)*x)
    - ((int)(unsigned char)*y);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0xee8e
movl $0x0, -0x4(%rbp)
jmp 0xeed8
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
movq -0x30(%rbp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
je 0xeea2
jmp 0xeec5
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xee7f
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
movq -0x30(%rbp), %rcx
movzbl (%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/str.c
// Function: sdiffn
static int sdiffn(const char *s, const char *t, int len)
{
  char x;

  for (;;) {
    if (!len--)
      return 0;
    x = *s;
    if (x != *t)
      break;
    if (!x)
      break;
    ++s;
    ++t;
  }

  return ((int)(unsigned char)x)
    - ((int)(unsigned char)*t);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x1c(%rbp)
cmpl $0x0, %eax
jne 0xef58
movl $0x0, -0x4(%rbp)
jmp 0xefa4
movq -0x10(%rbp), %rax
movb (%rax), %al
movb %al, -0x1d(%rbp)
movsbl -0x1d(%rbp), %eax
movq -0x18(%rbp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
je 0xef72
jmp 0xef94
cmpb $0x0, -0x1d(%rbp)
jne 0xef7a
jmp 0xef94
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xef3f
movzbl -0x1d(%rbp), %eax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/str.c
// Function: str_upper
void str_upper(struct str *s)
{
  int i;
  char c;
  for (i=0; i<s->len; i++, c++) {
    c = s->s[i];
    if (isalpha(c)) {
      s->s[i] = toupper(c);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0xf05b
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0xd(%rbp)
callq 0x23b0
movq (%rax), %rax
movsbl -0xd(%rbp), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0xf046
movsbl -0xd(%rbp), %edi
callq 0x20b0
movb %al, %dl
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
movb %dl, (%rax,%rcx)
jmp 0xf048
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movb -0xd(%rbp), %al
addb $0x1, %al
movb %al, -0xd(%rbp)
jmp 0xeff3
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/str.c
// Function: str_lower
void str_lower(struct str *s)
{
  int i;
  char c;
  for (i=0; i<s->len; i++, c++) {
    c = s->s[i];
    if (isalpha(c)) {
      s->s[i] = tolower(c);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0xf0eb
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0xd(%rbp)
callq 0x23b0
movq (%rax), %rax
movsbl -0xd(%rbp), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0xf0d6
movsbl -0xd(%rbp), %edi
callq 0x2290
movb %al, %dl
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
movb %dl, (%rax,%rcx)
jmp 0xf0d8
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movb -0xd(%rbp), %al
addb $0x1, %al
movb %al, -0xd(%rbp)
jmp 0xf083
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)