xunge/DecIR huggingface dataset:
void convert_pound(char *str) {
  for (; *str != '\0'; str++) {
    if (*str == '{')
      *str = '{';
  }
  return;
}


x86 assembly (clang, -O0):
<convert_pound>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1145 <convert_pound+0x45>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7b,%eax
jne    112f <convert_pound+0x2f>
mov    -0x8(%rbp),%rax
movb   $0x7b,(%rax)
jmp    1134 <convert_pound+0x34>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <convert_pound+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_pound>:
jmp    1117 <convert_pound+0x17>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movb   $0x7b,(%rdi)
add    $0x1,%rdi
movzbl (%rdi),%eax
cmp    $0x7b,%al
je     1110 <convert_pound+0x10>
test   %al,%al
jne    1113 <convert_pound+0x13>
ret

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

LLVM IR (-O2):
define void @convert_pound(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
switch i8 %4, label %6 [
i8 0, label %8
i8 123, label %5
]
5: ; preds = %2
store i8 123, i8* %3
br label %6
6: ; preds = %2, %5
%7 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
8: ; preds = %2
ret void
}
/* Variables and functions */
int ebbrt_gthread_active_p();
int __gthread_active_p(void) { return ebbrt_gthread_active_p(); }


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

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

LLVM IR (-O0):
define i32 @__gthread_active_p() {
%1 = call i32 (...) @ebbrt_gthread_active_p()
ret i32 %1
}

LLVM IR (-O2):
define i32 @__gthread_active_p() {
%1 = tail call i32 (...) @ebbrt_gthread_active_p()
ret i32 %1
}
/* Variables and functions */
int ioutil_chdir(char const *);
int cmdline_chdir(const char *param, void *extra_param) {
  return ioutil_chdir(param);
}


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

x86 assembly (clang, -O2):
<cmdline_chdir>:
jmp    1030 <ioutil_chdir@plt>

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

LLVM IR (-O2):
define i32 @cmdline_chdir(i8* %0, i8* nocapture readnone %1) {
%3 = tail call i32 @ioutil_chdir(i8* %0)
ret i32 %3
}
int main(int argc, const char *argv[]) {
  int buffer[10];
  int i = 0;
  while (i < 10) {
    buffer[i] = i;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x44(%rbp)
cmpl   $0xa,-0x44(%rbp)
jge    1133 <main+0x33>
mov    -0x44(%rbp),%ecx
movslq -0x44(%rbp),%rax
mov    %ecx,-0x40(%rbp,%rax,4)
jmp    1119 <main+0x19>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [10 x i32]
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
br label %8
8: ; preds = %11, %2
%9 = load i32, i32* %7
%10 = icmp slt i32 %9, 10
br i1 %10, label %11, label %16
11: ; preds = %8
%12 = load i32, i32* %7
%13 = load i32, i32* %7
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 %14
store i32 %12, i32* %15
br label %8
16: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int socket_quickack(int s, int value) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<socket_quickack>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2ed7(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebe(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<socket_quickack>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @socket_quickack(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* @ENOSYS
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @socket_quickack(i32 %0, i32 %1) {
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i32 -1
}
/* Type definitions */
struct task_struct {
  int dummy;
};

/* Variables and functions */
void show_trace_task(struct task_struct *tsk) {}


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

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

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

LLVM IR (-O2):
%struct.task_struct = type { i32 }
define void @show_trace_task(%struct.task_struct* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TH(int, float, char, char);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  int num_plates = 3;
  printf("Note: There are three towers, From, To and Auxilary, To is the right "
         "most tower");
  printf("Input Number of Plates %d(default) in the From tower \n", num_plates);
  TH(num_plates, 'F', 'T', 'A');
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x3,-0x14(%rbp)
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xeff(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%edi
movss  0xe99(%rip),%xmm0
mov    $0x54,%esi
mov    $0x41,%edx
call   1040 <TH@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedc(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf1e(%rip),%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1030 <printf@plt>
movss  0xeb6(%rip),%xmm0
mov    $0x3,%edi
mov    $0x54,%esi
mov    $0x41,%edx
call   1040 <TH@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [80 x i8] c"Note: There are three towers, From, To and Auxilary, To is the right most tower\00"
@.str.1 = [55 x i8] c"Input Number of Plates %d(default) in the From tower \0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 3, i32* %6
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %6
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %6
%11 = call i32 @TH(i32 %10, float 7.000000e+01, i8 signext 84, i8 signext 65)
ret i32 0
}

LLVM IR (-O2):
@.str = [80 x i8] c"Note: There are three towers, From, To and Auxilary, To is the right most tower\00"
@.str.1 = [55 x i8] c"Input Number of Plates %d(default) in the From tower \0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0), i32 3)
%5 = tail call i32 @TH(i32 3, float 7.000000e+01, i8 signext 84, i8 signext 65)
ret i32 0
}
int test5() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @test5() {
ret i32 0
}
int __test() {
  int x = 0;
  x = x + 2;
  x = x + 4;
  return x;
}


x86 assembly (clang, -O0):
<__test>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @__test() {
ret i32 6
}
/* Variables and functions */
int /*<<< orphan*/ two_accesses(int *);
void one_alarm_is_enough() {
  int arr[1];
  two_accesses(arr);
}


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

x86 assembly (clang, -O2):
<one_alarm_is_enough>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <two_accesses@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @one_alarm_is_enough() {
%1 = alloca [1 x i32]
%2 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 0
%3 = call i32 @two_accesses(i32* %2)
ret void
}

LLVM IR (-O2):
define void @one_alarm_is_enough() {
%1 = alloca [1 x i32]
%2 = bitcast [1 x i32]* %1 to i8*
%3 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 0
%4 = call i32 @two_accesses(i32* %3)
ret void
}
int YMOutput_ValidateVersion(int Version) {
  if ((Version != 3) && (Version != 5)) {
    Version = 5;
  }
  return Version;
}


x86 assembly (clang, -O0):
<YMOutput_ValidateVersion>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x3,-0x4(%rbp)
je     1122 <YMOutput_ValidateVersion+0x22>
cmpl   $0x5,-0x4(%rbp)
je     1122 <YMOutput_ValidateVersion+0x22>
movl   $0x5,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<YMOutput_ValidateVersion>:
lea    -0x3(%rdi),%eax
test   $0xfffffffd,%eax
mov    $0x5,%eax
cmove  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @YMOutput_ValidateVersion(i32 %0) {
%2 = icmp ne i32 %0, 3
%3 = icmp ne i32 %0, 5
%4 = and i1 %2, %3
%5 = select i1 %4, i32 5, i32 %0
ret i32 %5
}
/* Type definitions */
struct termios {
  int dummy;
};

/* Variables and functions */
int get_termios_size(void) { return sizeof(struct termios); }


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

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

LLVM IR (-O0):
define i32 @get_termios_size() {
ret i32 4
}

LLVM IR (-O2):
define i32 @get_termios_size() {
ret i32 4
}
/* Variables and functions */
double sin(double);
double sinc(double x) {
  x *= 3.14159265358979323846;
  if (x > 1.0E-9)
    return (sin(x) / x);
  return (1.0);
}


x86 assembly (clang, -O0):
<sinc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  0xee3(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xec4(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    115f <sinc+0x4f>
movsd  -0x10(%rbp),%xmm0
call   1030 <sin@plt>
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    116c <sinc+0x5c>
movsd  0xea9(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sinc>:
push   %rax
mulsd  0xee7(%rip),%xmm0
ucomisd 0xeef(%rip),%xmm0
jbe    1134 <sinc+0x24>
movsd  %xmm0,(%rsp)
call   1030 <sin@plt>
divsd  (%rsp),%xmm0
pop    %rax
ret
movsd  0xecc(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @sinc(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fmul double %4, 0x400921FB54442D18
store double %5, double* %3
%6 = load double, double* %3
%7 = fcmp ogt double %6, 1.000000e-09
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load double, double* %3
%10 = call double @sin(double %9)
%11 = load double, double* %3
%12 = fdiv double %10, %11
store double %12, double* %2
br label %14
13: ; preds = %1
store double 1.000000e+00, double* %2
br label %14
14: ; preds = %13, %8
%15 = load double, double* %2
ret double %15
}

LLVM IR (-O2):
define double @sinc(double %0) {
%2 = fmul double %0, 0x400921FB54442D18
%3 = fcmp ogt double %2, 1.000000e-09
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call double @sin(double %2)
%6 = fdiv double %5, %2
br label %7
7: ; preds = %1, %4
%8 = phi double [ %6, %4 ], [ 1.000000e+00, %1 ]
ret double %8
}
void initializeSystemObject(void) {}


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

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

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

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

/* Variables and functions */
uint32_t mtgp32_temper(const uint32_t tmp_tbl[16], uint32_t r, uint32_t t) {
  t ^= t >> 16;
  t ^= t >> 8;
  r ^= tmp_tbl[t & 0x0f];
  return r;
}


x86 assembly (clang, -O0):
<mtgp32_temper>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sar    $0x10,%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sar    $0x8,%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
and    $0xf,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mtgp32_temper>:
mov    %esi,%eax
mov    %edx,%ecx
sar    $0x10,%ecx
xor    %edx,%ecx
mov    %ecx,%edx
shr    $0x8,%edx
xor    %ecx,%edx
and    $0xf,%edx
xor    (%rdi,%rdx,4),%eax
ret

LLVM IR (-O0):
define i32 @mtgp32_temper(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* %6
%8 = ashr i32 %7, 16
%9 = load i32, i32* %6
%10 = xor i32 %9, %8
store i32 %10, i32* %6
%11 = load i32, i32* %6
%12 = ashr i32 %11, 8
%13 = load i32, i32* %6
%14 = xor i32 %13, %12
store i32 %14, i32* %6
%15 = load i32*, i32** %4
%16 = load i32, i32* %6
%17 = and i32 %16, 15
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i32, i32* %15, i64 %18
%20 = load i32, i32* %19
%21 = load i32, i32* %5
%22 = xor i32 %21, %20
store i32 %22, i32* %5
%23 = load i32, i32* %5
ret i32 %23
}

LLVM IR (-O2):
define i32 @mtgp32_temper(i32* nocapture %0, i32 %1, i32 %2) {
%4 = ashr i32 %2, 16
%5 = xor i32 %4, %2
%6 = lshr i32 %5, 8
%7 = xor i32 %6, %5
%8 = and i32 %7, 15
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = xor i32 %11, %1
ret i32 %12
}
/* Variables and functions */
int potip(float, int);
float poti(float base, int expoente) {
  if (expoente >= 0)
    return potip(base, expoente);
  else
    return 1 / potip(base, -expoente);
}


x86 assembly (clang, -O0):
<poti>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1145 <poti+0x35>
movss  -0x8(%rbp),%xmm0
mov    -0xc(%rbp),%edi
call   1030 <potip@plt>
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1167 <poti+0x57>
movss  -0x8(%rbp),%xmm0
xor    %edi,%edi
sub    -0xc(%rbp),%edi
call   1030 <potip@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<poti>:
push   %rax
test   %edi,%edi
js     111c <poti+0xc>
call   1030 <potip@plt>
jmp    1130 <poti+0x20>
neg    %edi
call   1030 <potip@plt>
mov    %eax,%ecx
lea    0x1(%rcx),%edx
xor    %eax,%eax
cmp    $0x3,%edx
cmovb  %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
define float @poti(float %0, i32 %1) {
%3 = icmp sgt i32 %1, -1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @potip(float %0, i32 %1)
br label %12
6: ; preds = %2
%7 = sub nsw i32 0, %1
%8 = tail call i32 @potip(float %0, i32 %7)
%9 = add i32 %8, 1
%10 = icmp ult i32 %9, 3
%11 = select i1 %10, i32 %8, i32 0
br label %12
12: ; preds = %6, %4
%13 = phi i32 [ %5, %4 ], [ %11, %6 ]
%14 = sitofp i32 %13 to float
ret float %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Hello world!!\n");
  return 2;
}


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>
mov    $0x2,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [14 x i8] c"Hello world!!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ find(char *);
void find_index_medium_test() {
  find("benchmarks"
       ".index.medium");
}


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"benchmarks.index.medium\00"
define void @find_index_medium_test() {
%1 = call i32 @find(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"benchmarks.index.medium\00"
define void @find_index_medium_test() {
%1 = tail call i32 @find(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CmdLO_Get(char *);
double atof(int /*<<< orphan*/);
double CmdLO_GetDouble(char *name) { return atof(CmdLO_Get(name)); }


x86 assembly (clang, -O0):
<CmdLO_GetDouble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <CmdLO_Get@plt>
mov    %eax,%edi
call   1030 <atof@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CmdLO_GetDouble>:
push   %rax
call   1040 <CmdLO_Get@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <atof@plt>

LLVM IR (-O0):
define double @CmdLO_GetDouble(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @CmdLO_Get(i8* %3)
%5 = call double @atof(i32 %4)
ret double %5
}

LLVM IR (-O2):
define double @CmdLO_GetDouble(i8* %0) {
%2 = tail call i32 @CmdLO_Get(i8* %0)
%3 = tail call double @atof(i32 %2)
ret double %3
}
/* Variables and functions */
int roadmap_verbosity();
int roadmap_log_enabled(int level, char *source, int line) {
  return (level >= roadmap_verbosity());
}


x86 assembly (clang, -O0):
<roadmap_log_enabled>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <roadmap_verbosity@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
cmp    %ecx,%eax
setge  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<roadmap_log_enabled>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <roadmap_verbosity@plt>
xor    %ecx,%ecx
cmp    %ebx,%eax
setle  %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @roadmap_log_enabled(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = call i32 (...) @roadmap_verbosity()
%9 = icmp sge i32 %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @roadmap_log_enabled(i32 %0, i8* nocapture readnone %1, i32 %2) {
%4 = tail call i32 (...) @roadmap_verbosity()
%5 = icmp sle i32 %4, %0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
scalar_t__ __xsi_strerror_r(int, char *, size_t);
scalar_t__ errno;
char *__gnu_strerror_r(int errnum, char *buf, size_t buflen) {
  errno = __xsi_strerror_r(errnum, buf, buflen);
  return errno ? NULL : buf;
}


x86 assembly (clang, -O0):
<__gnu_strerror_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <__xsi_strerror_r@plt>
mov    %rax,%rcx
mov    0x2ea3(%rip),%rax
mov    %rcx,(%rax)
mov    0x2e99(%rip),%rax
cmpq   $0x0,(%rax)
je     115c <__gnu_strerror_r+0x4c>
xor    %eax,%eax
mov    %rax,-0x20(%rbp)
jmp    1164 <__gnu_strerror_r+0x54>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__gnu_strerror_r>:
push   %rbx
mov    %rsi,%rbx
call   1030 <__xsi_strerror_r@plt>
mov    0x2ec0(%rip),%rcx
mov    %rax,(%rcx)
xor    %ecx,%ecx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@errno = global i64 0
define i8* @__gnu_strerror_r(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i64 @__xsi_strerror_r(i32 %7, i8* %8, i64 %9)
store i64 %10, i64* @errno
%11 = load i64, i64* @errno
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %3
br label %16
14: ; preds = %3
%15 = load i8*, i8** %5
br label %16
16: ; preds = %14, %13
%17 = phi i8* [ null, %13 ], [ %15, %14 ]
ret i8* %17
}

LLVM IR (-O2):
@errno = global i64 0
define i8* @__gnu_strerror_r(i32 %0, i8* %1, i64 %2) {
%4 = tail call i64 @__xsi_strerror_r(i32 %0, i8* %1, i64 %2)
store i64 %4, i64* @errno
%5 = icmp eq i64 %4, 0
%6 = select i1 %5, i8* %1, i8* null
ret i8* %6
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
int32_t slt(int32_t reg1, int32_t reg2) {
  if (reg1 < reg2) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<slt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    1127 <slt+0x27>
movq   $0x1,-0x8(%rbp)
jmp    112f <slt+0x2f>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<slt>:
xor    %eax,%eax
cmp    %rsi,%rdi
setl   %al
ret

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

LLVM IR (-O2):
define i64 @slt(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = zext i1 %3 to i64
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void critical(char *s) {
  printf("Critical error: %s\n", s);
  exit(1);
}


x86 assembly (clang, -O0):
<critical>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<critical>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Critical error: %s\0A\00"
define void @critical(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [20 x i8] c"Critical error: %s\0A\00"
define void @critical(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ execve(char *, char **, int /*<<< orphan*/ *);
__attribute__((constructor)) void init() {
  char *f[] = {"/bin/sh", NULL};
  execve("/bin/sh", f, NULL);
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2cf1(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0x2cee(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    -0x10(%rbp),%rsi
lea    0xec7(%rip),%rdi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <execve@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
sub    $0x18,%rsp
movaps 0x2cf5(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xeda(%rip),%rdi
mov    %rsp,%rsi
xor    %edx,%edx
call   1030 <execve@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"/bin/sh\00"
@__const.init.f = [2 x i8*] [i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i32 0, i32 0), i8* null]
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @init, i8* null }]
define void @init() {
%1 = alloca [2 x i8*]
%2 = bitcast [2 x i8*]* %1 to i8*
%3 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 0
%4 = call i32 @execve(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %3, i32* null)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"/bin/sh\00"
@__const.init.f = [2 x i8*] [i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i32 0, i32 0), i8* null]
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @init, i8* null }]
define void @init() {
%1 = alloca [2 x i8*]
%2 = bitcast [2 x i8*]* %1 to i8*
%3 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 0
%4 = call i32 @execve(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %3, i32* null)
ret void
}
void updateMovieTitle(unsigned int movieID, char *title) { return; }


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

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

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

LLVM IR (-O2):
define void @updateMovieTitle(i32 %0, i8* nocapture %1) {
ret void
}
void gtk_text_iter_forward_search() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_iter_forward_search() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void p(char c, int n) {
  while (n--)
    putchar(c);
}


x86 assembly (clang, -O0):
<p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     1143 <p+0x33>
movsbl -0x1(%rbp),%edi
call   1030 <putchar@plt>
jmp    1121 <p+0x11>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<p>:
push   %rbp
push   %rbx
push   %rax
test   %esi,%esi
je     112c <p+0x1c>
mov    %esi,%ebx
movsbl %dil,%ebp
nopl   (%rax)
mov    %ebp,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <p+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @p(i8 signext %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %1, %2 ]
%6 = add nsw i32 %5, -1
%7 = tail call i32 @putchar(i8 signext %0)
%8 = icmp eq i32 %6, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
ret void
}
void X509_PUBKEY_new(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_PUBKEY_new() {
ret void
}
void security_skb_set_owner_w(struct sk_buff *skb, struct sock *sk) {}


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

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

LLVM IR (-O0):
%struct.sk_buff = type opaque
%struct.sock = type opaque
define void @security_skb_set_owner_w(%struct.sk_buff* %0, %struct.sock* %1) {
%3 = alloca %struct.sk_buff*
%4 = alloca %struct.sock*
store %struct.sk_buff* %0, %struct.sk_buff** %3
store %struct.sock* %1, %struct.sock** %4
ret void
}

LLVM IR (-O2):
%struct.sk_buff = type opaque
%struct.sock = type opaque
define void @security_skb_set_owner_w(%struct.sk_buff* nocapture %0, %struct.sock* nocapture %1) {
ret void
}
int something_somethingnine(int something) {
  int sum = 0;
  sum += something * 10;
  sum += 56;
  return sum;
}


x86 assembly (clang, -O0):
<something_somethingnine>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
imul   $0xa,-0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x38,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<something_somethingnine>:
lea    (%rdi,%rdi,4),%eax
add    %eax,%eax
add    $0x38,%eax
ret

LLVM IR (-O0):
define i32 @something_somethingnine(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = mul nsw i32 %4, 10
%6 = load i32, i32* %3
%7 = add nsw i32 %6, %5
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 56
store i32 %9, i32* %3
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @something_somethingnine(i32 %0) {
%2 = mul nsw i32 %0, 10
%3 = add nsw i32 %2, 56
ret i32 %3
}
void copia(char *dest, char *sorg) {
  int i = 0;
  while (sorg[i] != '\0') {
    *dest = sorg[i];
    dest++;
    i++;
  }
  *dest = '\0';
}


x86 assembly (clang, -O0):
<copia>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1153 <copia+0x53>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <copia+0x13>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<copia>:
mov    (%rsi),%al
test   %al,%al
je     1121 <copia+0x21>
add    $0x1,%rsi
nopw   0x0(%rax,%rax,1)
mov    %al,(%rdi)
add    $0x1,%rdi
movzbl (%rsi),%eax
add    $0x1,%rsi
test   %al,%al
jne    1110 <copia+0x10>
movb   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @copia(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %10, %5 ], [ 0, %2 ]
%7 = phi i8 [ %12, %5 ], [ %3, %2 ]
%8 = phi i8* [ %9, %5 ], [ %0, %2 ]
store i8 %7, i8* %8
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = add nuw nsw i64 %6, 1
%11 = getelementptr inbounds i8, i8* %1, i64 %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %2
%15 = phi i8* [ %0, %2 ], [ %9, %5 ]
store i8 0, i8* %15
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LC_ALL;
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
int main() {
  setlocale(LC_ALL, "");
  char string[100];
  gets(string);
  printf("Gets: %s", string);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
lea    0xeb9(%rip),%rsi
call   1050 <setlocale@plt>
lea    -0x70(%rbp),%rdi
call   1040 <gets@plt>
lea    -0x70(%rbp),%rsi
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
lea    0xec3(%rip),%rsi
call   1050 <setlocale@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <gets@plt>
lea    0xea4(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.1 = [9 x i8] c"Gets: %s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
store i32 0, i32* %1
%3 = load i32, i32* @LC_ALL
%4 = call i32 @setlocale(i32 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%6 = call i32 @gets(i8* %5)
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%8 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %7)
ret i32 0
}

LLVM IR (-O2):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.1 = [9 x i8] c"Gets: %s\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = load i32, i32* @LC_ALL
%3 = tail call i32 @setlocale(i32 %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%5 = call i32 @gets(i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
void __DSVERIFIER_assert(int expression) { __VERIFIER_assert(expression); }


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

x86 assembly (clang, -O2):
<__DSVERIFIER_assert>:
jmp    1030 <__VERIFIER_assert@plt>

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

LLVM IR (-O2):
define void @__DSVERIFIER_assert(i32 %0) {
%2 = tail call i32 @__VERIFIER_assert(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ failure();
void handle_sigabrt(int sig_num) { failure(); }


x86 assembly (clang, -O0):
<handle_sigabrt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <failure@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @handle_sigabrt(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @failure()
ret void
}

LLVM IR (-O2):
define void @handle_sigabrt(i32 %0) {
%2 = tail call i32 (...) @failure()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vid_poke(int, int, char, int);
void vid_clear_row(int row) {
  for (int col = 0; col < 80; col++)
    vid_poke(row, col, ' ', 0x07);
}


x86 assembly (clang, -O0):
<vid_clear_row>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x50,-0x8(%rbp)
jge    114f <vid_clear_row+0x3f>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x20,%edx
mov    $0x7,%ecx
call   1030 <vid_poke@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <vid_clear_row+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vid_clear_row>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
mov    %ebx,%edi
mov    %ebp,%esi
mov    $0x20,%edx
mov    $0x7,%ecx
call   1030 <vid_poke@plt>
add    $0x1,%ebp
cmp    $0x50,%ebp
jne    1120 <vid_clear_row+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @vid_clear_row(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %11, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 80
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = call i32 @vid_poke(i32 %8, i32 %9, i8 signext 32, i32 7)
br label %11
11: ; preds = %7
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
br label %4
14: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @vid_clear_row(i32 %0) {
br label %3
2: ; preds = %3
ret void
3: ; preds = %1, %3
%4 = phi i32 [ 0, %1 ], [ %6, %3 ]
%5 = tail call i32 @vid_poke(i32 %0, i32 %4, i8 signext 32, i32 7)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, 80
br i1 %7, label %2, label %3
}
int test_imm_BBuint32_reg(unsigned int val) {
  return ((val) & (0xBB << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_BBuint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0xbb,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_BBuint32_reg>:
test   $0xbb,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_BBuint32_reg(i32 %0) {
%2 = and i32 %0, 187
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
float glmDotProduct3f(float const *, float const *);
float glmComputeDistanceToPlane3f(const float planeOrigin[3],
                                  const float planeNormal[3],
                                  const float p[3]) {
  return glmDotProduct3f(planeNormal, p) -
         glmDotProduct3f(planeNormal, planeOrigin);
}


x86 assembly (clang, -O0):
<glmComputeDistanceToPlane3f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <glmDotProduct3f@plt>
movss  %xmm0,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <glmDotProduct3f@plt>
movaps %xmm0,%xmm1
movss  -0x1c(%rbp),%xmm0
subss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmComputeDistanceToPlane3f>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1030 <glmDotProduct3f@plt>
movss  %xmm0,0x4(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <glmDotProduct3f@plt>
movss  0x4(%rsp),%xmm1
subss  %xmm0,%xmm1
movaps %xmm1,%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define float @glmComputeDistanceToPlane3f(float* %0, float* %1, float* %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float*
store float* %0, float** %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load float*, float** %5
%8 = load float*, float** %6
%9 = call float @glmDotProduct3f(float* %7, float* %8)
%10 = load float*, float** %5
%11 = load float*, float** %4
%12 = call float @glmDotProduct3f(float* %10, float* %11)
%13 = fsub float %9, %12
ret float %13
}

LLVM IR (-O2):
define float @glmComputeDistanceToPlane3f(float* %0, float* %1, float* %2) {
%4 = tail call float @glmDotProduct3f(float* %1, float* %2)
%5 = tail call float @glmDotProduct3f(float* %1, float* %0)
%6 = fsub float %4, %5
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  float a, b, c;
  a = 1e10;
  b = 1e-10;
  c = b;
  c = c + a;
  c = c - a;
  printf("%d\n", c == b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xedd(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xecc(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xe8a(%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
xor    %esi,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
store float 1.000000e+10, float* %2
store float 0x3DDB7CDFE0000000, float* %3
%5 = load float, float* %3
store float %5, float* %4
%6 = load float, float* %4
%7 = load float, float* %2
%8 = fadd float %6, %7
store float %8, float* %4
%9 = load float, float* %4
%10 = load float, float* %2
%11 = fsub float %9, %10
store float %11, float* %4
%12 = load float, float* %4
%13 = load float, float* %3
%14 = fcmp oeq float %12, %13
%15 = zext i1 %14 to i32
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 0
}
int vde_chain_nm10_alloc(void **mem, const int *idata, const double *rdata) {
  if (mem)
    *mem = 0;
  (void)idata;
  (void)rdata;
  return 0;
}


x86 assembly (clang, -O0):
<vde_chain_nm10_alloc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1126 <vde_chain_nm10_alloc+0x26>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vde_chain_nm10_alloc>:
test   %rdi,%rdi
je     110c <vde_chain_nm10_alloc+0xc>
movq   $0x0,(%rdi)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @vde_chain_nm10_alloc(i8** writeonly %0, i32* nocapture readnone %1, double* nocapture readnone %2) {
%4 = icmp eq i8** %0, null
br i1 %4, label %6, label %5
5: ; preds = %3
store i8* null, i8** %0
br label %6
6: ; preds = %5, %3
ret i32 0
}
/* Variables and functions */
int my_objectivec_function(int /*<<< orphan*/ *, char *, int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  char *b = "Hi C";
  printf("ObjCFromC: %d\n", my_objectivec_function(NULL, b, 96));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edi
mov    $0x60,%edx
call   1040 <my_objectivec_function@plt>
mov    %eax,%esi
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rsi
xor    %edi,%edi
mov    $0x60,%edx
call   1040 <my_objectivec_function@plt>
lea    0xeca(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"Hi C\00"
@.str.1 = [15 x i8] c"ObjCFromC: %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @my_objectivec_function(i32* null, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 96)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}