xunge/DecIR huggingface dataset:
void init_gpio() {
  (*((volatile unsigned int *)(0x44e07000 + 0x130))) = 0x00;
  (*((volatile unsigned int *)(0x44e00400 + 0x08))) = (0x02) | (1 << 18);
  (*((volatile unsigned int *)(0x44e07000 + 0x154))) = 255;
  (*((volatile unsigned int *)(0x4804c000 + 0x130))) = 0x00;
  (*((volatile unsigned int *)(0x44e00000 + 0xac))) = (0x02) | (1 << 18);
  (*((volatile unsigned int *)(0x481ac000 + 0x130))) = 0x00;
  (*((volatile unsigned int *)(0x44e00000 + 0xb0))) = (0x02) | (1 << 18);
  (*((volatile unsigned int *)(0x481ae000 + 0x130))) = 0x00;
  (*((volatile unsigned int *)(0x44e00000 + 0xb4))) = (0x02) | (1 << 18);
}


x86 assembly (clang, -O0):
<init_gpio>:
push   %rbp
mov    %rsp,%rbp
mov    $0x44e07130,%eax
movl   $0x0,(%rax)
mov    $0x44e00408,%eax
movl   $0x40002,(%rax)
mov    $0x44e07154,%eax
movl   $0xff,(%rax)
mov    $0x4804c130,%eax
movl   $0x0,(%rax)
mov    $0x44e000ac,%eax
movl   $0x40002,(%rax)
mov    $0x481ac130,%eax
movl   $0x0,(%rax)
mov    $0x44e000b0,%eax
movl   $0x40002,(%rax)
mov    $0x481ae130,%eax
movl   $0x0,(%rax)
mov    $0x44e000b4,%eax
movl   $0x40002,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_gpio>:
movl   $0x0,0x44e07130
movl   $0x40002,0x44e00408
movl   $0xff,0x44e07154
movl   $0x0,0x4804c130
movl   $0x40002,0x44e000ac
movl   $0x0,0x481ac130
movl   $0x40002,0x44e000b0
movl   $0x0,0x481ae130
movl   $0x40002,0x44e000b4
ret

LLVM IR (-O0):
define void @init_gpio() {
store volatile i32 0, i32* inttoptr (i64 1155559728 to i32*)
store volatile i32 262146, i32* inttoptr (i64 1155531784 to i32*)
store volatile i32 255, i32* inttoptr (i64 1155559764 to i32*)
store volatile i32 0, i32* inttoptr (i64 1208271152 to i32*)
store volatile i32 262146, i32* inttoptr (i64 1155530924 to i32*)
store volatile i32 0, i32* inttoptr (i64 1209712944 to i32*)
store volatile i32 262146, i32* inttoptr (i64 1155530928 to i32*)
store volatile i32 0, i32* inttoptr (i64 1209721136 to i32*)
store volatile i32 262146, i32* inttoptr (i64 1155530932 to i32*)
ret void
}

LLVM IR (-O2):
define void @init_gpio() {
store volatile i32 0, i32* inttoptr (i64 1155559728 to i32*)
store volatile i32 262146, i32* inttoptr (i64 1155531784 to i32*)
store volatile i32 255, i32* inttoptr (i64 1155559764 to i32*)
store volatile i32 0, i32* inttoptr (i64 1208271152 to i32*)
store volatile i32 262146, i32* inttoptr (i64 1155530924 to i32*)
store volatile i32 0, i32* inttoptr (i64 1209712944 to i32*)
store volatile i32 262146, i32* inttoptr (i64 1155530928 to i32*)
store volatile i32 0, i32* inttoptr (i64 1209721136 to i32*)
store volatile i32 262146, i32* inttoptr (i64 1155530932 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ eio_putchar(int /*<<< orphan*/);
void eio_puts(char const *asciiz) {
  while (*asciiz)
    eio_putchar(*asciiz++);
}


x86 assembly (clang, -O0):
<eio_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <eio_puts+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <eio_putchar@plt>
jmp    111c <eio_puts+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eio_puts>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <eio_puts+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <eio_putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <eio_puts+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @eio_puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @eio_putchar(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int /*<<< orphan*/ data;
  int /*<<< orphan*/ key;
};
typedef TYPE_1__ ENTRY;

/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/);
int free_it_all(ENTRY *entry) {
  free(entry->key);
  free(entry->data);
  return 0;
}


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

x86 assembly (clang, -O2):
<free_it_all>:
push   %rbx
mov    %rdi,%rbx
mov    0x4(%rdi),%edi
call   1030 <free@plt>
mov    (%rbx),%edi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32, i32 }
define i32 @free_it_all(%struct.TYPE_3__* %0) {
%2 = alloca %struct.TYPE_3__*
store %struct.TYPE_3__* %0, %struct.TYPE_3__** %2
%3 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 1
%5 = load i32, i32* %4
%6 = call i32 @free(i32 %5)
%7 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%8 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %7, i32 0, i32 0
%9 = load i32, i32* %8
%10 = call i32 @free(i32 %9)
ret i32 0
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32, i32 }
define i32 @free_it_all(%struct.TYPE_3__* nocapture %0) {
%2 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 1
%3 = load i32, i32* %2
%4 = tail call i32 @free(i32 %3)
%5 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 0
%6 = load i32, i32* %5
%7 = tail call i32 @free(i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, int, int);
void errorFatal(char *s, int i, int j) {
  printf(s, i, j);
  exit(1);
}


x86 assembly (clang, -O0):
<errorFatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<errorFatal>:
push   %rax
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @errorFatal(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @printf(i8* %7, i32 %8, i32 %9)
%11 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @errorFatal(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @printf(i8* %0, i32 %1, i32 %2)
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int solcon_length_current_multprec_solution_string(int *cursor, int *n) {
  int fail;
  double *c;
  fail = _ada_use_c2phc(528, cursor, n, c);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_length_current_multprec_solution_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x210,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_length_current_multprec_solution_string>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x210,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @solcon_length_current_multprec_solution_string(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
%6 = alloca double*
store i32* %0, i32** %3
store i32* %1, i32** %4
%7 = load i32*, i32** %3
%8 = load i32*, i32** %4
%9 = load double*, double** %6
%10 = call i32 @_ada_use_c2phc(i32 528, i32* %7, i32* %8, double* %9)
store i32 %10, i32* %5
%11 = load i32, i32* %5
ret i32 %11
}

LLVM IR (-O2):
define i32 @solcon_length_current_multprec_solution_string(i32* %0, i32* %1) {
%3 = tail call i32 @_ada_use_c2phc(i32 528, i32* %0, i32* %1, double* undef)
ret i32 %3
}
CodeToEuc(code) unsigned int code;
{
  unsigned int hi = code >> 8;
  if (hi) {
    return code | 0x8080;
  }
  return 0x8e00 + code;
}


x86 assembly (clang, -O0):
<CodeToEuc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x8,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     112a <CodeToEuc+0x2a>
mov    -0x8(%rbp),%eax
or     $0x8080,%eax
mov    %eax,-0x4(%rbp)
jmp    1135 <CodeToEuc+0x35>
mov    -0x8(%rbp),%eax
add    $0x8e00,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CodeToEuc>:
mov    %edi,%ecx
or     $0x8080,%ecx
lea    0x8e00(%rdi),%eax
cmp    $0x100,%edi
cmovae %ecx,%eax
ret

LLVM IR (-O0):
define i32 @CodeToEuc(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = lshr i32 %5, 8
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i32, i32* %3
%11 = or i32 %10, 32896
store i32 %11, i32* %2
br label %15
12: ; preds = %1
%13 = load i32, i32* %3
%14 = add i32 36352, %13
store i32 %14, i32* %2
br label %15
15: ; preds = %12, %9
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @CodeToEuc(i32 %0) {
%2 = icmp ult i32 %0, 256
%3 = or i32 %0, 32896
%4 = add i32 %0, 36352
%5 = select i1 %2, i32 %4, i32 %3
ret i32 %5
}
int do_243() { return 243; }


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

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

LLVM IR (-O0):
define i32 @do_243() {
ret i32 243
}

LLVM IR (-O2):
define i32 @do_243() {
ret i32 243
}
/* Variables and functions */
int /*<<< orphan*/ glEnd();
void End(void) { glEnd(); }


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

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

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

LLVM IR (-O2):
define void @End() {
%1 = tail call i32 (...) @glEnd()
ret void
}
/* Variables and functions */
float _atan2f(float, float);
float atan2f(float y, float x) { return _atan2f(y, x); }


x86 assembly (clang, -O0):
<atan2f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <_atan2f@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define float @atan2f(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* %4
%7 = call float @_atan2f(float %5, float %6)
ret float %7
}

LLVM IR (-O2):
define float @atan2f(float %0, float %1) {
%3 = tail call float @_atan2f(float %0, float %1)
ret float %3
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ gmtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strftime(char *, int, char *, int /*<<< orphan*/);
int /*<<< orphan*/ time(void *);
extern void sys_time(char *buf) {
  time_t t = time(((void *)0));
  strftime(buf, 32, "%Y-%m-%d %H:%M:%S UTC", gmtime(&t));
}


x86 assembly (clang, -O0):
<sys_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0xc(%rbp),%rdi
call   1050 <gmtime@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%ecx
mov    $0x20,%esi
lea    0xe95(%rip),%rdx
call   1040 <strftime@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_time>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
xor    %edi,%edi
call   1030 <time@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1050 <gmtime@plt>
lea    0xeac(%rip),%rdx
mov    %rbx,%rdi
mov    $0x20,%esi
mov    %eax,%ecx
call   1040 <strftime@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"%Y-%m-%d %H:%M:%S UTC\00"
define void @sys_time(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = call i32 @time(i8* null)
store i32 %4, i32* %3
%5 = load i8*, i8** %2
%6 = call i32 @gmtime(i32* %3)
%7 = call i32 @strftime(i8* %5, i32 32, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"%Y-%m-%d %H:%M:%S UTC\00"
define void @sys_time(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @time(i8* null)
store i32 %4, i32* %2
%5 = call i32 @gmtime(i32* %2)
%6 = call i32 @strftime(i8* %0, i32 32, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}
/* Variables and functions */
double ceil(double);
double by_units(double rate, double concentration) {
  return ceil(rate / concentration);
}


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

x86 assembly (clang, -O2):
<by_units>:
divsd  %xmm1,%xmm0
jmp    1030 <ceil@plt>

LLVM IR (-O0):
define double @by_units(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fdiv double %5, %6
%8 = call double @llvm.ceil.f64(double %7)
ret double %8
}

LLVM IR (-O2):
define double @by_units(double %0, double %1) {
%3 = fdiv double %0, %1
%4 = tail call double @llvm.ceil.f64(double %3)
ret double %4
}
/* Variables and functions */
scalar_t__ RAND_MAX;
double rand();
double frand() { return 2 * ((rand() / (double)RAND_MAX) - 0.5); }


x86 assembly (clang, -O0):
<frand>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
movaps %xmm0,%xmm1
mov    0x2ec3(%rip),%rax
cvtsi2sdq (%rax),%xmm0
divsd  %xmm0,%xmm1
movsd  0xed2(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xebe(%rip),%xmm0
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<frand>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
mov    0x2ec9(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
addsd  0xed0(%rip),%xmm0
addsd  %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define double @frand() {
%1 = call double (...) @rand()
%2 = load i64, i64* @RAND_MAX
%3 = sitofp i64 %2 to double
%4 = fdiv double %1, %3
%5 = fsub double %4, 5.000000e-01
%6 = fmul double 2.000000e+00, %5
ret double %6
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define double @frand() {
%1 = tail call double (...) @rand()
%2 = load i64, i64* @RAND_MAX
%3 = sitofp i64 %2 to double
%4 = fdiv double %1, %3
%5 = fadd double %4, -5.000000e-01
%6 = fmul double %5, 2.000000e+00
ret double %6
}
/* Variables and functions */
int r_max(int, int /*<<< orphan*/);
int /*<<< orphan*/ r_min(int, int);
int r_clamp(int x, int lbound, int ubound) {
  return r_max(lbound, r_min(x, ubound));
}


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

x86 assembly (clang, -O2):
<r_clamp>:
push   %rbx
mov    %esi,%ebx
mov    %edx,%esi
call   1040 <r_min@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1030 <r_max@plt>

LLVM IR (-O0):
define i32 @r_clamp(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* %5
%8 = load i32, i32* %4
%9 = load i32, i32* %6
%10 = call i32 @r_min(i32 %8, i32 %9)
%11 = call i32 @r_max(i32 %7, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @r_clamp(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @r_min(i32 %0, i32 %2)
%5 = tail call i32 @r_max(i32 %1, i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ example_usage();
main(int argc, char **argv) {
  example_usage();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @example_usage()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @example_usage()
ret i32 0
}
void nullify(char *token, unsigned int sourceLength) {
  unsigned int i = 0;
  while (i < sourceLength)
    token[i++] = '\0';
}


x86 assembly (clang, -O0):
<nullify>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1138 <nullify+0x38>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x10(%rbp)
mov    %ecx,%ecx
movb   $0x0,(%rax,%rcx,1)
jmp    1112 <nullify+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<nullify>:
test   %esi,%esi
je     1122 <nullify+0x12>
push   %rax
mov    %esi,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @nullify(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %2
ret void
}
void rop3_234_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = T & S;
  stk1 = *D | stk2;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
<rop3_234_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
movzbl -0xb(%rbp),%ecx
movzbl -0xa(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
movzbl -0xa(%rbp),%ecx
movzbl -0x9(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
mov    -0x8(%rbp),%rdx
movzbl (%rdx),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_234_0_1>:
and    %esi,%edx
mov    (%rdi),%al
or     %al,%dl
and    %sil,%dl
or     %al,%dl
mov    %dl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_234_0_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8, i8* %6
%10 = zext i8 %9 to i32
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = and i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %8
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = or i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = load i8, i8* %5
%25 = zext i8 %24 to i32
%26 = and i32 %23, %25
%27 = load i8, i8* %7
%28 = zext i8 %27 to i32
%29 = load i8, i8* %6
%30 = zext i8 %29 to i32
%31 = xor i32 %30, -1
%32 = and i32 %28, %31
%33 = or i32 %26, %32
%34 = load i8, i8* %6
%35 = zext i8 %34 to i32
%36 = load i8, i8* %5
%37 = zext i8 %36 to i32
%38 = xor i32 %37, -1
%39 = and i32 %35, %38
%40 = load i8*, i8** %4
%41 = load i8, i8* %40
%42 = zext i8 %41 to i32
%43 = and i32 %39, %42
%44 = or i32 %33, %43
%45 = trunc i32 %44 to i8
%46 = load i8*, i8** %4
store i8 %45, i8* %46
ret void
}

LLVM IR (-O2):
define void @rop3_234_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = and i8 %2, %1
%5 = load i8, i8* %0
%6 = or i8 %5, %4
%7 = and i8 %6, %1
%8 = or i8 %5, %7
store i8 %8, i8* %0
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void CRCDataWrite(uint32_t ui32Base, uint32_t ui32Data) {
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000414))) = ui32Data;
}


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

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

LLVM IR (-O0):
define void @CRCDataWrite(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = add nsw i64 %6, 1044
%8 = inttoptr i64 %7 to i64*
store volatile i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @CRCDataWrite(i64 %0, i64 %1) {
%3 = add nsw i64 %0, 1044
%4 = inttoptr i64 %3 to i64*
store volatile i64 %1, i64* %4
ret void
}
unsigned char i2c_start(unsigned char address) { return 1; }


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

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

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

LLVM IR (-O2):
define zeroext i8 @i2c_start(i8 zeroext %0) {
ret i8 1
}
int mudolo(int num, int divider) {
  if (num < divider) {
    return num;
  }
  mudolo(num - divider, divider);
}


x86 assembly (clang, -O0):
<mudolo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1135 <mudolo+0x25>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1143 <mudolo+0x33>
mov    -0x8(%rbp),%edi
sub    -0xc(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <mudolo@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mudolo>:
mov    %edi,%eax
cmp    %esi,%edi
jl     1116 <mudolo+0x16>
mov    %eax,%ecx
nopl   0x0(%rax,%rax,1)
sub    %esi,%ecx
cmp    %esi,%ecx
jge    1110 <mudolo+0x10>
ret

LLVM IR (-O0):
define i32 @mudolo(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 = icmp slt i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32, i32* %4
store i32 %10, i32* %3
br label %17
11: ; preds = %2
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = sub nsw i32 %12, %13
%15 = load i32, i32* %5
%16 = call i32 @mudolo(i32 %14, i32 %15)
br label %17
17: ; preds = %11, %9
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @mudolo(i32 returned %0, i32 %1) {
%3 = icmp slt i32 %0, %1
br i1 %3, label %8, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %0, %2 ]
%6 = sub nsw i32 %5, %1
%7 = icmp slt i32 %6, %1
br i1 %7, label %8, label %4
8: ; preds = %4, %2
ret i32 %0
}
int fn5(int z) { return z & ~(z & 3); }


x86 assembly (clang, -O0):
<fn5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
and    $0x3,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn5>:
mov    %edi,%eax
and    $0xfffffffc,%eax
ret

LLVM IR (-O0):
define i32 @fn5(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = and i32 %4, 3
%6 = xor i32 %5, -1
%7 = and i32 %3, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @fn5(i32 %0) {
%2 = and i32 %0, -4
ret i32 %2
}
/* Variables and functions */
int cpufv_get();
int cpufv_toggle(void) {
  int mode, next;
  mode = cpufv_get();
  next = (mode % 3) + 1;
  if (next > 2)
    next = 0;
  return next;
}


x86 assembly (clang, -O0):
<cpufv_toggle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <cpufv_get@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    %edx,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jle    1144 <cpufv_toggle+0x34>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpufv_toggle>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <cpufv_get@plt>
cltq
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
mov    %eax,%edx
sub    %ecx,%edx
neg    %ecx
add    %ecx,%eax
add    $0x1,%eax
cmp    $0x2,%edx
cmovge %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @cpufv_toggle() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @cpufv_get()
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = srem i32 %4, 3
%6 = add nsw i32 %5, 1
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = icmp sgt i32 %7, 2
br i1 %8, label %9, label %10
9: ; preds = %0
store i32 0, i32* %2
br label %10
10: ; preds = %9, %0
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @cpufv_toggle() {
%1 = tail call i32 (...) @cpufv_get()
%2 = srem i32 %1, 3
%3 = add nsw i32 %2, 1
%4 = icmp sgt i32 %2, 1
%5 = select i1 %4, i32 0, i32 %3
ret i32 %5
}
/* Type definitions */
struct sembuf {
  int sem_num;
  int sem_op;
  int /*<<< orphan*/ sem_flg;
};

/* Variables and functions */
int /*<<< orphan*/ SEM_UNDO;
int /*<<< orphan*/ semop(int, struct sembuf *, int);
void md4_sem_unlock(int semid, int semnum) {
  struct sembuf sops;
  sops.sem_num = semnum;
  sops.sem_op = 1;
  sops.sem_flg = SEM_UNDO;
  semop(semid, &sops, 1);
}


x86 assembly (clang, -O0):
<md4_sem_unlock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
movl   $0x1,-0x14(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x18(%rbp),%rsi
mov    $0x1,%edx
call   1030 <semop@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<md4_sem_unlock>:
sub    $0x18,%rsp
mov    %esi,0x8(%rsp)
movl   $0x1,0xc(%rsp)
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x10(%rsp)
lea    0x8(%rsp),%rsi
mov    $0x1,%edx
call   1030 <semop@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sembuf = type { i32, i32, i32 }
@SEM_UNDO = global i32 0
define void @md4_sem_unlock(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.sembuf
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %5, i32 0, i32 0
store i32 %6, i32* %7
%8 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %5, i32 0, i32 1
store i32 1, i32* %8
%9 = load i32, i32* @SEM_UNDO
%10 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %5, i32 0, i32 2
store i32 %9, i32* %10
%11 = load i32, i32* %3
%12 = call i32 @semop(i32 %11, %struct.sembuf* %5, i32 1)
ret void
}

LLVM IR (-O2):
%struct.sembuf = type { i32, i32, i32 }
@SEM_UNDO = global i32 0
define void @md4_sem_unlock(i32 %0, i32 %1) {
%3 = alloca %struct.sembuf
%4 = bitcast %struct.sembuf* %3 to i8*
%5 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i64 0, i32 0
store i32 %1, i32* %5
%6 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i64 0, i32 1
store i32 1, i32* %6
%7 = load i32, i32* @SEM_UNDO
%8 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i64 0, i32 2
store i32 %7, i32* %8
%9 = call i32 @semop(i32 %0, %struct.sembuf* %3, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *roman_convert_from_int(int);
scalar_t__ strcmp(char *, char const *);
bool converts_back_to_same_numeral(int value, const char *expected_numeral) {
  char *converted_numeral = roman_convert_from_int(value);
  bool result = strcmp(converted_numeral, expected_numeral) == 0;
  free(converted_numeral);
  return result;
}


x86 assembly (clang, -O0):
<converts_back_to_same_numeral>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <roman_convert_from_int@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<converts_back_to_same_numeral>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
call   1050 <roman_convert_from_int@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1040 <strcmp@plt>
xor    %ebp,%ebp
test   %rax,%rax
sete   %bpl
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @converts_back_to_same_numeral(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%7 = load i32, i32* %3
%8 = call i8* @roman_convert_from_int(i32 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = load i8*, i8** %4
%11 = call i64 @strcmp(i8* %9, i8* %10)
%12 = icmp eq i64 %11, 0
%13 = zext i1 %12 to i32
store i32 %13, i32* %6
%14 = load i8*, i8** %5
%15 = call i32 @free(i8* %14)
%16 = load i32, i32* %6
ret i32 %16
}

LLVM IR (-O2):
define i32 @converts_back_to_same_numeral(i32 %0, i8* %1) {
%3 = tail call i8* @roman_convert_from_int(i32 %0)
%4 = tail call i64 @strcmp(i8* %3, i8* %1)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
%7 = tail call i32 @free(i8* %3)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "Usage: wipe_blkdev [-s] <partition>\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [37 x i8] c"Usage: wipe_blkdev [-s] <partition>\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [37 x i8] c"Usage: wipe_blkdev [-s] <partition>\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
void exynos_drm_fbdev_fini(struct drm_device *dev) {}


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

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

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

LLVM IR (-O2):
%struct.drm_device = type opaque
define void @exynos_drm_fbdev_fini(%struct.drm_device* nocapture %0) {
ret void
}
void RTAvloU32DoWithAll(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvloU32DoWithAll() {
ret void
}
/* Variables and functions */
int fabs(double);
double sign(double a, double b) {
  if (b >= 0.) {
    return fabs(a);
  }
  return -1. * fabs(a);
}


x86 assembly (clang, -O0):
<sign>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     114c <sign+0x3c>
movsd  -0x10(%rbp),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    116b <sign+0x5b>
movsd  -0x10(%rbp),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xe9e(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sign>:
push   %rax
movsd  %xmm1,(%rsp)
call   1030 <fabs@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movapd 0xed6(%rip),%xmm2
xorpd  %xmm1,%xmm2
xorpd  %xmm0,%xmm0
cmpnlesd (%rsp),%xmm0
movapd %xmm0,%xmm3
andnpd %xmm1,%xmm3
andpd  %xmm2,%xmm0
orpd   %xmm3,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @sign(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %5
%7 = fcmp oge double %6, 0.000000e+00
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load double, double* %4
%10 = call i32 @fabs(double %9)
%11 = sitofp i32 %10 to double
store double %11, double* %3
br label %17
12: ; preds = %2
%13 = load double, double* %4
%14 = call i32 @fabs(double %13)
%15 = sitofp i32 %14 to double
%16 = fmul double -1.000000e+00, %15
store double %16, double* %3
br label %17
17: ; preds = %12, %8
%18 = load double, double* %3
ret double %18
}

LLVM IR (-O2):
define double @sign(double %0, double %1) {
%3 = fcmp ult double %1, 0.000000e+00
%4 = tail call i32 @fabs(double %0)
%5 = sitofp i32 %4 to double
%6 = fneg double %5
%7 = select i1 %3, double %6, double %5
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ __builtin_arc_flag(unsigned int);
void test_flag_0(unsigned int a) { __builtin_arc_flag(a); }


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

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

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

LLVM IR (-O2):
define void @test_flag_0(i32 %0) {
%2 = tail call i32 @__builtin_arc_flag(i32 %0)
ret void
}
void ERR_func_error_string(void) {}


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

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

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

LLVM IR (-O2):
define void @ERR_func_error_string() {
ret void
}
void sigtrap(void) { asm volatile("int $3"); }


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

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

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

LLVM IR (-O2):
define void @sigtrap() {
tail call void asm sideeffect "int $$3", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Type definitions */
typedef scalar_t__ time_t;

/* Variables and functions */
int FileIsNew(time_t tTo, time_t tFrom) {
  if (tTo < tFrom)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<FileIsNew>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    1126 <FileIsNew+0x26>
movl   $0x1,-0x4(%rbp)
jmp    112d <FileIsNew+0x2d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @FileIsNew(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
int g_is_not_f(float s, float d) { return s == 0; }


x86 assembly (clang, -O0):
<g_is_not_f>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_is_not_f>:
xorps  %xmm1,%xmm1
cmpeqss %xmm0,%xmm1
movd   %xmm1,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @g_is_not_f(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 = fcmp oeq float %5, 0.000000e+00
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @g_is_not_f(float %0, float %1) {
%3 = fcmp oeq float %0, 0.000000e+00
%4 = zext i1 %3 to i32
ret i32 %4
}
int rgb2v(unsigned char *ptr) {
  int v = (*ptr++ * 77);
  v += (*ptr++ * 151);
  v += (*ptr++ * 28);
  v >>= 8;
  return v;
}


x86 assembly (clang, -O0):
<rgb2v>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
imul   $0x4d,%eax,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
imul   $0x97,%eax,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
imul   $0x1c,%eax,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rgb2v>:
movzbl (%rdi),%eax
imul   $0x4d,%eax,%eax
movzbl 0x1(%rdi),%ecx
imul   $0x97,%ecx,%ecx
add    %eax,%ecx
movzbl 0x2(%rdi),%edx
lea    (%rdx,%rdx,8),%eax
lea    (%rax,%rax,2),%eax
add    %edx,%eax
add    %ecx,%eax
shr    $0x8,%eax
ret

LLVM IR (-O0):
define i32 @rgb2v(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i32 1
store i8* %5, i8** %2
%6 = load i8, i8* %4
%7 = zext i8 %6 to i32
%8 = mul nsw i32 %7, 77
store i32 %8, i32* %3
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %2
%11 = load i8, i8* %9
%12 = zext i8 %11 to i32
%13 = mul nsw i32 %12, 151
%14 = load i32, i32* %3
%15 = add nsw i32 %14, %13
store i32 %15, i32* %3
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %2
%18 = load i8, i8* %16
%19 = zext i8 %18 to i32
%20 = mul nsw i32 %19, 28
%21 = load i32, i32* %3
%22 = add nsw i32 %21, %20
store i32 %22, i32* %3
%23 = load i32, i32* %3
%24 = ashr i32 %23, 8
store i32 %24, i32* %3
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @rgb2v(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %0
%4 = zext i8 %3 to i32
%5 = mul nuw nsw i32 %4, 77
%6 = getelementptr inbounds i8, i8* %0, i64 2
%7 = load i8, i8* %2
%8 = zext i8 %7 to i32
%9 = mul nuw nsw i32 %8, 151
%10 = add nuw nsw i32 %9, %5
%11 = load i8, i8* %6
%12 = zext i8 %11 to i32
%13 = mul nuw nsw i32 %12, 28
%14 = add nuw nsw i32 %10, %13
%15 = lshr i32 %14, 8
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void foo() { printf("hello world"); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"hello world\00"
define void @foo() {
%1 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"hello world\00"
define void @foo() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void my_exit1() { printf("first registered atexit func!\n"); }


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

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

LLVM IR (-O0):
@.str = [31 x i8] c"first registered atexit func!\0A\00"
define void @my_exit1() {
%1 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [30 x i8] c"first registered atexit func!\00"
define void @my_exit1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret void
}
void gtk_tree_model_get_iter_first() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_model_get_iter_first() {
ret void
}
int vsd_deinit() { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @vsd_deinit() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_line() { printf("\n"); }


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

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

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

LLVM IR (-O2):
define void @print_line() {
%1 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BSP_UART_SendCongestionString(int /*<<< orphan*/, char *);
void HaltPabort(void) {
  BSP_UART_SendCongestionString(0, "Pabort exception!!!\n\0");
  while (1)
    ;
}


x86 assembly (clang, -O0):
<HaltPabort>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
call   1030 <BSP_UART_SendCongestionString@plt>
jmp    1122 <HaltPabort+0x12>

x86 assembly (clang, -O2):
<HaltPabort>:
push   %rax
lea    0xee8(%rip),%rsi
xor    %edi,%edi
call   1030 <BSP_UART_SendCongestionString@plt>
nop
jmp    1120 <HaltPabort+0x10>

LLVM IR (-O0):
@.str = [22 x i8] c"Pabort exception!!!\0A\00\00"
define void @HaltPabort() {
%1 = call i32 @BSP_UART_SendCongestionString(i32 0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}

LLVM IR (-O2):
@.str = [22 x i8] c"Pabort exception!!!\0A\00\00"
define void @HaltPabort() {
%1 = tail call i32 @BSP_UART_SendCongestionString(i32 0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void heapFree(void *userData, void *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<heapFree>:
mov    %rsi,%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @heapFree(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @free(i8* %5)
ret void
}

LLVM IR (-O2):
define void @heapFree(i8* nocapture readnone %0, i8* nocapture %1) {
%3 = tail call i32 @free(i8* %1)
ret void
}
long long abs_fun_llong(long long a) {
  long long mask = a >> 63;
  return (a + mask) ^ mask;
}


x86 assembly (clang, -O0):
<abs_fun_llong>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
sar    $0x3f,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
xor    -0x10(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @abs_fun_llong(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = ashr i64 %4, 63
store i64 %5, i64* %3
%6 = load i64, i64* %2
%7 = load i64, i64* %3
%8 = add nsw i64 %6, %7
%9 = load i64, i64* %3
%10 = xor i64 %8, %9
ret i64 %10
}

LLVM IR (-O2):
define i64 @abs_fun_llong(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
extern int checksimd(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @checksimd() {
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int height;
};
typedef TYPE_1__ XWindowChanges;

/* Variables and functions */
void set_XWindowChanges_height(void *_p, int _v) {
  ((XWindowChanges *)_p)->height = (int)_v;
}


x86 assembly (clang, -O0):
<set_XWindowChanges_height>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XWindowChanges_height>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XWindowChanges_height(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}