#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*/ GenPrintInstr2Operands(int, int /*<<< orphan*/, int,
                                          int /*<<< orphan*/, int,
                                          int /*<<< orphan*/);
void GenReadCRegIndirect(int opSz) {
  GenPrintInstr2Operands(0x00, 0, 0x04, 0, 0x03, 0);
  if (opSz == -1)
    GenPrintInstr2Operands(0x01, 0, 0x05, 0, 0x1B, 0);
  else if (opSz == 1)
    GenPrintInstr2Operands(0x02, 0, 0x05, 0, 0x1B, 0);
  else
    GenPrintInstr2Operands(0x00, 0, 0x05, 0, 0x1A, 0);
}


x86 assembly (clang, -O0):
<GenReadCRegIndirect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %r9d,%r9d
mov    $0x4,%edx
mov    $0x3,%r8d
mov    %r9d,%edi
mov    %r9d,%esi
mov    %r9d,%ecx
call   1030 <GenPrintInstr2Operands@plt>
cmpl   $0xffffffff,-0x4(%rbp)
jne    1164 <GenReadCRegIndirect+0x54>
mov    $0x1,%edi
xor    %r9d,%r9d
mov    $0x5,%edx
mov    $0x1b,%r8d
mov    %r9d,%esi
mov    %r9d,%ecx
call   1030 <GenPrintInstr2Operands@plt>
jmp    11b2 <GenReadCRegIndirect+0xa2>
cmpl   $0x1,-0x4(%rbp)
jne    1191 <GenReadCRegIndirect+0x81>
mov    $0x2,%edi
xor    %r9d,%r9d
mov    $0x5,%edx
mov    $0x1b,%r8d
mov    %r9d,%esi
mov    %r9d,%ecx
call   1030 <GenPrintInstr2Operands@plt>
jmp    11ad <GenReadCRegIndirect+0x9d>
xor    %r9d,%r9d
mov    $0x5,%edx
mov    $0x1a,%r8d
mov    %r9d,%edi
mov    %r9d,%esi
mov    %r9d,%ecx
call   1030 <GenPrintInstr2Operands@plt>
jmp    11b2 <GenReadCRegIndirect+0xa2>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GenReadCRegIndirect>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
xor    %esi,%esi
mov    $0x4,%edx
xor    %ecx,%ecx
mov    $0x3,%r8d
xor    %r9d,%r9d
call   1030 <GenPrintInstr2Operands@plt>
cmp    $0x1,%ebx
je     113d <GenReadCRegIndirect+0x2d>
cmp    $0xffffffff,%ebx
jne    1153 <GenReadCRegIndirect+0x43>
mov    $0x1,%edi
jmp    1142 <GenReadCRegIndirect+0x32>
mov    $0x2,%edi
xor    %esi,%esi
mov    $0x5,%edx
xor    %ecx,%ecx
mov    $0x1b,%r8d
jmp    1164 <GenReadCRegIndirect+0x54>
xor    %edi,%edi
xor    %esi,%esi
mov    $0x5,%edx
xor    %ecx,%ecx
mov    $0x1a,%r8d
xor    %r9d,%r9d
pop    %rbx
jmp    1030 <GenPrintInstr2Operands@plt>

LLVM IR (-O0):
define void @GenReadCRegIndirect(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @GenPrintInstr2Operands(i32 0, i32 0, i32 4, i32 0, i32 3, i32 0)
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @GenPrintInstr2Operands(i32 1, i32 0, i32 5, i32 0, i32 27, i32 0)
br label %16
8: ; preds = %1
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 1
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 @GenPrintInstr2Operands(i32 2, i32 0, i32 5, i32 0, i32 27, i32 0)
br label %15
13: ; preds = %8
%14 = call i32 @GenPrintInstr2Operands(i32 0, i32 0, i32 5, i32 0, i32 26, i32 0)
br label %15
15: ; preds = %13, %11
br label %16
16: ; preds = %15, %6
ret void
}

LLVM IR (-O2):
define void @GenReadCRegIndirect(i32 %0) {
%2 = tail call i32 @GenPrintInstr2Operands(i32 0, i32 0, i32 4, i32 0, i32 3, i32 0)
switch i32 %0, label %7 [
i32 -1, label %3
i32 1, label %5
]
3: ; preds = %1
%4 = tail call i32 @GenPrintInstr2Operands(i32 1, i32 0, i32 5, i32 0, i32 27, i32 0)
br label %9
5: ; preds = %1
%6 = tail call i32 @GenPrintInstr2Operands(i32 2, i32 0, i32 5, i32 0, i32 27, i32 0)
br label %9
7: ; preds = %1
%8 = tail call i32 @GenPrintInstr2Operands(i32 0, i32 0, i32 5, i32 0, i32 26, i32 0)
br label %9
9: ; preds = %5, %7, %3
ret void
}