xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void *calloc(size_t, size_t);
void *xcalloc(size_t nelem, size_t size) {
  void *addr = calloc(nelem, size);
  assert(addr != NULL);
  return addr;
}


x86 assembly (clang, -O0):
<xcalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xcalloc>:
push   %rbx
call   1030 <calloc@plt>
mov    %rax,%rbx
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1040 <assert@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @xcalloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = call i8* @calloc(i64 %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = load i8*, i8** %5
ret i8* %13
}

LLVM IR (-O2):
define noalias i8* @xcalloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
%4 = icmp ne i8* %3, null
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ islower(int);
void t_islower_0x79() {
  Assert_real((islower(121)),
              "/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",
              610, ("islower should be 1 for y"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x79>:
push   %rax
mov    $0x79,%edi
call   1030 <islower@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x262,%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 y\00"
define void @t_islower_0x79() {
%1 = call i32 @islower(i32 121)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 610, 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 y\00"
define void @t_islower_0x79() {
%1 = tail call i32 @islower(i32 121)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 610, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void ui_set_background(int icon) {}


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

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

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

LLVM IR (-O2):
define void @ui_set_background(i32 %0) {
ret void
}
void clear_string(char *string) {
  int i = 0;
  while (i < 100 - 1) {
    *string++ = 0;
    i++;
  };
}


x86 assembly (clang, -O0):
<clear_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x63,-0xc(%rbp)
jge    1139 <clear_string+0x39>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x0,(%rax)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <clear_string+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_string>:
xorps  %xmm0,%xmm0
movups %xmm0,0x50(%rdi)
movups %xmm0,0x40(%rdi)
movups %xmm0,0x30(%rdi)
movups %xmm0,0x20(%rdi)
movups %xmm0,0x10(%rdi)
movups %xmm0,(%rdi)
movl   $0x0,0x5f(%rdi)
ret

LLVM IR (-O0):
define void @clear_string(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %7, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 99
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %2
store i8 0, i8* %8
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
store i32 %11, i32* %3
br label %4
12: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @clear_string(i8* nocapture writeonly %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ reverse(char *);
int main() {
  char array[100];
  gets(array);
  reverse(array);
  printf("%s\n", array);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
call   1050 <gets@plt>
lea    -0x70(%rbp),%rdi
call   1030 <reverse@plt>
lea    -0x70(%rbp),%rsi
lea    0xea4(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <gets@plt>
mov    %rbx,%rdi
call   1030 <reverse@plt>
lea    0xeb1(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @gets(i8* %2)
%4 = call i32 @reverse(i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
int tolower(int c) { return (c >= 'A' && c <= 'Z') ? (c + ('a' - 'A')) : c; }


x86 assembly (clang, -O0):
<tolower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x41,-0x4(%rbp)
jl     1129 <tolower+0x29>
cmpl   $0x5a,-0x4(%rbp)
jg     1129 <tolower+0x29>
mov    -0x4(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    112f <tolower+0x2f>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolower>:
lea    -0x41(%rdi),%ecx
lea    0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @tolower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 65
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 90
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 32
br label %13
11: ; preds = %5, %1
%12 = load i32, i32* %2
br label %13
13: ; preds = %11, %8
%14 = phi i32 [ %10, %8 ], [ %12, %11 ]
ret i32 %14
}

LLVM IR (-O2):
define i32 @tolower(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
/* Variables and functions */
int abs(int j) { return (j < 0 ? -j : j); }


x86 assembly (clang, -O0):
<abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    111e <abs+0x1e>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <abs+0x24>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<abs>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

LLVM IR (-O0):
define i32 @abs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = sub nsw i32 0, %6
br label %10
8: ; preds = %1
%9 = load i32, i32* %2
br label %10
10: ; preds = %8, %5
%11 = phi i32 [ %7, %5 ], [ %9, %8 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
void DebugMonitor(void) {}


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

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

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

LLVM IR (-O2):
define void @DebugMonitor() {
ret void
}
int foo_int(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @foo_int() {
ret i32 0
}
/* Variables and functions */
int func6();
int main(int argc, char *argv[]) { return func6() == 2 ? 0 : 1; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <func6@plt>
mov    %eax,%edx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x2,%edx
cmove  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <func6@plt>
xor    %ecx,%ecx
cmp    $0x2,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @func6()
%7 = icmp eq i32 %6, 2
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 0, i32 1
ret i32 %9
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @func6()
%4 = icmp ne i32 %3, 2
%5 = zext i1 %4 to i32
ret i32 %5
}
void flush() { __asm__ volatile(".byte 0x0f; .byte 0x0a;\n"); }


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

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

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

LLVM IR (-O2):
define void @flush() {
tail call void asm sideeffect ".byte 0x0f; .byte 0x0a;\0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int /*<<< orphan*/, int);
int /*<<< orphan*/ east_occluded_fill(int, int);
void east_occluded_fill_test(void **state) {
  assert_int_equal(
      east_occluded_fill(0x0001020400000000ul, 0x00FFFFFFFFFFFF00ul),
      0x00FFFEFC00000000ul);
}


x86 assembly (clang, -O0):
<east_occluded_fill_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
mov    $0xffffff00,%esi
call   1030 <east_occluded_fill@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1040 <assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<east_occluded_fill_test>:
push   %rax
xor    %edi,%edi
mov    $0xffffff00,%esi
call   1030 <east_occluded_fill@plt>
mov    %eax,%edi
xor    %esi,%esi
pop    %rax
jmp    1040 <assert_int_equal@plt>

LLVM IR (-O0):
define void @east_occluded_fill_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @east_occluded_fill(i32 0, i32 -256)
%4 = call i32 @assert_int_equal(i32 %3, i32 0)
ret void
}

LLVM IR (-O2):
define void @east_occluded_fill_test(i8** nocapture readnone %0) {
%2 = tail call i32 @east_occluded_fill(i32 0, i32 -256)
%3 = tail call i32 @assert_int_equal(i32 %2, i32 0)
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int _log10(uint8_t a) {
  int res = 0;
  while (a > 0) {
    a /= 10;
    ++res;
  }
  return ++res;
}


x86 assembly (clang, -O0):
<_log10>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1134 <_log10+0x34>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <_log10+0xe>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_log10>:
mov    $0x1,%eax
test   %edi,%edi
jle    1124 <_log10+0x24>
mov    $0xcccccccd,%ecx
xchg   %ax,%ax
mov    %edi,%edx
imul   %rcx,%rdx
shr    $0x23,%rdx
add    $0x1,%eax
cmp    $0x9,%edi
mov    %edx,%edi
ja     1110 <_log10+0x10>
ret

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

LLVM IR (-O2):
define i32 @_log10(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 1, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = udiv i32 %5, 10
%7 = add i32 %4, 1
%8 = icmp ult i32 %5, 10
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 1, %1 ], [ %7, %3 ]
ret i32 %10
}
void dummy_dtor(void *p) {}


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

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

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

LLVM IR (-O2):
define void @dummy_dtor(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ del_substr(char *, char *);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  char a[] = "heaheaaheheaa";
  char *b = "aa";
  del_substr(a, b);
  printf("%s", a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xec3(%rip),%rax
mov    %rax,-0x1e(%rbp)
mov    0xec1(%rip),%eax
mov    %eax,-0x16(%rbp)
mov    0xebb(%rip),%ax
mov    %ax,-0x12(%rbp)
lea    0xeaf(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    -0x1e(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1040 <del_substr@plt>
lea    -0x1e(%rbp),%rsi
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movabs $0x61616568656861,%rax
mov    %rax,0x6(%rsp)
movabs $0x6861616568616568,%rax
61 61 68
mov    %rax,(%rsp)
lea    0xec2(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <del_substr@plt>
lea    0xeb3(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@__const.main.a = [14 x i8] c"heaheaaheheaa\00"
@.str = [3 x i8] c"aa\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [14 x i8]
%4 = getelementptr inbounds [14 x i8], [14 x i8]* %3, i64 0, i64 0
%5 = call i32 @del_substr(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char **argv) {
  printf("%s", "2.5.04.3236");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [12 x i8] c"2.5.04.3236\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
char *assert_msg_fail() {
  do {
    if (!(0 == 1))
      return "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/marshall/mintest/refs/heads/master/"
             "tests/test_asserts.c"
             ":"
             "18"
             ": "
             "fail_msg";
  } while (0);
}


x86 assembly (clang, -O0):
<assert_msg_fail>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <assert_msg_fail+0x9>
jmp    110e <assert_msg_fail+0xe>
lea    0xeeb(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [159 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/marshall/mintest/refs/heads/master/tests/test_asserts.c:18: fail_msg\00"
define i8* @assert_msg_fail() {
br label %1
1: ; preds = %0
br label %2
2: ; preds = %1
ret i8* getelementptr inbounds ([159 x i8], [159 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [159 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/marshall/mintest/refs/heads/master/tests/test_asserts.c:18: fail_msg\00"
define i8* @assert_msg_fail() {
ret i8* getelementptr inbounds ([159 x i8], [159 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
double exp(double);
double dAUX2bp0a(double x) { return exp(x); }


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

x86 assembly (clang, -O2):
<dAUX2bp0a>:
jmp    1030 <exp@plt>

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

LLVM IR (-O2):
define double @dAUX2bp0a(double %0) {
%2 = tail call double @exp(double %0)
ret double %2
}
void EVP_MD_CTX_set_flags(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_MD_CTX_set_flags() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void ShowGraphWindow(void) {
  static int warned = 0;
  if (!warned) {
    printf("No GUI in this build!\n");
    warned = 1;
  }
}


x86 assembly (clang, -O0):
<ShowGraphWindow>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f11(%rip)
jne    1137 <ShowGraphWindow+0x27>
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,0x2ef5(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ShowGraphWindow>:
push   %rax
cmpb   $0x0,0x2f14(%rip)
jne    112d <ShowGraphWindow+0x1d>
lea    0xedf(%rip),%rdi
call   1030 <puts@plt>
movb   $0x1,0x2eff(%rip)
pop    %rax
ret

LLVM IR (-O0):
@ShowGraphWindow.warned = internal global i32 0
@.str = [23 x i8] c"No GUI in this build!\0A\00"
define void @ShowGraphWindow() {
%1 = load i32, i32* @ShowGraphWindow.warned
%2 = icmp ne i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* @ShowGraphWindow.warned
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
@ShowGraphWindow.warned = internal unnamed_addr global i1 false
@str = [22 x i8] c"No GUI in this build!\00"
define void @ShowGraphWindow() {
%1 = load i1, i1* @ShowGraphWindow.warned
br i1 %1, label %4, label %2
2: ; preds = %0
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
store i1 true, i1* @ShowGraphWindow.warned
br label %4
4: ; preds = %2, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gpio_close(int);
scalar_t__ gpio_open(int, int /*<<< orphan*/);
int gpio_read(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ puts(char *);
int main(void) {
  if (gpio_open(157, 0) < 0) {
    puts("Unable to open PIN file");
    return -1;
  }
  while (1) {
    printf("%d\n", gpio_read(157));
  }
  gpio_close(157);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x9d,%edi
xor    %esi,%esi
call   1060 <gpio_open@plt>
cmp    $0x0,%rax
jge    117c <main+0x3c>
lea    0xe94(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret
jmp    1181 <main+0x41>
mov    $0x9d,%edi
call   1050 <gpio_read@plt>
mov    %eax,%esi
lea    0xe84(%rip),%rdi
call   1040 <printf@plt>
jmp    1181 <main+0x41>

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x9d,%edi
xor    %esi,%esi
call   1060 <gpio_open@plt>
test   %rax,%rax
js     1176 <main+0x36>
lea    0xebf(%rip),%rbx
nopl   0x0(%rax)
mov    $0x9d,%edi
call   1050 <gpio_read@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
jmp    1160 <main+0x20>
lea    0xe83(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Unable to open PIN file\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @gpio_open(i32 157, i32 0)
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @puts(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i32 -1
6: ; preds = %0
br label %7
7: ; preds = %6, %7
%8 = call i32 @gpio_read(i32 157)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %8)
br label %7
}

LLVM IR (-O2):
@.str = [24 x i8] c"Unable to open PIN file\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i64 @gpio_open(i32 157, i32 0)
%2 = icmp slt i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i32 -1
5: ; preds = %0, %5
%6 = tail call i32 @gpio_read(i32 157)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %6)
br label %5
}
/* Type definitions */
struct test {
  int dummy;
};

/* Variables and functions */
int priv_vm_madv_protect_setup(int asroot, int injail, struct test *test) {
  return (0);
}


x86 assembly (clang, -O0):
<priv_vm_madv_protect_setup>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.test = type { i32 }
define i32 @priv_vm_madv_protect_setup(i32 %0, i32 %1, %struct.test* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.test*
store i32 %0, i32* %4
store i32 %1, i32* %5
store %struct.test* %2, %struct.test** %6
ret i32 0
}

LLVM IR (-O2):
%struct.test = type { i32 }
define i32 @priv_vm_madv_protect_setup(i32 %0, i32 %1, %struct.test* nocapture readnone %2) {
ret i32 0
}
int cairo_code_draw_envDecayLabel_get_height() { return 52; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_envDecayLabel_get_height() {
ret i32 52
}

LLVM IR (-O2):
define i32 @cairo_code_draw_envDecayLabel_get_height() {
ret i32 52
}
int isreach_none(int dx, int dy) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @isreach_none(i32 %0, i32 %1) {
ret i32 0
}
long double test_roundl(long double x) { return __builtin_roundl(x); }


x86 assembly (clang, -O0):
<test_roundl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <roundl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_roundl>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpt  (%rsp)
call   1030 <roundl@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @test_roundl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call x86_fp80 @llvm.round.f80(x86_fp80 %3)
ret x86_fp80 %4
}

LLVM IR (-O2):
define x86_fp80 @test_roundl(x86_fp80 %0) {
%2 = tail call x86_fp80 @llvm.round.f80(x86_fp80 %0)
ret x86_fp80 %2
}
/* Variables and functions */
bool is_digit(unsigned int ch) { return (ch >= 0x0030 && ch <= 0x0039); }


x86 assembly (clang, -O0):
<is_digit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jb     1120 <is_digit+0x20>
cmpl   $0x39,-0x4(%rbp)
setbe  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_digit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @is_digit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp uge i32 %3, 48
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp ule i32 %6, 57
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @is_digit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
int is_x_msec(int msec, long long secs, long long usecs) {
  static long long timestamp_old = 0;
  long long timestamp = usecs + secs * 1000000;
  if (timestamp_old == 0)
    timestamp_old = timestamp;
  if ((timestamp - timestamp_old) > msec * 1000) {
    timestamp_old = timestamp;
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_x_msec>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
imul   $0xf4240,-0x10(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,0x2efe(%rip)
jne    113b <is_x_msec+0x3b>
mov    -0x20(%rbp),%rax
mov    %rax,0x2eed(%rip)
mov    -0x20(%rbp),%rax
sub    0x2ee2(%rip),%rax
imul   $0x3e8,-0x8(%rbp),%ecx
movslq %ecx,%rcx
cmp    %rcx,%rax
jle    1170 <is_x_msec+0x70>
mov    -0x20(%rbp),%rax
mov    %rax,0x2ec4(%rip)
movl   $0x1,-0x4(%rbp)
jmp    1177 <is_x_msec+0x77>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_x_msec>:
imul   $0xf4240,%rsi,%rax
add    %rdx,%rax
mov    0x2f17(%rip),%rsi
test   %rsi,%rsi
mov    %rsi,%rdx
cmove  %rax,%rdx
mov    %rax,%rcx
sub    %rdx,%rcx
imul   $0x3e8,%edi,%edi
movslq %edi,%rdi
test   %rsi,%rsi
je     1134 <is_x_msec+0x34>
cmp    %rdi,%rcx
jle    1142 <is_x_msec+0x42>
cmp    %rdi,%rcx
cmovg  %rax,%rdx
mov    %rdx,0x2ee6(%rip)
xor    %eax,%eax
cmp    %rdi,%rcx
setg   %al
ret

LLVM IR (-O0):
@is_x_msec.timestamp_old = internal global i64 0
define i32 @is_x_msec(i32 %0, i64 %1, i64 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i32 %0, i32* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
%9 = load i64, i64* %7
%10 = load i64, i64* %6
%11 = mul nsw i64 %10, 1000000
%12 = add nsw i64 %9, %11
store i64 %12, i64* %8
%13 = load i64, i64* @is_x_msec.timestamp_old
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %3
%16 = load i64, i64* %8
store i64 %16, i64* @is_x_msec.timestamp_old
br label %17
17: ; preds = %15, %3
%18 = load i64, i64* %8
%19 = load i64, i64* @is_x_msec.timestamp_old
%20 = sub nsw i64 %18, %19
%21 = load i32, i32* %5
%22 = mul nsw i32 %21, 1000
%23 = sext i32 %22 to i64
%24 = icmp sgt i64 %20, %23
br i1 %24, label %25, label %27
25: ; preds = %17
%26 = load i64, i64* %8
store i64 %26, i64* @is_x_msec.timestamp_old
store i32 1, i32* %4
br label %28
27: ; preds = %17
store i32 0, i32* %4
br label %28
28: ; preds = %27, %25
%29 = load i32, i32* %4
ret i32 %29
}

LLVM IR (-O2):
@is_x_msec.timestamp_old = internal unnamed_addr global i64 0
define i32 @is_x_msec(i32 %0, i64 %1, i64 %2) {
%4 = mul nsw i64 %1, 1000000
%5 = add nsw i64 %4, %2
%6 = load i64, i64* @is_x_msec.timestamp_old
%7 = icmp eq i64 %6, 0
%8 = select i1 %7, i64 %5, i64 %6
%9 = sub nsw i64 %5, %8
%10 = mul nsw i32 %0, 1000
%11 = sext i32 %10 to i64
%12 = icmp sgt i64 %9, %11
%13 = or i1 %7, %12
br i1 %13, label %14, label %16
14: ; preds = %3
%15 = select i1 %12, i64 %5, i64 %8
store i64 %15, i64* @is_x_msec.timestamp_old
br label %16
16: ; preds = %3, %14
%17 = zext i1 %12 to i32
ret i32 %17
}
/* Type definitions */
typedef long long uint64_t;

/* Variables and functions */
uint64_t next_code(uint64_t prev_code) {
  return (prev_code * 252533LL) % 33554393LL;
}


x86 assembly (clang, -O0):
<next_code>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
imul   $0x3da75,-0x8(%rbp),%rax
mov    $0x1ffffd9,%ecx
cqto
idiv   %rcx
mov    %rdx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_code>:
imul   $0x3da75,%rdi,%rcx
movabs $0x800009c000be200f,%rdx
mov    %rcx,%rax
imul   %rdx
add    %rcx,%rdx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x18,%rdx
add    %rax,%rdx
imul   $0x1ffffd9,%rdx,%rax
sub    %rax,%rcx
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @next_code(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = mul nsw i64 %3, 252533
%5 = srem i64 %4, 33554393
ret i64 %5
}

LLVM IR (-O2):
define i64 @next_code(i64 %0) {
%2 = mul nsw i64 %0, 252533
%3 = srem i64 %2, 33554393
ret i64 %3
}
int MPI_Barrier(int comm) { return 0; }


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @dlclose() {
ret void
}
/* Variables and functions */
double modpi2(double);
double SiderealTime(double T) {
  double Theta;
  Theta = T * (360.98564736629 * 36525 + T * (0.000387933 - T / 38710000));
  return modpi2((280.46061837 + Theta) * (3.14159265358979323846 / 180));
}


x86 assembly (clang, -O0):
<SiderealTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm3
movsd  0xeec(%rip),%xmm2
divsd  %xmm2,%xmm3
movsd  0xed8(%rip),%xmm2
subsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xec0(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xea3(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  0xe8e(%rip),%xmm1
mulsd  %xmm1,%xmm0
call   1030 <modpi2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SiderealTime>:
movapd %xmm0,%xmm1
divsd  0xee4(%rip),%xmm1
addsd  0xee4(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xee0(%rip),%xmm1
mulsd  %xmm1,%xmm0
addsd  0xedc(%rip),%xmm0
mulsd  0xedc(%rip),%xmm0
jmp    1030 <modpi2@plt>

LLVM IR (-O0):
define double @SiderealTime(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = load double, double* %2
%6 = load double, double* %2
%7 = fdiv double %6, 3.871000e+07
%8 = fsub double 3.879330e-04, %7
%9 = call double @llvm.fmuladd.f64(double %5, double %8, double 0x416925FD18A447BF)
%10 = fmul double %4, %9
store double %10, double* %3
%11 = load double, double* %3
%12 = fadd double 0x4071875EB15E3164, %11
%13 = fmul double %12, 0x3F91DF46A2529D39
%14 = call double @modpi2(double %13)
ret double %14
}

LLVM IR (-O2):
define double @SiderealTime(double %0) {
%2 = fdiv double %0, 3.871000e+07
%3 = fsub double 3.879330e-04, %2
%4 = tail call double @llvm.fmuladd.f64(double %0, double %3, double 0x416925FD18A447BF)
%5 = fmul double %4, %0
%6 = fadd double %5, 0x4071875EB15E3164
%7 = fmul double %6, 0x3F91DF46A2529D39
%8 = tail call double @modpi2(double %7)
ret double %8
}
/* Variables and functions */
double sas_2J1x_x(double);
double sas_sinx_x(double);
double _fq(double qab, double qc, double radius, double length) {
  return sas_2J1x_x(qab * radius) * sas_sinx_x(qc * 0.5 * length);
}


x86 assembly (clang, -O0):
<_fq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
call   1030 <sas_2J1x_x@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  0xea8(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
call   1040 <sas_sinx_x@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_fq>:
sub    $0x18,%rsp
movsd  %xmm3,0x10(%rsp)
movsd  %xmm1,(%rsp)
mulsd  %xmm2,%xmm0
call   1030 <sas_2J1x_x@plt>
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm0
mulsd  0xeb5(%rip),%xmm0
mulsd  0x10(%rsp),%xmm0
call   1040 <sas_sinx_x@plt>
mulsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @_fq(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* %5
%10 = load double, double* %7
%11 = fmul double %9, %10
%12 = call double @sas_2J1x_x(double %11)
%13 = load double, double* %6
%14 = fmul double %13, 5.000000e-01
%15 = load double, double* %8
%16 = fmul double %14, %15
%17 = call double @sas_sinx_x(double %16)
%18 = fmul double %12, %17
ret double %18
}

LLVM IR (-O2):
define double @_fq(double %0, double %1, double %2, double %3) {
%5 = fmul double %0, %2
%6 = tail call double @sas_2J1x_x(double %5)
%7 = fmul double %1, 5.000000e-01
%8 = fmul double %7, %3
%9 = tail call double @sas_sinx_x(double %8)
%10 = fmul double %6, %9
ret double %10
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int swap16(int);
uint16_t tobe16(uint16_t x) {
  return (*(uint16_t *)"\0\1" == 1) ? x : swap16(x);
}


x86 assembly (clang, -O0):
<tobe16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,0xede(%rip)
jne    1133 <tobe16+0x23>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    113e <tobe16+0x2e>
mov    -0x4(%rbp),%edi
call   1030 <swap16@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tobe16>:
jmp    1030 <swap16@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"\00\01\00"
define i32 @tobe16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* bitcast ([3 x i8]* @.str to i32*)
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load i32, i32* %2
br label %10
7: ; preds = %1
%8 = load i32, i32* %2
%9 = call i32 @swap16(i32 %8)
br label %10
10: ; preds = %7, %5
%11 = phi i32 [ %6, %5 ], [ %9, %7 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @tobe16(i32 %0) {
%2 = tail call i32 @swap16(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
void show() {
  char name[8];
  print(name);
}


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

x86 assembly (clang, -O2):
<show>:
push   %rax
mov    %rsp,%rdi
call   1030 <print@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @show() {
%1 = alloca [8 x i8]
%2 = getelementptr inbounds [8 x i8], [8 x i8]* %1, i64 0, i64 0
%3 = call i32 @print(i8* %2)
ret void
}

LLVM IR (-O2):
define void @show() {
%1 = alloca [8 x i8]
%2 = getelementptr inbounds [8 x i8], [8 x i8]* %1, i64 0, i64 0
%3 = call i32 @print(i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bank_queuing();
int main(int argc, char *argv[]) {
  bank_queuing();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @bank_queuing()
ret i32 0
}
/* Variables and functions */
scalar_t__ isalnum(int);
int is_xml_element_name_char(int c) {
  return isalnum(c) || c == ':' || c == '_' || c == '-' || c == '.';
}


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

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

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

LLVM IR (-O2):
define i32 @is_xml_element_name_char(i32 %0) {
%2 = tail call i64 @isalnum(i32 %0)
%3 = freeze i64 %2
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
switch i32 %0, label %6 [
i32 95, label %9
i32 58, label %9
i32 45, label %9
]
6: ; preds = %5
%7 = icmp eq i32 %0, 46
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %5, %5, %1, %6
%10 = phi i32 [ 1, %5 ], [ %8, %6 ], [ 1, %1 ], [ 1, %5 ], [ 1, %5 ]
ret i32 %10
}
void av_fft_permute() {}


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

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

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

LLVM IR (-O2):
define void @av_fft_permute() {
ret void
}
float frandom(limit)
long limit;
{
  float r;
  long rdm;
  if (limit < 2)
    return (0);
  rdm = random() % (limit * 100);
  r = (float)rdm / 100.0;
  return (r);
}


x86 assembly (clang, -O0):
<frandom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x2,-0x10(%rbp)
jge    1134 <frandom+0x24>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1174 <frandom+0x64>
mov    $0x0,%al
call   1030 <random@plt>
cltq
imul   $0x64,-0x10(%rbp),%rcx
cqto
idiv   %rcx
mov    %rdx,-0x20(%rbp)
cvtsi2ssq -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xea3(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<frandom>:
xorps  %xmm0,%xmm0
cmp    $0x2,%rdi
jl     1156 <frandom+0x46>
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <random@plt>
movslq %eax,%rcx
imul   $0x64,%rbx,%rsi
mov    %rcx,%rdx
or     %rsi,%rdx
shr    $0x20,%rdx
je     1141 <frandom+0x31>
mov    %rcx,%rax
cqto
idiv   %rsi
jmp    1145 <frandom+0x35>
xor    %edx,%edx
div    %esi
xorps  %xmm0,%xmm0
cvtsi2ss %rdx,%xmm0
divss  0xeab(%rip),%xmm0
pop    %rbx
ret

LLVM IR (-O0):
define float @frandom(i64 %0) {
%2 = alloca float
%3 = alloca i64
%4 = alloca float
%5 = alloca i64
store i64 %0, i64* %3
%6 = load i64, i64* %3
%7 = icmp slt i64 %6, 2
br i1 %7, label %8, label %9
8: ; preds = %1
store float 0.000000e+00, float* %2
br label %21
9: ; preds = %1
%10 = call i32 (...) @random()
%11 = sext i32 %10 to i64
%12 = load i64, i64* %3
%13 = mul nsw i64 %12, 100
%14 = srem i64 %11, %13
store i64 %14, i64* %5
%15 = load i64, i64* %5
%16 = sitofp i64 %15 to float
%17 = fpext float %16 to double
%18 = fdiv double %17, 1.000000e+02
%19 = fptrunc double %18 to float
store float %19, float* %4
%20 = load float, float* %4
store float %20, float* %2
br label %21
21: ; preds = %9, %8
%22 = load float, float* %2
ret float %22
}

LLVM IR (-O2):
define float @frandom(i64 %0) {
%2 = icmp slt i64 %0, 2
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = tail call i32 (...) @random()
%5 = sext i32 %4 to i64
%6 = mul nsw i64 %0, 100
%7 = srem i64 %5, %6
%8 = sitofp i64 %7 to float
%9 = fdiv float %8, 1.000000e+02
br label %10
10: ; preds = %1, %3
%11 = phi float [ %9, %3 ], [ 0.000000e+00, %1 ]
ret float %11
}
/* Variables and functions */
int /*<<< orphan*/ CX4_C4DoScaleRotate(int);
void CX4_op00_07(void) { CX4_C4DoScaleRotate(64); }


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

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

LLVM IR (-O0):
define void @CX4_op00_07() {
%1 = call i32 @CX4_C4DoScaleRotate(i32 64)
ret void
}

LLVM IR (-O2):
define void @CX4_op00_07() {
%1 = tail call i32 @CX4_C4DoScaleRotate(i32 64)
ret void
}
const char *find_loop_start(const char *code) {
  int depth = 1;
  char ch;
  while (ch = *--code, depth > 0) {
    switch (ch) {
    case '[':
      depth--;
      break;
    case ']':
      depth++;
      break;
    }
  }
  return code;
}


x86 assembly (clang, -O0):
<find_loop_start>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x8(%rbp)
mov    -0x1(%rax),%al
mov    %al,-0xd(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    1170 <find_loop_start+0x70>
movsbl -0xd(%rbp),%eax
mov    %eax,-0x14(%rbp)
sub    $0x5b,%eax
je     1154 <find_loop_start+0x54>
jmp    1143 <find_loop_start+0x43>
mov    -0x14(%rbp),%eax
sub    $0x5d,%eax
je     1162 <find_loop_start+0x62>
jmp    116b <find_loop_start+0x6b>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    116b <find_loop_start+0x6b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <find_loop_start+0xf>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_loop_start>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
mov    $0x1,%ecx
jmp    111b <find_loop_start+0x1b>
xchg   %ax,%ax
add    $0x1,%ecx
add    $0xffffffffffffffff,%rax
test   %ecx,%ecx
jle    112d <find_loop_start+0x2d>
movsbl (%rax),%edx
cmp    $0x5d,%edx
je     1110 <find_loop_start+0x10>
cmp    $0x5b,%edx
jne    1113 <find_loop_start+0x13>
add    $0xffffffff,%ecx
jmp    1113 <find_loop_start+0x13>
ret

LLVM IR (-O0):
define i8* @find_loop_start(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8
store i8* %0, i8** %2
store i32 1, i32* %3
br label %5
5: ; preds = %20, %1
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i32 -1
store i8* %7, i8** %2
%8 = load i8, i8* %7
store i8 %8, i8* %4
%9 = load i32, i32* %3
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %21
11: ; preds = %5
%12 = load i8, i8* %4
%13 = sext i8 %12 to i32
switch i32 %13, label %20 [
i32 91, label %14
i32 93, label %17
]
14: ; preds = %11
%15 = load i32, i32* %3
%16 = add nsw i32 %15, -1
store i32 %16, i32* %3
br label %20
17: ; preds = %11
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
br label %20
20: ; preds = %11, %17, %14
br label %5
21: ; preds = %5
%22 = load i8*, i8** %2
ret i8* %22
}

LLVM IR (-O2):
define i8* @find_loop_start(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 -1
br label %3
3: ; preds = %1, %12
%4 = phi i8* [ %2, %1 ], [ %14, %12 ]
%5 = phi i32 [ 1, %1 ], [ %13, %12 ]
%6 = load i8, i8* %4
%7 = sext i8 %6 to i32
switch i32 %7, label %12 [
i32 91, label %8
i32 93, label %10
]
8: ; preds = %3
%9 = add nsw i32 %5, -1
br label %12
10: ; preds = %3
%11 = add nuw nsw i32 %5, 1
br label %12
12: ; preds = %3, %10, %8
%13 = phi i32 [ %5, %3 ], [ %11, %10 ], [ %9, %8 ]
%14 = getelementptr inbounds i8, i8* %4, i64 -1
%15 = icmp sgt i32 %13, 0
br i1 %15, label %3, label %16
16: ; preds = %12
ret i8* %14
}
char cast_long_char(long int x) { return (char)x; }


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

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

LLVM IR (-O0):
define signext i8 @cast_long_char(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @cast_long_char(i64 %0) {
%2 = trunc i64 %0 to i8
ret i8 %2
}