LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_05/strncmp.c
// Function: strcmp_ptr
int strcmp_ptr(char *s, char *t, size_t n)
{
  while ((*s == *t) && --n)
  {
    if (*s == '\0')
      return 0;

    ++s;
    ++t;
  }

  // If the s string contains more characters than t, then the t char will
  // become '\0' before s char. If this happen then the s char will be its ascii value and
  // t char will be 0, so the final result will be s_ascii_value - 0.

  // If the t string contains more character than s, then the s char will
  // become '\0' before t char. If this happen then the s char will be 0 and
  // t char will be whatever ascii_value is holding, so the final result will be 0 - t_ascii_value.

  return *s - *t;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
movq -0x18(%rbp), %rax
movsbl (%rax), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x21(%rbp)
jne 0x123d
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
setne %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x1246
jmp 0x1275
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x125b
movl $0x0, -0x4(%rbp)
jmp 0x1288
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x1210
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
movq -0x18(%rbp), %rcx
movsbl (%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/gregtour[P]minimal-compiler/assembler.c
// Function: EMIT
void EMIT(const char* str, 
          ...)
{
    va_list args;
    va_start(args, str);
    if (emit_tabs) fprintf(working_assembler_output, "    ");
    vfprintf(working_assembler_output, str, args);
    fprintf(working_assembler_output, "\r\n");
    va_end(args);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
testb %al, %al
je 0x11a5
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %r9, -0xa8(%rbp)
movq %r8, -0xb0(%rbp)
movq %rcx, -0xb8(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rsi, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
leaq -0x20(%rbp), %rax
leaq -0xd0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
cmpl $0x0, 0x2e61(%rip)      # 0x4058
je 0x120e
movq 0x2e50(%rip), %rdi      # 0x4050
leaq 0xdfd(%rip), %rsi       # 0x2004
movb $0x0, %al
callq 0x1040
movq 0x2e3b(%rip), %rdi      # 0x4050
movq -0x8(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x1060
movq 0x2e27(%rip), %rdi      # 0x4050
leaq 0xdd9(%rip), %rsi       # 0x2009
xorl %eax, %eax
callq 0x1040
addq $0xd0, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/gregtour[P]minimal-compiler/assembler.c
// Function: EMIT_HEADER
void EMIT_HEADER()
{
    EMIT("// Beginning of source file");
    EMIT("#include <stdio.h>");
    EMIT("#include <stdlib.h>");
    EMIT("");
    EMIT("int main(int arg_c, char* arg_v[]) \r\n{");
    EMIT("  __asm");
    EMIT("  {");
    emit_tabs = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xd11(%rip), %rdi       # 0x200c
movb $0x0, %al
callq 0x1170
leaq 0xd1f(%rip), %rdi       # 0x2028
movb $0x0, %al
callq 0x1170
leaq 0xd24(%rip), %rdi       # 0x203b
movb $0x0, %al
callq 0x1170
leaq 0xce6(%rip), %rdi       # 0x200b
movb $0x0, %al
callq 0x1170
leaq 0xd1c(%rip), %rdi       # 0x204f
movb $0x0, %al
callq 0x1170
leaq 0xd35(%rip), %rdi       # 0x2076
movb $0x0, %al
callq 0x1170
leaq 0xd2f(%rip), %rdi       # 0x207e
movb $0x0, %al
callq 0x1170
movl $0x1, 0x2cf8(%rip)      # 0x4058
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gregtour[P]minimal-compiler/assembler.c
// Function: EMIT_FOOTER
void EMIT_FOOTER()
{
    emit_tabs = 0;
    EMIT("  }");
    EMIT("  ");
    EMIT("  return 0;");
    EMIT("}");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x0, 0x2cda(%rip)      # 0x4058
leaq 0xcfd(%rip), %rdi       # 0x2082
movb $0x0, %al
callq 0x1170
leaq 0xc73(%rip), %rdi       # 0x2006
movb $0x0, %al
callq 0x1170
leaq 0xce5(%rip), %rdi       # 0x2086
movb $0x0, %al
callq 0x1170
leaq 0xcd5(%rip), %rdi       # 0x2084
movb $0x0, %al
callq 0x1170
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gregtour[P]minimal-compiler/assembler.c
// Function: assemble_code
void assemble_code(const char* output_src,
                         void* IR)
{
    FILE* output;
    output = fopen(output_src, "wb");
    if (output == NULL)
    {
        ERROR("Could not open output file %s.\n", output_src);
        return;
    } else {
        working_assembler_output = output;
    }
    
    EMIT_HEADER();
  
    EMIT("; Beginning of source assembly");
    GenerateProgram();
    EMIT("_emit 0x90 ;");
    
    EMIT_FOOTER();
    
    fprintf(output, "\r\n");
    fclose(output);
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq 0xcb7(%rip), %rsi       # 0x2092
callq 0x1050
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x13ed
jmp 0x143e
movq -0x18(%rbp), %rax
movq %rax, 0x2c58(%rip)      # 0x4050
callq 0x12f0
leaq 0xc91(%rip), %rdi       # 0x2095
movb $0x0, %al
callq 0x1170
callq 0x14e0
leaq 0xc9d(%rip), %rdi       # 0x20b4
movb $0x0, %al
callq 0x1170
callq 0x1370
movq -0x18(%rbp), %rdi
leaq 0xbdb(%rip), %rsi       # 0x2009
movb $0x0, %al
callq 0x1040
movq -0x18(%rbp), %rdi
callq 0x1030
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gregtour[P]minimal-compiler/assembler.c
// Function: GenerateProgram
void GenerateProgram()
{
    EMIT("jp start");
    EMIT_L("head:");

    STRINGCONST("World");   // 6    
    STRINGCONST("Hello");   // 6
    STRINGCONST("%s, %s."); // 8

    EMIT_L("start:");
    EMIT("mov eax, head");
    EMIT("push eax");
    EMIT("add eax, 6");
    EMIT("push eax");
    EMIT("add eax, 6");
    EMIT("push eax");
    EMIT("call printf");
    EMIT("pop ebx");
    EMIT("pop ebx");
    EMIT("pop ebx");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xbef(%rip), %rdi       # 0x20da
movb $0x0, %al
callq 0x1170
leaq 0xbea(%rip), %rdi       # 0x20e3
movb $0x0, %al
callq 0x1240
leaq 0xbe2(%rip), %rdi       # 0x20e9
callq 0x1480
leaq 0xbdc(%rip), %rdi       # 0x20ef
callq 0x1480
leaq 0xbd6(%rip), %rdi       # 0x20f5
callq 0x1480
leaq 0xbd2(%rip), %rdi       # 0x20fd
movb $0x0, %al
callq 0x1240
leaq 0xbcb(%rip), %rdi       # 0x2104
movb $0x0, %al
callq 0x1170
leaq 0xbcb(%rip), %rdi       # 0x2112
movb $0x0, %al
callq 0x1170
leaq 0xbc6(%rip), %rdi       # 0x211b
movb $0x0, %al
callq 0x1170
leaq 0xbaf(%rip), %rdi       # 0x2112
movb $0x0, %al
callq 0x1170
leaq 0xbaa(%rip), %rdi       # 0x211b
movb $0x0, %al
callq 0x1170
leaq 0xb93(%rip), %rdi       # 0x2112
movb $0x0, %al
callq 0x1170
leaq 0xb99(%rip), %rdi       # 0x2126
movb $0x0, %al
callq 0x1170
leaq 0xb97(%rip), %rdi       # 0x2132
movb $0x0, %al
callq 0x1170
leaq 0xb89(%rip), %rdi       # 0x2132
movb $0x0, %al
callq 0x1170
leaq 0xb7b(%rip), %rdi       # 0x2132
movb $0x0, %al
callq 0x1170
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/rajatxjain[P]gpiocfg/gpiocfg.c
// Function: usage
static void usage(char *prog)
{
	printf("\nUsage: %s [options] <command>\n\n", prog);
	printf("Options:\n");
	printf("  -p, --platform=<name>    Platform to use (Default: icelake)\n\n");
	printf("Commands:\n");
	printf("  -r, --read=<gpio pin>    Read and parse DW0/DW1 config for given pin\n");
	printf("  -v, --value=<DW0 value>  Parse the given DW0 register value\n");
	printf("  -l, --list               List the GPIO pins for selected platform\n");
	printf("  -h, --help               Print this help.\n\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
leaq 0x1dc3(%rip), %rdi      # 0x31ea
movb $0x0, %al
callq 0x1060
leaq 0x1dd6(%rip), %rdi      # 0x320b
movb $0x0, %al
callq 0x1060
leaq 0x1dd2(%rip), %rdi      # 0x3215
movb $0x0, %al
callq 0x1060
leaq 0x1e04(%rip), %rdi      # 0x3255
movb $0x0, %al
callq 0x1060
leaq 0x1e01(%rip), %rdi      # 0x3260
movb $0x0, %al
callq 0x1060
leaq 0x1e3b(%rip), %rdi      # 0x32a8
movb $0x0, %al
callq 0x1060
leaq 0x1e6c(%rip), %rdi      # 0x32e7
movb $0x0, %al
callq 0x1060
leaq 0x1ea3(%rip), %rdi      # 0x332c
movb $0x0, %al
callq 0x1060
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/rajatxjain[P]gpiocfg/gpiocfg.c
// Function: lookup_platform
static struct platform *lookup_platform(char *name)
{
	unsigned int i;
	
	for (i = 0; platforms[i]; i++)		
		if (!strcmp(platforms[i]->name, name))
			return platforms[i];

	printf("Unknown platform: %s\n", name);
	exit(-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x4bd1(%rip), %rax      # 0x6090
cmpq $0x0, (%rax,%rcx,8)
je 0x150a
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x4bbe(%rip), %rax      # 0x6090
movq (%rax,%rcx,8), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0x1090
cmpl $0x0, %eax
jne 0x14fd
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x4b9d(%rip), %rax      # 0x6090
movq (%rax,%rcx,8), %rax
addq $0x10, %rsp
popq %rbp
retq
jmp 0x14ff
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x14b3
movq -0x8(%rbp), %rsi
leaq 0x1e45(%rip), %rdi      # 0x335a
movb $0x0, %al
callq 0x1060
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x10e0
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/rajatxjain[P]gpiocfg/gpiocfg.c
// Function: lookup_pin
static int lookup_pin(char *pin_name, struct community **community, unsigned *pin_no_in_cmty)
{
	unsigned cmty_num, pin;
	struct community *cmty;

	for (cmty_num = 0; cmty_num < platform->num_communities; cmty_num++) {		
		cmty = &platform->communities[cmty_num];
		for (pin = 0; pin < cmty->num_pins; pin++)
			if (!strcmp(cmty->pin_names[pin], pin_name)) {
				*community = cmty;
				*pin_no_in_cmty = pin;
				return 1;
			}
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq 0x4b6b(%rip), %rcx      # 0x60c0
cmpl 0x28(%rcx), %eax
jae 0x15e7
movq 0x4b5b(%rip), %rax      # 0x60c0
movq 0x30(%rax), %rax
movl -0x24(%rbp), %ecx
imulq $0x1010, %rcx, %rcx     # imm = 0x1010
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jae 0x15d7
movq -0x30(%rbp), %rdi
addq $0x10, %rdi
movl -0x28(%rbp), %eax
shlq $0x5, %rax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x1090
cmpl $0x0, %eax
jne 0x15ca
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl -0x28(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x15ee
jmp 0x15cc
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x1581
jmp 0x15d9
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x154b
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/rajatxjain[P]gpiocfg/gpiocfg.c
// Function: read_pin_pad
static void read_pin_pad(char *pin_name, u_int32_t *dw0, u_int32_t *dw1)
{
	struct community *cmty;
	unsigned int pin_no_in_cmty;
	unsigned long dw0_addr, dw1_addr;

	if (!lookup_pin(pin_name, &cmty, &pin_no_in_cmty)) {
		printf("Pin lookup failure: %s\n", pin_name);
		exit (-1);
	}

	printf("Found pin          : %s\n", pin_name);
	printf("Community Name     : %s\n", cmty->name);
	printf("Community Port ID  : 0x%X\n", cmty->port_id);
	printf("Pin no in community: 0x%X (%u)\n\n",
	       pin_no_in_cmty, pin_no_in_cmty);

	dw0_addr = DW0_ADDR(cmty, pin_no_in_cmty);
	dw1_addr = DW1_ADDR(cmty, pin_no_in_cmty);
	printf("PAD_CFG_DW0 MMIO address : 0x%08X\n", dw0_addr); 
	printf("PAD_CFG_DW1 MMIO address : 0x%08X\n\n", dw1_addr);

	*dw0 = mmio_read32(dw0_addr);
	*dw1 = mmio_read32(dw1_addr);
	printf("PAD_CFG_DW0 value : 0x%08X\n", *dw0); 
	printf("PAD_CFG_DW1 value : 0x%08X\n\n", *dw1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x20(%rbp), %rsi
leaq -0x24(%rbp), %rdx
callq 0x1530
cmpl $0x0, %eax
jne 0x1646
movq -0x8(%rbp), %rsi
leaq 0x1b66(%rip), %rdi      # 0x319b
movb $0x0, %al
callq 0x1060
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x10e0
movq -0x8(%rbp), %rsi
leaq 0x1d42(%rip), %rdi      # 0x3393
movb $0x0, %al
callq 0x1060
movq -0x20(%rbp), %rax
movq (%rax), %rsi
leaq 0x1d46(%rip), %rdi      # 0x33ac
movb $0x0, %al
callq 0x1060
movq -0x20(%rbp), %rax
movl 0x8(%rax), %esi
leaq 0x1d4a(%rip), %rdi      # 0x33c5
movb $0x0, %al
callq 0x1060
movl -0x24(%rbp), %esi
movl -0x24(%rbp), %edx
leaq 0x1d51(%rip), %rdi      # 0x33e0
movb $0x0, %al
callq 0x1060
movq 0x4a23(%rip), %rax      # 0x60c0
movq 0x8(%rax), %rax
movq -0x20(%rbp), %rcx
movl 0x8(%rcx), %ecx
movq 0x4a11(%rip), %rdx      # 0x60c0
imulq 0x10(%rdx), %rcx
addq %rcx, %rax
movq 0x4a02(%rip), %rcx      # 0x60c0
addq 0x18(%rcx), %rax
movl -0x24(%rbp), %ecx
movq 0x49f4(%rip), %rdx      # 0x60c0
imulq 0x20(%rdx), %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq 0x49e1(%rip), %rax      # 0x60c0
movq 0x8(%rax), %rax
movq -0x20(%rbp), %rcx
movl 0x8(%rcx), %ecx
movq 0x49cf(%rip), %rdx      # 0x60c0
imulq 0x10(%rdx), %rcx
addq %rcx, %rax
movq 0x49c0(%rip), %rcx      # 0x60c0
addq 0x18(%rcx), %rax
movl -0x24(%rbp), %ecx
movq 0x49b2(%rip), %rdx      # 0x60c0
imulq 0x20(%rdx), %rcx
addq %rcx, %rax
addq $0x4, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rsi
leaq 0x1cd8(%rip), %rdi      # 0x3401
movb $0x0, %al
callq 0x1060
movq -0x38(%rbp), %rsi
leaq 0x1ce9(%rip), %rdi      # 0x3424
movb $0x0, %al
callq 0x1060
movq -0x30(%rbp), %rdi
callq 0x20e0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x38(%rbp), %rdi
callq 0x20e0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movl (%rax), %esi
leaq 0x1cd7(%rip), %rdi      # 0x3448
movb $0x0, %al
callq 0x1060
movq -0x18(%rbp), %rax
movl (%rax), %esi
leaq 0x1cdf(%rip), %rdi      # 0x3464
movb $0x0, %al
callq 0x1060
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/rajatxjain[P]gpiocfg/gpiocfg.c
// Function: list_gpios
static void list_gpios()
{
	unsigned cmty_num, pin;
	struct community *cmty;

	printf("Platform : %s\n", platform->name);
	printf("Available GPIO names:\n");
	for (cmty_num = 0; cmty_num < platform->num_communities; cmty_num++) {		
		cmty = &platform->communities[cmty_num];
		printf("\t%s:\n", cmty->name);
		for (pin = 0; pin < cmty->num_pins; pin++)
			printf("\t\t%s\n", cmty->pin_names[pin]);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0x40a1(%rip), %rax      # 0x60c0
movq (%rax), %rsi
leaq 0x11b2(%rip), %rdi      # 0x31db
movb $0x0, %al
callq 0x1060
leaq 0x1339(%rip), %rdi      # 0x3370
movb $0x0, %al
callq 0x1060
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
movq 0x4071(%rip), %rcx      # 0x60c0
cmpl 0x28(%rcx), %eax
jae 0x20d3
movq 0x4065(%rip), %rax      # 0x60c0
movq 0x30(%rax), %rax
movl -0x4(%rbp), %ecx
imulq $0x1010, %rcx, %rcx     # imm = 0x1010
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rsi
leaq 0x1309(%rip), %rdi      # 0x3387
movb $0x0, %al
callq 0x1060
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jae 0x20c3
movq -0x10(%rbp), %rsi
addq $0x10, %rsi
movl -0x8(%rbp), %eax
shlq $0x5, %rax
addq %rax, %rsi
leaq 0x12dc(%rip), %rdi      # 0x338d
movb $0x0, %al
callq 0x1060
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x208c
jmp 0x20c5
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x2045
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/rajatxjain[P]gpiocfg/gpiocfg.c
// Function: mmio_read32
static u_int32_t mmio_read32(unsigned long addr)
{
	int fd;
	volatile u_int32_t *ptr;
	u_int32_t val;
	unsigned int pgsize = getpagesize();
	unsigned long aligned_addr = addr & ~(pgsize - 1);
	unsigned long offset = addr & (pgsize - 1);
	
	fd = open("/dev/mem", O_RDONLY | O_SYNC);
	if (fd < 0) {
		printf("Error opening /dev/mem!!!\n");
		return -1;
	}
	ptr = mmap(NULL, pgsize, PROT_READ, MAP_SHARED, fd, aligned_addr);
	if (!ptr || ptr == MAP_FAILED) {
		printf("Error in mmap for addr 0x%X!!!\n", addr);
		return -1;
	}
	val = *(volatile u_int32_t *)((unsigned long)ptr + offset);
	munmap((void*) ptr, pgsize);
	close(fd);
	return val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
callq 0x10d0
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl -0x28(%rbp), %ecx
subl $0x1, %ecx
xorl $-0x1, %ecx
movl %ecx, %ecx
andq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl -0x28(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
andq %rcx, %rax
movq %rax, -0x38(%rbp)
leaq 0x135d(%rip), %rdi      # 0x3481
movl $0x101000, %esi         # imm = 0x101000
movb $0x0, %al
callq 0x10b0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0x2150
leaq 0x134a(%rip), %rdi      # 0x348a
movb $0x0, %al
callq 0x1060
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x21c9
movl -0x28(%rbp), %eax
movl %eax, %esi
movl -0x14(%rbp), %r8d
movq -0x30(%rbp), %r9
xorl %eax, %eax
movl %eax, %edi
movl $0x1, %ecx
movl %ecx, %edx
callq 0x1040
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x2185
movq $-0x1, %rax
cmpq %rax, -0x20(%rbp)
jne 0x21a0
movq -0x10(%rbp), %rsi
leaq 0x1315(%rip), %rdi      # 0x34a5
movb $0x0, %al
callq 0x1060
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x21c9
movq -0x20(%rbp), %rax
addq -0x38(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rdi
movl -0x28(%rbp), %eax
movl %eax, %esi
callq 0x10a0
movl -0x14(%rbp), %edi
callq 0x1080
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_1/exercise_1_18/trailing_blanks.c
// Function: main
int main(void)
{
  int len;
  char line[MAXLINE];

  while ((len = get_line(line, MAXLINE)) > 0)
  {
    remove_trailing_blanks(line, len);
    printf("%s", line);
  }

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3f0, %rsp            # imm = 0x3F0
movl $0x0, -0x4(%rbp)
leaq -0x3f0(%rbp), %rdi
movl $0x3e8, %esi            # imm = 0x3E8
callq 0x11b0
movl %eax, -0x8(%rbp)
cmpl $0x0, %eax
jle 0x11a1
leaq -0x3f0(%rbp), %rdi
movl -0x8(%rbp), %esi
callq 0x1250
leaq -0x3f0(%rbp), %rsi
leaq 0xe6c(%rip), %rdi       # 0x2004
movb $0x0, %al
callq 0x1030
jmp 0x1162
xorl %eax, %eax
addq $0x3f0, %rsp            # imm = 0x3F0
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_18/trailing_blanks.c
// Function: remove_trailing_blanks
void remove_trailing_blanks(char line[], int length)
{
  int i;

  for (i = length - 2; line[i] == ' ' || line[i] == '\t'; --i)
    ;

  line[i + 1] = '\n';
  line[i + 2] = '\0';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
subl $0x2, %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
movb $0x1, %al
cmpl $0x20, %ecx
movb %al, -0x11(%rbp)
je 0x128f
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x9, %eax
sete %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
testb $0x1, %al
jne 0x1298
jmp 0x12a5
jmp 0x129a
movl -0x10(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x1264
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb $0xa, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/hsjoihs[P]c-compiler/codegen.c
// Function: is_label_compatible
static int is_label_compatible(const struct SourceLabel *ptr_label1,
                               const struct SourceLabel *ptr_label2)
{
	if (ptr_label1->category == DEFAULT_LABEL &&
	    ptr_label2->category == DEFAULT_LABEL) {
		return 1;
	} else if (ptr_label1->category == CASE_LABEL &&
	           ptr_label2->category == CASE_LABEL &&
	           ptr_label1->case_int == ptr_label2->case_int) {
		return 1;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x1b17
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x1b17
movl $0x1, -0x4(%rbp)
jmp 0x1b4b
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x1b42
movq -0x18(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x1b42
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jne 0x1b42
movl $0x1, -0x4(%rbp)
jmp 0x1b4b
jmp 0x1b44
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/hsjoihs[P]c-compiler/codegen.c
// Function: generate
void generate(const struct Vector /*<Toplevel>*/ *ref_vec)
{
	struct PrinterState prs;
	prs.final_label_name = 1;
	prs.return_label_name = -1;
	prs.string_constant_pool = init_vector();
	prs.pool_largest_id = 0;
	prs.is_inside_switch = 0;

	for (int i = 0; i < ref_vec->length; i++) {
		const struct Toplevel *ptr = ref_vec->vector[i];
		print_toplevel_definition(&prs, ptr);
	}

	for (int i = 0; i < prs.string_constant_pool.length; ++i) {
		const char *str = prs.string_constant_pool.vector[i];
		gen_string_literal(i, escape(str));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movl $0x1, -0x58(%rbp)
movl $0xffffffff, -0x54(%rbp) # imm = 0xFFFFFFFF
callq 0x61d0
movq %rax, -0x68(%rbp)
movq %rdx, -0x60(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x38(%rbp)
movl $0x0, -0x34(%rbp)
movl $0x0, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x1bd6
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x6c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x1c30
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x1b9f
movl $0x0, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
cmpl -0x48(%rbp), %eax
jge 0x1c26
movq -0x40(%rbp), %rax
movslq -0x7c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x88(%rbp)
movl -0x7c(%rbp), %eax
movl %eax, -0x8c(%rbp)
movq -0x88(%rbp), %rdi
callq 0xf230
movl -0x8c(%rbp), %edi
movq %rax, %rsi
callq 0xdcf0
movl -0x7c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c(%rbp)
jmp 0x1bdd
addq $0x90, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/hsjoihs[P]c-compiler/codegen.c
// Function: collect_named_labels
static struct Vector /*<SourceLabel>*/
collect_named_labels(const struct Statement *ptr_sta)
{
	struct Statement sta = *ptr_sta;
	struct Vector /*<SourceLabel>*/ ans = init_vector();
	concat_vector(&ans, &sta.labels);
	switch (sta.category) {
	case RETURN_STATEMENT:
	case BREAK_STATEMENT:
	case CONTINUE_STATEMENT:
	case EXPRESSION_STATEMENT:
	case DECLARATION_STATEMENT:
	case GOTO_STATEMENT:
		/* nothing */
		break;

	case SWITCH_STATEMENT: /* do peek labels */
	case IF_STATEMENT:
	case FOR_STATEMENT:
	case WHILE_STATEMENT:
	case DO_WHILE_STATEMENT: {
		const struct Vector /*<SourceLabel>*/ inner_vec =
		    collect_named_labels(sta.inner_statement);
		concat_vector(&ans, &inner_vec);
		break;
	}

	case COMPOUND_STATEMENT:
	case IF_ELSE_STATEMENT: {
		struct Vector /*<Statement>*/ statement_vec = sta.statement_vector;
		for (int counter = 0; counter != statement_vec.length; ++counter) {
			const struct Statement *ptr_ith = statement_vec.vector[counter];
			const struct Vector /*<SourceLabel>*/ inner_vec =
			    collect_named_labels(ptr_ith);
			concat_vector(&ans, &inner_vec);
		}
		break;
	}
	}
	return ans;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3f0, %rsp            # imm = 0x3F0
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x3a8(%rbp), %rdi
movl $0x390, %edx            # imm = 0x390
callq 0x10e0
callq 0x61d0
movq %rax, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
leaq -0x30(%rbp), %rsi
leaq -0x10(%rbp), %rdi
callq 0x6370
movl -0x3a8(%rbp), %eax
movl %eax, -0x3ec(%rbp)
testl %eax, %eax
je 0x22b0
jmp 0x2224
movl -0x3ec(%rbp), %eax
subl $0x1, %eax
je 0x2281
jmp 0x2231
movl -0x3ec(%rbp), %eax
subl $0x2, %eax
je 0x22b0
jmp 0x223e
movl -0x3ec(%rbp), %eax
addl $-0x3, %eax
subl $0x3, %eax
jb 0x2281
jmp 0x224e
movl -0x3ec(%rbp), %eax
addl $-0x6, %eax
subl $0x5, %eax
jb 0x227c
jmp 0x225e
movl -0x3ec(%rbp), %eax
subl $0xb, %eax
je 0x2281
jmp 0x226b
movl -0x3ec(%rbp), %eax
subl $0xc, %eax
jne 0x233a
jmp 0x227c
jmp 0x233a
movq -0x90(%rbp), %rdi
callq 0x21d0
movq %rax, -0x3b8(%rbp)
movq %rdx, -0x3b0(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x3b8(%rbp), %rsi
callq 0x6370
jmp 0x233a
movq -0x3a0(%rbp), %rax
movq %rax, -0x3c8(%rbp)
movq -0x398(%rbp), %rax
movq %rax, -0x3c0(%rbp)
movl $0x0, -0x3cc(%rbp)
movl -0x3cc(%rbp), %eax
cmpl -0x3c8(%rbp), %eax
je 0x2338
movq -0x3c0(%rbp), %rax
movslq -0x3cc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x3d8(%rbp)
movq -0x3d8(%rbp), %rdi
callq 0x21d0
movq %rax, -0x3e8(%rbp)
movq %rdx, -0x3e0(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x3e8(%rbp), %rsi
callq 0x6370
movl -0x3cc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3cc(%rbp)
jmp 0x22d6
jmp 0x233a
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0x3f0, %rsp            # imm = 0x3F0
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hsjoihs[P]c-compiler/alignment.c
// Function: get_size_alignment_offsets_for_union
struct SizeAndAlignment get_size_alignment_offsets_for_union(
    const struct SizeAndAlignment *inner_type_vec, int **ptr_offset_vec,
    int length)
{
	struct SizeAndAlignment res;
	res.alignment = 1;

	/* union's alignment is the maximum of the members' alignments */
	for (int i = 0; i < length; i++) {
		if (inner_type_vec[i].alignment > res.alignment) {
			res.alignment = inner_type_vec[i].alignment;
		}
	}

	int max_size_of_member = 1;

	/* union's size is AT LEAST the maximum of the members' sizes */
	for (int i = 0; i < length; i++) {
		if (inner_type_vec[i].size > max_size_of_member) {
			max_size_of_member = inner_type_vec[i].size;
		}
	}

	if (max_size_of_member % res.alignment) {
		max_size_of_member +=
		    res.alignment - (max_size_of_member % res.alignment);
	}

	res.size = max_size_of_member;

	/* calloc; all is zero */
	int *offset_vec = calloc(length, sizeof(int));
	*ptr_offset_vec = offset_vec;
	return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl $0x1, -0x4(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x23a6
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movl 0x4(%rax,%rcx,8), %eax
cmpl -0x4(%rbp), %eax
jle 0x2399
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movl 0x4(%rax,%rcx,8), %eax
movl %eax, -0x4(%rbp)
jmp 0x239b
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x2371
movl $0x1, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x23e7
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
movl (%rax,%rcx,8), %eax
cmpl -0x24(%rbp), %eax
jle 0x23da
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
movl (%rax,%rcx,8), %eax
movl %eax, -0x24(%rbp)
jmp 0x23dc
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x23b4
movl -0x24(%rbp), %eax
cltd
idivl -0x4(%rbp)
cmpl $0x0, %edx
je 0x240b
movl -0x4(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x24(%rbp), %eax
cltd
idivl -0x4(%rbp)
movl -0x34(%rbp), %eax
subl %edx, %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x8(%rbp)
movslq -0x1c(%rbp), %rdi
movl $0x4, %esi
callq 0x10b0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hsjoihs[P]c-compiler/alignment.c
// Function: get_size_alignment_offsets_for_struct_not_union
struct SizeAndAlignment get_size_alignment_offsets_for_struct_not_union(
    const struct SizeAndAlignment *inner_type_vec, int **ptr_offset_vec,
    int length)
{
	struct SizeAndAlignment res;
	res.alignment = 1;

	/* struct's alignment is the maximum of the members' alignments */
	for (int i = 0; i < length; i++) {
		if (inner_type_vec[i].alignment > res.alignment) {
			res.alignment = inner_type_vec[i].alignment;
		}
	}

	int offset = 0;
	int *offset_vec = calloc(length, sizeof(int));

	for (int i = 0; i < length; i++) {
		if (offset % inner_type_vec[i].alignment) {
			offset += inner_type_vec[i].alignment -
			          (offset % inner_type_vec[i].alignment);
		}
		offset_vec[i] = offset;
		offset += inner_type_vec[i].size;
	}

	if (offset % res.alignment) {
		offset += res.alignment - (offset % res.alignment);
	}

	res.size = offset;
	*ptr_offset_vec = offset_vec;
	return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl $0x1, -0x4(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x2496
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movl 0x4(%rax,%rcx,8), %eax
cmpl -0x4(%rbp), %eax
jle 0x2489
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movl 0x4(%rax,%rcx,8), %eax
movl %eax, -0x4(%rbp)
jmp 0x248b
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x2461
movl $0x0, -0x24(%rbp)
movslq -0x1c(%rbp), %rdi
movl $0x4, %esi
callq 0x10b0
movq %rax, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x2527
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
movslq -0x34(%rbp), %rsi
cltd
idivl 0x4(%rcx,%rsi,8)
cmpl $0x0, %edx
je 0x24fd
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
movl 0x4(%rax,%rcx,8), %eax
movl %eax, -0x38(%rbp)
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
movslq -0x34(%rbp), %rsi
cltd
idivl 0x4(%rcx,%rsi,8)
movl -0x38(%rbp), %eax
subl %edx, %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %edx
movq -0x30(%rbp), %rax
movslq -0x34(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
movl (%rax,%rcx,8), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x24b6
movl -0x24(%rbp), %eax
cltd
idivl -0x4(%rbp)
cmpl $0x0, %edx
je 0x254b
movl -0x4(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x24(%rbp), %eax
cltd
idivl -0x4(%rbp)
movl -0x3c(%rbp), %eax
subl %edx, %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x8(%rbp)
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hsjoihs[P]c-compiler/parse_analyze_toplevel.c
// Function: parse
struct Vector /*<Toplevel>*/ parse(const struct Token *tokvec)
{
	struct AnalyzerState ps;
	ps.func_info_map = init_map();
	ps.global_vars_type_map = init_map();
	ps.global_struct_or_union_tag_map = init_map();
	ps.global_enum_tag_map = init_map();
	ps.global_enumerator_list = init_vector();

	struct Vector /*<Toplevel>*/ vec = init_vector();
	while (1) {
		if (tokvec[0].kind == END) {
			expect_and_consume(&tokvec, END, "the end of file");
			break;
		} else if (tokvec[0].kind == SEMICOLON) {
			if (global_flag_pedantic) {
				// gcc 12.1 with `-pedantic` flag gives out `warning: ISO C does
				// not allow extra ';' outside of a function`.
				fprintf(stderr,
				        "ISO C forbids an extra ';' outside of a function\n");
				exit(EXIT_FAILURE);
			} else {
				expect_and_consume(&tokvec, SEMICOLON, "extra ';' outside of a function\n");
			}
		} else {
			struct Toplevel *ptr = calloc(1, sizeof(struct Toplevel));
			*ptr = parse_toplevel_definition(&ps, &tokvec);
			push_vector(&vec, ptr);
		}
	}
	return vec;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x550, %rsp            # imm = 0x550
movq %rdi, -0x18(%rbp)
callq 0xccc0
movq %rax, -0xa0(%rbp)
callq 0xccc0
movq %rax, -0xa8(%rbp)
callq 0xccc0
movq %rax, -0x40(%rbp)
callq 0xccc0
movq %rax, -0x38(%rbp)
callq 0x61d0
movq %rax, -0xc8(%rbp)
movq %rdx, -0xc0(%rbp)
movq -0xc8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0xc0(%rbp), %rax
movq %rax, -0x28(%rbp)
callq 0x61d0
movq %rax, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x2ad2
leaq -0x18(%rbp), %rdi
movl $0x2, %esi
leaq 0x10bb3(%rip), %rdx     # 0x1367b
callq 0xb190
jmp 0x2b8a
movq -0x18(%rbp), %rax
cmpl $0x1a, (%rax)
jne 0x2b20
leaq 0x195e2(%rip), %rax     # 0x1c0c4
cmpl $0x0, (%rax)
je 0x2b09
movq 0x1950a(%rip), %rax     # 0x1bff8
movq (%rax), %rdi
leaq 0x10b93(%rip), %rsi     # 0x1368b
movb $0x0, %al
callq 0x10d0
movl $0x1, %edi
callq 0x1150
leaq -0x18(%rbp), %rdi
movl $0x1a, %esi
leaq 0x10b83(%rip), %rdx     # 0x1369c
callq 0xb190
jmp 0x2b83
movl $0x1, %edi
movl $0x470, %esi            # imm = 0x470
callq 0x10b0
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0x548(%rbp)
leaq -0x540(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
leaq -0x18(%rbp), %rdx
callq 0x2ba0
movq -0x548(%rbp), %rdi
leaq -0x540(%rbp), %rsi
movl $0x470, %edx            # imm = 0x470
callq 0x10e0
movq -0xd0(%rbp), %rsi
leaq -0x10(%rbp), %rdi
callq 0x62c0
jmp 0x2b85
jmp 0x2aaf
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0x550, %rsp            # imm = 0x550
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hsjoihs[P]c-compiler/parse_analyze_toplevel.c
// Function: record_if_global_struct_or_enum_declaration
static void
record_if_global_struct_or_enum_declaration(struct AnalyzerState *ptr_ps,
                                            const struct Type *ref_type)
{
	switch (ref_type->type_category) {
	case ARRAY:
	case FN:
	case PTR_:
		record_if_global_struct_or_enum_declaration(ptr_ps,
		                                            ref_type->derived_from);
		return;
	case VOID_:
	case INT_:
	case CHAR_:
		return;
	case STRUCT_NOT_UNION:
	case UNION:
		record_global_struct_or_union_declaration(ptr_ps, ref_type);
		return;
	case ENUM_:
		record_global_enum_declaration(ptr_ps, ref_type);
		return;
	}

	fprintf(stderr,
	        "****************************\n"
	        "* INTERNAL COMPILER ERROR @ %s\n"
	        "* Unexpected value of TypeCategory: `ref_type->type_category` is "
	        "`%d`\n"
	        "****************************\n",
	        __func__, ref_type->type_category);
	exit(EXIT_FAILURE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x18(%rbp)
subq $0x8, %rax
ja 0x31b7
movq -0x18(%rbp), %rax
leaq 0x1027d(%rip), %rcx     # 0x133f8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x3150
jmp 0x31e6
jmp 0x31e6
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x3280
jmp 0x31e6
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x3420
jmp 0x31e6
movq 0x18e3a(%rip), %rax     # 0x1bff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movl (%rax), %ecx
leaq 0x10558(%rip), %rsi     # 0x13726
leaq 0x105f1(%rip), %rdx     # 0x137c6
movb $0x0, %al
callq 0x10d0
movl $0x1, %edi
callq 0x1150
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/hsjoihs[P]c-compiler/parse_analyze_toplevel.c
// Function: push_offset_and_type
static int
push_offset_and_type(struct AnalyzerState *ptr_ps, const struct Type *ref_type,
                     struct Vector /*<LocalVarInfo>*/ *ptr_offsets_and_types,
                     const char *ident_str)
{

	int offset = add_local_var_to_scope(ptr_ps, ref_type, ident_str);

	struct LocalVarInfo info;
	info.offset = offset;
	info.type = *ref_type;

	struct LocalVarInfo *ptr1 = calloc(1, sizeof(struct LocalVarInfo));
	*ptr1 = info;
	push_vector(ptr_offsets_and_types, ptr1);

	return offset;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x3540
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x30(%rbp)
leaq -0x80(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x50, %edx
callq 0x10e0
movl $0x1, %edi
movl $0x58, %esi
callq 0x10b0
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdi
leaq -0x80(%rbp), %rsi
movl $0x58, %edx
callq 0x10e0
movq -0x18(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x62c0
movl -0x24(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/hsjoihs[P]c-compiler/parse_analyze_toplevel.c
// Function: record_global_enum_declaration
static void record_global_enum_declaration(struct AnalyzerState *ptr_ps,
                                           const struct Type *ref_type)
{
	const struct Type type = *ref_type;
	assert(type.type_category == ENUM_);

	struct Enumerators info = type.e.enum_info;
	if (!info.ptr_enumerators) { /* null; cannot record */
		return;
	}
	struct Vector /* <const char> */ idents = *info.ptr_enumerators;

	struct Vector /*<EnumeratorAndValue>*/ *ptr_e_and_v_vec = init_vector_();
	for (int i = 0; i < idents.length; i++) {
		const char *vec_i = idents.vector[i];
		struct EnumeratorAndValue *ptr_e_and_v =
		    calloc(1, sizeof(struct EnumeratorAndValue));
		ptr_e_and_v->ident = vec_i;
		ptr_e_and_v->value = i;
		push_vector(ptr_e_and_v_vec, ptr_e_and_v);
	}

	concat_vector(&ptr_ps->global_enumerator_list, ptr_e_and_v_vec);

	insert(ptr_ps->global_enum_tag_map, type.e.enum_tag, ptr_e_and_v_vec);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x60(%rbp), %rdi
movl $0x50, %edx
callq 0x10e0
cmpl $0x8, -0x60(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %edi
movb $0x0, %al
callq 0x1260
movq -0x18(%rbp), %rax
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x68(%rbp)
jne 0x346c
jmp 0x3537
movq -0x68(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x78(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x70(%rbp)
callq 0x6200
movq %rax, -0x80(%rbp)
movl $0x0, -0x84(%rbp)
movl -0x84(%rbp), %eax
cmpl -0x78(%rbp), %eax
jge 0x350b
movq -0x70(%rbp), %rax
movslq -0x84(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x90(%rbp)
movl $0x1, %edi
movl $0x10, %esi
callq 0x10b0
movq %rax, -0x98(%rbp)
movq -0x90(%rbp), %rcx
movq -0x98(%rbp), %rax
movq %rcx, (%rax)
movl -0x84(%rbp), %ecx
movq -0x98(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x80(%rbp), %rdi
movq -0x98(%rbp), %rsi
callq 0x62c0
movl -0x84(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x84(%rbp)
jmp 0x3492
movq -0x8(%rbp), %rdi
addq $0x88, %rdi
movq -0x80(%rbp), %rsi
callq 0x6370
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x80(%rbp), %rdx
callq 0xcb50
addq $0xa0, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/hsjoihs[P]c-compiler/parse_analyze_statement.c
// Function: add_local_var_to_scope
int add_local_var_to_scope(struct AnalyzerState *ptr_ps,
                           const struct Type *ref_vartype, const char *str)
{
	ptr_ps->newest_offset -= size_of(ptr_ps, ref_vartype);

	struct LocalVarInfo *ptr_varinfo = calloc(1, sizeof(struct LocalVarInfo));
	ptr_varinfo->offset = ptr_ps->newest_offset;
	ptr_varinfo->type = *ref_vartype;
	insert(ptr_ps->scope_chain.var_table, str, ptr_varinfo);

	return ptr_varinfo->offset;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2570
movl %eax, %edx
movq -0x8(%rbp), %rax
movl 0x70(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x70(%rax)
movl $0x1, %edi
movl $0x58, %esi
callq 0x10b0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movl 0x70(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x50(%rax)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x50, %edx
callq 0x10e0
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xcb50
movq -0x20(%rbp), %rax
movl 0x50(%rax), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hsjoihs[P]c-compiler/parse_analyze_statement.c
// Function: parse_labeled_statement
struct Statement parse_labeled_statement(struct AnalyzerState *ptr_ps,
                                         const struct Token **ptr_tokvec)
{
	const struct Token *tokvec = *ptr_tokvec;
	enum TokenKind kind = tokvec[0].kind;

	struct SourceLabel l;
	if (kind == RES_DEFAULT) {
		++tokvec;
		l.category = DEFAULT_LABEL;
	} else if (kind == RES_CASE) {
		++tokvec;
		const struct UntypedExpr u = parse_constant_expression(&tokvec);
		int case_int =
		    typecheck_constant_integral_expression(ptr_ps, &u, "case");
		l.category = CASE_LABEL;
		l.case_int = case_int;
	} else {
		l.ident_str = tokvec[0].ident_str;
		++tokvec;
		l.category = IDENT_LABEL;
	}
	expect_and_consume(&tokvec, COLON,
	                   "colon of `default:`, `case VALUE:`, or `ident:`");

	struct Statement s = parse_statement(ptr_ps, &tokvec);

	struct SourceLabel *ptr_l = calloc(1, sizeof(struct SourceLabel));
	*ptr_l = l;
	push_vector(&s.labels, ptr_l);
	*ptr_tokvec = tokvec;
	return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0xf0(%rbp)
movq %rdi, -0xe8(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x41, -0x1c(%rbp)
jne 0x3620
movq -0x18(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x30(%rbp)
jmp 0x3692
cmpl $0x40, -0x1c(%rbp)
jne 0x3671
movq -0x18(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x18(%rbp)
leaq -0xd0(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0xa020
movq -0x8(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
leaq 0x10264(%rip), %rdx     # 0x138b8
callq 0x6440
movl %eax, -0xd4(%rbp)
movl $0x1, -0x30(%rbp)
movl -0xd4(%rbp), %eax
movl %eax, -0x2c(%rbp)
jmp 0x3690
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x18(%rbp)
movl $0x2, -0x30(%rbp)
jmp 0x3692
leaq -0x18(%rbp), %rdi
movl $0x1d, %esi
leaq 0x1021b(%rip), %rdx     # 0x138bd
callq 0xb190
movq -0xf0(%rbp), %rdi
movq -0x8(%rbp), %rsi
leaq -0x18(%rbp), %rdx
callq 0x3720
movl $0x1, %edi
movl $0x10, %esi
callq 0x10b0
movq -0xf0(%rbp), %rdi
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
movq %rcx, 0x8(%rax)
addq $0x378, %rdi            # imm = 0x378
movq -0xe0(%rbp), %rsi
callq 0x62c0
movq -0xe8(%rbp), %rax
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rcx
movq %rdx, (%rcx)
addq $0xf0, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/hsjoihs[P]c-compiler/parse_analyze_statement.c
// Function: integer_1
static struct Expr integer_1(void)
{
	struct Expr expr;
	expr.details.type = INT_TYPE();
	expr.int_value = 1;
	expr.category = INT_VALUE;

	return expr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x60(%rbp)
movq %rdi, -0x58(%rbp)
leaq -0x50(%rbp), %rdi
callq 0xb230
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rsi
movl $0x50, %edx
callq 0x10e0
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rax
movl $0x1, 0xc8(%rdi)
movl $0x9, 0xa0(%rdi)
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/hsjoihs[P]c-compiler/parse_analyze_statement.c
// Function: declare_var_and_return_initializer
static struct Expr *declare_var_and_return_initializer(
    struct AnalyzerState *ptr_ps, const struct Type *ref_vartype,
    const char *str, const struct UntypedExpr *ptr_uexpr,
    struct Statement *ptr_statement)
{
	const struct Type vartype = *ref_vartype;
	add_local_var_to_scope(ptr_ps, ref_vartype, str);

	struct Statement s;
	s.category = DECLARATION_STATEMENT;
	s.declaration.type = vartype;
	s.declaration.ident_str = str;
	s.labels = init_vector();
	struct Statement *ptr_s = calloc(1, sizeof(struct Statement));
	*ptr_s = s;
	push_vector(&ptr_statement->statement_vector, ptr_s);

	struct Expr *ptr_expr = 0;
	if (ptr_uexpr) { /* initializer exists */
		struct UntypedExpr left_uexpr;
		left_uexpr.category = VAR;
		left_uexpr.var_name = str;

		struct UntypedExpr uexpr =
		    binary_op_untyped(&left_uexpr, ptr_uexpr, OP_EQ);
		struct Expr expr = typecheck_expression(ptr_ps, &uexpr);
		ptr_expr = calloc(1, sizeof(struct Expr));
		*ptr_expr = expr;
	}
	return ptr_expr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x670, %rsp            # imm = 0x670
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x78(%rbp), %rdi
movl $0x50, %edx
callq 0x10e0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x3540
movl $0xa, -0x408(%rbp)
leaq -0x408(%rbp), %rdi
addq $0x320, %rdi            # imm = 0x320
leaq -0x78(%rbp), %rsi
movl $0x50, %edx
callq 0x10e0
movq -0x18(%rbp), %rax
movq %rax, -0x98(%rbp)
callq 0x61d0
movq %rax, -0x418(%rbp)
movq %rdx, -0x410(%rbp)
movq -0x418(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x410(%rbp), %rax
movq %rax, -0x88(%rbp)
movl $0x1, %edi
movl $0x390, %esi            # imm = 0x390
callq 0x10b0
movq %rax, -0x420(%rbp)
movq -0x420(%rbp), %rdi
leaq -0x408(%rbp), %rsi
movl $0x390, %edx            # imm = 0x390
callq 0x10e0
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
movq -0x420(%rbp), %rsi
callq 0x62c0
movq $0x0, -0x428(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x4b1c
movl $0x3, -0x4c4(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x4a0(%rbp)
movq -0x20(%rbp), %rdx
leaq -0x568(%rbp), %rdi
leaq -0x4c8(%rbp), %rsi
movl $0x17, %ecx
callq 0x9a70
movq -0x8(%rbp), %rsi
leaq -0x668(%rbp), %rdi
leaq -0x568(%rbp), %rdx
callq 0x7130
movl $0x1, %edi
movl $0x100, %esi            # imm = 0x100
callq 0x10b0
movq %rax, -0x428(%rbp)
movq -0x428(%rbp), %rdi
leaq -0x668(%rbp), %rsi
movl $0x100, %edx            # imm = 0x100
callq 0x10e0
movq -0x428(%rbp), %rax
addq $0x670, %rsp            # imm = 0x670
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/hsjoihs[P]c-compiler/codegen_expression.c
// Function: print_address_of_lvalue
void print_address_of_lvalue(struct PrinterState *ptr_prs,
                             const struct Expr *ref_expr, const char *msg)
{
	const struct Expr expr = *ref_expr;
	switch (expr.category) {

	case LOCAL_VAR_:
	case GLOBAL_VAR_:
	case UNARY_OP_EXPR:
	case COMMA_EXPR: {
		print_address_of_lvalue_or_struct_or_union(ptr_prs, ref_expr, msg);
		return;
	}
	default:
		fprintf(stderr, "context: %s\n", msg);
		simple_error("doesn't seem like an lvalue\n");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x118(%rbp), %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x10e0
movl -0x78(%rbp), %eax
movl %eax, -0x11c(%rbp)
subl $0x1, %eax
je 0x4b7c
jmp 0x4b6c
movl -0x11c(%rbp), %eax
addl $-0x6, %eax
subl $0x2, %eax
ja 0x4b96
jmp 0x4b7c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x4bc0
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
movq 0x1745b(%rip), %rax     # 0x1bff8
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
leaq 0xfd7c(%rip), %rsi      # 0x14927
movb $0x0, %al
callq 0x10d0
leaq 0xf2b3(%rip), %rdi      # 0x13e6c
callq 0xb150
nop