xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t __x2long(uint32_t x) { return x; }


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

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

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

LLVM IR (-O2):
define i32 @__x2long(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ swap(int, int);
int main() {
  int a = 3, b = 4;
  swap(3, 4);
  printf("%d %d\n", a, b);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
mov    $0x4,%esi
call   1040 <swap@plt>
lea    0xec9(%rip),%rdi
mov    $0x3,%esi
mov    $0x4,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d %d\0A\00"
define i32 @main() {
%1 = tail call i32 @swap(i32 3, i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 3, i32 4)
ret i32 0
}
int test_imm_7Fuint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0x7F << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_7Fuint64_lowword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
and    $0x7f,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_7Fuint64_lowword_mem>:
testb  $0x7f,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_7Fuint64_lowword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = and i64 %4, 127
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_7Fuint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 127
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ input_backward(int);
int /*<<< orphan*/ input_end();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ put_prompt();
int /*<<< orphan*/ putchar(char);
void redraw(int y, int back_cursor) {
  if (y > 0)
    printf("\033[%dA", y);
  putchar('\r');
  put_prompt();
  input_end();
  printf("\033[J");
  input_backward(back_cursor);
}


x86 assembly (clang, -O0):
<redraw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1179 <redraw+0x29>
mov    -0x4(%rbp),%esi
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    $0xd,%edi
call   1030 <putchar@plt>
mov    $0x0,%al
call   1050 <put_prompt@plt>
mov    $0x0,%al
call   1060 <input_end@plt>
lea    0xe6e(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x8(%rbp),%edi
call   1040 <input_backward@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<redraw>:
push   %rbx
mov    %esi,%ebx
test   %edi,%edi
jle    1167 <redraw+0x17>
mov    %edi,%esi
lea    0xea0(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0xd,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1050 <put_prompt@plt>
xor    %eax,%eax
call   1060 <input_end@plt>
lea    0xe80(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <input_backward@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"\1B[%dA\00"
@.str.1 = [4 x i8] c"\1B[J\00"
define void @redraw(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 sgt i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %8)
br label %10
10: ; preds = %7, %2
%11 = call i32 @putchar(i8 signext 13)
%12 = call i32 (...) @put_prompt()
%13 = call i32 (...) @input_end()
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%15 = load i32, i32* %4
%16 = call i32 @input_backward(i32 %15)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"\1B[%dA\00"
@.str.1 = [4 x i8] c"\1B[J\00"
define void @redraw(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %6
6: ; preds = %4, %2
%7 = tail call i32 @putchar(i8 signext 13)
%8 = tail call i32 (...) @put_prompt()
%9 = tail call i32 (...) @input_end()
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%11 = tail call i32 @input_backward(i32 %1)
ret void
}
int generate_PBCH(int frame, int **DL_Channel_Struc) {}


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

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

LLVM IR (-O0):
define i32 @generate_PBCH(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* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @generate_PBCH(i32 %0, i32** nocapture readnone %1) {
ret i32 undef
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMREC_get(void) { return U_WMRCORENONE_get("U_WMREC"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMREC\00"
define i32 @U_WMREC_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMREC\00"
define i32 @U_WMREC_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
char tolower(char);
int strlower(char *convertme) {
  char *c = convertme;
  while (*c != '\0') {
    *c = tolower(*c);
    c++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<strlower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1159 <strlower+0x49>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <tolower@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <strlower+0x14>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlower>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1136 <strlower+0x26>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <tolower@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <strlower+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @strlower(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 = %10, %1
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %17
10: ; preds = %5
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
%13 = call signext i8 @tolower(i8 signext %12)
%14 = load i8*, i8** %3
store i8 %13, i8* %14
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %3
br label %5
17: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
define i32 @strlower(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call signext i8 @tolower(i8 signext %5)
store i8 %7, i8* %6
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret i32 0
}
/* Variables and functions */
int genrand64_int64();
double genrand64_real2(void) {
  return (genrand64_int64() >> 11) * (1.0 / 9007199254740992.0);
}


x86 assembly (clang, -O0):
<genrand64_real2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <genrand64_int64@plt>
sar    $0xb,%eax
cvtsi2sd %eax,%xmm0
movsd  0xed6(%rip),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<genrand64_real2>:
push   %rax
xor    %eax,%eax
call   1030 <genrand64_int64@plt>
sar    $0xb,%eax
cvtsi2sd %eax,%xmm0
mulsd  0xed9(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @genrand64_real2() {
%1 = call i32 (...) @genrand64_int64()
%2 = ashr i32 %1, 11
%3 = sitofp i32 %2 to double
%4 = fmul double %3, 0x3CA0000000000000
ret double %4
}

LLVM IR (-O2):
define double @genrand64_real2() {
%1 = tail call i32 (...) @genrand64_int64()
%2 = ashr i32 %1, 11
%3 = sitofp i32 %2 to double
%4 = fmul double %3, 0x3CA0000000000000
ret double %4
}
int main() {
  int arg1 = 532;
  int arg2 = 333;
  int arg3 = 76;
  int calc = 0;
  __asm__("subl %%ebx, %%eax;"
          "subl %%ecx, %%eax;"
          "addl $116, %%eax;"
          : "=a"(calc)
          : "a"(arg1), "b"(arg2), "c"(arg3));
  return calc;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
movl   $0x0,-0xc(%rbp)
movl   $0x214,-0x10(%rbp)
movl   $0x14d,-0x14(%rbp)
movl   $0x4c,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x14(%rbp),%ebx
mov    -0x18(%rbp),%ecx
sub    %ebx,%eax
sub    %ecx,%eax
add    $0x74,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x214,%eax
mov    $0x14d,%ebx
mov    $0x4c,%ecx
sub    %ebx,%eax
sub    %ecx,%eax
add    $0x74,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 532, i32* %2
store i32 333, i32* %3
store i32 76, i32* %4
store i32 0, i32* %5
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = call i32 asm "subl %ebx, %eax;subl %ecx, %eax;addl $$116, %eax;", "={ax},{ax},{bx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 %6, i32 %7, i32 %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 asm "subl %ebx, %eax;subl %ecx, %eax;addl $$116, %eax;", "={ax},{ax},{bx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 532, i32 333, i32 76)
ret i32 %1
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
int gca_cmp2_int32(const void *aa, const void *bb, void *p) {
  (void)p;
  const int32_t a = *(const int32_t *)aa;
  const int32_t b = *(const int32_t *)bb;
  return (((a) > (b)) - ((b) > (a)));
}


x86 assembly (clang, -O0):
<gca_cmp2_int32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x28(%rbp),%rcx
cmp    -0x20(%rbp),%rcx
setg   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gca_cmp2_int32>:
mov    (%rdi),%rcx
mov    (%rsi),%rdx
xor    %eax,%eax
xor    %esi,%esi
cmp    %rdx,%rcx
setg   %al
setl   %sil
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @gca_cmp2_int32(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%9 = load i8*, i8** %6
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i64*
%12 = load i64, i64* %11
store i64 %12, i64* %7
%13 = load i8*, i8** %5
%14 = bitcast i8* %13 to i64*
%15 = load i64, i64* %14
store i64 %15, i64* %8
%16 = load i64, i64* %7
%17 = load i64, i64* %8
%18 = icmp sgt i64 %16, %17
%19 = zext i1 %18 to i32
%20 = load i64, i64* %8
%21 = load i64, i64* %7
%22 = icmp sgt i64 %20, %21
%23 = zext i1 %22 to i32
%24 = sub nsw i32 %19, %23
ret i32 %24
}

LLVM IR (-O2):
define i32 @gca_cmp2_int32(i8* nocapture %0, i8* nocapture %1, i8* nocapture readnone %2) {
%4 = bitcast i8* %0 to i64*
%5 = load i64, i64* %4
%6 = bitcast i8* %1 to i64*
%7 = load i64, i64* %6
%8 = icmp sgt i64 %5, %7
%9 = zext i1 %8 to i32
%10 = icmp sgt i64 %7, %5
%11 = sext i1 %10 to i32
%12 = add nsw i32 %11, %9
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ factor();
int /*<<< orphan*/ subTerm();
void term() {
  factor();
  subTerm();
}


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

x86 assembly (clang, -O2):
<term>:
push   %rax
xor    %eax,%eax
call   1040 <factor@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <subTerm@plt>

LLVM IR (-O0):
define void @term() {
%1 = call i32 (...) @factor()
%2 = call i32 (...) @subTerm()
ret void
}

LLVM IR (-O2):
define void @term() {
%1 = tail call i32 (...) @factor()
%2 = tail call i32 (...) @subTerm()
ret void
}
/* Variables and functions */
int fc8180_reset(void *);
signed int bbm_com_reset(void *handle) {
  signed int res;
  res = fc8180_reset(handle);
  return res;
}


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

x86 assembly (clang, -O2):
<bbm_com_reset>:
jmp    1030 <fc8180_reset@plt>

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

LLVM IR (-O2):
define i32 @bbm_com_reset(i8* %0) {
%2 = tail call i32 @fc8180_reset(i8* %0)
ret i32 %2
}
void newlinespec_unit2OPT_ANY_NEWLINE() {}


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

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

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

LLVM IR (-O2):
define void @newlinespec_unit2OPT_ANY_NEWLINE() {
ret void
}
void MIDI_send_continue(void) {}


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

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

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

LLVM IR (-O2):
define void @MIDI_send_continue() {
ret void
}
/* Type definitions */
struct cla {
  int dummy;
};

/* Variables and functions */
struct cla *cla_new(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                    int /*<<< orphan*/ *, int /*<<< orphan*/ *, char *);
struct cla *cla_new_empty(void) {
  return (cla_new(NULL, NULL, NULL, NULL, ""));
}


x86 assembly (clang, -O0):
<cla_new_empty>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%ecx
lea    0xee1(%rip),%r8
mov    %rcx,%rdi
mov    %rcx,%rsi
mov    %rcx,%rdx
call   1030 <cla_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cla_new_empty>:
lea    0xee9(%rip),%r8
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <cla_new@plt>

LLVM IR (-O0):
%struct.cla = type { i32 }
@.str = [1 x i8] zeroinitializer
define %struct.cla* @cla_new_empty() {
%1 = call %struct.cla* @cla_new(i32* null, i32* null, i32* null, i32* null, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret %struct.cla* %1
}

LLVM IR (-O2):
%struct.cla = type { i32 }
@.str = [1 x i8] zeroinitializer
define %struct.cla* @cla_new_empty() {
%1 = tail call %struct.cla* @cla_new(i32* null, i32* null, i32* null, i32* null, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret %struct.cla* %1
}
/* Variables and functions */
int /*<<< orphan*/ t1();
int /*<<< orphan*/ t2();
int main(void) {
  t1();
  t2();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <t1@plt>
mov    $0x0,%al
call   1040 <t2@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <t1@plt>
xor    %eax,%eax
call   1040 <t2@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @t1()
%2 = call i32 (...) @t2()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @t1()
%2 = tail call i32 (...) @t2()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdin;
void enter_data(char *str) {
  printf("Enter string: ");
  fgets(str, 100, stdin);
}


x86 assembly (clang, -O0):
<enter_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    0x2ea5(%rip),%rax
mov    (%rax),%edx
mov    $0x64,%esi
call   1040 <fgets@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<enter_data>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    $0x64,%esi
pop    %rbx
jmp    1040 <fgets@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"Enter string: \00"
@stdin = global i32 0
define void @enter_data(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = load i32, i32* @stdin
%6 = call i32 @fgets(i8* %4, i32 100, i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"Enter string: \00"
@stdin = global i32 0
define void @enter_data(i8* %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdin
%4 = tail call i32 @fgets(i8* %0, i32 100, i32 %3)
ret void
}
int toupper(int c) {
  if (c >= 'a' && c <= 'z') {
    c -= 32;
  }
  return (c);
}


x86 assembly (clang, -O0):
<toupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x61,-0x4(%rbp)
jl     1124 <toupper+0x24>
cmpl   $0x7a,-0x4(%rbp)
jg     1124 <toupper+0x24>
mov    -0x4(%rbp),%eax
sub    $0x20,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toupper>:
lea    -0x61(%rdi),%ecx
lea    -0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @toupper(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 97
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 122
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, 32
store i32 %10, i32* %2
br label %11
11: ; preds = %8, %5, %1
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @toupper(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, -32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
/* Type definitions */
struct timespec {
  int tv_nsec;
  int tv_sec;
};

/* Variables and functions */
void timer_add(struct timespec *timer, int us) {
  timer->tv_nsec += us * 1000;
  if (timer->tv_nsec > 1000000000) {
    timer->tv_nsec -= 1000000000;
    timer->tv_sec += 1;
  }
}


x86 assembly (clang, -O0):
<timer_add>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
imul   $0x3e8,-0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
cmpl   $0x3b9aca00,(%rax)
jle    1145 <timer_add+0x45>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
sub    $0x3b9aca00,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%ecx
add    $0x1,%ecx
mov    %ecx,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<timer_add>:
imul   $0x3e8,%esi,%eax
add    (%rdi),%eax
mov    %eax,(%rdi)
cmp    $0x3b9aca01,%eax
jl     111c <timer_add+0x1c>
add    $0xc4653600,%eax
mov    %eax,(%rdi)
addl   $0x1,0x4(%rdi)
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
define void @timer_add(%struct.timespec* %0, i32 %1) {
%3 = alloca %struct.timespec*
%4 = alloca i32
store %struct.timespec* %0, %struct.timespec** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000
%7 = load %struct.timespec*, %struct.timespec** %3
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %7, i32 0, i32 0
%9 = load i32, i32* %8
%10 = add nsw i32 %9, %6
store i32 %10, i32* %8
%11 = load %struct.timespec*, %struct.timespec** %3
%12 = getelementptr inbounds %struct.timespec, %struct.timespec* %11, i32 0, i32 0
%13 = load i32, i32* %12
%14 = icmp sgt i32 %13, 1000000000
br i1 %14, label %15, label %24
15: ; preds = %2
%16 = load %struct.timespec*, %struct.timespec** %3
%17 = getelementptr inbounds %struct.timespec, %struct.timespec* %16, i32 0, i32 0
%18 = load i32, i32* %17
%19 = sub nsw i32 %18, 1000000000
store i32 %19, i32* %17
%20 = load %struct.timespec*, %struct.timespec** %3
%21 = getelementptr inbounds %struct.timespec, %struct.timespec* %20, i32 0, i32 1
%22 = load i32, i32* %21
%23 = add nsw i32 %22, 1
store i32 %23, i32* %21
br label %24
24: ; preds = %15, %2
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
define void @timer_add(%struct.timespec* nocapture %0, i32 %1) {
%3 = mul nsw i32 %1, 1000
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 0
%5 = load i32, i32* %4
%6 = add nsw i32 %5, %3
store i32 %6, i32* %4
%7 = icmp sgt i32 %6, 1000000000
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = add nsw i32 %6, -1000000000
store i32 %9, i32* %4
%10 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 1
%11 = load i32, i32* %10
%12 = add nsw i32 %11, 1
store i32 %12, i32* %10
br label %13
13: ; preds = %8, %2
ret void
}
/* Type definitions */
struct vec2 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ vec2_project(float *, float *, float *);
__attribute__((always_)) struct vec2 *
psvec2_project(struct vec2 *result, struct vec2 *a, struct vec2 *b) {
  vec2_project((float *)result, (float *)a, (float *)b);
  return result;
}


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

x86 assembly (clang, -O2):
<psvec2_project>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec2_project@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec2 = type { i32 }
define %struct.vec2* @psvec2_project(%struct.vec2* %0, %struct.vec2* %1, %struct.vec2* %2) {
%4 = alloca %struct.vec2*
%5 = alloca %struct.vec2*
%6 = alloca %struct.vec2*
store %struct.vec2* %0, %struct.vec2** %4
store %struct.vec2* %1, %struct.vec2** %5
store %struct.vec2* %2, %struct.vec2** %6
%7 = load %struct.vec2*, %struct.vec2** %4
%8 = bitcast %struct.vec2* %7 to float*
%9 = load %struct.vec2*, %struct.vec2** %5
%10 = bitcast %struct.vec2* %9 to float*
%11 = load %struct.vec2*, %struct.vec2** %6
%12 = bitcast %struct.vec2* %11 to float*
%13 = call i32 @vec2_project(float* %8, float* %10, float* %12)
%14 = load %struct.vec2*, %struct.vec2** %4
ret %struct.vec2* %14
}

LLVM IR (-O2):
%struct.vec2 = type { i32 }
define %struct.vec2* @psvec2_project(%struct.vec2* returned %0, %struct.vec2* %1, %struct.vec2* %2) {
%4 = bitcast %struct.vec2* %0 to float*
%5 = bitcast %struct.vec2* %1 to float*
%6 = bitcast %struct.vec2* %2 to float*
%7 = tail call i32 @vec2_project(float* %4, float* %5, float* %6)
ret %struct.vec2* %0
}
int isspace(int c) { return (c <= ' '); }


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

x86 assembly (clang, -O2):
<isspace>:
xor    %eax,%eax
cmp    $0x21,%edi
setl   %al
ret

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

LLVM IR (-O2):
define i32 @isspace(i32 %0) {
%2 = icmp slt i32 %0, 33
%3 = zext i1 %2 to i32
ret i32 %3
}
char *Do(void) {
  if (!((*((volatile unsigned char *)0x7f14)) & 0x01)) {
    if (!((*((volatile unsigned char *)0x7f10)) & 0x01))
      return "Fail";
    else
      return "Success";
  } else
    return "Fail";
}


x86 assembly (clang, -O0):
<Do>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7f14,%eax
mov    (%rax),%al
movzbl %al,%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    1150 <Do+0x50>
mov    $0x7f10,%eax
mov    (%rax),%al
movzbl %al,%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    1140 <Do+0x40>
lea    0xec9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    115b <Do+0x5b>
lea    0xebe(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    115b <Do+0x5b>
lea    0xea9(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Do>:
testb  $0x1,0x7f14
01
jne    1125 <Do+0x25>
testb  $0x1,0x7f10
01
lea    0xee7(%rip),%rcx
lea    0xee5(%rip),%rax
cmove  %rcx,%rax
ret
lea    0xed4(%rip),%rax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"Fail\00"
@.str.1 = [8 x i8] c"Success\00"
define i8* @Do() {
%1 = alloca i8*
%2 = load volatile i8, i8* inttoptr (i64 32532 to i8*)
%3 = zext i8 %2 to i32
%4 = and i32 %3, 1
%5 = icmp ne i32 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %0
%7 = load volatile i8, i8* inttoptr (i64 32528 to i8*)
%8 = zext i8 %7 to i32
%9 = and i32 %8, 1
%10 = icmp ne i32 %9, 0
br i1 %10, label %12, label %11
11: ; preds = %6
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %1
br label %14
12: ; preds = %6
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8** %1
br label %14
13: ; preds = %0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %1
br label %14
14: ; preds = %13, %12, %11
%15 = load i8*, i8** %1
ret i8* %15
}

LLVM IR (-O2):
@.str = [5 x i8] c"Fail\00"
@.str.1 = [8 x i8] c"Success\00"
define i8* @Do() {
%1 = load volatile i8, i8* inttoptr (i64 32532 to i8*)
%2 = and i8 %1, 1
%3 = icmp eq i8 %2, 0
br i1 %3, label %4, label %9
4: ; preds = %0
%5 = load volatile i8, i8* inttoptr (i64 32528 to i8*)
%6 = and i8 %5, 1
%7 = icmp eq i8 %6, 0
%8 = select i1 %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0)
br label %9
9: ; preds = %0, %4
%10 = phi i8* [ %8, %4 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), %0 ]
ret i8* %10
}
/* Variables and functions */
int CHAR_BIT;
void __clear_bit(unsigned idx, unsigned long *bmap) {
  bmap[((idx) / (CHAR_BIT * sizeof(unsigned long)))] &=
      ~(1UL << ((idx) % (CHAR_BIT * sizeof(unsigned long))));
}


x86 assembly (clang, -O0):
<__clear_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ecb(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x3,%rcx
xor    %edx,%edx
div    %rcx
mov    %rdx,%rcx
mov    $0x1,%eax
shl    %cl,%rax
xor    $0xffffffffffffffff,%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2e9a(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x3,%rcx
xor    %edx,%edx
div    %rcx
mov    -0x20(%rbp),%rdx
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
and    (%rax,%rcx,8),%rdx
mov    %rdx,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__clear_bit>:
mov    %edi,%ecx
mov    0x2ed7(%rip),%rax
movslq (%rax),%rdi
shl    $0x3,%rdi
cmp    %rdi,%rcx
jb     111f <__clear_bit+0x1f>
mov    %ecx,%eax
xor    %edx,%edx
div    %edi
mov    %edx,%ecx
jmp    1121 <__clear_bit+0x21>
xor    %eax,%eax
mov    $0xfffffffffffffffe,%rdx
rol    %cl,%rdx
and    %rdx,(%rsi,%rax,8)
ret

LLVM IR (-O0):
@CHAR_BIT = global i32 0
define void @__clear_bit(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
store i32 %0, i32* %3
store i64* %1, i64** %4
%5 = load i32, i32* %3
%6 = zext i32 %5 to i64
%7 = load i32, i32* @CHAR_BIT
%8 = sext i32 %7 to i64
%9 = mul i64 %8, 8
%10 = urem i64 %6, %9
%11 = shl i64 1, %10
%12 = xor i64 %11, -1
%13 = load i64*, i64** %4
%14 = load i32, i32* %3
%15 = zext i32 %14 to i64
%16 = load i32, i32* @CHAR_BIT
%17 = sext i32 %16 to i64
%18 = mul i64 %17, 8
%19 = udiv i64 %15, %18
%20 = getelementptr inbounds i64, i64* %13, i64 %19
%21 = load i64, i64* %20
%22 = and i64 %21, %12
store i64 %22, i64* %20
ret void
}

LLVM IR (-O2):
@CHAR_BIT = global i32 0
define void @__clear_bit(i32 %0, i64* nocapture %1) {
%3 = zext i32 %0 to i64
%4 = load i32, i32* @CHAR_BIT
%5 = sext i32 %4 to i64
%6 = shl nsw i64 %5, 3
%7 = urem i64 %3, %6
%8 = shl nuw i64 1, %7
%9 = xor i64 %8, -1
%10 = udiv i64 %3, %6
%11 = getelementptr inbounds i64, i64* %1, i64 %10
%12 = load i64, i64* %11
%13 = and i64 %12, %9
store i64 %13, i64* %11
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_MD_CTX;

/* Variables and functions */
int /*<<< orphan*/ EVP_MD_CTX_cleanup(int /*<<< orphan*/ *);
int /*<<< orphan*/ OPENSSL_free(int /*<<< orphan*/ *);
void EVP_MD_CTX_free(EVP_MD_CTX *ctx) {
  EVP_MD_CTX_cleanup(ctx);
  OPENSSL_free(ctx);
}


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

x86 assembly (clang, -O2):
<EVP_MD_CTX_free>:
push   %rbx
mov    %rdi,%rbx
call   1040 <EVP_MD_CTX_cleanup@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <OPENSSL_free@plt>

LLVM IR (-O0):
define void @EVP_MD_CTX_free(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @EVP_MD_CTX_cleanup(i32* %3)
%5 = load i32*, i32** %2
%6 = call i32 @OPENSSL_free(i32* %5)
ret void
}

LLVM IR (-O2):
define void @EVP_MD_CTX_free(i32* %0) {
%2 = tail call i32 @EVP_MD_CTX_cleanup(i32* %0)
%3 = tail call i32 @OPENSSL_free(i32* %0)
ret void
}
int re_compile_fastmap(bufp)
struct re_pattern_buffer *bufp;
{
  return byte_re_compile_fastmap(bufp);
}


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

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

LLVM IR (-O0):
%struct.re_pattern_buffer = type opaque
define i32 @re_compile_fastmap(%struct.re_pattern_buffer* %0) {
%2 = alloca %struct.re_pattern_buffer*
store %struct.re_pattern_buffer* %0, %struct.re_pattern_buffer** %2
%3 = load %struct.re_pattern_buffer*, %struct.re_pattern_buffer** %2
%4 = call i32 (%struct.re_pattern_buffer*, ...) bitcast (i32 (...)* @byte_re_compile_fastmap to i32 (%struct.re_pattern_buffer*, ...)*)(%struct.re_pattern_buffer* %3)
ret i32 %4
}

LLVM IR (-O2):
%struct.re_pattern_buffer = type opaque
define i32 @re_compile_fastmap(%struct.re_pattern_buffer* %0) {
%2 = tail call i32 (%struct.re_pattern_buffer*, ...) bitcast (i32 (...)* @byte_re_compile_fastmap to i32 (%struct.re_pattern_buffer*, ...)*)(%struct.re_pattern_buffer* %0)
ret i32 %2
}
/* Variables and functions */
int EXIT_SUCCESS;
int atoi(char *);
int /*<<< orphan*/ chmod(char const *, int);
int main(int argc, char **argv) {
  int mode = atoi(*++argv);
  const char *path = *++argv;
  chmod(path, mode);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    0x8(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <chmod@plt>
mov    0x2e65(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
mov    0x10(%rbx),%rdi
mov    %eax,%esi
call   1030 <chmod@plt>
mov    0x2ea1(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i32 1
store i8** %9, i8*** %5
%10 = load i8*, i8** %9
%11 = call i32 @atoi(i8* %10)
store i32 %11, i32* %6
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i32 1
store i8** %13, i8*** %5
%14 = load i8*, i8** %13
store i8* %14, i8** %7
%15 = load i8*, i8** %7
%16 = load i32, i32* %6
%17 = call i32 @chmod(i8* %15, i32 %16)
%18 = load i32, i32* @EXIT_SUCCESS
ret i32 %18
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = getelementptr inbounds i8*, i8** %1, i64 2
%7 = load i8*, i8** %6
%8 = tail call i32 @chmod(i8* %7, i32 %5)
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
}
void RTVfsIoStrmSgWrite(void) {}


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

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

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

LLVM IR (-O2):
define void @RTVfsIoStrmSgWrite() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ m5_loadsymbol();
int /*<<< orphan*/ usage();
void do_loadsymbol(int argc, char *argv[]) {
  if (argc > 0)
    usage();
  m5_loadsymbol();
}


x86 assembly (clang, -O0):
<do_loadsymbol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1140 <do_loadsymbol+0x20>
mov    $0x0,%al
call   1040 <usage@plt>
mov    $0x0,%al
call   1030 <m5_loadsymbol@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_loadsymbol>:
test   %edi,%edi
jle    1130 <do_loadsymbol+0x10>
push   %rax
xor    %eax,%eax
call   1040 <usage@plt>
add    $0x8,%rsp
xor    %eax,%eax
jmp    1030 <m5_loadsymbol@plt>

LLVM IR (-O0):
define void @do_loadsymbol(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 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 (...) @usage()
br label %9
9: ; preds = %7, %2
%10 = call i32 (...) @m5_loadsymbol()
ret void
}

LLVM IR (-O2):
define void @do_loadsymbol(i32 %0, i8** nocapture readnone %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @usage()
br label %6
6: ; preds = %4, %2
%7 = tail call i32 (...) @m5_loadsymbol()
ret void
}
void using_history() {}


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

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

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

LLVM IR (-O2):
define void @using_history() {
ret void
}
void api_stream_on_write_timeout(struct api_filter_t *filter) {}


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

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

LLVM IR (-O0):
%struct.api_filter_t = type opaque
define void @api_stream_on_write_timeout(%struct.api_filter_t* %0) {
%2 = alloca %struct.api_filter_t*
store %struct.api_filter_t* %0, %struct.api_filter_t** %2
ret void
}

LLVM IR (-O2):
%struct.api_filter_t = type opaque
define void @api_stream_on_write_timeout(%struct.api_filter_t* nocapture %0) {
ret void
}
int xfuse_file_contents_size(int stream_id, int file_size) { return 0; }


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

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

LLVM IR (-O0):
define i32 @xfuse_file_contents_size(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
define i32 @xfuse_file_contents_size(i32 %0, i32 %1) {
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef scalar_t__ uint32_t;

/* Variables and functions */
void USBULPIConfig(uint32_t ui32Base, uint32_t ui32Config) {
  (*((volatile uint8_t *)(ui32Base + 0x00000070))) = (uint8_t)ui32Config;
}


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

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

LLVM IR (-O0):
define void @USBULPIConfig(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, 112
%8 = inttoptr i64 %7 to i64*
store volatile i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @USBULPIConfig(i64 %0, i64 %1) {
%3 = add nsw i64 %0, 112
%4 = inttoptr i64 %3 to i64*
store volatile i64 %1, i64* %4
ret void
}
/* Variables and functions */
int omp_get_num_threads();
int omp_get_thread_num();
int /*<<< orphan*/ printf(char *, int, int);
int main(int argc, char **argv) {
#pragma omp parallel num_threads(6)
  {
    printf("Hello, multithreaded world: thread %d of %d\n",
           omp_get_thread_num(), omp_get_num_threads());
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1050 <omp_get_num_threads@plt>
mov    -0x14(%rbp),%esi
mov    %eax,%edx
lea    0xe9d(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <omp_get_num_threads@plt>
lea    0xeb8(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [45 x i8] c"Hello, multithreaded world: thread %d of %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @omp_get_thread_num()
%7 = call i32 (...) @omp_get_num_threads()
%8 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [45 x i8] c"Hello, multithreaded world: thread %d of %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @omp_get_thread_num()
%4 = tail call i32 (...) @omp_get_num_threads()
%5 = tail call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
ret i32 0
}
void SSL_pending(void) {}


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

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

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

LLVM IR (-O2):
define void @SSL_pending() {
ret void
}
/* Variables and functions */
scalar_t__ ccnl_lrpc_varlenint(unsigned char **, int *, int *);
int ccnl_lrpc_dehead(unsigned char **buf, int *len, int *typ, int *vallen) {
  if (ccnl_lrpc_varlenint(buf, len, typ))
    return -1;
  if (ccnl_lrpc_varlenint(buf, len, vallen))
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<ccnl_lrpc_dehead>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <ccnl_lrpc_varlenint@plt>
cmp    $0x0,%rax
je     114f <ccnl_lrpc_dehead+0x3f>
movl   $0xffffffff,-0x4(%rbp)
jmp    117d <ccnl_lrpc_dehead+0x6d>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1030 <ccnl_lrpc_varlenint@plt>
cmp    $0x0,%rax
je     1176 <ccnl_lrpc_dehead+0x66>
movl   $0xffffffff,-0x4(%rbp)
jmp    117d <ccnl_lrpc_dehead+0x6d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ccnl_lrpc_dehead>:
push   %r15
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
call   1030 <ccnl_lrpc_varlenint@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
jne    1143 <ccnl_lrpc_dehead+0x33>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <ccnl_lrpc_varlenint@plt>
neg    %rax
sbb    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @ccnl_lrpc_dehead(i8** %0, i32* %1, i32* %2, i32* %3) {
%5 = tail call i64 @ccnl_lrpc_varlenint(i8** %0, i32* %1, i32* %2)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = tail call i64 @ccnl_lrpc_varlenint(i8** %0, i32* %1, i32* %3)
%9 = icmp ne i64 %8, 0
%10 = sext i1 %9 to i32
br label %11
11: ; preds = %7, %4
%12 = phi i32 [ -1, %4 ], [ %10, %7 ]
ret i32 %12
}
void nondet_init() {}


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

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

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

LLVM IR (-O2):
define void @nondet_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
scalar_t__ stm_cmd(int);
void stm_unpro(void) {
  if (stm_cmd(0x92) == 0)
    error("unpro command rejected");
}


x86 assembly (clang, -O0):
<stm_unpro>:
push   %rbp
mov    %rsp,%rbp
mov    $0x92,%edi
call   1030 <stm_cmd@plt>
cmp    $0x0,%rax
jne    1144 <stm_unpro+0x24>
lea    0xec1(%rip),%rdi
call   1040 <error@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<stm_unpro>:
push   %rax
mov    $0x92,%edi
call   1030 <stm_cmd@plt>
test   %rax,%rax
je     1132 <stm_unpro+0x12>
pop    %rax
ret
lea    0xec7(%rip),%rdi
pop    %rax
jmp    1040 <error@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"unpro command rejected\00"
define void @stm_unpro() {
%1 = call i64 @stm_cmd(i32 146)
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @error(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"unpro command rejected\00"
define void @stm_unpro() {
%1 = tail call i64 @stm_cmd(i32 146)
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @error(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ unittest_debug_menu_run();
int main(int argc, char **argv) {
  (void)(argc, argv);
  unittest_debug_menu_run();
  while (true) {
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <unittest_debug_menu_run@plt>
jmp    112d <main+0x1d>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <unittest_debug_menu_run@plt>
nopl   0x0(%rax,%rax,1)
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 (...) @unittest_debug_menu_run()
br label %9
9: ; preds = %2, %9
br label %9
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @unittest_debug_menu_run()
br label %4
4: ; preds = %2, %4
br label %4
}
/* Variables and functions */
int /*<<< orphan*/ record_linux_param_description(char *, char *, char *);
void module_param_desc_bic_scale(void) {
  record_linux_param_description(
      "tcp_cubic.c", "bic_scale",
      "scale (scaled by 1024) value for bic function (bic_scale/1024)");
}


x86 assembly (clang, -O0):
<module_param_desc_bic_scale>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeea(%rip),%rsi
lea    0xeed(%rip),%rdx
call   1030 <record_linux_param_description@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<module_param_desc_bic_scale>:
lea    0xee9(%rip),%rdi
lea    0xeee(%rip),%rsi
lea    0xef1(%rip),%rdx
jmp    1030 <record_linux_param_description@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"tcp_cubic.c\00"
@.str.1 = [10 x i8] c"bic_scale\00"
@.str.2 = [63 x i8] c"scale (scaled by 1024) value for bic function (bic_scale/1024)\00"
define void @module_param_desc_bic_scale() {
%1 = call i32 @record_linux_param_description(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"tcp_cubic.c\00"
@.str.1 = [10 x i8] c"bic_scale\00"
@.str.2 = [63 x i8] c"scale (scaled by 1024) value for bic function (bic_scale/1024)\00"
define void @module_param_desc_bic_scale() {
%1 = tail call i32 @record_linux_param_description(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.2, i64 0, i64 0))
ret void
}