xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0xd9() {
  Assert_real((isdigit(217) == 0),
              "/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_isdigit.c",
              1090, ("isdigit should be 0 for 0xd9"));
}


x86 assembly (clang, -O0):
<t_isdigit_0xd9>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd9,%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x442,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isdigit_0xd9>:
push   %rax
mov    $0xd9,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x442,%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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xd9\00"
define void @t_isdigit_0xd9() {
%1 = call i64 @isdigit(i32 217)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1090, i8* getelementptr inbounds ([29 x i8], [29 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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xd9\00"
define void @t_isdigit_0xd9() {
%1 = tail call i64 @isdigit(i32 217)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1090, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ quantilef(float const *, size_t, float *, int);
float medianf(const float *x, size_t n) {
  float p = 0.5;
  quantilef(x, n, &p, 1);
  return p;
}


x86 assembly (clang, -O0):
<medianf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  0xed8(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
mov    $0x1,%ecx
call   1030 <quantilef@plt>
movss  -0x14(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<medianf>:
push   %rax
movl   $0x3f000000,0x4(%rsp)
3f
lea    0x4(%rsp),%rdx
mov    $0x1,%ecx
call   1030 <quantilef@plt>
movss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @medianf(float* %0, i64 %1) {
%3 = alloca float*
%4 = alloca i64
%5 = alloca float
store float* %0, float** %3
store i64 %1, i64* %4
store float 5.000000e-01, float* %5
%6 = load float*, float** %3
%7 = load i64, i64* %4
%8 = call i32 @quantilef(float* %6, i64 %7, float* %5, i32 1)
%9 = load float, float* %5
ret float %9
}

LLVM IR (-O2):
define float @medianf(float* %0, i64 %1) {
%3 = alloca float
%4 = bitcast float* %3 to i8*
store float 5.000000e-01, float* %3
%5 = call i32 @quantilef(float* %0, i64 %1, float* %3, i32 1)
%6 = load float, float* %3
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ SIGSEGV;
int /*<<< orphan*/ getpid();
int /*<<< orphan*/ kill(int /*<<< orphan*/, int /*<<< orphan*/);
void func2() { kill(getpid(), SIGSEGV); }


x86 assembly (clang, -O0):
<func2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%edi
mov    0x2eb4(%rip),%rax
mov    (%rax),%esi
call   1040 <kill@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<func2>:
push   %rax
xor    %eax,%eax
call   1030 <getpid@plt>
mov    0x2eb9(%rip),%rcx
mov    (%rcx),%esi
mov    %eax,%edi
pop    %rax
jmp    1040 <kill@plt>

LLVM IR (-O0):
@SIGSEGV = global i32 0
define void @func2() {
%1 = call i32 (...) @getpid()
%2 = load i32, i32* @SIGSEGV
%3 = call i32 @kill(i32 %1, i32 %2)
ret void
}

LLVM IR (-O2):
@SIGSEGV = global i32 0
define void @func2() {
%1 = tail call i32 (...) @getpid()
%2 = load i32, i32* @SIGSEGV
%3 = tail call i32 @kill(i32 %1, i32 %2)
ret void
}
void music_play(void) {}


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

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

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

LLVM IR (-O2):
define void @music_play() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGTERM;
int /*<<< orphan*/ raise(int /*<<< orphan*/);
void dosigterm(int sig) { raise(SIGTERM); }


x86 assembly (clang, -O0):
<dosigterm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dosigterm>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <raise@plt>

LLVM IR (-O0):
@SIGTERM = global i32 0
define void @dosigterm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @SIGTERM
%4 = call i32 @raise(i32 %3)
ret void
}

LLVM IR (-O2):
@SIGTERM = global i32 0
define void @dosigterm(i32 %0) {
%2 = load i32, i32* @SIGTERM
%3 = tail call i32 @raise(i32 %2)
ret void
}
int dbd_compile_local(char *line) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @dbd_compile_local(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sscanf(char *, char *, int *);
void YetAnotherFunction(int i) {
  int k;
  sscanf("12345", "%i", (int *)(k = i));
}


x86 assembly (clang, -O0):
<YetAnotherFunction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
movslq %eax,%rdx
lea    0xed5(%rip),%rdi
lea    0xed4(%rip),%rsi
call   1030 <sscanf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<YetAnotherFunction>:
movslq %edi,%rdx
lea    0xee6(%rip),%rdi
lea    0xee5(%rip),%rsi
jmp    1030 <sscanf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"12345\00"
@.str.1 = [3 x i8] c"%i\00"
define void @YetAnotherFunction(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
store i32 %4, i32* %3
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = call i32 @sscanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %6)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"12345\00"
@.str.1 = [3 x i8] c"%i\00"
define void @YetAnotherFunction(i32 %0) {
%2 = sext i32 %0 to i64
%3 = inttoptr i64 %2 to i32*
%4 = tail call i32 @sscanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
ret void
}
/* Type definitions */
struct section_list_link {
  int dummy;
};
struct section_list {
  int dummy;
};
struct genlist {
  int dummy;
};

/* Variables and functions */
scalar_t__ genlist_tail(struct genlist const *);
struct section_list_link *section_list_tail(const struct section_list *tthis) {
  return (struct section_list_link *)genlist_tail(
      (const struct genlist *)tthis);
}


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

x86 assembly (clang, -O2):
<section_list_tail>:
jmp    1030 <genlist_tail@plt>

LLVM IR (-O0):
%struct.section_list_link = type { i32 }
%struct.section_list = type { i32 }
%struct.genlist = type { i32 }
define %struct.section_list_link* @section_list_tail(%struct.section_list* %0) {
%2 = alloca %struct.section_list*
store %struct.section_list* %0, %struct.section_list** %2
%3 = load %struct.section_list*, %struct.section_list** %2
%4 = bitcast %struct.section_list* %3 to %struct.genlist*
%5 = call i64 @genlist_tail(%struct.genlist* %4)
%6 = inttoptr i64 %5 to %struct.section_list_link*
ret %struct.section_list_link* %6
}

LLVM IR (-O2):
%struct.section_list_link = type { i32 }
%struct.section_list = type { i32 }
%struct.genlist = type { i32 }
define %struct.section_list_link* @section_list_tail(%struct.section_list* %0) {
%2 = bitcast %struct.section_list* %0 to %struct.genlist*
%3 = tail call i64 @genlist_tail(%struct.genlist* %2)
%4 = inttoptr i64 %3 to %struct.section_list_link*
ret %struct.section_list_link* %4
}
/* Variables and functions */
scalar_t__ error();
int /*<<< orphan*/ init_object(int, unsigned long);
int /*<<< orphan*/ memory_init(int);
unsigned long set_size();
void define_set() {
  unsigned long size;
  size = set_size();
  init_object(46, size);
  if (error())
    return;
  memory_init(46);
  if (error()) {
    return;
  }
}


x86 assembly (clang, -O0):
<define_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <set_size@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x2e,%edi
call   1050 <init_object@plt>
mov    $0x0,%al
call   1060 <error@plt>
cmp    $0x0,%rax
je     1177 <define_set+0x37>
jmp    1197 <define_set+0x57>
mov    $0x2e,%edi
call   1030 <memory_init@plt>
mov    $0x0,%al
call   1060 <error@plt>
cmp    $0x0,%rax
je     1197 <define_set+0x57>
jmp    1197 <define_set+0x57>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<define_set>:
push   %rax
xor    %eax,%eax
call   1040 <set_size@plt>
mov    $0x2e,%edi
mov    %rax,%rsi
call   1050 <init_object@plt>
xor    %eax,%eax
call   1060 <error@plt>
test   %rax,%rax
je     1163 <define_set+0x23>
pop    %rax
ret
mov    $0x2e,%edi
call   1030 <memory_init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <error@plt>

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

LLVM IR (-O2):
define void @define_set() {
%1 = tail call i64 (...) @set_size()
%2 = tail call i32 @init_object(i32 46, i64 %1)
%3 = tail call i64 (...) @error()
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = tail call i32 @memory_init(i32 46)
%7 = tail call i64 (...) @error()
br label %8
8: ; preds = %5, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ syscall(int, int, int, int /*<<< orphan*/);
void isetpos(int row, int col) { syscall(0x4950, row, col, 0); }


x86 assembly (clang, -O0):
<isetpos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    $0x4950,%edi
xor    %ecx,%ecx
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isetpos>:
mov    %esi,%edx
mov    %edi,%esi
mov    $0x4950,%edi
xor    %ecx,%ecx
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define void @isetpos(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 @syscall(i32 18768, i32 %5, i32 %6, i32 0)
ret void
}

LLVM IR (-O2):
define void @isetpos(i32 %0, i32 %1) {
%3 = tail call i32 @syscall(i32 18768, i32 %0, i32 %1, i32 0)
ret void
}
void g_dataset_id_remove_no_notify() {}


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

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

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

LLVM IR (-O2):
define void @g_dataset_id_remove_no_notify() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printk(char *);
void s3c_show_mode(void) { printk("[S3C USB-OTG MODE] : DMA\n"); }


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"[S3C USB-OTG MODE] : DMA\0A\00"
define void @s3c_show_mode() {
%1 = call i32 @printk(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"[S3C USB-OTG MODE] : DMA\0A\00"
define void @s3c_show_mode() {
%1 = tail call i32 @printk(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}
int IsPrime(unsigned int number) {
  if (number <= 1)
    return 0;
  unsigned int i;
  for (i = 2; i * i <= number; i++) {
    if (number % i == 0)
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<IsPrime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
ja     111d <IsPrime+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    116b <IsPrime+0x6b>
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
ja     1164 <IsPrime+0x64>
mov    -0x8(%rbp),%eax
xor    %edx,%edx
divl   -0xc(%rbp)
cmp    $0x0,%edx
jne    1151 <IsPrime+0x51>
movl   $0x0,-0x4(%rbp)
jmp    116b <IsPrime+0x6b>
jmp    1156 <IsPrime+0x56>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1124 <IsPrime+0x24>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsPrime>:
xor    %ecx,%ecx
cmp    $0x2,%edi
jae    110a <IsPrime+0xa>
mov    %ecx,%eax
ret
cmp    $0x4,%edi
jae    1115 <IsPrime+0x15>
mov    $0x1,%eax
ret
mov    $0x2,%esi
xor    %ecx,%ecx
nopl   0x0(%rax)
mov    %edi,%eax
xor    %edx,%edx
div    %esi
test   %edx,%edx
je     1107 <IsPrime+0x7>
add    $0x1,%esi
mov    %esi,%eax
imul   %esi,%eax
cmp    %edi,%eax
jbe    1120 <IsPrime+0x20>
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @IsPrime(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = icmp ule i32 %5, 1
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %26
8: ; preds = %1
store i32 2, i32* %4
br label %9
9: ; preds = %22, %8
%10 = load i32, i32* %4
%11 = load i32, i32* %4
%12 = mul i32 %10, %11
%13 = load i32, i32* %3
%14 = icmp ule i32 %12, %13
br i1 %14, label %15, label %25
15: ; preds = %9
%16 = load i32, i32* %3
%17 = load i32, i32* %4
%18 = urem i32 %16, %17
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %15
store i32 0, i32* %2
br label %26
21: ; preds = %15
br label %22
22: ; preds = %21
%23 = load i32, i32* %4
%24 = add i32 %23, 1
store i32 %24, i32* %4
br label %9
25: ; preds = %9
store i32 1, i32* %2
br label %26
26: ; preds = %25, %20, %7
%27 = load i32, i32* %2
ret i32 %27
}

LLVM IR (-O2):
define i32 @IsPrime(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = icmp ult i32 %0, 4
br i1 %4, label %13, label %8
5: ; preds = %8
%6 = mul i32 %12, %12
%7 = icmp ugt i32 %6, %0
br i1 %7, label %13, label %8
8: ; preds = %3, %5
%9 = phi i32 [ %12, %5 ], [ 2, %3 ]
%10 = urem i32 %0, %9
%11 = icmp eq i32 %10, 0
%12 = add i32 %9, 1
br i1 %11, label %13, label %5
13: ; preds = %5, %8, %3, %1
%14 = phi i32 [ 0, %1 ], [ 1, %3 ], [ 1, %5 ], [ 0, %8 ]
ret i32 %14
}
trstring(s) char *s;
{
  register char *p;
  char c;
}


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

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

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

LLVM IR (-O2):
define i32 @trstring(i8* nocapture readnone %0) {
ret i32 undef
}
void f() {
  int a = 1;
  int b = -2;
  int c;
  {
    c = -3;
    a = -4;
  }
  if (a = b)
    a = 5;
  return;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
movl   $0xfffffffe,-0x8(%rbp)
movl   $0xfffffffd,-0xc(%rbp)
movl   $0xfffffffc,-0x4(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     1136 <f+0x36>
movl   $0x5,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 1, i32* %1
store i32 -2, i32* %2
store i32 -3, i32* %3
store i32 -4, i32* %1
%4 = load i32, i32* %2
store i32 %4, i32* %1
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 5, i32* %1
br label %7
7: ; preds = %6, %0
ret void
}

LLVM IR (-O2):
define void @f() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
void timeConv(int time) {
  int a, b, c;
  a = time / 3600;
  b = (time % 3600) / 60;
  c = (time % 3600) % 60;
  printf("\t%dH %dM %dS", a, b, c);
}


x86 assembly (clang, -O0):
<timeConv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xe10,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xe10,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xe10,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timeConv>:
movslq %edi,%rax
imul   $0xffffffff91a2b3c5,%rax,%rsi
shr    $0x20,%rsi
add    %eax,%esi
mov    %esi,%ecx
shr    $0x1f,%ecx
sar    $0xb,%esi
add    %ecx,%esi
imul   $0xe10,%esi,%ecx
sub    %ecx,%eax
movswl %ax,%ecx
imul   $0xffff8889,%ecx,%ecx
shr    $0x10,%ecx
add    %eax,%ecx
movzwl %cx,%ecx
movswl %cx,%edi
shr    $0xf,%ecx
sar    $0x5,%edi
add    %ecx,%edi
movswl %di,%edx
imul   $0x3c,%edi,%ecx
sub    %ecx,%eax
movswl %ax,%ecx
lea    0xea0(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"\09%dH %dM %dS\00"
define void @timeConv(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
%6 = load i32, i32* %2
%7 = sdiv i32 %6, 3600
store i32 %7, i32* %3
%8 = load i32, i32* %2
%9 = srem i32 %8, 3600
%10 = sdiv i32 %9, 60
store i32 %10, i32* %4
%11 = load i32, i32* %2
%12 = srem i32 %11, 3600
%13 = srem i32 %12, 60
store i32 %13, i32* %5
%14 = load i32, i32* %3
%15 = load i32, i32* %4
%16 = load i32, i32* %5
%17 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %14, i32 %15, i32 %16)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"\09%dH %dM %dS\00"
define void @timeConv(i32 %0) {
%2 = sdiv i32 %0, 3600
%3 = srem i32 %0, 3600
%4 = trunc i32 %3 to i16
%5 = sdiv i16 %4, 60
%6 = sext i16 %5 to i32
%7 = srem i16 %4, 60
%8 = sext i16 %7 to i32
%9 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %6, i32 %8)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void DAC_Out(uint32_t data) {
  (*((volatile uint32_t *)0x400053FC)) &= ~0x0F;
  (*((volatile uint32_t *)0x400053FC)) |= data;
}


x86 assembly (clang, -O0):
<DAC_Out>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x400053fc,%eax
mov    (%rax),%ecx
and    $0xfffffff0,%ecx
mov    $0x400053fc,%eax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
mov    $0x400053fc,%ecx
mov    (%rcx),%ecx
or     %eax,%ecx
mov    $0x400053fc,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<DAC_Out>:
andl   $0xfffffff0,0x400053fc
f0
or     %edi,0x400053fc
ret

LLVM IR (-O0):
define void @DAC_Out(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load volatile i32, i32* inttoptr (i64 1073763324 to i32*)
%4 = and i32 %3, -16
store volatile i32 %4, i32* inttoptr (i64 1073763324 to i32*)
%5 = load i32, i32* %2
%6 = load volatile i32, i32* inttoptr (i64 1073763324 to i32*)
%7 = or i32 %6, %5
store volatile i32 %7, i32* inttoptr (i64 1073763324 to i32*)
ret void
}

LLVM IR (-O2):
define void @DAC_Out(i32 %0) {
%2 = load volatile i32, i32* inttoptr (i64 1073763324 to i32*)
%3 = and i32 %2, -16
store volatile i32 %3, i32* inttoptr (i64 1073763324 to i32*)
%4 = load volatile i32, i32* inttoptr (i64 1073763324 to i32*)
%5 = or i32 %4, %0
store volatile i32 %5, i32* inttoptr (i64 1073763324 to i32*)
ret void
}
/* Variables and functions */
scalar_t__ _U_Qfcmp(long double, long double, int);
int _U_Qflt(long double a, long double b) {
  return (_U_Qfcmp(a, b, 1 | 8) != 0);
}


x86 assembly (clang, -O0):
<_U_Qflt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
mov    $0x9,%edi
call   1030 <_U_Qfcmp@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_U_Qflt>:
sub    $0x28,%rsp
fldt   0x30(%rsp)
fldt   0x40(%rsp)
fstpt  0x10(%rsp)
fstpt  (%rsp)
mov    $0x9,%edi
call   1030 <_U_Qfcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
define i32 @_U_Qflt(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %4
%7 = call i64 @_U_Qfcmp(x86_fp80 %5, x86_fp80 %6, i32 9)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @_U_Qflt(x86_fp80 %0, x86_fp80 %1) {
%3 = tail call i64 @_U_Qfcmp(x86_fp80 %0, x86_fp80 %1, i32 9)
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
int sym(int i, int L) { return (i < (L + 1) / 2) ? 2 * i : 2 * (L - i) - 1; }


x86 assembly (clang, -O0):
<sym>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
cmp    %ecx,%eax
jge    1139 <sym+0x39>
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1148 <sym+0x48>
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
shl    $0x1,%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sym>:
lea    0x1(%rsi),%eax
shr    $0x1f,%eax
add    %esi,%eax
add    $0x1,%eax
sar    %eax
lea    (%rdi,%rdi,1),%ecx
sub    %edi,%esi
cmp    %edi,%eax
lea    -0x1(%rsi,%rsi,1),%eax
cmovg  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @sym(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 = add nsw i32 %6, 1
%8 = sdiv i32 %7, 2
%9 = icmp slt i32 %5, %8
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i32, i32* %3
%12 = mul nsw i32 2, %11
br label %19
13: ; preds = %2
%14 = load i32, i32* %4
%15 = load i32, i32* %3
%16 = sub nsw i32 %14, %15
%17 = mul nsw i32 2, %16
%18 = sub nsw i32 %17, 1
br label %19
19: ; preds = %13, %10
%20 = phi i32 [ %12, %10 ], [ %18, %13 ]
ret i32 %20
}

LLVM IR (-O2):
define i32 @sym(i32 %0, i32 %1) {
%3 = add nsw i32 %1, 1
%4 = sdiv i32 %3, 2
%5 = icmp sgt i32 %4, %0
%6 = shl nsw i32 %0, 1
%7 = sub nsw i32 %1, %0
%8 = shl nsw i32 %7, 1
%9 = add nsw i32 %8, -1
%10 = select i1 %5, i32 %6, i32 %9
ret i32 %10
}
void mdp4_dtv_base_swap(struct mdp4_overlay_pipe *pipe) {}


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

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

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

LLVM IR (-O2):
%struct.mdp4_overlay_pipe = type opaque
define void @mdp4_dtv_base_swap(%struct.mdp4_overlay_pipe* nocapture %0) {
ret void
}
/* Type definitions */
typedef int uint32_t;
struct pcg_state_64 {
  int dummy;
};

/* Variables and functions */
int pcg_oneseq_64_xsh_rr_32_random_r(struct pcg_state_64 *);
uint32_t pcg_oneseq_64_xsh_rr_32_boundedrand_r(struct pcg_state_64 *rng,
                                               uint32_t bound) {
  uint32_t threshold = -bound % bound;
  for (;;) {
    uint32_t r = pcg_oneseq_64_xsh_rr_32_random_r(rng);
    if (r >= threshold)
      return r % bound;
  }
}


x86 assembly (clang, -O0):
<pcg_oneseq_64_xsh_rr_32_boundedrand_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
sub    -0xc(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pcg_oneseq_64_xsh_rr_32_random_r@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1152 <pcg_oneseq_64_xsh_rr_32_boundedrand_r+0x42>
mov    -0x14(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%eax
add    $0x20,%rsp
pop    %rbp
ret
jmp    112b <pcg_oneseq_64_xsh_rr_32_boundedrand_r+0x1b>

x86 assembly (clang, -O2):
<pcg_oneseq_64_xsh_rr_32_boundedrand_r>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <pcg_oneseq_64_xsh_rr_32_random_r@plt>
test   %eax,%eax
js     1120 <pcg_oneseq_64_xsh_rr_32_boundedrand_r+0x10>
cltd
idiv   %ebp
mov    %edx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.pcg_state_64 = type { i32 }
define i32 @pcg_oneseq_64_xsh_rr_32_boundedrand_r(%struct.pcg_state_64* %0, i32 %1) {
%3 = alloca %struct.pcg_state_64*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store %struct.pcg_state_64* %0, %struct.pcg_state_64** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = sub nsw i32 0, %7
%9 = load i32, i32* %4
%10 = srem i32 %8, %9
store i32 %10, i32* %5
br label %11
11: ; preds = %21, %2
%12 = load %struct.pcg_state_64*, %struct.pcg_state_64** %3
%13 = call i32 @pcg_oneseq_64_xsh_rr_32_random_r(%struct.pcg_state_64* %12)
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = load i32, i32* %5
%16 = icmp sge i32 %14, %15
br i1 %16, label %17, label %21
17: ; preds = %11
%18 = load i32, i32* %6
%19 = load i32, i32* %4
%20 = srem i32 %18, %19
ret i32 %20
21: ; preds = %11
br label %11
}

LLVM IR (-O2):
%struct.pcg_state_64 = type { i32 }
define i32 @pcg_oneseq_64_xsh_rr_32_boundedrand_r(%struct.pcg_state_64* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 @pcg_oneseq_64_xsh_rr_32_random_r(%struct.pcg_state_64* %0)
%5 = icmp sgt i32 %4, -1
br i1 %5, label %6, label %3
6: ; preds = %3
%7 = srem i32 %4, %1
ret i32 %7
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int mapcon_top_dimension(int *dim) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc(433, dim, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<mapcon_top_dimension>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1b1,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mapcon_top_dimension>:
mov    %rdi,%rsi
mov    $0x1b1,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @mapcon_top_dimension(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32* %0, i32** %2
%6 = load i32*, i32** %2
%7 = load i32*, i32** %3
%8 = load double*, double** %5
%9 = call i32 @_ada_use_c2phc(i32 433, i32* %6, i32* %7, double* %8)
store i32 %9, i32* %4
%10 = load i32, i32* %4
ret i32 %10
}

LLVM IR (-O2):
define i32 @mapcon_top_dimension(i32* %0) {
%2 = tail call i32 @_ada_use_c2phc(i32 433, i32* %0, i32* undef, double* undef)
ret i32 %2
}
/* Variables and functions */
scalar_t__ isspace(char);
char *strip(char *str) {
  while (isspace(*str))
    ++str;
  return str;
}


x86 assembly (clang, -O0):
<strip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1143 <strip+0x33>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <strip+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strip>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isspace@plt>
test   %rax,%rax
jne    1120 <strip+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @strip(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %8, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = call i64 @isspace(i8 signext %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %2
br label %3
11: ; preds = %3
%12 = load i8*, i8** %2
ret i8* %12
}

LLVM IR (-O2):
define i8* @strip(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isspace(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i8* %3
}
int my_compare(const void *a, const void *b) {
  int _a = *(int *)a;
  int _b = *(int *)b;
  if (_a < _b)
    return -1;
  else if (_a == _b)
    return 0;
  else
    return 1;
}


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

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

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

LLVM IR (-O2):
define i32 @my_compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp slt i32 %4, %6
%8 = icmp ne i32 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
scalar_t__ random();
void random_decreasing(uint32_t *a, uint32_t n) {
  uint32_t x;
  x = 0;
  while (n > 0) {
    n--;
    x += ((uint32_t)random()) % 4;
    a[n] = x;
  }
}


x86 assembly (clang, -O0):
<random_decreasing>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    1161 <random_decreasing+0x51>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <random@plt>
mov    $0x4,%ecx
cltd
idiv   %ecx
add    -0x10(%rbp),%edx
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
jmp    1126 <random_decreasing+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_decreasing>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
jle    1158 <random_decreasing+0x48>
mov    %rdi,%r14
mov    %esi,%ebx
add    $0x1,%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
lea    -0x2(%rbx),%r15d
xor    %eax,%eax
call   1030 <random@plt>
lea    0x3(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xfffffffc,%ecx
sub    %ecx,%eax
add    %eax,%ebp
mov    %ebp,(%r14,%r15,4)
add    $0xffffffffffffffff,%rbx
cmp    $0x1,%rbx
ja     1130 <random_decreasing+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @random_decreasing(i32* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %17
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ %5, %4 ], [ %9, %6 ]
%8 = phi i32 [ 0, %4 ], [ %13, %6 ]
%9 = add nsw i64 %7, -1
%10 = tail call i64 (...) @random()
%11 = trunc i64 %10 to i32
%12 = srem i32 %11, 4
%13 = add nsw i32 %12, %8
%14 = and i64 %9, 4294967295
%15 = getelementptr inbounds i32, i32* %0, i64 %14
store i32 %13, i32* %15
%16 = icmp ugt i64 %7, 1
br i1 %16, label %6, label %17
17: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _Error(long, char *);
void Error_PhraseSyntaxMethodMustReturnAValue(long p_position) {
  _Error(p_position, "Phrase syntax methods must return a value");
}


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

x86 assembly (clang, -O2):
<Error_PhraseSyntaxMethodMustReturnAValue>:
lea    0xee9(%rip),%rsi
jmp    1030 <_Error@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"Phrase syntax methods must return a value\00"
define void @Error_PhraseSyntaxMethodMustReturnAValue(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @_Error(i64 %3, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"Phrase syntax methods must return a value\00"
define void @Error_PhraseSyntaxMethodMustReturnAValue(i64 %0) {
%2 = tail call i32 @_Error(i64 %0, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
ret void
}
void dlerror() {}


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

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

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

LLVM IR (-O2):
define void @dlerror() {
ret void
}
int all_numbers(char *input) {
  for (; input[0] != 0; input++) {
    if (input[0] < '0' || input[0] > '9') {
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<all_numbers>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     115a <all_numbers+0x5a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jl     1138 <all_numbers+0x38>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
jle    1144 <all_numbers+0x44>
movl   $0x0,-0x4(%rbp)
jmp    1161 <all_numbers+0x61>
jmp    1149 <all_numbers+0x49>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1108 <all_numbers+0x8>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<all_numbers>:
mov    (%rdi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1123 <all_numbers+0x23>
add    $0x1,%rdi
nop
add    $0xc6,%cl
cmp    $0xf5,%cl
jbe    1124 <all_numbers+0x24>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <all_numbers+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @all_numbers(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %7
4: ; preds = %7
%5 = load i8, i8* %12
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %12, %4 ], [ %0, %1 ]
%10 = add i8 %8, -58
%11 = icmp ult i8 %10, -10
%12 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %11, label %13, label %4
13: ; preds = %7, %4, %1
%14 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ]
ret i32 %14
}
/* Variables and functions */
unsigned char write(int, unsigned char *, unsigned char);
int writeI2C_asFile(int i2c_fd, unsigned char writebuffer[],
                    unsigned char bytes) {
  unsigned char bytesWritten = write(i2c_fd, writebuffer, bytes);
  if (bytes != bytesWritten)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<writeI2C_asFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dl,%al
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
movzbl -0x11(%rbp),%edx
call   1030 <write@plt>
mov    %al,-0x12(%rbp)
movzbl -0x11(%rbp),%eax
movzbl -0x12(%rbp),%ecx
cmp    %ecx,%eax
je     1153 <writeI2C_asFile+0x43>
movl   $0xffffffff,-0x4(%rbp)
jmp    115a <writeI2C_asFile+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeI2C_asFile>:
push   %rbx
mov    %edx,%ebx
call   1030 <write@plt>
xor    %ecx,%ecx
cmp    %bl,%al
setne  %cl
neg    %ecx
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @writeI2C_asFile(i32 %0, i8* nocapture %1, i8 zeroext %2) {
%4 = tail call zeroext i8 @write(i32 %0, i8* %1, i8 zeroext %2)
%5 = icmp ne i8 %4, %2
%6 = sext i1 %5 to i32
ret i32 %6
}
unsigned int bcm2835_version(void) { return 10050; }


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

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

LLVM IR (-O0):
define i32 @bcm2835_version() {
ret i32 10050
}

LLVM IR (-O2):
define i32 @bcm2835_version() {
ret i32 10050
}
/* Variables and functions */
int /*<<< orphan*/ print_structure(char *, float **);
void sparselu_fini(float **BENCH, char *pass) { print_structure(pass, BENCH); }


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

x86 assembly (clang, -O2):
<sparselu_fini>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <print_structure@plt>

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

LLVM IR (-O2):
define void @sparselu_fini(float** %0, i8* %1) {
%3 = tail call i32 @print_structure(i8* %1, float** %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ decimal_to_hexadecimal();
int /*<<< orphan*/ hexadecimal_to_decimal();
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char s;
  scanf("%c", &s);
  switch (s) {
  case 'h':
    hexadecimal_to_decimal();
    break;
  case 'd':
    decimal_to_hexadecimal();
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x64,%eax
je     1181 <main+0x51>
jmp    1164 <main+0x34>
mov    -0xc(%rbp),%eax
sub    $0x68,%eax
jne    1188 <main+0x58>
jmp    1175 <main+0x45>
mov    $0x0,%al
call   1030 <hexadecimal_to_decimal@plt>
jmp    1188 <main+0x58>
mov    $0x0,%al
call   1050 <decimal_to_hexadecimal@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1040 <scanf@plt>
movsbl 0x7(%rsp),%eax
cmp    $0x64,%eax
je     115a <main+0x2a>
cmp    $0x68,%eax
jne    1161 <main+0x31>
xor    %eax,%eax
call   1030 <hexadecimal_to_decimal@plt>
jmp    1161 <main+0x31>
xor    %eax,%eax
call   1050 <decimal_to_hexadecimal@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
switch i32 %5, label %10 [
i32 104, label %6
i32 100, label %8
]
6: ; preds = %0
%7 = call i32 (...) @hexadecimal_to_decimal()
br label %10
8: ; preds = %0
%9 = call i32 (...) @decimal_to_hexadecimal()
br label %10
10: ; preds = %0, %8, %6
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i8
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = load i8, i8* %1
%4 = sext i8 %3 to i32
switch i32 %4, label %9 [
i32 104, label %5
i32 100, label %7
]
5: ; preds = %0
%6 = call i32 (...) @hexadecimal_to_decimal()
br label %9
7: ; preds = %0
%8 = call i32 (...) @decimal_to_hexadecimal()
br label %9
9: ; preds = %0, %7, %5
ret i32 0
}
/* Type definitions */
struct flashctx {
  int dummy;
};

/* Variables and functions */
int printlock_w39_common(struct flashctx *, int);
int printlock_w39v040b(struct flashctx *flash) {
  return printlock_w39_common(flash, 0x7fff2);
}


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

x86 assembly (clang, -O2):
<printlock_w39v040b>:
mov    $0x7fff2,%esi
jmp    1030 <printlock_w39_common@plt>

LLVM IR (-O0):
%struct.flashctx = type { i32 }
define i32 @printlock_w39v040b(%struct.flashctx* %0) {
%2 = alloca %struct.flashctx*
store %struct.flashctx* %0, %struct.flashctx** %2
%3 = load %struct.flashctx*, %struct.flashctx** %2
%4 = call i32 @printlock_w39_common(%struct.flashctx* %3, i32 524274)
ret i32 %4
}

LLVM IR (-O2):
%struct.flashctx = type { i32 }
define i32 @printlock_w39v040b(%struct.flashctx* %0) {
%2 = tail call i32 @printlock_w39_common(%struct.flashctx* %0, i32 524274)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ is_prime(char *);
int /*<<< orphan*/ stdin;
int main(void) {
  char string[10];
  fgets(string, 10, stdin);
  is_prime(string);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xe(%rbp),%rdi
mov    0x2eae(%rip),%rax
mov    (%rax),%edx
mov    $0xa,%esi
call   1030 <fgets@plt>
lea    -0xe(%rbp),%rdi
call   1040 <is_prime@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    0x2ebc(%rip),%rax
mov    (%rax),%edx
lea    0x6(%rsp),%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <fgets@plt>
mov    %rbx,%rdi
call   1040 <is_prime@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%4 = load i32, i32* @stdin
%5 = call i32 @fgets(i8* %3, i32 10, i32 %4)
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%7 = call i32 @is_prime(i8* %6)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @main() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i32 @fgets(i8* %2, i32 10, i32 %3)
%5 = call i32 @is_prime(i8* %2)
ret i32 0
}
/* Type definitions */
struct TreeNode {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ dfs(struct TreeNode *, int *);
int findTilt(struct TreeNode *root) {
  int tilt = 0;
  dfs(root, &tilt);
  return (tilt);
}


x86 assembly (clang, -O0):
<findTilt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1030 <dfs@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<findTilt>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rsi
call   1030 <dfs@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.TreeNode = type { i32 }
define i32 @findTilt(%struct.TreeNode* %0) {
%2 = alloca %struct.TreeNode*
%3 = alloca i32
store %struct.TreeNode* %0, %struct.TreeNode** %2
store i32 0, i32* %3
%4 = load %struct.TreeNode*, %struct.TreeNode** %2
%5 = call i32 @dfs(%struct.TreeNode* %4, i32* %3)
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
%struct.TreeNode = type { i32 }
define i32 @findTilt(%struct.TreeNode* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i32 @dfs(%struct.TreeNode* %0, i32* %2)
%5 = load i32, i32* %2
ret i32 %5
}