LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/chatziko-k08[P]lecture-code/programs/cat/../../modules/UsingDynamicArray/ADTVector.c
// Function: vector_find
Pointer vector_find(Vector vec, Pointer value, CompareFunc compare) {
	// Διάσχιση του vector
	for (int i = 0; i < vec->size; i++)
		if (compare(vec->array[i].value, value) == 0)
			return vec->array[i].value;		// βρέθηκε

	return NULL;				// δεν υπάρχει
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cmpl $0x0, 0x8(%rdi)
jle 0x4888
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
xorl %ebx, %ebx
xorl %r13d, %r13d
movq (%r15), %rax
movq (%rax,%r13,8), %rdi
movq %r12, %rsi
callq *%r14
testl %eax, %eax
je 0x488c
incq %r13
movslq 0x8(%r15), %rax
cmpq %rax, %r13
jl 0x4869
jmp 0x4893
xorl %ebx, %ebx
jmp 0x4893
movq (%r15), %rax
movq (%rax,%r13,8), %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/chatziko-k08[P]lecture-code/programs/cat/../../modules/UsingDynamicArray/ADTVector.c
// Function: vector_destroy
void vector_destroy(Vector vec) {
	// Αν υπάρχει συνάρτηση destroy_value, την καλούμε για όλα τα στοιχεία
	if (vec->destroy_value != NULL)
		for (int i = 0; i < vec->size; i++)
			vec->destroy_value(vec->array[i].value);

	// Πρέπει να κάνουμε free τόσο τον πίνακα όσο και το struct!
	free(vec->array);
	free(vec);			// τελευταίο το vec!
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x10(%rdi)
je 0x48d6
cmpl $0x0, 0x8(%rbx)
jle 0x48d6
xorl %r14d, %r14d
movq (%rbx), %rax
movq (%rax,%r14,8), %rdi
callq *0x10(%rbx)
incq %r14
movslq 0x8(%rbx), %rax
cmpq %rax, %r14
jl 0x48c0
movq (%rbx), %rdi
callq 0x22a0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x22a0
// File: /workspace/github_c_makefile_star2_O3/chatziko-k08[P]lecture-code/programs/cat/../../modules/UsingDynamicArray/ADTVector.c
// Function: vector_find_node
VectorNode vector_find_node(Vector vec, Pointer value, CompareFunc compare) {
	// Διάσχιση του vector
	for (int i = 0; i < vec->size; i++)
		if (compare(vec->array[i].value, value) == 0)
			return &vec->array[i];		// βρέθηκε

	return VECTOR_EOF;				// δεν υπάρχει
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x0, 0x8(%rdi)
jle 0x4985
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
xorl %ebx, %ebx
xorl %r13d, %r13d
xorl %ebp, %ebp
movq (%r14), %rax
movq (%rax,%r13), %rdi
movq %r12, %rsi
callq *%r15
testl %eax, %eax
je 0x4989
incq %rbp
movslq 0x8(%r14), %rax
addq $0x8, %r13
cmpq %rax, %rbp
jl 0x4962
jmp 0x498f
xorl %ebx, %ebx
jmp 0x498f
addq (%r14), %r13
movq %r13, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/martintopholm[P]xping/xping.c
// Function: target_mark
void
target_mark(struct target *t, int seq, int ch)
{
	if (ch == '.' && t->res[seq % NUM] != ' ')
		t->res[seq % NUM] = ':';
	else
		t->res[seq % NUM] = ch;
	if (a_flag && ch == '.') {
		if (a_flag == 1)
			bell();
		else if (a_flag >=2 && t->npkts >= 4 &&
		    t->res[(seq-3) % NUM] != '.' &&
		    t->res[(seq-2) % NUM] != '.' &&
		    t->res[(seq-1) % NUM] == '.' &&
		    t->res[(seq-0) % NUM] == '.')
			bell();
	}

	if (seq == t->npkts - 1)
		ui_update(t);
	else
		ui_update(NULL); /* this is a late reply, need full update to redraw this */
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
movslq %esi, %rax
cmpl $0x2e, %edx
jne 0x2639
imulq $0x1b4e81b5, %rax, %rax # imm = 0x1B4E81B5
movq %rax, %rcx
shrq $0x3f, %rcx
shrq $0x20, %rax
sarl $0x5, %eax
addl %ecx, %eax
imull $0x12c, %eax, %eax      # imm = 0x12C
movl %r14d, %ecx
subl %eax, %ecx
movslq %ecx, %rax
cmpb $0x20, 0x44(%rbx,%rax)
je 0x2657
movb $0x3a, 0x44(%rbx,%rax)
jmp 0x265b
imulq $0x1b4e81b5, %rax, %rcx # imm = 0x1B4E81B5
movq %rcx, %rsi
shrq $0x3f, %rsi
sarq $0x25, %rcx
addl %esi, %ecx
imull $0x12c, %ecx, %ecx      # imm = 0x12C
subl %ecx, %eax
cltq
movb %dl, 0x44(%rbx,%rax)
cmpl $0x2e, %edx
setne %cl
movl 0x4be1(%rip), %eax      # 0x7248
testl %eax, %eax
sete %dl
orb %cl, %dl
jne 0x2759
cmpl $0x1, %eax
jne 0x2694
leaq 0x2a7b(%rip), %rsi      # 0x50fb
movl $0x1, %edx
movl $0x1, %edi
callq 0x2080
jmp 0x2759
jle 0x2759
cmpl $0x4, 0x40(%rbx)
jl 0x2759
leal -0x3(%r14), %eax
cltq
imulq $0x1b4e81b5, %rax, %rcx # imm = 0x1B4E81B5
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x25, %rcx
addl %edx, %ecx
imull $0x12c, %ecx, %ecx      # imm = 0x12C
subl %ecx, %eax
cltq
cmpb $0x2e, 0x44(%rbx,%rax)
je 0x2759
leal -0x2(%r14), %eax
cltq
imulq $0x1b4e81b5, %rax, %rcx # imm = 0x1B4E81B5
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x25, %rcx
addl %edx, %ecx
imull $0x12c, %ecx, %ecx      # imm = 0x12C
subl %ecx, %eax
cltq
cmpb $0x2e, 0x44(%rbx,%rax)
je 0x2759
leal -0x1(%r14), %eax
cltq
imulq $0x1b4e81b5, %rax, %rcx # imm = 0x1B4E81B5
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x25, %rcx
addl %edx, %ecx
imull $0x12c, %ecx, %ecx      # imm = 0x12C
subl %ecx, %eax
cltq
cmpb $0x2e, 0x44(%rbx,%rax)
jne 0x2759
movslq %r14d, %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 %r14d, %ecx
subl %eax, %ecx
movslq %ecx, %rax
cmpb $0x2e, 0x44(%rbx,%rax)
je 0x2679
movl 0x40(%rbx), %ecx
decl %ecx
movq 0x4ac3(%rip), %rax      # 0x7228
cmpl %r14d, %ecx
jne 0x276f
movq %rbx, %rdi
jmp 0x2771
xorl %edi, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O3/martintopholm[P]xping/xping.c
// Function: usage
void
usage(const char *whine)
{
	if (whine != NULL) {
		fprintf(stderr, "%s\n", whine);
	}
	fprintf(stderr,
	    "usage: xping [-46ABCTVah] [-c count] [-i interval] [-w width] "
	    "host [host [...]]\n"
	    "\n");
	exit(EX_USAGE);
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x27a9
movq %rdi, %rdx
movq 0x4840(%rip), %rax      # 0x6fd8
movq (%rax), %rdi
leaq 0x2937(%rip), %rsi      # 0x50d9
xorl %eax, %eax
callq 0x2310
movq 0x4828(%rip), %rax      # 0x6fd8
movq (%rax), %rcx
leaq 0x287a(%rip), %rdi      # 0x5034
movl $0x51, %esi
movl $0x1, %edx
callq 0x23e0
movl $0x40, %edi
callq 0x2260
// File: /workspace/github_c_makefile_star2_O3/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 0x2d8b
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 0x454e(%rip), %rax      # 0x7270
testq %rax, %rax
je 0x2d44
movq 0x190(%rax), %rcx
addq $0x190, %rax            # imm = 0x190
movq %rcx, 0x190(%r14)
movq %r14, 0x198(%rcx)
jmp 0x2d54
movq %r14, 0x4525(%rip)      # 0x7270
movq %r14, %rax
addq $0x190, %rax            # imm = 0x190
movq %r14, (%rax)
movq $0x0, 0x198(%r14)
movq %r15, %rdi
movq %r14, %rsi
callq 0x308f
movq %rax, 0x178(%r14)
testq %rax, %rax
je 0x2d83
incl 0x44e9(%rip)            # 0x7268
xorl %ebx, %ebx
jmp 0x2d8b
movq %r14, %rdi
callq 0x2250
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x44d2(%rip), %rbx      # 0x7270
testq %rbx, %rbx
je 0x2dd2
movq 0x180(%rbx), %rdi
movq 0x198(%rbx), %r14
callq 0x2380
movq 0x178(%rbx), %rdi
callq 0x3357
movq %rbx, %rdi
callq 0x2250
movq %r14, %rbx
testq %r14, %r14
jne 0x2da3
xorl %eax, %eax
callq 0x3083
movq 0x44c0(%rip), %rdi      # 0x72a0
xorl %esi, %esi
callq 0x2340
movq 0x448a(%rip), %rdi      # 0x7278
callq 0x22e0
movl 0x4487(%rip), %edi      # 0x7280
callq 0x23f0
movl 0x4484(%rip), %edi      # 0x7288
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x23f0
// File: /workspace/github_c_makefile_star2_O3/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 0x4451(%rip), %rdi      # 0x7278
leaq 0x30(%rip), %rcx        # 0x2e5e
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0x10, %edx
movq %rbx, %r8
callq 0x2180
movq %rax, 0x180(%rbx)
leaq 0x4442(%rip), %rsi      # 0x7290
movq %rax, %rdi
callq 0x20b0
xorl %esi, %esi
movq %rbx, %rdx
popq %rbx
jmp 0x2e5e
// File: /workspace/github_c_makefile_star2_O3/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 0x41f4(%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, 0x425f(%rip)      # 0x72a8
imull $0x3e8, %ecx, %ecx      # imm = 0x3E8
subl %ecx, %eax
imull $0x3e8, %eax, %eax      # imm = 0x3E8
cltq
movq %rax, 0x4250(%rip)      # 0x72b0
leaq 0x4251(%rip), %rdi      # 0x72b8
leaq 0x21b2(%rip), %rsi      # 0x5220
movl $0x5, %edx
callq 0x2220
testl %eax, %eax
jne 0x307e
popq %rax
retq
callq 0x2490
// File: /workspace/github_c_makefile_star2_O3/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 0x3348
cmpl $0x2, %esi
je 0x3338
cmpl $0xa, %esi
jne 0x334b
movw $0xa, 0x44(%rax)
movups (%rdx), %xmm0
movups %xmm0, 0x4c(%rax)
jmp 0x3343
movw $0x2, 0x44(%rax)
movl (%rdx), %ecx
movl %ecx, 0x48(%rax)
movl $0x1, %ecx
movl %ecx, 0x40(%rax)
movq 0xb0(%rax), %rdi
jmp 0x277a
// File: /workspace/github_c_makefile_star2_O3/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 0x337b
movq 0x30(%rdi), %r14
callq 0x339b
movq %r14, %rdi
testq %r14, %r14
jne 0x336a
movq 0xa8(%rbx), %rdi
testq %rdi, %rdi
je 0x338c
callq 0x4238
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2250
// File: /workspace/github_c_makefile_star2_O3/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 0x33ad
callq 0x2250
movq (%rbx), %rax
movq 0xa0(%rax), %rcx
cmpq %rbx, %rcx
je 0x33db
movq %rcx, %rax
movq 0x30(%rcx), %rcx
testq %rcx, %rcx
je 0x33cd
cmpq %rbx, %rcx
jne 0x33bc
testq %rcx, %rcx
je 0x33e8
addq $0x30, %rax
movq %rbx, %rcx
jmp 0x33e1
addq $0xa0, %rax
movq 0x30(%rcx), %rcx
movq %rcx, (%rax)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x33f6
callq 0x2380
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x3412
movl $0x6, %esi
callq 0x2330
movq 0x10(%rbx), %rdi
callq 0x2060
movq %rbx, %rdi
popq %rbx
jmp 0x2250
// File: /workspace/github_c_makefile_star2_O3/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 0x3673
movq %rax, 0x20(%rbx)
leaq 0x1cc5(%rip), %rsi      # 0x52f2
movq %rsp, %r15
movq %r15, %rdi
callq 0x20f0
cmpq $0x0, (%r15)
je 0x3683
leaq 0x1cad(%rip), %rsi      # 0x52f2
movq %rsp, %r15
movq %r15, %rdi
callq 0x20f0
cmpq $0x0, (%r15)
je 0x3683
movq %rax, %rdi
callq 0x2350
addl $0xffffff38, %eax       # imm = 0xFFFFFF38
cmpl $0xc7, %eax
ja 0x368d
movl $0x1, 0x28(%rbx)
jmp 0x36a4
movq %r15, %rdi
callq 0x21c0
cmpq $0x801, %rax            # imm = 0x801
jb 0x36de
movq %rbx, %rdi
callq 0x339b
jmp 0x36de
movq (%rbx), %rax
movq 0xb0(%rax), %rdi
movl 0x8(%rbx), %esi
movl $0x25, %edx
callq 0x25f4
movq 0x10(%rbx), %rdi
leaq 0x121(%rip), %rsi       # 0x37d0
leaq 0x32(%rip), %rcx        # 0x36e8
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_O3/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 0x379d
leaq 0x19f5(%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 0x3793
movl $0x2e, %edx
jmp 0x3798
movq (%rbx), %rax
movq 0xb0(%rax), %rdi
movl 0x8(%rbx), %esi
movl $0x3f, %edx
jmp 0x3798
movl $0x6, %esi
callq 0x2330
movq (%rbx), %rax
movq 0xb0(%rax), %rdi
movl 0x8(%rbx), %esi
movl $0x23, %edx
jmp 0x3798
movq 0x10(%rbx), %rdi
callq 0x2070
movq (%rbx), %rcx
leaq 0x60(%rcx), %rdx
leaq 0x1b73(%rip), %rsi      # 0x52f4
leaq 0x1c9a(%rip), %r8       # 0x5422
movq %rax, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x2100
movl $0x25, %edx
callq 0x25f4
movq %rbx, %rdi
popq %rbx
jmp 0x339b
// File: /workspace/github_c_makefile_star2_O3/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 0x382a
movzwl %ax, %ebx
jmp 0x384a
leaq 0x1b37(%rip), %rdi      # 0x5368
callq 0x2270
testq %rax, %rax
je 0x384a
cmpb $0x0, (%rax)
je 0x384a
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_O3/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 0x388d
movzwl %ax, %ebx
jmp 0x38ad
leaq 0x1adc(%rip), %rdi      # 0x5370
callq 0x2270
testq %rax, %rax
je 0x38ad
cmpb $0x0, (%rax)
je 0x38ad
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_O3/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 0x36ea(%rip), %r14      # 0x6fb0
movq (%r14), %rdi
leaq 0x1aa5(%rip), %rsi      # 0x5375
movl $0x1b, %edx
xorl %eax, %eax
callq 0x2310
testl %ebx, %ebx
jle 0x38f8
movq (%r14), %rdi
leaq 0x1a90(%rip), %rsi      # 0x537a
movl $0x1b, %edx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x2310
testl %ebp, %ebp
jle 0x3914
movq (%r14), %rdi
leaq 0x1a7b(%rip), %rsi      # 0x5381
movl $0x1b, %edx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x2310
movl %ebx, 0x39de(%rip)      # 0x72f8
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x39d2(%rip), %ecx      # 0x72f8
testl %ecx, %ecx
jle 0x3947
movq 0x367f(%rip), %rax      # 0x6fb0
movq (%rax), %rdi
leaq 0x1a4d(%rip), %rsi      # 0x5388
movl $0x1b, %edx
xorl %eax, %eax
callq 0x2310
movq 0x3662(%rip), %rbx      # 0x6fb0
movq (%rbx), %rdi
leaq 0x1a38(%rip), %rsi      # 0x5390
movl $0x1b, %edx
xorl %eax, %eax
callq 0x2310
movl $0x0, 0x398a(%rip)      # 0x72f8
movq (%rbx), %rdi
leaq 0x1a1e(%rip), %rsi      # 0x5396
movl $0x1b, %edx
xorl %eax, %eax
callq 0x2310
movq (%rbx), %rdi
leaq 0x1a15(%rip), %rsi      # 0x53a3
movl $0x1b, %edx
xorl %eax, %eax
callq 0x2310
xorl %edi, %edi
popq %rbx
jmp 0x39a2
// File: /workspace/github_c_makefile_star2_O3/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 0x341b(%rip), %rax      # 0x7254
cmpl $0x0, (%rax)
je 0x3e64
cmpl $0x2d, %edi
jg 0x3e73
leal -0x21(%rdi), %eax
cmpl $0x4, %eax
ja 0x3ec2
leaq 0x1502(%rip), %rcx      # 0x5354
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1584(%rip), %rsi      # 0x53e6
jmp 0x3ec9
movq 0x3145(%rip), %rax      # 0x6fb0
movq (%rax), %rsi
jmp 0x22a0
cmpl $0x3e, %edi
jg 0x3e8b
cmpl $0x2e, %edi
je 0x3eb9
cmpl $0x3a, %edi
jne 0x3ec2
leaq 0x153d(%rip), %rsi      # 0x53c6
jmp 0x3ec9
cmpl $0x3f, %edi
je 0x3e9e
cmpl $0x40, %edi
jne 0x3ec2
leaq 0x1542(%rip), %rsi      # 0x53de
jmp 0x3ec9
leaq 0x1529(%rip), %rsi      # 0x53ce
jmp 0x3ec9
leaq 0x1528(%rip), %rsi      # 0x53d6
jmp 0x3ec9
leaq 0x1537(%rip), %rsi      # 0x53ee
jmp 0x3ec9
leaq 0x14fe(%rip), %rsi      # 0x53be
jmp 0x3ec9
leaq 0x1233(%rip), %rsi      # 0x50fc
movl %edi, %edx
xorl %eax, %eax
jmp 0x3ecf
// File: /workspace/github_c_makefile_star2_O3/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 0x3fdf
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 0x38b7
movq 0x2fc3(%rip), %r15      # 0x6fb0
movq (%r15), %rdi
leaq 0x13c2(%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_O3/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 0x3220(%rip), %rax      # 0x7270
movq (%rax), %rbx
testq %rbx, %rbx
je 0x4125
movl 0x40(%rbx), %ebp
movl $0x12c, %eax            # imm = 0x12C
cmpl %eax, %ebp
cmovll %ebp, %eax
movl %ebp, %r14d
subl %eax, %r14d
xorl %eax, %eax
cmpl $0x12d, %ebp            # imm = 0x12D
cmovll %eax, %r14d
movq 0x2f2e(%rip), %r12      # 0x6fb0
leaq 0x3193(%rip), %r13      # 0x721c
movq (%r12), %rdi
movl (%r13), %ecx
leaq 0x1384(%rip), %rsi      # 0x541c
movl %ecx, %edx
movq %rbx, %r8
xorl %eax, %eax
callq 0x2310
cmpl $0x0, (%r13)
je 0x40b9
movq (%r12), %rsi
movl $0x20, %edi
callq 0x22a0
cmpl %ebp, %r14d
jge 0x4107
movl %r14d, %r15d
movl $0x20, %edi
cmpl 0x40(%rbx), %r15d
jge 0x40f6
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 0x40c1
movq (%r12), %rsi
movl $0xa, %edi
callq 0x22a0
movq 0x198(%rbx), %rbx
testq %rbx, %rbx
jne 0x4089
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x41cf
movq %rax, %rbx
movq %r12, %rdi
callq 0x20c0
incq %rax
cmpq $0x41, %rax
jae 0x41e0
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x3f, %edx
movq %r12, %rsi
callq 0x2130
movq %r15, (%rbx)
movq %r14, 0x8(%rbx)
leaq 0x30e6(%rip), %rax      # 0x7278
movq (%rax), %rdi
leaq 0x63(%rip), %rcx        # 0x41ff
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
movq %rbx, %r8
callq 0x2180
movq %rax, 0x50(%rbx)
testq %rax, %rax
je 0x41c7
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
movq %rax, %rdi
callq 0x20b0
jmp 0x41d1
movq %rbx, %rdi
callq 0x2250
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x1242(%rip), %rdi      # 0x5429
leaq 0x1266(%rip), %rsi      # 0x5454
leaq 0x1269(%rip), %rcx      # 0x545e
movl $0x85, %edx
callq 0x2110
// File: /workspace/github_c_makefile_star2_O3/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 0x3057(%rip), %rax      # 0x7260
leaq 0x10(%rdx), %rsi
cmpl $0x0, (%rax)
leaq 0x3089(%rip), %rax      # 0x72a0
movq (%rax), %rdi
je 0x422a
leaq 0xe3(%rip), %rcx        # 0x4306
xorl %edx, %edx
jmp 0x2290
leaq 0x1d(%rip), %rcx        # 0x424e
xorl %edx, %edx
jmp 0x2190
// File: /workspace/github_c_makefile_star2_O3/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 0x42a7
movq 0x8(%rbx), %rdx
movl $0xa, %edi
movq %r8, %rsi
callq *(%rbx)
leaq 0x2fe0(%rip), %rax      # 0x725c
cmpl $0x0, (%rax)
je 0x42da
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 0x42da
leaq 0x2fb6(%rip), %rax      # 0x7264
cmpl $0x0, (%rax)
je 0x42e1
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 0x2fb8(%rip), %rax      # 0x72a0
movq (%rax), %rdi
leaq 0x10(%rbx), %rsi
leaq 0x10(%rip), %rcx        # 0x4306
xorl %edx, %edx
movq %rbx, %r8
addq $0x18, %rsp
popq %rbx
popq %rbp
jmp 0x2290
// File: /workspace/github_c_makefile_star2_O3/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 0x435f
movl $0x2, %edi
movq %r8, %rsi
callq *%rax
leaq 0x2f23(%rip), %rax      # 0x725c
cmpl $0x0, (%rax)
je 0x4382
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 0x437d
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_O3/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 0x2133
movaps 0x21f3(%rip), %xmm0     # 0x4320
movups %xmm0, 0x1c(%rax)
jmp 0x216c
testl %ebp, %ebp
jle 0x21b1
movl %ebp, %edx
shll $0x10, %edx
addl $0xffff0000, %edx       # imm = 0xFFFF0000
orl $0xe000000, %edx        # imm = 0xE000000
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movl %ebp, %ecx
shll %cl, %edi
cmpl $0x21, %ebp
notl %edi
cmovael %esi, %edi
movl %edx, 0x1c(%rax)
movq $0x0, 0x20(%rax)
movl %edi, 0x28(%rax)
testl %ebx, %ebx
jle 0x21a8
movq %rax, %rcx
addq $0x2c, %rcx
shll $0x10, %ebx
addl $0xffff0000, %ebx       # imm = 0xFFFF0000
orl %ebp, %ebx
movl $0x38, %edx
movl $0x34, %esi
movl $0x30, %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
testl %ebx, %ebx
jle 0x21a8
movq %rax, %rcx
addq $0x1c, %rcx
shll $0x10, %ebx
addl $0xffff0000, %ebx       # imm = 0xFFFF0000
movl $0x28, %edx
movl $0x24, %esi
movl $0x20, %edi
jmp 0x2191
// File: /workspace/github_c_makefile_star2_O3/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 0x229b
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 0x22fe
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 0x18b3
addq $0x10, %rsp
incl %r12d
addl $-0x8, %ebp
movl %r14d, %eax
addl %r12d, %eax
jne 0x2257
jmp 0x22fe
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 0x18b3
addq $0x10, %rsp
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x1e1a(%rip), %r13      # 0x5aee
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 0x3d28
testb $0x1, %r15b
leaq 0x211c(%rip), %rsi      # 0x5e1a
cmovneq %r13, %rsi
movq 0x10(%rsp), %rdx
cmovneq %r13, %rdx
xorl %r15d, %r15d
leaq 0x20f9(%rip), %rdi      # 0x5e0e
movl 0xc(%rsp), %ecx
movq %r13, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x1050
jmp 0x3d5f
testl %ebp, %ebx
je 0x3d5f
testb $0x1, %r15b
leaq 0x20e3(%rip), %rsi      # 0x5e1a
cmovneq %r13, %rsi
movq 0x10(%rsp), %rdx
cmovneq %r13, %rdx
xorl %r15d, %r15d
leaq 0x20ce(%rip), %rdi      # 0x5e1c
movl 0xc(%rsp), %ecx
movq %r13, %r8
movl %ebx, %r9d
xorl %eax, %eax
callq 0x1050
incl %r12d
cmpl $0x20, %r12d
jne 0x3cd4
testb $0x1, %r15b
je 0x3d81
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1f99(%rip), %rdi      # 0x5d21
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_O3/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 0x15fd
movq 0x8(%rsi), %rdi
leaq 0xaed(%rip), %rsi       # 0x2084
callq 0x1140
testq %rax, %rax
je 0x1607
movq %rax, %rbx
movq %rax, %rdi
callq 0x165e
testq %rax, %rax
je 0x15ec
movq %rax, %rdi
movl $0x20, %esi
movl $0x20, %edx
callq 0x16fd
xorl %ebx, %ebx
testq %rax, %rax
je 0x15f9
leaq 0xab6(%rip), %rdi       # 0x2087
leaq 0xac2(%rip), %r8        # 0x209a
movl $0x200, %esi            # imm = 0x200
movl $0x200, %edx            # imm = 0x200
movq %rax, %rcx
callq 0x1366
jmp 0x15f9
movq %rbx, %rdi
callq 0x1070
movl $0x1, %ebx
movl %ebx, %eax
popq %rbx
retq
movq %rsi, %rdi
callq 0x121e
jmp 0x15f4
leaq 0x9f9(%rip), %rdi       # 0x2007
callq 0x1150
jmp 0x15f4
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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 0xa61(%rip), %rsi       # 0x2084
callq 0x1140
testq %rax, %rax
je 0x164e
movq %rax, %rbx
movq %rax, %rdi
callq 0x165e
movq %rax, %r14
movq %rbx, %rdi
callq 0x1070
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x9b2(%rip), %rdi       # 0x2007
callq 0x1150
xorl %eax, %eax
jmp 0x1646
// File: /workspace/github_c_makefile_star2_O3/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 0x16cd
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 0x16db
movl $0x1, %esi
movl $0x300, %edx            # imm = 0x300
movq %rbx, %rdi
movq %r14, %rcx
callq 0x1050
cmpq $0x300, %rax            # imm = 0x300
jne 0x16e5
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x9ca(%rip), %rdi       # 0x209e
callq 0x1150
jmp 0x16f9
movq %rbx, %rdi
callq 0x123c
jmp 0x16f9
leaq 0x9d4(%rip), %rdi       # 0x20c0
callq 0x1150
movq %rbx, %rdi
callq 0x1040
xorl %ebx, %ebx
jmp 0x16c4
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
pushq %rax
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
movq %rax, %r15
testq %rax, %rax
je 0x178d
xorl %eax, %eax
movq %r15, %rcx
testl %ebx, %ebx
je 0x1776
movq %rax, %rdx
shlq $0x4, %rdx
xorl %esi, %esi
xorl %edi, %edi
testl %ebp, %ebp
je 0x1767
leaq (%rdi,%rdx), %r8
leaq (%r8,%r8,2), %r8
addq %r14, %r8
movl %ebp, %r9d
movb 0x2(%r8), %r10b
movb %r10b, 0x2(%rcx)
movzwl (%r8), %r10d
movw %r10w, (%rcx)
addq $0x3, %rcx
decl %r9d
jne 0x174e
incq %rdi
cmpq $0x10, %rdi
jne 0x173c
incl %esi
cmpl %ebx, %esi
jne 0x173a
incq %rax
cmpq $0x10, %rax
jne 0x172d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x90a(%rip), %rdi       # 0x209e
callq 0x1150
jmp 0x177f
// File: /workspace/github_c_makefile_star2_O3/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 0x3953
movq %rdi, %rbx
movq 0x10(%rdi), %r14
testq %r14, %r14
js 0x3953
movq %r14, %rdi
callq 0x2330
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0x3984
movl 0x8(%rbx), %edi
leaq 0x89(%rip), %r8         # 0x39bd
movq %rax, %rsi
movq %r14, %rdx
movq %r14, %rcx
movq %rbx, %r9
callq 0x7868
movq %rax, %rcx
movq %rax, 0x20(%rbx)
xorl %eax, %eax
testq %rcx, %rcx
jne 0x3989
callq 0x20a0
cmpl $0x0, (%rax)
je 0x3976
movq %rax, %rbx
leaq 0xd9df(%rip), %rdi      # 0x11346
xorl %eax, %eax
callq 0xa33c
movl $0x0, (%rbx)
jmp 0x3984
leaq 0xd9c9(%rip), %rdi      # 0x11346
xorl %eax, %eax
callq 0xa45b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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
cmpq %rsi, 0x10(%rdi)
jne 0x3a6d
movq %rdi, %r15
movq 0x18(%rdi), %rdi
callq 0xa044
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x3abb
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 0xb150
testl %eax, %eax
je 0x3a36
callq 0x20a0
cmpl $0x0, (%rax)
je 0x3aa5
movq %rax, %r15
leaq 0xd73a(%rip), %rdi      # 0x11160
xorl %eax, %eax
callq 0xa33c
movl $0x0, (%r15)
jmp 0x3ab3
leaq 0x10(%r15), %rbx
movq %r14, %rdi
callq 0x99ae
movl 0x8(%r15), %edi
leaq -0x14a(%rip), %r8       # 0x3903
movl $0x8, %edx
movl $0x8, %ecx
movq %rbx, %rsi
movq %r15, %r9
callq 0x7868
movq %rax, 0x20(%r15)
xorl %ebx, %ebx
testq %rax, %rax
jne 0x3abb
callq 0x20a0
cmpl $0x0, (%rax)
je 0x3a90
movq %rax, %rbx
leaq 0xd8c5(%rip), %rdi      # 0x11346
xorl %eax, %eax
callq 0xa33c
movl $0x0, (%rbx)
jmp 0x3a9e
leaq 0xd8af(%rip), %rdi      # 0x11346
xorl %eax, %eax
callq 0xa45b
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x3abb
leaq 0xd6b4(%rip), %rdi      # 0x11160
xorl %eax, %eax
callq 0xa45b
movq %r14, %rdi
callq 0x99ae
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x3b0e
movq %rax, %rbx
movq %r14, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movl $0x1, 0x18(%rax)
leaq 0x21(%rip), %rsi        # 0x3b18
movl %ebp, %edi
movq %rax, %rdx
callq 0x7394
testq %rax, %rax
jne 0x3b10
movq %rbx, %rdi
callq 0x2040
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq