// File: snuke[P]a/src/compiler.cc
// Function: main
int main(int argc, char** argv) {
  if (argc != 2) {
    cerr << "Usage : " << argv[0] << " SOURCE_FILE" << endl;
    return 0;
  }
  string base, code;
  string dir(argv[0]);
  dir = dir.substr(0, (int)(dir.size() - string("compiler").size()));
  dir += "src/base.cc";
  ReadCode(dir.c_str(), &base);
  ReadCode(argv[1], &code);
  code = Escape(code);
  int pos = base.find(comment);
  base.erase(base.begin() + pos, base.begin() + pos + comment.size());
  base.insert(base.begin() + pos, code.begin(), code.end());
  cout << base;
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x2, -0x8(%rbp)
je 0x253b
movq 0x3afa(%rip), %rdi      # 0x5ff0
leaq 0x1b1b(%rip), %rsi      # 0x4018
callq 0x2180
movq %rax, %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x2180
movq %rax, %rdi
leaq 0x1b06(%rip), %rsi      # 0x4021
callq 0x2180
movq %rax, %rdi
movq 0x3a8e(%rip), %rsi      # 0x5fb8
callq 0x21a0
movl $0x0, -0x4(%rbp)
jmp 0x290d
leaq -0x30(%rbp), %rdi
callq 0x2250
leaq -0x50(%rbp), %rdi
callq 0x2250
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x178(%rbp)
leaq -0x71(%rbp), %rdi
movq %rdi, -0x170(%rbp)
callq 0x22a0
movq -0x178(%rbp), %rsi
movq -0x170(%rbp), %rdx
leaq -0x70(%rbp), %rdi
callq 0x2cb0
jmp 0x2584
leaq -0x71(%rbp), %rdi
callq 0x21d0
leaq -0x70(%rbp), %rdi
callq 0x2100
movq %rax, -0x188(%rbp)
leaq -0xc9(%rbp), %rdi
movq %rdi, -0x180(%rbp)
callq 0x22a0
movq -0x180(%rbp), %rdx
leaq 0x1a70(%rip), %rsi      # 0x402e
leaq -0xc8(%rbp), %rdi
callq 0x2cb0
jmp 0x25cc
leaq -0xc8(%rbp), %rdi
callq 0x2100
movq %rax, %rcx
movq -0x188(%rbp), %rax
subl %ecx, %eax
movslq %eax, %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0xa8(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x2190
jmp 0x25fd
leaq -0x70(%rbp), %rdi
movq %rdi, -0x190(%rbp)
leaq -0xa8(%rbp), %rsi
movq %rsi, -0x198(%rbp)
callq 0x2220
movq -0x198(%rbp), %rdi
callq 0x2318
leaq -0xc8(%rbp), %rdi
callq 0x2318
leaq -0xc9(%rbp), %rdi
callq 0x21d0
movq -0x190(%rbp), %rdi
leaq 0x19ea(%rip), %rsi      # 0x4037
callq 0x2170
jmp 0x2654
leaq -0x70(%rbp), %rdi
callq 0x20a0
movq %rax, %rdi
leaq -0x30(%rbp), %rsi
callq 0x2930
jmp 0x266b
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq -0x50(%rbp), %rsi
callq 0x2930
jmp 0x267e
leaq -0xf0(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x2af0
jmp 0x2690
leaq -0x50(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
movq %rsi, -0x1b8(%rbp)
callq 0x2220
movq -0x1b8(%rbp), %rdi
callq 0x2318
leaq 0x3af6(%rip), %rsi      # 0x61b0
movq %rsi, -0x1b0(%rbp)
xorl %eax, %eax
movl %eax, %edx
leaq -0x30(%rbp), %rdi
movq %rdi, -0x1a8(%rbp)
callq 0x2300
movq -0x1a8(%rbp), %rdi
movl %eax, -0xf4(%rbp)
callq 0x2140
movq %rax, -0x110(%rbp)
movslq -0xf4(%rbp), %rsi
leaq -0x110(%rbp), %rdi
callq 0x2d60
movq %rax, -0x108(%rbp)
leaq -0x100(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0x2da0
movq -0x1a8(%rbp), %rdi
callq 0x2140
movq %rax, -0x130(%rbp)
movslq -0xf4(%rbp), %rsi
leaq -0x130(%rbp), %rdi
callq 0x2d60
movq -0x1b0(%rbp), %rdi
movq %rax, -0x128(%rbp)
callq 0x2100
movq %rax, %rsi
leaq -0x128(%rbp), %rdi
callq 0x2d60
movq %rax, -0x120(%rbp)
leaq -0x118(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x2da0
movq -0x1a8(%rbp), %rdi
movq -0x100(%rbp), %rsi
movq -0x118(%rbp), %rdx
callq 0x2060
movq %rax, -0x1a0(%rbp)
jmp 0x27a0
movq -0x1a0(%rbp), %rax
movq %rax, -0x138(%rbp)
leaq -0x30(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
callq 0x2140
movq %rax, -0x150(%rbp)
movslq -0xf4(%rbp), %rsi
leaq -0x150(%rbp), %rdi
callq 0x2d60
movq %rax, -0x148(%rbp)
leaq -0x140(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0x2da0
leaq -0x50(%rbp), %rdi
movq %rdi, -0x1d0(%rbp)
callq 0x2140
movq -0x1d0(%rbp), %rdi
movq %rax, -0x158(%rbp)
callq 0x20d0
movq -0x1c8(%rbp), %rdi
movq %rax, -0x160(%rbp)
movq -0x140(%rbp), %rsi
movq -0x158(%rbp), %rdx
movq -0x160(%rbp), %rcx
callq 0x2de0
movq %rax, -0x1c0(%rbp)
jmp 0x2846
movq -0x1c0(%rbp), %rax
movq %rax, -0x168(%rbp)
movq 0x3775(%rip), %rdi      # 0x5fd0
leaq -0x30(%rbp), %rsi
callq 0x2160
jmp 0x2866
movl $0x0, -0x4(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x2318
leaq -0x50(%rbp), %rdi
callq 0x2318
leaq -0x30(%rbp), %rdi
callq 0x2318
jmp 0x290d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x71(%rbp), %rdi
callq 0x21d0
jmp 0x28f9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x28d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x2318
leaq -0xc9(%rbp), %rdi
callq 0x21d0
jmp 0x28f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x2318
leaq -0x50(%rbp), %rdi
callq 0x2318
leaq -0x30(%rbp), %rdi
callq 0x2318
jmp 0x2919
movl -0x4(%rbp), %eax
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
movq -0x80(%rbp), %rdi
callq 0x2290
nopw %cs:(%rax,%rax)