xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ function1();
int main(int argc, char **argv) {
  function1();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @function1()
ret i32 0
}
/* Variables and functions */
int rand();
void generateRandomString(char *ptr_str, unsigned arr_size) {
  char *ptr_str_tmp = ptr_str;
  while (arr_size) {
    *ptr_str_tmp = (rand() % 26) + 65;
    ptr_str_tmp++;
    arr_size--;
  }
}


x86 assembly (clang, -O0):
<generateRandomString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1165 <generateRandomString+0x55>
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x1a,%ecx
cltd
idiv   %ecx
add    $0x41,%edx
mov    %dl,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <generateRandomString+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generateRandomString>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
je     1166 <generateRandomString+0x56>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0x4ec4ec4f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rdx,%rdx,4),%edx
add    %ecx,%edx
sub    %edx,%eax
add    $0x41,%al
mov    %al,(%r14,%rbx,1)
add    $0x1,%rbx
cmp    %ebx,%r15d
jne    1130 <generateRandomString+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @generateRandomString(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %14, label %4
4: ; preds = %2, %4
%5 = phi i8* [ %11, %4 ], [ %0, %2 ]
%6 = phi i32 [ %12, %4 ], [ %1, %2 ]
%7 = tail call i32 (...) @rand()
%8 = srem i32 %7, 26
%9 = trunc i32 %8 to i8
%10 = add nsw i8 %9, 65
store i8 %10, i8* %5
%11 = getelementptr inbounds i8, i8* %5, i64 1
%12 = add i32 %6, -1
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fixedArray();
int /*<<< orphan*/ variableLengthArray(int);
int main(void) {
  fixedArray();
  variableLengthArray(10);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <fixedArray@plt>
mov    $0xa,%edi
call   1040 <variableLengthArray@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @fixedArray()
%2 = call i32 @variableLengthArray(i32 10)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @fixedArray()
%2 = tail call i32 @variableLengthArray(i32 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ putc(char const);
void puts(const char *s) {
  while (*s) {
    putc(*s);
    if (*s == '\n')
      putc('\r');
    s++;
  }
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1160 <puts+0x50>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <putc@plt>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    114f <puts+0x3f>
mov    $0xd,%edi
call   1030 <putc@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <puts+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1145 <puts+0x35>
mov    %rdi,%rbx
add    $0x1,%rbx
jmp    112b <puts+0x1b>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
je     1145 <puts+0x35>
movsbl %al,%edi
call   1030 <putc@plt>
cmpb   $0xa,-0x1(%rbx)
jne    1120 <puts+0x10>
mov    $0xd,%edi
call   1030 <putc@plt>
jmp    1120 <puts+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %12
%5 = phi i8 [ %14, %12 ], [ %2, %1 ]
%6 = phi i8* [ %13, %12 ], [ %0, %1 ]
%7 = tail call i32 @putc(i8 signext %5)
%8 = load i8, i8* %6
%9 = icmp eq i8 %8, 10
br i1 %9, label %10, label %12
10: ; preds = %4
%11 = tail call i32 @putc(i8 signext 13)
br label %12
12: ; preds = %10, %4
%13 = getelementptr inbounds i8, i8* %6, i64 1
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %4
16: ; preds = %12, %1
ret void
}
void test3() {
  switch (0) {
  case 4:
    if (0) {
    case 6:;
    }
  default:;
  }
}


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

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

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

LLVM IR (-O2):
define void @test3() {
ret void
}
int charToHex(char c) {
  if (c >= '0' && c <= '9') {
    return c - '0';
  } else {
    return c - 'a' + 10;
  }
}


x86 assembly (clang, -O0):
<charToHex>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1133 <charToHex+0x33>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     1133 <charToHex+0x33>
movsbl -0x5(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    1140 <charToHex+0x40>
movsbl -0x5(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<charToHex>:
lea    -0x30(%rdi),%ecx
lea    -0x57(%rdi),%edx
lea    -0x30(%rdi),%eax
cmp    $0xa,%cl
cmovae %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @charToHex(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add i8 %0, -48
%4 = icmp ult i8 %3, 10
%5 = select i1 %4, i32 -48, i32 -87
%6 = add nsw i32 %5, %2
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ gen_swap();
int /*<<< orphan*/ gen_udiv();
void gen_umod(void) {
  gen_udiv();
  gen_swap();
}


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

x86 assembly (clang, -O2):
<gen_umod>:
push   %rax
xor    %eax,%eax
call   1030 <gen_udiv@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <gen_swap@plt>

LLVM IR (-O0):
define void @gen_umod() {
%1 = call i32 (...) @gen_udiv()
%2 = call i32 (...) @gen_swap()
ret void
}

LLVM IR (-O2):
define void @gen_umod() {
%1 = tail call i32 (...) @gen_udiv()
%2 = tail call i32 (...) @gen_swap()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ merge(int);
int /*<<< orphan*/ push(int);
void Move(int d) {
  push(d);
  merge(d);
  push(d);
}


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

x86 assembly (clang, -O2):
<Move>:
push   %rbx
mov    %edi,%ebx
call   1040 <push@plt>
mov    %ebx,%edi
call   1030 <merge@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <push@plt>

LLVM IR (-O0):
define void @Move(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @push(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @merge(i32 %5)
%7 = load i32, i32* %2
%8 = call i32 @push(i32 %7)
ret void
}

LLVM IR (-O2):
define void @Move(i32 %0) {
%2 = tail call i32 @push(i32 %0)
%3 = tail call i32 @merge(i32 %0)
%4 = tail call i32 @push(i32 %0)
ret void
}
void CFGMR3GetValueType(void) {}


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

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

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

LLVM IR (-O2):
define void @CFGMR3GetValueType() {
ret void
}
int compare(const void *a, const void *b) { return *(char *)a - *(char *)b; }


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

x86 assembly (clang, -O2):
<compare>:
movsbl (%rdi),%eax
movsbl (%rsi),%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @compare(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = sext i8 %3 to i32
%5 = load i8, i8* %1
%6 = sext i8 %5 to i32
%7 = sub nsw i32 %4, %6
ret i32 %7
}
int isUpper(const int c) { return c >= 'a' && c <= 'z'; }


x86 assembly (clang, -O0):
<isUpper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x61,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <isUpper+0x20>
cmpl   $0x7a,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isUpper>:
add    $0xffffff9f,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @isUpper(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *, int, int);
void btexit(int errno, char *file, int line) {
  printf("exit at %s : %d with error number : %d\n", file, line, errno);
  exit(errno);
}


x86 assembly (clang, -O0):
<btexit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x4(%rbp),%ecx
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<btexit>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
mov    %ebx,%ecx
call   1030 <printf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"exit at %s : %d with error number : %d\0A\00"
define void @btexit(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %8, i32 %9)
%11 = load i32, i32* %4
%12 = call i32 @exit(i32 %11)
unreachable
}

LLVM IR (-O2):
@.str = [40 x i8] c"exit at %s : %d with error number : %d\0A\00"
define void @btexit(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %2, i32 %0)
%5 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x43() {
  Assert_real((islower(67) == 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_islower.c",
              340, ("islower should be 0 for C"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x43>:
push   %rax
mov    $0x43,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x154,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for C\00"
define void @t_islower_0x43() {
%1 = tail call i64 @islower(i32 67)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 340, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
void printUsage() {
  fprintf(stdout, "Usage: yes [STRING]\n   or: yes [OPTION]\nRepeatedly output "
                  "a line with all specified STRING(s), or `y'.\n");
  exit(EXIT_SUCCESS);
}


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

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

LLVM IR (-O0):
@stdout = global i32 0
@.str = [104 x i8] c"Usage: yes [STRING]\0A or: yes [OPTION]\0ARepeatedly output a line with all specified STRING(s), or `y'.\0A\00"
@EXIT_SUCCESS = global i32 0
define void @printUsage() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([104 x i8], [104 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [104 x i8] c"Usage: yes [STRING]\0A or: yes [OPTION]\0ARepeatedly output a line with all specified STRING(s), or `y'.\0A\00"
@EXIT_SUCCESS = global i32 0
define void @printUsage() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([104 x i8], [104 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void vt100_erase_fwdeol(void) {
  printf("\x1B[K");
  fflush(stdout);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"\1B[K\00"
@stdout = global i32 0
define void @vt100_erase_fwdeol() {
%1 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = call i32 @fflush(i32 %2)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"\1B[K\00"
@stdout = global i32 0
define void @vt100_erase_fwdeol() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = tail call i32 @fflush(i32 %2)
ret void
}
/* Type definitions */
struct semaphore {
  int dummy;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int __futex_down(struct semaphore *, int /*<<< orphan*/ *);
int futex_trydown(struct semaphore *sem) {
  int32_t resource_cpy;
  return __futex_down(sem, &resource_cpy);
}


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

x86 assembly (clang, -O2):
<futex_trydown>:
push   %rax
lea    0x4(%rsp),%rsi
call   1030 <__futex_down@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.semaphore = type { i32 }
define i32 @futex_trydown(%struct.semaphore* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @__futex_down(%struct.semaphore* %0, i32* %2)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int write_i2c_reg(int, int, int /*<<< orphan*/);
int piups_set_vaux1conv(int file_i2c, uint16_t vaux1conv) {
  return write_i2c_reg(file_i2c, 0x54, vaux1conv);
}


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

x86 assembly (clang, -O2):
<piups_set_vaux1conv>:
mov    %esi,%edx
mov    $0x54,%esi
jmp    1030 <write_i2c_reg@plt>

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

LLVM IR (-O2):
define i32 @piups_set_vaux1conv(i32 %0, i32 %1) {
%3 = tail call i32 @write_i2c_reg(i32 %0, i32 84, i32 %1)
ret i32 %3
}
/* Variables and functions */
char *strpbrk(const char *s, const char *accept) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8* @strpbrk(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i8* null
}
int execute_alarm() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_alarm() {
ret i32 0
}
/* Variables and functions */
int getpid();
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char **argv) {
  volatile int x = 1;
  printf("hello world, my pid is %d\n", getpid());
  while (x)
    ;
  printf("my work here is done\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%esi
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
cmp    $0x0,%eax
je     1165 <main+0x45>
jmp    1154 <main+0x34>
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x1,0x4(%rsp)
xor    %eax,%eax
call   1040 <getpid@plt>
lea    0xeb9(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
cmpl   $0x0,0x4(%rsp)
jne    1150 <main+0x20>
lea    0xebd(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"hello world, my pid is %d\0A\00"
@.str.1 = [22 x i8] c"my work here is done\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store volatile i32 1, i32* %6
%7 = call i32 (...) @getpid()
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %9
9: ; preds = %12, %2
%10 = load volatile i32, i32* %6
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %9
br label %9
13: ; preds = %9
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"hello world, my pid is %d\0A\00"
@str = [21 x i8] c"my work here is done\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store volatile i32 1, i32* %3
%5 = tail call i32 (...) @getpid()
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %5)
br label %7
7: ; preds = %7, %2
%8 = load volatile i32, i32* %3
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %7
10: ; preds = %7
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __NR_futex;
int syscall(int /*<<< orphan*/, int *, int, int, struct timespec const *, int *,
            int);
int glib_linux_futex(int *uaddr, int op, int val,
                     const struct timespec *timeout, int *uaddr2, int val3) {
  return syscall(__NR_futex, uaddr, op, val, timeout, uaddr2, val3);
}


x86 assembly (clang, -O0):
<glib_linux_futex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
mov    -0x24(%rbp),%eax
mov    %eax,(%rsp)
call   1030 <syscall@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glib_linux_futex>:
push   %rax
mov    %r8,%rax
mov    %rcx,%r8
mov    %edx,%ecx
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ec3(%rip),%rdi
mov    (%rdi),%edi
mov    %r9d,(%rsp)
mov    %rax,%r9
call   1030 <syscall@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
@__NR_futex = global i32 0
define i32 @glib_linux_futex(i32* %0, i32 %1, i32 %2, %struct.timespec* %3, i32* %4, i32 %5) {
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca %struct.timespec*
%11 = alloca i32*
%12 = alloca i32
store i32* %0, i32** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store %struct.timespec* %3, %struct.timespec** %10
store i32* %4, i32** %11
store i32 %5, i32* %12
%13 = load i32, i32* @__NR_futex
%14 = load i32*, i32** %7
%15 = load i32, i32* %8
%16 = load i32, i32* %9
%17 = load %struct.timespec*, %struct.timespec** %10
%18 = load i32*, i32** %11
%19 = load i32, i32* %12
%20 = call i32 @syscall(i32 %13, i32* %14, i32 %15, i32 %16, %struct.timespec* %17, i32* %18, i32 %19)
ret i32 %20
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@__NR_futex = global i32 0
define i32 @glib_linux_futex(i32* %0, i32 %1, i32 %2, %struct.timespec* %3, i32* %4, i32 %5) {
%7 = load i32, i32* @__NR_futex
%8 = tail call i32 @syscall(i32 %7, i32* %0, i32 %1, i32 %2, %struct.timespec* %3, i32* %4, i32 %5)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main() {
  int a, b, c, volume;
  scanf("%d%d%d", &a, &b, &c);
  printf("%d", volume = a * b * c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
imul   -0xc(%rbp),%esi
imul   -0x10(%rbp),%esi
mov    %esi,-0x14(%rbp)
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
mov    0x10(%rsp),%esi
imul   0x14(%rsp),%esi
imul   0xc(%rsp),%esi
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d%d%d\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = mul nsw i32 %9, %8
%11 = load i32, i32* %3
%12 = mul nsw i32 %10, %11
%13 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %12)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ config_timer(int /*<<< orphan*/, int, int /*<<< orphan*/,
                                int /*<<< orphan*/, int);
int main() {
  config_timer(0, 1, 0, 0, 3000);
  while (1)
    ;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %ecx,%ecx
mov    $0x1,%esi
mov    $0xbb8,%r8d
mov    %ecx,%edi
mov    %ecx,%edx
call   1030 <config_timer@plt>
jmp    1135 <main+0x25>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
mov    $0x1,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0xbb8,%r8d
call   1030 <config_timer@plt>
nopw   0x0(%rax,%rax,1)
jmp    1130 <main+0x20>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @config_timer(i32 0, i32 1, i32 0, i32 0, i32 3000)
br label %3
3: ; preds = %0, %3
br label %3
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @config_timer(i32 0, i32 1, i32 0, i32 0, i32 3000)
br label %2
2: ; preds = %0, %2
br label %2
}
double cubicEaseInd(double p) { return p * p * p; }


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

x86 assembly (clang, -O2):
<cubicEaseInd>:
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @cubicEaseInd(double %0) {
%2 = fmul double %0, %0
%3 = fmul double %2, %0
ret double %3
}
int tegra_disable_wake_source(int wake) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @tegra_disable_wake_source(i32 %0) {
ret i32 0
}
int HelpItem124(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem124() {
ret i32 0
}
int func9() {
#pragma critTer : 34 :../../ test / resources / functionNumber.c:
  return 0;
#pragma critTer : 35 :../../ test / resources / functionNumber.c:
}


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

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

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

LLVM IR (-O2):
define i32 @func9() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ b;
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  float a;
  double b;
  printf("%ld %ld", sizeof(a), sizeof(b));
}


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"%ld %ld\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 4, i32 8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ push(int /*<<< orphan*/);
int /*<<< orphan*/ read_imm();
void pushimm_handler(void) { push(read_imm()); }


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

x86 assembly (clang, -O2):
<pushimm_handler>:
push   %rax
xor    %eax,%eax
call   1030 <read_imm@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <push@plt>

LLVM IR (-O0):
define void @pushimm_handler() {
%1 = call i32 (...) @read_imm()
%2 = call i32 @push(i32 %1)
ret void
}

LLVM IR (-O2):
define void @pushimm_handler() {
%1 = tail call i32 (...) @read_imm()
%2 = tail call i32 @push(i32 %1)
ret void
}
void ms_noCallback(int b, int x, int y) {}


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

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

LLVM IR (-O0):
define void @ms_noCallback(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
define void @ms_noCallback(i32 %0, i32 %1, i32 %2) {
ret void
}
int test_imm_0Fuint32_reg(unsigned int val) {
  return ((val) & (0x0F << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_0Fuint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0xf,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_0Fuint32_reg>:
test   $0xf,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_0Fuint32_reg(i32 %0) {
%2 = and i32 %0, 15
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int socketcall_cp(int (*)(int, struct sockaddr *, int /*<<< orphan*/ *), int,
                  struct sockaddr *, int /*<<< orphan*/ *, int /*<<< orphan*/,
                  int /*<<< orphan*/, int /*<<< orphan*/);
int accept(int fd, struct sockaddr *restrict addr, socklen_t *restrict len) {
  return socketcall_cp(accept, fd, addr, len, 0, 0, 0);
}


x86 assembly (clang, -O0):
<accept>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    0x2eab(%rip),%rdi
xor    %r9d,%r9d
mov    %r9d,%r8d
movl   $0x0,(%rsp)
call   1030 <socketcall_cp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<accept>:
push   %rax
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,%esi
movl   $0x0,(%rsp)
mov    0x2eb9(%rip),%rdi
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <socketcall_cp@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
define i32 @accept(i32 %0, %struct.sockaddr* noalias %1, i32* noalias %2) {
%4 = alloca i32
%5 = alloca %struct.sockaddr*
%6 = alloca i32*
store i32 %0, i32* %4
store %struct.sockaddr* %1, %struct.sockaddr** %5
store i32* %2, i32** %6
%7 = load i32, i32* %4
%8 = load %struct.sockaddr*, %struct.sockaddr** %5
%9 = load i32*, i32** %6
%10 = call i32 @socketcall_cp(i32 (i32, %struct.sockaddr*, i32*)* @accept, i32 %7, %struct.sockaddr* %8, i32* %9, i32 0, i32 0, i32 0)
ret i32 %10
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
define i32 @accept(i32 %0, %struct.sockaddr* noalias %1, i32* noalias %2) {
%4 = tail call i32 @socketcall_cp(i32 (i32, %struct.sockaddr*, i32*)* @accept, i32 %0, %struct.sockaddr* %1, i32* %2, i32 0, i32 0, i32 0)
ret i32 %4
}
void av_opt_set_dict() {}


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

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

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

LLVM IR (-O2):
define void @av_opt_set_dict() {
ret void
}
void printArray(void *array) {}


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

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

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

LLVM IR (-O2):
define void @printArray(i8* nocapture %0) {
ret void
}
/* Variables and functions */
scalar_t__ strncasecmp(char *, char *, int);
void strncasecmp_constant_and_var_0() {
  char *x = "abc";
  if (strncasecmp(x, "Abc", 3) != 0)
    (void)*(char *)0;
}


x86 assembly (clang, -O0):
<strncasecmp_constant_and_var_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed6(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncasecmp@plt>
cmp    $0x0,%rax
je     1142 <strncasecmp_constant_and_var_0+0x32>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"abc\00"
@.str.1 = [4 x i8] c"Abc\00"
define void @strncasecmp_constant_and_var_0() {
%1 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = call i64 @strncasecmp(i8* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = load i8, i8* null
br label %7
7: ; preds = %5, %0
ret void
}

LLVM IR (-O2):
define void @strncasecmp_constant_and_var_0() {
ret void
}
int fun399() { return 399; }


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

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

LLVM IR (-O0):
define i32 @fun399() {
ret i32 399
}

LLVM IR (-O2):
define i32 @fun399() {
ret i32 399
}
/* Variables and functions */
float sqrt(float);
float Float_sqrt(float x) { return sqrt(x); }


x86 assembly (clang, -O0):
<Float_sqrt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Float_sqrt>:
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     111d <Float_sqrt+0xd>
sqrtss %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

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

LLVM IR (-O2):
define float @Float_sqrt(float %0) {
%2 = tail call float @sqrt(float %0)
ret float %2
}
void arch_decomp_setup(void) { (*(volatile unsigned int *)0xc11084c8) = 0x185; }


x86 assembly (clang, -O0):
<arch_decomp_setup>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc11084c8,%eax
movl   $0x185,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<arch_decomp_setup>:
mov    $0xc11084c8,%eax
movl   $0x185,(%rax)
ret

LLVM IR (-O0):
define void @arch_decomp_setup() {
store volatile i32 389, i32* inttoptr (i64 3239085256 to i32*)
ret void
}

LLVM IR (-O2):
define void @arch_decomp_setup() {
store volatile i32 389, i32* inttoptr (i64 3239085256 to i32*)
ret void
}
/* Variables and functions */
double log(double);
double log10(double n) { return log(n) / 2.302585092994046; }


x86 assembly (clang, -O0):
<log10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <log@plt>
movsd  0xed1(%rip),%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log10>:
push   %rax
call   1030 <log@plt>
divsd  0xee2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @log10(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @log(double %3)
%5 = fdiv double %4, 0x40026BB1BBB55516
ret double %5
}

LLVM IR (-O2):
define double @log10(double %0) {
%2 = tail call double @log(double %0)
%3 = fdiv double %2, 0x40026BB1BBB55516
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ test_volatile_load_store();
int /*<<< orphan*/ test_volatile_operations();
int main(void) {
  test_volatile_operations();
  test_volatile_load_store();
  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_volatile_operations@plt>
mov    $0x0,%al
call   1040 <test_volatile_load_store@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_volatile_operations@plt>
xor    %eax,%eax
call   1040 <test_volatile_load_store@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_volatile_operations()
%3 = call i32 (...) @test_volatile_load_store()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_volatile_operations()
%2 = tail call i32 (...) @test_volatile_load_store()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ pic32_enter_serial_execution_mode();
int /*<<< orphan*/ pic32_pe_load();
int /*<<< orphan*/ pic32_program_verify();
void pic32_program_begin(void) {
  pic32_program_verify();
  pic32_enter_serial_execution_mode();
  pic32_pe_load();
}


x86 assembly (clang, -O0):
<pic32_program_begin>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <pic32_program_verify@plt>
mov    $0x0,%al
call   1040 <pic32_enter_serial_execution_mode@plt>
mov    $0x0,%al
call   1050 <pic32_pe_load@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pic32_program_begin>:
push   %rax
xor    %eax,%eax
call   1030 <pic32_program_verify@plt>
xor    %eax,%eax
call   1040 <pic32_enter_serial_execution_mode@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <pic32_pe_load@plt>

LLVM IR (-O0):
define void @pic32_program_begin() {
%1 = call i32 (...) @pic32_program_verify()
%2 = call i32 (...) @pic32_enter_serial_execution_mode()
%3 = call i32 (...) @pic32_pe_load()
ret void
}

LLVM IR (-O2):
define void @pic32_program_begin() {
%1 = tail call i32 (...) @pic32_program_verify()
%2 = tail call i32 (...) @pic32_enter_serial_execution_mode()
%3 = tail call i32 (...) @pic32_pe_load()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ default_isr();
__attribute__((weak)) void DCDC_Handler() { default_isr(); }


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

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

LLVM IR (-O0):
define weak void @DCDC_Handler() {
%1 = call i32 (...) @default_isr()
ret void
}

LLVM IR (-O2):
define weak void @DCDC_Handler() {
%1 = tail call i32 (...) @default_isr()
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int c;
  int x, y;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  c = 0;
  while (x >= y + 1) {
    y = y + 1;
    c = c + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jl     1162 <main+0x52>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113a <main+0x2a>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
pop    %rcx
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 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %3
%6 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %6, i32* %4
store i32 0, i32* %2
br label %7
7: ; preds = %12, %0
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = add nsw i32 %9, 1
%11 = icmp sge i32 %8, %10
br i1 %11, label %12, label %17
12: ; preds = %7
%13 = load i32, i32* %4
%14 = add nsw i32 %13, 1
store i32 %14, i32* %4
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 1
store i32 %16, i32* %2
br label %7
17: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
char is_digit_char(char c) {
  if (c >= '0' && c <= '9')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_digit_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x30,%eax
jl     112d <is_digit_char+0x2d>
movsbl -0x2(%rbp),%eax
cmp    $0x39,%eax
jg     112d <is_digit_char+0x2d>
movb   $0x1,-0x1(%rbp)
jmp    1131 <is_digit_char+0x31>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_digit_char>:
add    $0xd0,%dil
cmp    $0xa,%dil
setb   %al
ret

LLVM IR (-O0):
define signext i8 @is_digit_char(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 48
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 57
br i1 %10, label %11, label %12
11: ; preds = %7
store i8 1, i8* %2
br label %13
12: ; preds = %7, %1
store i8 0, i8* %2
br label %13
13: ; preds = %12, %11
%14 = load i8, i8* %2
ret i8 %14
}

LLVM IR (-O2):
define signext i8 @is_digit_char(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i8
ret i8 %4
}
void ff_hevc_dsp_init_ppc() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_dsp_init_ppc() {
ret void
}
/* Variables and functions */
int mkdir(char const *, int);
int mkdirR(const char *path) { return mkdir(path, 0755); }


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

x86 assembly (clang, -O2):
<mkdirR>:
mov    $0x1ed,%esi
jmp    1030 <mkdir@plt>

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

LLVM IR (-O2):
define i32 @mkdirR(i8* nocapture %0) {
%2 = tail call i32 @mkdir(i8* %0, i32 493)
ret i32 %2
}