#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*/ GenPrintInstr2Operands(int, int /*<<< orphan*/,
                                          int /*<<< orphan*/, int, int, int);
int /*<<< orphan*/ GenSelectByteOrWord(int, int);
void GenPostAddSubIdent(int opSz, int val, int label, int tok) {
  int instr = 0x09;
  if (tok != 'S')
    instr = 0x0A;
  GenPrintInstr2Operands(0x00, 0, GenSelectByteOrWord(0x0B, opSz), 0, 0x10,
                         label);
  GenExtendRegAIfNeeded(opSz);
  GenPrintInstr2Operands(instr, 0, GenSelectByteOrWord(0x14, opSz), label, 0x0D,
                         val);
}


x86 assembly (clang, -O0):
<GenPostAddSubIdent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
movl   $0x9,-0x14(%rbp)
cmpl   $0x53,-0x10(%rbp)
je     115c <GenPostAddSubIdent+0x2c>
movl   $0xa,-0x14(%rbp)
mov    -0x4(%rbp),%esi
mov    $0xb,%edi
call   1030 <GenSelectByteOrWord@plt>
mov    %eax,%edx
mov    -0xc(%rbp),%r9d
xor    %ecx,%ecx
mov    $0x10,%r8d
mov    %ecx,%edi
mov    %ecx,%esi
call   1040 <GenPrintInstr2Operands@plt>
mov    -0x4(%rbp),%edi
call   1050 <GenExtendRegAIfNeeded@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x14,%edi
call   1030 <GenSelectByteOrWord@plt>
mov    -0x18(%rbp),%edi
mov    %eax,%edx
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%r9d
xor    %esi,%esi
mov    $0xd,%r8d
call   1040 <GenPrintInstr2Operands@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GenPostAddSubIdent>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r15d
mov    %esi,%r14d
mov    %edi,%ebx
xor    %eax,%eax
cmp    $0x53,%ecx
sete   %al
mov    $0xa,%ebp
sub    %eax,%ebp
mov    $0xb,%edi
mov    %ebx,%esi
call   1030 <GenSelectByteOrWord@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    %eax,%edx
xor    %ecx,%ecx
mov    $0x10,%r8d
mov    %r15d,%r9d
call   1040 <GenPrintInstr2Operands@plt>
mov    %ebx,%edi
call   1050 <GenExtendRegAIfNeeded@plt>
mov    $0x14,%edi
mov    %ebx,%esi
call   1030 <GenSelectByteOrWord@plt>
mov    %ebp,%edi
xor    %esi,%esi
mov    %eax,%edx
mov    %r15d,%ecx
mov    $0xd,%r8d
mov    %r14d,%r9d
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <GenPrintInstr2Operands@plt>

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

LLVM IR (-O2):
define void @GenPostAddSubIdent(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp eq i32 %3, 83
%6 = select i1 %5, i32 9, i32 10
%7 = tail call i32 @GenSelectByteOrWord(i32 11, i32 %0)
%8 = tail call i32 @GenPrintInstr2Operands(i32 0, i32 0, i32 %7, i32 0, i32 16, i32 %2)
%9 = tail call i32 @GenExtendRegAIfNeeded(i32 %0)
%10 = tail call i32 @GenSelectByteOrWord(i32 20, i32 %0)
%11 = tail call i32 @GenPrintInstr2Operands(i32 %6, i32 0, i32 %10, i32 %2, i32 13, i32 %1)
ret void
}