xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ blinkdash();
int /*<<< orphan*/ blinkdot();
int /*<<< orphan*/ sleep(double);
int blink7() {
  blinkdash();
  blinkdash();
  int c = 0;
  while (c != 3) {
    blinkdot();
    c++;
  }
  sleep(1.5);
  return 0;
}


x86 assembly (clang, -O0):
<blink7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <blinkdash@plt>
mov    $0x0,%al
call   1040 <blinkdash@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x3,-0x4(%rbp)
je     116c <blink7+0x3c>
mov    $0x0,%al
call   1030 <blinkdot@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    114d <blink7+0x1d>
movsd  0xe8c(%rip),%xmm0
call   1050 <sleep@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blink7>:
push   %rax
xor    %eax,%eax
call   1040 <blinkdash@plt>
xor    %eax,%eax
call   1040 <blinkdash@plt>
xor    %eax,%eax
call   1030 <blinkdot@plt>
xor    %eax,%eax
call   1030 <blinkdot@plt>
xor    %eax,%eax
call   1030 <blinkdot@plt>
movsd  0xea4(%rip),%xmm0
call   1050 <sleep@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @blink7() {
%1 = alloca i32
%2 = call i32 (...) @blinkdash()
%3 = call i32 (...) @blinkdash()
store i32 0, i32* %1
br label %4
4: ; preds = %7, %0
%5 = load i32, i32* %1
%6 = icmp ne i32 %5, 3
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = call i32 (...) @blinkdot()
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
br label %4
11: ; preds = %4
%12 = call i32 @sleep(double 1.500000e+00)
ret i32 0
}

LLVM IR (-O2):
define i32 @blink7() {
%1 = tail call i32 (...) @blinkdash()
%2 = tail call i32 (...) @blinkdash()
%3 = tail call i32 (...) @blinkdot()
%4 = tail call i32 (...) @blinkdot()
%5 = tail call i32 (...) @blinkdot()
%6 = tail call i32 @sleep(double 1.500000e+00)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ check_align(short *, int);
a() {
  int i = 1;
  short c[i];
  c[0] = 0;
  check_align(c, i);
}


x86 assembly (clang, -O0):
<a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
lea    0xf(%rax,%rax,1),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,%rsp
mov    %rax,-0x18(%rbp)
movw   $0x0,(%rdi)
mov    -0x8(%rbp),%esi
call   1030 <check_align@plt>
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a>:
push   %rax
movw   $0x0,(%rsp)
mov    %rsp,%rdi
mov    $0x1,%esi
call   1030 <check_align@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @a() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
store i32 1, i32* %2
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = call i8* @llvm.stacksave()
store i8* %7, i8** %3
%8 = alloca i16, i64 %6
store i64 %6, i64* %4
%9 = getelementptr inbounds i16, i16* %8, i64 0
store i16 0, i16* %9
%10 = load i32, i32* %2
%11 = call i32 @check_align(i16* %8, i32 %10)
%12 = load i8*, i8** %3
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
define i32 @a() {
%1 = alloca i16
store i16 0, i16* %1
%2 = call i32 @check_align(i16* %1, i32 1)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ checkGraveyardInternal(int /*<<< orphan*/);
void checkGraveyard(void) { checkGraveyardInternal(0); }


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

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

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

LLVM IR (-O2):
define void @checkGraveyard() {
%1 = tail call i32 @checkGraveyardInternal(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ C();
int /*<<< orphan*/ S();
int /*<<< orphan*/ eat(int);
int /*<<< orphan*/ printf(char *);
void X() {
  printf("X -> while(C){S}\n");
  eat(13);
  eat(17);
  C();
  eat(18);
  eat(19);
  S();
  eat(20);
}


x86 assembly (clang, -O0):
<X>:
push   %rbp
mov    %rsp,%rbp
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
mov    $0xd,%edi
call   1030 <eat@plt>
mov    $0x11,%edi
call   1030 <eat@plt>
mov    $0x0,%al
call   1050 <C@plt>
mov    $0x12,%edi
call   1030 <eat@plt>
mov    $0x13,%edi
call   1030 <eat@plt>
mov    $0x0,%al
call   1060 <S@plt>
mov    $0x14,%edi
call   1030 <eat@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<X>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <puts@plt>
mov    $0xd,%edi
call   1030 <eat@plt>
mov    $0x11,%edi
call   1030 <eat@plt>
xor    %eax,%eax
call   1050 <C@plt>
mov    $0x12,%edi
call   1030 <eat@plt>
mov    $0x13,%edi
call   1030 <eat@plt>
xor    %eax,%eax
call   1060 <S@plt>
mov    $0x14,%edi
pop    %rax
jmp    1030 <eat@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"X -> while(C){S}\0A\00"
define void @X() {
%1 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @eat(i32 13)
%3 = call i32 @eat(i32 17)
%4 = call i32 (...) @C()
%5 = call i32 @eat(i32 18)
%6 = call i32 @eat(i32 19)
%7 = call i32 (...) @S()
%8 = call i32 @eat(i32 20)
ret void
}

LLVM IR (-O2):
@str = [17 x i8] c"X -> while(C){S}\00"
define void @X() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @eat(i32 13)
%3 = tail call i32 @eat(i32 17)
%4 = tail call i32 (...) @C()
%5 = tail call i32 @eat(i32 18)
%6 = tail call i32 @eat(i32 19)
%7 = tail call i32 (...) @S()
%8 = tail call i32 @eat(i32 20)
ret void
}
void wait_signal(struct event_set *es, void *arg) {}


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

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

LLVM IR (-O0):
%struct.event_set = type opaque
define void @wait_signal(%struct.event_set* %0, i8* %1) {
%3 = alloca %struct.event_set*
%4 = alloca i8*
store %struct.event_set* %0, %struct.event_set** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
%struct.event_set = type opaque
define void @wait_signal(%struct.event_set* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
char const *cfg_mvp_get_lib(char *);
const char *cfg_mvp_get_codeloader_lib(void) {
  return cfg_mvp_get_lib("codeloader");
}


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"codeloader\00"
define i8* @cfg_mvp_get_codeloader_lib() {
%1 = call i8* @cfg_mvp_get_lib(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [11 x i8] c"codeloader\00"
define i8* @cfg_mvp_get_codeloader_lib() {
%1 = tail call i8* @cfg_mvp_get_lib(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
long fib(int n) {
  long x, y;
  if (n < 2)
    return n;
#pragma omp task untied shared(x) firstprivate(n)
  x = fib(n - 1);
#pragma omp task untied shared(y) firstprivate(n)
  y = fib(n - 2);
#pragma omp taskwait
  return x + y;
}


x86 assembly (clang, -O0):
<fib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
jge    1132 <fib+0x22>
movslq -0xc(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    115c <fib+0x4c>
mov    -0xc(%rbp),%edi
sub    $0x1,%edi
call   1030 <fib@plt>
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
sub    $0x2,%edi
call   1030 <fib@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fib>:
push   %r14
push   %rbx
push   %rax
xor    %r14d,%r14d
cmp    $0x2,%edi
jl     1135 <fib+0x25>
mov    %edi,%ebx
xchg   %ax,%ax
lea    -0x1(%rbx),%edi
call   1030 <fib@plt>
lea    -0x2(%rbx),%edi
add    %rax,%r14
cmp    $0x4,%ebx
mov    %edi,%ebx
jae    1120 <fib+0x10>
movslq %edi,%rax
add    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i64 @fib(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %3, label %8
3: ; preds = %8, %1
%4 = phi i64 [ 0, %1 ], [ %14, %8 ]
%5 = phi i32 [ %0, %1 ], [ %13, %8 ]
%6 = sext i32 %5 to i64
%7 = add nsw i64 %4, %6
ret i64 %7
8: ; preds = %1, %8
%9 = phi i32 [ %13, %8 ], [ %0, %1 ]
%10 = phi i64 [ %14, %8 ], [ 0, %1 ]
%11 = add nsw i32 %9, -1
%12 = tail call i64 @fib(i32 %11)
%13 = add nsw i32 %9, -2
%14 = add nsw i64 %12, %10
%15 = icmp ult i32 %9, 4
br i1 %15, label %3, label %8
}
void log_dummy(void *log, ...) { (void)log; }


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

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

LLVM IR (-O0):
define void @log_dummy(i8* %0, ...) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
ret void
}

LLVM IR (-O2):
define void @log_dummy(i8* nocapture %0, ...) {
ret void
}
int test_imm_FCint64_midword_reg(long long val) {
  return ((val >> 16) & (0xFC << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_FCint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x10,%rdx
and    $0xfc,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_FCint64_midword_reg>:
test   $0xfc0000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_FCint64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 16
%5 = and i64 %4, 252
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_FCint64_midword_reg(i64 %0) {
%2 = and i64 %0, 16515072
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct statvfs64 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int __statvfs64(const char *file, struct statvfs64 *buf) {
  __set_errno(ENOSYS);
  return -1;
}


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

x86 assembly (clang, -O2):
<__statvfs64>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.statvfs64 = type { i32 }
@ENOSYS = global i32 0
define i32 @__statvfs64(i8* %0, %struct.statvfs64* %1) {
%3 = alloca i8*
%4 = alloca %struct.statvfs64*
store i8* %0, i8** %3
store %struct.statvfs64* %1, %struct.statvfs64** %4
%5 = load i32, i32* @ENOSYS
%6 = call i32 @__set_errno(i32 %5)
ret i32 -1
}

LLVM IR (-O2):
%struct.statvfs64 = type { i32 }
@ENOSYS = global i32 0
define i32 @__statvfs64(i8* nocapture readnone %0, %struct.statvfs64* nocapture readnone %1) {
%3 = load i32, i32* @ENOSYS
%4 = tail call i32 @__set_errno(i32 %3)
ret i32 -1
}
/* Variables and functions */
char *longestPalindrome(char *);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char const *argv[]) {
  char test[6] = "hello";
  char *result = longestPalindrome(test);
  printf("result: %s\n", result);
  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    0xec4(%rip),%eax
mov    %eax,-0x16(%rbp)
mov    0xebe(%rip),%ax
mov    %ax,-0x12(%rbp)
lea    -0x16(%rbp),%rdi
call   1040 <longestPalindrome@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movw   $0x6f,0x4(%rsp)
movl   $0x6c6c6568,(%rsp)
mov    %rsp,%rdi
call   1040 <longestPalindrome@plt>
lea    0xec8(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.test = [6 x i8] c"hello\00"
@.str = [12 x i8] c"result: %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [6 x i8]
%7 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [6 x i8]* %6 to i8*
%9 = getelementptr inbounds [6 x i8], [6 x i8]* %6, i64 0, i64 0
%10 = call i8* @longestPalindrome(i8* %9)
store i8* %10, i8** %7
%11 = load i8*, i8** %7
%12 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %11)
ret i32 0
}

LLVM IR (-O2):
@__const.main.test = [6 x i8] c"hello\00"
@.str = [12 x i8] c"result: %s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [6 x i8]
%4 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%5 = call i8* @longestPalindrome(i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void VisSetCursorPos(int x, int y) { printf("\033[%d;%d", x, y); }


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

x86 assembly (clang, -O2):
<VisSetCursorPos>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"\1B[%d;%d\00"
define void @VisSetCursorPos(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret void
}
int cex() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @cex() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ islower(int);
void t_islower_0x73() {
  Assert_real((islower(115)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_islower.c",
              580, ("islower should be 1 for s"));
}


x86 assembly (clang, -O0):
<t_islower_0x73>:
push   %rbp
mov    %rsp,%rbp
mov    $0x73,%edi
call   1030 <islower@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x244,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_islower_0x73>:
push   %rax
mov    $0x73,%edi
call   1030 <islower@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x244,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 1 for s\00"
define void @t_islower_0x73() {
%1 = call i32 @islower(i32 115)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 580, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 1 for s\00"
define void @t_islower_0x73() {
%1 = tail call i32 @islower(i32 115)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 580, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HplAtm128UartP__HplUart1__default__txDone();
void HplAtm128UartP__HplUart1__txDone(void) {
  HplAtm128UartP__HplUart1__default__txDone();
}


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

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

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

LLVM IR (-O2):
define void @HplAtm128UartP__HplUart1__txDone() {
%1 = tail call i32 (...) @HplAtm128UartP__HplUart1__default__txDone()
ret void
}
int key_agreement(struct peer *peer) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.peer = type opaque
define i32 @key_agreement(%struct.peer* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(char *prog) {
  printf("Usage: %s [-l size ] basefile input output\n", prog);
}


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

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

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

LLVM IR (-O2):
@.str = [44 x i8] c"Usage: %s [-l size ] basefile input output\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
mpn_cmp() {}


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

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

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

LLVM IR (-O2):
define i32 @mpn_cmp() {
ret i32 undef
}
void av_format_inject_global_side_data() {}


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

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

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

LLVM IR (-O2):
define void @av_format_inject_global_side_data() {
ret void
}
/* Variables and functions */
int getLine(char *, int);
int /*<<< orphan*/ printf(char *, char *);
char *reverse(char *, int);
int main() {
  int len, max = 0;
  char line[1000];
  while ((len = getLine(line, 1000)) > 0)
    printf("%s", reverse(line, len));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
lea    -0x400(%rbp),%rdi
mov    $0x3e8,%esi
call   1050 <getLine@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1189 <main+0x59>
lea    -0x400(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1030 <reverse@plt>
mov    %rax,%rsi
lea    0xe81(%rip),%rdi
call   1040 <printf@plt>
jmp    1149 <main+0x19>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1050 <getLine@plt>
test   %eax,%eax
jle    1186 <main+0x56>
mov    %rsp,%rbx
lea    0xeab(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <reverse@plt>
mov    %r14,%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1050 <getLine@plt>
test   %eax,%eax
jg     1160 <main+0x30>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @getLine(i8* %2, i32 1000)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %0, %5
%6 = phi i32 [ %9, %5 ], [ %3, %0 ]
%7 = call i8* @reverse(i8* %2, i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = call i32 @getLine(i8* %2, i32 1000)
%10 = icmp sgt i32 %9, 0
br i1 %10, label %5, label %11
11: ; preds = %5, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ lib_qsort(int *, int, int);
void sort_quick(int *array, int size) {
  int start, end;
  start = 0;
  end = size - 1;
  if (start < end)
    lib_qsort(array, start, end);
}


x86 assembly (clang, -O0):
<sort_quick>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    114a <sort_quick+0x3a>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <lib_qsort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sort_quick>:
cmp    $0x2,%esi
jl     1121 <sort_quick+0x11>
mov    %esi,%edx
add    $0xffffffff,%edx
xor    %esi,%esi
jmp    1030 <lib_qsort@plt>
ret

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

LLVM IR (-O2):
define void @sort_quick(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, 1
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = add nsw i32 %1, -1
%6 = tail call i32 @lib_qsort(i32* %0, i32 0, i32 %5)
br label %7
7: ; preds = %4, %2
ret void
}
/* Variables and functions */
int lenstra(int, long, int, int, int);
void do_lenstra(int lim1, long lim2, int ncurves) {
  int nc = 1;
  int kurve = 5;
  for (nc = 1; nc <= ncurves;) {
    kurve++;
    nc = lenstra(lim1, lim2, nc, kurve, ncurves);
  }
}


x86 assembly (clang, -O0):
<do_lenstra>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
movl   $0x5,-0x1c(%rbp)
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     116a <do_lenstra+0x5a>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    -0x14(%rbp),%r8d
call   1030 <lenstra@plt>
mov    %eax,-0x18(%rbp)
jmp    1137 <do_lenstra+0x27>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_lenstra>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %edx,%edx
jle    1149 <do_lenstra+0x39>
mov    %edx,%ebx
mov    %rsi,%r14
mov    %edi,%r15d
mov    $0x1,%eax
mov    $0x6,%ebp
nopl   (%rax)
mov    %r15d,%edi
mov    %r14,%rsi
mov    %eax,%edx
mov    %ebp,%ecx
mov    %ebx,%r8d
call   1030 <lenstra@plt>
add    $0x1,%ebp
cmp    %ebx,%eax
jle    1130 <do_lenstra+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @do_lenstra(i32 %0, i64 %1, i32 %2) {
%4 = icmp slt i32 %2, 1
br i1 %4, label %11, label %5
5: ; preds = %3, %5
%6 = phi i32 [ %8, %5 ], [ 5, %3 ]
%7 = phi i32 [ %9, %5 ], [ 1, %3 ]
%8 = add nuw nsw i32 %6, 1
%9 = tail call i32 @lenstra(i32 %0, i64 %1, i32 %7, i32 %8, i32 %2)
%10 = icmp sgt i32 %9, %2
br i1 %10, label %11, label %5
11: ; preds = %5, %3
ret void
}
/* Variables and functions */
scalar_t__ isLeftWindow(int, int);
scalar_t__ isRightWindow(int, int);
int isWindow(int maxSeats, int seat) {
  return isLeftWindow(maxSeats, seat) || isRightWindow(maxSeats, seat);
}


x86 assembly (clang, -O0):
<isWindow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <isLeftWindow@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    1160 <isWindow+0x40>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <isRightWindow@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isWindow>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1040 <isLeftWindow@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
jne    114d <isWindow+0x2d>
mov    %ebp,%edi
mov    %ebx,%esi
call   1030 <isRightWindow@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @isWindow(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i64 @isLeftWindow(i32 %5, i32 %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %2
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = call i64 @isRightWindow(i32 %10, i32 %11)
%13 = icmp ne i64 %12, 0
br label %14
14: ; preds = %9, %2
%15 = phi i1 [ true, %2 ], [ %13, %9 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @isWindow(i32 %0, i32 %1) {
%3 = tail call i64 @isLeftWindow(i32 %0, i32 %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i64 @isRightWindow(i32 %0, i32 %1)
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ 1, %2 ], [ %8, %5 ]
ret i32 %10
}
outgoto(n) int n;
{
  outcode("\tgoto ");
  outnum(n);
  outcode(0);
}


x86 assembly (clang, -O0):
<outgoto>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <outcode@plt>
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1040 <outnum@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1030 <outcode@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outgoto>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
xor    %eax,%eax
call   1030 <outcode@plt>
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <outnum@plt>
xor    %edi,%edi
xor    %eax,%eax
pop    %rbx
jmp    1030 <outcode@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"\09goto \00"
define i32 @outgoto(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @outcode to i32 (i8*, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %3
%6 = call i32 (i32, ...) bitcast (i32 (...)* @outnum to i32 (i32, ...)*)(i32 %5)
%7 = call i32 (i32, ...) bitcast (i32 (...)* @outcode to i32 (i32, ...)*)(i32 0)
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
@.str = [7 x i8] c"\09goto \00"
define i32 @outgoto(i32 %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @outcode to i32 (i8*, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @outnum to i32 (i32, ...)*)(i32 %0)
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @outcode to i32 (i32, ...)*)(i32 0)
ret i32 undef
}
void sigindie(n) { sig_die("Interrupt", 0); }


x86 assembly (clang, -O0):
<sigindie>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   1030 <sig_die@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigindie>:
lea    0xee9(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
jmp    1030 <sig_die@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"Interrupt\00"
define void @sigindie(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @sig_die to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"Interrupt\00"
define void @sigindie(i32 %0) {
%2 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @sig_die to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put8(int);
void dec_reg32(int reg32) { put8(0x48 + reg32); }


x86 assembly (clang, -O0):
<dec_reg32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
add    $0x48,%edi
call   1030 <put8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dec_reg32>:
add    $0x48,%edi
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @dec_reg32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 72, %3
%5 = call i32 @put8(i32 %4)
ret void
}

LLVM IR (-O2):
define void @dec_reg32(i32 %0) {
%2 = add nsw i32 %0, 72
%3 = tail call i32 @put8(i32 %2)
ret void
}
__attribute__((always_)) unsigned rastafont8x12_select(unsigned a, unsigned b,
                                                       unsigned m) {
  return ((b ^ a) & m) ^ b;
}


x86 assembly (clang, -O0):
<rastafont8x12_select>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
xor    -0x4(%rbp),%eax
and    -0xc(%rbp),%eax
xor    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rastafont8x12_select>:
mov    %edi,%eax
xor    %esi,%eax
and    %edx,%eax
xor    %esi,%eax
ret

LLVM IR (-O0):
define i32 @rastafont8x12_select(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* %5
%8 = load i32, i32* %4
%9 = xor i32 %7, %8
%10 = load i32, i32* %6
%11 = and i32 %9, %10
%12 = load i32, i32* %5
%13 = xor i32 %11, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @rastafont8x12_select(i32 %0, i32 %1, i32 %2) {
%4 = xor i32 %1, %0
%5 = and i32 %4, %2
%6 = xor i32 %5, %1
ret i32 %6
}
long int power(int n, int m) {
  int i;
  long int val = 1;
  for (i = 0; i < m; i++) {
    val *= n;
  }
  return val;
}


x86 assembly (clang, -O0):
<power>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movq   $0x1,-0x18(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1140 <power+0x40>
movslq -0x4(%rbp),%rax
imul   -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1119 <power+0x19>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<power>:
test   %esi,%esi
jle    111b <power+0x1b>
movslq %edi,%rcx
lea    -0x1(%rsi),%eax
mov    %esi,%edx
and    $0x7,%edx
cmp    $0x7,%eax
jae    1121 <power+0x21>
mov    $0x1,%eax
jmp    1155 <power+0x55>
mov    $0x1,%eax
ret
and    $0xfffffff8,%esi
mov    $0x1,%eax
nopl   0x0(%rax)
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
add    $0xfffffff8,%esi
jne    1130 <power+0x30>
test   %edx,%edx
je     1169 <power+0x69>
nopl   0x0(%rax)
imul   %rcx,%rax
add    $0xffffffff,%edx
jne    1160 <power+0x60>
ret

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

LLVM IR (-O2):
define i64 @power(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %34
4: ; preds = %2
%5 = sext i32 %0 to i64
%6 = add i32 %1, -1
%7 = and i32 %1, 7
%8 = icmp ult i32 %6, 7
br i1 %8, label %24, label %9
9: ; preds = %4
%10 = and i32 %1, -8
br label %11
11: ; preds = %11, %9
%12 = phi i64 [ 1, %9 ], [ %21, %11 ]
%13 = phi i32 [ 0, %9 ], [ %22, %11 ]
%14 = mul nsw i64 %12, %5
%15 = mul nsw i64 %14, %5
%16 = mul nsw i64 %15, %5
%17 = mul nsw i64 %16, %5
%18 = mul nsw i64 %17, %5
%19 = mul nsw i64 %18, %5
%20 = mul nsw i64 %19, %5
%21 = mul nsw i64 %20, %5
%22 = add i32 %13, 8
%23 = icmp eq i32 %22, %10
br i1 %23, label %24, label %11
24: ; preds = %11, %4
%25 = phi i64 [ undef, %4 ], [ %21, %11 ]
%26 = phi i64 [ 1, %4 ], [ %21, %11 ]
%27 = icmp eq i32 %7, 0
br i1 %27, label %34, label %28
28: ; preds = %24, %28
%29 = phi i64 [ %31, %28 ], [ %26, %24 ]
%30 = phi i32 [ %32, %28 ], [ 0, %24 ]
%31 = mul nsw i64 %29, %5
%32 = add i32 %30, 1
%33 = icmp eq i32 %32, %7
br i1 %33, label %34, label %28
34: ; preds = %24, %28, %2
%35 = phi i64 [ 1, %2 ], [ %25, %24 ], [ %31, %28 ]
ret i64 %35
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
scalar_t__ waitpid(int, int *, int /*<<< orphan*/);
void echo_sigchld_handler(int signal) {
  pid_t pid;
  int status;
  do {
    pid = waitpid(-1, &status, WNOHANG);
  } while (pid > 0);
}


x86 assembly (clang, -O0):
<echo_sigchld_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%edi
lea    -0x14(%rbp),%rsi
call   1030 <waitpid@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jg     111b <echo_sigchld_handler+0xb>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<echo_sigchld_handler>:
push   %r14
push   %rbx
push   %rax
mov    0x2ecd(%rip),%r14
lea    0x4(%rsp),%rbx
mov    (%r14),%edx
mov    $0xffffffff,%edi
mov    %rbx,%rsi
call   1030 <waitpid@plt>
test   %rax,%rax
jg     1120 <echo_sigchld_handler+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@WNOHANG = global i32 0
define void @echo_sigchld_handler(i32 %0) {
%2 = alloca i32
%3 = alloca i64
%4 = alloca i32
store i32 %0, i32* %2
br label %5
5: ; preds = %8, %1
%6 = load i32, i32* @WNOHANG
%7 = call i64 @waitpid(i32 -1, i32* %4, i32 %6)
store i64 %7, i64* %3
br label %8
8: ; preds = %5
%9 = load i64, i64* %3
%10 = icmp sgt i64 %9, 0
br i1 %10, label %5, label %11
11: ; preds = %8
ret void
}

LLVM IR (-O2):
@WNOHANG = global i32 0
define void @echo_sigchld_handler(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
br label %4
4: ; preds = %4, %1
%5 = load i32, i32* @WNOHANG
%6 = call i64 @waitpid(i32 -1, i32* %2, i32 %5)
%7 = icmp sgt i64 %6, 0
br i1 %7, label %4, label %8
8: ; preds = %4
ret void
}
/* Variables and functions */
void ft_bzero(void *s, size_t n) {
  size_t i;
  unsigned char *c;
  c = s;
  i = 0;
  while (i < n) {
    c[i] = '\0';
    i++;
  }
}


x86 assembly (clang, -O0):
<ft_bzero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1147 <ft_bzero+0x47>
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    111c <ft_bzero+0x1c>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_bzero>:
test   %rsi,%rsi
je     1124 <ft_bzero+0x14>
push   %rax
mov    %rsi,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @ft_bzero(i8* nocapture writeonly %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %5, label %4
4: ; preds = %2
br label %5
5: ; preds = %4, %2
ret void
}
int is_zero(double n) {
  unsigned long long *i;
  unsigned short exponent;
  unsigned long long fraction;
  i = (unsigned long long *)&n;
  exponent = (unsigned short)(*i >> 52 & 0x7FF);
  fraction = *i & 0x000FFFFFFFFFFFFFULL;
  return ((exponent == 0 && fraction == 0) ? 1 : 0);
}


x86 assembly (clang, -O0):
<is_zero>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
shr    $0x34,%rax
and    $0x7ff,%rax
mov    %ax,-0x12(%rbp)
mov    -0x10(%rbp),%rcx
movabs $0xfffffffffffff,%rax
and    (%rcx),%rax
mov    %rax,-0x20(%rbp)
movzwl -0x12(%rbp),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x21(%rbp)
jne    1158 <is_zero+0x58>
cmpq   $0x0,-0x20(%rbp)
sete   %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_zero>:
movq   %xmm0,%rcx
shl    $0x1,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
ret

LLVM IR (-O0):
define i32 @is_zero(double %0) {
%2 = alloca double
%3 = alloca i64*
%4 = alloca i16
%5 = alloca i64
store double %0, double* %2
%6 = bitcast double* %2 to i64*
store i64* %6, i64** %3
%7 = load i64*, i64** %3
%8 = load i64, i64* %7
%9 = lshr i64 %8, 52
%10 = and i64 %9, 2047
%11 = trunc i64 %10 to i16
store i16 %11, i16* %4
%12 = load i64*, i64** %3
%13 = load i64, i64* %12
%14 = and i64 %13, 4503599627370495
store i64 %14, i64* %5
%15 = load i16, i16* %4
%16 = zext i16 %15 to i32
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %21
18: ; preds = %1
%19 = load i64, i64* %5
%20 = icmp eq i64 %19, 0
br label %21
21: ; preds = %18, %1
%22 = phi i1 [ false, %1 ], [ %20, %18 ]
%23 = zext i1 %22 to i64
%24 = select i1 %22, i32 1, i32 0
ret i32 %24
}

LLVM IR (-O2):
define i32 @is_zero(double %0) {
%2 = bitcast double %0 to i64
%3 = and i64 %2, 9223372036854775807
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
int motion_check(long type, double a1, double a2, double a3, double a4,
                 double a5, double a6, double a7, double collide[3]) {
  type = type;
  a1 = a1;
  a2 = a2;
  a3 = a3;
  a4 = a4;
  a4 = a5;
  a4 = a6;
  a4 = a7;
  collide[0] = collide[0];
  return (0);
}


x86 assembly (clang, -O0):
<motion_check>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  %xmm4,-0x30(%rbp)
movsd  %xmm5,-0x38(%rbp)
movsd  %xmm6,-0x40(%rbp)
mov    %rsi,-0x48(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x48(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x48(%rbp),%rax
movsd  %xmm0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @motion_check(i64 %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double* %8) {
%10 = alloca i64
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double*
store i64 %0, i64* %10
store double %1, double* %11
store double %2, double* %12
store double %3, double* %13
store double %4, double* %14
store double %5, double* %15
store double %6, double* %16
store double %7, double* %17
store double* %8, double** %18
%19 = load i64, i64* %10
store i64 %19, i64* %10
%20 = load double, double* %11
store double %20, double* %11
%21 = load double, double* %12
store double %21, double* %12
%22 = load double, double* %13
store double %22, double* %13
%23 = load double, double* %14
store double %23, double* %14
%24 = load double, double* %15
store double %24, double* %14
%25 = load double, double* %16
store double %25, double* %14
%26 = load double, double* %17
store double %26, double* %14
%27 = load double*, double** %18
%28 = getelementptr inbounds double, double* %27, i64 0
%29 = load double, double* %28
%30 = load double*, double** %18
%31 = getelementptr inbounds double, double* %30, i64 0
store double %29, double* %31
ret i32 0
}

LLVM IR (-O2):
define i32 @motion_check(i64 %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double* nocapture readnone %8) {
ret i32 0
}
char *fd2fd(string)
char *string;
{
  double date, time;
  fd2dt(string, &date, &time);
  return (dt2fd(date, time));
}


x86 assembly (clang, -O0):
<fd2fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
mov    $0x0,%al
call   1030 <fd2dt@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
mov    $0x2,%al
call   1040 <dt2fd@plt>
cltq
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fd2fd>:
sub    $0x18,%rsp
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
xor    %eax,%eax
call   1030 <fd2dt@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
mov    $0x2,%al
call   1040 <dt2fd@plt>
cltq
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i8* @fd2fd(i8* %0) {
%2 = alloca i8*
%3 = alloca double
%4 = alloca double
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 (i8*, double*, double*, ...) bitcast (i32 (...)* @fd2dt to i32 (i8*, double*, double*, ...)*)(i8* %5, double* %3, double* %4)
%7 = load double, double* %3
%8 = load double, double* %4
%9 = call i32 (double, double, ...) bitcast (i32 (...)* @dt2fd to i32 (double, double, ...)*)(double %7, double %8)
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i8*
ret i8* %11
}

LLVM IR (-O2):
define i8* @fd2fd(i8* %0) {
%2 = alloca double
%3 = alloca double
%4 = bitcast double* %2 to i8*
%5 = bitcast double* %3 to i8*
%6 = call i32 (i8*, double*, double*, ...) bitcast (i32 (...)* @fd2dt to i32 (i8*, double*, double*, ...)*)(i8* %0, double* %2, double* %3)
%7 = load double, double* %2
%8 = load double, double* %3
%9 = call i32 (double, double, ...) bitcast (i32 (...)* @dt2fd to i32 (double, double, ...)*)(double %7, double %8)
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i8*
ret i8* %11
}
void os_cond_init(void) {}


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

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

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

LLVM IR (-O2):
define void @os_cond_init() {
ret void
}
unsigned int I2CSlaveIntStatusEx(unsigned int baseAdd, unsigned int intFlag) {
  return (((*((volatile unsigned int *)(baseAdd + (0x28))))) & (intFlag));
}


x86 assembly (clang, -O0):
<I2CSlaveIntStatusEx>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x28,%eax
mov    %eax,%eax
mov    (%rax),%eax
and    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CSlaveIntStatusEx>:
mov    %esi,%eax
add    $0x28,%edi
and    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @I2CSlaveIntStatusEx(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 = add i32 %5, 40
%7 = zext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
%9 = load volatile i32, i32* %8
%10 = load i32, i32* %4
%11 = and i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @I2CSlaveIntStatusEx(i32 %0, i32 %1) {
%3 = add i32 %0, 40
%4 = zext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
%7 = and i32 %6, %1
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ flag;

/* Variables and functions */
int /*<<< orphan*/ IPPROTO_TCP;
int /*<<< orphan*/ TCP_NODELAY;
int /*<<< orphan*/ setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/,
                              int *, int);
void nodelay(int fd) {
  int flag = 1;
  setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(flag));
}


x86 assembly (clang, -O0):
<nodelay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb4(%rip),%rax
mov    (%rax),%esi
mov    0x2eb3(%rip),%rax
mov    (%rax),%edx
lea    -0x8(%rbp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nodelay>:
push   %rax
movl   $0x1,0x4(%rsp)
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
mov    0x2ebf(%rip),%rax
mov    (%rax),%edx
lea    0x4(%rsp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
pop    %rax
ret

LLVM IR (-O0):
@IPPROTO_TCP = global i32 0
@TCP_NODELAY = global i32 0
define void @nodelay(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* @IPPROTO_TCP
%6 = load i32, i32* @TCP_NODELAY
%7 = call i32 @setsockopt(i32 %4, i32 %5, i32 %6, i32* %3, i32 4)
ret void
}

LLVM IR (-O2):
@IPPROTO_TCP = global i32 0
@TCP_NODELAY = global i32 0
define void @nodelay(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 1, i32* %2
%4 = load i32, i32* @IPPROTO_TCP
%5 = load i32, i32* @TCP_NODELAY
%6 = call i32 @setsockopt(i32 %0, i32 %4, i32 %5, i32* %2, i32 4)
ret void
}