xunge/DecIR huggingface dataset:
int main(int argc, char **argv) {
  double x = 1.48734 + (double)argc;
  return (int)__builtin_rint(x);
}


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)
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xecd(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <rint@plt>
cvttsd2si %xmm0,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cvtsi2sd %edi,%xmm0
addsd  0xee3(%rip),%xmm0
call   1030 <rint@plt>
cvttsd2si %xmm0,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = sitofp i32 %7 to double
%9 = fadd double 1.487340e+00, %8
store double %9, double* %6
%10 = load double, double* %6
%11 = call double @llvm.rint.f64(double %10)
%12 = fptosi double %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = sitofp i32 %0 to double
%4 = fadd double %3, 1.487340e+00
%5 = tail call double @llvm.rint.f64(double %4)
%6 = fptosi double %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ createPipes();
int /*<<< orphan*/ forkChild();
int /*<<< orphan*/ initChildsCounter();
int /*<<< orphan*/ initMapTasks();
int main() {
  initMapTasks();
  initChildsCounter();
  createPipes();
  forkChild();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <initMapTasks@plt>
mov    $0x0,%al
call   1060 <initChildsCounter@plt>
mov    $0x0,%al
call   1040 <createPipes@plt>
mov    $0x0,%al
call   1030 <forkChild@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <initMapTasks@plt>
xor    %eax,%eax
call   1060 <initChildsCounter@plt>
xor    %eax,%eax
call   1040 <createPipes@plt>
xor    %eax,%eax
call   1030 <forkChild@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @initMapTasks()
%2 = call i32 (...) @initChildsCounter()
%3 = call i32 (...) @createPipes()
%4 = call i32 (...) @forkChild()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @initMapTasks()
%2 = tail call i32 (...) @initChildsCounter()
%3 = tail call i32 (...) @createPipes()
%4 = tail call i32 (...) @forkChild()
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t uint24_decode(const uint8_t *p_encoded_data) {
  return ((((uint32_t)((uint8_t *)p_encoded_data)[0]) << 0) |
          (((uint32_t)((uint8_t *)p_encoded_data)[1]) << 8) |
          (((uint32_t)((uint8_t *)p_encoded_data)[2]) << 16));
}


x86 assembly (clang, -O0):
<uint24_decode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
shl    $0x0,%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%rcx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x10(%rcx),%rcx
shl    $0x10,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uint24_decode>:
mov    0x8(%rdi),%ecx
mov    0x10(%rdi),%eax
shl    $0x8,%ecx
or     (%rdi),%ecx
shl    $0x10,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @uint24_decode(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = getelementptr inbounds i64, i64* %3, i64 0
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = shl i32 %6, 0
%8 = load i64*, i64** %2
%9 = getelementptr inbounds i64, i64* %8, i64 1
%10 = load i64, i64* %9
%11 = trunc i64 %10 to i32
%12 = shl i32 %11, 8
%13 = or i32 %7, %12
%14 = load i64*, i64** %2
%15 = getelementptr inbounds i64, i64* %14, i64 2
%16 = load i64, i64* %15
%17 = trunc i64 %16 to i32
%18 = shl i32 %17, 16
%19 = or i32 %13, %18
ret i32 %19
}

LLVM IR (-O2):
define i32 @uint24_decode(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = trunc i64 %2 to i32
%4 = getelementptr inbounds i64, i64* %0, i64 1
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = shl i32 %6, 8
%8 = or i32 %7, %3
%9 = getelementptr inbounds i64, i64* %0, i64 2
%10 = load i64, i64* %9
%11 = trunc i64 %10 to i32
%12 = shl i32 %11, 16
%13 = or i32 %8, %12
ret i32 %13
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void putbin_uart(uint8_t *str, uint32_t len) {
  while (len--) {
    printf("0x%2X", *str++);
  }
}


x86 assembly (clang, -O0):
<putbin_uart>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     1155 <putbin_uart+0x45>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%esi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
jmp    111f <putbin_uart+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putbin_uart>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
je     1145 <putbin_uart+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %ebx,%r12d
jne    1130 <putbin_uart+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"0x%2X\00"
define void @putbin_uart(i32* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %12, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ %1, %2 ]
%6 = phi i32* [ %8, %4 ], [ %0, %2 ]
%7 = add nsw i32 %5, -1
%8 = getelementptr inbounds i32, i32* %6, i64 1
%9 = load i32, i32* %6
%10 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = icmp eq i32 %7, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %2
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
void smpte_fec_set_ts_recovery(uint8_t *p_fec, uint32_t snbase) {
  p_fec[8] = snbase >> 24;
  p_fec[9] = snbase >> 16;
  p_fec[10] = snbase >> 8;
  p_fec[11] = snbase & 0xff;
}


x86 assembly (clang, -O0):
<smpte_fec_set_ts_recovery>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
sar    $0x18,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x20(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x10,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x24(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x28(%rax)
mov    -0xc(%rbp),%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x2c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<smpte_fec_set_ts_recovery>:
mov    %esi,%eax
mov    %esi,%ecx
movzbl %sil,%edx
sar    $0x18,%esi
mov    %esi,0x20(%rdi)
sar    $0x10,%eax
mov    %eax,0x24(%rdi)
sar    $0x8,%ecx
mov    %ecx,0x28(%rdi)
mov    %edx,0x2c(%rdi)
ret

LLVM IR (-O0):
define void @smpte_fec_set_ts_recovery(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 = ashr i32 %5, 24
%7 = load i32*, i32** %3
%8 = getelementptr inbounds i32, i32* %7, i64 8
store i32 %6, i32* %8
%9 = load i32, i32* %4
%10 = ashr i32 %9, 16
%11 = load i32*, i32** %3
%12 = getelementptr inbounds i32, i32* %11, i64 9
store i32 %10, i32* %12
%13 = load i32, i32* %4
%14 = ashr i32 %13, 8
%15 = load i32*, i32** %3
%16 = getelementptr inbounds i32, i32* %15, i64 10
store i32 %14, i32* %16
%17 = load i32, i32* %4
%18 = and i32 %17, 255
%19 = load i32*, i32** %3
%20 = getelementptr inbounds i32, i32* %19, i64 11
store i32 %18, i32* %20
ret void
}

LLVM IR (-O2):
define void @smpte_fec_set_ts_recovery(i32* nocapture writeonly %0, i32 %1) {
%3 = ashr i32 %1, 24
%4 = getelementptr inbounds i32, i32* %0, i64 8
store i32 %3, i32* %4
%5 = ashr i32 %1, 16
%6 = getelementptr inbounds i32, i32* %0, i64 9
store i32 %5, i32* %6
%7 = ashr i32 %1, 8
%8 = getelementptr inbounds i32, i32* %0, i64 10
store i32 %7, i32* %8
%9 = and i32 %1, 255
%10 = getelementptr inbounds i32, i32* %0, i64 11
store i32 %9, i32* %10
ret void
}
void glutTimerFunc(float msecs, void (*func)(int value), int value) {}


x86 assembly (clang, -O0):
<glutTimerFunc>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @glutTimerFunc(float %0, void (i32)* %1, i32 %2) {
%4 = alloca float
%5 = alloca void (i32)*
%6 = alloca i32
store float %0, float* %4
store void (i32)* %1, void (i32)** %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
define void @glutTimerFunc(float %0, void (i32)* nocapture %1, i32 %2) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fwrite(unsigned char *, int, int, int /*<<< orphan*/ *);
int putlongel(FILE *outf, unsigned long val) {
  unsigned char buf[4];
  buf[0] = (val >> 0);
  buf[1] = (val >> 8);
  buf[2] = (val >> 16);
  buf[3] = (val >> 24);
  return fwrite(buf, 4, 1, outf);
}


x86 assembly (clang, -O0):
<putlongel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x0,%rax
mov    %al,-0x14(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x8,%rax
mov    %al,-0x13(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x10,%rax
mov    %al,-0x12(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x18,%rax
mov    %al,-0x11(%rbp)
lea    -0x14(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fwrite@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @putlongel(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
%5 = alloca [4 x i8]
store i32* %0, i32** %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = lshr i64 %6, 0
%8 = trunc i64 %7 to i8
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
store i8 %8, i8* %9
%10 = load i64, i64* %4
%11 = lshr i64 %10, 8
%12 = trunc i64 %11 to i8
%13 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 1
store i8 %12, i8* %13
%14 = load i64, i64* %4
%15 = lshr i64 %14, 16
%16 = trunc i64 %15 to i8
%17 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 2
store i8 %16, i8* %17
%18 = load i64, i64* %4
%19 = lshr i64 %18, 24
%20 = trunc i64 %19 to i8
%21 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 3
store i8 %20, i8* %21
%22 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
%23 = load i32*, i32** %3
%24 = call i32 @fwrite(i8* %22, i32 4, i32 1, i32* %23)
ret i32 %24
}

LLVM IR (-O2):
define i32 @putlongel(i32* nocapture %0, i64 %1) {
%3 = alloca [4 x i8]
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%5 = trunc i64 %1 to i8
store i8 %5, i8* %4
%6 = lshr i64 %1, 8
%7 = trunc i64 %6 to i8
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 1
store i8 %7, i8* %8
%9 = lshr i64 %1, 16
%10 = trunc i64 %9 to i8
%11 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 2
store i8 %10, i8* %11
%12 = lshr i64 %1, 24
%13 = trunc i64 %12 to i8
%14 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 3
store i8 %13, i8* %14
%15 = call i32 @fwrite(i8* %4, i32 4, i32 1, i32* %0)
ret i32 %15
}
long long longlong_ignoring_signedlonglongint(long long x,
                                              signed long long int y) {
  return x;
}


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

x86 assembly (clang, -O2):
<longlong_ignoring_signedlonglongint>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @longlong_ignoring_signedlonglongint(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @longlong_ignoring_signedlonglongint(i64 returned %0, i64 %1) {
ret i64 %0
}
/* Variables and functions */
int /*<<< orphan*/ mark_idx(int);
int /*<<< orphan*/ mark_set_idx(int /*<<< orphan*/, int, int);
void mark_set(int c, int y, int x) { mark_set_idx(mark_idx(c), y, x); }


x86 assembly (clang, -O0):
<mark_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <mark_idx@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1040 <mark_set_idx@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mark_set>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
call   1030 <mark_idx@plt>
mov    %eax,%edi
mov    %ebp,%esi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <mark_set_idx@plt>

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

LLVM IR (-O2):
define void @mark_set(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @mark_idx(i32 %0)
%5 = tail call i32 @mark_set_idx(i32 %4, i32 %1, i32 %2)
ret void
}
int bar(void) {
  int i, j = 1;
  for (i = 0; i != 10; i++) {
  lab:
    if (i) {
      int *k = &j;
    } else if (j)
      goto lab;
  }
  return 1;
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
je     115f <bar+0x5f>
jmp    1121 <bar+0x21>
cmpl   $0x0,-0x4(%rbp)
je     1138 <bar+0x38>
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    114c <bar+0x4c>
cmpl   $0x0,-0x8(%rbp)
je     1147 <bar+0x47>
jmp    1121 <bar+0x21>
jmp    114c <bar+0x4c>
jmp    1151 <bar+0x51>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1112 <bar+0x12>
mov    $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @bar() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ evt_store(int, unsigned long long, int, int);
void evt_stat_runtime(int pid, int cpu, unsigned long long int time) {
  if (pid) {
    evt_store(10, time, pid, cpu);
  }
}


x86 assembly (clang, -O0):
<evt_stat_runtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1140 <evt_stat_runtime+0x30>
mov    -0x10(%rbp),%rsi
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
mov    $0xa,%edi
call   1030 <evt_store@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<evt_stat_runtime>:
test   %edi,%edi
je     1127 <evt_stat_runtime+0x17>
mov    %esi,%ecx
mov    %edi,%eax
mov    $0xa,%edi
mov    %rdx,%rsi
mov    %eax,%edx
jmp    1030 <evt_store@plt>
ret

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

LLVM IR (-O2):
define void @evt_stat_runtime(i32 %0, i32 %1, i64 %2) {
%4 = icmp eq i32 %0, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @evt_store(i32 10, i64 %2, i32 %0, i32 %1)
br label %7
7: ; preds = %5, %3
ret void
}
int set_ipcam_name(const char *ipcam_name) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @set_ipcam_name(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ F_GETFL;
int /*<<< orphan*/ F_SETFL;
int O_NONBLOCK;
int fcntl(int, int /*<<< orphan*/, ...);
int set_block(int iInput) {
  int current_state = fcntl(iInput, F_GETFL);
  return (fcntl(iInput, F_SETFL, current_state & ~O_NONBLOCK) >= 0) ? 0 : -1;
}


x86 assembly (clang, -O0):
<set_block>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
mov    $0x0,%al
call   1030 <fcntl@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e9d(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%edx
mov    0x2ea1(%rip),%rax
mov    (%rax),%eax
xor    $0xffffffff,%eax
and    %eax,%edx
mov    $0x0,%al
call   1030 <fcntl@plt>
mov    %eax,%edx
mov    $0xffffffff,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmovge %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_block>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%esi
xor    %eax,%eax
call   1030 <fcntl@plt>
mov    0x2eae(%rip),%rcx
mov    (%rcx),%esi
mov    0x2eb5(%rip),%rcx
mov    (%rcx),%edx
not    %edx
and    %eax,%edx
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <fcntl@plt>
sar    $0x1f,%eax
pop    %rbx
ret

LLVM IR (-O0):
@F_GETFL = global i32 0
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
define i32 @set_block(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* @F_GETFL
%6 = call i32 (i32, i32, ...) @fcntl(i32 %4, i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = load i32, i32* @F_SETFL
%9 = load i32, i32* %3
%10 = load i32, i32* @O_NONBLOCK
%11 = xor i32 %10, -1
%12 = and i32 %9, %11
%13 = call i32 (i32, i32, ...) @fcntl(i32 %7, i32 %8, i32 %12)
%14 = icmp sge i32 %13, 0
%15 = zext i1 %14 to i64
%16 = select i1 %14, i32 0, i32 -1
ret i32 %16
}

LLVM IR (-O2):
@F_GETFL = global i32 0
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
define i32 @set_block(i32 %0) {
%2 = load i32, i32* @F_GETFL
%3 = tail call i32 (i32, i32, ...) @fcntl(i32 %0, i32 %2)
%4 = load i32, i32* @F_SETFL
%5 = load i32, i32* @O_NONBLOCK
%6 = xor i32 %5, -1
%7 = and i32 %3, %6
%8 = tail call i32 (i32, i32, ...) @fcntl(i32 %0, i32 %4, i32 %7)
%9 = ashr i32 %8, 31
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ env_init();
int /*<<< orphan*/ env_unsetlen(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
void env_unset(const char *s) {
  env_init();
  env_unsetlen(s, strlen(s));
}


x86 assembly (clang, -O0):
<env_unset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <env_init@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1050 <env_unsetlen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<env_unset>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <env_init@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1050 <env_unsetlen@plt>

LLVM IR (-O0):
define void @env_unset(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @env_init()
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = call i32 @env_unsetlen(i8* %4, i32 %6)
ret void
}

LLVM IR (-O2):
define void @env_unset(i8* %0) {
%2 = tail call i32 (...) @env_init()
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @env_unsetlen(i8* %0, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ sleep(int);
void *yell(void *word) {
  int i;
  for (i = 0; i < 5; i++) {
    sleep(1);
    printf("%s\n", (char *)word);
  }
}


x86 assembly (clang, -O0):
<yell>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x5,-0x14(%rbp)
jge    1165 <yell+0x45>
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    -0x10(%rbp),%rsi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1133 <yell+0x13>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yell>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    $0x1,%edi
call   1040 <sleep@plt>
lea    0xec8(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define noalias i8* @yell(i8* %0) {
%2 = tail call i32 @sleep(i32 1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @sleep(i32 1)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%6 = tail call i32 @sleep(i32 1)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%8 = tail call i32 @sleep(i32 1)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%10 = tail call i32 @sleep(i32 1)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i8* undef
}
/* Variables and functions */
bool is_branch(const char *v) {
  bool res = true;
  for (; *v; ++v)
    res ^= (*v == '.');
  return res;
}


x86 assembly (clang, -O0):
<is_branch>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <is_branch+0x45>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <is_branch+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_branch>:
mov    (%rdi),%cl
test   %cl,%cl
je     1126 <is_branch+0x26>
add    $0x1,%rdi
mov    $0x1,%eax
nop
xor    %edx,%edx
cmp    $0x2e,%cl
sete   %dl
xor    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <is_branch+0x10>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @is_branch(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %10, %4 ], [ 1, %1 ]
%7 = phi i8* [ %11, %4 ], [ %0, %1 ]
%8 = icmp eq i8 %5, 46
%9 = zext i1 %8 to i32
%10 = xor i32 %6, %9
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 1, %1 ], [ %10, %4 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  int i;
  for (i = argc - 1; i > 0; i--) {
    printf("%s ", argv[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    115f <main+0x4f>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    112f <main+0x1f>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
cmp    $0x2,%edi
jl     1149 <main+0x39>
mov    %rsi,%r15
mov    %edi,%ebx
add    $0x1,%rbx
lea    0xed6(%rip),%r14
nopw   0x0(%rax,%rax,1)
lea    -0x2(%rbx),%eax
mov    (%r15,%rax,8),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0xffffffffffffffff,%rbx
cmp    $0x2,%rbx
ja     1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = sub nsw i32 %7, 1
store i32 %8, i32* %6
br label %9
9: ; preds = %19, %2
%10 = load i32, i32* %6
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %22
12: ; preds = %9
%13 = load i8**, i8*** %5
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %13, i64 %15
%17 = load i8*, i8** %16
%18 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %17)
br label %19
19: ; preds = %12
%20 = load i32, i32* %6
%21 = add nsw i32 %20, -1
store i32 %21, i32* %6
br label %9
22: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s \00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ %5, %4 ], [ %8, %6 ]
%8 = add nsw i64 %7, -1
%9 = and i64 %8, 4294967295
%10 = getelementptr inbounds i8*, i8** %1, i64 %9
%11 = load i8*, i8** %10
%12 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = icmp ugt i64 %7, 2
br i1 %13, label %6, label %14
14: ; preds = %6, %2
ret i32 0
}
double _abr(f)
double f;
{ return (f >= 0.0 ? f : -f); }


x86 assembly (clang, -O0):
<_abr>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     112a <_abr+0x2a>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    114b <_abr+0x4b>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<_abr>:
movapd 0xef8(%rip),%xmm1
xorpd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
cmplesd %xmm0,%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @_abr(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oge double %3, 0.000000e+00
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load double, double* %2
br label %10
7: ; preds = %1
%8 = load double, double* %2
%9 = fneg double %8
br label %10
10: ; preds = %7, %5
%11 = phi double [ %6, %5 ], [ %9, %7 ]
ret double %11
}

LLVM IR (-O2):
define double @_abr(double %0) {
%2 = fcmp oge double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %0, double %3
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ foo(int);
void bar(void) { foo(1); }


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

x86 assembly (clang, -O2):
<bar>:
mov    $0x1,%edi
jmp    1030 <foo@plt>

LLVM IR (-O0):
define void @bar() {
%1 = call i32 @foo(i32 1)
ret void
}

LLVM IR (-O2):
define void @bar() {
%1 = tail call i32 @foo(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __e_acsl_foo();
int main(void) {
  int __retres;
  __e_acsl_foo();
  __retres = 0;
  return __retres;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__e_acsl_foo@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @__e_acsl_foo()
store i32 0, i32* %2
%4 = load i32, i32* %2
ret i32 %4
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__e_acsl_foo()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ do_syscall(char *);
void EE_Lock(void) { do_syscall("EE_Lock"); }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"EE_Lock\00"
define void @EE_Lock() {
%1 = tail call i32 @do_syscall(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ volatile uint32_t;

/* Variables and functions */
uint32_t mmio_read(void *reg) { return *(volatile uint32_t *)(reg); }


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

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

LLVM IR (-O0):
define i32 @mmio_read(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = load volatile i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @mmio_read(i8* %0) {
%2 = bitcast i8* %0 to i32*
%3 = load volatile i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ putVectorPicture(double, double, int /*<<< orphan*/, int,
                                    double);
void putVerticalVectorPicture(double px, double py, double len) {
  putVectorPicture(px, py, 0, 1, len);
}


x86 assembly (clang, -O0):
<putVerticalVectorPicture>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <putVectorPicture@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putVerticalVectorPicture>:
xor    %edi,%edi
mov    $0x1,%esi
jmp    1030 <putVectorPicture@plt>

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

LLVM IR (-O2):
define void @putVerticalVectorPicture(double %0, double %1, double %2) {
%4 = tail call i32 @putVectorPicture(double %0, double %1, i32 0, i32 1, double %2)
ret void
}
void RTStrmFlush(void) {}


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

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

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

LLVM IR (-O2):
define void @RTStrmFlush() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Cffclos(int, int *);
extern void ftclos_(int *A1, int *A2) {
  ;
  Cffclos(*A1, A2);
  return;
}


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

x86 assembly (clang, -O2):
<ftclos_>:
mov    (%rdi),%edi
jmp    1030 <Cffclos@plt>

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

LLVM IR (-O2):
define void @ftclos_(i32* nocapture %0, i32* %1) {
%3 = load i32, i32* %0
%4 = tail call i32 @Cffclos(i32 %3, i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Debug(char *);
int /*<<< orphan*/ kill_this_task();
void drop(void) {
  Debug("Item dropped.");
  kill_this_task();
}


x86 assembly (clang, -O0):
<drop>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <Debug@plt>
mov    $0x0,%al
call   1030 <kill_this_task@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<drop>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <Debug@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <kill_this_task@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"Item dropped.\00"
define void @drop() {
%1 = call i32 @Debug(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @kill_this_task()
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"Item dropped.\00"
define void @drop() {
%1 = tail call i32 @Debug(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @kill_this_task()
ret void
}
/* Variables and functions */
int write_int_to_file(char *, int);
int gpio_unexport(int gpio) {
  return write_int_to_file("/sys/class/gpio/unexport", gpio);
}


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

x86 assembly (clang, -O2):
<gpio_unexport>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <write_int_to_file@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"/sys/class/gpio/unexport\00"
define i32 @gpio_unexport(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @write_int_to_file(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 %4
}

LLVM IR (-O2):
@.str = [25 x i8] c"/sys/class/gpio/unexport\00"
define i32 @gpio_unexport(i32 %0) {
%2 = tail call i32 @write_int_to_file(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ putchar(int);
void print_file(FILE *file) {
  int character;
  while ((character = fgetc(file)) != EOF)
    putchar(character);
}


x86 assembly (clang, -O0):
<print_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <fgetc@plt>
mov    %eax,-0xc(%rbp)
mov    0x2ea9(%rip),%rcx
cmp    (%rcx),%eax
je     1154 <print_file+0x34>
mov    -0xc(%rbp),%edi
call   1030 <putchar@plt>
jmp    112c <print_file+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_file>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <fgetc@plt>
mov    0x2eb5(%rip),%r14
cmp    (%r14),%eax
je     1154 <print_file+0x34>
nopl   0x0(%rax,%rax,1)
mov    %eax,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
call   1040 <fgetc@plt>
cmp    (%r14),%eax
jne    1140 <print_file+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EOF = global i32 0
define void @print_file(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
br label %4
4: ; preds = %9, %1
%5 = load i32*, i32** %2
%6 = call i32 @fgetc(i32* %5)
store i32 %6, i32* %3
%7 = load i32, i32* @EOF
%8 = icmp ne i32 %6, %7
br i1 %8, label %9, label %12
9: ; preds = %4
%10 = load i32, i32* %3
%11 = call i32 @putchar(i32 %10)
br label %4
12: ; preds = %4
ret void
}

LLVM IR (-O2):
@EOF = global i32 0
define void @print_file(i32* nocapture %0) {
%2 = tail call i32 @fgetc(i32* %0)
%3 = load i32, i32* @EOF
%4 = icmp eq i32 %2, %3
br i1 %4, label %11, label %5
5: ; preds = %1, %5
%6 = phi i32 [ %8, %5 ], [ %2, %1 ]
%7 = tail call i32 @putchar(i32 %6)
%8 = tail call i32 @fgetc(i32* %0)
%9 = load i32, i32* @EOF
%10 = icmp eq i32 %8, %9
br i1 %10, label %11, label %5
11: ; preds = %5, %1
ret void
}
/* Type definitions */
struct sigaction {
  void (*sa_handler)();
  int /*<<< orphan*/ sa_mask;
  scalar_t__ sa_flags;
};

/* Variables and functions */
int /*<<< orphan*/ sigaction(int, struct sigaction *, struct sigaction *);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
void sig_catch(int sig, void (*f)()) {
  struct sigaction sa;
  sa.sa_handler = f;
  sa.sa_flags = 0;
  sigemptyset(&sa.sa_mask);
  sigaction(sig, &sa, (struct sigaction *)0);
}


x86 assembly (clang, -O0):
<sig_catch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
movq   $0x0,-0x18(%rbp)
lea    -0x28(%rbp),%rdi
add    $0x8,%rdi
call   1040 <sigemptyset@plt>
mov    -0x4(%rbp),%edi
lea    -0x28(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <sigaction@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_catch>:
push   %rbx
sub    $0x20,%rsp
mov    %edi,%ebx
mov    %rsi,0x8(%rsp)
movq   $0x0,0x18(%rsp)
lea    0x10(%rsp),%rdi
call   1040 <sigemptyset@plt>
lea    0x8(%rsp),%rsi
mov    %ebx,%edi
xor    %edx,%edx
call   1030 <sigaction@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.sigaction = type { void (...)*, i32, i64 }
define void @sig_catch(i32 %0, void (...)* %1) {
%3 = alloca i32
%4 = alloca void (...)*
%5 = alloca %struct.sigaction
store i32 %0, i32* %3
store void (...)* %1, void (...)** %4
%6 = load void (...)*, void (...)** %4
%7 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %5, i32 0, i32 0
store void (...)* %6, void (...)** %7
%8 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %5, i32 0, i32 2
store i64 0, i64* %8
%9 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %5, i32 0, i32 1
%10 = call i32 @sigemptyset(i32* %9)
%11 = load i32, i32* %3
%12 = call i32 @sigaction(i32 %11, %struct.sigaction* %5, %struct.sigaction* null)
ret void
}

LLVM IR (-O2):
%struct.sigaction = type { void (...)*, i32, i64 }
define void @sig_catch(i32 %0, void (...)* %1) {
%3 = alloca %struct.sigaction
%4 = bitcast %struct.sigaction* %3 to i8*
%5 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %3, i64 0, i32 0
store void (...)* %1, void (...)** %5
%6 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %3, i64 0, i32 2
store i64 0, i64* %6
%7 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %3, i64 0, i32 1
%8 = call i32 @sigemptyset(i32* %7)
%9 = call i32 @sigaction(i32 %0, %struct.sigaction* %3, %struct.sigaction* null)
ret void
}
int mkstemps(path, slen)
char *path;
int slen;
{
  int fd;
  return (_gettemp(path, &fd, 0, slen) ? fd : -1);
}


x86 assembly (clang, -O0):
<mkstemps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%ecx
lea    -0x10(%rbp),%rsi
xor    %edx,%edx
mov    $0x0,%al
call   1030 <_gettemp@plt>
cmp    $0x0,%eax
je     1147 <mkstemps+0x37>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1154 <mkstemps+0x44>
mov    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    1154 <mkstemps+0x44>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkstemps>:
push   %rax
mov    %esi,%ecx
lea    0x4(%rsp),%rsi
xor    %edx,%edx
xor    %eax,%eax
call   1030 <_gettemp@plt>
cmp    $0x1,%eax
sbb    %eax,%eax
or     0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mkstemps(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 (i8*, i32*, i32, i32, ...) bitcast (i32 (...)* @_gettemp to i32 (i8*, i32*, i32, i32, ...)*)(i8* %6, i32* %5, i32 0, i32 %7)
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load i32, i32* %5
br label %13
12: ; preds = %2
br label %13
13: ; preds = %12, %10
%14 = phi i32 [ %11, %10 ], [ -1, %12 ]
ret i32 %14
}

LLVM IR (-O2):
define i32 @mkstemps(i8* %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 (i8*, i32*, i32, i32, ...) bitcast (i32 (...)* @_gettemp to i32 (i8*, i32*, i32, i32, ...)*)(i8* %0, i32* %3, i32 0, i32 %1)
%6 = icmp eq i32 %5, 0
%7 = load i32, i32* %3
%8 = select i1 %6, i32 -1, i32 %7
ret i32 %8
}
const char *cApiDeviceModel() { return "x64 desktop"; }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"x64 desktop\00"
define i8* @cApiDeviceModel() {
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [12 x i8] c"x64 desktop\00"
define i8* @cApiDeviceModel() {
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ do_concat();
int /*<<< orphan*/ do_cons();
int /*<<< orphan*/ do_swapd();
void do_enconcat(void) {
  do_swapd();
  do_cons();
  do_concat();
}


x86 assembly (clang, -O0):
<do_enconcat>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <do_swapd@plt>
mov    $0x0,%al
call   1050 <do_cons@plt>
mov    $0x0,%al
call   1030 <do_concat@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_enconcat>:
push   %rax
xor    %eax,%eax
call   1040 <do_swapd@plt>
xor    %eax,%eax
call   1050 <do_cons@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <do_concat@plt>

LLVM IR (-O0):
define void @do_enconcat() {
%1 = call i32 (...) @do_swapd()
%2 = call i32 (...) @do_cons()
%3 = call i32 (...) @do_concat()
ret void
}

LLVM IR (-O2):
define void @do_enconcat() {
%1 = tail call i32 (...) @do_swapd()
%2 = tail call i32 (...) @do_cons()
%3 = tail call i32 (...) @do_concat()
ret void
}
void EXTI15_10_IRQHandler() {}


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

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

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

LLVM IR (-O2):
define void @EXTI15_10_IRQHandler() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gen_op_load_spr(int);
void spr_read_generic(void *opaque, int sprn) { gen_op_load_spr(sprn); }


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

x86 assembly (clang, -O2):
<spr_read_generic>:
mov    %esi,%edi
jmp    1030 <gen_op_load_spr@plt>

LLVM IR (-O0):
define void @spr_read_generic(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @gen_op_load_spr(i32 %5)
ret void
}

LLVM IR (-O2):
define void @spr_read_generic(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @gen_op_load_spr(i32 %1)
ret void
}
void av_bsf_get_class() {}


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

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

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

LLVM IR (-O2):
define void @av_bsf_get_class() {
ret void
}
/* Variables and functions */
char getchar();
int /*<<< orphan*/ termioscfg(int);
int /*<<< orphan*/ termiosdecfg();
char getch_(int echo) {
  termioscfg(echo);
  char ch = getchar();
  termiosdecfg();
  return ch;
}


x86 assembly (clang, -O0):
<getch_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <termioscfg@plt>
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %al,-0x5(%rbp)
mov    $0x0,%al
call   1040 <termiosdecfg@plt>
movsbl -0x5(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getch_>:
push   %rbx
call   1050 <termioscfg@plt>
xor    %eax,%eax
call   1030 <getchar@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <termiosdecfg@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @getch_(i32 %0) {
%2 = alloca i32
%3 = alloca i8
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @termioscfg(i32 %4)
%6 = call signext i8 (...) @getchar()
store i8 %6, i8* %3
%7 = call i32 (...) @termiosdecfg()
%8 = load i8, i8* %3
ret i8 %8
}

LLVM IR (-O2):
define signext i8 @getch_(i32 %0) {
%2 = tail call i32 @termioscfg(i32 %0)
%3 = tail call signext i8 (...) @getchar()
%4 = tail call i32 (...) @termiosdecfg()
ret i8 %3
}
/* Variables and functions */
size_t write(int, void *, size_t);
size_t comm_printer_write(void *buffer, size_t size) {
  size_t result;
  { result = write(1, buffer, size); }
  return (result);
}


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

x86 assembly (clang, -O2):
<comm_printer_write>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x1,%edi
jmp    1030 <write@plt>

LLVM IR (-O0):
define i64 @comm_printer_write(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i64 @write(i32 1, i8* %6, i64 %7)
store i64 %8, i64* %5
%9 = load i64, i64* %5
ret i64 %9
}

LLVM IR (-O2):
define i64 @comm_printer_write(i8* nocapture %0, i64 %1) {
%3 = tail call i64 @write(i32 1, i8* %0, i64 %1)
ret i64 %3
}