xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ plcvm_get_u8(int /*<<< orphan*/);
int /*<<< orphan*/ plcvm_lpm_u16();
int /*<<< orphan*/ plcvm_push(int /*<<< orphan*/);
void cb_ldm_u1_c16(void) { plcvm_push(plcvm_get_u8(plcvm_lpm_u16())); }


x86 assembly (clang, -O0):
<cb_ldm_u1_c16>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <plcvm_lpm_u16@plt>
mov    %eax,%edi
call   1040 <plcvm_get_u8@plt>
mov    %eax,%edi
call   1050 <plcvm_push@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cb_ldm_u1_c16>:
push   %rax
xor    %eax,%eax
call   1030 <plcvm_lpm_u16@plt>
mov    %eax,%edi
call   1040 <plcvm_get_u8@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <plcvm_push@plt>

LLVM IR (-O0):
define void @cb_ldm_u1_c16() {
%1 = call i32 (...) @plcvm_lpm_u16()
%2 = call i32 @plcvm_get_u8(i32 %1)
%3 = call i32 @plcvm_push(i32 %2)
ret void
}

LLVM IR (-O2):
define void @cb_ldm_u1_c16() {
%1 = tail call i32 (...) @plcvm_lpm_u16()
%2 = tail call i32 @plcvm_get_u8(i32 %1)
%3 = tail call i32 @plcvm_push(i32 %2)
ret void
}
double timeRange(double t) {
  while (t >= 24.0)
    t -= 24.0;
  while (t < 0.0)
    t += 24.0;
  return t;
}


x86 assembly (clang, -O0):
<timeRange>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     113b <timeRange+0x3b>
movsd  -0x8(%rbp),%xmm0
movsd  0xed3(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1109 <timeRange+0x9>
jmp    1140 <timeRange+0x40>
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1165 <timeRange+0x65>
movsd  0xeaa(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1140 <timeRange+0x40>
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<timeRange>:
ucomisd 0xef8(%rip),%xmm0
jb     112a <timeRange+0x2a>
movsd  0xef6(%rip),%xmm1
movsd  0xee6(%rip),%xmm2
nopw   0x0(%rax,%rax,1)
addsd  %xmm1,%xmm0
ucomisd %xmm2,%xmm0
jae    1120 <timeRange+0x20>
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jbe    114a <timeRange+0x4a>
movsd  0xec4(%rip),%xmm2
nopl   0x0(%rax)
addsd  %xmm2,%xmm0
ucomisd %xmm0,%xmm1
ja     1140 <timeRange+0x40>
ret

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

LLVM IR (-O2):
define double @timeRange(double %0) {
%2 = fcmp ult double %0, 2.400000e+01
br i1 %2, label %3, label %6
3: ; preds = %6, %1
%4 = phi double [ %0, %1 ], [ %8, %6 ]
%5 = fcmp olt double %4, 0.000000e+00
br i1 %5, label %10, label %14
6: ; preds = %1, %6
%7 = phi double [ %8, %6 ], [ %0, %1 ]
%8 = fadd double %7, -2.400000e+01
%9 = fcmp ult double %8, 2.400000e+01
br i1 %9, label %3, label %6
10: ; preds = %3, %10
%11 = phi double [ %12, %10 ], [ %4, %3 ]
%12 = fadd double %11, 2.400000e+01
%13 = fcmp olt double %12, 0.000000e+00
br i1 %13, label %10, label %14
14: ; preds = %10, %3
%15 = phi double [ %4, %3 ], [ %12, %10 ]
ret double %15
}
/* Variables and functions */
int PAPI_list_events(int, int *, int *);
void PAPIF_LIST_EVENTS(int *EventSet, int *Events, int *number, int *check) {
  *check = PAPI_list_events(*EventSet, Events, number);
}


x86 assembly (clang, -O0):
<PAPIF_LIST_EVENTS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <PAPI_list_events@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PAPIF_LIST_EVENTS>:
push   %rbx
mov    %rcx,%rbx
mov    (%rdi),%edi
call   1030 <PAPI_list_events@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @PAPIF_LIST_EVENTS(i32* %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load i32*, i32** %5
%10 = load i32, i32* %9
%11 = load i32*, i32** %6
%12 = load i32*, i32** %7
%13 = call i32 @PAPI_list_events(i32 %10, i32* %11, i32* %12)
%14 = load i32*, i32** %8
store i32 %13, i32* %14
ret void
}

LLVM IR (-O2):
define void @PAPIF_LIST_EVENTS(i32* nocapture %0, i32* %1, i32* %2, i32* nocapture writeonly %3) {
%5 = load i32, i32* %0
%6 = tail call i32 @PAPI_list_events(i32 %5, i32* %1, i32* %2)
store i32 %6, i32* %3
ret void
}
signed char f0(int x) { return x; }


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

x86 assembly (clang, -O2):
<f0>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @f0(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = trunc i32 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @f0(i32 %0) {
%2 = trunc i32 %0 to i8
ret i8 %2
}
int fs_http_fake(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @fs_http_fake() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ MAX_HEAPIFY(int *, int, int);
void BUILD_MAX_HEAP(int A[], int heap_size) {
  for (int i = heap_size / 2 - 1; i >= 0; i--)
    MAX_HEAPIFY(A, heap_size, i);
}


x86 assembly (clang, -O0):
<BUILD_MAX_HEAP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     1157 <BUILD_MAX_HEAP+0x47>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <MAX_HEAPIFY@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1130 <BUILD_MAX_HEAP+0x20>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BUILD_MAX_HEAP>:
push   %rbp
push   %r14
push   %rbx
cmp    $0x2,%esi
jl     1145 <BUILD_MAX_HEAP+0x35>
mov    %esi,%ebp
mov    %rdi,%r14
mov    %esi,%ebx
shr    %ebx
add    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
lea    -0x2(%rbx),%edx
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <MAX_HEAPIFY@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
ja     1130 <BUILD_MAX_HEAP+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @BUILD_MAX_HEAP(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = lshr i32 %1, 1
br label %7
6: ; preds = %7, %2
ret void
7: ; preds = %4, %7
%8 = phi i32 [ %9, %7 ], [ %5, %4 ]
%9 = add nsw i32 %8, -1
%10 = tail call i32 @MAX_HEAPIFY(i32* %0, i32 %1, i32 %9)
%11 = icmp ugt i32 %8, 1
br i1 %11, label %7, label %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void test_test_case(void) {
  printf("start test case test body.\n");
  printf("start test case test body.\n");
  printf("start test case test body.\n");
  printf("start test case test body.\n");
}


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

x86 assembly (clang, -O2):
<test_test_case>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"start test case test body.\0A\00"
define void @test_test_case() {
%1 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str.3 = [27 x i8] c"start test case test body.\00"
define void @test_test_case() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.3, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.3, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fileno(int /*<<< orphan*/);
scalar_t__ isatty(int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int need_keyboard() {
  if (isatty(fileno(stdin))) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<need_keyboard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
call   1040 <fileno@plt>
mov    %eax,%edi
call   1030 <isatty@plt>
cmp    $0x0,%rax
je     1153 <need_keyboard+0x33>
movl   $0x1,-0x4(%rbp)
jmp    115a <need_keyboard+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<need_keyboard>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
call   1040 <fileno@plt>
mov    %eax,%edi
call   1030 <isatty@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdin = global i32 0
define i32 @need_keyboard() {
%1 = alloca i32
%2 = load i32, i32* @stdin
%3 = call i32 @fileno(i32 %2)
%4 = call i64 @isatty(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 1, i32* %1
br label %8
7: ; preds = %0
store i32 0, i32* %1
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @need_keyboard() {
%1 = load i32, i32* @stdin
%2 = tail call i32 @fileno(i32 %1)
%3 = tail call i64 @isatty(i32 %2)
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
void XUnloadFont() {}


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

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

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

LLVM IR (-O2):
define void @XUnloadFont() {
ret void
}
void op_code_normal_case0x5B(void) {}


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

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

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

LLVM IR (-O2):
define void @op_code_normal_case0x5B() {
ret void
}
int bitCount(int x) { return 2; }


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

x86 assembly (clang, -O2):
<bitCount>:
mov    $0x2,%eax
ret

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

LLVM IR (-O2):
define i32 @bitCount(i32 %0) {
ret i32 2
}
void func_a(void) {}


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

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

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

LLVM IR (-O2):
define void @func_a() {
ret void
}
int fc8151_tuner_deinit(void *hDevice) { return 0; }


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

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

LLVM IR (-O0):
define i32 @fc8151_tuner_deinit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i32 0
}

LLVM IR (-O2):
define i32 @fc8151_tuner_deinit(i8* nocapture readnone %0) {
ret i32 0
}
int encrypted_length(int originalLength) {
  return ((originalLength + 31) / 16) * 16;
}


x86 assembly (clang, -O0):
<encrypted_length>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1f,%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
shl    $0x4,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<encrypted_length>:
lea    0x1f(%rdi),%ecx
lea    0x2e(%rdi),%eax
test   %ecx,%ecx
cmovns %ecx,%eax
and    $0xfffffff0,%eax
ret

LLVM IR (-O0):
define i32 @encrypted_length(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 31
%5 = sdiv i32 %4, 16
%6 = mul nsw i32 %5, 16
ret i32 %6
}

LLVM IR (-O2):
define i32 @encrypted_length(i32 %0) {
%2 = add nsw i32 %0, 31
%3 = sdiv i32 %2, 16
%4 = shl nsw i32 %3, 4
ret i32 %4
}
/* Variables and functions */
char *searchpath3(char const *, char const *, char *);
char *searchpath2(const char *name, const char *fallback) {
  return searchpath3(name, fallback, "");
}


x86 assembly (clang, -O0):
<searchpath2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xed1(%rip),%rdx
call   1030 <searchpath3@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<searchpath2>:
lea    0xee9(%rip),%rdx
jmp    1030 <searchpath3@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @searchpath2(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 = load i8*, i8** %4
%7 = call i8* @searchpath3(i8* %5, i8* %6, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i8* %7
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @searchpath2(i8* %0, i8* %1) {
%3 = tail call i8* @searchpath3(i8* %0, i8* %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}
void test58_IncArrTest_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test58_IncArrTest_targetInit__I() {
ret void
}
void fd170(int n) {
a : {
  typedef int(*b)[n];
P01A:
  goto P01A;
  {
    typedef int(*c)[n];
  P012A:
    goto P012A;
    0;
  }
P01B:
  goto P01B;
  {
    typedef int(*d)[n];
  P013A:
    goto P013A;
    0;
  }
P01C:
  goto P01C;
  ;
  typedef int(*e)[n];
P014A:
  goto P014A;
  0;
};
P0B:
  goto P0B;
  {
    typedef int(*f)[n];
  P02A:
    goto P02A;
    {
      typedef int(*g)[n];
    P024A:
      goto P024A;
      0;
    };
  p02B:
    goto p02B;
    goto a;
  P02B:
    goto P02B;
    {
      typedef int(*h)[n];
    P025A:
      goto P025A;
      0;
    };
  P02C:
    goto P02C;
    ;
    typedef int(*i)[n];
  P026A:
    goto P026A;
    0;
  };
P0C:
  goto P0C;
  ;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


x86 assembly (clang, -O0):
<fd170>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fd170+0x7>

x86 assembly (clang, -O2):
<fd170>:
jmp    1100 <fd170>

LLVM IR (-O0):
define void @fd170(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %1
%4 = load i32, i32* %2
%5 = zext i32 %4 to i64
br label %6
6: ; preds = %6, %3
br label %6
7: ; No predecessors!
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
br label %10
10: ; preds = %10, %7
br label %10
11: ; preds = %11
br label %11
12: ; No predecessors!
%13 = load i32, i32* %2
%14 = zext i32 %13 to i64
br label %15
15: ; preds = %15, %12
br label %15
16: ; preds = %16
br label %16
17: ; No predecessors!
%18 = load i32, i32* %2
%19 = zext i32 %18 to i64
br label %20
20: ; preds = %20, %17
br label %20
21: ; preds = %21
br label %21
22: ; No predecessors!
%23 = load i32, i32* %2
%24 = zext i32 %23 to i64
br label %25
25: ; preds = %25, %22
br label %25
26: ; No predecessors!
%27 = load i32, i32* %2
%28 = zext i32 %27 to i64
br label %29
29: ; preds = %29, %26
br label %29
30: ; preds = %30
br label %30
31: ; preds = %31
br label %31
32: ; No predecessors!
%33 = load i32, i32* %2
%34 = zext i32 %33 to i64
br label %35
35: ; preds = %35, %32
br label %35
36: ; preds = %36
br label %36
37: ; No predecessors!
%38 = load i32, i32* %2
%39 = zext i32 %38 to i64
br label %40
40: ; preds = %40, %37
br label %40
41: ; preds = %41
br label %41
42: ; No predecessors!
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
br label %45
45: ; preds = %45, %42
br label %45
46: ; preds = %46
br label %46
}

LLVM IR (-O2):
define void @fd170(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int EOF;
int /*<<< orphan*/ printf(char *, char);
int main() {
  printf("EOF=%d\n", EOF);
  printf("EOF=%llx\n", (unsigned long long int)EOF);
  char c = -1;
  printf("%d\n", c);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
lea    0xed8(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
mov    0x2eb1(%rip),%rax
movslq (%rax),%rax
lea    0xec7(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
movb   $0xff,-0x1(%rbp)
lea    0xeb0(%rip),%rdi
movsbl -0x1(%rbp),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2ed0(%rip),%rbx
movsbl (%rbx),%esi
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
movsbl (%rbx),%esi
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
lea    0xec7(%rip),%rdi
mov    $0xffffffff,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"EOF=%d\0A\00"
@EOF = global i32 0
@.str.1 = [10 x i8] c"EOF=%llx\0A\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = load i32, i32* @EOF
%3 = trunc i32 %2 to i8
%4 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8 signext %3)
%5 = load i32, i32* @EOF
%6 = sext i32 %5 to i64
%7 = trunc i64 %6 to i8
%8 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8 signext %7)
store i8 -1, i8* %1
%9 = load i8, i8* %1
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8 signext %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"EOF=%d\0A\00"
@EOF = global i32 0
@.str.1 = [10 x i8] c"EOF=%llx\0A\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = load i32, i32* @EOF
%2 = trunc i32 %1 to i8
%3 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8 signext %2)
%4 = load i32, i32* @EOF
%5 = trunc i32 %4 to i8
%6 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8 signext %5)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8 signext -1)
ret i32 0
}
/* Variables and functions */
int isPalindromeHelper(char *, int, int);
int strlen(char *);
int isPalindrome(char *str) {
  int len = strlen(str);
  int startindex = 0;
  int endindex = len - 1;
  return isPalindromeHelper(str, startindex, endindex);
}


x86 assembly (clang, -O0):
<isPalindrome>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1040 <isPalindromeHelper@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPalindrome>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
lea    -0x1(%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
pop    %rbx
jmp    1040 <isPalindromeHelper@plt>

LLVM IR (-O0):
define i32 @isPalindrome(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %2
%6 = load i8*, i8** %2
%7 = call i32 @strlen(i8* %6)
store i32 %7, i32* %3
store i32 0, i32* %4
%8 = load i32, i32* %3
%9 = sub nsw i32 %8, 1
store i32 %9, i32* %5
%10 = load i8*, i8** %2
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = call i32 @isPalindromeHelper(i8* %10, i32 %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @isPalindrome(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, -1
%4 = tail call i32 @isPalindromeHelper(i8* %0, i32 0, i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_array(char strs[10][30], int num) {
  int i;
  for (i = 0; i < num; i++)
    printf("%s ", strs[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<print_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115d <print_array+0x4d>
mov    -0x8(%rbp),%rsi
movslq -0x10(%rbp),%rax
imul   $0x1e,%rax,%rax
add    %rax,%rsi
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print_array+0x16>
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_array>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1157 <print_array+0x37>
mov    %rdi,%rbx
mov    %esi,%r15d
lea    0xeca(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1e,%rbx
add    $0xffffffffffffffff,%r15
jne    1140 <print_array+0x20>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @print_array([30 x i8]* %0, i32 %1) {
%3 = alloca [30 x i8]*
%4 = alloca i32
%5 = alloca i32
store [30 x i8]* %0, [30 x i8]** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load [30 x i8]*, [30 x i8]** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [30 x i8], [30 x i8]* %11, i64 %13
%15 = getelementptr inbounds [30 x i8], [30 x i8]* %14, i64 0, i64 0
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s \00"
define void @print_array([30 x i8]* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %10, %6 ]
%8 = getelementptr inbounds [30 x i8], [30 x i8]* %0, i64 %7, i64 0
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %2
%13 = tail call i32 @putchar(i32 10)
ret void
}
void initPins() {}


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

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

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

LLVM IR (-O2):
define void @initPins() {
ret void
}
void RTManifestPtIosAddEntryNow(void) {}


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

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

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

LLVM IR (-O2):
define void @RTManifestPtIosAddEntryNow() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ user_free(void *);
void opus_free(void *ptr) { user_free(ptr); }


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

x86 assembly (clang, -O2):
<opus_free>:
jmp    1030 <user_free@plt>

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

LLVM IR (-O2):
define void @opus_free(i8* %0) {
%2 = tail call i32 @user_free(i8* %0)
ret void
}
int bad_character(char x) { return x > 31 && x < 127; }


x86 assembly (clang, -O0):
<bad_character>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x1f,%ecx
mov    %al,-0x2(%rbp)
jle    1129 <bad_character+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x7f,%eax
setl   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bad_character>:
add    $0xe0,%dil
xor    %eax,%eax
cmp    $0x5f,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @bad_character(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sgt i32 %4, 31
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp slt i32 %8, 127
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @bad_character(i8 signext %0) {
%2 = add i8 %0, -32
%3 = icmp ult i8 %2, 95
%4 = zext i1 %3 to i32
ret i32 %4
}
int main() {
  int *variable;
  variable = malloc(sizeof(variable));
  printf("Variable: %d \nAdress: %d\n", variable, &variable);
  free(variable);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x8,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xea8(%rip),%rdi
lea    -0x10(%rbp),%rdx
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x8,%edi
call   1050 <malloc@plt>
mov    %rax,(%rsp)
lea    0xeba(%rip),%rdi
mov    %rsp,%rdx
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rsp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Variable: %d \0AAdress: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = call i8* @malloc(i64 8)
%4 = bitcast i8* %3 to i32*
store i32* %4, i32** %2
%5 = load i32*, i32** %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32* %5, i32** %2)
%7 = load i32*, i32** %2
%8 = bitcast i32* %7 to i8*
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"Variable: %d \0AAdress: %d\0A\00"
define i32 @main() {
%1 = alloca i32*
%2 = bitcast i32** %1 to i8*
%3 = tail call dereferenceable_or_null(8) i8* @malloc(i64 8)
%4 = bitcast i32** %1 to i8**
store i8* %3, i8** %4
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %3, i32** %1)
%6 = load i8*, i8** %4
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void reset_profile(void) { system("readprofile -r"); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"readprofile -r\00"
define void @reset_profile() {
%1 = call i32 @system(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"readprofile -r\00"
define void @reset_profile() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
void path_003_expected_4(int a, int b) {
  if (a) {
  }
  if (b) {
  }
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1119 <path_003_expected_4+0x19>
jmp    1119 <path_003_expected_4+0x19>
cmpl   $0x0,-0x8(%rbp)
je     1128 <path_003_expected_4+0x28>
jmp    1128 <path_003_expected_4+0x28>
pop    %rbp
ret

x86 assembly (clang, -O2):
ret

LLVM IR (-O0):
define void @path_003_expected_4(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 ne i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %2
br label %8
8: ; preds = %7, %2
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %8
br label %12
12: ; preds = %11, %8
ret void
}

LLVM IR (-O2):
define void @path_003_expected_4(i32 %0, i32 %1) {
ret void
}
double calX1Bound(double high[], double low[], double x[]) {
  return (low[1] + (high[1] - low[1]) / (high[0] - low[0]) * (x[0] - low[0]));
}


x86 assembly (clang, -O0):
<calX1Bound>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x10(%rbp),%rax
subsd  (%rax),%xmm2
divsd  %xmm2,%xmm0
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x10(%rbp),%rax
subsd  (%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<calX1Bound>:
movupd (%rdi),%xmm1
movupd (%rsi),%xmm0
subpd  %xmm0,%xmm1
movapd %xmm1,%xmm2
unpckhpd %xmm1,%xmm2
divsd  %xmm1,%xmm2
movsd  (%rdx),%xmm1
subsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @calX1Bound(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %5
%8 = getelementptr inbounds double, double* %7, i64 1
%9 = load double, double* %8
%10 = load double*, double** %4
%11 = getelementptr inbounds double, double* %10, i64 1
%12 = load double, double* %11
%13 = load double*, double** %5
%14 = getelementptr inbounds double, double* %13, i64 1
%15 = load double, double* %14
%16 = fsub double %12, %15
%17 = load double*, double** %4
%18 = getelementptr inbounds double, double* %17, i64 0
%19 = load double, double* %18
%20 = load double*, double** %5
%21 = getelementptr inbounds double, double* %20, i64 0
%22 = load double, double* %21
%23 = fsub double %19, %22
%24 = fdiv double %16, %23
%25 = load double*, double** %6
%26 = getelementptr inbounds double, double* %25, i64 0
%27 = load double, double* %26
%28 = load double*, double** %5
%29 = getelementptr inbounds double, double* %28, i64 0
%30 = load double, double* %29
%31 = fsub double %27, %30
%32 = call double @llvm.fmuladd.f64(double %24, double %31, double %9)
ret double %32
}

LLVM IR (-O2):
define double @calX1Bound(double* nocapture %0, double* nocapture %1, double* nocapture %2) {
%4 = bitcast double* %0 to <2 x double>*
%5 = load <2 x double>, <2 x double>* %4
%6 = bitcast double* %1 to <2 x double>*
%7 = load <2 x double>, <2 x double>* %6
%8 = fsub <2 x double> %5, %7
%9 = extractelement <2 x double> %8, i64 0
%10 = extractelement <2 x double> %8, i64 1
%11 = fdiv double %10, %9
%12 = load double, double* %2
%13 = extractelement <2 x double> %7, i64 0
%14 = fsub double %12, %13
%15 = extractelement <2 x double> %7, i64 1
%16 = tail call double @llvm.fmuladd.f64(double %11, double %14, double %15)
ret double %16
}
/* Variables and functions */
int partitionQS(int *, int, int);
void quicksort_rec(int *xs, int lo, int hi) {
  if (lo >= hi)
    return;
  int p = partitionQS(xs, lo, hi);
  quicksort_rec(xs, lo, p - 1);
  quicksort_rec(xs, p + 1, hi);
}


x86 assembly (clang, -O0):
<quicksort_rec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1143 <quicksort_rec+0x23>
jmp    1179 <quicksort_rec+0x59>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <partitionQS@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1030 <quicksort_rec@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1030 <quicksort_rec@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quicksort_rec>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %edx,%esi
jge    1166 <quicksort_rec+0x46>
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1040 <partitionQS@plt>
mov    %eax,%ebx
lea    -0x1(%rbx),%edx
mov    %r15,%rdi
mov    %ebp,%esi
call   1030 <quicksort_rec@plt>
add    $0x1,%ebx
mov    %ebx,%ebp
cmp    %r14d,%ebx
jl     1140 <quicksort_rec+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @quicksort_rec(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* %5
%9 = load i32, i32* %6
%10 = icmp sge i32 %8, %9
br i1 %10, label %11, label %12
11: ; preds = %3
br label %25
12: ; preds = %3
%13 = load i32*, i32** %4
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = call i32 @partitionQS(i32* %13, i32 %14, i32 %15)
store i32 %16, i32* %7
%17 = load i32*, i32** %4
%18 = load i32, i32* %5
%19 = load i32, i32* %7
%20 = sub nsw i32 %19, 1
%21 = load i32*, i32** %4
%22 = load i32, i32* %7
%23 = add nsw i32 %22, 1
%24 = load i32, i32* %6
br label %25
25: ; preds = %12, %11
ret void
}

LLVM IR (-O2):
define void @quicksort_rec(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %11
5: ; preds = %3, %5
%6 = phi i32 [ %9, %5 ], [ %1, %3 ]
%7 = tail call i32 @partitionQS(i32* %0, i32 %6, i32 %2)
%8 = add nsw i32 %7, -1
tail call void @quicksort_rec(i32* %0, i32 %6, i32 %8)
%9 = add nsw i32 %7, 1
%10 = icmp slt i32 %9, %2
br i1 %10, label %5, label %11
11: ; preds = %5, %3
ret void
}
/* Variables and functions */
int square(int);
int main() {
  int a = 13;
  int b = square(a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xd,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <square@plt>
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xd,%edi
call   1030 <square@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 13, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @square(i32 %4)
store i32 %5, i32* %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @square(i32 13)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x4a() {
  Assert_real((isdigit(74) == 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_isdigit.c",
              375, ("isdigit should be 0 for J"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0x4a>:
push   %rax
mov    $0x4a,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x177,%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_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for J\00"
define void @t_isdigit_0x4a() {
%1 = call i64 @isdigit(i32 74)
%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 375, i8* getelementptr inbounds ([26 x i8], [26 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_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for J\00"
define void @t_isdigit_0x4a() {
%1 = tail call i64 @isdigit(i32 74)
%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 375, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void SSIAdvFrameHoldDisable(uint32_t ui32Base) {
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000004))) &= ~(0x00000400);
}


x86 assembly (clang, -O0):
<SSIAdvFrameHoldDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x4,%eax
cltq
mov    (%rax),%ecx
and    $0xfffffbff,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SSIAdvFrameHoldDisable>:
movslq %edi,%rax
andl   $0xfffffbff,0x4(%rax)
ret

LLVM IR (-O0):
define void @SSIAdvFrameHoldDisable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 4
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = and i32 %7, -1025
store volatile i32 %8, i32* %6
ret void
}

LLVM IR (-O2):
define void @SSIAdvFrameHoldDisable(i32 %0) {
%2 = add nsw i32 %0, 4
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = and i32 %5, -1025
store volatile i32 %6, i32* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, char const *, char const *,
                          char const *);
void usage(const char *prog) {
  printf("Usage\n"
         "\t%s is-supported\n"
         "\t%s status-get\n"
         "\t%s status-log\n"
         "\t%s status-clear\n",
         prog, prog, prog, prog);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    -0x8(%rbp),%r8
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    %rcx,%rsi
mov    %rcx,%rdx
mov    %rcx,%r8
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [71 x i8] c"Usage\0A\09%s is-supported\0A\09%s status-get\0A\09%s status-log\0A\09%s status-clear\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = load i8*, i8** %2
%7 = call i32 @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4, i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [71 x i8] c"Usage\0A\09%s is-supported\0A\09%s status-get\0A\09%s status-log\0A\09%s status-clear\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0, i8* %0, i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ WDOG2_DriverIRQHandler();
__attribute__((weak)) void WDOG2_IRQHandler(void) { WDOG2_DriverIRQHandler(); }


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

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

LLVM IR (-O0):
define weak void @WDOG2_IRQHandler() {
%1 = call i32 (...) @WDOG2_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @WDOG2_IRQHandler() {
%1 = tail call i32 (...) @WDOG2_DriverIRQHandler()
ret void
}
/* Variables and functions */
int strlen(const char *s) {
  const char *p = s;
  while (*p) {
    p++;
  }
  return p - s;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     112e <strlen+0x2e>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @strlen(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i8* %3 to i64
%9 = ptrtoint i8* %0 to i64
%10 = sub i64 %8, %9
%11 = trunc i64 %10 to i32
ret i32 %11
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void I2CMasterIntClearEx(uint32_t ui32Base, uint32_t ui32IntFlags) {
  ;
  (*((volatile uint32_t *)(ui32Base + 0x0000001C))) = ui32IntFlags;
}


x86 assembly (clang, -O0):
<I2CMasterIntClearEx>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x1c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CMasterIntClearEx>:
mov    %rsi,0x1c(%rdi)
ret

LLVM IR (-O0):
define void @I2CMasterIntClearEx(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = add nsw i64 %6, 28
%8 = inttoptr i64 %7 to i64*
store volatile i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @I2CMasterIntClearEx(i64 %0, i64 %1) {
%3 = add nsw i64 %0, 28
%4 = inttoptr i64 %3 to i64*
store volatile i64 %1, i64* %4
ret void
}
void rop3_209_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = *D ^ T;
  stk2 = S | stk3;
  stk1 = T ^ stk2;
  stk1 = ~stk1;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_209_0_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 -0xa(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xd(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_209_0_0>:
mov    (%rdi),%al
xor    %dl,%al
or     %sil,%al
xor    %dl,%al
not    %al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_209_0_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* %6
%14 = zext i8 %13 to i32
%15 = xor i32 %12, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %9
%17 = load i8, i8* %5
%18 = zext i8 %17 to i32
%19 = load i8, i8* %9
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
%22 = trunc i32 %21 to i8
store i8 %22, i8* %8
%23 = load i8, i8* %6
%24 = zext i8 %23 to i32
%25 = load i8, i8* %8
%26 = zext i8 %25 to i32
%27 = xor i32 %24, %26
%28 = trunc i32 %27 to i8
store i8 %28, i8* %7
%29 = load i8, i8* %7
%30 = zext i8 %29 to i32
%31 = xor i32 %30, -1
%32 = trunc i32 %31 to i8
store i8 %32, i8* %7
%33 = load i8, i8* %7
%34 = load i8*, i8** %4
store i8 %33, i8* %34
ret void
}

LLVM IR (-O2):
define void @rop3_209_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %2
%6 = or i8 %5, %1
%7 = xor i8 %6, %2
%8 = xor i8 %7, -1
store i8 %8, i8* %0
ret void
}
__attribute__((no_instrument_function)) void stubHandler(int nIRQ,
                                                         void *pParam) {
  (void)nIRQ;
  (void)pParam;
}


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

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

LLVM IR (-O0):
define void @stubHandler(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
ret void
}

LLVM IR (-O2):
define void @stubHandler(i32 %0, i8* nocapture %1) {
ret void
}
int default_thread_count(void) { return -2; }


x86 assembly (clang, -O0):
<default_thread_count>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfffffffe,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<default_thread_count>:
mov    $0xfffffffe,%eax
ret

LLVM IR (-O0):
define i32 @default_thread_count() {
ret i32 -2
}

LLVM IR (-O2):
define i32 @default_thread_count() {
ret i32 -2
}
int helper_function(int a, int b) {
  if (a < b) {
    return 42;
  } else {
    return a - b;
  }
}


x86 assembly (clang, -O0):
<helper_function>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1122 <helper_function+0x22>
movl   $0x2a,-0x4(%rbp)
jmp    112b <helper_function+0x2b>
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<helper_function>:
sub    %esi,%edi
mov    $0x2a,%eax
cmovge %edi,%eax
ret

LLVM IR (-O0):
define i32 @helper_function(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* %4
%7 = load i32, i32* %5
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 42, i32* %3
br label %14
10: ; preds = %2
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = sub nsw i32 %11, %12
store i32 %13, i32* %3
br label %14
14: ; preds = %10, %9
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @helper_function(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = sub nsw i32 %0, %1
%5 = select i1 %3, i32 42, i32 %4
ret i32 %5
}