xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void sigint_handler(int sig) { fflush(stdout); }


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

x86 assembly (clang, -O2):
<sigint_handler>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <fflush@plt>

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

LLVM IR (-O2):
@stdout = global i32 0
define void @sigint_handler(i32 %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fflush(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long);
int /*<<< orphan*/ scanf(char *, long);
int main(int argc, char *argv[]) {
  long n, a;
  n = (long)&a;
  scanf("%ld", n);
  printf("%ld\n", a);
  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)
lea    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xeb7(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x20(%rbp),%rsi
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%ld\00"
@.str.1 = [5 x i8] c"%ld\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
%5 = ptrtoint i64* %3 to i64
%6 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %5)
%7 = load i64, i64* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %7)
ret i32 0
}
void _ps2sdk_args_parse(int argc, char **argv) {}


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

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

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

LLVM IR (-O2):
define void @_ps2sdk_args_parse(i32 %0, i8** nocapture %1) {
ret void
}
double ipow(double x, int pwr) {
  double r;
  int i;
  r = 1.0;
  for (i = 0; i < pwr; i++)
    r *= x;
  return r;
}


x86 assembly (clang, -O0):
<ipow>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  0xeec(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1149 <ipow+0x49>
movsd  -0x8(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1120 <ipow+0x20>
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipow>:
test   %edi,%edi
jle    111b <ipow+0x1b>
lea    -0x1(%rdi),%ecx
mov    %edi,%eax
and    $0x7,%eax
cmp    $0x7,%ecx
jae    1124 <ipow+0x24>
movsd  0xee7(%rip),%xmm1
jmp    1155 <ipow+0x55>
movsd  0xedd(%rip),%xmm0
ret
and    $0xfffffff8,%edi
movsd  0xed1(%rip),%xmm1
nop
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
add    $0xfffffff8,%edi
jne    1130 <ipow+0x30>
test   %eax,%eax
je     1169 <ipow+0x69>
nopl   0x0(%rax)
mulsd  %xmm0,%xmm1
add    $0xffffffff,%eax
jne    1160 <ipow+0x60>
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @ipow(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
%5 = alloca double
%6 = alloca i32
store double %0, double* %3
store i32 %1, i32* %4
store double 1.000000e+00, double* %5
store i32 0, i32* %6
br label %7
7: ; preds = %15, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %18
11: ; preds = %7
%12 = load double, double* %3
%13 = load double, double* %5
%14 = fmul double %13, %12
store double %14, double* %5
br label %15
15: ; preds = %11
%16 = load i32, i32* %6
%17 = add nsw i32 %16, 1
store i32 %17, i32* %6
br label %7
18: ; preds = %7
%19 = load double, double* %5
ret double %19
}

LLVM IR (-O2):
define double @ipow(double %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %33
4: ; preds = %2
%5 = add i32 %1, -1
%6 = and i32 %1, 7
%7 = icmp ult i32 %5, 7
br i1 %7, label %23, label %8
8: ; preds = %4
%9 = and i32 %1, -8
br label %10
10: ; preds = %10, %8
%11 = phi double [ 1.000000e+00, %8 ], [ %20, %10 ]
%12 = phi i32 [ 0, %8 ], [ %21, %10 ]
%13 = fmul double %11, %0
%14 = fmul double %13, %0
%15 = fmul double %14, %0
%16 = fmul double %15, %0
%17 = fmul double %16, %0
%18 = fmul double %17, %0
%19 = fmul double %18, %0
%20 = fmul double %19, %0
%21 = add i32 %12, 8
%22 = icmp eq i32 %21, %9
br i1 %22, label %23, label %10
23: ; preds = %10, %4
%24 = phi double [ undef, %4 ], [ %20, %10 ]
%25 = phi double [ 1.000000e+00, %4 ], [ %20, %10 ]
%26 = icmp eq i32 %6, 0
br i1 %26, label %33, label %27
27: ; preds = %23, %27
%28 = phi double [ %30, %27 ], [ %25, %23 ]
%29 = phi i32 [ %31, %27 ], [ 0, %23 ]
%30 = fmul double %28, %0
%31 = add i32 %29, 1
%32 = icmp eq i32 %31, %6
br i1 %32, label %33, label %27
33: ; preds = %23, %27, %2
%34 = phi double [ 1.000000e+00, %2 ], [ %24, %23 ], [ %30, %27 ]
ret double %34
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int /*<<< orphan*/ S_ISREG(int /*<<< orphan*/);
int stat(char const *, struct stat *);
__attribute__((unused)) int UTIL_doesFileExists(const char *infilename) {
  int r;
  struct stat statbuf;
  r = stat(infilename, &statbuf);
  if (r || !S_ISREG(statbuf.st_mode))
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<UTIL_doesFileExists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1157 <UTIL_doesFileExists+0x37>
mov    -0x18(%rbp),%edi
call   1040 <S_ISREG@plt>
cmp    $0x0,%eax
jne    1163 <UTIL_doesFileExists+0x43>
movl   $0x0,-0x4(%rbp)
jmp    116a <UTIL_doesFileExists+0x4a>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UTIL_doesFileExists>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
je     1133 <UTIL_doesFileExists+0x13>
pop    %rcx
ret
mov    (%rsp),%edi
call   1040 <S_ISREG@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @UTIL_doesFileExists(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca %struct.stat
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @stat(i8* %6, %struct.stat* %5)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 0
br i1 %9, label %15, label %10
10: ; preds = %1
%11 = getelementptr inbounds %struct.stat, %struct.stat* %5, i32 0, i32 0
%12 = load i32, i32* %11
%13 = call i32 @S_ISREG(i32 %12)
%14 = icmp ne i32 %13, 0
br i1 %14, label %16, label %15
15: ; preds = %10, %1
store i32 0, i32* %2
br label %17
16: ; preds = %10
store i32 1, i32* %2
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @UTIL_doesFileExists(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = tail call i32 @S_ISREG(i32 %8)
%10 = icmp ne i32 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %6, %1
%13 = phi i32 [ 0, %1 ], [ %11, %6 ]
ret i32 %13
}
/* Variables and functions */
unsigned int startHandleMessages(void *, char *, int, unsigned int *,
                                 unsigned int **, void **, unsigned int *);
unsigned int startAssertFacts(void *handle, char *messages,
                              unsigned int *resultsLength,
                              unsigned int **results, void **rulesBinding,
                              unsigned int *replyCount) {
  return startHandleMessages(handle, messages, 1, resultsLength, results,
                             rulesBinding, replyCount);
}


x86 assembly (clang, -O0):
<startAssertFacts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x30(%rbp),%rax
mov    $0x1,%edx
mov    %rax,(%rsp)
call   1030 <startHandleMessages@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<startAssertFacts>:
push   %rax
mov    %r8,%rax
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %r9,(%rsp)
mov    $0x1,%edx
mov    %rax,%r9
call   1030 <startHandleMessages@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @startAssertFacts(i8* %0, i8* %1, i32* %2, i32** %3, i8** %4, i32* %5) {
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32*
%10 = alloca i32**
%11 = alloca i8**
%12 = alloca i32*
store i8* %0, i8** %7
store i8* %1, i8** %8
store i32* %2, i32** %9
store i32** %3, i32*** %10
store i8** %4, i8*** %11
store i32* %5, i32** %12
%13 = load i8*, i8** %7
%14 = load i8*, i8** %8
%15 = load i32*, i32** %9
%16 = load i32**, i32*** %10
%17 = load i8**, i8*** %11
%18 = load i32*, i32** %12
%19 = call i32 @startHandleMessages(i8* %13, i8* %14, i32 1, i32* %15, i32** %16, i8** %17, i32* %18)
ret i32 %19
}

LLVM IR (-O2):
define i32 @startAssertFacts(i8* %0, i8* %1, i32* %2, i32** %3, i8** %4, i32* %5) {
%7 = tail call i32 @startHandleMessages(i8* %0, i8* %1, i32 1, i32* %2, i32** %3, i8** %4, i32* %5)
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void writeToFile(char *filename, char *text) {
  FILE *file = fopen(filename, "w");
  fprintf(file, "%s", text);
  fclose(file);
}


x86 assembly (clang, -O0):
<writeToFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb5(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xe9f(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeToFile>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
lea    0xec2(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    %rax,%rsi
call   1040 <fputs@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"w\00"
@.str.1 = [3 x i8] c"%s\00"
define void @writeToFile(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i32* @fopen(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = load i8*, i8** %4
%10 = call i32 @fprintf(i32* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %9)
%11 = load i32*, i32** %5
%12 = call i32 @fclose(i32* %11)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"w\00"
define void @writeToFile(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @fputs(i8* %1, i32* %3)
%5 = tail call i32 @fclose(i32* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printHelp() {
  printf("Valid Commands: reserve|request|return [pages], reserve-all,\n"
         "                query, query-server, query-total, end\n");
}


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

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

LLVM IR (-O0):
@.str = [116 x i8] c"Valid Commands: reserve|request|return [pages], reserve-all,\0A query, query-server, query-total, end\0A\00"
define void @printHelp() {
%1 = call i32 @printf(i8* getelementptr inbounds ([116 x i8], [116 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [115 x i8] c"Valid Commands: reserve|request|return [pages], reserve-all,\0A query, query-server, query-total, end\00"
define void @printHelp() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([115 x i8], [115 x i8]* @str, i64 0, i64 0))
ret void
}
int test_imm_0Duint32_reg(unsigned int val) {
  return ((val) & (0x0D << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_0Duint32_reg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 13
%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_0Duint32_reg(i32 %0) {
%2 = and i32 %0, 13
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int random();
float dummy2() {
  int x;
  float f;
  x = random();
  f = (float)x;
  return f;
}


x86 assembly (clang, -O0):
<dummy2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <random@plt>
mov    %eax,-0x4(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dummy2>:
push   %rax
xor    %eax,%eax
call   1030 <random@plt>
cvtsi2ss %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @dummy2() {
%1 = alloca i32
%2 = alloca float
%3 = call i32 (...) @random()
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = sitofp i32 %4 to float
store float %5, float* %2
%6 = load float, float* %2
ret float %6
}

LLVM IR (-O2):
define float @dummy2() {
%1 = tail call i32 (...) @random()
%2 = sitofp i32 %1 to float
ret float %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int /*<<< orphan*/ PrintChar(int);
int /*<<< orphan*/ *stderr;
int /*<<< orphan*/ *stdout;
signed int fputc(signed int c, FILE *pStream) {
  if ((pStream == stdout) || (pStream == stderr)) {
    PrintChar(c);
    return c;
  } else {
    return EOF;
  }
}


x86 assembly (clang, -O0):
<fputc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x2ea6(%rip),%rcx
cmp    (%rcx),%rax
je     1147 <fputc+0x37>
mov    -0x10(%rbp),%rax
mov    0x2e9a(%rip),%rcx
cmp    (%rcx),%rax
jne    115a <fputc+0x4a>
mov    -0x8(%rbp),%edi
call   1030 <PrintChar@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1166 <fputc+0x56>
mov    0x2e87(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fputc>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
cmp    %rsi,(%rax)
je     1136 <fputc+0x26>
mov    0x2eb2(%rip),%rax
cmp    %rsi,(%rax)
je     1136 <fputc+0x26>
mov    0x2eb6(%rip),%rax
mov    (%rax),%ebx
jmp    113d <fputc+0x2d>
mov    %ebx,%edi
call   1030 <PrintChar@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stdout = global i32* null
@stderr = global i32* null
@EOF = global i32 0
define i32 @fputc(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store i32 %0, i32* %4
store i32* %1, i32** %5
%6 = load i32*, i32** %5
%7 = load i32*, i32** @stdout
%8 = icmp eq i32* %6, %7
br i1 %8, label %13, label %9
9: ; preds = %2
%10 = load i32*, i32** %5
%11 = load i32*, i32** @stderr
%12 = icmp eq i32* %10, %11
br i1 %12, label %13, label %17
13: ; preds = %9, %2
%14 = load i32, i32* %4
%15 = call i32 @PrintChar(i32 %14)
%16 = load i32, i32* %4
store i32 %16, i32* %3
br label %19
17: ; preds = %9
%18 = load i32, i32* @EOF
store i32 %18, i32* %3
br label %19
19: ; preds = %17, %13
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
@stdout = global i32* null
@stderr = global i32* null
@EOF = global i32 0
define i32 @fputc(i32 %0, i32* nocapture readnone %1) {
%3 = load i32*, i32** @stdout
%4 = icmp eq i32* %3, %1
%5 = load i32*, i32** @stderr
%6 = icmp eq i32* %5, %1
%7 = select i1 %4, i1 true, i1 %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 @PrintChar(i32 %0)
br label %12
10: ; preds = %2
%11 = load i32, i32* @EOF
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %0, %8 ], [ %11, %10 ]
ret i32 %13
}
int SDL_imageFilterShiftRightUintMMX(unsigned char *Src1, unsigned char *Dest,
                                     int length, unsigned char N) {
  return (0);
}


x86 assembly (clang, -O0):
<SDL_imageFilterShiftRightUintMMX>:
push   %rbp
mov    %rsp,%rbp
mov    %cl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %al,-0x15(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @SDL_imageFilterShiftRightUintMMX(i8* %0, i8* %1, i32 %2, i8 zeroext %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8 %3, i8* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @SDL_imageFilterShiftRightUintMMX(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2, i8 zeroext %3) {
ret i32 0
}
float Sleef_exp2f_u10(float x) { return __builtin_exp2f(x); }


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

x86 assembly (clang, -O2):
<Sleef_exp2f_u10>:
jmp    1030 <exp2f@plt>

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

LLVM IR (-O2):
define float @Sleef_exp2f_u10(float %0) {
%2 = tail call float @exp2f(float %0)
ret float %2
}
void RTSymlinkIsDangling(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSymlinkIsDangling() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void error(char *msg) {
  fprintf(stderr, "PSF_ESTIM Error: %s\n", msg);
  exit(EXIT_FAILURE);
}


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

x86 assembly (clang, -O2):
<error>:
push   %rax
mov    %rdi,%rdx
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>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [21 x i8] c"PSF_ESTIM Error: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [21 x i8] c"PSF_ESTIM Error: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main() {
  int p, l, m;
  scanf("%d%d%d", &p, &l, &m);
  if (m * p >= l)
    printf("yes\n");
  else
    printf("no\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%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    -0x10(%rbp),%eax
imul   -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     1168 <main+0x48>
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
jmp    1174 <main+0x54>
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%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    0x14(%rsp),%eax
imul   0xc(%rsp),%eax
cmp    0x10(%rsp),%eax
lea    0xeb4(%rip),%rax
lea    0xeb0(%rip),%rdi
cmovl  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d%d%d\00"
@str = [3 x i8] c"no\00"
@str.3 = [4 x i8] c"yes\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* %3
%9 = load i32, i32* %1
%10 = mul nsw i32 %9, %8
%11 = load i32, i32* %2
%12 = icmp slt i32 %10, %11
%13 = select i1 %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.3, i64 0, i64 0)
%14 = call i32 @puts(i8* dereferenceable(1) %13)
ret i32 0
}
/* Variables and functions */
int oclistnull(void *e) { return e == NULL; }


x86 assembly (clang, -O0):
<oclistnull>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<oclistnull>:
xor    %eax,%eax
test   %rdi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @oclistnull(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @oclistnull(i8* readnone %0) {
%2 = icmp eq i8* %0, null
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exvwarning(int /*<<< orphan*/, char const *,
                              int /*<<< orphan*/);
int /*<<< orphan*/ sh_exit(int);
void sh_verr(int status, const char *fmt, va_list ap) {
  exvwarning(errno, fmt, ap);
  sh_exit(status);
}


x86 assembly (clang, -O0):
<sh_verr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <exvwarning@plt>
mov    -0x4(%rbp),%edi
call   1040 <sh_exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sh_verr>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
call   1030 <exvwarning@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <sh_exit@plt>

LLVM IR (-O0):
@errno = global i32 0
define void @sh_verr(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 i32, i32* @errno
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @exvwarning(i32 %7, i8* %8, i32 %9)
%11 = load i32, i32* %4
%12 = call i32 @sh_exit(i32 %11)
ret void
}

LLVM IR (-O2):
@errno = global i32 0
define void @sh_verr(i32 %0, i8* %1, i32 %2) {
%4 = load i32, i32* @errno
%5 = tail call i32 @exvwarning(i32 %4, i8* %1, i32 %2)
%6 = tail call i32 @sh_exit(i32 %0)
ret void
}
init_poly2(poly) double poly[25][25];
{ bzero(poly, 25 * 25 * sizeof(double)); }


x86 assembly (clang, -O0):
<init_poly2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x1388,%edx
call   1030 <memset@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_poly2>:
mov    $0x1388,%edx
xor    %esi,%esi
jmp    1030 <memset@plt>

LLVM IR (-O0):
define i32 @init_poly2([25 x double]* %0) {
%2 = alloca i32
%3 = alloca [25 x double]*
store [25 x double]* %0, [25 x double]** %3
%4 = load [25 x double]*, [25 x double]** %3
%5 = bitcast [25 x double]* %4 to i8*
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @init_poly2([25 x double]* nocapture writeonly %0) {
%2 = bitcast [25 x double]* %0 to i8*
tail call void @llvm.memset.p0i8.i64(i8* align 8 dereferenceable(5000) %2, i8 0, i64 5000, i1 false)
ret i32 undef
}
int do_507() { return 507; }


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

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

LLVM IR (-O0):
define i32 @do_507() {
ret i32 507
}

LLVM IR (-O2):
define i32 @do_507() {
ret i32 507
}
const char *zlibVersion() { return "1.2.3.f-GPSBabel"; }


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"1.2.3.f-GPSBabel\00"
define i8* @zlibVersion() {
ret i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [17 x i8] c"1.2.3.f-GPSBabel\00"
define i8* @zlibVersion() {
ret i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0)
}
int rfun(unsigned x) {
  if (!x)
    return 0;
  unsigned nx = x >> 1;
  int rv = rfun(nx);
  return rv + (x & 1);
}


x86 assembly (clang, -O0):
<rfun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <rfun+0x21>
movl   $0x0,-0x4(%rbp)
jmp    1153 <rfun+0x43>
mov    -0x8(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <rfun@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
and    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rfun>:
xor    %eax,%eax
test   %edi,%edi
je     1120 <rfun+0x20>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
shr    %ecx
mov    %edi,%edx
and    $0x1,%edx
add    %edx,%eax
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <rfun+0x10>
ret

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

LLVM IR (-O2):
define i32 @rfun(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 = lshr i32 %4, 1
%7 = and i32 %4, 1
%8 = add i32 %7, %5
%9 = icmp ult i32 %4, 2
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %8, %3 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("hello world!\n");
  printf("good night!\n");
  printf("hahaha!");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"hello world!\0A\00"
@.str.1 = [13 x i8] c"good night!\0A\00"
@.str.2 = [8 x i8] c"hahaha!\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [8 x i8] c"hahaha!\00"
@str = [13 x i8] c"hello world!\00"
@str.3 = [12 x i8] c"good night!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("\nrunj2k Copyright 2014 by Waitman Gobble <ns@waitman.net>\n");
  printf("\nusage: runj2k [-enatvh] /path/to/file\n\n");
  printf("-e\tCommand Line Options to pass to opendcp_j2k, example: -e '-e -R' "
         "\n-n\tNumber of Threads\n-a\tAutomatically determine number of "
         "threads\n-t\tReport Exec Time (secs)\n-v\tVerbose "
         "Messages\n-h\tHelp\n\n\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf16(%rip),%rdi
call   1030 <puts@plt>
lea    0xf32(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [59 x i8] c"\0Arunj2k Copyright 2014 by Waitman Gobble <ns@waitman.net>\0A\00"
@.str.1 = [41 x i8] c"\0Ausage: runj2k [-enatvh] /path/to/file\0A\0A\00"
@.str.2 = [193 x i8] c"-e\09Command Line Options to pass to opendcp_j2k, example: -e '-e -R' \0A-n\09Number of Threads\0A-a\09Automatically determine number of threads\0A-t\09Report Exec Time (secs)\0A-v\09Verbose Messages\0A-h\09Help\0A\0A\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([193 x i8], [193 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [58 x i8] c"\0Arunj2k Copyright 2014 by Waitman Gobble <ns@waitman.net>\00"
@str.3 = [40 x i8] c"\0Ausage: runj2k [-enatvh] /path/to/file\0A\00"
@str.4 = [192 x i8] c"-e\09Command Line Options to pass to opendcp_j2k, example: -e '-e -R' \0A-n\09Number of Threads\0A-a\09Automatically determine number of threads\0A-t\09Report Exec Time (secs)\0A-v\09Verbose Messages\0A-h\09Help\0A\0A\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([192 x i8], [192 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ __time(int /*<<< orphan*/ *);
time_t time(time_t *timer) { return __time(timer); }


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

x86 assembly (clang, -O2):
<time>:
jmp    1030 <__time@plt>

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

LLVM IR (-O2):
define i32 @time(i32* %0) {
%2 = tail call i32 @__time(i32* %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ close(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
int main(void) {
  FILE *fp;
  fp = fopen("local", "a");
  fprintf(fp, "t=\"12:00\", i=\"100\", s=\"I write some stuff\";\n");
  close(fp);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    0xec0(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeae(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <close@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rdi
lea    0xec7(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,%rbx
lea    0xeba(%rip),%rdi
mov    $0x2c,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1050 <fwrite@plt>
mov    %rbx,%rdi
call   1030 <close@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"local\00"
@.str.1 = [2 x i8] c"a\00"
@.str.2 = [45 x i8] c"t=\2212:00\22, i=\22100\22, s=\22I write some stuff\22;\0A\00"
define i32 @main() {
%1 = alloca i32*
%2 = call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0))
%5 = load i32*, i32** %1
%6 = call i32 @close(i32* %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"local\00"
@.str.1 = [2 x i8] c"a\00"
@.str.2 = [45 x i8] c"t=\2212:00\22, i=\22100\22, s=\22I write some stuff\22;\0A\00"
define i32 @main() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0), i64 44, i64 1, i32* %1)
%3 = tail call i32 @close(i32* %1)
ret i32 0
}
/* Variables and functions */
scalar_t__ getoloc(int);
int putword(scalar_t__, int);
int putofield(int obj, int off, int val) {
  return (putword(getoloc(obj) + off, val));
}


x86 assembly (clang, -O0):
<putofield>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <getoloc@plt>
mov    %rax,%rdi
movslq -0x8(%rbp),%rax
add    %rax,%rdi
mov    -0xc(%rbp),%esi
call   1030 <putword@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putofield>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
call   1040 <getoloc@plt>
movslq %ebp,%rdi
add    %rax,%rdi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <putword@plt>

LLVM IR (-O0):
define i32 @putofield(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 = call i64 @getoloc(i32 %7)
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = add nsw i64 %8, %10
%12 = load i32, i32* %6
%13 = call i32 @putword(i64 %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @putofield(i32 %0, i32 %1, i32 %2) {
%4 = tail call i64 @getoloc(i32 %0)
%5 = sext i32 %1 to i64
%6 = add nsw i64 %4, %5
%7 = tail call i32 @putword(i64 %6, i32 %2)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ COLOR_PAIR(int);
int /*<<< orphan*/ attroff(int /*<<< orphan*/);
int /*<<< orphan*/ attron(int /*<<< orphan*/);
int /*<<< orphan*/ mvaddch(int, int, char const);
void color_char(int ck, int y, int x, const char ch) {
  attron(COLOR_PAIR(ck));
  mvaddch(y, x, ch);
  attroff(COLOR_PAIR(ck));
}


x86 assembly (clang, -O0):
<color_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %cl,%al
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %al,-0xd(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1040 <attron@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
movsbl -0xd(%rbp),%edx
call   1060 <mvaddch@plt>
mov    -0x4(%rbp),%edi
call   1050 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<color_char>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %edx,%r15d
mov    %esi,%ebx
mov    %edi,%ebp
call   1050 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1040 <attron@plt>
mov    %ebx,%edi
mov    %r15d,%esi
mov    %r14d,%edx
call   1060 <mvaddch@plt>
mov    %ebp,%edi
call   1050 <COLOR_PAIR@plt>
mov    %eax,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <attroff@plt>

LLVM IR (-O0):
define void @color_char(i32 %0, i32 %1, i32 %2, i8 signext %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8 %3, i8* %8
%9 = load i32, i32* %5
%10 = call i32 @COLOR_PAIR(i32 %9)
%11 = call i32 @attron(i32 %10)
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = load i8, i8* %8
%15 = call i32 @mvaddch(i32 %12, i32 %13, i8 signext %14)
%16 = load i32, i32* %5
%17 = call i32 @COLOR_PAIR(i32 %16)
%18 = call i32 @attroff(i32 %17)
ret void
}

LLVM IR (-O2):
define void @color_char(i32 %0, i32 %1, i32 %2, i8 signext %3) {
%5 = tail call i32 @COLOR_PAIR(i32 %0)
%6 = tail call i32 @attron(i32 %5)
%7 = tail call i32 @mvaddch(i32 %1, i32 %2, i8 signext %3)
%8 = tail call i32 @COLOR_PAIR(i32 %0)
%9 = tail call i32 @attroff(i32 %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _appexit(int);
int /*<<< orphan*/ monLock();
int /*<<< orphan*/ monUnlock();
void mon_appexit(int val) {
  monLock();
  _appexit(val);
  monUnlock();
}


x86 assembly (clang, -O0):
<mon_appexit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <monLock@plt>
mov    -0x4(%rbp),%edi
call   1050 <_appexit@plt>
mov    $0x0,%al
call   1040 <monUnlock@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mon_appexit>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <monLock@plt>
mov    %ebx,%edi
call   1050 <_appexit@plt>
xor    %eax,%eax
pop    %rbx
jmp    1040 <monUnlock@plt>

LLVM IR (-O0):
define void @mon_appexit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @monLock()
%4 = load i32, i32* %2
%5 = call i32 @_appexit(i32 %4)
%6 = call i32 (...) @monUnlock()
ret void
}

LLVM IR (-O2):
define void @mon_appexit(i32 %0) {
%2 = tail call i32 (...) @monLock()
%3 = tail call i32 @_appexit(i32 %0)
%4 = tail call i32 (...) @monUnlock()
ret void
}
void frontface_(onoff) int *onoff;
{ frontface(*onoff); }


x86 assembly (clang, -O0):
<frontface_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    $0x0,%al
call   1030 <frontface@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<frontface_>:
mov    (%rdi),%edi
xor    %eax,%eax
jmp    1030 <frontface@plt>

LLVM IR (-O0):
define void @frontface_(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = call i32 (i32, ...) bitcast (i32 (...)* @frontface to i32 (i32, ...)*)(i32 %4)
ret void
}

LLVM IR (-O2):
define void @frontface_(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @frontface to i32 (i32, ...)*)(i32 %2)
ret void
}
void ipipe_preempt_root_only(void) {}


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

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

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

LLVM IR (-O2):
define void @ipipe_preempt_root_only() {
ret void
}
/* Variables and functions */
int **combinationSum2(int *, int, int, int **, int *);
int main(void) {
  int **res, *col, ret;
  int x[] = {10, 1, 2, 7, 6, 1, 5};
  res = combinationSum2(x, 7, 8, &col, &ret);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xed4(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xed2(%rip),%eax
mov    %eax,-0x28(%rbp)
lea    -0x40(%rbp),%rdi
mov    $0x7,%esi
mov    $0x8,%edx
lea    -0x18(%rbp),%rcx
lea    -0x1c(%rbp),%r8
call   1030 <combinationSum2@plt>
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
movups 0xef1(%rip),%xmm0
movups %xmm0,0x1c(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rcx
lea    0x4(%rsp),%r8
mov    $0x7,%esi
mov    $0x8,%edx
call   1030 <combinationSum2@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [7 x i32] [i32 10, i32 1, i32 2, i32 7, i32 6, i32 1, i32 5]
define i32 @main() {
%1 = alloca i32
%2 = alloca i32**
%3 = alloca i32*
%4 = alloca i32
%5 = alloca [7 x i32]
store i32 0, i32* %1
%6 = bitcast [7 x i32]* %5 to i8*
%7 = getelementptr inbounds [7 x i32], [7 x i32]* %5, i64 0, i64 0
%8 = call i32** @combinationSum2(i32* %7, i32 7, i32 8, i32** %3, i32* %4)
store i32** %8, i32*** %2
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [7 x i32] [i32 10, i32 1, i32 2, i32 7, i32 6, i32 1, i32 5]
define i32 @main() {
%1 = alloca i32*
%2 = alloca i32
%3 = alloca [7 x i32]
%4 = bitcast i32** %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast [7 x i32]* %3 to i8*
%7 = getelementptr inbounds [7 x i32], [7 x i32]* %3, i64 0, i64 0
%8 = call i32** @combinationSum2(i32* %7, i32 7, i32 8, i32** %1, i32* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ircd_register_crypt_native();
int /*<<< orphan*/ ircd_register_crypt_plain();
int /*<<< orphan*/ ircd_register_crypt_smd5();
void load_mechs(void) {
  ircd_register_crypt_native();
  ircd_register_crypt_smd5();
  ircd_register_crypt_plain();
  return;
}


x86 assembly (clang, -O0):
<load_mechs>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <ircd_register_crypt_native@plt>
mov    $0x0,%al
call   1050 <ircd_register_crypt_smd5@plt>
mov    $0x0,%al
call   1040 <ircd_register_crypt_plain@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_mechs>:
push   %rax
xor    %eax,%eax
call   1030 <ircd_register_crypt_native@plt>
xor    %eax,%eax
call   1050 <ircd_register_crypt_smd5@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <ircd_register_crypt_plain@plt>

LLVM IR (-O0):
define void @load_mechs() {
%1 = call i32 (...) @ircd_register_crypt_native()
%2 = call i32 (...) @ircd_register_crypt_smd5()
%3 = call i32 (...) @ircd_register_crypt_plain()
ret void
}

LLVM IR (-O2):
define void @load_mechs() {
%1 = tail call i32 (...) @ircd_register_crypt_native()
%2 = tail call i32 (...) @ircd_register_crypt_smd5()
%3 = tail call i32 (...) @ircd_register_crypt_plain()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int int32_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int32_t ReadUint8Le(const void *in, uint8_t *value) {
  assert(in != NULL);
  assert(value != NULL);
  const uint8_t *buf = (const uint8_t *)in;
  *value = buf[0];
  return 1;
}


x86 assembly (clang, -O0):
<ReadUint8Le>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReadUint8Le>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1030 <assert@plt>
xor    %edi,%edi
test   %r14,%r14
setne  %dil
call   1030 <assert@plt>
mov    (%rbx),%eax
mov    %eax,(%r14)
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @ReadUint8Le(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i32*, i32** %4
%11 = icmp ne i32* %10, null
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = load i8*, i8** %3
%15 = bitcast i8* %14 to i32*
store i32* %15, i32** %5
%16 = load i32*, i32** %5
%17 = getelementptr inbounds i32, i32* %16, i64 0
%18 = load i32, i32* %17
%19 = load i32*, i32** %4
store i32 %18, i32* %19
ret i32 1
}

LLVM IR (-O2):
define i32 @ReadUint8Le(i8* %0, i32* writeonly %1) {
%3 = icmp ne i8* %0, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = icmp ne i32* %1, null
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = bitcast i8* %0 to i32*
%10 = load i32, i32* %9
store i32 %10, i32* %1
ret i32 1
}