// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lcode.c
// Function: luaK_posfix
void luaK_posfix (FuncState *fs, BinOpr op,
                  expdesc *e1, expdesc *e2, int line) {
  switch (op) {
    case OPR_AND: {
      lua_assert(e1->t == NO_JUMP);  /* list closed by 'luK_infix' */
      luaK_dischargevars(fs, e2);
      luaK_concat(fs, &e2->f, e1->f);
      *e1 = *e2;
      break;
    }
    case OPR_OR: {
      lua_assert(e1->f == NO_JUMP);  /* list closed by 'luK_infix' */
      luaK_dischargevars(fs, e2);
      luaK_concat(fs, &e2->t, e1->t);
      *e1 = *e2;
      break;
    }
    case OPR_CONCAT: {
      luaK_exp2val(fs, e2);
      if (e2->k == VRELOCABLE &&
          GET_OPCODE(getinstruction(fs, e2)) == OP_CONCAT) {
        lua_assert(e1->u.info == GETARG_B(getinstruction(fs, e2))-1);
        freeexp(fs, e1);
        SETARG_B(getinstruction(fs, e2), e1->u.info);
        e1->k = VRELOCABLE; e1->u.info = e2->u.info;
      }
      else {
        luaK_exp2nextreg(fs, e2);  /* operand must be on the 'stack' */
        codebinexpval(fs, OP_CONCAT, e1, e2, line);
      }
      break;
    }
    case OPR_ADD: case OPR_SUB: case OPR_MUL: case OPR_DIV:
    case OPR_IDIV: case OPR_MOD: case OPR_POW:
    case OPR_BAND: case OPR_BOR: case OPR_BXOR:
    case OPR_SHL: case OPR_SHR: {
      if (!constfolding(fs, op + LUA_OPADD, e1, e2))
        codebinexpval(fs, cast(OpCode, op + OP_ADD), e1, e2, line);
      break;
    }
    case OPR_EQ: case OPR_LT: case OPR_LE:
    case OPR_NE: case OPR_GT: case OPR_GE: {
      codecomp(fs, op, e1, e2);
      break;
    }
    default: lua_assert(0);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x14, %esi
ja 0x1745c
movl %r8d, %ebp
movq %rcx, %r15
movq %rdx, %rbx
movl %esi, %r12d
movq %rdi, %r14
movl %esi, %eax
leaq 0xc2dc(%rip), %rcx      # 0x235a4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r14, %rdi
movl %r12d, %esi
movq %rbx, %rdx
movq %r15, %rcx
callq 0x170d3
testl %eax, %eax
jne 0x1745c
addl $0xd, %r12d
movq %r14, %rdi
movl %r12d, %esi
movq %rbx, %rdx
movq %r15, %rcx
movl %ebp, %r8d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x17483
movl 0x8(%rbx), %eax
movl %eax, %r13d
orl $0x100, %r13d           # imm = 0x100
cmpl $0x4, (%rbx)
cmovnel %eax, %r13d
movq %r14, %rdi
movq %r15, %rsi
callq 0x16ad5
movl %eax, %ebp
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x177f6
leal -0x11(%r12), %eax
cmpl $0x2, %eax
jae 0x17363
addl $0xf, %r12d
shll $0x17, %ebp
orl %r12d, %ebp
shll $0xe, %r13d
orl %ebp, %r13d
orl $0x40, %r13d
movl %r13d, %ebp
jmp 0x1738c
cmpl $0x10, %r12d
jne 0x17378
shll $0x17, %r13d
shll $0xe, %ebp
orl %r13d, %ebp
orl $0x1f, %ebp
jmp 0x1738c
addl $0x12, %r12d
shll $0x17, %r13d
shll $0xe, %ebp
orl %r12d, %ebp
orl %r13d, %ebp
orl $0x40, %ebp
movq %r14, %rdi
movl %ebp, %esi
callq 0x163c0
movq %r14, %rdi
callq 0x16257
movl %eax, 0x8(%rbx)
movl $0xb, (%rbx)
jmp 0x1745c
movq %r14, %rdi
movq %r15, %rsi
callq 0x16ac4
cmpl $0xc, (%r15)
jne 0x1746b
movq (%r14), %rax
movq 0x38(%rax), %rax
movslq 0x8(%r15), %rcx
movl (%rax,%rcx,4), %edx
movl %edx, %esi
andl $0x3f, %esi
cmpl $0x1d, %esi
jne 0x1746b
cmpl $0x7, (%rbx)
jne 0x173ff
movl 0x8(%rbx), %esi
btl $0x8, %esi
jb 0x173ff
movzbl 0x3a(%r14), %edi
cmpl %edi, %esi
jl 0x173ff
decb 0x3c(%r14)
movslq 0x8(%r15), %rcx
movl (%rax,%rcx,4), %edx
andl $0x7fffff, %edx         # imm = 0x7FFFFF
movl 0x8(%rbx), %esi
shll $0x17, %esi
orl %edx, %esi
movl %esi, (%rax,%rcx,4)
movl $0xc, (%rbx)
movl 0x8(%r15), %eax
movl %eax, 0x8(%rbx)
jmp 0x1745c
movq %r14, %rdi
movq %r15, %rsi
callq 0x1684b
leaq 0x10(%r15), %rsi
movl 0x10(%rbx), %edx
jmp 0x17445
movq %r14, %rdi
movq %r15, %rsi
callq 0x1684b
leaq 0x14(%r15), %rsi
movl 0x14(%rbx), %edx
movq %r14, %rdi
callq 0x161d4
movq 0x10(%r15), %rax
movq %rax, 0x10(%rbx)
movups (%r15), %xmm0
movups %xmm0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movq %r15, %rsi
callq 0x168d7
movq %r14, %rdi
movl $0x1d, %esi
jmp 0x172f4