xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x7f() {
  Assert_real((isascii(127)),
              "/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/ctype/test_isascii.c",
              640, ("isascii should be 1 for 0x7f"));
}


x86 assembly (clang, -O0):
<t_isascii_0x7f>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7f,%edi
call   1030 <isascii@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x280,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isascii_0x7f>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0x280,%edx
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 1 for 0x7f\00"
define void @t_isascii_0x7f() {
%1 = call i32 @isascii(i32 127)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 640, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 1 for 0x7f\00"
define void @t_isascii_0x7f() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 640, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
__gccmain() {}


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

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

LLVM IR (-O0):
define i32 @__gccmain() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @__gccmain() {
ret i32 undef
}
void foo_2_2_2_2_1_2_1_2_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_2_2_2_1_2_1_2_1() {
ret void
}
int test_imm_2Duint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0x2D << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_2Duint64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x10,%rdx
and    $0x2d,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_2Duint64_midword_mem>:
testb  $0x2d,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_2Duint64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 16
%6 = and i64 %5, 45
%7 = icmp ne i64 %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_2Duint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 2949120
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void Sys_SetFPCW(void) {}


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

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

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

LLVM IR (-O2):
define void @Sys_SetFPCW() {
ret void
}
/* Variables and functions */
double acos(int /*<<< orphan*/);
int /*<<< orphan*/ glmDotProduct4d(double const *, double const *);
double glmComputeNormalizedVectorAngle4dRad(const double v1[4],
                                            const double v2[4]) {
  return acos(glmDotProduct4d(v1, v2));
}


x86 assembly (clang, -O0):
<glmComputeNormalizedVectorAngle4dRad>:
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 <glmDotProduct4d@plt>
mov    %eax,%edi
call   1040 <acos@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmComputeNormalizedVectorAngle4dRad>:
push   %rax
call   1030 <glmDotProduct4d@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <acos@plt>

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

LLVM IR (-O2):
define double @glmComputeNormalizedVectorAngle4dRad(double* %0, double* %1) {
%3 = tail call i32 @glmDotProduct4d(double* %0, double* %1)
%4 = tail call double @acos(i32 %3)
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print_callback(void *nachtmicht, void *str_v, int len) {
  char *str = (char *)str_v;
  str[len] = 0;
  printf(":%s", str);
}


x86 assembly (clang, -O0):
<print_callback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x20(%rbp),%rsi
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_callback>:
movslq %edx,%rax
movb   $0x0,(%rsi,%rax,1)
lea    0xee2(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c":%s\00"
define void @print_callback(i8* nocapture readnone %0, i8* %1, i32 %2) {
%4 = sext i32 %2 to i64
%5 = getelementptr inbounds i8, i8* %1, i64 %4
store i8 0, i8* %5
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mouse_wait(int);
int /*<<< orphan*/ outportb(int, unsigned char);
void mouse_write(unsigned char a_write) {
  mouse_wait(1);
  outportb(0x64, 0xD4);
  mouse_wait(1);
  outportb(0x60, a_write);
}


x86 assembly (clang, -O0):
<mouse_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x1,%edi
call   1030 <mouse_wait@plt>
mov    $0x64,%edi
mov    $0xd4,%esi
call   1040 <outportb@plt>
mov    $0x1,%edi
call   1030 <mouse_wait@plt>
mov    $0x60,%edi
movzbl -0x1(%rbp),%esi
call   1040 <outportb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mouse_write>:
push   %rbx
mov    %edi,%ebx
mov    $0x1,%edi
call   1030 <mouse_wait@plt>
mov    $0x64,%edi
mov    $0xd4,%esi
call   1040 <outportb@plt>
mov    $0x1,%edi
call   1030 <mouse_wait@plt>
mov    $0x60,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1040 <outportb@plt>

LLVM IR (-O0):
define void @mouse_write(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @mouse_wait(i32 1)
%4 = call i32 @outportb(i32 100, i8 zeroext -44)
%5 = call i32 @mouse_wait(i32 1)
%6 = load i8, i8* %2
%7 = call i32 @outportb(i32 96, i8 zeroext %6)
ret void
}

LLVM IR (-O2):
define void @mouse_write(i8 zeroext %0) {
%2 = tail call i32 @mouse_wait(i32 1)
%3 = tail call i32 @outportb(i32 100, i8 zeroext -44)
%4 = tail call i32 @mouse_wait(i32 1)
%5 = tail call i32 @outportb(i32 96, i8 zeroext %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gpioclearbits(int);
void nRF24L01P_disable(void) { gpioclearbits(7); }


x86 assembly (clang, -O0):
<nRF24L01P_disable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7,%edi
call   1030 <gpioclearbits@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<nRF24L01P_disable>:
mov    $0x7,%edi
jmp    1030 <gpioclearbits@plt>

LLVM IR (-O0):
define void @nRF24L01P_disable() {
%1 = call i32 @gpioclearbits(i32 7)
ret void
}

LLVM IR (-O2):
define void @nRF24L01P_disable() {
%1 = tail call i32 @gpioclearbits(i32 7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void exit_with_help() {
  printf("Usage: svm-predict [options] test_file model_file output_file\n"
         "options:\n"
         "-b probability_estimates: whether to predict probability estimates, "
         "0 or 1 (default 0); one-class SVM not supported yet\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@.str = [192 x i8] c"Usage: svm-predict [options] test_file model_file output_file\0Aoptions:\0A-b probability_estimates: whether to predict probability estimates, 0 or 1 (default 0); one-class SVM not supported yet\0A\00"
define void @exit_with_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([192 x i8], [192 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [191 x i8] c"Usage: svm-predict [options] test_file model_file output_file\0Aoptions:\0A-b probability_estimates: whether to predict probability estimates, 0 or 1 (default 0); one-class SVM not supported yet\00"
define void @exit_with_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([191 x i8], [191 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(struct timespec const *);
int /*<<< orphan*/ nanosleep(struct timespec const *, struct timespec *);
void thrd_sleep(const struct timespec *restrict time_point,
                struct timespec *remaining) {
  assert(time_point);
  nanosleep(time_point, remaining);
}


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

x86 assembly (clang, -O2):
<thrd_sleep>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <assert@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <nanosleep@plt>

LLVM IR (-O0):
%struct.timespec = type { i32 }
define void @thrd_sleep(%struct.timespec* noalias %0, %struct.timespec* %1) {
%3 = alloca %struct.timespec*
%4 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %3
store %struct.timespec* %1, %struct.timespec** %4
%5 = load %struct.timespec*, %struct.timespec** %3
%6 = call i32 @assert(%struct.timespec* %5)
%7 = load %struct.timespec*, %struct.timespec** %3
%8 = load %struct.timespec*, %struct.timespec** %4
%9 = call i32 @nanosleep(%struct.timespec* %7, %struct.timespec* %8)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
define void @thrd_sleep(%struct.timespec* noalias %0, %struct.timespec* %1) {
%3 = tail call i32 @assert(%struct.timespec* %0)
%4 = tail call i32 @nanosleep(%struct.timespec* %0, %struct.timespec* %1)
ret void
}
/* Variables and functions */
char jsonny_peek(const char *s, size_t len) {
  if (len > 0)
    return s[len - 1];
}


x86 assembly (clang, -O0):
<jsonny_peek>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jbe    1129 <jsonny_peek+0x29>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    $0x1,%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<jsonny_peek>:
test   %rsi,%rsi
je     110a <jsonny_peek+0xa>
mov    -0x1(%rsi,%rdi,1),%al
ret
ret

LLVM IR (-O0):
define signext i8 @jsonny_peek(i8* %0, i64 %1) {
%3 = alloca i8
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
%6 = load i64, i64* %5
%7 = icmp ugt i64 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %2
%9 = load i8*, i8** %4
%10 = load i64, i64* %5
%11 = sub i64 %10, 1
%12 = getelementptr inbounds i8, i8* %9, i64 %11
%13 = load i8, i8* %12
store i8 %13, i8* %3
br label %14
14: ; preds = %8, %2
%15 = load i8, i8* %3
ret i8 %15
}

LLVM IR (-O2):
define signext i8 @jsonny_peek(i8* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = add i64 %1, -1
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
br label %8
8: ; preds = %4, %2
%9 = phi i8 [ %7, %4 ], [ undef, %2 ]
ret i8 %9
}
int compar(const void *first, const void *sec) {
  if (*(double *)first < *(double *)sec)
    return -1;
  else
    return *(double *)first > *(double *)sec;
}


x86 assembly (clang, -O0):
<compar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    1132 <compar+0x32>
movl   $0xffffffff,-0x4(%rbp)
jmp    114d <compar+0x4d>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomisd (%rax),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compar>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
seta   %cl
ucomisd %xmm0,%xmm1
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @compar(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to double*
%8 = load double, double* %7
%9 = load i8*, i8** %5
%10 = bitcast i8* %9 to double*
%11 = load double, double* %10
%12 = fcmp olt double %8, %11
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 -1, i32* %3
br label %23
14: ; preds = %2
%15 = load i8*, i8** %4
%16 = bitcast i8* %15 to double*
%17 = load double, double* %16
%18 = load i8*, i8** %5
%19 = bitcast i8* %18 to double*
%20 = load double, double* %19
%21 = fcmp ogt double %17, %20
%22 = zext i1 %21 to i32
store i32 %22, i32* %3
br label %23
23: ; preds = %14, %13
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @compar(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fcmp olt double %4, %6
%8 = fcmp ogt double %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *, int);
char *showParameters_il() {
  static char text[200];
  sprintf(text, "lzmaEncoderPath=%s; minbcssize=%d", "path2lzmaEncoder", 10);
  return text;
}


x86 assembly (clang, -O0):
<showParameters_il>:
push   %rbp
mov    %rsp,%rbp
lea    0x2f25(%rip),%rdi
lea    0xede(%rip),%rsi
lea    0xef9(%rip),%rdx
mov    $0xa,%ecx
call   1030 <sprintf@plt>
lea    0x2f06(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<showParameters_il>:
push   %rbx
lea    0x2f28(%rip),%rbx
lea    0xee1(%rip),%rsi
lea    0xefc(%rip),%rdx
mov    %rbx,%rdi
mov    $0xa,%ecx
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@showParameters_il.text = internal global [200 x i8] zeroinitializer
@.str = [34 x i8] c"lzmaEncoderPath=%s; minbcssize=%d\00"
@.str.1 = [17 x i8] c"path2lzmaEncoder\00"
define i8* @showParameters_il() {
%1 = call i32 @sprintf(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @showParameters_il.text, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 10)
ret i8* getelementptr inbounds ([200 x i8], [200 x i8]* @showParameters_il.text, i64 0, i64 0)
}

LLVM IR (-O2):
@showParameters_il.text = internal global [200 x i8] zeroinitializer
@.str = [34 x i8] c"lzmaEncoderPath=%s; minbcssize=%d\00"
@.str.1 = [17 x i8] c"path2lzmaEncoder\00"
define i8* @showParameters_il() {
%1 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([200 x i8], [200 x i8]* @showParameters_il.text, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 10)
ret i8* getelementptr inbounds ([200 x i8], [200 x i8]* @showParameters_il.text, i64 0, i64 0)
}
void set_scroll(int top) {}


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

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

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

LLVM IR (-O2):
define void @set_scroll(i32 %0) {
ret void
}
/* Variables and functions */
scalar_t__ ceil(size_t);
size_t SCAVENGEREstimateBas64EncodedDataSize(size_t inDataSize) {
  size_t theEncodedDataSize = (int)ceil(inDataSize / 3.0) * 4;
  theEncodedDataSize = theEncodedDataSize / 72 * 74 + theEncodedDataSize % 72;
  return (theEncodedDataSize);
}


x86 assembly (clang, -O0):
<SCAVENGEREstimateBas64EncodedDataSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movaps 0xedd(%rip),%xmm1
movq   -0x8(%rbp),%xmm0
punpckldq %xmm1,%xmm0
movapd 0xedc(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0xed5(%rip),%xmm1
divsd  %xmm1,%xmm0
movaps %xmm0,%xmm1
cvttsd2si %xmm1,%rdi
mov    %rdi,%rcx
sar    $0x3f,%rcx
movsd  0xec2(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
and    %rcx,%rax
or     %rax,%rdi
call   1030 <ceil@plt>
shl    $0x2,%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x48,%ecx
xor    %edx,%edx
div    %rcx
imul   $0x4a,%rax,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x48,%ecx
xor    %edx,%edx
div    %rcx
mov    -0x18(%rbp),%rax
add    %rdx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SCAVENGEREstimateBas64EncodedDataSize>:
push   %rax
movq   %rdi,%xmm0
punpckldq 0xee2(%rip),%xmm0
subpd  0xeea(%rip),%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
addsd  %xmm0,%xmm1
divsd  0xee6(%rip),%xmm1
cvttsd2si %xmm1,%rax
mov    %rax,%rcx
sar    $0x3f,%rcx
subsd  0xeda(%rip),%xmm1
cvttsd2si %xmm1,%rdi
and    %rcx,%rdi
or     %rax,%rdi
call   1030 <ceil@plt>
shl    $0x2,%eax
movslq %eax,%rcx
movabs $0xe38e38e38e38e38f,%rdx
38 8e e3
mov    %rcx,%rax
mul    %rdx
shr    $0x6,%rdx
imul   $0x4a,%rdx,%rax
shl    $0x3,%rdx
lea    (%rdx,%rdx,8),%rdx
sub    %rdx,%rcx
add    %rax,%rcx
mov    %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @SCAVENGEREstimateBas64EncodedDataSize(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = uitofp i64 %4 to double
%6 = fdiv double %5, 3.000000e+00
%7 = fptoui double %6 to i64
%8 = call i64 @ceil(i64 %7)
%9 = trunc i64 %8 to i32
%10 = mul nsw i32 %9, 4
%11 = sext i32 %10 to i64
store i64 %11, i64* %3
%12 = load i64, i64* %3
%13 = udiv i64 %12, 72
%14 = mul i64 %13, 74
%15 = load i64, i64* %3
%16 = urem i64 %15, 72
%17 = add i64 %14, %16
store i64 %17, i64* %3
%18 = load i64, i64* %3
ret i64 %18
}

LLVM IR (-O2):
define i64 @SCAVENGEREstimateBas64EncodedDataSize(i64 %0) {
%2 = uitofp i64 %0 to double
%3 = fdiv double %2, 3.000000e+00
%4 = fptoui double %3 to i64
%5 = tail call i64 @ceil(i64 %4)
%6 = trunc i64 %5 to i32
%7 = shl nsw i32 %6, 2
%8 = sext i32 %7 to i64
%9 = udiv i64 %8, 72
%10 = mul i64 %9, 74
%11 = urem i64 %8, 72
%12 = add i64 %10, %11
ret i64 %12
}
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_parse(int /*<<< orphan*/, char *, char *,
                                            char *, int /*<<< orphan*/);
void test_puppet_comments() {
  test_parser_verify_parse(test_parser_sourcefile("puppet", " #comment"),
                           "puppet", "", "#comment", 0);
}


x86 assembly (clang, -O0):
<test_puppet_comments>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed5(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xec0(%rip),%rsi
lea    0xebf(%rip),%rdx
lea    0xeba(%rip),%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_puppet_comments>:
push   %rbx
lea    0xed8(%rip),%rbx
lea    0xed8(%rip),%rsi
mov    %rbx,%rdi
call   1030 <test_parser_sourcefile@plt>
lea    0xec8(%rip),%rdx
lea    0xec3(%rip),%rcx
mov    %eax,%edi
mov    %rbx,%rsi
xor    %r8d,%r8d
pop    %rbx
jmp    1040 <test_parser_verify_parse@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"puppet\00"
@.str.1 = [10 x i8] c" #comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [9 x i8] c"#comment\00"
define void @test_puppet_comments() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"puppet\00"
@.str.1 = [10 x i8] c" #comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [9 x i8] c"#comment\00"
define void @test_puppet_comments() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
char *strrchr(char *, char);
void setprog(char *program, char **argv) {
  char *ptr;
  if (!(ptr = strrchr(argv[0], '/')))
    ptr = argv[0];
  else
    ptr++;
  strcpy(program, ptr);
}


x86 assembly (clang, -O0):
<setprog>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    $0x2f,%esi
call   1040 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    115f <setprog+0x3f>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
jmp    116b <setprog+0x4b>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setprog>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rsi),%rbx
mov    %rbx,%rdi
mov    $0x2f,%esi
call   1040 <strrchr@plt>
lea    0x1(%rax),%rsi
test   %rax,%rax
cmove  %rbx,%rsi
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define void @setprog(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
%5 = alloca i8*
store i8* %0, i8** %3
store i8** %1, i8*** %4
%6 = load i8**, i8*** %4
%7 = getelementptr inbounds i8*, i8** %6, i64 0
%8 = load i8*, i8** %7
%9 = call i8* @strrchr(i8* %8, i8 signext 47)
store i8* %9, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %15, label %11
11: ; preds = %2
%12 = load i8**, i8*** %4
%13 = getelementptr inbounds i8*, i8** %12, i64 0
%14 = load i8*, i8** %13
store i8* %14, i8** %5
br label %18
15: ; preds = %2
%16 = load i8*, i8** %5
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %5
br label %18
18: ; preds = %15, %11
%19 = load i8*, i8** %3
%20 = load i8*, i8** %5
%21 = call i32 @strcpy(i8* %19, i8* %20)
ret void
}

LLVM IR (-O2):
define void @setprog(i8* %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i8* @strrchr(i8* dereferenceable(1) %3, i8 signext 47)
%5 = icmp eq i8* %4, null
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = select i1 %5, i8* %3, i8* %6
%8 = tail call i32 @strcpy(i8* %0, i8* %7)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a;
  printf("%ld\n", sizeof(a));
  printf("%ld\n", sizeof a);
  printf("%ld\n", sizeof(int));
  printf("%ld\n", sizeof("Linkerist Heracles"));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x13,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%ld\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 19)
ret i32 0
}
/* Variables and functions */
double sin(double);
double sin_to_earth(double to_earth) { return sin(to_earth); }


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

x86 assembly (clang, -O2):
<sin_to_earth>:
jmp    1030 <sin@plt>

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

LLVM IR (-O2):
define double @sin_to_earth(double %0) {
%2 = tail call double @sin(double %0)
ret double %2
}
const char *glp_version(void) {
  return "4"
         "."
         "65";
}


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"4.65\00"
define i8* @glp_version() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [5 x i8] c"4.65\00"
define i8* @glp_version() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
unsigned long strtoul(char *, int /*<<< orphan*/ *, int);
int get_row_count(void *result, int col_count, char **cols, char **col_names) {
  unsigned long *count = result;
  *count = strtoul(cols[0], NULL, 10);
  return 0;
}


x86 assembly (clang, -O0):
<get_row_count>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1030 <strtoul@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,(%rax)
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_row_count>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdx),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1030 <strtoul@plt>
mov    %rax,(%rbx)
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @get_row_count(i8* %0, i32 %1, i8** %2, i8** %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i8**
%9 = alloca i64*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8** %2, i8*** %7
store i8** %3, i8*** %8
%10 = load i8*, i8** %5
%11 = bitcast i8* %10 to i64*
store i64* %11, i64** %9
%12 = load i8**, i8*** %7
%13 = getelementptr inbounds i8*, i8** %12, i64 0
%14 = load i8*, i8** %13
%15 = call i64 @strtoul(i8* %14, i32* null, i32 10)
%16 = load i64*, i64** %9
store i64 %15, i64* %16
ret i32 0
}

LLVM IR (-O2):
define i32 @get_row_count(i8* nocapture writeonly %0, i32 %1, i8** nocapture %2, i8** nocapture readnone %3) {
%5 = bitcast i8* %0 to i64*
%6 = load i8*, i8** %2
%7 = tail call i64 @strtoul(i8* nocapture %6, i32* null, i32 10)
store i64 %7, i64* %5
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("-Wno-implicit\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"-Wno-implicit\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void *f1(void *p) {
  int i;
  for (i = 0; i < 100000; i++) {
    printf("1\n");
  }
  return NULL;
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x186a0,-0xc(%rbp)
jge    114a <f1+0x3a>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <f1+0x13>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
push   %rbp
push   %rbx
push   %rax
mov    $0x186a0,%ebp
lea    0xee1(%rip),%rbx
nop
mov    %rbx,%rdi
call   1030 <puts@plt>
add    $0xffffffff,%ebp
jne    1120 <f1+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"1\0A\00"
define i8* @f1(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %9, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 100000
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
store i32 %11, i32* %3
br label %4
12: ; preds = %4
ret i8* null
}

LLVM IR (-O2):
@str = [2 x i8] c"1\00"
define noalias i8* @f1(i8* nocapture readnone %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i32 [ 0, %1 ], [ %5, %2 ]
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%5 = add nuw nsw i32 %3, 1
%6 = icmp eq i32 %5, 100000
br i1 %6, label %7, label %2
7: ; preds = %2
ret i8* null
}
void shift(char **str, long number_of_rows) {
  char *tmp;
  tmp = str[0];
  for (int i = 1; i < number_of_rows; i++)
    str[i - 1] = str[i];
  str[number_of_rows - 1] = tmp;
}


x86 assembly (clang, -O0):
<shift>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
movslq -0x1c(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1157 <shift+0x57>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
mov    -0x8(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    111e <shift+0x1e>
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
mov    %rdx,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<shift>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi),%r15
cmp    $0x2,%rsi
jl     1138 <shift+0x28>
lea    0x8(%rbx),%rsi
lea    -0x8(,%r14,8),%rdx
ff
mov    %rbx,%rdi
call   1030 <memmove@plt>
mov    %r15,-0x8(%rbx,%r14,8)
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @shift(i8** nocapture %0, i64 %1) {
%3 = load i8*, i8** %0
%4 = icmp sgt i64 %1, 1
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = bitcast i8** %0 to i8*
%7 = getelementptr i8*, i8** %0, i64 1
%8 = bitcast i8** %7 to i8*
%9 = shl i64 %1, 3
%10 = add i64 %9, -8
br label %11
11: ; preds = %5, %2
%12 = add nsw i64 %1, -1
%13 = getelementptr inbounds i8*, i8** %0, i64 %12
store i8* %3, i8** %13
ret void
}
double boxFilter(double t) {
  if ((t > -0.5) && (t <= 0.5))
    return 1.0;
  return 0.0;
}


x86 assembly (clang, -O0):
<boxFilter>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1145 <boxFilter+0x45>
movsd  0xee0(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1145 <boxFilter+0x45>
movsd  0xed5(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    114d <boxFilter+0x4d>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<boxFilter>:
movsd  0xef8(%rip),%xmm1
cmpltsd %xmm0,%xmm1
cmplesd 0xef2(%rip),%xmm0
movsd  0xef2(%rip),%xmm2
andpd  %xmm2,%xmm0
andpd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @boxFilter(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp ogt double %4, -5.000000e-01
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load double, double* %3
%8 = fcmp ole double %7, 5.000000e-01
br i1 %8, label %9, label %10
9: ; preds = %6
store double 1.000000e+00, double* %2
br label %11
10: ; preds = %6, %1
store double 0.000000e+00, double* %2
br label %11
11: ; preds = %10, %9
%12 = load double, double* %2
ret double %12
}

LLVM IR (-O2):
define double @boxFilter(double %0) {
%2 = fcmp ogt double %0, -5.000000e-01
%3 = fcmp ole double %0, 5.000000e-01
%4 = and i1 %2, %3
%5 = select i1 %4, double 1.000000e+00, double 0.000000e+00
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ cmos_read_rtc_event(int /*<<< orphan*/);
void cmos_read_rtc(void) { cmos_read_rtc_event(0); }


x86 assembly (clang, -O0):
<cmos_read_rtc>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <cmos_read_rtc_event@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmos_read_rtc>:
xor    %edi,%edi
jmp    1030 <cmos_read_rtc_event@plt>

LLVM IR (-O0):
define void @cmos_read_rtc() {
%1 = call i32 @cmos_read_rtc_event(i32 0)
ret void
}

LLVM IR (-O2):
define void @cmos_read_rtc() {
%1 = tail call i32 @cmos_read_rtc_event(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cbreak();
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ intrflush(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ keypad(int /*<<< orphan*/, int);
int /*<<< orphan*/ noecho();
int /*<<< orphan*/ nonl();
int /*<<< orphan*/ scrollok(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stdscr;
void gli_setup_curses() {
  initscr();
  cbreak();
  noecho();
  nonl();
  intrflush(stdscr, 0);
  keypad(stdscr, 1);
  scrollok(stdscr, 0);
}


x86 assembly (clang, -O0):
<gli_setup_curses>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <initscr@plt>
mov    $0x0,%al
call   1030 <cbreak@plt>
mov    $0x0,%al
call   1090 <noecho@plt>
mov    $0x0,%al
call   1070 <nonl@plt>
mov    0x2e51(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1060 <intrflush@plt>
mov    0x2e41(%rip),%rax
mov    (%rax),%edi
mov    $0x1,%esi
call   1040 <keypad@plt>
mov    0x2e2e(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1080 <scrollok@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gli_setup_curses>:
push   %rbx
xor    %eax,%eax
call   1050 <initscr@plt>
xor    %eax,%eax
call   1030 <cbreak@plt>
xor    %eax,%eax
call   1090 <noecho@plt>
xor    %eax,%eax
call   1070 <nonl@plt>
mov    0x2e54(%rip),%rbx
mov    (%rbx),%edi
xor    %esi,%esi
call   1060 <intrflush@plt>
mov    (%rbx),%edi
mov    $0x1,%esi
call   1040 <keypad@plt>
mov    (%rbx),%edi
xor    %esi,%esi
pop    %rbx
jmp    1080 <scrollok@plt>

LLVM IR (-O0):
@stdscr = global i32 0
define void @gli_setup_curses() {
%1 = call i32 (...) @initscr()
%2 = call i32 (...) @cbreak()
%3 = call i32 (...) @noecho()
%4 = call i32 (...) @nonl()
%5 = load i32, i32* @stdscr
%6 = call i32 @intrflush(i32 %5, i32 0)
%7 = load i32, i32* @stdscr
%8 = call i32 @keypad(i32 %7, i32 1)
%9 = load i32, i32* @stdscr
%10 = call i32 @scrollok(i32 %9, i32 0)
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
define void @gli_setup_curses() {
%1 = tail call i32 (...) @initscr()
%2 = tail call i32 (...) @cbreak()
%3 = tail call i32 (...) @noecho()
%4 = tail call i32 (...) @nonl()
%5 = load i32, i32* @stdscr
%6 = tail call i32 @intrflush(i32 %5, i32 0)
%7 = load i32, i32* @stdscr
%8 = tail call i32 @keypad(i32 %7, i32 1)
%9 = load i32, i32* @stdscr
%10 = tail call i32 @scrollok(i32 %9, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ configureBt5Patch();
int /*<<< orphan*/ enterBt5CpeHdPatch();
void refreshBt5Patch(void) {
  enterBt5CpeHdPatch();
  configureBt5Patch();
}


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

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

LLVM IR (-O0):
define void @refreshBt5Patch() {
%1 = call i32 (...) @enterBt5CpeHdPatch()
%2 = call i32 (...) @configureBt5Patch()
ret void
}

LLVM IR (-O2):
define void @refreshBt5Patch() {
%1 = tail call i32 (...) @enterBt5CpeHdPatch()
%2 = tail call i32 (...) @configureBt5Patch()
ret void
}
/* Variables and functions */
short doubleToFixed(double);
double sin(int);
short smallScaleSine(int n) {
  return doubleToFixed((20.0 / 1024) * sin(2 * 3.1415926535 * 60000 * n / 345));
}


x86 assembly (clang, -O0):
<smallScaleSine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm1
movsd  0xed8(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xec4(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  0xea4(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <doubleToFixed@plt>
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smallScaleSine>:
push   %rax
cvtsi2sd %edi,%xmm0
mulsd  0xed3(%rip),%xmm0
divsd  0xed3(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sin@plt>
mulsd  0xeca(%rip),%xmm0
pop    %rax
jmp    1030 <doubleToFixed@plt>

LLVM IR (-O0):
define signext i16 @smallScaleSine(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
%5 = fmul double 0x4117027C794317AD, %4
%6 = fdiv double %5, 3.450000e+02
%7 = fptosi double %6 to i32
%8 = call double @sin(i32 %7)
%9 = fmul double 0x3F94000000000000, %8
%10 = call signext i16 @doubleToFixed(double %9)
ret i16 %10
}

LLVM IR (-O2):
define signext i16 @smallScaleSine(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = fmul double %2, 0x4117027C794317AD
%4 = fdiv double %3, 3.450000e+02
%5 = fptosi double %4 to i32
%6 = tail call double @sin(i32 %5)
%7 = fmul double %6, 0x3F94000000000000
%8 = tail call signext i16 @doubleToFixed(double %7)
ret i16 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_key_t;

/* Variables and functions */
int /*<<< orphan*/ _exit(int);
scalar_t__ pthread_setspecific(int /*<<< orphan*/, void *);
int /*<<< orphan*/ write(int, char *, int);
void *tf(void *arg) {
  pthread_key_t *key = (pthread_key_t *)arg;
  if (pthread_setspecific(*key, (void *)-1l) != 0) {
    write(2, "setspecific failed\n", 19);
    _exit(1);
  }
  return NULL;
}


x86 assembly (clang, -O0):
<tf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    $0xffffffffffffffff,%rsi
call   1050 <pthread_setspecific@plt>
cmp    $0x0,%rax
je     1180 <tf+0x50>
mov    $0x2,%edi
lea    0xe94(%rip),%rsi
mov    $0x13,%edx
call   1040 <write@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tf>:
push   %rax
mov    (%rdi),%edi
mov    $0xffffffffffffffff,%rsi
call   1050 <pthread_setspecific@plt>
test   %rax,%rax
jne    1148 <tf+0x18>
xor    %eax,%eax
pop    %rcx
ret
lea    0xeb1(%rip),%rsi
mov    $0x2,%edi
mov    $0x13,%edx
call   1040 <write@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"setspecific failed\0A\00"
define i8* @tf(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
%8 = call i64 @pthread_setspecific(i32 %7, i8* inttoptr (i64 -1 to i8*))
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = call i32 @write(i32 2, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 19)
%12 = call i32 @_exit(i32 1)
unreachable
13: ; preds = %1
ret i8* null
}

LLVM IR (-O2):
@.str = [20 x i8] c"setspecific failed\0A\00"
define noalias i8* @tf(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i64 @pthread_setspecific(i32 %3, i8* inttoptr (i64 -1 to i8*))
%5 = icmp eq i64 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = tail call i32 @write(i32 2, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 19)
%8 = tail call i32 @_exit(i32 1)
unreachable
9: ; preds = %1
ret i8* null
}
/* Variables and functions */
int exp(double const);
double inverse_logit(const double y) { return 1.0 / (1 + exp(-y)); }


x86 assembly (clang, -O0):
<inverse_logit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <exp@plt>
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
movsd  0xeb3(%rip),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inverse_logit>:
push   %rax
xorps  0xee8(%rip),%xmm0
call   1030 <exp@plt>
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
movsd  0xee4(%rip),%xmm0
divsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @inverse_logit(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fneg double %3
%5 = call i32 @exp(double %4)
%6 = add nsw i32 1, %5
%7 = sitofp i32 %6 to double
%8 = fdiv double 1.000000e+00, %7
ret double %8
}

LLVM IR (-O2):
define double @inverse_logit(double %0) {
%2 = fneg double %0
%3 = tail call i32 @exp(double %2)
%4 = add nsw i32 %3, 1
%5 = sitofp i32 %4 to double
%6 = fdiv double 1.000000e+00, %5
ret double %6
}
double clamp(double value) {
  if (value > 1)
    return 1;
  if (value < 0)
    return 0;
  return value;
}


x86 assembly (clang, -O0):
<clamp>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1132 <clamp+0x32>
movsd  0xed8(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1157 <clamp+0x57>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    114d <clamp+0x4d>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1157 <clamp+0x57>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<clamp>:
xorpd  %xmm2,%xmm2
maxsd  %xmm0,%xmm2
movsd  0xef0(%rip),%xmm3
movapd %xmm3,%xmm1
cmpltsd %xmm0,%xmm1
movapd %xmm1,%xmm0
andnpd %xmm2,%xmm0
andpd  %xmm3,%xmm1
orpd   %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @clamp(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp ogt double %4, 1.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store double 1.000000e+00, double* %2
br label %13
7: ; preds = %1
%8 = load double, double* %3
%9 = fcmp olt double %8, 0.000000e+00
br i1 %9, label %10, label %11
10: ; preds = %7
store double 0.000000e+00, double* %2
br label %13
11: ; preds = %7
%12 = load double, double* %3
store double %12, double* %2
br label %13
13: ; preds = %11, %10, %6
%14 = load double, double* %2
ret double %14
}

LLVM IR (-O2):
define double @clamp(double %0) {
%2 = fcmp ogt double %0, 1.000000e+00
%3 = fcmp olt double %0, 0.000000e+00
%4 = select i1 %3, double 0.000000e+00, double %0
%5 = select i1 %2, double 1.000000e+00, double %4
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("Hello world from QA bundle b!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [31 x i8] c"Hello world from QA bundle b!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [30 x i8] c"Hello world from QA bundle b!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void gtk_binding_parse_binding() {}


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

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

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

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