xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ prog1();
int /*<<< orphan*/ prog2();
int main(int argc, char *argv[]) {
  printf("Hello from main.c\n");
  prog1();
  prog2();
  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    0xeb3(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <prog1@plt>
mov    $0x0,%al
call   1050 <prog2@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [19 x i8] c"Hello from main.c\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 ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (...) @prog1()
%8 = call i32 (...) @prog2()
ret i32 0
}

LLVM IR (-O2):
@str = [18 x i8] c"Hello from main.c\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @prog1()
%5 = tail call i32 (...) @prog2()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ primeFactorization(long);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, long *);
int main(int argc, const char *argv[]) {
  long n;
  printf("Enter number to be factored: ");
  scanf("%ld", &n);
  primeFactorization(n);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
lea    0xeda(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
mov    (%rsp),%rdi
call   1030 <primeFactorization@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Enter number to be factored: \00"
@.str.1 = [4 x i8] c"%ld\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %6)
%9 = load i64, i64* %6
%10 = call i32 @primeFactorization(i64 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"Enter number to be factored: \00"
@.str.1 = [4 x i8] c"%ld\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %3)
%7 = load i64, i64* %3
%8 = call i32 @primeFactorization(i64 %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
int main(int argc, char *argv[]) {
  printf("Red=%s Green=%s\n", "RED", "GrEeN");
  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
lea    0xedd(%rip),%rsi
lea    0xeda(%rip),%rdx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [17 x i8] c"Red=%s Green=%s\0A\00"
@.str.1 = [4 x i8] c"RED\00"
@.str.2 = [6 x i8] c"GrEeN\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 ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"Red=%s Green=%s\0A\00"
@.str.1 = [4 x i8] c"RED\00"
@.str.2 = [6 x i8] c"GrEeN\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
int exynos_get_idle_ip_index(const char *name) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @exynos_get_idle_ip_index(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ABI11_0_0CSSValueIsUndefined(float const);
int /*<<< orphan*/ printf(char *, char const *, float const);
void printNumberIfNotUndefined(const char *str, const float number) {
  if (!ABI11_0_0CSSValueIsUndefined(number)) {
    printf("%s: %g, ", str, number);
  }
}


x86 assembly (clang, -O0):
<printNumberIfNotUndefined>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
call   1040 <ABI11_0_0CSSValueIsUndefined@plt>
cmp    $0x0,%eax
jne    1159 <printNumberIfNotUndefined+0x39>
mov    -0x8(%rbp),%rsi
movss  -0xc(%rbp),%xmm0
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printNumberIfNotUndefined>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movss  %xmm0,0xc(%rsp)
call   1040 <ABI11_0_0CSSValueIsUndefined@plt>
test   %eax,%eax
je     113d <printNumberIfNotUndefined+0x1d>
add    $0x10,%rsp
pop    %rbx
ret
lea    0xebc(%rip),%rdi
mov    %rbx,%rsi
movss  0xc(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"%s: %g, \00"
define void @printNumberIfNotUndefined(i8* %0, float %1) {
%3 = tail call i32 @ABI11_0_0CSSValueIsUndefined(float %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0, float %1)
br label %7
7: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x14() {
  Assert_real((isbdigit(20) == 0),
              "/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_isbdigit.c",
              105, ("isbdigit should be 0 for 0x14"));
}


x86 assembly (clang, -O0):
<t_isbdigit_0x14>:
push   %rbp
mov    %rsp,%rbp
mov    $0x14,%edi
call   1040 <isbdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x69,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isbdigit_0x14>:
push   %rax
mov    $0x14,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x69,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0x14\00"
define void @t_isbdigit_0x14() {
%1 = call i64 @isbdigit(i32 20)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 105, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0x14\00"
define void @t_isbdigit_0x14() {
%1 = tail call i64 @isbdigit(i32 20)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 105, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bitOperation();
int main(void) {
  bitOperation();
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <bitOperation@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @bitOperation()
ret i32 1
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @bitOperation()
ret i32 1
}
float mix1d(float a, float b, float t) {
  float ba = b - a;
  float tba = t * ba;
  float atba = a + tba;
  return atba;
}


x86 assembly (clang, -O0):
<mix1d>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mix1d>:
subss  %xmm0,%xmm1
mulss  %xmm2,%xmm1
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @mix1d(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%10 = load float, float* %5
%11 = load float, float* %4
%12 = fsub float %10, %11
store float %12, float* %7
%13 = load float, float* %6
%14 = load float, float* %7
%15 = fmul float %13, %14
store float %15, float* %8
%16 = load float, float* %4
%17 = load float, float* %8
%18 = fadd float %16, %17
store float %18, float* %9
%19 = load float, float* %9
ret float %19
}

LLVM IR (-O2):
define float @mix1d(float %0, float %1, float %2) {
%4 = fsub float %1, %0
%5 = fmul float %4, %2
%6 = fadd float %5, %0
ret float %6
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
scalar_t__ strlen(char *);
int IsEmptyRow(char *content) {
  return strlen(content) == 0 || strcmp(content, "\n") == 0;
}


x86 assembly (clang, -O0):
<IsEmptyRow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
je     1161 <IsEmptyRow+0x41>
mov    -0x8(%rbp),%rdi
lea    0xeae(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsEmptyRow>:
push   %rax
cmpb   $0x0,(%rdi)
je     112f <IsEmptyRow+0x1f>
lea    0xee3(%rip),%rsi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rcx
ret
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define i32 @IsEmptyRow(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strlen(i8* %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i64 @strcmp(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%9 = icmp eq i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define i32 @IsEmptyRow(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
float __floatdisf(long i) { return (float)((int)i); }


x86 assembly (clang, -O0):
<__floatdisf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cvtsi2ss %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<__floatdisf>:
cvtsi2ss %edi,%xmm0
ret

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

LLVM IR (-O2):
define float @__floatdisf(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = sitofp i32 %2 to float
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ android_compiler_barrier();
extern __attribute__((always_)) void android_memory_barrier(void) {
  android_compiler_barrier();
}


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

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

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

LLVM IR (-O2):
define void @android_memory_barrier() {
%1 = tail call i32 (...) @android_compiler_barrier()
ret void
}
double *fct_6(double *a, double *b, double *c, double *d, double *e, double *f,
              double *g, double *h) {
  (void)a;
  (void)b;
  (void)c;
  (void)d;
  (void)e;
  (void)f;
  (void)g;
  (void)h;
  return g;
}


x86 assembly (clang, -O0):
<fct_6>:
push   %rbp
mov    %rsp,%rbp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fct_6>:
mov    0x8(%rsp),%rax
ret

LLVM IR (-O0):
define double* @fct_6(double* %0, double* %1, double* %2, double* %3, double* %4, double* %5, double* %6, double* %7) {
%9 = alloca double*
%10 = alloca double*
%11 = alloca double*
%12 = alloca double*
%13 = alloca double*
%14 = alloca double*
%15 = alloca double*
%16 = alloca double*
store double* %0, double** %9
store double* %1, double** %10
store double* %2, double** %11
store double* %3, double** %12
store double* %4, double** %13
store double* %5, double** %14
store double* %6, double** %15
store double* %7, double** %16
%17 = load double*, double** %9
%18 = load double*, double** %10
%19 = load double*, double** %11
%20 = load double*, double** %12
%21 = load double*, double** %13
%22 = load double*, double** %14
%23 = load double*, double** %15
%24 = load double*, double** %16
%25 = load double*, double** %15
ret double* %25
}

LLVM IR (-O2):
define double* @fct_6(double* nocapture readnone %0, double* nocapture readnone %1, double* nocapture readnone %2, double* nocapture readnone %3, double* nocapture readnone %4, double* nocapture readnone %5, double* readnone returned %6, double* nocapture readnone %7) {
ret double* %6
}
/* Type definitions */
typedef int /*<<< orphan*/ __u64;

/* Variables and functions */
unsigned long hweight64(__u64 w) {}


x86 assembly (clang, -O0):
<hweight64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @hweight64(i32 %0) {
ret i64 undef
}
/* Variables and functions */
int /*<<< orphan*/ gresize(int *, int *, int *);
void GempakResize(char *windowName, int width, int height) {
  int iret;
  gresize(&width, &height, &iret);
  return;
}


x86 assembly (clang, -O0):
<GempakResize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
lea    -0xc(%rbp),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
call   1030 <gresize@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GempakResize>:
sub    $0x18,%rsp
mov    %esi,0x10(%rsp)
mov    %edx,0xc(%rsp)
lea    0x10(%rsp),%rdi
lea    0xc(%rsp),%rsi
lea    0x14(%rsp),%rdx
call   1030 <gresize@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @GempakResize(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = call i32 @gresize(i32* %5, i32* %6, i32* %7)
ret void
}

LLVM IR (-O2):
define void @GempakResize(i8* nocapture readnone %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %1, i32* %4
store i32 %2, i32* %5
%7 = bitcast i32* %6 to i8*
%8 = call i32 @gresize(i32* %4, i32* %5, i32* %6)
ret void
}
/* Type definitions */
typedef scalar_t__ __v8qi;
typedef scalar_t__ __m64;

/* Variables and functions */
__m64 __attribute__((__always___, __nodebug__))
_mm_cmpgt_pi8(__m64 __m1, __m64 __m2) {
  return (__m64)((__v8qi)__m1 > (__v8qi)__m2);
}


x86 assembly (clang, -O0):
<_mm_cmpgt_pi8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mm_cmpgt_pi8>:
xor    %eax,%eax
cmp    %rsi,%rdi
setg   %al
ret

LLVM IR (-O0):
define i64 @_mm_cmpgt_pi8(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp sgt i64 %5, %6
%8 = zext i1 %7 to i32
%9 = sext i32 %8 to i64
ret i64 %9
}

LLVM IR (-O2):
define i64 @_mm_cmpgt_pi8(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = zext i1 %3 to i64
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
void reset_memory(char *start, char *end) { memset(start, 0, end - start); }


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

x86 assembly (clang, -O2):
<reset_memory>:
mov    %rsi,%rdx
sub    %edi,%edx
xor    %esi,%esi
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @reset_memory(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %3
%8 = ptrtoint i8* %6 to i64
%9 = ptrtoint i8* %7 to i64
%10 = sub i64 %8, %9
%11 = trunc i64 %10 to i32
%12 = call i32 @memset(i8* %5, i32 0, i32 %11)
ret void
}

LLVM IR (-O2):
define void @reset_memory(i8* %0, i8* %1) {
%3 = ptrtoint i8* %1 to i64
%4 = ptrtoint i8* %0 to i64
%5 = sub i64 %3, %4
%6 = trunc i64 %5 to i32
%7 = tail call i32 @memset(i8* %0, i32 0, i32 %6)
ret void
}
_Bool Int_mask(int a, int b) { return a & b; }


x86 assembly (clang, -O0):
<Int_mask>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Int_mask>:
test   %edi,%esi
setne  %al
ret

LLVM IR (-O0):
define zeroext i1 @Int_mask(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = and i32 %5, %6
%8 = icmp ne i32 %7, 0
ret i1 %8
}

LLVM IR (-O2):
define zeroext i1 @Int_mask(i32 %0, i32 %1) {
%3 = and i32 %1, %0
%4 = icmp ne i32 %3, 0
ret i1 %4
}
/* Type definitions */
typedef short ptrdiff_t;

/* Variables and functions */
int /*<<< orphan*/ dir_free(void *);
void libsais_free_aligned(void *aligned_address) {
  if (aligned_address != NULL) {
    dir_free(
        (void *)((ptrdiff_t)aligned_address - ((short *)aligned_address)[-1]));
  }
}


x86 assembly (clang, -O0):
<libsais_free_aligned>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113e <libsais_free_aligned+0x2e>
mov    -0x8(%rbp),%rax
cwtl
mov    -0x8(%rbp),%rcx
movswl -0x2(%rcx),%ecx
sub    %ecx,%eax
movslq %eax,%rdi
call   1030 <dir_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libsais_free_aligned>:
test   %rdi,%rdi
je     1128 <libsais_free_aligned+0x18>
movswl %di,%eax
movswq -0x2(%rdi),%rcx
movslq %eax,%rdi
sub    %rcx,%rdi
jmp    1030 <dir_free@plt>
ret

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

LLVM IR (-O2):
define void @libsais_free_aligned(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %16, label %3
3: ; preds = %1
%4 = ptrtoint i8* %0 to i64
%5 = trunc i64 %4 to i32
%6 = shl i32 %5, 16
%7 = ashr exact i32 %6, 16
%8 = getelementptr inbounds i8, i8* %0, i64 -2
%9 = bitcast i8* %8 to i16*
%10 = load i16, i16* %9
%11 = sext i16 %10 to i32
%12 = sub nsw i32 %7, %11
%13 = sext i32 %12 to i64
%14 = inttoptr i64 %13 to i8*
%15 = tail call i32 @dir_free(i8* %14)
br label %16
16: ; preds = %3, %1
ret void
}
int mDB_prev(fn, idx, key, rows, dst) {
  return mDBi_msg('p', fn, idx, rows, key, 0, 0, dst);
}


x86 assembly (clang, -O0):
<mDB_prev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%r8d
mov    -0x14(%rbp),%eax
mov    $0x70,%edi
xor    %r9d,%r9d
movl   $0x0,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   1030 <mDBi_msg@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mDB_prev>:
push   %rax
mov    %r8d,%r10d
mov    %edx,%r8d
mov    %esi,%edx
mov    %edi,%esi
mov    $0x70,%edi
xor    %r9d,%r9d
xor    %eax,%eax
push   %r10
push   $0x0
call   1030 <mDBi_msg@plt>
add    $0x10,%rsp
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mDB_prev(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i32, i32* %9
%14 = load i32, i32* %8
%15 = load i32, i32* %10
%16 = call i32 (i32, i32, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @mDBi_msg to i32 (i32, i32, i32, i32, i32, i32, i32, i32, ...)*)(i32 112, i32 %11, i32 %12, i32 %13, i32 %14, i32 0, i32 0, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @mDB_prev(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 (i32, i32, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @mDBi_msg to i32 (i32, i32, i32, i32, i32, i32, i32, i32, ...)*)(i32 112, i32 %0, i32 %1, i32 %3, i32 %2, i32 0, i32 0, i32 %4)
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ siginfo_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void handler1(int signo, siginfo_t *info, void *context) {
  printf("handler1 entered: signal %d\n", signo);
}


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

x86 assembly (clang, -O2):
<handler1>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [29 x i8] c"handler1 entered: signal %d\0A\00"
define void @handler1(i32 %0, i32* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
unsigned char f80(unsigned char x, long int y) {
  return (x << y) + (x >> (8 * sizeof(unsigned char) - y));
}


x86 assembly (clang, -O0):
<f80>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movzbl -0x1(%rbp),%eax
mov    -0x10(%rbp),%rcx
shl    %cl,%eax
movzbl -0x1(%rbp),%edx
mov    $0x8,%ecx
sub    -0x10(%rbp),%rcx
sar    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f80>:
mov    %rsi,%rcx
mov    %edi,%eax
shl    %cl,%eax
mov    $0x8,%dl
sub    %cl,%dl
mov    %edx,%ecx
shr    %cl,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @f80(i8 zeroext %0, i64 %1) {
%3 = alloca i8
%4 = alloca i64
store i8 %0, i8* %3
store i64 %1, i64* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i64, i64* %4
%8 = trunc i64 %7 to i32
%9 = shl i32 %6, %8
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = load i64, i64* %4
%13 = sub i64 8, %12
%14 = trunc i64 %13 to i32
%15 = ashr i32 %11, %14
%16 = add nsw i32 %9, %15
%17 = trunc i32 %16 to i8
ret i8 %17
}

LLVM IR (-O2):
define zeroext i8 @f80(i8 zeroext %0, i64 %1) {
%3 = zext i8 %0 to i32
%4 = trunc i64 %1 to i32
%5 = shl i32 %3, %4
%6 = sub i32 8, %4
%7 = lshr i32 %3, %6
%8 = add nsw i32 %7, %5
%9 = trunc i32 %8 to i8
ret i8 %9
}
/* Variables and functions */
int func1(int);
int func2(int n) { return (func1(n) + 10); }


x86 assembly (clang, -O0):
<func2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <func1@plt>
add    $0xa,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func2>:
push   %rax
call   1030 <func1@plt>
add    $0xa,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @func2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @func1(i32 %3)
%5 = add nsw i32 %4, 10
ret i32 %5
}

LLVM IR (-O2):
define i32 @func2(i32 %0) {
%2 = tail call i32 @func1(i32 %0)
%3 = add nsw i32 %2, 10
ret i32 %3
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t USBEndpointStatus(uint32_t ui32Base, uint32_t ui32Endpoint) {
  uint32_t ui32Status;
  ;

  ;
  ui32Status = (*((volatile unsigned short *)(ui32Base + (ui32Endpoint - 0x10) +
                                              0x00000112)));
  ui32Status |=
      (((*((volatile unsigned short *)(ui32Base + (ui32Endpoint - 0x10) +
                                       0x00000116))))
       << 16);
  return (ui32Status);
}


x86 assembly (clang, -O0):
<USBEndpointStatus>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x10,%ecx
add    %ecx,%eax
add    $0x112,%eax
cltq
mov    (%rax),%ax
movzwl %ax,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x10,%ecx
add    %ecx,%eax
add    $0x116,%eax
cltq
mov    (%rax),%ax
movzwl %ax,%eax
shl    $0x10,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBEndpointStatus>:
lea    (%rdi,%rsi,1),%eax
add    $0xfffffff0,%eax
cltq
movzwl 0x112(%rax),%ecx
movzwl 0x116(%rax),%eax
shl    $0x10,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @USBEndpointStatus(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = sub nsw i32 %7, 16
%9 = add nsw i32 %6, %8
%10 = add nsw i32 %9, 274
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to i16*
%13 = load volatile i16, i16* %12
%14 = zext i16 %13 to i32
store i32 %14, i32* %5
%15 = load i32, i32* %3
%16 = load i32, i32* %4
%17 = sub nsw i32 %16, 16
%18 = add nsw i32 %15, %17
%19 = add nsw i32 %18, 278
%20 = sext i32 %19 to i64
%21 = inttoptr i64 %20 to i16*
%22 = load volatile i16, i16* %21
%23 = zext i16 %22 to i32
%24 = shl i32 %23, 16
%25 = load i32, i32* %5
%26 = or i32 %25, %24
store i32 %26, i32* %5
%27 = load i32, i32* %5
ret i32 %27
}

LLVM IR (-O2):
define i32 @USBEndpointStatus(i32 %0, i32 %1) {
%3 = add i32 %0, -16
%4 = add i32 %3, %1
%5 = add nsw i32 %4, 274
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i16*
%8 = load volatile i16, i16* %7
%9 = zext i16 %8 to i32
%10 = add nsw i32 %4, 278
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to i16*
%13 = load volatile i16, i16* %12
%14 = zext i16 %13 to i32
%15 = shl nuw i32 %14, 16
%16 = or i32 %15, %9
ret i32 %16
}
int main() {
  int i;
  i = 0;
  while (i < 100) {
    i = i + 0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    112a <main+0x2a>
mov    -0x8(%rbp),%eax
add    $0x0,%eax
mov    %eax,-0x8(%rbp)
jmp    1112 <main+0x12>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 100
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 0
store i32 %8, i32* %2
br label %3
9: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
/* Variables and functions */
int /*<<< orphan*/ fmod(float, float);
float lua_check_number(int, char *);
int /*<<< orphan*/ lua_pushnumber(int /*<<< orphan*/);
void math_mod(void) {
  float x = lua_check_number(1, "mod");
  float y = lua_check_number(2, "mod");
  lua_pushnumber(fmod(x, y));
}


x86 assembly (clang, -O0):
<math_mod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
lea    0xebc(%rip),%rsi
call   1030 <lua_check_number@plt>
movss  %xmm0,-0x4(%rbp)
mov    $0x2,%edi
lea    0xea6(%rip),%rsi
call   1030 <lua_check_number@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1040 <fmod@plt>
mov    %eax,%edi
call   1050 <lua_pushnumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<math_mod>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rbx
mov    $0x1,%edi
mov    %rbx,%rsi
call   1030 <lua_check_number@plt>
movss  %xmm0,0xc(%rsp)
mov    $0x2,%edi
mov    %rbx,%rsi
call   1030 <lua_check_number@plt>
movaps %xmm0,%xmm1
movss  0xc(%rsp),%xmm0
call   1040 <fmod@plt>
mov    %eax,%edi
add    $0x10,%rsp
pop    %rbx
jmp    1050 <lua_pushnumber@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"mod\00"
define void @math_mod() {
%1 = alloca float
%2 = alloca float
%3 = call float @lua_check_number(i32 1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store float %3, float* %1
%4 = call float @lua_check_number(i32 2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store float %4, float* %2
%5 = load float, float* %1
%6 = load float, float* %2
%7 = call i32 @fmod(float %5, float %6)
%8 = call i32 @lua_pushnumber(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"mod\00"
define void @math_mod() {
%1 = tail call float @lua_check_number(i32 1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = tail call float @lua_check_number(i32 2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @fmod(float %1, float %2)
%4 = tail call i32 @lua_pushnumber(i32 %3)
ret void
}
void d2i_X509_REVOKED(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gtk_box_pack_start_defaults() {
ret void
}
int traceEnabled(const char *name) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @traceEnabled(i8* nocapture readnone %0) {
ret i32 1
}
/* Variables and functions */
int socket_close(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @socket_close() {
ret i32 1
}

LLVM IR (-O2):
define i32 @socket_close() {
ret i32 1
}
/* Variables and functions */
int close(int);
int tcp_close(int fd) { return close(fd); }


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

x86 assembly (clang, -O2):
<tcp_close>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @tcp_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
void uDMAChannel24_31SelectDefault(unsigned long ulDefPeriphs) {
  (*((volatile unsigned long *)(0x400FF51C))) &= ~ulDefPeriphs;
}


x86 assembly (clang, -O0):
<uDMAChannel24_31SelectDefault>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
xor    $0xffffffffffffffff,%rax
mov    $0x400ff51c,%ecx
mov    (%rcx),%rcx
and    %rax,%rcx
mov    $0x400ff51c,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<uDMAChannel24_31SelectDefault>:
not    %rdi
and    %rdi,0x400ff51c
40
ret

LLVM IR (-O0):
define void @uDMAChannel24_31SelectDefault(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = xor i64 %3, -1
%5 = load volatile i64, i64* inttoptr (i64 1074787612 to i64*)
%6 = and i64 %5, %4
store volatile i64 %6, i64* inttoptr (i64 1074787612 to i64*)
ret void
}

LLVM IR (-O2):
define void @uDMAChannel24_31SelectDefault(i64 %0) {
%2 = xor i64 %0, -1
%3 = load volatile i64, i64* inttoptr (i64 1074787612 to i64*)
%4 = and i64 %3, %2
store volatile i64 %4, i64* inttoptr (i64 1074787612 to i64*)
ret void
}
void bootblock_southbridge_init(void) {}


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

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

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

LLVM IR (-O2):
define void @bootblock_southbridge_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char);
int main() {
  int i;
  for (i = 0; i < 26; i++) {
    char ch = 65 + i;
    printf("%d : %c \n", i + 1, ch);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x1a,-0x8(%rbp)
jge    115d <main+0x4d>
mov    -0x8(%rbp),%eax
add    $0x41,%eax
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%esi
add    $0x1,%esi
lea    0xeba(%rip),%rdi
movsbl -0x9(%rbp),%edx
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebx
lea    0xee0(%rip),%r14
lea    0x40(%rbx),%eax
movsbl %al,%edx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x1b,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"%d : %c \0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = trunc i32 %2 to i8
%4 = add nuw nsw i8 %3, 65
%5 = add nuw nsw i32 %2, 1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %5, i8 signext %4)
%7 = icmp eq i32 %5, 26
br i1 %7, label %8, label %1
8: ; preds = %1
ret i32 0
}
int charToInt(char ch) {
  ch -= '0';
  if (ch >= 10)
    ch -= 'A' - '9' - 1;
  if (ch > 15)
    ch -= 'a' - 'A';
  return ch;
}


x86 assembly (clang, -O0):
<charToInt>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
sub    $0x30,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
jl     112b <charToInt+0x2b>
movsbl -0x1(%rbp),%eax
sub    $0x7,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0xf,%eax
jle    1142 <charToInt+0x42>
movsbl -0x1(%rbp),%eax
sub    $0x20,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<charToInt>:
lea    -0x30(%rdi),%eax
add    $0xc9,%dil
cmp    $0xa,%al
movzbl %dil,%ecx
movzbl %al,%eax
cmovge %ecx,%eax
lea    -0x20(%rax),%ecx
cmp    $0x10,%al
movzbl %cl,%ecx
cmovl  %eax,%ecx
movsbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @charToInt(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = sub nsw i32 %4, 48
%6 = trunc i32 %5 to i8
store i8 %6, i8* %2
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sge i32 %8, 10
br i1 %9, label %10, label %15
10: ; preds = %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = sub nsw i32 %12, 7
%14 = trunc i32 %13 to i8
store i8 %14, i8* %2
br label %15
15: ; preds = %10, %1
%16 = load i8, i8* %2
%17 = sext i8 %16 to i32
%18 = icmp sgt i32 %17, 15
br i1 %18, label %19, label %24
19: ; preds = %15
%20 = load i8, i8* %2
%21 = sext i8 %20 to i32
%22 = sub nsw i32 %21, 32
%23 = trunc i32 %22 to i8
store i8 %23, i8* %2
br label %24
24: ; preds = %19, %15
%25 = load i8, i8* %2
%26 = sext i8 %25 to i32
ret i32 %26
}

LLVM IR (-O2):
define i32 @charToInt(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp sgt i8 %2, 9
%4 = add i8 %0, -55
%5 = select i1 %3, i8 %4, i8 %2
%6 = icmp sgt i8 %5, 15
%7 = add i8 %5, -32
%8 = select i1 %6, i8 %7, i8 %5
%9 = sext i8 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *, size_t const);
char *xmalloc(size_t const);
char *xstrndup(const char *s, const size_t count) {
  char *S;
  S = xmalloc(count + 1);
  memcpy(S, s, count);
  S[count] = 0;
  return S;
}


x86 assembly (clang, -O0):
<xstrndup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1030 <xmalloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrndup>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
lea    0x1(%rsi),%rdi
call   1030 <xmalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <memcpy@plt>
movb   $0x0,(%rbx,%r15,1)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @xstrndup(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 i64, i64* %4
%7 = add i64 %6, 1
%8 = call i8* @xmalloc(i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = load i8*, i8** %3
%11 = load i64, i64* %4
%12 = call i32 @memcpy(i8* %9, i8* %10, i64 %11)
%13 = load i8*, i8** %5
%14 = load i64, i64* %4
%15 = getelementptr inbounds i8, i8* %13, i64 %14
store i8 0, i8* %15
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
define i8* @xstrndup(i8* %0, i64 %1) {
%3 = add i64 %1, 1
%4 = tail call i8* @xmalloc(i64 %3)
%5 = tail call i32 @memcpy(i8* %4, i8* %0, i64 %1)
%6 = getelementptr inbounds i8, i8* %4, i64 %1
store i8 0, i8* %6
ret i8* %4
}
void _Jv_CreateJavaVM() {}


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

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

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

LLVM IR (-O2):
define void @_Jv_CreateJavaVM() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void IFhead(int osvers, int osrel, int ossub) {
  printf("interf ierr/s oerr/s coll/s idrop/s odrop/s "
         "iframe/s ocarrier/s  _if_");
}


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

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

LLVM IR (-O0):
@.str = [70 x i8] c"interf ierr/s oerr/s coll/s idrop/s odrop/s iframe/s ocarrier/s _if_\00"
define void @IFhead(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 = call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [70 x i8] c"interf ierr/s oerr/s coll/s idrop/s odrop/s iframe/s ocarrier/s _if_\00"
define void @IFhead(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0))
ret void
}
int sec_hours(int sec) {
  int hour;
  hour = sec / 3600;
  return hour;
}


x86 assembly (clang, -O0):
<sec_hours>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xe10,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sec_hours>:
movslq %edi,%rax
imul   $0xffffffff91a2b3c5,%rax,%rcx
shr    $0x20,%rcx
add    %ecx,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0xb,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @sec_hours(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sdiv i32 %4, 3600
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @sec_hours(i32 %0) {
%2 = sdiv i32 %0, 3600
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int pattern(int n) {
  int a = n;
  if (n >= 0) {
    printf("%d ", a);
    a = pattern(n - 5);
    printf("%d ", n);
  } else
    printf("%d ", a);
}


x86 assembly (clang, -O0):
<pattern>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     116c <pattern+0x4c>
mov    -0xc(%rbp),%esi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
sub    $0x5,%edi
call   1040 <pattern@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
jmp    117b <pattern+0x5b>
mov    -0xc(%rbp),%esi
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pattern>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
test   %ebx,%ebx
js     114b <pattern+0x2b>
lea    -0x5(%rbx),%edi
call   1040 <pattern@plt>
lea    0xebc(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define i32 @pattern(i32 %0) {
%2 = icmp sgt i32 %0, -1
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
br i1 %2, label %5, label %4
4: ; preds = %1, %5
ret i32 undef
5: ; preds = %1
%6 = add nsw i32 %0, -5
%7 = tail call i32 @pattern(i32 %6)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %4
}
void gtk_widget_flags_get_type() {}


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

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

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

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