xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ inotify_map_isempty();
int /*<<< orphan*/ inotify_unmap_all();
int /*<<< orphan*/ setup();
int /*<<< orphan*/ teardown();
void test_inotify_unmap_all() {
  setup();
  inotify_unmap_all();
  assert(inotify_map_isempty());
  teardown();
}


x86 assembly (clang, -O0):
<test_inotify_unmap_all>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1070 <setup@plt>
mov    $0x0,%al
call   1040 <inotify_unmap_all@plt>
mov    $0x0,%al
call   1050 <inotify_map_isempty@plt>
mov    %eax,%edi
call   1030 <assert@plt>
mov    $0x0,%al
call   1060 <teardown@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_inotify_unmap_all>:
push   %rax
xor    %eax,%eax
call   1070 <setup@plt>
xor    %eax,%eax
call   1040 <inotify_unmap_all@plt>
xor    %eax,%eax
call   1050 <inotify_map_isempty@plt>
mov    %eax,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <teardown@plt>

LLVM IR (-O0):
define void @test_inotify_unmap_all() {
%1 = call i32 (...) @setup()
%2 = call i32 (...) @inotify_unmap_all()
%3 = call i32 (...) @inotify_map_isempty()
%4 = call i32 @assert(i32 %3)
%5 = call i32 (...) @teardown()
ret void
}

LLVM IR (-O2):
define void @test_inotify_unmap_all() {
%1 = tail call i32 (...) @setup()
%2 = tail call i32 (...) @inotify_unmap_all()
%3 = tail call i32 (...) @inotify_map_isempty()
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 (...) @teardown()
ret void
}
/* Variables and functions */
long long scm_page_count(long long);
long long scm_page_index(long long a, long long l, long long r, long long c) {
  return scm_page_count(l - 1) + (a << (2 * l)) + (r << l) + c;
}


x86 assembly (clang, -O0):
<scm_page_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
sub    $0x1,%rdi
call   1030 <scm_page_count@plt>
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
shl    $0x1,%rcx
shl    %cl,%rdx
mov    %rdx,%rcx
add    %rcx,%rax
mov    -0x18(%rbp),%rdx
mov    -0x10(%rbp),%rcx
shl    %cl,%rdx
mov    %rdx,%rcx
add    %rcx,%rax
add    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scm_page_index>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %rsi,%r15
mov    %rdi,%r12
lea    -0x1(%rsi),%rdi
call   1030 <scm_page_count@plt>
lea    (%r15,%r15,1),%ecx
shl    %cl,%r12
mov    %r15d,%ecx
shl    %cl,%rbx
add    %r12,%rbx
add    %r14,%rbx
add    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @scm_page_index(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load i64, i64* %6
%10 = sub nsw i64 %9, 1
%11 = call i64 @scm_page_count(i64 %10)
%12 = load i64, i64* %5
%13 = load i64, i64* %6
%14 = mul nsw i64 2, %13
%15 = shl i64 %12, %14
%16 = add nsw i64 %11, %15
%17 = load i64, i64* %7
%18 = load i64, i64* %6
%19 = shl i64 %17, %18
%20 = add nsw i64 %16, %19
%21 = load i64, i64* %8
%22 = add nsw i64 %20, %21
ret i64 %22
}

LLVM IR (-O2):
define i64 @scm_page_index(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = add nsw i64 %1, -1
%6 = tail call i64 @scm_page_count(i64 %5)
%7 = shl nsw i64 %1, 1
%8 = shl i64 %0, %7
%9 = shl i64 %2, %1
%10 = add i64 %9, %8
%11 = add i64 %10, %3
%12 = add i64 %11, %6
ret i64 %12
}
/* Variables and functions */
void *tdefl_write_image_to_png_file_in_memory_ex(void const *, int, int, int,
                                                 int, size_t *, int,
                                                 int /*<<< orphan*/);
void *tdefl_write_image_to_png_file_in_memory(const void *pImage, int w, int h,
                                              int num_chans, int dpm,
                                              size_t *pLen_out) {
  return tdefl_write_image_to_png_file_in_memory_ex(pImage, w, h, num_chans,
                                                    dpm, pLen_out, 6, (0));
}


x86 assembly (clang, -O0):
<tdefl_write_image_to_png_file_in_memory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    -0x20(%rbp),%r9
xor    %eax,%eax
movl   $0x6,(%rsp)
movl   $0x0,0x8(%rsp)
call   1030 <tdefl_write_image_to_png_file_in_memory_ex@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tdefl_write_image_to_png_file_in_memory>:
push   %rax
push   $0x0
push   $0x6
call   1030 <tdefl_write_image_to_png_file_in_memory_ex@plt>
add    $0x10,%rsp
pop    %rcx
ret

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

LLVM IR (-O2):
define i8* @tdefl_write_image_to_png_file_in_memory(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4, i64* %5) {
%7 = tail call i8* @tdefl_write_image_to_png_file_in_memory_ex(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4, i64* %5, i32 6, i32 0)
ret i8* %7
}
int val_int(int x) { return x; }


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

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

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

LLVM IR (-O2):
define i32 @val_int(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int);
int /*<<< orphan*/ stderr;
void graph_allocation_error() {
  fprintf(stderr, "Memory allocation failed. %s: %d\n",
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/mbabic/OptimizationProblems/refs/heads/"
          "master/coloring/src/graph.c",
          15);
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [34 x i8] c"Memory allocation failed. %s: %d\0A\00"
@.str.1 = [157 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/mbabic/OptimizationProblems/refs/heads/master/coloring/src/graph.c\00"
define void @graph_allocation_error() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([157 x i8], [157 x i8]* @.str.1, i64 0, i64 0), i32 15)
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [34 x i8] c"Memory allocation failed. %s: %d\0A\00"
@.str.1 = [157 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/mbabic/OptimizationProblems/refs/heads/master/coloring/src/graph.c\00"
define void @graph_allocation_error() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([157 x i8], [157 x i8]* @.str.1, i64 0, i64 0), i32 15)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void cannotBeClosed(void) { printf("That cannot be closed.\n"); }


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"That cannot be closed.\0A\00"
define void @cannotBeClosed() {
%1 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [23 x i8] c"That cannot be closed.\00"
define void @cannotBeClosed() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOMEM;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void *malloc(size_t);
void *xmalloc(size_t s) {
  void *p = malloc(s);
  if (!p)
    exit(ENOMEM);
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1152 <xmalloc+0x32>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rax
call   1030 <malloc@plt>
test   %rax,%rax
je     112d <xmalloc+0xd>
pop    %rcx
ret
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@ENOMEM = global i32 0
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = load i32, i32* @ENOMEM
%6 = tail call i32 @exit(i32 %5)
unreachable
7: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int librlc_rs_encode_cleanup(char *encoded_data, char *encoded_parity) {
  free(encoded_data);
  free(encoded_parity);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @librlc_rs_encode_cleanup(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @free(i8* %0)
%4 = tail call i32 @free(i8* %1)
ret i32 0
}
int fun1359() { return 1359; }


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

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

LLVM IR (-O0):
define i32 @fun1359() {
ret i32 1359
}

LLVM IR (-O2):
define i32 @fun1359() {
ret i32 1359
}
/* Variables and functions */
int /*<<< orphan*/ sleep(unsigned int);
int /*<<< orphan*/ usleep(unsigned int);
void delay(unsigned int ms) {
  sleep(ms / 1000);
  usleep(ms % 1000 * 1000);
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,%edi
call   1030 <sleep@plt>
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
xor    %edx,%edx
div    %ecx
imul   $0x3e8,%edx,%edi
call   1040 <usleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    %edi,%eax
imul   $0x10624dd3,%rax,%rbx
shr    $0x26,%rbx
mov    %ebx,%edi
call   1030 <sleep@plt>
imul   $0x3e8,%ebx,%eax
sub    %eax,%ebp
imul   $0x3e8,%ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <usleep@plt>

LLVM IR (-O0):
define void @delay(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = udiv i32 %3, 1000
%5 = call i32 @sleep(i32 %4)
%6 = load i32, i32* %2
%7 = urem i32 %6, 1000
%8 = mul i32 %7, 1000
%9 = call i32 @usleep(i32 %8)
ret void
}

LLVM IR (-O2):
define void @delay(i32 %0) {
%2 = udiv i32 %0, 1000
%3 = tail call i32 @sleep(i32 %2)
%4 = urem i32 %0, 1000
%5 = mul nuw nsw i32 %4, 1000
%6 = tail call i32 @usleep(i32 %5)
ret void
}
/* Variables and functions */
double pow(int, double);
double tan(double);
double ssfn_(double phit, double sinphi, double eccen) {
  sinphi *= eccen;
  return (tan(.5 * (1.5707963267948966 + phit)) *
          pow((1. - sinphi) / (1. + sinphi), .5 * eccen));
}


x86 assembly (clang, -O0):
<ssfn_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xec2(%rip),%xmm1
addsd  -0x8(%rbp),%xmm1
movsd  0xea5(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <tan@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  0xe97(%rip),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  0xe8a(%rip),%xmm1
addsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
movsd  0xe6d(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ssfn_>:
sub    $0x18,%rsp
movsd  %xmm2,0x10(%rsp)
mulsd  %xmm2,%xmm1
movsd  %xmm1,(%rsp)
addsd  0xec5(%rip),%xmm0
mulsd  0xec5(%rip),%xmm0
call   1030 <tan@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0xeba(%rip),%xmm0
movapd %xmm0,%xmm1
movsd  (%rsp),%xmm2
subsd  %xmm2,%xmm1
addsd  %xmm0,%xmm2
divsd  %xmm2,%xmm1
cvttsd2si %xmm1,%edi
movsd  0x10(%rsp),%xmm0
mulsd  0xe8b(%rip),%xmm0
call   1040 <pow@plt>
mulsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @ssfn_(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %6
%8 = load double, double* %5
%9 = fmul double %8, %7
store double %9, double* %5
%10 = load double, double* %4
%11 = fadd double 0x3FF921FB54442D18, %10
%12 = fmul double 5.000000e-01, %11
%13 = call double @tan(double %12)
%14 = load double, double* %5
%15 = fsub double 1.000000e+00, %14
%16 = load double, double* %5
%17 = fadd double 1.000000e+00, %16
%18 = fdiv double %15, %17
%19 = fptosi double %18 to i32
%20 = load double, double* %6
%21 = fmul double 5.000000e-01, %20
%22 = call double @pow(i32 %19, double %21)
%23 = fmul double %13, %22
ret double %23
}

LLVM IR (-O2):
define double @ssfn_(double %0, double %1, double %2) {
%4 = fmul double %1, %2
%5 = fadd double %0, 0x3FF921FB54442D18
%6 = fmul double %5, 5.000000e-01
%7 = tail call double @tan(double %6)
%8 = fsub double 1.000000e+00, %4
%9 = fadd double %4, 1.000000e+00
%10 = fdiv double %8, %9
%11 = fptosi double %10 to i32
%12 = fmul double %2, 5.000000e-01
%13 = tail call double @pow(i32 %11, double %12)
%14 = fmul double %7, %13
ret double %14
}
/* Type definitions */
typedef int /*<<< orphan*/ buffer;

/* Variables and functions */
int /*<<< orphan*/ trap_Argv(int, char *, int);
char *UI_Argv(int arg) {
  static char buffer[1024];
  trap_Argv(arg, buffer, sizeof(buffer));
  return buffer;
}


x86 assembly (clang, -O0):
<UI_Argv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0x2f1b(%rip),%rsi
mov    $0x400,%edx
call   1030 <trap_Argv@plt>
lea    0x2f0a(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UI_Argv>:
push   %rbx
lea    0x2f28(%rip),%rbx
mov    %rbx,%rsi
mov    $0x400,%edx
call   1030 <trap_Argv@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@UI_Argv.buffer = internal global [1024 x i8] zeroinitializer
define i8* @UI_Argv(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @trap_Argv(i32 %3, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @UI_Argv.buffer, i64 0, i64 0), i32 1024)
ret i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @UI_Argv.buffer, i64 0, i64 0)
}

LLVM IR (-O2):
@UI_Argv.buffer = internal global [1024 x i8] zeroinitializer
define i8* @UI_Argv(i32 %0) {
%2 = tail call i32 @trap_Argv(i32 %0, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @UI_Argv.buffer, i64 0, i64 0), i32 1024)
ret i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @UI_Argv.buffer, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ local_bind(int);
int main(int argc, char *argv[]) {
  local_bind(31337);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @local_bind(i32 31337)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ glk_exit();
int /*<<< orphan*/ gms_fatal(char *);
void *malloc(size_t);
void *gms_malloc(size_t size) {
  void *pointer;
  pointer = malloc(size);
  if (!pointer) {
    gms_fatal("GLK: Out of system memory");
    glk_exit();
  }
  return pointer;
}


x86 assembly (clang, -O0):
<gms_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1167 <gms_malloc+0x37>
lea    0xea5(%rip),%rdi
call   1040 <gms_fatal@plt>
mov    $0x0,%al
call   1050 <glk_exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gms_malloc>:
push   %rbx
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1151 <gms_malloc+0x21>
lea    0xebb(%rip),%rdi
call   1040 <gms_fatal@plt>
xor    %eax,%eax
call   1050 <glk_exit@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"GLK: Out of system memory\00"
define i8* @gms_malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %11, label %8
8: ; preds = %1
%9 = call i32 @gms_fatal(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (...) @glk_exit()
br label %11
11: ; preds = %8, %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [26 x i8] c"GLK: Out of system memory\00"
define noalias i8* @gms_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @gms_fatal(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 (...) @glk_exit()
br label %7
7: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ WSACleanup();
extern void closeNetProcess() { WSACleanup(); }


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

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

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

LLVM IR (-O2):
define void @closeNetProcess() {
%1 = tail call i32 (...) @WSACleanup()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TriEnDes(unsigned char *, unsigned char *, unsigned char *);
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char *, unsigned char);
int EncryptMag2(unsigned char *MagData, unsigned char MagDataLen,
                unsigned char *Out, unsigned char *TheKey) {
  memcpy(Out, MagData, MagDataLen);
  TriEnDes(MagData + MagDataLen - 9, Out + MagDataLen - 9, TheKey);
  return 0;
}


x86 assembly (clang, -O0):
<EncryptMag2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x9(%rbp),%al
movzbl %al,%edx
call   1030 <memcpy@plt>
mov    -0x8(%rbp),%rdi
movzbl -0x9(%rbp),%eax
cltq
add    %rax,%rdi
add    $0xfffffffffffffff7,%rdi
mov    -0x18(%rbp),%rsi
movzbl -0x9(%rbp),%eax
cltq
add    %rax,%rsi
add    $0xfffffffffffffff7,%rsi
mov    -0x20(%rbp),%rdx
call   1040 <TriEnDes@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EncryptMag2>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %esi,%ebp
mov    %rdi,%rbx
mov    %rdx,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1030 <memcpy@plt>
mov    %ebp,%eax
lea    (%rbx,%rax,1),%rdi
add    $0xfffffffffffffff7,%rdi
lea    (%r15,%rax,1),%rsi
add    $0xfffffffffffffff7,%rsi
mov    %r14,%rdx
call   1040 <TriEnDes@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @EncryptMag2(i8* %0, i8 zeroext %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i8 %1, i8* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %7
%10 = load i8*, i8** %5
%11 = load i8, i8* %6
%12 = call i32 @memcpy(i8* %9, i8* %10, i8 zeroext %11)
%13 = load i8*, i8** %5
%14 = load i8, i8* %6
%15 = zext i8 %14 to i32
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %13, i64 %16
%18 = getelementptr inbounds i8, i8* %17, i64 -9
%19 = load i8*, i8** %7
%20 = load i8, i8* %6
%21 = zext i8 %20 to i32
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %19, i64 %22
%24 = getelementptr inbounds i8, i8* %23, i64 -9
%25 = load i8*, i8** %8
%26 = call i32 @TriEnDes(i8* %18, i8* %24, i8* %25)
ret i32 0
}

LLVM IR (-O2):
define i32 @EncryptMag2(i8* %0, i8 zeroext %1, i8* %2, i8* %3) {
%5 = tail call i32 @memcpy(i8* %2, i8* %0, i8 zeroext %1)
%6 = zext i8 %1 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = getelementptr inbounds i8, i8* %7, i64 -9
%9 = getelementptr inbounds i8, i8* %2, i64 %6
%10 = getelementptr inbounds i8, i8* %9, i64 -9
%11 = tail call i32 @TriEnDes(i8* %8, i8* %10, i8* %3)
ret i32 0
}
unsigned int get_uint32(unsigned char *p) {
  return (p[0] << 24) + (p[1] << 16) + (p[2] << 8) + p[3];
}


x86 assembly (clang, -O0):
<get_uint32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_uint32>:
mov    (%rdi),%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @get_uint32(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl i32 %6, 24
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 16
%13 = add nsw i32 %7, %12
%14 = load i8*, i8** %2
%15 = getelementptr inbounds i8, i8* %14, i64 2
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = add nsw i32 %13, %18
%20 = load i8*, i8** %2
%21 = getelementptr inbounds i8, i8* %20, i64 3
%22 = load i8, i8* %21
%23 = zext i8 %22 to i32
%24 = add nsw i32 %19, %23
ret i32 %24
}

LLVM IR (-O2):
define i32 @get_uint32(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = shl nuw i32 %3, 24
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = shl nuw nsw i32 %7, 16
%9 = or i32 %8, %4
%10 = getelementptr inbounds i8, i8* %0, i64 2
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = shl nuw nsw i32 %12, 8
%14 = or i32 %9, %13
%15 = getelementptr inbounds i8, i8* %0, i64 3
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = or i32 %14, %17
ret i32 %18
}
int test_imm_01int16_reg(short val) {
  return ((val) & (0x01 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_01int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0x1,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_01int16_reg(i16 signext %0) {
%2 = and i16 %0, 1
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int tcparent(int);
int tccontext(int tc) {
  if (tc > 0 && tc < 541) {
    int tp = tcparent(tc);
    if (tp > 0)
      return tp;
    return tc;
  }
  return -1;
}


x86 assembly (clang, -O0):
<tccontext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    115d <tccontext+0x4d>
cmpl   $0x21d,-0x8(%rbp)
jge    115d <tccontext+0x4d>
mov    -0x8(%rbp),%edi
call   1030 <tcparent@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    1152 <tccontext+0x42>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1164 <tccontext+0x54>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1164 <tccontext+0x54>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tccontext>:
push   %rbx
mov    %edi,%ebx
lea    -0x1(%rbx),%ecx
mov    $0xffffffff,%eax
cmp    $0x21b,%ecx
ja     1131 <tccontext+0x21>
mov    %ebx,%edi
call   1030 <tcparent@plt>
test   %eax,%eax
cmovg  %eax,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @tccontext(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 540
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @tcparent(i32 %0)
%6 = icmp sgt i32 %5, 0
%7 = select i1 %6, i32 %5, i32 %0
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ -1, %1 ]
ret i32 %9
}
void dowarp(fl) int fl;
{
  int c;
  double d;
  if (getcodi(&c, &d))
    return;
  warp(fl, c, d);
}


x86 assembly (clang, -O0):
<dowarp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <getcodi@plt>
cmp    $0x0,%eax
je     1148 <dowarp+0x28>
jmp    115a <dowarp+0x3a>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
movsd  -0x10(%rbp),%xmm0
mov    $0x1,%al
call   1040 <warp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dowarp>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
lea    0x4(%rsp),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1030 <getcodi@plt>
test   %eax,%eax
jne    114f <dowarp+0x2f>
mov    0x4(%rsp),%esi
movsd  0x8(%rsp),%xmm0
mov    %ebx,%edi
mov    $0x1,%al
call   1040 <warp@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @dowarp(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
store i32 %0, i32* %2
%5 = call i32 (i32*, double*, ...) bitcast (i32 (...)* @getcodi to i32 (i32*, double*, ...)*)(i32* %3, double* %4)
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
br label %13
8: ; preds = %1
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = load double, double* %4
%12 = call i32 (i32, i32, double, ...) bitcast (i32 (...)* @warp to i32 (i32, i32, double, ...)*)(i32 %9, i32 %10, double %11)
br label %13
13: ; preds = %8, %7
ret void
}

LLVM IR (-O2):
define void @dowarp(i32 %0) {
%2 = alloca i32
%3 = alloca double
%4 = bitcast i32* %2 to i8*
%5 = bitcast double* %3 to i8*
%6 = call i32 (i32*, double*, ...) bitcast (i32 (...)* @getcodi to i32 (i32*, double*, ...)*)(i32* %2, double* %3)
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i32, i32* %2
%10 = load double, double* %3
%11 = call i32 (i32, i32, double, ...) bitcast (i32 (...)* @warp to i32 (i32, i32, double, ...)*)(i32 %0, i32 %9, double %10)
br label %12
12: ; preds = %1, %8
ret void
}
/* Type definitions */
struct timespec {
  long tv_sec;
  unsigned long tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
unsigned long int getNs() {
  struct timespec ts;
  clock_gettime(CLOCK_REALTIME, &ts);
  return ts.tv_sec * (1000000000L) + ts.tv_nsec;
}


x86 assembly (clang, -O0):
<getNs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <clock_gettime@plt>
imul   $0x3b9aca00,-0x10(%rbp),%rax
3b
add    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getNs>:
sub    $0x18,%rsp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <clock_gettime@plt>
imul   $0x3b9aca00,0x8(%rsp),%rax
9a 3b
add    0x10(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
@CLOCK_REALTIME = global i32 0
define i64 @getNs() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_REALTIME
%3 = call i32 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%5 = load i64, i64* %4
%6 = mul nsw i64 %5, 1000000000
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%8 = load i64, i64* %7
%9 = add i64 %6, %8
ret i64 %9
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
@CLOCK_REALTIME = global i32 0
define i64 @getNs() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_REALTIME
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load i64, i64* %5
%7 = mul nsw i64 %6, 1000000000
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%9 = load i64, i64* %8
%10 = add i64 %7, %9
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
int strncasecmp(char *, char *, int);
void strncasecmp_diff_length_5() {
  char *x = "abcde";
  char *y = "aBd";
  clang_analyzer_eval(strncasecmp(x, y, 3) == -1);
}


x86 assembly (clang, -O0):
<strncasecmp_diff_length_5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xecc(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x3,%edx
call   1030 <strncasecmp@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):
<strncasecmp_diff_length_5>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed7(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncasecmp@plt>
xor    %edi,%edi
cmp    $0xffffffff,%eax
sete   %dil
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"abcde\00"
@.str.1 = [4 x i8] c"aBd\00"
define void @strncasecmp_diff_length_5() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i32 @strncasecmp(i8* %3, i8* %4, i32 3)
%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 = [6 x i8] c"abcde\00"
@.str.1 = [4 x i8] c"aBd\00"
define void @strncasecmp_diff_length_5() {
%1 = tail call i32 @strncasecmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%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 */
int /*<<< orphan*/ is_prime(int);
int test_non_prime() { return !is_prime(8) && !is_prime(4453); }


x86 assembly (clang, -O0):
<test_non_prime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x8,%edi
call   1030 <is_prime@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x1(%rbp)
jne    1147 <test_non_prime+0x37>
mov    $0x1165,%edi
call   1030 <is_prime@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_non_prime>:
push   %rax
mov    $0x8,%edi
call   1030 <is_prime@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
je     1125 <test_non_prime+0x15>
pop    %rcx
ret
mov    $0x1165,%edi
call   1030 <is_prime@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @test_non_prime() {
%1 = call i32 @is_prime(i32 8)
%2 = icmp ne i32 %1, 0
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = call i32 @is_prime(i32 4453)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
br label %7
7: ; preds = %3, %0
%8 = phi i1 [ false, %0 ], [ %6, %3 ]
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_non_prime() {
%1 = tail call i32 @is_prime(i32 8)
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i32 @is_prime(i32 4453)
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 0, %0 ], [ %6, %3 ]
ret i32 %8
}
/* Type definitions */
struct bootimg {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ libbootimg_destroy(struct bootimg *);
int libbootimg_write_img(struct bootimg *, char const *);
int libbootimg_write_img_and_destroy(struct bootimg *b, const char *dest) {
  int res = libbootimg_write_img(b, dest);
  libbootimg_destroy(b);
  return res;
}


x86 assembly (clang, -O0):
<libbootimg_write_img_and_destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <libbootimg_write_img@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <libbootimg_destroy@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libbootimg_write_img_and_destroy>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <libbootimg_write_img@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <libbootimg_destroy@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.bootimg = type { i32 }
define i32 @libbootimg_write_img_and_destroy(%struct.bootimg* %0, i8* %1) {
%3 = alloca %struct.bootimg*
%4 = alloca i8*
%5 = alloca i32
store %struct.bootimg* %0, %struct.bootimg** %3
store i8* %1, i8** %4
%6 = load %struct.bootimg*, %struct.bootimg** %3
%7 = load i8*, i8** %4
%8 = call i32 @libbootimg_write_img(%struct.bootimg* %6, i8* %7)
store i32 %8, i32* %5
%9 = load %struct.bootimg*, %struct.bootimg** %3
%10 = call i32 @libbootimg_destroy(%struct.bootimg* %9)
%11 = load i32, i32* %5
ret i32 %11
}

LLVM IR (-O2):
%struct.bootimg = type { i32 }
define i32 @libbootimg_write_img_and_destroy(%struct.bootimg* %0, i8* %1) {
%3 = tail call i32 @libbootimg_write_img(%struct.bootimg* %0, i8* %1)
%4 = tail call i32 @libbootimg_destroy(%struct.bootimg* %0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ outputGroup(int, int);
void outputFrame(void) {
  outputGroup(0, 3);
  outputGroup(4, 7);
  outputGroup(8, 11);
  outputGroup(12, 15);
  outputGroup(16, 19);
  outputGroup(20, 23);
  outputGroup(24, 27);
  outputGroup(28, 31);
}


x86 assembly (clang, -O0):
<outputFrame>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x3,%esi
call   1030 <outputGroup@plt>
mov    $0x4,%edi
mov    $0x7,%esi
call   1030 <outputGroup@plt>
mov    $0x8,%edi
mov    $0xb,%esi
call   1030 <outputGroup@plt>
mov    $0xc,%edi
mov    $0xf,%esi
call   1030 <outputGroup@plt>
mov    $0x10,%edi
mov    $0x13,%esi
call   1030 <outputGroup@plt>
mov    $0x14,%edi
mov    $0x17,%esi
call   1030 <outputGroup@plt>
mov    $0x18,%edi
mov    $0x1b,%esi
call   1030 <outputGroup@plt>
mov    $0x1c,%edi
mov    $0x1f,%esi
call   1030 <outputGroup@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<outputFrame>:
push   %rax
xor    %edi,%edi
mov    $0x3,%esi
call   1030 <outputGroup@plt>
mov    $0x4,%edi
mov    $0x7,%esi
call   1030 <outputGroup@plt>
mov    $0x8,%edi
mov    $0xb,%esi
call   1030 <outputGroup@plt>
mov    $0xc,%edi
mov    $0xf,%esi
call   1030 <outputGroup@plt>
mov    $0x10,%edi
mov    $0x13,%esi
call   1030 <outputGroup@plt>
mov    $0x14,%edi
mov    $0x17,%esi
call   1030 <outputGroup@plt>
mov    $0x18,%edi
mov    $0x1b,%esi
call   1030 <outputGroup@plt>
mov    $0x1c,%edi
mov    $0x1f,%esi
pop    %rax
jmp    1030 <outputGroup@plt>

LLVM IR (-O0):
define void @outputFrame() {
%1 = call i32 @outputGroup(i32 0, i32 3)
%2 = call i32 @outputGroup(i32 4, i32 7)
%3 = call i32 @outputGroup(i32 8, i32 11)
%4 = call i32 @outputGroup(i32 12, i32 15)
%5 = call i32 @outputGroup(i32 16, i32 19)
%6 = call i32 @outputGroup(i32 20, i32 23)
%7 = call i32 @outputGroup(i32 24, i32 27)
%8 = call i32 @outputGroup(i32 28, i32 31)
ret void
}

LLVM IR (-O2):
define void @outputFrame() {
%1 = tail call i32 @outputGroup(i32 0, i32 3)
%2 = tail call i32 @outputGroup(i32 4, i32 7)
%3 = tail call i32 @outputGroup(i32 8, i32 11)
%4 = tail call i32 @outputGroup(i32 12, i32 15)
%5 = tail call i32 @outputGroup(i32 16, i32 19)
%6 = tail call i32 @outputGroup(i32 20, i32 23)
%7 = tail call i32 @outputGroup(i32 24, i32 27)
%8 = tail call i32 @outputGroup(i32 28, i32 31)
ret void
}
int test_imm_83int16_mem(short *val) {
  return ((*val) & (-0x83 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_83int16_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, -131
%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_83int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -131
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int foo(void *arg) {
  printf("hello\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [6 x i8] c"hello\00"
define i32 @foo(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int padcon_get_dobldobl_pole_step(double *step) {
  int fail;
  int precision = 1;
  int *b;
  fail = _ada_use_c2phc4c(886, &precision, b, step, 0);
  return fail;
}


x86 assembly (clang, -O0):
<padcon_get_dobldobl_pole_step>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    $0x376,%edi
lea    -0x10(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<padcon_get_dobldobl_pole_step>:
push   %rax
mov    %rdi,%rcx
movl   $0x1,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x376,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @padcon_get_dobldobl_pole_step(double* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 1, i32* %2
%4 = call i32 @_ada_use_c2phc4c(i32 886, i32* %2, i32* undef, double* %0, i32 0)
ret i32 %4
}
/* Variables and functions */
long long lround(double);
double pow(double, int);
double sqrt(double);
long long fibonacci(int n) {
  return lround(
      (pow(0.5 + 0.5 * sqrt(5.0), n) - pow(0.5 - 0.5 * sqrt(5.0), n)) /
      sqrt(5.0));
}


x86 assembly (clang, -O0):
<fibonacci>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movsd  0xebd(%rip),%xmm0
call   1050 <sqrt@plt>
movsd  0xec0(%rip),%xmm1
mulsd  %xmm1,%xmm0
addsd  %xmm1,%xmm0
mov    -0x4(%rbp),%edi
call   1040 <pow@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  0xe93(%rip),%xmm0
call   1050 <sqrt@plt>
movsd  0xe8e(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe8a(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    -0x4(%rbp),%edi
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe55(%rip),%xmm0
call   1050 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
divsd  %xmm1,%xmm0
call   1030 <lround@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibonacci>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
movsd  0xed1(%rip),%xmm0
call   1040 <pow@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0xec6(%rip),%xmm0
mov    %ebx,%edi
call   1040 <pow@plt>
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
divsd  0xeb5(%rip),%xmm1
movapd %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbx
jmp    1030 <lround@plt>

LLVM IR (-O0):
define i64 @fibonacci(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call double @sqrt(double 5.000000e+00)
%4 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %3, double 5.000000e-01)
%5 = load i32, i32* %2
%6 = call double @pow(double %4, i32 %5)
%7 = call double @sqrt(double 5.000000e+00)
%8 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %7, double 5.000000e-01)
%9 = load i32, i32* %2
%10 = call double @pow(double %8, i32 %9)
%11 = fsub double %6, %10
%12 = call double @sqrt(double 5.000000e+00)
%13 = fdiv double %11, %12
%14 = call i64 @lround(double %13)
ret i64 %14
}

LLVM IR (-O2):
define i64 @fibonacci(i32 %0) {
%2 = tail call double @pow(double 0x3FF9E3779B97F4A8, i32 %0)
%3 = tail call double @pow(double 0xBFE3C6EF372FE950, i32 %0)
%4 = fsub double %2, %3
%5 = fdiv double %4, 0x4001E3779B97F4A8
%6 = tail call i64 @lround(double %5)
ret i64 %6
}
/* Type definitions */
typedef int u_int32_t;

/* Variables and functions */
int RL(int, int);
u_int32_t sha1_round(u_int32_t (*FUNC)(u_int32_t, u_int32_t, u_int32_t),
                     u_int32_t a, u_int32_t b, u_int32_t c, u_int32_t d,
                     u_int32_t e, u_int32_t i, u_int32_t n) {
  return RL(a, 5) + FUNC(b, c, d) + e + i + n;
}


x86 assembly (clang, -O0):
<sha1_round>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
mov    -0xc(%rbp),%edi
mov    $0x5,%esi
call   1030 <RL@plt>
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   *%rax
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
add    %ecx,%eax
add    -0x1c(%rbp),%eax
add    0x10(%rbp),%eax
add    0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sha1_round>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9d,%ebx
mov    %r8d,%r14d
mov    %ecx,%r15d
mov    %edx,%ebp
mov    %rdi,%r12
mov    %esi,%edi
mov    $0x5,%esi
call   1030 <RL@plt>
mov    %eax,%r13d
mov    %ebp,%edi
mov    %r15d,%esi
mov    %r14d,%edx
call   *%r12
add    0x40(%rsp),%ebx
add    0x48(%rsp),%ebx
add    %r13d,%ebx
add    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @sha1_round(i32 (i32, i32, i32)* nocapture %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = tail call i32 @RL(i32 %1, i32 5)
%10 = tail call i32 %0(i32 %2, i32 %3, i32 %4)
%11 = add i32 %6, %5
%12 = add i32 %11, %7
%13 = add i32 %12, %9
%14 = add i32 %13, %10
ret i32 %14
}
void instruc_34() {}


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

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

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

LLVM IR (-O2):
define void @instruc_34() {
ret void
}