xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ vcos_sleep(int);
void run_abi_tests(int *run, int *passed) {
  (*run)++;
  vcos_sleep(1);
  (*passed)++;
}


x86 assembly (clang, -O0):
<run_abi_tests>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    $0x1,%edi
call   1030 <vcos_sleep@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_abi_tests>:
push   %rbx
mov    %rsi,%rbx
addl   $0x1,(%rdi)
mov    $0x1,%edi
call   1030 <vcos_sleep@plt>
addl   $0x1,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @run_abi_tests(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %5
%7 = add nsw i32 %6, 1
store i32 %7, i32* %5
%8 = call i32 @vcos_sleep(i32 1)
%9 = load i32*, i32** %4
%10 = load i32, i32* %9
%11 = add nsw i32 %10, 1
store i32 %11, i32* %9
ret void
}

LLVM IR (-O2):
define void @run_abi_tests(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = add nsw i32 %3, 1
store i32 %4, i32* %0
%5 = tail call i32 @vcos_sleep(i32 1)
%6 = load i32, i32* %1
%7 = add nsw i32 %6, 1
store i32 %7, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ tprintf(char *, double, double, double, double, double,
                           double);
void putBezierPicture(double p0x, double p0y, double p1x, double p1y,
                      double p2x, double p2y) {
  tprintf("\\qbezier(%3.4f,%3.4f)(%3.4f,%3.4f)(%3.4f,%3.4f)\n", p0x, p0y, p1x,
          p1y, p2x, p2y);
}


x86 assembly (clang, -O0):
<putBezierPicture>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
movsd  -0x28(%rbp),%xmm4
movsd  -0x30(%rbp),%xmm5
lea    0xea5(%rip),%rdi
call   1030 <tprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [49 x i8] c"\\qbezier(%3.4f,%3.4f)(%3.4f,%3.4f)(%3.4f,%3.4f)\0A\00"
define void @putBezierPicture(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
%13 = load double, double* %7
%14 = load double, double* %8
%15 = load double, double* %9
%16 = load double, double* %10
%17 = load double, double* %11
%18 = load double, double* %12
%19 = call i32 @tprintf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), double %13, double %14, double %15, double %16, double %17, double %18)
ret void
}

LLVM IR (-O2):
@.str = [49 x i8] c"\\qbezier(%3.4f,%3.4f)(%3.4f,%3.4f)(%3.4f,%3.4f)\0A\00"
define void @putBezierPicture(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = tail call i32 @tprintf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), double %0, double %1, double %2, double %3, double %4, double %5)
ret void
}
void gtk_widget_get_size_request() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ *SSL_new(void *);
int /*<<< orphan*/ SSL_set_ex_data(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                   unsigned char *);
int tls_local_init(void **ssl_ptr, void *ctx, unsigned char *hash) {
  SSL *ssl = SSL_new(ctx);
  SSL_set_ex_data(ssl, 0, hash);
  *ssl_ptr = ssl;
  return 1;
}


x86 assembly (clang, -O0):
<tls_local_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <SSL_new@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rdx
xor    %esi,%esi
call   1030 <SSL_set_ex_data@plt>
mov    -0x20(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tls_local_init>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r15
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <SSL_new@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    %r15,%rdx
call   1030 <SSL_set_ex_data@plt>
mov    %rbx,(%r14)
mov    $0x1,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @tls_local_init(i8** nocapture writeonly %0, i8* %1, i8* %2) {
%4 = tail call i32* @SSL_new(i8* %1)
%5 = tail call i32 @SSL_set_ex_data(i32* %4, i32 0, i8* %2)
%6 = bitcast i8** %0 to i32**
store i32* %4, i32** %6
ret i32 1
}
void mdp4_mddi_overlay(struct msm_fb_data_type *mfd) {}


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

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

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

LLVM IR (-O2):
%struct.msm_fb_data_type = type opaque
define void @mdp4_mddi_overlay(%struct.msm_fb_data_type* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputc(int /*<<< orphan*/, int /*<<< orphan*/ *);
void fputstrn_unfiltered(char *s, int n, int x, FILE *fp) {
  while (n-- > 0)
    fputc(*s++, fp);
}


x86 assembly (clang, -O0):
<fputstrn_unfiltered>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
jle    115a <fputstrn_unfiltered+0x4a>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
mov    -0x18(%rbp),%rsi
call   1030 <fputc@plt>
jmp    1126 <fputstrn_unfiltered+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fputstrn_unfiltered>:
push   %rbp
push   %r14
push   %rbx
test   %esi,%esi
jle    1147 <fputstrn_unfiltered+0x37>
mov    %rcx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
add    $0x1,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl (%rbx),%edi
add    $0x1,%rbx
mov    %r14,%rsi
call   1030 <fputc@plt>
add    $0xffffffff,%ebp
cmp    $0x1,%ebp
ja     1130 <fputstrn_unfiltered+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @fputstrn_unfiltered(i8* nocapture %0, i32 %1, i32 %2, i32* nocapture %3) {
%5 = icmp sgt i32 %1, 0
br i1 %5, label %6, label %15
6: ; preds = %4, %6
%7 = phi i8* [ %10, %6 ], [ %0, %4 ]
%8 = phi i32 [ %9, %6 ], [ %1, %4 ]
%9 = add nsw i32 %8, -1
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = load i8, i8* %7
%12 = sext i8 %11 to i32
%13 = tail call i32 @fputc(i32 %12, i32* %3)
%14 = icmp ugt i32 %8, 1
br i1 %14, label %6, label %15
15: ; preds = %6, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(char *);
scalar_t__ malloc(size_t);
char *scvector(long nrl, long nrh) {
  long i;
  char *cvec;
  cvec = (char *)malloc((size_t)(nrh - nrl + 1) * sizeof(char));
  assert(cvec);
  return cvec - nrl;
}


x86 assembly (clang, -O0):
<scvector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
sub    -0x8(%rbp),%rdi
add    $0x1,%rdi
shl    $0x0,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x20(%rbp),%rax
xor    %ecx,%ecx
sub    -0x8(%rbp),%rcx
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scvector>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
sub    %rdi,%rsi
lea    0x1(%rsi),%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <assert@plt>
sub    %r14,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @scvector(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%7 = load i64, i64* %4
%8 = load i64, i64* %3
%9 = sub nsw i64 %7, %8
%10 = add nsw i64 %9, 1
%11 = mul i64 %10, 1
%12 = call i64 @malloc(i64 %11)
%13 = inttoptr i64 %12 to i8*
store i8* %13, i8** %6
%14 = load i8*, i8** %6
%15 = call i32 @assert(i8* %14)
%16 = load i8*, i8** %6
%17 = load i64, i64* %3
%18 = sub i64 0, %17
%19 = getelementptr inbounds i8, i8* %16, i64 %18
ret i8* %19
}

LLVM IR (-O2):
define i8* @scvector(i64 %0, i64 %1) {
%3 = sub i64 0, %0
%4 = sub i64 1, %0
%5 = add i64 %4, %1
%6 = tail call i64 @malloc(i64 %5)
%7 = inttoptr i64 %6 to i8*
%8 = tail call i32 @assert(i8* %7)
%9 = getelementptr inbounds i8, i8* %7, i64 %3
ret i8* %9
}
unsigned long hash2(unsigned long k) { return k * (k + 3); }


x86 assembly (clang, -O0):
<hash2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
add    $0x3,%rcx
imul   %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash2>:
lea    0x3(%rdi),%rax
imul   %rdi,%rax
ret

LLVM IR (-O0):
define i64 @hash2(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load i64, i64* %2
%5 = add i64 %4, 3
%6 = mul i64 %3, %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @hash2(i64 %0) {
%2 = add i64 %0, 3
%3 = mul i64 %2, %0
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ hist_h(int *);
int /*<<< orphan*/ hist_v(int *);
int /*<<< orphan*/ printf(char *, int);
int word_stats(int *);
int main() {
  int wl[11];
  int ovflow;
  ovflow = word_stats(wl);
  hist_h(wl);
  hist_v(wl);
  if (ovflow)
    printf("Overflow: %d\n", ovflow);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
call   1040 <word_stats@plt>
mov    %eax,-0x34(%rbp)
lea    -0x30(%rbp),%rdi
call   1060 <hist_h@plt>
lea    -0x30(%rbp),%rdi
call   1050 <hist_v@plt>
cmpl   $0x0,-0x34(%rbp)
je     1186 <main+0x46>
mov    -0x34(%rbp),%esi
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x38,%rsp
mov    %rsp,%r14
mov    %r14,%rdi
call   1040 <word_stats@plt>
mov    %eax,%ebx
mov    %r14,%rdi
call   1060 <hist_h@plt>
mov    %r14,%rdi
call   1050 <hist_v@plt>
test   %ebx,%ebx
je     1176 <main+0x36>
lea    0xe91(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [14 x i8] c"Overflow: %d\0A\00"
define i32 @main() {
%1 = alloca [11 x i32]
%2 = bitcast [11 x i32]* %1 to i8*
%3 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 0
%4 = call i32 @word_stats(i32* %3)
%5 = call i32 @hist_h(i32* %3)
%6 = call i32 @hist_v(i32* %3)
%7 = icmp eq i32 %4, 0
br i1 %7, label %10, label %8
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %4)
br label %10
10: ; preds = %8, %0
ret i32 0
}
void test_one(int x) {
#pragma omp simd
  for (int i = 0; i < x; i++)
    ;
}


x86 assembly (clang, -O0):
<test_one>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    112d <test_one+0x2d>
jmp    111f <test_one+0x1f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <test_one+0xe>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test_one(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %9, %1
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = icmp slt i32 %5, %6
br i1 %7, label %8, label %12
8: ; preds = %4
br label %9
9: ; preds = %8
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
store i32 %11, i32* %3
br label %4
12: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @test_one(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void banner(char *message) {
  printf("--------------------------------\n");
  printf("%s\n", message);
  printf("--------------------------------\n");
}


x86 assembly (clang, -O0):
<banner>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xeed(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<banner>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xee2(%rip),%r14
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"--------------------------------\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @banner(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str.2 = [33 x i8] c"--------------------------------\00"
define void @banner(i8* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.2, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) %0)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.2, i64 0, i64 0))
ret void
}
void _kill() {}


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

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

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

LLVM IR (-O2):
define void @_kill() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ft_bzero(void *, size_t);
void *malloc(size_t);
void *ft_memalloc(size_t size) {
  void *mem;
  mem = malloc(size);
  if (mem) {
    ft_bzero(mem, size);
    return (mem);
  }
  return (0);
}


x86 assembly (clang, -O0):
<ft_memalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     115e <ft_memalloc+0x3e>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <ft_bzero@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1166 <ft_memalloc+0x46>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_memalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     113f <ft_memalloc+0x1f>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <ft_bzero@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @ft_memalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @ft_bzero(i8* %2, i64 %0)
br label %6
6: ; preds = %1, %4
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int _usage(void) {
  fputs("Usage: "
        "getconf"
        " [-v specification] system_var\n"
        "       "
        "getconf"
        " [-v specification] path_var pathname\n",
        stderr);
  return 1;
}


x86 assembly (clang, -O0):
<_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_usage>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [98 x i8] c"Usage: getconf [-v specification] system_var\0A getconf [-v specification] path_var pathname\0A\00"
@stderr = global i32 0
define i32 @_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([98 x i8], [98 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}

LLVM IR (-O2):
@.str = [98 x i8] c"Usage: getconf [-v specification] system_var\0A getconf [-v specification] path_var pathname\0A\00"
@stderr = global i32 0
define i32 @_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([98 x i8], [98 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
void usage() { fprintf(stdout, "usage:\n"); }


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

x86 assembly (clang, -O2):
<usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [8 x i8] c"usage:\0A\00"
define void @usage() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [8 x i8] c"usage:\0A\00"
define void @usage() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned char _subborrow_u64(unsigned char, unsigned long long,
                             unsigned long long, unsigned long long *);
unsigned char test_subborrow_u64(unsigned char __cf, unsigned long long __x,
                                 unsigned long long __y,
                                 unsigned long long *__p) {
  return _subborrow_u64(__cf, __x, __y, __p);
}


x86 assembly (clang, -O0):
<test_subborrow_u64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x1(%rbp),%al
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
movzbl %al,%edi
call   1030 <_subborrow_u64@plt>
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_subborrow_u64>:
jmp    1030 <_subborrow_u64@plt>

LLVM IR (-O0):
define zeroext i8 @test_subborrow_u64(i8 zeroext %0, i64 %1, i64 %2, i64* %3) {
%5 = alloca i8
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64*
store i8 %0, i8* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64* %3, i64** %8
%9 = load i8, i8* %5
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = load i64*, i64** %8
%13 = call zeroext i8 @_subborrow_u64(i8 zeroext %9, i64 %10, i64 %11, i64* %12)
ret i8 %13
}

LLVM IR (-O2):
define zeroext i8 @test_subborrow_u64(i8 zeroext %0, i64 %1, i64 %2, i64* %3) {
%5 = tail call zeroext i8 @_subborrow_u64(i8 zeroext %0, i64 %1, i64 %2, i64* %3)
ret i8 %5
}
void initialiseStatesAndConstants(double *states, double *variables) {
  states[0] = 3.0;
  states[1] = 7.0;
}


x86 assembly (clang, -O0):
<initialiseStatesAndConstants>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xef0(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  0xed8(%rip),%xmm0
movsd  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialiseStatesAndConstants>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @initialiseStatesAndConstants(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = getelementptr inbounds double, double* %5, i64 0
store double 3.000000e+00, double* %6
%7 = load double*, double** %3
%8 = getelementptr inbounds double, double* %7, i64 1
store double 7.000000e+00, double* %8
ret void
}

LLVM IR (-O2):
define void @initialiseStatesAndConstants(double* nocapture writeonly %0, double* nocapture readnone %1) {
%3 = bitcast double* %0 to <2 x double>*
store <2 x double> <double 3.000000e+00, double 7.000000e+00>, <2 x double>* %3
ret void
}
/* Type definitions */
struct node_operations {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, void *);
void looking_exit(void *node, void *object, struct node_operations *ops) {
  printf("looking_exit %p\n", node);
}


x86 assembly (clang, -O0):
<looking_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<looking_exit>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.node_operations = type { i32 }
@.str = [17 x i8] c"looking_exit %p\0A\00"
define void @looking_exit(i8* %0, i8* %1, %struct.node_operations* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca %struct.node_operations*
store i8* %0, i8** %4
store i8* %1, i8** %5
store %struct.node_operations* %2, %struct.node_operations** %6
%7 = load i8*, i8** %4
%8 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
%struct.node_operations = type { i32 }
@.str = [17 x i8] c"looking_exit %p\0A\00"
define void @looking_exit(i8* %0, i8* nocapture readnone %1, %struct.node_operations* nocapture readnone %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_bus_message_is_method_call(void *m, const char *interface,
                              const char *member) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_bus_message_is_method_call>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
mov    0x2ec7(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_bus_message_is_method_call>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_bus_message_is_method_call(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32, i32* @EINVAL
%8 = sub nsw i32 0, %7
ret i32 %8
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_message_is_method_call(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = load i32, i32* @EINVAL
%5 = sub nsw i32 0, %4
ret i32 %5
}
void sws_convVec() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_qpel_hv64_10_avx2() {
ret void
}
char clower(char c) {
  if ((c >= 'A') && (c <= 'Z'))
    return ((c - 'A') + 'a');
  return (c);
}


x86 assembly (clang, -O0):
<clower>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x41,%eax
jl     1136 <clower+0x36>
movsbl -0x2(%rbp),%eax
cmp    $0x5a,%eax
jg     1136 <clower+0x36>
movsbl -0x2(%rbp),%eax
sub    $0x41,%eax
add    $0x61,%eax
mov    %al,-0x1(%rbp)
jmp    113c <clower+0x3c>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clower>:
lea    -0x41(%rdi),%eax
lea    0x20(%rdi),%ecx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

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

LLVM IR (-O2):
define signext i8 @clower(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, 32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
void RSAPrivateKey_dup(void) {}


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

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

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

LLVM IR (-O2):
define void @RSAPrivateKey_dup() {
ret void
}
/* Type definitions */
typedef scalar_t__ mode_t;

/* Variables and functions */
int main(void) {
  mode_t mode = 0;
  return (int)mode;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
store i64 0, i64* %2
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int int_min(int a, int b) { return a <= b ? a : b; }


x86 assembly (clang, -O0):
<int_min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1121 <int_min+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <int_min+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_min>:
mov    %edi,%eax
cmp    %esi,%edi
cmovg  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @int_min(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
char *strsrch(s1, s2)
char *s1;
char *s2;
{
  int ls1;
  ls1 = strlen(s1);
  return (strnsrch(s1, s2, ls1));
}


x86 assembly (clang, -O0):
<strsrch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x0,%al
call   1040 <strnsrch@plt>
cltq
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strsrch>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <strnsrch@plt>
cltq
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strsrch(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i64 @strlen(i8* %6)
%8 = trunc i64 %7 to i32
store i32 %8, i32* %5
%9 = load i8*, i8** %3
%10 = load i8*, i8** %4
%11 = load i32, i32* %5
%12 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @strnsrch to i32 (i8*, i8*, i32, ...)*)(i8* %9, i8* %10, i32 %11)
%13 = sext i32 %12 to i64
%14 = inttoptr i64 %13 to i8*
ret i8* %14
}

LLVM IR (-O2):
define i8* @strsrch(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = trunc i64 %3 to i32
%5 = tail call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @strnsrch to i32 (i8*, i8*, i32, ...)*)(i8* %0, i8* %1, i32 %4)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}
/* Variables and functions */
void *calloc(size_t, size_t);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void *my_calloc(size_t __nmemb, size_t __size) {
  void *rv;
  rv = calloc(__nmemb, __size);
  if (rv == NULL) {
    fprintf(stderr, "out of memory\n");
    exit(-1);
  }
  return rv;
}


x86 assembly (clang, -O0):
<my_calloc>:
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 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    117b <my_calloc+0x4b>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
lea    0xe94(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_calloc>:
push   %rax
call   1030 <calloc@plt>
test   %rax,%rax
je     113d <my_calloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"out of memory\0A\00"
define i8* @my_calloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = call i8* @calloc(i64 %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @exit(i32 -1)
unreachable
15: ; preds = %2
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"out of memory\0A\00"
define noalias i8* @my_calloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 -1)
unreachable
9: ; preds = %2
ret i8* %3
}
void bigadd(int *sn, int *n) {
  int i, tmp, c = 0;
  for (i = 0; i < 1000; i++) {
    tmp = sn[i] + n[i] + c;
    sn[i] = tmp % 10;
    c = tmp / 10;
  }
}


x86 assembly (clang, -O0):
<bigadd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x3e8,-0x14(%rbp)
jge    1175 <bigadd+0x75>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x10(%rbp),%rcx
movslq -0x14(%rbp),%rdx
add    (%rcx,%rdx,4),%eax
add    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111a <bigadd+0x1a>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bigadd>:
xor    %eax,%eax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    (%rdi,%rax,4),%ecx
add    (%rsi,%rax,4),%ecx
movslq %ecx,%r8
imul   $0x66666667,%r8,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,1),%edx
lea    (%rdx,%rdx,4),%edx
sub    %edx,%r8d
mov    %r8d,(%rdi,%rax,4)
add    $0x1,%rax
cmp    $0x3e8,%rax
jne    1110 <bigadd+0x10>
ret

LLVM IR (-O0):
define void @bigadd(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
store i32 0, i32* %7
store i32 0, i32* %5
br label %8
8: ; preds = %33, %2
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 1000
br i1 %10, label %11, label %36
11: ; preds = %8
%12 = load i32*, i32** %3
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
%16 = load i32, i32* %15
%17 = load i32*, i32** %4
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* %17, i64 %19
%21 = load i32, i32* %20
%22 = add nsw i32 %16, %21
%23 = load i32, i32* %7
%24 = add nsw i32 %22, %23
store i32 %24, i32* %6
%25 = load i32, i32* %6
%26 = srem i32 %25, 10
%27 = load i32*, i32** %3
%28 = load i32, i32* %5
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i32, i32* %27, i64 %29
store i32 %26, i32* %30
%31 = load i32, i32* %6
%32 = sdiv i32 %31, 10
store i32 %32, i32* %7
br label %33
33: ; preds = %11
%34 = load i32, i32* %5
%35 = add nsw i32 %34, 1
store i32 %35, i32* %5
br label %8
36: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @bigadd(i32* nocapture %0, i32* nocapture %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i64 [ 0, %2 ], [ %14, %3 ]
%5 = phi i32 [ 0, %2 ], [ %13, %3 ]
%6 = getelementptr inbounds i32, i32* %0, i64 %4
%7 = load i32, i32* %6
%8 = getelementptr inbounds i32, i32* %1, i64 %4
%9 = load i32, i32* %8
%10 = add i32 %7, %5
%11 = add i32 %10, %9
%12 = srem i32 %11, 10
store i32 %12, i32* %6
%13 = sdiv i32 %11, 10
%14 = add nuw nsw i64 %4, 1
%15 = icmp eq i64 %14, 1000
br i1 %15, label %16, label %3
16: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void DieWithError(char *message) {
  fprintf(stderr, "%s", message);
  exit(1);
}


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

x86 assembly (clang, -O2):
<DieWithError>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @DieWithError(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_8605() {
  Assert_real((isqrt(8605) == 92),
              "/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",
              1455, ("Integer square root of 8605 should be 92"));
}


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

x86 assembly (clang, -O2):
<t_sqrt_8605>:
push   %rax
mov    $0x219d,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x5c,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x5af,%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 = [41 x i8] c"Integer square root of 8605 should be 92\00"
define void @t_sqrt_8605() {
%1 = call i32 @isqrt(i32 8605)
%2 = icmp eq i32 %1, 92
%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 1455, i8* getelementptr inbounds ([41 x i8], [41 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 = [41 x i8] c"Integer square root of 8605 should be 92\00"
define void @t_sqrt_8605() {
%1 = tail call i32 @isqrt(i32 8605)
%2 = icmp eq i32 %1, 92
%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 1455, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void foo195(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo195(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ convergency();
int /*<<< orphan*/ stationary();
int /*<<< orphan*/ warm_up();
void run_network_batch(void) {
  warm_up();
  convergency();
  stationary();
}


x86 assembly (clang, -O0):
<run_network_batch>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <warm_up@plt>
mov    $0x0,%al
call   1040 <convergency@plt>
mov    $0x0,%al
call   1050 <stationary@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_network_batch>:
push   %rax
xor    %eax,%eax
call   1030 <warm_up@plt>
xor    %eax,%eax
call   1040 <convergency@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <stationary@plt>

LLVM IR (-O0):
define void @run_network_batch() {
%1 = call i32 (...) @warm_up()
%2 = call i32 (...) @convergency()
%3 = call i32 (...) @stationary()
ret void
}

LLVM IR (-O2):
define void @run_network_batch() {
%1 = tail call i32 (...) @warm_up()
%2 = tail call i32 (...) @convergency()
%3 = tail call i32 (...) @stationary()
ret void
}
int ft_tolower(int c) {
  if (c >= 65 && c <= 90)
    return (c + 32);
  else
    return (c);
}


x86 assembly (clang, -O0):
<ft_tolower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x41,-0x8(%rbp)
jl     1129 <ft_tolower+0x29>
cmpl   $0x5a,-0x8(%rbp)
jg     1129 <ft_tolower+0x29>
mov    -0x8(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <ft_tolower+0x2f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_tolower>:
lea    -0x41(%rdi),%ecx
lea    0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @ft_tolower(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 90
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 32
store i32 %11, i32* %2
br label %14
12: ; preds = %6, %1
%13 = load i32, i32* %3
store i32 %13, i32* %2
br label %14
14: ; preds = %12, %9
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @ft_tolower(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ printf(char *, long);
void *thread(void *arg) {
  long i = (long)arg;
  printf("t%ld: running!\n", i);
  if (i == 0)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<thread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xec1(%rip),%rdi
call   1040 <printf@plt>
cmpq   $0x0,-0x10(%rbp)
jne    1156 <thread+0x36>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
test   %rbx,%rbx
je     113c <thread+0x1c>
xor    %eax,%eax
pop    %rbx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"t%ld: running!\0A\00"
define i8* @thread(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = ptrtoint i8* %4 to i64
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i64 %6)
%8 = load i64, i64* %3
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = call i32 (...) @abort()
unreachable
12: ; preds = %1
ret i8* null
}

LLVM IR (-O2):
@.str = [16 x i8] c"t%ld: running!\0A\00"
define noalias i8* @thread(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i64 %2)
%4 = icmp eq i8* %0, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %1
ret i8* null
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ htonl(int /*<<< orphan*/);
int /*<<< orphan*/ write(int, char *, int);
void jtrace_log_int(uint32_t v) {
  uint32_t sw;
  sw = htonl(v);
  write(1, (char *)&sw, 4);
}


x86 assembly (clang, -O0):
<jtrace_log_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <htonl@plt>
mov    %eax,-0x8(%rbp)
lea    -0x8(%rbp),%rsi
mov    $0x1,%edi
mov    $0x4,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jtrace_log_int>:
push   %rax
call   1040 <htonl@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x1,%edi
mov    $0x4,%edx
call   1030 <write@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @jtrace_log_int(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @htonl(i32 %4)
store i32 %5, i32* %3
%6 = bitcast i32* %3 to i8*
%7 = call i32 @write(i32 1, i8* %6, i32 4)
ret void
}

LLVM IR (-O2):
define void @jtrace_log_int(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @htonl(i32 %0)
store i32 %4, i32* %2
%5 = call i32 @write(i32 1, i8* %3, i32 4)
ret void
}
main() { *(int *)0 = 0; }


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

x86 assembly (clang, -O2):
LLVM IR (-O0):
define i32 @main() {
store i32 0, i32* null
ret i32 0
}

LLVM IR (-O2):
int clamp_slow(int x) {
  if (x < 0)
    return 0;
  if (x > 255)
    return 255;
  return x;
}


x86 assembly (clang, -O0):
<clamp_slow>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    111d <clamp_slow+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    113c <clamp_slow+0x3c>
cmpl   $0xff,-0x8(%rbp)
jle    1136 <clamp_slow+0x36>
movl   $0xff,-0x4(%rbp)
jmp    113c <clamp_slow+0x3c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clamp_slow>:
cmp    $0xff,%edi
mov    $0xff,%ecx
cmovl  %edi,%ecx
xor    %eax,%eax
test   %ecx,%ecx
cmovns %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @clamp_slow(i32 %0) {
%2 = icmp slt i32 %0, 255
%3 = select i1 %2, i32 %0, i32 255
%4 = icmp sgt i32 %3, 0
%5 = select i1 %4, i32 %3, i32 0
ret i32 %5
}
double fun2(double z) { return 4.0 * z - 5.0 * z * z * z; }


x86 assembly (clang, -O0):
<fun2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xef2(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xebc(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun2>:
movsd  0xef8(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  0xeec(%rip),%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @fun2(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double 5.000000e+00, %4
%6 = load double, double* %2
%7 = fmul double %5, %6
%8 = load double, double* %2
%9 = fmul double %7, %8
%10 = fneg double %9
%11 = call double @llvm.fmuladd.f64(double 4.000000e+00, double %3, double %10)
ret double %11
}

LLVM IR (-O2):
define double @fun2(double %0) {
%2 = fmul double %0, -5.000000e+00
%3 = fmul double %2, %0
%4 = fmul double %3, %0
%5 = tail call double @llvm.fmuladd.f64(double %0, double 4.000000e+00, double %4)
ret double %5
}