xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ merge(int *, int, int, int);
void mergeSort(int arr[], int start, int end) {
  if (start < end) {
    int mid = (start + end) / 2;
    mergeSort(arr, start, mid);
    mergeSort(arr, mid + 1, end);
    merge(arr, start, mid, end);
  }
}


x86 assembly (clang, -O0):
<mergeSort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1182 <mergeSort+0x62>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <mergeSort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1030 <mergeSort@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1040 <merge@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mergeSort>:
cmp    %edx,%esi
jge    1172 <mergeSort+0x52>
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %esi,%r12d
mov    %rdi,%r15
lea    (%r14,%r12,1),%eax
mov    %eax,%ebx
shr    $0x1f,%ebx
add    %eax,%ebx
sar    %ebx
mov    %ebx,%edx
call   1030 <mergeSort@plt>
lea    0x1(%rbx),%esi
mov    %r15,%rdi
mov    %r14d,%edx
call   1030 <mergeSort@plt>
mov    %r15,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
mov    %r14d,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <merge@plt>
ret

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

LLVM IR (-O2):
define void @mergeSort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %6, label %5
5: ; preds = %3, %6
ret void
6: ; preds = %3
%7 = add nsw i32 %2, %1
%8 = sdiv i32 %7, 2
tail call void @mergeSort(i32* %0, i32 %1, i32 %8)
%9 = add nsw i32 %8, 1
tail call void @mergeSort(i32* %0, i32 %9, i32 %2)
%10 = tail call i32 @merge(i32* %0, i32 %1, i32 %8, i32 %2)
br label %5
}
void foo353(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo353(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SetMotor(int, int);
int setRMotor(int motor, int rpower, int inverse) {
  if (rpower > 1)
    rpower /= 100;
  int power = rpower * 127 * (inverse == 1 ? -1 : 1);
  SetMotor(motor, power);
  return power;
}


x86 assembly (clang, -O0):
<setRMotor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1139 <setRMotor+0x29>
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
imul   $0x7f,-0x8(%rbp),%eax
mov    -0xc(%rbp),%esi
mov    $0x1,%ecx
mov    $0xffffffff,%edx
cmp    $0x1,%esi
cmove  %edx,%ecx
imul   %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <SetMotor@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setRMotor>:
cmp    $0x2,%esi
jl     112c <setRMotor+0x1c>
movslq %esi,%rax
imul   $0x51eb851f,%rax,%rsi
mov    %rsi,%rax
shr    $0x3f,%rax
sar    $0x25,%rsi
add    %eax,%esi
push   %rbx
mov    %esi,%eax
shl    $0x7,%eax
sub    %esi,%eax
mov    %eax,%ebx
neg    %ebx
cmp    $0x1,%edx
cmovne %eax,%ebx
mov    %ebx,%esi
call   1030 <SetMotor@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @setRMotor(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %5
%9 = icmp sgt i32 %8, 1
br i1 %9, label %10, label %13
10: ; preds = %3
%11 = load i32, i32* %5
%12 = sdiv i32 %11, 100
store i32 %12, i32* %5
br label %13
13: ; preds = %10, %3
%14 = load i32, i32* %5
%15 = mul nsw i32 %14, 127
%16 = load i32, i32* %6
%17 = icmp eq i32 %16, 1
%18 = zext i1 %17 to i64
%19 = select i1 %17, i32 -1, i32 1
%20 = mul nsw i32 %15, %19
store i32 %20, i32* %7
%21 = load i32, i32* %4
%22 = load i32, i32* %7
%23 = call i32 @SetMotor(i32 %21, i32 %22)
%24 = load i32, i32* %7
ret i32 %24
}

LLVM IR (-O2):
define i32 @setRMotor(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 1
%5 = sdiv i32 %1, 100
%6 = select i1 %4, i32 %5, i32 %1
%7 = mul nsw i32 %6, 127
%8 = icmp eq i32 %2, 1
%9 = sub nsw i32 0, %7
%10 = select i1 %8, i32 %9, i32 %7
%11 = tail call i32 @SetMotor(i32 %0, i32 %10)
ret i32 %10
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char **argv) {
  char someString[] = "The \"use\" of quotations causes difficulties."
                      "\\n, \\t and \\ are also special characters.";
  printf("%s", someString);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x70(%rbp),%rdi
lea    0xebf(%rip),%rsi
mov    $0x56,%edx
call   1040 <memcpy@plt>
lea    -0x70(%rbp),%rsi
lea    0xf00(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x58,%rsp
movaps 0xf25(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xf09(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xeed(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xed1(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb5(%rip),%xmm0
movaps %xmm0,(%rsp)
movabs $0x2e737265746361,%rax
mov    %rax,0x4e(%rsp)
lea    0xef1(%rip),%rdi
mov    %rsp,%rsi
call   1030 <printf@plt>
mov    0x2e6c(%rip),%rax
mov    (%rax),%eax
add    $0x58,%rsp
ret

LLVM IR (-O0):
@__const.main.someString = [86 x i8] c"The \22use\22 of quotations causes difficulties.\\n, \\t and \\ are also special characters.\00"
@.str = [3 x i8] c"%s\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [86 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [86 x i8]* %6 to i8*
%8 = getelementptr inbounds [86 x i8], [86 x i8]* %6, i64 0, i64 0
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = load i32, i32* @EXIT_SUCCESS
ret i32 %10
}

LLVM IR (-O2):
@__const.main.someString = [86 x i8] c"The \22use\22 of quotations causes difficulties.\\n, \\t and \\ are also special characters.\00"
@.str = [3 x i8] c"%s\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [86 x i8]
%4 = getelementptr inbounds [86 x i8], [86 x i8]* %3, i64 0, i64 0
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_SUCCESS
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "usage: base64 [-d]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [20 x i8] c"usage: base64 [-d]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"usage: base64 [-d]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("Usage: kbdlight [up [<percentage>]|down "
         "[<percentage>]|off|max|get|set <value>]\n");
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [81 x i8] c"Usage: kbdlight [up [<percentage>]|down [<percentage>]|off|max|get|set <value>]\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [80 x i8] c"Usage: kbdlight [up [<percentage>]|down [<percentage>]|off|max|get|set <value>]\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ test_list();
main() {
  test_list();
  test_list();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_list()
%2 = tail call i32 (...) @test_list()
ret i32 0
}
int not_just_spaces(char *line) {
  while (*line) {
    if (*line == ' ' || *line == '\n') {
      (void)*line++;
    } else {
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<not_just_spaces>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1157 <not_just_spaces+0x57>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     1135 <not_just_spaces+0x35>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    1146 <not_just_spaces+0x46>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1152 <not_just_spaces+0x52>
movl   $0x1,-0x4(%rbp)
jmp    115e <not_just_spaces+0x5e>
jmp    1108 <not_just_spaces+0x8>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<not_just_spaces>:
jmp    1114 <not_just_spaces+0x14>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%rdi
movzbl (%rdi),%eax
cmp    $0xa,%al
je     1110 <not_just_spaces+0x10>
cmp    $0x20,%al
je     1110 <not_just_spaces+0x10>
test   %al,%al
jne    1126 <not_just_spaces+0x26>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @not_just_spaces(i8* nocapture %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %7 [
i8 0, label %8
i8 32, label %5
i8 10, label %5
]
5: ; preds = %2, %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
br label %8
8: ; preds = %2, %7
%9 = phi i32 [ 1, %7 ], [ 0, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, double, double, double);
int main(int argc, char *argv[]) {
  printf("foo %f %f %f %f\n", 1.23, 12312.1, 3.1, 13.1);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf08(%rip),%rdi
movsd  0xee0(%rip),%xmm0
movsd  0xee0(%rip),%xmm1
movsd  0xee0(%rip),%xmm2
movsd  0xee0(%rip),%xmm3
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"foo %f %f %f %f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double 1.230000e+00, double 1.231210e+04, double 3.100000e+00, double 1.310000e+01)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"foo %f %f %f %f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double 1.230000e+00, double 1.231210e+04, double 3.100000e+00, double 1.310000e+01)
ret i32 0
}
/* Variables and functions */
scalar_t__ xEntire_Incomplete_Gamma_Function(long double, long double);
double Entire_Incomplete_Gamma_Function(double x, double nu) {
  return (double)xEntire_Incomplete_Gamma_Function((long double)x,
                                                   (long double)nu);
}


x86 assembly (clang, -O0):
<Entire_Incomplete_Gamma_Function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
fldl   -0x8(%rbp)
fldl   -0x10(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <xEntire_Incomplete_Gamma_Function@plt>
cvtsi2sd %rax,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Entire_Incomplete_Gamma_Function>:
sub    $0x38,%rsp
movsd  %xmm0,0x30(%rsp)
fldl   0x30(%rsp)
movsd  %xmm1,0x28(%rsp)
fldl   0x28(%rsp)
fstpt  0x10(%rsp)
fstpt  (%rsp)
call   1030 <xEntire_Incomplete_Gamma_Function@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
add    $0x38,%rsp
ret

LLVM IR (-O0):
define double @Entire_Incomplete_Gamma_Function(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = fpext double %5 to x86_fp80
%7 = load double, double* %4
%8 = fpext double %7 to x86_fp80
%9 = call i64 @xEntire_Incomplete_Gamma_Function(x86_fp80 %6, x86_fp80 %8)
%10 = sitofp i64 %9 to double
ret double %10
}

LLVM IR (-O2):
define double @Entire_Incomplete_Gamma_Function(double %0, double %1) {
%3 = fpext double %0 to x86_fp80
%4 = fpext double %1 to x86_fp80
%5 = tail call i64 @xEntire_Incomplete_Gamma_Function(x86_fp80 %3, x86_fp80 %4)
%6 = sitofp i64 %5 to double
ret double %6
}
int KAPI_ia64_GetXVersion_MAJOR() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @KAPI_ia64_GetXVersion_MAJOR() {
ret i32 0
}
/* Variables and functions */
unsigned long strtoxl(char const *, char **, int, int);
unsigned long strtoul(const char *nptr, char **endptr, int ibase) {
  return strtoxl(nptr, endptr, ibase, 1);
}


x86 assembly (clang, -O0):
<strtoul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x1,%ecx
call   1030 <strtoxl@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strtoul>:
mov    $0x1,%ecx
jmp    1030 <strtoxl@plt>

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

LLVM IR (-O2):
define i64 @strtoul(i8* %0, i8** %1, i32 %2) {
%4 = tail call i64 @strtoxl(i8* %0, i8** %1, i32 %2, i32 1)
ret i64 %4
}
/* Variables and functions */
float CCRANDOM_0_1();
float randomFloatRange(float min, float max) {
  return min + CCRANDOM_0_1() * (max - min);
}


x86 assembly (clang, -O0):
<randomFloatRange>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    $0x0,%al
call   1030 <CCRANDOM_0_1@plt>
movss  -0xc(%rbp),%xmm1
movss  -0x8(%rbp),%xmm2
subss  -0x4(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randomFloatRange>:
push   %rax
movss  %xmm1,0x4(%rsp)
movss  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <CCRANDOM_0_1@plt>
movss  (%rsp),%xmm1
movss  0x4(%rsp),%xmm2
subss  %xmm1,%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @randomFloatRange(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = call float (...) @CCRANDOM_0_1()
%7 = load float, float* %4
%8 = load float, float* %3
%9 = fsub float %7, %8
%10 = call float @llvm.fmuladd.f32(float %6, float %9, float %5)
ret float %10
}

LLVM IR (-O2):
define float @randomFloatRange(float %0, float %1) {
%3 = tail call float (...) @CCRANDOM_0_1()
%4 = fsub float %1, %0
%5 = tail call float @llvm.fmuladd.f32(float %3, float %4, float %0)
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void Output(int *x, int *y) { printf("%d %d\n", *x, *y); }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"%d %d\0A\00"
define void @Output(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* %5
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %8)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d %d\0A\00"
define void @Output(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
ret void
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ initial(char *, int);
int /*<<< orphan*/ simulate(int, char *);
int main(int argc, char **argv) {
  int noOfStd;
  char locker[2000];
  initial(locker, noOfStd);
  noOfStd = atoi(argv[1]);
  simulate(noOfStd, locker);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7f0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x7f0(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <initial@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
lea    -0x7f0(%rbp),%rsi
call   1040 <simulate@plt>
xor    %eax,%eax
add    $0x7f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x7d8,%rsp
mov    %rsi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
call   1030 <initial@plt>
mov    0x8(%rbx),%rdi
call   1050 <atoi@plt>
mov    %eax,%edi
mov    %r14,%rsi
call   1040 <simulate@plt>
xor    %eax,%eax
add    $0x7d8,%rsp
pop    %rbx
pop    %r14
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 [2000 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = getelementptr inbounds [2000 x i8], [2000 x i8]* %7, i64 0, i64 0
%9 = load i32, i32* %6
%10 = call i32 @initial(i8* %8, i32 %9)
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @atoi(i8* %13)
store i32 %14, i32* %6
%15 = load i32, i32* %6
%16 = getelementptr inbounds [2000 x i8], [2000 x i8]* %7, i64 0, i64 0
%17 = call i32 @simulate(i32 %15, i8* %16)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [2000 x i8]
%4 = getelementptr inbounds [2000 x i8], [2000 x i8]* %3, i64 0, i64 0
%5 = call i32 @initial(i8* %4, i32 undef)
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = call i32 @atoi(i8* %7)
%9 = call i32 @simulate(i32 %8, i8* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int i;
  int j;
  i = 0;
  j = 1;
  while (i < 5) {
    i = i + j;
    if (1) {
      j = 2;
    } else {
      j = 1;
    }
    assert(j == 2);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    115d <main+0x4d>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
%2 = tail call i32 @assert(i32 1)
%3 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ popNarray(char *, unsigned int);
void popreal8array(double *x, int n) {
  popNarray((char *)x, (unsigned int)(n * 8));
}


x86 assembly (clang, -O0):
<popreal8array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
shl    $0x3,%esi
call   1030 <popNarray@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<popreal8array>:
shl    $0x3,%esi
jmp    1030 <popNarray@plt>

LLVM IR (-O0):
define void @popreal8array(double* %0, i32 %1) {
%3 = alloca double*
%4 = alloca i32
store double* %0, double** %3
store i32 %1, i32* %4
%5 = load double*, double** %3
%6 = bitcast double* %5 to i8*
%7 = load i32, i32* %4
%8 = mul nsw i32 %7, 8
%9 = call i32 @popNarray(i8* %6, i32 %8)
ret void
}

LLVM IR (-O2):
define void @popreal8array(double* %0, i32 %1) {
%3 = bitcast double* %0 to i8*
%4 = shl nsw i32 %1, 3
%5 = tail call i32 @popNarray(i8* %3, i32 %4)
ret void
}
/* Variables and functions */
int foo(int);
int bar() { return foo(8) + 4; }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    $0x8,%edi
call   1030 <foo@plt>
add    $0x4,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
push   %rax
mov    $0x8,%edi
call   1030 <foo@plt>
add    $0x4,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @bar() {
%1 = call i32 @foo(i32 8)
%2 = add nsw i32 %1, 4
ret i32 %2
}

LLVM IR (-O2):
define i32 @bar() {
%1 = tail call i32 @foo(i32 8)
%2 = add nsw i32 %1, 4
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
void QueryModualName(char szName[]) {
  strcpy(szName, "./terasic_pcie_qsys.so");
}


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"./terasic_pcie_qsys.so\00"
define void @QueryModualName(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strcpy(i8* %3, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"./terasic_pcie_qsys.so\00"
define void @QueryModualName(i8* %0) {
%2 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
void *SDL_memcpy(void *, void const *, size_t);
__attribute__((always_)) void *SDL_memcpy4(void *dst, const void *src,
                                           size_t dwords) {
  return SDL_memcpy(dst, src, dwords * 4);
}


x86 assembly (clang, -O0):
<SDL_memcpy4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
shl    $0x2,%rdx
call   1030 <SDL_memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SDL_memcpy4>:
shl    $0x2,%rdx
jmp    1030 <SDL_memcpy@plt>

LLVM IR (-O0):
define i8* @SDL_memcpy4(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = mul i64 %9, 4
%11 = call i8* @SDL_memcpy(i8* %7, i8* %8, i64 %10)
ret i8* %11
}

LLVM IR (-O2):
define i8* @SDL_memcpy4(i8* %0, i8* %1, i64 %2) {
%4 = shl i64 %2, 2
%5 = tail call i8* @SDL_memcpy(i8* %0, i8* %1, i64 %4)
ret i8* %5
}
int cmp(const void *e1, const void *e2) {
  return (((*(const int *)e2) & 0x000f0000) >> (16)) -
         (((*(const int *)e1) & 0x000f0000) >> (16));
}


x86 assembly (clang, -O0):
<cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
and    $0xf0000,%eax
sar    $0x10,%eax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%ecx
and    $0xf0000,%ecx
sar    $0x10,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp>:
movzwl 0x2(%rsi),%eax
and    $0xf,%eax
movzwl 0x2(%rdi),%ecx
and    $0xf,%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = and i32 %7, 983040
%9 = ashr i32 %8, 16
%10 = load i8*, i8** %3
%11 = bitcast i8* %10 to i32*
%12 = load i32, i32* %11
%13 = and i32 %12, 983040
%14 = ashr i32 %13, 16
%15 = sub nsw i32 %9, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = load i32, i32* %3
%5 = lshr i32 %4, 16
%6 = and i32 %5, 15
%7 = bitcast i8* %0 to i32*
%8 = load i32, i32* %7
%9 = lshr i32 %8, 16
%10 = and i32 %9, 15
%11 = sub nsw i32 %6, %10
ret i32 %11
}
/* Type definitions */
struct fb {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fb_putPixel_16(struct fb *, int, int, int);
void fb_drawPixel_rgb555(struct fb *self, int x, int y, int r, int g, int b) {
  fb_putPixel_16(self, x, y,
                 (((r >> 3) & 31) << 10) | (((g >> 3) & 31) << 5) |
                     (((b >> 3) & 31) << 0));
}


x86 assembly (clang, -O0):
<fb_drawPixel_rgb555>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
sar    $0x3,%ecx
and    $0x1f,%ecx
shl    $0xa,%ecx
mov    -0x18(%rbp),%eax
sar    $0x3,%eax
and    $0x1f,%eax
shl    $0x5,%eax
or     %eax,%ecx
mov    -0x1c(%rbp),%eax
sar    $0x3,%eax
and    $0x1f,%eax
shl    $0x0,%eax
or     %eax,%ecx
call   1030 <fb_putPixel_16@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fb_drawPixel_rgb555>:
shl    $0x7,%ecx
and    $0x7c00,%ecx
and    $0xf8,%r8d
lea    (%rcx,%r8,4),%ecx
shr    $0x3,%r9d
and    $0x1f,%r9d
or     %r9d,%ecx
jmp    1030 <fb_putPixel_16@plt>

LLVM IR (-O0):
%struct.fb = type { i32 }
define void @fb_drawPixel_rgb555(%struct.fb* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca %struct.fb*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store %struct.fb* %0, %struct.fb** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load %struct.fb*, %struct.fb** %7
%14 = load i32, i32* %8
%15 = load i32, i32* %9
%16 = load i32, i32* %10
%17 = ashr i32 %16, 3
%18 = and i32 %17, 31
%19 = shl i32 %18, 10
%20 = load i32, i32* %11
%21 = ashr i32 %20, 3
%22 = and i32 %21, 31
%23 = shl i32 %22, 5
%24 = or i32 %19, %23
%25 = load i32, i32* %12
%26 = ashr i32 %25, 3
%27 = and i32 %26, 31
%28 = shl i32 %27, 0
%29 = or i32 %24, %28
%30 = call i32 @fb_putPixel_16(%struct.fb* %13, i32 %14, i32 %15, i32 %29)
ret void
}

LLVM IR (-O2):
%struct.fb = type { i32 }
define void @fb_drawPixel_rgb555(%struct.fb* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = shl i32 %3, 7
%8 = and i32 %7, 31744
%9 = shl i32 %4, 2
%10 = and i32 %9, 992
%11 = or i32 %10, %8
%12 = lshr i32 %5, 3
%13 = and i32 %12, 31
%14 = or i32 %11, %13
%15 = tail call i32 @fb_putPixel_16(%struct.fb* %0, i32 %1, i32 %2, i32 %14)
ret void
}
/* Type definitions */
typedef enum Countries { ____Placeholder_Countries } Countries;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  enum Countries { BRASIL, ITALIA, PORTUGAL, ALEMANHA };
  printf("%d\n", BRASIL);
  enum Countries e = PORTUGAL;
  printf("%d\n", e);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
ret i32 0
}
const char *__malidrv_build_info(void) {
  return "malidrv:  CONFIG=rockchip-rk3x USING_OS_MEMORY=0 API_VERSION=14 "
         "REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Fri "
         "Feb 14 19:27:57 CET 2014 BUILD=RELEASE CPU= USING_UMP=1 "
         "USING_MALI200=0 USING_MALI400=4 USING_MALI400_L2_CACHE=1 USING_GP2=0 "
         "KDIR= MALI_PLATFORM_FILE=platform/rockchip/mali_platform.c "
         "OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=6 USING_PROFILING=0 "
         "USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=";
}


x86 assembly (clang, -O0):
<__malidrv_build_info>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [419 x i8] c"malidrv: CONFIG=rockchip-rk3x USING_OS_MEMORY=0 API_VERSION=14 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Fri Feb 14 19:27:57 CET 2014 BUILD=RELEASE CPU= USING_UMP=1 USING_MALI200=0 USING_MALI400=4 USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/rockchip/mali_platform.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=6 USING_PROFILING=0 USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([419 x i8], [419 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [419 x i8] c"malidrv: CONFIG=rockchip-rk3x USING_OS_MEMORY=0 API_VERSION=14 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Fri Feb 14 19:27:57 CET 2014 BUILD=RELEASE CPU= USING_UMP=1 USING_MALI200=0 USING_MALI400=4 USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/rockchip/mali_platform.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=6 USING_PROFILING=0 USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([419 x i8], [419 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x38() {
  Assert_real((isbdigit(56) == 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_isbdigit.c",
              285, ("isbdigit should be 0 for 8"));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0x38>:
push   %rax
mov    $0x38,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x11d,%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_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for 8\00"
define void @t_isbdigit_0x38() {
%1 = call i64 @isbdigit(i32 56)
%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 285, i8* getelementptr inbounds ([27 x i8], [27 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_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for 8\00"
define void @t_isbdigit_0x38() {
%1 = tail call i64 @isbdigit(i32 56)
%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 285, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int test_imm_5Cuint16_mem(unsigned short *val) {
  return ((*val) & (-0x5C << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_5Cuint16_mem>:
movzwl (%rdi),%eax
test   $0xffa4,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_5Cuint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, -92
%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_5Cuint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -92
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
char *compressString(char *str) {}


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

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

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

LLVM IR (-O2):
define noalias i8* @compressString(i8* nocapture readnone %0) {
ret i8* undef
}
void gtk_dialog_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_dialog_new() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void __attribute__((noreturn)) usage(const char *filepath) {
  fprintf(stderr,
          "\nUsage: %s [options] hostname\n"
          "\nwhere options are:\n"
          "  -4:   only IPv4\n"
          "  -6:   only IPv6\n"
          "  -h:   show this message\n"
          "  -l N: send N bytes at a time\n"
          "  -n:   no payload on tstamp\n"
          "  -r:   use raw\n"
          "  -R:   use raw (IP_HDRINCL)\n"
          "  -p N: connect to port N\n"
          "  -u:   use udp\n",
          filepath);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [260 x i8] c"\0AUsage: %s [options] hostname\0A\0Awhere options are:\0A -4: only IPv4\0A -6: only IPv6\0A -h: show this message\0A -l N: send N bytes at a time\0A -n: no payload on tstamp\0A -r: use raw\0A -R: use raw (IP_HDRINCL)\0A -p N: connect to port N\0A -u: use udp\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([260 x i8], [260 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [260 x i8] c"\0AUsage: %s [options] hostname\0A\0Awhere options are:\0A -4: only IPv4\0A -6: only IPv6\0A -h: show this message\0A -l N: send N bytes at a time\0A -n: no payload on tstamp\0A -r: use raw\0A -R: use raw (IP_HDRINCL)\0A -p N: connect to port N\0A -u: use udp\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([260 x i8], [260 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ clrtoeol();
int /*<<< orphan*/ move(int, int /*<<< orphan*/);
int /*<<< orphan*/ mvprintw(int, int /*<<< orphan*/, char const *);
void printInfo(const char *info) {
  move(8, 0);
  clrtoeol();
  mvprintw(8, 0, info);
}


x86 assembly (clang, -O0):
<printInfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x8,%edi
xor    %esi,%esi
call   1050 <move@plt>
mov    $0x0,%al
call   1030 <clrtoeol@plt>
mov    -0x8(%rbp),%rdx
mov    $0x8,%edi
xor    %esi,%esi
call   1040 <mvprintw@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printInfo>:
push   %rbx
mov    %rdi,%rbx
mov    $0x8,%edi
xor    %esi,%esi
call   1050 <move@plt>
xor    %eax,%eax
call   1030 <clrtoeol@plt>
mov    $0x8,%edi
xor    %esi,%esi
mov    %rbx,%rdx
pop    %rbx
jmp    1040 <mvprintw@plt>

LLVM IR (-O0):
define void @printInfo(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @move(i32 8, i32 0)
%4 = call i32 (...) @clrtoeol()
%5 = load i8*, i8** %2
%6 = call i32 @mvprintw(i32 8, i32 0, i8* %5)
ret void
}

LLVM IR (-O2):
define void @printInfo(i8* %0) {
%2 = tail call i32 @move(i32 8, i32 0)
%3 = tail call i32 (...) @clrtoeol()
%4 = tail call i32 @mvprintw(i32 8, i32 0, i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void *memclr(void *addr, size_t n) {
  uint8_t *tmp = (uint8_t *)addr;
  while (n-- > 0)
    *tmp++ = 0;
  return addr;
}


x86 assembly (clang, -O0):
<memclr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x10(%rbp)
cmp    $0x0,%rax
jbe    1147 <memclr+0x47>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x18(%rbp)
movl   $0x0,(%rax)
jmp    1114 <memclr+0x14>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<memclr>:
push   %rbx
mov    %rdi,%rbx
test   %rsi,%rsi
je     112a <memclr+0x1a>
mov    %rsi,%rdx
shl    $0x2,%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @memclr(i8* returned writeonly %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = shl nuw i64 %1, 2
br label %6
6: ; preds = %4, %2
ret i8* %0
}
/* Variables and functions */
int __set_memory(unsigned long, int, unsigned long);
int set_memory_x(unsigned long addr, int numpages) {
  return __set_memory(addr, numpages, 8UL);
}


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

x86 assembly (clang, -O2):
<set_memory_x>:
mov    $0x8,%edx
jmp    1030 <__set_memory@plt>

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

LLVM IR (-O2):
define i32 @set_memory_x(i64 %0, i32 %1) {
%3 = tail call i32 @__set_memory(i64 %0, i32 %1, i64 8)
ret i32 %3
}
void noop_c_function(void) { return; }


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

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

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

LLVM IR (-O2):
define void @noop_c_function() {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned short attributes;
};
typedef TYPE_1__ XCharStruct;

/* Variables and functions */
void set_XCharStruct_attributes(void *_p, unsigned short _v) {
  ((XCharStruct *)_p)->attributes = (unsigned short)_v;
}


x86 assembly (clang, -O0):
<set_XCharStruct_attributes>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0xa(%rbp),%cx
mov    -0x8(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XCharStruct_attributes>:
mov    %si,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i16 }
define void @set_XCharStruct_attributes(i8* %0, i16 zeroext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i16 %5, i16* %8
ret void
}

LLVM IR (-O2):
define void @set_XCharStruct_attributes(i8* nocapture writeonly %0, i16 zeroext %1) {
%3 = bitcast i8* %0 to i16*
store i16 %1, i16* %3
ret void
}
double ls_costN_nm4_twice(double x) { return x + x; }


x86 assembly (clang, -O0):
<ls_costN_nm4_twice>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ls_costN_nm4_twice>:
addsd  %xmm0,%xmm0
ret

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

LLVM IR (-O2):
define double @ls_costN_nm4_twice(double %0) {
%2 = fadd double %0, %0
ret double %2
}