xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ malloc(int);
int *newInt(int i) {
  int *tmp = (int *)malloc(sizeof(int));
  *tmp = i;
  return tmp;
}


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

x86 assembly (clang, -O2):
<newInt>:
push   %rbx
mov    %edi,%ebx
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %ebx,(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define i32* @newInt(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = call i64 @malloc(i32 4)
%5 = inttoptr i64 %4 to i32*
store i32* %5, i32** %3
%6 = load i32, i32* %2
%7 = load i32*, i32** %3
store i32 %6, i32* %7
%8 = load i32*, i32** %3
ret i32* %8
}

LLVM IR (-O2):
define i32* @newInt(i32 %0) {
%2 = tail call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32 %0, i32* %3
ret i32* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("\nStart Build Utility Programs in utils directory\n\n");
  printf("/* *** */ \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>
lea    0xf01(%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>
lea    0xf0e(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [51 x i8] c"\0AStart Build Utility Programs in utils directory\0A\0A\00"
@.str.1 = [12 x i8] c"/* *** */ \0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [50 x i8] c"\0AStart Build Utility Programs in utils directory\0A\00"
@str.2 = [11 x i8] c"/* *** */ \00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
void gdk_spawn_command_line_on_screen() {}


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

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

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

LLVM IR (-O2):
define void @gdk_spawn_command_line_on_screen() {
ret void
}
void close_pp(int fd) {
  if (fd)
    return;
}


x86 assembly (clang, -O0):
<close_pp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1116 <close_pp+0x16>
jmp    1116 <close_pp+0x16>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @close_pp(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %6
6: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @close_pp(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ uart_putchar(int, int /*<<< orphan*/);
void uart_puts(int offset, const char *s) {
  while (*s != '\0')
    uart_putchar(offset, *s++);
}


x86 assembly (clang, -O0):
<uart_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     114e <uart_puts+0x3e>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%esi
call   1030 <uart_putchar@plt>
jmp    111f <uart_puts+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_puts>:
push   %rbp
push   %rbx
push   %rax
mov    (%rsi),%al
test   %al,%al
je     1145 <uart_puts+0x35>
mov    %rsi,%rbx
mov    %edi,%ebp
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %al,%esi
mov    %ebp,%edi
call   1030 <uart_putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <uart_puts+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @uart_puts(i32 %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %9, %5 ], [ %1, %2 ]
%8 = sext i8 %6 to i32
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = tail call i32 @uart_putchar(i32 %0, i32 %8)
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
ret void
}
/* Variables and functions */
int rand();
unsigned int generarNumeroRandom(int max) {
  unsigned int r = rand() % max;
  return r;
}


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

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

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

LLVM IR (-O2):
define i32 @generarNumeroRandom(i32 %0) {
%2 = tail call i32 (...) @rand()
%3 = srem i32 %2, %0
ret i32 %3
}
/* Variables and functions */
int RepRemove(char *, char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  if (argc != 3) {
    fprintf(stderr, "Usage: %s type filename\n", argv[0]);
    exit(-1);
  }
  return (RepRemove(argv[1], argv[2]));
}


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)
cmpl   $0x3,-0x8(%rbp)
je     1176 <main+0x46>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe99(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1030 <RepRemove@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x3,%edi
jne    1144 <main+0x14>
mov    0x8(%rsi),%rdi
mov    0x10(%rsi),%rsi
pop    %rax
jmp    1030 <RepRemove@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
mov    (%rsi),%rdx
lea    0xea9(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [25 x i8] c"Usage: %s type filename\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 = load i32, i32* %4
%7 = icmp ne i32 %6, 3
br i1 %7, label %8, label %15
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 0
%12 = load i8*, i8** %11
%13 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = call i32 @exit(i32 -1)
unreachable
15: ; preds = %2
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 1
%18 = load i8*, i8** %17
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 2
%21 = load i8*, i8** %20
%22 = call i32 @RepRemove(i8* %18, i8* %21)
ret i32 %22
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"Usage: %s type filename\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %1
%7 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = tail call i32 @exit(i32 -1)
unreachable
9: ; preds = %2
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = getelementptr inbounds i8*, i8** %1, i64 2
%13 = load i8*, i8** %12
%14 = tail call i32 @RepRemove(i8* %11, i8* %13)
ret i32 %14
}
int foo(int a) { return a; }


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

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

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

LLVM IR (-O2):
define i32 @foo(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, float);
char *float_2_ascii(float number) {
  static char result[10];
  sprintf(result, "%8.3E", number);
  return (result);
}


x86 assembly (clang, -O0):
<float_2_ascii>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
lea    0x2f00(%rip),%rdi
lea    0xed0(%rip),%rsi
call   1030 <sprintf@plt>
lea    0x2eed(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_2_ascii>:
push   %rbx
lea    0x2f11(%rip),%rbx
lea    0xee1(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@float_2_ascii.result = internal global [10 x i8] zeroinitializer
@.str = [6 x i8] c"%8.3E\00"
define i8* @float_2_ascii(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @sprintf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @float_2_ascii.result, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %3)
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @float_2_ascii.result, i64 0, i64 0)
}

LLVM IR (-O2):
@float_2_ascii.result = internal global [10 x i8] zeroinitializer
@.str = [6 x i8] c"%8.3E\00"
define i8* @float_2_ascii(float %0) {
%2 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @float_2_ascii.result, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %0)
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @float_2_ascii.result, i64 0, i64 0)
}
/* Type definitions */
typedef char *uint16_t;

/* Variables and functions */
uint16_t inw(uint16_t port) {
  uint16_t value;
  __asm__ __volatile__("inw %w1, %w0" : "=a"(value) : "Nd"(port));
  return value;
}


x86 assembly (clang, -O0):
<inw>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
in     (%dx),%ax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inw>:
mov    %rdi,%rdx
in     (%dx),%ax
ret

LLVM IR (-O0):
define i8* @inw(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* asm sideeffect "inw ${1:w}, ${0:w}", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
ret i8* %6
}

LLVM IR (-O2):
define i8* @inw(i8* %0) {
%2 = tail call i8* asm sideeffect "inw ${1:w}, ${0:w}", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret i8* %2
}
/* Variables and functions */
double sinc(double);
double lanczos3Filter(double t) {
  if (t < 0.0)
    t = -t;
  if (t < 3.0)
    return (sinc(t) * sinc(t / 3.0));
  return 0.0;
}


x86 assembly (clang, -O0):
<lanczos3Filter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    114c <lanczos3Filter+0x3c>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xeac(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    119a <lanczos3Filter+0x8a>
movsd  -0x10(%rbp),%xmm0
call   1030 <sinc@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe85(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <sinc@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11a2 <lanczos3Filter+0x92>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lanczos3Filter>:
sub    $0x28,%rsp
movapd %xmm0,%xmm1
movapd 0xee0(%rip),%xmm2
xorpd  %xmm0,%xmm2
xorpd  %xmm0,%xmm0
movapd %xmm1,%xmm3
cmpltsd %xmm0,%xmm3
andpd  %xmm3,%xmm2
andnpd %xmm1,%xmm3
orpd   %xmm2,%xmm3
movsd  0xecb(%rip),%xmm1
ucomisd %xmm3,%xmm1
jbe    1179 <lanczos3Filter+0x69>
movapd %xmm3,%xmm0
movapd %xmm3,0x10(%rsp)
call   1030 <sinc@plt>
movsd  %xmm0,0x8(%rsp)
movapd 0x10(%rsp),%xmm0
divsd  0xea2(%rip),%xmm0
call   1030 <sinc@plt>
mulsd  0x8(%rsp),%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @lanczos3Filter(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp olt double %4, 0.000000e+00
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load double, double* %3
%8 = fneg double %7
store double %8, double* %3
br label %9
9: ; preds = %6, %1
%10 = load double, double* %3
%11 = fcmp olt double %10, 3.000000e+00
br i1 %11, label %12, label %19
12: ; preds = %9
%13 = load double, double* %3
%14 = call double @sinc(double %13)
%15 = load double, double* %3
%16 = fdiv double %15, 3.000000e+00
%17 = call double @sinc(double %16)
%18 = fmul double %14, %17
store double %18, double* %2
br label %20
19: ; preds = %9
store double 0.000000e+00, double* %2
br label %20
20: ; preds = %19, %12
%21 = load double, double* %2
ret double %21
}

LLVM IR (-O2):
define double @lanczos3Filter(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %3, double %0
%5 = fcmp olt double %4, 3.000000e+00
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = tail call double @sinc(double %4)
%8 = fdiv double %4, 3.000000e+00
%9 = tail call double @sinc(double %8)
%10 = fmul double %7, %9
br label %11
11: ; preds = %1, %6
%12 = phi double [ %10, %6 ], [ 0.000000e+00, %1 ]
ret double %12
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *name) {
  fprintf(stderr, "Usage: %s [options] f1,t1 f2,t2 f3,t3 ...\n", name);
  fprintf(stderr, "For more information type: %s -h \n\n", name);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xee2(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ec2(%rip),%r14
mov    (%r14),%edi
lea    0xed8(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xef1(%rip),%rsi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [43 x i8] c"Usage: %s [options] f1,t1 f2,t2 f3,t3 ...\0A\00"
@.str.1 = [36 x i8] c"For more information type: %s -h \0A\0A\00"
define void @usage(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 ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = load i8*, i8** %2
%8 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [43 x i8] c"Usage: %s [options] f1,t1 f2,t2 f3,t3 ...\0A\00"
@.str.1 = [36 x i8] c"For more information type: %s -h \0A\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
bool isValid(char c) {
  bool valid = false;
  char validchars[] = {'a', 'S', 'l', 'i'};
  int i;
  for (i = 0; i < 4 && !valid; i++) {
    if (c == validchars[i])
      valid = true;
  }
  return valid;
}


x86 assembly (clang, -O0):
<isValid>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movl   $0x0,-0x8(%rbp)
mov    0xee9(%rip),%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
xor    %eax,%eax
cmpl   $0x4,-0x10(%rbp)
mov    %al,-0x11(%rbp)
jge    113c <isValid+0x3c>
cmpl   $0x0,-0x8(%rbp)
setne  %al
xor    $0xff,%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    114c <isValid+0x4c>
jmp    117b <isValid+0x7b>
movsbl -0x1(%rbp),%eax
movslq -0x10(%rbp),%rcx
movsbl -0xc(%rbp,%rcx,1),%ecx
cmp    %ecx,%eax
jne    1168 <isValid+0x68>
movl   $0x1,-0x8(%rbp)
jmp    116d <isValid+0x6d>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1121 <isValid+0x21>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isValid>:
cmp    $0x61,%dil
sete   %al
je     1122 <isValid+0x22>
cmp    $0x53,%dil
sete   %al
je     1122 <isValid+0x22>
cmp    $0x6c,%dil
sete   %cl
cmp    $0x69,%dil
sete   %al
or     %cl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
@__const.isValid.validchars = [4 x i8] c"aSli"
define i32 @isValid(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
%4 = alloca [4 x i8]
%5 = alloca i32
store i8 %0, i8* %2
store i32 0, i32* %3
%6 = bitcast [4 x i8]* %4 to i8*
store i32 0, i32* %5
br label %7
7: ; preds = %27, %1
%8 = load i32, i32* %5
%9 = icmp slt i32 %8, 4
br i1 %9, label %10, label %14
10: ; preds = %7
%11 = load i32, i32* %3
%12 = icmp ne i32 %11, 0
%13 = xor i1 %12, true
br label %14
14: ; preds = %10, %7
%15 = phi i1 [ false, %7 ], [ %13, %10 ]
br i1 %15, label %16, label %30
16: ; preds = %14
%17 = load i8, i8* %2
%18 = sext i8 %17 to i32
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 %20
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %18, %23
br i1 %24, label %25, label %26
25: ; preds = %16
store i32 1, i32* %3
br label %26
26: ; preds = %25, %16
br label %27
27: ; preds = %26
%28 = load i32, i32* %5
%29 = add nsw i32 %28, 1
store i32 %29, i32* %5
br label %7
30: ; preds = %14
%31 = load i32, i32* %3
ret i32 %31
}

LLVM IR (-O2):
define i32 @isValid(i8 signext %0) {
%2 = icmp eq i8 %0, 97
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = icmp eq i8 %0, 83
br i1 %4, label %9, label %5
5: ; preds = %3
%6 = icmp eq i8 %0, 108
%7 = icmp eq i8 %0, 105
%8 = select i1 %6, i1 %6, i1 %7
br label %9
9: ; preds = %5, %3, %1
%10 = phi i1 [ %2, %1 ], [ %4, %3 ], [ %8, %5 ]
%11 = zext i1 %10 to i32
ret i32 %11
}
int do_470() { return 470; }


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

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

LLVM IR (-O0):
define i32 @do_470() {
ret i32 470
}

LLVM IR (-O2):
define i32 @do_470() {
ret i32 470
}
/* Type definitions */
struct uio_info_t {
  int dummy;
};

/* Variables and functions */
int uio_irqwait_timeout(struct uio_info_t *, int /*<<< orphan*/ *);
int uio_irqwait(struct uio_info_t *info) {
  return uio_irqwait_timeout(info, NULL);
}


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

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

LLVM IR (-O0):
%struct.uio_info_t = type { i32 }
define i32 @uio_irqwait(%struct.uio_info_t* %0) {
%2 = alloca %struct.uio_info_t*
store %struct.uio_info_t* %0, %struct.uio_info_t** %2
%3 = load %struct.uio_info_t*, %struct.uio_info_t** %2
%4 = call i32 @uio_irqwait_timeout(%struct.uio_info_t* %3, i32* null)
ret i32 %4
}

LLVM IR (-O2):
%struct.uio_info_t = type { i32 }
define i32 @uio_irqwait(%struct.uio_info_t* %0) {
%2 = tail call i32 @uio_irqwait_timeout(%struct.uio_info_t* %0, i32* null)
ret i32 %2
}
int _dotpn2(int src1, int src2) {
  short int s1_h = src1 >> 16;
  short int s1_l = src1;
  short int s2_h = src2 >> 16;
  short int s2_l = src2;
  return s1_h * s2_h - s1_l * s2_l;
}


x86 assembly (clang, -O0):
<_dotpn2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
mov    %ax,-0xa(%rbp)
mov    -0x4(%rbp),%eax
mov    %ax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x10,%eax
mov    %ax,-0xe(%rbp)
mov    -0x8(%rbp),%eax
mov    %ax,-0x10(%rbp)
movswl -0xa(%rbp),%eax
movswl -0xe(%rbp),%ecx
imul   %ecx,%eax
movswl -0xc(%rbp),%ecx
movswl -0x10(%rbp),%edx
imul   %edx,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_dotpn2>:
movswl %di,%ecx
sar    $0x10,%edi
movswl %si,%edx
mov    %esi,%eax
sar    $0x10,%eax
imul   %edi,%eax
imul   %ecx,%edx
sub    %edx,%eax
ret

LLVM IR (-O0):
define i32 @_dotpn2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i16
%6 = alloca i16
%7 = alloca i16
%8 = alloca i16
store i32 %0, i32* %3
store i32 %1, i32* %4
%9 = load i32, i32* %3
%10 = ashr i32 %9, 16
%11 = trunc i32 %10 to i16
store i16 %11, i16* %5
%12 = load i32, i32* %3
%13 = trunc i32 %12 to i16
store i16 %13, i16* %6
%14 = load i32, i32* %4
%15 = ashr i32 %14, 16
%16 = trunc i32 %15 to i16
store i16 %16, i16* %7
%17 = load i32, i32* %4
%18 = trunc i32 %17 to i16
store i16 %18, i16* %8
%19 = load i16, i16* %5
%20 = sext i16 %19 to i32
%21 = load i16, i16* %7
%22 = sext i16 %21 to i32
%23 = mul nsw i32 %20, %22
%24 = load i16, i16* %6
%25 = sext i16 %24 to i32
%26 = load i16, i16* %8
%27 = sext i16 %26 to i32
%28 = mul nsw i32 %25, %27
%29 = sub nsw i32 %23, %28
ret i32 %29
}

LLVM IR (-O2):
define i32 @_dotpn2(i32 %0, i32 %1) {
%3 = ashr i32 %0, 16
%4 = ashr i32 %1, 16
%5 = mul nsw i32 %4, %3
%6 = shl i32 %0, 16
%7 = ashr exact i32 %6, 16
%8 = shl i32 %1, 16
%9 = ashr exact i32 %8, 16
%10 = mul nsw i32 %9, %7
%11 = sub nsw i32 %5, %10
ret i32 %11
}
/* Variables and functions */
double sla_epj_(double *);
double slaEpj(double date) { return sla_epj_(&date); }


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

x86 assembly (clang, -O2):
<slaEpj>:
push   %rax
movsd  %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <sla_epj_@plt>
pop    %rax
ret

LLVM IR (-O0):
define double @slaEpj(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call double @sla_epj_(double* %2)
ret double %3
}

LLVM IR (-O2):
define double @slaEpj(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call double @sla_epj_(double* %2)
ret double %3
}
int okn_tsm_rot_z_by(struct okn_tsm *t, struct okn_vec3f *v, float z) {
  return 1;
}


x86 assembly (clang, -O0):
<okn_tsm_rot_z_by>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.okn_tsm = type opaque
%struct.okn_vec3f = type opaque
define i32 @okn_tsm_rot_z_by(%struct.okn_tsm* %0, %struct.okn_vec3f* %1, float %2) {
%4 = alloca %struct.okn_tsm*
%5 = alloca %struct.okn_vec3f*
%6 = alloca float
store %struct.okn_tsm* %0, %struct.okn_tsm** %4
store %struct.okn_vec3f* %1, %struct.okn_vec3f** %5
store float %2, float* %6
ret i32 1
}

LLVM IR (-O2):
%struct.okn_tsm = type opaque
%struct.okn_vec3f = type opaque
define i32 @okn_tsm_rot_z_by(%struct.okn_tsm* nocapture readnone %0, %struct.okn_vec3f* nocapture readnone %1, float %2) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
main() {
  int i, a = 1;
  for (i = 1; i <= 15; i += 2)
    a = a * i;
  printf("a=%d\n", a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0xf,-0x8(%rbp)
jg     114f <main+0x3f>
mov    -0xc(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
mov    -0xc(%rbp),%esi
lea    0xea7(%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
mov    $0x1eee11,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"a=%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 2027025)
ret i32 0
}
void propagate(void) {
  _serverPanic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/"
               "heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c",
               100, "Function '%s' is disabled.", __func__);
}


x86 assembly (clang, -O0):
<propagate>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x64,%esi
lea    0xf79(%rip),%rdx
lea    0xf8d(%rip),%rcx
mov    $0x0,%al
call   1030 <_serverPanic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<propagate>:
lea    0xee9(%rip),%rdi
lea    0xf82(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x64,%esi
xor    %eax,%eax
jmp    1030 <_serverPanic@plt>

LLVM IR (-O0):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.propagate = [10 x i8] c"propagate\00"
define void @propagate() {
%1 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 100, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__func__.propagate, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.propagate = [10 x i8] c"propagate\00"
define void @propagate() {
%1 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 100, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__func__.propagate, i64 0, i64 0))
ret void
}
void dnk_clear() {}


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

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

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

LLVM IR (-O2):
define void @dnk_clear() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ LOG_ERR;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void *realloc(void *, size_t);
int /*<<< orphan*/ syslog(int /*<<< orphan*/, char *, size_t);
void *xrealloc(void *ptr, size_t s) {
  void *value = realloc(ptr, s);
  if (value != NULL)
    return value;
  syslog(LOG_ERR, "memory exhausted (xrealloc %zu bytes)", s);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<xrealloc>:
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   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1166 <xrealloc+0x36>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret
mov    0x2e63(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xe86(%rip),%rsi
call   1030 <syslog@plt>
mov    0x2e5a(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<xrealloc>:
push   %rbx
mov    %rsi,%rbx
call   1040 <realloc@plt>
test   %rax,%rax
je     1140 <xrealloc+0x10>
pop    %rbx
ret
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
mov    %rbx,%rdx
call   1030 <syslog@plt>
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@LOG_ERR = global i32 0
@.str = [38 x i8] c"memory exhausted (xrealloc %zu bytes)\00"
@EXIT_FAILURE = global i32 0
define i8* @xrealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = load i8*, i8** %5
ret i8* %12
13: ; preds = %2
%14 = load i32, i32* @LOG_ERR
%15 = load i64, i64* %4
%16 = call i32 @syslog(i32 %14, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i64 %15)
%17 = load i32, i32* @EXIT_FAILURE
%18 = call i32 @exit(i32 %17)
unreachable
}

LLVM IR (-O2):
@LOG_ERR = global i32 0
@.str = [38 x i8] c"memory exhausted (xrealloc %zu bytes)\00"
@EXIT_FAILURE = global i32 0
define noalias i8* @xrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %6, label %5
5: ; preds = %2
ret i8* %3
6: ; preds = %2
%7 = load i32, i32* @LOG_ERR
%8 = tail call i32 @syslog(i32 %7, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i64 %1)
%9 = load i32, i32* @EXIT_FAILURE
%10 = tail call i32 @exit(i32 %9)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
void setPerformanceGovernor(void) {
  printf("Set Performance governor\n");
  system("echo performance > "
         "/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor");
}


x86 assembly (clang, -O0):
<setPerformanceGovernor>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
lea    0xee3(%rip),%rdi
call   1030 <system@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<setPerformanceGovernor>:
push   %rax
lea    0xf21(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1040 <system@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"Set Performance governor\0A\00"
@.str.1 = [73 x i8] c"echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor\00"
define void @setPerformanceGovernor() {
%1 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @system(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [73 x i8] c"echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor\00"
@str = [25 x i8] c"Set Performance governor\00"
define void @setPerformanceGovernor() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void perform_test(char *test_name, bool(testfunc)()) {
  if (testfunc() == true)
    printf("%s: passed.\n\n", test_name);
  else
    printf("%s: NOT passed.\n\n", test_name);
}


x86 assembly (clang, -O0):
<perform_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   *-0x10(%rbp)
cmp    $0x1,%eax
jne    1143 <perform_test+0x33>
mov    -0x8(%rbp),%rsi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
jmp    1153 <perform_test+0x43>
mov    -0x8(%rbp),%rsi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<perform_test>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   *%rsi
cmp    $0x1,%eax
lea    0xede(%rip),%rax
lea    0xee5(%rip),%rdi
cmove  %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"%s: passed.\0A\0A\00"
@.str.1 = [18 x i8] c"%s: NOT passed.\0A\0A\00"
define void @perform_test(i8* %0, i32 (...)* %1) {
%3 = alloca i8*
%4 = alloca i32 (...)*
store i8* %0, i8** %3
store i32 (...)* %1, i32 (...)** %4
%5 = load i32 (...)*, i32 (...)** %4
%6 = call i32 (...) %5()
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i8*, i8** %3
%10 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %9)
br label %14
11: ; preds = %2
%12 = load i8*, i8** %3
%13 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %12)
br label %14
14: ; preds = %11, %8
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"%s: passed.\0A\0A\00"
@.str.1 = [18 x i8] c"%s: NOT passed.\0A\0A\00"
define void @perform_test(i8* %0, i32 (...)* nocapture %1) {
%3 = tail call i32 (...) %1()
%4 = icmp eq i32 %3, 1
%5 = select i1 %4, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0)
%6 = tail call i32 @printf(i8* %5, i8* %0)
ret void
}
/* Variables and functions */
void *memmove(void *, void *, size_t);
void *mempcpy(void *dst, const void *src, size_t n) {
  return memmove(dst, (void *)src, n) + n;
}


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

x86 assembly (clang, -O2):
<mempcpy>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
call   1030 <memmove@plt>
add    %r14,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @mempcpy(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i8* @memmove(i8* %7, i8* %8, i64 %9)
%11 = load i64, i64* %6
%12 = getelementptr i8, i8* %10, i64 %11
ret i8* %12
}

LLVM IR (-O2):
define i8* @mempcpy(i8* writeonly %0, i8* nocapture %1, i64 %2) {
tail call void @llvm.memmove.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 %1, i64 %2, i1 false)
%4 = getelementptr i8, i8* %0, i64 %2
ret i8* %4
}
/* Variables and functions */
int pm8xxx_mpp_cfg(unsigned int, int, unsigned int, unsigned int);
int pm8xxx_mpp_config_dtest_output(unsigned mpp, unsigned level,
                                   unsigned control) {
  return pm8xxx_mpp_cfg(mpp, 7, level, control);
}


x86 assembly (clang, -O0):
<pm8xxx_mpp_config_dtest_output>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    $0x7,%esi
call   1030 <pm8xxx_mpp_cfg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pm8xxx_mpp_config_dtest_output>:
mov    %edx,%ecx
mov    %esi,%edx
mov    $0x7,%esi
jmp    1030 <pm8xxx_mpp_cfg@plt>

LLVM IR (-O0):
define i32 @pm8xxx_mpp_config_dtest_output(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @pm8xxx_mpp_cfg(i32 %7, i32 7, i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @pm8xxx_mpp_config_dtest_output(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @pm8xxx_mpp_cfg(i32 %0, i32 7, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
double trunc(double);
double rint(double x) { return trunc(x); }


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

x86 assembly (clang, -O2):
<rint>:
jmp    1030 <trunc@plt>

LLVM IR (-O0):
define double @rint(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @llvm.trunc.f64(double %3)
ret double %4
}

LLVM IR (-O2):
define double @rint(double %0) {
%2 = tail call double @llvm.trunc.f64(double %0)
ret double %2
}
int test_imm_95uint16_mem(unsigned short *val) {
  return ((*val) & (0x95 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_95uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 149
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
char *strdup(char const *);
char *must_copy_string(const char *entry) {
  char *ret;
  if (!entry)
    return NULL;
  do {
    ret = strdup(entry);
  } while (!ret);
  return ret;
}


x86 assembly (clang, -O0):
<must_copy_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1134 <must_copy_string+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1160 <must_copy_string+0x50>
jmp    1139 <must_copy_string+0x29>
mov    -0x10(%rbp),%rdi
call   1030 <strdup@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1139 <must_copy_string+0x29>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<must_copy_string>:
test   %rdi,%rdi
je     112f <must_copy_string+0x1f>
push   %rbx
mov    %rdi,%rbx
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1030 <strdup@plt>
test   %rax,%rax
je     1120 <must_copy_string+0x10>
pop    %rbx
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define noalias i8* @must_copy_string(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1, %3
%4 = tail call i8* @strdup(i8* %0)
%5 = icmp eq i8* %4, null
br i1 %5, label %3, label %6
6: ; preds = %3, %1
%7 = phi i8* [ null, %1 ], [ %4, %3 ]
ret i8* %7
}
/* Variables and functions */
int iCode_iter_can_has(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @iCode_iter_can_has() {
ret i32 0
}
void gtk_icon_source_set_pixbuf() {}


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

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

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

LLVM IR (-O2):
define void @gtk_icon_source_set_pixbuf() {
ret void
}
int null_putch(struct riku_devfs_node *self, char c) { return 0; }


x86 assembly (clang, -O0):
<null_putch>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.riku_devfs_node = type opaque
define i32 @null_putch(%struct.riku_devfs_node* %0, i8 signext %1) {
%3 = alloca %struct.riku_devfs_node*
%4 = alloca i8
store %struct.riku_devfs_node* %0, %struct.riku_devfs_node** %3
store i8 %1, i8* %4
ret i32 0
}

LLVM IR (-O2):
%struct.riku_devfs_node = type opaque
define i32 @null_putch(%struct.riku_devfs_node* nocapture readnone %0, i8 signext %1) {
ret i32 0
}
char *__attribute__((no)) my_memcpy(char *d, char *s, unsigned l) {
  return __builtin_memcpy(d, s, l);
}


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

x86 assembly (clang, -O2):
<my_memcpy>:
mov    %edx,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define i8* @my_memcpy(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = zext i32 %9 to i64
ret i8* %7
}

LLVM IR (-O2):
define i8* @my_memcpy(i8* returned writeonly %0, i8* nocapture %1, i32 %2) {
%4 = zext i32 %2 to i64
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 %1, i64 %4, i1 false)
ret i8* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
char *buffered_line_reader(int /*<<< orphan*/ *, int /*<<< orphan*/, int, int *,
                           char *);
scalar_t__ calloc(int, int);
char *store_lines(FILE *fp, int k) {
  char *result;
  char *acc;
  int len = 0;
  acc = (char *)calloc(1, sizeof(char));
  acc[0] = '\0';
  result = buffered_line_reader(fp, 0, k, &len, acc);
  return result;
}


x86 assembly (clang, -O0):
<store_lines>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x24(%rbp)
mov    $0x1,%esi
mov    %esi,%edi
call   1040 <calloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x20(%rbp),%r8
xor    %esi,%esi
lea    -0x24(%rbp),%rcx
call   1030 <buffered_line_reader@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<store_lines>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
movl   $0x0,0x4(%rsp)
mov    $0x1,%edi
mov    $0x1,%esi
call   1040 <calloc@plt>
movb   $0x0,(%rax)
lea    0x4(%rsp),%rcx
mov    %rbx,%rdi
xor    %esi,%esi
mov    %ebp,%edx
mov    %rax,%r8
call   1030 <buffered_line_reader@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @store_lines(i32* %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%5 = tail call i64 @calloc(i32 1, i32 1)
%6 = inttoptr i64 %5 to i8*
store i8 0, i8* %6
%7 = call i8* @buffered_line_reader(i32* %0, i32 0, i32 %1, i32* %3, i8* %6)
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void core(void) { printf("In the core\n"); }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"In the core\0A\00"
define void @core() {
%1 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [12 x i8] c"In the core\00"
define void @core() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret void
}
double substract_two_doubles(double a, double b) { return a - b; }


x86 assembly (clang, -O0):
<substract_two_doubles>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<substract_two_doubles>:
subsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @substract_two_doubles(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 = fsub double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @substract_two_doubles(double %0, double %1) {
%3 = fsub double %0, %1
ret double %3
}