xunge/DecIR huggingface dataset:
void sweep(int *a, int *b) {
  int tmp;
  tmp = *a;
  *a = *b;
  *b = tmp;
}


x86 assembly (clang, -O0):
<sweep>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<sweep>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

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

LLVM IR (-O2):
define void @sweep(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
unsigned int invert(unsigned int, int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, unsigned int *);
int main() {
  unsigned num;
  unsigned res;
  printf("Ingrese un entero sin signo: ");
  scanf("%u", &num);
  res = invert(num, 5, 3);
  printf("El resultado de la funcion es: %u", res);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xef7(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
mov    $0x5,%esi
mov    $0x3,%edx
call   1030 <invert@plt>
lea    0xeb4(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Ingrese un entero sin signo: \00"
@.str.1 = [3 x i8] c"%u\00"
@.str.2 = [34 x i8] c"El resultado de la funcion es: %u\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = call i32 @invert(i32 %6, i32 5, i32 3)
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"Ingrese un entero sin signo: \00"
@.str.1 = [3 x i8] c"%u\00"
@.str.2 = [34 x i8] c"El resultado de la funcion es: %u\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @invert(i32 %5, i32 5, i32 3)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}
void SIO1writeStat32(unsigned long val) {}


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

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

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

LLVM IR (-O2):
define void @SIO1writeStat32(i64 %0) {
ret void
}
/* Variables and functions */
int __builtin_HEXAGON_A6_vcmpbeq_notany(unsigned long long, unsigned long long);
unsigned builtin_needs_v65(unsigned long long Rss, unsigned long long Rtt) {
  return __builtin_HEXAGON_A6_vcmpbeq_notany(Rss, Rtt);
}


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

x86 assembly (clang, -O2):
<builtin_needs_v65>:
jmp    1030 <__builtin_HEXAGON_A6_vcmpbeq_notany@plt>

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

LLVM IR (-O2):
define i32 @builtin_needs_v65(i64 %0, i64 %1) {
%3 = tail call i32 @__builtin_HEXAGON_A6_vcmpbeq_notany(i64 %0, i64 %1)
ret i32 %3
}
int ft_isspace(int c) {
  return (((c == 32) || ((c >= 9) && (c <= 13))) ? 1 : 0);
}


x86 assembly (clang, -O0):
<ft_isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1135 <ft_isspace+0x35>
xor    %eax,%eax
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     112f <ft_isspace+0x2f>
cmpl   $0xd,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isspace>:
cmp    $0x20,%edi
sete   %al
add    $0xfffffff7,%edi
cmp    $0x5,%edi
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @ft_isspace(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 32
br i1 %4, label %13, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sge i32 %6, 9
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp sle i32 %9, 13
br label %11
11: ; preds = %8, %5
%12 = phi i1 [ false, %5 ], [ %10, %8 ]
br label %13
13: ; preds = %11, %1
%14 = phi i1 [ true, %1 ], [ %12, %11 ]
%15 = zext i1 %14 to i64
%16 = select i1 %14, i32 1, i32 0
ret i32 %16
}

LLVM IR (-O2):
define i32 @ft_isspace(i32 %0) {
%2 = icmp eq i32 %0, 32
%3 = add i32 %0, -9
%4 = icmp ult i32 %3, 5
%5 = or i1 %2, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
void main() {
  int32_t a;
  a = 2 - 1;
}


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

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

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
store i32 1, i32* %1
ret void
}

LLVM IR (-O2):
define void @main() {
ret void
}
void register_sig_handlers() {}


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

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

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

LLVM IR (-O2):
define void @register_sig_handlers() {
ret void
}
/* Variables and functions */
double atan2(double, double);
double d_atn2(double *x, double *y) { return (atan2(*x, *y)); }


x86 assembly (clang, -O0):
<d_atn2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
call   1030 <atan2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_atn2>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
jmp    1030 <atan2@plt>

LLVM IR (-O0):
define double @d_atn2(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = load double, double* %5
%7 = load double*, double** %4
%8 = load double, double* %7
%9 = call double @atan2(double %6, double %8)
ret double %9
}

LLVM IR (-O2):
define double @d_atn2(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = tail call double @atan2(double %3, double %4)
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ putch(int /*<<< orphan*/);
void putstr(char *str) {
  while (*str)
    putch(*str++);
}


x86 assembly (clang, -O0):
<putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <putstr+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <putch@plt>
jmp    111c <putstr+0xc>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @putstr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @putch(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ do_something_usefull();
int /*<<< orphan*/ subcycle1();
void subcycle2(void) {
  subcycle1();
  do_something_usefull();
}


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

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

LLVM IR (-O0):
define void @subcycle2() {
%1 = call i32 (...) @subcycle1()
%2 = call i32 (...) @do_something_usefull()
ret void
}

LLVM IR (-O2):
define void @subcycle2() {
%1 = tail call i32 (...) @subcycle1()
%2 = tail call i32 (...) @do_something_usefull()
ret void
}
long double test_log2l(long double x) { return __builtin_log2l(x); }


x86 assembly (clang, -O0):
<test_log2l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <log2l@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_log2l>:
jmp    1030 <log2l@plt>

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

LLVM IR (-O2):
define x86_fp80 @test_log2l(x86_fp80 %0) {
%2 = tail call x86_fp80 @log2l(x86_fp80 %0)
ret x86_fp80 %2
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, char const *, char const *);
int system(char *);
int launch_displaz(const char *fileName, const char *options) {
  char cmd[1024];
  snprintf(cmd, 1024, "displaz -script %s %s", options, fileName);
  cmd[1023] = '\0';
  return system(cmd);
}


x86 assembly (clang, -O0):
<launch_displaz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%r8
mov    $0x400,%esi
lea    0xeb2(%rip),%rdx
call   1040 <snprintf@plt>
movb   $0x0,-0x11(%rbp)
lea    -0x410(%rbp),%rdi
call   1030 <system@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<launch_displaz>:
push   %rbx
sub    $0x400,%rsp
mov    %rsi,%rcx
mov    %rdi,%r8
lea    0xecb(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x400,%esi
call   1040 <snprintf@plt>
movb   $0x0,0x3ff(%rsp)
mov    %rbx,%rdi
call   1030 <system@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"displaz -script %s %s\00"
define i32 @launch_displaz(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [1024 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %4
%8 = load i8*, i8** %3
%9 = call i32 @snprintf(i8* %6, i32 1024, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8)
%10 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 1023
store i8 0, i8* %10
%11 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%12 = call i32 @system(i8* %11)
ret i32 %12
}

LLVM IR (-O2):
@.str = [22 x i8] c"displaz -script %s %s\00"
define i32 @launch_displaz(i8* %0, i8* %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = call i32 @snprintf(i8* %4, i32 1024, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %0)
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 1023
store i8 0, i8* %6
%7 = call i32 @system(i8* %4)
ret i32 %7
}
char *versionChar() { return "1.5"; }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"1.5\00"
define i8* @versionChar() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [4 x i8] c"1.5\00"
define i8* @versionChar() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *prg_name) {
  fprintf(
      stderr,
      "Usage: %s -i interface-name -s src-host -d dst-host -p dst-port\n"
      "       -i interface-name The name of the interface which to listen.\n"
      "       -s src-host	 The IP address of the local host\n"
      "       -d dst-host       The IP address of the destination.\n"
      "       -p dst-port       Port which to connect to.\n"
      "You must be root to run this program.\n",
      prg_name);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [335 x i8] c"Usage: %s -i interface-name -s src-host -d dst-host -p dst-port\0A -i interface-name The name of the interface which to listen.\0A -s src-host\09 The IP address of the local host\0A -d dst-host The IP address of the destination.\0A -p dst-port Port which to connect to.\0AYou must be root to run this program.\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([335 x i8], [335 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [335 x i8] c"Usage: %s -i interface-name -s src-host -d dst-host -p dst-port\0A -i interface-name The name of the interface which to listen.\0A -s src-host\09 The IP address of the local host\0A -d dst-host The IP address of the destination.\0A -p dst-port Port which to connect to.\0AYou must be root to run this program.\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([335 x i8], [335 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ DifferingObjectSize0(void *const);
int /*<<< orphan*/ DifferingObjectSize1(void *const);
int /*<<< orphan*/ DifferingObjectSize2(void *const);
int /*<<< orphan*/ DifferingObjectSize3(void *const);
void test11(void *const p __attribute__((pass_object_size(2)))) {
  DifferingObjectSize0(p);
  DifferingObjectSize1(p);
  DifferingObjectSize2(p);
  DifferingObjectSize3(p);
}


x86 assembly (clang, -O0):
<test11>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <DifferingObjectSize0@plt>
mov    -0x8(%rbp),%rdi
call   1030 <DifferingObjectSize1@plt>
mov    -0x8(%rbp),%rdi
call   1060 <DifferingObjectSize2@plt>
mov    -0x8(%rbp),%rdi
call   1040 <DifferingObjectSize3@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test11>:
push   %rbx
mov    %rdi,%rbx
call   1050 <DifferingObjectSize0@plt>
mov    %rbx,%rdi
call   1030 <DifferingObjectSize1@plt>
mov    %rbx,%rdi
call   1060 <DifferingObjectSize2@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <DifferingObjectSize3@plt>

LLVM IR (-O0):
define void @test11(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = call i32 @DifferingObjectSize0(i8* %5)
%7 = load i8*, i8** %3
%8 = call i32 @DifferingObjectSize1(i8* %7)
%9 = load i8*, i8** %3
%10 = call i32 @DifferingObjectSize2(i8* %9)
%11 = load i8*, i8** %3
%12 = call i32 @DifferingObjectSize3(i8* %11)
ret void
}

LLVM IR (-O2):
define void @test11(i8* %0, i64 %1) {
%3 = tail call i32 @DifferingObjectSize0(i8* %0)
%4 = tail call i32 @DifferingObjectSize1(i8* %0)
%5 = tail call i32 @DifferingObjectSize2(i8* %0)
%6 = tail call i32 @DifferingObjectSize3(i8* %0)
ret void
}
int max(int i, int j) {
  if (i < j)
    return j;
  return i;
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1121 <max+0x21>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <max+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %edi,%eax
cmp    %esi,%edi
cmovl  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @max(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
void foo661() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ function(struct TreeNode *, int *, int *);
scalar_t__ malloc(int);
int *postorderTraversal(struct TreeNode *root, int *returnSize) {
  int *result = (int *)malloc(sizeof(int) * 1000);
  *returnSize = 0;
  function(root, result, returnSize);
  return result;
}


x86 assembly (clang, -O0):
<postorderTraversal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xfa0,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1040 <function@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<postorderTraversal>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
mov    $0xfa0,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
movl   $0x0,(%r15)
mov    %r14,%rdi
mov    %rax,%rsi
mov    %r15,%rdx
call   1040 <function@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.TreeNode = type { i32 }
define i32* @postorderTraversal(%struct.TreeNode* %0, i32* %1) {
%3 = alloca %struct.TreeNode*
%4 = alloca i32*
%5 = alloca i32*
store %struct.TreeNode* %0, %struct.TreeNode** %3
store i32* %1, i32** %4
%6 = call i64 @malloc(i32 4000)
%7 = inttoptr i64 %6 to i32*
store i32* %7, i32** %5
%8 = load i32*, i32** %4
store i32 0, i32* %8
%9 = load %struct.TreeNode*, %struct.TreeNode** %3
%10 = load i32*, i32** %5
%11 = load i32*, i32** %4
%12 = call i32 @function(%struct.TreeNode* %9, i32* %10, i32* %11)
%13 = load i32*, i32** %5
ret i32* %13
}

LLVM IR (-O2):
%struct.TreeNode = type { i32 }
define i32* @postorderTraversal(%struct.TreeNode* %0, i32* %1) {
%3 = tail call i64 @malloc(i32 4000)
%4 = inttoptr i64 %3 to i32*
store i32 0, i32* %1
%5 = tail call i32 @function(%struct.TreeNode* %0, i32* %4, i32* %1)
ret i32* %4
}
float nvg__absf(float a) { return a >= 0.0f ? a : -a; }


x86 assembly (clang, -O0):
<nvg__absf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     1129 <nvg__absf+0x29>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1140 <nvg__absf+0x40>
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<nvg__absf>:
movaps 0xef9(%rip),%xmm1
xorps  %xmm0,%xmm1
xorps  %xmm2,%xmm2
cmpless %xmm0,%xmm2
andps  %xmm2,%xmm0
andnps %xmm1,%xmm2
orps   %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @nvg__absf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp oge float %3, 0.000000e+00
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load float, float* %2
br label %10
7: ; preds = %1
%8 = load float, float* %2
%9 = fneg float %8
br label %10
10: ; preds = %7, %5
%11 = phi float [ %6, %5 ], [ %9, %7 ]
ret float %11
}

LLVM IR (-O2):
define float @nvg__absf(float %0) {
%2 = fcmp oge float %0, 0.000000e+00
%3 = fneg float %0
%4 = select i1 %2, float %0, float %3
ret float %4
}
void initialize_cache() {}


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

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

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

LLVM IR (-O2):
define void @initialize_cache() {
ret void
}
void XtCallbackPopdown() {}


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

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

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

LLVM IR (-O2):
define void @XtCallbackPopdown() {
ret void
}
/* Variables and functions */
int rec1(int);
int rec2(int j) {
  if (j <= 0)
    return 0;
  return rec2(rec1(j) - 1) - 1;
}


x86 assembly (clang, -O0):
<rec2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     1141 <rec2+0x21>
movl   $0x0,-0x4(%rbp)
jmp    1159 <rec2+0x39>
mov    -0x8(%rbp),%edi
call   1040 <rec1@plt>
mov    %eax,%edi
sub    $0x1,%edi
call   1030 <rec2@plt>
sub    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rec2>:
push   %rbx
xor    %ebx,%ebx
test   %edi,%edi
jle    1130 <rec2+0x20>
nopw   0x0(%rax,%rax,1)
call   1030 <rec1@plt>
lea    -0x1(%rax),%edi
add    $0xffffffff,%ebx
cmp    $0x1,%eax
jg     1120 <rec2+0x10>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @rec2(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ %0, %1 ]
%5 = phi i32 [ %8, %3 ], [ 0, %1 ]
%6 = tail call i32 @rec1(i32 %4)
%7 = add nsw i32 %6, -1
%8 = add nsw i32 %5, -1
%9 = icmp slt i32 %6, 2
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %8, %3 ]
ret i32 %11
}
/* Variables and functions */
void *foo(unsigned long, int);
__attribute__((no, used, no_icf)) void *bar(long unsigned int n, int m) {
  return foo(n, m);
}


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

x86 assembly (clang, -O2):
<bar>:
jmp    1030 <foo@plt>

LLVM IR (-O0):
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i8* (i64, i32)* @bar to i8*)], section "llvm.metadata"
define i8* @bar(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = load i32, i32* %4
%7 = call i8* @foo(i64 %5, i32 %6)
ret i8* %7
}

LLVM IR (-O2):
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i8* (i64, i32)* @bar to i8*)], section "llvm.metadata"
define i8* @bar(i64 %0, i32 %1) {
%3 = tail call i8* @foo(i64 %0, i32 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, int);
void child_code(int i) {
  printf("Hello from child %d.\n", i);
  exit(i);
}


x86 assembly (clang, -O0):
<child_code>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<child_code>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"Hello from child %d.\0A\00"
define void @child_code(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@.str = [22 x i8] c"Hello from child %d.\0A\00"
define void @child_code(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void memoryAllocationError() {
  printf("Memory allocation error\n");
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<memoryAllocationError>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<memoryAllocationError>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Memory allocation error\0A\00"
@EXIT_FAILURE = global i32 0
define void @memoryAllocationError() {
%1 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_FAILURE
%3 = call i32 @exit(i32 %2)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@str = [24 x i8] c"Memory allocation error\00"
define void @memoryAllocationError() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_FAILURE
%3 = tail call i32 @exit(i32 %2)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ kotlinclib_print_float(float);
int /*<<< orphan*/ kotlinclib_println();
void kotlinclib_println_float(float message) {
  kotlinclib_print_float(message);
  kotlinclib_println();
}


x86 assembly (clang, -O0):
<kotlinclib_println_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <kotlinclib_print_float@plt>
mov    $0x0,%al
call   1040 <kotlinclib_println@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @kotlinclib_println_float(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @kotlinclib_print_float(float %3)
%5 = call i32 (...) @kotlinclib_println()
ret void
}

LLVM IR (-O2):
define void @kotlinclib_println_float(float %0) {
%2 = tail call i32 @kotlinclib_print_float(float %0)
%3 = tail call i32 (...) @kotlinclib_println()
ret void
}
unsigned long hash_str(const char *str) {
  int c;
  unsigned long hash = 5381;
  while ((c = *str++) != 0) {
    hash = ((hash << 5) + hash) + c;
  }
  return hash;
}


x86 assembly (clang, -O0):
<hash_str>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1505,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
je     114a <hash_str+0x4a>
mov    -0x18(%rbp),%rax
shl    $0x5,%rax
add    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
jmp    1110 <hash_str+0x10>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_str>:
mov    (%rdi),%cl
test   %cl,%cl
je     112d <hash_str+0x2d>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %rax,%rdx
shl    $0x5,%rdx
add    %rax,%rdx
movsbq %cl,%rax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash_str+0x10>
ret
mov    $0x1505,%eax
ret

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

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

/* Variables and functions */
int /*<<< orphan*/ MC_avg_mmx(int, int, int /*<<< orphan*/ *,
                              int /*<<< orphan*/ const *, int);
void MC_avg_o_16_mmx(uint8_t *dest, const uint8_t *ref, int stride,
                     int height) {
  MC_avg_mmx(16, height, dest, ref, stride);
}


x86 assembly (clang, -O0):
<MC_avg_o_16_mmx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x18(%rbp),%esi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
mov    $0x10,%edi
call   1030 <MC_avg_mmx@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MC_avg_o_16_mmx>:
mov    %edx,%r8d
mov    %rsi,%rax
mov    %rdi,%rdx
mov    $0x10,%edi
mov    %ecx,%esi
mov    %rax,%rcx
jmp    1030 <MC_avg_mmx@plt>

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

LLVM IR (-O2):
define void @MC_avg_o_16_mmx(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = tail call i32 @MC_avg_mmx(i32 16, i32 %3, i32* %0, i32* %1, i32 %2)
ret void
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int32_t sdiv32(int32_t a, int32_t b) {
  int32_t r;
  if (b == 0) {
    fprintf(stderr, "Should not happen\n");
    exit(EXIT_FAILURE);
  }
  r = a / b;
  return r;
}


x86 assembly (clang, -O0):
<sdiv32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    115b <sdiv32+0x3b>
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdiv32>:
test   %esi,%esi
je     112a <sdiv32+0xa>
mov    %edi,%eax
cltd
idiv   %esi
ret
push   %rax
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [19 x i8] c"Should not happen\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @sdiv32(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* @EXIT_FAILURE
%12 = call i32 @exit(i32 %11)
unreachable
13: ; preds = %2
%14 = load i32, i32* %3
%15 = load i32, i32* %4
%16 = sdiv i32 %14, %15
store i32 %16, i32* %5
%17 = load i32, i32* %5
ret i32 %17
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"Should not happen\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @sdiv32(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %2
%10 = sdiv i32 %0, %1
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ stdout;
void vuln() {
  char buf[128];
  printf("buf: %p\n", buf);
  gets(buf);
  puts(buf);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<vuln>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
lea    -0x80(%rbp),%rsi
lea    0xeaa(%rip),%rdi
call   1040 <printf@plt>
lea    -0x80(%rbp),%rdi
call   1050 <gets@plt>
lea    -0x80(%rbp),%rdi
call   1030 <puts@plt>
mov    0x2e6c(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vuln>:
push   %rbx
sub    $0x80,%rsp
lea    0xeb1(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1050 <gets@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    0x2e6f(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"buf: %p\0A\00"
@stdout = global i32 0
define void @vuln() {
%1 = alloca [128 x i8]
%2 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%5 = call i32 @gets(i8* %4)
%6 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%7 = call i32 @puts(i8* %6)
%8 = load i32, i32* @stdout
%9 = call i32 @fflush(i32 %8)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"buf: %p\0A\00"
@stdout = global i32 0
define void @vuln() {
%1 = alloca [128 x i8]
%2 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @gets(i8* %2)
%5 = call i32 @puts(i8* %2)
%6 = load i32, i32* @stdout
%7 = call i32 @fflush(i32 %6)
ret void
}
int msm_routing_put_dolby_dap_param_to_get_control(
    struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.snd_kcontrol = type opaque
%struct.snd_ctl_elem_value = type opaque
define i32 @msm_routing_put_dolby_dap_param_to_get_control(%struct.snd_kcontrol* %0, %struct.snd_ctl_elem_value* %1) {
%3 = alloca %struct.snd_kcontrol*
%4 = alloca %struct.snd_ctl_elem_value*
store %struct.snd_kcontrol* %0, %struct.snd_kcontrol** %3
store %struct.snd_ctl_elem_value* %1, %struct.snd_ctl_elem_value** %4
ret i32 0
}

LLVM IR (-O2):
%struct.snd_kcontrol = type opaque
%struct.snd_ctl_elem_value = type opaque
define i32 @msm_routing_put_dolby_dap_param_to_get_control(%struct.snd_kcontrol* nocapture readnone %0, %struct.snd_ctl_elem_value* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
scalar_t__ erf(float);
float erff(float x) { return (float)erf(x); }


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

x86 assembly (clang, -O2):
<erff>:
push   %rax
call   1030 <erf@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @erff(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @erf(float %3)
%5 = sitofp i64 %4 to float
ret float %5
}

LLVM IR (-O2):
define float @erff(float %0) {
%2 = tail call i64 @erf(float %0)
%3 = sitofp i64 %2 to float
ret float %3
}
void d2i_RSAPrivateKey(void) {}


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

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

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

LLVM IR (-O2):
define void @d2i_RSAPrivateKey() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ db(int);
void ftst() {
  db(0xD9);
  db(0xE4);
}


x86 assembly (clang, -O0):
<ftst>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd9,%edi
call   1030 <db@plt>
mov    $0xe4,%edi
call   1030 <db@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftst>:
push   %rax
mov    $0xd9,%edi
call   1030 <db@plt>
mov    $0xe4,%edi
pop    %rax
jmp    1030 <db@plt>

LLVM IR (-O0):
define void @ftst() {
%1 = call i32 @db(i32 217)
%2 = call i32 @db(i32 228)
ret void
}

LLVM IR (-O2):
define void @ftst() {
%1 = tail call i32 @db(i32 217)
%2 = tail call i32 @db(i32 228)
ret void
}
/* Variables and functions */
int __dup2(int, int);
int dup2(int oldfd, int targetfd) { return __dup2(oldfd, targetfd); }


x86 assembly (clang, -O0):
<dup2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <__dup2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dup2>:
jmp    1030 <__dup2@plt>

LLVM IR (-O0):
define i32 @dup2(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 = call i32 @__dup2(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @dup2(i32 %0, i32 %1) {
%3 = tail call i32 @__dup2(i32 %0, i32 %1)
ret i32 %3
}
/* Type definitions */
typedef scalar_t__ u_int;

/* Variables and functions */
void curmod(const int change, int *current, const u_int max_current) {
  *current += change;
  if (*current > (int)max_current) {
    *current = 0;
  } else if (*current < 0) {
    *current = (int)max_current;
  }
}


x86 assembly (clang, -O0):
<curmod>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    %ecx,%eax
jle    113b <curmod+0x3b>
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
jmp    1159 <curmod+0x59>
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
jge    1154 <curmod+0x54>
mov    -0x18(%rbp),%rax
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
jmp    1159 <curmod+0x59>
pop    %rbp
ret

x86 assembly (clang, -O2):
<curmod>:
add    (%rsi),%edi
mov    %edi,(%rsi)
xor    %eax,%eax
cmp    %edx,%edi
jg     1111 <curmod+0x11>
mov    %edx,%eax
test   %edi,%edi
js     1111 <curmod+0x11>
ret
mov    %eax,(%rsi)
ret

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

LLVM IR (-O2):
define void @curmod(i32 %0, i32* nocapture %1, i64 %2) {
%4 = load i32, i32* %1
%5 = add nsw i32 %4, %0
store i32 %5, i32* %1
%6 = trunc i64 %2 to i32
%7 = icmp sgt i32 %5, %6
br i1 %7, label %10, label %8
8: ; preds = %3
%9 = icmp slt i32 %5, 0
br i1 %9, label %10, label %12
10: ; preds = %8, %3
%11 = phi i32 [ 0, %3 ], [ %6, %8 ]
store i32 %11, i32* %1
br label %12
12: ; preds = %10, %8
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime_r(int /*<<< orphan*/ const *, struct tm *);
struct tm *localtime(const time_t *timer) {
  static struct tm tm;
  return localtime_r(timer, &tm);
}


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

x86 assembly (clang, -O2):
<localtime>:
lea    0x2f15(%rip),%rsi
jmp    1030 <localtime_r@plt>

LLVM IR (-O0):
%struct.tm = type { i32 }
@localtime.tm = internal global %struct.tm zeroinitializer
define %struct.tm* @localtime(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call %struct.tm* @localtime_r(i32* %3, %struct.tm* @localtime.tm)
ret %struct.tm* %4
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@localtime.tm = internal global %struct.tm zeroinitializer
define %struct.tm* @localtime(i32* %0) {
%2 = tail call %struct.tm* @localtime_r(i32* %0, %struct.tm* @localtime.tm)
ret %struct.tm* %2
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x, y;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  while (x >= 0) {
    x = x + y;
    if (y >= 0) {
      y = y - 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     115e <main+0x4e>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1159 <main+0x49>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <main+0x23>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
void f(int i, int j) {
#pragma acc kernels
#pragma acc loop collapse(2)
  for (i = 0; i < 20; ++i)
    for (j = 0; j < 25; ++j)
      ;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x14,-0x4(%rbp)
jge    1152 <f+0x52>
movl   $0x0,-0x8(%rbp)
cmpl   $0x19,-0x8(%rbp)
jge    113f <f+0x3f>
jmp    1131 <f+0x31>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <f+0x22>
jmp    1144 <f+0x44>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1111 <f+0x11>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @f(i32 %0, i32 %1) {
ret void
}