LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/martintopholm[P]xping/xping.c
// Function: target_add
static int
target_add(const char *line)
{
	struct target *t;

	t = (struct target *)calloc(1, sizeof(*t));
	if (t == NULL)
		return -1;
	memset(t->res, ' ', sizeof(t->res));
	strncat(t->host, line, sizeof(t->host) - 1);
	DL_APPEND(list, t);
	t->prb = probe_new(line, t);
	if (t->prb == NULL) {
		free(t);
		return -1;
	}
	numtargets++;
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r15
movl $0x1, %edi
movl $0x1a0, %esi            # imm = 0x1A0
callq 0x2120
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x2dc2
movq %rax, %r14
leaq 0x44(%rax), %rdi
movl $0x12d, %edx            # imm = 0x12D
movl $0x20, %esi
callq 0x20e0
movl $0x3f, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2130
movq 0x451f(%rip), %rcx      # 0x7270
testq %rcx, %rcx
je 0x2d7b
leaq 0x190(%rcx), %rax
movq 0x190(%rcx), %rdx
movq %rdx, 0x190(%r14)
movq 0x190(%rcx), %rcx
movq %r14, 0x198(%rcx)
jmp 0x2d8b
movq %r14, 0x44ee(%rip)      # 0x7270
movq %r14, %rax
addq $0x190, %rax            # imm = 0x190
movq %r14, (%rax)
movq $0x0, 0x198(%r14)
movq %r15, %rdi
movq %r14, %rsi
callq 0x30e7
movq %rax, 0x178(%r14)
testq %rax, %rax
je 0x2dba
incl 0x44b2(%rip)            # 0x7268
xorl %ebx, %ebx
jmp 0x2dc2
movq %r14, %rdi
callq 0x2250
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/martintopholm[P]xping/xping.c
// Function: cleanup
static void
cleanup(void)
{
	struct target *t, *t_tmp;

	DL_FOREACH_SAFE(list, t, t_tmp) {
		event_free(t->ev_write);
		probe_free(t->prb);
		free(t);
	}
	probe_cleanup();
	evdns_base_free(dns, 0);
	event_base_free(ev_base);
#ifdef libevent_global_shutdown
	libevent_global_shutdown();
#endif /* !libevent_global_shutdown */
	close(fd4);
	close(fd6);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x449b(%rip), %rbx      # 0x7270
testq %rbx, %rbx
je 0x2e09
movq 0x180(%rbx), %rdi
movq 0x198(%rbx), %r14
callq 0x2380
movq 0x178(%rbx), %rdi
callq 0x33b5
movq %rbx, %rdi
callq 0x2250
movq %r14, %rbx
testq %r14, %r14
jne 0x2dda
xorl %eax, %eax
callq 0x30db
movq 0x4489(%rip), %rdi      # 0x72a0
xorl %esi, %esi
callq 0x2340
movq 0x4453(%rip), %rdi      # 0x7278
callq 0x22e0
movl 0x4450(%rip), %edi      # 0x7280
callq 0x23f0
movl 0x444d(%rip), %edi      # 0x7288
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x23f0
// File: /workspace/github_c_makefile_star2_O1/martintopholm[P]xping/xping.c
// Function: target_probe_sched
static void
target_probe_sched(int fd, short what, void *thunk)
{
	struct target *t = thunk;

	event_free(t->ev_write);
	t->ev_write = event_new(ev_base, -1, EV_PERSIST, target_probe, t);
	event_add(t->ev_write, &tv_interval);
	target_probe(fd, what, thunk);
}

// Assembly:
pushq %rbx
movq %rdx, %rbx
movq 0x180(%rdx), %rdi
callq 0x2380
movq 0x441a(%rip), %rdi      # 0x7278
leaq 0x30(%rip), %rcx        # 0x2e95
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0x10, %edx
movq %rbx, %r8
callq 0x2180
movq %rax, 0x180(%rbx)
leaq 0x440b(%rip), %rsi      # 0x7290
movq %rax, %rdi
callq 0x20b0
xorl %esi, %esi
movq %rbx, %rdx
popq %rbx
jmp 0x2e95
// File: /workspace/github_c_makefile_star2_O1/martintopholm[P]xping/http.c
// Function: probe_setup
void
probe_setup()
{
	tv_timeout.tv_sec = 3 * i_interval / 1000;
	tv_timeout.tv_usec = 3 * i_interval % 1000 * 1000;
	if (regcomp(&re_target, "^(https?:(//)?)?"
            "([0-9A-Za-z.-]+)(\\[([0-9A-Fa-f.:]+)\\])?(:[0-9]+)?(/[^ ]*)?$",
	    REG_EXTENDED | REG_NEWLINE) != 0) {
		fprintf(stderr,
		    "regcomp: error compiling regular expression\n");
		exit(1);
	}
#ifdef WITH_SSL
	SSL_library_init();
#endif /* WITH_SSL */
}

// Assembly:
pushq %rax
leaq 0x419c(%rip), %rax      # 0x7218
movl (%rax), %eax
leal (%rax,%rax,2), %eax
cltq
imulq $0x10624dd3, %rax, %rcx # imm = 0x10624DD3
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x26, %rcx
addl %edx, %ecx
movslq %ecx, %rcx
movq %rcx, 0x4207(%rip)      # 0x72a8
imull $0x3e8, %ecx, %ecx      # imm = 0x3E8
subl %ecx, %eax
imull $0x3e8, %eax, %eax      # imm = 0x3E8
cltq
movq %rax, 0x41f8(%rip)      # 0x72b0
leaq 0x41f9(%rip), %rdi      # 0x72b8
leaq 0x215a(%rip), %rsi      # 0x5220
movl $0x5, %edx
callq 0x2220
testl %eax, %eax
jne 0x30d6
popq %rax
retq
callq 0x2490
// File: /workspace/github_c_makefile_star2_O1/martintopholm[P]xping/http.c
// Function: resolved
static void
resolved(int af, void *address, void *thunk)
{
	struct probe *prb = thunk;
	if (af == AF_INET6) {
		sin6(prb)->sin6_family = AF_INET6;
		memmove(&sin6(prb)->sin6_addr, (struct in6_addr *)address,
		    sizeof(sin6(prb)->sin6_addr));
		prb->resolved = 1;
	} else if (af == AF_INET) {
		sin(prb)->sin_family = AF_INET;
		memmove(&sin(prb)->sin_addr, (struct in_addr *)address,
		    sizeof(sin(prb)->sin_addr));
		prb->resolved = 1;
	} else if (af == 0) {
		prb->resolved = 0;
	}
	target_resolved(prb->owner, af, address);
}

// Assembly:
movq %rdx, %rax
movq %rsi, %rdx
movl %edi, %esi
movl %edi, %ecx
testl %edi, %edi
je 0x33a6
cmpl $0x2, %esi
je 0x3396
cmpl $0xa, %esi
jne 0x33a9
movw $0xa, 0x44(%rax)
movups (%rdx), %xmm0
movups %xmm0, 0x4c(%rax)
jmp 0x33a1
movw $0x2, 0x44(%rax)
movl (%rdx), %ecx
movl %ecx, 0x48(%rax)
movl $0x1, %ecx
movl %ecx, 0x40(%rax)
movq 0xb0(%rax), %rdi
jmp 0x2777
// File: /workspace/github_c_makefile_star2_O1/martintopholm[P]xping/http.c
// Function: probe_free
void probe_free(struct probe *prb)
{
	struct session *s, *s_tmp;

	LL_FOREACH_SAFE(prb->sessions, s, s_tmp) {
		session_free(s);
	}
	if (prb->dnstask)
		dnstask_free(prb->dnstask);
	free(prb);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xa0(%rdi), %rdi
testq %rdi, %rdi
je 0x33d9
movq 0x30(%rdi), %r14
callq 0x33f9
movq %r14, %rdi
testq %r14, %r14
jne 0x33c8
movq 0xa8(%rbx), %rdi
testq %rdi, %rdi
je 0x33ea
callq 0x42b0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2250
// File: /workspace/github_c_makefile_star2_O1/martintopholm[P]xping/http.c
// Function: session_free
static void
session_free(struct session *session)
{

	if (session->statusline)
		free(session->statusline);
	LL_DELETE(session->prb->sessions, session);
	if (session->ev_timeout)
		event_free(session->ev_timeout);
	if (session->bev) {
		bufferevent_disable(session->bev, EV_READ|EV_WRITE);
		bufferevent_free(session->bev);
	}
	free(session);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
testq %rdi, %rdi
je 0x340b
callq 0x2250
movq (%rbx), %rax
movq 0xa0(%rax), %rcx
cmpq %rbx, %rcx
je 0x3439
movq %rcx, %rax
movq 0x30(%rcx), %rcx
testq %rcx, %rcx
je 0x342b
cmpq %rbx, %rcx
jne 0x341a
testq %rcx, %rcx
je 0x3446
addq $0x30, %rax
movq %rbx, %rcx
jmp 0x343f
addq $0xa0, %rax
movq 0x30(%rcx), %rcx
movq %rcx, (%rax)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x3454
callq 0x2380
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x3470
movl $0x6, %esi
callq 0x2330
movq 0x10(%rbx), %rdi
callq 0x2060
movq %rbx, %rdi
popq %rbx
jmp 0x2250
// File: /workspace/github_c_makefile_star2_O1/martintopholm[P]xping/http.c
// Function: session_readcb_status
static void
session_readcb_status(struct bufferevent *bev, void *thunk)
{
	struct session *session = thunk;
	struct evbuffer *evbuf = bufferevent_get_input(bev);
	size_t len;
	char *line;
	char *protocol;
	char *number;

	line = evbuffer_readln(evbuf, &len, EVBUFFER_EOL_CRLF);
	if (line == NULL) {
		if (evbuffer_get_length(evbuf) > 2048) {
			session_free(session);
			return;
		} else
			return; /* wait for more data */
	}
	session->statusline = line;
	/* Parse response line */
	protocol = strsep(&line, " ");
	if (line == NULL) {
		session_free(session);
		return;
	}
	number = strsep(&line, " ");
	if (line == NULL) {
		session_free(session);
		return;
	}
	(void)protocol;
	(void)number;
	if (atoi(number) < 400 && atoi(number) >= 200 ) {
		session->completed = 1;
	} else {
		target_mark(session->prb->owner, session->seq, '%');
	}
	/* Drain the response on future callbacks */
	bufferevent_setcb(session->bev, session_readcb_drain, NULL,
	    session_eventcb, session);
	session_readcb_drain(bev, session);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2140
movq %rax, %r15
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
movl $0x1, %edx
callq 0x21d0
movq %rax, (%rsp)
testq %rax, %rax
je 0x36d9
movq %rax, 0x20(%rbx)
leaq 0x1c5f(%rip), %rsi      # 0x52f2
movq %rsp, %r15
movq %r15, %rdi
callq 0x20f0
cmpq $0x0, (%r15)
je 0x36e9
leaq 0x1c47(%rip), %rsi      # 0x52f2
movq %rsp, %r15
movq %r15, %rdi
callq 0x20f0
cmpq $0x0, (%r15)
je 0x36e9
movq %rax, %rdi
callq 0x2350
addl $0xffffff38, %eax       # imm = 0xFFFFFF38
cmpl $0xc7, %eax
ja 0x36f3
movl $0x1, 0x28(%rbx)
jmp 0x370a
movq %r15, %rdi
callq 0x21c0
cmpq $0x801, %rax            # imm = 0x801
jb 0x3744
movq %rbx, %rdi
callq 0x33f9
jmp 0x3744
movq (%rbx), %rax
movq 0xb0(%rax), %rdi
movl 0x8(%rbx), %esi
movl $0x25, %edx
callq 0x25f4
movq 0x10(%rbx), %rdi
leaq 0x121(%rip), %rsi       # 0x3836
leaq 0x32(%rip), %rcx        # 0x374e
xorl %edx, %edx
movq %rbx, %r8
callq 0x21a0
movq %r14, %rdi
callq 0x2140
movq %rax, %rbx
movq %rax, %rdi
callq 0x21c0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x21e0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/martintopholm[P]xping/http.c
// Function: session_eventcb
static void
session_eventcb(struct bufferevent *bev, short what, void *thunk)
{
	struct session *session = thunk;
	switch (what & ~(BEV_EVENT_READING|BEV_EVENT_WRITING)) {
	case BEV_EVENT_CONNECTED:
		session_send(session);
		return;
	case BEV_EVENT_EOF:
		bufferevent_disable(bev, EV_READ|EV_WRITE);
		if (session->completed)
			target_mark(session->prb->owner, session->seq, '.');
		else
			target_mark(session->prb->owner, session->seq, '%');
		break;
	case BEV_EVENT_ERROR:
		bufferevent_disable(bev, EV_READ|EV_WRITE);
		target_mark(session->prb->owner, session->seq, '#');
		break;
	case BEV_EVENT_TIMEOUT:
		target_mark(session->prb->owner, session->seq, '?');
		break;
	}
	session_free(session);
}

// Assembly:
pushq %rbx
movq %rdx, %rbx
andl $0xfffc, %esi           # imm = 0xFFFC
movswl %si, %eax
addl $-0x10, %eax
roll $0x1c, %eax
cmpl $0x7, %eax
ja 0x3803
leaq 0x198f(%rip), %rcx      # 0x5100
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x6, %esi
callq 0x2330
cmpl $0x0, 0x28(%rbx)
movq (%rbx), %rax
movq 0xb0(%rax), %rdi
movl 0x8(%rbx), %esi
je 0x37f9
movl $0x2e, %edx
jmp 0x37fe
movq (%rbx), %rax
movq 0xb0(%rax), %rdi
movl 0x8(%rbx), %esi
movl $0x3f, %edx
jmp 0x37fe
movl $0x6, %esi
callq 0x2330
movq (%rbx), %rax
movq 0xb0(%rax), %rdi
movl 0x8(%rbx), %esi
movl $0x23, %edx
jmp 0x37fe
movq 0x10(%rbx), %rdi
callq 0x2070
movq (%rbx), %rcx
leaq 0x60(%rcx), %rdx
leaq 0x1b0d(%rip), %rsi      # 0x52f4
leaq 0x1c34(%rip), %r8       # 0x5422
movq %rax, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x2100
movl $0x25, %edx
callq 0x25f4
movq %rbx, %rdi
popq %rbx
jmp 0x33f9
// File: /workspace/github_c_makefile_star2_O1/martintopholm[P]xping/termio.c
// Function: getmaxx
int
getmaxx(void)
{
	struct winsize wsz;
	char *p;

	if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &wsz) != -1 &&
	    wsz.ws_col > 0)
		return (wsz.ws_col);
	else if ((p = getenv("COLUMNS")) != NULL && *p != '\0')
		return atoi(p);
	else
		return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
movq %rsp, %r14
movl $0x5413, %esi           # imm = 0x5413
movl $0x1, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2300
cmpl $-0x1, %eax
setne %cl
movzwl 0x2(%r14), %eax
testw %ax, %ax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x388e
movzwl %ax, %ebx
jmp 0x38ae
leaq 0x1ad3(%rip), %rdi      # 0x5368
callq 0x2270
testq %rax, %rax
je 0x38ae
cmpb $0x0, (%rax)
je 0x38ae
movq %rax, %rdi
callq 0x2350
movl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/martintopholm[P]xping/termio.c
// Function: getmaxy
int
getmaxy(void)
{
	struct winsize wsz;
	char *p;

	if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &wsz) != -1 &&
	    wsz.ws_row > 0)
		return (wsz.ws_row);
	else if ((p = getenv("ROWS")) != NULL && *p != '\0')
		return atoi(p);
	else
		return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
movq %rsp, %r14
movl $0x5413, %esi           # imm = 0x5413
movl $0x1, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2300
cmpl $-0x1, %eax
setne %cl
movzwl (%r14), %eax
testw %ax, %ax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x38f1
movzwl %ax, %ebx
jmp 0x3911
leaq 0x1a78(%rip), %rdi      # 0x5370
callq 0x2270
testq %rax, %rax
je 0x3911
cmpb $0x0, (%rax)
je 0x3911
movq %rax, %rdi
callq 0x2350
movl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/martintopholm[P]xping/termio.c
// Function: move
void
move(int row, int col)
{
	fprintf(stdout, "%c[u", 0x1b);
	if (row > 0)
		fprintf(stdout, "%c[%dB", 0x1b, row);
	if (col > 0)
		fprintf(stdout, "%c[%dC", 0x1b, col);
	cursor_y = row;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movl %edi, %ebx
movq 0x3686(%rip), %r14      # 0x6fb0
movq (%r14), %rdi
leaq 0x1a41(%rip), %rsi      # 0x5375
movl $0x1b, %edx
xorl %eax, %eax
callq 0x2310
testl %ebx, %ebx
jle 0x395c
movq (%r14), %rdi
leaq 0x1a2c(%rip), %rsi      # 0x537a
movl $0x1b, %edx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x2310
testl %ebp, %ebp
jle 0x3978
movq (%r14), %rdi
leaq 0x1a17(%rip), %rsi      # 0x5381
movl $0x1b, %edx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x2310
movl %ebx, 0x397a(%rip)      # 0x72f8
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/martintopholm[P]xping/termio.c
// Function: sigwinch
void
sigwinch(int sig)
{
	if (cursor_y > 0)
		fprintf(stdout, "%c[%dA\r", 0x1b, cursor_y);
	fprintf(stdout, "\r%c[s", 0x1b);
	cursor_y = 0;
	fprintf(stdout, "%c[2K\r", 0x1b);
	clrtobot();
	termio_update(NULL); /* XXX: this is probably a bad idea */
}

// Assembly:
pushq %rbx
movl 0x396e(%rip), %ecx      # 0x72f8
testl %ecx, %ecx
jle 0x39ab
movq 0x361b(%rip), %rax      # 0x6fb0
movq (%rax), %rdi
leaq 0x19e9(%rip), %rsi      # 0x5388
movl $0x1b, %edx
xorl %eax, %eax
callq 0x2310
movq 0x35fe(%rip), %rbx      # 0x6fb0
movq (%rbx), %rdi
leaq 0x19d4(%rip), %rsi      # 0x5390
movl $0x1b, %edx
xorl %eax, %eax
callq 0x2310
movl $0x0, 0x3926(%rip)      # 0x72f8
movq (%rbx), %rdi
leaq 0x19ba(%rip), %rsi      # 0x5396
movl $0x1b, %edx
xorl %eax, %eax
callq 0x2310
movq (%rbx), %rdi
leaq 0x19b1(%rip), %rsi      # 0x53a3
movl $0x1b, %edx
xorl %eax, %eax
callq 0x2310
xorl %edi, %edi
popq %rbx
jmp 0x3a06
// File: /workspace/github_c_makefile_star2_O1/martintopholm[P]xping/termio.c
// Function: drawchar
static void
drawchar(int ch)
{


	if (!B_flag) {
		addch(ch);
	} else {
		printw("%s%c\x1b[0m", getcolor(ch), ch);
	}
}

// Assembly:
leaq 0x33b0(%rip), %rax      # 0x7254
cmpl $0x0, (%rax)
je 0x3ecf
cmpl $0x2d, %edi
jg 0x3ede
leal -0x21(%rdi), %eax
cmpl $0x4, %eax
ja 0x3f2d
leaq 0x1497(%rip), %rcx      # 0x5354
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1519(%rip), %rsi      # 0x53e6
jmp 0x3f34
movq 0x30da(%rip), %rax      # 0x6fb0
movq (%rax), %rsi
jmp 0x22a0
cmpl $0x3e, %edi
jg 0x3ef6
cmpl $0x2e, %edi
je 0x3f24
cmpl $0x3a, %edi
jne 0x3f2d
leaq 0x14d2(%rip), %rsi      # 0x53c6
jmp 0x3f34
cmpl $0x3f, %edi
je 0x3f09
cmpl $0x40, %edi
jne 0x3f2d
leaq 0x14d7(%rip), %rsi      # 0x53de
jmp 0x3f34
leaq 0x14be(%rip), %rsi      # 0x53ce
jmp 0x3f34
leaq 0x14bd(%rip), %rsi      # 0x53d6
jmp 0x3f34
leaq 0x14cc(%rip), %rsi      # 0x53ee
jmp 0x3f34
leaq 0x1493(%rip), %rsi      # 0x53be
jmp 0x3f34
leaq 0x11c8(%rip), %rsi      # 0x50fc
movl %edi, %edx
xorl %eax, %eax
jmp 0x3f3a
// File: /workspace/github_c_makefile_star2_O1/martintopholm[P]xping/termio.c
// Function: mvprintw
static void
mvprintw(int row, int col, const char *fmt, ...)
{
	va_list ap;

	move(row, col);
	fprintf(stdout, "%c[K", 0x1b);
	va_start(ap, fmt);
	vfprintf(stdout, fmt, ap);
	va_end(ap);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdx, %rbx
leaq 0x20(%rsp), %r14
movq %rcx, 0x18(%r14)
movq %r8, 0x20(%r14)
movq %r9, 0x28(%r14)
testb %al, %al
je 0x404a
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
xorl %esi, %esi
callq 0x391b
movq 0x2f58(%rip), %r15      # 0x6fb0
movq (%r15), %rdi
leaq 0x1357(%rip), %rsi      # 0x53b9
movl $0x1b, %edx
xorl %eax, %eax
callq 0x2310
movabsq $0x3000000018, %rax     # imm = 0x3000000018
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rdx)
movq %r14, 0x10(%rdx)
movq (%r15), %rdi
movq %rbx, %rsi
callq 0x22d0
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/martintopholm[P]xping/report.c
// Function: report_cleanup
void report_cleanup()
{
	struct target *t;
	int i, imax, ifirst, ilast;

	t = list;
	if (t == NULL)
		return;

	imax = MIN(t->npkts, NUM);
	ifirst = (t->npkts > imax ? t->npkts - imax : 0);
	ilast = t->npkts;

	DL_FOREACH(list, t) {
		fprintf(stdout, "%*.*s", w_width, w_width, t->host);
		if (w_width)
			fputc(' ', stdout);
		for (i=ifirst; i<ilast; i++) {
			if (i < t->npkts) fputc(t->res[i % NUM], stdout);
			else fputc(' ', stdout);
		}
		fputc('\n', stdout);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x31b4(%rip), %rax      # 0x7270
movq (%rax), %rcx
testq %rcx, %rcx
je 0x419c
movl 0x40(%rcx), %ebp
movl $0x12c, %ecx            # imm = 0x12C
cmpl %ecx, %ebp
cmovll %ebp, %ecx
movl %ebp, %edx
subl %ecx, %edx
xorl %r14d, %r14d
cmpl $0x12d, %ebp            # imm = 0x12D
cmovgel %edx, %r14d
movq (%rax), %rbx
testq %rbx, %rbx
je 0x419c
movq 0x2eb7(%rip), %r12      # 0x6fb0
leaq 0x311c(%rip), %r13      # 0x721c
movq (%r12), %rdi
movl (%r13), %ecx
leaq 0x130d(%rip), %rsi      # 0x541c
movl %ecx, %edx
movq %rbx, %r8
xorl %eax, %eax
callq 0x2310
cmpl $0x0, (%r13)
je 0x4130
movq (%r12), %rsi
movl $0x20, %edi
callq 0x22a0
cmpl %ebp, %r14d
jge 0x417e
movl %r14d, %r15d
movl $0x20, %edi
cmpl 0x40(%rbx), %r15d
jge 0x416d
movslq %r15d, %rax
imulq $0x1b4e81b5, %rax, %rax # imm = 0x1B4E81B5
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x25, %rax
addl %ecx, %eax
imull $0x12c, %eax, %eax      # imm = 0x12C
movl %r15d, %ecx
subl %eax, %ecx
movslq %ecx, %rax
movsbl 0x44(%rbx,%rax), %edi
movq (%r12), %rsi
callq 0x22a0
incl %r15d
cmpl %r15d, %ebp
jne 0x4138
movq (%r12), %rsi
movl $0xa, %edi
callq 0x22a0
movq 0x198(%rbx), %rbx
testq %rbx, %rbx
jne 0x4100
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/martintopholm[P]xping/dnstask.c
// Function: dnstask_new
struct dnstask *
dnstask_new(const char *hostname, dnstask_cb_type cb, void *thunk)
{
	struct dnstask *task;
	struct timeval tv;

	task = calloc(1, sizeof(*task));
	if (task == NULL)
		return NULL;
	assert(strlen(hostname) + 1 <= sizeof(task->host));
	strncat(task->host, hostname, sizeof(task->host) - 1);
	task->cb = cb;
	task->thunk = thunk;
	task->ev_resolve = event_new(ev_base, -1, 0, sendquery, task);
	if (task->ev_resolve == NULL) {
		free(task);
		return NULL;
	}
	evutil_timerclear(&tv);
	event_add(task->ev_resolve, &tv);
	return task;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl $0x1, %edi
movl $0x58, %esi
callq 0x2120
testq %rax, %rax
je 0x4247
movq %rax, %rbx
movq %r12, %rdi
callq 0x20c0
incq %rax
cmpq $0x41, %rax
jae 0x4258
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x3f, %edx
movq %r12, %rsi
callq 0x2130
movq %r15, (%rbx)
movq %r14, 0x8(%rbx)
leaq 0x306e(%rip), %rax      # 0x7278
movq (%rax), %rdi
leaq 0x63(%rip), %rcx        # 0x4277
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
movq %rbx, %r8
callq 0x2180
movq %rax, 0x50(%rbx)
testq %rax, %rax
je 0x423f
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
movq %rax, %rdi
callq 0x20b0
jmp 0x4249
movq %rbx, %rdi
callq 0x2250
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x11ca(%rip), %rdi      # 0x5429
leaq 0x11ee(%rip), %rsi      # 0x5454
leaq 0x11f1(%rip), %rcx      # 0x545e
movl $0x85, %edx
callq 0x2110
// File: /workspace/github_c_makefile_star2_O1/martintopholm[P]xping/dnstask.c
// Function: sendquery
static void
sendquery(int fd, short what, void *thunk)
{
	struct dnstask *task = thunk;
	if (!v4_flag) {
		evdns_base_resolve_ipv6(dns, task->host, 0,
		    response_ipv6, task);
	} else {
		evdns_base_resolve_ipv4(dns, task->host, 0,
		    response_ipv4, task);
	}

}

// Assembly:
movq %rdx, %r8
leaq 0x2fdf(%rip), %rax      # 0x7260
leaq 0x10(%rdx), %rsi
cmpl $0x0, (%rax)
leaq 0x3011(%rip), %rax      # 0x72a0
movq (%rax), %rdi
je 0x42a2
leaq 0xe3(%rip), %rcx        # 0x437e
xorl %edx, %edx
jmp 0x2290
leaq 0x1d(%rip), %rcx        # 0x42c6
xorl %edx, %edx
jmp 0x2190
// File: /workspace/github_c_makefile_star2_O1/martintopholm[P]xping/dnstask.c
// Function: response_ipv6
static void
response_ipv6(int result, char type, int count, int ttl, void *addresses,
    void *thunk)
{
	struct dnstask *task = thunk;

	if (result == DNS_ERR_NONE && count > 0) {
		task->cb(AF_INET6, addresses, task->thunk);
		/* Schedule new request, enforce a lower bound on ttl. */
		if (T_flag)
			reschedule(task->ev_resolve, MAX(ttl, 1));
	} else {
		if (!v6_flag) {
			evdns_base_resolve_ipv4(dns, task->host, 0,
			    response_ipv4, thunk);
		} else {
			/* neg-TTL might be search domain's */
			reschedule(task->ev_resolve, 60);
			task->cb(0, NULL, task->thunk);
		}
	}
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movq %r9, %rbx
movl %ecx, %ebp
testl %edi, %edi
setne %al
testl %edx, %edx
setle %cl
orb %al, %cl
jne 0x431f
movq 0x8(%rbx), %rdx
movl $0xa, %edi
movq %r8, %rsi
callq *(%rbx)
leaq 0x2f68(%rip), %rax      # 0x725c
cmpl $0x0, (%rax)
je 0x4352
cmpl $0x2, %ebp
movl $0x1, %eax
cmovgel %ebp, %eax
movq 0x50(%rbx), %rdi
leaq 0x8(%rsp), %rsi
movq $0x0, 0x8(%rsi)
movq %rax, (%rsi)
callq 0x20b0
jmp 0x4352
leaq 0x2f3e(%rip), %rax      # 0x7264
cmpl $0x0, (%rax)
je 0x4359
movq 0x50(%rbx), %rdi
leaq 0x8(%rsp), %rsi
movq $0x0, 0x8(%rsi)
movq $0x3c, (%rsi)
callq 0x20b0
movq 0x8(%rbx), %rdx
xorl %edi, %edi
xorl %esi, %esi
callq *(%rbx)
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
leaq 0x2f40(%rip), %rax      # 0x72a0
movq (%rax), %rdi
leaq 0x10(%rbx), %rsi
leaq 0x10(%rip), %rcx        # 0x437e
xorl %edx, %edx
movq %rbx, %r8
addq $0x18, %rsp
popq %rbx
popq %rbp
jmp 0x2290
// File: /workspace/github_c_makefile_star2_O1/martintopholm[P]xping/dnstask.c
// Function: response_ipv4
static void
response_ipv4(int result, char type, int count, int ttl, void *addresses,
    void *thunk)
{
	struct dnstask *task = thunk;

	if (result == DNS_ERR_NONE && count > 0) {
		task->cb(AF_INET, addresses, task->thunk);
		/* Schedule new request, enforce a lower bound on ttl. */
		if (T_flag)
			reschedule(task->ev_resolve, MAX(ttl, 1));
	} else {
		task->cb(0, NULL, task->thunk);
		/* neg-TTL might be search domain's */
		reschedule(task->ev_resolve, 60);
	}
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movq %r9, %rbx
movl %ecx, %ebp
testl %edi, %edi
setne %cl
testl %edx, %edx
setle %sil
movq (%r9), %rax
movq 0x8(%r9), %rdx
orb %cl, %sil
jne 0x43d7
movl $0x2, %edi
movq %r8, %rsi
callq *%rax
leaq 0x2eab(%rip), %rax      # 0x725c
cmpl $0x0, (%rax)
je 0x43fa
cmpl $0x2, %ebp
movl $0x1, %eax
cmovgel %ebp, %eax
movq 0x50(%rbx), %rdi
leaq 0x8(%rsp), %rsi
movq $0x0, 0x8(%rsi)
movq %rax, (%rsi)
jmp 0x43f5
xorl %edi, %edi
xorl %esi, %esi
callq *%rax
movq 0x50(%rbx), %rdi
leaq 0x8(%rsp), %rsi
movq $0x0, 0x8(%rsi)
movq $0x3c, (%rsi)
callq 0x20b0
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/KhronosGroup[P]dfdutils/createdfd.c
// Function: createDFDDepthStencil
uint32_t *createDFDDepthStencil(int depthBits,
                                int stencilBits,
                                int sizeBytes)
{
    /* N.B. Little-endian is assumed. */
    uint32_t *DFD = 0;
    DFD = writeHeader((depthBits > 0) + (stencilBits > 0),
                      sizeBytes, s_UNORM, i_NON_COLOR);
    if (depthBits == 32) {
        writeSample(DFD, 0, KHR_DF_CHANNEL_RGBSDA_DEPTH,
                    32, 0,
                    1, 1, s_SFLOAT);
    } else if (depthBits > 0) {
        writeSample(DFD, 0, KHR_DF_CHANNEL_RGBSDA_DEPTH,
                    depthBits, 0,
                    1, 1, s_UNORM);
    }
    if (stencilBits > 0) {
        if (depthBits > 0) {
            writeSample(DFD, 1, KHR_DF_CHANNEL_RGBSDA_STENCIL,
                        stencilBits, depthBits,
                        1, 1, s_UINT);
        } else {
            writeSample(DFD, 0, KHR_DF_CHANNEL_RGBSDA_STENCIL,
                        stencilBits, 0,
                        1, 1, s_UINT);
        }
    }
    return DFD;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r14d
movl %esi, %ebx
movl %edi, %ebp
xorl %eax, %eax
testl %edi, %edi
setg %al
xorl %r12d, %r12d
testl %esi, %esi
setg %r12b
addl %eax, %r12d
movl %r12d, %r15d
shll $0x4, %r15d
addl $0x1c, %r15d
movq %r15, %rdi
callq 0x1080
movl %r15d, (%rax)
xorl %ecx, %ecx
movl %ecx, 0x4(%rax)
shll $0x14, %r12d
addl $0x180002, %r12d        # imm = 0x180002
movl %r12d, 0x8(%rax)
movq $0x10001, 0xc(%rax)     # imm = 0x10001
movl %r14d, 0x14(%rax)
movl %ecx, 0x18(%rax)
cmpl $0x20, %ebp
jne 0x2316
movl $0xce1f0000, %ecx       # imm = 0xCE1F0000
movq %rcx, 0x1c(%rax)
movl $0x3f800000, %edx       # imm = 0x3F800000
movl $0xbf800000, %ecx       # imm = 0xBF800000
jmp 0x234d
testl %ebp, %ebp
jle 0x2353
movl %ebp, %ecx
shll $0x10, %ecx
addl $0xffff0000, %ecx       # imm = 0xFFFF0000
orl $0xe000000, %ecx        # imm = 0xE000000
movl %ecx, 0x1c(%rax)
movl $0x0, 0x20(%rax)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %ebp, %ecx
shll %cl, %edx
cmpl $0x21, %ebp
notl %edx
cmovgel %esi, %edx
xorl %ecx, %ecx
movl %ecx, 0x24(%rax)
movl %edx, 0x28(%rax)
testl %ebx, %ebx
jle 0x23a8
shll $0x10, %ebx
addl $0xffff0000, %ebx       # imm = 0xFFFF0000
movq %rax, %rcx
testl %ebp, %ebp
jle 0x237e
addq $0x2c, %rcx
orl %ebp, %ebx
movl $0x38, %edx
movl $0x34, %esi
movl $0x30, %edi
jmp 0x2391
addq $0x1c, %rcx
movl $0x28, %edx
movl $0x24, %esi
movl $0x20, %edi
orl $0xd000000, %ebx        # imm = 0xD000000
movl %ebx, (%rcx)
xorl %ecx, %ecx
movl %ecx, (%rax,%rdi)
movl %ecx, (%rax,%rsi)
movl $0x1, (%rax,%rdx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/KhronosGroup[P]dfdutils/createdfd.c
// Function: createDFDAlpha
uint32_t *createDFDAlpha(int bigEndian, int bytes,
                         enum VkSuffix suffix) {
    uint32_t *DFD;
    int channel = 3; /* alpha channel */
    if (bigEndian) {
        int channelByte;
        /* Number of samples = number of channels * bytes per channel */
        DFD = writeHeader(bytes, bytes, suffix, i_COLOR);
        /* Loop over the bytes that constitute a channel */
        for (channelByte = 0; channelByte < bytes; ++channelByte) {
            writeSample(DFD, channelByte, channel,
                        8, 8 * (bytes - channelByte - 1),
                        channelByte == bytes-1, channelByte == 0, suffix);
        }
    } else { /* Little-endian */
        /* One sample per channel */
        DFD = writeHeader(1, bytes, suffix, i_COLOR);
        writeSample(DFD, 0, channel,
                    8 * bytes, 0,
                    1, 1, suffix);
    }
    return DFD;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movl %esi, %r14d
testl %edi, %edi
je 0x2476
leal (,%r14,4), %eax
cltq
leaq 0x1c(,%rax,4), %r12
movq %r12, %rdi
callq 0x1080
movq %rax, %r15
movl %r12d, (%rax)
xorl %r12d, %r12d
movl %r12d, 0x4(%rax)
movl %r14d, %eax
shll $0x14, %eax
addl $0x180002, %eax         # imm = 0x180002
movl %eax, 0x8(%r15)
xorl %eax, %eax
cmpl $0x8, %ebx
sete %al
shll $0x10, %eax
addl $0x10101, %eax          # imm = 0x10101
movl %eax, 0xc(%r15)
movl %r12d, 0x10(%r15)
movl %r14d, 0x14(%r15)
movl %r12d, 0x18(%r15)
testl %r14d, %r14d
jle 0x24d9
movl %r14d, %eax
negl %r14d
leal -0x8(,%rax,8), %ebp
leal (%r14,%r12), %eax
xorl %r9d, %r9d
cmpl $-0x1, %eax
sete %r9b
xorl %eax, %eax
testl %r12d, %r12d
sete %al
movq %r15, %rdi
movl %r12d, %esi
movl $0x3, %edx
movl $0x8, %ecx
movl %ebp, %r8d
pushq %rbx
pushq %rax
callq 0x1a3f
addq $0x10, %rsp
incl %r12d
addl $-0x8, %ebp
movl %r14d, %eax
addl %r12d, %eax
jne 0x2432
jmp 0x24d9
movl $0x2c, %edi
callq 0x1080
movq %rax, %r15
movq $0x2c, (%rax)
movl $0x280002, 0x8(%rax)    # imm = 0x280002
xorl %eax, %eax
cmpl $0x8, %ebx
sete %al
shll $0x10, %eax
addl $0x10101, %eax          # imm = 0x10101
movl %eax, 0xc(%r15)
xorl %eax, %eax
movl %eax, 0x10(%r15)
movl %r14d, 0x14(%r15)
movl %eax, 0x18(%r15)
shll $0x3, %r14d
movq %r15, %rdi
xorl %esi, %esi
movl $0x3, %edx
movl %r14d, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
pushq %rbx
pushq $0x1
callq 0x1a3f
addq $0x10, %rsp
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/KhronosGroup[P]dfdutils/printdfd.c
// Function: printFlagBitsJSON
static void printFlagBitsJSON(uint32_t indent, const char* nl, uint32_t flags, const char*(*toStringFn)(uint32_t, bool)) {
    bool first = true;
    for (uint32_t bit_index = 0; bit_index < 32; ++bit_index) {
        uint32_t bit_mask = 1u << bit_index;
        bool bit_value = (bit_mask & (uint32_t) flags) != 0;

        const char* str = toStringFn(bit_index, bit_value);
        if (str) {
            printf("%s%s%*s\"%s\"", first ? "" : ",", first ? "" : nl, indent, "", str);
            first = false;
        } else if (bit_value) {
            printf("%s%s%*s%u", first ? "" : ",", first ? "" : nl, indent, "", bit_mask);
            first = false;
        }
    }
    if (!first)
        printf("%s", nl);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, 0x10(%rsp)
movl %edi, 0xc(%rsp)
xorl %r12d, %r12d
movb $0x1, %r15b
leaq 0x2b48(%rip), %r13      # 0x6aca
movl $0x1, %ebx
movl %r12d, %ecx
shll %cl, %ebx
xorl %esi, %esi
btl %r12d, %ebp
setb %sil
movl %r12d, %edi
callq *%r14
testq %rax, %rax
je 0x3fd6
testb $0x1, %r15b
leaq 0x2e4a(%rip), %rsi      # 0x6df6
cmovneq %r13, %rsi
movq 0x10(%rsp), %rdx
cmovneq %r13, %rdx
xorl %r15d, %r15d
leaq 0x2e27(%rip), %rdi      # 0x6dea
movl 0xc(%rsp), %ecx
movq %r13, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x1050
jmp 0x400d
testl %ebp, %ebx
je 0x400d
testb $0x1, %r15b
leaq 0x2e11(%rip), %rsi      # 0x6df6
cmovneq %r13, %rsi
movq 0x10(%rsp), %rdx
cmovneq %r13, %rdx
xorl %r15d, %r15d
leaq 0x2dfc(%rip), %rdi      # 0x6df8
movl 0xc(%rsp), %ecx
movq %r13, %r8
movl %ebx, %r9d
xorl %eax, %eax
callq 0x1050
incl %r12d
cmpl $0x20, %r12d
jne 0x3f82
testb $0x1, %r15b
je 0x402f
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2cc7(%rip), %rdi      # 0x6cfd
movq 0x10(%rsp), %rsi
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1050
// File: /workspace/github_c_makefile_star2_O1/w4kfu[P]HommI/Pal/main.c
// Function: main
int main(int argc, char *argv[])
{
	char *filename = NULL;
	FILE *fin = NULL;
	int width, heigth;
	int square_width = 32, square_height = 32;
	unsigned char *pal = NULL;

	if (argc != 2)
	{
		fprintf(stderr, "%s <*.PAL>\n", argv[0]);
		return EXIT_FAILURE;
	}
	filename = argv[1];
	if (!(fin = fopen(filename, "rb")))
	{
		perror("fopen()");
		return EXIT_FAILURE;
	}
	if (!(pal = init_palette(fin)))
	{
		fclose(fin);
		return EXIT_FAILURE;
	}
	width = square_width * 16;
	heigth = square_height * 16;
	pal = expand_palette(pal, square_width, square_height);
	if (pal)
	{
		writeImage("./extract/test.png", width, heigth, pal, "pal");
	}
	return 0;
}

// Assembly:
pushq %rbx
cmpl $0x2, %edi
jne 0x15fa
movq 0x8(%rsi), %rdi
leaq 0xaf0(%rip), %rsi       # 0x2084
callq 0x1140
testq %rax, %rax
je 0x1604
movq %rax, %rbx
movq %rax, %rdi
callq 0x165a
testq %rax, %rax
je 0x15e9
movq %rax, %rdi
movl $0x20, %esi
movl $0x20, %edx
callq 0x16f9
xorl %ebx, %ebx
testq %rax, %rax
je 0x15f6
leaq 0xab9(%rip), %rdi       # 0x2087
leaq 0xac5(%rip), %r8        # 0x209a
movl $0x200, %esi            # imm = 0x200
movl $0x200, %edx            # imm = 0x200
movq %rax, %rcx
callq 0x1366
jmp 0x15f6
movq %rbx, %rdi
callq 0x1070
movl $0x1, %ebx
movl %ebx, %eax
popq %rbx
retq
movq %rsi, %rdi
callq 0x121e
jmp 0x15f1
leaq 0x9fc(%rip), %rdi       # 0x2007
callq 0x1150
jmp 0x15f1
nop
// File: /workspace/github_c_makefile_star2_O1/w4kfu[P]HommI/Pal/pal.c
// Function: open_palette
unsigned char *open_palette(char *filename)
{
	FILE *fin = NULL;
	unsigned char *pal = NULL;

	if (!(fin = fopen(filename, "rb")))
	{
		perror("fopen()");
		return NULL;
	}
	pal = init_palette(fin);
	fclose(fin);
	return pal;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0xa65(%rip), %rsi       # 0x2084
callq 0x1140
testq %rax, %rax
je 0x164a
movq %rax, %rbx
movq %rax, %rdi
callq 0x165a
movq %rax, %r14
movq %rbx, %rdi
callq 0x1070
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x9b6(%rip), %rdi       # 0x2007
callq 0x1150
xorl %eax, %eax
jmp 0x1642
// File: /workspace/github_c_makefile_star2_O1/w4kfu[P]HommI/Pal/pal.c
// Function: init_palette
unsigned char *init_palette(FILE *fin)
{
	unsigned char *pal = NULL;
	unsigned int filesize;

	if (!(pal = malloc(sizeof (struct color) * 256)))
	{
		perror("malloc()");
		return NULL;
	}
        fseek(fin, 0, SEEK_END);
        filesize = ftell(fin);
        fseek(fin, 0, SEEK_SET);
	if (filesize != (256 * 3))
	{
		fprintf(stderr, "[-] Palette not handled\n");
		free(pal);
		return NULL;
	}
	if (fread(pal, 1, filesize, fin) != filesize)
	{
		perror("fread()");
		free(pal);
		return NULL;
	}
	return pal;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x300, %edi            # imm = 0x300
callq 0x1110
testq %rax, %rax
je 0x16c9
movq %rax, %rbx
movq %r14, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x1120
movq %r14, %rdi
callq 0x10d0
movq %rax, %r15
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1120
cmpl $0x300, %r15d           # imm = 0x300
jne 0x16d7
movl $0x1, %esi
movl $0x300, %edx            # imm = 0x300
movq %rbx, %rdi
movq %r14, %rcx
callq 0x1050
cmpq $0x300, %rax            # imm = 0x300
jne 0x16e1
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x9ce(%rip), %rdi       # 0x209e
callq 0x1150
jmp 0x16f5
movq %rbx, %rdi
callq 0x123c
jmp 0x16f5
leaq 0x9d8(%rip), %rdi       # 0x20c0
callq 0x1150
movq %rbx, %rdi
callq 0x1040
xorl %ebx, %ebx
jmp 0x16c0
// File: /workspace/github_c_makefile_star2_O1/w4kfu[P]HommI/Pal/pal.c
// Function: expand_palette
unsigned char *expand_palette(unsigned char *pal, unsigned square_width, unsigned square_height)
{
	unsigned char *newpal = NULL;
	unsigned char *spal = NULL;
	unsigned int i, j, k, l;

	if (!(newpal = malloc(sizeof (char) * 256 * 3 * square_width * square_height)))
	{
		perror("malloc()");
		return NULL;
	}
	spal = newpal;
	for (i = 0; i < 16; i++)
	{
		for (j = 0; j < square_height; j++)
		{
			for (k = 0; k < 16; k++)
			{
				struct color *rgb;
				rgb = (struct color*)&pal[(k + (i * 16)) * 3];
				for (l = 0; l < square_width; l++)
				{
					memcpy(newpal, rgb, sizeof (struct color));
					newpal += 3;
				}
			}
		}
	}
	return spal;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movl %esi, %eax
movl %edx, %ecx
imulq %rax, %rcx
shlq $0x8, %rcx
leaq (%rcx,%rcx,2), %rdi
callq 0x1110
testq %rax, %rax
je 0x177b
xorl %ecx, %ecx
movq %rax, %rdx
testl %ebx, %ebx
je 0x176d
movq %rcx, %rsi
shlq $0x4, %rsi
xorl %edi, %edi
xorl %r8d, %r8d
testl %ebp, %ebp
je 0x175e
leaq (%r8,%rsi), %r9
leaq (%r9,%r9,2), %r9
addq %r14, %r9
movl %ebp, %r10d
movb 0x2(%r9), %r11b
movb %r11b, 0x2(%rdx)
movzwl (%r9), %r11d
movw %r11w, (%rdx)
addq $0x3, %rdx
decl %r10d
jne 0x1745
incq %r8
cmpq $0x10, %r8
jne 0x1733
incl %edi
cmpl %ebx, %edi
jne 0x1730
incq %rcx
cmpq $0x10, %rcx
jne 0x1723
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x91c(%rip), %rdi       # 0x209e
callq 0x1150
xorl %eax, %eax
jmp 0x1776
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/s3/dns.c
// Function: callback_read_len
static int
callback_read_len(void * cookie, ssize_t readlen)
{
	struct dns_reader * DR = cookie;

	/* If we failed to read a size_t, something is seriously wrong. */
	if (readlen != sizeof(size_t))
		goto err1;

	/* Sanity-check. */
	if (DR->addrlen > SSIZE_MAX)
		goto err1;

	/* Allocate space to hold the address. */
	if ((DR->addr = malloc(DR->addrlen)) == NULL)
		goto err0;

	/* Read the address. */
	if ((DR->read_cookie = network_read(DR->s, DR->addr, DR->addrlen,
	    DR->addrlen, callback_read_addr, DR)) == NULL)
		goto err1;

	/* Success! */
	return (0);

err1:
	warnp("Error reading address via socket");
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpq $0x8, %rsi
jne 0x398b
movq %rdi, %rbx
movq 0x10(%rdi), %r14
testq %r14, %r14
js 0x398b
movq %r14, %rdi
callq 0x2330
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0x39bc
movl 0x8(%rbx), %edi
leaq 0x89(%rip), %r8         # 0x39f5
movq %rax, %rsi
movq %r14, %rdx
movq %r14, %rcx
movq %rbx, %r9
callq 0x78ac
movq %rax, %rcx
movq %rax, 0x20(%rbx)
xorl %eax, %eax
testq %rcx, %rcx
jne 0x39c1
callq 0x20a0
cmpl $0x0, (%rax)
je 0x39ae
movq %rax, %rbx
leaq 0xda1b(%rip), %rdi      # 0x113ba
xorl %eax, %eax
callq 0xa2f4
movl $0x0, (%rbx)
jmp 0x39bc
leaq 0xda05(%rip), %rdi      # 0x113ba
xorl %eax, %eax
callq 0xa413
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/s3/dns.c
// Function: callback_read_addr
static int
callback_read_addr(void * cookie, ssize_t readlen)
{
	struct dns_reader * DR = cookie;
	struct sock_addr * sa;

	/* If we failed to read, something is seriously wrong. */
	if (readlen != (ssize_t)DR->addrlen)
		goto err1;

	/* Parse the address. */
	if ((sa = sock_addr_deserialize(DR->addr, DR->addrlen)) == NULL)
		goto err0;

	/* Free the serialized address. */
	free(DR->addr);
	DR->addr = NULL;

	/* Add the address to the S3 request queue. */
	if (s3_request_queue_addaddr(DR->Q, sa, 600)) {
		warnp("Error adding S3 endpoint address");
		sock_addr_free(sa);
		goto err0;
	}

	/* Free the parsed address. */
	sock_addr_free(sa);

	/* Start reading another address. */
	if ((DR->read_cookie = network_read(DR->s, (uint8_t *)&DR->addrlen,
	    sizeof(size_t), sizeof(size_t), callback_read_len, DR)) == NULL)
		goto err1;

	/* Success! */
	return (0);

err1:
	warnp("Error reading address via socket");
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rax
movq 0x10(%rdi), %rsi
cmpq %rax, %rsi
jne 0x3aab
movq %rdi, %r15
movq 0x18(%rdi), %rdi
callq 0x9ff6
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x3af9
movq %rax, %r14
movq 0x18(%r15), %rdi
callq 0x2040
movq $0x0, 0x18(%r15)
movq (%r15), %rdi
movq %r14, %rsi
movl $0x258, %edx            # imm = 0x258
callq 0xb114
testl %eax, %eax
je 0x3a74
callq 0x20a0
cmpl $0x0, (%rax)
je 0x3ae3
movq %rax, %r15
leaq 0xd6fc(%rip), %rdi      # 0x11160
xorl %eax, %eax
callq 0xa2f4
movl $0x0, (%r15)
jmp 0x3af1
leaq 0x10(%r15), %rbx
movq %r14, %rdi
callq 0x9947
movl 0x8(%r15), %edi
leaq -0x150(%rip), %r8       # 0x393b
movl $0x8, %edx
movl $0x8, %ecx
movq %rbx, %rsi
movq %r15, %r9
callq 0x78ac
movq %rax, 0x20(%r15)
xorl %ebx, %ebx
testq %rax, %rax
jne 0x3af9
callq 0x20a0
cmpl $0x0, (%rax)
je 0x3ace
movq %rax, %rbx
leaq 0xd8fb(%rip), %rdi      # 0x113ba
xorl %eax, %eax
callq 0xa2f4
movl $0x0, (%rbx)
jmp 0x3adc
leaq 0xd8e5(%rip), %rdi      # 0x113ba
xorl %eax, %eax
callq 0xa413
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x3af9
leaq 0xd676(%rip), %rdi      # 0x11160
xorl %eax, %eax
callq 0xa413
movq %r14, %rdi
callq 0x9947
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/s3/dispatch.c
// Function: dispatch_accept
struct dispatch_state *
dispatch_accept(struct s3_request_queue * Q, int s)
{
	struct dispatch_state * D;

	/* Allocate space for dispatcher state. */
	if ((D = malloc(sizeof(struct dispatch_state))) == NULL)
		goto err0;

	/* Initialize dispatcher. */
	D->Q = Q;
	D->ip_head = D->ip_tail = NULL;

	/* Accept a connection. */
	D->accepting = 1;
	if (network_accept(s, callback_accept, D) == NULL)
		goto err1;

	/* Success! */
	return (D);

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

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
movl $0x38, %edi
callq 0x2330
testq %rax, %rax
je 0x3b4e
movq %rax, %rbx
movq %r14, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movl $0x1, 0x18(%rax)
leaq 0x21(%rip), %rsi        # 0x3b58
movl %ebp, %edi
movq %rax, %rdx
callq 0x73cc
testq %rax, %rax
jne 0x3b50
movq %rbx, %rdi
callq 0x2040
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/s3/dispatch.c
// Function: dispatch_done
int
dispatch_done(struct dispatch_state * D)
{

	/* Sanity check. */
	assert(D->accepting == 0);
	assert(D->read_cookie == NULL);
	assert(D->ip_head == NULL);
	assert(D->ip_tail == NULL);

	/* Free the buffered reader for the connection. */
	netbuf_read_free(D->readq);

	/* Free the buffered writer for the connection. */
	netbuf_write_free(D->writeq);

	/* Close the connection. */
	while (close(D->sconn)) {
		if (errno == EINTR)
			continue;
		warnp("close");
		goto err0;
	}

	/* Free allocated memory. */
	free(D);

	/* Success! */
	return (0);

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

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x0, 0x18(%rdi)
jne 0x3deb
movq %rdi, %rbx
cmpq $0x0, 0x30(%rdi)
jne 0x3e0a
cmpq $0x0, 0x8(%rbx)
jne 0x3e29
cmpq $0x0, 0x10(%rbx)
jne 0x3e48
movq 0x28(%rbx), %rdi
callq 0x6e60
movq 0x20(%rbx), %rdi
callq 0x724b
movl 0x1c(%rbx), %edi
callq 0x2200
testl %eax, %eax
je 0x3dc4
callq 0x20a0
movq %rax, %r14
movl (%rax), %eax
cmpl $0x4, %eax
je 0x3d95
leaq 0xd965(%rip), %rdi      # 0x1171c
testl %eax, %eax
jne 0x3dd0
xorl %eax, %eax
callq 0xa413
jmp 0x3dde
movq %rbx, %rdi
callq 0x2040
xorl %eax, %eax
jmp 0x3de3
xorl %eax, %eax
callq 0xa2f4
movl $0x0, (%r14)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0xd5e9(%rip), %rdi      # 0x113db
leaq 0xd5f4(%rip), %rsi      # 0x113ed
leaq 0xd5f8(%rip), %rcx      # 0x113f8
movl $0x1bc, %edx            # imm = 0x1BC
callq 0x21e0
leaq 0xd612(%rip), %rdi      # 0x11423
leaq 0xd5d5(%rip), %rsi      # 0x113ed
leaq 0xd5d9(%rip), %rcx      # 0x113f8
movl $0x1bd, %edx            # imm = 0x1BD
callq 0x21e0
leaq 0xd60a(%rip), %rdi      # 0x1143a
leaq 0xd5b6(%rip), %rsi      # 0x113ed
leaq 0xd5ba(%rip), %rcx      # 0x113f8
movl $0x1be, %edx            # imm = 0x1BE
callq 0x21e0
leaq 0xd5fe(%rip), %rdi      # 0x1144d
leaq 0xd597(%rip), %rsi      # 0x113ed
leaq 0xd59b(%rip), %rcx      # 0x113f8
movl $0x1bf, %edx            # imm = 0x1BF
callq 0x21e0
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/s3/dispatch.c
// Function: request_dequeue
static void
request_dequeue(struct dispatch_state * D, struct request * R)
{

	/* Sanity-check linked list. */
	assert(D == R->D);

	/* Free the contents of the kivaloo-S3 request structure. */
	proto_s3_request_free(&R->R);

	/* Free extra allocations in the S3 request structure. */
	free(R->path);
	free(R->range);

	/* Remove from the linked list. */
	if (D->ip_head == R) {
		assert(R->prev == NULL);
		D->ip_head = R->next;
	} else {
		assert(R->prev != NULL);
		R->prev->next = R->next;
	}
	if (D->ip_tail == R) {
		assert(R->next == NULL);
		D->ip_tail = R->prev;
	} else {
		assert(R->next != NULL);
		R->next->prev = R->prev;
	}

	/* Free the request structure. */
	free(R);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpq %rdi, (%rsi)
jne 0x4211
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x18(%rsi), %rdi
callq 0xae0e
movq 0x80(%rbx), %rdi
callq 0x2040
movq 0x88(%rbx), %rdi
callq 0x2040
movq 0x8(%rbx), %rax
cmpq %rbx, 0x8(%r14)
je 0x41c7
testq %rax, %rax
je 0x4230
movq 0x10(%rbx), %rcx
movq %rcx, 0x10(%rax)
jmp 0x41d8
testq %rax, %rax
jne 0x426e
movq 0x10(%rbx), %rax
movq %rax, 0x8(%r14)
movq 0x10(%rbx), %rax
cmpq %rbx, 0x10(%r14)
je 0x41f1
testq %rax, %rax
je 0x424f
movq 0x8(%rbx), %rcx
movq %rcx, 0x8(%rax)
jmp 0x4202
testq %rax, %rax
jne 0x428d
movq 0x8(%rbx), %rax
movq %rax, 0x10(%r14)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2040
leaq 0xd2ee(%rip), %rdi      # 0x11506
leaq 0xd1ce(%rip), %rsi      # 0x113ed
leaq 0xd2ea(%rip), %rcx      # 0x11510
movl $0x3e, %edx
callq 0x21e0
leaq 0xd329(%rip), %rdi      # 0x11560
leaq 0xd1af(%rip), %rsi      # 0x113ed
leaq 0xd2cb(%rip), %rcx      # 0x11510
movl $0x4c, %edx
callq 0x21e0
leaq 0xd32a(%rip), %rdi      # 0x11580
leaq 0xd190(%rip), %rsi      # 0x113ed
leaq 0xd2ac(%rip), %rcx      # 0x11510
movl $0x53, %edx
callq 0x21e0
leaq 0xd2db(%rip), %rdi      # 0x11550
leaq 0xd171(%rip), %rsi      # 0x113ed
leaq 0xd28d(%rip), %rcx      # 0x11510
movl $0x49, %edx
callq 0x21e0
leaq 0xd2dc(%rip), %rdi      # 0x11570
leaq 0xd152(%rip), %rsi      # 0x113ed
leaq 0xd26e(%rip), %rcx      # 0x11510
movl $0x50, %edx
callq 0x21e0
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/proto_s3/proto_s3_server.c
// Function: proto_s3_request_read
int
proto_s3_request_read(struct netbuf_read * R, struct proto_s3_request * req)
{
	struct wire_packet P;

	/* Try to grab a packet from the buffered reader. */
	if (wire_readpacket_peek(R, &P))
		goto err0;

	/* Do we have a packet? */
	if (P.buf == NULL)
		goto nopacket;

	/* Parse this packet. */
	if (proto_s3_request_parse(&P, req))
		goto err0;

	/* Consume the packet. */
	wire_readpacket_consume(R, &P);

	/* Success! */
	return (0);

nopacket:
	/* Record that no request was available. */
	req->type = PROTO_S3_NONE;

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %rsi
callq 0xb88c
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0xadfd
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0xad0e
movq $0x0, (%rsp)
movq 0x8(%rsp), %rax
movq %rax, (%r14)
movq 0x10(%rsp), %rsi
cmpq $0x4, %rsi
jb 0xadfd
movl (%rdi), %eax
bswapl %eax
movl %eax, 0x8(%r14)
movq %rsp, %rdx
movq $0x4, (%rdx)
callq 0xaf9f
movq %rax, 0x10(%r14)
testq %rax, %rax
je 0xadfd
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdi
movq %rsp, %rdx
callq 0xaf9f
movq %rax, 0x18(%r14)
testq %rax, %rax
je 0xadf4
movq %rax, %r15
movl 0x8(%r14), %eax
cmpl $0x10010, %eax          # imm = 0x10010
jle 0xad1d
cmpl $0x10011, %eax          # imm = 0x10011
je 0xad55
cmpl $0x10020, %eax          # imm = 0x10020
je 0xacfa
cmpl $0x10030, %eax          # imm = 0x10030
jne 0xadec
movq 0x10(%rsp), %rax
cmpq (%rsp), %rax
je 0xadda
jmp 0xadec
movl $0xffffffff, 0x8(%r14)  # imm = 0xFFFFFFFF
xorl %ebp, %ebp
jmp 0xadfd
cmpl $0x10000, %eax          # imm = 0x10000
je 0xad82
cmpl $0x10010, %eax          # imm = 0x10010
jne 0xadec
movq (%rsp), %rax
leaq 0x4(%rax), %rcx
cmpq %rcx, 0x10(%rsp)
jne 0xadec
movq 0x18(%rsp), %rcx
movl (%rcx,%rax), %eax
bswapl %eax
movl %eax, 0x20(%r14)
jmp 0xadda
movq (%rsp), %rax
leaq 0x8(%rax), %rcx
cmpq %rcx, 0x10(%rsp)
jne 0xadec
movq 0x18(%rsp), %rcx
movl (%rcx,%rax), %edx
bswapl %edx
movl %edx, 0x20(%r14)
movl 0x4(%rcx,%rax), %eax
bswapl %eax
movl %eax, 0x24(%r14)
jmp 0xadda
movq 0x10(%rsp), %rax
movq (%rsp), %rcx
leaq 0x4(%rcx), %r13
cmpq %r13, %rax
jb 0xadec
movq 0x18(%rsp), %rdx
movl (%rdx,%rcx), %r12d
bswapl %r12d
movl %r12d, 0x20(%r14)
movq %r13, (%rsp)
leaq (%r12,%r13), %rcx
cmpq %rcx, %rax
jne 0xadec
movq %r12, %rdi
movq %rdx, 0x20(%rsp)
callq 0x2330
movq 0x20(%rsp), %rsi
movq %rax, 0x28(%r14)
testq %rax, %rax
je 0xadec
addq %r13, %rsi
movq %rax, %rdi
movq %r12, %rdx
callq 0x22e0
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xbd34
jmp 0xad16
movq %r15, %rdi
callq 0x2040
movq 0x10(%r14), %rdi
callq 0x2040
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq