xunge/DecIR huggingface dataset:
int annotated_inc_main(int i) { return ++i; }


x86 assembly (clang, -O0):
<annotated_inc_main>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<annotated_inc_main>:
lea    0x1(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @annotated_inc_main(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
store i32 %4, i32* %2
ret i32 %4
}

LLVM IR (-O2):
define i32 @annotated_inc_main(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ GL_COLOR_BUFFER_BIT;
int /*<<< orphan*/ glClear(int /*<<< orphan*/);
int /*<<< orphan*/ glFlush();
void display(void) {
  glClear(GL_COLOR_BUFFER_BIT);
  glFlush();
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
call   1030 <glClear@plt>
mov    $0x0,%al
call   1040 <glFlush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
call   1030 <glClear@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <glFlush@plt>

LLVM IR (-O0):
@GL_COLOR_BUFFER_BIT = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = call i32 @glClear(i32 %1)
%3 = call i32 (...) @glFlush()
ret void
}

LLVM IR (-O2):
@GL_COLOR_BUFFER_BIT = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = tail call i32 @glClear(i32 %1)
%3 = tail call i32 (...) @glFlush()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int randomized_select(int *, int /*<<< orphan*/, int, int);
int main() {
  int arr[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
  int len = 10;
  int i = 8;
  printf("第%d小的数是:%d\n", i, randomized_select(arr, 0, 9, i));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x28,%edx
call   1050 <memcpy@plt>
movl   $0xa,-0x34(%rbp)
movl   $0x8,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    %eax,-0x3c(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%ecx
xor    %esi,%esi
mov    $0x9,%edx
call   1030 <randomized_select@plt>
mov    -0x3c(%rbp),%esi
mov    %eax,%edx
lea    0xea1(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xef5(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
xor    %esi,%esi
mov    $0x9,%edx
mov    $0x8,%ecx
call   1030 <randomized_select@plt>
lea    0xec6(%rip),%rdi
mov    $0x8,%esi
mov    %eax,%edx
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.arr = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10]
@.str = [22 x i8] c"\E7\AC\AC%d\E5\B0\8F\E7\9A\84\E6\95\B0\E6\98\AF:%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [10 x i32]* %2 to i8*
store i32 10, i32* %3
store i32 8, i32* %4
%6 = load i32, i32* %4
%7 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%8 = load i32, i32* %4
%9 = call i32 @randomized_select(i32* %7, i32 0, i32 9, i32 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10]
@.str = [22 x i8] c"\E7\AC\AC%d\E5\B0\8F\E7\9A\84\E6\95\B0\E6\98\AF:%d\0A\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @randomized_select(i32* %3, i32 0, i32 9, i32 8)
%5 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 8, i32 %4)
ret i32 0
}
void hpgl_foreground(int color) { color = color; }


x86 assembly (clang, -O0):
<hpgl_foreground>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<hpgl_foreground>:
ret

LLVM IR (-O0):
define void @hpgl_foreground(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
store i32 %3, i32* %2
ret void
}

LLVM IR (-O2):
define void @hpgl_foreground(i32 %0) {
ret void
}
/* Variables and functions */
void stub1(float, int);
void testClosureFIrV(void (*closure)(float, int), float a1, int a2) {
  if (closure != NULL)
    (*closure)(a1, a2);
}


x86 assembly (clang, -O0):
<testClosureFIrV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     112d <testClosureFIrV+0x2d>
mov    -0x8(%rbp),%rax
movss  -0xc(%rbp),%xmm0
mov    -0x10(%rbp),%edi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testClosureFIrV>:
test   %rdi,%rdi
je     110c <testClosureFIrV+0xc>
mov    %rdi,%rax
mov    %esi,%edi
jmp    *%rax
ret

LLVM IR (-O0):
define void @testClosureFIrV(void (float, i32)* %0, float %1, i32 %2) {
%4 = alloca void (float, i32)*
%5 = alloca float
%6 = alloca i32
store void (float, i32)* %0, void (float, i32)** %4
store float %1, float* %5
store i32 %2, i32* %6
%7 = load void (float, i32)*, void (float, i32)** %4
%8 = icmp ne void (float, i32)* %7, null
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = load void (float, i32)*, void (float, i32)** %4
%11 = load float, float* %5
%12 = load i32, i32* %6
br label %13
13: ; preds = %9, %3
ret void
}

LLVM IR (-O2):
define void @testClosureFIrV(void (float, i32)* %0, float %1, i32 %2) {
%4 = icmp eq void (float, i32)* %0, null
br i1 %4, label %6, label %5
5: ; preds = %3
tail call void %0(float %1, i32 %2)
br label %6
6: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ UsartHardware_Init(int /*<<< orphan*/);
int /*<<< orphan*/ UsartHardware_TransmitString(int /*<<< orphan*/);
int /*<<< orphan*/ UsartModel_GetBaudRateRegisterSetting();
int /*<<< orphan*/ UsartModel_GetWakeupMessage();
void UsartConductor_Init(void) {
  UsartHardware_Init(UsartModel_GetBaudRateRegisterSetting());
  UsartHardware_TransmitString(UsartModel_GetWakeupMessage());
}


x86 assembly (clang, -O0):
<UsartConductor_Init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <UsartModel_GetBaudRateRegisterSetting@plt>
mov    %eax,%edi
call   1030 <UsartHardware_Init@plt>
mov    $0x0,%al
call   1050 <UsartModel_GetWakeupMessage@plt>
mov    %eax,%edi
call   1040 <UsartHardware_TransmitString@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<UsartConductor_Init>:
push   %rax
xor    %eax,%eax
call   1060 <UsartModel_GetBaudRateRegisterSetting@plt>
mov    %eax,%edi
call   1030 <UsartHardware_Init@plt>
xor    %eax,%eax
call   1050 <UsartModel_GetWakeupMessage@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UsartHardware_TransmitString@plt>

LLVM IR (-O0):
define void @UsartConductor_Init() {
%1 = call i32 (...) @UsartModel_GetBaudRateRegisterSetting()
%2 = call i32 @UsartHardware_Init(i32 %1)
%3 = call i32 (...) @UsartModel_GetWakeupMessage()
%4 = call i32 @UsartHardware_TransmitString(i32 %3)
ret void
}

LLVM IR (-O2):
define void @UsartConductor_Init() {
%1 = tail call i32 (...) @UsartModel_GetBaudRateRegisterSetting()
%2 = tail call i32 @UsartHardware_Init(i32 %1)
%3 = tail call i32 (...) @UsartModel_GetWakeupMessage()
%4 = tail call i32 @UsartHardware_TransmitString(i32 %3)
ret void
}
int tab_size(char **tab) {
  int count;
  for (count = 0; tab[count]; count++)
    ;
  return (count);
}


x86 assembly (clang, -O0):
<tab_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1135 <tab_size+0x35>
jmp    1127 <tab_size+0x27>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <tab_size+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tab_size>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpq   $0x0,(%rdi)
lea    0x8(%rdi),%rdi
jne    1110 <tab_size+0x10>
ret

LLVM IR (-O0):
define i32 @tab_size(i8** %0) {
%2 = alloca i8**
%3 = alloca i32
store i8** %0, i8*** %2
store i32 0, i32* %3
br label %4
4: ; preds = %12, %1
%5 = load i8**, i8*** %2
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8*, i8** %5, i64 %7
%9 = load i8*, i8** %8
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %15
11: ; preds = %4
br label %12
12: ; preds = %11
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %4
15: ; preds = %4
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @tab_size(i8** nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8*, i8** %0, i64 %3
%5 = load i8*, i8** %4
%6 = icmp eq i8* %5, null
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
main() {
  1;
  1U;
  1L;
  1LL;
  1UL;
  1ULL;
  1LL;
  1LLU;
  2.3e-5;
  -5.2f;
  1.L;
  2.F;
  0x52.1p-3f;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @main() {
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int cmpfunc_uint32(const void *a, const void *b) {
  const uint32_t *x = a, *y = b;
  if (*x > *y)
    return 1;
  else
    return (*x < *y) ? -1 : 0;
}


x86 assembly (clang, -O0):
<cmpfunc_uint32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%rax
jle    113c <cmpfunc_uint32+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    115a <cmpfunc_uint32+0x5a>
mov    -0x20(%rbp),%rax
mov    (%rax),%rdx
mov    -0x28(%rbp),%rax
mov    (%rax),%rsi
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    %rsi,%rdx
cmovl  %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmpfunc_uint32>:
mov    (%rdi),%rax
mov    (%rsi),%rcx
xor    %edx,%edx
cmp    %rcx,%rax
setl   %dl
neg    %edx
cmp    %rcx,%rax
mov    $0x1,%eax
cmovle %edx,%eax
ret

LLVM IR (-O0):
define i32 @cmpfunc_uint32(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64*
%7 = alloca i64*
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i64*
store i64* %9, i64** %6
%10 = load i8*, i8** %5
%11 = bitcast i8* %10 to i64*
store i64* %11, i64** %7
%12 = load i64*, i64** %6
%13 = load i64, i64* %12
%14 = load i64*, i64** %7
%15 = load i64, i64* %14
%16 = icmp sgt i64 %13, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 1, i32* %3
br label %26
18: ; preds = %2
%19 = load i64*, i64** %6
%20 = load i64, i64* %19
%21 = load i64*, i64** %7
%22 = load i64, i64* %21
%23 = icmp slt i64 %20, %22
%24 = zext i1 %23 to i64
%25 = select i1 %23, i32 -1, i32 0
store i32 %25, i32* %3
br label %26
26: ; preds = %18, %17
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
define i32 @cmpfunc_uint32(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = bitcast i8* %1 to i64*
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp sgt i64 %5, %6
%8 = icmp slt i64 %5, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void help(void) {
  printf("Write -h for help.\n");
  return;
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Write -h for help.\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [19 x i8] c"Write -h for help.\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret void
}
int iscnst(y)
int y;
{ return (y == 2); }


x86 assembly (clang, -O0):
<iscnst>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iscnst>:
xor    %eax,%eax
cmp    $0x2,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @iscnst(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 2
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @iscnst(i32 %0) {
%2 = icmp eq i32 %0, 2
%3 = zext i1 %2 to i32
ret i32 %3
}
void delay(volatile unsigned long dly) {
  for (; dly != 0; --dly)
    ;
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmp    $0x0,%rax
je     112c <delay+0x2c>
jmp    111b <delay+0x1b>
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <delay+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay>:
mov    %rdi,-0x8(%rsp)
cmpq   $0x0,-0x8(%rsp)
je     111e <delay+0x1e>
nopl   (%rax)
addq   $0xffffffffffffffff,-0x8(%rsp)
cmpq   $0x0,-0x8(%rsp)
jne    1110 <delay+0x10>
ret

LLVM IR (-O0):
define void @delay(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
br label %3
3: ; preds = %7, %1
%4 = load volatile i64, i64* %2
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %3
br label %7
7: ; preds = %6
%8 = load volatile i64, i64* %2
%9 = add i64 %8, -1
store volatile i64 %9, i64* %2
br label %3
10: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @delay(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = icmp eq i64 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %1, %5
%6 = load volatile i64, i64* %2
%7 = add i64 %6, -1
store volatile i64 %7, i64* %2
%8 = load volatile i64, i64* %2
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %5
10: ; preds = %5, %1
ret void
}
/* Variables and functions */
float CombinedShannonEntropy(int const *, int const *, int);
float PredictionCostSpatial(int const *, int, double const);
float PredictionCostCrossColor(const int accumulated[256],
                               const int counts[256]) {
  static const double kExpValue = 2.4;
  return CombinedShannonEntropy(counts, accumulated, 256) +
         PredictionCostSpatial(counts, 3, kExpValue);
}


x86 assembly (clang, -O0):
<PredictionCostCrossColor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x100,%edx
call   1030 <CombinedShannonEntropy@plt>
movss  %xmm0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x3,%esi
movsd  0xea8(%rip),%xmm0
call   1040 <PredictionCostSpatial@plt>
movaps %xmm0,%xmm1
movss  -0x14(%rbp),%xmm0
addss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PredictionCostCrossColor>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    %rdi,%rsi
mov    %rbx,%rdi
mov    $0x100,%edx
call   1030 <CombinedShannonEntropy@plt>
movss  %xmm0,0xc(%rsp)
movsd  0xeba(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x3,%esi
call   1040 <PredictionCostSpatial@plt>
addss  0xc(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@PredictionCostCrossColor.kExpValue = internal constant double 2.400000e+00
define float @PredictionCostCrossColor(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = load i32*, i32** %3
%7 = call float @CombinedShannonEntropy(i32* %5, i32* %6, i32 256)
%8 = load i32*, i32** %4
%9 = call float @PredictionCostSpatial(i32* %8, i32 3, double 2.400000e+00)
%10 = fadd float %7, %9
ret float %10
}

LLVM IR (-O2):
define float @PredictionCostCrossColor(i32* %0, i32* %1) {
%3 = tail call float @CombinedShannonEntropy(i32* %1, i32* %0, i32 256)
%4 = tail call float @PredictionCostSpatial(i32* %1, i32 3, double 2.400000e+00)
%5 = fadd float %3, %4
ret float %5
}
/* Variables and functions */
char *CatStr(char *, char const *);
char *CopyStr(char *Dest, const char *Src) {
  if (Dest)
    *Dest = 0;
  return (CatStr(Dest, Src));
}


x86 assembly (clang, -O0):
<CopyStr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1132 <CopyStr+0x22>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <CatStr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CopyStr>:
test   %rdi,%rdi
je     1118 <CopyStr+0x8>
movb   $0x0,(%rdi)
jmp    1030 <CatStr@plt>

LLVM IR (-O0):
define i8* @CopyStr(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = load i8*, i8** %3
store i8 0, i8* %8
br label %9
9: ; preds = %7, %2
%10 = load i8*, i8** %3
%11 = load i8*, i8** %4
%12 = call i8* @CatStr(i8* %10, i8* %11)
ret i8* %12
}

LLVM IR (-O2):
define i8* @CopyStr(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %5, label %4
4: ; preds = %2
store i8 0, i8* %0
br label %5
5: ; preds = %4, %2
%6 = tail call i8* @CatStr(i8* %0, i8* %1)
ret i8* %6
}
void test_no_clause() {
  int i;
#pragma omp target simd
  for (i = 0; i < 16; ++i)
    ;
#pragma omp target simd
  ++i;
}


x86 assembly (clang, -O0):
<test_no_clause>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1128 <test_no_clause+0x28>
jmp    111a <test_no_clause+0x1a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <test_no_clause+0xb>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_no_clause>:
ret

LLVM IR (-O0):
define void @test_no_clause() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %6, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 16
br i1 %4, label %5, label %9
5: ; preds = %2
br label %6
6: ; preds = %5
%7 = load i32, i32* %1
%8 = add nsw i32 %7, 1
store i32 %8, i32* %1
br label %2
9: ; preds = %2
%10 = load i32, i32* %1
%11 = add nsw i32 %10, 1
store i32 %11, i32* %1
ret void
}

LLVM IR (-O2):
define void @test_no_clause() {
ret void
}
char *roadmap_config_skip_spaces(char *p) {
  while (*p == ' ' || *p == '\t')
    p++;
  return p;
}


x86 assembly (clang, -O0):
<roadmap_config_skip_spaces>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x9(%rbp)
je     112d <roadmap_config_skip_spaces+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113d <roadmap_config_skip_spaces+0x3d>
jmp    114e <roadmap_config_skip_spaces+0x4e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <roadmap_config_skip_spaces+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<roadmap_config_skip_spaces>:
mov    %rdi,%rax
jmp    1114 <roadmap_config_skip_spaces+0x14>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rax
movzbl (%rax),%ecx
cmp    $0x20,%cl
je     1110 <roadmap_config_skip_spaces+0x10>
cmp    $0x9,%cl
je     1110 <roadmap_config_skip_spaces+0x10>
ret

LLVM IR (-O0):
define i8* @roadmap_config_skip_spaces(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %15, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 32
br i1 %7, label %13, label %8
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 9
br label %13
13: ; preds = %8, %3
%14 = phi i1 [ true, %3 ], [ %12, %8 ]
br i1 %14, label %15, label %18
15: ; preds = %13
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %2
br label %3
18: ; preds = %13
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
define i8* @roadmap_config_skip_spaces(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %7 [
i8 32, label %5
i8 9, label %5
]
5: ; preds = %2, %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ le32toh(int /*<<< orphan*/);
uint32_t readl(void *a) {
  uint32_t *p = a;
  return le32toh(*p);
}


x86 assembly (clang, -O0):
<readl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1030 <le32toh@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readl>:
mov    (%rdi),%edi
jmp    1030 <le32toh@plt>

LLVM IR (-O0):
define i32 @readl(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
%8 = call i32 @le32toh(i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @readl(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @le32toh(i32 %3)
ret i32 %4
}
double calc_baz(double const x) { return x * 9.38; }


x86 assembly (clang, -O0):
<calc_baz>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_baz>:
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @calc_baz(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 9.380000e+00
ret double %4
}

LLVM IR (-O2):
define double @calc_baz(double %0) {
%2 = fmul double %0, 9.380000e+00
ret double %2
}
void foo_2_1_1_2_2_2_1_1_2() {}


x86 assembly (clang, -O0):
<foo_2_1_1_2_2_2_1_1_2>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo_2_1_1_2_2_2_1_1_2>:
ret

LLVM IR (-O0):
define void @foo_2_1_1_2_2_2_1_1_2() {
ret void
}

LLVM IR (-O2):
define void @foo_2_1_1_2_2_2_1_1_2() {
ret void
}
/* Variables and functions */
unsigned char nvmem_read(int, int, int /*<<< orphan*/, unsigned char *);
unsigned char nvmem_get_mac_address(unsigned char *mac) {
  return nvmem_read((6), (6), 0, mac);
}


x86 assembly (clang, -O0):
<nvmem_get_mac_address>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x6,%esi
xor    %edx,%edx
mov    %esi,%edi
call   1030 <nvmem_read@plt>
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nvmem_get_mac_address>:
mov    %rdi,%rcx
mov    $0x6,%edi
mov    $0x6,%esi
xor    %edx,%edx
jmp    1030 <nvmem_read@plt>

LLVM IR (-O0):
define zeroext i8 @nvmem_get_mac_address(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call zeroext i8 @nvmem_read(i32 6, i32 6, i32 0, i8* %3)
ret i8 %4
}

LLVM IR (-O2):
define zeroext i8 @nvmem_get_mac_address(i8* %0) {
%2 = tail call zeroext i8 @nvmem_read(i32 6, i32 6, i32 0, i8* %0)
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int sumDivisbleBy(int, int);
int main() {
  int result =
      (sumDivisbleBy(3, 999) + sumDivisbleBy(5, 999) - sumDivisbleBy(15, 999));
  printf("%d\n", result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x3,%edi
mov    $0x3e7,%esi
call   1040 <sumDivisbleBy@plt>
mov    %eax,-0x10(%rbp)
mov    $0x5,%edi
mov    $0x3e7,%esi
call   1040 <sumDivisbleBy@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    $0xf,%edi
mov    $0x3e7,%esi
call   1040 <sumDivisbleBy@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x3,%edi
mov    $0x3e7,%esi
call   1040 <sumDivisbleBy@plt>
mov    %eax,%ebx
mov    $0x5,%edi
mov    $0x3e7,%esi
call   1040 <sumDivisbleBy@plt>
add    %eax,%ebx
mov    $0xf,%edi
mov    $0x3e7,%esi
call   1040 <sumDivisbleBy@plt>
sub    %eax,%ebx
lea    0xea5(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @sumDivisbleBy(i32 3, i32 999)
%4 = call i32 @sumDivisbleBy(i32 5, i32 999)
%5 = add nsw i32 %3, %4
%6 = call i32 @sumDivisbleBy(i32 15, i32 999)
%7 = sub nsw i32 %5, %6
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @sumDivisbleBy(i32 3, i32 999)
%2 = tail call i32 @sumDivisbleBy(i32 5, i32 999)
%3 = add nsw i32 %2, %1
%4 = tail call i32 @sumDivisbleBy(i32 15, i32 999)
%5 = sub i32 %3, %4
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
void foo_cuda() {}


x86 assembly (clang, -O0):
<foo_cuda>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo_cuda>:
ret

LLVM IR (-O0):
define void @foo_cuda() {
ret void
}

LLVM IR (-O2):
define void @foo_cuda() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ ofl_queue_print(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ *open_memstream(char **, size_t *);
char *ofl_queue_to_string(uint32_t queue) {
  char *str;
  size_t str_size;
  FILE *stream = open_memstream(&str, &str_size);
  ofl_queue_print(stream, queue);
  fclose(stream);
  return str;
}


x86 assembly (clang, -O0):
<ofl_queue_to_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <open_memstream@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1030 <ofl_queue_print@plt>
mov    -0x20(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ofl_queue_to_string>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %edi,%ebp
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1040 <open_memstream@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %ebp,%esi
call   1030 <ofl_queue_print@plt>
mov    %rbx,%rdi
call   1050 <fclose@plt>
mov    0x8(%rsp),%rax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @ofl_queue_to_string(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32*
store i32 %0, i32* %2
%6 = call i32* @open_memstream(i8** %3, i64* %4)
store i32* %6, i32** %5
%7 = load i32*, i32** %5
%8 = load i32, i32* %2
%9 = call i32 @ofl_queue_print(i32* %7, i32 %8)
%10 = load i32*, i32** %5
%11 = call i32 @fclose(i32* %10)
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
define i8* @ofl_queue_to_string(i32 %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = bitcast i8** %2 to i8*
%5 = bitcast i64* %3 to i8*
%6 = call i32* @open_memstream(i8** %2, i64* %3)
%7 = call i32 @ofl_queue_print(i32* %6, i32 %0)
%8 = call i32 @fclose(i32* %6)
%9 = load i8*, i8** %2
ret i8* %9
}
__attribute__((section(".after_vectors"))) void bss_init(unsigned int start,
                                                         unsigned int len) {
  unsigned int *pulDest = (unsigned int *)start;
  unsigned int loop;
  for (loop = 0; loop < len; loop = loop + 4) {
    *pulDest++ = 0;
  }
}


x86 assembly (clang, -O0):
<bss_init>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    1147 <bss_init+0x47>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x10(%rbp)
movl   $0x0,(%rax)
mov    -0x14(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x14(%rbp)
jmp    1118 <bss_init+0x18>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bss_init>:
test   %esi,%esi
je     112e <bss_init+0x1e>
push   %rax
mov    %esi,%edx
mov    %edi,%edi
add    $0xffffffff,%edx
and    $0xfffffffc,%edx
add    $0x4,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define void @bss_init(i32 %0, i32 %1) section ".after_vectors" {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
store i32* %9, i32** %5
store i32 0, i32* %6
br label %10
10: ; preds = %17, %2
%11 = load i32, i32* %6
%12 = load i32, i32* %4
%13 = icmp ult i32 %11, %12
br i1 %13, label %14, label %20
14: ; preds = %10
%15 = load i32*, i32** %5
%16 = getelementptr inbounds i32, i32* %15, i32 1
store i32* %16, i32** %5
store i32 0, i32* %15
br label %17
17: ; preds = %14
%18 = load i32, i32* %6
%19 = add i32 %18, 4
store i32 %19, i32* %6
br label %10
20: ; preds = %10
ret void
}

LLVM IR (-O2):
define void @bss_init(i32 %0, i32 %1) section ".after_vectors" {
%3 = icmp eq i32 %1, 0
br i1 %3, label %11, label %4
4: ; preds = %2
%5 = zext i32 %0 to i64
%6 = inttoptr i64 %5 to i8*
%7 = add i32 %1, -1
%8 = and i32 %7, -4
%9 = zext i32 %8 to i64
%10 = add nuw nsw i64 %9, 4
br label %11
11: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0xfb() {
  Assert_real((iscntrl(251) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_iscntrl.c",
              1260, ("iscntrl should be 0 for 0xfb"));
}


x86 assembly (clang, -O0):
<t_iscntrl_0xfb>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfb,%edi
call   1030 <iscntrl@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x4ec,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_iscntrl_0xfb>:
push   %rax
mov    $0xfb,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4ec,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xfb\00"
define void @t_iscntrl_0xfb() {
%1 = call i64 @iscntrl(i32 251)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1260, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xfb\00"
define void @t_iscntrl_0xfb() {
%1 = tail call i64 @iscntrl(i32 251)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1260, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ err_sys(char *);
int fcntl(int, int, int);
int Fcntl(int fd, int cmd, int arg) {
  int n;
  if ((n = fcntl(fd, cmd, arg)) == -1)
    err_sys("fcntl error");
  return (n);
}


x86 assembly (clang, -O0):
<Fcntl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1040 <fcntl@plt>
mov    %eax,-0x10(%rbp)
cmp    $0xffffffff,%eax
jne    1157 <Fcntl+0x37>
lea    0xeae(%rip),%rdi
call   1030 <err_sys@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Fcntl>:
push   %rbx
call   1040 <fcntl@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
jne    1139 <Fcntl+0x19>
lea    0xecc(%rip),%rdi
call   1030 <err_sys@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"fcntl error\00"
define i32 @Fcntl(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @fcntl(i32 %8, i32 %9, i32 %10)
store i32 %11, i32* %7
%12 = icmp eq i32 %11, -1
br i1 %12, label %13, label %15
13: ; preds = %3
%14 = call i32 @err_sys(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %3
%16 = load i32, i32* %7
ret i32 %16
}

LLVM IR (-O2):
@.str = [12 x i8] c"fcntl error\00"
define i32 @Fcntl(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @fcntl(i32 %0, i32 %1, i32 %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @err_sys(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int /*<<< orphan*/);
int put2(const char *string) {
  int count = 0;
  while (*string) {
    putchar(*string++);
    count++;
  }
  return count;
}


x86 assembly (clang, -O0):
<put2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1155 <put2+0x45>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <put2+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put2>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     1138 <put2+0x28>
mov    %rdi,%r14
xor    %ebx,%ebx
nop
movsbl %al,%edi
call   1030 <putchar@plt>
movzbl 0x1(%r14,%rbx,1),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <put2+0x10>
jmp    113a <put2+0x2a>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @put2(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %8, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %16
8: ; preds = %4
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %2
%11 = load i8, i8* %9
%12 = sext i8 %11 to i32
%13 = call i32 @putchar(i32 %12)
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %4
16: ; preds = %4
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @put2(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 0, %1 ]
%7 = phi i8* [ %8, %4 ], [ %0, %1 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = sext i8 %5 to i32
%10 = tail call i32 @putchar(i32 %9)
%11 = add nuw nsw i32 %6, 1
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %15
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ wcsncmp(int /*<<< orphan*/ *, int /*<<< orphan*/ *, size_t);
void uninivar_wcsncmp(wchar_t *Ct, wchar_t *S, size_t N) {
  wchar_t *ct;
  wchar_t *s;
  size_t n;
  (void)wcsncmp(ct, s, n);
  (void)wcsncmp(ct, S, N);
  (void)wcsncmp(Ct, s, N);
  (void)wcsncmp(Ct, S, n);
  (void)wcsncmp(Ct, S, N);
}


x86 assembly (clang, -O0):
<uninivar_wcsncmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
call   1030 <wcsncmp@plt>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <wcsncmp@plt>
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <wcsncmp@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x30(%rbp),%rdx
call   1030 <wcsncmp@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <wcsncmp@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninivar_wcsncmp>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
call   1030 <wcsncmp@plt>
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <wcsncmp@plt>
mov    %rbx,%rdi
mov    %r14,%rdx
call   1030 <wcsncmp@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <wcsncmp@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <wcsncmp@plt>

LLVM IR (-O0):
define void @uninivar_wcsncmp(i32* %0, i32* %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i64
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i64
store i32* %0, i32** %4
store i32* %1, i32** %5
store i64 %2, i64* %6
%10 = load i32*, i32** %7
%11 = load i32*, i32** %8
%12 = load i64, i64* %9
%13 = call i32 @wcsncmp(i32* %10, i32* %11, i64 %12)
%14 = load i32*, i32** %7
%15 = load i32*, i32** %5
%16 = load i64, i64* %6
%17 = call i32 @wcsncmp(i32* %14, i32* %15, i64 %16)
%18 = load i32*, i32** %4
%19 = load i32*, i32** %8
%20 = load i64, i64* %6
%21 = call i32 @wcsncmp(i32* %18, i32* %19, i64 %20)
%22 = load i32*, i32** %4
%23 = load i32*, i32** %5
%24 = load i64, i64* %9
%25 = call i32 @wcsncmp(i32* %22, i32* %23, i64 %24)
%26 = load i32*, i32** %4
%27 = load i32*, i32** %5
%28 = load i64, i64* %6
%29 = call i32 @wcsncmp(i32* %26, i32* %27, i64 %28)
ret void
}

LLVM IR (-O2):
define void @uninivar_wcsncmp(i32* %0, i32* %1, i64 %2) {
%4 = tail call i32 @wcsncmp(i32* undef, i32* undef, i64 undef)
%5 = tail call i32 @wcsncmp(i32* undef, i32* %1, i64 %2)
%6 = tail call i32 @wcsncmp(i32* %0, i32* undef, i64 %2)
%7 = tail call i32 @wcsncmp(i32* %0, i32* %1, i64 undef)
%8 = tail call i32 @wcsncmp(i32* %0, i32* %1, i64 %2)
ret void
}
/* Variables and functions */
float _tgammaf(float);
float tgammaf(float x) { return _tgammaf(x); }


x86 assembly (clang, -O0):
<tgammaf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <_tgammaf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tgammaf>:
jmp    1030 <_tgammaf@plt>

LLVM IR (-O0):
define float @tgammaf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @_tgammaf(float %3)
ret float %4
}

LLVM IR (-O2):
define float @tgammaf(float %0) {
%2 = tail call float @_tgammaf(float %0)
ret float %2
}
void cellgen_timer_reset() {}


x86 assembly (clang, -O0):
<cellgen_timer_reset>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cellgen_timer_reset>:
ret

LLVM IR (-O0):
define void @cellgen_timer_reset() {
ret void
}

LLVM IR (-O2):
define void @cellgen_timer_reset() {
ret void
}
void rop3_61_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = *D | S;
  stk3 = ~stk3;
  stk2 = T | stk3;
  stk1 = S ^ stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_61_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0xd(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xd(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xd(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_61_1_0>:
mov    (%rdi),%al
mov    %eax,%ecx
or     %sil,%cl
not    %cl
or     %dl,%cl
xor    %cl,%al
and    %sil,%al
xor    %cl,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_61_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8*, i8** %4
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = load i8, i8* %5
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %9
%17 = load i8, i8* %9
%18 = zext i8 %17 to i32
%19 = xor i32 %18, -1
%20 = trunc i32 %19 to i8
store i8 %20, i8* %9
%21 = load i8, i8* %6
%22 = zext i8 %21 to i32
%23 = load i8, i8* %9
%24 = zext i8 %23 to i32
%25 = or i32 %22, %24
%26 = trunc i32 %25 to i8
store i8 %26, i8* %8
%27 = load i8, i8* %5
%28 = zext i8 %27 to i32
%29 = load i8, i8* %8
%30 = zext i8 %29 to i32
%31 = xor i32 %28, %30
%32 = trunc i32 %31 to i8
store i8 %32, i8* %7
%33 = load i8, i8* %7
%34 = zext i8 %33 to i32
%35 = load i8, i8* %5
%36 = zext i8 %35 to i32
%37 = xor i32 %36, -1
%38 = and i32 %34, %37
%39 = load i8*, i8** %4
%40 = load i8, i8* %39
%41 = zext i8 %40 to i32
%42 = load i8, i8* %5
%43 = zext i8 %42 to i32
%44 = and i32 %41, %43
%45 = or i32 %38, %44
%46 = trunc i32 %45 to i8
%47 = load i8*, i8** %4
store i8 %46, i8* %47
ret void
}

LLVM IR (-O2):
define void @rop3_61_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %4, %1
%6 = xor i8 %5, -1
%7 = or i8 %6, %2
%8 = xor i8 %1, -1
%9 = and i8 %7, %8
%10 = and i8 %4, %1
%11 = or i8 %9, %10
store i8 %11, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ unimplemented();
void norm_ind(void) { unimplemented(); }


x86 assembly (clang, -O0):
<norm_ind>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <unimplemented@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<norm_ind>:
xor    %eax,%eax
jmp    1030 <unimplemented@plt>

LLVM IR (-O0):
define void @norm_ind() {
%1 = call i32 (...) @unimplemented()
ret void
}

LLVM IR (-O2):
define void @norm_ind() {
%1 = tail call i32 (...) @unimplemented()
ret void
}
/* Variables and functions */
int number_mm();
int number_range(int from, int to) {
  if ((to - from) < 1)
    return from;
  return ((number_mm() % (to - from + 1)) + from);
}


x86 assembly (clang, -O0):
<number_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x8(%rbp),%eax
cmp    $0x1,%eax
jge    1138 <number_range+0x28>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1151 <number_range+0x41>
mov    $0x0,%al
call   1030 <number_mm@plt>
mov    -0xc(%rbp),%ecx
sub    -0x8(%rbp),%ecx
add    $0x1,%ecx
cltd
idiv   %ecx
add    -0x8(%rbp),%edx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<number_range>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %edi,%ebx
sub    %edi,%ebp
jle    112a <number_range+0x1a>
xor    %eax,%eax
call   1030 <number_mm@plt>
add    $0x1,%ebp
cltd
idiv   %ebp
add    %edx,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @number_range(i32 %0, i32 %1) {
%3 = sub nsw i32 %1, %0
%4 = icmp slt i32 %3, 1
br i1 %4, label %10, label %5
5: ; preds = %2
%6 = tail call i32 (...) @number_mm()
%7 = add nuw nsw i32 %3, 1
%8 = srem i32 %6, %7
%9 = add nsw i32 %8, %0
br label %10
10: ; preds = %2, %5
%11 = phi i32 [ %9, %5 ], [ %0, %2 ]
ret i32 %11
}
double step(double center, double x, double h) {
  if (x >= center) {
    return h;
  }
  return 0;
}


x86 assembly (clang, -O0):
<step>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1132 <step+0x32>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    113a <step+0x3a>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<step>:
cmpnlesd %xmm1,%xmm0
andnpd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @step(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
%8 = load double, double* %6
%9 = load double, double* %5
%10 = fcmp oge double %8, %9
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = load double, double* %7
store double %12, double* %4
br label %14
13: ; preds = %3
store double 0.000000e+00, double* %4
br label %14
14: ; preds = %13, %11
%15 = load double, double* %4
ret double %15
}

LLVM IR (-O2):
define double @step(double %0, double %1, double %2) {
%4 = fcmp ult double %1, %0
%5 = select i1 %4, double 0.000000e+00, double %2
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ sort8(unsigned long *);
void nibble_sort_koorogi1(unsigned long *buf) {
  for (int i = 0; i < 1024; i += 8)
    sort8(buf + i);
}


x86 assembly (clang, -O0):
<nibble_sort_koorogi1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x400,-0xc(%rbp)
jge    1152 <nibble_sort_koorogi1+0x42>
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
call   1030 <sort8@plt>
mov    -0xc(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <nibble_sort_koorogi1+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nibble_sort_koorogi1>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0xfffffffffffffff8,%rbx
xchg   %ax,%ax
mov    %r14,%rdi
call   1030 <sort8@plt>
add    $0x8,%rbx
add    $0x40,%r14
cmp    $0x3f8,%rbx
jb     1120 <nibble_sort_koorogi1+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @nibble_sort_koorogi1(i64* %0) {
%2 = alloca i64*
%3 = alloca i32
store i64* %0, i64** %2
store i32 0, i32* %3
br label %4
4: ; preds = %13, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 1024
br i1 %6, label %7, label %16
7: ; preds = %4
%8 = load i64*, i64** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i64, i64* %8, i64 %10
%12 = call i32 @sort8(i64* %11)
br label %13
13: ; preds = %7
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 8
store i32 %15, i32* %3
br label %4
16: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @nibble_sort_koorogi1(i64* %0) {
br label %3
2: ; preds = %3
ret void
3: ; preds = %1, %3
%4 = phi i64 [ 0, %1 ], [ %7, %3 ]
%5 = getelementptr inbounds i64, i64* %0, i64 %4
%6 = tail call i32 @sort8(i64* %5)
%7 = add nuw nsw i64 %4, 8
%8 = icmp ult i64 %4, 1016
br i1 %8, label %3, label %2
}