xunge/DecIR huggingface dataset:
/* Variables and functions */
int StdOutM__StdOut__print(char const *);
int TestAppP__StdOut__print(const char *str) {
  int result;
  result = StdOutM__StdOut__print(str);
  return result;
}


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

x86 assembly (clang, -O2):
<TestAppP__StdOut__print>:
jmp    1030 <StdOutM__StdOut__print@plt>

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

LLVM IR (-O2):
define i32 @TestAppP__StdOut__print(i8* %0) {
%2 = tail call i32 @StdOutM__StdOut__print(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float raio;
  printf("Raio do circulo: ");
  scanf("%f", &raio);
  printf("Area: %f\n", 3.141592 * raio * raio);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xea2(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
lea    0xea7(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeae(%rip),%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
lea    0xebc(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Raio do circulo: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [10 x i8] c"Area: %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 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), float* %2)
%5 = load float, float* %2
%6 = fpext float %5 to double
%7 = fmul double 0x400921FAFC8B007A, %6
%8 = load float, float* %2
%9 = fpext float %8 to double
%10 = fmul double %7, %9
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"Raio do circulo: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [10 x i8] c"Area: %f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 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), float* %1)
%5 = load float, float* %1
%6 = fpext float %5 to double
%7 = fmul double %6, 0x400921FAFC8B007A
%8 = fmul double %7, %6
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ so3_quat2rot(double const *, double *);
int /*<<< orphan*/ so3_rot2rph(double *, double *);
void so3_quat2rph(const double q[4], double rph[3]) {
  double R[9];
  so3_quat2rot(q, R);
  so3_rot2rph(R, rph);
}


x86 assembly (clang, -O0):
<so3_quat2rph>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x60(%rbp),%rsi
call   1040 <so3_quat2rot@plt>
lea    -0x60(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <so3_rot2rph@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<so3_quat2rph>:
push   %r14
push   %rbx
sub    $0x48,%rsp
mov    %rsi,%rbx
mov    %rsp,%r14
mov    %r14,%rsi
call   1040 <so3_quat2rot@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <so3_rot2rph@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @so3_quat2rph(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca [9 x double]
store double* %0, double** %3
store double* %1, double** %4
%6 = load double*, double** %3
%7 = getelementptr inbounds [9 x double], [9 x double]* %5, i64 0, i64 0
%8 = call i32 @so3_quat2rot(double* %6, double* %7)
%9 = getelementptr inbounds [9 x double], [9 x double]* %5, i64 0, i64 0
%10 = load double*, double** %4
%11 = call i32 @so3_rot2rph(double* %9, double* %10)
ret void
}

LLVM IR (-O2):
define void @so3_quat2rph(double* %0, double* %1) {
%3 = alloca [9 x double]
%4 = bitcast [9 x double]* %3 to i8*
%5 = getelementptr inbounds [9 x double], [9 x double]* %3, i64 0, i64 0
%6 = call i32 @so3_quat2rot(double* %0, double* %5)
%7 = call i32 @so3_rot2rph(double* %5, double* %1)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef size_t uint16_t;

/* Variables and functions */
uint16_t string_findlen(const uint8_t *s) {
  uint16_t i = 0, j = 0;
  while (s[i])
    if ((s[i++] & 0xC0) != 0x80)
      j++;
  return j;
}


x86 assembly (clang, -O0):
<string_findlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     1161 <string_findlen+0x61>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    (%rax,%rcx,4),%eax
and    $0xc0,%eax
cmp    $0x80,%eax
je     115c <string_findlen+0x5c>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1118 <string_findlen+0x18>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_findlen>:
mov    (%rdi),%ecx
test   %ecx,%ecx
je     112f <string_findlen+0x2f>
add    $0x4,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
and    $0xc0,%ecx
xor    %edx,%edx
cmp    $0x80,%ecx
setne  %dl
add    %rdx,%rax
mov    (%rdi),%ecx
add    $0x4,%rdi
test   %ecx,%ecx
jne    1110 <string_findlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @string_findlen(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %14, %4 ], [ %2, %1 ]
%6 = phi i64 [ %12, %4 ], [ 0, %1 ]
%7 = phi i64 [ %8, %4 ], [ 0, %1 ]
%8 = add i64 %7, 1
%9 = and i32 %5, 192
%10 = icmp ne i32 %9, 128
%11 = zext i1 %10 to i64
%12 = add i64 %6, %11
%13 = getelementptr inbounds i32, i32* %0, i64 %8
%14 = load i32, i32* %13
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %4
16: ; preds = %4, %1
%17 = phi i64 [ 0, %1 ], [ %12, %4 ]
ret i64 %17
}
/* Type definitions */
typedef int /*<<< orphan*/ expanded;

/* Variables and functions */
int /*<<< orphan*/ b_gets(int, char *);
int /*<<< orphan*/ b_lineid(int);
int expand(char *, char *, int);
int /*<<< orphan*/ ins_text(int, int /*<<< orphan*/, int, char *);
void insert(int row, int line) {
  int nsegs;
  char buf[1000 - 1], expanded[1000 + 100];
  b_gets(line, buf);
  nsegs = expand(expanded, buf, sizeof(expanded));
  ins_text(row, b_lineid(line), nsegs, expanded);
}


x86 assembly (clang, -O0):
<insert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x860,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x400(%rbp),%rsi
call   1040 <b_gets@plt>
lea    -0x850(%rbp),%rdi
lea    -0x400(%rbp),%rsi
mov    $0x44c,%edx
call   1060 <expand@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x854(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <b_lineid@plt>
mov    -0x854(%rbp),%edi
mov    %eax,%esi
mov    -0xc(%rbp),%edx
lea    -0x850(%rbp),%rcx
call   1050 <ins_text@plt>
add    $0x860,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<insert>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x848,%rsp
mov    %esi,%ebx
mov    %edi,%r14d
mov    %rsp,%rbp
mov    %esi,%edi
mov    %rbp,%rsi
call   1040 <b_gets@plt>
lea    0x3f0(%rsp),%r15
mov    %r15,%rdi
mov    %rbp,%rsi
mov    $0x44c,%edx
call   1060 <expand@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <b_lineid@plt>
mov    %r14d,%edi
mov    %eax,%esi
mov    %ebp,%edx
mov    %r15,%rcx
call   1050 <ins_text@plt>
add    $0x848,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @insert(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [999 x i8]
%7 = alloca [1100 x i8]
store i32 %0, i32* %3
store i32 %1, i32* %4
%8 = load i32, i32* %4
%9 = getelementptr inbounds [999 x i8], [999 x i8]* %6, i64 0, i64 0
%10 = call i32 @b_gets(i32 %8, i8* %9)
%11 = getelementptr inbounds [1100 x i8], [1100 x i8]* %7, i64 0, i64 0
%12 = getelementptr inbounds [999 x i8], [999 x i8]* %6, i64 0, i64 0
%13 = call i32 @expand(i8* %11, i8* %12, i32 1100)
store i32 %13, i32* %5
%14 = load i32, i32* %3
%15 = load i32, i32* %4
%16 = call i32 @b_lineid(i32 %15)
%17 = load i32, i32* %5
%18 = getelementptr inbounds [1100 x i8], [1100 x i8]* %7, i64 0, i64 0
%19 = call i32 @ins_text(i32 %14, i32 %16, i32 %17, i8* %18)
ret void
}

LLVM IR (-O2):
define void @insert(i32 %0, i32 %1) {
%3 = alloca [999 x i8]
%4 = alloca [1100 x i8]
%5 = getelementptr inbounds [999 x i8], [999 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [1100 x i8], [1100 x i8]* %4, i64 0, i64 0
%7 = call i32 @b_gets(i32 %1, i8* %5)
%8 = call i32 @expand(i8* %6, i8* %5, i32 1100)
%9 = call i32 @b_lineid(i32 %1)
%10 = call i32 @ins_text(i32 %0, i32 %9, i32 %8, i8* %6)
ret void
}
double subtract(double x, double y) { return x - y; }


x86 assembly (clang, -O0):
<subtract>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<subtract>:
subsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @subtract(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* %4
%7 = fsub double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @subtract(double %0, double %1) {
%3 = fsub double %0, %1
ret double %3
}
int sort_comp_tuple_rev(const void *p1, const void *p2) {
  return *((int *)p2) - *((int *)p1);
}


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

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

LLVM IR (-O0):
define i32 @sort_comp_tuple_rev(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %3
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @sort_comp_tuple_rev(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %0 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
void ff_hevc_put_hevc_bi_w_pel_pixels4_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_pel_pixels4_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *, char *);
int main(void) {
  char ch_1, ch_2;
  printf("enter\n");
  scanf("%c %c", &ch_1, &ch_2);
  printf("sum: %d\n", (int)(ch_1 - 48 + ch_2 - 48));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
lea    -0x5(%rbp),%rsi
lea    -0x6(%rbp),%rdx
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%esi
sub    $0x30,%esi
movsbl -0x6(%rbp),%eax
add    %eax,%esi
sub    $0x30,%esi
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed7(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
lea    0x7(%rsp),%rsi
lea    0x6(%rsp),%rdx
call   1050 <scanf@plt>
movsbl 0x7(%rsp),%eax
movsbl 0x6(%rsp),%ecx
lea    (%rax,%rcx,1),%esi
add    $0xffffffa0,%esi
lea    0xe9c(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"enter\0A\00"
@.str.1 = [6 x i8] c"%c %c\00"
@.str.2 = [9 x i8] c"sum: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %2, i8* %3)
%6 = load i8, i8* %2
%7 = sext i8 %6 to i32
%8 = sub nsw i32 %7, 48
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = add nsw i32 %8, %10
%12 = sub nsw i32 %11, 48
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"%c %c\00"
@.str.2 = [9 x i8] c"sum: %d\0A\00"
@str = [6 x i8] c"enter\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i8
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %1, i8* %2)
%5 = load i8, i8* %1
%6 = sext i8 %5 to i32
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = add nsw i32 %6, -96
%10 = add nsw i32 %9, %8
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int counter;
  counter = 0;
  while (counter < 5)
    printf("x %d square %d\n", counter, ((++counter) * (++counter)));
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    1159 <main+0x49>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
add    $0x1,%edx
mov    %edx,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
imul   %eax,%edx
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x2,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0xc,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x1e,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"x %d square %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 5
br i1 %5, label %6, label %14
6: ; preds = %3
%7 = load i32, i32* %2
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 1
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
%12 = mul nsw i32 %9, %11
%13 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %12)
br label %3
14: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"x %d square %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 0, i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 2, i32 12)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 4, i32 30)
ret i32 0
}
/* Type definitions */
struct snd_kcontrol {
  int dummy;
};

/* Variables and functions */
int _snd_ctl_add_slave(struct snd_kcontrol *, struct snd_kcontrol *,
                       int /*<<< orphan*/);
int snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave) {
  return _snd_ctl_add_slave(master, slave, 0);
}


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

x86 assembly (clang, -O2):
<snd_ctl_add_slave>:
xor    %edx,%edx
jmp    1030 <_snd_ctl_add_slave@plt>

LLVM IR (-O0):
%struct.snd_kcontrol = type { i32 }
define i32 @snd_ctl_add_slave(%struct.snd_kcontrol* %0, %struct.snd_kcontrol* %1) {
%3 = alloca %struct.snd_kcontrol*
%4 = alloca %struct.snd_kcontrol*
store %struct.snd_kcontrol* %0, %struct.snd_kcontrol** %3
store %struct.snd_kcontrol* %1, %struct.snd_kcontrol** %4
%5 = load %struct.snd_kcontrol*, %struct.snd_kcontrol** %3
%6 = load %struct.snd_kcontrol*, %struct.snd_kcontrol** %4
%7 = call i32 @_snd_ctl_add_slave(%struct.snd_kcontrol* %5, %struct.snd_kcontrol* %6, i32 0)
ret i32 %7
}

LLVM IR (-O2):
%struct.snd_kcontrol = type { i32 }
define i32 @snd_ctl_add_slave(%struct.snd_kcontrol* %0, %struct.snd_kcontrol* %1) {
%3 = tail call i32 @_snd_ctl_add_slave(%struct.snd_kcontrol* %0, %struct.snd_kcontrol* %1, i32 0)
ret i32 %3
}
/* Type definitions */
struct queue_message {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct queue_message *);
void message_free(struct queue_message *qm) { free(qm); }


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

x86 assembly (clang, -O2):
<message_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.queue_message = type { i32 }
define void @message_free(%struct.queue_message* %0) {
%2 = alloca %struct.queue_message*
store %struct.queue_message* %0, %struct.queue_message** %2
%3 = load %struct.queue_message*, %struct.queue_message** %2
%4 = call i32 @free(%struct.queue_message* %3)
ret void
}

LLVM IR (-O2):
%struct.queue_message = type { i32 }
define void @message_free(%struct.queue_message* nocapture %0) {
%2 = tail call i32 @free(%struct.queue_message* %0)
ret void
}
/* Variables and functions */
int string_pack_length(char **packed) {
  char **p;
  for (p = packed; *p != NULL; p++)
    ;
  return p - packed;
}


x86 assembly (clang, -O0):
<string_pack_length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     1134 <string_pack_length+0x34>
jmp    1123 <string_pack_length+0x23>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <string_pack_length+0x10>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
sar    $0x3,%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @string_pack_length(i8** %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8** [ %0, %1 ], [ %6, %2 ]
%4 = load i8*, i8** %3
%5 = icmp eq i8* %4, null
%6 = getelementptr inbounds i8*, i8** %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i8** %3 to i64
%9 = ptrtoint i8** %0 to i64
%10 = sub i64 %8, %9
%11 = lshr exact i64 %10, 3
%12 = trunc i64 %11 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
void outUnsigned(unsigned *x) {
  if (x)
    printf("%u ", *x);
}


x86 assembly (clang, -O0):
<outUnsigned>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1139 <outUnsigned+0x29>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outUnsigned>:
test   %rdi,%rdi
je     1123 <outUnsigned+0x13>
mov    (%rdi),%esi
lea    0xee2(%rip),%rdi
jmp    1030 <printf@plt>
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%u \00"
define void @outUnsigned(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = icmp ne i32* %3, null
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32*, i32** %2
%7 = load i32, i32* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %9
9: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%u \00"
define void @outUnsigned(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = load i32, i32* %0
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
br label %6
6: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int /*<<< orphan*/ rewinddir(int /*<<< orphan*/ *);
void _rewinddir(void *vp) {
  DIR *dp = (DIR *)vp;
  rewinddir(dp);
}


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

x86 assembly (clang, -O2):
<_rewinddir>:
jmp    1030 <rewinddir@plt>

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

LLVM IR (-O2):
define void @_rewinddir(i8* %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 @rewinddir(i32* %2)
ret void
}
void RTStrAAppendTag(void) {}


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

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

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

LLVM IR (-O2):
define void @RTStrAAppendTag() {
ret void
}
void gtk_icon_view_get_column_spacing() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ __list_splice_u(struct list_head_u *, struct list_head_u *);
int /*<<< orphan*/ list_empty_u(struct list_head_u *);
void list_splice_u(struct list_head_u *list, struct list_head_u *head) {
  if (!list_empty_u(list))
    __list_splice_u(list, head);
}


x86 assembly (clang, -O0):
<list_splice_u>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <list_empty_u@plt>
cmp    $0x0,%eax
jne    114f <list_splice_u+0x2f>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <__list_splice_u@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_splice_u>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <list_empty_u@plt>
test   %eax,%eax
je     113b <list_splice_u+0x1b>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <__list_splice_u@plt>

LLVM IR (-O0):
%struct.list_head_u = type { i32 }
define void @list_splice_u(%struct.list_head_u* %0, %struct.list_head_u* %1) {
%3 = alloca %struct.list_head_u*
%4 = alloca %struct.list_head_u*
store %struct.list_head_u* %0, %struct.list_head_u** %3
store %struct.list_head_u* %1, %struct.list_head_u** %4
%5 = load %struct.list_head_u*, %struct.list_head_u** %3
%6 = call i32 @list_empty_u(%struct.list_head_u* %5)
%7 = icmp ne i32 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %2
%9 = load %struct.list_head_u*, %struct.list_head_u** %3
%10 = load %struct.list_head_u*, %struct.list_head_u** %4
%11 = call i32 @__list_splice_u(%struct.list_head_u* %9, %struct.list_head_u* %10)
br label %12
12: ; preds = %8, %2
ret void
}

LLVM IR (-O2):
%struct.list_head_u = type { i32 }
define void @list_splice_u(%struct.list_head_u* %0, %struct.list_head_u* %1) {
%3 = tail call i32 @list_empty_u(%struct.list_head_u* %0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @__list_splice_u(%struct.list_head_u* %0, %struct.list_head_u* %1)
br label %7
7: ; preds = %5, %2
ret void
}
/* Variables and functions */
long multiples_three_five(int);
int /*<<< orphan*/ printf(char *, float);
float timeit();
int main(int argc, char *argv[]) {
  float start = timeit();
  long ans = multiples_three_five(1000);
  float stop = timeit();
  printf("Answer: %ld\n", ans);
  printf("Time: %.8f\n", stop - start);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <timeit@plt>
movss  %xmm0,-0x14(%rbp)
mov    $0x3e8,%edi
call   1050 <multiples_three_five@plt>
mov    %rax,-0x20(%rbp)
mov    $0x0,%al
call   1040 <timeit@plt>
movss  %xmm0,-0x24(%rbp)
cvtsi2ssq -0x20(%rbp),%xmm0
lea    0xe87(%rip),%rdi
call   1030 <printf@plt>
movss  -0x24(%rbp),%xmm0
subss  -0x14(%rbp),%xmm0
lea    0xe7e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
xor    %eax,%eax
call   1040 <timeit@plt>
movss  %xmm0,0xc(%rsp)
mov    $0x3e8,%edi
call   1050 <multiples_three_five@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1040 <timeit@plt>
movss  %xmm0,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ss %rbx,%xmm0
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
movss  0x8(%rsp),%xmm0
subss  0xc(%rsp),%xmm0
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Answer: %ld\0A\00"
@.str.1 = [12 x i8] c"Time: %.8f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
%7 = alloca i64
%8 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call float (...) @timeit()
store float %9, float* %6
%10 = call i64 @multiples_three_five(i32 1000)
store i64 %10, i64* %7
%11 = call float (...) @timeit()
store float %11, float* %8
%12 = load i64, i64* %7
%13 = sitofp i64 %12 to float
%14 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), float %13)
%15 = load float, float* %8
%16 = load float, float* %6
%17 = fsub float %15, %16
%18 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), float %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Answer: %ld\0A\00"
@.str.1 = [12 x i8] c"Time: %.8f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call float (...) @timeit()
%4 = tail call i64 @multiples_three_five(i32 1000)
%5 = tail call float (...) @timeit()
%6 = sitofp i64 %4 to float
%7 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), float %6)
%8 = fsub float %5, %3
%9 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), float %8)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ TimerMillisec();
uint64_t TimerCount() { return TimerMillisec(); }


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

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

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

LLVM IR (-O2):
define i32 @TimerCount() {
%1 = tail call i32 (...) @TimerMillisec()
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ curr_path;

/* Variables and functions */
int chdir(char const *);
char *get_cwd(char *, int);
scalar_t__ stroscmp(char *, char const *);
int vifm_chdir(const char path[]) {
  char curr_path[4096];
  if (get_cwd(curr_path, sizeof(curr_path)) == curr_path) {
    if (stroscmp(curr_path, path) == 0) {
      return 0;
    }
  }
  return chdir(path);
}


x86 assembly (clang, -O0):
<vifm_chdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1010,%rsp
mov    %rdi,-0x10(%rbp)
lea    -0x1010(%rbp),%rdi
mov    $0x1000,%esi
call   1030 <get_cwd@plt>
lea    -0x1010(%rbp),%rcx
cmp    %rcx,%rax
jne    118b <vifm_chdir+0x5b>
lea    -0x1010(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <stroscmp@plt>
cmp    $0x0,%rax
jne    1186 <vifm_chdir+0x56>
movl   $0x0,-0x4(%rbp)
jmp    1197 <vifm_chdir+0x67>
jmp    118b <vifm_chdir+0x5b>
mov    -0x10(%rbp),%rdi
call   1040 <chdir@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1010,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vifm_chdir>:
push   %r14
push   %rbx
sub    $0x1008,%rsp
mov    %rdi,%r14
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1000,%esi
call   1030 <get_cwd@plt>
cmp    %rbx,%rax
jne    1162 <vifm_chdir+0x32>
mov    %rsp,%rdi
mov    %r14,%rsi
call   1050 <stroscmp@plt>
test   %rax,%rax
je     1175 <vifm_chdir+0x45>
mov    %r14,%rdi
call   1040 <chdir@plt>
add    $0x1008,%rsp
pop    %rbx
pop    %r14
ret
xor    %eax,%eax
jmp    116a <vifm_chdir+0x3a>

LLVM IR (-O0):
define i32 @vifm_chdir(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca [4096 x i8]
store i8* %0, i8** %3
%5 = getelementptr inbounds [4096 x i8], [4096 x i8]* %4, i64 0, i64 0
%6 = call i8* @get_cwd(i8* %5, i32 4096)
%7 = getelementptr inbounds [4096 x i8], [4096 x i8]* %4, i64 0, i64 0
%8 = icmp eq i8* %6, %7
br i1 %8, label %9, label %16
9: ; preds = %1
%10 = getelementptr inbounds [4096 x i8], [4096 x i8]* %4, i64 0, i64 0
%11 = load i8*, i8** %3
%12 = call i64 @stroscmp(i8* %10, i8* %11)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %9
store i32 0, i32* %2
br label %19
15: ; preds = %9
br label %16
16: ; preds = %15, %1
%17 = load i8*, i8** %3
%18 = call i32 @chdir(i8* %17)
store i32 %18, i32* %2
br label %19
19: ; preds = %16, %14
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @vifm_chdir(i8* %0) {
%2 = alloca [4096 x i8]
%3 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 0
%4 = call i8* @get_cwd(i8* %3, i32 4096)
%5 = icmp eq i8* %4, %3
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = call i64 @stroscmp(i8* %3, i8* %0)
%8 = icmp eq i64 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %6, %1
%10 = call i32 @chdir(i8* %0)
br label %11
11: ; preds = %6, %9
%12 = phi i32 [ %10, %9 ], [ 0, %6 ]
ret i32 %12
}
int main(int argc, char *argv[]) {
  int nbreEtudiants;
  return 0;
}


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

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

LLVM IR (-O0):
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
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
const uint8_t *get_transport4(const uint8_t *b, uint32_t blen) {
  return b + 20;
}


x86 assembly (clang, -O0):
<get_transport4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x50,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_transport4>:
lea    0x50(%rdi),%rax
ret

LLVM IR (-O0):
define i32* @get_transport4(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 = getelementptr inbounds i32, i32* %5, i64 20
ret i32* %6
}

LLVM IR (-O2):
define i32* @get_transport4(i32* readnone %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 20
ret i32* %3
}
void prepend_void(void) {}


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

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

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

LLVM IR (-O2):
define void @prepend_void() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ srand(unsigned int);
scalar_t__ time(int /*<<< orphan*/ *);
void set_random(void) {
  time_t t;
  srand((unsigned)time(&t));
}


x86 assembly (clang, -O0):
<set_random>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_random>:
push   %rax
lea    0x4(%rsp),%rdi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @set_random() {
%1 = alloca i32
%2 = call i64 @time(i32* %1)
%3 = trunc i64 %2 to i32
%4 = call i32 @srand(i32 %3)
ret void
}

LLVM IR (-O2):
define void @set_random() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i64 @time(i32* %1)
%4 = trunc i64 %3 to i32
%5 = call i32 @srand(i32 %4)
ret void
}
/* Variables and functions */
char itoc(int);
char check_digit(const unsigned int count) {
  return itoc((10 - (count % 10)) % 10);
}


x86 assembly (clang, -O0):
<check_digit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
xor    %edx,%edx
div    %ecx
mov    $0xa,%eax
sub    %edx,%eax
mov    $0xa,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%edi
call   1030 <itoc@plt>
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_digit>:
mov    %edi,%eax
mov    $0xcccccccd,%ecx
imul   %rax,%rcx
shr    $0x23,%rcx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%eax
sub    %eax,%edi
mov    $0xa,%al
sub    %dil,%al
movzbl %al,%eax
imul   $0xcd,%eax,%ecx
shr    $0xa,%ecx
and    $0xfffffffe,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %cl,%al
movzbl %al,%edi
jmp    1030 <itoc@plt>

LLVM IR (-O0):
define signext i8 @check_digit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = urem i32 %3, 10
%5 = sub i32 10, %4
%6 = urem i32 %5, 10
%7 = call signext i8 @itoc(i32 %6)
ret i8 %7
}

LLVM IR (-O2):
define signext i8 @check_digit(i32 %0) {
%2 = urem i32 %0, 10
%3 = trunc i32 %2 to i8
%4 = sub nuw nsw i8 10, %3
%5 = urem i8 %4, 10
%6 = zext i8 %5 to i32
%7 = tail call signext i8 @itoc(i32 %6)
ret i8 %7
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void see_help(const char *cmd_name) {
  fprintf(stderr, "Try '%s --help' for more information.\n", cmd_name);
}


x86 assembly (clang, -O0):
<see_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<see_help>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [39 x i8] c"Try '%s --help' for more information.\0A\00"
define void @see_help(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 ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [39 x i8] c"Try '%s --help' for more information.\0A\00"
define void @see_help(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ptr_glLoadIdentity();
extern void glLoadIdentity(void) { ptr_glLoadIdentity(); }


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

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

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

LLVM IR (-O2):
define void @glLoadIdentity() {
%1 = tail call i32 (...) @ptr_glLoadIdentity()
ret void
}
void foo777() {}


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

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

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

LLVM IR (-O2):
define void @foo777() {
ret void
}
/* Variables and functions */
int starts_with(const char *str, const char *prefix) {
  for (;; str++, prefix++)
    if (!*prefix)
      return 1;
    else if (*str != *prefix)
      return 0;
}


x86 assembly (clang, -O0):
<starts_with>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
jne    1125 <starts_with+0x25>
movl   $0x1,-0x4(%rbp)
jmp    116e <starts_with+0x6e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     1147 <starts_with+0x47>
movl   $0x0,-0x4(%rbp)
jmp    116e <starts_with+0x6e>
jmp    114c <starts_with+0x4c>
jmp    1151 <starts_with+0x51>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    110c <starts_with+0xc>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<starts_with>:
mov    (%rsi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1122 <starts_with+0x22>
xor    %edx,%edx
nopl   (%rax)
cmp    %cl,(%rdi,%rdx,1)
jne    1123 <starts_with+0x23>
movzbl 0x1(%rsi,%rdx,1),%ecx
add    $0x1,%rdx
test   %cl,%cl
jne    1110 <starts_with+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @starts_with(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %2, %11
%6 = phi i8 [ %14, %11 ], [ %3, %2 ]
%7 = phi i8* [ %13, %11 ], [ %1, %2 ]
%8 = phi i8* [ %12, %11 ], [ %0, %2 ]
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, %6
br i1 %10, label %11, label %16
11: ; preds = %5
%12 = getelementptr inbounds i8, i8* %8, i64 1
%13 = getelementptr inbounds i8, i8* %7, i64 1
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %5
16: ; preds = %11, %5, %2
%17 = phi i32 [ 1, %2 ], [ 0, %5 ], [ 1, %11 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ sscanf(char const *, char *, int *);
extern void getint_(const char *string, int *i, int n) {
  sscanf(string, "%d", i);
}


x86 assembly (clang, -O0):
<getint_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xece(%rip),%rsi
call   1030 <sscanf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getint_>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <sscanf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @getint_(i8* nocapture %0, i32* %1, i32 %2) {
%4 = tail call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ X509_NAME;
typedef int /*<<< orphan*/ ASN1_OBJECT;

/* Variables and functions */
int /*<<< orphan*/ *OBJ_nid2obj(int);
int X509_NAME_get_index_by_OBJ(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
int X509_NAME_get_index_by_NID(X509_NAME *name, int nid, int lastpos) {
  ASN1_OBJECT *obj;
  obj = OBJ_nid2obj(nid);
  if (obj == NULL)
    return (-2);
  return (X509_NAME_get_index_by_OBJ(name, obj, lastpos));
}


x86 assembly (clang, -O0):
<X509_NAME_get_index_by_NID>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <OBJ_nid2obj@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1155 <X509_NAME_get_index_by_NID+0x35>
movl   $0xfffffffe,-0x4(%rbp)
jmp    1168 <X509_NAME_get_index_by_NID+0x48>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%edx
call   1040 <X509_NAME_get_index_by_OBJ@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<X509_NAME_get_index_by_NID>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rdi,%rbx
mov    %esi,%edi
call   1030 <OBJ_nid2obj@plt>
test   %rax,%rax
je     1147 <X509_NAME_get_index_by_NID+0x27>
mov    %rbx,%rdi
mov    %rax,%rsi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <X509_NAME_get_index_by_OBJ@plt>
mov    $0xfffffffe,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @X509_NAME_get_index_by_NID(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32
%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
%9 = load i32, i32* %6
%10 = call i32* @OBJ_nid2obj(i32 %9)
store i32* %10, i32** %8
%11 = load i32*, i32** %8
%12 = icmp eq i32* %11, null
br i1 %12, label %13, label %14
13: ; preds = %3
store i32 -2, i32* %4
br label %19
14: ; preds = %3
%15 = load i32*, i32** %5
%16 = load i32*, i32** %8
%17 = load i32, i32* %7
%18 = call i32 @X509_NAME_get_index_by_OBJ(i32* %15, i32* %16, i32 %17)
store i32 %18, i32* %4
br label %19
19: ; preds = %14, %13
%20 = load i32, i32* %4
ret i32 %20
}

LLVM IR (-O2):
define i32 @X509_NAME_get_index_by_NID(i32* %0, i32 %1, i32 %2) {
%4 = tail call i32* @OBJ_nid2obj(i32 %1)
%5 = icmp eq i32* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @X509_NAME_get_index_by_OBJ(i32* %0, i32* %4, i32 %2)
br label %8
8: ; preds = %3, %6
%9 = phi i32 [ %7, %6 ], [ -2, %3 ]
ret i32 %9
}
int serialInit(void) {
  (*(volatile unsigned int *)((0x3FF0000 + 0xD000)) = (0x03));
  (*(volatile unsigned int *)((0x3FF0000 + 0xD004)) = (0x09));
  (*(volatile unsigned int *)((0x3FF0000 + 0xD014)) = (0x500));
  return 0;
}


x86 assembly (clang, -O0):
<serialInit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3ffd000,%eax
movl   $0x3,(%rax)
mov    $0x3ffd004,%eax
movl   $0x9,(%rax)
mov    $0x3ffd014,%eax
movl   $0x500,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<serialInit>:
movl   $0x3,0x3ffd000
movl   $0x9,0x3ffd004
movl   $0x500,0x3ffd014
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @serialInit() {
store volatile i32 3, i32* inttoptr (i64 67096576 to i32*)
store volatile i32 9, i32* inttoptr (i64 67096580 to i32*)
store volatile i32 1280, i32* inttoptr (i64 67096596 to i32*)
ret i32 0
}

LLVM IR (-O2):
define i32 @serialInit() {
store volatile i32 3, i32* inttoptr (i64 67096576 to i32*)
store volatile i32 9, i32* inttoptr (i64 67096580 to i32*)
store volatile i32 1280, i32* inttoptr (i64 67096596 to i32*)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int setregid(gid_t rgid, gid_t egid) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @setregid(i32 %0, i32 %1) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_movpi64_epi64(int /*<<< orphan*/);
__m128i test_mm_movpi64_epi64(__m64 A) { return _mm_movpi64_epi64(A); }


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

x86 assembly (clang, -O2):
<test_mm_movpi64_epi64>:
jmp    1030 <_mm_movpi64_epi64@plt>

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

LLVM IR (-O2):
define i32 @test_mm_movpi64_epi64(i32 %0) {
%2 = tail call i32 @_mm_movpi64_epi64(i32 %0)
ret i32 %2
}