// File: /workspace/github_c_makefile_star2_O0/hikalium[P]compilium/compilium.c
// Function: ParseCompilerArgs
static struct Node *ParseCompilerArgs(int argc, char **argv) {
  // returns replacement_list: ASTList which contains macro replacement
  struct Node *replacement_list = AllocList();
  symbol_prefix = "_";
  for (int i = 1; i < argc; i++) {
    if (strcmp(argv[i], "--target-os") == 0) {
      i++;
      if (strcmp(argv[i], "Darwin") == 0) {
        symbol_prefix = "_";
        // Define __APPLE__ macro
        PushKeyValueToList(replacement_list, "__APPLE__",
                           CreateMacroReplacement(NULL, NULL));
      } else if (strcmp(argv[i], "Linux") == 0) {
        symbol_prefix = "";
      } else {
        Error("Unknown os type %s", argv[i]);
      }
    } else if (strcmp(argv[i], "-I") == 0) {
      i++;
      include_path = argv[i];
      assert(include_path);
      if (include_path[strlen(include_path) - 1] != '/') {
        Error("Include path (-I <path>) should be ended with '/'");
      }
      fprintf(stderr, "Include path: %s\n", include_path);
    } else if (strcmp(argv[i], "--run-unittest=List") == 0) {
      TestList();
    } else if (strcmp(argv[i], "--run-unittest=Type") == 0) {
      TestType();
    } else if (strcmp(argv[i], "-E") == 0) {
      is_preprocess_only = true;
    } else {
      Error("Unknown argument: %s", argv[i]);
    }
  }
  return replacement_list;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
callq 0x4e30
movq %rax, -0x18(%rbp)
leaq 0xb14b(%rip), %rax      # 0x1086a
movq %rax, 0xfc22(%rip)      # 0x15348
movl $0x1, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x5961
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xb103(%rip), %rsi      # 0x1084f
callq 0x20f0
cmpl $0x0, %eax
jne 0x5805
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xb0e5(%rip), %rsi      # 0x1085b
callq 0x20f0
cmpl $0x0, %eax
jne 0x57b7
leaq 0xb0e3(%rip), %rax      # 0x1086a
movq %rax, 0xfbba(%rip)      # 0x15348
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
xorl %eax, %eax
movl %eax, %esi
movq %rsi, %rdi
callq 0x4140
movq -0x28(%rbp), %rdi
movq %rax, %rdx
leaq 0xb0b2(%rip), %rsi      # 0x10862
callq 0x4f60
jmp 0x5800
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xb0a2(%rip), %rsi      # 0x1086c
callq 0x20f0
cmpl $0x0, %eax
jne 0x57e4
leaq 0xaaa9(%rip), %rax      # 0x10284
movq %rax, 0xfb66(%rip)      # 0x15348
jmp 0x57fe
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xb07b(%rip), %rdi      # 0x10872
movb $0x0, %al
callq 0x4a40
jmp 0x5800
jmp 0x5951
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xb06d(%rip), %rsi      # 0x10885
callq 0x20f0
cmpl $0x0, %eax
jne 0x58c1
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0xfb0e(%rip)      # 0x15350
cmpq $0x0, 0xfb06(%rip)      # 0x15350
jne 0x5864
leaq 0xb035(%rip), %rdi      # 0x10888
leaq 0xad22(%rip), %rsi      # 0x1057c
movl $0x2c, %edx
callq 0x4b20
movq 0xfae5(%rip), %rax      # 0x15350
movq %rax, -0x30(%rbp)
movq 0xfada(%rip), %rdi      # 0x15350
callq 0x2070
movq %rax, %rcx
movq -0x30(%rbp), %rax
subq $0x1, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2f, %eax
je 0x589d
leaq 0xafff(%rip), %rdi      # 0x10895
movb $0x0, %al
callq 0x4a40
movq 0xf754(%rip), %rax      # 0x14ff8
movq (%rax), %rdi
movq 0xfaa2(%rip), %rdx      # 0x15350
leaq 0xb012(%rip), %rsi      # 0x108c7
movb $0x0, %al
callq 0x2100
jmp 0x594f
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xb005(%rip), %rsi      # 0x108d9
callq 0x20f0
cmpl $0x0, %eax
jne 0x58e5
callq 0x5230
jmp 0x594d
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xaff5(%rip), %rsi      # 0x108ed
callq 0x20f0
cmpl $0x0, %eax
jne 0x5909
callq 0xea30
jmp 0x594b
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xafe5(%rip), %rsi      # 0x10901
callq 0x20f0
cmpl $0x0, %eax
jne 0x592f
movb $0x1, 0xfa13(%rip)      # 0x15340
jmp 0x5949
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xafc2(%rip), %rdi      # 0x10904
movb $0x0, %al
callq 0x4a40
jmp 0x594b
jmp 0x594d
jmp 0x594f
jmp 0x5951
jmp 0x5953
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x572d
movq -0x18(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)