xunge/DecIR huggingface dataset:
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
bool uint32_gt(const uint32_t a, const uint32_t b) { return a > b; }


x86 assembly (clang, -O0):
<uint32_gt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @uint32_gt(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp sgt i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @uint32_gt(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fdopen(int, char const *);
FILE *xfdopen(int fd, const char *mode) {
  FILE *fp = fdopen(fd, mode);
  if (fp == NULL) {
    ;
  }
  return fp;
}


x86 assembly (clang, -O0):
<xfdopen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <fdopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    113f <xfdopen+0x2f>
jmp    113f <xfdopen+0x2f>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xfdopen>:
jmp    1030 <fdopen@plt>

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

LLVM IR (-O2):
define noalias i32* @xfdopen(i32 %0, i8* nocapture %1) {
%3 = tail call i32* @fdopen(i32 %0, i8* %1)
ret i32* %3
}
/* Variables and functions */
int EXIT_FAILURE;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
int usage(const char *exe) {
  fprintf(stderr,
          "Usage:\t%s [-tgc] "
          "[-r radius] "
          "[-l size] "
          "[-n height] "
          "[-m width] "
          "[-p samples] dst\n",
          exe);
  return EXIT_FAILURE;
}


x86 assembly (clang, -O0):
<usage>:
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>
mov    0x2e9c(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [80 x i8] c"Usage:\09%s [-tgc] [-r radius] [-l size] [-n height] [-m width] [-p samples] dst\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
ret i32 %6
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [80 x i8] c"Usage:\09%s [-tgc] [-r radius] [-l size] [-n height] [-m width] [-p samples] dst\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
ret i32 %4
}
int test_imm_89uint16_reg(unsigned short val) {
  return ((val) & (-0x89 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_89uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xffffff77,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_89uint16_reg>:
test   $0xff77,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_89uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -137
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct timespec {
  int tv_sec;
  scalar_t__ tv_nsec;
};

/* Variables and functions */
unsigned long long timespec_to_llu(struct timespec *t) {
  unsigned long long ret = 0;
  ret += (t->tv_sec * 1000000000);
  ret += t->tv_nsec;
  return ret;
}


x86 assembly (clang, -O0):
<timespec_to_llu>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
imul   $0x3b9aca00,(%rax),%eax
cltq
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<timespec_to_llu>:
movslq (%rdi),%rax
imul   $0x3b9aca00,%rax,%rax
add    0x8(%rdi),%rax
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i64 }
define i64 @timespec_to_llu(%struct.timespec* %0) {
%2 = alloca %struct.timespec*
%3 = alloca i64
store %struct.timespec* %0, %struct.timespec** %2
store i64 0, i64* %3
%4 = load %struct.timespec*, %struct.timespec** %2
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 0
%6 = load i32, i32* %5
%7 = mul nsw i32 %6, 1000000000
%8 = sext i32 %7 to i64
%9 = load i64, i64* %3
%10 = add i64 %9, %8
store i64 %10, i64* %3
%11 = load %struct.timespec*, %struct.timespec** %2
%12 = getelementptr inbounds %struct.timespec, %struct.timespec* %11, i32 0, i32 1
%13 = load i64, i64* %12
%14 = load i64, i64* %3
%15 = add i64 %14, %13
store i64 %15, i64* %3
%16 = load i64, i64* %3
ret i64 %16
}

LLVM IR (-O2):
%struct.timespec = type { i32, i64 }
define i64 @timespec_to_llu(%struct.timespec* nocapture %0) {
%2 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 1000000000
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 1
%7 = load i64, i64* %6
%8 = add i64 %7, %5
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, float);
int main(void) {
  int radius = 10, radius_cubed = radius * radius * radius;
  float volume;
  printf("The volume of a %d meter sphere is: %.3f", radius,
         (4.0f / 3.0f) * 3.14159265358979323846 * radius_cubed);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
cvtsi2sdl -0xc(%rbp),%xmm1
movsd  0xebc(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeec(%rip),%rdi
movss  0xee0(%rip),%xmm0
mov    $0xa,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [41 x i8] c"The volume of a %d meter sphere is: %.3f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
store i32 0, i32* %1
store i32 10, i32* %2
%5 = load i32, i32* %2
%6 = load i32, i32* %2
%7 = mul nsw i32 %5, %6
%8 = load i32, i32* %2
%9 = mul nsw i32 %7, %8
store i32 %9, i32* %3
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = sitofp i32 %11 to double
%13 = fmul double 0x4010C152408E1C81, %12
%14 = fptrunc double %13 to float
%15 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %10, float %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [41 x i8] c"The volume of a %d meter sphere is: %.3f\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 10, float 0x40B05CCA60000000)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ d_h();
int /*<<< orphan*/ h_d();
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char op;
  scanf("%c", &op);
  switch (op) {
  case 'd': {
    d_h();
    break;
  }
  case 'h': {
    h_d();
    break;
  }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1050 <scanf@plt>
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x64,%eax
je     1175 <main+0x45>
jmp    1164 <main+0x34>
mov    -0xc(%rbp),%eax
sub    $0x68,%eax
je     1181 <main+0x51>
jmp    1188 <main+0x58>
mov    $0x0,%al
call   1030 <d_h@plt>
jmp    1188 <main+0x58>
mov    $0x0,%al
call   1040 <h_d@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1050 <scanf@plt>
movsbl 0x7(%rsp),%eax
cmp    $0x68,%eax
je     115a <main+0x2a>
cmp    $0x64,%eax
jne    1161 <main+0x31>
xor    %eax,%eax
call   1030 <d_h@plt>
jmp    1161 <main+0x31>
xor    %eax,%eax
call   1040 <h_d@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
switch i32 %5, label %10 [
i32 100, label %6
i32 104, label %8
]
6: ; preds = %0
%7 = call i32 (...) @d_h()
br label %10
8: ; preds = %0
%9 = call i32 (...) @h_d()
br label %10
10: ; preds = %0, %8, %6
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i8
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = load i8, i8* %1
%4 = sext i8 %3 to i32
switch i32 %4, label %9 [
i32 100, label %5
i32 104, label %7
]
5: ; preds = %0
%6 = call i32 (...) @d_h()
br label %9
7: ; preds = %0
%8 = call i32 (...) @h_d()
br label %9
9: ; preds = %0, %7, %5
ret i32 0
}
/* Variables and functions */
double pow(double, double);
double linear_from_sRGB(double s) {
  if (s <= 0.04045)
    return s / 12.92;
  else
    return pow((s + 0.055) / 1.055, 2.4);
}


x86 assembly (clang, -O0):
<linear_from_sRGB>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  0xedb(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     114b <linear_from_sRGB+0x3b>
movsd  -0x10(%rbp),%xmm0
movsd  0xee3(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1176 <linear_from_sRGB+0x66>
movsd  0xec5(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  0xeb0(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe9c(%rip),%xmm1
call   1030 <pow@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<linear_from_sRGB>:
movsd  0xee8(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    113b <linear_from_sRGB+0x2b>
addsd  0xeea(%rip),%xmm0
divsd  0xeea(%rip),%xmm0
movsd  0xeea(%rip),%xmm1
jmp    1030 <pow@plt>
divsd  0xec5(%rip),%xmm0
ret

LLVM IR (-O0):
define double @linear_from_sRGB(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp ole double %4, 4.045000e-02
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load double, double* %3
%8 = fdiv double %7, 1.292000e+01
store double %8, double* %2
br label %14
9: ; preds = %1
%10 = load double, double* %3
%11 = fadd double %10, 5.500000e-02
%12 = fdiv double %11, 1.055000e+00
%13 = call double @pow(double %12, double 2.400000e+00)
store double %13, double* %2
br label %14
14: ; preds = %9, %6
%15 = load double, double* %2
ret double %15
}

LLVM IR (-O2):
define double @linear_from_sRGB(double %0) {
%2 = fcmp ugt double %0, 4.045000e-02
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = fdiv double %0, 1.292000e+01
br label %9
5: ; preds = %1
%6 = fadd double %0, 5.500000e-02
%7 = fdiv double %6, 1.055000e+00
%8 = tail call double @pow(double %7, double 2.400000e+00)
br label %9
9: ; preds = %5, %3
%10 = phi double [ %4, %3 ], [ %8, %5 ]
ret double %10
}
double quadratic_intp(double ym, double y0, double yp, double x) {
  double a, b, c, y;
  c = y0;
  b = (yp - ym) / 2.0;
  a = (yp + ym) / 2.0 - c;
  y = a * x * x + b * x + c;
  return y;
}


x86 assembly (clang, -O0):
<quadratic_intp>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  0xecc(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  0xeb1(%rip),%xmm1
divsd  %xmm1,%xmm0
subsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<quadratic_intp>:
movapd %xmm2,%xmm4
subsd  %xmm0,%xmm4
movsd  0xef0(%rip),%xmm5
mulsd  %xmm5,%xmm4
addsd  %xmm2,%xmm0
mulsd  %xmm5,%xmm0
subsd  %xmm1,%xmm0
mulsd  %xmm3,%xmm0
mulsd  %xmm3,%xmm4
mulsd  %xmm3,%xmm0
addsd  %xmm4,%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @quadratic_intp(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%13 = load double, double* %6
store double %13, double* %11
%14 = load double, double* %7
%15 = load double, double* %5
%16 = fsub double %14, %15
%17 = fdiv double %16, 2.000000e+00
store double %17, double* %10
%18 = load double, double* %7
%19 = load double, double* %5
%20 = fadd double %18, %19
%21 = fdiv double %20, 2.000000e+00
%22 = load double, double* %11
%23 = fsub double %21, %22
store double %23, double* %9
%24 = load double, double* %9
%25 = load double, double* %8
%26 = fmul double %24, %25
%27 = load double, double* %8
%28 = load double, double* %10
%29 = load double, double* %8
%30 = fmul double %28, %29
%31 = call double @llvm.fmuladd.f64(double %26, double %27, double %30)
%32 = load double, double* %11
%33 = fadd double %31, %32
store double %33, double* %12
%34 = load double, double* %12
ret double %34
}

LLVM IR (-O2):
define double @quadratic_intp(double %0, double %1, double %2, double %3) {
%5 = fsub double %2, %0
%6 = fmul double %5, 5.000000e-01
%7 = fadd double %0, %2
%8 = fmul double %7, 5.000000e-01
%9 = fsub double %8, %1
%10 = fmul double %9, %3
%11 = fmul double %6, %3
%12 = tail call double @llvm.fmuladd.f64(double %10, double %3, double %11)
%13 = fadd double %12, %1
ret double %13
}
/* Variables and functions */
long meat_time_find_begin_of_week(long const);
long meat_time_offset_weeks(int);
signed long int meat_time_find_end_of_week(signed long int const i_now) {
  return meat_time_find_begin_of_week(i_now) + meat_time_offset_weeks(1);
}


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

x86 assembly (clang, -O2):
<meat_time_find_end_of_week>:
push   %rbx
call   1040 <meat_time_find_begin_of_week@plt>
mov    %rax,%rbx
mov    $0x1,%edi
call   1030 <meat_time_offset_weeks@plt>
add    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i64 @meat_time_find_end_of_week(i64 %0) {
%2 = tail call i64 @meat_time_find_begin_of_week(i64 %0)
%3 = tail call i64 @meat_time_offset_weeks(i32 1)
%4 = add nsw i64 %3, %2
ret i64 %4
}
void g_mkstemp() {}


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

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

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

LLVM IR (-O2):
define void @g_mkstemp() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ system(char *);
int x9_setup() {
  char cmd[256];
  sprintf(cmd,
          "iptables -A INPUT -p tcp -m multiport --sport 53,80 --tcp-flags "
          "SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d",
          1);
  system(cmd);
  return 0;
}


x86 assembly (clang, -O0):
<x9_setup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
lea    -0x100(%rbp),%rdi
lea    0xec7(%rip),%rsi
mov    $0x1,%edx
call   1040 <sprintf@plt>
lea    -0x100(%rbp),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x9_setup>:
push   %rbx
sub    $0x100,%rsp
lea    0xed1(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [106 x i8] c"iptables -A INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x9_setup() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%5 = call i32 @system(i8* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [106 x i8] c"iptables -A INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x9_setup() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = call i32 @system(i8* %2)
ret i32 0
}
int null_distort_func(const void *data, const double ray[3], double *x,
                      double *y) {
  if (ray[2] < 1e-10)
    return -1;
  *x = ray[0] / ray[2];
  *y = ray[1] / ray[2];
  return 0;
}


x86 assembly (clang, -O0):
<null_distort_func>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x18(%rbp),%rax
movsd  0xee0(%rip),%xmm0
ucomisd 0x10(%rax),%xmm0
jbe    1137 <null_distort_func+0x37>
movl   $0xffffffff,-0x4(%rbp)
jmp    1171 <null_distort_func+0x71>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
divsd  0x10(%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
divsd  0x10(%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<null_distort_func>:
movsd  0x10(%rsi),%xmm0
mov    $0xffffffff,%eax
movsd  0xeee(%rip),%xmm1
ucomisd %xmm0,%xmm1
ja     1134 <null_distort_func+0x34>
movsd  (%rsi),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%rdx)
movsd  0x8(%rsi),%xmm0
divsd  0x10(%rsi),%xmm0
movsd  %xmm0,(%rcx)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @null_distort_func(i8* %0, double* %1, double* %2, double* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca double*
%8 = alloca double*
%9 = alloca double*
store i8* %0, i8** %6
store double* %1, double** %7
store double* %2, double** %8
store double* %3, double** %9
%10 = load double*, double** %7
%11 = getelementptr inbounds double, double* %10, i64 2
%12 = load double, double* %11
%13 = fcmp olt double %12, 1.000000e-10
br i1 %13, label %14, label %15
14: ; preds = %4
store i32 -1, i32* %5
br label %32
15: ; preds = %4
%16 = load double*, double** %7
%17 = getelementptr inbounds double, double* %16, i64 0
%18 = load double, double* %17
%19 = load double*, double** %7
%20 = getelementptr inbounds double, double* %19, i64 2
%21 = load double, double* %20
%22 = fdiv double %18, %21
%23 = load double*, double** %8
store double %22, double* %23
%24 = load double*, double** %7
%25 = getelementptr inbounds double, double* %24, i64 1
%26 = load double, double* %25
%27 = load double*, double** %7
%28 = getelementptr inbounds double, double* %27, i64 2
%29 = load double, double* %28
%30 = fdiv double %26, %29
%31 = load double*, double** %9
store double %30, double* %31
store i32 0, i32* %5
br label %32
32: ; preds = %15, %14
%33 = load i32, i32* %5
ret i32 %33
}

LLVM IR (-O2):
define i32 @null_distort_func(i8* nocapture readnone %0, double* nocapture %1, double* nocapture writeonly %2, double* nocapture writeonly %3) {
%5 = getelementptr inbounds double, double* %1, i64 2
%6 = load double, double* %5
%7 = fcmp olt double %6, 1.000000e-10
br i1 %7, label %15, label %8
8: ; preds = %4
%9 = load double, double* %1
%10 = fdiv double %9, %6
store double %10, double* %2
%11 = getelementptr inbounds double, double* %1, i64 1
%12 = load double, double* %11
%13 = load double, double* %5
%14 = fdiv double %12, %13
store double %14, double* %3
br label %15
15: ; preds = %4, %8
%16 = phi i32 [ 0, %8 ], [ -1, %4 ]
ret i32 %16
}
/* Variables and functions */
int check_arg_count(int, int);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_error(char *);
void cmd_mvin_wchstr(int nargs, char **args) {
  if (check_arg_count(nargs, 1) == 1)
    return;
  report_count(1);
  report_error("UNSUPPORTED");
}


x86 assembly (clang, -O0):
<cmd_mvin_wchstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    115a <cmd_mvin_wchstr+0x2a>
jmp    1170 <cmd_mvin_wchstr+0x40>
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xe95(%rip),%rdi
call   1050 <report_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_mvin_wchstr>:
push   %rax
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1142 <cmd_mvin_wchstr+0x12>
pop    %rax
ret
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xead(%rip),%rdi
pop    %rax
jmp    1050 <report_error@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_mvin_wchstr(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = call i32 @check_arg_count(i32 %5, i32 1)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %12
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_mvin_wchstr(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %5
ret void
}
/* Variables and functions */
double sin(double);
double ml_sin(double x) { return sin(x); }


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

x86 assembly (clang, -O2):
<ml_sin>:
jmp    1030 <sin@plt>

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

LLVM IR (-O2):
define double @ml_sin(double %0) {
%2 = tail call double @sin(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) { printf("Hola Mundo! act_func.c"); }


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"Hola Mundo! act_func.c\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"Hola Mundo! act_func.c\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ scrputs(char *);
void scrclrln(void) { scrputs("\033[2K"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"\1B[2K\00"
define void @scrclrln() {
%1 = call i32 @scrputs(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[2K\00"
define void @scrclrln() {
%1 = tail call i32 @scrputs(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ run_test_bpt();
int main(int argc, char **argv) {
  printf("bpt: Our bpt is loading...\r\n");
  run_test_bpt();
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [29 x i8] c"bpt: Our bpt is loading...\0D\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 ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (...) @run_test_bpt()
ret i32 0
}

LLVM IR (-O2):
@str = [28 x i8] c"bpt: Our bpt is loading...\0D\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @run_test_bpt()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ buscarPrimoCercano();
double fabs(double);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int n, i;
  int d2, count;
  double d1;
  while (1)
    buscarPrimoCercano();
  while (1) {
    printf("Introduce un numero (0 para salir): ");
    scanf("%d", &n);
    if (n == 0)
      break;
    count = 0;
    for (i = 1; i <= n; i++) {
      d1 = (double)n / (double)i;
      d2 = n / i;
      if (fabs(d1 - (double)d2) < 0.00001)
        count++;
    }
    if (count == 2)
      printf("%d es primo\n", n);
    else
      printf("%d no es primo\n", n);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <buscarPrimoCercano@plt>
jmp    111f <main+0xf>

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

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

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @buscarPrimoCercano()
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int);
void main() {
  while (1) {
    putchar('a');
    putchar(10);
    return;
  }
  putchar(10);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <main+0x9>
mov    $0x61,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x61,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @main() {
br label %1
1: ; preds = %0
%2 = call i32 @putchar(i32 97)
%3 = call i32 @putchar(i32 10)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @putchar(i32 97)
%2 = tail call i32 @putchar(i32 10)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int write(int, int /*<<< orphan*/ *, int);
int serial_write(int fd, uint8_t b) { return write(fd, &b, 1); }


x86 assembly (clang, -O0):
<serial_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_write>:
push   %rax
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @serial_write(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 = call i32 @write(i32 %5, i32* %4, i32 1)
ret i32 %6
}

LLVM IR (-O2):
define i32 @serial_write(i32 %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = call i32 @write(i32 %0, i32* %3, i32 1)
ret i32 %4
}
int returnInt() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @returnInt() {
ret i32 0
}
unsigned int f6(int x) { return ((unsigned int)x >> 27) | (x << 5); }


x86 assembly (clang, -O0):
<f6>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1b,%eax
mov    -0x4(%rbp),%ecx
shl    $0x5,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f6>:
mov    %edi,%eax
rol    $0x5,%eax
ret

LLVM IR (-O0):
define i32 @f6(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 27
%5 = load i32, i32* %2
%6 = shl i32 %5, 5
%7 = or i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @f6(i32 %0) {
%2 = tail call i32 @llvm.fshl.i32(i32 %0, i32 %0, i32 5)
ret i32 %2
}
/* Variables and functions */
scalar_t__ write(int, void *, size_t);
void W(void *b, size_t l) {
  int i;
  for (i = 0; i < l; i += write(1, b + i, l - i))
    ;
}


x86 assembly (clang, -O0):
<W>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movslq -0x14(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    116c <W+0x5c>
jmp    113a <W+0x2a>
mov    -0x8(%rbp),%rsi
movslq -0x14(%rbp),%rax
add    %rax,%rsi
mov    -0x10(%rbp),%rdx
movslq -0x14(%rbp),%rax
sub    %rax,%rdx
mov    $0x1,%edi
call   1030 <write@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
jmp    1127 <W+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<W>:
push   %r15
push   %r14
push   %rbx
test   %rsi,%rsi
je     114e <W+0x3e>
mov    %rsi,%r15
mov    %rdi,%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    (%r14,%rbx,1),%rsi
mov    %r15,%rdx
sub    %rbx,%rdx
mov    $0x1,%edi
call   1030 <write@plt>
add    %eax,%ebx
movslq %ebx,%rbx
cmp    %r15,%rbx
jb     1130 <W+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @W(i8* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %13, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %11, %4 ], [ 0, %2 ]
%6 = getelementptr i8, i8* %0, i64 %5
%7 = sub i64 %1, %5
%8 = tail call i64 @write(i32 1, i8* %6, i64 %7)
%9 = add nsw i64 %8, %5
%10 = shl i64 %9, 32
%11 = ashr exact i64 %10, 32
%12 = icmp ult i64 %11, %1
br i1 %12, label %4, label %13
13: ; preds = %4, %2
ret void
}
/* Variables and functions */
long DIV_ROUND_CLOSEST(long, int);
long millicelsius_to_milli_kelvin(long);
long millicelsius_to_deci_kelvin(long t) {
  t = millicelsius_to_milli_kelvin(t);
  return DIV_ROUND_CLOSEST(t, 100);
}


x86 assembly (clang, -O0):
<millicelsius_to_deci_kelvin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <millicelsius_to_milli_kelvin@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x64,%esi
call   1040 <DIV_ROUND_CLOSEST@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<millicelsius_to_deci_kelvin>:
push   %rax
call   1030 <millicelsius_to_milli_kelvin@plt>
mov    %rax,%rdi
mov    $0x64,%esi
pop    %rax
jmp    1040 <DIV_ROUND_CLOSEST@plt>

LLVM IR (-O0):
define i64 @millicelsius_to_deci_kelvin(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @millicelsius_to_milli_kelvin(i64 %3)
store i64 %4, i64* %2
%5 = load i64, i64* %2
%6 = call i64 @DIV_ROUND_CLOSEST(i64 %5, i32 100)
ret i64 %6
}

LLVM IR (-O2):
define i64 @millicelsius_to_deci_kelvin(i64 %0) {
%2 = tail call i64 @millicelsius_to_milli_kelvin(i64 %0)
%3 = tail call i64 @DIV_ROUND_CLOSEST(i64 %2, i32 100)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ std_err(char *);
usage() {
  std_err("Usage: touch [-c] file...\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <std_err@plt>
mov    $0x1,%edi
call   1030 <exit@plt>

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

LLVM IR (-O0):
@.str = [27 x i8] c"Usage: touch [-c] file...\0A\00"
define i32 @usage() {
%1 = call i32 @std_err(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [27 x i8] c"Usage: touch [-c] file...\0A\00"
define i32 @usage() {
%1 = tail call i32 @std_err(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int q1o() {
  char *argv[] = {"hello", "beautiful", "world"};
  printf("\n%s\n", "q1k ------");
  printf("%s\n", *(argv + 1));
  return 1;
}


x86 assembly (clang, -O0):
<q1o>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x2ce1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2cde(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0x2cdb(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xed6(%rip),%rdi
lea    0xed4(%rip),%rsi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<q1o>:
push   %rax
lea    0xef2(%rip),%rdi
lea    0xef0(%rip),%rsi
call   1030 <printf@plt>
lea    0xee0(%rip),%rdi
lea    0xece(%rip),%rsi
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"hello\00"
@.str.1 = [10 x i8] c"beautiful\00"
@.str.2 = [6 x i8] c"world\00"
@__const.q1o.argv = [3 x i8*] [i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i32 0, i32 0)]
@.str.3 = [5 x i8] c"\0A%s\0A\00"
@.str.4 = [11 x i8] c"q1k ------\00"
@.str.5 = [4 x i8] c"%s\0A\00"
define i32 @q1o() {
%1 = alloca [3 x i8*]
%2 = bitcast [3 x i8*]* %1 to i8*
%3 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%4 = getelementptr inbounds [3 x i8*], [3 x i8*]* %1, i64 0, i64 0
%5 = getelementptr inbounds i8*, i8** %4, i64 1
%6 = load i8*, i8** %5
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* %6)
ret i32 1
}

LLVM IR (-O2):
@.str.1 = [10 x i8] c"beautiful\00"
@.str.3 = [5 x i8] c"\0A%s\0A\00"
@.str.4 = [11 x i8] c"q1k ------\00"
@.str.5 = [4 x i8] c"%s\0A\00"
define i32 @q1o() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ net_send(char *);
int /*<<< orphan*/ snprintf(char *, int, char *, char *, char *, char *);
void irc_user(char *user_name, char *real_name) {
  char msg[(512 - 3)];
  snprintf(msg, (512 - 3), "%s %s hostname server :%s", "USER", user_name,
           real_name);
  net_send(msg);
}


x86 assembly (clang, -O0):
<irc_user>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x210(%rbp),%rdi
mov    -0x8(%rbp),%r8
mov    -0x10(%rbp),%r9
mov    $0x1fd,%esi
lea    0xeb2(%rip),%rdx
lea    0xec5(%rip),%rcx
call   1030 <snprintf@plt>
lea    -0x210(%rbp),%rdi
call   1040 <net_send@plt>
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irc_user>:
push   %rbx
sub    $0x200,%rsp
mov    %rsi,%r9
mov    %rdi,%r8
lea    0xecb(%rip),%rdx
lea    0xede(%rip),%rcx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1fd,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <net_send@plt>
add    $0x200,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"%s %s hostname server :%s\00"
@.str.1 = [5 x i8] c"USER\00"
define void @irc_user(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [509 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [509 x i8], [509 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32 @snprintf(i8* %6, i32 509, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %7, i8* %8)
%10 = getelementptr inbounds [509 x i8], [509 x i8]* %5, i64 0, i64 0
%11 = call i32 @net_send(i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"%s %s hostname server :%s\00"
@.str.1 = [5 x i8] c"USER\00"
define void @irc_user(i8* %0, i8* %1) {
%3 = alloca [509 x i8]
%4 = getelementptr inbounds [509 x i8], [509 x i8]* %3, i64 0, i64 0
%5 = call i32 @snprintf(i8* %4, i32 509, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* %1)
%6 = call i32 @net_send(i8* %4)
ret void
}
/* Variables and functions */
int rand();
int /*<<< orphan*/ srand(int);
void TURB_Init(float *table, int sr) {
  int i;
  srand(sr);
  for (i = 0; i < 256; i++)
    table[i] = (float)(rand() & 255) / 255.0;
}


x86 assembly (clang, -O0):
<TURB_Init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <srand@plt>
movl   $0x0,-0x10(%rbp)
cmpl   $0x100,-0x10(%rbp)
jge    118a <TURB_Init+0x6a>
mov    $0x0,%al
call   1040 <rand@plt>
and    $0xff,%eax
cvtsi2ss %eax,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe99(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113e <TURB_Init+0x1e>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TURB_Init>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    %esi,%edi
call   1030 <srand@plt>
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <rand@plt>
movzbl %al,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
divss  0xeb7(%rip),%xmm0
movss  %xmm0,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    $0x100,%rbx
jne    1130 <TURB_Init+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @TURB_Init(float* %0, i32 %1) {
%3 = alloca float*
%4 = alloca i32
%5 = alloca i32
store float* %0, float** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = call i32 @srand(i32 %6)
store i32 0, i32* %5
br label %8
8: ; preds = %22, %2
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 256
br i1 %10, label %11, label %25
11: ; preds = %8
%12 = call i32 (...) @rand()
%13 = and i32 %12, 255
%14 = sitofp i32 %13 to float
%15 = fpext float %14 to double
%16 = fdiv double %15, 2.550000e+02
%17 = fptrunc double %16 to float
%18 = load float*, float** %3
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds float, float* %18, i64 %20
store float %17, float* %21
br label %22
22: ; preds = %11
%23 = load i32, i32* %5
%24 = add nsw i32 %23, 1
store i32 %24, i32* %5
br label %8
25: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @TURB_Init(float* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @srand(i32 %1)
br label %4
4: ; preds = %2, %4
%5 = phi i64 [ 0, %2 ], [ %11, %4 ]
%6 = tail call i32 (...) @rand()
%7 = and i32 %6, 255
%8 = sitofp i32 %7 to float
%9 = fdiv float %8, 2.550000e+02
%10 = getelementptr inbounds float, float* %0, i64 %5
store float %9, float* %10
%11 = add nuw nsw i64 %5, 1
%12 = icmp eq i64 %11, 256
br i1 %12, label %13, label %4
13: ; preds = %4
ret void
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *GO_calloc(size_t nobj, size_t size) {
  void *p;
  size *= nobj;
  if (p = malloc(size))
    memset(p, 0, size);
  return p;
}


x86 assembly (clang, -O0):
<GO_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
imul   -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     1163 <GO_calloc+0x43>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GO_calloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
imul   %rsi,%rbx
mov    %rbx,%rdi
call   1040 <malloc@plt>
mov    %rax,%r14
test   %rax,%rax
je     1148 <GO_calloc+0x28>
mov    %r14,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @GO_calloc(i64 %0, i64 %1) {
%3 = mul i64 %1, %0
%4 = tail call i8* @malloc(i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @memset(i8* %4, i32 0, i64 %3)
br label %8
8: ; preds = %6, %2
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ ActuatorSettingsHandle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void ActuatorSettingsUpdated() { UAVObjUpdated(ActuatorSettingsHandle()); }


x86 assembly (clang, -O0):
<ActuatorSettingsUpdated>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <ActuatorSettingsHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjUpdated@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ActuatorSettingsUpdated>:
push   %rax
xor    %eax,%eax
call   1030 <ActuatorSettingsHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjUpdated@plt>

LLVM IR (-O0):
define void @ActuatorSettingsUpdated() {
%1 = call i32 (...) @ActuatorSettingsHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @ActuatorSettingsUpdated() {
%1 = tail call i32 (...) @ActuatorSettingsHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
/* Type definitions */
typedef scalar_t__ uint16_t;

/* Variables and functions */
void nullCell(uint16_t *cell) {
  while (*cell) {
    (*cell)--;
  }
}


x86 assembly (clang, -O0):
<nullCell>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1129 <nullCell+0x29>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,(%rax)
jmp    1108 <nullCell+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<nullCell>:
cmpq   $0x0,(%rdi)
je     110d <nullCell+0xd>
movq   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @nullCell(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = icmp eq i64 %2, 0
br i1 %3, label %5, label %4
4: ; preds = %1
store i64 0, i64* %0
br label %5
5: ; preds = %4, %1
ret void
}
void scr_bell() {}


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

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

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

LLVM IR (-O2):
define void @scr_bell() {
ret void
}
char enough_image_size(int num_pixels, char *text_to_hide) {
  int number_bits_text = sizeof(text_to_hide) * 8;
  if (num_pixels >= number_bits_text)
    return 1;
  return 0x00;
}


x86 assembly (clang, -O0):
<enough_image_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x40,-0x14(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
jl     1127 <enough_image_size+0x27>
movb   $0x1,-0x1(%rbp)
jmp    112b <enough_image_size+0x2b>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<enough_image_size>:
cmp    $0x40,%edi
setge  %al
ret

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

LLVM IR (-O2):
define signext i8 @enough_image_size(i32 %0, i8* nocapture readnone %1) {
%3 = icmp sgt i32 %0, 63
%4 = zext i1 %3 to i8
ret i8 %4
}