xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int fork();
int getpid();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  pid_t p;
  p = getpid();
  printf("%d\n", p);
  p = fork();
  printf("%d\n", p);
  p = getpid();
  printf("%d\n", p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xead(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <fork@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe94(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe7b(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xec1(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <fork@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getpid()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (...) @fork()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 (...) @getpid()
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
__attribute__((visibility("hidden"))) void dbPeriodic() {}


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

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

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

LLVM IR (-O2):
define hidden void @dbPeriodic() {
ret void
}
/* Variables and functions */
void test_hel_lo2() {
  int *s = NULL;
  *s = 42;
}


x86 assembly (clang, -O0):
<test_hel_lo2>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x2a,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define void @test_hel_lo2() {
%1 = alloca i32*
store i32* null, i32** %1
%2 = load i32*, i32** %1
store i32 42, i32* %2
ret void
}

LLVM IR (-O2):
/* Variables and functions */
int /*<<< orphan*/ CTIMER2_DriverIRQHandler();
__attribute__((weak)) void CTIMER2_IRQHandler(void) {
  CTIMER2_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @CTIMER2_IRQHandler() {
%1 = call i32 (...) @CTIMER2_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @CTIMER2_IRQHandler() {
%1 = tail call i32 (...) @CTIMER2_DriverIRQHandler()
ret void
}
void inc_zcache_flush_total(void) {}


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

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

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

LLVM IR (-O2):
define void @inc_zcache_flush_total() {
ret void
}
/* Variables and functions */
scalar_t__ exp(float);
int metrop(float de, float t) {
  float ran3(long *idum);
  static long gljdum = 1;
  return de < 0.0 || ran3(&gljdum) < exp(-de / t);
}


x86 assembly (clang, -O0):
<metrop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
mov    $0x1,%al
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
mov    %al,-0x9(%rbp)
ja     118d <metrop+0x6d>
lea    0x2edc(%rip),%rdi
call   1040 <ran3@plt>
movss  %xmm0,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
divss  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
movss  -0x10(%rbp),%xmm1
cvtsi2ss %rax,%xmm0
ucomiss %xmm1,%xmm0
seta   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<metrop>:
mov    $0x1,%eax
xorps  %xmm2,%xmm2
ucomiss %xmm0,%xmm2
ja     117b <metrop+0x5b>
sub    $0x28,%rsp
lea    0x2ef8(%rip),%rdi
movaps %xmm0,0x10(%rsp)
movss  %xmm1,0x8(%rsp)
call   1040 <ran3@plt>
movss  %xmm0,0xc(%rsp)
movaps 0x10(%rsp),%xmm0
xorps  0xea6(%rip),%xmm0
divss  0x8(%rsp),%xmm0
call   1030 <exp@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
xor    %eax,%eax
ucomiss 0xc(%rsp),%xmm0
seta   %al
add    $0x28,%rsp
ret

LLVM IR (-O0):
@metrop.gljdum = internal global i64 1
define i32 @metrop(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = fpext float %5 to double
%7 = fcmp olt double %6, 0.000000e+00
br i1 %7, label %17, label %8
8: ; preds = %2
%9 = call float @ran3(i64* @metrop.gljdum)
%10 = load float, float* %3
%11 = fneg float %10
%12 = load float, float* %4
%13 = fdiv float %11, %12
%14 = call i64 @exp(float %13)
%15 = sitofp i64 %14 to float
%16 = fcmp olt float %9, %15
br label %17
17: ; preds = %8, %2
%18 = phi i1 [ true, %2 ], [ %16, %8 ]
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
@metrop.gljdum = internal global i64 1
define i32 @metrop(float %0, float %1) {
%3 = fcmp olt float %0, 0.000000e+00
br i1 %3, label %12, label %4
4: ; preds = %2
%5 = tail call float @ran3(i64* @metrop.gljdum)
%6 = fneg float %0
%7 = fdiv float %6, %1
%8 = tail call i64 @exp(float %7)
%9 = sitofp i64 %8 to float
%10 = fcmp olt float %5, %9
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %4, %2
%13 = phi i32 [ 1, %2 ], [ %11, %4 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
scalar_t__ strcmp(char *, char *);
void strcmp_0() {
  char *x = "123";
  char *y = "123";
  clang_analyzer_eval(strcmp(x, y) == 0);
}


x86 assembly (clang, -O0):
<strcmp_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xec6(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp_0>:
push   %rax
lea    0xed8(%rip),%rdi
mov    %rdi,%rsi
call   1030 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"123\00"
define void @strcmp_0() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i64 @strcmp(i8* %3, i8* %4)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"123\00"
define void @strcmp_0() {
%1 = tail call i64 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}
int *XListDepths() {}


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

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

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

LLVM IR (-O2):
define noalias i32* @XListDepths() {
ret i32* undef
}
/* Type definitions */
typedef unsigned int uint32_t;

/* Variables and functions */
unsigned int get_current_memory(void *stack_limit) {
  void *stack = (void *)stack_limit - 12288;
  return *(uint32_t *)stack;
}


x86 assembly (clang, -O0):
<get_current_memory>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0xffffffffffffd000,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_current_memory>:
mov    -0x3000(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @get_current_memory(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr i8, i8* %4, i64 -12288
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i32*
%8 = load i32, i32* %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @get_current_memory(i8* nocapture %0) {
%2 = getelementptr i8, i8* %0, i64 -12288
%3 = bitcast i8* %2 to i32*
%4 = load i32, i32* %3
ret i32 %4
}
/* Variables and functions */
bool entry_is_valid(uintptr_t e) { return e > (0x1); }


x86 assembly (clang, -O0):
<entry_is_valid>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x1,-0x8(%rbp)
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<entry_is_valid>:
xor    %eax,%eax
cmp    $0x2,%rdi
setae  %al
ret

LLVM IR (-O0):
define i32 @entry_is_valid(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ugt i64 %3, 1
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @entry_is_valid(i64 %0) {
%2 = icmp ugt i64 %0, 1
%3 = zext i1 %2 to i32
ret i32 %3
}
int testComparator(const void *item1, const void *item2) {
  int int1 = *(int *)item1;
  int int2 = *(int *)item2;
  if (int1 < int2)
    return -1;
  if (int1 > int2)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<testComparator>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1136 <testComparator+0x36>
movl   $0xffffffff,-0x4(%rbp)
jmp    1155 <testComparator+0x55>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jle    114e <testComparator+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    1155 <testComparator+0x55>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<testComparator>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
setg   %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @testComparator(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp slt i32 %4, %6
%8 = icmp sgt i32 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
void CyBle_HidsInit(void) {}


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

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

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

LLVM IR (-O2):
define void @CyBle_HidsInit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, long);
int strlen(char *);
int /*<<< orphan*/ write(int, char *, int);
void writelinenum(int fd, long num) {
  char buffer[40];
  sprintf(buffer, "%ld", num);
  write(fd, buffer, strlen(buffer));
  write(fd, "\n", 1);
}


x86 assembly (clang, -O0):
<writelinenum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xeb2(%rip),%rsi
call   1050 <sprintf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x4c(%rbp)
lea    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
lea    -0x40(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x4c(%rbp),%edi
mov    -0x48(%rbp),%rsi
mov    %eax,%edx
call   1030 <write@plt>
mov    -0x4(%rbp),%edi
lea    0xe82(%rip),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writelinenum>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%rdx
mov    %edi,%ebx
lea    0xebd(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
call   1050 <sprintf@plt>
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    %ebx,%edi
mov    %r14,%rsi
mov    %eax,%edx
call   1030 <write@plt>
lea    0xe9b(%rip),%rsi
mov    %ebx,%edi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%ld\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @writelinenum(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca [40 x i8]
store i32 %0, i32* %3
store i64 %1, i64* %4
%6 = getelementptr inbounds [40 x i8], [40 x i8]* %5, i64 0, i64 0
%7 = load i64, i64* %4
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %7)
%9 = load i32, i32* %3
%10 = getelementptr inbounds [40 x i8], [40 x i8]* %5, i64 0, i64 0
%11 = getelementptr inbounds [40 x i8], [40 x i8]* %5, i64 0, i64 0
%12 = call i32 @strlen(i8* %11)
%13 = call i32 @write(i32 %9, i8* %10, i32 %12)
%14 = load i32, i32* %3
%15 = call i32 @write(i32 %14, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%ld\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @writelinenum(i32 %0, i64 %1) {
%3 = alloca [40 x i8]
%4 = getelementptr inbounds [40 x i8], [40 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %1)
%6 = call i32 @strlen(i8* %4)
%7 = call i32 @write(i32 %0, i8* %4, i32 %6)
%8 = call i32 @write(i32 %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
ret void
}
/* Variables and functions */
scalar_t__ isalnum(int);
int isdebverchar(int c) {
  return isalnum(c) || c == '-' || c == '+' || c == '.' || c == ':' || c == '~';
}


x86 assembly (clang, -O0):
<isdebverchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isalnum@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    117b <isdebverchar+0x6b>
mov    $0x1,%al
cmpl   $0x2d,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     117b <isdebverchar+0x6b>
mov    $0x1,%al
cmpl   $0x2b,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     117b <isdebverchar+0x6b>
mov    $0x1,%al
cmpl   $0x2e,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     117b <isdebverchar+0x6b>
mov    $0x1,%al
cmpl   $0x3a,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     117b <isdebverchar+0x6b>
cmpl   $0x7e,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdebverchar>:
push   %rbx
mov    %edi,%ebx
call   1030 <isalnum@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1127 <isdebverchar+0x17>
pop    %rbx
ret
cmp    $0x3a,%ebx
ja     113e <isdebverchar+0x2e>
mov    %ebx,%ecx
movabs $0x400680000000000,%rdx
bt     %rcx,%rdx
jb     1125 <isdebverchar+0x15>
xor    %eax,%eax
cmp    $0x7e,%ebx
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isdebverchar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isalnum(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %21, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 45
br i1 %8, label %21, label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 43
br i1 %11, label %21, label %12
12: ; preds = %9
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, 46
br i1 %14, label %21, label %15
15: ; preds = %12
%16 = load i32, i32* %2
%17 = icmp eq i32 %16, 58
br i1 %17, label %21, label %18
18: ; preds = %15
%19 = load i32, i32* %2
%20 = icmp eq i32 %19, 126
br label %21
21: ; preds = %18, %15, %12, %9, %6, %1
%22 = phi i1 [ true, %15 ], [ true, %12 ], [ true, %9 ], [ true, %6 ], [ true, %1 ], [ %20, %18 ]
%23 = zext i1 %22 to i32
ret i32 %23
}

LLVM IR (-O2):
define i32 @isdebverchar(i32 %0) {
%2 = tail call i64 @isalnum(i32 %0)
%3 = freeze i64 %2
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
switch i32 %0, label %6 [
i32 58, label %9
i32 46, label %9
i32 45, label %9
i32 43, label %9
]
6: ; preds = %5
%7 = icmp eq i32 %0, 126
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %5, %5, %5, %1, %6
%10 = phi i32 [ 1, %5 ], [ %8, %6 ], [ 1, %1 ], [ 1, %5 ], [ 1, %5 ], [ 1, %5 ]
ret i32 %10
}
void main(int b) {
  int c;
  int a;
  a = 1;
#pragma hlt outline hola
  for (int i = 0; i < 4; ++i) {
    a = 3 + i;
    b = 4;
    c = 5;
  }
  a = a + 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x4,-0x10(%rbp)
jge    1144 <main+0x44>
mov    -0x10(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0xc(%rbp)
movl   $0x4,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1115 <main+0x15>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @main(i32 %0) {
ret void
}
void irq_scan_ready(void) {}


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

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

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

LLVM IR (-O2):
define void @irq_scan_ready() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void xmp_fnct(int *data, int size) { printf("Calling C\n"); }


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

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

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

LLVM IR (-O2):
@str = [10 x i8] c"Calling C\00"
define void @xmp_fnct(i32* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fscanf(int /*<<< orphan*/ *, char *, int *);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
int mem_size(FILE *fin) {
  int size = 0;
  int operation;
  while (fscanf(fin, "%x", &operation) == 1) {
    size++;
  }
  rewind(fin);
  return size;
}


x86 assembly (clang, -O0):
<mem_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec2(%rip),%rsi
lea    -0x10(%rbp),%rdx
call   1040 <fscanf@plt>
cmp    $0x1,%eax
jne    115e <mem_size+0x3e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <mem_size+0x13>
mov    -0x8(%rbp),%rdi
call   1030 <rewind@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_size>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0xffffffff,%ebx
lea    0xec9(%rip),%r15
lea    0x4(%rsp),%r12
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
call   1040 <fscanf@plt>
add    $0x1,%ebx
cmp    $0x1,%eax
je     1140 <mem_size+0x20>
mov    %r14,%rdi
call   1030 <rewind@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%x\00"
define i32 @mem_size(i32* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
br label %4
4: ; preds = %4, %1
%5 = phi i32 [ 0, %1 ], [ %8, %4 ]
%6 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = icmp eq i32 %6, 1
%8 = add nuw nsw i32 %5, 1
br i1 %7, label %4, label %9
9: ; preds = %4
%10 = call i32 @rewind(i32* %0)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void check_arguments(int argc, char **argv) {
  if (argc != 3) {
    fprintf(stderr, "./sprat IMAGE_NAME INIT_SCRIPT\n");
    exit(-1);
  }
}


x86 assembly (clang, -O0):
<check_arguments>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x4(%rbp)
je     1158 <check_arguments+0x38>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
lea    0xeb7(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_arguments>:
cmp    $0x3,%edi
jne    1126 <check_arguments+0x6>
ret
push   %rax
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    0xec9(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"./sprat IMAGE_NAME INIT_SCRIPT\0A\00"
define void @check_arguments(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 3
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i32, i32* @stderr
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @exit(i32 -1)
unreachable
11: ; preds = %2
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"./sprat IMAGE_NAME INIT_SCRIPT\0A\00"
define void @check_arguments(i32 %0, i8** nocapture readnone %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 -1)
unreachable
8: ; preds = %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, int);
int /*<<< orphan*/ reverse_memcpy(void *, void *, int);
int16_t bytes_to_int16(const unsigned char bytes[2], int switch_endian) {
  int16_t dest_num;
  void *dest_ptr = (void *)&dest_num;
  if (switch_endian) {
    reverse_memcpy(dest_ptr, (void *)bytes, 2);
  } else {
    memcpy(dest_ptr, (void *)bytes, 2);
  }
  return dest_num;
}


x86 assembly (clang, -O0):
<bytes_to_int16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1158 <bytes_to_int16+0x38>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x2,%edx
call   1030 <reverse_memcpy@plt>
jmp    116a <bytes_to_int16+0x4a>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x2,%edx
call   1040 <memcpy@plt>
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bytes_to_int16>:
push   %rax
mov    %rdi,%rax
lea    0x4(%rsp),%rdi
test   %esi,%esi
je     113c <bytes_to_int16+0x1c>
mov    %rax,%rsi
mov    $0x2,%edx
call   1030 <reverse_memcpy@plt>
jmp    1149 <bytes_to_int16+0x29>
mov    %rax,%rsi
mov    $0x2,%edx
call   1040 <memcpy@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @bytes_to_int16(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = bitcast i32* %5 to i8*
store i8* %7, i8** %6
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i8*, i8** %6
%12 = load i8*, i8** %3
%13 = call i32 @reverse_memcpy(i8* %11, i8* %12, i32 2)
br label %18
14: ; preds = %2
%15 = load i8*, i8** %6
%16 = load i8*, i8** %3
%17 = call i32 @memcpy(i8* %15, i8* %16, i32 2)
br label %18
18: ; preds = %14, %10
%19 = load i32, i32* %5
ret i32 %19
}

LLVM IR (-O2):
define i32 @bytes_to_int16(i8* %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = icmp eq i32 %1, 0
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = call i32 @reverse_memcpy(i8* %4, i8* %0, i32 2)
br label %10
8: ; preds = %2
%9 = call i32 @memcpy(i8* %4, i8* %0, i32 2)
br label %10
10: ; preds = %8, %6
%11 = load i32, i32* %3
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int i, j;
  i = 1;
  if (j > 0)
    j += i;
  else
    j = 0;
  assert(i != j);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    113e <main+0x2e>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1145 <main+0x35>
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Variables and functions */
int volatile errno;
volatile int *__aeabi_errno_addr(void) { return &errno; }


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

x86 assembly (clang, -O2):
<__aeabi_errno_addr>:
mov    0x2ed9(%rip),%rax
ret

LLVM IR (-O0):
@errno = global i32 0
define i32* @__aeabi_errno_addr() {
ret i32* @errno
}

LLVM IR (-O2):
@errno = global i32 0
define i32* @__aeabi_errno_addr() {
ret i32* @errno
}
void kiss_D_fft_cleanup(void) {}


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

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

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

LLVM IR (-O2):
define void @kiss_D_fft_cleanup() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
int process(int *data, int size) {
  int i, sum = 0;
  for (i = 0; i < size; i++) {
    sum += data[i];
    sleep(1);
  }
  return sum;
}


x86 assembly (clang, -O0):
<process>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1162 <process+0x52>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x1,%edi
call   1030 <sleep@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112d <process+0x1d>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
jle    1149 <process+0x39>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
add    (%r14,%rbx,4),%ebp
mov    $0x1,%edi
call   1030 <sleep@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <process+0x20>
jmp    114b <process+0x3b>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @process(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %15
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %13, %6 ]
%8 = phi i32 [ 0, %4 ], [ %11, %6 ]
%9 = getelementptr inbounds i32, i32* %0, i64 %7
%10 = load i32, i32* %9
%11 = add nsw i32 %10, %8
%12 = tail call i32 @sleep(i32 1)
%13 = add nuw nsw i64 %7, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %15, label %6
15: ; preds = %6, %2
%16 = phi i32 [ 0, %2 ], [ %11, %6 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ scanf(char *, float *);
main() {
  float km;
  scanf("%f", &km);
  printf("%f", (km / 1.61));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xedc(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
divsd  0xeb5(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = fdiv double %5, 1.610000e+00
%7 = fptrunc double %6 to float
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%4 = load float, float* %1
%5 = fpext float %4 to double
%6 = fdiv double %5, 1.610000e+00
%7 = fptrunc double %6 to float
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float %7)
ret i32 0
}
/* Variables and functions */
char *genpass(int);
int /*<<< orphan*/ puts(char *);
int main(void) {
  char *pass;
  pass = genpass(8);
  puts(pass);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i8* @genpass(i32 8)
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @puts(i8* %4)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i8* @genpass(i32 8)
%2 = tail call i32 @puts(i8* dereferenceable(1) %1)
ret i32 0
}
void _stp_runtime_entryfn_put_context(void) { return; }


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

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

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

LLVM IR (-O2):
define void @_stp_runtime_entryfn_put_context() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clear_io_bit(int, int);
void TOSH_CLR_YELLOW_LED_PIN() { clear_io_bit(0x37, 5); }


x86 assembly (clang, -O0):
<TOSH_CLR_YELLOW_LED_PIN>:
push   %rbp
mov    %rsp,%rbp
mov    $0x37,%edi
mov    $0x5,%esi
call   1030 <clear_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_CLR_YELLOW_LED_PIN>:
mov    $0x37,%edi
mov    $0x5,%esi
jmp    1030 <clear_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_CLR_YELLOW_LED_PIN() {
%1 = call i32 @clear_io_bit(i32 55, i32 5)
ret void
}

LLVM IR (-O2):
define void @TOSH_CLR_YELLOW_LED_PIN() {
%1 = tail call i32 @clear_io_bit(i32 55, i32 5)
ret void
}
/* Variables and functions */
float __ocml_cospi_f32(float);
float cospif(float x) { return __ocml_cospi_f32(x); }


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

x86 assembly (clang, -O2):
<cospif>:
jmp    1030 <__ocml_cospi_f32@plt>

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

LLVM IR (-O2):
define float @cospif(float %0) {
%2 = tail call float @__ocml_cospi_f32(float %0)
ret float %2
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
char *ctime(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  time_t t;
  t = time(NULL);
  printf("ctime is %s\n", ctime(&t));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <ctime@plt>
lea    0xeb3(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"ctime is %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @time(i32* null)
store i32 %3, i32* %1
%4 = call i8* @ctime(i32* %1)
%5 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}
void rop3_106_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = T & S;
  stk1 = *D ^ stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


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

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

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

LLVM IR (-O2):
define void @rop3_106_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
ret void
}
/* Type definitions */
struct xrdp_mod {
  int dummy;
};

/* Variables and functions */
int g_is_term();
int server_is_term(struct xrdp_mod *mod) { return g_is_term(); }


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

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

LLVM IR (-O0):
%struct.xrdp_mod = type { i32 }
define i32 @server_is_term(%struct.xrdp_mod* %0) {
%2 = alloca %struct.xrdp_mod*
store %struct.xrdp_mod* %0, %struct.xrdp_mod** %2
%3 = call i32 (...) @g_is_term()
ret i32 %3
}

LLVM IR (-O2):
%struct.xrdp_mod = type { i32 }
define i32 @server_is_term(%struct.xrdp_mod* nocapture readnone %0) {
%2 = tail call i32 (...) @g_is_term()
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ can_rx(int /*<<< orphan*/);
void FDCAN1_IT0_IRQ_Handler(void) { can_rx(0); }


x86 assembly (clang, -O0):
<FDCAN1_IT0_IRQ_Handler>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <can_rx@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FDCAN1_IT0_IRQ_Handler>:
xor    %edi,%edi
jmp    1030 <can_rx@plt>

LLVM IR (-O0):
define void @FDCAN1_IT0_IRQ_Handler() {
%1 = call i32 @can_rx(i32 0)
ret void
}

LLVM IR (-O2):
define void @FDCAN1_IT0_IRQ_Handler() {
%1 = tail call i32 @can_rx(i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ write_escaped_char(int /*<<< orphan*/ *, char);
void write_case(FILE *out, char c) {
  fputs("\ncase '", out);
  write_escaped_char(out, c);
  fputs("':", out);
}


x86 assembly (clang, -O0):
<write_case>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec3(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x8(%rbp),%rdi
movsbl -0x9(%rbp),%esi
call   1040 <write_escaped_char@plt>
mov    -0x8(%rbp),%rsi
lea    0xeae(%rip),%rdi
call   1030 <fputs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_case>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xed1(%rip),%rdi
mov    $0x7,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <write_escaped_char@plt>
lea    0xeb6(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <fwrite@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"\0Acase '\00"
@.str.1 = [3 x i8] c"':\00"
define void @write_case(i32* %0, i8 signext %1) {
%3 = alloca i32*
%4 = alloca i8
store i32* %0, i32** %3
store i8 %1, i8* %4
%5 = load i32*, i32** %3
%6 = call i32 @fputs(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32* %5)
%7 = load i32*, i32** %3
%8 = load i8, i8* %4
%9 = call i32 @write_escaped_char(i32* %7, i8 signext %8)
%10 = load i32*, i32** %3
%11 = call i32 @fputs(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %10)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"\0Acase '\00"
@.str.1 = [3 x i8] c"':\00"
define void @write_case(i32* %0, i8 signext %1) {
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64 7, i64 1, i32* %0)
%4 = tail call i32 @write_escaped_char(i32* %0, i8 signext %1)
%5 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i64 2, i64 1, i32* %0)
ret void
}
void ft_striter(char *s, void (*f)(char *)) {
  int index;
  if (s) {
    index = 0;
    while (s[index] != '\0') {
      f(&s[index]);
      index++;
    }
  }
}


x86 assembly (clang, -O0):
<ft_striter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     115b <ft_striter+0x5b>
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1156 <ft_striter+0x56>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdi
movslq -0x14(%rbp),%rcx
add    %rcx,%rdi
call   *%rax
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1122 <ft_striter+0x22>
jmp    115b <ft_striter+0x5b>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_striter>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     1130 <ft_striter+0x30>
mov    %rdi,%rbx
cmpb   $0x0,(%rdi)
je     1130 <ft_striter+0x30>
mov    %rsi,%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   *%r14
cmpb   $0x0,0x1(%rbx)
lea    0x1(%rbx),%rbx
jne    1120 <ft_striter+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @ft_striter(i8* %0, void (i8*)* nocapture %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %14, label %4
4: ; preds = %2
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, 0
br i1 %6, label %14, label %7
7: ; preds = %4, %7
%8 = phi i64 [ %10, %7 ], [ 0, %4 ]
%9 = phi i8* [ %11, %7 ], [ %0, %4 ]
tail call void %1(i8* %9)
%10 = add nuw i64 %8, 1
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %7
14: ; preds = %7, %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ destroyUsedResources();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void cleanExit(int signo) {
  destroyUsedResources();
  exit(0);
}


x86 assembly (clang, -O0):
<cleanExit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <destroyUsedResources@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
define void @cleanExit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @destroyUsedResources()
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @cleanExit(i32 %0) {
%2 = tail call i32 (...) @destroyUsedResources()
%3 = tail call i32 @exit(i32 0)
unreachable
}