xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ EINTR;
int close(int);
scalar_t__ errno;
int close_noeintr(int fd) {
  int ret;
  while ((ret = close(fd)) == -1 && errno == EINTR)
    ;
  return ret;
}


x86 assembly (clang, -O0):
<close_noeintr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
mov    %eax,%ecx
mov    %ecx,-0x8(%rbp)
xor    %eax,%eax
cmp    $0xffffffff,%ecx
mov    %al,-0x9(%rbp)
jne    1150 <close_noeintr+0x40>
mov    0x2ea3(%rip),%rax
mov    (%rax),%rax
mov    0x2e91(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1160 <close_noeintr+0x50>
jmp    1165 <close_noeintr+0x55>
jmp    111b <close_noeintr+0xb>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_noeintr>:
push   %r15
push   %r14
push   %rbx
mov    %edi,%ebx
mov    0x2ec2(%rip),%r14
mov    0x2eb3(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
jne    1144 <close_noeintr+0x34>
mov    (%r15),%rcx
cmp    %rcx,(%r14)
je     1130 <close_noeintr+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@errno = global i64 0
@EINTR = global i64 0
define i32 @close_noeintr(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 @close(i32 %0)
%4 = icmp eq i32 %3, -1
%5 = load i64, i64* @errno
%6 = load i64, i64* @EINTR
%7 = icmp eq i64 %5, %6
%8 = select i1 %4, i1 %7, i1 false
br i1 %8, label %2, label %9
9: ; preds = %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, char *, unsigned int);
void swap_values(void *a, void *b, unsigned size) {
  char tmp[size];
  memcpy(tmp, a, size);
  memcpy(a, b, size);
  memcpy(b, tmp, size);
}


x86 assembly (clang, -O0):
<swap_values>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x30(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x30(%rbp),%rsi
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap_values>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %edx,%r12d
mov    %rsi,%r14
mov    %rdi,%r15
mov    %edx,%eax
mov    %rsp,%rbx
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <memcpy@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %r12d,%edx
call   1030 <memcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r12d,%edx
call   1030 <memcpy@plt>
lea    -0x20(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @swap_values(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%9 = load i32, i32* %6
%10 = zext i32 %9 to i64
%11 = call i8* @llvm.stacksave()
store i8* %11, i8** %7
%12 = alloca i8, i64 %10
store i64 %10, i64* %8
%13 = load i8*, i8** %4
%14 = load i32, i32* %6
%15 = call i32 @memcpy(i8* %12, i8* %13, i32 %14)
%16 = load i8*, i8** %4
%17 = load i8*, i8** %5
%18 = load i32, i32* %6
%19 = call i32 @memcpy(i8* %16, i8* %17, i32 %18)
%20 = load i8*, i8** %5
%21 = load i32, i32* %6
%22 = call i32 @memcpy(i8* %20, i8* %12, i32 %21)
%23 = load i8*, i8** %7
ret void
}

LLVM IR (-O2):
define void @swap_values(i8* %0, i8* %1, i32 %2) {
%4 = zext i32 %2 to i64
%5 = alloca i8, i64 %4
%6 = call i32 @memcpy(i8* %5, i8* %0, i32 %2)
%7 = call i32 @memcpy(i8* %0, i8* %1, i32 %2)
%8 = call i32 @memcpy(i8* %1, i8* %5, i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int8_t;
typedef int int32_t;

/* Variables and functions */
int32_t hush_exit(int8_t **args) { return 618; }


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

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

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

LLVM IR (-O2):
define i32 @hush_exit(i32** nocapture readnone %0) {
ret i32 618
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void fftw_export_wisdom_to_file(FILE *file) {}


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

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

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

LLVM IR (-O2):
define void @fftw_export_wisdom_to_file(i32* nocapture %0) {
ret void
}
void video_update1(int *forced) {}


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

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

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

LLVM IR (-O2):
define void @video_update1(i32* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SystemCall(int);
void Diff16bitUnFilter(void *source, void *dest) { SystemCall(24); }


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

x86 assembly (clang, -O2):
<Diff16bitUnFilter>:
mov    $0x18,%edi
jmp    1030 <SystemCall@plt>

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

LLVM IR (-O2):
define void @Diff16bitUnFilter(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 @SystemCall(i32 24)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_29() {
  Assert_real((isqrt(29) == 5),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/stdlib/isqrt.c",
              150, ("Integer square root of 29 should be 5"));
}


x86 assembly (clang, -O0):
<t_sqrt_29>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1d,%edi
call   1030 <isqrt@plt>
cmp    $0x5,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x96,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_29>:
push   %rax
mov    $0x1d,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x5,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x96,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [38 x i8] c"Integer square root of 29 should be 5\00"
define void @t_sqrt_29() {
%1 = call i32 @isqrt(i32 29)
%2 = icmp eq i32 %1, 5
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 150, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [38 x i8] c"Integer square root of 29 should be 5\00"
define void @t_sqrt_29() {
%1 = tail call i32 @isqrt(i32 29)
%2 = icmp eq i32 %1, 5
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 150, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int mbed_trace_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @mbed_trace_init() {
ret i32 0
}
/* Variables and functions */
int strcmp(char *const, char *const);
int ef_cmp_strings(const void *v1, const void *v2) {
  char *const *s1 = (char *const *)v1;
  char *const *s2 = (char *const *)v2;
  return strcmp(*s1, *s2);
}


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

x86 assembly (clang, -O2):
<ef_cmp_strings>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @ef_cmp_strings(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i8**
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i8**
store i8** %8, i8*** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i8**
store i8** %10, i8*** %6
%11 = load i8**, i8*** %5
%12 = load i8*, i8** %11
%13 = load i8**, i8*** %6
%14 = load i8*, i8** %13
%15 = call i32 @strcmp(i8* %12, i8* %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @ef_cmp_strings(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = bitcast i8* %1 to i8**
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %5, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ glmATan3f(float *, float const *);
int /*<<< orphan*/ glmDegrees3f_(float *);
void glmATanD3f(float out[3], const float x[3]) {
  glmATan3f(out, x);
  glmDegrees3f_(out);
}


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

x86 assembly (clang, -O2):
<glmATanD3f>:
push   %rbx
mov    %rdi,%rbx
call   1040 <glmATan3f@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <glmDegrees3f_@plt>

LLVM IR (-O0):
define void @glmATanD3f(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = load float*, float** %4
%7 = call i32 @glmATan3f(float* %5, float* %6)
%8 = load float*, float** %3
%9 = call i32 @glmDegrees3f_(float* %8)
ret void
}

LLVM IR (-O2):
define void @glmATanD3f(float* %0, float* %1) {
%3 = tail call i32 @glmATan3f(float* %0, float* %1)
%4 = tail call i32 @glmDegrees3f_(float* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int f2(int, int);
int f1() {
  int one;
  int two;
  int x;
  one = two;
  assert(one - two == 0);
  assert(one == two);
  x = f2(one, two);
  assert(one - two == 0);
  assert(one == two);
  assert(x == 48);
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <f2@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
cmpl   $0x30,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
push   %rbx
xor    %edi,%edi
call   1040 <assert@plt>
xor    %edi,%edi
call   1040 <assert@plt>
call   1030 <f2@plt>
mov    %eax,%ebx
xor    %edi,%edi
call   1040 <assert@plt>
xor    %edi,%edi
call   1040 <assert@plt>
xor    %edi,%edi
cmp    $0x30,%ebx
sete   %dil
pop    %rbx
jmp    1040 <assert@plt>

LLVM IR (-O0):
define i32 @f1() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = load i32, i32* %3
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = sub nsw i32 %6, %7
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = icmp eq i32 %12, %13
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
%17 = load i32, i32* %2
%18 = load i32, i32* %3
%19 = call i32 @f2(i32 %17, i32 %18)
store i32 %19, i32* %4
%20 = load i32, i32* %2
%21 = load i32, i32* %3
%22 = sub nsw i32 %20, %21
%23 = icmp eq i32 %22, 0
%24 = zext i1 %23 to i32
%25 = call i32 @assert(i32 %24)
%26 = load i32, i32* %2
%27 = load i32, i32* %3
%28 = icmp eq i32 %26, %27
%29 = zext i1 %28 to i32
%30 = call i32 @assert(i32 %29)
%31 = load i32, i32* %4
%32 = icmp eq i32 %31, 48
%33 = zext i1 %32 to i32
%34 = call i32 @assert(i32 %33)
%35 = load i32, i32* %1
ret i32 %35
}

LLVM IR (-O2):
define i32 @f1() {
%1 = tail call i32 @assert(i32 0)
%2 = tail call i32 @assert(i32 0)
%3 = tail call i32 @f2(i32 undef, i32 undef)
%4 = tail call i32 @assert(i32 0)
%5 = tail call i32 @assert(i32 0)
%6 = icmp eq i32 %3, 48
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void my_handler(int nsig) { printf("Receive signal %d, CTRL-C pressed\n"); }


x86 assembly (clang, -O0):
<my_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [35 x i8] c"Receive signal %d, CTRL-C pressed\0A\00"
define void @my_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"Receive signal %d, CTRL-C pressed\0A\00"
define void @my_handler(i32 %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep1(int);
int main(void) {
  printf("start.....");
  sleep1(2);
  printf("end.....");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
call   1040 <sleep1@plt>
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"start.....\00"
@.str.1 = [9 x i8] c"end.....\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @sleep1(i32 2)
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
int avg_2(void *context, int pixel1, int pixel2) {
  return (pixel1 + pixel2 + 1) >> 1;
}


x86 assembly (clang, -O0):
<avg_2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
add    $0x1,%eax
sar    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<avg_2>:
lea    (%rsi,%rdx,1),%eax
add    $0x1,%eax
sar    %eax
ret

LLVM IR (-O0):
define i32 @avg_2(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = load i32, i32* %6
%9 = add nsw i32 %7, %8
%10 = add nsw i32 %9, 1
%11 = ashr i32 %10, 1
ret i32 %11
}

LLVM IR (-O2):
define i32 @avg_2(i8* nocapture readnone %0, i32 %1, i32 %2) {
%4 = add i32 %1, 1
%5 = add i32 %4, %2
%6 = ashr i32 %5, 1
ret i32 %6
}
int test_imm_04uint8_mem(unsigned char *val) {
  return ((*val) & (-0x04 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_04uint8_mem>:
cmpb   $0x4,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_04uint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, -4
%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_04uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp ult i8 %2, 4
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int copy_quaddobl_target_solutions_to_container(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(265, a, b, c, 0);
  return fail;
}


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

x86 assembly (clang, -O2):
<copy_quaddobl_target_solutions_to_container>:
mov    $0x109,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc@plt>

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

LLVM IR (-O2):
define i32 @copy_quaddobl_target_solutions_to_container() {
%1 = tail call i32 @_ada_use_c2phc(i32 265, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void QEIFilterDisable(uint32_t ui32Base) {
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000000))) &= ~(0x00002000);
}


x86 assembly (clang, -O0):
<QEIFilterDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x0,%eax
cltq
mov    (%rax),%ecx
and    $0xffffdfff,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<QEIFilterDisable>:
movslq %edi,%rax
andl   $0xffffdfff,(%rax)
ret

LLVM IR (-O0):
define void @QEIFilterDisable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 0
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = and i32 %7, -8193
store volatile i32 %8, i32* %6
ret void
}

LLVM IR (-O2):
define void @QEIFilterDisable(i32 %0) {
%2 = sext i32 %0 to i64
%3 = inttoptr i64 %2 to i32*
%4 = load volatile i32, i32* %3
%5 = and i32 %4, -8193
store volatile i32 %5, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hexstring(int);
int /*<<< orphan*/ uart_putc(char);
void hexstring_signed(unsigned int d) {
  if (d < (0xFFFFFFFF >> 1))
    hexstring(d);
  else {
    uart_putc('-');
    hexstring(0xFFFFFFFF - d);
  }
}


x86 assembly (clang, -O0):
<hexstring_signed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x7fffffff,-0x4(%rbp)
jae    1145 <hexstring_signed+0x25>
mov    -0x4(%rbp),%edi
call   1040 <hexstring@plt>
jmp    115c <hexstring_signed+0x3c>
mov    $0x2d,%edi
call   1030 <uart_putc@plt>
mov    $0xffffffff,%edi
sub    -0x4(%rbp),%edi
call   1040 <hexstring@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hexstring_signed>:
push   %rbx
mov    %edi,%ebx
cmp    $0x7fffffff,%edi
jb     1137 <hexstring_signed+0x17>
mov    $0x2d,%edi
call   1030 <uart_putc@plt>
not    %ebx
mov    %ebx,%edi
pop    %rbx
jmp    1040 <hexstring@plt>

LLVM IR (-O0):
define void @hexstring_signed(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ult i32 %3, 2147483647
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i32 @hexstring(i32 %6)
br label %13
8: ; preds = %1
%9 = call i32 @uart_putc(i8 signext 45)
%10 = load i32, i32* %2
%11 = sub i32 -1, %10
%12 = call i32 @hexstring(i32 %11)
br label %13
13: ; preds = %8, %5
ret void
}

LLVM IR (-O2):
define void @hexstring_signed(i32 %0) {
%2 = icmp ult i32 %0, 2147483647
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @uart_putc(i8 signext 45)
%5 = xor i32 %0, -1
br label %6
6: ; preds = %1, %3
%7 = phi i32 [ %5, %3 ], [ %0, %1 ]
%8 = tail call i32 @hexstring(i32 %7)
ret void
}
void console_yes_ticks(void) {}


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

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

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

LLVM IR (-O2):
define void @console_yes_ticks() {
ret void
}
void fa33(void) {
P0A:
  goto P0A;
  ({
    P01A:
      goto P01A;
      ({
        p012A:
          goto p012A;
          goto a;
        P012A:
          goto P012A;
          0;
      });
    P01B:
      goto P01B;
      ({
        P013A:
          goto P013A;
          0;
      });
    a:
      0;
  });
P0B:
  goto P0B;
  ({
    P02A:
      goto P02A;
      ({
        P024A:
          goto P024A;
          0;
      });
    P02B:
      goto P02B;
      ({
        P025A:
          goto P025A;
          0;
      });
    P02C:
      goto P02C;
      0;
  });
P0C:
  goto P0C;
  0;
P0D:
  goto P0D;
}


x86 assembly (clang, -O0):
<fa33>:
push   %rbp
mov    %rsp,%rbp
jmp    1104 <fa33+0x4>

x86 assembly (clang, -O2):
<fa33>:
jmp    1100 <fa33>

LLVM IR (-O0):
define void @fa33() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
br label %7
7: ; preds = %7, %0
br label %7
8: ; No predecessors!
br label %9
9: ; preds = %9, %8
br label %9
10: ; No predecessors!
br label %11
11: ; preds = %11, %10
br label %11
12: ; preds = %12
br label %12
13: ; preds = %13
br label %13
14: ; No predecessors!
br label %15
15: ; preds = %15, %14
br label %15
16: ; preds = %16
br label %16
17: ; No predecessors!
br label %18
18: ; preds = %18, %17
br label %18
19: ; No predecessors!
br label %20
20: ; preds = %20, %19
br label %20
21: ; preds = %21
br label %21
22: ; No predecessors!
br label %23
23: ; preds = %23, %22
br label %23
24: ; preds = %24
br label %24
25: ; preds = %25
br label %25
26: ; preds = %26
br label %26
}

LLVM IR (-O2):
define void @fa33() {
br label %1
1: ; preds = %1, %0
br label %1
}
int main() { 1 / 0; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ hea_set_u64_bits(int /*<<< orphan*/, int /*<<< orphan*/, int,
                                    int);
void hea_cq_aer_eq_err_state_err_reset(__u64 *aer) {
  *aer = hea_set_u64_bits(*aer, 0, 10, 12);
}


x86 assembly (clang, -O0):
<hea_cq_aer_eq_err_state_err_reset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
xor    %esi,%esi
mov    $0xa,%edx
mov    $0xc,%ecx
call   1030 <hea_set_u64_bits@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hea_cq_aer_eq_err_state_err_reset>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
xor    %esi,%esi
mov    $0xa,%edx
mov    $0xc,%ecx
call   1030 <hea_set_u64_bits@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @hea_cq_aer_eq_err_state_err_reset(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = call i32 @hea_set_u64_bits(i32 %4, i32 0, i32 10, i32 12)
%6 = load i32*, i32** %2
store i32 %5, i32* %6
ret void
}

LLVM IR (-O2):
define void @hea_cq_aer_eq_err_state_err_reset(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @hea_set_u64_bits(i32 %2, i32 0, i32 10, i32 12)
store i32 %3, i32* %0
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t ceil_div(uint32_t x, uint32_t y) { return 1 + ((x - 1) / y); }


x86 assembly (clang, -O0):
<ceil_div>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
cltd
idivl  -0x8(%rbp)
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ceil_div>:
lea    -0x1(%rdi),%eax
cltd
idiv   %esi
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @ceil_div(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = sub nsw i32 %5, 1
%7 = load i32, i32* %4
%8 = sdiv i32 %6, %7
%9 = add nsw i32 1, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @ceil_div(i32 %0, i32 %1) {
%3 = add nsw i32 %0, -1
%4 = sdiv i32 %3, %1
%5 = add nsw i32 %4, 1
ret i32 %5
}
void Cyc_BansheeIf_init_toplevel_cvars(struct Cyc_List_List *assoc) { ; }


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

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

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

LLVM IR (-O2):
%struct.Cyc_List_List = type opaque
define void @Cyc_BansheeIf_init_toplevel_cvars(%struct.Cyc_List_List* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert_ptr_equal_(char *, int, int *, int *);
void test_ptr_equal_pass() {
  int x = 1;
  int *p1 = &x, *p2 = &x;
  assert_ptr_equal_("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                    "outputs/2022-01-22/02-19-57/repos/hughbien/assertive/refs/"
                    "heads/master/test/pass_test.c",
                    48, (p1), (p2));
}


x86 assembly (clang, -O0):
<test_ptr_equal_pass>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x1,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xec2(%rip),%rdi
mov    $0x30,%esi
call   1030 <assert_ptr_equal_@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ptr_equal_pass>:
push   %rax
movl   $0x1,0x4(%rsp)
lea    0xee0(%rip),%rdi
lea    0x4(%rsp),%rcx
mov    $0x30,%esi
mov    %rcx,%rdx
call   1030 <assert_ptr_equal_@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/hughbien/assertive/refs/heads/master/test/pass_test.c\00"
define void @test_ptr_equal_pass() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
store i32 1, i32* %1
store i32* %1, i32** %2
store i32* %1, i32** %3
%4 = load i32*, i32** %2
%5 = load i32*, i32** %3
%6 = call i32 @assert_ptr_equal_(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 48, i32* %4, i32* %5)
ret void
}

LLVM IR (-O2):
@.str = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/hughbien/assertive/refs/heads/master/test/pass_test.c\00"
define void @test_ptr_equal_pass() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 1, i32* %1
%3 = call i32 @assert_ptr_equal_(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 48, i32* %1, i32* %1)
ret void
}
/* Variables and functions */
double RAND_MAX;
scalar_t__ rand();
unsigned int randr(unsigned int min, unsigned int max) {
  double scaled = (double)rand() / RAND_MAX;
  return (max - min + 1) * scaled + min;
}


x86 assembly (clang, -O0):
<randr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2eb7(%rip),%rax
movsd  (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
mov    %eax,%edx
sub    %edx,%ecx
add    $0x1,%ecx
cvtsi2sd %rcx,%xmm0
movsd  -0x10(%rbp),%xmm2
cvtsi2sd %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randr>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ebe(%rip),%rax
divsd  (%rax),%xmm0
sub    %ebp,%ebx
add    $0x1,%ebx
cvtsi2sd %rbx,%xmm1
mov    %ebp,%eax
cvtsi2sd %rax,%xmm2
mulsd  %xmm0,%xmm1
addsd  %xmm1,%xmm2
cvttsd2si %xmm2,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define i32 @randr(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = call i64 (...) @rand()
%7 = sitofp i64 %6 to double
%8 = load double, double* @RAND_MAX
%9 = fdiv double %7, %8
store double %9, double* %5
%10 = load i32, i32* %4
%11 = load i32, i32* %3
%12 = sub i32 %10, %11
%13 = add i32 %12, 1
%14 = uitofp i32 %13 to double
%15 = load double, double* %5
%16 = load i32, i32* %3
%17 = uitofp i32 %16 to double
%18 = call double @llvm.fmuladd.f64(double %14, double %15, double %17)
%19 = fptoui double %18 to i32
ret i32 %19
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define i32 @randr(i32 %0, i32 %1) {
%3 = tail call i64 (...) @rand()
%4 = sitofp i64 %3 to double
%5 = load double, double* @RAND_MAX
%6 = fdiv double %4, %5
%7 = sub i32 1, %0
%8 = add i32 %7, %1
%9 = uitofp i32 %8 to double
%10 = uitofp i32 %0 to double
%11 = tail call double @llvm.fmuladd.f64(double %9, double %6, double %10)
%12 = fptoui double %11 to i32
ret i32 %12
}
int map_class_to_y(int focus, int x) {
  if (focus == x) {
    return 1;
  } else {
    return (-1);
  }
}


x86 assembly (clang, -O0):
<map_class_to_y>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1122 <map_class_to_y+0x22>
movl   $0x1,-0x4(%rbp)
jmp    1129 <map_class_to_y+0x29>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<map_class_to_y>:
xor    %eax,%eax
cmp    %esi,%edi
sete   %al
add    %eax,%eax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @map_class_to_y(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* %4
%7 = load i32, i32* %5
%8 = icmp eq i32 %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 1, i32* %3
br label %11
10: ; preds = %2
store i32 -1, i32* %3
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @map_class_to_y(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = select i1 %3, i32 1, i32 -1
ret i32 %4
}
/* Type definitions */
struct SN_env {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SN_close_env(struct SN_env *, int /*<<< orphan*/);
extern void hungarian_UTF_8_close_env(struct SN_env *z) { SN_close_env(z, 0); }


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

x86 assembly (clang, -O2):
<hungarian_UTF_8_close_env>:
xor    %esi,%esi
jmp    1030 <SN_close_env@plt>

LLVM IR (-O0):
%struct.SN_env = type { i32 }
define void @hungarian_UTF_8_close_env(%struct.SN_env* %0) {
%2 = alloca %struct.SN_env*
store %struct.SN_env* %0, %struct.SN_env** %2
%3 = load %struct.SN_env*, %struct.SN_env** %2
%4 = call i32 @SN_close_env(%struct.SN_env* %3, i32 0)
ret void
}

LLVM IR (-O2):
%struct.SN_env = type { i32 }
define void @hungarian_UTF_8_close_env(%struct.SN_env* %0) {
%2 = tail call i32 @SN_close_env(%struct.SN_env* %0, i32 0)
ret void
}
/* Variables and functions */
void *a3(int);
void *a2(int x) { return (((x >> 2) & 1) ? a3(x) : a3(x)); }


x86 assembly (clang, -O0):
<a2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x2,%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     113e <a2+0x2e>
mov    -0x4(%rbp),%edi
call   1030 <a3@plt>
mov    %rax,-0x10(%rbp)
jmp    114a <a2+0x3a>
mov    -0x4(%rbp),%edi
call   1030 <a3@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a2>:
jmp    1030 <a3@plt>

LLVM IR (-O0):
define i8* @a2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 2
%5 = and i32 %4, 1
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %2
%9 = call i8* @a3(i32 %8)
br label %13
10: ; preds = %1
%11 = load i32, i32* %2
%12 = call i8* @a3(i32 %11)
br label %13
13: ; preds = %10, %7
%14 = phi i8* [ %9, %7 ], [ %12, %10 ]
ret i8* %14
}

LLVM IR (-O2):
define i8* @a2(i32 %0) {
%2 = tail call i8* @a3(i32 %0)
ret i8* %2
}
__attribute__((always_)) void flush_cache_vunmap(unsigned long start,
                                                 unsigned long end) {}


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

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

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

LLVM IR (-O2):
define void @flush_cache_vunmap(i64 %0, i64 %1) {
ret void
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t is_eoln_kns(char cc) { return ((unsigned char)cc) < 32; }


x86 assembly (clang, -O0):
<is_eoln_kns>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x20,%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_eoln_kns>:
xor    %eax,%eax
cmp    $0x20,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @is_eoln_kns(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp slt i32 %4, 32
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @is_eoln_kns(i8 signext %0) {
%2 = icmp ult i8 %0, 32
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ bitmap_test_a();
int /*<<< orphan*/ bitmap_test_b();
int /*<<< orphan*/ bitmap_test_c();
int /*<<< orphan*/ puts(char *);
int main() {
  bitmap_test_a();
  bitmap_test_b();
  bitmap_test_c();
  puts("TESTS PASSED");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <bitmap_test_a@plt>
mov    $0x0,%al
call   1040 <bitmap_test_b@plt>
mov    $0x0,%al
call   1060 <bitmap_test_c@plt>
lea    0xea0(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <bitmap_test_a@plt>
xor    %eax,%eax
call   1040 <bitmap_test_b@plt>
xor    %eax,%eax
call   1060 <bitmap_test_c@plt>
lea    0xea3(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"TESTS PASSED\00"
define i32 @main() {
%1 = call i32 (...) @bitmap_test_a()
%2 = call i32 (...) @bitmap_test_b()
%3 = call i32 (...) @bitmap_test_c()
%4 = call i32 @puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"TESTS PASSED\00"
define i32 @main() {
%1 = tail call i32 (...) @bitmap_test_a()
%2 = tail call i32 (...) @bitmap_test_b()
%3 = tail call i32 (...) @bitmap_test_c()
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int rand();
int _RANDOM(int r) { return rand() % r; }


x86 assembly (clang, -O0):
<_RANDOM>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cltd
idivl  -0x4(%rbp)
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_RANDOM>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
cltd
idiv   %ebx
mov    %edx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @_RANDOM(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @rand()
%4 = load i32, i32* %2
%5 = srem i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @_RANDOM(i32 %0) {
%2 = tail call i32 (...) @rand()
%3 = srem i32 %2, %0
ret i32 %3
}
/* Variables and functions */
long double tanl(long double);
long double cbuiltin_tanl(long double x) { return tanl(x); }


x86 assembly (clang, -O0):
<cbuiltin_tanl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <tanl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbuiltin_tanl>:
jmp    1030 <tanl@plt>

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

LLVM IR (-O2):
define x86_fp80 @cbuiltin_tanl(x86_fp80 %0) {
%2 = tail call x86_fp80 @tanl(x86_fp80 %0)
ret x86_fp80 %2
}
long get_breakpoint() { return 0; }


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

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

LLVM IR (-O0):
define i64 @get_breakpoint() {
ret i64 0
}

LLVM IR (-O2):
define i64 @get_breakpoint() {
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ report_mems(int, int);
int /*<<< orphan*/ report_qs(int *, int *);
void report_ipc(void) {
  int this_Clerk_pid = 0;
  int other_Clerk_pid = 0;
  report_qs(&this_Clerk_pid, &other_Clerk_pid);
  report_mems(this_Clerk_pid, other_Clerk_pid);
}


x86 assembly (clang, -O0):
<report_ipc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <report_qs@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <report_mems@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<report_ipc>:
push   %rax
movl   $0x0,0x4(%rsp)
movl   $0x0,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <report_qs@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1040 <report_mems@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @report_ipc() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 @report_qs(i32* %1, i32* %2)
%4 = load i32, i32* %1
%5 = load i32, i32* %2
%6 = call i32 @report_mems(i32 %4, i32 %5)
ret void
}

LLVM IR (-O2):
define void @report_ipc() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%5 = call i32 @report_qs(i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call i32 @report_mems(i32 %6, i32 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ SOCK_STREAM;
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int create_socket(void) { return socket(AF_INET, SOCK_STREAM, 0); }


x86 assembly (clang, -O0):
<create_socket>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
mov    0x2eb4(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <socket@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_socket>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
jmp    1030 <socket@plt>

LLVM IR (-O0):
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
define i32 @create_socket() {
%1 = load i32, i32* @AF_INET
%2 = load i32, i32* @SOCK_STREAM
%3 = call i32 @socket(i32 %1, i32 %2, i32 0)
ret i32 %3
}

LLVM IR (-O2):
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
define i32 @create_socket() {
%1 = load i32, i32* @AF_INET
%2 = load i32, i32* @SOCK_STREAM
%3 = tail call i32 @socket(i32 %1, i32 %2, i32 0)
ret i32 %3
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
bool rtp_check_marker(const uint8_t *p_rtp) { return !!(p_rtp[1] & 0x80); }


x86 assembly (clang, -O0):
<rtp_check_marker>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
and    $0x80,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtp_check_marker>:
mov    0x4(%rdi),%eax
shr    $0x7,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @rtp_check_marker(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 1
%5 = load i32, i32* %4
%6 = and i32 %5, 128
%7 = icmp ne i32 %6, 0
%8 = xor i1 %7, true
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @rtp_check_marker(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %2
%4 = lshr i32 %3, 7
%5 = and i32 %4, 1
ret i32 %5
}
void Convert16To8Row_C() {}


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

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

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

LLVM IR (-O2):
define void @Convert16To8Row_C() {
ret void
}
/* Variables and functions */
int strcmp(char *, char *);
int binary_sn(char *s1, char *s2) { return strcmp(s1, s2); }


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

x86 assembly (clang, -O2):
<binary_sn>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @binary_sn(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
void ASN1_BIT_STRING_get_bit(void) {}


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

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

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

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

/* Variables and functions */
scalar_t__ skb_network_header(struct sk_buff const *);
struct iphdr *ip_hdr(const struct sk_buff *skb) {
  return (struct iphdr *)skb_network_header(skb);
}


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

x86 assembly (clang, -O2):
<ip_hdr>:
jmp    1030 <skb_network_header@plt>

LLVM IR (-O0):
%struct.iphdr = type { i32 }
%struct.sk_buff = type { i32 }
define %struct.iphdr* @ip_hdr(%struct.sk_buff* %0) {
%2 = alloca %struct.sk_buff*
store %struct.sk_buff* %0, %struct.sk_buff** %2
%3 = load %struct.sk_buff*, %struct.sk_buff** %2
%4 = call i64 @skb_network_header(%struct.sk_buff* %3)
%5 = inttoptr i64 %4 to %struct.iphdr*
ret %struct.iphdr* %5
}

LLVM IR (-O2):
%struct.iphdr = type { i32 }
%struct.sk_buff = type { i32 }
define %struct.iphdr* @ip_hdr(%struct.sk_buff* %0) {
%2 = tail call i64 @skb_network_header(%struct.sk_buff* %0)
%3 = inttoptr i64 %2 to %struct.iphdr*
ret %struct.iphdr* %3
}
/* Variables and functions */
int /*<<< orphan*/ remove_s(char *, char *);
void main() {
  char str1[] = "Sun is out today";
  char str2[] = "soiyt";
  remove_s(str1, str2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedc(%rip),%al
mov    %al,-0x10(%rbp)
mov    0xed4(%rip),%eax
mov    %eax,-0x26(%rbp)
mov    0xece(%rip),%ax
mov    %ax,-0x22(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x26(%rbp),%rsi
call   1030 <remove_s@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movb   $0x0,0x20(%rsp)
movw   $0x74,0xc(%rsp)
movl   $0x79696f73,0x8(%rsp)
79
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1030 <remove_s@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.str1 = [17 x i8] c"Sun is out today\00"
@__const.main.str2 = [6 x i8] c"soiyt\00"
define void @main() {
%1 = alloca [17 x i8]
%2 = alloca [6 x i8]
%3 = bitcast [17 x i8]* %1 to i8*
%4 = bitcast [6 x i8]* %2 to i8*
%5 = getelementptr inbounds [17 x i8], [17 x i8]* %1, i64 0, i64 0
%6 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%7 = call i32 @remove_s(i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@__const.main.str1 = [17 x i8] c"Sun is out today\00"
@__const.main.str2 = [6 x i8] c"soiyt\00"
define void @main() {
%1 = alloca [17 x i8]
%2 = alloca [6 x i8]
%3 = getelementptr inbounds [17 x i8], [17 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%5 = call i32 @remove_s(i8* %3, i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern void start_pes(int npes) { printf("\nOpenSHMEM Analyzer\n"); }


x86 assembly (clang, -O0):
<start_pes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [20 x i8] c"\0AOpenSHMEM Analyzer\00"
define void @start_pes(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}