// File: /workspace/github_c_makefile_star2_O2/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 0x15250
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %rbx
movl %esi, %r12d
movq %rdi, %r15
movl %esi, %eax
leaq 0xb551(%rip), %rcx      # 0x20634
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r15, %rdi
movl %r12d, %esi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x14ebe
testl %eax, %eax
jne 0x15250
addl $0xd, %r12d
movq %r15, %rdi
movl %r12d, %esi
movq %rbx, %rdx
movq %r14, %rcx
movl %ebp, %r8d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x15275
movl 0x8(%rbx), %eax
movl %eax, %ebp
orl $0x100, %ebp            # imm = 0x100
cmpl $0x4, (%rbx)
cmovnel %eax, %ebp
movq %r15, %rdi
movq %r14, %rsi
callq 0x149f4
movl %eax, %r13d
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x15582
leal -0x11(%r12), %eax
cmpl $0x2, %eax
jae 0x15177
addl $0xf, %r12d
pushq $0x1
popq %rdx
movq %r15, %rdi
movl %r12d, %esi
movl %r13d, %ecx
movl %ebp, %r8d
jmp 0x15199
cmpl $0x10, %r12d
jne 0x15187
pushq $0x1f
popq %rsi
movq %r15, %rdi
xorl %edx, %edx
jmp 0x15194
addl $0x12, %r12d
pushq $0x1
popq %rdx
movq %r15, %rdi
movl %r12d, %esi
movl %ebp, %ecx
movl %r13d, %r8d
callq 0x1550e
movl %eax, 0x8(%rbx)
movl $0xb, (%rbx)
jmp 0x15250
movq %r15, %rdi
movq %r14, %rsi
callq 0x149e3
cmpl $0xc, (%r14)
jne 0x1525f
movq (%r15), %rax
movq 0x38(%rax), %rax
movslq 0x8(%r14), %rcx
movl (%rax,%rcx,4), %eax
andl $0x3f, %eax
cmpl $0x1d, %eax
jne 0x1525f
movq %r15, %rdi
movq %rbx, %rsi
callq 0x14871
movq (%r15), %rax
movq 0x38(%rax), %rax
movslq 0x8(%r14), %rcx
movl $0x7fffff, %edx         # imm = 0x7FFFFF
andl (%rax,%rcx,4), %edx
movl 0x8(%rbx), %esi
shll $0x17, %esi
orl %edx, %esi
movl %esi, (%rax,%rcx,4)
movl $0xc, (%rbx)
movl 0x8(%r14), %eax
movl %eax, 0x8(%rbx)
jmp 0x15250
movq %r15, %rdi
movq %r14, %rsi
callq 0x14786
leaq 0x10(%r14), %rsi
movl 0x10(%rbx), %edx
jmp 0x15239
movq %r15, %rdi
movq %r14, %rsi
callq 0x14786
leaq 0x14(%r14), %rsi
movl 0x14(%rbx), %edx
movq %r15, %rdi
callq 0x1422a
movq 0x10(%r14), %rax
movq %rax, 0x10(%rbx)
movups (%r14), %xmm0
movups %xmm0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movq %r14, %rsi
callq 0x14836
pushq $0x1d
popq %rsi
movq %r15, %rdi
jmp 0x1510f