xunge/DecIR huggingface dataset:
/* Variables and functions */
long double exp(long double);
long double z_partition(long double energy1, long double energy2,
                        long double temp) {
  long double z;
  z = exp(energy1 / (1.380648813e-23 * temp)) +
      exp(energy2 / (1.380648813e-23 * temp));
  return z;
}


x86 assembly (clang, -O0):
<z_partition>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
fldt   0x30(%rbp)
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fstpt  -0x30(%rbp)
fldt   -0x10(%rbp)
fldt   -0x30(%rbp)
fldl   0xeca(%rip)
fld    %st(0)
fstpt  -0x58(%rbp)
fmulp  %st,%st(1)
fdivrp %st,%st(1)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <exp@plt>
fldt   -0x58(%rbp)
fxch   %st(1)
fstpt  -0x4c(%rbp)
fldt   -0x20(%rbp)
fldt   -0x30(%rbp)
fmulp  %st,%st(2)
fdivp  %st,%st(1)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <exp@plt>
fldt   -0x4c(%rbp)
faddp  %st,%st(1)
fstpt  -0x40(%rbp)
fldt   -0x40(%rbp)
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<z_partition>:
sub    $0x38,%rsp
fldt   0x50(%rsp)
fstpt  0x2c(%rsp)
fldt   0x40(%rsp)
fldt   0x60(%rsp)
fmull  0xed6(%rip)
fld    %st(0)
fstpt  0x14(%rsp)
fdivrp %st,%st(1)
fstpt  (%rsp)
call   1030 <exp@plt>
fstpt  0x20(%rsp)
fldt   0x2c(%rsp)
fldt   0x14(%rsp)
fdivrp %st,%st(1)
fstpt  (%rsp)
call   1030 <exp@plt>
fldt   0x20(%rsp)
faddp  %st,%st(1)
add    $0x38,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @z_partition(x86_fp80 %0, x86_fp80 %1, x86_fp80 %2) {
%4 = alloca x86_fp80
%5 = alloca x86_fp80
%6 = alloca x86_fp80
%7 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %4
store x86_fp80 %1, x86_fp80* %5
store x86_fp80 %2, x86_fp80* %6
%8 = load x86_fp80, x86_fp80* %4
%9 = load x86_fp80, x86_fp80* %6
%10 = fmul x86_fp80 0xK3FB38587357B86611000, %9
%11 = fdiv x86_fp80 %8, %10
%12 = call x86_fp80 @exp(x86_fp80 %11)
%13 = load x86_fp80, x86_fp80* %5
%14 = load x86_fp80, x86_fp80* %6
%15 = fmul x86_fp80 0xK3FB38587357B86611000, %14
%16 = fdiv x86_fp80 %13, %15
%17 = call x86_fp80 @exp(x86_fp80 %16)
%18 = fadd x86_fp80 %12, %17
store x86_fp80 %18, x86_fp80* %7
%19 = load x86_fp80, x86_fp80* %7
ret x86_fp80 %19
}

LLVM IR (-O2):
define x86_fp80 @z_partition(x86_fp80 %0, x86_fp80 %1, x86_fp80 %2) {
%4 = fmul x86_fp80 %2, 0xK3FB38587357B86611000
%5 = fdiv x86_fp80 %0, %4
%6 = tail call x86_fp80 @exp(x86_fp80 %5)
%7 = fdiv x86_fp80 %1, %4
%8 = tail call x86_fp80 @exp(x86_fp80 %7)
%9 = fadd x86_fp80 %6, %8
ret x86_fp80 %9
}
/* Type definitions */
struct rusage {
  int dummy;
};
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ WAIT_ANY;
int /*<<< orphan*/ _wait4(int /*<<< orphan*/, int *, int /*<<< orphan*/,
                          struct rusage *);
pid_t __wait(int *istat) {
  return (_wait4(WAIT_ANY, istat, 0, (struct rusage *)0));
}


x86 assembly (clang, -O0):
<__wait>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
xor    %edx,%edx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <_wait4@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__wait>:
mov    %rdi,%rsi
mov    0x2ece(%rip),%rax
mov    (%rax),%edi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <_wait4@plt>

LLVM IR (-O0):
%struct.rusage = type { i32 }
@WAIT_ANY = global i32 0
define i32 @__wait(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32, i32* @WAIT_ANY
%4 = load i32*, i32** %2
%5 = call i32 @_wait4(i32 %3, i32* %4, i32 0, %struct.rusage* null)
ret i32 %5
}

LLVM IR (-O2):
%struct.rusage = type { i32 }
@WAIT_ANY = global i32 0
define i32 @__wait(i32* %0) {
%2 = load i32, i32* @WAIT_ANY
%3 = tail call i32 @_wait4(i32 %2, i32* %0, i32 0, %struct.rusage* null)
ret i32 %3
}
void main() {
  struct message {
    int numTh;
    int data;
  } m = {1, 2};
  printid(m);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <printid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
movabs $0x200000001,%rdi
xor    %eax,%eax
jmp    1030 <printid@plt>

LLVM IR (-O0):
%struct.message = type { i32, i32 }
@__const.main.m = %struct.message { i32 1, i32 2 }
define void @main() {
%1 = alloca %struct.message
%2 = bitcast %struct.message* %1 to i8*
%3 = bitcast %struct.message* %1 to i64*
%4 = load i64, i64* %3
%5 = call i32 (i64, ...) bitcast (i32 (...)* @printid to i32 (i64, ...)*)(i64 %4)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (i64, ...) bitcast (i32 (...)* @printid to i32 (i64, ...)*)(i64 8589934593)
ret void
}
int linear_roots(double *a, double *r) {
  if ((((a[1]) > -1e-30) && ((a[1]) < 1e-30)))
    return 0;
  r[0] = -a[0] / a[1];
  return 1;
}


x86 assembly (clang, -O0):
<linear_roots>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  0xee3(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    114a <linear_roots+0x4a>
mov    -0x10(%rbp),%rax
movsd  0xed5(%rip),%xmm0
ucomisd 0x8(%rax),%xmm0
jbe    114a <linear_roots+0x4a>
movl   $0x0,-0x4(%rbp)
jmp    1181 <linear_roots+0x81>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x10(%rbp),%rax
divsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<linear_roots>:
movsd  0x8(%rdi),%xmm0
ucomisd 0xef3(%rip),%xmm0
jbe    1120 <linear_roots+0x20>
xor    %eax,%eax
movsd  0xeef(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1120 <linear_roots+0x20>
ret
movsd  (%rdi),%xmm1
xorpd  0xee4(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%rsi)
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @linear_roots(double* nocapture %0, double* nocapture writeonly %1) {
%3 = getelementptr inbounds double, double* %0, i64 1
%4 = load double, double* %3
%5 = fcmp ogt double %4, -1.000000e-30
%6 = fcmp olt double %4, 1.000000e-30
%7 = and i1 %5, %6
br i1 %7, label %12, label %8
8: ; preds = %2
%9 = load double, double* %0
%10 = fneg double %9
%11 = fdiv double %10, %4
store double %11, double* %1
br label %12
12: ; preds = %2, %8
%13 = phi i32 [ 1, %8 ], [ 0, %2 ]
ret i32 %13
}
main() {
  int x[4];
  return (-2)[x] - 2 [x];
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x28(%rbp),%eax
sub    -0x18(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i32]
store i32 0, i32* %1
%3 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 -2
%4 = load i32, i32* %3
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 2
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @main() {
ret i32 poison
}
/* Variables and functions */
int iFunAdd(int, int);
int iFunSub(int, int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  printf("1 + 3 = %d\n", iFunAdd(1, 3));
  printf("3 - 1 = %d\n", iFunSub(3, 1));
  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)
mov    $0x1,%edi
mov    $0x3,%esi
call   1050 <iFunAdd@plt>
mov    %eax,%esi
lea    0xea2(%rip),%rdi
call   1040 <printf@plt>
mov    $0x3,%edi
mov    $0x1,%esi
call   1030 <iFunSub@plt>
mov    %eax,%esi
lea    0xe91(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x3,%esi
call   1050 <iFunAdd@plt>
lea    0xeb9(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x3,%edi
mov    $0x1,%esi
call   1030 <iFunSub@plt>
lea    0xea8(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"1 + 3 = %d\0A\00"
@.str.1 = [12 x i8] c"3 - 1 = %d\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 @iFunAdd(i32 1, i32 3)
%7 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call i32 @iFunSub(i32 3, i32 1)
%9 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"1 + 3 = %d\0A\00"
@.str.1 = [12 x i8] c"3 - 1 = %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @iFunAdd(i32 1, i32 3)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @iFunSub(i32 3, i32 1)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
int ld_le_mm2(long double *a1, long double *a2) { return !(((*a1) <= (*a2))); }


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

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

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

LLVM IR (-O2):
define i32 @ld_le_mm2(x86_fp80* nocapture %0, x86_fp80* nocapture %1) {
%3 = load x86_fp80, x86_fp80* %0
%4 = load x86_fp80, x86_fp80* %1
%5 = fcmp ugt x86_fp80 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
int c_int2eiffel(void) { return -6; }


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

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

LLVM IR (-O0):
define i32 @c_int2eiffel() {
ret i32 -6
}

LLVM IR (-O2):
define i32 @c_int2eiffel() {
ret i32 -6
}
void SteamAPI_ISteamMusic_Pause(void *self) {
  xlogf("%s(self = %p)", __func__, self);
}


x86 assembly (clang, -O0):
<SteamAPI_ISteamMusic_Pause>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0xed9(%rip),%rdi
lea    0xee0(%rip),%rsi
mov    $0x0,%al
call   1030 <xlogf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SteamAPI_ISteamMusic_Pause>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeed(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"%s(self = %p)\00"
@__func__.SteamAPI_ISteamMusic_Pause = [27 x i8] c"SteamAPI_ISteamMusic_Pause\00"
define void @SteamAPI_ISteamMusic_Pause(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @__func__.SteamAPI_ISteamMusic_Pause, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"%s(self = %p)\00"
@__func__.SteamAPI_ISteamMusic_Pause = [27 x i8] c"SteamAPI_ISteamMusic_Pause\00"
define void @SteamAPI_ISteamMusic_Pause(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @__func__.SteamAPI_ISteamMusic_Pause, i64 0, i64 0), i8* %0)
ret void
}
int fstat(int _fd, struct stat *_sbuf) { return -1; }


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

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

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

LLVM IR (-O2):
%struct.stat = type opaque
define i32 @fstat(i32 %0, %struct.stat* nocapture readnone %1) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ GPIOPinWrite(int, int, int);
int /*<<< orphan*/ LCD_set_pos(int, int);
void LCD_draw_point(int row, int column) {
  LCD_set_pos(row, column);
  GPIOPinWrite(0x40004000, 0x00000008, 0x00);
  GPIOPinWrite(0x40004000, 0x00000004, 0xff);
  GPIOPinWrite(0x40004000, 0x00000008, 0xff);
}


x86 assembly (clang, -O0):
<LCD_draw_point>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <LCD_set_pos@plt>
mov    $0x40004000,%edi
mov    $0x8,%esi
xor    %edx,%edx
call   1030 <GPIOPinWrite@plt>
mov    $0x40004000,%edi
mov    $0x4,%esi
mov    $0xff,%edx
call   1030 <GPIOPinWrite@plt>
mov    $0x40004000,%edi
mov    $0x8,%esi
mov    $0xff,%edx
call   1030 <GPIOPinWrite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCD_draw_point>:
push   %rax
call   1040 <LCD_set_pos@plt>
mov    $0x40004000,%edi
mov    $0x8,%esi
xor    %edx,%edx
call   1030 <GPIOPinWrite@plt>
mov    $0x40004000,%edi
mov    $0x4,%esi
mov    $0xff,%edx
call   1030 <GPIOPinWrite@plt>
mov    $0x40004000,%edi
mov    $0x8,%esi
mov    $0xff,%edx
pop    %rax
jmp    1030 <GPIOPinWrite@plt>

LLVM IR (-O0):
define void @LCD_draw_point(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @LCD_set_pos(i32 %5, i32 %6)
%8 = call i32 @GPIOPinWrite(i32 1073758208, i32 8, i32 0)
%9 = call i32 @GPIOPinWrite(i32 1073758208, i32 4, i32 255)
%10 = call i32 @GPIOPinWrite(i32 1073758208, i32 8, i32 255)
ret void
}

LLVM IR (-O2):
define void @LCD_draw_point(i32 %0, i32 %1) {
%3 = tail call i32 @LCD_set_pos(i32 %0, i32 %1)
%4 = tail call i32 @GPIOPinWrite(i32 1073758208, i32 8, i32 0)
%5 = tail call i32 @GPIOPinWrite(i32 1073758208, i32 4, i32 255)
%6 = tail call i32 @GPIOPinWrite(i32 1073758208, i32 8, i32 255)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mpz_t;

/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *mpz_get_str(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
size_t strlen(char *);
size_t mpz_len(mpz_t i) {
  char *tmp = mpz_get_str(NULL, 10, i);
  size_t len = strlen(tmp);
  free(tmp);
  return len;
}


x86 assembly (clang, -O0):
<mpz_len>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
xor    %eax,%eax
mov    %eax,%edi
mov    $0xa,%esi
call   1050 <mpz_get_str@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpz_len>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%edx
xor    %edi,%edi
mov    $0xa,%esi
call   1050 <mpz_get_str@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <strlen@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @mpz_len(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call i8* @mpz_get_str(i32* null, i32 10, i32 %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = call i64 @strlen(i8* %7)
store i64 %8, i64* %4
%9 = load i8*, i8** %3
%10 = call i32 @free(i8* %9)
%11 = load i64, i64* %4
ret i64 %11
}

LLVM IR (-O2):
define i64 @mpz_len(i32 %0) {
%2 = tail call i8* @mpz_get_str(i32* null, i32 10, i32 %0)
%3 = tail call i64 @strlen(i8* dereferenceable(1) %2)
%4 = tail call i32 @free(i8* %2)
ret i64 %3
}
int findfatfile(char *ins) { return 0; }


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

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

LLVM IR (-O0):
define i32 @findfatfile(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i32 0
}

LLVM IR (-O2):
define i32 @findfatfile(i8* nocapture readnone %0) {
ret i32 0
}
void osPanic(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<osPanic>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <osPanic+0x9>
jmp    1109 <osPanic+0x9>

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

LLVM IR (-O0):
define void @osPanic() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @osPanic() {
br label %1
1: ; preds = %0, %1
br label %1
}
unsigned int hashMap_indexFor(unsigned int h, unsigned int length) {
  return h & (length - 1);
}


x86 assembly (clang, -O0):
<hashMap_indexFor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashMap_indexFor>:
lea    -0x1(%rsi),%eax
and    %edi,%eax
ret

LLVM IR (-O0):
define i32 @hashMap_indexFor(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sub i32 %6, 1
%8 = and i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @hashMap_indexFor(i32 %0, i32 %1) {
%3 = add i32 %1, -1
%4 = and i32 %3, %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void sig_intr(int signo) { printf("in sig_intr:\n"); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"in sig_intr:\0A\00"
define void @sig_intr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [13 x i8] c"in sig_intr:\00"
define void @sig_intr(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct tm {
  int tm_gmtoff;
};

/* Variables and functions */
int tm_getutcoffset(struct tm date) { return date.tm_gmtoff; }


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

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

LLVM IR (-O0):
%struct.tm = type { i32 }
define i32 @tm_getutcoffset(i32 %0) {
%2 = alloca %struct.tm
%3 = getelementptr inbounds %struct.tm, %struct.tm* %2, i32 0, i32 0
store i32 %0, i32* %3
%4 = getelementptr inbounds %struct.tm, %struct.tm* %2, i32 0, i32 0
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @tm_getutcoffset(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void sigterm_handler(int signo) {
  printf("Entering SIGTERM handler ...\n");
  printf("Exiting SIGTERM handler ...\n");
}


x86 assembly (clang, -O0):
<sigterm_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigterm_handler>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef9(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"Entering SIGTERM handler ...\0A\00"
@.str.1 = [29 x i8] c"Exiting SIGTERM handler ...\0A\00"
define void @sigterm_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [29 x i8] c"Entering SIGTERM handler ...\00"
@str.2 = [28 x i8] c"Exiting SIGTERM handler ...\00"
define void @sigterm_handler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
size_t chrsw(char const *, size_t const);
size_t utf8_chrw(char const *);
size_t utf8_strsw(const char str[]) {
  size_t length = 0;
  while (*str != '\0') {
    const size_t char_width = utf8_chrw(str);
    const size_t char_screen_width = chrsw(str, char_width);
    str += char_width;
    length += char_screen_width;
  }
  return length;
}


x86 assembly (clang, -O0):
<utf8_strsw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     117f <utf8_strsw+0x5f>
mov    -0x8(%rbp),%rdi
call   1040 <utf8_chrw@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <chrsw@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x20(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1134 <utf8_strsw+0x14>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utf8_strsw>:
push   %r15
push   %r14
push   %rbx
cmpb   $0x0,(%rdi)
je     1156 <utf8_strsw+0x36>
mov    %rdi,%rbx
xor    %r14d,%r14d
mov    %rbx,%rdi
call   1040 <utf8_chrw@plt>
mov    %rax,%r15
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <chrsw@plt>
add    %rax,%r14
cmpb   $0x0,(%rbx,%r15,1)
lea    (%rbx,%r15,1),%rbx
jne    1130 <utf8_strsw+0x10>
jmp    1159 <utf8_strsw+0x39>
xor    %r14d,%r14d
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i64 @utf8_strsw(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %9, %4 ], [ %0, %1 ]
%6 = phi i64 [ %10, %4 ], [ 0, %1 ]
%7 = tail call i64 @utf8_chrw(i8* %5)
%8 = tail call i64 @chrsw(i8* %5, i64 %7)
%9 = getelementptr inbounds i8, i8* %5, i64 %7
%10 = add i64 %8, %6
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
%14 = phi i64 [ 0, %1 ], [ %10, %4 ]
ret i64 %14
}
int mbed_error(int error_status, const char *error_msg,
               unsigned int error_value, const char *filename,
               int line_number) {
  return 0;
}


x86 assembly (clang, -O0):
<mbed_error>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @mbed_error(i32 %0, i8* %1, i32 %2, i8* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
store i32 %0, i32* %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i32 %4, i32* %10
ret i32 0
}

LLVM IR (-O2):
define i32 @mbed_error(i32 %0, i8* nocapture readnone %1, i32 %2, i8* nocapture readnone %3, i32 %4) {
ret i32 0
}
/* Variables and functions */
scalar_t__ RAND_MAX;
scalar_t__ rand();
double random_double() { return ((double)rand()) / ((double)RAND_MAX); }


x86 assembly (clang, -O0):
<random_double>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec1(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_double>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec4(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define double @random_double() {
%1 = call i64 (...) @rand()
%2 = sitofp i64 %1 to double
%3 = load i64, i64* @RAND_MAX
%4 = sitofp i64 %3 to double
%5 = fdiv double %2, %4
ret double %5
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define double @random_double() {
%1 = tail call i64 (...) @rand()
%2 = sitofp i64 %1 to double
%3 = load i64, i64* @RAND_MAX
%4 = sitofp i64 %3 to double
%5 = fdiv double %2, %4
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
txt_trackend() { printf("Track end\n"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"Track end\0A\00"
define i32 @txt_trackend() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [10 x i8] c"Track end\00"
define i32 @txt_trackend() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
int compd(const void *a, const void *b) {
  return (*(double *)a - *(double *)b);
}


x86 assembly (clang, -O0):
<compd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  (%rax),%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compd>:
movsd  (%rdi),%xmm0
subsd  (%rsi),%xmm0
cvttsd2si %xmm0,%eax
ret

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

LLVM IR (-O2):
define i32 @compd(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fsub double %4, %6
%8 = fptosi double %7 to i32
ret i32 %8
}
unsigned int _uiGetVLines(void) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @_uiGetVLines() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar_fd(char const, int);
void ft_putstr_fd(char const *s, int fd) {
  if (!s || !(*s))
    return;
  ft_putchar_fd(*s, fd);
  ft_putstr_fd(s + 1, fd);
}


x86 assembly (clang, -O0):
<ft_putstr_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1147 <ft_putstr_fd+0x27>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
jne    114c <ft_putstr_fd+0x2c>
jmp    116d <ft_putstr_fd+0x4d>
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    -0xc(%rbp),%esi
movsbl %al,%edi
call   1040 <ft_putchar_fd@plt>
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
mov    -0xc(%rbp),%esi
call   1030 <ft_putstr_fd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putstr_fd>:
push   %rbp
push   %rbx
push   %rax
test   %rdi,%rdi
je     1145 <ft_putstr_fd+0x35>
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1145 <ft_putstr_fd+0x35>
mov    %esi,%ebp
add    $0x1,%rbx
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
mov    %ebp,%esi
call   1030 <ft_putchar_fd@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <ft_putstr_fd+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @ft_putstr_fd(i8* %0, i32 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %14, label %4
4: ; preds = %2
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, 0
br i1 %6, label %14, label %7
7: ; preds = %4, %7
%8 = phi i8 [ %12, %7 ], [ %5, %4 ]
%9 = phi i8* [ %11, %7 ], [ %0, %4 ]
%10 = tail call i32 @ft_putchar_fd(i8 signext %8, i32 %1)
%11 = getelementptr inbounds i8, i8* %9, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %7
14: ; preds = %7, %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _Error(long, char *);
void Error_ListExpressionTooLong(long p_position) {
  _Error(p_position, "List expressions can have at most 254 elements");
}


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

x86 assembly (clang, -O2):
<Error_ListExpressionTooLong>:
lea    0xee9(%rip),%rsi
jmp    1030 <_Error@plt>

LLVM IR (-O0):
@.str = [47 x i8] c"List expressions can have at most 254 elements\00"
define void @Error_ListExpressionTooLong(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @_Error(i64 %3, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [47 x i8] c"List expressions can have at most 254 elements\00"
define void @Error_ListExpressionTooLong(i64 %0) {
%2 = tail call i32 @_Error(i64 %0, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) { printf("Hello, World\n"); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello, World\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"Hello, World\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
char *date_now16(int);
char *date_time_now(int utc_offset) { return date_now16(utc_offset); }


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

x86 assembly (clang, -O2):
<date_time_now>:
jmp    1030 <date_now16@plt>

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

LLVM IR (-O2):
define i8* @date_time_now(i32 %0) {
%2 = tail call i8* @date_now16(i32 %0)
ret i8* %2
}
/* Type definitions */
struct Cyc_Absyn_Exp {
  int dummy;
};

/* Variables and functions */
struct Cyc_Absyn_Exp *Cyc_Absyn_prim2_exp(unsigned int, struct Cyc_Absyn_Exp *,
                                          struct Cyc_Absyn_Exp *, unsigned int);
struct Cyc_Absyn_Exp *Cyc_Absyn_ugt_exp(struct Cyc_Absyn_Exp *e1,
                                        struct Cyc_Absyn_Exp *e2,
                                        unsigned loc) {
  struct Cyc_Absyn_Exp *_T0;
  _T0 = Cyc_Absyn_prim2_exp(22U, e1, e2, loc);
  return _T0;
}


x86 assembly (clang, -O0):
<Cyc_Absyn_ugt_exp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0x16,%edi
call   1030 <Cyc_Absyn_prim2_exp@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Absyn_ugt_exp>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x16,%edi
jmp    1030 <Cyc_Absyn_prim2_exp@plt>

LLVM IR (-O0):
%struct.Cyc_Absyn_Exp = type { i32 }
define %struct.Cyc_Absyn_Exp* @Cyc_Absyn_ugt_exp(%struct.Cyc_Absyn_Exp* %0, %struct.Cyc_Absyn_Exp* %1, i32 %2) {
%4 = alloca %struct.Cyc_Absyn_Exp*
%5 = alloca %struct.Cyc_Absyn_Exp*
%6 = alloca i32
%7 = alloca %struct.Cyc_Absyn_Exp*
store %struct.Cyc_Absyn_Exp* %0, %struct.Cyc_Absyn_Exp** %4
store %struct.Cyc_Absyn_Exp* %1, %struct.Cyc_Absyn_Exp** %5
store i32 %2, i32* %6
%8 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %4
%9 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %5
%10 = load i32, i32* %6
%11 = call %struct.Cyc_Absyn_Exp* @Cyc_Absyn_prim2_exp(i32 22, %struct.Cyc_Absyn_Exp* %8, %struct.Cyc_Absyn_Exp* %9, i32 %10)
store %struct.Cyc_Absyn_Exp* %11, %struct.Cyc_Absyn_Exp** %7
%12 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %7
ret %struct.Cyc_Absyn_Exp* %12
}

LLVM IR (-O2):
%struct.Cyc_Absyn_Exp = type { i32 }
define %struct.Cyc_Absyn_Exp* @Cyc_Absyn_ugt_exp(%struct.Cyc_Absyn_Exp* %0, %struct.Cyc_Absyn_Exp* %1, i32 %2) {
%4 = tail call %struct.Cyc_Absyn_Exp* @Cyc_Absyn_prim2_exp(i32 22, %struct.Cyc_Absyn_Exp* %0, %struct.Cyc_Absyn_Exp* %1, i32 %2)
ret %struct.Cyc_Absyn_Exp* %4
}
/* Variables and functions */
int /*<<< orphan*/ sort2(int *, int *);
void sort3(int *a, int *b, int *c) {
  sort2(a, b);
  sort2(b, c);
  sort2(a, b);
}


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

x86 assembly (clang, -O2):
<sort3>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
call   1030 <sort2@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <sort2@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <sort2@plt>

LLVM IR (-O0):
define void @sort3(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i32*, i32** %4
%8 = load i32*, i32** %5
%9 = call i32 @sort2(i32* %7, i32* %8)
%10 = load i32*, i32** %5
%11 = load i32*, i32** %6
%12 = call i32 @sort2(i32* %10, i32* %11)
%13 = load i32*, i32** %4
%14 = load i32*, i32** %5
%15 = call i32 @sort2(i32* %13, i32* %14)
ret void
}

LLVM IR (-O2):
define void @sort3(i32* %0, i32* %1, i32* %2) {
%4 = tail call i32 @sort2(i32* %0, i32* %1)
%5 = tail call i32 @sort2(i32* %1, i32* %2)
%6 = tail call i32 @sort2(i32* %0, i32* %1)
ret void
}
/* Type definitions */
struct gnode {
  int dummy;
};

/* Variables and functions */
void createGraph(struct gnode **adj, int num) {
  int i;
  for (i = 0; i < num; i++) {
    adj[i] = NULL;
  }
}


x86 assembly (clang, -O0):
<createGraph>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    113c <createGraph+0x3c>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <createGraph+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<createGraph>:
test   %esi,%esi
jle    1126 <createGraph+0x16>
push   %rax
mov    %esi,%edx
shl    $0x3,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
%struct.gnode = type { i32 }
define void @createGraph(%struct.gnode** %0, i32 %1) {
%3 = alloca %struct.gnode**
%4 = alloca i32
%5 = alloca i32
store %struct.gnode** %0, %struct.gnode*** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %15, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %18
10: ; preds = %6
%11 = load %struct.gnode**, %struct.gnode*** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds %struct.gnode*, %struct.gnode** %11, i64 %13
store %struct.gnode* null, %struct.gnode** %14
br label %15
15: ; preds = %10
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
store i32 %17, i32* %5
br label %6
18: ; preds = %6
ret void
}

LLVM IR (-O2):
%struct.gnode = type { i32 }
define void @createGraph(%struct.gnode** nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = bitcast %struct.gnode** %0 to i8*
%6 = zext i32 %1 to i64
%7 = shl nuw nsw i64 %6, 3
br label %8
8: ; preds = %4, %2
ret void
}
nocrypt() {}


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

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

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

LLVM IR (-O2):
define i32 @nocrypt() {
ret i32 undef
}
/* Variables and functions */
int const rand();
int randn(int const min, int const max) {
  return min + rand() % (max - min + 1);
}


x86 assembly (clang, -O0):
<randn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    -0x8(%rbp),%ecx
sub    -0x4(%rbp),%ecx
add    $0x1,%ecx
cltd
idiv   %ecx
mov    -0xc(%rbp),%eax
add    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randn>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <rand@plt>
sub    %ebp,%ebx
add    $0x1,%ebx
cltd
idiv   %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @randn(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 (...) @rand()
%7 = load i32, i32* %4
%8 = load i32, i32* %3
%9 = sub nsw i32 %7, %8
%10 = add nsw i32 %9, 1
%11 = srem i32 %6, %10
%12 = add nsw i32 %5, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @randn(i32 %0, i32 %1) {
%3 = tail call i32 (...) @rand()
%4 = sub i32 1, %0
%5 = add i32 %4, %1
%6 = srem i32 %3, %5
%7 = add nsw i32 %6, %0
ret i32 %7
}
void rop3_213_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = T & S;
  stk2 = ~stk2;
  stk1 = *D & stk2;
  stk1 = ~stk1;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_213_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_213_1_0>:
xor    (%rdi),%sil
not    %sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_213_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8, i8* %6
%10 = zext i8 %9 to i32
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = and i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %8
%15 = load i8, i8* %8
%16 = zext i8 %15 to i32
%17 = xor i32 %16, -1
%18 = trunc i32 %17 to i8
store i8 %18, i8* %8
%19 = load i8*, i8** %4
%20 = load i8, i8* %19
%21 = zext i8 %20 to i32
%22 = load i8, i8* %8
%23 = zext i8 %22 to i32
%24 = and i32 %21, %23
%25 = trunc i32 %24 to i8
store i8 %25, i8* %7
%26 = load i8, i8* %7
%27 = zext i8 %26 to i32
%28 = xor i32 %27, -1
%29 = trunc i32 %28 to i8
store i8 %29, i8* %7
%30 = load i8, i8* %7
%31 = zext i8 %30 to i32
%32 = load i8, i8* %5
%33 = zext i8 %32 to i32
%34 = xor i32 %33, -1
%35 = and i32 %31, %34
%36 = load i8*, i8** %4
%37 = load i8, i8* %36
%38 = zext i8 %37 to i32
%39 = load i8, i8* %5
%40 = zext i8 %39 to i32
%41 = and i32 %38, %40
%42 = or i32 %35, %41
%43 = trunc i32 %42 to i8
%44 = load i8*, i8** %4
store i8 %43, i8* %44
ret void
}

LLVM IR (-O2):
define void @rop3_213_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %1
%6 = xor i8 %5, -1
store i8 %6, i8* %0
ret void
}
__attribute__((weak)) int get_instrumentation(unsigned long addr,
                                              enum lttng_mcount_patch *status) {
  return -1;
}


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

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

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

LLVM IR (-O2):
define weak i32 @get_instrumentation(i64 %0, i32* %1) {
ret i32 -1
}
/* Variables and functions */
int psw_read_bit(int);
int psw_read_ov(void) { return psw_read_bit(2); }


x86 assembly (clang, -O0):
<psw_read_ov>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1030 <psw_read_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<psw_read_ov>:
mov    $0x2,%edi
jmp    1030 <psw_read_bit@plt>

LLVM IR (-O0):
define i32 @psw_read_ov() {
%1 = call i32 @psw_read_bit(i32 2)
ret i32 %1
}

LLVM IR (-O2):
define i32 @psw_read_ov() {
%1 = tail call i32 @psw_read_bit(i32 2)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float f, c;
  printf("Digite a temperatura em °F\n");
  scanf("%f", &f);
  c = f - 32;
  printf("%f graus °C \n", c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
movss  0xea6(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeb1(%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    0xede(%rip),%rdi
call   1030 <puts@plt>
lea    0xec0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
movss  0x4(%rsp),%xmm0
addss  0xea4(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xea0(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Digite a temperatura em \C2\B0F\0A\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [15 x i8] c"%f graus \C2\B0C \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%6 = load float, float* %2
%7 = fsub float %6, 3.200000e+01
store float %7, float* %3
%8 = load float, float* %3
%9 = fpext float %8 to double
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), double %9)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [15 x i8] c"%f graus \C2\B0C \0A\00"
@str = [28 x i8] c"Digite a temperatura em \C2\B0F\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 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 = fadd float %5, -3.200000e+01
%7 = fpext float %6 to double
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), double %7)
ret i32 0
}
/* Variables and functions */
int is_valid_in_UndSecAltIDGrp(size_t __tag) {
  switch (__tag) {
  case 458:
  case 459:
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<is_valid_in_UndSecAltIDGrp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0xfffffffffffffe36,%rax
sub    $0x1,%rax
ja     112d <is_valid_in_UndSecAltIDGrp+0x2d>
jmp    1121 <is_valid_in_UndSecAltIDGrp+0x21>
movl   $0x1,-0x4(%rbp)
jmp    1134 <is_valid_in_UndSecAltIDGrp+0x34>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_valid_in_UndSecAltIDGrp>:
and    $0xfffffffffffffffe,%rdi
xor    %eax,%eax
cmp    $0x1ca,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @is_valid_in_UndSecAltIDGrp(i64 %0) {
%2 = alloca i32
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
switch i64 %4, label %6 [
i64 458, label %5
i64 459, label %5
]
5: ; preds = %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @is_valid_in_UndSecAltIDGrp(i64 %0) {
%2 = and i64 %0, -2
%3 = icmp eq i64 %2, 458
%4 = zext i1 %3 to i32
ret i32 %4
}