xunge/DecIR huggingface dataset:
int main() {
  if (1) {
  }
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, float);
void output(char texto[], float valor) { printf("%s %.2f\n", texto, valor); }


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"%s %.2f\0A\00"
define void @output(i8* %0, float %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0, float %1)
ret void
}
/* Variables and functions */
int getch(int);
int skip_blanks(int ch) {
  while (ch == ' ' || ch == '\t')
    ch = getch(ch);
  return ch;
}


x86 assembly (clang, -O0):
<skip_blanks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1134 <skip_blanks+0x24>
cmpl   $0x9,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
test   $0x1,%al
jne    1144 <skip_blanks+0x34>
jmp    1154 <skip_blanks+0x44>
mov    -0x4(%rbp),%edi
call   1030 <getch@plt>
mov    %eax,-0x4(%rbp)
jmp    111b <skip_blanks+0xb>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_blanks>:
push   %rax
mov    %edi,%eax
jmp    1127 <skip_blanks+0x17>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %eax,%edi
call   1030 <getch@plt>
cmp    $0x20,%eax
je     1120 <skip_blanks+0x10>
cmp    $0x9,%eax
je     1120 <skip_blanks+0x10>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @skip_blanks(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %11, %1
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 32
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 9
br label %9
9: ; preds = %6, %3
%10 = phi i1 [ true, %3 ], [ %8, %6 ]
br i1 %10, label %11, label %14
11: ; preds = %9
%12 = load i32, i32* %2
%13 = call i32 @getch(i32 %12)
store i32 %13, i32* %2
br label %3
14: ; preds = %9
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @skip_blanks(i32 %0) {
br label %2
2: ; preds = %4, %1
%3 = phi i32 [ %0, %1 ], [ %5, %4 ]
switch i32 %3, label %6 [
i32 32, label %4
i32 9, label %4
]
4: ; preds = %2, %2
%5 = tail call i32 @getch(i32 %3)
br label %2
6: ; preds = %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int main(int argc, char **argv) {
  system("unixSocketClient");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"unixSocketClient\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 @system(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"unixSocketClient\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @system(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ isalnum(char);
int superLetterOrDigit(char ch) {
  if (isalnum(ch) || ch == '_')
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<superLetterOrDigit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <isalnum@plt>
cmp    $0x0,%rax
jne    113e <superLetterOrDigit+0x2e>
movsbl -0x5(%rbp),%eax
cmp    $0x5f,%eax
jne    114a <superLetterOrDigit+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    1151 <superLetterOrDigit+0x41>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<superLetterOrDigit>:
push   %rbx
mov    %edi,%ebx
call   1030 <isalnum@plt>
test   %rax,%rax
setne  %al
cmp    $0x5f,%bl
sete   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @superLetterOrDigit(i8 signext %0) {
%2 = tail call i64 @isalnum(i8 signext %0)
%3 = icmp ne i64 %2, 0
%4 = icmp eq i8 %0, 95
%5 = or i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
int SSL_library_init(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @SSL_library_init() {
ret i32 1
}

LLVM IR (-O2):
define i32 @SSL_library_init() {
ret i32 1
}
void brcmf_debug_detach(struct brcmf_pub *drvr) {}


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

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

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

LLVM IR (-O2):
%struct.brcmf_pub = type opaque
define void @brcmf_debug_detach(%struct.brcmf_pub* nocapture %0) {
ret void
}
double vector_dot_2d(const double v1[2], const double v2[2]) {
  return v1[0] * v2[0] + v1[1] * v2[1];
}


x86 assembly (clang, -O0):
<vector_dot_2d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<vector_dot_2d>:
movsd  0x8(%rdi),%xmm1
mulsd  0x8(%rsi),%xmm1
movsd  (%rdi),%xmm0
mulsd  (%rsi),%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @vector_dot_2d(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = load double*, double** %4
%9 = getelementptr inbounds double, double* %8, i64 0
%10 = load double, double* %9
%11 = load double*, double** %3
%12 = getelementptr inbounds double, double* %11, i64 1
%13 = load double, double* %12
%14 = load double*, double** %4
%15 = getelementptr inbounds double, double* %14, i64 1
%16 = load double, double* %15
%17 = fmul double %13, %16
%18 = call double @llvm.fmuladd.f64(double %7, double %10, double %17)
ret double %18
}

LLVM IR (-O2):
define double @vector_dot_2d(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = getelementptr inbounds double, double* %0, i64 1
%6 = load double, double* %5
%7 = getelementptr inbounds double, double* %1, i64 1
%8 = load double, double* %7
%9 = fmul double %6, %8
%10 = tail call double @llvm.fmuladd.f64(double %3, double %4, double %9)
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ _s2warn(char *, char *);
void ss2ptt_(unsigned int *iid) {
  _s2warn("ss2ptt", "function not available from FORTRAN");
  return;
}


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"ss2ptt\00"
@.str.1 = [36 x i8] c"function not available from FORTRAN\00"
define void @ss2ptt_(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 @_s2warn(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"ss2ptt\00"
@.str.1 = [36 x i8] c"function not available from FORTRAN\00"
define void @ss2ptt_(i32* nocapture readnone %0) {
%2 = tail call i32 @_s2warn(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ int8_t;

/* Variables and functions */
int cmp_func_int8_t(void *p1, void *p2) {
  int8_t v1 = *((int8_t *)p1);
  int8_t v2 = *((int8_t *)p2);
  return (v1 > v2) - (v1 < v2);
}


x86 assembly (clang, -O0):
<cmp_func_int8_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x18(%rbp),%rcx
cmp    -0x20(%rbp),%rcx
setl   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_func_int8_t>:
mov    (%rdi),%rcx
xor    %eax,%eax
xor    %edx,%edx
cmp    (%rsi),%rcx
setg   %al
setl   %dl
sub    %edx,%eax
ret

LLVM IR (-O0):
define i32 @cmp_func_int8_t(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i64*
%9 = load i64, i64* %8
store i64 %9, i64* %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i64*
%12 = load i64, i64* %11
store i64 %12, i64* %6
%13 = load i64, i64* %5
%14 = load i64, i64* %6
%15 = icmp sgt i64 %13, %14
%16 = zext i1 %15 to i32
%17 = load i64, i64* %5
%18 = load i64, i64* %6
%19 = icmp slt i64 %17, %18
%20 = zext i1 %19 to i32
%21 = sub nsw i32 %16, %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @cmp_func_int8_t(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp sgt i64 %4, %6
%8 = zext i1 %7 to i32
%9 = icmp slt i64 %4, %6
%10 = sext i1 %9 to i32
%11 = add nsw i32 %10, %8
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ cgsynth(char *);
void cgsynor(void) { cgsynth("or"); }


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"or\00"
define void @cgsynor() {
%1 = call i32 @cgsynth(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"or\00"
define void @cgsynor() {
%1 = tail call i32 @cgsynth(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct timeval {
  int tv_sec;
  long tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
long gettime() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return tv.tv_sec * 1000 * 1000 + tv.tv_usec;
}


x86 assembly (clang, -O0):
<gettime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,-0x10(%rbp),%eax
imul   $0x3e8,%eax,%eax
cltq
add    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettime>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,0x8(%rsp),%eax
cltq
add    0x10(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define i64 @gettime() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i32, i32* %3
%5 = mul nsw i32 %4, 1000
%6 = mul nsw i32 %5, 1000
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%9 = load i64, i64* %8
%10 = add nsw i64 %7, %9
ret i64 %10
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
define i64 @gettime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = mul i32 %5, 1000000
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%9 = load i64, i64* %8
%10 = add nsw i64 %9, %7
ret i64 %10
}
int fn4(int a, int b) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @fn4(i32 %0, i32 %1) {
ret i32 1
}
/* Variables and functions */
int bar();
int /*<<< orphan*/ foo();
int strtol(char *, int /*<<< orphan*/ *, int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  int n = 1;
  if (argc > 1)
    n = strtol(argv[1], NULL, 0);
  while (n--)
    foo();
  return bar();
}


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   $0x1,-0x14(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    116d <main+0x3d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1040 <strtol@plt>
mov    %eax,-0x14(%rbp)
jmp    1172 <main+0x42>
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x0,%eax
je     1192 <main+0x62>
mov    $0x0,%al
call   1050 <foo@plt>
jmp    1172 <main+0x42>
mov    $0x0,%al
call   1030 <bar@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1,%ebx
cmp    $0x2,%edi
jl     1150 <main+0x20>
mov    0x8(%rsi),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1040 <strtol@plt>
mov    %eax,%ebx
test   %eax,%eax
je     115c <main+0x2c>
xchg   %ax,%ax
xor    %eax,%eax
call   1050 <foo@plt>
add    $0xffffffff,%ebx
jne    1150 <main+0x20>
xor    %eax,%eax
pop    %rbx
jmp    1030 <bar@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %6
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 @strtol(i8* %12, i32* null, i32 0)
store i32 %13, i32* %6
br label %14
14: ; preds = %9, %2
br label %15
15: ; preds = %19, %14
%16 = load i32, i32* %6
%17 = add nsw i32 %16, -1
store i32 %17, i32* %6
%18 = icmp ne i32 %16, 0
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = call i32 (...) @foo()
br label %15
21: ; preds = %15
%22 = call i32 (...) @bar()
ret i32 %22
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @strtol(i8* nocapture %6, i32* null, i32 0)
%8 = icmp eq i32 %7, 0
br i1 %8, label %16, label %9
9: ; preds = %2, %4
%10 = phi i32 [ 1, %2 ], [ %7, %4 ]
br label %11
11: ; preds = %9, %11
%12 = phi i32 [ %13, %11 ], [ %10, %9 ]
%13 = add nsw i32 %12, -1
%14 = tail call i32 (...) @foo()
%15 = icmp eq i32 %13, 0
br i1 %15, label %16, label %11
16: ; preds = %11, %4
%17 = tail call i32 (...) @bar()
ret i32 %17
}
int Fib(int N) {
  if (N <= 1)
    return 1;
  else
    return Fib(N - 1) + Fib(N - 2);
}


x86 assembly (clang, -O0):
<Fib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jg     1131 <Fib+0x21>
movl   $0x1,-0x4(%rbp)
jmp    1154 <Fib+0x44>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <Fib@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <Fib@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Fib>:
push   %rbp
push   %rbx
push   %rax
mov    $0x1,%ebp
cmp    $0x2,%edi
jl     1145 <Fib+0x35>
mov    %edi,%ebx
add    $0x2,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    -0x3(%rbx),%edi
call   1030 <Fib@plt>
add    %eax,%ebp
add    $0xfffffffe,%ebx
cmp    $0x3,%ebx
ja     1130 <Fib+0x20>
add    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @Fib(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 %4, 1
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 1, i32* %2
br label %15
7: ; preds = %1
%8 = load i32, i32* %3
%9 = sub nsw i32 %8, 1
%10 = call i32 @Fib(i32 %9)
%11 = load i32, i32* %3
%12 = sub nsw i32 %11, 2
%13 = call i32 @Fib(i32 %12)
%14 = add nsw i32 %10, %13
store i32 %14, i32* %2
br label %15
15: ; preds = %7, %6
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @Fib(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %13, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -1
%7 = tail call i32 @Fib(i32 %6)
%8 = add nsw i32 %4, -2
%9 = add nsw i32 %7, %5
%10 = icmp ult i32 %4, 4
br i1 %10, label %11, label %3
11: ; preds = %3
%12 = add i32 %9, 1
br label %13
13: ; preds = %11, %1
%14 = phi i32 [ 1, %1 ], [ %12, %11 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void fatal(const char *msg) {
  fprintf(stderr, "%s\n", msg);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<fatal>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@EXIT_FAILURE = global i32 0
define void @fatal(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@EXIT_FAILURE = global i32 0
define void @fatal(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ parse_command(char const *, char **, char **);
int /*<<< orphan*/ run_parsed_command(char *, char *);
void run_command(const char *buf) {
  char *cmd, *arg;
  if (!parse_command(buf, &cmd, &arg))
    return;
  run_parsed_command(cmd, arg);
  free(arg);
  free(cmd);
}


x86 assembly (clang, -O0):
<run_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <parse_command@plt>
cmp    $0x0,%eax
jne    115b <run_command+0x2b>
jmp    117a <run_command+0x4a>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <run_parsed_command@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_command>:
sub    $0x18,%rsp
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <parse_command@plt>
test   %eax,%eax
je     116a <run_command+0x3a>
mov    0x10(%rsp),%rdi
mov    0x8(%rsp),%rsi
call   1050 <run_parsed_command@plt>
mov    0x8(%rsp),%rdi
call   1030 <free@plt>
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define void @run_command(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = bitcast i8** %2 to i8*
%5 = bitcast i8** %3 to i8*
%6 = call i32 @parse_command(i8* %0, i8** %2, i8** %3)
%7 = icmp eq i32 %6, 0
br i1 %7, label %16, label %8
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = load i8*, i8** %3
%11 = call i32 @run_parsed_command(i8* %9, i8* %10)
%12 = load i8*, i8** %3
%13 = call i32 @free(i8* %12)
%14 = load i8*, i8** %2
%15 = call i32 @free(i8* %14)
br label %16
16: ; preds = %1, %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
main() {
  double x, y = 0.5;
  x = y / 0.2;
  if (x != x)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xed1(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xeb7(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jne    116d <main+0x4d>
jp     116d <main+0x4d>
jmp    1174 <main+0x54>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
store double 5.000000e-01, double* %3
%4 = load double, double* %3
%5 = fdiv double %4, 2.000000e-01
store double %5, double* %2
%6 = load double, double* %2
%7 = load double, double* %2
%8 = fcmp une double %6, %7
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %0
%12 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(stderr, "usage: chkey [-f]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [19 x i8] c"usage: chkey [-f]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"usage: chkey [-f]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(char *program_name) {
  printf("\nUsage: %s configFile_path\n\n", program_name);
}


x86 assembly (clang, -O0):
<usage>:
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):
<usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [29 x i8] c"\0AUsage: %s configFile_path\0A\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ identity(int);
int baz(int x) {
  if (identity(!x)) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<baz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <identity@plt>
cmp    $0x0,%rax
je     1144 <baz+0x34>
movl   $0x1,-0x4(%rbp)
jmp    114b <baz+0x3b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<baz>:
push   %rax
xor    %eax,%eax
test   %edi,%edi
sete   %al
mov    %eax,%edi
call   1030 <identity@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @baz(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
%8 = call i64 @identity(i32 %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 1, i32* %2
br label %12
11: ; preds = %1
store i32 0, i32* %2
br label %12
12: ; preds = %11, %10
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @baz(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = zext i1 %2 to i32
%4 = tail call i64 @identity(i32 %3)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
struct mat2 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mat2_lerp(float *, float *, float *, float);
__attribute__((always_)) struct mat2 *
psmat2_lerp(struct mat2 *result, struct mat2 *a, struct mat2 *b, float p) {
  mat2_lerp((float *)result, (float *)a, (float *)b, p);
  return result;
}


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

x86 assembly (clang, -O2):
<psmat2_lerp>:
push   %rbx
mov    %rdi,%rbx
call   1030 <mat2_lerp@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.mat2 = type { i32 }
define %struct.mat2* @psmat2_lerp(%struct.mat2* %0, %struct.mat2* %1, %struct.mat2* %2, float %3) {
%5 = alloca %struct.mat2*
%6 = alloca %struct.mat2*
%7 = alloca %struct.mat2*
%8 = alloca float
store %struct.mat2* %0, %struct.mat2** %5
store %struct.mat2* %1, %struct.mat2** %6
store %struct.mat2* %2, %struct.mat2** %7
store float %3, float* %8
%9 = load %struct.mat2*, %struct.mat2** %5
%10 = bitcast %struct.mat2* %9 to float*
%11 = load %struct.mat2*, %struct.mat2** %6
%12 = bitcast %struct.mat2* %11 to float*
%13 = load %struct.mat2*, %struct.mat2** %7
%14 = bitcast %struct.mat2* %13 to float*
%15 = load float, float* %8
%16 = call i32 @mat2_lerp(float* %10, float* %12, float* %14, float %15)
%17 = load %struct.mat2*, %struct.mat2** %5
ret %struct.mat2* %17
}

LLVM IR (-O2):
%struct.mat2 = type { i32 }
define %struct.mat2* @psmat2_lerp(%struct.mat2* returned %0, %struct.mat2* %1, %struct.mat2* %2, float %3) {
%5 = bitcast %struct.mat2* %0 to float*
%6 = bitcast %struct.mat2* %1 to float*
%7 = bitcast %struct.mat2* %2 to float*
%8 = tail call i32 @mat2_lerp(float* %5, float* %6, float* %7, float %3)
ret %struct.mat2* %0
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long window;
};
typedef TYPE_1__ XFocusChangeEvent;

/* Variables and functions */
void set_XFocusChangeEvent_window(void *_p, unsigned long _v) {
  ((XFocusChangeEvent *)_p)->window = (unsigned long)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define void @set_XFocusChangeEvent_window(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @set_XFocusChangeEvent_window(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
int pop(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @pop() {
ret i32 0
}
double equal_wrapper(double *arg_list) { return (arg_list[0] == arg_list[1]); }


x86 assembly (clang, -O0):
<equal_wrapper>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
ucomisd 0x8(%rax),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<equal_wrapper>:
movsd  0x8(%rdi),%xmm1
cmpeqsd (%rdi),%xmm1
movsd  0xeee(%rip),%xmm0
andpd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @equal_wrapper(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = load double*, double** %2
%7 = getelementptr inbounds double, double* %6, i64 1
%8 = load double, double* %7
%9 = fcmp oeq double %5, %8
%10 = zext i1 %9 to i32
%11 = sitofp i32 %10 to double
ret double %11
}

LLVM IR (-O2):
define double @equal_wrapper(double* nocapture %0) {
%2 = load double, double* %0
%3 = getelementptr inbounds double, double* %0, i64 1
%4 = load double, double* %3
%5 = fcmp oeq double %2, %4
%6 = uitofp i1 %5 to double
ret double %6
}
void removecard(a, b) {
  move(b, a);
  printw("   ");
}


x86 assembly (clang, -O0):
<removecard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    $0x0,%al
call   1040 <move@plt>
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printw@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<removecard>:
push   %rax
mov    %edi,%eax
mov    %esi,%edi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <move@plt>
lea    0xecb(%rip),%rdi
xor    %eax,%eax
pop    %rcx
jmp    1030 <printw@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c" \00"
define void @removecard(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @move to i32 (i32, i32, ...)*)(i32 %1, i32 %0)
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @printw to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void mp2vpicx_set_alternatescan(uint8_t *p_mp2vpicx) { p_mp2vpicx[7] |= 0x4; }


x86 assembly (clang, -O0):
<mp2vpicx_set_alternatescan>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%ecx
or     $0x4,%ecx
mov    %ecx,0x1c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp2vpicx_set_alternatescan>:
orb    $0x4,0x1c(%rdi)
ret

LLVM IR (-O0):
define void @mp2vpicx_set_alternatescan(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 7
%5 = load i32, i32* %4
%6 = or i32 %5, 4
store i32 %6, i32* %4
ret void
}

LLVM IR (-O2):
define void @mp2vpicx_set_alternatescan(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 7
%3 = load i32, i32* %2
%4 = or i32 %3, 4
store i32 %4, i32* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ spi_deselect();
void flash_write_finish() { spi_deselect(); }


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

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

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

LLVM IR (-O2):
define void @flash_write_finish() {
%1 = tail call i32 (...) @spi_deselect()
ret void
}
/* Type definitions */
struct activity {
  int dummy;
};

/* Variables and functions */
int get_temp_nr();
int wrap_get_temp_nr(struct activity *a) {
  int n;
  if ((n = get_temp_nr()) > 4096)
    return 4096;
  else
    return n;
}


x86 assembly (clang, -O0):
<wrap_get_temp_nr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <get_temp_nr@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x1000,%eax
jle    113d <wrap_get_temp_nr+0x2d>
movl   $0x1000,-0x4(%rbp)
jmp    1143 <wrap_get_temp_nr+0x33>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrap_get_temp_nr>:
push   %rax
xor    %eax,%eax
call   1030 <get_temp_nr@plt>
cmp    $0x1000,%eax
mov    $0x1000,%ecx
cmovge %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.activity = type { i32 }
define i32 @wrap_get_temp_nr(%struct.activity* %0) {
%2 = alloca i32
%3 = alloca %struct.activity*
%4 = alloca i32
store %struct.activity* %0, %struct.activity** %3
%5 = call i32 (...) @get_temp_nr()
store i32 %5, i32* %4
%6 = icmp sgt i32 %5, 4096
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 4096, i32* %2
br label %10
8: ; preds = %1
%9 = load i32, i32* %4
store i32 %9, i32* %2
br label %10
10: ; preds = %8, %7
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
%struct.activity = type { i32 }
define i32 @wrap_get_temp_nr(%struct.activity* nocapture readnone %0) {
%2 = tail call i32 (...) @get_temp_nr()
%3 = icmp slt i32 %2, 4096
%4 = select i1 %3, i32 %2, i32 4096
ret i32 %4
}
void InitSystemClock() {
  (*(char *)0x50C1) = 0x01;
  (*(char *)0x50C5) = 0x02;
  (*(char *)0x50C7) = 0xFF;
  while ((((*(char *)0x50C1) & (1 << 1)) == 0))
    ;
  (*(char *)0x50C6) = 0x00;
  (*(char *)0x50C4) = 0xB4;
  while ((((*(char *)0x50C5) & (1 << 3)) == 0))
    ;
}


x86 assembly (clang, -O0):
<InitSystemClock>:
push   %rbp
mov    %rsp,%rbp
mov    $0x50c1,%eax
movb   $0x1,(%rax)
mov    $0x50c5,%eax
movb   $0x2,(%rax)
mov    $0x50c7,%eax
movb   $0xff,(%rax)
mov    $0x50c1,%eax
movsbl (%rax),%eax
and    $0x2,%eax
cmp    $0x0,%eax
jne    1135 <InitSystemClock+0x35>
jmp    111c <InitSystemClock+0x1c>
mov    $0x50c6,%eax
movb   $0x0,(%rax)
mov    $0x50c4,%eax
movb   $0xb4,(%rax)
mov    $0x50c5,%eax
movsbl (%rax),%eax
and    $0x8,%eax
cmp    $0x0,%eax
jne    115e <InitSystemClock+0x5e>
jmp    1145 <InitSystemClock+0x45>
pop    %rbp
ret

x86 assembly (clang, -O2):
<InitSystemClock>:
movb   $0x1,0x50c1
01
movb   $0x2,0x50c5
02
movb   $0xff,0x50c7
ff
testb  $0x2,0x50c1
02
jne    1132 <InitSystemClock+0x32>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
jmp    1130 <InitSystemClock+0x30>
movb   $0x0,0x50c6
movb   $0xb4,0x50c4
b4
testb  $0x8,0x50c5
08
jne    1152 <InitSystemClock+0x52>
nopl   0x0(%rax)
jmp    1150 <InitSystemClock+0x50>
ret

LLVM IR (-O0):
define void @InitSystemClock() {
store i8 1, i8* inttoptr (i64 20673 to i8*)
store i8 2, i8* inttoptr (i64 20677 to i8*)
store i8 -1, i8* inttoptr (i64 20679 to i8*)
br label %1
1: ; preds = %6, %0
%2 = load i8, i8* inttoptr (i64 20673 to i8*)
%3 = sext i8 %2 to i32
%4 = and i32 %3, 2
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
br label %1
7: ; preds = %1
store i8 0, i8* inttoptr (i64 20678 to i8*)
store i8 -76, i8* inttoptr (i64 20676 to i8*)
br label %8
8: ; preds = %13, %7
%9 = load i8, i8* inttoptr (i64 20677 to i8*)
%10 = sext i8 %9 to i32
%11 = and i32 %10, 8
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %8
br label %8
14: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @InitSystemClock() {
store i8 1, i8* inttoptr (i64 20673 to i8*)
store i8 2, i8* inttoptr (i64 20677 to i8*)
store i8 -1, i8* inttoptr (i64 20679 to i8*)
%1 = load i8, i8* inttoptr (i64 20673 to i8*)
%2 = and i8 %1, 2
%3 = icmp eq i8 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0, %4
br label %4
5: ; preds = %0
store i8 0, i8* inttoptr (i64 20678 to i8*)
store i8 -76, i8* inttoptr (i64 20676 to i8*)
%6 = load i8, i8* inttoptr (i64 20677 to i8*)
%7 = and i8 %6, 8
%8 = icmp eq i8 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %5, %9
br label %9
10: ; preds = %5
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
scalar_t__ strcpy(char *, char *);
wchar_t *wcscpy(wchar_t *s1, const wchar_t *s2) {
  return (wchar_t *)strcpy((char *)s1, (char *)s2);
}


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

x86 assembly (clang, -O2):
<wcscpy>:
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i32* @wcscpy(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 = bitcast i32* %5 to i8*
%7 = load i32*, i32** %4
%8 = bitcast i32* %7 to i8*
%9 = call i64 @strcpy(i8* %6, i8* %8)
%10 = inttoptr i64 %9 to i32*
ret i32* %10
}

LLVM IR (-O2):
define i32* @wcscpy(i32* %0, i32* %1) {
%3 = bitcast i32* %0 to i8*
%4 = bitcast i32* %1 to i8*
%5 = tail call i64 @strcpy(i8* %3, i8* %4)
%6 = inttoptr i64 %5 to i32*
ret i32* %6
}
int exe$truncate(struct _fab *fab, void *err, void *suc) {
  printk("not implemented\n");
}


x86 assembly (clang, -O0):
<exe$truncate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printk@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exe$truncate>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printk@plt>

LLVM IR (-O0):
%struct._fab = type opaque
@.str = [17 x i8] c"not implemented\0A\00"
define i32 @"exe$truncate"(%struct._fab* %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca %struct._fab*
%6 = alloca i8*
%7 = alloca i8*
store %struct._fab* %0, %struct._fab** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @printk to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
%struct._fab = type opaque
@.str = [17 x i8] c"not implemented\0A\00"
define i32 @"exe$truncate"(%struct._fab* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @printk to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ is_hex(char *);
char *is_hex_01a() {
  char hex[] =
      "0xB300562F8F9A961E158BDE2D4CCD2A64BB1D923208939714675BFFB17BBAF2A3";
  do {
    if (!(is_hex(hex)))
      return "return true for hex strings with leading '0x's";
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<is_hex_01a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x50(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x43,%edx
call   1040 <memcpy@plt>
lea    -0x50(%rbp),%rdi
call   1030 <is_hex@plt>
cmp    $0x0,%eax
jne    115f <is_hex_01a+0x3f>
lea    0xeed(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    116c <is_hex_01a+0x4c>
jmp    1164 <is_hex_01a+0x44>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_hex_01a>:
sub    $0x48,%rsp
movaps 0xf15(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xef9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xedd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec1(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x334132,0x3f(%rsp)
mov    %rsp,%rdi
call   1030 <is_hex@plt>
xor    %ecx,%ecx
test   %eax,%eax
lea    0xee5(%rip),%rax
cmove  %rax,%rcx
mov    %rcx,%rax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@__const.is_hex_01a.hex = [67 x i8] c"0xB300562F8F9A961E158BDE2D4CCD2A64BB1D923208939714675BFFB17BBAF2A3\00"
@.str = [47 x i8] c"return true for hex strings with leading '0x's\00"
define i8* @is_hex_01a() {
%1 = alloca i8*
%2 = alloca [67 x i8]
%3 = bitcast [67 x i8]* %2 to i8*
br label %4
4: ; preds = %0
%5 = getelementptr inbounds [67 x i8], [67 x i8]* %2, i64 0, i64 0
%6 = call i32 @is_hex(i8* %5)
%7 = icmp ne i32 %6, 0
br i1 %7, label %9, label %8
8: ; preds = %4
store i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8** %1
br label %11
9: ; preds = %4
br label %10
10: ; preds = %9
store i8* null, i8** %1
br label %11
11: ; preds = %10, %8
%12 = load i8*, i8** %1
ret i8* %12
}

LLVM IR (-O2):
@__const.is_hex_01a.hex = [67 x i8] c"0xB300562F8F9A961E158BDE2D4CCD2A64BB1D923208939714675BFFB17BBAF2A3\00"
@.str = [47 x i8] c"return true for hex strings with leading '0x's\00"
define i8* @is_hex_01a() {
%1 = alloca [67 x i8]
%2 = getelementptr inbounds [67 x i8], [67 x i8]* %1, i64 0, i64 0
%3 = call i32 @is_hex(i8* %2)
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* null
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ init_ants();
int /*<<< orphan*/ init_graphics();
int /*<<< orphan*/ init_keycontrol();
int main(int argc, char **argv) {
  init_ants();
  init_keycontrol();
  init_graphics();
  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    $0x0,%al
call   1030 <init_ants@plt>
mov    $0x0,%al
call   1040 <init_keycontrol@plt>
mov    $0x0,%al
call   1050 <init_graphics@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <init_ants@plt>
xor    %eax,%eax
call   1040 <init_keycontrol@plt>
xor    %eax,%eax
call   1050 <init_graphics@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
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 (...) @init_ants()
%7 = call i32 (...) @init_keycontrol()
%8 = call i32 (...) @init_graphics()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @init_ants()
%4 = tail call i32 (...) @init_keycontrol()
%5 = tail call i32 (...) @init_graphics()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void datestr_version() {
  puts("@"
       "(#)"
       "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
       "2022-01-22/02-19-57/repos/PawelNabe/EOS/refs/heads/master/SRC/datestr.c"
       " "
       "Sat Jan 22 08:19:10 2022"
       " compiled: "
       "Mar 15 2022"
       " "
       "22:35:39");
}


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

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

LLVM IR (-O0):
@.str = [196 x i8] c"@(#)/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/PawelNabe/EOS/refs/heads/master/SRC/datestr.c Sat Jan 22 08:19:10 2022 compiled: Mar 15 2022 22:35:39\00"
define void @datestr_version() {
%1 = call i32 @puts(i8* getelementptr inbounds ([196 x i8], [196 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [196 x i8] c"@(#)/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/PawelNabe/EOS/refs/heads/master/SRC/datestr.c Sat Jan 22 08:19:10 2022 compiled: Mar 15 2022 22:35:39\00"
define void @datestr_version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([196 x i8], [196 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
void usage(void) {
  puts("Lambda - A lambda calculus interpreter.\n"
       "(c) 2011 Quentin Carbonneaux\n"
       "\n"
       "  -n    Use call-by-name evaluation.\n"
       "  -v    Use call-by-value evaluation.\n"
       "  -h    Display this help message.");
  exit(0);
}


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

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

LLVM IR (-O0):
@.str = [180 x i8] c"Lambda - A lambda calculus interpreter.\0A(c) 2011 Quentin Carbonneaux\0A\0A -n Use call-by-name evaluation.\0A -v Use call-by-value evaluation.\0A -h Display this help message.\00"
define void @usage() {
%1 = call i32 @puts(i8* getelementptr inbounds ([180 x i8], [180 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [180 x i8] c"Lambda - A lambda calculus interpreter.\0A(c) 2011 Quentin Carbonneaux\0A\0A -n Use call-by-name evaluation.\0A -v Use call-by-value evaluation.\0A -h Display this help message.\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([180 x i8], [180 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}