xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, int *);
int getAnInt(char *message) {
  int j;
  printf("%s ", message);
  scanf("%d", &j);
  return (j);
}


x86 assembly (clang, -O0):
<getAnInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
lea    0xec1(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getAnInt>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @getAnInt(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
ret i32 %6
}
int comparator_short(short *a, short *b) {
  return *a == *b ? 0 : *a < *b ? -1 : 1;
}


x86 assembly (clang, -O0):
<comparator_short>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%eax
mov    -0x10(%rbp),%rcx
movswl (%rcx),%ecx
cmp    %ecx,%eax
jne    112c <comparator_short+0x2c>
xor    %eax,%eax
mov    %eax,-0x14(%rbp)
jmp    114c <comparator_short+0x4c>
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
mov    -0x10(%rbp),%rax
movswl (%rax),%esi
mov    $0x1,%eax
mov    $0xffffffff,%ecx
cmp    %esi,%edx
cmovl  %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<comparator_short>:
movzwl (%rdi),%eax
xor    %ecx,%ecx
xor    %edx,%edx
cmp    (%rsi),%ax
setge  %dl
lea    -0x1(%rdx,%rdx,1),%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @comparator_short(i16* nocapture %0, i16* nocapture %1) {
%3 = load i16, i16* %0
%4 = load i16, i16* %1
%5 = icmp eq i16 %3, %4
%6 = icmp slt i16 %3, %4
%7 = select i1 %6, i32 -1, i32 1
%8 = select i1 %5, i32 0, i32 %7
ret i32 %8
}
char isCompatible(char induced, int dirGp, int dirGt) {
  if (dirGp == dirGt)
    return 1;
  if (induced)
    return 0;
  if (dirGt == 3)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isCompatible>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1125 <isCompatible+0x25>
movb   $0x1,-0x1(%rbp)
jmp    114f <isCompatible+0x4f>
cmpb   $0x0,-0x2(%rbp)
je     1138 <isCompatible+0x38>
movb   $0x0,-0x1(%rbp)
jmp    114f <isCompatible+0x4f>
cmpl   $0x3,-0xc(%rbp)
jne    114b <isCompatible+0x4b>
movb   $0x1,-0x1(%rbp)
jmp    114f <isCompatible+0x4f>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isCompatible>:
mov    $0x1,%al
cmp    %edx,%esi
je     1114 <isCompatible+0x14>
test   %dil,%dil
je     110e <isCompatible+0xe>
xor    %eax,%eax
ret
cmp    $0x3,%edx
sete   %al
ret

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

LLVM IR (-O2):
define signext i8 @isCompatible(i8 signext %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %1, %2
br i1 %4, label %10, label %5
5: ; preds = %3
%6 = icmp eq i8 %0, 0
br i1 %6, label %7, label %10
7: ; preds = %5
%8 = icmp eq i32 %2, 3
%9 = zext i1 %8 to i8
br label %10
10: ; preds = %7, %5, %3
%11 = phi i8 [ 1, %3 ], [ 0, %5 ], [ %9, %7 ]
ret i8 %11
}
/* Type definitions */
struct servent {
  int dummy;
};

/* Variables and functions */
struct servent *getservbyport(int port, const char *proto) {
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.servent = type { i32 }
define %struct.servent* @getservbyport(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
ret %struct.servent* null
}

LLVM IR (-O2):
%struct.servent = type { i32 }
define noalias %struct.servent* @getservbyport(i32 %0, i8* nocapture readnone %1) {
ret %struct.servent* null
}
/* Variables and functions */
int RAND_MAX;
int rand();
int random_number(int n) { return rand() / (RAND_MAX / n + 1); }


x86 assembly (clang, -O0):
<random_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ebc(%rip),%rax
mov    (%rax),%eax
cltd
idivl  -0x4(%rbp)
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
add    $0x1,%ecx
cltd
idiv   %ecx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_number>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
mov    %eax,%ecx
mov    0x2ec5(%rip),%rax
mov    (%rax),%eax
cltd
idiv   %ebx
mov    %eax,%esi
add    $0x1,%esi
mov    %ecx,%eax
cltd
idiv   %esi
pop    %rbx
ret

LLVM IR (-O0):
@RAND_MAX = global i32 0
define i32 @random_number(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @rand()
%4 = load i32, i32* @RAND_MAX
%5 = load i32, i32* %2
%6 = sdiv i32 %4, %5
%7 = add nsw i32 %6, 1
%8 = sdiv i32 %3, %7
ret i32 %8
}

LLVM IR (-O2):
@RAND_MAX = global i32 0
define i32 @random_number(i32 %0) {
%2 = tail call i32 (...) @rand()
%3 = load i32, i32* @RAND_MAX
%4 = sdiv i32 %3, %0
%5 = add nsw i32 %4, 1
%6 = sdiv i32 %2, %5
ret i32 %6
}
unsigned unsigned_unary(unsigned x) { return ~x; }


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

x86 assembly (clang, -O2):
<unsigned_unary>:
mov    %edi,%eax
not    %eax
ret

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

LLVM IR (-O2):
define i32 @unsigned_unary(i32 %0) {
%2 = xor i32 %0, -1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ DATA_axon();
int /*<<< orphan*/ LibraryHeader(char *, char *);
int /*<<< orphan*/ STARTUP_axon();
LIBRARY_axon() {
  LibraryHeader("axon", "Sat Feb  1 10:41:05 2014 ");
  DATA_axon();
  STARTUP_axon();
}


x86 assembly (clang, -O0):
<LIBRARY_axon>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    0xebf(%rip),%rsi
call   1050 <LibraryHeader@plt>
mov    $0x0,%al
call   1030 <DATA_axon@plt>
mov    $0x0,%al
call   1040 <STARTUP_axon@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LIBRARY_axon>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xec6(%rip),%rsi
call   1050 <LibraryHeader@plt>
xor    %eax,%eax
call   1030 <DATA_axon@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <STARTUP_axon@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"axon\00"
@.str.1 = [26 x i8] c"Sat Feb 1 10:41:05 2014 \00"
define i32 @LIBRARY_axon() {
%1 = alloca i32
%2 = call i32 @LibraryHeader(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (...) @DATA_axon()
%4 = call i32 (...) @STARTUP_axon()
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
@.str = [5 x i8] c"axon\00"
@.str.1 = [26 x i8] c"Sat Feb 1 10:41:05 2014 \00"
define i32 @LIBRARY_axon() {
%1 = tail call i32 @LibraryHeader(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (...) @DATA_axon()
%3 = tail call i32 (...) @STARTUP_axon()
ret i32 undef
}
void foo759() {}


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

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

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

LLVM IR (-O2):
define void @foo759() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_array(int *, int);
int main(void) {
  int array[5];
  array[0] = 98;
  array[1] = 402;
  array[2] = 198;
  array[3] = 298;
  array[4] = 1024;
  print_array(array, 5);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x62,-0x20(%rbp)
movl   $0x192,-0x1c(%rbp)
movl   $0xc6,-0x18(%rbp)
movl   $0x12a,-0x14(%rbp)
movl   $0x400,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x5,%esi
call   1030 <print_array@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x400,0x10(%rsp)
mov    %rsp,%rdi
mov    $0x5,%esi
call   1030 <print_array@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i32]
store i32 0, i32* %1
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
store i32 98, i32* %3
%4 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 1
store i32 402, i32* %4
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 2
store i32 198, i32* %5
%6 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 3
store i32 298, i32* %6
%7 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 4
store i32 1024, i32* %7
%8 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%9 = call i32 @print_array(i32* %8, i32 5)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = bitcast [5 x i32]* %1 to <4 x i32>*
store <4 x i32> <i32 98, i32 402, i32 198, i32 298>, <4 x i32>* %4
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 4
store i32 1024, i32* %5
%6 = call i32 @print_array(i32* %3, i32 5)
ret i32 0
}
float Cube(float x) { return x * x * x; }


x86 assembly (clang, -O0):
<Cube>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cube>:
movaps %xmm0,%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @Cube(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fmul float %3, %4
%6 = load float, float* %2
%7 = fmul float %5, %6
ret float %7
}

LLVM IR (-O2):
define float @Cube(float %0) {
%2 = fmul float %0, %0
%3 = fmul float %2, %0
ret float %3
}
/* Variables and functions */
int hvc_raise_irq(unsigned int, unsigned int);
int hyp_raise_irq(unsigned int irq, unsigned int vmid) {
  return hvc_raise_irq(irq, vmid);
}


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

x86 assembly (clang, -O2):
<hyp_raise_irq>:
jmp    1030 <hvc_raise_irq@plt>

LLVM IR (-O0):
define i32 @hyp_raise_irq(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 @hvc_raise_irq(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @hyp_raise_irq(i32 %0, i32 %1) {
%3 = tail call i32 @hvc_raise_irq(i32 %0, i32 %1)
ret i32 %3
}
int main(int argc, char *argv[]) {
  int a = 0;
  int i = 0;
  int c = 0;
  while (i < 5) {
    i++;
    a++;
  }
  c = i;
  while (i < 10) {
    i++;
    a++;
  }
  c = i;
  if (a < 10) {
  ERROR:
    goto ERROR;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x5,-0x18(%rbp)
jge    1148 <main+0x48>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <main+0x27>
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0xa,-0x18(%rbp)
jge    116f <main+0x6f>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114e <main+0x4e>
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0xa,-0x14(%rbp)
jge    1189 <main+0x89>
jmp    1184 <main+0x84>
jmp    1184 <main+0x84>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
br label %9
9: ; preds = %12, %2
%10 = load i32, i32* %7
%11 = icmp slt i32 %10, 5
br i1 %11, label %12, label %17
12: ; preds = %9
%13 = load i32, i32* %7
%14 = add nsw i32 %13, 1
store i32 %14, i32* %7
%15 = load i32, i32* %6
%16 = add nsw i32 %15, 1
store i32 %16, i32* %6
br label %9
17: ; preds = %9
%18 = load i32, i32* %7
store i32 %18, i32* %8
br label %19
19: ; preds = %22, %17
%20 = load i32, i32* %7
%21 = icmp slt i32 %20, 10
br i1 %21, label %22, label %27
22: ; preds = %19
%23 = load i32, i32* %7
%24 = add nsw i32 %23, 1
store i32 %24, i32* %7
%25 = load i32, i32* %6
%26 = add nsw i32 %25, 1
store i32 %26, i32* %6
br label %19
27: ; preds = %19
%28 = load i32, i32* %7
store i32 %28, i32* %8
%29 = load i32, i32* %6
%30 = icmp slt i32 %29, 10
br i1 %30, label %31, label %33
31: ; preds = %27
br label %32
32: ; preds = %32, %31
br label %32
33: ; preds = %27
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
void debug(char *str1, char *str2) {}


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

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

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

LLVM IR (-O2):
define void @debug(i8* nocapture %0, i8* nocapture %1) {
ret void
}
int dev_redir_data_in(struct stream *s, int chan_id, int chan_flags, int length,
                      int total_length) {
  return 0;
}


x86 assembly (clang, -O0):
<dev_redir_data_in>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.stream = type opaque
define i32 @dev_redir_data_in(%struct.stream* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.stream*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store %struct.stream* %0, %struct.stream** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
ret i32 0
}

LLVM IR (-O2):
%struct.stream = type opaque
define i32 @dev_redir_data_in(%struct.stream* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %4) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0xd4() {
  Assert_real((isodigit(212) == 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_isodigit.c",
              1065, ("isodigit should be 0 for 0xd4"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0xd4>:
push   %rax
mov    $0xd4,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x429,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xd4\00"
define void @t_isodigit_0xd4() {
%1 = call i64 @isodigit(i32 212)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1065, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xd4\00"
define void @t_isodigit_0xd4() {
%1 = tail call i64 @isodigit(i32 212)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1065, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void magadd_ShowHelp(FILE *outfile) {
  fprintf(
      outfile,
      "Add a constant to magnitudes of a light curve. If \"fix\" is given then "
      "the constant specified on the command line will be added for all light "
      "curves. If \"list\" is given, the constant will be read-in from the "
      "input-list file for each star, use the \"column\" keyword to optionally "
      "specify the column number to read from the input list. If \"fixcolumn\" "
      "is given then the constant will be taken from a previously computed "
      "output statistic. If \"expr\" is given then the constant will be "
      "determined by evaluating an analytic expression.\n\n");
}


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

x86 assembly (clang, -O2):
<magadd_ShowHelp>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x210,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [529 x i8] c"Add a constant to magnitudes of a light curve. If \22fix\22 is given then the constant specified on the command line will be added for all light curves. If \22list\22 is given, the constant will be read-in from the input-list file for each star, use the \22column\22 keyword to optionally specify the column number to read from the input list. If \22fixcolumn\22 is given then the constant will be taken from a previously computed output statistic. If \22expr\22 is given then the constant will be determined by evaluating an analytic expression.\0A\0A\00"
define void @magadd_ShowHelp(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([529 x i8], [529 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [529 x i8] c"Add a constant to magnitudes of a light curve. If \22fix\22 is given then the constant specified on the command line will be added for all light curves. If \22list\22 is given, the constant will be read-in from the input-list file for each star, use the \22column\22 keyword to optionally specify the column number to read from the input list. If \22fixcolumn\22 is given then the constant will be taken from a previously computed output statistic. If \22expr\22 is given then the constant will be determined by evaluating an analytic expression.\0A\0A\00"
define void @magadd_ShowHelp(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([529 x i8], [529 x i8]* @.str, i64 0, i64 0), i64 528, i64 1, i32* %0)
ret void
}
void gtk_container_class_find_child_property() {}


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

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

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

LLVM IR (-O2):
define void @gtk_container_class_find_child_property() {
ret void
}
int ones32(unsigned long int x) {
  x -= ((x >> 1) & 0x55555555);
  x = (((x >> 2) & 0x33333333) + (x & 0x33333333));
  x = (((x >> 4) + x) & 0x0f0f0f0f);
  x += (x >> 8);
  x += (x >> 16);
  return (x & 0x0000003f);
}


x86 assembly (clang, -O0):
<ones32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
shr    $0x1,%rcx
and    $0x55555555,%rcx
mov    -0x8(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x2,%rax
and    $0x33333333,%rax
mov    -0x8(%rbp),%rcx
and    $0x33333333,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x4,%rax
add    -0x8(%rbp),%rax
and    $0xf0f0f0f,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x8,%rax
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x10,%rax
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0x3f,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ones32>:
mov    %rdi,%rax
shr    %rax
and    $0x55555555,%eax
sub    %rax,%rdi
mov    %edi,%eax
shr    $0x2,%eax
and    $0x33333333,%eax
and    $0x33333333,%edi
add    %eax,%edi
mov    %edi,%eax
shr    $0x4,%eax
add    %edi,%eax
and    $0xf0f0f0f,%eax
mov    %rax,%rcx
shr    $0x8,%rcx
add    %eax,%ecx
mov    %ecx,%eax
shr    $0x10,%eax
add    %ecx,%eax
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @ones32(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 1
%5 = and i64 %4, 1431655765
%6 = load i64, i64* %2
%7 = sub i64 %6, %5
store i64 %7, i64* %2
%8 = load i64, i64* %2
%9 = lshr i64 %8, 2
%10 = and i64 %9, 858993459
%11 = load i64, i64* %2
%12 = and i64 %11, 858993459
%13 = add i64 %10, %12
store i64 %13, i64* %2
%14 = load i64, i64* %2
%15 = lshr i64 %14, 4
%16 = load i64, i64* %2
%17 = add i64 %15, %16
%18 = and i64 %17, 252645135
store i64 %18, i64* %2
%19 = load i64, i64* %2
%20 = lshr i64 %19, 8
%21 = load i64, i64* %2
%22 = add i64 %21, %20
store i64 %22, i64* %2
%23 = load i64, i64* %2
%24 = lshr i64 %23, 16
%25 = load i64, i64* %2
%26 = add i64 %25, %24
store i64 %26, i64* %2
%27 = load i64, i64* %2
%28 = and i64 %27, 63
%29 = trunc i64 %28 to i32
ret i32 %29
}

LLVM IR (-O2):
define i32 @ones32(i64 %0) {
%2 = lshr i64 %0, 1
%3 = and i64 %2, 1431655765
%4 = sub i64 %0, %3
%5 = lshr i64 %4, 2
%6 = and i64 %5, 858993459
%7 = and i64 %4, 858993459
%8 = add nuw nsw i64 %6, %7
%9 = lshr i64 %8, 4
%10 = add nuw nsw i64 %9, %8
%11 = and i64 %10, 252645135
%12 = lshr i64 %11, 8
%13 = add nuw nsw i64 %12, %11
%14 = lshr i64 %13, 16
%15 = add nuw nsw i64 %14, %13
%16 = trunc i64 %15 to i32
%17 = and i32 %16, 63
ret i32 %17
}
/* Type definitions */
typedef int int16_t;

/* Variables and functions */
void quicksort_doHeavyWork(void) {
  for (int16_t __i = 0; __i < 1000; __i++) {
    for (int16_t __j = 0; __j < 1000; __j++) {
      __j *__j *__j;
    }
  }
}


x86 assembly (clang, -O0):
<quicksort_doHeavyWork>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x3e8,-0x4(%rbp)
jge    114d <quicksort_doHeavyWork+0x4d>
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    113a <quicksort_doHeavyWork+0x3a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    111f <quicksort_doHeavyWork+0x1f>
jmp    113f <quicksort_doHeavyWork+0x3f>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <quicksort_doHeavyWork+0xb>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @quicksort_doHeavyWork() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void showStack(int *stack, int top) {
  int i;
  for (i = 0; i <= top; i++) {
    printf("\n%d - item: %d\n", i, stack[i]);
  }
  return;
}


x86 assembly (clang, -O0):
<showStack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     115a <showStack+0x4a>
mov    -0x10(%rbp),%esi
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <showStack+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<showStack>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
js     1147 <showStack+0x37>
mov    %esi,%r15d
mov    %rdi,%r14
add    $0x1,%r15d
xor    %ebx,%ebx
lea    0xed1(%rip),%r12
nop
mov    (%r14,%rbx,4),%edx
mov    %r12,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <showStack+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [16 x i8] c"\0A%d - item: %d\0A\00"
define void @showStack(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 = %18, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp sle i32 %7, %8
br i1 %9, label %10, label %21
10: ; preds = %6
%11 = load i32, i32* %5
%12 = load i32*, i32** %3
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
%16 = load i32, i32* %15
%17 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %16)
br label %18
18: ; preds = %10
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %6
21: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"\0A%d - item: %d\0A\00"
define void @showStack(i32* nocapture %0, i32 %1) {
%3 = icmp slt i32 %1, 0
br i1 %3, label %15, label %4
4: ; preds = %2
%5 = add nuw i32 %1, 1
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %13, %7 ]
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = trunc i64 %8 to i32
%12 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %10)
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %15, label %7
15: ; preds = %7, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lcd_set_type_command();
int /*<<< orphan*/ lcd_write_byte(int);
void nklcd_off() {
  lcd_set_type_command();
  lcd_write_byte(0x08);
}


x86 assembly (clang, -O0):
<nklcd_off>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <lcd_set_type_command@plt>
mov    $0x8,%edi
call   1040 <lcd_write_byte@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<nklcd_off>:
push   %rax
xor    %eax,%eax
call   1030 <lcd_set_type_command@plt>
mov    $0x8,%edi
pop    %rax
jmp    1040 <lcd_write_byte@plt>

LLVM IR (-O0):
define void @nklcd_off() {
%1 = call i32 (...) @lcd_set_type_command()
%2 = call i32 @lcd_write_byte(i32 8)
ret void
}

LLVM IR (-O2):
define void @nklcd_off() {
%1 = tail call i32 (...) @lcd_set_type_command()
%2 = tail call i32 @lcd_write_byte(i32 8)
ret void
}
int qksort_compare(const void *key1, const void *key2) {
  if (*(const int *)key1 > *(const int *)key2)
    return 1;
  else if (*(const int *)key1 == *(const int *)key2)
    return 0;
  return 0;
}


x86 assembly (clang, -O0):
<qksort_compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jle    112a <qksort_compare+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1154 <qksort_compare+0x54>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jne    1148 <qksort_compare+0x48>
movl   $0x0,-0x4(%rbp)
jmp    1154 <qksort_compare+0x54>
jmp    114d <qksort_compare+0x4d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<qksort_compare>:
mov    (%rdi),%ecx
xor    %eax,%eax
cmp    (%rsi),%ecx
setg   %al
ret

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

LLVM IR (-O2):
define i32 @qksort_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 sgt i32 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ lirerr(int);
void extrapolate_region_downwards(void) { lirerr(8888003); }


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

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

LLVM IR (-O0):
define void @extrapolate_region_downwards() {
%1 = call i32 @lirerr(i32 8888003)
ret void
}

LLVM IR (-O2):
define void @extrapolate_region_downwards() {
%1 = tail call i32 @lirerr(i32 8888003)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ afficherLegendeAide();
int /*<<< orphan*/ lireEtAfficher(char *);
int /*<<< orphan*/ printf(char *);
void afficherAide(void) {
  afficherLegendeAide();
  printf("Aide : \n\n");
  lireEtAfficher("Aide/Texte_Aide_Rhyddid.txt");
}


x86 assembly (clang, -O0):
<afficherAide>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <afficherLegendeAide@plt>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
lea    0xebc(%rip),%rdi
call   1050 <lireEtAfficher@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<afficherAide>:
push   %rax
xor    %eax,%eax
call   1040 <afficherLegendeAide@plt>
lea    0xedd(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb5(%rip),%rdi
pop    %rax
jmp    1050 <lireEtAfficher@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"Aide : \0A\0A\00"
@.str.1 = [28 x i8] c"Aide/Texte_Aide_Rhyddid.txt\00"
define void @afficherAide() {
%1 = call i32 (...) @afficherLegendeAide()
%2 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @lireEtAfficher(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [28 x i8] c"Aide/Texte_Aide_Rhyddid.txt\00"
@str = [9 x i8] c"Aide : \0A\00"
define void @afficherAide() {
%1 = tail call i32 (...) @afficherLegendeAide()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @lireEtAfficher(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t hash_len_16(uint64_t u, uint64_t v, uint64_t mul) {
  uint64_t a, b;
  a = (u ^ v) * mul;
  a ^= (a >> 47);
  b = (v ^ a) * mul;
  b ^= (b >> 47);
  b *= mul;
  return b;
}


x86 assembly (clang, -O0):
<hash_len_16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x2f,%ecx
sar    %cl,%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
xor    -0x10(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x2f,%ecx
sar    %cl,%eax
xor    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @hash_len_16(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = xor i32 %9, %10
%12 = load i32, i32* %6
%13 = mul nsw i32 %11, %12
store i32 %13, i32* %7
%14 = load i32, i32* %7
%15 = ashr i32 %14, 47
%16 = load i32, i32* %7
%17 = xor i32 %16, %15
store i32 %17, i32* %7
%18 = load i32, i32* %5
%19 = load i32, i32* %7
%20 = xor i32 %18, %19
%21 = load i32, i32* %6
%22 = mul nsw i32 %20, %21
store i32 %22, i32* %8
%23 = load i32, i32* %8
%24 = ashr i32 %23, 47
%25 = load i32, i32* %8
%26 = xor i32 %25, %24
store i32 %26, i32* %8
%27 = load i32, i32* %6
%28 = load i32, i32* %8
%29 = mul nsw i32 %28, %27
store i32 %29, i32* %8
%30 = load i32, i32* %8
ret i32 %30
}

LLVM IR (-O2):
define i32 @hash_len_16(i32 %0, i32 %1, i32 %2) {
ret i32 poison
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) { printf("Hola Mundo! smo_routine"); }


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"Hola Mundo! smo_routine\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"Hola Mundo! smo_routine\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
char *memalloc(int);
void *memcpy(char *, char *, int);
int strlen(char *);
void *memallocstrdup(char *source) {
  int length = strlen(source);
  char *p = memalloc(length);
  return memcpy(p, source, length);
}


x86 assembly (clang, -O0):
<memallocstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <memalloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1050 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memallocstrdup>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %eax,%ebp
mov    %eax,%edi
call   1030 <memalloc@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <memcpy@plt>

LLVM IR (-O0):
define i8* @memallocstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = call i8* @memalloc(i32 %7)
store i8* %8, i8** %4
%9 = load i8*, i8** %4
%10 = load i8*, i8** %2
%11 = load i32, i32* %3
%12 = call i8* @memcpy(i8* %9, i8* %10, i32 %11)
ret i8* %12
}

LLVM IR (-O2):
define i8* @memallocstrdup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i8* @memalloc(i32 %2)
%4 = tail call i8* @memcpy(i8* %3, i8* %0, i32 %2)
ret i8* %4
}
void math_asin(void) {
  double d = luaL_check_number(1);
  lua_pushnumber(((asin(d)) * 180.0 / 3.14159265358979323846));
}


x86 assembly (clang, -O0):
<math_asin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
mov    $0x0,%al
call   1030 <luaL_check_number@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1050 <asin@plt>
movsd  0xea9(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe95(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    $0x1,%al
call   1040 <lua_pushnumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<math_asin>:
push   %rax
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <luaL_check_number@plt>
cvtsi2sd %eax,%xmm0
call   1050 <asin@plt>
mulsd  0xeb2(%rip),%xmm0
divsd  0xeb2(%rip),%xmm0
mov    $0x1,%al
pop    %rcx
jmp    1040 <lua_pushnumber@plt>

LLVM IR (-O0):
define void @math_asin() {
%1 = alloca double
%2 = call i32 (i32, ...) bitcast (i32 (...)* @luaL_check_number to i32 (i32, ...)*)(i32 1)
%3 = sitofp i32 %2 to double
store double %3, double* %1
%4 = load double, double* %1
%5 = call double @asin(double %4)
%6 = fmul double %5, 1.800000e+02
%7 = fdiv double %6, 0x400921FB54442D18
%8 = call i32 (double, ...) bitcast (i32 (...)* @lua_pushnumber to i32 (double, ...)*)(double %7)
ret void
}

LLVM IR (-O2):
define void @math_asin() {
%1 = tail call i32 (i32, ...) bitcast (i32 (...)* @luaL_check_number to i32 (i32, ...)*)(i32 1)
%2 = sitofp i32 %1 to double
%3 = tail call double @asin(double %2)
%4 = fmul double %3, 1.800000e+02
%5 = fdiv double %4, 0x400921FB54442D18
%6 = tail call i32 (double, ...) bitcast (i32 (...)* @lua_pushnumber to i32 (double, ...)*)(double %5)
ret void
}
int main() {
  int a, b, c;
  if (a) {
    b = 0;
  A:
    c = 0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1123 <main+0x23>
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ putchar(short);
void dispAllPrintableChars(void) {
  short ii;
  for (ii = 32; ii < 126; ii++) {
    putchar(ii);
    if (!(ii % 16))
      printf("\n");
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<dispAllPrintableChars>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movw   $0x20,-0x2(%rbp)
movswl -0x2(%rbp),%eax
cmp    $0x7e,%eax
jge    117b <dispAllPrintableChars+0x5b>
movswl -0x2(%rbp),%edi
call   1030 <putchar@plt>
movswl -0x2(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1165 <dispAllPrintableChars+0x45>
lea    0xea0(%rip),%rdi
call   1040 <printf@plt>
jmp    116a <dispAllPrintableChars+0x4a>
mov    -0x2(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x2(%rbp)
jmp    112e <dispAllPrintableChars+0xe>
lea    0xe7e(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dispAllPrintableChars>:
push   %rbp
push   %rbx
push   %rax
mov    $0x20,%bp
jmp    1129 <dispAllPrintableChars+0x19>
nopl   0x0(%rax)
add    $0x1,%ebp
cmp    $0x7e,%bp
je     1144 <dispAllPrintableChars+0x34>
movswl %bp,%ebx
mov    %ebx,%edi
call   1030 <putchar@plt>
test   $0xf,%bl
jne    1120 <dispAllPrintableChars+0x10>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1120 <dispAllPrintableChars+0x10>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @dispAllPrintableChars() {
%1 = alloca i16
store i16 32, i16* %1
br label %2
2: ; preds = %16, %0
%3 = load i16, i16* %1
%4 = sext i16 %3 to i32
%5 = icmp slt i32 %4, 126
br i1 %5, label %6, label %19
6: ; preds = %2
%7 = load i16, i16* %1
%8 = call i32 @putchar(i16 signext %7)
%9 = load i16, i16* %1
%10 = sext i16 %9 to i32
%11 = srem i32 %10, 16
%12 = icmp ne i32 %11, 0
br i1 %12, label %15, label %13
13: ; preds = %6
%14 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %6
br label %16
16: ; preds = %15
%17 = load i16, i16* %1
%18 = add i16 %17, 1
store i16 %18, i16* %1
br label %2
19: ; preds = %2
%20 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
define void @dispAllPrintableChars() {
br label %1
1: ; preds = %0, %8
%2 = phi i16 [ 32, %0 ], [ %9, %8 ]
%3 = tail call i32 @putchar(i16 signext %2)
%4 = and i16 %2, 15
%5 = icmp eq i16 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 bitcast (i32 (i16)* @putchar to i32 (i32)*)(i32 10)
br label %8
8: ; preds = %1, %6
%9 = add nuw nsw i16 %2, 1
%10 = icmp eq i16 %9, 126
br i1 %10, label %11, label %1
11: ; preds = %8
%12 = tail call i32 bitcast (i32 (i16)* @putchar to i32 (i32)*)(i32 10)
ret void
}
/* Variables and functions */
double acos(double const);
char f_acos(double *a, const double *b) {
  *a = acos(*b);
  return (0);
}


x86 assembly (clang, -O0):
<f_acos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <acos@plt>
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
xor    %eax,%eax
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_acos>:
push   %rbx
mov    %rdi,%rbx
movsd  (%rsi),%xmm0
call   1030 <acos@plt>
movsd  %xmm0,(%rbx)
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @f_acos(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %4
%6 = load double, double* %5
%7 = call double @acos(double %6)
%8 = load double*, double** %3
store double %7, double* %8
ret i8 0
}

LLVM IR (-O2):
define signext i8 @f_acos(double* nocapture writeonly %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = tail call double @acos(double %3)
store double %4, double* %0
ret i8 0
}
int test_imm_07int16_mem(short *val) {
  return ((*val) & (0x07 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_07int16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
and    $0x7,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_07int16_mem>:
testb  $0x7,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_07int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 7
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printArray(double *, int);
void printMatrix(double **matrix, int i, int j) {
  int count;
  for (count = 0; count < i; count++) {
    printArray(matrix[count], j);
  }
}


x86 assembly (clang, -O0):
<printMatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1157 <printMatrix+0x47>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x10(%rbp),%esi
call   1030 <printArray@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1129 <printMatrix+0x19>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printMatrix>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
jle    1145 <printMatrix+0x35>
mov    %edx,%r14d
mov    %rdi,%r15
mov    %esi,%ebp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r15,%rbx,8),%rdi
mov    %r14d,%esi
call   1030 <printArray@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1130 <printMatrix+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @printMatrix(double** nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %14
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %12, %7 ]
%9 = getelementptr inbounds double*, double** %0, i64 %8
%10 = load double*, double** %9
%11 = tail call i32 @printArray(double* %10, i32 %2)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %6
br i1 %13, label %14, label %7
14: ; preds = %7, %3
ret void
}