LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/tudurom[P]windowchef/client.c
// Function: fn_position
static bool
fn_position(uint32_t *data, int argc, char **argv)
{
	char *pos = argv[0];
	enum position snap_pos;

	if (strcasecmp(pos, "topleft") == 0)
		snap_pos = TOP_LEFT;
	else if (strcasecmp(pos, "topright") == 0)
		snap_pos = TOP_RIGHT;
	else if (strcasecmp(pos, "bottomleft") == 0)
		snap_pos = BOTTOM_LEFT;
	else if (strcasecmp(pos, "bottomright") == 0)
		snap_pos = BOTTOM_RIGHT;
	else if (strcasecmp(pos, "middle") == 0 ||
			strcasecmp(pos, "center") == 0 ||
			strcasecmp(pos, "centre") == 0)
		snap_pos = CENTER;
	else if (strcasecmp(pos, "left") == 0)
		snap_pos = LEFT;
	else if (strcasecmp(pos, "bottom") == 0)
		snap_pos = BOTTOM;
	else if (strcasecmp(pos, "top") == 0)
		snap_pos = TOP;
	else if (strcasecmp(pos, "right") == 0)
		snap_pos = RIGHT;
	else if (strcasecmp(pos, "all") == 0)
		snap_pos = ALL;
	else
		return false;

	(void)(argc);
	data[0] = snap_pos;

	return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdx), %r14
leaq 0xbe2(%rip), %rsi       # 0x32e3
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x27ff
leaq 0xbd3(%rip), %rsi       # 0x32eb
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x2806
leaq 0xbc5(%rip), %rsi       # 0x32f4
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x280d
leaq 0xbb9(%rip), %rsi       # 0x32ff
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x2811
leaq 0xbae(%rip), %rsi       # 0x330b
movq %r14, %rdi
callq 0x2070
movl $0x4, %ebp
testl %eax, %eax
je 0x2816
leaq 0xb99(%rip), %rsi       # 0x3312
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x2816
leaq 0xb89(%rip), %rsi       # 0x3319
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x2816
leaq 0xb57(%rip), %rsi       # 0x32fa
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x281f
leaq 0xb6a(%rip), %rsi       # 0x3320
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x2826
leaq 0xb5e(%rip), %rsi       # 0x3327
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x282d
leaq 0xb29(%rip), %rsi       # 0x3305
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x2834
leaq 0xb3c(%rip), %rsi       # 0x332b
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x283b
xorl %eax, %eax
jmp 0x281a
movl $0x2, %ebp
jmp 0x2816
movl $0x3, %ebp
jmp 0x2816
xorl %ebp, %ebp
jmp 0x2816
movl $0x1, %ebp
movl %ebp, (%rbx)
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
movl $0x5, %ebp
jmp 0x2816
movl $0x6, %ebp
jmp 0x2816
movl $0x7, %ebp
jmp 0x2816
movl $0x8, %ebp
jmp 0x2816
movl $0x9, %ebp
jmp 0x2816
// File: /workspace/github_c_makefile_star2_O3/tudurom[P]windowchef/client.c
// Function: fn_direction
static bool
fn_direction(uint32_t *data, int argc, char **argv)
{
	char *pos = argv[0];
	enum direction dir_sel;

	if (strcasecmp(pos, "up") == 0 || strcasecmp(pos, "north") == 0)
		dir_sel = NORTH;
	else if (strcasecmp(pos, "down") == 0 || strcasecmp(pos, "south") == 0)
		dir_sel = SOUTH;
	else if (strcasecmp(pos, "left") == 0 || strcasecmp(pos, "west") == 0)
		dir_sel = WEST;
	else if (strcasecmp(pos, "right") == 0 || strcasecmp(pos, "east") == 0)
		dir_sel = EAST;
	else
		return false;

	(void)(argc);
	data[0] = dir_sel;

	return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdx), %r14
leaq 0x9c3(%rip), %rsi       # 0x3216
movq %r14, %rdi
callq 0x2070
xorl %ebp, %ebp
testl %eax, %eax
je 0x2901
leaq 0xac3(%rip), %rsi       # 0x332f
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x2901
leaq 0xab2(%rip), %rsi       # 0x3335
movq %r14, %rdi
callq 0x2070
movl $0x1, %ebp
testl %eax, %eax
je 0x2901
leaq 0xa9f(%rip), %rsi       # 0x333a
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x2901
leaq 0xa4c(%rip), %rsi       # 0x32fa
movq %r14, %rdi
callq 0x2070
movl $0x3, %ebp
testl %eax, %eax
je 0x2901
leaq 0xa7a(%rip), %rsi       # 0x3340
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x2901
leaq 0xa2c(%rip), %rsi       # 0x3305
movq %r14, %rdi
callq 0x2070
movl $0x2, %ebp
testl %eax, %eax
je 0x2901
leaq 0xa54(%rip), %rsi       # 0x3345
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x2901
xorl %eax, %eax
jmp 0x2905
movl %ebp, (%rbx)
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/tudurom[P]windowchef/client.c
// Function: fn_config
static bool
fn_config(uint32_t *data, int argc, char **argv) {
	char *key;
	bool status;
	int i;

	key = argv[0];

	i = 0;
	while (i < NR_IPC_CONFIGS && strcmp(key, configs[i].key) != 0)
		i++;

	if (i < NR_IPC_CONFIGS) {
		if (configs[i].argc != argc - 1)
			errx(EXIT_FAILURE, "too many or not enough arguments. Want: %d", configs[i].argc);
		data[0] = configs[i].config;
		status = (configs[i].handler)(data + 1, argc - 1, argv + 1);

		if (status == false)
			errx(EXIT_FAILURE, "malformed input");
	} else {
		errx(EXIT_FAILURE, "no such config key");
	}
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movq (%rdx), %r15
movl $0x10, %r12d
leaq 0x3217(%rip), %r13      # 0x5bb0
movq -0x10(%r12,%r13), %rsi
movq %r15, %rdi
callq 0x2100
testl %eax, %eax
je 0x29ca
addq $0x18, %r12
cmpq $0x1f0, %r12            # imm = 0x1F0
jne 0x2999
leaq 0x9c7(%rip), %rsi       # 0x3385
movl $0x1, %edi
xorl %eax, %eax
callq 0x2110
movl -0x4(%r12,%r13), %edx
decl %ebp
cmpl %ebp, %edx
jne 0x2a06
movl -0x8(%r12,%r13), %eax
movl %eax, (%r14)
addq $0x4, %r14
addq $0x8, %rbx
movq %r14, %rdi
movl %edx, %esi
movq %rbx, %rdx
callq *(%r12,%r13)
testb %al, %al
je 0x2a19
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x93d(%rip), %rsi       # 0x334a
movl $0x1, %edi
xorl %eax, %eax
callq 0x2110
leaq 0x955(%rip), %rsi       # 0x3375
jmp 0x29be
// File: /workspace/github_c_makefile_star2_O3/tudurom[P]windowchef/client.c
// Function: fn_bool
static bool
fn_bool(uint32_t *data, int argc, char **argv) {
	int i = 0;
	char *arg;
	do {
		arg = argv[i];
		if (strcasecmp(argv[i], "true")       == 0
					|| strcasecmp(arg, "yes") == 0
					|| strcasecmp(arg, "t")   == 0
					|| strcasecmp(arg, "y")   == 0
					|| strcasecmp(arg, "1")   == 0)
				data[i] = true;
		else
			data[i] = false;
		i++;
	} while (i < argc);

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %r14d
movq %rdi, %r15
cmpl $0x2, %esi
movl $0x1, %eax
cmovll %eax, %r14d
xorl %r13d, %r13d
leaq 0xa36(%rip), %r12       # 0x34be
movq (%rbx,%r13,8), %rbp
movq %rbp, %rdi
movq %r12, %rsi
callq 0x2070
movl $0x1, %ecx
testl %eax, %eax
je 0x2afe
movq %rbp, %rdi
leaq 0xa19(%rip), %rsi       # 0x34c3
callq 0x2070
movl $0x1, %ecx
testl %eax, %eax
je 0x2afe
movq %rbp, %rdi
leaq 0x83b(%rip), %rsi       # 0x32fd
callq 0x2070
movl $0x1, %ecx
testl %eax, %eax
je 0x2afe
movq %rbp, %rdi
leaq 0x8bc(%rip), %rsi       # 0x3396
callq 0x2070
movl $0x1, %ecx
testl %eax, %eax
je 0x2afe
movq %rbp, %rdi
leaq 0x9d5(%rip), %rsi       # 0x34c7
callq 0x2070
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movl %ecx, (%r15,%r13,4)
incq %r13
cmpq %r13, %r14
jne 0x2a88
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/tudurom[P]windowchef/client.c
// Function: fn_pac
static bool
fn_pac(uint32_t *data, int argc, char **argv)
{
	for (int i = 0; i < argc; i++) {
		char *pac = argv[i];
		if (strcasecmp(pac, "nothing") == 0)
			data[i] = POINTER_ACTION_NOTHING;
		else if (strcasecmp(pac, "focus") == 0)
			data[i] = POINTER_ACTION_FOCUS;
		else if (strcasecmp(pac, "move") == 0)
			data[i] = POINTER_ACTION_MOVE;
		else if (strcasecmp(pac, "resize_corner") == 0)
			data[i] = POINTER_ACTION_RESIZE_CORNER;
		else if (strcasecmp(pac, "resize_side") == 0)
			data[i] = POINTER_ACTION_RESIZE_SIDE;
		else
			return false;
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, (%rsp)
testl %esi, %esi
jle 0x2bf2
movq %rdi, %r14
movl %esi, %r15d
movq %r15, %r12
negq %r12
movl $0x1, %ebx
xorl %ebp, %ebp
movq (%rsp), %rax
movq -0x8(%rax,%rbx,8), %r13
movq %r13, %rdi
leaq 0x96d(%rip), %rsi       # 0x34c9
callq 0x2070
movl $0x0, %ecx
testl %eax, %eax
je 0x2bd0
movq %r13, %rdi
leaq 0x6b5(%rip), %rsi       # 0x3229
callq 0x2070
testl %eax, %eax
je 0x2bbd
movq %r13, %rdi
leaq 0x556(%rip), %rsi       # 0x30dd
callq 0x2070
testl %eax, %eax
je 0x2bc4
movq %r13, %rdi
leaq 0x937(%rip), %rsi       # 0x34d1
callq 0x2070
testl %eax, %eax
je 0x2bcb
movq %r13, %rdi
leaq 0x932(%rip), %rsi       # 0x34df
callq 0x2070
movl $0x4, %ecx
testl %eax, %eax
je 0x2bd0
jmp 0x2bf5
movl $0x1, %ecx
jmp 0x2bd0
movl $0x2, %ecx
jmp 0x2bd0
movl $0x3, %ecx
movl %ecx, -0x4(%r14,%rbx,4)
cmpq %r15, %rbx
setae %bpl
leaq (%r12,%rbx), %rax
incq %rax
incq %rbx
cmpq $0x1, %rax
jne 0x2b49
jmp 0x2bf5
movb $0x1, %bpl
andb $0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/tudurom[P]windowchef/client.c
// Function: fn_mod
static bool
fn_mod(uint32_t *data, int argc, char **argv)
{
	(void)(argc);
	if (strcasecmp(argv[0], "alt") == 0)
		data[0] = XCB_MOD_MASK_1;
	else if (strcasecmp(argv[0], "super") == 0)
		data[0] = XCB_MOD_MASK_4;
	else
		return false;

	return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdx), %r14
leaq 0x8d0(%rip), %rsi       # 0x34eb
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x2c3e
leaq 0x8c1(%rip), %rsi       # 0x34ef
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x2c45
xorl %eax, %eax
jmp 0x2c4e
movl $0x8, %eax
jmp 0x2c4a
movl $0x40, %eax
movl %eax, (%rbx)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/tudurom[P]windowchef/client.c
// Function: fn_button
static bool
fn_button(uint32_t *data, int argc, char **argv)
{
	char *btn = argv[0];
	(void)(argc);

	if (strcasecmp(btn, "left") == 0)
		data[0] = 1;
	else if (strcasecmp(btn, "middle") == 0)
		data[0] = 2;
	else if (strcasecmp(btn, "right") == 0)
		data[0] = 3;
	else if (strcasecmp(btn, "none") == 0)
		data[0] = UINT32_MAX;
	else if (strcasecmp(btn, "any") == 0)
		data[0] = 0;
	else
		return false;

	return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdx), %r14
leaq 0x693(%rip), %rsi       # 0x32fa
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x2cc5
leaq 0x691(%rip), %rsi       # 0x330b
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x2ccc
leaq 0x678(%rip), %rsi       # 0x3305
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x2cd3
leaq 0x855(%rip), %rsi       # 0x34f5
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x2cda
leaq 0x847(%rip), %rsi       # 0x34fa
movq %r14, %rdi
callq 0x2070
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x2ce3
jmp 0x2cdf
movl $0x1, %eax
jmp 0x2cdf
movl $0x2, %eax
jmp 0x2cdf
movl $0x3, %eax
jmp 0x2cdf
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, (%rbx)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/lbs-dynamodb-init/main.c
// Function: storetableid
static int
storetableid(const char * key_id, const char * key_secret,
    const char * region, struct sock_addr * const * sas_ddb,
    const char * tablename, uint8_t * tableid)
{
	char * ddbreq;
	char * body;

	/* Tell the user what we're doing. */
	fprintf(stderr, "Recording table ID");

	/* Construct a request to store the table ID. */
	if ((ddbreq = dynamodb_kv_create(tablename,
	    "tableid", tableid, 32)) == NULL) {
		warnp("dynamodb_kv_create");
		goto err0;
	}

	/* Send the request. */
	if ((body = request(key_id, key_secret, region, sas_ddb,
	    "PutItem", ddbreq)) == NULL) {
		warnp("Table ID PutItem failed: %s", ddbreq);
		goto err1;
	}

	/* Free request and response. */
	free(body);
	free(ddbreq);

	/* Print delayed EOL. */
	fprintf(stderr, "\n");

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %rbp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq 0x1577d(%rip), %rax     # 0x17fe0
movq (%rax), %rcx
leaq 0xdc07(%rip), %rdi      # 0x10474
pushq $0x12
popq %rsi
pushq $0x1
popq %rdx
callq 0x2560
leaq 0xdc08(%rip), %rsi      # 0x10487
pushq $0x20
popq %rcx
movq %rbp, %rdi
movq %rbx, %rdx
callq 0x7a0e
testq %rax, %rax
je 0x28db
movq %rax, %rbx
leaq 0xdc06(%rip), %r8       # 0x104a2
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r9
callq 0x3964
testq %rax, %rax
je 0x28fb
movq %rax, %rdi
callq 0x23c0
movq %rbx, %rdi
callq 0x23c0
movq 0x15714(%rip), %rax     # 0x17fe0
movq (%rax), %rsi
pushq $0xa
popq %rdi
callq 0x23f0
xorl %eax, %eax
jmp 0x294b
callq 0x2040
cmpl $0x0, (%rax)
je 0x291f
movq %rax, %rbx
leaq 0xdba0(%rip), %rdi      # 0x1048f
xorl %eax, %eax
callq 0x746c
andl $0x0, (%rbx)
jmp 0x2948
callq 0x2040
cmpl $0x0, (%rax)
je 0x292f
movq %rax, %r14
leaq 0xdb9b(%rip), %rdi      # 0x104aa
movq %rbx, %rsi
xorl %eax, %eax
callq 0x746c
andl $0x0, (%r14)
jmp 0x2940
leaq 0xdb69(%rip), %rdi      # 0x1048f
xorl %eax, %eax
callq 0x758b
jmp 0x2948
leaq 0xdb74(%rip), %rdi      # 0x104aa
movq %rbx, %rsi
xorl %eax, %eax
callq 0x758b
movq %rbx, %rdi
callq 0x23c0
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/lbs-dynamodb-init/main.c
// Function: createmetadata
static int
createmetadata(const char * key_id, const char * key_secret,
    const char * region, struct sock_addr * const * sas_ddb,
    const char * tablename, size_t itemsz, uint8_t * tableid)
{
	uint8_t metadata[104];
	char * ddbreq;
	char * body;

	/* Tell the user what we're doing. */
	fprintf(stderr, "Storing initial metadata");

	/* Construct the metadata. */
	be64enc(&metadata[0], 0);		/* nextblk */
	be64enc(&metadata[8], 0);		/* deletedto */
	be64enc(&metadata[16], 0);		/* generation */
	be64enc(&metadata[24], (uint64_t)(-1));	/* lastblk */
	memset(&metadata[32], 0, 32);		/* process_id */
	be64enc(&metadata[64], (uint64_t)(itemsz));	/* itemsz */
	memcpy(&metadata[72], tableid, 32);	/* table ID */

	/* Construct a request to store metadata. */
	if ((ddbreq = dynamodb_kv_create(tablename, "metadata",
	    metadata, 104)) == NULL) {
		warnp("dynamodb_kv_create");
		goto err0;
	}

	/* Send the request. */
	if ((body = request(key_id, key_secret, region, sas_ddb,
	    "PutItem", ddbreq)) == NULL) {
		warnp("Metadata PutItem failed: %s", ddbreq);
		goto err1;
	}

	/* Free request and response. */
	free(body);
	free(ddbreq);

	/* Print delayed EOL. */
	fprintf(stderr, "\n");

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %r9, %rbp
movq %r8, %rbx
movq %rcx, 0x8(%rsp)
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq 0xb0(%rsp), %r14
movq 0x15655(%rip), %rax     # 0x17fe0
movq (%rax), %rcx
leaq 0xdb31(%rip), %rdi      # 0x104c6
pushq $0x18
popq %rsi
pushq $0x1
popq %rdx
callq 0x2560
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdx
movaps %xmm0, (%rdx)
andq $0x0, 0x10(%rdx)
orq $-0x1, 0x18(%rdx)
movaps %xmm0, 0x20(%rdx)
movaps %xmm0, 0x30(%rdx)
bswapq %rbp
movq %rbp, 0x40(%rdx)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups %xmm0, 0x48(%rdx)
movups %xmm1, 0x58(%rdx)
leaq 0xd7de(%rip), %rsi      # 0x101ba
pushq $0x68
popq %rcx
movq %rbx, %rdi
callq 0x7a0e
testq %rax, %rax
je 0x2a37
movq %rax, %rbx
leaq 0xdaac(%rip), %r8       # 0x104a2
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq 0x8(%rsp), %rcx
movq %rax, %r9
callq 0x3964
testq %rax, %rax
je 0x2a57
movq %rax, %rdi
callq 0x23c0
movq %rbx, %rdi
callq 0x23c0
movq 0x155b8(%rip), %rax     # 0x17fe0
movq (%rax), %rsi
pushq $0xa
popq %rdi
callq 0x23f0
xorl %eax, %eax
jmp 0x2aa7
callq 0x2040
cmpl $0x0, (%rax)
je 0x2a7b
movq %rax, %rbx
leaq 0xda44(%rip), %rdi      # 0x1048f
xorl %eax, %eax
callq 0x746c
andl $0x0, (%rbx)
jmp 0x2aa4
callq 0x2040
cmpl $0x0, (%rax)
je 0x2a8b
movq %rax, %r14
leaq 0xda74(%rip), %rdi      # 0x104df
movq %rbx, %rsi
xorl %eax, %eax
callq 0x746c
andl $0x0, (%r14)
jmp 0x2a9c
leaq 0xda0d(%rip), %rdi      # 0x1048f
xorl %eax, %eax
callq 0x758b
jmp 0x2aa4
leaq 0xda4d(%rip), %rdi      # 0x104df
movq %rbx, %rsi
xorl %eax, %eax
callq 0x758b
movq %rbx, %rdi
callq 0x23c0
pushq $-0x1
popq %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/lbs-dynamodb-init/main.c
// Function: request
static char *
request(const char * key_id, const char * key_secret, const char * region,
    struct sock_addr * const * sas_ddb, const char * reqtype, const char * req)
{
	struct request_cookie C;

	/* Send the request and wait for it to complete. */
	C.done = 0;
	if (dynamodb_request(sas_ddb, key_id, key_secret, region, reqtype,
	    (const uint8_t *)req, strlen(req), 4096,
	    callback_reqdone, &C) == NULL) {
		warnp("Failure sending DynamoDB request");
		goto err0;
	}
	if (events_spin(&C.done)) {
		warnp("Failure running event loop");
		goto err0;
	}

	/* Did the request fail? */
	if (C.status == 0)
		goto err0;

	/* Did we get a non-200 HTTP response? */
	if (C.status != 200) {
		warn0("DynamoDB returned failure response:");
		fprintf(stderr, "%s\n", C.body);
		free(C.body);
		goto err0;
	}

	/* Success! */
	return (C.body);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
leaq 0x8(%rsp), %rax
movl $0x0, (%rax)
movq %r9, %rdi
callq 0x2140
leaq 0xc8(%rip), %r10        # 0x3a66
movq %r15, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq %r12, %rcx
movq %r14, %r8
movq %rbx, %r9
leaq 0x8(%rsp), %r11
pushq %r11
pushq %r10
pushq $0x1000                 # imm = 0x1000
pushq %rax
callq 0x8066
addq $0x20, %rsp
testq %rax, %rax
je 0x39f1
leaq 0x8(%rsp), %rdi
callq 0x40b1
testl %eax, %eax
je 0x3a17
callq 0x2040
cmpl $0x0, (%rax)
je 0x3a2d
movq %rax, %r14
leaq 0xca09(%rip), %rdi      # 0x103f8
jmp 0x3a05
callq 0x2040
cmpl $0x0, (%rax)
je 0x3a36
movq %rax, %r14
leaq 0xc9d2(%rip), %rdi      # 0x103d7
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x746c
movl $0x0, (%r14)
jmp 0x3a54
movl 0xc(%rsp), %eax
testl %eax, %eax
je 0x3a52
cmpl $0xc8, %eax
jne 0x3a48
movq 0x10(%rsp), %rbx
jmp 0x3a54
leaq 0xc9c4(%rip), %rdi      # 0x103f8
jmp 0x3a3d
leaq 0xc99a(%rip), %rdi      # 0x103d7
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x758b
jmp 0x3a54
leaq 0x8(%rsp), %rdi
callq 0x2ab6
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/lbs-dynamodb-init/main.c
// Function: callback_reqdone
static int
callback_reqdone(void * cookie, struct http_response * res)
{
	struct request_cookie * C = cookie;
	size_t i;

	/* This request has completed. */
	C->done = 1;

	/* Do we have a response? */
	if (res == NULL) {
		warn0("DynamoDB request failed");
		C->status = 0;
		goto done;
	}

	/* Sanity-check response body. */
	for (i = 0; i < res->bodylen; i++) {
		if (res->body[i] == '\0') {
			warn0("DynamoDB response contains NUL byte!");
			C->status = 0;
			free(res->body);
			goto done;
		}
	}

	/* Record status and duplicate response body. */
	C->status = res->status;
	if ((C->body = malloc(res->bodylen + 1)) == NULL)
		goto err0;
	memcpy(C->body, res->body, res->bodylen);
	C->body[res->bodylen] = '\0';

done:
	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl $0x1, (%rdi)
testq %rsi, %rsi
je 0x3acf
movq %rsi, %r14
movq 0x18(%rsi), %r15
testq %r15, %r15
je 0x3a9c
movq 0x20(%r14), %rax
xorl %ecx, %ecx
cmpb $0x0, (%rax,%rcx)
je 0x3aeb
incq %rcx
cmpq %rcx, %r15
jne 0x3a8e
movl (%r14), %eax
movl %eax, 0x4(%rbx)
leaq 0x1(%r15), %rdi
callq 0x2430
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x3b10
movq %rax, %r12
movq 0x20(%r14), %rsi
movq %rax, %rdi
movq %r15, %rdx
callq 0x2240
movb $0x0, (%r12,%r15)
xorl %ebp, %ebp
jmp 0x3b15
leaq 0xc961(%rip), %rdi      # 0x10437
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x758b
callq 0x2040
movl %ebp, (%rax)
movl %ebp, 0x4(%rbx)
jmp 0x3b15
leaq 0xc95d(%rip), %rdi      # 0x1044f
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x758b
callq 0x2040
movl %ebp, (%rax)
movl %ebp, 0x4(%rbx)
movq 0x20(%r14), %rdi
callq 0x23c0
jmp 0x3b15
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/inolen[P]gdb_server/./sh4.h
// Function: sh4_SHAD
INSTR(SHAD) {
  // when Rm >= 0, Rn << Rm
  // when Rm < 0, Rn >> Rm
  // when shifting right > 32, Rn = (Rn >= 0 ? 0 : -1)
  I32 rn = LOAD_REG_I32(i->rn);
  I32 rm = LOAD_REG_I32(i->rm);
  STORE_REG_I32(i->rn, ASHD_I32(rn, rm));
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0xc(%rsi), %eax
movl 0x20(%rdi,%rax,4), %edx
movzwl 0xa(%rsi), %ecx
movl 0x20(%rdi,%rcx,4), %esi
movl %esi, %ecx
andl $0x1f, %ecx
testl %esi, %esi
js 0x44be
shll %cl, %edx
jmp 0x44cb
testl %ecx, %ecx
je 0x44c8
negb %cl
sarl %cl, %edx
jmp 0x44cb
sarl $0x1f, %edx
movl %edx, 0x20(%rdi,%rax,4)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/inolen[P]gdb_server/./sh4.h
// Function: sh4_SHLD
INSTR(SHLD) {
  // when Rm >= 0, Rn << Rm
  // when Rm < 0, Rn >> Rm
  // when shifting right >= 32, Rn = 0
  I32 rn = LOAD_REG_I32(i->rn);
  I32 rm = LOAD_REG_I32(i->rm);
  STORE_REG_I32(i->rn, LSHD_I32(rn, rm));
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0xc(%rsi), %eax
movl 0x20(%rdi,%rax,4), %edx
movzwl 0xa(%rsi), %ecx
movl 0x20(%rdi,%rcx,4), %esi
movl %esi, %ecx
andl $0x1f, %ecx
testl %esi, %esi
js 0x4551
shll %cl, %edx
jmp 0x455d
testl %ecx, %ecx
je 0x455b
negb %cl
sarl %cl, %edx
jmp 0x455d
xorl %edx, %edx
movl %edx, 0x20(%rdi,%rax,4)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/inolen[P]gdb_server/./sh4.h
// Function: sh4_arg_mask
static void ARG_MASK(const char *sig, char arg, uint16_t *mask,
                     uint16_t *shift) {
  int len = (int)strlen(sig);
  if (mask) {
    *mask = 0;
  }
  if (shift) {
    *shift = 0;
  }
  for (int i = 0; i < len; i++) {
    if ((!arg && sig[i] == '1') || (arg && sig[i] == arg)) {
      if (mask) {
        *mask |= (1 << (len - i - 1));
      }
      if (shift) {
        *shift = (uint16_t)(len - i - 1);
      }
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %r15d
movq %rdi, %r12
callq 0x30a0
testq %r14, %r14
je 0x5036
movw $0x0, (%r14)
testq %rbx, %rbx
je 0x5040
movw $0x0, (%rbx)
testl %eax, %eax
jle 0x5089
movl %eax, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
leal -0x1(%rax), %ecx
xorl %eax, %eax
movb (%r12,%rax), %sil
testb %r15b, %r15b
je 0x5061
cmpb %r15b, %sil
je 0x5067
jmp 0x507f
cmpb $0x31, %sil
jne 0x507f
testq %r14, %r14
je 0x5077
movl $0x1, %esi
shll %cl, %esi
orw %si, (%r14)
testq %rbx, %rbx
je 0x507f
movw %cx, (%rbx)
incq %rax
decl %ecx
cmpq %rax, %rdx
jne 0x5051
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/inolen[P]gdb_server/./sh4.h
// Function: sh4_decode
int DECODE(uint16_t data, INSTR_T *instr) {
  INSTR_TYPE_T *type = instr_lookup[data];

  if (!type) {
    return 0;
  }

  instr->type = type;
  instr->rm = (data & type->rm_mask) >> type->rm_shift;
  instr->rn = (data & type->rn_mask) >> type->rn_shift;
  instr->disp = (data & type->disp_mask) >> type->disp_shift;
  instr->imm = (data & type->imm_mask) >> type->imm_shift;

  return 1;
}

// Assembly:
movl %edi, %eax
leaq 0x9045(%rip), %rcx      # 0xe0e0
movq (%rcx,%rax,8), %rax
testq %rax, %rax
je 0x50fb
pushq %rbp
movq %rsp, %rbp
movq %rax, (%rsi)
movzwl 0x20(%rax), %ecx
andw %di, %cx
movzwl %cx, %edx
movb 0x22(%rax), %cl
shrl %cl, %edx
movw %dx, 0xa(%rsi)
movzwl 0x24(%rax), %ecx
andw %di, %cx
movzwl %cx, %edx
movb 0x26(%rax), %cl
shrl %cl, %edx
movw %dx, 0xc(%rsi)
movzwl 0x1c(%rax), %ecx
andw %di, %cx
movzwl %cx, %edx
movb 0x1e(%rax), %cl
shrl %cl, %edx
movw %dx, 0xe(%rsi)
andw 0x18(%rax), %di
movzwl %di, %edx
movb 0x1a(%rax), %cl
shrl %cl, %edx
movw %dx, 0x10(%rsi)
movl $0x1, %eax
popq %rbp
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O3/inolen[P]gdb_server/./gdb_server.h
// Function: gdb_server_create
gdb_server_t *gdb_server_create(gdb_target_t *target, int port) {
  if (!target) {
    return NULL;
  }

  gdb_server_t *sv = GDB_SERVER_MALLOC(sizeof(gdb_server_t));
  memset(sv, 0, sizeof(*sv));
  sv->target = target;
  sv->listen = INVALID_SOCKET;
  sv->client = INVALID_SOCKET;

  if (gdb_server_create_listen(sv, port) == -1) {
    GDB_SERVER_FREE(sv);
    sv = NULL;
  }

  return sv;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
testq %rdi, %rdi
je 0x5215
movl %esi, %r15d
movq %rdi, %r14
movl $0x1, %edi
movl $0x40020, %esi          # imm = 0x40020
callq 0x3100
movq %rax, %rbx
movq %r14, (%rax)
movl $0xffffffff, 0xc(%rax)  # imm = 0xFFFFFFFF
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x31e0
movl %eax, %r14d
movl %eax, 0x8(%rbx)
cmpl $-0x1, %eax
je 0x51d9
leaq -0x1c(%rbp), %rcx
movl $0x1, (%rcx)
movl %r14d, %edi
movl $0x1, %esi
movl $0x2, %edx
movl $0x4, %r8d
callq 0x3070
cmpl $-0x1, %eax
je 0x51e2
leaq -0x2c(%rbp), %rsi
movq $0x0, 0x8(%rsi)
movw $0x2, (%rsi)
movl %r15d, %eax
rolw $0x8, %ax
movw %ax, 0x2(%rsi)
movl $0x0, 0x4(%rsi)
movl %r14d, %edi
movl $0x10, %edx
callq 0x3190
cmpl $-0x1, %eax
je 0x51eb
movl %r14d, %edi
movl $0x1, %esi
callq 0x3160
cmpl $-0x1, %eax
je 0x51f4
leaq 0x2cd9(%rip), %rdi      # 0x7ea6
movl %r15d, %esi
xorl %eax, %eax
callq 0x30c0
jmp 0x5217
leaq 0x2ff9(%rip), %rdi      # 0x81d9
jmp 0x51fb
leaq 0x2fc4(%rip), %rdi      # 0x81ad
jmp 0x51fb
leaq 0x2fa1(%rip), %rdi      # 0x8193
jmp 0x51fb
leaq 0x2f79(%rip), %rdi      # 0x8174
callq 0x3050
movl %r14d, %edi
movl $0x2, %esi
callq 0x3090
movq %rbx, %rdi
callq 0x3030
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/inolen[P]gdb_server/./gdb_server.h
// Function: gdb_server_send_packet
static int gdb_server_send_packet(gdb_server_t *sv, const char *data) {
  uint8_t cs = packet_data_checksum(data);

  // make sure the data won't overflow our buffer
  int length = (int)strlen(data);
  if (length > GDB_MAX_DATA_SIZE) {
    return -1;
  }

  snprintf(sv->conn.last_sent, sizeof(sv->conn.last_sent), "%c%s%c%02x",
           GDB_PACKET_BEGIN, data, GDB_PACKET_END, cs);

  return gdb_server_send_raw(sv, sv->conn.last_sent);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x30a0
testl %eax, %eax
jle 0x5296
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
xorl %ecx, %ecx
xorl %edx, %edx
addb (%r14,%rcx), %dl
incq %rcx
cmpq %rcx, %rax
jne 0x5284
movzbl %dl, %r12d
jmp 0x5299
xorl %r12d, %r12d
movq %r14, %rdi
callq 0x30a0
cmpl $0x1fffb, %eax          # imm = 0x1FFFB
jle 0x52b5
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x20015(%rbx), %r15
movl %r12d, (%rsp)
leaq 0x2cc2(%rip), %rdx      # 0x7f89
movl $0x20000, %esi          # imm = 0x20000
movq %r15, %rdi
movl $0x24, %ecx
movq %r14, %r8
movl $0x23, %r9d
xorl %eax, %eax
callq 0x30d0
movl 0xc(%rbx), %edi
movq %r15, %rsi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x6040
// File: /workspace/github_c_makefile_star2_O3/inolen[P]gdb_server/sh4_server.c
// Function: sh4_server_init
void sh4_server_init(gdb_target_t *target, sh4_context_t *ctx) {
  target->ctx = ctx;
  target->endian = GDB_LITTLE_ENDIAN;
  target->num_regs = 59;
  target->stop = &server_stop;
  target->resume = &server_resume;
  target->step = &server_step;
  target->add_bp = &server_add_bp;
  target->rem_bp = &server_rem_bp;
  target->read_reg = &server_read_reg;
  target->read_mem = &server_read_mem;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rsi, (%rdi)
movabsq $0x3b00000000, %rax     # imm = 0x3B00000000
movq %rax, 0x8(%rdi)
leaq 0x48(%rip), %rax        # 0x5cf7
movq %rax, 0x10(%rdi)
leaq 0x4d(%rip), %rax        # 0x5d07
movq %rax, 0x18(%rdi)
leaq 0x52(%rip), %rax        # 0x5d17
movq %rax, 0x20(%rdi)
leaq 0xee(%rip), %rax        # 0x5dbe
movq %rax, 0x28(%rdi)
leaq 0xef(%rip), %rax        # 0x5dca
movq %rax, 0x30(%rdi)
leaq 0x12d(%rip), %rax       # 0x5e13
movq %rax, 0x40(%rdi)
leaq 0x226(%rip), %rax       # 0x5f17
movq %rax, 0x38(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/inolen[P]gdb_server/sh4_server.c
// Function: server_step
static void server_step(void *data) {
  sh4_context_t *ctx = (sh4_context_t *)data;
  ctx->running = 1;

  uint32_t target = server_next_pc(ctx);
  add_temp_bp(ctx, target);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rdi, %rbx
movl $0x1, 0x15c(%rdi)
leaq -0x1a8(%rbp), %rdi
movl $0x188, %edx            # imm = 0x188
movq %rbx, %rsi
callq 0x3130
movl 0x4(%rbx), %eax
andl 0x168(%rbx), %eax
movq 0x160(%rbx), %rcx
movzwl (%rcx,%rax), %edi
leaq -0x20(%rbp), %rsi
callq 0x5092
testl %eax, %eax
je 0x5d9f
movq -0x20(%rbp), %rax
testb $0x2, 0x4(%rax)
je 0x5d7d
leaq -0x1a8(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq *0x10(%rax)
movl -0x1a4(%rbp), %esi
addl $0x2, %esi
movq %rbx, %rdi
callq 0x631f
movl $0x1, 0x8(%rax)
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %rbp
retq
leaq 0x2355(%rip), %rdi      # 0x80fb
leaq 0x2367(%rip), %rsi      # 0x8114
leaq 0x236d(%rip), %rcx      # 0x8121
movl $0x44, %edx
callq 0x30e0
// File: /workspace/github_c_makefile_star2_O3/inolen[P]gdb_server/sh4_server.c
// Function: server_rem_bp
static void server_rem_bp(void *data, int type, intmax_t addr) {
  sh4_context_t *ctx = (sh4_context_t *)data;
  breakpoint_t *bp = find_bp(ctx, addr);
  assert(bp);
  rem_bp(ctx, bp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq 0x180(%rdi), %rax
testq %rax, %rax
jle 0x5dee
movq 0x178(%rdi), %rsi
cmpl %edx, (%rsi)
je 0x5e0d
addq $0xc, %rsi
decq %rax
jne 0x5de1
leaq 0x122b(%rip), %rdi      # 0x7020
leaq 0x2318(%rip), %rsi      # 0x8114
leaq 0x2347(%rip), %rcx      # 0x814a
movl $0x6a, %edx
callq 0x30e0
popq %rbp
jmp 0x5f82
// File: /workspace/github_c_makefile_star2_O3/inolen[P]gdb_server/sh4_server.c
// Function: server_read_reg
static void server_read_reg(void *data, int n, intmax_t *value, int *size) {
  sh4_context_t *ctx = (sh4_context_t *)data;

  if (n < 16) {
    *value = ctx->r[n];
  } else if (n == 16) {
    *value = ctx->pc;
  } else if (n == 17) {
    *value = ctx->pr;
  } else if (n == 18) {
    *value = ctx->gbr;
  } else if (n == 19) {
    *value = ctx->vbr;
  } else if (n == 20) {
    *value = ctx->mach;
  } else if (n == 21) {
    *value = ctx->macl;
  } else if (n == 22) {
    *value = ctx->sr;
  } else if (n == 23) {
    *value = ctx->fpul;
  } else if (n == 24) {
    *value = ctx->fpscr;
  } else if (n < 41) {
    *value = ctx->fr[n - 25];
  } else if (n == 41) {
    *value = ctx->ssr;
  } else if (n == 42) {
    *value = ctx->spc;
  } else if (n < 51) {
    uint32_t *b0 = (ctx->sr & RB) ? ctx->ralt : ctx->r;
    *value = b0[n - 43];
  } else if (n < 59) {
    uint32_t *b1 = (ctx->sr & RB) ? ctx->r : ctx->ralt;
    *value = b1[n - 51];
  }

  *size = 4;
}

// Assembly:
cmpl $0xf, %esi
jg 0x5e34
movslq %esi, %rax
leaq (%rdi,%rax,4), %rdi
addq $0x20, %rdi
pushq %rbp
movq %rsp, %rbp
movl (%rdi), %eax
movq %rax, (%rdx)
popq %rbp
movl $0x4, (%rcx)
retq
leal -0x10(%rsi), %eax
cmpl $0x8, %eax
ja 0x5e8b
leaq 0x2039(%rip), %rsi      # 0x7e7c
movslq (%rsi,%rax,4), %rax
addq %rsi, %rax
jmpq *%rax
addq $0x4, %rdi
jmp 0x5e23
addq $0x18, %rdi
jmp 0x5e23
addq $0x10, %rdi
jmp 0x5e23
addq $0x14, %rdi
jmp 0x5e23
addq $0x104, %rdi            # imm = 0x104
jmp 0x5e23
addq $0xc, %rdi
jmp 0x5e23
addq $0x1c, %rdi
jmp 0x5e23
addq $0x14c, %rdi            # imm = 0x14C
jmp 0x5e23
addq $0x158, %rdi            # imm = 0x158
jmp 0x5e23
cmpl $0x28, %esi
ja 0x5ea0
addl $-0x19, %esi
leaq (%rdi,%rsi,4), %rdi
addq $0x84, %rdi
jmp 0x5e23
cmpl $0x2a, %esi
je 0x5eb6
cmpl $0x29, %esi
jne 0x5ebf
addq $0x150, %rdi            # imm = 0x150
jmp 0x5e23
addq $0x8, %rdi
jmp 0x5e23
cmpl $0x32, %esi
ja 0x5eea
movb 0x14f(%rdi), %al
andb $0x20, %al
shrb $0x5, %al
movzbl %al, %eax
shll $0x6, %eax
addq %rdi, %rax
movl %esi, %esi
leaq (%rax,%rsi,4), %rdi
addq $-0x8c, %rdi
jmp 0x5e23
cmpl $0x3a, %esi
ja 0x5e2d
xorl %eax, %eax
testb $0x20, 0x14f(%rdi)
sete %al
shll $0x6, %eax
addq %rdi, %rax
movl %esi, %esi
leaq (%rax,%rsi,4), %rdi
addq $-0xac, %rdi
jmp 0x5e23
// File: /workspace/github_c_makefile_star2_O3/inolen[P]gdb_server/sh4_server.c
// Function: rem_bp
static void rem_bp(sh4_context_t *ctx, breakpoint_t *bp) {
  int n = bp - ctx->bp;
  uint32_t addr = bp->addr & ctx->physical_mask;
  uint16_t data = bp->data;

  // shift and resize the breakpoints array
  for (int i = n; i < ctx->num_bp - 1; i++) {
    ctx->bp[i] = ctx->bp[i + 1];
  }
  ctx->bp = realloc(ctx->bp, sizeof(breakpoint_t) * --ctx->num_bp);

  // swap the original instructon back
  *(uint16_t *)&ctx->physical_base[addr] = data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x168(%rdi), %rax
movq 0x178(%rdi), %rdi
movl (%rsi), %r14d
movzwl 0x4(%rsi), %r15d
subq %rdi, %rsi
sarq $0x2, %rsi
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rsi, %rdx
movslq 0x180(%rbx), %rcx
decq %rcx
cmpl %edx, %ecx
jle 0x600c
movslq %edx, %rdx
leaq (,%rdx,4), %rcx
leaq (%rcx,%rcx,2), %rsi
movq 0x178(%rbx), %rcx
incq %rdx
movl 0x14(%rcx,%rsi), %edi
movl %edi, 0x8(%rcx,%rsi)
movq 0xc(%rcx,%rsi), %rdi
movq %rdi, (%rcx,%rsi)
movslq 0x180(%rbx), %rcx
decq %rcx
addq $0xc, %rsi
cmpq %rcx, %rdx
jl 0x5fd7
movq 0x178(%rbx), %rdi
andl %eax, %r14d
movl %ecx, 0x180(%rbx)
shlq $0x2, %rcx
leaq (%rcx,%rcx,2), %rsi
callq 0x3180
movq %rax, 0x178(%rbx)
movq 0x160(%rbx), %rax
movw %r15w, (%rax,%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/inolen[P]gdb_server/./gdb_server.h
// Function: gdb_server_send_raw
static int gdb_server_send_raw(gdb_server_t *sv, const char *data) {
  int len = (int)strlen(data);
  int n = send(sv->client, data, len, 0);

  if (n != len) {
    GDB_SERVER_LOG("gdb server failed to send raw packet %s, %d", data, n);
    return -1;
  }

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movl %edi, %r15d
movq %rsi, %rdi
callq 0x30a0
movslq %eax, %r12
xorl %r14d, %r14d
movl %r15d, %edi
movq %rbx, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x30b0
cmpl %r12d, %eax
je 0x608d
leaq 0x1ee1(%rip), %rdi      # 0x7f5c
movq %rbx, %rsi
movl %eax, %edx
xorl %eax, %eax
callq 0x30c0
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/inolen[P]gdb_server/./gdb_server.h
// Function: gdb_server_handle_m
static int gdb_server_handle_m(gdb_server_t *sv, const char *data) {
  int addr = 0;
  data = parse_hex(&data[1], &addr);

  int length = 0;
  data = parse_hex(&data[1], &length);

  // read bytes from the target
  uint8_t *memory = alloca(length);
  memset(memory, 0, length);
  sv->target->read_mem(sv->target->ctx, addr, memory, length);

  // format bytes into response
  char *buffer = scratch_buffer;
  int remaining = (int)sizeof(scratch_buffer);
  GDB_SERVER_ASSERT((length * 2 + 1) < remaining);

  for (int i = 0; i < length; i++) {
    int n = snprintf(buffer, remaining, "%02x", memory[i]);
    GDB_SERVER_ASSERT(n);
    buffer += n;
    remaining -= n;
  }

  gdb_server_send_packet(sv, scratch_buffer);

  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r15
xorl %ebx, %ebx
leaq -0x2c(%rbp), %rax
movl %ebx, (%rax)
leaq 0x1(%rsi), %rdi
movq %rax, %rsi
callq 0x61c0
leaq -0x3c(%rbp), %r14
movl %ebx, (%r14)
leaq 0x1(%rax), %rdi
movq %r14, %rsi
callq 0x61c0
movl (%r14), %r13d
movslq %r13d, %r12
movq %rsp, %r14
leaq 0xf(%r12), %rax
andq $-0x10, %rax
subq %rax, %r14
movq %r14, %rsp
movq %r14, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x30f0
movq %r15, -0x38(%rbp)
movq (%r15), %rax
movq (%rax), %rdi
leaq -0x2c(%rbp), %rcx
movslq (%rcx), %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq *0x38(%rax)
leal 0x1(,%r12,2), %eax
cmpl $0x1fffa, %eax          # imm = 0x1FFFA
jg 0x61a1
testl %r13d, %r13d
jle 0x6163
leaq 0x87fb2(%rip), %r15     # 0x8e0e0
movl $0x1fffb, %ebx          # imm = 0x1FFFB
xorl %r12d, %r12d
movslq %ebx, %rsi
movzbl (%r14,%r12), %ecx
movq %r15, %rdi
leaq 0x1d59(%rip), %rdx      # 0x7ea1
xorl %eax, %eax
callq 0x30d0
testl %eax, %eax
je 0x6182
movslq %eax, %rcx
addq %rcx, %r15
subl %eax, %ebx
incq %r12
cmpq %r12, %r13
jne 0x6136
leaq 0x87f76(%rip), %rsi     # 0x8e0e0
movq -0x38(%rbp), %rdi
callq 0x525a
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xf0c(%rip), %rdi       # 0x7095
leaq 0x1d5d(%rip), %rsi      # 0x7eed
leaq 0x1efe(%rip), %rcx      # 0x8095
movl $0x306, %edx            # imm = 0x306
callq 0x30e0
leaq 0x1ed0(%rip), %rdi      # 0x8078
leaq 0x1d3e(%rip), %rsi      # 0x7eed
leaq 0x1edf(%rip), %rcx      # 0x8095
movl $0x302, %edx            # imm = 0x302
callq 0x30e0
// File: /workspace/github_c_makefile_star2_O3/inolen[P]gdb_server/./gdb_server.h
// Function: format_register
static int format_register(intmax_t value, int width, endianness_t endian,
                           char *buffer, int size) {
  uint8_t *ptr = (uint8_t *)&value;
  int remaining = size;

  for (int i = 0; i < width; i++) {
    uint8_t c = endian == GDB_LITTLE_ENDIAN ? ptr[i] : ptr[width - 1 - i];
    int n = snprintf(buffer, remaining, "%02x", c);
    GDB_SERVER_ASSERT(n);
    buffer += n;
    remaining -= n;
  }

  return size - remaining;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %ebx
movq %rdi, -0x38(%rbp)
movl %r8d, -0x2c(%rbp)
testl %esi, %esi
jle 0x62a8
movq %rcx, %r14
movl %edx, %r15d
movl %esi, %r13d
decq %r13
xorl %r12d, %r12d
movl -0x2c(%rbp), %ebx
testl %r15d, %r15d
movq %r13, %rax
cmoveq %r12, %rax
movzbl -0x38(%rbp,%rax), %ecx
movslq %ebx, %rsi
movq %r14, %rdi
leaq 0x1c15(%rip), %rdx      # 0x7ea1
xorl %eax, %eax
callq 0x30d0
testl %eax, %eax
je 0x62bc
movslq %eax, %rcx
addq %rcx, %r14
subl %eax, %ebx
incq %r12
addq $-0x1, %r13
jb 0x6270
movl -0x2c(%rbp), %eax
subl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xdd2(%rip), %rdi       # 0x7095
leaq 0x1c23(%rip), %rsi      # 0x7eed
leaq 0x1d62(%rip), %rcx      # 0x8033
movl $0x112, %edx            # imm = 0x112
callq 0x30e0
// File: /workspace/github_c_makefile_star2_O3/saltyJeff[P]uClibcpp/extra/config/zconf.tab.c
// Function: zconfprint
static void zconfprint(const char *err, ...)
{
	va_list ap;

	fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno() + 1);
	va_start(ap, err);
	vfprintf(stderr, err, ap);
	va_end(ap);
	fprintf(stderr, "\n");
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x2391
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)
movq 0x12c60(%rip), %r14     # 0x14ff8
movq (%r14), %rdi
cmpq $0x0, 0x139fd(%rip)     # 0x15da0
jne 0x23b1
pushq $0x1
popq %rcx
leaq 0xe4bf(%rip), %rdx      # 0x1086e
jmp 0x23bf
movq 0x139d8(%rip), %rax     # 0x15d90
movq 0x10(%rax), %rdx
movl 0x18(%rax), %ecx
leaq 0xee90(%rip), %rsi      # 0x11256
xorl %eax, %eax
callq 0x21b0
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rdx)
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rdx)
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x22a0
movq (%r14), %rsi
pushq $0xa
popq %rdi
callq 0x2140
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/saltyJeff[P]uClibcpp/extra/config/conf.c
// Function: conf_string
int conf_string(struct menu *menu)
{
	struct symbol *sym = menu->sym;
	const char *def, *help;

	while (1) {
		printf("%*s%s ", indent - 1, "", menu->prompt->text);
		printf("(%s) ", sym->name);
		def = sym_get_string_value(sym);
		if (sym_get_string_value(sym))
			printf("[%s] ", def);
		conf_askvalue(sym, def);
		switch (line[0]) {
		case '\n':
			break;
		case '?':
			/* print help */
			if (line[1] == 0) {
				help = nohelp_text;
				if (menu->sym->help)
					help = menu->sym->help;
				printf("\n%s\n", menu->sym->help);
				def = NULL;
				break;
			}
		default:
			line[strlen(line)-1] = 0;
			def = line;
		}
		if (def && sym_set_string_value(sym, def))
			return 0;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %r14
leaq 0xddfe(%rip), %r12      # 0x106a3
leaq 0x87cf(%rip), %r13      # 0xb07b
leaq 0x12b4d(%rip), %r15     # 0x15400
movl 0x128e7(%rip), %esi     # 0x151a0
decl %esi
movq 0x20(%rbx), %rax
movq 0x18(%rax), %rcx
leaq 0x87aa(%rip), %rdi      # 0xb074
movq %r12, %rdx
xorl %eax, %eax
callq 0x2100
movq 0x8(%r14), %rsi
movq %r13, %rdi
xorl %eax, %eax
callq 0x2100
movq %r14, %rdi
callq 0x8748
movq %rax, %rbp
movq %r14, %rdi
callq 0x8748
testq %rax, %rax
je 0x290b
leaq 0x8780(%rip), %rdi      # 0xb081
movq %rbp, %rsi
xorl %eax, %eax
callq 0x2100
movq %r14, %rdi
movq %rbp, %rsi
callq 0x298d
movzbl 0x12ae3(%rip), %eax     # 0x15400
cmpl $0xa, %eax
je 0x2943
cmpl $0x3f, %eax
jne 0x2930
cmpb $0x0, 0x12ad3(%rip)     # 0x15401
je 0x2961
movq %r15, %rdi
callq 0x20e0
movb $0x0, -0x1(%rax,%r15)
movq %r15, %rbp
jmp 0x294c
testq %rbp, %rbp
je 0x28b3
movq %r14, %rdi
movq %rbp, %rsi
callq 0xa818
testb %al, %al
je 0x28b3
jmp 0x297c
movq 0x18(%rbx), %rax
movq 0x10(%rax), %rsi
leaq 0xdd3a(%rip), %rdi      # 0x106aa
xorl %eax, %eax
callq 0x2100
jmp 0x28b3
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/saltyJeff[P]uClibcpp/extra/config/conf.c
// Function: check_conf
static void check_conf(struct menu *menu)
{
	struct symbol *sym;
	struct menu *child;

	if (!menu_is_visible(menu))
		return;

	sym = menu->sym;
	if (sym) {
		if (sym_is_changable(sym) && !sym_has_value(sym)) {
			if (!conf_cnt++)
				printf("*\n* Restart config...\n*\n");
			rootEntry = menu_get_parent_menu(menu);
			conf(rootEntry);
		}
		if (sym_is_choice(sym) && sym_get_tristate_value(sym) != mod)
			return;
	}

	for (child = menu->list; child; child = child->next)
		check_conf(child);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x86b0
testb %al, %al
je 0x327a
movq 0x18(%rbx), %r14
testq %r14, %r14
je 0x3264
movq %r14, %rdi
callq 0xa986
testb %al, %al
je 0x3256
testb $0x8, 0x45(%r14)
je 0x3256
movl 0x12262(%rip), %eax     # 0x15488
leal 0x1(%rax), %ecx
movl %ecx, 0x12259(%rip)     # 0x15488
testl %eax, %eax
jne 0x323f
leaq 0x7fbd(%rip), %rdi      # 0xb1f7
callq 0x20a0
movq %rbx, %rdi
callq 0xaaf4
movq %rax, 0x12232(%rip)     # 0x15480
movq %rax, %rdi
callq 0x2d18
testb $0x10, 0x44(%r14)
je 0x3264
cmpl $0x1, 0x28(%r14)
jne 0x327a
movq 0x10(%rbx), %rbx
testq %rbx, %rbx
je 0x327a
movq %rbx, %rdi
callq 0x31f4
movq (%rbx), %rbx
jmp 0x3268
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/saltyJeff[P]uClibcpp/extra/config/conf.c
// Function: check_stdin
static void check_stdin(void)
{
	if (!valid_stdin && input_mode == ask_silent) {
		printf("aborted!\n\n");
		printf("Console input/output is redirected. ");
		printf("Run 'make oldconfig' to update configuration.\n\n");
		exit(1);
	}
}

// Assembly:
cmpl $0x0, 0x11f57(%rip)     # 0x151e0
jne 0x3294
cmpl $0x2, 0x1215e(%rip)     # 0x153f0
je 0x3295
retq
pushq %rax
leaq 0x7f72(%rip), %rdi      # 0xb20f
callq 0x20a0
leaq 0x7e34(%rip), %rdi      # 0xb0dd
xorl %eax, %eax
callq 0x2100
leaq 0x7f62(%rip), %rdi      # 0xb219
callq 0x20a0
movl $0x1, %edi
callq 0x22e0
// File: /workspace/github_c_makefile_star2_O3/saltyJeff[P]uClibcpp/extra/config/conf.c
// Function: strip
static void strip(char *str)
{
	char *p = str;
	int l;

	while ((isspace(*p)))
		p++;
	l = strlen(p);
	if (p != str)
		memmove(str, p, l + 1);
	if (!l)
		return;
	p = str + l - 1;
	while ((isspace(*p)))
		*p-- = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
callq 0x2310
movq %rax, %rbx
movq (%rax), %rax
movq $-0x1, %r13
leaq 0x11eef(%rip), %r12     # 0x15400
movsbq 0x1(%r13,%r12), %rcx
incq %r13
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x3511
leaq (%r12,%r13), %r15
movq %r15, %rdi
callq 0x20e0
movq %rax, %r14
testq %r13, %r13
je 0x354b
leal 0x1(%r14), %eax
movslq %eax, %rdx
leaq 0x11ebd(%rip), %rdi     # 0x15400
movq %r15, %rsi
callq 0x2270
testl %r14d, %r14d
je 0x357e
movslq %r14d, %rax
movq (%rbx), %rcx
movsbq -0x1(%rax,%r12), %rdx
testb $0x20, 0x1(%rcx,%rdx,2)
je 0x357e
addq %r12, %rax
decq %rax
movb $0x0, (%rax)
movq (%rbx), %rcx
movsbq -0x1(%rax), %rdx
decq %rax
testb $0x20, 0x1(%rcx,%rdx,2)
jne 0x3569
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/saltyJeff[P]uClibcpp/extra/config/./symbol.c
// Function: sym_lookup
struct symbol *sym_lookup(const char *name, int isconst)
{
	struct symbol *symbol;
	const char *ptr;
	char *new_name;
	int hash = 0;

	if (name) {
		if (name[0] && !name[1]) {
			switch (name[0]) {
			case 'y': return &symbol_yes;
			case 'm': return &symbol_mod;
			case 'n': return &symbol_no;
			}
		}
		for (ptr = name; *ptr; ptr++)
			hash += *ptr;
		hash &= 0xff;

		for (symbol = symbol_hash[hash]; symbol; symbol = symbol->next) {
			if (!strcmp(symbol->name, name)) {
				if ((isconst && symbol->flags & SYMBOL_CONST) ||
				    (!isconst && !(symbol->flags & SYMBOL_CONST)))
					return symbol;
			}
		}
		new_name = strdup(name);
	} else {
		new_name = NULL;
		hash = 256;
	}

	symbol = malloc(sizeof(*symbol));
	memset(symbol, 0, sizeof(*symbol));
	symbol->name = new_name;
	symbol->type = S_UNKNOWN;
	symbol->flags = SYMBOL_NEW;
	if (isconst)
		symbol->flags |= SYMBOL_CONST;

	symbol->next = symbol_hash[hash];
	symbol_hash[hash] = symbol;

	return symbol;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %esi, %ebx
testq %rdi, %rdi
je 0x580c
movq %rdi, %r14
movzbl (%rdi), %eax
testl %eax, %eax
je 0x581e
cmpb $0x0, 0x1(%r14)
je 0x58ac
leaq 0x1(%r14), %rdx
xorl %ecx, %ecx
movzbl %al, %eax
addl %eax, %ecx
movb (%rdx), %al
incq %rdx
testb %al, %al
jne 0x57f8
movzbl %cl, %r12d
jmp 0x5821
movl $0x100, %r12d           # imm = 0x100
movq 0x104f7(%rip), %r13     # 0x15d10
xorl %r14d, %r14d
jmp 0x5868
xorl %r12d, %r12d
leaq 0xfce8(%rip), %rax      # 0x15510
movq (%rax,%r12,8), %r13
testq %r13, %r13
je 0x585d
movq %r13, %r15
movq 0x8(%r15), %rdi
movq %r14, %rsi
callq 0x2190
testl %eax, %eax
jne 0x5855
testl %ebx, %ebx
sete %al
testb $0x7, 0x44(%r15)
sete %cl
cmpb %cl, %al
je 0x589f
movq (%r15), %r15
testq %r15, %r15
jne 0x5834
movq %r14, %rdi
callq 0x2300
movq %rax, %r14
movl $0x1, %edi
movl $0x70, %esi
callq 0x2180
movq %rax, %r15
movq %r14, 0x8(%rax)
testl %ebx, %ebx
movl $0x800, %eax            # imm = 0x800
movl $0x807, %ecx            # imm = 0x807
cmovel %eax, %ecx
movl %ecx, 0x44(%r15)
leaq 0xfc78(%rip), %rax      # 0x15510
movq %r13, (%r15)
movq %r15, (%rax,%r12,8)
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
cmpl $0x79, %eax
je 0x58d1
cmpl $0x6e, %eax
je 0x58c8
cmpl $0x6d, %eax
jne 0x57f2
leaq 0xfa32(%rip), %r15      # 0x152f8
jmp 0x589f
leaq 0xf949(%rip), %r15      # 0x15218
jmp 0x589f
leaq 0xf9b0(%rip), %r15      # 0x15288
jmp 0x589f