#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);
void GenReadCRegLocal(int opSz, int ofs) {
  if (opSz == -1)
    GenPrintInstr2Operands(0x01, 0, 0x05, 0, 0x16, ofs);
  else if (opSz == 1)
    GenPrintInstr2Operands(0x02, 0, 0x05, 0, 0x16, ofs);
  else
    GenPrintInstr2Operands(0x00, 0, 0x05, 0, 0x15, ofs);
}


x86 assembly (clang, -O0):
<GenReadCRegLocal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
jne    114a <GenReadCRegLocal+0x3a>
mov    -0x8(%rbp),%r9d
mov    $0x1,%edi
xor    %ecx,%ecx
mov    $0x5,%edx
mov    $0x16,%r8d
mov    %ecx,%esi
call   1030 <GenPrintInstr2Operands@plt>
jmp    1195 <GenReadCRegLocal+0x85>
cmpl   $0x1,-0x4(%rbp)
jne    1176 <GenReadCRegLocal+0x66>
mov    -0x8(%rbp),%r9d
mov    $0x2,%edi
xor    %ecx,%ecx
mov    $0x5,%edx
mov    $0x16,%r8d
mov    %ecx,%esi
call   1030 <GenPrintInstr2Operands@plt>
jmp    1190 <GenReadCRegLocal+0x80>
mov    -0x8(%rbp),%r9d
xor    %ecx,%ecx
mov    $0x5,%edx
mov    $0x15,%r8d
mov    %ecx,%edi
mov    %ecx,%esi
call   1030 <GenPrintInstr2Operands@plt>
jmp    1195 <GenReadCRegLocal+0x85>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GenReadCRegLocal>:
mov    %esi,%r9d
cmp    $0x1,%edi
je     1124 <GenReadCRegLocal+0x14>
cmp    $0xffffffff,%edi
jne    113d <GenReadCRegLocal+0x2d>
mov    $0x1,%edi
jmp    1129 <GenReadCRegLocal+0x19>
mov    $0x2,%edi
xor    %esi,%esi
mov    $0x5,%edx
xor    %ecx,%ecx
mov    $0x16,%r8d
jmp    1030 <GenPrintInstr2Operands@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0x5,%edx
xor    %ecx,%ecx
mov    $0x15,%r8d
jmp    1030 <GenPrintInstr2Operands@plt>

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

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