LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x1627(%rip), %rsi      # 0x44c4
callq 0x2070
cmpl $0x0, %eax
je 0x2efb
movq -0x28(%rbp), %rdi
leaq 0x1617(%rip), %rsi      # 0x44c9
callq 0x2070
cmpl $0x0, %eax
je 0x2efb
movq -0x28(%rbp), %rdi
leaq 0x143c(%rip), %rsi      # 0x4303
callq 0x2070
cmpl $0x0, %eax
je 0x2efb
movq -0x28(%rbp), %rdi
leaq 0x14c0(%rip), %rsi      # 0x439c
callq 0x2070
cmpl $0x0, %eax
je 0x2efb
movq -0x28(%rbp), %rdi
leaq 0x15dc(%rip), %rsi      # 0x44cd
callq 0x2070
cmpl $0x0, %eax
jne 0x2f0c
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl $0x1, (%rax,%rcx,4)
jmp 0x2f1b
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jl 0x2e7a
movb $0x1, %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x3055
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
leaq 0x154e(%rip), %rsi      # 0x44cf
callq 0x2070
cmpl $0x0, %eax
jne 0x2f9f
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
jmp 0x3045
movq -0x30(%rbp), %rdi
leaq 0x1285(%rip), %rsi      # 0x422f
callq 0x2070
cmpl $0x0, %eax
jne 0x2fc5
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl $0x1, (%rax,%rcx,4)
jmp 0x3043
movq -0x30(%rbp), %rdi
leaq 0x1113(%rip), %rsi      # 0x40e3
callq 0x2070
cmpl $0x0, %eax
jne 0x2feb
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl $0x2, (%rax,%rcx,4)
jmp 0x3041
movq -0x30(%rbp), %rdi
leaq 0x14e1(%rip), %rsi      # 0x44d7
callq 0x2070
cmpl $0x0, %eax
jne 0x3011
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl $0x3, (%rax,%rcx,4)
jmp 0x303f
movq -0x30(%rbp), %rdi
leaq 0x14c9(%rip), %rsi      # 0x44e5
callq 0x2070
cmpl $0x0, %eax
jne 0x3037
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl $0x4, (%rax,%rcx,4)
jmp 0x303d
movb $0x0, -0x1(%rbp)
jmp 0x3059
jmp 0x303f
jmp 0x3041
jmp 0x3043
jmp 0x3045
jmp 0x3047
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x2f5a
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x1460(%rip), %rsi      # 0x44f1
callq 0x2070
cmpl $0x0, %eax
jne 0x30a7
movq -0x10(%rbp), %rax
movl $0x8, (%rax)
jmp 0x30d3
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x1440(%rip), %rsi      # 0x44f5
callq 0x2070
cmpl $0x0, %eax
jne 0x30cb
movq -0x10(%rbp), %rax
movl $0x40, (%rax)
jmp 0x30d1
movb $0x0, -0x1(%rbp)
jmp 0x30d7
jmp 0x30d3
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
leaq 0x11e7(%rip), %rsi      # 0x4300
callq 0x2070
cmpl $0x0, %eax
jne 0x3132
movq -0x10(%rbp), %rax
movl $0x1, (%rax)
jmp 0x31c4
movq -0x28(%rbp), %rdi
leaq 0x11d4(%rip), %rsi      # 0x4311
callq 0x2070
cmpl $0x0, %eax
jne 0x3153
movq -0x10(%rbp), %rax
movl $0x2, (%rax)
jmp 0x31c2
movq -0x28(%rbp), %rdi
leaq 0x11ad(%rip), %rsi      # 0x430b
callq 0x2070
cmpl $0x0, %eax
jne 0x3174
movq -0x10(%rbp), %rax
movl $0x3, (%rax)
jmp 0x31c0
movq -0x28(%rbp), %rdi
leaq 0x137c(%rip), %rsi      # 0x44fb
callq 0x2070
cmpl $0x0, %eax
jne 0x3195
movq -0x10(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
jmp 0x31be
movq -0x28(%rbp), %rdi
leaq 0x1360(%rip), %rsi      # 0x4500
callq 0x2070
cmpl $0x0, %eax
jne 0x31b6
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
jmp 0x31bc
movb $0x0, -0x1(%rbp)
jmp 0x31c8
jmp 0x31be
jmp 0x31c0
jmp 0x31c2
jmp 0x31c4
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tudurom[P]windowchef/client.c
// Function: get_atom
static xcb_atom_t
get_atom(char *name)
{
	xcb_intern_atom_cookie_t cookie = xcb_intern_atom(conn, 0, strlen(name), name);
	xcb_intern_atom_reply_t *reply = xcb_intern_atom_reply(conn, cookie, NULL);

	if (!reply)
		return XCB_ATOM_STRING;

	return reply->atom;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq 0x339d(%rip), %rax      # 0x6590
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x20b0
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rcx
xorl %esi, %esi
movzwl %ax, %edx
callq 0x2050
movl %eax, -0x14(%rbp)
movq 0x3374(%rip), %rdi      # 0x6590
movl -0x14(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x20f0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x323c
movl $0x1f, -0x4(%rbp)
jmp 0x3246
movq -0x20(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/KhuramAli[P]JAM-Benchmark/spsc_queue_lockfree_boost/code04.cpp
// Function: main
int main()
{
	std::thread t1{produce};
	std::thread t2{consume};
	t1.join();
	t2.join();
	q.consume_all([](int i) {sum += i;});
	std::cout << sum << '\n';
}

// Assembly:
subq $0x28, %rsp
leaq -0x8b(%rip), %rsi       # 0x1240
leaq 0x20(%rsp), %rdi
callq 0x1b90
leaq -0x6c(%rip), %rsi       # 0x1270
leaq 0x18(%rsp), %rdi
callq 0x1b90
jmp 0x12e8
leaq 0x20(%rsp), %rdi
callq 0x10c0
jmp 0x12f4
leaq 0x18(%rsp), %rdi
callq 0x10c0
jmp 0x1300
leaq 0x3d99(%rip), %rdi      # 0x50a0
leaq 0xb(%rsp), %rsi
callq 0x13a0
jmp 0x1313
movl 0x3f67(%rip), %esi      # 0x5280
movq 0x3cb8(%rip), %rdi      # 0x4fd8
callq 0x10d0
movq %rax, (%rsp)
jmp 0x132b
movq (%rsp), %rdi
movl $0xa, %esi
callq 0x10a0
jmp 0x133b
leaq 0x18(%rsp), %rdi
callq 0x1c50
leaq 0x20(%rsp), %rdi
callq 0x1c50
xorl %eax, %eax
addq $0x28, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x10(%rsp)
movl %eax, 0xc(%rsp)
jmp 0x137e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x10(%rsp)
movl %eax, 0xc(%rsp)
leaq 0x18(%rsp), %rdi
callq 0x1c50
leaq 0x20(%rsp), %rdi
callq 0x1c50
movq 0x10(%rsp), %rdi
callq 0x10e0
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq 0x206e9(%rip), %rax     # 0x23fe0
movq (%rax), %rdi
leaq 0x18d15(%rip), %rsi     # 0x1c616
movb $0x0, %al
callq 0x24a0
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rdx
leaq 0x18d12(%rip), %rsi     # 0x1c629
movl $0x20, %ecx
callq 0xaab0
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jne 0x3967
jmp 0x392d
callq 0x2040
cmpl $0x0, (%rax)
je 0x3952
leaq 0x18cf3(%rip), %rdi     # 0x1c631
movb $0x0, %al
callq 0x9d30
callq 0x2040
movl $0x0, (%rax)
jmp 0x3960
leaq 0x18cd8(%rip), %rdi     # 0x1c631
movb $0x0, %al
callq 0x9f80
jmp 0x3962
jmp 0x3a0e
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x40(%rbp), %r9
leaq 0x18cc2(%rip), %r8      # 0x1c644
callq 0x3c60
movq %rax, -0x48(%rbp)
cmpq $0x0, %rax
jne 0x39d2
jmp 0x3993
callq 0x2040
cmpl $0x0, (%rax)
je 0x39bc
movq -0x40(%rbp), %rsi
leaq 0x18ca4(%rip), %rdi     # 0x1c64c
movb $0x0, %al
callq 0x9d30
callq 0x2040
movl $0x0, (%rax)
jmp 0x39ce
movq -0x40(%rbp), %rsi
leaq 0x18c85(%rip), %rdi     # 0x1c64c
movb $0x0, %al
callq 0x9f80
jmp 0x39d0
jmp 0x3a05
movq -0x48(%rbp), %rdi
callq 0x23e0
movq -0x40(%rbp), %rdi
callq 0x23e0
movq 0x205f5(%rip), %rax     # 0x23fe0
movq (%rax), %rdi
leaq 0x1af1b(%rip), %rsi     # 0x1e910
movb $0x0, %al
callq 0x24a0
movl $0x0, -0x4(%rbp)
jmp 0x3a15
movq -0x40(%rbp), %rdi
callq 0x23e0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movl $0x0, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x38(%rbp), %rdi
callq 0x2150
movq -0x78(%rbp), %rdi
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq -0x60(%rbp), %rcx
movq -0x58(%rbp), %r8
movq -0x50(%rbp), %r9
movq %rax, %r11
leaq 0x11b(%rip), %r10       # 0x3e00
leaq -0x48(%rbp), %rax
movq %r11, (%rsp)
movq $0x1000, 0x8(%rsp)      # imm = 0x1000
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0xb9c0
cmpq $0x0, %rax
jne 0x3d47
jmp 0x3d0d
callq 0x2040
cmpl $0x0, (%rax)
je 0x3d32
leaq 0x1885b(%rip), %rdi     # 0x1c579
movb $0x0, %al
callq 0x9d30
callq 0x2040
movl $0x0, (%rax)
jmp 0x3d40
leaq 0x18840(%rip), %rdi     # 0x1c579
movb $0x0, %al
callq 0x9f80
jmp 0x3d42
jmp 0x3deb
leaq -0x48(%rbp), %rdi
callq 0x46c0
cmpl $0x0, %eax
je 0x3d8e
jmp 0x3d57
callq 0x2040
cmpl $0x0, (%rax)
je 0x3d7c
leaq 0x18832(%rip), %rdi     # 0x1c59a
movb $0x0, %al
callq 0x9d30
callq 0x2040
movl $0x0, (%rax)
jmp 0x3d8a
leaq 0x18817(%rip), %rdi     # 0x1c59a
movb $0x0, %al
callq 0x9f80
jmp 0x3d8c
jmp 0x3deb
cmpl $0x0, -0x44(%rbp)
jne 0x3d96
jmp 0x3deb
cmpl $0xc8, -0x44(%rbp)
je 0x3de1
jmp 0x3da1
leaq 0x1880d(%rip), %rdi     # 0x1c5b5
movb $0x0, %al
callq 0x9f80
callq 0x2040
movl $0x0, (%rax)
movq 0x2021f(%rip), %rax     # 0x23fe0
movq (%rax), %rdi
movq -0x40(%rbp), %rdx
leaq 0x195d6(%rip), %rsi     # 0x1d3a5
movb $0x0, %al
callq 0x24a0
movq -0x40(%rbp), %rdi
callq 0x23e0
jmp 0x3deb
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3df3
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl $0x1, (%rax)
cmpq $0x0, -0x18(%rbp)
jne 0x3e54
jmp 0x3e2b
leaq 0x187a7(%rip), %rdi     # 0x1c5d9
movb $0x0, %al
callq 0x9f80
callq 0x2040
movl $0x0, (%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0x4(%rax)
jmp 0x3f23
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jae 0x3ec4
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x28(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x3eb4
jmp 0x3e81
leaq 0x18769(%rip), %rdi     # 0x1c5f1
movb $0x0, %al
callq 0x9f80
callq 0x2040
movl $0x0, (%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x23e0
jmp 0x3f23
jmp 0x3eb6
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x3e5c
movq -0x18(%rbp), %rax
movl (%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
addq $0x1, %rdi
callq 0x2440
movq -0x20(%rbp), %rcx
movq %rax, 0x8(%rcx)
cmpq $0x0, %rax
jne 0x3ef2
jmp 0x3f2c
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdx
callq 0x2280
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x18(%rcx), %rcx
movb $0x0, (%rax,%rcx)
movl $0x0, -0x4(%rbp)
jmp 0x3f33
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_1/exercise_1_10/copy_io_esc_replace.c
// Function: main
int main(void)
{
  char c;
  while ((c = getchar()) != EOF)
  {
    if (c == '\t')
    {
      putchar('\\');
      putchar('t');
    }
    else if (c == '\b')
    {
      putchar('\\');
      putchar('b');
    }
    else if (c == '\\')
    {
      putchar('\\');
      putchar('\\');
    }
    else
    {
      putchar(c);
    }
  }

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
callq 0x1040
movb %al, -0x5(%rbp)
movsbl %al, %eax
cmpl $-0x1, %eax
je 0x11db
movsbl -0x5(%rbp), %eax
cmpl $0x9, %eax
jne 0x118e
movl $0x5c, %edi
callq 0x1030
movl $0x74, %edi
callq 0x1030
jmp 0x11d9
movsbl -0x5(%rbp), %eax
cmpl $0x8, %eax
jne 0x11ad
movl $0x5c, %edi
callq 0x1030
movl $0x62, %edi
callq 0x1030
jmp 0x11d7
movsbl -0x5(%rbp), %eax
cmpl $0x5c, %eax
jne 0x11cc
movl $0x5c, %edi
callq 0x1030
movl $0x5c, %edi
callq 0x1030
jmp 0x11d5
movsbl -0x5(%rbp), %edi
callq 0x1030
jmp 0x11d7
jmp 0x11d9
jmp 0x115f
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/inolen[P]gdb_server/example.c
// Function: load_bin
static int load_bin(const char *bin_path, uint8_t **data, int *size) {
  FILE *fp = fopen(bin_path, "rb");
  if (!fp) {
    return 0;
  }

  fseek(fp, 0, SEEK_END);
  *size = ftell(fp);
  fseek(fp, 0, SEEK_SET);

  *data = (uint8_t *)(malloc(*size));
  int n = (int)fread(*data, sizeof(uint8_t), *size, fp);
  fclose(fp);

  if (n != *size) {
    free(*data);
    return 0;
  }

  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x6b27(%rip), %rsi      # 0xa096
callq 0x31b0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x358b
movl $0x0, -0x4(%rbp)
jmp 0x3622
movq -0x28(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x3180
movq -0x28(%rbp), %rdi
callq 0x3120
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x3180
movq -0x20(%rbp), %rax
movslq (%rax), %rdi
callq 0x3160
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movslq (%rax), %rdx
movq -0x28(%rbp), %rcx
movl $0x1, %esi
callq 0x3060
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rdi
callq 0x3080
movl -0x2c(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
je 0x361b
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x3030
movl $0x0, -0x4(%rbp)
jmp 0x3622
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/inolen[P]gdb_server/./sh4.h
// Function: sh4_MOVWLPC
INSTR(MOVWLPC) {
  uint32_t addr = (i->disp * 2) + ctx->pc + 4;
  I32 v = SEXT_I16_I32(LOAD_I16(addr));
  STORE_REG_I32(i->rn, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzwl 0xe(%rax), %eax
shll %eax
movq -0x8(%rbp), %rcx
addl 0x4(%rcx), %eax
addl $0x4, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x160(%rax), %rax
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rdx
andq 0x168(%rdx), %rcx
movswl (%rax,%rcx), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %edx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
movl %edx, 0x20(%rax,%rcx,4)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x4(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/inolen[P]gdb_server/./sh4.h
// Function: sh4_MOVLLPC
INSTR(MOVLLPC) {
  uint32_t addr = (i->disp * 4) + (ctx->pc & ~3) + 4;
  I32 v = LOAD_I32(addr);
  STORE_REG_I32(i->rn, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzwl 0xe(%rax), %eax
shll $0x2, %eax
movq -0x8(%rbp), %rcx
movl 0x4(%rcx), %ecx
andl $-0x4, %ecx
addl %ecx, %eax
addl $0x4, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x160(%rax), %rax
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rdx
andq 0x168(%rdx), %rcx
movl (%rax,%rcx), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %edx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
movl %edx, 0x20(%rax,%rcx,4)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x4(%rax)
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/inolen[P]gdb_server/./sh4.h
// Function: sh4_MOVBS
INSTR(MOVBS) {
  I32 addr = LOAD_REG_I32(i->rn);
  I8 v = LOAD_REG_I8(i->rm);
  STORE_I8(addr, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
movl 0x20(%rax,%rcx,4), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xa(%rcx), %ecx
movl 0x20(%rax,%rcx,4), %eax
movb %al, -0x15(%rbp)
movb -0x15(%rbp), %dl
movq -0x8(%rbp), %rax
movq 0x160(%rax), %rax
movslq -0x14(%rbp), %rcx
movq -0x8(%rbp), %rsi
andq 0x168(%rsi), %rcx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x4(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/inolen[P]gdb_server/./sh4.h
// Function: sh4_MOVWS
INSTR(MOVWS) {
  I32 addr = LOAD_REG_I32(i->rn);
  I16 v = LOAD_REG_I16(i->rm);
  STORE_I16(addr, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
movl 0x20(%rax,%rcx,4), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xa(%rcx), %ecx
movl 0x20(%rax,%rcx,4), %eax
movw %ax, -0x16(%rbp)
movw -0x16(%rbp), %dx
movq -0x8(%rbp), %rax
movq 0x160(%rax), %rax
movslq -0x14(%rbp), %rcx
movq -0x8(%rbp), %rsi
andq 0x168(%rsi), %rcx
movw %dx, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x4(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/inolen[P]gdb_server/./sh4.h
// Function: sh4_MOVLS
INSTR(MOVLS) {
  I32 addr = LOAD_REG_I32(i->rn);
  I32 v = LOAD_REG_I32(i->rm);
  STORE_I32(addr, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
movl 0x20(%rax,%rcx,4), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xa(%rcx), %ecx
movl 0x20(%rax,%rcx,4), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %edx
movq -0x8(%rbp), %rax
movq 0x160(%rax), %rax
movslq -0x14(%rbp), %rcx
movq -0x8(%rbp), %rsi
andq 0x168(%rsi), %rcx
movl %edx, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x4(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/inolen[P]gdb_server/./sh4.h
// Function: sh4_MOVBM
INSTR(MOVBM) {
  // decrease Rn by 1
  I32 addr = LOAD_REG_I32(i->rn);
  addr = SUB_IMM_I32(addr, 1);
  STORE_REG_I32(i->rn, addr);

  // store Rm at (Rn)
  I8 v = LOAD_REG_I8(i->rm);
  STORE_I8(addr, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
movl 0x20(%rax,%rcx,4), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %edx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
movl %edx, 0x20(%rax,%rcx,4)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xa(%rcx), %ecx
movl 0x20(%rax,%rcx,4), %eax
movb %al, -0x15(%rbp)
movb -0x15(%rbp), %dl
movq -0x8(%rbp), %rax
movq 0x160(%rax), %rax
movslq -0x14(%rbp), %rcx
movq -0x8(%rbp), %rsi
andq 0x168(%rsi), %rcx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x4(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/inolen[P]gdb_server/./sh4.h
// Function: sh4_MOVWM
INSTR(MOVWM) {
  // decrease Rn by 2
  I32 addr = LOAD_REG_I32(i->rn);
  addr = SUB_IMM_I32(addr, 2);
  STORE_REG_I32(i->rn, addr);

  // store Rm at (Rn)
  I16 v = LOAD_REG_I16(i->rm);
  STORE_I16(addr, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
movl 0x20(%rax,%rcx,4), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
subl $0x2, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %edx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
movl %edx, 0x20(%rax,%rcx,4)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xa(%rcx), %ecx
movl 0x20(%rax,%rcx,4), %eax
movw %ax, -0x16(%rbp)
movw -0x16(%rbp), %dx
movq -0x8(%rbp), %rax
movq 0x160(%rax), %rax
movslq -0x14(%rbp), %rcx
movq -0x8(%rbp), %rsi
andq 0x168(%rsi), %rcx
movw %dx, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x4(%rax)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/inolen[P]gdb_server/./sh4.h
// Function: sh4_MOVLM
INSTR(MOVLM) {
  // decrease Rn by 4
  I32 addr = LOAD_REG_I32(i->rn);
  addr = SUB_IMM_I32(addr, 4);
  STORE_REG_I32(i->rn, addr);

  // store Rm at (Rn)
  I32 v = LOAD_REG_I32(i->rm);
  STORE_I32(addr, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
movl 0x20(%rax,%rcx,4), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
subl $0x4, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %edx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
movl %edx, 0x20(%rax,%rcx,4)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xa(%rcx), %ecx
movl 0x20(%rax,%rcx,4), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %edx
movq -0x8(%rbp), %rax
movq 0x160(%rax), %rax
movslq -0x14(%rbp), %rcx
movq -0x8(%rbp), %rsi
andq 0x168(%rsi), %rcx
movl %edx, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x4(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/inolen[P]gdb_server/./sh4.h
// Function: sh4_MOVBP
INSTR(MOVBP) {
  // store (Rm) at Rn
  I32 addr = LOAD_REG_I32(i->rm);
  I32 v = SEXT_I8_I32(LOAD_I8(addr));
  STORE_REG_I32(i->rn, v);

  // increase Rm by 1
  // FIXME if rm != rn???
  addr = ADD_IMM_I32(addr, 1);
  STORE_REG_I32(i->rm, addr);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xa(%rcx), %ecx
movl 0x20(%rax,%rcx,4), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x160(%rax), %rax
movslq -0x14(%rbp), %rcx
movq -0x8(%rbp), %rdx
andq 0x168(%rdx), %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %edx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
movl %edx, 0x20(%rax,%rcx,4)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %edx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xa(%rcx), %ecx
movl %edx, 0x20(%rax,%rcx,4)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x4(%rax)
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/inolen[P]gdb_server/./sh4.h
// Function: sh4_MOVWP
INSTR(MOVWP) {
  // store (Rm) at Rn
  I32 addr = LOAD_REG_I32(i->rm);
  I32 v = SEXT_I16_I32(LOAD_I16(addr));
  STORE_REG_I32(i->rn, v);

  // increase Rm by 2
  // FIXME if rm != rn???
  addr = ADD_IMM_I32(addr, 2);
  STORE_REG_I32(i->rm, addr);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xa(%rcx), %ecx
movl 0x20(%rax,%rcx,4), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x160(%rax), %rax
movslq -0x14(%rbp), %rcx
movq -0x8(%rbp), %rdx
andq 0x168(%rdx), %rcx
movswl (%rax,%rcx), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %edx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
movl %edx, 0x20(%rax,%rcx,4)
movl -0x14(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %edx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xa(%rcx), %ecx
movl %edx, 0x20(%rax,%rcx,4)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x4(%rax)
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/inolen[P]gdb_server/./sh4.h
// Function: sh4_MOVLP
INSTR(MOVLP) {
  // store (Rm) at Rn
  I32 addr = LOAD_REG_I32(i->rm);
  I32 v = LOAD_I32(addr);
  STORE_REG_I32(i->rn, v);

  // increase Rm by 2
  // FIXME if rm != rn???
  addr = ADD_IMM_I32(addr, 4);
  STORE_REG_I32(i->rm, addr);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xa(%rcx), %ecx
movl 0x20(%rax,%rcx,4), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x160(%rax), %rax
movslq -0x14(%rbp), %rcx
movq -0x8(%rbp), %rdx
andq 0x168(%rdx), %rcx
movl (%rax,%rcx), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %edx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
movl %edx, 0x20(%rax,%rcx,4)
movl -0x14(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %edx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xa(%rcx), %ecx
movl %edx, 0x20(%rax,%rcx,4)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x4(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/inolen[P]gdb_server/./sh4.h
// Function: sh4_MOVWS0D
INSTR(MOVWS0D) {
  I32 addr = ADD_IMM_I32(LOAD_REG_I32(i->rn), (int32_t)i->disp * 2);
  I16 v = LOAD_REG_I16(0);
  STORE_I16(addr, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
movl 0x20(%rax,%rcx,4), %eax
movq -0x10(%rbp), %rcx
movzwl 0xe(%rcx), %ecx
shll %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl 0x20(%rax), %eax
movw %ax, -0x16(%rbp)
movw -0x16(%rbp), %dx
movq -0x8(%rbp), %rax
movq 0x160(%rax), %rax
movslq -0x14(%rbp), %rcx
movq -0x8(%rbp), %rsi
andq 0x168(%rsi), %rcx
movw %dx, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x4(%rax)
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/inolen[P]gdb_server/./sh4.h
// Function: sh4_MOVLSMD
INSTR(MOVLSMD) {
  I32 addr = ADD_IMM_I32(LOAD_REG_I32(i->rn), (int32_t)i->disp * 4);
  I32 v = LOAD_REG_I32(i->rm);
  STORE_I32(addr, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
movl 0x20(%rax,%rcx,4), %eax
movq -0x10(%rbp), %rcx
movzwl 0xe(%rcx), %ecx
shll $0x2, %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xa(%rcx), %ecx
movl 0x20(%rax,%rcx,4), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %edx
movq -0x8(%rbp), %rax
movq 0x160(%rax), %rax
movslq -0x14(%rbp), %rcx
movq -0x8(%rbp), %rsi
andq 0x168(%rsi), %rcx
movl %edx, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x4(%rax)
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/inolen[P]gdb_server/./sh4.h
// Function: sh4_MOVBLD0
INSTR(MOVBLD0) {
  I32 addr = ADD_IMM_I32(LOAD_REG_I32(i->rm), (int32_t)i->disp);
  I32 v = SEXT_I8_I32(LOAD_I8(addr));
  STORE_REG_I32(0, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xa(%rcx), %ecx
movl 0x20(%rax,%rcx,4), %eax
movq -0x10(%rbp), %rcx
movzwl 0xe(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x160(%rax), %rax
movslq -0x14(%rbp), %rcx
movq -0x8(%rbp), %rdx
andq 0x168(%rdx), %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x4(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/inolen[P]gdb_server/./sh4.h
// Function: sh4_MOVLLDN
INSTR(MOVLLDN) {
  I32 addr = ADD_IMM_I32(LOAD_REG_I32(i->rm), (int32_t)i->disp * 4);
  I32 v = LOAD_I32(addr);
  STORE_REG_I32(i->rn, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xa(%rcx), %ecx
movl 0x20(%rax,%rcx,4), %eax
movq -0x10(%rbp), %rcx
movzwl 0xe(%rcx), %ecx
shll $0x2, %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x160(%rax), %rax
movslq -0x14(%rbp), %rcx
movq -0x8(%rbp), %rdx
andq 0x168(%rdx), %rcx
movl (%rax,%rcx), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %edx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
movl %edx, 0x20(%rax,%rcx,4)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x4(%rax)
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/inolen[P]gdb_server/./sh4.h
// Function: sh4_MOVBS0
INSTR(MOVBS0) {
  I32 addr = ADD_I32(LOAD_REG_I32(0), LOAD_REG_I32(i->rn));
  I8 v = LOAD_REG_I8(i->rm);
  STORE_I8(addr, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x20(%rax), %eax
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rdx
movzwl 0xc(%rdx), %edx
addl 0x20(%rcx,%rdx,4), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xa(%rcx), %ecx
movl 0x20(%rax,%rcx,4), %eax
movb %al, -0x15(%rbp)
movb -0x15(%rbp), %dl
movq -0x8(%rbp), %rax
movq 0x160(%rax), %rax
movslq -0x14(%rbp), %rcx
movq -0x8(%rbp), %rsi
andq 0x168(%rsi), %rcx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x4(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/inolen[P]gdb_server/./sh4.h
// Function: sh4_MOVWS0
INSTR(MOVWS0) {
  I32 addr = ADD_I32(LOAD_REG_I32(0), LOAD_REG_I32(i->rn));
  I16 v = LOAD_REG_I16(i->rm);
  STORE_I16(addr, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x20(%rax), %eax
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rdx
movzwl 0xc(%rdx), %edx
addl 0x20(%rcx,%rdx,4), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xa(%rcx), %ecx
movl 0x20(%rax,%rcx,4), %eax
movw %ax, -0x16(%rbp)
movw -0x16(%rbp), %dx
movq -0x8(%rbp), %rax
movq 0x160(%rax), %rax
movslq -0x14(%rbp), %rcx
movq -0x8(%rbp), %rsi
andq 0x168(%rsi), %rcx
movw %dx, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x4(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/inolen[P]gdb_server/./sh4.h
// Function: sh4_MOVLS0
INSTR(MOVLS0) {
  I32 addr = ADD_I32(LOAD_REG_I32(0), LOAD_REG_I32(i->rn));
  I32 v = LOAD_REG_I32(i->rm);
  STORE_I32(addr, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x20(%rax), %eax
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rdx
movzwl 0xc(%rdx), %edx
addl 0x20(%rcx,%rdx,4), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xa(%rcx), %ecx
movl 0x20(%rax,%rcx,4), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %edx
movq -0x8(%rbp), %rax
movq 0x160(%rax), %rax
movslq -0x14(%rbp), %rcx
movq -0x8(%rbp), %rsi
andq 0x168(%rsi), %rcx
movl %edx, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x4(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/inolen[P]gdb_server/./sh4.h
// Function: sh4_MOVBL0
INSTR(MOVBL0) {
  I32 addr = ADD_I32(LOAD_REG_I32(0), LOAD_REG_I32(i->rm));
  I32 v = SEXT_I8_I32(LOAD_I8(addr));
  STORE_REG_I32(i->rn, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x20(%rax), %eax
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rdx
movzwl 0xa(%rdx), %edx
addl 0x20(%rcx,%rdx,4), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x160(%rax), %rax
movslq -0x14(%rbp), %rcx
movq -0x8(%rbp), %rdx
andq 0x168(%rdx), %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %edx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
movl %edx, 0x20(%rax,%rcx,4)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x4(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/inolen[P]gdb_server/./sh4.h
// Function: sh4_MOVBS0G
INSTR(MOVBS0G) {
  I32 addr = ADD_IMM_I32(LOAD_GBR_I32(), (int32_t)i->disp);
  I8 v = LOAD_REG_I8(0);
  STORE_I8(addr, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x10(%rbp), %rcx
movzwl 0xe(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl 0x20(%rax), %eax
movb %al, -0x15(%rbp)
movb -0x15(%rbp), %dl
movq -0x8(%rbp), %rax
movq 0x160(%rax), %rax
movslq -0x14(%rbp), %rcx
movq -0x8(%rbp), %rsi
andq 0x168(%rsi), %rcx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x4(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/inolen[P]gdb_server/./sh4.h
// Function: sh4_MOVWS0G
INSTR(MOVWS0G) {
  I32 addr = ADD_IMM_I32(LOAD_GBR_I32(), (int32_t)i->disp * 2);
  I16 v = LOAD_REG_I16(0);
  STORE_I16(addr, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x10(%rbp), %rcx
movzwl 0xe(%rcx), %ecx
shll %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl 0x20(%rax), %eax
movw %ax, -0x16(%rbp)
movw -0x16(%rbp), %dx
movq -0x8(%rbp), %rax
movq 0x160(%rax), %rax
movslq -0x14(%rbp), %rcx
movq -0x8(%rbp), %rsi
andq 0x168(%rsi), %rcx
movw %dx, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x4(%rax)
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/inolen[P]gdb_server/./sh4.h
// Function: sh4_MOVLS0G
INSTR(MOVLS0G) {
  I32 addr = ADD_IMM_I32(LOAD_GBR_I32(), (int32_t)i->disp * 4);
  I32 v = LOAD_REG_I32(0);
  STORE_I32(addr, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x10(%rbp), %rcx
movzwl 0xe(%rcx), %ecx
shll $0x2, %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %edx
movq -0x8(%rbp), %rax
movq 0x160(%rax), %rax
movslq -0x14(%rbp), %rcx
movq -0x8(%rbp), %rsi
andq 0x168(%rsi), %rcx
movl %edx, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x4(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/inolen[P]gdb_server/./sh4.h
// Function: sh4_MOVBLG0
INSTR(MOVBLG0) {
  I32 addr = ADD_IMM_I32(LOAD_GBR_I32(), (int32_t)i->disp);
  I32 v = SEXT_I8_I32(LOAD_I8(addr));
  STORE_REG_I32(0, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x10(%rbp), %rcx
movzwl 0xe(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x160(%rax), %rax
movslq -0x14(%rbp), %rcx
movq -0x8(%rbp), %rdx
andq 0x168(%rdx), %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x4(%rax)
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/inolen[P]gdb_server/./sh4.h
// Function: sh4_MOVWLG0
INSTR(MOVWLG0) {
  I32 addr = ADD_IMM_I32(LOAD_GBR_I32(), (int32_t)i->disp * 2);
  I32 v = SEXT_I16_I32(LOAD_I16(addr));
  STORE_REG_I32(0, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x10(%rbp), %rcx
movzwl 0xe(%rcx), %ecx
shll %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x160(%rax), %rax
movslq -0x14(%rbp), %rcx
movq -0x8(%rbp), %rdx
andq 0x168(%rdx), %rcx
movswl (%rax,%rcx), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x4(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/inolen[P]gdb_server/./sh4.h
// Function: sh4_SWAPB
INSTR(SWAPB) {
  const int nbits = 8;
  const uint32_t mask = (1u << nbits) - 1;
  I32 v = LOAD_REG_I32(i->rm);
  I32 tmp = AND_IMM_I32(XOR_I32(v, LSHR_I32(v, nbits)), mask);
  I32 res = XOR_I32(v, OR_I32(tmp, SHL_I32(tmp, nbits)));
  STORE_REG_I32(i->rn, res);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x8, -0x14(%rbp)
movl $0xff, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xa(%rcx), %ecx
movl 0x20(%rax,%rcx,4), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl -0x1c(%rbp), %ecx
shrl $0x8, %ecx
xorl %ecx, %eax
andl $0xff, %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
movl -0x20(%rbp), %ecx
movl -0x20(%rbp), %edx
shll $0x8, %edx
orl %edx, %ecx
xorl %ecx, %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %edx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
movl %edx, 0x20(%rax,%rcx,4)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x4(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/inolen[P]gdb_server/./sh4.h
// Function: sh4_SWAPW
INSTR(SWAPW) {
  const int nbits = 16;
  const uint32_t mask = (1u << nbits) - 1;
  I32 v = LOAD_REG_I32(i->rm);
  I32 tmp = AND_IMM_I32(XOR_I32(v, LSHR_I32(v, nbits)), mask);
  I32 res = XOR_I32(v, OR_I32(tmp, SHL_I32(tmp, nbits)));
  STORE_REG_I32(i->rn, res);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x10, -0x14(%rbp)
movl $0xffff, -0x18(%rbp)    # imm = 0xFFFF
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xa(%rcx), %ecx
movl 0x20(%rax,%rcx,4), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl -0x1c(%rbp), %ecx
shrl $0x10, %ecx
xorl %ecx, %eax
andl $0xffff, %eax           # imm = 0xFFFF
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
movl -0x20(%rbp), %ecx
movl -0x20(%rbp), %edx
shll $0x10, %edx
orl %edx, %ecx
xorl %ecx, %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %edx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
movl %edx, 0x20(%rax,%rcx,4)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x4(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/inolen[P]gdb_server/./sh4.h
// Function: sh4_XTRCT
INSTR(XTRCT) {
  I32 rm = SHL_IMM_I32(AND_IMM_I32(LOAD_REG_I32(i->rm), 0x0000ffff), 16);
  I32 rn = LSHR_IMM_I32(AND_IMM_I32(LOAD_REG_I32(i->rn), 0xffff0000), 16);
  I32 v = OR_I32(rm, rn);
  STORE_REG_I32(i->rn, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xa(%rcx), %ecx
movl 0x20(%rax,%rcx,4), %eax
andl $0xffff, %eax           # imm = 0xFFFF
shll $0x10, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
movl 0x20(%rax,%rcx,4), %eax
andl $0xffff0000, %eax       # imm = 0xFFFF0000
shrl $0x10, %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
orl -0x18(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %edx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
movl %edx, 0x20(%rax,%rcx,4)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x4(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/inolen[P]gdb_server/./sh4.h
// Function: sh4_ADDI
INSTR(ADDI) {
  I32 rn = LOAD_REG_I32(i->rn);
  int32_t imm = (int32_t)(int8_t)i->imm;
  I32 v = ADD_IMM_I32(rn, imm);
  STORE_REG_I32(i->rn, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
movl 0x20(%rax,%rcx,4), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movw 0x10(%rax), %ax
movsbl %al, %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
addl -0x18(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %edx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
movl %edx, 0x20(%rax,%rcx,4)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x4(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/inolen[P]gdb_server/./sh4.h
// Function: sh4_ADDC
INSTR(ADDC) {
  I32 rm = LOAD_REG_I32(i->rm);
  I32 rn = LOAD_REG_I32(i->rn);
  I32 v = ADD_I32(ADD_I32(rn, rm), LOAD_T_I32());
  STORE_REG_I32(i->rn, v);

  // compute carry flag, taken from Hacker's Delight
  I32 c = OR_I32(AND_I32(rn, rm), AND_I32(OR_I32(rn, rm), NOT_I32(v)));
  STORE_T_I32(c);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xa(%rcx), %ecx
movl 0x20(%rax,%rcx,4), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
movl 0x20(%rax,%rcx,4), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
addl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
movl 0x14c(%rcx), %ecx
andl $0x1, %ecx
addl %ecx, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %edx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
movl %edx, 0x20(%rax,%rcx,4)
movl -0x18(%rbp), %eax
andl -0x14(%rbp), %eax
movl -0x18(%rbp), %ecx
orl -0x14(%rbp), %ecx
movl -0x1c(%rbp), %edx
xorl $-0x1, %edx
andl %edx, %ecx
orl %ecx, %eax
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movl 0x14c(%rax), %ecx
andl $-0x2, %ecx
movl -0x20(%rbp), %esi
movl $0x1, %eax
xorl %edx, %edx
cmpl $0x0, %esi
cmovel %edx, %eax
orl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x14c(%rax)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x4(%rax)
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/inolen[P]gdb_server/./sh4.h
// Function: sh4_ADDV
INSTR(ADDV) {
  I32 rm = LOAD_REG_I32(i->rm);
  I32 rn = LOAD_REG_I32(i->rn);
  I32 v = ADD_I32(rn, rm);
  STORE_REG_I32(i->rn, v);

  // compute overflow flag, taken from Hacker's Delight
  I32 c = LSHR_IMM_I32(AND_I32(XOR_I32(v, rn), XOR_I32(v, rm)), 31);
  STORE_T_I32(c);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xa(%rcx), %ecx
movl 0x20(%rax,%rcx,4), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
movl 0x20(%rax,%rcx,4), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %edx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
movl %edx, 0x20(%rax,%rcx,4)
movl -0x1c(%rbp), %eax
xorl -0x18(%rbp), %eax
movl -0x1c(%rbp), %ecx
xorl -0x14(%rbp), %ecx
andl %ecx, %eax
shrl $0x1f, %eax
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movl 0x14c(%rax), %ecx
andl $-0x2, %ecx
movl -0x20(%rbp), %esi
movl $0x1, %eax
xorl %edx, %edx
cmpl $0x0, %esi
cmovel %edx, %eax
orl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x14c(%rax)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x4(%rax)
popq %rbp
retq
nopw (%rax,%rax)