xunge/DecIR huggingface dataset:
/* Variables and functions */
double EvalAngCor_alpha0_1minus_0plus_15097_L1(double);
double funcAngCor_alpha0_1minus_0plus_15097_L1(double *x, double *par) {
  double result;
  result = par[0] * EvalAngCor_alpha0_1minus_0plus_15097_L1(x[0]);
  return result;
}


x86 assembly (clang, -O0):
<funcAngCor_alpha0_1minus_0plus_15097_L1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <EvalAngCor_alpha0_1minus_0plus_15097_L1@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<funcAngCor_alpha0_1minus_0plus_15097_L1>:
push   %rax
movsd  (%rsi),%xmm0
movsd  %xmm0,(%rsp)
movsd  (%rdi),%xmm0
call   1030 <EvalAngCor_alpha0_1minus_0plus_15097_L1@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @funcAngCor_alpha0_1minus_0plus_15097_L1(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%6 = load double*, double** %4
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = load double*, double** %3
%10 = getelementptr inbounds double, double* %9, i64 0
%11 = load double, double* %10
%12 = call double @EvalAngCor_alpha0_1minus_0plus_15097_L1(double %11)
%13 = fmul double %8, %12
store double %13, double* %5
%14 = load double, double* %5
ret double %14
}

LLVM IR (-O2):
define double @funcAngCor_alpha0_1minus_0plus_15097_L1(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = load double, double* %0
%5 = tail call double @EvalAngCor_alpha0_1minus_0plus_15097_L1(double %4)
%6 = fmul double %3, %5
ret double %6
}
int test_imm_D0int8_mem(signed char *val) {
  return ((*val) & (0xD0 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_D0int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -48
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_size;
};
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ fstat(int, struct stat *);
off_t get_file_size(int file) {
  struct stat stat_ret;
  fstat(file, &stat_ret);
  return stat_ret.st_size;
}


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

x86 assembly (clang, -O2):
<get_file_size>:
push   %rax
mov    %rsp,%rsi
call   1030 <fstat@plt>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @get_file_size(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.stat
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @fstat(i32 %4, %struct.stat* %3)
%6 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @get_file_size(i32 %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @fstat(i32 %0, %struct.stat* %2)
%5 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%6 = load i32, i32* %5
ret i32 %6
}
/* Variables and functions */
int open(char const *, int);
int serialport_open2(const char *name, int flags) {
  if (!name)
    name = "/dev/ttyS1";
  return open(name, flags);
}


x86 assembly (clang, -O0):
<serialport_open2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1135 <serialport_open2+0x25>
lea    0xecf(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <open@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serialport_open2>:
test   %rdi,%rdi
lea    0xee6(%rip),%rax
cmove  %rax,%rdi
jmp    1030 <open@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"/dev/ttyS1\00"
define i32 @serialport_open2(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %8, label %7
7: ; preds = %2
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %3
br label %8
8: ; preds = %7, %2
%9 = load i8*, i8** %3
%10 = load i32, i32* %4
%11 = call i32 @open(i8* %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
@.str = [11 x i8] c"/dev/ttyS1\00"
define i32 @serialport_open2(i8* %0, i32 %1) {
%3 = icmp eq i8* %0, null
%4 = select i1 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0
%5 = tail call i32 @open(i8* %4, i32 %1)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Write32(void *, int, int);
void omap_clock_init(void) {
  Write32(((void *)0x48004D00), 0x00000044, (432 << 8) | 12);
  Write32(((void *)0x48004E00), 0x00000040, (16 << 8) | 6);
  Write32(((void *)0x48004D00), 0x00000000, 0x00370037);
}


x86 assembly (clang, -O0):
<omap_clock_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x48004d00,%edi
mov    $0x44,%esi
mov    $0x1b00c,%edx
call   1030 <Write32@plt>
mov    $0x48004e00,%edi
mov    $0x40,%esi
mov    $0x1006,%edx
call   1030 <Write32@plt>
mov    $0x48004d00,%edi
xor    %esi,%esi
mov    $0x370037,%edx
call   1030 <Write32@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<omap_clock_init>:
push   %rax
mov    $0x48004d00,%edi
mov    $0x44,%esi
mov    $0x1b00c,%edx
call   1030 <Write32@plt>
mov    $0x48004e00,%edi
mov    $0x40,%esi
mov    $0x1006,%edx
call   1030 <Write32@plt>
mov    $0x48004d00,%edi
xor    %esi,%esi
mov    $0x370037,%edx
pop    %rax
jmp    1030 <Write32@plt>

LLVM IR (-O0):
define void @omap_clock_init() {
%1 = call i32 @Write32(i8* inttoptr (i64 1207979264 to i8*), i32 68, i32 110604)
%2 = call i32 @Write32(i8* inttoptr (i64 1207979520 to i8*), i32 64, i32 4102)
%3 = call i32 @Write32(i8* inttoptr (i64 1207979264 to i8*), i32 0, i32 3604535)
ret void
}

LLVM IR (-O2):
define void @omap_clock_init() {
%1 = tail call i32 @Write32(i8* inttoptr (i64 1207979264 to i8*), i32 68, i32 110604)
%2 = tail call i32 @Write32(i8* inttoptr (i64 1207979520 to i8*), i32 64, i32 4102)
%3 = tail call i32 @Write32(i8* inttoptr (i64 1207979264 to i8*), i32 0, i32 3604535)
ret void
}
/* Variables and functions */
void *Cyc_AssnDef_binop(unsigned int, void *, void *, void *);
void *Cyc_AssnDef_minus(void *t1, void *t2, void *tp) {
  void *_T0;
  _T0 = Cyc_AssnDef_binop(2U, t1, t2, tp);
  return _T0;
}


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

x86 assembly (clang, -O2):
<Cyc_AssnDef_minus>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x2,%edi
jmp    1030 <Cyc_AssnDef_binop@plt>

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

LLVM IR (-O2):
define i8* @Cyc_AssnDef_minus(i8* %0, i8* %1, i8* %2) {
%4 = tail call i8* @Cyc_AssnDef_binop(i32 2, i8* %0, i8* %1, i8* %2)
ret i8* %4
}
void dealloc_long(long *p) { __builtin_free(p); }


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

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

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

LLVM IR (-O2):
define void @dealloc_long(i64* nocapture %0) {
%2 = bitcast i64* %0 to i8*
tail call void @free(i8* %2)
ret void
}
int g(a, b)
int a;
int b;
{ return a; }


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

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

LLVM IR (-O0):
define i32 @g(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
ret i32 %5
}

LLVM IR (-O2):
define i32 @g(i32 returned %0, i32 %1) {
ret i32 %0
}
/* Variables and functions */
double quickselect_double(int, int, double *);
double quickselect(int k, int n, double *arr) {
  return quickselect_double(k, n, arr);
}


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

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

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

LLVM IR (-O2):
define double @quickselect(i32 %0, i32 %1, double* %2) {
%4 = tail call double @quickselect_double(i32 %0, i32 %1, double* %2)
ret double %4
}
/* Variables and functions */
void *malloc(int);
int /*<<< orphan*/ memcpy(void *, void const *, int);
void *memdup(const void *mem, int size) {
  void *out = malloc(size);
  if (!out)
    return 0;
  memcpy(out, mem, size);
  return out;
}


x86 assembly (clang, -O0):
<memdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1153 <memdup+0x33>
movq   $0x0,-0x8(%rbp)
jmp    116b <memdup+0x4b>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memdup>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%r14
mov    %esi,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1145 <memdup+0x25>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1030 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @memdup(i8* %0, i32 %1) {
%3 = tail call i8* @malloc(i32 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @memcpy(i8* %3, i8* %0, i32 %1)
br label %7
7: ; preds = %2, %5
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void _Assert(char *mesg) {
  fputs(mesg, stderr);
  fputs(" -- assertion failed\n", stderr);
  abort();
}


x86 assembly (clang, -O0):
<_Assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea9(%rip),%rax
mov    (%rax),%esi
call   1040 <fputs@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%esi
lea    0xeb2(%rip),%rdi
call   1040 <fputs@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<_Assert>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%esi
call   1040 <fputs@plt>
mov    (%rbx),%esi
lea    0xec8(%rip),%rdi
call   1040 <fputs@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [22 x i8] c" -- assertion failed\0A\00"
define void @_Assert(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @stderr
%5 = call i32 @fputs(i8* %3, i32 %4)
%6 = load i32, i32* @stderr
%7 = call i32 @fputs(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c" -- assertion failed\0A\00"
define void @_Assert(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fputs(i8* %0, i32 %2)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fputs(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = tail call i32 (...) @abort()
unreachable
}
void ulong_init(struct flt *flt, void *ud, void *vinstance) {}


x86 assembly (clang, -O0):
<ulong_init>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.flt = type opaque
define void @ulong_init(%struct.flt* %0, i8* %1, i8* %2) {
%4 = alloca %struct.flt*
%5 = alloca i8*
%6 = alloca i8*
store %struct.flt* %0, %struct.flt** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
ret void
}

LLVM IR (-O2):
%struct.flt = type opaque
define void @ulong_init(%struct.flt* nocapture %0, i8* nocapture %1, i8* nocapture %2) {
ret void
}
void wrap_shutdown() {}


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

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

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

LLVM IR (-O2):
define void @wrap_shutdown() {
ret void
}
/* Variables and functions */
int _major_scale(int);
int major_scale(int num, int mod) { return _major_scale(num) + mod; }


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

x86 assembly (clang, -O2):
<major_scale>:
push   %rbx
mov    %esi,%ebx
call   1030 <_major_scale@plt>
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @major_scale(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 = call i32 @_major_scale(i32 %5)
%7 = load i32, i32* %4
%8 = add nsw i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @major_scale(i32 %0, i32 %1) {
%3 = tail call i32 @_major_scale(i32 %0)
%4 = add nsw i32 %3, %1
ret i32 %4
}
/* Variables and functions */
int isnan(double);
int chpl_macro_double_isnan(double x) { return isnan(x); }


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

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

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

LLVM IR (-O2):
define i32 @chpl_macro_double_isnan(double %0) {
%2 = tail call i32 @isnan(double %0)
ret i32 %2
}
/* Type definitions */
struct vec4i {
  int dummy;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ vec4i_multiply(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                  int /*<<< orphan*/ *);
__attribute__((always_)) struct vec4i *
psvec4i_multiply(struct vec4i *result, struct vec4i *a, struct vec4i *b) {
  vec4i_multiply((int32_t *)result, (int32_t *)a, (int32_t *)b);
  return result;
}


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

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

LLVM IR (-O0):
%struct.vec4i = type { i32 }
define %struct.vec4i* @psvec4i_multiply(%struct.vec4i* %0, %struct.vec4i* %1, %struct.vec4i* %2) {
%4 = alloca %struct.vec4i*
%5 = alloca %struct.vec4i*
%6 = alloca %struct.vec4i*
store %struct.vec4i* %0, %struct.vec4i** %4
store %struct.vec4i* %1, %struct.vec4i** %5
store %struct.vec4i* %2, %struct.vec4i** %6
%7 = load %struct.vec4i*, %struct.vec4i** %4
%8 = bitcast %struct.vec4i* %7 to i32*
%9 = load %struct.vec4i*, %struct.vec4i** %5
%10 = bitcast %struct.vec4i* %9 to i32*
%11 = load %struct.vec4i*, %struct.vec4i** %6
%12 = bitcast %struct.vec4i* %11 to i32*
%13 = call i32 @vec4i_multiply(i32* %8, i32* %10, i32* %12)
%14 = load %struct.vec4i*, %struct.vec4i** %4
ret %struct.vec4i* %14
}

LLVM IR (-O2):
%struct.vec4i = type { i32 }
define %struct.vec4i* @psvec4i_multiply(%struct.vec4i* returned %0, %struct.vec4i* %1, %struct.vec4i* %2) {
%4 = getelementptr %struct.vec4i, %struct.vec4i* %0, i64 0, i32 0
%5 = getelementptr %struct.vec4i, %struct.vec4i* %1, i64 0, i32 0
%6 = getelementptr %struct.vec4i, %struct.vec4i* %2, i64 0, i32 0
%7 = tail call i32 @vec4i_multiply(i32* %4, i32* %5, i32* %6)
ret %struct.vec4i* %0
}
unsigned getbits(unsigned x, int p, int n) {
  return (x >> (p + 1 - n)) & ~(~0 << n);
}


x86 assembly (clang, -O0):
<getbits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
sub    -0xc(%rbp),%ecx
shr    %cl,%eax
mov    -0xc(%rbp),%ecx
mov    $0xffffffff,%edx
shl    %cl,%edx
mov    %edx,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getbits>:
sub    %edx,%esi
lea    0x1(%rsi),%ecx
shr    %cl,%edi
mov    $0xffffffff,%eax
mov    %edx,%ecx
shl    %cl,%eax
not    %eax
and    %edi,%eax
ret

LLVM IR (-O0):
define i32 @getbits(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = add nsw i32 %8, 1
%10 = load i32, i32* %6
%11 = sub nsw i32 %9, %10
%12 = lshr i32 %7, %11
%13 = load i32, i32* %6
%14 = shl i32 -1, %13
%15 = xor i32 %14, -1
%16 = and i32 %12, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @getbits(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, 1
%5 = sub i32 %4, %2
%6 = lshr i32 %0, %5
%7 = shl nsw i32 -1, %2
%8 = xor i32 %7, -1
%9 = and i32 %6, %8
ret i32 %9
}
/* Type definitions */
struct itimerval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ EPERM;
int /*<<< orphan*/ errno;
int getitimer(int which, struct itimerval *value) {
  errno = EPERM;
  return -1;
}


x86 assembly (clang, -O0):
<getitimer>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec5(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getitimer>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
%struct.itimerval = type { i32 }
@EPERM = global i32 0
@errno = global i32 0
define i32 @getitimer(i32 %0, %struct.itimerval* %1) {
%3 = alloca i32
%4 = alloca %struct.itimerval*
store i32 %0, i32* %3
store %struct.itimerval* %1, %struct.itimerval** %4
%5 = load i32, i32* @EPERM
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
%struct.itimerval = type { i32 }
@EPERM = global i32 0
@errno = global i32 0
define i32 @getitimer(i32 %0, %struct.itimerval* nocapture readnone %1) {
%3 = load i32, i32* @EPERM
store i32 %3, i32* @errno
ret i32 -1
}
long long llabs(long long n) { return n < 0 ? -n : n; }


x86 assembly (clang, -O0):
<llabs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1122 <llabs+0x22>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    112a <llabs+0x2a>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<llabs>:
mov    %rdi,%rax
neg    %rax
cmovs  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @llabs(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  int m, K;
  m = n * n;
  K = n * m;
  printf("%d\n", m);
  printf("%d\n", K);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%ebx
mov    %ebx,%esi
imul   %ebx,%esi
imul   %esi,%ebx
lea    0xebb(%rip),%r14
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [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 ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = mul nsw i32 %4, %4
%6 = mul nsw i32 %5, %4
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}
char *mystrcpy(char *dest, const char *src) {
  int i = 0;
  while (src[i] != '\000') {
    dest[i] = src[i];
    i++;
  }
  dest[i] = '\000';
  return dest;
}


x86 assembly (clang, -O0):
<mystrcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     114c <mystrcpy+0x4c>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <mystrcpy+0x13>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mystrcpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
test   %cl,%cl
je     1127 <mystrcpy+0x27>
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
mov    %cl,(%rax,%rdx,1)
movzbl 0x1(%rsi,%rdx,1),%ecx
add    $0x1,%rdx
test   %cl,%cl
jne    1110 <mystrcpy+0x10>
mov    %edx,%ecx
movb   $0x0,(%rax,%rcx,1)
ret
xor    %ecx,%ecx
movb   $0x0,(%rax,%rcx,1)
ret

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

LLVM IR (-O2):
define i8* @mystrcpy(i8* returned writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %9, %5 ], [ 0, %2 ]
%7 = phi i8 [ %11, %5 ], [ %3, %2 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %6
store i8 %7, i8* %8
%9 = add nuw nsw i64 %6, 1
%10 = getelementptr inbounds i8, i8* %1, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5
%14 = and i64 %9, 4294967295
br label %15
15: ; preds = %13, %2
%16 = phi i64 [ 0, %2 ], [ %14, %13 ]
%17 = getelementptr inbounds i8, i8* %0, i64 %16
store i8 0, i8* %17
ret i8* %0
}
int my_showstr(char const *str) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @my_showstr(i8* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
char *GetTrueOrFalseString(uint8_t value) {
  if (value)
    return "true";
  return "false";
}


x86 assembly (clang, -O0):
<GetTrueOrFalseString>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1123 <GetTrueOrFalseString+0x23>
lea    0xee6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    112e <GetTrueOrFalseString+0x2e>
lea    0xedb(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetTrueOrFalseString>:
test   %rdi,%rdi
lea    0xefb(%rip),%rcx
lea    0xeef(%rip),%rax
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"true\00"
@.str.1 = [6 x i8] c"false\00"
define i8* @GetTrueOrFalseString(i64 %0) {
%2 = alloca i8*
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %2
br label %8
7: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %8
8: ; preds = %7, %6
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [5 x i8] c"true\00"
@.str.1 = [6 x i8] c"false\00"
define i8* @GetTrueOrFalseString(i64 %0) {
%2 = icmp eq i64 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
ret i8* %3
}
/* Type definitions */
struct chashtable {
  int dummy;
};

/* Variables and functions */
int _chash_add_internel(struct chashtable *, void *, void *, int);
int chash_set(struct chashtable *cht, void *key, void *value) {
  return _chash_add_internel(cht, key, value, 1);
}


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

x86 assembly (clang, -O2):
<chash_set>:
mov    $0x1,%ecx
jmp    1030 <_chash_add_internel@plt>

LLVM IR (-O0):
%struct.chashtable = type { i32 }
define i32 @chash_set(%struct.chashtable* %0, i8* %1, i8* %2) {
%4 = alloca %struct.chashtable*
%5 = alloca i8*
%6 = alloca i8*
store %struct.chashtable* %0, %struct.chashtable** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load %struct.chashtable*, %struct.chashtable** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 @_chash_add_internel(%struct.chashtable* %7, i8* %8, i8* %9, i32 1)
ret i32 %10
}

LLVM IR (-O2):
%struct.chashtable = type { i32 }
define i32 @chash_set(%struct.chashtable* %0, i8* %1, i8* %2) {
%4 = tail call i32 @_chash_add_internel(%struct.chashtable* %0, i8* %1, i8* %2, i32 1)
ret i32 %4
}
/* Variables and functions */
scalar_t__ addit(int, int);
int positive(int a, int b) {
  if (addit(a, b) > 0) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<positive>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <addit@plt>
cmp    $0x0,%rax
jle    113f <positive+0x2f>
movl   $0x1,-0x4(%rbp)
jmp    1146 <positive+0x36>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<positive>:
push   %rax
call   1030 <addit@plt>
xor    %ecx,%ecx
test   %rax,%rax
setg   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @positive(i32 %0, i32 %1) {
%3 = tail call i64 @addit(i32 %0, i32 %1)
%4 = icmp sgt i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ _divide_frac(unsigned long long *, unsigned long long *,
                                unsigned long long);
void _multiply_frac(unsigned long long *numer, unsigned long long *denom,
                    unsigned long long fac) {
  _divide_frac(denom, numer, fac);
}


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

x86 assembly (clang, -O2):
<_multiply_frac>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <_divide_frac@plt>

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

LLVM IR (-O2):
define void @_multiply_frac(i64* %0, i64* %1, i64 %2) {
%4 = tail call i32 @_divide_frac(i64* %1, i64* %0, i64 %2)
ret void
}
void cdiDecodeParam(int param, int *pnum, int *pcat, int *pdis) {
  unsigned uparam = (unsigned)param;
  unsigned upnum;
  *pdis = 0xff & uparam;
  *pcat = 0xff & uparam >> 8;
  upnum = 0xffff & uparam >> 16;
  if (upnum > 0x7fffU)
    upnum = 0x8000U - upnum;
  *pnum = (int)upnum;
}


x86 assembly (clang, -O0):
<cdiDecodeParam>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%ecx
and    $0xff,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x24(%rbp),%ecx
shr    $0x8,%ecx
and    $0xff,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x24(%rbp),%eax
shr    $0x10,%eax
and    $0xffff,%eax
mov    %eax,-0x28(%rbp)
cmpl   $0x7fff,-0x28(%rbp)
jbe    1160 <cdiDecodeParam+0x60>
mov    $0x8000,%eax
sub    -0x28(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdiDecodeParam>:
mov    %edi,%eax
movzbl %al,%edi
mov    %edi,(%rcx)
movzbl %ah,%ecx
mov    %ecx,(%rdx)
mov    %eax,%ecx
shr    $0x10,%ecx
mov    $0x8000,%edx
sub    %ecx,%edx
test   %eax,%eax
cmovns %ecx,%edx
mov    %edx,(%rsi)
ret

LLVM IR (-O0):
define void @cdiDecodeParam(i32 %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%11 = load i32, i32* %5
store i32 %11, i32* %9
%12 = load i32, i32* %9
%13 = and i32 255, %12
%14 = load i32*, i32** %8
store i32 %13, i32* %14
%15 = load i32, i32* %9
%16 = lshr i32 %15, 8
%17 = and i32 255, %16
%18 = load i32*, i32** %7
store i32 %17, i32* %18
%19 = load i32, i32* %9
%20 = lshr i32 %19, 16
%21 = and i32 65535, %20
store i32 %21, i32* %10
%22 = load i32, i32* %10
%23 = icmp ugt i32 %22, 32767
br i1 %23, label %24, label %27
24: ; preds = %4
%25 = load i32, i32* %10
%26 = sub i32 32768, %25
store i32 %26, i32* %10
br label %27
27: ; preds = %24, %4
%28 = load i32, i32* %10
%29 = load i32*, i32** %6
store i32 %28, i32* %29
ret void
}

LLVM IR (-O2):
define void @cdiDecodeParam(i32 %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3) {
%5 = and i32 %0, 255
store i32 %5, i32* %3
%6 = lshr i32 %0, 8
%7 = and i32 %6, 255
store i32 %7, i32* %2
%8 = lshr i32 %0, 16
%9 = icmp slt i32 %0, 0
%10 = sub nsw i32 32768, %8
%11 = select i1 %9, i32 %10, i32 %8
store i32 %11, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ I2CAL_output_clock(int);
int /*<<< orphan*/ I2CAL_output_data(int /*<<< orphan*/);
void SendI2CAck(void) {
  I2CAL_output_data(0);
  I2CAL_output_clock(1);
  I2CAL_output_clock(0);
}


x86 assembly (clang, -O0):
<SendI2CAck>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <I2CAL_output_data@plt>
mov    $0x1,%edi
call   1040 <I2CAL_output_clock@plt>
xor    %edi,%edi
call   1040 <I2CAL_output_clock@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SendI2CAck>:
push   %rax
xor    %edi,%edi
call   1030 <I2CAL_output_data@plt>
mov    $0x1,%edi
call   1040 <I2CAL_output_clock@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <I2CAL_output_clock@plt>

LLVM IR (-O0):
define void @SendI2CAck() {
%1 = call i32 @I2CAL_output_data(i32 0)
%2 = call i32 @I2CAL_output_clock(i32 1)
%3 = call i32 @I2CAL_output_clock(i32 0)
ret void
}

LLVM IR (-O2):
define void @SendI2CAck() {
%1 = tail call i32 @I2CAL_output_data(i32 0)
%2 = tail call i32 @I2CAL_output_clock(i32 1)
%3 = tail call i32 @I2CAL_output_clock(i32 0)
ret void
}
int test_imm_C8uint8_reg(unsigned char val) {
  return ((val) & (-0xC8 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_C8uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffff38,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_C8uint8_reg>:
test   $0x38,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_C8uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 56
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ vyatta_if_write_sysctl_values(char const *);
void vyatta_if_setup(const char *ifname) {
  vyatta_if_write_sysctl_values(ifname);
}


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

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

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

LLVM IR (-O2):
define void @vyatta_if_setup(i8* %0) {
%2 = tail call i32 @vyatta_if_write_sysctl_values(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
float min(float x, float y) {
  assert(x == x);
  assert(y == y);
  return (x <= y) ? x : y;
}


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x4(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movss  -0x8(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     117a <min+0x6a>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1184 <min+0x74>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
sub    $0x28,%rsp
movaps %xmm1,(%rsp)
movaps %xmm0,0x10(%rsp)
xor    %edi,%edi
ucomiss %xmm0,%xmm0
setnp  %dil
call   1030 <assert@plt>
xor    %edi,%edi
movaps (%rsp),%xmm0
ucomiss %xmm0,%xmm0
setnp  %dil
call   1030 <assert@plt>
movaps 0x10(%rsp),%xmm1
movaps %xmm1,%xmm0
movaps (%rsp),%xmm2
cmpless %xmm2,%xmm0
andps  %xmm0,%xmm1
andnps %xmm2,%xmm0
orps   %xmm1,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define float @min(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %3
%7 = fcmp oeq float %5, %6
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load float, float* %4
%11 = load float, float* %4
%12 = fcmp oeq float %10, %11
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = load float, float* %3
%16 = load float, float* %4
%17 = fcmp ole float %15, %16
br i1 %17, label %18, label %20
18: ; preds = %2
%19 = load float, float* %3
br label %22
20: ; preds = %2
%21 = load float, float* %4
br label %22
22: ; preds = %20, %18
%23 = phi float [ %19, %18 ], [ %21, %20 ]
ret float %23
}

LLVM IR (-O2):
define float @min(float %0, float %1) {
%3 = fcmp ord float %0, 0.000000e+00
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = fcmp ord float %1, 0.000000e+00
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = fcmp ole float %0, %1
%10 = select i1 %9, float %0, float %1
ret float %10
}
void DisableIntP0() {}


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

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

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

LLVM IR (-O2):
define void @DisableIntP0() {
ret void
}
int ELEMENT_quantsCamps() { return 4; }


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

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

LLVM IR (-O0):
define i32 @ELEMENT_quantsCamps() {
ret i32 4
}

LLVM IR (-O2):
define i32 @ELEMENT_quantsCamps() {
ret i32 4
}
/* Variables and functions */
int sum(int);
int main() { return sum(10); }


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

x86 assembly (clang, -O2):
<main>:
mov    $0xa,%edi
jmp    1030 <sum@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @sum(i32 10)
ret i32 %1
}
void init_apps(void) {}


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

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

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

LLVM IR (-O2):
define void @init_apps() {
ret void
}
/* Variables and functions */
scalar_t__ asinh(double);
long double asinhl(long double x) { return (long double)asinh((double)x); }


x86 assembly (clang, -O0):
<asinhl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1030 <asinh@plt>
mov    %rax,-0x18(%rbp)
fildll -0x18(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<asinhl>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpl  0x8(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <asinh@plt>
mov    %rax,0x10(%rsp)
fildll 0x10(%rsp)
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @asinhl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fptrunc x86_fp80 %3 to double
%5 = call i64 @asinh(double %4)
%6 = sitofp i64 %5 to x86_fp80
ret x86_fp80 %6
}

LLVM IR (-O2):
define x86_fp80 @asinhl(x86_fp80 %0) {
%2 = fptrunc x86_fp80 %0 to double
%3 = tail call i64 @asinh(double %2)
%4 = sitofp i64 %3 to x86_fp80
ret x86_fp80 %4
}
/* Variables and functions */
int /*<<< orphan*/ ret(int /*<<< orphan*/);
void z_rfalse(void) { ret(0); }


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

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

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

LLVM IR (-O2):
define void @z_rfalse() {
%1 = tail call i32 @ret(i32 0)
ret void
}
int is_bracket(char c) { return c == '{' || c == '}' || c == '[' || c == ']'; }


x86 assembly (clang, -O0):
<is_bracket>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x7b,%ecx
mov    %al,-0x2(%rbp)
je     114d <is_bracket+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x7d,%ecx
mov    %al,-0x2(%rbp)
je     114d <is_bracket+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5b,%ecx
mov    %al,-0x2(%rbp)
je     114d <is_bracket+0x4d>
movsbl -0x1(%rbp),%eax
cmp    $0x5d,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_bracket>:
lea    -0x5b(%rdi),%ecx
cmp    $0x22,%cl
ja     1121 <is_bracket+0x21>
mov    $0x1,%eax
movzbl %cl,%ecx
movabs $0x500000001,%rdx
bt     %rcx,%rdx
jae    1121 <is_bracket+0x21>
ret
xor    %eax,%eax
cmp    $0x5d,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @is_bracket(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 123
br i1 %5, label %18, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 125
br i1 %9, label %18, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 91
br i1 %13, label %18, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 93
br label %18
18: ; preds = %14, %10, %6, %1
%19 = phi i1 [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %17, %14 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @is_bracket(i8 signext %0) {
switch i8 %0, label %2 [
i8 125, label %5
i8 123, label %5
i8 91, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 93
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Variables and functions */
int pigpio_command(int, int, unsigned int, int /*<<< orphan*/, int);
int notify_close(int pi, unsigned handle) {
  return pigpio_command(pi, 21, handle, 0, 1);
}


x86 assembly (clang, -O0):
<notify_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    $0x15,%esi
xor    %ecx,%ecx
mov    $0x1,%r8d
call   1030 <pigpio_command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<notify_close>:
mov    %esi,%edx
mov    $0x15,%esi
xor    %ecx,%ecx
mov    $0x1,%r8d
jmp    1030 <pigpio_command@plt>

LLVM IR (-O0):
define i32 @notify_close(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 = call i32 @pigpio_command(i32 %5, i32 21, i32 %6, i32 0, i32 1)
ret i32 %7
}

LLVM IR (-O2):
define i32 @notify_close(i32 %0, i32 %1) {
%3 = tail call i32 @pigpio_command(i32 %0, i32 21, i32 %1, i32 0, i32 1)
ret i32 %3
}
/* Variables and functions */
unsigned int GET32(int);
unsigned int timer_tick(void) { return (GET32((0x3F000000 + 0x0000B420))); }


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

x86 assembly (clang, -O2):
<timer_tick>:
mov    $0x3f00b420,%edi
jmp    1030 <GET32@plt>

LLVM IR (-O0):
define i32 @timer_tick() {
%1 = call i32 @GET32(i32 1057010720)
ret i32 %1
}

LLVM IR (-O2):
define i32 @timer_tick() {
%1 = tail call i32 @GET32(i32 1057010720)
ret i32 %1
}
void dsp_sampled_instr_flush(__attribute__((unused)) struct DSPObject *obj0) {
  return;
}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ _mm_rsqrt_ss(int /*<<< orphan*/);
__m128 test_rsqrt_ss(__m128 x) { return _mm_rsqrt_ss(x); }


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

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

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

LLVM IR (-O2):
define i32 @test_rsqrt_ss(i32 %0) {
%2 = tail call i32 @_mm_rsqrt_ss(i32 %0)
ret i32 %2
}