#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ GenExtendRegAIfNeeded(int);
int /*<<< orphan*/ GenPrintInstr1Operand(int, int /*<<< orphan*/, int,
                                         int /*<<< orphan*/);
int /*<<< orphan*/ GenPrintInstr2Operands(int, int /*<<< orphan*/, int,
                                          int /*<<< orphan*/, int,
                                          int /*<<< orphan*/);
int GenSelectByteOrWord(int, int);
void GenPostIncDecIndirect(int opSz, int tok) {
  int instr = 0x07;
  if (tok != 'Q')
    instr = 0x08;
  GenPrintInstr2Operands(0x00, 0, 0x04, 0, 0x03, 0);
  GenPrintInstr2Operands(0x00, 0, GenSelectByteOrWord(0x0B, opSz), 0, 0x1A, 0);
  GenExtendRegAIfNeeded(opSz);
  GenPrintInstr1Operand(instr, 0, GenSelectByteOrWord(0x1E, opSz), 0);
}


x86 assembly (clang, -O0):
<GenPostIncDecIndirect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x7,-0xc(%rbp)
cmpl   $0x51,-0x8(%rbp)
je     1166 <GenPostIncDecIndirect+0x26>
movl   $0x8,-0xc(%rbp)
xor    %r9d,%r9d
mov    $0x4,%edx
mov    $0x3,%r8d
mov    %r9d,%edi
mov    %r9d,%esi
mov    %r9d,%ecx
call   1040 <GenPrintInstr2Operands@plt>
mov    -0x4(%rbp),%esi
mov    $0xb,%edi
call   1030 <GenSelectByteOrWord@plt>
mov    %eax,%edx
xor    %r9d,%r9d
mov    $0x1a,%r8d
mov    %r9d,%edi
mov    %r9d,%esi
mov    %r9d,%ecx
call   1040 <GenPrintInstr2Operands@plt>
mov    -0x4(%rbp),%edi
call   1060 <GenExtendRegAIfNeeded@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x1e,%edi
call   1030 <GenSelectByteOrWord@plt>
mov    -0x10(%rbp),%edi
mov    %eax,%edx
xor    %ecx,%ecx
mov    %ecx,%esi
call   1050 <GenPrintInstr1Operand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GenPostIncDecIndirect>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %eax,%eax
cmp    $0x51,%esi
sete   %al
mov    $0x8,%ebp
sub    %eax,%ebp
xor    %edi,%edi
xor    %esi,%esi
mov    $0x4,%edx
xor    %ecx,%ecx
mov    $0x3,%r8d
xor    %r9d,%r9d
call   1040 <GenPrintInstr2Operands@plt>
mov    $0xb,%edi
mov    %ebx,%esi
call   1030 <GenSelectByteOrWord@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    %eax,%edx
xor    %ecx,%ecx
mov    $0x1a,%r8d
xor    %r9d,%r9d
call   1040 <GenPrintInstr2Operands@plt>
mov    %ebx,%edi
call   1060 <GenExtendRegAIfNeeded@plt>
mov    $0x1e,%edi
mov    %ebx,%esi
call   1030 <GenSelectByteOrWord@plt>
mov    %ebp,%edi
xor    %esi,%esi
mov    %eax,%edx
xor    %ecx,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <GenPrintInstr1Operand@plt>

LLVM IR (-O0):
define void @GenPostIncDecIndirect(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 7, i32* %5
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 81
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 8, i32* %5
br label %9
9: ; preds = %8, %2
%10 = call i32 @GenPrintInstr2Operands(i32 0, i32 0, i32 4, i32 0, i32 3, i32 0)
%11 = load i32, i32* %3
%12 = call i32 @GenSelectByteOrWord(i32 11, i32 %11)
%13 = call i32 @GenPrintInstr2Operands(i32 0, i32 0, i32 %12, i32 0, i32 26, i32 0)
%14 = load i32, i32* %3
%15 = call i32 @GenExtendRegAIfNeeded(i32 %14)
%16 = load i32, i32* %5
%17 = load i32, i32* %3
%18 = call i32 @GenSelectByteOrWord(i32 30, i32 %17)
%19 = call i32 @GenPrintInstr1Operand(i32 %16, i32 0, i32 %18, i32 0)
ret void
}

LLVM IR (-O2):
define void @GenPostIncDecIndirect(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 81
%4 = select i1 %3, i32 7, i32 8
%5 = tail call i32 @GenPrintInstr2Operands(i32 0, i32 0, i32 4, i32 0, i32 3, i32 0)
%6 = tail call i32 @GenSelectByteOrWord(i32 11, i32 %0)
%7 = tail call i32 @GenPrintInstr2Operands(i32 0, i32 0, i32 %6, i32 0, i32 26, i32 0)
%8 = tail call i32 @GenExtendRegAIfNeeded(i32 %0)
%9 = tail call i32 @GenSelectByteOrWord(i32 30, i32 %0)
%10 = tail call i32 @GenPrintInstr1Operand(i32 %4, i32 0, i32 %9, i32 0)
ret void
}