LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 0xdc7b(%rip), %rdi      # 0x104e8
pushq $0x12
popq %rsi
pushq $0x1
popq %rdx
callq 0x2560
leaq 0xdc7c(%rip), %rsi      # 0x104fb
pushq $0x20
popq %rcx
movq %rbp, %rdi
movq %rbx, %rdx
callq 0x7a0e
testq %rax, %rax
je 0x28db
movq %rax, %rbx
leaq 0xdc7a(%rip), %r8       # 0x10516
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r9
callq 0x3993
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 0xdc14(%rip), %rdi      # 0x10503
xorl %eax, %eax
callq 0x73f0
andl $0x0, (%rbx)
jmp 0x2948
callq 0x2040
cmpl $0x0, (%rax)
je 0x292f
movq %rax, %r14
leaq 0xdc0f(%rip), %rdi      # 0x1051e
movq %rbx, %rsi
xorl %eax, %eax
callq 0x73f0
andl $0x0, (%r14)
jmp 0x2940
leaq 0xdbdd(%rip), %rdi      # 0x10503
xorl %eax, %eax
callq 0x750f
jmp 0x2948
leaq 0xdbe8(%rip), %rdi      # 0x1051e
movq %rbx, %rsi
xorl %eax, %eax
callq 0x750f
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_O1/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 0xdba5(%rip), %rdi      # 0x1053a
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 0xdb20(%rip), %r8       # 0x10516
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq 0x8(%rsp), %rcx
movq %rax, %r9
callq 0x3993
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 0xdab8(%rip), %rdi      # 0x10503
xorl %eax, %eax
callq 0x73f0
andl $0x0, (%rbx)
jmp 0x2aa4
callq 0x2040
cmpl $0x0, (%rax)
je 0x2a8b
movq %rax, %r14
leaq 0xdae8(%rip), %rdi      # 0x10553
movq %rbx, %rsi
xorl %eax, %eax
callq 0x73f0
andl $0x0, (%r14)
jmp 0x2a9c
leaq 0xda81(%rip), %rdi      # 0x10503
xorl %eax, %eax
callq 0x750f
jmp 0x2aa4
leaq 0xdac1(%rip), %rdi      # 0x10553
movq %rbx, %rsi
xorl %eax, %eax
callq 0x750f
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_O1/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        # 0x3a95
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 0x8162
addq $0x20, %rsp
testq %rax, %rax
je 0x3a20
leaq 0x8(%rsp), %rdi
callq 0x40f1
testl %eax, %eax
je 0x3a46
callq 0x2040
cmpl $0x0, (%rax)
je 0x3a5c
movq %rax, %r14
leaq 0xca4e(%rip), %rdi      # 0x1046c
jmp 0x3a34
callq 0x2040
cmpl $0x0, (%rax)
je 0x3a65
movq %rax, %r14
leaq 0xca17(%rip), %rdi      # 0x1044b
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x73f0
movl $0x0, (%r14)
jmp 0x3a83
movl 0xc(%rsp), %eax
testl %eax, %eax
je 0x3a81
cmpl $0xc8, %eax
jne 0x3a77
movq 0x10(%rsp), %rbx
jmp 0x3a83
leaq 0xca09(%rip), %rdi      # 0x1046c
jmp 0x3a6c
leaq 0xc9df(%rip), %rdi      # 0x1044b
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x750f
jmp 0x3a83
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_O1/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 0x3afe
movq %rsi, %r14
movq 0x18(%rsi), %r15
testq %r15, %r15
je 0x3acb
movq 0x20(%r14), %rax
xorl %ecx, %ecx
cmpb $0x0, (%rax,%rcx)
je 0x3b1a
incq %rcx
cmpq %rcx, %r15
jne 0x3abd
movl (%r14), %eax
movl %eax, 0x4(%rbx)
leaq 0x1(%r15), %rdi
callq 0x2430
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x3b3f
movq %rax, %r12
movq 0x20(%r14), %rsi
movq %rax, %rdi
movq %r15, %rdx
callq 0x2240
movb $0x0, (%r12,%r15)
xorl %ebp, %ebp
jmp 0x3b44
leaq 0xc9a6(%rip), %rdi      # 0x104ab
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x750f
callq 0x2040
movl %ebp, (%rax)
movl %ebp, 0x4(%rbx)
jmp 0x3b44
leaq 0xc9a2(%rip), %rdi      # 0x104c3
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x750f
callq 0x2040
movl %ebp, (%rax)
movl %ebp, 0x4(%rbx)
movq 0x20(%r14), %rdi
callq 0x23c0
jmp 0x3b44
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
callq 0x1040
movl %eax, %ebx
shll $0x18, %ebx
cmpl $0x8ffffff, %ebx        # imm = 0x8FFFFFF
jle 0x1180
cmpl $0x5c000000, %ebx       # imm = 0x5C000000
je 0x1199
cmpl $0x9000000, %ebx        # imm = 0x9000000
jne 0x11b2
movl $0x5c, %edi
callq 0x1030
movl $0x74, %ebx
jmp 0x11b5
cmpl $0x8000000, %ebx        # imm = 0x8000000
jne 0x11aa
movl $0x5c, %edi
callq 0x1030
movl $0x62, %ebx
jmp 0x11b5
movl $0x5c, %ebx
movl $0x5c, %edi
callq 0x1030
jmp 0x11b5
cmpl $0xff000000, %ebx       # imm = 0xFF000000
je 0x11be
sarl $0x18, %ebx
movl %ebx, %edi
callq 0x1030
jmp 0x114d
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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
movzwl 0xe(%rsi), %eax
movl 0x4(%rdi), %ecx
leal (%rcx,%rax,2), %eax
addl $0x4, %eax
movq 0x160(%rdi), %rdx
andl 0x168(%rdi), %eax
movswl (%rdx,%rax), %eax
movzwl 0xc(%rsi), %edx
movl %eax, 0x20(%rdi,%rdx,4)
addl $0x2, %ecx
movl %ecx, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movzwl 0xe(%rsi), %eax
movl 0x4(%rdi), %ecx
movl %ecx, %edx
andl $-0x4, %edx
leal (%rdx,%rax,4), %eax
addl $0x4, %eax
movq 0x160(%rdi), %rdx
andl 0x168(%rdi), %eax
movl (%rdx,%rax), %eax
movzwl 0xc(%rsi), %edx
movl %eax, 0x20(%rdi,%rdx,4)
addl $0x2, %ecx
movl %ecx, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movzwl 0xc(%rsi), %eax
movslq 0x20(%rdi,%rax,4), %rax
movzwl 0xa(%rsi), %ecx
movb 0x20(%rdi,%rcx,4), %cl
movq 0x160(%rdi), %rdx
andq 0x168(%rdi), %rax
movb %cl, (%rdx,%rax)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movzwl 0xc(%rsi), %eax
movslq 0x20(%rdi,%rax,4), %rax
movzwl 0xa(%rsi), %ecx
movzwl 0x20(%rdi,%rcx,4), %ecx
movq 0x160(%rdi), %rdx
andq 0x168(%rdi), %rax
movw %cx, (%rdx,%rax)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movzwl 0xc(%rsi), %eax
movslq 0x20(%rdi,%rax,4), %rax
movzwl 0xa(%rsi), %ecx
movl 0x20(%rdi,%rcx,4), %ecx
movq 0x160(%rdi), %rdx
andq 0x168(%rdi), %rax
movl %ecx, (%rdx,%rax)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movzwl 0xc(%rsi), %eax
movslq 0x20(%rdi,%rax,4), %rcx
decq %rcx
movl %ecx, 0x20(%rdi,%rax,4)
movzwl 0xa(%rsi), %eax
movb 0x20(%rdi,%rax,4), %al
movq 0x160(%rdi), %rdx
andq 0x168(%rdi), %rcx
movb %al, (%rdx,%rcx)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movzwl 0xc(%rsi), %eax
movslq 0x20(%rdi,%rax,4), %rcx
addq $-0x2, %rcx
movl %ecx, 0x20(%rdi,%rax,4)
movzwl 0xa(%rsi), %eax
movzwl 0x20(%rdi,%rax,4), %eax
movq 0x160(%rdi), %rdx
andq 0x168(%rdi), %rcx
movw %ax, (%rdx,%rcx)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movzwl 0xc(%rsi), %eax
movslq 0x20(%rdi,%rax,4), %rcx
addq $-0x4, %rcx
movl %ecx, 0x20(%rdi,%rax,4)
movzwl 0xa(%rsi), %eax
movl 0x20(%rdi,%rax,4), %eax
movq 0x160(%rdi), %rdx
andq 0x168(%rdi), %rcx
movl %eax, (%rdx,%rcx)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movzwl 0xa(%rsi), %eax
movslq 0x20(%rdi,%rax,4), %rcx
leal 0x1(%rcx), %edx
andq 0x168(%rdi), %rcx
movq 0x160(%rdi), %r8
movsbl (%r8,%rcx), %ecx
movzwl 0xc(%rsi), %esi
movl %ecx, 0x20(%rdi,%rsi,4)
movl %edx, 0x20(%rdi,%rax,4)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movzwl 0xa(%rsi), %eax
movslq 0x20(%rdi,%rax,4), %rcx
leal 0x2(%rcx), %edx
andq 0x168(%rdi), %rcx
movq 0x160(%rdi), %r8
movswl (%r8,%rcx), %ecx
movzwl 0xc(%rsi), %esi
movl %ecx, 0x20(%rdi,%rsi,4)
movl %edx, 0x20(%rdi,%rax,4)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movzwl 0xa(%rsi), %eax
movslq 0x20(%rdi,%rax,4), %rcx
leal 0x4(%rcx), %edx
andq 0x168(%rdi), %rcx
movq 0x160(%rdi), %r8
movl (%r8,%rcx), %ecx
movzwl 0xc(%rsi), %esi
movl %ecx, 0x20(%rdi,%rsi,4)
movl %edx, 0x20(%rdi,%rax,4)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_MOVBS0D
INSTR(MOVBS0D) {
  I32 addr = ADD_IMM_I32(LOAD_REG_I32(i->rn), (int32_t)i->disp);
  I8 v = LOAD_REG_I8(0);
  STORE_I8(addr, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0xc(%rsi), %eax
movslq 0x20(%rdi,%rax,4), %rax
movzwl 0xe(%rsi), %ecx
addq %rax, %rcx
movb 0x20(%rdi), %al
movq 0x160(%rdi), %rdx
andq 0x168(%rdi), %rcx
movb %al, (%rdx,%rcx)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movzwl 0xc(%rsi), %eax
movslq 0x20(%rdi,%rax,4), %rax
movzwl 0xe(%rsi), %ecx
leaq (%rax,%rcx,2), %rax
movzwl 0x20(%rdi), %ecx
movq 0x160(%rdi), %rdx
andq 0x168(%rdi), %rax
movw %cx, (%rdx,%rax)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movzwl 0xc(%rsi), %eax
movslq 0x20(%rdi,%rax,4), %rax
movzwl 0xe(%rsi), %ecx
leaq (%rax,%rcx,4), %rax
movzwl 0xa(%rsi), %ecx
movl 0x20(%rdi,%rcx,4), %ecx
movq 0x160(%rdi), %rdx
andq 0x168(%rdi), %rax
movl %ecx, (%rdx,%rax)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movzwl 0xa(%rsi), %eax
movslq 0x20(%rdi,%rax,4), %rax
movzwl 0xe(%rsi), %ecx
addq %rax, %rcx
movq 0x160(%rdi), %rax
andq 0x168(%rdi), %rcx
movsbl (%rax,%rcx), %eax
movl %eax, 0x20(%rdi)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_MOVWLD0
INSTR(MOVWLD0) {
  I32 addr = ADD_IMM_I32(LOAD_REG_I32(i->rm), (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
movzwl 0xa(%rsi), %eax
movslq 0x20(%rdi,%rax,4), %rax
movzwl 0xe(%rsi), %ecx
leaq (%rax,%rcx,2), %rax
movq 0x160(%rdi), %rcx
andq 0x168(%rdi), %rax
movswl (%rcx,%rax), %eax
movl %eax, 0x20(%rdi)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movzwl 0xa(%rsi), %eax
movslq 0x20(%rdi,%rax,4), %rax
movzwl 0xe(%rsi), %ecx
leaq (%rax,%rcx,4), %rax
movq 0x160(%rdi), %rcx
andq 0x168(%rdi), %rax
movl (%rcx,%rax), %eax
movzwl 0xc(%rsi), %ecx
movl %eax, 0x20(%rdi,%rcx,4)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movslq 0x20(%rdi), %rax
movzwl 0xc(%rsi), %ecx
movslq 0x20(%rdi,%rcx,4), %rcx
addq %rax, %rcx
movzwl 0xa(%rsi), %eax
movb 0x20(%rdi,%rax,4), %al
movq 0x160(%rdi), %rdx
andq 0x168(%rdi), %rcx
movb %al, (%rdx,%rcx)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movslq 0x20(%rdi), %rax
movzwl 0xc(%rsi), %ecx
movslq 0x20(%rdi,%rcx,4), %rcx
addq %rax, %rcx
movzwl 0xa(%rsi), %eax
movzwl 0x20(%rdi,%rax,4), %eax
movq 0x160(%rdi), %rdx
andq 0x168(%rdi), %rcx
movw %ax, (%rdx,%rcx)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movslq 0x20(%rdi), %rax
movzwl 0xc(%rsi), %ecx
movslq 0x20(%rdi,%rcx,4), %rcx
addq %rax, %rcx
movzwl 0xa(%rsi), %eax
movl 0x20(%rdi,%rax,4), %eax
movq 0x160(%rdi), %rdx
andq 0x168(%rdi), %rcx
movl %eax, (%rdx,%rcx)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movslq 0x20(%rdi), %rax
movzwl 0xa(%rsi), %ecx
movslq 0x20(%rdi,%rcx,4), %rcx
addq %rax, %rcx
movq 0x160(%rdi), %rax
andq 0x168(%rdi), %rcx
movsbl (%rax,%rcx), %eax
movzwl 0xc(%rsi), %ecx
movl %eax, 0x20(%rdi,%rcx,4)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_MOVWL0
INSTR(MOVWL0) {
  I32 addr = ADD_I32(LOAD_REG_I32(0), LOAD_REG_I32(i->rm));
  I32 v = SEXT_I16_I32(LOAD_I16(addr));
  STORE_REG_I32(i->rn, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq 0x20(%rdi), %rax
movzwl 0xa(%rsi), %ecx
movslq 0x20(%rdi,%rcx,4), %rcx
addq %rax, %rcx
movq 0x160(%rdi), %rax
andq 0x168(%rdi), %rcx
movswl (%rax,%rcx), %eax
movzwl 0xc(%rsi), %ecx
movl %eax, 0x20(%rdi,%rcx,4)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_MOVLL0
INSTR(MOVLL0) {
  I32 addr = ADD_I32(LOAD_REG_I32(0), LOAD_REG_I32(i->rm));
  I32 v = LOAD_I32(addr);
  STORE_REG_I32(i->rn, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq 0x20(%rdi), %rax
movzwl 0xa(%rsi), %ecx
movslq 0x20(%rdi,%rcx,4), %rcx
addq %rax, %rcx
movq 0x160(%rdi), %rax
andq 0x168(%rdi), %rcx
movl (%rax,%rcx), %eax
movzwl 0xc(%rsi), %ecx
movl %eax, 0x20(%rdi,%rcx,4)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movzwl 0xe(%rsi), %eax
addl 0x10(%rdi), %eax
movb 0x20(%rdi), %cl
movq 0x160(%rdi), %rdx
cltq
andq 0x168(%rdi), %rax
movb %cl, (%rdx,%rax)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movzwl 0xe(%rsi), %eax
addl %eax, %eax
addl 0x10(%rdi), %eax
movzwl 0x20(%rdi), %ecx
movq 0x160(%rdi), %rdx
cltq
andq 0x168(%rdi), %rax
movw %cx, (%rdx,%rax)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movzwl 0xe(%rsi), %eax
shll $0x2, %eax
addl 0x10(%rdi), %eax
movl 0x20(%rdi), %ecx
movq 0x160(%rdi), %rdx
cltq
andq 0x168(%rdi), %rax
movl %ecx, (%rdx,%rax)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movzwl 0xe(%rsi), %eax
addl 0x10(%rdi), %eax
movq 0x160(%rdi), %rcx
cltq
andq 0x168(%rdi), %rax
movsbl (%rcx,%rax), %eax
movl %eax, 0x20(%rdi)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movzwl 0xe(%rsi), %eax
addl %eax, %eax
addl 0x10(%rdi), %eax
movq 0x160(%rdi), %rcx
cltq
andq 0x168(%rdi), %rax
movswl (%rcx,%rax), %eax
movl %eax, 0x20(%rdi)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_MOVLLG0
INSTR(MOVLLG0) {
  I32 addr = ADD_IMM_I32(LOAD_GBR_I32(), (int32_t)i->disp * 4);
  I32 v = LOAD_I32(addr);
  STORE_REG_I32(0, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0xe(%rsi), %eax
shll $0x2, %eax
addl 0x10(%rdi), %eax
movq 0x160(%rdi), %rcx
cltq
andq 0x168(%rdi), %rax
movl (%rcx,%rax), %eax
movl %eax, 0x20(%rdi)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movzwl 0xa(%rsi), %eax
movl 0x20(%rdi,%rax,4), %eax
movl %eax, %ecx
shrl $0x8, %ecx
xorl %eax, %ecx
movzbl %cl, %ecx
movl %ecx, %edx
shll $0x8, %edx
orl %ecx, %edx
xorl %eax, %edx
movzwl 0xc(%rsi), %eax
movl %edx, 0x20(%rdi,%rax,4)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movzwl 0xa(%rsi), %eax
movl 0x20(%rdi,%rax,4), %eax
movl %eax, %ecx
shrl $0x10, %ecx
movzwl %ax, %edx
xorl %ecx, %edx
movl %edx, %ecx
shll $0x10, %ecx
orl %edx, %ecx
xorl %eax, %ecx
movzwl 0xc(%rsi), %eax
movl %ecx, 0x20(%rdi,%rax,4)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movzwl 0xa(%rsi), %eax
movl 0x20(%rdi,%rax,4), %eax
movzwl 0xc(%rsi), %ecx
movl 0x20(%rdi,%rcx,4), %edx
shrdl $0x10, %eax, %edx
movl %edx, 0x20(%rdi,%rcx,4)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movzwl 0xc(%rsi), %eax
movsbl 0x10(%rsi), %ecx
addl %ecx, 0x20(%rdi,%rax,4)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movzwl 0xa(%rsi), %eax
movl 0x20(%rdi,%rax,4), %eax
movzwl 0xc(%rsi), %ecx
movl 0x20(%rdi,%rcx,4), %edx
movl 0x14c(%rdi), %r8d
andl $0x1, %r8d
addl %edx, %r8d
addl %eax, %r8d
movl %r8d, 0x20(%rdi,%rcx,4)
movl %edx, %ecx
andl %eax, %ecx
orl %eax, %edx
notl %r8d
andl %edx, %r8d
movl 0x14c(%rdi), %eax
andl $-0x2, %eax
xorl %edx, %edx
orl %ecx, %r8d
setne %dl
orl %eax, %edx
movl %edx, 0x14c(%rdi)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movzwl 0xa(%rsi), %eax
movl 0x20(%rdi,%rax,4), %eax
movzwl 0xc(%rsi), %ecx
movl 0x20(%rdi,%rcx,4), %edx
leal (%rdx,%rax), %esi
movl %esi, 0x20(%rdi,%rcx,4)
xorl %esi, %edx
xorl %eax, %esi
andl %edx, %esi
movl 0x14c(%rdi), %eax
andl $-0x2, %eax
shrl $0x1f, %esi
orl %eax, %esi
movl %esi, 0x14c(%rdi)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_CMPEQI
INSTR(CMPEQI) {
  int32_t imm = (int32_t)(int8_t)i->imm;
  I32 r0 = LOAD_REG_I32(0);
  I32 eq = CMPEQ_IMM_I32(r0, imm);
  STORE_T_I32(eq);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movsbl 0x10(%rsi), %eax
xorl %ecx, %ecx
cmpl %eax, 0x20(%rdi)
movl 0x14c(%rdi), %eax
sete %cl
andl $-0x2, %eax
orl %eax, %ecx
movl %ecx, 0x14c(%rdi)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_CMPEQ
INSTR(CMPEQ) {
  I32 rm = LOAD_REG_I32(i->rm);
  I32 rn = LOAD_REG_I32(i->rn);
  I32 eq = CMPEQ_I32(rn, rm);
  STORE_T_I32(eq);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0xa(%rsi), %eax
movzwl 0xc(%rsi), %ecx
movl 0x20(%rdi,%rcx,4), %ecx
xorl %edx, %edx
cmpl 0x20(%rdi,%rax,4), %ecx
sete %dl
movl 0x14c(%rdi), %eax
andl $-0x2, %eax
orl %eax, %edx
movl %edx, 0x14c(%rdi)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_CMPGE
INSTR(CMPGE) {
  I32 rm = LOAD_REG_I32(i->rm);
  I32 rn = LOAD_REG_I32(i->rn);
  I32 r = CMPSGE_I32(rn, rm);
  STORE_T_I32(r);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0xa(%rsi), %eax
movzwl 0xc(%rsi), %ecx
movl 0x20(%rdi,%rcx,4), %ecx
xorl %edx, %edx
cmpl 0x20(%rdi,%rax,4), %ecx
setge %dl
movl 0x14c(%rdi), %eax
andl $-0x2, %eax
orl %eax, %edx
movl %edx, 0x14c(%rdi)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_CMPPZ
INSTR(CMPPZ) {
  I32 rn = LOAD_REG_I32(i->rn);
  I32 r = CMPSGE_IMM_I32(rn, 0);
  STORE_T_I32(r);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0xc(%rsi), %eax
movl 0x20(%rdi,%rax,4), %eax
movl 0x14c(%rdi), %ecx
andl $-0x2, %ecx
notl %eax
shrl $0x1f, %eax
orl %ecx, %eax
movl %eax, 0x14c(%rdi)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_CMPPL
INSTR(CMPPL) {
  I32 rn = LOAD_REG_I32(i->rn);
  I32 r = CMPSGT_IMM_I32(rn, 0);
  STORE_T_I32(r);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0xc(%rsi), %eax
xorl %ecx, %ecx
cmpl $0x0, 0x20(%rdi,%rax,4)
setg %cl
movl 0x14c(%rdi), %eax
andl $-0x2, %eax
orl %eax, %ecx
movl %ecx, 0x14c(%rdi)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_CMPSTR
INSTR(CMPSTR) {
  // if any diff is zero, the bytes match
  I32 rm = LOAD_REG_I32(i->rm);
  I32 rn = LOAD_REG_I32(i->rn);
  I32 diff = XOR_I32(rn, rm);
  I32 b4_eq = CMPEQ_IMM_I32(AND_I32(diff, 0xff000000), 0);
  I32 b3_eq = CMPEQ_IMM_I32(AND_I32(diff, 0x00ff0000), 0);
  I32 b2_eq = CMPEQ_IMM_I32(AND_I32(diff, 0x0000ff00), 0);
  I32 b1_eq = CMPEQ_IMM_I32(AND_I32(diff, 0x000000ff), 0);
  I32 r = OR_I32(OR_I32(OR_I32(b1_eq, b2_eq), b3_eq), b4_eq);
  STORE_T_I32(r);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0xa(%rsi), %eax
movzwl 0xc(%rsi), %ecx
movl 0x20(%rdi,%rcx,4), %ecx
xorl 0x20(%rdi,%rax,4), %ecx
cmpl $0x1000000, %ecx        # imm = 0x1000000
setb %al
testl $0xff0000, %ecx         # imm = 0xFF0000
sete %dl
testl $0xff00, %ecx           # imm = 0xFF00
sete %sil
testb %cl, %cl
sete %cl
orb %sil, %cl
orb %al, %dl
orb %cl, %dl
movl 0x14c(%rdi), %eax
andl $-0x2, %eax
movzbl %dl, %ecx
orl %eax, %ecx
movl %ecx, 0x14c(%rdi)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_DIV0S
INSTR(DIV0S) {
  I32 rm = LOAD_REG_I32(i->rm);
  I32 rn = LOAD_REG_I32(i->rn);
  I32 qm = XOR_I32(rn, rm);

  // update Q == M flag
  STORE_QM_I32(NOT_I32(qm));

  // msb of Q ^ M -> T
  I32 r = LSHR_IMM_I32(qm, 31);
  STORE_T_I32(r);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0xa(%rsi), %eax
movzwl 0xc(%rsi), %ecx
movl 0x20(%rdi,%rcx,4), %ecx
xorl 0x20(%rdi,%rax,4), %ecx
movl %ecx, %eax
notl %eax
movl %eax, 0x154(%rdi)
movl 0x14c(%rdi), %eax
andl $-0x2, %eax
shrl $0x1f, %ecx
orl %eax, %ecx
movl %ecx, 0x14c(%rdi)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_DIV1
INSTR(DIV1) {
  I32 rm = LOAD_REG_I32(i->rm);
  I32 rn = LOAD_REG_I32(i->rn);

  // if Q == M, r0 = ~Rm and C = 1; else, r0 = Rm and C = 0
  I32 qm = ASHR_IMM_I32(LOAD_QM_I32(), 31);
  I32 r0 = XOR_I32(rm, qm);
  I32 carry = LSHR_IMM_I32(qm, 31);

  // initialize output bit as (Q == M) ^ Rn
  qm = XOR_I32(qm, rn);

  // shift Rn left by 1 and add T
  rn = OR_I32(SHL_IMM_I32(rn, 1), LOAD_T_I32());

  // add or subtract Rm based on r0 and C
  I32 rd = ADD_I32(ADD_I32(rn, r0), carry);
  STORE_REG_I32(i->rn, rd);

  // if C is cleared, invert output bit
  carry = LSHR_IMM_I32(
      OR_I32(AND_I32(rn, r0), AND_I32(OR_I32(rn, r0), NOT_I32(rd))), 31);
  qm = SELECT_I32(carry, qm, NOT_I32(qm));
  STORE_QM_I32(qm);

  // set T to output bit (which happens to be Q == M)
  STORE_T_I32(LSHR_IMM_I32(qm, 31));

  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0xa(%rsi), %edx
movzwl 0xc(%rsi), %esi
movl 0x20(%rdi,%rsi,4), %ecx
movl 0x14c(%rdi), %r8d
movl 0x154(%rdi), %r9d
movl %r9d, %eax
sarl $0x1f, %eax
movl 0x20(%rdi,%rdx,4), %edx
xorl %eax, %edx
shrl $0x1f, %r9d
leal (%rcx,%rcx), %r10d
andl $0x1, %r8d
leal (%r8,%rcx,2), %r8d
addl %edx, %r8d
addl %r9d, %r8d
movl %r8d, 0x20(%rdi,%rsi,4)
movl %edx, %esi
andl %r10d, %esi
orl %r10d, %edx
notl %r8d
andl %edx, %r8d
orl %esi, %r8d
notl %r8d
sarl $0x1f, %r8d
xorl %ecx, %eax
xorl %r8d, %eax
movl %eax, 0x154(%rdi)
movl 0x14c(%rdi), %ecx
andl $-0x2, %ecx
shrl $0x1f, %eax
orl %ecx, %eax
movl %eax, 0x14c(%rdi)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_DMULS
INSTR(DMULS) {
  I64 rm = SEXT_I32_I64(LOAD_REG_I32(i->rm));
  I64 rn = SEXT_I32_I64(LOAD_REG_I32(i->rn));
  I64 p = SMUL_I64(rm, rn);
  I32 low = TRUNCATE_I64_I32(p);
  I32 high = TRUNCATE_I64_I32(LSHR_IMM_I64(p, 32));
  STORE_MACL_I32(low);
  STORE_MACH_I32(high);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0xa(%rsi), %eax
movslq 0x20(%rdi,%rax,4), %rax
movzwl 0xc(%rsi), %ecx
movslq 0x20(%rdi,%rcx,4), %rcx
imulq %rax, %rcx
rorq $0x20, %rcx
movq %rcx, 0x18(%rdi)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_DMULU
INSTR(DMULU) {
  I64 rm = ZEXT_I32_I64(LOAD_REG_I32(i->rm));
  I64 rn = ZEXT_I32_I64(LOAD_REG_I32(i->rn));
  I64 p = UMUL_I64(rm, rn);
  I32 low = TRUNCATE_I64_I32(p);
  I32 high = TRUNCATE_I64_I32(LSHR_IMM_I64(p, 32));
  STORE_MACL_I32(low);
  STORE_MACH_I32(high);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0xa(%rsi), %eax
movl 0x20(%rdi,%rax,4), %eax
movzwl 0xc(%rsi), %ecx
movl 0x20(%rdi,%rcx,4), %ecx
imulq %rax, %rcx
rorq $0x20, %rcx
movq %rcx, 0x18(%rdi)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_DT
INSTR(DT) {
  I32 rn = LOAD_REG_I32(i->rn);
  I32 v = SUB_IMM_I32(rn, 1);
  STORE_REG_I32(i->rn, v);
  STORE_T_I32(CMPEQ_IMM_I32(v, 0));
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0xc(%rsi), %eax
xorl %ecx, %ecx
decl 0x20(%rdi,%rax,4)
movl 0x14c(%rdi), %eax
sete %cl
andl $-0x2, %eax
orl %eax, %ecx
movl %ecx, 0x14c(%rdi)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_EXTSB
INSTR(EXTSB) {
  I8 rm = LOAD_REG_I8(i->rm);
  I32 v = SEXT_I8_I32(rm);
  STORE_REG_I32(i->rn, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0xa(%rsi), %eax
movsbl 0x20(%rdi,%rax,4), %eax
movzwl 0xc(%rsi), %ecx
movl %eax, 0x20(%rdi,%rcx,4)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_EXTUB
INSTR(EXTUB) {
  I8 rm = LOAD_REG_I8(i->rm);
  I32 v = ZEXT_I8_I32(rm);
  STORE_REG_I32(i->rn, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0xa(%rsi), %eax
movzbl 0x20(%rdi,%rax,4), %eax
movzwl 0xc(%rsi), %ecx
movl %eax, 0x20(%rdi,%rcx,4)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_EXTUW
INSTR(EXTUW) {
  I32 rm = LOAD_REG_I16(i->rm);
  I32 v = ZEXT_I16_I32(rm);
  STORE_REG_I32(i->rn, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0xa(%rsi), %eax
movzwl 0x20(%rdi,%rax,4), %eax
movzwl 0xc(%rsi), %ecx
movl %eax, 0x20(%rdi,%rcx,4)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_MULL
INSTR(MULL) {
  I32 rm = LOAD_REG_I32(i->rm);
  I32 rn = LOAD_REG_I32(i->rn);
  I32 v = SMUL_I32(rn, rm);
  STORE_MACL_I32(v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0xa(%rsi), %eax
movzwl 0xc(%rsi), %ecx
movl 0x20(%rdi,%rcx,4), %ecx
imull 0x20(%rdi,%rax,4), %ecx
movl %ecx, 0x1c(%rdi)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_MULS
INSTR(MULS) {
  I32 rm = SEXT_I16_I32(LOAD_REG_I16(i->rm));
  I32 rn = SEXT_I16_I32(LOAD_REG_I16(i->rn));
  I32 v = SMUL_I32(rn, rm);
  STORE_MACL_I32(v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0xa(%rsi), %eax
movswl 0x20(%rdi,%rax,4), %eax
movzwl 0xc(%rsi), %ecx
movswl 0x20(%rdi,%rcx,4), %ecx
imull %eax, %ecx
movl %ecx, 0x1c(%rdi)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_MULU
INSTR(MULU) {
  I32 rm = ZEXT_I16_I32(LOAD_REG_I16(i->rm));
  I32 rn = ZEXT_I16_I32(LOAD_REG_I16(i->rn));
  I32 v = UMUL_I32(rn, rm);
  STORE_MACL_I32(v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0xa(%rsi), %eax
movzwl 0x20(%rdi,%rax,4), %eax
movzwl 0xc(%rsi), %ecx
movzwl 0x20(%rdi,%rcx,4), %ecx
imull %eax, %ecx
movl %ecx, 0x1c(%rdi)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_NEG
INSTR(NEG) {
  I32 rm = LOAD_REG_I32(i->rm);
  I32 v = NEG_I32(rm);
  STORE_REG_I32(i->rn, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0xa(%rsi), %eax
xorl %ecx, %ecx
subl 0x20(%rdi,%rax,4), %ecx
movzwl 0xc(%rsi), %eax
movl %ecx, 0x20(%rdi,%rax,4)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_NEGC
INSTR(NEGC) {
  I32 t = LOAD_T_I32();
  I32 rm = LOAD_REG_I32(i->rm);
  I32 v = SUB_I32(NEG_I32(rm), t);
  STORE_REG_I32(i->rn, v);
  I32 c = OR_I32(t, rm);
  STORE_T_I32(c);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x14c(%rdi), %eax
andl $0x1, %eax
movzwl 0xa(%rsi), %ecx
movl 0x20(%rdi,%rcx,4), %ecx
leal (%rax,%rcx), %edx
negl %edx
movzwl 0xc(%rsi), %esi
movl %edx, 0x20(%rdi,%rsi,4)
movl 0x14c(%rdi), %edx
andl $-0x2, %edx
xorl %esi, %esi
orl %ecx, %eax
setne %sil
orl %edx, %esi
movl %esi, 0x14c(%rdi)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_SUB
INSTR(SUB) {
  I32 rm = LOAD_REG_I32(i->rm);
  I32 rn = LOAD_REG_I32(i->rn);
  I32 v = SUB_I32(rn, rm);
  STORE_REG_I32(i->rn, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0xa(%rsi), %eax
movl 0x20(%rdi,%rax,4), %eax
movzwl 0xc(%rsi), %ecx
subl %eax, 0x20(%rdi,%rcx,4)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_SUBC
INSTR(SUBC) {
  I32 rm = LOAD_REG_I32(i->rm);
  I32 rn = LOAD_REG_I32(i->rn);
  I32 v = SUB_I32(SUB_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(NOT_I32(rn), rm), AND_I32(OR_I32(NOT_I32(rn), rm), v));
  STORE_T_I32(c);

  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0xa(%rsi), %eax
movl 0x20(%rdi,%rax,4), %eax
movzwl 0xc(%rsi), %ecx
movl 0x20(%rdi,%rcx,4), %edx
movl 0x14c(%rdi), %esi
andl $0x1, %esi
addl %eax, %esi
movl %edx, %r8d
subl %esi, %r8d
movl %r8d, 0x20(%rdi,%rcx,4)
notl %edx
movl %eax, %ecx
andl %edx, %ecx
orl %eax, %edx
andl %r8d, %edx
movl 0x14c(%rdi), %eax
andl $-0x2, %eax
xorl %esi, %esi
orl %ecx, %edx
setne %sil
orl %eax, %esi
movl %esi, 0x14c(%rdi)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_SUBV
INSTR(SUBV) {
  I32 rm = LOAD_REG_I32(i->rm);
  I32 rn = LOAD_REG_I32(i->rn);
  I32 v = SUB_I32(rn, rm);
  STORE_REG_I32(i->rn, v);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0xa(%rsi), %eax
movl 0x20(%rdi,%rax,4), %eax
movzwl 0xc(%rsi), %ecx
movl 0x20(%rdi,%rcx,4), %edx
movl %edx, %esi
subl %eax, %esi
movl %esi, 0x20(%rdi,%rcx,4)
xorl %edx, %eax
xorl %edx, %esi
andl %eax, %esi
movl 0x14c(%rdi), %eax
andl $-0x2, %eax
shrl $0x1f, %esi
orl %eax, %esi
movl %esi, 0x14c(%rdi)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_AND
INSTR(AND) {
  I32 rn = LOAD_REG_I32(i->rn);
  I32 rm = LOAD_REG_I32(i->rm);
  I32 v = AND_I32(rn, rm);
  STORE_REG_I32(i->rn, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0xc(%rsi), %eax
movzwl 0xa(%rsi), %ecx
movl 0x20(%rdi,%rcx,4), %ecx
andl %ecx, 0x20(%rdi,%rax,4)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_ANDI
INSTR(ANDI) {
  I32 r0 = LOAD_REG_I32(0);
  I32 mask = i->imm;
  I32 v = AND_I32(r0, mask);
  STORE_REG_I32(0, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0x10(%rsi), %eax
andl %eax, 0x20(%rdi)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_ANDB
INSTR(ANDB) {
  I32 r0 = LOAD_REG_I32(0);
  I32 gbr = LOAD_GBR_I32();
  I32 addr = ADD_I32(r0, gbr);
  I8 data = LOAD_I8(addr);
  I8 mask = i->imm;
  I8 v = AND_I8(data, mask);
  STORE_I8(addr, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq 0x20(%rdi), %rax
movslq 0x10(%rdi), %rcx
addq %rax, %rcx
movq 0x160(%rdi), %rax
andq 0x168(%rdi), %rcx
movb 0x10(%rsi), %dl
andb %dl, (%rax,%rcx)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_NOT
INSTR(NOT) {
  I32 rm = LOAD_REG_I32(i->rm);
  I32 v = NOT_I32(rm);
  STORE_REG_I32(i->rn, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0xa(%rsi), %eax
movl 0x20(%rdi,%rax,4), %eax
notl %eax
movzwl 0xc(%rsi), %ecx
movl %eax, 0x20(%rdi,%rcx,4)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_OR
INSTR(OR) {
  I32 rn = LOAD_REG_I32(i->rn);
  I32 rm = LOAD_REG_I32(i->rm);
  I32 v = OR_I32(rn, rm);
  STORE_REG_I32(i->rn, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0xc(%rsi), %eax
movzwl 0xa(%rsi), %ecx
movl 0x20(%rdi,%rcx,4), %ecx
orl %ecx, 0x20(%rdi,%rax,4)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_ORI
INSTR(ORI) {
  I32 r0 = LOAD_REG_I32(0);
  I32 v = OR_IMM_I32(r0, (uint32_t)i->imm);
  STORE_REG_I32(0, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0x10(%rsi), %eax
orl %eax, 0x20(%rdi)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_ORB
INSTR(ORB) {
  I32 r0 = LOAD_REG_I32(0);
  I32 gbr = LOAD_GBR_I32();
  I32 addr = ADD_I32(r0, gbr);
  I8 v = OR_IMM_I8(LOAD_I8(addr), (uint8_t)i->imm);
  STORE_I8(addr, v);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq 0x20(%rdi), %rax
movslq 0x10(%rdi), %rcx
addq %rax, %rcx
movq 0x160(%rdi), %rax
andq 0x168(%rdi), %rcx
movb 0x10(%rsi), %dl
orb %dl, (%rax,%rcx)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_TAS
INSTR(TAS) {
  I32 addr = LOAD_REG_I32(i->rn);
  I8 v = LOAD_I8(addr);
  STORE_I8(addr, OR_I8(v, (uint8_t)0x80));
  I8 r = CMPEQ_I8(v, 0);
  STORE_T_I32(r);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0xc(%rsi), %eax
movslq 0x20(%rdi,%rax,4), %rax
movq 0x160(%rdi), %rcx
andq 0x168(%rdi), %rax
movb (%rcx,%rax), %dl
movl %edx, %esi
orb $-0x80, %sil
movb %sil, (%rcx,%rax)
xorl %eax, %eax
testb %dl, %dl
sete %al
movl 0x14c(%rdi), %ecx
andl $-0x2, %ecx
orl %ecx, %eax
movl %eax, 0x14c(%rdi)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_TST
INSTR(TST) {
  I32 rm = LOAD_REG_I32(i->rm);
  I32 rn = LOAD_REG_I32(i->rn);
  I32 r = CMPEQ_IMM_I32(AND_I32(rn, rm), 0);
  STORE_T_I32(r);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0xa(%rsi), %eax
movzwl 0xc(%rsi), %ecx
movl 0x20(%rdi,%rcx,4), %ecx
xorl %edx, %edx
testl %ecx, 0x20(%rdi,%rax,4)
sete %dl
movl 0x14c(%rdi), %eax
andl $-0x2, %eax
orl %eax, %edx
movl %edx, 0x14c(%rdi)
addl $0x2, 0x4(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inolen[P]gdb_server/./sh4.h
// Function: sh4_TSTI
INSTR(TSTI) {
  I32 r0 = LOAD_REG_I32(0);
  uint32_t imm = (uint32_t)i->imm;
  I32 r = CMPEQ_IMM_I32(AND_I32(r0, imm), 0);
  STORE_T_I32(r);
  NEXT_INSTR();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0x10(%rsi), %eax
xorl %ecx, %ecx
testl %eax, 0x20(%rdi)
sete %cl
movl 0x14c(%rdi), %eax
andl $-0x2, %eax
orl %eax, %ecx
movl %ecx, 0x14c(%rdi)
addl $0x2, 0x4(%rdi)
popq %rbp
retq