xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int, int, int, int, int, int,
                          int, int, int, int, int, int);
void t_c(void) {
  printf("    %c%c%c%c%c%c%c%c%c%c%c%c%c%c%c\n", -64, -60, -63, -60, -63, -60,
         -63, -60, -63, -60, -63, -60, -63, -60, -39);
}


x86 assembly (clang, -O0):
<t_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    0xee1(%rip),%rdi
mov    $0xffffffc0,%esi
mov    $0xffffffc4,%r8d
mov    $0xffffffc1,%r9d
mov    %r8d,%edx
mov    %r9d,%ecx
movl   $0xffffffc4,(%rsp)
movl   $0xffffffc1,0x8(%rsp)
ff
movl   $0xffffffc4,0x10(%rsp)
ff
movl   $0xffffffc1,0x18(%rsp)
ff
movl   $0xffffffc4,0x20(%rsp)
ff
movl   $0xffffffc1,0x28(%rsp)
ff
movl   $0xffffffc4,0x30(%rsp)
ff
movl   $0xffffffc1,0x38(%rsp)
ff
movl   $0xffffffc4,0x40(%rsp)
ff
movl   $0xffffffd9,0x48(%rsp)
ff
call   1030 <printf@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_c>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xffffffc0,%esi
mov    $0xffffffc4,%edx
mov    $0xffffffc1,%ecx
mov    $0xffffffc4,%r8d
mov    $0xffffffc1,%r9d
push   $0xffffffffffffffd9
push   $0xffffffffffffffc4
push   $0xffffffffffffffc1
push   $0xffffffffffffffc4
push   $0xffffffffffffffc1
push   $0xffffffffffffffc4
push   $0xffffffffffffffc1
push   $0xffffffffffffffc4
push   $0xffffffffffffffc1
push   $0xffffffffffffffc4
call   1030 <printf@plt>
add    $0x50,%rsp
pop    %rax
ret

LLVM IR (-O0):
@.str = [36 x i8] c" %c%c%c%c%c%c%c%c%c%c%c%c%c%c%c\0A\00"
define void @t_c() {
%1 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 -64, i32 -60, i32 -63, i32 -60, i32 -63, i32 -60, i32 -63, i32 -60, i32 -63, i32 -60, i32 -63, i32 -60, i32 -63, i32 -60, i32 -39)
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c" %c%c%c%c%c%c%c%c%c%c%c%c%c%c%c\0A\00"
define void @t_c() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 -64, i32 -60, i32 -63, i32 -60, i32 -63, i32 -60, i32 -63, i32 -60, i32 -63, i32 -60, i32 -63, i32 -60, i32 -63, i32 -60, i32 -39)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strncmp(char *, char *, int);
void strncmp_null_0() {
  char *x = 0;
  char *y = "123";
  strncmp(x, y, 3);
}


x86 assembly (clang, -O0):
<strncmp_null_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
lea    0xed9(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncmp_null_0>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
mov    $0x3,%edx
jmp    1030 <strncmp@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"123\00"
define void @strncmp_null_0() {
%1 = tail call i32 @strncmp(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int sweep_get_quaddobl_start(int n, double *c) {
  int fail, ptos[2];
  ptos[0] = 2;
  ptos[1] = 0;
  fail = _ada_use_c2phc(619, ptos, &n, c);
  return fail;
}


x86 assembly (clang, -O0):
<sweep_get_quaddobl_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x2,-0x1c(%rbp)
movl   $0x0,-0x18(%rbp)
lea    -0x1c(%rbp),%rsi
mov    -0x10(%rbp),%rcx
mov    $0x26b,%edi
lea    -0x4(%rbp),%rdx
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sweep_get_quaddobl_start>:
sub    $0x18,%rsp
mov    %rsi,%rcx
mov    %edi,0xc(%rsp)
movq   $0x2,0x10(%rsp)
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
mov    $0x26b,%edi
call   1030 <_ada_use_c2phc@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @sweep_get_quaddobl_start(i32 %0, double* %1) {
%3 = alloca i32
%4 = alloca double*
%5 = alloca i32
%6 = alloca [2 x i32]
store i32 %0, i32* %3
store double* %1, double** %4
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
store i32 2, i32* %7
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 1
store i32 0, i32* %8
%9 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%10 = load double*, double** %4
%11 = call i32 @_ada_use_c2phc(i32 619, i32* %9, i32* %3, double* %10)
store i32 %11, i32* %5
%12 = load i32, i32* %5
ret i32 %12
}

LLVM IR (-O2):
define i32 @sweep_get_quaddobl_start(i32 %0, double* %1) {
%3 = alloca i32
%4 = alloca [2 x i32]
store i32 %0, i32* %3
%5 = bitcast [2 x i32]* %4 to i8*
%6 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
store i32 2, i32* %6
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 1
store i32 0, i32* %7
%8 = call i32 @_ada_use_c2phc(i32 619, i32* %6, i32* %3, double* %1)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void assert_value(float diff) {
  assert(diff > -0.0001);
  assert(diff < 0.0001);
}


x86 assembly (clang, -O0):
<assert_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeda(%rip),%xmm1
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeb0(%rip),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert_value>:
push   %rax
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,(%rsp)
xor    %edi,%edi
ucomisd 0xedc(%rip),%xmm0
seta   %dil
call   1030 <assert@plt>
movsd  0xed3(%rip),%xmm0
xor    %edi,%edi
ucomisd (%rsp),%xmm0
seta   %dil
pop    %rax
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @assert_value(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fcmp ogt double %4, -1.000000e-04
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load float, float* %2
%9 = fpext float %8 to double
%10 = fcmp olt double %9, 1.000000e-04
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
ret void
}

LLVM IR (-O2):
define void @assert_value(float %0) {
%2 = fpext float %0 to double
%3 = fcmp ogt double %2, -1.000000e-04
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = fcmp olt double %2, 1.000000e-04
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
ret void
}
/* Variables and functions */
int exp(double);
double sqrt(int);
double GAUSSF(double x) {
  return (1 / (0.5 * sqrt(2 * 3.14159265))) * exp(-(x * x) / (2 * 0.5 * 0.5));
}


x86 assembly (clang, -O0):
<GAUSSF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x6,%edi
call   1040 <sqrt@plt>
movsd  0xec1(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  0xebd(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xe83(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  -0x10(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GAUSSF>:
sub    $0x28,%rsp
movapd %xmm0,0x10(%rsp)
mov    $0x6,%edi
call   1040 <sqrt@plt>
mulsd  0xec4(%rip),%xmm0
movsd  0xec4(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
movapd 0xeba(%rip),%xmm0
movapd 0x10(%rsp),%xmm1
xorpd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
addsd  %xmm0,%xmm0
call   1030 <exp@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x8(%rsp),%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @GAUSSF(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call double @sqrt(i32 6)
%4 = fmul double 5.000000e-01, %3
%5 = fdiv double 1.000000e+00, %4
%6 = load double, double* %2
%7 = load double, double* %2
%8 = fmul double %6, %7
%9 = fneg double %8
%10 = fdiv double %9, 5.000000e-01
%11 = call i32 @exp(double %10)
%12 = sitofp i32 %11 to double
%13 = fmul double %5, %12
ret double %13
}

LLVM IR (-O2):
define double @GAUSSF(double %0) {
%2 = tail call double @sqrt(i32 6)
%3 = fmul double %2, 5.000000e-01
%4 = fdiv double 1.000000e+00, %3
%5 = fneg double %0
%6 = fmul double %5, %0
%7 = fmul double %6, 2.000000e+00
%8 = tail call i32 @exp(double %7)
%9 = sitofp i32 %8 to double
%10 = fmul double %4, %9
ret double %10
}
int main(void) {
  int a;
  int b[4];
  b[a] = 0;
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movslq -0x8(%rbp),%rax
movl   $0x0,-0x20(%rbp,%rax,4)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [4 x i32]
store i32 0, i32* %1
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 %5
store i32 0, i32* %6
ret i32 1
}

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

/* Variables and functions */
int /*<<< orphan*/ printf(char *, void *);
scalar_t__ pthread_self();
int /*<<< orphan*/ sem_wait(int /*<<< orphan*/ *);
void *thread_func(void *arg) {
  sem_t *psem = (sem_t *)arg;
  void *me = (void *)pthread_self();
  printf("thread %p waiting\n", me);
  sem_wait(psem);
  printf("thread %p exiting\n", me);
  return me;
}


x86 assembly (clang, -O0):
<thread_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xea6(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <sem_wait@plt>
mov    -0x18(%rbp),%rsi
lea    0xea0(%rip),%rdi
call   1040 <printf@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_func>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %eax,%eax
call   1050 <pthread_self@plt>
mov    %rax,%rbx
lea    0xeb8(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    %r14,%rdi
call   1030 <sem_wait@plt>
lea    0xeb4(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [19 x i8] c"thread %p waiting\0A\00"
@.str.1 = [19 x i8] c"thread %p exiting\0A\00"
define i8* @thread_func(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = bitcast i8* %5 to i32*
store i32* %6, i32** %3
%7 = call i64 (...) @pthread_self()
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %4
%9 = load i8*, i8** %4
%10 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = load i32*, i32** %3
%12 = call i32 @sem_wait(i32* %11)
%13 = load i8*, i8** %4
%14 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %13)
%15 = load i8*, i8** %4
ret i8* %15
}

LLVM IR (-O2):
@.str = [19 x i8] c"thread %p waiting\0A\00"
@.str.1 = [19 x i8] c"thread %p exiting\0A\00"
define i8* @thread_func(i8* %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i64 (...) @pthread_self()
%4 = inttoptr i64 %3 to i8*
%5 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = tail call i32 @sem_wait(i32* %2)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i8* %4
}
/* Variables and functions */
int fac(int);
int /*<<< orphan*/ printf(char *, int);
int main(void) { printf("%d", fac(10)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa,%edi
call   1030 <fac@plt>
mov    %eax,%esi
lea    0xec9(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = call i32 @fac(i32 10)
%2 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @fac(i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
void foo767(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo767(i32 %0) {
ret void
}
/* Type definitions */
struct conf_opt {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct conf_opt *);
void *free_opt(struct conf_opt *o) {
  free(o);
  return NULL;
}


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

x86 assembly (clang, -O2):
<free_opt>:
push   %rax
call   1030 <free@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.conf_opt = type { i32 }
define noalias i8* @free_opt(%struct.conf_opt* nocapture %0) {
%2 = tail call i32 @free(%struct.conf_opt* %0)
ret i8* null
}
/* Variables and functions */
int rand();
int US_RndT(void) { return (1 + (rand() % 255)) & 0xFF; }


x86 assembly (clang, -O0):
<US_RndT>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0xff,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x1,%eax
and    $0xff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<US_RndT>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0xffffffff80808081,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
shr    $0x7,%ecx
add    %edx,%ecx
add    %ecx,%eax
add    $0x1,%eax
movzbl %al,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @US_RndT() {
%1 = call i32 (...) @rand()
%2 = srem i32 %1, 255
%3 = add nsw i32 1, %2
%4 = and i32 %3, 255
ret i32 %4
}

LLVM IR (-O2):
define i32 @US_RndT() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 255
%3 = add nsw i32 %2, 1
%4 = and i32 %3, 255
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ UI_LibraryMenu_Cache();
void LibraryMenu_LoadText(void) { UI_LibraryMenu_Cache(); }


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

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

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

LLVM IR (-O2):
define void @LibraryMenu_LoadText() {
%1 = tail call i32 (...) @UI_LibraryMenu_Cache()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ pixel_avg_wxh(int /*<<< orphan*/ *, int,
                                 int /*<<< orphan*/ *, int, int, int);
void pixel_avg_8x4(uint8_t *pix1, int i_stride_pix1, uint8_t *pix2,
                   int i_stride_pix2) {
  pixel_avg_wxh(pix1, i_stride_pix1, pix2, i_stride_pix2, 8, 4);
}


x86 assembly (clang, -O0):
<pixel_avg_8x4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    $0x8,%r8d
mov    $0x4,%r9d
call   1030 <pixel_avg_wxh@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pixel_avg_8x4>:
mov    $0x8,%r8d
mov    $0x4,%r9d
jmp    1030 <pixel_avg_wxh@plt>

LLVM IR (-O0):
define void @pixel_avg_8x4(i32* %0, i32 %1, i32* %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i32 %3, i32* %8
%9 = load i32*, i32** %5
%10 = load i32, i32* %6
%11 = load i32*, i32** %7
%12 = load i32, i32* %8
%13 = call i32 @pixel_avg_wxh(i32* %9, i32 %10, i32* %11, i32 %12, i32 8, i32 4)
ret void
}

LLVM IR (-O2):
define void @pixel_avg_8x4(i32* %0, i32 %1, i32* %2, i32 %3) {
%5 = tail call i32 @pixel_avg_wxh(i32* %0, i32 %1, i32* %2, i32 %3, i32 8, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ at_init();
int /*<<< orphan*/ compaq_init();
void deskpro386_init() {
  at_init();
  compaq_init();
}


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

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

LLVM IR (-O0):
define void @deskpro386_init() {
%1 = call i32 (...) @at_init()
%2 = call i32 (...) @compaq_init()
ret void
}

LLVM IR (-O2):
define void @deskpro386_init() {
%1 = tail call i32 (...) @at_init()
%2 = tail call i32 (...) @compaq_init()
ret void
}
void regnode(op) char op;
{}


x86 assembly (clang, -O0):
<regnode>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @regnode(i32 %0) {
%2 = alloca i8
%3 = trunc i32 %0 to i8
store i8 %3, i8* %2
ret void
}

LLVM IR (-O2):
define void @regnode(i32 %0) {
ret void
}
/* Variables and functions */
char getchar();
void purge_clavier() {
  while (getchar() != '\n')
    ;
}


x86 assembly (clang, -O0):
<purge_clavier>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <purge_clavier+0x9>
mov    $0x0,%al
call   1030 <getchar@plt>
movsbl %al,%eax
cmp    $0xa,%eax
je     1131 <purge_clavier+0x21>
jmp    1119 <purge_clavier+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<purge_clavier>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%al
jne    1120 <purge_clavier+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @purge_clavier() {
br label %1
1: ; preds = %5, %0
%2 = call signext i8 (...) @getchar()
%3 = sext i8 %2 to i32
%4 = icmp ne i32 %3, 10
br i1 %4, label %5, label %6
5: ; preds = %1
br label %1
6: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @purge_clavier() {
br label %1
1: ; preds = %1, %0
%2 = tail call signext i8 (...) @getchar()
%3 = icmp eq i8 %2, 10
br i1 %3, label %4, label %1
4: ; preds = %1
ret void
}
_Bool f(_Bool b) { return b; }


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

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

LLVM IR (-O0):
define zeroext i1 @f(i1 zeroext %0) {
%2 = alloca i8
%3 = zext i1 %0 to i8
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = trunc i8 %4 to i1
ret i1 %5
}

LLVM IR (-O2):
define zeroext i1 @f(i1 returned zeroext %0) {
ret i1 %0
}
/* Variables and functions */
int /*<<< orphan*/ handle_CHLD(int /*<<< orphan*/);
int gen_CHLD() { handle_CHLD(0); }


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

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

LLVM IR (-O0):
define i32 @gen_CHLD() {
%1 = alloca i32
%2 = call i32 @handle_CHLD(i32 0)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @gen_CHLD() {
%1 = tail call i32 @handle_CHLD(i32 0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ lineprint2(char *, long, unsigned char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, unsigned char);
void ind_zpx(char *outf, long ctr, unsigned char *op, char *str) {
  char buf[256];
  sprintf(buf, "%-4s $%02X,X", str, *(op + 1));
  lineprint2(outf, ctr, op, buf);
}


x86 assembly (clang, -O0):
<ind_zpx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
lea    -0x120(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rax
lea    0xeaf(%rip),%rsi
movzbl 0x1(%rax),%ecx
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    -0x120(%rbp),%rcx
call   1030 <lineprint2@plt>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ind_zpx>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x108,%rsp
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
movzbl 0x1(%rdx),%eax
lea    0xebe(%rip),%rsi
mov    %rsp,%r12
mov    %r12,%rdi
mov    %rcx,%rdx
mov    %eax,%ecx
call   1040 <sprintf@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
mov    %r12,%rcx
call   1030 <lineprint2@plt>
add    $0x108,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [13 x i8] c"%-4s $%02X,X\00"
define void @ind_zpx(i8* %0, i64 %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca [256 x i8]
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%10 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%11 = load i8*, i8** %8
%12 = load i8*, i8** %7
%13 = getelementptr inbounds i8, i8* %12, i64 1
%14 = load i8, i8* %13
%15 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %11, i8 zeroext %14)
%16 = load i8*, i8** %5
%17 = load i64, i64* %6
%18 = load i8*, i8** %7
%19 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%20 = call i32 @lineprint2(i8* %16, i64 %17, i8* %18, i8* %19)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"%-4s $%02X,X\00"
define void @ind_zpx(i8* %0, i64 %1, i8* %2, i8* %3) {
%5 = alloca [256 x i8]
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%7 = getelementptr inbounds i8, i8* %2, i64 1
%8 = load i8, i8* %7
%9 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %3, i8 zeroext %8)
%10 = call i32 @lineprint2(i8* %0, i64 %1, i8* %2, i8* %6)
ret void
}
char to_lower(char c) { return (c | 0x20); }


x86 assembly (clang, -O0):
<to_lower>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
or     $0x20,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_lower>:
mov    %edi,%eax
or     $0x20,%al
ret

LLVM IR (-O0):
define signext i8 @to_lower(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = or i32 %4, 32
%6 = trunc i32 %5 to i8
ret i8 %6
}

LLVM IR (-O2):
define signext i8 @to_lower(i8 signext %0) {
%2 = or i8 %0, 32
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ Output_Clear();
void Output_Off(void) { Output_Clear(); }


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

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

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

LLVM IR (-O2):
define void @Output_Off() {
%1 = tail call i32 (...) @Output_Clear()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ VIM_SIF_I2cReadByte(unsigned char, unsigned char *);
void SensorGetReg_SIV100A(unsigned char uAddr, unsigned short *uVal) {
  VIM_SIF_I2cReadByte((unsigned char)uAddr, (unsigned char *)uVal);
}


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

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

LLVM IR (-O0):
define void @SensorGetReg_SIV100A(i8 zeroext %0, i16* %1) {
%3 = alloca i8
%4 = alloca i16*
store i8 %0, i8* %3
store i16* %1, i16** %4
%5 = load i8, i8* %3
%6 = load i16*, i16** %4
%7 = bitcast i16* %6 to i8*
%8 = call i32 @VIM_SIF_I2cReadByte(i8 zeroext %5, i8* %7)
ret void
}

LLVM IR (-O2):
define void @SensorGetReg_SIV100A(i8 zeroext %0, i16* %1) {
%3 = bitcast i16* %1 to i8*
%4 = tail call i32 @VIM_SIF_I2cReadByte(i8 zeroext %0, i8* %3)
ret void
}
/* Type definitions */
struct quat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ quat_zero(float *);
__attribute__((always_)) struct quat *psquat_zero(struct quat *result) {
  quat_zero((float *)result);
  return result;
}


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

x86 assembly (clang, -O2):
<psquat_zero>:
push   %rbx
mov    %rdi,%rbx
call   1030 <quat_zero@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.quat = type { i32 }
define %struct.quat* @psquat_zero(%struct.quat* %0) {
%2 = alloca %struct.quat*
store %struct.quat* %0, %struct.quat** %2
%3 = load %struct.quat*, %struct.quat** %2
%4 = bitcast %struct.quat* %3 to float*
%5 = call i32 @quat_zero(float* %4)
%6 = load %struct.quat*, %struct.quat** %2
ret %struct.quat* %6
}

LLVM IR (-O2):
%struct.quat = type { i32 }
define %struct.quat* @psquat_zero(%struct.quat* returned %0) {
%2 = bitcast %struct.quat* %0 to float*
%3 = tail call i32 @quat_zero(float* %2)
ret %struct.quat* %0
}
int md_seq_open(struct inode *inode, struct file *file) {
  int a;
  return a;
}


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

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

LLVM IR (-O0):
%struct.inode = type opaque
%struct.file = type opaque
define i32 @md_seq_open(%struct.inode* %0, %struct.file* %1) {
%3 = alloca %struct.inode*
%4 = alloca %struct.file*
%5 = alloca i32
store %struct.inode* %0, %struct.inode** %3
store %struct.file* %1, %struct.file** %4
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
%struct.inode = type opaque
%struct.file = type opaque
define i32 @md_seq_open(%struct.inode* nocapture readnone %0, %struct.file* nocapture readnone %1) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int dg, r, a;
  printf("Enter the number in degrees\n");
  scanf("%d", &dg);
  a = 3.14 / 180;
  r = dg * a;
  printf("The value in radiants is %d\n", r);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
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    0xebc(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
lea    0xeae(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Enter the number in degrees\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [29 x i8] c"The value in radiants is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
store i32 0, i32* %4
%7 = load i32, i32* %2
%8 = load i32, i32* %4
%9 = mul nsw i32 %7, %8
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [29 x i8] c"The value in radiants is %d\0A\00"
@str = [28 x i8] c"Enter the number in degrees\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 0)
ret i32 0
}
/* Variables and functions */
int __nvvm_read_ptx_sreg_pm0();
int __nvvm_read_ptx_sreg_pm1();
int __nvvm_read_ptx_sreg_pm2();
int __nvvm_read_ptx_sreg_pm3();
__attribute__((device)) int read_pms() {
  int a = __nvvm_read_ptx_sreg_pm0();
  int b = __nvvm_read_ptx_sreg_pm1();
  int c = __nvvm_read_ptx_sreg_pm2();
  int d = __nvvm_read_ptx_sreg_pm3();
  return a + b + c + d;
}


x86 assembly (clang, -O0):
<read_pms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <__nvvm_read_ptx_sreg_pm0@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1060 <__nvvm_read_ptx_sreg_pm1@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <__nvvm_read_ptx_sreg_pm2@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1050 <__nvvm_read_ptx_sreg_pm3@plt>
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_pms>:
push   %rbp
push   %r14
push   %rbx
xor    %eax,%eax
call   1030 <__nvvm_read_ptx_sreg_pm0@plt>
mov    %eax,%r14d
xor    %eax,%eax
call   1060 <__nvvm_read_ptx_sreg_pm1@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1040 <__nvvm_read_ptx_sreg_pm2@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <__nvvm_read_ptx_sreg_pm3@plt>
add    %r14d,%ebp
add    %ebx,%ebp
add    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @read_pms() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = call i32 (...) @__nvvm_read_ptx_sreg_pm0()
store i32 %5, i32* %1
%6 = call i32 (...) @__nvvm_read_ptx_sreg_pm1()
store i32 %6, i32* %2
%7 = call i32 (...) @__nvvm_read_ptx_sreg_pm2()
store i32 %7, i32* %3
%8 = call i32 (...) @__nvvm_read_ptx_sreg_pm3()
store i32 %8, i32* %4
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = add nsw i32 %9, %10
%12 = load i32, i32* %3
%13 = add nsw i32 %11, %12
%14 = load i32, i32* %4
%15 = add nsw i32 %13, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @read_pms() {
%1 = tail call i32 (...) @__nvvm_read_ptx_sreg_pm0()
%2 = tail call i32 (...) @__nvvm_read_ptx_sreg_pm1()
%3 = tail call i32 (...) @__nvvm_read_ptx_sreg_pm2()
%4 = tail call i32 (...) @__nvvm_read_ptx_sreg_pm3()
%5 = add nsw i32 %2, %1
%6 = add nsw i32 %5, %3
%7 = add nsw i32 %6, %4
ret i32 %7
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  unsigned long serial;
};
struct TYPE_4__ {
  TYPE_1__ xgravity;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xgravity_serial(void *_p, unsigned long _v) {
  ((XEvent *)_p)->xgravity.serial = (unsigned long)_v;
}


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

x86 assembly (clang, -O2):
<set_XEvent_xgravity_serial>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define void @set_XEvent_xgravity_serial(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i64 %5, i64* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xgravity_serial(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int solcon_clear_quaddobl_solutions(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(397, a, b, c, 0);
  return fail;
}


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

x86 assembly (clang, -O2):
<solcon_clear_quaddobl_solutions>:
mov    $0x18d,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

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

LLVM IR (-O2):
define i32 @solcon_clear_quaddobl_solutions() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 397, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
long long_fetch_add_relaxed(long *ptr, long value) {
  return __atomic_fetch_add(ptr, value, 0);
}


x86 assembly (clang, -O0):
<long_fetch_add_relaxed>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
lock xadd %rax,(%rcx)
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<long_fetch_add_relaxed>:
mov    %rsi,%rax
lock xadd %rax,(%rdi)
ret

LLVM IR (-O0):
define i64 @long_fetch_add_relaxed(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64* %0, i64** %3
store i64 %1, i64* %4
%7 = load i64*, i64** %3
%8 = load i64, i64* %4
store i64 %8, i64* %5
%9 = load i64, i64* %5
%10 = atomicrmw add i64* %7, i64 %9 monotonic
store i64 %10, i64* %6
%11 = load i64, i64* %6
ret i64 %11
}

LLVM IR (-O2):
define i64 @long_fetch_add_relaxed(i64* nocapture %0, i64 %1) {
%3 = atomicrmw add i64* %0, i64 %1 monotonic
ret i64 %3
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
unsigned char uint_additional_info(uint64_t val) {
  if (val < 24) {
    return val;
  } else if (val <= 0xff) {
    return 24;
  } else if (val <= 0xffff) {
    return 25;
  } else if (val <= 0xffffffffL) {
    return 26;
  }
  return 27;
}


x86 assembly (clang, -O0):
<uint_additional_info>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x18,-0x8(%rbp)
jge    111c <uint_additional_info+0x1c>
mov    -0x8(%rbp),%eax
mov    %al,-0x1(%rbp)
jmp    1176 <uint_additional_info+0x76>
cmpl   $0xff,-0x8(%rbp)
jg     1132 <uint_additional_info+0x32>
movb   $0x18,-0x1(%rbp)
jmp    1176 <uint_additional_info+0x76>
cmpl   $0xffff,-0x8(%rbp)
jg     1148 <uint_additional_info+0x48>
movb   $0x19,-0x1(%rbp)
jmp    1176 <uint_additional_info+0x76>
movslq -0x8(%rbp),%rax
mov    $0xffffffff,%ecx
cmp    %rcx,%rax
jg     1163 <uint_additional_info+0x63>
movb   $0x1a,-0x1(%rbp)
jmp    1176 <uint_additional_info+0x76>
jmp    1168 <uint_additional_info+0x68>
jmp    116d <uint_additional_info+0x6d>
jmp    1172 <uint_additional_info+0x72>
movb   $0x1b,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uint_additional_info>:
cmp    $0x17,%edi
jg     1108 <uint_additional_info+0x8>
mov    %edi,%eax
ret
mov    $0x18,%al
cmp    $0x100,%edi
jb     111c <uint_additional_info+0x1c>
cmp    $0x10000,%edi
mov    $0x1a,%al
sbb    $0x0,%al
ret

LLVM IR (-O0):
define zeroext i8 @uint_additional_info(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 24
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = trunc i32 %7 to i8
store i8 %8, i8* %2
br label %26
9: ; preds = %1
%10 = load i32, i32* %3
%11 = icmp sle i32 %10, 255
br i1 %11, label %12, label %13
12: ; preds = %9
store i8 24, i8* %2
br label %26
13: ; preds = %9
%14 = load i32, i32* %3
%15 = icmp sle i32 %14, 65535
br i1 %15, label %16, label %17
16: ; preds = %13
store i8 25, i8* %2
br label %26
17: ; preds = %13
%18 = load i32, i32* %3
%19 = sext i32 %18 to i64
%20 = icmp sle i64 %19, 4294967295
br i1 %20, label %21, label %22
21: ; preds = %17
store i8 26, i8* %2
br label %26
22: ; preds = %17
br label %23
23: ; preds = %22
br label %24
24: ; preds = %23
br label %25
25: ; preds = %24
store i8 27, i8* %2
br label %26
26: ; preds = %25, %21, %16, %12, %6
%27 = load i8, i8* %2
ret i8 %27
}

LLVM IR (-O2):
define zeroext i8 @uint_additional_info(i32 %0) {
%2 = icmp slt i32 %0, 24
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = trunc i32 %0 to i8
br label %10
5: ; preds = %1
%6 = icmp ult i32 %0, 256
br i1 %6, label %10, label %7
7: ; preds = %5
%8 = icmp ult i32 %0, 65536
%9 = select i1 %8, i8 25, i8 26
br label %10
10: ; preds = %7, %5, %3
%11 = phi i8 [ %4, %3 ], [ 24, %5 ], [ %9, %7 ]
ret i8 %11
}
void avpriv_find_pix_fmt() {}


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

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

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

LLVM IR (-O2):
define void @avpriv_find_pix_fmt() {
ret void
}
void foo(void) {
  long long int a;
  unsigned long b[249];
  register unsigned int c;
  b[c] = (a & (1ULL << c)) ? 1 : 0;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x760,%rsp
mov    -0x8(%rbp),%rdx
mov    -0x7d4(%rbp),%eax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%rax
and    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
movslq %eax,%rcx
mov    -0x7d4(%rbp),%eax
mov    %rcx,-0x7d0(%rbp,%rax,8)
ff
add    $0x760,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foo() {
%1 = alloca i64
%2 = alloca [249 x i64]
%3 = alloca i32
%4 = load i64, i64* %1
%5 = load i32, i32* %3
%6 = zext i32 %5 to i64
%7 = shl i64 1, %6
%8 = and i64 %4, %7
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 1, i32 0
%12 = sext i32 %11 to i64
%13 = load i32, i32* %3
%14 = zext i32 %13 to i64
%15 = getelementptr inbounds [249 x i64], [249 x i64]* %2, i64 0, i64 %14
store i64 %12, i64* %15
ret void
}

LLVM IR (-O2):
define void @foo() {
ret void
}
void kfd_iommu_unbind_process(struct kfd_process *p) {}


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

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

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

LLVM IR (-O2):
%struct.kfd_process = type opaque
define void @kfd_iommu_unbind_process(%struct.kfd_process* nocapture %0) {
ret void
}
/* Variables and functions */
scalar_t__ neio_putc(char);
scalar_t__ neio_puts(char const *);
int neio_putln(const char *s) {
  ((void)(neio_puts(s)));
  ((void)(neio_putc('\n')));
  return 0;
}


x86 assembly (clang, -O0):
<neio_putln>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <neio_puts@plt>
mov    $0xa,%edi
call   1030 <neio_putc@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<neio_putln>:
push   %rax
call   1040 <neio_puts@plt>
mov    $0xa,%edi
call   1030 <neio_putc@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @neio_putln(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @neio_puts(i8* %3)
%5 = call i64 @neio_putc(i8 signext 10)
ret i32 0
}

LLVM IR (-O2):
define i32 @neio_putln(i8* %0) {
%2 = tail call i64 @neio_puts(i8* %0)
%3 = tail call i64 @neio_putc(i8 signext 10)
ret i32 0
}
double ui2d(unsigned int a) { return (double)a; }


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

x86 assembly (clang, -O2):
<ui2d>:
mov    %edi,%eax
cvtsi2sd %rax,%xmm0
ret

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

LLVM IR (-O2):
define double @ui2d(i32 %0) {
%2 = uitofp i32 %0 to double
ret double %2
}
/* Variables and functions */
int multiplicacao(int *inteiros, size_t quantos) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @multiplicacao(i32* nocapture readnone %0, i64 %1) {
ret i32 0
}
int ft_con_ci(char c) {
  int i;
  i = c - 48;
  return (i);
}


x86 assembly (clang, -O0):
<ft_con_ci>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_con_ci>:
lea    -0x30(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @ft_con_ci(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = sub nsw i32 %5, 48
store i32 %6, i32* %3
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @ft_con_ci(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -48
ret i32 %3
}
unsigned hash2(int char1, int char2) {
  unsigned hash = char1 ^ (char2 << 8);
  hash += (hash << 3);
  hash ^= (hash >> 11);
  hash += (hash << 15);
  return hash;
}


x86 assembly (clang, -O0):
<hash2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    $0x8,%ecx
xor    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x3,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shr    $0xb,%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0xf,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash2>:
shl    $0x8,%esi
xor    %edi,%esi
lea    (%rsi,%rsi,8),%eax
mov    %eax,%ecx
shr    $0xb,%ecx
xor    %eax,%ecx
mov    %ecx,%eax
shl    $0xf,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @hash2(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 = shl i32 %7, 8
%9 = xor i32 %6, %8
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = shl i32 %10, 3
%12 = load i32, i32* %5
%13 = add i32 %12, %11
store i32 %13, i32* %5
%14 = load i32, i32* %5
%15 = lshr i32 %14, 11
%16 = load i32, i32* %5
%17 = xor i32 %16, %15
store i32 %17, i32* %5
%18 = load i32, i32* %5
%19 = shl i32 %18, 15
%20 = load i32, i32* %5
%21 = add i32 %20, %19
store i32 %21, i32* %5
%22 = load i32, i32* %5
ret i32 %22
}

LLVM IR (-O2):
define i32 @hash2(i32 %0, i32 %1) {
%3 = shl i32 %1, 8
%4 = xor i32 %3, %0
%5 = mul i32 %4, 9
%6 = lshr i32 %5, 11
%7 = xor i32 %6, %5
%8 = mul i32 %7, 32769
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ magic_square(int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int array_size;
  scanf("%d\n", &array_size);
  magic_square(array_size);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1030 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <magic_square@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @magic_square(i32 %4)
ret i32 0
}
int tmin(void) { return 2; }


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

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

LLVM IR (-O0):
define i32 @tmin() {
ret i32 2
}

LLVM IR (-O2):
define i32 @tmin() {
ret i32 2
}
/* Variables and functions */
unsigned int invert(unsigned int, int, int);
int /*<<< orphan*/ printf(char *, unsigned int);
int main(int argc, char *argv[]) {
  unsigned int x = 0xFFFFFFBF;
  x = invert(x, 7, 4);
  printf("x = %x\n", x);
  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)
movl   $0xffffffbf,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    $0x7,%esi
mov    $0x4,%edx
call   1030 <invert@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xea4(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xffffffbf,%edi
mov    $0x7,%esi
mov    $0x4,%edx
call   1030 <invert@plt>
lea    0xec4(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"x = %x\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @invert(i32 -65, i32 7, i32 4)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
void noInfoFunction(void *infoData) { ((void)(infoData)); }


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

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

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

LLVM IR (-O2):
define void @noInfoFunction(i8* nocapture %0) {
ret void
}