// File: /workspace/github_c_makefile_star2_O1/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 0x168ce
movl %r8d, %ebp
movq %rcx, %r15
movq %rdx, %rbx
movl %esi, %r12d
movq %rdi, %r14
movl %esi, %eax
leaq 0xbddb(%rip), %rcx      # 0x22518
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r14, %rdi
movl %r12d, %esi
movq %rbx, %rdx
movq %r15, %rcx
callq 0x1652f
testl %eax, %eax
jne 0x168ce
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 0x168f5
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 0x15f13
movl %eax, %ebp
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x16c6e
leal -0x11(%r12), %eax
cmpl $0x2, %eax
jae 0x167d8
addl $0xf, %r12d
shll $0x17, %ebp
orl %r12d, %ebp
shll $0xe, %r13d
orl %ebp, %r13d
orl $0x40, %r13d
movl %r13d, %ebp
jmp 0x16801
cmpl $0x10, %r12d
jne 0x167ed
shll $0x17, %r13d
shll $0xe, %ebp
orl %r13d, %ebp
orl $0x1f, %ebp
jmp 0x16801
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 0x158de
movq %r14, %rdi
callq 0x1577c
movl %eax, 0x8(%rbx)
movl $0xb, (%rbx)
jmp 0x168ce
movq %r14, %rdi
movq %r15, %rsi
callq 0x15f02
cmpl $0xc, (%r15)
jne 0x168dd
movq (%r14), %rax
movq 0x38(%rax), %rax
movslq 0x8(%r15), %rcx
movl (%rax,%rcx,4), %ecx
andl $0x3f, %ecx
cmpl $0x1d, %ecx
jne 0x168dd
cmpl $0x7, (%rbx)
jne 0x1686b
movl 0x8(%rbx), %ecx
btl $0x8, %ecx
jb 0x1686b
movzbl 0x3a(%r14), %edx
cmpl %edx, %ecx
jl 0x1686b
decb 0x3c(%r14)
movslq 0x8(%r15), %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(%r15), %eax
movl %eax, 0x8(%rbx)
jmp 0x168ce
movq %r14, %rdi
movq %r15, %rsi
callq 0x15c92
leaq 0x10(%r15), %rsi
movl 0x10(%rbx), %edx
jmp 0x168b7
movq %r14, %rdi
movq %r15, %rsi
callq 0x15c92
leaq 0x14(%r15), %rsi
movl 0x14(%rbx), %edx
movq %r14, %rdi
callq 0x156f5
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 0x15d1e
movq %r14, %rdi
movl $0x1d, %esi
jmp 0x16769