xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x5b() {
  Assert_real((isdigit(91) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isdigit.c",
              460, ("isdigit should be 0 for ["));
}


x86 assembly (clang, -O0):
<t_isdigit_0x5b>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5b,%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x1cc,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isdigit_0x5b>:
push   %rax
mov    $0x5b,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1cc,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for [\00"
define void @t_isdigit_0x5b() {
%1 = call i64 @isdigit(i32 91)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 460, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for [\00"
define void @t_isdigit_0x5b() {
%1 = tail call i64 @isdigit(i32 91)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 460, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ halTimerClearAllInterrupts(int);
void sysTimerResetInterrupt() { halTimerClearAllInterrupts(0x48086000); }


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

x86 assembly (clang, -O2):
<sysTimerResetInterrupt>:
mov    $0x48086000,%edi
jmp    1030 <halTimerClearAllInterrupts@plt>

LLVM IR (-O0):
define void @sysTimerResetInterrupt() {
%1 = call i32 @halTimerClearAllInterrupts(i32 1208508416)
ret void
}

LLVM IR (-O2):
define void @sysTimerResetInterrupt() {
%1 = tail call i32 @halTimerClearAllInterrupts(i32 1208508416)
ret void
}
const char *ATest() { return "This is A"; }


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"This is A\00"
define i8* @ATest() {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [10 x i8] c"This is A\00"
define i8* @ATest() {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
long long *malloc(int);
int main(void) {
  long long *p = malloc(sizeof(long long));
  *p = 5;
  *p = *(short *)p;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x8,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movq   $0x5,(%rax)
mov    -0x10(%rbp),%rax
movswq (%rax),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x8,%edi
call   1030 <malloc@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64*
store i32 0, i32* %1
%3 = call i64* @malloc(i32 8)
store i64* %3, i64** %2
%4 = load i64*, i64** %2
store i64 5, i64* %4
%5 = load i64*, i64** %2
%6 = bitcast i64* %5 to i16*
%7 = load i16, i16* %6
%8 = sext i16 %7 to i64
%9 = load i64*, i64** %2
store i64 %8, i64* %9
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64* @malloc(i32 8)
ret i32 0
}
/* Type definitions */
struct nl_handle {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ nl_handle_destroy(struct nl_handle *);
void nl_socket_free(struct nl_handle *h) { nl_handle_destroy(h); }


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

x86 assembly (clang, -O2):
<nl_socket_free>:
jmp    1030 <nl_handle_destroy@plt>

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

LLVM IR (-O2):
%struct.nl_handle = type { i32 }
define void @nl_socket_free(%struct.nl_handle* %0) {
%2 = tail call i32 @nl_handle_destroy(%struct.nl_handle* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, int *, char *);
int main() {
  int a;
  char c[10];
  scanf("%d%s", &a, c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x12(%rbp),%rdx
lea    0xed6(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <scanf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xee5(%rip),%rdi
lea    0x8(%rsp),%rsi
lea    0xe(%rsp),%rdx
call   1030 <scanf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%d%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [10 x i8]
store i32 0, i32* %1
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %2, i8* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i8]
%3 = bitcast i32* %1 to i8*
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i8* %4)
ret i32 0
}
int modInverse(int a, int m) {
  a = a % m;
  for (int x = 1; x < m; x++)
    if ((a * x) % m == 1)
      return x;
  return -1;
}


x86 assembly (clang, -O0):
<modInverse>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x8(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <modInverse+0x59>
mov    -0x8(%rbp),%eax
imul   -0x10(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x1,%edx
jne    1146 <modInverse+0x46>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1160 <modInverse+0x60>
jmp    114b <modInverse+0x4b>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    111b <modInverse+0x1b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<modInverse>:
mov    %edi,%eax
cltd
idiv   %esi
mov    $0xffffffff,%r8d
cmp    $0x2,%esi
jl     1134 <modInverse+0x34>
mov    %edx,%r9d
mov    $0x1,%ecx
mov    %edx,%edi
nopw   0x0(%rax,%rax,1)
mov    %edi,%eax
cltd
idiv   %esi
cmp    $0x1,%edx
je     1138 <modInverse+0x38>
add    $0x1,%ecx
add    %r9d,%edi
cmp    %ecx,%esi
jne    1120 <modInverse+0x20>
mov    %r8d,%eax
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @modInverse(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
%4 = icmp sgt i32 %1, 1
br i1 %4, label %5, label %13
5: ; preds = %2, %10
%6 = phi i32 [ %11, %10 ], [ 1, %2 ]
%7 = mul nsw i32 %6, %3
%8 = srem i32 %7, %1
%9 = icmp eq i32 %8, 1
br i1 %9, label %13, label %10
10: ; preds = %5
%11 = add nuw nsw i32 %6, 1
%12 = icmp eq i32 %11, %1
br i1 %12, label %13, label %5
13: ; preds = %10, %5, %2
%14 = phi i32 [ -1, %2 ], [ %6, %5 ], [ -1, %10 ]
ret i32 %14
}
/* Variables and functions */
double const M_PI;
int sin(double const);
double Etriv(const double d12, const double d34) {
  return 4 * sin(M_PI * (d12 + d34)) * sin(M_PI * (d12 - d34));
}


x86 assembly (clang, -O0):
<Etriv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    0x2ebf(%rip),%rax
movsd  (%rax),%xmm0
movsd  -0x8(%rbp),%xmm1
addsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
call   1030 <sin@plt>
shl    $0x2,%eax
mov    %eax,-0x14(%rbp)
mov    0x2e9b(%rip),%rax
movsd  (%rax),%xmm0
movsd  -0x8(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
call   1030 <sin@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
imul   %ecx,%eax
cvtsi2sd %eax,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Etriv>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm1,(%rsp)
movsd  %xmm0,0x8(%rsp)
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
mulsd  %xmm1,%xmm0
call   1030 <sin@plt>
mov    %eax,%ebx
movsd  0x8(%rsp),%xmm0
subsd  (%rsp),%xmm0
mulsd  0xeba(%rip),%xmm0
call   1030 <sin@plt>
imul   %ebx,%eax
shl    $0x2,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@M_PI = constant double 0.000000e+00
define double @Etriv(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* @M_PI
%6 = load double, double* %3
%7 = load double, double* %4
%8 = fadd double %6, %7
%9 = fmul double %5, %8
%10 = call i32 @sin(double %9)
%11 = mul nsw i32 4, %10
%12 = load double, double* @M_PI
%13 = load double, double* %3
%14 = load double, double* %4
%15 = fsub double %13, %14
%16 = fmul double %12, %15
%17 = call i32 @sin(double %16)
%18 = mul nsw i32 %11, %17
%19 = sitofp i32 %18 to double
ret double %19
}

LLVM IR (-O2):
@M_PI = constant double 0.000000e+00
define double @Etriv(double %0, double %1) {
%3 = fadd double %0, %1
%4 = fmul double %3, 0.000000e+00
%5 = tail call i32 @sin(double %4)
%6 = shl nsw i32 %5, 2
%7 = fsub double %0, %1
%8 = fmul double %7, 0.000000e+00
%9 = tail call i32 @sin(double %8)
%10 = mul nsw i32 %6, %9
%11 = sitofp i32 %10 to double
ret double %11
}
int double_fft_idft(double *dat, int cnt) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @double_fft_idft(double* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
double M_PI;
double sin(double);
double iterate(double x_n) { return (2.3 * x_n * x_n * sin(M_PI * x_n)); }


x86 assembly (clang, -O0):
<iterate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    0x2ead(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iterate>:
push   %rax
movsd  0xee7(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
mov    0x2ebb(%rip),%rax
mulsd  (%rax),%xmm0
call   1030 <sin@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @iterate(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double 2.300000e+00, %3
%5 = load double, double* %2
%6 = fmul double %4, %5
%7 = load double, double* @M_PI
%8 = load double, double* %2
%9 = fmul double %7, %8
%10 = call double @sin(double %9)
%11 = fmul double %6, %10
ret double %11
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @iterate(double %0) {
%2 = fmul double %0, 2.300000e+00
%3 = fmul double %2, %0
%4 = load double, double* @M_PI
%5 = fmul double %4, %0
%6 = tail call double @sin(double %5)
%7 = fmul double %3, %6
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *);
int /*<<< orphan*/ debug_init();
int /*<<< orphan*/ usb_poll();
void main(void) {
  debug_init();
  debug("\r\n\r\nlibci20 firmware\r\n");
  while (1) {
    usb_poll();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <debug_init@plt>
lea    0xebe(%rip),%rdi
call   1050 <debug@plt>
mov    $0x0,%al
call   1030 <usb_poll@plt>
jmp    1147 <main+0x17>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <debug_init@plt>
lea    0xec1(%rip),%rdi
call   1050 <debug@plt>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1030 <usb_poll@plt>
jmp    1150 <main+0x20>

LLVM IR (-O0):
@.str = [23 x i8] c"\0D\0A\0D\0Alibci20 firmware\0D\0A\00"
define void @main() {
%1 = call i32 (...) @debug_init()
%2 = call i32 @debug(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %3
3: ; preds = %0, %3
%4 = call i32 (...) @usb_poll()
br label %3
}

LLVM IR (-O2):
@.str = [23 x i8] c"\0D\0A\0D\0Alibci20 firmware\0D\0A\00"
define void @main() {
%1 = tail call i32 (...) @debug_init()
%2 = tail call i32 @debug(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %3
3: ; preds = %0, %3
%4 = tail call i32 (...) @usb_poll()
br label %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint;

/* Variables and functions */
int /*<<< orphan*/ len_squared_vnvn(double const *, double const *,
                                    int /*<<< orphan*/ const);
double sqrt(int /*<<< orphan*/);
double len_vnvn(const double v0[], const double v1[], const uint dims) {
  return sqrt(len_squared_vnvn(v0, v1, dims));
}


x86 assembly (clang, -O0):
<len_vnvn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <len_squared_vnvn@plt>
mov    %eax,%edi
call   1040 <sqrt@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define double @len_vnvn(double* %0, double* %1, i32 %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca i32
store double* %0, double** %4
store double* %1, double** %5
store i32 %2, i32* %6
%7 = load double*, double** %4
%8 = load double*, double** %5
%9 = load i32, i32* %6
%10 = call i32 @len_squared_vnvn(double* %7, double* %8, i32 %9)
%11 = call double @sqrt(i32 %10)
ret double %11
}

LLVM IR (-O2):
define double @len_vnvn(double* %0, double* %1, i32 %2) {
%4 = tail call i32 @len_squared_vnvn(double* %0, double* %1, i32 %2)
%5 = tail call double @sqrt(i32 %4)
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void out(char *s) { printf("%s", s); }


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

x86 assembly (clang, -O2):
<out>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @out(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void ff_hevc_put_hevc_uni_qpel_v64_10_avx2() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ st_pop(struct forth_instance *);
void drop(struct forth_instance *fi) { st_pop(fi); }


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

x86 assembly (clang, -O2):
<drop>:
jmp    1030 <st_pop@plt>

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

LLVM IR (-O2):
%struct.forth_instance = type { i32 }
define void @drop(%struct.forth_instance* %0) {
%2 = tail call i32 @st_pop(%struct.forth_instance* %0)
ret void
}
/* Variables and functions */
int TEMP_ds18b20_read(char *);
int /*<<< orphan*/ TEMP_set_debug_level(int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int temp = 0;
  TEMP_set_debug_level((5));
  temp = TEMP_ds18b20_read("28-00042d9aa8ff");
  printf("Current temperature: %.3f degree\n", temp / 1000.0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    $0x5,%edi
call   1050 <TEMP_set_debug_level@plt>
lea    0xeaa(%rip),%rdi
call   1030 <TEMP_ds18b20_read@plt>
mov    %eax,-0x14(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  0xe8d(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
lea    0xe96(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1050 <TEMP_set_debug_level@plt>
lea    0xec6(%rip),%rdi
call   1030 <TEMP_ds18b20_read@plt>
cvtsi2sd %eax,%xmm0
divsd  0xead(%rip),%xmm0
cvttsd2si %xmm0,%esi
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"28-00042d9aa8ff\00"
@.str.1 = [34 x i8] c"Current temperature: %.3f degree\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%7 = call i32 @TEMP_set_debug_level(i32 5)
%8 = call i32 @TEMP_ds18b20_read(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
store i32 %8, i32* %6
%9 = load i32, i32* %6
%10 = sitofp i32 %9 to double
%11 = fdiv double %10, 1.000000e+03
%12 = fptosi double %11 to i32
%13 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"28-00042d9aa8ff\00"
@.str.1 = [34 x i8] c"Current temperature: %.3f degree\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @TEMP_set_debug_level(i32 5)
%4 = tail call i32 @TEMP_ds18b20_read(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%5 = sitofp i32 %4 to double
%6 = fdiv double %5, 1.000000e+03
%7 = fptosi double %6 to i32
%8 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret i32 0
}
__attribute__((always_)) int irq_set_affinity(unsigned int irq,
                                              const struct cpumask *m) {
  return -22;
}


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

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

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

LLVM IR (-O2):
%struct.cpumask = type opaque
define i32 @irq_set_affinity(i32 %0, %struct.cpumask* nocapture readnone %1) {
ret i32 -22
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int syscon_clear_dobldobl_Laurent_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(557, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_clear_dobldobl_Laurent_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x22d,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscon_clear_dobldobl_Laurent_system>:
mov    $0x22d,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

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

LLVM IR (-O2):
define i32 @syscon_clear_dobldobl_Laurent_system() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 557, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char *, int);
void fillbuf(char *buf, int count, char value) {
  while (count > 0) {
    strncpy(buf, &value, 1);
    buf++;
    count = count - 1;
  }
}


x86 assembly (clang, -O0):
<fillbuf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %al,-0xd(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    115a <fillbuf+0x4a>
mov    -0x8(%rbp),%rdi
lea    -0xd(%rbp),%rsi
mov    $0x1,%edx
call   1030 <strncpy@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1124 <fillbuf+0x14>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fillbuf>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %dl,0xf(%rsp)
test   %esi,%esi
jle    114c <fillbuf+0x3c>
mov    %esi,%ebp
mov    %rdi,%rbx
add    $0x1,%ebp
lea    0xf(%rsp),%r14
nopl   (%rax)
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x1,%edx
call   1030 <strncpy@plt>
add    $0x1,%rbx
add    $0xffffffff,%ebp
cmp    $0x1,%ebp
ja     1130 <fillbuf+0x20>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @fillbuf(i8* %0, i32 %1, i8 signext %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8 %2, i8* %6
br label %7
7: ; preds = %10, %3
%8 = load i32, i32* %5
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %17
10: ; preds = %7
%11 = load i8*, i8** %4
%12 = call i32 @strncpy(i8* %11, i8* %6, i32 1)
%13 = load i8*, i8** %4
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %4
%15 = load i32, i32* %5
%16 = sub nsw i32 %15, 1
store i32 %16, i32* %5
br label %7
17: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @fillbuf(i8* %0, i32 %1, i8 signext %2) {
%4 = alloca i8
store i8 %2, i8* %4
%5 = icmp sgt i32 %1, 0
br i1 %5, label %6, label %13
6: ; preds = %3, %6
%7 = phi i32 [ %11, %6 ], [ %1, %3 ]
%8 = phi i8* [ %10, %6 ], [ %0, %3 ]
%9 = call i32 @strncpy(i8* %8, i8* %4, i32 1)
%10 = getelementptr inbounds i8, i8* %8, i64 1
%11 = add nsw i32 %7, -1
%12 = icmp ugt i32 %7, 1
br i1 %12, label %6, label %13
13: ; preds = %6, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ startdisplay();
void start_main() { startdisplay(); }


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

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

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

LLVM IR (-O2):
define void @start_main() {
%1 = tail call i32 (...) @startdisplay()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ util_prg_print_parse_error();
int /*<<< orphan*/ warnx(char *, char const *, char const *);
void misc_print_required_parms(const char *parm_name1, const char *parm_name2) {
  warnx("Parameter '%s' or '%s' is required", parm_name1, parm_name2);
  util_prg_print_parse_error();
}


x86 assembly (clang, -O0):
<misc_print_required_parms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xec1(%rip),%rdi
call   1040 <warnx@plt>
mov    $0x0,%al
call   1030 <util_prg_print_parse_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<misc_print_required_parms>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xed2(%rip),%rdi
call   1040 <warnx@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <util_prg_print_parse_error@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"Parameter '%s' or '%s' is required\00"
define void @misc_print_required_parms(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 = load i8*, i8** %4
%7 = call i32 @warnx(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
%8 = call i32 (...) @util_prg_print_parse_error()
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"Parameter '%s' or '%s' is required\00"
define void @misc_print_required_parms(i8* %0, i8* %1) {
%3 = tail call i32 @warnx(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%4 = tail call i32 (...) @util_prg_print_parse_error()
ret void
}
/* Variables and functions */
int cmditem_stop(char const *);
int /*<<< orphan*/ printf(char *);
int cmditem_str_to_prio(const char *str) {
  printf("cmditem_str_to_prio() is deprecated. use cmditem_stop() instead.\n");
  return cmditem_stop(str);
}


x86 assembly (clang, -O0):
<cmditem_str_to_prio>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <cmditem_stop@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmditem_str_to_prio>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <cmditem_stop@plt>

LLVM IR (-O0):
@.str = [66 x i8] c"cmditem_str_to_prio() is deprecated. use cmditem_stop() instead.\0A\00"
define i32 @cmditem_str_to_prio(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @cmditem_stop(i8* %4)
ret i32 %5
}

LLVM IR (-O2):
@str = [65 x i8] c"cmditem_str_to_prio() is deprecated. use cmditem_stop() instead.\00"
define i32 @cmditem_str_to_prio(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @cmditem_stop(i8* %0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ _message(char const *, char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void file_message(const char *msg, const char *fn) {
  _message(msg, fn, stdout);
}


x86 assembly (clang, -O0):
<file_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
call   1030 <_message@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_message>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edx
jmp    1030 <_message@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @file_message(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 = load i8*, i8** %4
%7 = load i32, i32* @stdout
%8 = call i32 @_message(i8* %5, i8* %6, i32 %7)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @file_message(i8* %0, i8* %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @_message(i8* %0, i8* %1, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
void main() {
  float sum;
  int i;
  sum = 0;
  for (i = 1; i <= 100; i++) {
    sum += 0.1;
  }
  printf("%f\n", sum);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     115d <main+0x4d>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xebe(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1127 <main+0x17>
movss  -0x4(%rbp),%xmm0
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xorps  %xmm0,%xmm0
mov    $0x64,%eax
movsd  0xee0(%rip),%xmm1
cvtss2sd %xmm0,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0xfffffffb,%eax
jne    1120 <main+0x10>
lea    0xea0(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%f\0A\00"
define void @main() {
%1 = alloca float
%2 = alloca i32
store float 0.000000e+00, float* %1
store i32 1, i32* %2
br label %3
3: ; preds = %11, %0
%4 = load i32, i32* %2
%5 = icmp sle i32 %4, 100
br i1 %5, label %6, label %14
6: ; preds = %3
%7 = load float, float* %1
%8 = fpext float %7 to double
%9 = fadd double %8, 1.000000e-01
%10 = fptrunc double %9 to float
store float %10, float* %1
br label %11
11: ; preds = %6
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
br label %3
14: ; preds = %3
%15 = load float, float* %1
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %15)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define void @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 1, %0 ], [ %19, %1 ]
%3 = phi float [ 0.000000e+00, %0 ], [ %18, %1 ]
%4 = fpext float %3 to double
%5 = fadd double %4, 1.000000e-01
%6 = fptrunc double %5 to float
%7 = fpext float %6 to double
%8 = fadd double %7, 1.000000e-01
%9 = fptrunc double %8 to float
%10 = fpext float %9 to double
%11 = fadd double %10, 1.000000e-01
%12 = fptrunc double %11 to float
%13 = fpext float %12 to double
%14 = fadd double %13, 1.000000e-01
%15 = fptrunc double %14 to float
%16 = fpext float %15 to double
%17 = fadd double %16, 1.000000e-01
%18 = fptrunc double %17 to float
%19 = add nuw nsw i32 %2, 5
%20 = icmp eq i32 %19, 101
br i1 %20, label %21, label %1
21: ; preds = %1
%22 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %18)
ret void
}
/* Type definitions */
struct _tuple25 {
  int dummy;
};
struct Cyc_Lexing_lexbuf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Cyc_token_rec(struct Cyc_Lexing_lexbuf *,
                                 int /*<<< orphan*/);
struct _tuple25 *Cyc_token(struct Cyc_Lexing_lexbuf *lexbuf) {
  return ({ Cyc_token_rec(lexbuf, 0); });
}


x86 assembly (clang, -O0):
<Cyc_token>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <Cyc_token_rec@plt>
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_token>:
push   %rax
xor    %esi,%esi
call   1030 <Cyc_token_rec@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
%struct._tuple25 = type { i32 }
%struct.Cyc_Lexing_lexbuf = type { i32 }
define %struct._tuple25* @Cyc_token(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = alloca %struct.Cyc_Lexing_lexbuf*
%3 = alloca i32
store %struct.Cyc_Lexing_lexbuf* %0, %struct.Cyc_Lexing_lexbuf** %2
%4 = load %struct.Cyc_Lexing_lexbuf*, %struct.Cyc_Lexing_lexbuf** %2
%5 = call i32 @Cyc_token_rec(%struct.Cyc_Lexing_lexbuf* %4, i32 0)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to %struct._tuple25*
ret %struct._tuple25* %8
}

LLVM IR (-O2):
%struct._tuple25 = type { i32 }
%struct.Cyc_Lexing_lexbuf = type { i32 }
define %struct._tuple25* @Cyc_token(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = tail call i32 @Cyc_token_rec(%struct.Cyc_Lexing_lexbuf* %0, i32 0)
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to %struct._tuple25*
ret %struct._tuple25* %4
}
/* Variables and functions */
int /*<<< orphan*/ test_builder();
void testbuilder(void) { test_builder(); }


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

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

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

LLVM IR (-O2):
define void @testbuilder() {
%1 = tail call i32 (...) @test_builder()
ret void
}
int sol_http_server_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @sol_http_server_init() {
ret i32 0
}
void copy(dest, src) register char *dest, *src;
{
  while ((*dest++ = *src++) != '\n')
    ;
}


x86 assembly (clang, -O0):
<copy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0xa,%eax
je     113f <copy+0x3f>
jmp    110c <copy+0xc>
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdi,%rax,1)
add    $0x1,%rax
cmp    $0xa,%cl
jne    1110 <copy+0x10>
ret

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

LLVM IR (-O2):
define void @copy(i8* nocapture writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %8, %3 ]
%5 = phi i8* [ %1, %2 ], [ %6, %3 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %5
%8 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %7, i8* %4
%9 = icmp eq i8 %7, 10
br i1 %9, label %10, label %3
10: ; preds = %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ EINTR;
scalar_t__ errno;
int /*<<< orphan*/ *fopen(char *, char *);
FILE *sca_fopen(char *file, char *mode) {
  FILE *fptr = (FILE *)NULL;
  do {
    fptr = fopen(file, mode);
  } while (errno == EINTR);
  return fptr;
}


x86 assembly (clang, -O0):
<sca_fopen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    0x2ea0(%rip),%rax
mov    (%rax),%rax
mov    0x2e8e(%rip),%rcx
cmp    (%rcx),%rax
je     1128 <sca_fopen+0x18>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sca_fopen>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2ebb(%rip),%r15
mov    0x2eac(%rip),%r12
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <fopen@plt>
mov    (%r15),%rcx
cmp    (%r12),%rcx
je     1130 <sca_fopen+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@errno = global i64 0
@EINTR = global i64 0
define noalias i32* @sca_fopen(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32* @fopen(i8* %0, i8* %1)
%5 = load i64, i64* @errno
%6 = load i64, i64* @EINTR
%7 = icmp eq i64 %5, %6
br i1 %7, label %3, label %8
8: ; preds = %3
ret i32* %4
}
/* Variables and functions */
int mmu_probe_read(void *, int);
int mmu_probe_execute(void *addr) { return mmu_probe_read(addr, 4); }


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

x86 assembly (clang, -O2):
<mmu_probe_execute>:
mov    $0x4,%esi
jmp    1030 <mmu_probe_read@plt>

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

LLVM IR (-O2):
define i32 @mmu_probe_execute(i8* %0) {
%2 = tail call i32 @mmu_probe_read(i8* %0, i32 4)
ret i32 %2
}
int min_ii(int a, int b) { return (a < b) ? a : b; }


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

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

LLVM IR (-O0):
define i32 @min_ii(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 = icmp slt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @min_ii(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
void AESSetCtrl(uint32_t ctrlMask) {
  (*((volatile unsigned long *)(0x40024000 + 0x00000550))) = ctrlMask;
}


x86 assembly (clang, -O0):
<AESSetCtrl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x40024550,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<AESSetCtrl>:
mov    %rdi,0x40024550
40
ret

LLVM IR (-O0):
define void @AESSetCtrl(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
store volatile i64 %3, i64* inttoptr (i64 1073890640 to i64*)
ret void
}

LLVM IR (-O2):
define void @AESSetCtrl(i64 %0) {
store volatile i64 %0, i64* inttoptr (i64 1073890640 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ handleError(char);
int getDebugCharReady(void) {
  char mySSR;
  mySSR = (*(volatile char *)(0x05FFFECC)) & (0x08 | 0x10 | 0x20);
  if (mySSR)
    handleError(mySSR);
  return (*(volatile char *)(0x05FFFECC)) & 0x40;
}


x86 assembly (clang, -O0):
<getDebugCharReady>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x5fffecc,%eax
mov    (%rax),%al
movsbl %al,%eax
and    $0x38,%eax
mov    %al,-0x1(%rbp)
cmpb   $0x0,-0x1(%rbp)
je     113b <getDebugCharReady+0x2b>
movsbl -0x1(%rbp),%edi
call   1030 <handleError@plt>
mov    $0x5fffecc,%eax
mov    (%rax),%al
movsbl %al,%eax
and    $0x40,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getDebugCharReady>:
push   %rax
mov    0x5fffecc,%al
and    $0x38,%al
je     1124 <getDebugCharReady+0x14>
movsbl %al,%edi
call   1030 <handleError@plt>
movzbl 0x5fffecc,%eax
05
and    $0x40,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @getDebugCharReady() {
%1 = alloca i8
%2 = load volatile i8, i8* inttoptr (i64 100662988 to i8*)
%3 = sext i8 %2 to i32
%4 = and i32 %3, 56
%5 = trunc i32 %4 to i8
store i8 %5, i8* %1
%6 = load i8, i8* %1
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %0
%9 = load i8, i8* %1
%10 = call i32 @handleError(i8 signext %9)
br label %11
11: ; preds = %8, %0
%12 = load volatile i8, i8* inttoptr (i64 100662988 to i8*)
%13 = sext i8 %12 to i32
%14 = and i32 %13, 64
ret i32 %14
}

LLVM IR (-O2):
define i32 @getDebugCharReady() {
%1 = load volatile i8, i8* inttoptr (i64 100662988 to i8*)
%2 = and i8 %1, 56
%3 = icmp eq i8 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 @handleError(i8 signext %2)
br label %6
6: ; preds = %4, %0
%7 = load volatile i8, i8* inttoptr (i64 100662988 to i8*)
%8 = and i8 %7, 64
%9 = zext i8 %8 to i32
ret i32 %9
}
int len(char line[]) {
  int i = 0;
  while (line[i] != '\0') {
    ++i;
  }
  ++i;
  return i;
}


x86 assembly (clang, -O0):
<len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1132 <len+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <len+0xf>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<len>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmpb   $0x0,(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <len+0x10>
ret

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

LLVM IR (-O2):
define i32 @len(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
%10 = add nuw nsw i32 %9, 1
ret i32 %10
}
int utf8_len(const char *s) {
  int i = 0;
  while (*s) {
    if ((*s++ & 0xc0) != 0x80)
      i++;
  }
  return i;
}


x86 assembly (clang, -O0):
<utf8_len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114c <utf8_len+0x4c>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
and    $0xc0,%eax
cmp    $0x80,%eax
je     1147 <utf8_len+0x47>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <utf8_len+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<utf8_len>:
mov    (%rdi),%cl
test   %cl,%cl
je     1129 <utf8_len+0x29>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
and    $0xc0,%cl
xor    %edx,%edx
cmp    $0x80,%cl
setne  %dl
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <utf8_len+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @utf8_len(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %13, %4 ], [ %2, %1 ]
%6 = phi i32 [ %12, %4 ], [ 0, %1 ]
%7 = phi i8* [ %8, %4 ], [ %0, %1 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = and i8 %5, -64
%10 = icmp ne i8 %9, -128
%11 = zext i1 %10 to i32
%12 = add nuw nsw i32 %6, %11
%13 = load i8, i8* %8
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4, %1
%16 = phi i32 [ 0, %1 ], [ %12, %4 ]
ret i32 %16
}