xunge/DecIR huggingface dataset:
int main(argc, argv)
int argc;
char *argv[];
{
  read_file(argc, argv);
  build_item_table();
  legality_check();
  build_display();
  while (1) {
    draw();
    execute();
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1050 <read_file@plt>
mov    $0x0,%al
call   1070 <build_item_table@plt>
mov    $0x0,%al
call   1060 <legality_check@plt>
mov    $0x0,%al
call   1080 <build_display@plt>
mov    $0x0,%al
call   1030 <draw@plt>
mov    $0x0,%al
call   1040 <execute@plt>
jmp    1199 <main+0x39>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <read_file@plt>
xor    %eax,%eax
call   1070 <build_item_table@plt>
xor    %eax,%eax
call   1060 <legality_check@plt>
xor    %eax,%eax
call   1080 <build_display@plt>
nopl   (%rax)
xor    %eax,%eax
call   1030 <draw@plt>
xor    %eax,%eax
call   1040 <execute@plt>
jmp    1180 <main+0x20>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 (i32, i8**, ...) bitcast (i32 (...)* @read_file to i32 (i32, i8**, ...)*)(i32 %6, i8** %7)
%9 = call i32 (...) @build_item_table()
%10 = call i32 (...) @legality_check()
%11 = call i32 (...) @build_display()
br label %12
12: ; preds = %2, %12
%13 = call i32 (...) @draw()
%14 = call i32 (...) @execute()
br label %12
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 (i32, i8**, ...) bitcast (i32 (...)* @read_file to i32 (i32, i8**, ...)*)(i32 %0, i8** %1)
%4 = tail call i32 (...) @build_item_table()
%5 = tail call i32 (...) @legality_check()
%6 = tail call i32 (...) @build_display()
br label %7
7: ; preds = %2, %7
%8 = tail call i32 (...) @draw()
%9 = tail call i32 (...) @execute()
br label %7
}
/* Variables and functions */
int /*<<< orphan*/ Cyc_Tcutil_check_bound(unsigned int, unsigned int, void *,
                                          int /*<<< orphan*/);
void Cyc_Tcutil_check_nonzero_bound(unsigned loc, void *b) {
  ({ Cyc_Tcutil_check_bound(loc, 0U, b, 0); });
}


x86 assembly (clang, -O0):
<Cyc_Tcutil_check_nonzero_bound>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
xor    %ecx,%ecx
mov    %ecx,%esi
call   1030 <Cyc_Tcutil_check_bound@plt>
mov    %eax,-0x14(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Tcutil_check_nonzero_bound>:
mov    %rsi,%rdx
xor    %esi,%esi
xor    %ecx,%ecx
jmp    1030 <Cyc_Tcutil_check_bound@plt>

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

LLVM IR (-O2):
define void @Cyc_Tcutil_check_nonzero_bound(i32 %0, i8* %1) {
%3 = tail call i32 @Cyc_Tcutil_check_bound(i32 %0, i32 0, i8* %1, i32 0)
ret void
}
/* Variables and functions */
void *common();
void *bar() { return common(); }


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

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

LLVM IR (-O0):
define i8* @bar() {
%1 = call i8* (...) @common()
ret i8* %1
}

LLVM IR (-O2):
define i8* @bar() {
%1 = tail call i8* (...) @common()
ret i8* %1
}
unsigned long inportl(unsigned short port) {
  unsigned long result;
  __asm__ __volatile__("inl %%dx, %%eax" : "=a"(result) : "dN"(port));
  return result;
}


x86 assembly (clang, -O0):
<inportl>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%dx
in     (%dx),%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inportl>:
mov    %edi,%edx
in     (%dx),%eax
ret

LLVM IR (-O0):
define i64 @inportl(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i64
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = call i64 asm sideeffect "inl %dx, %eax", "={ax},{dx}N,~{dirflag},~{fpsr},~{flags}"(i16 %4)
store i64 %5, i64* %3
%6 = load i64, i64* %3
ret i64 %6
}

LLVM IR (-O2):
define i64 @inportl(i16 zeroext %0) {
%2 = tail call i64 asm sideeffect "inl %dx, %eax", "={ax},{dx}N,~{dirflag},~{fpsr},~{flags}"(i16 %0)
ret i64 %2
}
float LibC1Func() { return 2.0; }


x86 assembly (clang, -O0):
<LibC1Func>:
push   %rbp
mov    %rsp,%rbp
movss  0xef4(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<LibC1Func>:
movss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @LibC1Func() {
ret float 2.000000e+00
}

LLVM IR (-O2):
define float @LibC1Func() {
ret float 2.000000e+00
}
void w6(void *x, double y) { *(double *)(x + 32762) = y; }


x86 assembly (clang, -O0):
<w6>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x7ffa(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<w6>:
movsd  %xmm0,0x7ffa(%rdi)
ret

LLVM IR (-O0):
define void @w6(i8* %0, double %1) {
%3 = alloca i8*
%4 = alloca double
store i8* %0, i8** %3
store double %1, double* %4
%5 = load double, double* %4
%6 = load i8*, i8** %3
%7 = getelementptr i8, i8* %6, i64 32762
%8 = bitcast i8* %7 to double*
store double %5, double* %8
ret void
}

LLVM IR (-O2):
define void @w6(i8* nocapture writeonly %0, double %1) {
%3 = getelementptr i8, i8* %0, i64 32762
%4 = bitcast i8* %3 to double*
store double %1, double* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ msg1();
int /*<<< orphan*/ msg2();
int main(void) {
  msg1();
  msg1();
  msg1();
  msg2();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @msg1()
%2 = tail call i32 (...) @msg1()
%3 = tail call i32 (...) @msg1()
%4 = tail call i32 (...) @msg2()
ret i32 0
}
/* Variables and functions */
scalar_t__ syscall(int);
long testCall3(void) { return (long)syscall(351); }


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

x86 assembly (clang, -O2):
<testCall3>:
mov    $0x15f,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i64 @testCall3() {
%1 = call i64 @syscall(i32 351)
ret i64 %1
}

LLVM IR (-O2):
define i64 @testCall3() {
%1 = tail call i64 @syscall(i32 351)
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ munmap(void *, size_t);
void runtime_free(void *start, size_t length) { munmap(start, length); }


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

x86 assembly (clang, -O2):
<runtime_free>:
jmp    1030 <munmap@plt>

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

LLVM IR (-O2):
define void @runtime_free(i8* %0, i64 %1) {
%3 = tail call i32 @munmap(i8* %0, i64 %1)
ret void
}
int _fstat(int fd, struct stat *buf) { return -1; }


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

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

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

LLVM IR (-O2):
%struct.stat = type opaque
define i32 @_fstat(i32 %0, %struct.stat* nocapture readnone %1) {
ret i32 -1
}
int skiptofmt(const char *s) {
  const char *p;
  for (p = s; *p && *p != '%'; p++)
    ;
  return p - s;
}


x86 assembly (clang, -O0):
<skiptofmt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     1135 <skiptofmt+0x35>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x25,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1145 <skiptofmt+0x45>
jmp    115b <skiptofmt+0x5b>
jmp    114a <skiptofmt+0x4a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <skiptofmt+0x10>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skiptofmt>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rax,1),%ecx
test   %cl,%cl
je     1123 <skiptofmt+0x23>
cmp    $0x25,%cl
je     1123 <skiptofmt+0x23>
add    $0x1,%rax
jmp    1110 <skiptofmt+0x10>
ret

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

LLVM IR (-O2):
define i32 @skiptofmt(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 0, label %7
i8 37, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2, %2
%8 = ptrtoint i8* %3 to i64
%9 = ptrtoint i8* %0 to i64
%10 = sub i64 %8, %9
%11 = trunc i64 %10 to i32
ret i32 %11
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int c;
  int x, y;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  c = 0;
  while (x > y) {
    x = x + 1;
    y = y + 2;
    c = c + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1166 <main+0x56>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113a <main+0x2a>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ExtSelect(char *, char *, int /*<<< orphan*/);
void ExttRegistrarSelect(void) {
  ExtSelect("tRegistrar",
            "tRegistrar.uRegistrar,tRegistrar.cLabel,tRegistrar.uOwner,"
            "tRegistrar.uCreatedBy,tRegistrar.uCreatedDate,tRegistrar.uModBy,"
            "tRegistrar.uModDate",
            0);
}


x86 assembly (clang, -O0):
<ExttRegistrarSelect>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee9(%rip),%rsi
xor    %edx,%edx
call   1030 <ExtSelect@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ExttRegistrarSelect>:
lea    0xee9(%rip),%rdi
lea    0xeed(%rip),%rsi
xor    %edx,%edx
jmp    1030 <ExtSelect@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"tRegistrar\00"
@.str.1 = [142 x i8] c"tRegistrar.uRegistrar,tRegistrar.cLabel,tRegistrar.uOwner,tRegistrar.uCreatedBy,tRegistrar.uCreatedDate,tRegistrar.uModBy,tRegistrar.uModDate\00"
define void @ExttRegistrarSelect() {
%1 = call i32 @ExtSelect(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"tRegistrar\00"
@.str.1 = [142 x i8] c"tRegistrar.uRegistrar,tRegistrar.cLabel,tRegistrar.uOwner,tRegistrar.uCreatedBy,tRegistrar.uCreatedDate,tRegistrar.uModBy,tRegistrar.uModDate\00"
define void @ExttRegistrarSelect() {
%1 = tail call i32 @ExtSelect(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ euler001();
int main(void) {
  euler001();
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @euler001()
ret i32 0
}
double int_to_ratio(int value, int max) { return value / (double)max; }


x86 assembly (clang, -O0):
<int_to_ratio>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_to_ratio>:
cvtsi2sd %edi,%xmm0
cvtsi2sd %esi,%xmm1
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @int_to_ratio(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 = sitofp i32 %5 to double
%7 = load i32, i32* %4
%8 = sitofp i32 %7 to double
%9 = fdiv double %6, %8
ret double %9
}

LLVM IR (-O2):
define double @int_to_ratio(i32 %0, i32 %1) {
%3 = sitofp i32 %0 to double
%4 = sitofp i32 %1 to double
%5 = fdiv double %3, %4
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void show_help(void) {
  puts("These features are available:"
       "\n\tPattern searches with / and ?"
       "\n\tLast command repeat with \'.\'"
       "\n\tLine marking with  'x"
       "\n\tNamed buffers with  \"x"
       "\n\tReadonly if vi is called as \"view\""
       "\n\tReadonly with -R command line arg"
       "\n\tSome colon mode commands with \':\'"
       "\n\tSettable options with \":set\""
       "\n\tSignal catching- ^C"
       "\n\tJob suspend and resume with ^Z"
       "\n\tAdapt to window re-sizes");
}


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

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

LLVM IR (-O0):
@.str = [353 x i8] c"These features are available:\0A\09Pattern searches with / and ?\0A\09Last command repeat with '.'\0A\09Line marking with 'x\0A\09Named buffers with \22x\0A\09Readonly if vi is called as \22view\22\0A\09Readonly with -R command line arg\0A\09Some colon mode commands with ':'\0A\09Settable options with \22:set\22\0A\09Signal catching- ^C\0A\09Job suspend and resume with ^Z\0A\09Adapt to window re-sizes\00"
define void @show_help() {
%1 = call i32 @puts(i8* getelementptr inbounds ([353 x i8], [353 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [353 x i8] c"These features are available:\0A\09Pattern searches with / and ?\0A\09Last command repeat with '.'\0A\09Line marking with 'x\0A\09Named buffers with \22x\0A\09Readonly if vi is called as \22view\22\0A\09Readonly with -R command line arg\0A\09Some colon mode commands with ':'\0A\09Settable options with \22:set\22\0A\09Signal catching- ^C\0A\09Job suspend and resume with ^Z\0A\09Adapt to window re-sizes\00"
define void @show_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([353 x i8], [353 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
double M_PI;
double sin(double);
double dp_dz(double L, double a_pz, double p_z, double z) {
  return -M_PI * a_pz * p_z * sin(M_PI * a_pz * z / L) / L;
}


x86 assembly (clang, -O0):
<dp_dz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
mov    0x2eb5(%rip),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    0x2e84(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
divsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dp_dz>:
sub    $0x28,%rsp
movapd %xmm0,%xmm4
movsd  %xmm0,0x8(%rsp)
mov    0x2ec3(%rip),%rax
movsd  (%rax),%xmm0
movapd 0xecf(%rip),%xmm5
xorpd  %xmm0,%xmm5
mulsd  %xmm1,%xmm5
mulsd  %xmm2,%xmm5
movapd %xmm5,0x10(%rsp)
mulsd  %xmm1,%xmm0
mulsd  %xmm3,%xmm0
divsd  %xmm4,%xmm0
call   1030 <sin@plt>
mulsd  0x10(%rsp),%xmm0
divsd  0x8(%rsp),%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @dp_dz(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* @M_PI
%10 = fneg double %9
%11 = load double, double* %6
%12 = fmul double %10, %11
%13 = load double, double* %7
%14 = fmul double %12, %13
%15 = load double, double* @M_PI
%16 = load double, double* %6
%17 = fmul double %15, %16
%18 = load double, double* %8
%19 = fmul double %17, %18
%20 = load double, double* %5
%21 = fdiv double %19, %20
%22 = call double @sin(double %21)
%23 = fmul double %14, %22
%24 = load double, double* %5
%25 = fdiv double %23, %24
ret double %25
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @dp_dz(double %0, double %1, double %2, double %3) {
%5 = load double, double* @M_PI
%6 = fneg double %5
%7 = fmul double %6, %1
%8 = fmul double %7, %2
%9 = fmul double %5, %1
%10 = fmul double %9, %3
%11 = fdiv double %10, %0
%12 = tail call double @sin(double %11)
%13 = fmul double %12, %8
%14 = fdiv double %13, %0
ret double %14
}
/* Type definitions */
struct cir_q {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ kfree(struct cir_q *);
void cq_delete(struct cir_q *cq) { kfree(cq); }


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

x86 assembly (clang, -O2):
<cq_delete>:
jmp    1030 <kfree@plt>

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

LLVM IR (-O2):
%struct.cir_q = type { i32 }
define void @cq_delete(%struct.cir_q* %0) {
%2 = tail call i32 @kfree(%struct.cir_q* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ format_initial_capital(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *, char *);
void exceedance_curve_output_get_title(char *title, char *process_name,
                                       char *station, char *datatype) {
  sprintf(title, "%s for %s/%s", process_name, station, datatype);
  format_initial_capital(title, title);
}


x86 assembly (clang, -O0):
<exceedance_curve_output_get_title>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
lea    0xeb1(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <format_initial_capital@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exceedance_curve_output_get_title>:
push   %rbx
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rbx
lea    0xecc(%rip),%rsi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <format_initial_capital@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"%s for %s/%s\00"
define void @exceedance_curve_output_get_title(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i8*, i8** %8
%13 = call i32 @sprintf(i8* %9, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %10, i8* %11, i8* %12)
%14 = load i8*, i8** %5
%15 = load i8*, i8** %5
%16 = call i32 @format_initial_capital(i8* %14, i8* %15)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"%s for %s/%s\00"
define void @exceedance_curve_output_get_title(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i8* %3)
%6 = tail call i32 @format_initial_capital(i8* %0, i8* %0)
ret void
}
/* Type definitions */
struct szl_interp {
  int dummy;
};
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
ssize_t szl_null_write(struct szl_interp *interp, void *priv,
                       const unsigned char *buf, const size_t len) {
  return (ssize_t)len;
}


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

x86 assembly (clang, -O2):
<szl_null_write>:
mov    %rcx,%rax
ret

LLVM IR (-O0):
%struct.szl_interp = type { i32 }
define i32 @szl_null_write(%struct.szl_interp* %0, i8* %1, i8* %2, i64 %3) {
%5 = alloca %struct.szl_interp*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64
store %struct.szl_interp* %0, %struct.szl_interp** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i64, i64* %8
%10 = trunc i64 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
%struct.szl_interp = type { i32 }
define i32 @szl_null_write(%struct.szl_interp* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i64 %3) {
%5 = trunc i64 %3 to i32
ret i32 %5
}
float average(float x, float y) {
  printf("\nx addr is %d, y addr is %d", &x, &y);
  return (x + y) / 2.0f;
}


x86 assembly (clang, -O0):
<average>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
lea    0xedb(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
movss  0xeb6(%rip),%xmm1
divss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<average>:
push   %rax
movss  %xmm0,0x4(%rsp)
movss  %xmm1,(%rsp)
lea    0xee1(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
movss  0x4(%rsp),%xmm0
addss  (%rsp),%xmm0
mulss  0xebb(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [28 x i8] c"\0Ax addr is %d, y addr is %d\00"
define float @average(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), float* %3, float* %4)
%6 = load float, float* %3
%7 = load float, float* %4
%8 = fadd float %6, %7
%9 = fdiv float %8, 2.000000e+00
ret float %9
}

LLVM IR (-O2):
@.str = [28 x i8] c"\0Ax addr is %d, y addr is %d\00"
define float @average(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), float* %3, float* %4)
%6 = load float, float* %3
%7 = load float, float* %4
%8 = fadd float %6, %7
%9 = fmul float %8, 5.000000e-01
ret float %9
}
void printformat(char ch) {
  printf("Used :\n");
  printf("format : %s /dev/xxx <on | off>", ch);
}


x86 assembly (clang, -O0):
<printformat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x1(%rbp),%esi
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printformat>:
push   %rbx
mov    %edi,%ebx
lea    0xef6(%rip),%rdi
call   1030 <puts@plt>
lea    0xeca(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Used :\0A\00"
@.str.1 = [32 x i8] c"format : %s /dev/xxx <on | off>\00"
define void @printformat(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret void
}

LLVM IR (-O2):
@.str.1 = [32 x i8] c"format : %s /dev/xxx <on | off>\00"
@str = [7 x i8] c"Used :\00"
define void @printformat(i8 signext %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%3 = sext i8 %0 to i32
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ write(int, char *, int);
int main(void) {
  char buf[] = "Hello world!\n";
  write(1, buf, sizeof(buf));
  exit(5);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x12(%rbp)
mov    0xec8(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xec2(%rip),%ax
mov    %ax,-0x6(%rbp)
lea    -0x12(%rbp),%rsi
mov    $0x1,%edi
mov    $0xe,%edx
call   1030 <write@plt>
mov    $0x5,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0xa21646c726f77,%rax
mov    %rax,0xe(%rsp)
movabs $0x6f77206f6c6c6548,%rax
20 77 6f
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rsi
mov    $0x1,%edi
mov    $0xe,%edx
call   1030 <write@plt>
mov    $0x5,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@__const.main.buf = [14 x i8] c"Hello world!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [14 x i8]
store i32 0, i32* %1
%3 = bitcast [14 x i8]* %2 to i8*
%4 = getelementptr inbounds [14 x i8], [14 x i8]* %2, i64 0, i64 0
%5 = call i32 @write(i32 1, i8* %4, i32 14)
%6 = call i32 @exit(i32 5)
unreachable
}

LLVM IR (-O2):
@__const.main.buf = [14 x i8] c"Hello world!\0A\00"
define i32 @main() {
%1 = alloca [14 x i8]
%2 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0
%3 = call i32 @write(i32 1, i8* %2, i32 14)
%4 = tail call i32 @exit(i32 5)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ get_basic_mem(unsigned long *, unsigned long *,
                                 unsigned long *);
int /*<<< orphan*/ send(unsigned long, unsigned long);
void simple_show_mem(void) {
  unsigned long tot, used, pagesize;
  get_basic_mem(&tot, &used, &pagesize);
  send(used, pagesize);
  send(tot, pagesize);
}


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

x86 assembly (clang, -O2):
<simple_show_mem>:
sub    $0x18,%rsp
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
call   1030 <get_basic_mem@plt>
mov    0x8(%rsp),%rdi
mov    (%rsp),%rsi
call   1040 <send@plt>
mov    0x10(%rsp),%rdi
mov    (%rsp),%rsi
call   1040 <send@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @simple_show_mem() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i64
%4 = call i32 @get_basic_mem(i64* %1, i64* %2, i64* %3)
%5 = load i64, i64* %2
%6 = load i64, i64* %3
%7 = call i32 @send(i64 %5, i64 %6)
%8 = load i64, i64* %1
%9 = load i64, i64* %3
%10 = call i32 @send(i64 %8, i64 %9)
ret void
}

LLVM IR (-O2):
define void @simple_show_mem() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i64
%4 = bitcast i64* %1 to i8*
%5 = bitcast i64* %2 to i8*
%6 = bitcast i64* %3 to i8*
%7 = call i32 @get_basic_mem(i64* %1, i64* %2, i64* %3)
%8 = load i64, i64* %2
%9 = load i64, i64* %3
%10 = call i32 @send(i64 %8, i64 %9)
%11 = load i64, i64* %1
%12 = load i64, i64* %3
%13 = call i32 @send(i64 %11, i64 %12)
ret void
}
/* Variables and functions */
int readwrite(int, int);
int copyfile(int fromfd, int tofd) {
  int bytesread;
  int totalbytes = 0;
  while ((bytesread = readwrite(fromfd, tofd)) > 0)
    totalbytes += bytesread;
  return totalbytes;
}


x86 assembly (clang, -O0):
<copyfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <readwrite@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jle    114a <copyfile+0x3a>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1125 <copyfile+0x15>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copyfile>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %edi,%ebp
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
mov    %ecx,%ebx
mov    %ebp,%edi
mov    %r14d,%esi
call   1030 <readwrite@plt>
lea    (%rax,%rbx,1),%ecx
test   %eax,%eax
jg     1120 <copyfile+0x10>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @copyfile(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
br label %7
7: ; preds = %12, %2
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @readwrite(i32 %8, i32 %9)
store i32 %10, i32* %5
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %7
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = add nsw i32 %14, %13
store i32 %15, i32* %6
br label %7
16: ; preds = %7
%17 = load i32, i32* %6
ret i32 %17
}

LLVM IR (-O2):
define i32 @copyfile(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ 0, %2 ], [ %7, %3 ]
%5 = tail call i32 @readwrite(i32 %0, i32 %1)
%6 = icmp sgt i32 %5, 0
%7 = add nsw i32 %5, %4
br i1 %6, label %3, label %8
8: ; preds = %3
ret i32 %4
}
void MessageBufferLayerP__0__RadioChannel__default__setChannelDone(void) {}


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

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

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

LLVM IR (-O2):
define void @MessageBufferLayerP__0__RadioChannel__default__setChannelDone() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ g(float, int);
int t();
int f(float a) {
  int i, j = t();
  if (a++ > 0)
    for (i = 0; i < j; i++)
      g(a, 3);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <t@plt>
mov    %eax,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xebc(%rip),%xmm2
movaps %xmm0,%xmm1
addss  %xmm2,%xmm1
movss  %xmm1,-0x8(%rbp)
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1191 <f+0x71>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    118c <f+0x6c>
movss  -0x8(%rbp),%xmm0
mov    $0x3,%edi
call   1040 <g@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1163 <f+0x43>
jmp    1191 <f+0x71>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
xor    %eax,%eax
call   1030 <t@plt>
xorps  %xmm0,%xmm0
movss  0xc(%rsp),%xmm1
ucomiss %xmm0,%xmm1
jbe    1175 <f+0x55>
mov    %eax,%ebx
test   %eax,%eax
jle    1175 <f+0x55>
movaps %xmm1,%xmm0
addss  0xeaf(%rip),%xmm0
movss  %xmm0,0xc(%rsp)
nopw   0x0(%rax,%rax,1)
movss  0xc(%rsp),%xmm0
mov    $0x3,%edi
call   1040 <g@plt>
add    $0xffffffff,%ebx
jne    1160 <f+0x40>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @f(float %0) {
%2 = alloca i32
%3 = alloca float
%4 = alloca i32
%5 = alloca i32
store float %0, float* %3
%6 = call i32 (...) @t()
store i32 %6, i32* %5
%7 = load float, float* %3
%8 = fadd float %7, 1.000000e+00
store float %8, float* %3
%9 = fcmp ogt float %7, 0.000000e+00
br i1 %9, label %10, label %22
10: ; preds = %1
store i32 0, i32* %4
br label %11
11: ; preds = %18, %10
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %21
15: ; preds = %11
%16 = load float, float* %3
%17 = call i32 @g(float %16, i32 3)
br label %18
18: ; preds = %15
%19 = load i32, i32* %4
%20 = add nsw i32 %19, 1
store i32 %20, i32* %4
br label %11
21: ; preds = %11
br label %22
22: ; preds = %21, %1
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
define i32 @f(float %0) {
%2 = tail call i32 (...) @t()
%3 = fadd float %0, 1.000000e+00
%4 = fcmp ogt float %0, 0.000000e+00
%5 = icmp sgt i32 %2, 0
%6 = select i1 %4, i1 %5, i1 false
br i1 %6, label %7, label %12
7: ; preds = %1, %7
%8 = phi i32 [ %10, %7 ], [ 0, %1 ]
%9 = tail call i32 @g(float %3, i32 3)
%10 = add nuw nsw i32 %8, 1
%11 = icmp eq i32 %10, %2
br i1 %11, label %12, label %7
12: ; preds = %7, %1
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int singleNumber(int *, int);
int main(int argc, char *argv[]) {
  int a[21] = {17, 12, 5, -6, 12, 4,  17, -5, 2,  -3, 2,
               4,  5,  9, -3, -4, 15, 15, -4, -5, -6};
  printf("%d\n", singleNumber(a, 21));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x70(%rbp),%rdi
lea    0xeaf(%rip),%rsi
mov    $0x54,%edx
call   1050 <memcpy@plt>
lea    -0x70(%rbp),%rdi
mov    $0x15,%esi
call   1030 <singleNumber@plt>
mov    %eax,%esi
lea    0xee2(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x58,%rsp
mov    0xf26(%rip),%eax
mov    %eax,0x50(%rsp)
movaps 0xf0b(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xeef(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xed3(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xeb7(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe9b(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x15,%esi
call   1030 <singleNumber@plt>
lea    0xed7(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x58,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [21 x i32] [i32 17, i32 12, i32 5, i32 -6, i32 12, i32 4, i32 17, i32 -5, i32 2, i32 -3, i32 2, i32 4, i32 5, i32 9, i32 -3, i32 -4, i32 15, i32 15, i32 -4, i32 -5, i32 -6]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [21 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [21 x i32]* %6 to i8*
%8 = getelementptr inbounds [21 x i32], [21 x i32]* %6, i64 0, i64 0
%9 = call i32 @singleNumber(i32* %8, i32 21)
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [21 x i32] [i32 17, i32 12, i32 5, i32 -6, i32 12, i32 4, i32 17, i32 -5, i32 2, i32 -3, i32 2, i32 4, i32 5, i32 9, i32 -3, i32 -4, i32 15, i32 15, i32 -4, i32 -5, i32 -6]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [21 x i32]
%4 = bitcast [21 x i32]* %3 to i8*
%5 = getelementptr inbounds [21 x i32], [21 x i32]* %3, i64 0, i64 0
%6 = call i32 @singleNumber(i32* %5, i32 21)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int SIGINT;
int SIGTERM;
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ sans_stop();
void signal_cb(int signo) {
  assert((signo == SIGINT) || (signo == SIGTERM));
  sans_stop();
}


x86 assembly (clang, -O0):
<signal_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%al
mov    0x2eb1(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x5(%rbp)
je     1154 <signal_cb+0x34>
mov    -0x4(%rbp),%eax
mov    0x2e94(%rip),%rcx
cmp    (%rcx),%eax
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x0,%al
call   1040 <sans_stop@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signal_cb>:
push   %rax
mov    0x2ec0(%rip),%rax
cmp    %edi,(%rax)
sete   %al
mov    0x2eac(%rip),%rcx
cmp    %edi,(%rcx)
sete   %cl
or     %al,%cl
movzbl %cl,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <sans_stop@plt>

LLVM IR (-O0):
@SIGINT = global i32 0
@SIGTERM = global i32 0
define void @signal_cb(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGINT
%5 = icmp eq i32 %3, %4
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = load i32, i32* @SIGTERM
%9 = icmp eq i32 %7, %8
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = call i32 (...) @sans_stop()
ret void
}

LLVM IR (-O2):
@SIGINT = global i32 0
@SIGTERM = global i32 0
define void @signal_cb(i32 %0) {
%2 = load i32, i32* @SIGINT
%3 = icmp eq i32 %2, %0
%4 = load i32, i32* @SIGTERM
%5 = icmp eq i32 %4, %0
%6 = select i1 %3, i1 true, i1 %5
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = tail call i32 (...) @sans_stop()
ret void
}
/* Type definitions */
struct alisp_object {
  int dummy;
};

/* Variables and functions */
int alisp_get_refs(struct alisp_object *);
int /*<<< orphan*/ alisp_set_refs(struct alisp_object *, unsigned int);
unsigned int alisp_inc_refs(struct alisp_object *p) {
  unsigned r = alisp_get_refs(p) + 1;
  alisp_set_refs(p, r);
  return r;
}


x86 assembly (clang, -O0):
<alisp_inc_refs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <alisp_get_refs@plt>
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <alisp_set_refs@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alisp_inc_refs>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <alisp_get_refs@plt>
mov    %eax,%ebp
add    $0x1,%ebp
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <alisp_set_refs@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.alisp_object = type { i32 }
define i32 @alisp_inc_refs(%struct.alisp_object* %0) {
%2 = alloca %struct.alisp_object*
%3 = alloca i32
store %struct.alisp_object* %0, %struct.alisp_object** %2
%4 = load %struct.alisp_object*, %struct.alisp_object** %2
%5 = call i32 @alisp_get_refs(%struct.alisp_object* %4)
%6 = add nsw i32 %5, 1
store i32 %6, i32* %3
%7 = load %struct.alisp_object*, %struct.alisp_object** %2
%8 = load i32, i32* %3
%9 = call i32 @alisp_set_refs(%struct.alisp_object* %7, i32 %8)
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
%struct.alisp_object = type { i32 }
define i32 @alisp_inc_refs(%struct.alisp_object* %0) {
%2 = tail call i32 @alisp_get_refs(%struct.alisp_object* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i32 @alisp_set_refs(%struct.alisp_object* %0, i32 %3)
ret i32 %3
}
volatile unsigned int *led_init() {
  volatile unsigned int *gpio = (unsigned int *)0x20200000;
  gpio[4] |= (1 << 21);
  return gpio;
}


x86 assembly (clang, -O0):
<led_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20200000,%eax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%ecx
or     $0x200000,%ecx
mov    %ecx,0x10(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<led_init>:
orl    $0x200000,0x20200010
mov    $0x20200000,%eax
ret

LLVM IR (-O0):
define i32* @led_init() {
%1 = alloca i32*
store i32* inttoptr (i64 538968064 to i32*), i32** %1
%2 = load i32*, i32** %1
%3 = getelementptr inbounds i32, i32* %2, i64 4
%4 = load volatile i32, i32* %3
%5 = or i32 %4, 2097152
store volatile i32 %5, i32* %3
%6 = load i32*, i32** %1
ret i32* %6
}

LLVM IR (-O2):
define i32* @led_init() {
%1 = load volatile i32, i32* inttoptr (i64 538968080 to i32*)
%2 = or i32 %1, 2097152
store volatile i32 %2, i32* inttoptr (i64 538968080 to i32*)
ret i32* inttoptr (i64 538968064 to i32*)
}
/* Variables and functions */
int /*<<< orphan*/ ARCH_INDEX(char);
char toupper(int /*<<< orphan*/);
void Toupper(char *buffer, size_t buffer_len) {
  int i;
  for (i = 0; i < buffer_len; i++)
    buffer[i] = toupper(ARCH_INDEX(buffer[i]));
  return;
}


x86 assembly (clang, -O0):
<Toupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movslq -0x14(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1178 <Toupper+0x58>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <ARCH_INDEX@plt>
mov    %eax,%edi
call   1030 <toupper@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1137 <Toupper+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Toupper>:
push   %r15
push   %r14
push   %rbx
test   %rsi,%rsi
je     115e <Toupper+0x3e>
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%r15,%rbx,1),%edi
call   1040 <ARCH_INDEX@plt>
mov    %eax,%edi
call   1030 <toupper@plt>
mov    %al,(%r15,%rbx,1)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1140 <Toupper+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @Toupper(i8* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %12, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %10, %4 ], [ 0, %2 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = tail call i32 @ARCH_INDEX(i8 signext %7)
%9 = tail call signext i8 @toupper(i32 %8)
store i8 %9, i8* %6
%10 = add nuw i64 %5, 1
%11 = icmp eq i64 %10, %1
br i1 %11, label %12, label %4
12: ; preds = %4, %2
ret void
}
int help() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @help() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __NR_write;
int ppc_syscall(int /*<<< orphan*/, int, void const *, unsigned int);
int ppc_write(int fd, const void *data, unsigned size) {
  return ppc_syscall(__NR_write, fd, data, size);
}


x86 assembly (clang, -O0):
<ppc_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ebf(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
call   1030 <ppc_syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ppc_write>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%esi
mov    0x2eca(%rip),%rax
mov    (%rax),%edi
jmp    1030 <ppc_syscall@plt>

LLVM IR (-O0):
@__NR_write = global i32 0
define i32 @ppc_write(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* @__NR_write
%8 = load i32, i32* %4
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @ppc_syscall(i32 %7, i32 %8, i8* %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
@__NR_write = global i32 0
define i32 @ppc_write(i32 %0, i8* %1, i32 %2) {
%4 = load i32, i32* @__NR_write
%5 = tail call i32 @ppc_syscall(i32 %4, i32 %0, i8* %1, i32 %2)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ stfl_form_redraw();
void stfl_redraw() { stfl_form_redraw(); }


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

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

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

LLVM IR (-O2):
define void @stfl_redraw() {
%1 = tail call i32 (...) @stfl_form_redraw()
ret void
}
/* Variables and functions */
int f289(int *);
int f290(int *p) { return f289(p); }


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

x86 assembly (clang, -O2):
<f290>:
jmp    1030 <f289@plt>

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

LLVM IR (-O2):
define i32 @f290(i32* %0) {
%2 = tail call i32 @f289(i32* %0)
ret i32 %2
}