// File: /workspace/github_c_makefile_star2_O3/takoeight0821[P]hoc_nyan/src/gen_ir.c
// Function: emit_expr
static IReg* emit_expr(Node* node) {
  switch (node->tag) {
  case NINT: {
    IReg* reg = new_reg(4);
    emit_ir(imm(reg, node->integer));
    return reg;
  }
  case NVAR: {
    IReg* addr = emit_lval(node);

    if (node->type->array_size == 0) {
      IReg* val = new_reg(size_of(type_of(node)));
      emit_ir(load(val, addr));
      return val;
    } else {
      return addr;
    }
  }
  case NGVAR: {
    IReg* addr = emit_lval(node);

    if (node->type->array_size == 0) {
      IReg* val = new_reg(size_of(type_of(node)));
      emit_ir(load(val, addr));
      return val;
    } else {
      return addr;
    }
  }
  case NASSIGN: {
    IReg* addr = emit_lval(node->lhs);
    IReg* val = emit_expr(node->rhs);
    IReg* val1 = new_reg(size_of(type_of(node->lhs)));
    emit_ir(move(val1, val));
    emit_ir(store(addr, val1));
    return val1;
  }
  case NADD: {
    IReg* lhs = emit_expr(node->lhs);
    IReg* rhs = emit_expr(node->rhs);
    IReg* reg = new_reg(size_of(type_of(node)));
    emit_ir(new_binop_ir(IADD, reg, lhs, rhs));
    return reg;
  }
  case NSUB: {
    IReg* lhs = emit_expr(node->lhs);
    IReg* rhs = emit_expr(node->rhs);
    IReg* reg = new_reg(size_of(type_of(node)));
    emit_ir(new_binop_ir(ISUB, reg, lhs, rhs));
    return reg;
  }
  case NMUL: {
    IReg* lhs = emit_expr(node->lhs);
    IReg* rhs = emit_expr(node->rhs);
    IReg* reg = new_reg(size_of(type_of(node)));
    emit_ir(new_binop_ir(IMUL, reg, lhs, rhs));
    return reg;
  }
  case NDIV: {
    IReg* lhs = emit_expr(node->lhs);
    IReg* rhs = emit_expr(node->rhs);
    IReg* reg = new_reg(size_of(type_of(node)));
    emit_ir(new_binop_ir(IDIV, reg, lhs, rhs));
    return reg;
  }
  case NMOD: {
    IReg* lhs = emit_expr(node->lhs);
    IReg* rhs = emit_expr(node->rhs);
    IReg* reg = new_reg(size_of(type_of(node)));
    emit_ir(new_binop_ir(IMOD, reg, lhs, rhs));
    return reg;
  }
  case NLT: {
    IReg* lhs = emit_expr(node->lhs);
    IReg* rhs = emit_expr(node->rhs);
    IReg* reg = new_reg(size_of(type_of(node)));
    emit_ir(new_binop_ir(ILT, reg, lhs, rhs));
    return reg;
  }
  case NLE: {
    IReg* lhs = emit_expr(node->lhs);
    IReg* rhs = emit_expr(node->rhs);
    IReg* reg = new_reg(size_of(type_of(node)));
    emit_ir(new_binop_ir(ILE, reg, lhs, rhs));
    return reg;
  }
  case NGT: {
    IReg* lhs = emit_expr(node->lhs);
    IReg* rhs = emit_expr(node->rhs);
    IReg* reg = new_reg(size_of(type_of(node)));
    emit_ir(new_binop_ir(IGT, reg, lhs, rhs));
    return reg;
  }
  case NGE: {
    IReg* lhs = emit_expr(node->lhs);
    IReg* rhs = emit_expr(node->rhs);
    IReg* reg = new_reg(size_of(type_of(node)));
    emit_ir(new_binop_ir(IGE, reg, lhs, rhs));
    return reg;
  }
  case NEQ: {
    IReg* lhs = emit_expr(node->lhs);
    IReg* rhs = emit_expr(node->rhs);
    IReg* reg = new_reg(size_of(type_of(node)));
    emit_ir(new_binop_ir(IEQ, reg, lhs, rhs));
    return reg;
  }
  case NNE: {
    IReg* lhs = emit_expr(node->lhs);
    IReg* rhs = emit_expr(node->rhs);
    IReg* reg = new_reg(size_of(type_of(node)));
    emit_ir(new_binop_ir(INE, reg, lhs, rhs));
    return reg;
  }
  case NLOGNOT: {
    IReg* val = emit_expr(node->expr);
    IReg* zero = new_reg(size_of(type_of(node)));
    IReg* reg = new_reg(size_of(type_of(node)));
    emit_ir(imm(zero, 0));
    emit_ir(new_binop_ir(IEQ, reg, val, zero));
    return reg;
  }
  case NNOT: {
    IReg* val = emit_expr(node->expr);
    IReg* reg = new_reg(size_of(type_of(node)));
    emit_ir(bitwise_not(reg, val));
    return reg;
  }
  case NAND: {
    IReg* lhs = emit_expr(node->lhs);
    IReg* rhs = emit_expr(node->rhs);
    IReg* reg = new_reg(size_of(type_of(node)));
    emit_ir(new_binop_ir(IAND, reg, lhs, rhs));
    return reg;
  }
  case NOR: {
    IReg* lhs = emit_expr(node->lhs);
    IReg* rhs = emit_expr(node->rhs);
    IReg* reg = new_reg(size_of(type_of(node)));
    emit_ir(new_binop_ir(IOR, reg, lhs, rhs));
    return reg;
  }
  case NXOR: {
    IReg* lhs = emit_expr(node->lhs);
    IReg* rhs = emit_expr(node->rhs);
    IReg* reg = new_reg(size_of(type_of(node)));
    emit_ir(new_binop_ir(IXOR, reg, lhs, rhs));
    return reg;
  }
  case NLOGAND: {
    char* when_lhs_false = new_label("when_lhs_false");
    char* when_lhs_true = new_label("when_lhs_true");
    char* end = new_label("end");

    IReg* lhs = emit_expr(node->lhs);
    IReg* zero = new_reg(size_of(type_of(node->lhs)));
    emit_ir(imm(zero, 0));
    IReg* lhs_cond = new_reg(size_of(type_of(node->lhs)));
    emit_ir(new_binop_ir(IEQ, lhs_cond, lhs, zero));
    emit_ir(branch(lhs_cond, when_lhs_false, when_lhs_true));

    IReg* reg = new_reg(size_of(type_of(node)));

    in_new_block(when_lhs_true);
    IReg* rhs = emit_expr(node->rhs);
    emit_ir(move(reg, rhs));
    emit_ir(jmp(end));

    in_new_block(when_lhs_false);
    emit_ir(imm(reg, 0));
    emit_ir(jmp(end));

    in_new_block(end);
    return reg;
  }
  case NLOGOR: {
    char* when_lhs_false = new_label("when_lhs_false");
    char* when_lhs_true = new_label("when_lhs_true");
    char* end = new_label("end");

    IReg* lhs = emit_expr(node->lhs);
    IReg* zero = new_reg(size_of(type_of(node->lhs)));
    emit_ir(imm(zero, 0));
    IReg* lhs_cond = new_reg(size_of(type_of(node->lhs)));
    emit_ir(new_binop_ir(IEQ, lhs_cond, lhs, zero));
    emit_ir(branch(lhs_cond, when_lhs_false, when_lhs_true));

    IReg* reg = new_reg(size_of(type_of(node)));

    in_new_block(when_lhs_true);
    emit_ir(move(reg, lhs));
    emit_ir(jmp(end));

    in_new_block(when_lhs_false);
    IReg* rhs = emit_expr(node->rhs);
    emit_ir(move(reg, rhs));
    emit_ir(jmp(end));

    in_new_block(end);
    return reg;
  }
  case NCOMMA: {
    emit_expr(node->lhs);
    return emit_expr(node->rhs);
  }
  case NDEFVAR: {
    // for initializer
    emit_ir(alloc(size_of(type_of(node))));
    /* assign_var(node->name, new); */
    return NULL;
  }
  case NCALL: {
    Vector* args = new_vec();

    for (size_t i = 0; i < node->args->length; i++) {
      IReg* arg = emit_expr(node->args->ptr[i]);
      vec_push(args, arg);
    }

    IR* ir = new_ir(ICALL);
    ir->r0 = new_reg(size_of(type_of(node)));
    ir->func_name = node->name;
    ir->args = args;
    emit_ir(ir);

    return ir->r0;
  }
  case NADDR: {
    return emit_lval(node->expr);
  }
  case NDEREF: {
    IReg* reg = new_reg(size_of(type_of(node)));
    IReg* addr = emit_expr(node->expr);
    emit_ir(load(reg, addr));
    return reg;
  }
  case NMEMBER: {
    IReg* reg = new_reg(size_of(type_of(node)));
    IReg* addr = emit_lval(node);
    emit_ir(load(reg, addr));
    return reg;
  }
  case NSIZEOF: {
    IReg* reg = new_reg(size_of(type_of(node->expr)));
    emit_ir(imm(reg, size_of(type_of(node->expr))));
    return reg;
  }
  case NCAST: {
    IReg* reg = new_reg(size_of(type_of(node->expr)));
    emit_ir(move(reg, emit_expr(node->expr)));
    return reg;
  }
  default: {
    bad_token(node->token, "error: statement cannot appear on here");
  }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
leaq 0x80c9(%rip), %rbx      # 0xeb30
movl (%r14), %eax
cmpq $0x28, %rax
ja 0x7966
movslq (%rbx,%rax,4), %rax
addq %rbx, %rax
jmpq *%rax
movq 0x18(%r14), %rdi
callq 0x6a4f
movq 0x20(%r14), %r14
jmp 0x6a67
movq %r14, %rdi
callq 0x7995
movq %rax, %rbx
movq 0x10(%r14), %rax
cmpq $0x0, 0x20(%rax)
jne 0x7684
movq %r14, %rdi
callq 0x9d62
movq %rax, %rdi
callq 0x9bf4
movq %rax, %r14
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rax, %r15
movl 0xc667(%rip), %eax      # 0x13138
leal 0x1(%rax), %ecx
movl %ecx, 0xc65e(%rip)      # 0x13138
movl %eax, 0x4(%r15)
movq %r14, 0x8(%r15)
movl $0x13, %edi
callq 0x8c14
movq %r15, 0x10(%rax)
movq %rbx, 0x18(%rax)
movq 0xc635(%rip), %rcx      # 0x13130
movq 0x8(%rcx), %rdi
movq %rax, %rsi
callq 0x30ae
movq %r15, %rbx
jmp 0x7684
movq 0x18(%r14), %rdi
callq 0x6a4f
movq %rax, %r15
movq 0x20(%r14), %rdi
callq 0x6a4f
movq %rax, %r12
movq %r14, %rdi
callq 0x9d62
movq %rax, %rdi
callq 0x9bf4
movq %rax, %r14
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rax, %rbx
movl 0xc5e6(%rip), %eax      # 0x13138
leal 0x1(%rax), %ecx
movl %ecx, 0xc5dd(%rip)      # 0x13138
movl %eax, 0x4(%rbx)
movq %r14, 0x8(%rbx)
movl $0x5, %edi
jmp 0x7663
movq %r14, %rdi
callq 0x9d62
movq %rax, %rdi
callq 0x9bf4
movq %rax, %r15
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rax, %rbx
movl 0xc5a1(%rip), %eax      # 0x13138
leal 0x1(%rax), %ecx
movl %ecx, 0xc598(%rip)      # 0x13138
movl %eax, 0x4(%rbx)
movq %r15, 0x8(%rbx)
movq 0x38(%r14), %rdi
callq 0x6a4f
jmp 0x7597
movq %r14, %rdi
callq 0x9d62
movq %rax, %rdi
callq 0x9bf4
movq %rax, %rbx
movl $0x12, %edi
callq 0x8c14
movl %ebx, 0x4(%rax)
movq 0xc554(%rip), %rcx      # 0x13130
movq 0x8(%rcx), %rdi
movq %rax, %rsi
callq 0x30ae
xorl %ebx, %ebx
jmp 0x7684
movq 0x18(%r14), %rdi
callq 0x6a4f
movq %rax, %r15
movq 0x20(%r14), %rdi
callq 0x6a4f
movq %rax, %r12
movq %r14, %rdi
callq 0x9d62
movq %rax, %rdi
callq 0x9bf4
movq %rax, %r14
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rax, %rbx
movl 0xc506(%rip), %eax      # 0x13138
leal 0x1(%rax), %ecx
movl %ecx, 0xc4fd(%rip)      # 0x13138
movl %eax, 0x4(%rbx)
movq %r14, 0x8(%rbx)
movl $0xd, %edi
jmp 0x7663
movq 0x38(%r14), %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7995
movq 0x38(%r14), %rdi
callq 0x9d62
movq %rax, %rdi
callq 0x9bf4
movq %rax, %r15
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rax, %rbx
movl 0xc4a9(%rip), %eax      # 0x13138
leal 0x1(%rax), %ecx
movl %ecx, 0xc4a0(%rip)      # 0x13138
movl %eax, 0x4(%rbx)
movq %r15, 0x8(%rbx)
movq 0x38(%r14), %rdi
callq 0x6a4f
movq %rax, %r14
movl $0x16, %edi
jmp 0x759f
movq 0x38(%r14), %rdi
callq 0x6a4f
movq %rax, %r15
movq %r14, %rdi
callq 0x9d62
movq %rax, %rdi
callq 0x9bf4
movq %rax, %r14
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rax, %rbx
movl 0xc44c(%rip), %eax      # 0x13138
leal 0x1(%rax), %ecx
movl %ecx, 0xc443(%rip)      # 0x13138
movl %eax, 0x4(%rbx)
movq %r14, 0x8(%rbx)
movl $0x10, %edi
callq 0x8c14
movq %rbx, 0x10(%rax)
movq %r15, 0x18(%rax)
jmp 0x7671
movq 0x18(%r14), %rdi
callq 0x6a4f
movq %rax, %r15
movq 0x20(%r14), %rdi
callq 0x6a4f
movq %rax, %r12
movq %r14, %rdi
callq 0x9d62
movq %rax, %rdi
callq 0x9bf4
movq %rax, %r14
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rax, %rbx
movl 0xc3e2(%rip), %eax      # 0x13138
leal 0x1(%rax), %ecx
movl %ecx, 0xc3d9(%rip)      # 0x13138
movl %eax, 0x4(%rbx)
movq %r14, 0x8(%rbx)
movl $0x7, %edi
jmp 0x7663
movq 0x18(%r14), %rdi
callq 0x6a4f
movq %rax, %r15
movq 0x20(%r14), %rdi
callq 0x6a4f
movq %rax, %r12
movq %r14, %rdi
callq 0x9d62
movq %rax, %rdi
callq 0x9bf4
movq %rax, %r14
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rax, %rbx
movl 0xc385(%rip), %eax      # 0x13138
leal 0x1(%rax), %ecx
movl %ecx, 0xc37c(%rip)      # 0x13138
movl %eax, 0x4(%rbx)
movq %r14, 0x8(%rbx)
movl $0x2, %edi
jmp 0x7663
movq 0x18(%r14), %rdi
callq 0x6a4f
movq %rax, %r15
movq 0x20(%r14), %rdi
callq 0x6a4f
movq %rax, %r12
movq %r14, %rdi
callq 0x9d62
movq %rax, %rdi
callq 0x9bf4
movq %rax, %r14
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rax, %rbx
movl 0xc328(%rip), %eax      # 0x13138
leal 0x1(%rax), %ecx
movl %ecx, 0xc31f(%rip)      # 0x13138
movl %eax, 0x4(%rbx)
movq %r14, 0x8(%rbx)
jmp 0x754a
movq 0x18(%r14), %rdi
callq 0x6a4f
movq %rax, %r15
movq 0x20(%r14), %rdi
callq 0x6a4f
movq %rax, %r12
movq %r14, %rdi
callq 0x9d62
movq %rax, %rdi
callq 0x9bf4
movq %rax, %r14
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rax, %rbx
movl 0xc2d0(%rip), %eax      # 0x13138
leal 0x1(%rax), %ecx
movl %ecx, 0xc2c7(%rip)      # 0x13138
movl %eax, 0x4(%rbx)
movq %r14, 0x8(%rbx)
movl $0xe, %edi
jmp 0x7663
xorl %eax, %eax
callq 0x307c
movq %rax, %rbx
movq 0x50(%r14), %rax
cmpq $0x0, 0x10(%rax)
je 0x6ebe
xorl %r15d, %r15d
movq (%rax), %rax
movq (%rax,%r15,8), %rdi
callq 0x6a4f
movq %rbx, %rdi
movq %rax, %rsi
callq 0x30ae
incq %r15
movq 0x50(%r14), %rax
cmpq 0x10(%rax), %r15
jb 0x6e9a
movl $0x17, %edi
callq 0x8c14
movq %rax, %r15
movq %r14, %rdi
callq 0x9d62
movq %rax, %rdi
callq 0x9bf4
movq %rax, %r12
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movl 0xc245(%rip), %ecx      # 0x13138
leal 0x1(%rcx), %edx
movl %edx, 0xc23c(%rip)      # 0x13138
movl %ecx, 0x4(%rax)
movq %r12, 0x8(%rax)
movq %rax, 0x10(%r15)
movq 0x40(%r14), %rax
movq %rax, 0x48(%r15)
movq %rbx, 0x50(%r15)
movq 0xc216(%rip), %rax      # 0x13130
movq 0x8(%rax), %rdi
movq %r15, %rsi
callq 0x30ae
movq 0x10(%r15), %rbx
jmp 0x7684
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rax, %rbx
movl 0xc1f1(%rip), %eax      # 0x13138
leal 0x1(%rax), %ecx
movl %ecx, 0xc1e8(%rip)      # 0x13138
movl %eax, 0x4(%rbx)
movq $0x4, 0x8(%rbx)
movl 0x28(%r14), %ebp
movl $0x1, %edi
movl $0x58, %esi
callq 0x20f0
movq %rbx, 0x10(%rax)
movl %ebp, 0x4(%rax)
jmp 0x7671
movq 0x18(%r14), %rdi
callq 0x6a4f
movq %rax, %r15
movq 0x20(%r14), %rdi
callq 0x6a4f
movq %rax, %r12
movq %r14, %rdi
callq 0x9d62
movq %rax, %rdi
callq 0x9bf4
movq %rax, %r14
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rax, %rbx
movl 0xc17b(%rip), %eax      # 0x13138
leal 0x1(%rax), %ecx
movl %ecx, 0xc172(%rip)      # 0x13138
movl %eax, 0x4(%rbx)
movq %r14, 0x8(%rbx)
movl $0xc, %edi
jmp 0x7663
movl 0xc14b(%rip), %edx      # 0x13128
leaq 0x7bf6(%rip), %rbx      # 0xebda
leaq 0x7c82(%rip), %rsi      # 0xec6d
movq %rbx, %rdi
xorl %eax, %eax
callq 0xd86a
movq %rax, 0x8(%rsp)
movl 0xc128(%rip), %edx      # 0x13128
incl %edx
movl %edx, 0xc120(%rip)      # 0x13128
leaq 0x7c6d(%rip), %rsi      # 0xec7c
movq %rbx, %rdi
xorl %eax, %eax
callq 0xd86a
movq %rax, %r13
movl 0xc106(%rip), %edx      # 0x13128
incl %edx
movl %edx, 0xc0fe(%rip)      # 0x13128
leaq 0x71de(%rip), %rsi      # 0xe20f
movq %rbx, %rdi
xorl %eax, %eax
callq 0xd86a
movq %rax, 0x10(%rsp)
incl 0xc0e2(%rip)            # 0x13128
movq 0x18(%r14), %rdi
callq 0x6a4f
movq %rax, %rbp
movq 0x18(%r14), %rdi
callq 0x9d62
movq %rax, %rdi
callq 0x9bf4
movq %rax, %r12
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rax, %rbx
movl 0xc0ba(%rip), %eax      # 0x13138
leal 0x1(%rax), %ecx
movl %ecx, 0xc0b1(%rip)      # 0x13138
movl %eax, 0x4(%rbx)
movq %r12, 0x8(%rbx)
movl $0x1, %edi
movl $0x58, %esi
callq 0x20f0
movq %rbx, 0x10(%rax)
movq 0xc088(%rip), %rcx      # 0x13130
movq 0x8(%rcx), %rdi
movq %rax, %rsi
callq 0x30ae
movq 0x18(%r14), %rdi
callq 0x9d62
movq %rax, %rdi
callq 0x9bf4
movq %rax, %r12
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rax, %r15
movl 0xc058(%rip), %eax      # 0x13138
leal 0x1(%rax), %ecx
movl %ecx, 0xc04f(%rip)      # 0x13138
movl %eax, 0x4(%r15)
movq %r12, 0x8(%r15)
movl $0xb, %edi
movq %r15, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x8c2a
movq 0xc025(%rip), %rcx      # 0x13130
movq 0x8(%rcx), %rdi
movq %rax, %rsi
callq 0x30ae
movl $0x18, %edi
callq 0x8c14
movq %r15, 0x18(%rax)
movq 0x8(%rsp), %r12
movq %r12, 0x38(%rax)
movq %r13, 0x40(%rax)
movq 0xbff7(%rip), %rcx      # 0x13130
movq 0x8(%rcx), %rdi
movq %rax, %rsi
callq 0x30ae
movq %r14, %rdi
callq 0x9d62
movq %rax, %rdi
callq 0x9bf4
movq %rax, %r15
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rax, %rbx
movl 0xbfc8(%rip), %eax      # 0x13138
leal 0x1(%rax), %ecx
movl %ecx, 0xbfbf(%rip)      # 0x13138
movl %eax, 0x4(%rbx)
movq %r15, 0x8(%rbx)
movq %r13, %rdi
callq 0x616d
movl $0x16, %edi
callq 0x8c14
movq %rbx, 0x10(%rax)
movq %rbp, 0x18(%rax)
movq 0xbf8f(%rip), %rcx      # 0x13130
movq 0x8(%rcx), %rdi
movq %rax, %rsi
callq 0x30ae
movl $0x19, %edi
callq 0x8c14
movq 0x10(%rsp), %r15
movq %r15, 0x30(%rax)
movq 0xbf69(%rip), %rcx      # 0x13130
movq 0x8(%rcx), %rdi
movq %rax, %rsi
callq 0x30ae
movq %r12, %rdi
callq 0x616d
movq 0x20(%r14), %rdi
callq 0x6a4f
movq %rax, %r14
movl $0x16, %edi
callq 0x8c14
movq %rbx, 0x10(%rax)
movq %r14, 0x18(%rax)
movq 0xbf30(%rip), %rcx      # 0x13130
movq 0x8(%rcx), %rdi
movq %rax, %rsi
callq 0x30ae
movl $0x19, %edi
callq 0x8c14
movq %r15, 0x30(%rax)
movq 0xbf0f(%rip), %rcx      # 0x13130
movq 0x8(%rcx), %rdi
movq %rax, %rsi
callq 0x30ae
movq %r15, %rdi
jmp 0x78f0
movq 0x18(%r14), %rdi
callq 0x6a4f
movq %rax, %r15
movq 0x20(%r14), %rdi
callq 0x6a4f
movq %rax, %r12
movq %r14, %rdi
callq 0x9d62
movq %rax, %rdi
callq 0x9bf4
movq %rax, %r14
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rax, %rbx
movl 0xbec0(%rip), %eax      # 0x13138
leal 0x1(%rax), %ecx
movl %ecx, 0xbeb7(%rip)      # 0x13138
movl %eax, 0x4(%rbx)
movq %r14, 0x8(%rbx)
movl $0x3, %edi
jmp 0x7663
movq 0x18(%r14), %rdi
callq 0x6a4f
movq %rax, %r15
movq 0x20(%r14), %rdi
callq 0x6a4f
movq %rax, %r12
movq %r14, %rdi
callq 0x9d62
movq %rax, %rdi
callq 0x9bf4
movq %rax, %r14
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rax, %rbx
movl 0xbe63(%rip), %eax      # 0x13138
leal 0x1(%rax), %ecx
movl %ecx, 0xbe5a(%rip)      # 0x13138
movl %eax, 0x4(%rbx)
movq %r14, 0x8(%rbx)
movl $0x9, %edi
jmp 0x7663
movq 0x18(%r14), %rdi
callq 0x6a4f
movq %rax, %r15
movq 0x20(%r14), %rdi
callq 0x6a4f
movq %rax, %r12
movq %r14, %rdi
callq 0x9d62
movq %rax, %rdi
callq 0x9bf4
movq %rax, %r14
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rax, %rbx
movl 0xbe06(%rip), %eax      # 0x13138
leal 0x1(%rax), %ecx
movl %ecx, 0xbdfd(%rip)      # 0x13138
movl %eax, 0x4(%rbx)
movq %r14, 0x8(%rbx)
movl $0x4, %edi
jmp 0x7663
movq 0x18(%r14), %rdi
callq 0x6a4f
movq %rax, %r15
movq 0x20(%r14), %rdi
callq 0x6a4f
movq %rax, %r12
movq %r14, %rdi
callq 0x9d62
movq %rax, %rdi
callq 0x9bf4
movq %rax, %r14
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rax, %rbx
movl 0xbda9(%rip), %eax      # 0x13138
leal 0x1(%rax), %ecx
movl %ecx, 0xbda0(%rip)      # 0x13138
movl %eax, 0x4(%rbx)
movq %r14, 0x8(%rbx)
movl $0x6, %edi
jmp 0x7663
movq 0x18(%r14), %rdi
callq 0x6a4f
movq %rax, %r15
movq 0x20(%r14), %rdi
callq 0x6a4f
movq %rax, %r12
movq %r14, %rdi
callq 0x9d62
movq %rax, %rdi
callq 0x9bf4
movq %rax, %r14
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rax, %rbx
movl 0xbd4c(%rip), %eax      # 0x13138
leal 0x1(%rax), %ecx
movl %ecx, 0xbd43(%rip)      # 0x13138
movl %eax, 0x4(%rbx)
movq %r14, 0x8(%rbx)
movl $0xf, %edi
jmp 0x7663
movq 0x18(%r14), %rdi
callq 0x7995
movq %rax, %r15
movq 0x20(%r14), %rdi
callq 0x6a4f
movq %rax, %r12
movq 0x18(%r14), %rdi
callq 0x9d62
movq %rax, %rdi
callq 0x9bf4
movq %rax, %r14
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rax, %rbx
movl 0xbcee(%rip), %eax      # 0x13138
leal 0x1(%rax), %ecx
movl %ecx, 0xbce5(%rip)      # 0x13138
movl %eax, 0x4(%rbx)
movq %r14, 0x8(%rbx)
movl $0x16, %edi
callq 0x8c14
movq %rbx, 0x10(%rax)
movq %r12, 0x18(%rax)
movq 0xbcbd(%rip), %rcx      # 0x13130
movq 0x8(%rcx), %rdi
movq %rax, %rsi
callq 0x30ae
testq %r15, %r15
je 0x7976
movl $0x15, %edi
callq 0x8c14
movq %r15, 0x18(%rax)
movq %rbx, 0x20(%rax)
jmp 0x7671
movq 0x38(%r14), %rdi
callq 0x6a4f
movq %rax, %r15
movq %r14, %rdi
callq 0x9d62
movq %rax, %rdi
callq 0x9bf4
movq %rax, %rbx
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rax, %r12
movl 0xbc62(%rip), %eax      # 0x13138
leal 0x1(%rax), %ecx
movl %ecx, 0xbc59(%rip)      # 0x13138
movl %eax, 0x4(%r12)
movq %rbx, 0x8(%r12)
movq %r14, %rdi
callq 0x9d62
movq %rax, %rdi
callq 0x9bf4
movq %rax, %r14
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rax, %rbx
movl 0xbc24(%rip), %eax      # 0x13138
leal 0x1(%rax), %ecx
movl %ecx, 0xbc1b(%rip)      # 0x13138
movl %eax, 0x4(%rbx)
movq %r14, 0x8(%rbx)
movl $0x1, %edi
movl $0x58, %esi
callq 0x20f0
movq %r12, 0x10(%rax)
movq 0xbbf2(%rip), %rcx      # 0x13130
movq 0x8(%rcx), %rdi
movq %rax, %rsi
callq 0x30ae
movl $0xb, %edi
jmp 0x7663
movq %r14, %rdi
callq 0x9d62
movq %rax, %rdi
callq 0x9bf4
movq %rax, %r15
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rax, %rbx
movl 0xbbb9(%rip), %eax      # 0x13138
leal 0x1(%rax), %ecx
movl %ecx, 0xbbb0(%rip)      # 0x13138
movl %eax, 0x4(%rbx)
movq %r15, 0x8(%rbx)
movq %r14, %rdi
callq 0x7995
movq %rax, %r14
movl $0x13, %edi
callq 0x8c14
movq %rbx, 0x10(%rax)
movq %r14, 0x18(%rax)
jmp 0x7671
movq 0x18(%r14), %rdi
callq 0x6a4f
movq %rax, %r15
movq 0x20(%r14), %rdi
callq 0x6a4f
movq %rax, %r12
movq %r14, %rdi
callq 0x9d62
movq %rax, %rdi
callq 0x9bf4
movq %rax, %r14
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rax, %rbx
movl 0xbb44(%rip), %eax      # 0x13138
leal 0x1(%rax), %ecx
movl %ecx, 0xbb3b(%rip)      # 0x13138
movl %eax, 0x4(%rbx)
movq %r14, 0x8(%rbx)
movl $0x8, %edi
jmp 0x7663
movq 0x18(%r14), %rdi
callq 0x6a4f
movq %rax, %r15
movq 0x20(%r14), %rdi
callq 0x6a4f
movq %rax, %r12
movq %r14, %rdi
callq 0x9d62
movq %rax, %rdi
callq 0x9bf4
movq %rax, %r14
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rax, %rbx
movl 0xbaea(%rip), %eax      # 0x13138
leal 0x1(%rax), %ecx
movl %ecx, 0xbae1(%rip)      # 0x13138
movl %eax, 0x4(%rbx)
movq %r14, 0x8(%rbx)
movl $0xa, %edi
movq %rbx, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x8c2a
movq 0xbab8(%rip), %rcx      # 0x13130
movq 0x8(%rcx), %rdi
movq %rax, %rsi
callq 0x30ae
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0xba8c(%rip), %edx      # 0x13128
leaq 0x7537(%rip), %rbx      # 0xebda
leaq 0x75c3(%rip), %rsi      # 0xec6d
movq %rbx, %rdi
xorl %eax, %eax
callq 0xd86a
movq %rax, 0x8(%rsp)
movl 0xba69(%rip), %edx      # 0x13128
incl %edx
movl %edx, 0xba61(%rip)      # 0x13128
leaq 0x75ae(%rip), %rsi      # 0xec7c
movq %rbx, %rdi
xorl %eax, %eax
callq 0xd86a
movq %rax, %r13
movl 0xba47(%rip), %edx      # 0x13128
incl %edx
movl %edx, 0xba3f(%rip)      # 0x13128
leaq 0x6b1f(%rip), %rsi      # 0xe20f
movq %rbx, %rdi
xorl %eax, %eax
callq 0xd86a
movq %rax, 0x10(%rsp)
incl 0xba23(%rip)            # 0x13128
movq 0x18(%r14), %rdi
callq 0x6a4f
movq %rax, %rbx
movq 0x18(%r14), %rdi
callq 0x9d62
movq %rax, %rdi
callq 0x9bf4
movq %rax, %r12
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rax, %rbp
movl 0xb9fb(%rip), %eax      # 0x13138
leal 0x1(%rax), %ecx
movl %ecx, 0xb9f2(%rip)      # 0x13138
movl %eax, 0x4(%rbp)
movq %r12, 0x8(%rbp)
movl $0x1, %edi
movl $0x58, %esi
callq 0x20f0
movq %rbp, 0x10(%rax)
movq 0xb9c9(%rip), %rcx      # 0x13130
movq 0x8(%rcx), %rdi
movq %rax, %rsi
callq 0x30ae
movq 0x18(%r14), %rdi
callq 0x9d62
movq %rax, %rdi
callq 0x9bf4
movq %rax, %r12
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rax, %r15
movl 0xb999(%rip), %eax      # 0x13138
leal 0x1(%rax), %ecx
movl %ecx, 0xb990(%rip)      # 0x13138
movl %eax, 0x4(%r15)
movq %r12, 0x8(%r15)
movl $0xb, %edi
movq %r15, %rsi
movq %rbx, %rdx
movq %rbp, %rcx
callq 0x8c2a
movq 0xb966(%rip), %rcx      # 0x13130
movq 0x8(%rcx), %rdi
movq %rax, %rsi
callq 0x30ae
movl $0x18, %edi
callq 0x8c14
movq %r15, 0x18(%rax)
movq 0x8(%rsp), %r12
movq %r12, 0x38(%rax)
movq %r13, 0x40(%rax)
movq 0xb938(%rip), %rcx      # 0x13130
movq 0x8(%rcx), %rdi
movq %rax, %rsi
callq 0x30ae
movq %r14, %rdi
callq 0x9d62
movq %rax, %rdi
callq 0x9bf4
movq %rax, %r15
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rax, %rbx
movl 0xb909(%rip), %eax      # 0x13138
leal 0x1(%rax), %ecx
movl %ecx, 0xb900(%rip)      # 0x13138
movl %eax, 0x4(%rbx)
movq %r15, 0x8(%rbx)
movq %r13, %rdi
callq 0x616d
movq 0x20(%r14), %rdi
callq 0x6a4f
movq %rax, %r14
movl $0x16, %edi
callq 0x8c14
movq %rbx, 0x10(%rax)
movq %r14, 0x18(%rax)
movq 0xb8c4(%rip), %rcx      # 0x13130
movq 0x8(%rcx), %rdi
movq %rax, %rsi
callq 0x30ae
movl $0x19, %edi
callq 0x8c14
movq 0x10(%rsp), %r14
movq %r14, 0x30(%rax)
movq 0xb89e(%rip), %rcx      # 0x13130
movq 0x8(%rcx), %rdi
movq %rax, %rsi
callq 0x30ae
movq %r12, %rdi
callq 0x616d
movl $0x1, %edi
movl $0x58, %esi
callq 0x20f0
movq %rbx, 0x10(%rax)
movq 0xb870(%rip), %rcx      # 0x13130
movq 0x8(%rcx), %rdi
movq %rax, %rsi
callq 0x30ae
movl $0x19, %edi
callq 0x8c14
movq %r14, 0x30(%rax)
movq 0xb84f(%rip), %rcx      # 0x13130
movq 0x8(%rcx), %rdi
movq %rax, %rsi
callq 0x30ae
movq %r14, %rdi
callq 0x616d
jmp 0x7684
movq 0x38(%r14), %rdi
callq 0x9d62
movq %rax, %rdi
callq 0x9bf4
movq %rax, %r15
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rax, %rbx
movl 0xb812(%rip), %eax      # 0x13138
leal 0x1(%rax), %ecx
movl %ecx, 0xb809(%rip)      # 0x13138
movl %eax, 0x4(%rbx)
movq %r15, 0x8(%rbx)
movq 0x38(%r14), %rdi
callq 0x9d62
movq %rax, %rdi
callq 0x9bf4
movq %rax, %r14
movl $0x1, %edi
movl $0x58, %esi
callq 0x20f0
movq %rbx, 0x10(%rax)
movl %r14d, 0x4(%rax)
jmp 0x7671
movq 0x8(%r14), %rdi
leaq 0x7319(%rip), %rsi      # 0xec8a
callq 0xcd01
leaq 0x7264(%rip), %rdi      # 0xebe1
leaq 0x7261(%rip), %rsi      # 0xebe5
leaq 0x733e(%rip), %rcx      # 0xecc9
movl $0x69, %edx
callq 0x20c0