xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned long long);
int main(int argc, char **argv) {
  unsigned int cnt = 0;
  unsigned long long cnt2 = 0;
  do {
    cnt2++;
  } while (--cnt);
  printf("loop is iterated over %llu\n", cnt2);
  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   $0x0,-0x14(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jne    1135 <main+0x25>
mov    -0x20(%rbp),%rsi
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [28 x i8] c"loop is iterated over %llu\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i64 0, i64* %7
br label %8
8: ; preds = %11, %2
%9 = load i64, i64* %7
%10 = add i64 %9, 1
store i64 %10, i64* %7
br label %11
11: ; preds = %8
%12 = load i32, i32* %6
%13 = add i32 %12, -1
store i32 %13, i32* %6
%14 = icmp ne i32 %13, 0
br i1 %14, label %8, label %15
15: ; preds = %11
%16 = load i64, i64* %7
%17 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i64 %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"loop is iterated over %llu\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i64 4294967296)
ret i32 0
}
const char *hello_string(void) { return "Hello, world!"; }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello, world!\00"
define i8* @hello_string() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [14 x i8] c"Hello, world!\00"
define i8* @hello_string() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
struct sbst {
  int dummy;
};

/* Variables and functions */
int find_insert_aux(struct sbst *, char *, size_t, char *, size_t, int,
                    int /*<<< orphan*/);
int sbst_find(struct sbst *tree, char *text, size_t text_size, char *pattern,
              size_t pattern_size) {
  return find_insert_aux(tree, pattern, pattern_size, text, text_size, 2, 0);
}


x86 assembly (clang, -O0):
<sbst_find>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    $0x2,%r9d
xor    %eax,%eax
movl   $0x0,(%rsp)
call   1030 <find_insert_aux@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sbst_find>:
push   %rax
mov    %rdx,%r9
mov    %rsi,%rax
movl   $0x0,(%rsp)
mov    %rcx,%rsi
mov    %r8,%rdx
mov    %rax,%rcx
mov    %r9,%r8
mov    $0x2,%r9d
call   1030 <find_insert_aux@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.sbst = type { i32 }
define i32 @sbst_find(%struct.sbst* %0, i8* %1, i64 %2, i8* %3, i64 %4) {
%6 = alloca %struct.sbst*
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i8*
%10 = alloca i64
store %struct.sbst* %0, %struct.sbst** %6
store i8* %1, i8** %7
store i64 %2, i64* %8
store i8* %3, i8** %9
store i64 %4, i64* %10
%11 = load %struct.sbst*, %struct.sbst** %6
%12 = load i8*, i8** %9
%13 = load i64, i64* %10
%14 = load i8*, i8** %7
%15 = load i64, i64* %8
%16 = call i32 @find_insert_aux(%struct.sbst* %11, i8* %12, i64 %13, i8* %14, i64 %15, i32 2, i32 0)
ret i32 %16
}

LLVM IR (-O2):
%struct.sbst = type { i32 }
define i32 @sbst_find(%struct.sbst* %0, i8* %1, i64 %2, i8* %3, i64 %4) {
%6 = tail call i32 @find_insert_aux(%struct.sbst* %0, i8* %3, i64 %4, i8* %1, i64 %2, i32 2, i32 0)
ret i32 %6
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ checkInput(unsigned int *, unsigned int *);
int /*<<< orphan*/ devideByFive(unsigned int, unsigned int);
int /*<<< orphan*/ printf(char *);
int main() {
  unsigned int lowNumber, highNumber;
  printf("Enter two positive integer numbers: ");
  checkInput(&lowNumber, &highNumber);
  devideByFive(lowNumber, highNumber);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <checkInput@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1050 <devideByFive@plt>
mov    0x2e76(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1040 <checkInput@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1050 <devideByFive@plt>
mov    0x2e83(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"Enter two positive integer numbers: \00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @checkInput(i32* %2, i32* %3)
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = call i32 @devideByFive(i32 %6, i32 %7)
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
}

LLVM IR (-O2):
@.str = [37 x i8] c"Enter two positive integer numbers: \00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @checkInput(i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @devideByFive(i32 %7, i32 %8)
%10 = load i32, i32* @EXIT_SUCCESS
ret i32 %10
}
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1138 <gcd+0x28>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1152 <gcd+0x42>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rax
cqto
idivq  -0x10(%rbp)
mov    %rdx,%rsi
call   1030 <gcd@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %rdi,%rax
test   %rsi,%rsi
je     1135 <gcd+0x35>
mov    %rsi,%rdx
jmp    111d <gcd+0x1d>
nopl   (%rax)
cqto
idiv   %rcx
mov    %rcx,%rax
test   %rdx,%rdx
je     1132 <gcd+0x32>
mov    %rdx,%rcx
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
jne    1110 <gcd+0x10>
xor    %edx,%edx
div    %ecx
jmp    1115 <gcd+0x15>
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @gcd(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = load i64, i64* %3
br label %15
9: ; preds = %2
%10 = load i64, i64* %4
%11 = load i64, i64* %3
%12 = load i64, i64* %4
%13 = srem i64 %11, %12
%14 = call i64 @gcd(i64 %10, i64 %13)
br label %15
15: ; preds = %9, %7
%16 = phi i64 [ %8, %7 ], [ %14, %9 ]
ret i64 %16
}

LLVM IR (-O2):
define i64 @gcd(i64 %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %7, %4 ], [ %1, %2 ]
%6 = phi i64 [ %5, %4 ], [ %0, %2 ]
%7 = srem i64 %6, %5
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i64 [ %0, %2 ], [ %5, %4 ]
ret i64 %10
}
int bitcount2(unsigned int x) {
  unsigned int tmp = x;
  int count = 0;
  while (tmp) {
    count++;
    tmp &= (tmp - 1);
  }
  return count;
}


x86 assembly (clang, -O0):
<bitcount2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1138 <bitcount2+0x38>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
and    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1114 <bitcount2+0x14>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitcount2>:
xor    %eax,%eax
test   %edi,%edi
je     111c <bitcount2+0x1c>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%eax
lea    -0x1(%rdi),%ecx
and    %edi,%ecx
mov    %ecx,%edi
jne    1110 <bitcount2+0x10>
ret

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

LLVM IR (-O2):
define i32 @bitcount2(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = phi i32 [ %8, %3 ], [ %0, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = add i32 %5, -1
%8 = and i32 %7, %5
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %11
}
int digit(c)
register c;
{ return (c >= '0' && c <= '9'); }


x86 assembly (clang, -O0):
<digit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <digit+0x20>
cmpl   $0x39,-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):
<digit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @digit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ ECONNREFUSED;
scalar_t__ errno;
int connection_refused() { return errno == ECONNREFUSED; }


x86 assembly (clang, -O0):
<connection_refused>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%rax
mov    0x2ed3(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<connection_refused>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%rcx
mov    0x2ed7(%rip),%rdx
xor    %eax,%eax
cmp    (%rdx),%rcx
sete   %al
ret

LLVM IR (-O0):
@errno = global i64 0
@ECONNREFUSED = global i64 0
define i32 @connection_refused() {
%1 = load i64, i64* @errno
%2 = load i64, i64* @ECONNREFUSED
%3 = icmp eq i64 %1, %2
%4 = zext i1 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
@errno = global i64 0
@ECONNREFUSED = global i64 0
define i32 @connection_refused() {
%1 = load i64, i64* @errno
%2 = load i64, i64* @ECONNREFUSED
%3 = icmp eq i64 %1, %2
%4 = zext i1 %3 to i32
ret i32 %4
}
unsigned long SysCtlIntFlagGet(void) {
  return ((*((volatile unsigned long *)(0x40021008))) & 0xFF);
}


x86 assembly (clang, -O0):
<SysCtlIntFlagGet>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40021008,%eax
mov    (%rax),%rax
and    $0xff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtlIntFlagGet>:
mov    0x40021008,%rax
40
movzbl %al,%eax
ret

LLVM IR (-O0):
define i64 @SysCtlIntFlagGet() {
%1 = load volatile i64, i64* inttoptr (i64 1073877000 to i64*)
%2 = and i64 %1, 255
ret i64 %2
}

LLVM IR (-O2):
define i64 @SysCtlIntFlagGet() {
%1 = load volatile i64, i64* inttoptr (i64 1073877000 to i64*)
%2 = and i64 %1, 255
ret i64 %2
}
void t5(int i) { asm("nop" : "=r"(i) : "0"(t5)); }


x86 assembly (clang, -O0):
<t5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    0x2ed2(%rip),%rax
nop
mov    %eax,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @t5(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call void (i32)* asm "nop", "=r,0,~{dirflag},~{fpsr},~{flags}"(void (i32)* @t5)
%4 = ptrtoint void (i32)* %3 to i64
%5 = trunc i64 %4 to i32
store i32 %5, i32* %2
ret void
}

LLVM IR (-O2):
define void @t5(i32 %0) {
%2 = tail call void (i32)* asm "nop", "=r,0,~{dirflag},~{fpsr},~{flags}"(void (i32)* @t5)
ret void
}
void foo147() {}


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

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

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

LLVM IR (-O2):
define void @foo147() {
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
scalar_t__ stat(char *, struct stat *);
int exists(char *file) {
  struct stat buf;
  return stat(file, &buf) ? 0 : 1;
}


x86 assembly (clang, -O0):
<exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <stat@plt>
mov    %rax,%rdx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exists>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @exists(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @stat(i8* %4, %struct.stat* %3)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 0, i32 1
ret i32 %8
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @exists(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
int strncmp(char *, char *, int);
void strncmp_diff_length_3() {
  char *x = "123";
  char *y = "12345";
  clang_analyzer_eval(strncmp(x, y, 5) == -1);
}


x86 assembly (clang, -O0):
<strncmp_diff_length_3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
cmp    $0xffffffff,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncmp_diff_length_3>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed5(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
xor    %edi,%edi
cmp    $0xffffffff,%eax
sete   %dil
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"123\00"
@.str.1 = [6 x i8] c"12345\00"
define void @strncmp_diff_length_3() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i32 @strncmp(i8* %3, i8* %4, i32 5)
%6 = icmp eq i32 %5, -1
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"123\00"
@.str.1 = [6 x i8] c"12345\00"
define void @strncmp_diff_length_3() {
%1 = tail call i32 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 5)
%2 = icmp eq i32 %1, -1
%3 = zext i1 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}
/* Variables and functions */
scalar_t__ CharacterIsLowercase(char);
scalar_t__ CharacterIsUppercase(char);
int CharacterIsAlphabetic(char ch) {
  return CharacterIsUppercase(ch) || CharacterIsLowercase(ch) || (ch == '_');
}


x86 assembly (clang, -O0):
<CharacterIsAlphabetic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1040 <CharacterIsUppercase@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    1171 <CharacterIsAlphabetic+0x51>
movsbl -0x1(%rbp),%edi
call   1030 <CharacterIsLowercase@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    1171 <CharacterIsAlphabetic+0x51>
movsbl -0x1(%rbp),%eax
cmp    $0x5f,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CharacterIsAlphabetic>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1040 <CharacterIsUppercase@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    114b <CharacterIsAlphabetic+0x2b>
movsbl %bpl,%edi
call   1030 <CharacterIsLowercase@plt>
test   %rax,%rax
jne    114b <CharacterIsAlphabetic+0x2b>
xor    %ebx,%ebx
cmp    $0x5f,%bpl
sete   %bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @CharacterIsAlphabetic(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @CharacterIsUppercase(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i64 @CharacterIsLowercase(i8 signext %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 95
br label %14
14: ; preds = %10, %6, %1
%15 = phi i1 [ true, %6 ], [ true, %1 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @CharacterIsAlphabetic(i8 signext %0) {
%2 = tail call i64 @CharacterIsUppercase(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = tail call i64 @CharacterIsLowercase(i8 signext %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = icmp eq i8 %0, 95
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %7, %4, %1
%11 = phi i32 [ 1, %4 ], [ 1, %1 ], [ %9, %7 ]
ret i32 %11
}
int test_imm_DFint16_mem(short *val) {
  return ((*val) & (-0xDF << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_DFint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = and i32 %5, -223
%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_DFint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -223
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
char *strchr(char const *, char);
char *FIND_FIRST_DIRSEP(const char *_the_path) {
  return strchr(_the_path, '/');
}


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

x86 assembly (clang, -O2):
<FIND_FIRST_DIRSEP>:
mov    $0x2f,%esi
jmp    1030 <strchr@plt>

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

LLVM IR (-O2):
define i8* @FIND_FIRST_DIRSEP(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 47)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
int main() { fprintf(stderr, "asdf %d\n", 3); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
mov    $0x3,%edx
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
mov    $0x3,%edx
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [9 x i8] c"asdf %d\0A\00"
define i32 @main() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 3)
ret i32 0
}
void fz_var_imp(void *var) { var = var; }


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

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

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

LLVM IR (-O2):
define void @fz_var_imp(i8* nocapture %0) {
ret void
}
void ptrace_sandbox_permit_fchmod(struct pt_sandbox *p_sandbox) {
  (void)p_sandbox;
}


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

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

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

LLVM IR (-O2):
%struct.pt_sandbox = type opaque
define void @ptrace_sandbox_permit_fchmod(%struct.pt_sandbox* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar();
int /*<<< orphan*/ test45_M_foo__E();
void test45_Test1_test1__I() {
  test45_M_foo__E();
  bar();
}


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

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

LLVM IR (-O0):
define void @test45_Test1_test1__I() {
%1 = call i32 (...) @test45_M_foo__E()
%2 = call i32 (...) @bar()
ret void
}

LLVM IR (-O2):
define void @test45_Test1_test1__I() {
%1 = tail call i32 (...) @test45_M_foo__E()
%2 = tail call i32 (...) @bar()
ret void
}
/* Variables and functions */
int _f(int, int /*<<< orphan*/, double const, double const *);
double _I_13(const double omega, const double vertices_omegas[4]) {
  return _f(3, 0, omega, vertices_omegas) / 3;
}


x86 assembly (clang, -O0):
<_I_13>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
mov    $0x3,%edi
xor    %esi,%esi
call   1030 <_f@plt>
mov    $0x3,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_I_13>:
push   %rax
mov    %rdi,%rdx
mov    $0x3,%edi
xor    %esi,%esi
call   1030 <_f@plt>
cltq
imul   $0x55555556,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @_I_13(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 = load double*, double** %4
%7 = call i32 @_f(i32 3, i32 0, double %5, double* %6)
%8 = sdiv i32 %7, 3
%9 = sitofp i32 %8 to double
ret double %9
}

LLVM IR (-O2):
define double @_I_13(double %0, double* %1) {
%3 = tail call i32 @_f(i32 3, i32 0, double %0, double* %1)
%4 = sdiv i32 %3, 3
%5 = sitofp i32 %4 to double
ret double %5
}
void I422ToRGB565Row_C() {}


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

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

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

LLVM IR (-O2):
define void @I422ToRGB565Row_C() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ posix_spawn_file_actions_t;

/* Variables and functions */
int posix_spawn_file_actions_adddup2(int /*<<< orphan*/ *, int, int);
int swift_posix_spawn_file_actions_adddup2(
    posix_spawn_file_actions_t *file_actions, int filedes, int newfiledes) {
  return posix_spawn_file_actions_adddup2(file_actions, filedes, newfiledes);
}


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

x86 assembly (clang, -O2):
<swift_posix_spawn_file_actions_adddup2>:
jmp    1030 <posix_spawn_file_actions_adddup2@plt>

LLVM IR (-O0):
define i32 @swift_posix_spawn_file_actions_adddup2(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
%7 = load i32*, i32** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @posix_spawn_file_actions_adddup2(i32* %7, i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @swift_posix_spawn_file_actions_adddup2(i32* %0, i32 %1, i32 %2) {
%4 = tail call i32 @posix_spawn_file_actions_adddup2(i32* %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ leftMotor(int);
int /*<<< orphan*/ rightMotor(int);
int /*<<< orphan*/ wait1Msec(int);
void pivot(int speed, int millis) {
  leftMotor(speed);
  rightMotor(-speed);
  wait1Msec(millis);
  leftMotor(0);
  rightMotor(0);
}


x86 assembly (clang, -O0):
<pivot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <leftMotor@plt>
xor    %edi,%edi
sub    -0x4(%rbp),%edi
call   1050 <rightMotor@plt>
mov    -0x8(%rbp),%edi
call   1040 <wait1Msec@plt>
xor    %edi,%edi
call   1030 <leftMotor@plt>
xor    %edi,%edi
call   1050 <rightMotor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pivot>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <leftMotor@plt>
neg    %ebp
mov    %ebp,%edi
call   1050 <rightMotor@plt>
mov    %ebx,%edi
call   1040 <wait1Msec@plt>
xor    %edi,%edi
call   1030 <leftMotor@plt>
xor    %edi,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <rightMotor@plt>

LLVM IR (-O0):
define void @pivot(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 = call i32 @leftMotor(i32 %5)
%7 = load i32, i32* %3
%8 = sub nsw i32 0, %7
%9 = call i32 @rightMotor(i32 %8)
%10 = load i32, i32* %4
%11 = call i32 @wait1Msec(i32 %10)
%12 = call i32 @leftMotor(i32 0)
%13 = call i32 @rightMotor(i32 0)
ret void
}

LLVM IR (-O2):
define void @pivot(i32 %0, i32 %1) {
%3 = tail call i32 @leftMotor(i32 %0)
%4 = sub nsw i32 0, %0
%5 = tail call i32 @rightMotor(i32 %4)
%6 = tail call i32 @wait1Msec(i32 %1)
%7 = tail call i32 @leftMotor(i32 0)
%8 = tail call i32 @rightMotor(i32 0)
ret void
}
int syscall_monitor_write(const char *p1) {
  int a;
  asm volatile("int $0x80" : "=a"(a) : "0"(0), "b"((int)p1));
  return a;
}


x86 assembly (clang, -O0):
<syscall_monitor_write>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,%ebx
xor    %eax,%eax
int    $0x80
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscall_monitor_write>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
int    $0x80
pop    %rbx
ret

LLVM IR (-O0):
define i32 @syscall_monitor_write(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = ptrtoint i8* %4 to i32
%6 = call i32 asm sideeffect "int $$0x80", "={ax},0,{bx},~{dirflag},~{fpsr},~{flags}"(i32 0, i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @syscall_monitor_write(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i32 asm sideeffect "int $$0x80", "={ax},0,{bx},~{dirflag},~{fpsr},~{flags}"(i32 0, i32 %3)
ret i32 %4
}
/* Type definitions */
struct list_elem {
  int dummy;
};
struct list {
  int dummy;
};

/* Variables and functions */
struct list_elem *list_back(struct list *);
struct list_elem *list_end(struct list *list) {
  return list_back(list);
}


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

x86 assembly (clang, -O2):
<list_end>:
jmp    1030 <list_back@plt>

LLVM IR (-O0):
%struct.list_elem = type { i32 }
%struct.list = type { i32 }
define %struct.list_elem* @list_end(%struct.list* %0) {
%2 = alloca %struct.list*
store %struct.list* %0, %struct.list** %2
%3 = load %struct.list*, %struct.list** %2
%4 = call %struct.list_elem* @list_back(%struct.list* %3)
ret %struct.list_elem* %4
}

LLVM IR (-O2):
%struct.list_elem = type { i32 }
%struct.list = type { i32 }
define %struct.list_elem* @list_end(%struct.list* %0) {
%2 = tail call %struct.list_elem* @list_back(%struct.list* %0)
ret %struct.list_elem* %2
}
/* Variables and functions */
int /*<<< orphan*/ fork();
int inic() {
  if (!fork())
    return 1;
  if (!fork())
    return 2;
  if (!fork())
    return 3;
  return 0;
}


x86 assembly (clang, -O0):
<inic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <fork@plt>
cmp    $0x0,%eax
jne    1134 <inic+0x24>
movl   $0x1,-0x4(%rbp)
jmp    1173 <inic+0x63>
mov    $0x0,%al
call   1030 <fork@plt>
cmp    $0x0,%eax
jne    1150 <inic+0x40>
movl   $0x2,-0x4(%rbp)
jmp    1173 <inic+0x63>
mov    $0x0,%al
call   1030 <fork@plt>
cmp    $0x0,%eax
jne    116c <inic+0x5c>
movl   $0x3,-0x4(%rbp)
jmp    1173 <inic+0x63>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inic>:
push   %rax
xor    %eax,%eax
call   1030 <fork@plt>
test   %eax,%eax
je     113a <inic+0x2a>
xor    %eax,%eax
call   1030 <fork@plt>
test   %eax,%eax
je     1141 <inic+0x31>
xor    %eax,%eax
call   1030 <fork@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
lea    (%rcx,%rcx,2),%eax
pop    %rcx
ret
mov    $0x1,%eax
pop    %rcx
ret
mov    $0x2,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @inic() {
%1 = alloca i32
%2 = call i32 (...) @fork()
%3 = icmp ne i32 %2, 0
br i1 %3, label %5, label %4
4: ; preds = %0
store i32 1, i32* %1
br label %14
5: ; preds = %0
%6 = call i32 (...) @fork()
%7 = icmp ne i32 %6, 0
br i1 %7, label %9, label %8
8: ; preds = %5
store i32 2, i32* %1
br label %14
9: ; preds = %5
%10 = call i32 (...) @fork()
%11 = icmp ne i32 %10, 0
br i1 %11, label %13, label %12
12: ; preds = %9
store i32 3, i32* %1
br label %14
13: ; preds = %9
store i32 0, i32* %1
br label %14
14: ; preds = %13, %12, %8, %4
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
define i32 @inic() {
%1 = tail call i32 (...) @fork()
%2 = icmp eq i32 %1, 0
br i1 %2, label %10, label %3
3: ; preds = %0
%4 = tail call i32 (...) @fork()
%5 = icmp eq i32 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = tail call i32 (...) @fork()
%8 = icmp eq i32 %7, 0
%9 = select i1 %8, i32 3, i32 0
br label %10
10: ; preds = %6, %3, %0
%11 = phi i32 [ 1, %0 ], [ 2, %3 ], [ %9, %6 ]
ret i32 %11
}
void ff_hevc_put_hevc_bi_qpel_v16_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_qpel_v16_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ MainTask();
void main(void) { MainTask(); }


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

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

LLVM IR (-O0):
define void @main() {
%1 = call i32 (...) @MainTask()
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @MainTask()
ret void
}
int _plat__NVEnable(void *platParameter) {
  (void)(platParameter);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @_plat__NVEnable(i8* nocapture readnone %0) {
ret i32 0
}
int flood_greaterthan(float a, int npar, void *par) {
  double thres;
  thres = ((double *)par)[0];
  return (a > thres);
}


x86 assembly (clang, -O0):
<flood_greaterthan>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<flood_greaterthan>:
cvtss2sd %xmm0,%xmm0
xor    %eax,%eax
ucomisd (%rsi),%xmm0
seta   %al
ret

LLVM IR (-O0):
define i32 @flood_greaterthan(float %0, i32 %1, i8* %2) {
%4 = alloca float
%5 = alloca i32
%6 = alloca i8*
%7 = alloca double
store float %0, float* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%8 = load i8*, i8** %6
%9 = bitcast i8* %8 to double*
%10 = getelementptr inbounds double, double* %9, i64 0
%11 = load double, double* %10
store double %11, double* %7
%12 = load float, float* %4
%13 = fpext float %12 to double
%14 = load double, double* %7
%15 = fcmp ogt double %13, %14
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @flood_greaterthan(float %0, i32 %1, i8* nocapture %2) {
%4 = bitcast i8* %2 to double*
%5 = load double, double* %4
%6 = fpext float %0 to double
%7 = fcmp olt double %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void exitfunc19(void) {
  printf("Executing exitfunc19.\n");
  exit(0);
}


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"Executing exitfunc19.\0A\00"
define void @exitfunc19() {
%1 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [22 x i8] c"Executing exitfunc19.\00"
define void @exitfunc19() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int unlink(char const *);
int RemoveFile(const char *pathname) { return unlink(pathname); }


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

x86 assembly (clang, -O2):
<RemoveFile>:
jmp    1030 <unlink@plt>

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

LLVM IR (-O2):
define i32 @RemoveFile(i8* nocapture %0) {
%2 = tail call i32 @unlink(i8* %0)
ret i32 %2
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int solcon_move_current_dobldobl_to_next(int *cursor) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(455, cursor, b, c, 0);
  return fail;
}


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

x86 assembly (clang, -O2):
<solcon_move_current_dobldobl_to_next>:
mov    %rdi,%rsi
mov    $0x1c7,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

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

LLVM IR (-O2):
define i32 @solcon_move_current_dobldobl_to_next(i32* %0) {
%2 = tail call i32 @_ada_use_c2phc4c(i32 455, i32* %0, i32* undef, double* undef, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ __free_cf(void *);
void CGPDFDictionaryRelease(void *item) { __free_cf(item); }


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

x86 assembly (clang, -O2):
<CGPDFDictionaryRelease>:
jmp    1030 <__free_cf@plt>

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

LLVM IR (-O2):
define void @CGPDFDictionaryRelease(i8* %0) {
%2 = tail call i32 @__free_cf(i8* %0)
ret void
}
/* Variables and functions */
void *realloc(void *, size_t);
int /*<<< orphan*/ xalloc_die();
void *xrealloc(void *ptr, size_t newsize) {
  if (!(ptr = realloc(ptr, newsize))) {
    xalloc_die();
  }
  return ptr;
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
jne    1152 <xrealloc+0x32>
mov    $0x0,%al
call   1030 <xalloc_die@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %rbx
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1135 <xrealloc+0x15>
xor    %eax,%eax
call   1030 <xalloc_die@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define noalias i8* @xrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @xalloc_die()
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
float tanf(float);
float __ocl_half_tan_float(float src) { return tanf(src); }


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

x86 assembly (clang, -O2):
<__ocl_half_tan_float>:
jmp    1030 <tanf@plt>

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

LLVM IR (-O2):
define float @__ocl_half_tan_float(float %0) {
%2 = tail call float @tanf(float %0)
ret float %2
}
/* Type definitions */
struct timezone {
  int dummy;
};
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, struct timezone *);
double GetTime(void) {
  struct timeval time;
  double Time;
  gettimeofday(&time, (struct timezone *)NULL);
  Time = ((double)time.tv_sec * 1000000.0 + (double)time.tv_usec);
  return (Time);
}


x86 assembly (clang, -O0):
<GetTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq -0x8(%rbp),%xmm0
cvtsi2sdq -0x10(%rbp),%xmm1
movsd  0xec7(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetTime>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq 0x10(%rsp),%xmm0
cvtsi2sdq 0x8(%rsp),%xmm1
mulsd  0xeca(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
%struct.timezone = type { i32 }
define double @GetTime() {
%1 = alloca %struct.timeval
%2 = alloca double
%3 = call i32 @gettimeofday(%struct.timeval* %1, %struct.timezone* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = call double @llvm.fmuladd.f64(double %6, double 1.000000e+06, double %9)
store double %10, double* %2
%11 = load double, double* %2
ret double %11
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
%struct.timezone = type { i32 }
define double @GetTime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, %struct.timezone* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = tail call double @llvm.fmuladd.f64(double %6, double 1.000000e+06, double %9)
ret double %10
}
void down(struct semaphore *sem) { return; }


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

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

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

LLVM IR (-O2):
%struct.semaphore = type opaque
define void @down(%struct.semaphore* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ expand(char *, char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char s2[100];
  expand("a-k0-9A-Z\n", s2);
  printf("%s", s2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
lea    -0x70(%rbp),%rsi
lea    0xecd(%rip),%rdi
call   1040 <expand@plt>
lea    -0x70(%rbp),%rsi
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [11 x i8] c"a-k0-9A-Z\0A\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @expand(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"a-k0-9A-Z\0A\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @expand(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}
byteoff() { return (3); }


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

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

LLVM IR (-O0):
define i32 @byteoff() {
ret i32 3
}

LLVM IR (-O2):
define i32 @byteoff() {
ret i32 3
}
unsigned char frame_count_byte() { return 0xc1; }


x86 assembly (clang, -O0):
<frame_count_byte>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<frame_count_byte>:
mov    $0xc1,%al
ret

LLVM IR (-O0):
define zeroext i8 @frame_count_byte() {
ret i8 -63
}

LLVM IR (-O2):
define zeroext i8 @frame_count_byte() {
ret i8 -63
}
float _copysignf(float x, float y) {
  long *yPtr = (long *)&y;
  long *xPtr = (long *)&x;
  long sign;
  sign = *yPtr & 0x80000000;
  *xPtr = *xPtr & 0x7fffffff;
  *xPtr = *xPtr | sign;
  return x;
}


x86 assembly (clang, -O0):
<_copysignf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rcx
movabs $0x80000000,%rax
and    (%rcx),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rcx
and    $0x7fffffff,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%rcx
or     -0x20(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define float @_copysignf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca i64*
%6 = alloca i64*
%7 = alloca i64
store float %0, float* %3
store float %1, float* %4
%8 = bitcast float* %4 to i64*
store i64* %8, i64** %5
%9 = bitcast float* %3 to i64*
store i64* %9, i64** %6
%10 = load i64*, i64** %5
%11 = load i64, i64* %10
%12 = and i64 %11, 2147483648
store i64 %12, i64* %7
%13 = load i64*, i64** %6
%14 = load i64, i64* %13
%15 = and i64 %14, 2147483647
%16 = load i64*, i64** %6
store i64 %15, i64* %16
%17 = load i64*, i64** %6
%18 = load i64, i64* %17
%19 = load i64, i64* %7
%20 = or i64 %18, %19
%21 = load i64*, i64** %6
store i64 %20, i64* %21
%22 = load float, float* %3
ret float %22
}

LLVM IR (-O2):
define float @_copysignf(float returned %0, float %1) {
ret float %0
}