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

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ *stdin;
scalar_t__ strcmp(char *, char *);
FILE *my_fopen_read(char *filename) {
  if (filename == NULL || strcmp(filename, "-") == 0) {
    return stdin;
  }
  return fopen(filename, "rb");
}


x86 assembly (clang, -O0):
<my_fopen_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1151 <my_fopen_read+0x31>
mov    -0x10(%rbp),%rdi
lea    0xebe(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1164 <my_fopen_read+0x44>
mov    0x2e90(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    1178 <my_fopen_read+0x58>
mov    -0x10(%rbp),%rdi
lea    0xe93(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_fopen_read>:
push   %rbx
test   %rdi,%rdi
je     114a <my_fopen_read+0x2a>
mov    %rdi,%rbx
lea    0xed0(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     114a <my_fopen_read+0x2a>
lea    0xec1(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <fopen@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"-\00"
@stdin = global i32* null
@.str.1 = [3 x i8] c"rb\00"
define i32* @my_fopen_read(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3, %1
%7 = load i32*, i32** @stdin
br label %10
8: ; preds = %3
%9 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
%11 = phi i32* [ %7, %6 ], [ %9, %8 ]
ret i32* %11
}
/* Variables and functions */
int /*<<< orphan*/ dummy_function();
int main(void) {
  dummy_function();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @dummy_function()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @dummy_function()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fcmp(int, int);
int /*<<< orphan*/ ffcast(double);
int /*<<< orphan*/ printf(char *, char *);
void ftest(void) {
  printf("testing '%s'\n", "float");
  fcmp(1, 2.5);
  fcmp(2, 1.5);
  fcmp(1, 1);
  ffcast(234.6);
  ffcast(-2334.6);
}


x86 assembly (clang, -O0):
<ftest>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xedc(%rip),%rsi
call   1030 <printf@plt>
mov    $0x1,%edi
mov    $0x2,%esi
call   1050 <fcmp@plt>
mov    $0x2,%edi
mov    $0x1,%esi
call   1050 <fcmp@plt>
mov    $0x1,%esi
mov    %esi,%edi
call   1050 <fcmp@plt>
movsd  0xe8f(%rip),%xmm0
call   1040 <ffcast@plt>
movsd  0xe7a(%rip),%xmm0
call   1040 <ffcast@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftest>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xedf(%rip),%rsi
call   1030 <printf@plt>
mov    $0x1,%edi
mov    $0x2,%esi
call   1050 <fcmp@plt>
mov    $0x2,%edi
mov    $0x1,%esi
call   1050 <fcmp@plt>
mov    $0x1,%edi
mov    $0x1,%esi
call   1050 <fcmp@plt>
movsd  0xe87(%rip),%xmm0
call   1040 <ffcast@plt>
movsd  0xe82(%rip),%xmm0
pop    %rax
jmp    1040 <ffcast@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"testing '%s'\0A\00"
@.str.1 = [6 x i8] c"float\00"
define void @ftest() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @fcmp(i32 1, i32 2)
%3 = call i32 @fcmp(i32 2, i32 1)
%4 = call i32 @fcmp(i32 1, i32 1)
%5 = call i32 @ffcast(double 2.346000e+02)
%6 = call i32 @ffcast(double -2.334600e+03)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"testing '%s'\0A\00"
@.str.1 = [6 x i8] c"float\00"
define void @ftest() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @fcmp(i32 1, i32 2)
%3 = tail call i32 @fcmp(i32 2, i32 1)
%4 = tail call i32 @fcmp(i32 1, i32 1)
%5 = tail call i32 @ffcast(double 2.346000e+02)
%6 = tail call i32 @ffcast(double -2.334600e+03)
ret void
}
const char *status_to_string(int status) {
  switch (status) {
  case 0x80070003:
    return "Path not found";
  case 0x80070005:
    return "Access Denied";
  default:
    return "Unknown";
  }
}


x86 assembly (clang, -O0):
<status_to_string>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x80070003,%eax
je     1130 <status_to_string+0x30>
jmp    111d <status_to_string+0x1d>
mov    -0x10(%rbp),%eax
sub    $0x80070005,%eax
je     1140 <status_to_string+0x40>
jmp    1150 <status_to_string+0x50>
lea    0xec9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    115b <status_to_string+0x5b>
lea    0xec8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    115b <status_to_string+0x5b>
lea    0xec6(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<status_to_string>:
cmp    $0x80070005,%edi
lea    0xf02(%rip),%rax
lea    0xf09(%rip),%rcx
cmove  %rax,%rcx
cmp    $0x80070003,%edi
lea    0xedb(%rip),%rax
cmovne %rcx,%rax
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Path not found\00"
@.str.1 = [14 x i8] c"Access Denied\00"
@.str.2 = [8 x i8] c"Unknown\00"
define i8* @status_to_string(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 -2147024893, label %5
i32 -2147024891, label %6
]
5: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8** %2
br label %8
6: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %8
7: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %8
8: ; preds = %7, %6, %5
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [15 x i8] c"Path not found\00"
@.str.1 = [14 x i8] c"Access Denied\00"
@.str.2 = [8 x i8] c"Unknown\00"
define i8* @status_to_string(i32 %0) {
%2 = icmp eq i32 %0, -2147024891
%3 = select i1 %2, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0)
%4 = icmp eq i32 %0, -2147024893
%5 = select i1 %4, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %3
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ call_sub(int);
int main() {
  int various = 1;
  call_sub(various);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @call_sub(i32 1)
ret i32 0
}
void fa150(void) {
P0A:
  goto P0A;
  ({
    P01A:
      goto P01A;
      ({
        P012A:
          goto P012A;
          0;
      });
    P01B:
      goto P01B;
      ({
        P013A:
          goto P013A;
          0;
      });
    P01C:
      goto P01C;
      0;
  });
P0B:
  goto P0B;
  ({
    P02A:
      goto P02A;
      ({
        P024A:
          goto P024A;
          0;
      });
    P02B:
      goto P02B;
      ({
        p025A:
          goto p025A;
          goto a;
        a:
          0;
      });
    P02C:
      goto P02C;
      0;
  });
P0C:
  goto P0C;
  0;
P0D:
  goto P0D;
}


x86 assembly (clang, -O0):
<fa150>:
push   %rbp
mov    %rsp,%rbp
jmp    1104 <fa150+0x4>

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

LLVM IR (-O0):
define void @fa150() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
br label %7
7: ; preds = %7, %0
br label %7
8: ; No predecessors!
br label %9
9: ; preds = %9, %8
br label %9
10: ; No predecessors!
br label %11
11: ; preds = %11, %10
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
br label %14
14: ; preds = %14, %13
br label %14
15: ; preds = %15
br label %15
16: ; preds = %16
br label %16
17: ; No predecessors!
br label %18
18: ; preds = %18, %17
br label %18
19: ; No predecessors!
br label %20
20: ; preds = %20, %19
br label %20
21: ; preds = %21
br label %21
22: ; No predecessors!
br label %23
23: ; preds = %23, %22
br label %23
24: ; preds = %24
br label %24
25: ; preds = %25
br label %25
26: ; preds = %26
br label %26
}

LLVM IR (-O2):
define void @fa150() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_bus_call_async(void *bus, void **slot, void *m, void *callback,
                  void *userdata, uint64_t usec) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_bus_call_async>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
xor    %eax,%eax
mov    0x2ebb(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_bus_call_async>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

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

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_call_async(i8* nocapture readnone %0, i8** nocapture readnone %1, i8* nocapture readnone %2, i8* nocapture readnone %3, i8* nocapture readnone %4, i32 %5) {
%7 = load i32, i32* @EINVAL
%8 = sub nsw i32 0, %7
ret i32 %8
}
int disable_interrupt() { asm("cli"); }


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

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

LLVM IR (-O0):
define i32 @disable_interrupt() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @disable_interrupt() {
tail call void asm sideeffect "cli", "~{dirflag},~{fpsr},~{flags}"()
ret i32 undef
}
/* Variables and functions */
char *julian_to_yyyy_mm_dd(double);
char *julian_display_yyyy_mm_dd(double current) {
  return julian_to_yyyy_mm_dd(current);
}


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

x86 assembly (clang, -O2):
<julian_display_yyyy_mm_dd>:
jmp    1030 <julian_to_yyyy_mm_dd@plt>

LLVM IR (-O0):
define i8* @julian_display_yyyy_mm_dd(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i8* @julian_to_yyyy_mm_dd(double %3)
ret i8* %4
}

LLVM IR (-O2):
define i8* @julian_display_yyyy_mm_dd(double %0) {
%2 = tail call i8* @julian_to_yyyy_mm_dd(double %0)
ret i8* %2
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int ROTR(int, int, int);
uint32_t SSIG0(uint32_t x) {
  return ROTR(x, 7, 32) ^ ROTR(x, 18, 32) ^ (x >> 3);
}


x86 assembly (clang, -O0):
<SSIG0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x7,%esi
mov    $0x20,%edx
call   1030 <ROTR@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x12,%esi
mov    $0x20,%edx
call   1030 <ROTR@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
xor    %ecx,%eax
mov    -0x4(%rbp),%ecx
sar    $0x3,%ecx
xor    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SSIG0>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x7,%esi
mov    $0x20,%edx
call   1030 <ROTR@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    $0x12,%esi
mov    $0x20,%edx
call   1030 <ROTR@plt>
sar    $0x3,%ebx
xor    %ebp,%ebx
xor    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @SSIG0(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @ROTR(i32 %3, i32 7, i32 32)
%5 = load i32, i32* %2
%6 = call i32 @ROTR(i32 %5, i32 18, i32 32)
%7 = xor i32 %4, %6
%8 = load i32, i32* %2
%9 = ashr i32 %8, 3
%10 = xor i32 %7, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @SSIG0(i32 %0) {
%2 = tail call i32 @ROTR(i32 %0, i32 7, i32 32)
%3 = tail call i32 @ROTR(i32 %0, i32 18, i32 32)
%4 = ashr i32 %0, 3
%5 = xor i32 %2, %4
%6 = xor i32 %5, %3
ret i32 %6
}
__attribute__((always_)) int rcu_read_lock_bh_held(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @rcu_read_lock_bh_held() {
ret i32 1
}

LLVM IR (-O2):
define i32 @rcu_read_lock_bh_held() {
ret i32 1
}
int ld_lt_mm2(long double *a1, long double *a2) { return !(((*a1) < (*a2))); }


x86 assembly (clang, -O0):
<ld_lt_mm2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
fldt   (%rax)
mov    -0x10(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
seta   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_lt_mm2>:
fldt   (%rdi)
fldt   (%rsi)
xor    %eax,%eax
fucomip %st(1),%st
fstp   %st(0)
setbe  %al
ret

LLVM IR (-O0):
define i32 @ld_lt_mm2(x86_fp80* %0, x86_fp80* %1) {
%3 = alloca x86_fp80*
%4 = alloca x86_fp80*
store x86_fp80* %0, x86_fp80** %3
store x86_fp80* %1, x86_fp80** %4
%5 = load x86_fp80*, x86_fp80** %3
%6 = load x86_fp80, x86_fp80* %5
%7 = load x86_fp80*, x86_fp80** %4
%8 = load x86_fp80, x86_fp80* %7
%9 = fcmp olt x86_fp80 %6, %8
%10 = xor i1 %9, true
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @ld_lt_mm2(x86_fp80* nocapture %0, x86_fp80* nocapture %1) {
%3 = load x86_fp80, x86_fp80* %0
%4 = load x86_fp80, x86_fp80* %1
%5 = fcmp uge x86_fp80 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
void XtSendSelectionRequest() {}


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

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

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

LLVM IR (-O2):
define void @XtSendSelectionRequest() {
ret void
}
int arch_has_random_seed(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @arch_has_random_seed() {
ret i32 0
}
char *hash_plugin_summary(void) {
  return ("vbulletin \tmd5(md5(pass).salt) plugin (vBulletin)");
}


x86 assembly (clang, -O0):
<hash_plugin_summary>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_plugin_summary>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [50 x i8] c"vbulletin \09md5(md5(pass).salt) plugin (vBulletin)\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [50 x i8] c"vbulletin \09md5(md5(pass).salt) plugin (vBulletin)\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0)
}
void discrete_world_testbench_apply_function_unit_square(
    struct discrete_world *world, unsigned int selected_world,
    unsigned int param_index, unsigned int pos[], void *new_unit) {
  long *res = new_unit;
  *res = (*res) * (*res);
}


x86 assembly (clang, -O0):
<discrete_world_testbench_apply_function_unit_square>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%rcx
mov    -0x28(%rbp),%rax
imul   (%rax),%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<discrete_world_testbench_apply_function_unit_square>:
mov    (%r8),%rax
imul   %rax,%rax
mov    %rax,(%r8)
ret

LLVM IR (-O0):
%struct.discrete_world = type opaque
define void @discrete_world_testbench_apply_function_unit_square(%struct.discrete_world* %0, i32 %1, i32 %2, i32* %3, i8* %4) {
%6 = alloca %struct.discrete_world*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i8*
%11 = alloca i64*
store %struct.discrete_world* %0, %struct.discrete_world** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32* %3, i32** %9
store i8* %4, i8** %10
%12 = load i8*, i8** %10
%13 = bitcast i8* %12 to i64*
store i64* %13, i64** %11
%14 = load i64*, i64** %11
%15 = load i64, i64* %14
%16 = load i64*, i64** %11
%17 = load i64, i64* %16
%18 = mul nsw i64 %15, %17
%19 = load i64*, i64** %11
store i64 %18, i64* %19
ret void
}

LLVM IR (-O2):
%struct.discrete_world = type opaque
define void @discrete_world_testbench_apply_function_unit_square(%struct.discrete_world* nocapture readnone %0, i32 %1, i32 %2, i32* nocapture readnone %3, i8* nocapture %4) {
%6 = bitcast i8* %4 to i64*
%7 = load i64, i64* %6
%8 = mul nsw i64 %7, %7
store i64 %8, i64* %6
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ _bytecode_write(int, int /*<<< orphan*/, int /*<<< orphan*/,
                                   int /*<<< orphan*/, int /*<<< orphan*/,
                                   int /*<<< orphan*/);
uint32_t bytecode_load(uint8_t r0, uint16_t addr) {
  return _bytecode_write(6, 0, addr, r0, 0, 0);
}


x86 assembly (clang, -O0):
<bytecode_load>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edx
mov    -0x4(%rbp),%ecx
mov    $0x6,%edi
xor    %r9d,%r9d
mov    %r9d,%esi
mov    %r9d,%r8d
call   1030 <_bytecode_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bytecode_load>:
mov    %esi,%edx
mov    %edi,%ecx
mov    $0x6,%edi
xor    %esi,%esi
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <_bytecode_write@plt>

LLVM IR (-O0):
define i32 @bytecode_load(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = call i32 @_bytecode_write(i32 6, i32 0, i32 %5, i32 %6, i32 0, i32 0)
ret i32 %7
}

LLVM IR (-O2):
define i32 @bytecode_load(i32 %0, i32 %1) {
%3 = tail call i32 @_bytecode_write(i32 6, i32 0, i32 %1, i32 %0, i32 0, i32 0)
ret i32 %3
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
scalar_t__ rand();
uint64_t rand_int64() { return ((uint64_t)rand() << 32) | (uint64_t)rand(); }


x86 assembly (clang, -O0):
<rand_int64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x20,%ecx
shl    %cl,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %rax,%rcx
mov    -0x4(%rbp),%eax
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_int64>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <rand@plt>

LLVM IR (-O0):
define i32 @rand_int64() {
%1 = call i64 (...) @rand()
%2 = trunc i64 %1 to i32
%3 = shl i32 %2, 32
%4 = call i64 (...) @rand()
%5 = trunc i64 %4 to i32
%6 = or i32 %3, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @rand_int64() {
%1 = tail call i64 (...) @rand()
%2 = tail call i64 (...) @rand()
ret i32 poison
}
/* Variables and functions */
int davinci_rev();
int is_davinci_dm355(void) { return (davinci_rev() == (0x355)) ? 1 : 0; }


x86 assembly (clang, -O0):
<is_davinci_dm355>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <davinci_rev@plt>
mov    %eax,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x355,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_davinci_dm355>:
push   %rax
xor    %eax,%eax
call   1030 <davinci_rev@plt>
xor    %ecx,%ecx
cmp    $0x355,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_davinci_dm355() {
%1 = call i32 (...) @davinci_rev()
%2 = icmp eq i32 %1, 853
%3 = zext i1 %2 to i64
%4 = select i1 %2, i32 1, i32 0
ret i32 %4
}

LLVM IR (-O2):
define i32 @is_davinci_dm355() {
%1 = tail call i32 (...) @davinci_rev()
%2 = icmp eq i32 %1, 853
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ target();
void path2() { target(); }


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

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

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

LLVM IR (-O2):
define void @path2() {
%1 = tail call i32 (...) @target()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ proutn(char *);
int /*<<< orphan*/ skip(int);
void prout(char *s) {
  proutn(s);
  skip(1);
}


x86 assembly (clang, -O0):
<prout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <proutn@plt>
mov    $0x1,%edi
call   1030 <skip@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prout>:
push   %rax
call   1040 <proutn@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <skip@plt>

LLVM IR (-O0):
define void @prout(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @proutn(i8* %3)
%5 = call i32 @skip(i32 1)
ret void
}

LLVM IR (-O2):
define void @prout(i8* %0) {
%2 = tail call i32 @proutn(i8* %0)
%3 = tail call i32 @skip(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dtoi(float);
int /*<<< orphan*/ g2_set_auto_flush(int /*<<< orphan*/, float);
void g2_set_auto_flush_(float *dev, float *on_off) {
  g2_set_auto_flush(dtoi(*dev), *on_off);
}


x86 assembly (clang, -O0):
<g2_set_auto_flush_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
call   1030 <dtoi@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
call   1040 <g2_set_auto_flush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g2_set_auto_flush_>:
push   %rbx
mov    %rsi,%rbx
movss  (%rdi),%xmm0
call   1030 <dtoi@plt>
movss  (%rbx),%xmm0
mov    %eax,%edi
pop    %rbx
jmp    1040 <g2_set_auto_flush@plt>

LLVM IR (-O0):
define void @g2_set_auto_flush_(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = load float, float* %5
%7 = call i32 @dtoi(float %6)
%8 = load float*, float** %4
%9 = load float, float* %8
%10 = call i32 @g2_set_auto_flush(i32 %7, float %9)
ret void
}

LLVM IR (-O2):
define void @g2_set_auto_flush_(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = tail call i32 @dtoi(float %3)
%5 = load float, float* %1
%6 = tail call i32 @g2_set_auto_flush(i32 %4, float %5)
ret void
}
int indexes_are_right(int index_1, int index_2, int max_val) {
  return (index_1 >= 0 && index_1 < max_val) &&
         (index_2 >= 0 && index_2 < max_val);
}


x86 assembly (clang, -O0):
<indexes_are_right>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0xd(%rbp)
jl     114e <indexes_are_right+0x4e>
mov    -0x4(%rbp),%ecx
xor    %eax,%eax
cmp    -0xc(%rbp),%ecx
mov    %al,-0xd(%rbp)
jge    114e <indexes_are_right+0x4e>
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0xe(%rbp)
jl     1148 <indexes_are_right+0x48>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
setl   %al
mov    %al,-0xe(%rbp)
mov    -0xe(%rbp),%al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<indexes_are_right>:
test   %edi,%edi
setns  %al
cmp    %edx,%edi
setl   %cl
and    %al,%cl
test   %esi,%esi
setns  %al
cmp    %edx,%esi
setl   %dl
and    %al,%dl
and    %cl,%dl
movzbl %dl,%eax
ret

LLVM IR (-O0):
define i32 @indexes_are_right(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = icmp sge i32 %7, 0
br i1 %8, label %9, label %22
9: ; preds = %3
%10 = load i32, i32* %4
%11 = load i32, i32* %6
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %22
13: ; preds = %9
%14 = load i32, i32* %5
%15 = icmp sge i32 %14, 0
br i1 %15, label %16, label %20
16: ; preds = %13
%17 = load i32, i32* %5
%18 = load i32, i32* %6
%19 = icmp slt i32 %17, %18
br label %20
20: ; preds = %16, %13
%21 = phi i1 [ false, %13 ], [ %19, %16 ]
br label %22
22: ; preds = %20, %9, %3
%23 = phi i1 [ false, %9 ], [ false, %3 ], [ %21, %20 ]
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @indexes_are_right(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %0, -1
%5 = icmp slt i32 %0, %2
%6 = and i1 %4, %5
%7 = icmp sgt i32 %1, -1
%8 = icmp slt i32 %1, %2
%9 = and i1 %7, %8
%10 = and i1 %6, %9
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Type definitions */
struct libavl_allocator {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int);
void *malloc(size_t);
void *pavl_malloc(struct libavl_allocator *allocator, size_t size) {
  assert(allocator != NULL && size > 0);
  return malloc(size);
}


x86 assembly (clang, -O0):
<pavl_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
je     114b <pavl_malloc+0x2b>
cmpq   $0x0,-0x10(%rbp)
seta   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rdi
call   1040 <malloc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pavl_malloc>:
push   %rbx
mov    %rsi,%rbx
test   %rdi,%rdi
setne  %al
test   %rsi,%rsi
setne  %cl
and    %al,%cl
movzbl %cl,%edi
call   1030 <assert@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <malloc@plt>

LLVM IR (-O0):
%struct.libavl_allocator = type { i32 }
define i8* @pavl_malloc(%struct.libavl_allocator* %0, i64 %1) {
%3 = alloca %struct.libavl_allocator*
%4 = alloca i64
store %struct.libavl_allocator* %0, %struct.libavl_allocator** %3
store i64 %1, i64* %4
%5 = load %struct.libavl_allocator*, %struct.libavl_allocator** %3
%6 = icmp ne %struct.libavl_allocator* %5, null
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i64, i64* %4
%9 = icmp ugt i64 %8, 0
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ false, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = load i64, i64* %4
%15 = call i8* @malloc(i64 %14)
ret i8* %15
}

LLVM IR (-O2):
%struct.libavl_allocator = type { i32 }
define noalias i8* @pavl_malloc(%struct.libavl_allocator* readnone %0, i64 %1) {
%3 = icmp ne %struct.libavl_allocator* %0, null
%4 = icmp ne i64 %1, 0
%5 = and i1 %3, %4
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = tail call i8* @malloc(i64 %1)
ret i8* %8
}
/* Variables and functions */
int ft_check_a(char *);
int /*<<< orphan*/ ft_putchar(char);
int main(int argc, char **argv) {
  if (argc != 2) {
    ft_putchar('a');
    ft_putchar('\n');
    return (0);
  }
  if (ft_check_a(argv[1]) == 1)
    ft_putchar('a');
  ft_putchar('\n');
  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)
cmpl   $0x2,-0x8(%rbp)
je     1160 <main+0x40>
mov    $0x61,%edi
call   1040 <ft_putchar@plt>
mov    $0xa,%edi
call   1040 <ft_putchar@plt>
movl   $0x0,-0x4(%rbp)
jmp    1191 <main+0x71>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <ft_check_a@plt>
cmp    $0x1,%eax
jne    1180 <main+0x60>
mov    $0x61,%edi
call   1040 <ft_putchar@plt>
mov    $0xa,%edi
call   1040 <ft_putchar@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jne    1134 <main+0x14>
mov    0x8(%rsi),%rdi
call   1030 <ft_check_a@plt>
cmp    $0x1,%eax
jne    113e <main+0x1e>
mov    $0x61,%edi
call   1040 <ft_putchar@plt>
mov    $0xa,%edi
call   1040 <ft_putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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 = icmp ne i32 %6, 2
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = call i32 @ft_putchar(i8 signext 97)
%10 = call i32 @ft_putchar(i8 signext 10)
store i32 0, i32* %3
br label %21
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
%15 = call i32 @ft_check_a(i8* %14)
%16 = icmp eq i32 %15, 1
br i1 %16, label %17, label %19
17: ; preds = %11
%18 = call i32 @ft_putchar(i8 signext 97)
br label %19
19: ; preds = %17, %11
%20 = call i32 @ft_putchar(i8 signext 10)
store i32 0, i32* %3
br label %21
21: ; preds = %19, %8
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @ft_check_a(i8* %6)
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %11
9: ; preds = %4, %2
%10 = tail call i32 @ft_putchar(i8 signext 97)
br label %11
11: ; preds = %9, %4
%12 = tail call i32 @ft_putchar(i8 signext 10)
ret i32 0
}
void selinux_init(void) {}


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

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

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

LLVM IR (-O2):
define void @selinux_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Hello, GitHub!\n");
  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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Hello, GitHub!\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 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [15 x i8] c"Hello, GitHub!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void putcp(void *p, char c) { *(*((char **)p))++ = c; }


x86 assembly (clang, -O0):
<putcp>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rdx
mov    (%rdx),%rax
mov    %rax,%rsi
add    $0x1,%rsi
mov    %rsi,(%rdx)
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<putcp>:
mov    (%rdi),%rax
lea    0x1(%rax),%rcx
mov    %rcx,(%rdi)
mov    %sil,(%rax)
ret

LLVM IR (-O0):
define void @putcp(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i8**
%8 = load i8*, i8** %7
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %7
store i8 %5, i8* %8
ret void
}

LLVM IR (-O2):
define void @putcp(i8* nocapture %0, i8 signext %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %4, i64 1
store i8* %5, i8** %3
store i8 %1, i8* %4
ret void
}
/* Type definitions */
struct mdea_array {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mdea_error(char **, char *);
int mdea_object_node_get_array(void *p, struct mdea_array **array,
                               char **error) {
  mdea_error(error, "Expected array, got object");
  return -1;
}


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

x86 assembly (clang, -O2):
<mdea_object_node_get_array>:
push   %rax
mov    %rdx,%rdi
lea    0xee5(%rip),%rsi
call   1030 <mdea_error@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.mdea_array = type { i32 }
@.str = [27 x i8] c"Expected array, got object\00"
define i32 @mdea_object_node_get_array(i8* %0, %struct.mdea_array** %1, i8** %2) {
%4 = alloca i8*
%5 = alloca %struct.mdea_array**
%6 = alloca i8**
store i8* %0, i8** %4
store %struct.mdea_array** %1, %struct.mdea_array*** %5
store i8** %2, i8*** %6
%7 = load i8**, i8*** %6
%8 = call i32 @mdea_error(i8** %7, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
%struct.mdea_array = type { i32 }
@.str = [27 x i8] c"Expected array, got object\00"
define i32 @mdea_object_node_get_array(i8* nocapture readnone %0, %struct.mdea_array** nocapture readnone %1, i8** %2) {
%4 = tail call i32 @mdea_error(i8** %2, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
void perror_exit(char *message) {
  perror(message);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<perror_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<perror_exit>:
push   %rax
call   1030 <perror@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @perror_exit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @perror_exit(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3;

/* Variables and functions */
int sqlite3_exec(int /*<<< orphan*/ *, char const *, int /*<<< orphan*/ *,
                 int /*<<< orphan*/ *, char **);
int Bank_int_QueryNone(sqlite3 *Database, const char *Query,
                       char **ErrorMessage) {
  return sqlite3_exec(Database, Query, NULL, NULL, ErrorMessage);
}


x86 assembly (clang, -O0):
<Bank_int_QueryNone>:
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),%r8
xor    %eax,%eax
mov    %eax,%ecx
mov    %rcx,%rdx
call   1030 <sqlite3_exec@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Bank_int_QueryNone>:
mov    %rdx,%r8
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <sqlite3_exec@plt>

LLVM IR (-O0):
define i32 @Bank_int_QueryNone(i32* %0, i8* %1, i8** %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i8**
store i32* %0, i32** %4
store i8* %1, i8** %5
store i8** %2, i8*** %6
%7 = load i32*, i32** %4
%8 = load i8*, i8** %5
%9 = load i8**, i8*** %6
%10 = call i32 @sqlite3_exec(i32* %7, i8* %8, i32* null, i32* null, i8** %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @Bank_int_QueryNone(i32* %0, i8* %1, i8** %2) {
%4 = tail call i32 @sqlite3_exec(i32* %0, i8* %1, i32* null, i32* null, i8** %2)
ret i32 %4
}
/* Type definitions */
struct feature_pair {
  int dummy;
};
struct CovariateAnalysis {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void _emitJSONCovExtra(const struct feature_pair *pair,
                       const struct CovariateAnalysis *covan, FILE *fp) {}


x86 assembly (clang, -O0):
<_emitJSONCovExtra>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.feature_pair = type { i32 }
%struct.CovariateAnalysis = type { i32 }
define void @_emitJSONCovExtra(%struct.feature_pair* %0, %struct.CovariateAnalysis* %1, i32* %2) {
%4 = alloca %struct.feature_pair*
%5 = alloca %struct.CovariateAnalysis*
%6 = alloca i32*
store %struct.feature_pair* %0, %struct.feature_pair** %4
store %struct.CovariateAnalysis* %1, %struct.CovariateAnalysis** %5
store i32* %2, i32** %6
ret void
}

LLVM IR (-O2):
%struct.feature_pair = type { i32 }
%struct.CovariateAnalysis = type { i32 }
define void @_emitJSONCovExtra(%struct.feature_pair* nocapture %0, %struct.CovariateAnalysis* nocapture %1, i32* nocapture %2) {
ret void
}
int query(int x, int *BIT) {
  int sum = 0;
  for (; x > 0; x -= x & (-x)) {
    sum += BIT[x];
  }
  return sum;
}


x86 assembly (clang, -O0):
<query>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1144 <query+0x44>
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%ecx
xor    %eax,%eax
sub    -0x4(%rbp),%eax
and    %eax,%ecx
mov    -0x4(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1112 <query+0x12>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<query>:
xor    %eax,%eax
test   %edi,%edi
jle    111e <query+0x1e>
cs nopw 0x0(%rax,%rax,1)
mov    %edi,%ecx
add    (%rsi,%rcx,4),%eax
lea    -0x1(%rdi),%ecx
and    %edi,%ecx
mov    %ecx,%edi
jne    1110 <query+0x10>
ret

LLVM IR (-O0):
define i32 @query(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
store i32 %0, i32* %3
store i32* %1, i32** %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %3
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %24
9: ; preds = %6
%10 = load i32*, i32** %4
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %10, i64 %12
%14 = load i32, i32* %13
%15 = load i32, i32* %5
%16 = add nsw i32 %15, %14
store i32 %16, i32* %5
br label %17
17: ; preds = %9
%18 = load i32, i32* %3
%19 = load i32, i32* %3
%20 = sub nsw i32 0, %19
%21 = and i32 %18, %20
%22 = load i32, i32* %3
%23 = sub nsw i32 %22, %21
store i32 %23, i32* %3
br label %6
24: ; preds = %6
%25 = load i32, i32* %5
ret i32 %25
}

LLVM IR (-O2):
define i32 @query(i32 %0, i32* nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %14
4: ; preds = %2, %4
%5 = phi i32 [ %10, %4 ], [ 0, %2 ]
%6 = phi i32 [ %12, %4 ], [ %0, %2 ]
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %1, i64 %7
%9 = load i32, i32* %8
%10 = add nsw i32 %9, %5
%11 = add nsw i32 %6, -1
%12 = and i32 %11, %6
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %2
%15 = phi i32 [ 0, %2 ], [ %10, %4 ]
ret i32 %15
}
int times(int a, int b) { return a * b; }


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

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

LLVM IR (-O0):
define i32 @times(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 = load i32, i32* %4
%7 = mul nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @times(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
ret i32 %3
}
void strcpy4(char *s, char *t) {
  while ((*s++ = *t++) != '\0')
    ;
}


x86 assembly (clang, -O0):
<strcpy4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     113f <strcpy4+0x3f>
jmp    110c <strcpy4+0xc>
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy4>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <strcpy4+0x10>
ret

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

LLVM IR (-O2):
define void @strcpy4(i8* nocapture writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %8, %3 ]
%5 = phi i8* [ %1, %2 ], [ %6, %3 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %5
%8 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %7, i8* %4
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret void
}
/* Variables and functions */
int getArrayIndexes();
int /*<<< orphan*/ popNumber();
int /*<<< orphan*/ pushNumber(int);
void basIndexes() {
  int indexes;
  indexes = getArrayIndexes();
  popNumber();
  pushNumber(indexes);
}


x86 assembly (clang, -O0):
<basIndexes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getArrayIndexes@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    -0x4(%rbp),%edi
call   1040 <pushNumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basIndexes>:
push   %rbx
xor    %eax,%eax
call   1030 <getArrayIndexes@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <pushNumber@plt>

LLVM IR (-O0):
define void @basIndexes() {
%1 = alloca i32
%2 = call i32 (...) @getArrayIndexes()
store i32 %2, i32* %1
%3 = call i32 (...) @popNumber()
%4 = load i32, i32* %1
%5 = call i32 @pushNumber(i32 %4)
ret void
}

LLVM IR (-O2):
define void @basIndexes() {
%1 = tail call i32 (...) @getArrayIndexes()
%2 = tail call i32 (...) @popNumber()
%3 = tail call i32 @pushNumber(i32 %1)
ret void
}
int test_imm_DEint8_mem(signed char *val) {
  return ((*val) & (0xDE << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_DEint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -34
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ loop(char *);
int main(void) {
  char *string = "Hello, World!\n";
  loop(string);
  while (1)
    ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <loop@plt>
jmp    1133 <main+0x23>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <loop@plt>
nopl   (%rax)
jmp    1120 <main+0x10>

LLVM IR (-O0):
@.str = [15 x i8] c"Hello, World!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @loop(i8* %3)
br label %5
5: ; preds = %0, %5
br label %5
}

LLVM IR (-O2):
@.str = [15 x i8] c"Hello, World!\0A\00"
define i32 @main() {
%1 = tail call i32 @loop(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void stringFree(void *ptr) { free(*(char **)ptr); }


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

x86 assembly (clang, -O2):
<stringFree>:
mov    (%rdi),%rdi
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @stringFree(i8* nocapture %0) {
%2 = bitcast i8* %0 to i8**
%3 = load i8*, i8** %2
%4 = tail call i32 @free(i8* %3)
ret void
}