// File: /workspace/github_c_makefile_star2_O2/ejunjsh[P]mycc/gen.c
// Function: genAST
int genAST(struct ASTnode *n, int iflabel, int looptoplabel,
	   int loopendlabel, int parentASTop) {
  int leftreg = NOREG, rightreg = NOREG;

  // 空树，什么都不做
  if (n == NULL)
    return (NOREG);

  // 在输出中更新行号
  update_line(n);

  // 上面我们定义了一些语法树节点处理的函数，所以，如果遇到某些操作，就直接扔给相关函数处理即可
  switch (n->op) {
  case A_IF:
    return (genIF(n, looptoplabel, loopendlabel));
  case A_WHILE:
    return (genWHILE(n));
  case A_SWITCH:
    return (genSWITCH(n));
  case A_FUNCCALL:
    return (gen_funccall(n));
  case A_TERNARY:
    return (gen_ternary(n));
  case A_LOGOR:
    return (gen_logandor(n));
  case A_LOGAND:
    return (gen_logandor(n));
  case A_GLUE:
    // 执行每个子语句，然后释放所有寄存器
    if (n->left != NULL)
      genAST(n->left, iflabel, looptoplabel, loopendlabel, n->op);
    genfreeregs(NOREG);
    if (n->right != NULL)
      genAST(n->right, iflabel, looptoplabel, loopendlabel, n->op);
    genfreeregs(NOREG);
    return (NOREG);
  case A_FUNCTION:
    // 生成函数的前置汇编，然会再到子树的汇编
    cgfuncpreamble(n->sym);
    genAST(n->left, NOLABEL, NOLABEL, NOLABEL, n->op);
    cgfuncpostamble(n->sym);
    return (NOREG);
  }

  // 下面是通用语法树处理

  // 获得左树和右数的值
  if (n->left)
    leftreg = genAST(n->left, NOLABEL, NOLABEL, NOLABEL, n->op);
  if (n->right)
    rightreg = genAST(n->right, NOLABEL, NOLABEL, NOLABEL, n->op);

  switch (n->op) {
  case A_ADD:
    return (cgadd(leftreg, rightreg));
  case A_SUBTRACT:
    return (cgsub(leftreg, rightreg));
  case A_MULTIPLY:
    return (cgmul(leftreg, rightreg));
  case A_DIVIDE:
    return (cgdivmod(leftreg, rightreg, A_DIVIDE));
  case A_MOD:
    return (cgdivmod(leftreg, rightreg, A_MOD));
  case A_AND:
    return (cgand(leftreg, rightreg));
  case A_OR:
    return (cgor(leftreg, rightreg));
  case A_XOR:
    return (cgxor(leftreg, rightreg));
  case A_LSHIFT:
    return (cgshl(leftreg, rightreg));
  case A_RSHIFT:
    return (cgshr(leftreg, rightreg));
  case A_EQ:
  case A_NE:
  case A_LT:
  case A_GT:
  case A_LE:
  case A_GE:
    // 如果父节点是A_IF, A_WHILE 或者 A_TERNARY，
    // 生成比较和跳转的代码，否则比较寄存器，然后根据比较结果设置其中一个寄存器的值为1或0
    if (parentASTop == A_IF || parentASTop == A_WHILE || parentASTop == A_TERNARY)
      return (cgcompare_and_jump(n->op, leftreg, rightreg, iflabel, n->left->type));
    else
      return (cgcompare_and_set(n->op, leftreg, rightreg, n->left->type));
  case A_INTLIT:
    return (cgloadint(n->atu.a_intvalue, n->type));
  case A_STRLIT:
    return (cgloadglobstr(n->atu.a_intvalue));
  case A_IDENT:
    // 如果是右值或者是解引用，则加载值
    if (n->rvalue || parentASTop == A_DEREF) {
      return (cgloadvar(n->sym, n->op));
    } else
      return (NOREG);
  case A_ASPLUS:
  case A_ASMINUS:
  case A_ASSTAR:
  case A_ASSLASH:
  case A_ASMOD:
  case A_ASSIGN:

    // 对于'+='和相关操作，生成合适的汇编代码，同时获取结果寄存器
    // 然后令右节点等于左节点，这样就变成赋值操作了
    switch (n->op) {
    case A_ASPLUS:
      leftreg = cgadd(leftreg, rightreg);
      n->right = n->left;
      break;
    case A_ASMINUS:
      leftreg = cgsub(leftreg, rightreg);
      n->right = n->left;
      break;
    case A_ASSTAR:
      leftreg = cgmul(leftreg, rightreg);
      n->right = n->left;
      break;
    case A_ASSLASH:
      leftreg = cgdivmod(leftreg, rightreg, A_DIVIDE);
      n->right = n->left;
      break;
    case A_ASMOD:
      leftreg = cgdivmod(leftreg, rightreg, A_MOD);
      n->right = n->left;
      break;
    }

    // 赋值代码
    switch (n->right->op) {
    case A_IDENT:
      if (n->right->sym->class == C_GLOBAL ||
        n->right->sym->class == C_EXTERN ||
        n->right->sym->class == C_STATIC)
	      return (cgstorglob(leftreg, n->right->sym));
      else
	      return (cgstorlocal(leftreg, n->right->sym));
    case A_DEREF:
      return (cgstorderef(leftreg, rightreg, n->right->type));
    default:
      fatald("Can't A_ASSIGN in genAST(), op", n->op);
    }
  case A_WIDEN:
    // 加宽子节点的类型到父节点的类型
    return (cgwiden(leftreg, n->left->type, n->type));
  case A_RETURN:
    cgreturn(leftreg, Functionid);
    return (NOREG);
  case A_ADDR:
    // 如果有符号，直接获取它的地址，否则左寄存器已经有地址，因为这是个成员访问
    if (n->sym != NULL)
      return (cgaddress(n->sym));
    else
      return (leftreg);
  case A_DEREF:
    // 如果是右值，解引用来获得值
    // 否则直接返回，留给A_ASSIGN来处理
    if (n->rvalue)
      return (cgderef(leftreg, n->left->type));
    else
      return (leftreg);
  case A_SCALE:
    // 小优化：如果大小是2的幂次方，就使用位移来处理
    switch (n->atu.a_size) {
    case 2:
      return (cgshlconst(leftreg, 1));
    case 4:
      return (cgshlconst(leftreg, 2));
    case 8:
      return (cgshlconst(leftreg, 3));
    default:
      // 加载大小到寄存器，然后用左寄存器相乘
      rightreg = cgloadint(n->atu.a_size, P_INT);
      return (cgmul(leftreg, rightreg));
    }
  case A_POSTINC:
  case A_POSTDEC:
    // 例如：i++
    // 先返回i，再++
    return (cgloadvar(n->sym, n->op));
  case A_PREINC:
  case A_PREDEC:
    // 例如：++i
    // 先++，再返回i
    return (cgloadvar(n->left->sym, n->op));
  case A_NEGATE:
    return (cgnegate(leftreg));
  case A_INVERT:
    return (cginvert(leftreg));
  case A_LOGNOT:
    return (cglognot(leftreg));
  case A_TOBOOL:
    // 如果父节点是A_IF, A_WHILE，
    // 生成比较和跳转的代码，否则根据是零还是非零来设置寄存器的值为0或1
    return (cgboolean(leftreg, parentASTop, iflabel));
  case A_BREAK:
    cgjump(loopendlabel);
    return (NOREG);
  case A_CONTINUE:
    cgjump(looptoplabel);
    return (NOREG);
  case A_CAST:
    return (leftreg);		// 什么都不用做
  default:
    fatald("Unknown AST operator", n->op);
  }
  return (NOREG);	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
pushq $-0x1
popq %r14
testq %rdi, %rdi
je 0x584f
movl %r8d, %r15d
movl %edx, %r12d
movl %esi, %r13d
movq %rdi, %rbx
movl %ecx, -0x2c(%rbp)
movl 0x40(%rdi), %edi
testl %edi, %edi
je 0x541b
leaq 0x8f58(%rip), %rax      # 0xe368
cmpl %edi, (%rax)
je 0x541b
movl %edi, (%rax)
callq 0x39af
movl 0x4(%rbx), %r8d
leal -0x1d(%r8), %eax
cmpl $0x6, %eax
ja 0x5483
leaq 0x4d8d(%rip), %rcx      # 0xa1bc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x5453
pushq $0x1d
popq %r8
movl %r13d, %esi
movl %r12d, %edx
movl -0x2c(%rbp), %ecx
callq 0x53d5
movl %r14d, %edi
callq 0x2373
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x5476
movl 0x4(%rbx), %r8d
movl %r13d, %esi
movl %r12d, %edx
movl -0x2c(%rbp), %ecx
callq 0x53d5
movl %r14d, %edi
callq 0x2373
jmp 0x584f
cmpl $0x7, %r8d
je 0x57b5
cmpl $0x8, %r8d
je 0x55a2
cmpl $0x9, %r8d
je 0x55a2
cmpl $0x31, %r8d
jne 0x55b8
movslq (%rbx), %rax
leaq 0x4(,%rax,4), %r14
movq %r14, %rdi
callq 0x2120
movq %rax, -0x48(%rbp)
movq %r14, %rdi
callq 0x2120
movq %rax, -0x40(%rbp)
movl 0x8c1b(%rip), %r15d     # 0xe0f0
leal 0x1(%r15), %r14d
leal 0x2(%r15), %eax
movl %eax, 0x8c0d(%rip)      # 0xe0f0
movq 0x20(%rbx), %rdi
xorl %r13d, %r13d
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x53d5
movl %eax, %r12d
movq %r15, -0x50(%rbp)
movl %r15d, %edi
callq 0x34af
movl %r12d, -0x34(%rbp)
movl %r12d, %edi
callq 0x2373
movl %r14d, -0x30(%rbp)
movl %r14d, -0x2c(%rbp)
xorl %r14d, %r14d
movq 0x30(%rbx), %rbx
testq %rbx, %rbx
je 0x5780
movl 0x8bbe(%rip), %r15d     # 0xe0f0
leal 0x1(%r15), %eax
movl %eax, 0x8bb4(%rip)      # 0xe0f0
movq -0x40(%rbp), %rax
movl %r15d, (%rax,%r13)
movl (%rbx), %eax
movq -0x48(%rbp), %rcx
movl %eax, (%rcx,%r13)
movl %r15d, %edi
callq 0x2757
xorl %r12d, %r12d
cmpl $0x33, 0x4(%rbx)
movq %rbx, %rax
setne %bl
movl -0x2c(%rbp), %ecx
cmovel %r15d, %ecx
movl %ecx, -0x2c(%rbp)
movq %rax, %r15
movq 0x20(%rax), %rdi
testq %rdi, %rdi
je 0x5588
xorl %esi, %esi
xorl %edx, %edx
movl -0x30(%rbp), %ecx
xorl %r8d, %r8d
callq 0x53d5
movb %bl, %r12b
addl %r12d, %r14d
pushq $-0x1
popq %rdi
callq 0x2373
addq $0x4, %r13
movq %r15, %rbx
jmp 0x551e
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5c85
movq 0x20(%rbx), %rdi
pushq $-0x1
popq %r9
testq %rdi, %rdi
je 0x5861
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl %r9d, %r14d
callq 0x53d5
movl %r14d, %r9d
movl %eax, %r14d
movl 0x4(%rbx), %r8d
jmp 0x5864
movl 0x8b03(%rip), %r15d     # 0xe0f0
leal 0x1(%r15), %r14d
leal 0x2(%r15), %eax
movl %eax, 0x8af5(%rip)      # 0xe0f0
movl %r15d, %edi
callq 0x2757
movq 0x20(%rbx), %rdi
movl 0x4(%rbx), %r8d
movl %r14d, %esi
movl %r15d, %edx
movl %r14d, %ecx
callq 0x53d5
pushq $-0x1
popq %r12
movl %r12d, %edi
callq 0x2373
movq 0x30(%rbx), %rdi
movl 0x4(%rbx), %r8d
xorl %esi, %esi
movl %r15d, %edx
movl %r14d, %ecx
callq 0x53d5
movl %r12d, %edi
callq 0x2373
movl %r15d, %edi
callq 0x34af
movl %r14d, %edi
movl %r12d, %r14d
jmp 0x584a
movq 0x38(%rbx), %rdi
callq 0x253f
movq 0x20(%rbx), %rdi
movl 0x4(%rbx), %r8d
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x53d5
movq 0x38(%rbx), %rdi
callq 0x270f
jmp 0x584f
movq 0x20(%rbx), %r15
callq 0x2499
xorl %r14d, %r14d
testq %r15, %r15
je 0x56bb
movq 0x30(%r15), %rdi
movl 0x4(%r15), %r8d
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x53d5
movl (%r15), %esi
movl %eax, %edi
callq 0x3072
testl %r14d, %r14d
jne 0x56b5
movl (%r15), %r14d
movq 0x20(%r15), %r15
jmp 0x568b
movq 0x38(%rbx), %rdi
movl %r14d, %esi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2ff0
movl 0x8a14(%rip), %r14d     # 0xe0f0
leal 0x1(%r14), %r15d
movl %r15d, 0x8a09(%rip)     # 0xe0f0
cmpq $0x0, 0x30(%rbx)
je 0x56f8
leal 0x2(%r14), %eax
movl %eax, 0x89f8(%rip)      # 0xe0f0
movq 0x20(%rbx), %rdi
pushq $0x1e
popq %r8
movl %r14d, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x53d5
pushq $-0x1
popq %r13
movl %r13d, %edi
callq 0x2373
movq 0x28(%rbx), %rdi
movl 0x4(%rbx), %r8d
xorl %esi, %esi
movl %r12d, %edx
movl -0x2c(%rbp), %ecx
callq 0x53d5
movl %r13d, %r12d
movl %r13d, %edi
callq 0x2373
cmpq $0x0, 0x30(%rbx)
je 0x5747
movl %r15d, %edi
callq 0x34af
movl %r14d, %edi
callq 0x2757
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
movl %r12d, %r14d
je 0x584f
movl 0x4(%rbx), %r8d
xorl %esi, %esi
xorl %edx, %edx
movl -0x2c(%rbp), %ecx
callq 0x53d5
pushq $-0x1
popq %r14
movl %r14d, %edi
callq 0x2373
jmp 0x5847
movl -0x30(%rbp), %ebx
movl %ebx, %edi
callq 0x34af
movl -0x34(%rbp), %edi
movl %r14d, %esi
movq -0x50(%rbp), %rdx
movq -0x40(%rbp), %rcx
movq -0x48(%rbp), %r8
movl -0x2c(%rbp), %r9d
callq 0x3869
movl %ebx, %edi
callq 0x2757
pushq $-0x1
popq %r14
jmp 0x584f
movl 0x8934(%rip), %r14d     # 0xe0f0
leal 0x1(%r14), %r15d
leal 0x2(%r14), %eax
movl %eax, 0x8926(%rip)      # 0xe0f0
movq 0x20(%rbx), %rdi
pushq $0x7
popq %r8
movl %r14d, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x53d5
callq 0x23a0
movl %eax, %r13d
movq 0x28(%rbx), %rdi
movl 0x4(%rbx), %r8d
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x53d5
movl %eax, %r12d
movl %eax, %edi
movl %r13d, %esi
callq 0x397a
movl %r12d, %edi
callq 0x241e
movl %r15d, %edi
callq 0x34af
movl %r14d, %edi
movl %r13d, %r14d
callq 0x2757
movq 0x30(%rbx), %rdi
movl 0x4(%rbx), %r8d
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x53d5
movl %eax, %ebx
movl %eax, %edi
movl %r13d, %esi
callq 0x397a
movl %ebx, %edi
callq 0x241e
movl %r15d, %edi
callq 0x2757
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r9d, %r14d
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x587f
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x53d5
movl %eax, %r9d
movl 0x4(%rbx), %r8d
leal -0x1(%r8), %eax
cmpl $0x33, %eax
ja 0x5c2c
leaq 0x4945(%rip), %rcx      # 0xa1d8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x1f, %r15d
ja 0x58fa
movl $0xc0000080, %eax       # imm = 0xC0000080
btl %r15d, %eax
jae 0x58fa
movq 0x20(%rbx), %rax
movl 0x8(%rax), %eax
movl %r8d, %edi
movl %r14d, %esi
movl %r9d, %edx
movl %r13d, %ecx
movl %eax, %r8d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x34ce
movq 0x20(%rbx), %rax
movq 0x38(%rax), %rdi
jmp 0x58e4
movq 0x38(%rbx), %rdi
movl %r8d, %esi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x27b4
movq 0x20(%rbx), %rax
movl 0x8(%rax), %ecx
movl %r8d, %edi
movl %r14d, %esi
movl %r9d, %edx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x33b3
movl -0x2c(%rbp), %edi
jmp 0x5a01
cmpl $0x24, %r15d
je 0x5935
cmpl $0x0, 0x18(%rbx)
je 0x57ac
movq 0x38(%rbx), %rdi
pushq $0x1c
popq %rsi
jmp 0x58e7
movl %r14d, %edi
movl %r15d, %esi
movl %r13d, %edx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2f18
movl %r14d, %edi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2e32
movl %r14d, %edi
movl %r9d, %esi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2d94
movl %r14d, %edi
movl %r9d, %esi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2b62
movl (%rbx), %edi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2a98
movl %r14d, %edi
movl %r9d, %esi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2ce8
pushq $0x19
jmp 0x5a66
cmpl $0x0, 0x18(%rbx)
je 0x584f
movq 0x20(%rbx), %rax
movl 0x8(%rax), %esi
movl %r14d, %edi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x36e8
movl %r12d, %edi
callq 0x34af
jmp 0x57ac
pushq $0x19
jmp 0x5aae
movl %r14d, %edi
movl %r9d, %esi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2c5c
movl %r14d, %edi
movl %r9d, %esi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2ca2
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x584f
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x366a
pushq $0x18
popq %rdx
movl %r14d, %edi
movl %r9d, %esi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2ba8
movl %r14d, %edi
movl %r9d, %r15d
movl %r9d, %esi
callq 0x2b62
jmp 0x5b38
movl %r14d, %edi
movl %r9d, %esi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2ad6
pushq $0x18
popq %rdx
movl %r14d, %edi
movl %r9d, %r15d
movl %r9d, %esi
callq 0x2ba8
jmp 0x5b38
movl %r14d, %edi
movl %r9d, %r15d
movl %r9d, %esi
callq 0x2b1c
jmp 0x5b38
movl %r9d, %r15d
movq 0x30(%rbx), %rax
jmp 0x5b43
movl (%rbx), %edi
movl 0x8(%rbx), %esi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2776
movl (%rbx), %edi
cmpl $0x8, %edi
je 0x5c5a
cmpl $0x4, %edi
je 0x5c56
cmpl $0x2, %edi
jne 0x5c73
pushq $0x1
jmp 0x5c5c
movl %r14d, %edi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2e6a
movl %r14d, %edi
movl %r9d, %r15d
movl %r9d, %esi
callq 0x2ad6
movl %eax, %r14d
movq 0x20(%rbx), %rax
movq %rax, 0x30(%rbx)
movl 0x4(%rax), %ecx
cmpl $0x24, %ecx
je 0x5b82
cmpl $0x1c, %ecx
jne 0x5b9e
movq 0x38(%rax), %rsi
movl 0x24(%rsi), %eax
cmpl $0x5, %eax
ja 0x5c40
pushq $0x32
popq %rcx
btl %eax, %ecx
jae 0x5c40
movl %r14d, %edi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3105
movl 0x8(%rax), %edx
movl %r14d, %edi
movl %r15d, %esi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3794
movl 0x4(%rbx), %esi
leaq 0x4700(%rip), %rdi      # 0xa2a8
callq 0x656d
movq 0x20(%rbx), %rax
movl 0x8(%rax), %esi
movl 0x8(%rbx), %edx
movl %r14d, %edi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x35b1
movl %r14d, %edi
movl %r9d, %esi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2d2e
movl %r14d, %edi
movl %r9d, %esi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2b1c
leaq 0x8772(%rip), %rax      # 0xe378
movq (%rax), %rsi
movl %r14d, %edi
callq 0x35b9
jmp 0x57ac
movl %r14d, %edi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2dfa
leaq 0x4694(%rip), %rdi      # 0xa2c7
movl %r8d, %esi
callq 0x656d
jmp 0x57ac
movl %r14d, %edi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2662
pushq $0x2
jmp 0x5c5c
pushq $0x3
popq %rsi
movl %r14d, %edi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x30cb
pushq $0x30
popq %rsi
callq 0x2776
movl %r14d, %edi
movl %eax, %esi
jmp 0x598f