xunge/DecIR huggingface dataset:
int prev(int cur, int size) { return ((cur + size - 1) % size); }


x86 assembly (clang, -O0):
<prev>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
sub    $0x1,%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<prev>:
lea    (%rdi,%rsi,1),%eax
add    $0xffffffff,%eax
cltd
idiv   %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @prev(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 = add nsw i32 %5, %6
%8 = sub nsw i32 %7, 1
%9 = load i32, i32* %4
%10 = srem i32 %8, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @prev(i32 %0, i32 %1) {
%3 = add i32 %0, -1
%4 = add i32 %3, %1
%5 = srem i32 %4, %1
ret i32 %5
}
int os_apm_read(struct olsr_apm_info *ApmInfo __attribute__((unused))) {
  return -1;
}


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

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

LLVM IR (-O0):
%struct.olsr_apm_info = type opaque
define i32 @os_apm_read(%struct.olsr_apm_info* %0) {
%2 = alloca %struct.olsr_apm_info*
store %struct.olsr_apm_info* %0, %struct.olsr_apm_info** %2
ret i32 -1
}

LLVM IR (-O2):
%struct.olsr_apm_info = type opaque
define i32 @os_apm_read(%struct.olsr_apm_info* nocapture readnone %0) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(stderr, "usage: pwd [-L | -P]\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 = [22 x i8] c"usage: pwd [-L | -P]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"usage: pwd [-L | -P]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
const char *unqlite_lib_version(void) { return "1.1.1"; }


x86 assembly (clang, -O0):
<unqlite_lib_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unqlite_lib_version>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [6 x i8] c"1.1.1\00"
define i8* @unqlite_lib_version() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"1.1.1\00"
define i8* @unqlite_lib_version() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int rand();
uint32_t get_rand_diap(uint32_t l, uint32_t r) { return l + rand() % (r - l); }


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

x86 assembly (clang, -O2):
<get_rand_diap>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <rand@plt>
sub    %ebp,%ebx
cltd
idiv   %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @get_rand_diap(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 (...) @rand()
%7 = load i32, i32* %4
%8 = load i32, i32* %3
%9 = sub nsw i32 %7, %8
%10 = srem i32 %6, %9
%11 = add nsw i32 %5, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @get_rand_diap(i32 %0, i32 %1) {
%3 = tail call i32 (...) @rand()
%4 = sub nsw i32 %1, %0
%5 = srem i32 %3, %4
%6 = add nsw i32 %5, %0
ret i32 %6
}
int color_offset_f3(int x, int y) {
  return (((y << 10) + (((x << 10) * 367) / 84) - (16305 << 10)) >> 10);
}


x86 assembly (clang, -O0):
<color_offset_f3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0xa,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shl    $0xa,%eax
imul   $0x16f,%eax,%eax
mov    $0x54,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
sub    $0xfec400,%eax
sar    $0xa,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<color_offset_f3>:
shl    $0xa,%esi
imul   $0x5bc00,%edi,%eax
cltq
imul   $0x30c30c31,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x24,%rax
add    %ecx,%eax
add    %esi,%eax
add    $0xff013c00,%eax
sar    $0xa,%eax
ret

LLVM IR (-O0):
define i32 @color_offset_f3(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = shl i32 %5, 10
%7 = load i32, i32* %3
%8 = shl i32 %7, 10
%9 = mul nsw i32 %8, 367
%10 = sdiv i32 %9, 84
%11 = add nsw i32 %6, %10
%12 = sub nsw i32 %11, 16696320
%13 = ashr i32 %12, 10
ret i32 %13
}

LLVM IR (-O2):
define i32 @color_offset_f3(i32 %0, i32 %1) {
%3 = shl i32 %1, 10
%4 = mul i32 %0, 375808
%5 = sdiv i32 %4, 84
%6 = add nsw i32 %5, -16696320
%7 = add i32 %6, %3
%8 = ashr i32 %7, 10
ret i32 %8
}
int do_761() { return 761; }


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

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

LLVM IR (-O0):
define i32 @do_761() {
ret i32 761
}

LLVM IR (-O2):
define i32 @do_761() {
ret i32 761
}
/* Variables and functions */
int /*<<< orphan*/ default_handler();
__attribute__((weak)) void DebugMon_Handler() { default_handler(); }


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

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

LLVM IR (-O0):
define weak void @DebugMon_Handler() {
%1 = call i32 (...) @default_handler()
ret void
}

LLVM IR (-O2):
define weak void @DebugMon_Handler() {
%1 = tail call i32 (...) @default_handler()
ret void
}
/* Variables and functions */
int permutation(int);
int combinations(int n, int k) {
  return permutation(n) / (permutation(k) * permutation(n - k));
}


x86 assembly (clang, -O0):
<combinations>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <permutation@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <permutation@plt>
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
sub    -0x8(%rbp),%edi
call   1030 <permutation@plt>
mov    -0x10(%rbp),%ecx
mov    %eax,%edx
mov    -0xc(%rbp),%eax
imul   %edx,%ecx
cltd
idiv   %ecx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<combinations>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <permutation@plt>
mov    %eax,%r14d
mov    %ebx,%edi
call   1030 <permutation@plt>
mov    %eax,%r15d
sub    %ebx,%ebp
mov    %ebp,%edi
call   1030 <permutation@plt>
mov    %eax,%ecx
imul   %r15d,%ecx
mov    %r14d,%eax
cltd
idiv   %ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @combinations(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 @permutation(i32 %5)
%7 = load i32, i32* %4
%8 = call i32 @permutation(i32 %7)
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = sub nsw i32 %9, %10
%12 = call i32 @permutation(i32 %11)
%13 = mul nsw i32 %8, %12
%14 = sdiv i32 %6, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @combinations(i32 %0, i32 %1) {
%3 = tail call i32 @permutation(i32 %0)
%4 = tail call i32 @permutation(i32 %1)
%5 = sub nsw i32 %0, %1
%6 = tail call i32 @permutation(i32 %5)
%7 = mul nsw i32 %6, %4
%8 = sdiv i32 %3, %7
ret i32 %8
}
int exp_validarg(char *expression) {
  register int c;
  bwx_DEBUG(__FUNCTION__);
  c = 0;
  while (-1) {
    switch (expression[c]) {
    case ' ':
      ++c;
      break;
    case '\0':
      return 0;
    default:
      return -1;
    }
  }
}


x86 assembly (clang, -O0):
<exp_validarg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <bwx_DEBUG@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    %eax,-0x18(%rbp)
test   %eax,%eax
je     116c <exp_validarg+0x5c>
jmp    114d <exp_validarg+0x3d>
mov    -0x18(%rbp),%eax
sub    $0x20,%eax
jne    1178 <exp_validarg+0x68>
jmp    115e <exp_validarg+0x4e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1184 <exp_validarg+0x74>
movl   $0x0,-0x4(%rbp)
jmp    1189 <exp_validarg+0x79>
movl   $0xffffffff,-0x4(%rbp)
jmp    1189 <exp_validarg+0x79>
jmp    1131 <exp_validarg+0x21>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exp_validarg>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <bwx_DEBUG@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%rbx),%eax
cmp    $0x20,%eax
jne    113e <exp_validarg+0x2e>
add    $0x1,%rbx
jmp    1130 <exp_validarg+0x20>
test   %eax,%eax
je     1147 <exp_validarg+0x37>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
@__FUNCTION__.exp_validarg = [13 x i8] c"exp_validarg\00"
define i32 @exp_validarg(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @bwx_DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__FUNCTION__.exp_validarg, i64 0, i64 0))
store i32 0, i32* %4
br label %6
6: ; preds = %1, %18
%7 = load i8*, i8** %3
%8 = load i32, i32* %4
%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
switch i32 %12, label %17 [
i32 32, label %13
i32 0, label %16
]
13: ; preds = %6
%14 = load i32, i32* %4
%15 = add nsw i32 %14, 1
store i32 %15, i32* %4
br label %18
16: ; preds = %6
store i32 0, i32* %2
br label %19
17: ; preds = %6
store i32 -1, i32* %2
br label %19
18: ; preds = %13
br label %6
19: ; preds = %17, %16
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
@__FUNCTION__.exp_validarg = [13 x i8] c"exp_validarg\00"
define i32 @exp_validarg(i8* nocapture %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @bwx_DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__FUNCTION__.exp_validarg, i64 0, i64 0))
br label %3
3: ; preds = %8, %1
%4 = phi i64 [ %9, %8 ], [ 0, %1 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
switch i32 %7, label %12 [
i32 32, label %8
i32 0, label %10
]
8: ; preds = %3
%9 = add nuw i64 %4, 1
br label %3
10: ; preds = %3
%11 = sext i8 %6 to i32
br label %12
12: ; preds = %3, %10
%13 = phi i32 [ %11, %10 ], [ -1, %3 ]
ret i32 %13
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
bool WatchdogRunning(uint32_t ui32Base) {
  ASSERT((ui32Base == 0x40000000) || (ui32Base == 0x40001000));
  return ((*((volatile uint32_t *)(ui32Base + 0x00000008))) & 0x00000001);
}


x86 assembly (clang, -O0):
<WatchdogRunning>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x40000000,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     113a <WatchdogRunning+0x2a>
cmpl   $0x40001000,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x8,%eax
cltq
mov    (%rax),%eax
and    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WatchdogRunning>:
push   %rbx
mov    %edi,%ebx
mov    %edi,%eax
and    $0xffffefff,%eax
xor    %edi,%edi
cmp    $0x40000000,%eax
sete   %dil
call   1030 <ASSERT@plt>
movslq %ebx,%rax
mov    0x8(%rax),%eax
and    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @WatchdogRunning(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1073741824
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 1073745920
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
%11 = call i32 @ASSERT(i32 %10)
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 8
%14 = sext i32 %13 to i64
%15 = inttoptr i64 %14 to i32*
%16 = load volatile i32, i32* %15
%17 = and i32 %16, 1
ret i32 %17
}

LLVM IR (-O2):
define i32 @WatchdogRunning(i32 %0) {
%2 = and i32 %0, -4097
%3 = icmp eq i32 %2, 1073741824
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
%6 = add nsw i32 %0, 8
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
%9 = load volatile i32, i32* %8
%10 = and i32 %9, 1
ret i32 %10
}
int compFunc(const void *a, const void *b) { return (*(int *)a - *(int *)b); }


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

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

LLVM IR (-O0):
define i32 @compFunc(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @compFunc(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
int should_drop_privileges() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @should_drop_privileges() {
ret i32 1
}
/* Variables and functions */
double loglike_theta(double *, int, void *, int *);
double fitfun(double *x, int n, void *output, int *info) {
  return loglike_theta(x, n, output, info);
}


x86 assembly (clang, -O0):
<fitfun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <loglike_theta@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define double @fitfun(double* %0, i32 %1, i8* %2, i32* %3) {
%5 = tail call double @loglike_theta(double* %0, i32 %1, i8* %2, i32* %3)
ret double %5
}
int nbYear(int p0, double percent, int aug, int p) {
  percent /= 100;
  int count = 0;
  for (;;) {
    int current = p0 + p0 * percent + aug;
    p0 = current;
    count++;
    if (current >= p) {
      return count;
    }
  }
}


x86 assembly (clang, -O0):
<nbYear>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xee1(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0x0,-0x1c(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm1
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x18(%rbp),%eax
jl     1176 <nbYear+0x76>
mov    -0x1c(%rbp),%eax
pop    %rbp
ret
jmp    112f <nbYear+0x2f>

x86 assembly (clang, -O2):
<nbYear>:
divsd  0xef8(%rip),%xmm0
cvtsi2sd %esi,%xmm1
xor    %eax,%eax
xchg   %ax,%ax
xorps  %xmm2,%xmm2
cvtsi2sd %edi,%xmm2
movapd %xmm2,%xmm3
mulsd  %xmm0,%xmm3
addsd  %xmm2,%xmm3
addsd  %xmm1,%xmm3
cvttsd2si %xmm3,%edi
add    $0x1,%eax
cmp    %edx,%edi
jl     1110 <nbYear+0x10>
ret

LLVM IR (-O0):
define i32 @nbYear(i32 %0, double %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca double
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %5
store double %1, double* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%11 = load double, double* %6
%12 = fdiv double %11, 1.000000e+02
store double %12, double* %6
store i32 0, i32* %9
br label %13
13: ; preds = %32, %4
%14 = load i32, i32* %5
%15 = sitofp i32 %14 to double
%16 = load i32, i32* %5
%17 = sitofp i32 %16 to double
%18 = load double, double* %6
%19 = call double @llvm.fmuladd.f64(double %17, double %18, double %15)
%20 = load i32, i32* %7
%21 = sitofp i32 %20 to double
%22 = fadd double %19, %21
%23 = fptosi double %22 to i32
store i32 %23, i32* %10
%24 = load i32, i32* %10
store i32 %24, i32* %5
%25 = load i32, i32* %9
%26 = add nsw i32 %25, 1
store i32 %26, i32* %9
%27 = load i32, i32* %10
%28 = load i32, i32* %8
%29 = icmp sge i32 %27, %28
br i1 %29, label %30, label %32
30: ; preds = %13
%31 = load i32, i32* %9
ret i32 %31
32: ; preds = %13
br label %13
}

LLVM IR (-O2):
define i32 @nbYear(i32 %0, double %1, i32 %2, i32 %3) {
%5 = fdiv double %1, 1.000000e+02
%6 = sitofp i32 %2 to double
br label %7
7: ; preds = %7, %4
%8 = phi i32 [ %0, %4 ], [ %13, %7 ]
%9 = phi i32 [ 0, %4 ], [ %14, %7 ]
%10 = sitofp i32 %8 to double
%11 = tail call double @llvm.fmuladd.f64(double %10, double %5, double %10)
%12 = fadd double %11, %6
%13 = fptosi double %12 to i32
%14 = add nuw nsw i32 %9, 1
%15 = icmp slt i32 %13, %3
br i1 %15, label %7, label %16
16: ; preds = %7
ret i32 %14
}
float qurt_fabs(float n) {
  float f;
  if (n >= 0)
    f = n;
  else
    f = -n;
  return f;
}


x86 assembly (clang, -O0):
<qurt_fabs>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     1129 <qurt_fabs+0x29>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1140 <qurt_fabs+0x40>
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<qurt_fabs>:
movaps 0xef9(%rip),%xmm2
xorps  %xmm0,%xmm2
xorps  %xmm1,%xmm1
cmpnless %xmm0,%xmm1
andps  %xmm1,%xmm2
andnps %xmm0,%xmm1
orps   %xmm2,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @qurt_fabs(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fcmp oge float %4, 0.000000e+00
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load float, float* %2
store float %7, float* %3
br label %11
8: ; preds = %1
%9 = load float, float* %2
%10 = fneg float %9
store float %10, float* %3
br label %11
11: ; preds = %8, %6
%12 = load float, float* %3
ret float %12
}

LLVM IR (-O2):
define float @qurt_fabs(float %0) {
%2 = fcmp ult float %0, 0.000000e+00
%3 = fneg float %0
%4 = select i1 %2, float %3, float %0
ret float %4
}
/* Variables and functions */
size_t ZSTD_compressBound(int);
size_t ZBUFF_recommendedCOutSize() {
  return ZSTD_compressBound((128 * 1024)) + 6;
}


x86 assembly (clang, -O0):
<ZBUFF_recommendedCOutSize>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20000,%edi
call   1030 <ZSTD_compressBound@plt>
add    $0x6,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ZBUFF_recommendedCOutSize>:
push   %rax
mov    $0x20000,%edi
call   1030 <ZSTD_compressBound@plt>
add    $0x6,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @ZBUFF_recommendedCOutSize() {
%1 = call i64 @ZSTD_compressBound(i32 131072)
%2 = add i64 %1, 6
ret i64 %2
}

LLVM IR (-O2):
define i64 @ZBUFF_recommendedCOutSize() {
%1 = tail call i64 @ZSTD_compressBound(i32 131072)
%2 = add i64 %1, 6
ret i64 %2
}
/* Type definitions */
typedef int uint_fast32_t;

/* Variables and functions */
bool SHAREMIND_MAP_KEY_COPY_uint_fast32_t(uint_fast32_t *const dest,
                                          uint_fast32_t const src) {
  return (((*dest) = src), true);
}


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

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

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

LLVM IR (-O2):
define i32 @SHAREMIND_MAP_KEY_COPY_uint_fast32_t(i32* nocapture writeonly %0, i32 %1) {
store i32 %1, i32* %0
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ ol(char *);
neg() { ol("negl %eax"); }


x86 assembly (clang, -O0):
<neg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <ol@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [10 x i8] c"negl %eax\00"
define i32 @neg() {
%1 = alloca i32
%2 = call i32 @ol(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [10 x i8] c"negl %eax\00"
define i32 @neg() {
%1 = tail call i32 @ol(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int *unpack_rng(char *);
int *funpack_rng(char *buffer) { return unpack_rng(buffer); }


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

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

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

LLVM IR (-O2):
define i32* @funpack_rng(i8* %0) {
%2 = tail call i32* @unpack_rng(i8* %0)
ret i32* %2
}
/* Variables and functions */
long gcd(long, long);
long solution() {
  long lcm = 1;
  for (long b = 2; b <= 20; b++) {
    long div = gcd(lcm, b);
    lcm = (lcm * b) / div;
  }
  return lcm;
}


x86 assembly (clang, -O0):
<solution>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movq   $0x1,-0x8(%rbp)
movq   $0x2,-0x10(%rbp)
cmpq   $0x14,-0x10(%rbp)
jg     1168 <solution+0x58>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <gcd@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
imul   -0x10(%rbp),%rax
cqto
idivq  -0x18(%rbp)
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1128 <solution+0x18>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solution>:
push   %r14
push   %rbx
push   %rax
mov    $0x2,%ebx
mov    $0x1,%r14d
jmp    1145 <solution+0x35>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rax
cqto
idiv   %rcx
mov    %rax,%r14
add    $0x1,%rbx
cmp    $0x15,%rbx
je     116c <solution+0x5c>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <gcd@plt>
mov    %rax,%rcx
imul   %rbx,%r14
or     %r14,%rax
shr    $0x20,%rax
jne    1130 <solution+0x20>
mov    %r14d,%eax
xor    %edx,%edx
div    %ecx
mov    %eax,%r14d
jmp    113b <solution+0x2b>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @solution() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i64
store i64 1, i64* %1
store i64 2, i64* %2
br label %4
4: ; preds = %16, %0
%5 = load i64, i64* %2
%6 = icmp sle i64 %5, 20
br i1 %6, label %7, label %19
7: ; preds = %4
%8 = load i64, i64* %1
%9 = load i64, i64* %2
%10 = call i64 @gcd(i64 %8, i64 %9)
store i64 %10, i64* %3
%11 = load i64, i64* %1
%12 = load i64, i64* %2
%13 = mul nsw i64 %11, %12
%14 = load i64, i64* %3
%15 = sdiv i64 %13, %14
store i64 %15, i64* %1
br label %16
16: ; preds = %7
%17 = load i64, i64* %2
%18 = add nsw i64 %17, 1
store i64 %18, i64* %2
br label %4
19: ; preds = %4
%20 = load i64, i64* %1
ret i64 %20
}

LLVM IR (-O2):
define i64 @solution() {
br label %2
1: ; preds = %2
ret i64 %7
2: ; preds = %0, %2
%3 = phi i64 [ 1, %0 ], [ %7, %2 ]
%4 = phi i64 [ 2, %0 ], [ %8, %2 ]
%5 = tail call i64 @gcd(i64 %3, i64 %4)
%6 = mul nsw i64 %3, %4
%7 = sdiv i64 %6, %5
%8 = add nuw nsw i64 %4, 1
%9 = icmp eq i64 %8, 21
br i1 %9, label %1, label %2
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
void fatal(char *label) {
  fprintf(stderr, "eject: %s: %s\n", label, strerror(errno));
  exit(1);
}


x86 assembly (clang, -O0):
<fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    %rax,%rcx
lea    0xe91(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<fatal>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ea3(%rip),%rax
mov    (%rax),%ebp
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
lea    0xeac(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %rax,%rcx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"eject: %s: %s\0A\00"
@errno = global i32 0
define void @fatal(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = load i32, i32* @errno
%6 = call i8* @strerror(i32 %5)
%7 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %6)
%8 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"eject: %s: %s\0A\00"
@errno = global i32 0
define void @fatal(i8* %0) {
%2 = load i32, i32* @stderr
%3 = load i32, i32* @errno
%4 = tail call i8* @strerror(i32 %3)
%5 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %4)
%6 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
scalar_t__ exist_argument(char *);
int get_argument_int(char *);
int get_lag() {
  int result = 6;
  if (exist_argument("lag")) {
    result = get_argument_int("lag");
    if (result < 0) {
      result = 0;
    }
  }
  return result;
}


x86 assembly (clang, -O0):
<get_lag>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x6,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <exist_argument@plt>
cmp    $0x0,%rax
je     116a <get_lag+0x4a>
lea    0xeb4(%rip),%rdi
call   1040 <get_argument_int@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1165 <get_lag+0x45>
movl   $0x0,-0x4(%rbp)
jmp    116a <get_lag+0x4a>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_lag>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <exist_argument@plt>
test   %rax,%rax
je     1149 <get_lag+0x29>
lea    0xec7(%rip),%rdi
call   1040 <get_argument_int@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
cmovns %ecx,%eax
pop    %rcx
ret
mov    $0x6,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"lag\00"
define i32 @get_lag() {
%1 = tail call i64 @exist_argument(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i32 @get_argument_int(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%5 = icmp sgt i32 %4, 0
%6 = select i1 %5, i32 %4, i32 0
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ %6, %3 ], [ 6, %0 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("Usage: filedez <file_to_dez>\n");
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"Usage: filedez <file_to_dez>\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [29 x i8] c"Usage: filedez <file_to_dez>\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
int rightrot(unsigned int x, unsigned int n) {
  return x >> n | (x << (32 - n));
}


x86 assembly (clang, -O0):
<rightrot>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shr    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rightrot>:
mov    %esi,%ecx
mov    %edi,%eax
ror    %cl,%eax
ret

LLVM IR (-O0):
define i32 @rightrot(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 = lshr i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub i32 32, %9
%11 = shl i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @rightrot(i32 %0, i32 %1) {
%3 = lshr i32 %0, %1
%4 = sub i32 32, %1
%5 = shl i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
int test_imm_98int8_mem(signed char *val) {
  return ((*val) & (0x98 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_98int8_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, 152
%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_98int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -104
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
__float128 f128_fma(__float128 a, __float128 b, __float128 c) {
  return (a * b) + c;
}


x86 assembly (clang, -O0):
<f128_fma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movaps %xmm0,-0x10(%rbp)
movaps %xmm1,-0x20(%rbp)
movaps %xmm2,-0x30(%rbp)
movaps -0x10(%rbp),%xmm0
movaps -0x20(%rbp),%xmm1
movaps -0x30(%rbp),%xmm2
movaps %xmm2,-0x40(%rbp)
call   2520 <__multf3>
movaps -0x40(%rbp),%xmm1
call   1140 <__addtf3>
add    $0x40,%rsp
pop    %rbp
ret
nopl   0x0(%rax,%rax,1)

x86 assembly (clang, -O2):
<f128_fma>:
sub    $0x18,%rsp
movaps %xmm2,(%rsp)
call   2500 <__multf3>
movaps (%rsp),%xmm1
add    $0x18,%rsp
jmp    1120 <__addtf3>
nopw   0x0(%rax,%rax,1)

LLVM IR (-O0):
define fp128 @f128_fma(fp128 %0, fp128 %1, fp128 %2) {
%4 = alloca fp128
%5 = alloca fp128
%6 = alloca fp128
store fp128 %0, fp128* %4
store fp128 %1, fp128* %5
store fp128 %2, fp128* %6
%7 = load fp128, fp128* %4
%8 = load fp128, fp128* %5
%9 = load fp128, fp128* %6
%10 = call fp128 @llvm.fmuladd.f128(fp128 %7, fp128 %8, fp128 %9)
ret fp128 %10
}

LLVM IR (-O2):
define fp128 @f128_fma(fp128 %0, fp128 %1, fp128 %2) {
%4 = tail call fp128 @llvm.fmuladd.f128(fp128 %0, fp128 %1, fp128 %2)
ret fp128 %4
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
char *strchr(char *, char);
int find_char_offset(char *str, char what) {
  char *pnt;
  assert(what > 0);
  pnt = strchr(str, what);
  if (!pnt)
    return -1;
  return (int)(pnt - str);
}


x86 assembly (clang, -O0):
<find_char_offset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
movsbl -0x11(%rbp),%eax
cmp    $0x0,%eax
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x10(%rbp),%rdi
movsbl -0x11(%rbp),%esi
call   1030 <strchr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    116e <find_char_offset+0x4e>
movl   $0xffffffff,-0x4(%rbp)
jmp    117c <find_char_offset+0x5c>
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_char_offset>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
xor    %edi,%edi
test   %bl,%bl
setg   %dil
call   1040 <assert@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <strchr@plt>
mov    %eax,%ecx
sub    %r14d,%ecx
cmp    $0x1,%rax
sbb    %eax,%eax
or     %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @find_char_offset(i8* %0, i8 signext %1) {
%3 = icmp sgt i8 %1, 0
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext %1)
%7 = icmp eq i8* %6, null
%8 = ptrtoint i8* %6 to i64
%9 = ptrtoint i8* %0 to i64
%10 = sub i64 %8, %9
%11 = trunc i64 %10 to i32
%12 = select i1 %7, i32 -1, i32 %11
ret i32 %12
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t rotl32(uint32_t a, uint8_t n) {
  n &= 0x1f;
  return ((a << n) | (a >> (32 - n)));
}


x86 assembly (clang, -O0):
<rotl32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x1f,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotl32>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
and    $0x1f,%cl
neg    %cl
sar    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rotl32(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 31
store i32 %6, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = shl i32 %7, %8
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = sub nsw i32 32, %11
%13 = ashr i32 %10, %12
%14 = or i32 %9, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @rotl32(i32 %0, i32 %1) {
%3 = and i32 %1, 31
%4 = shl i32 %0, %3
%5 = sub nuw nsw i32 32, %3
%6 = ashr i32 %0, %5
%7 = or i32 %6, %4
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ init_heap();
void initialise_benchmark(void) { init_heap(); }


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

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

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

LLVM IR (-O2):
define void @initialise_benchmark() {
%1 = tail call i32 (...) @init_heap()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long);
int /*<<< orphan*/ scanf(char *, long *, long *);
int main() {
  long a, b;
  scanf("%d %d", &a, &b);
  printf("%d", a + b);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <scanf@plt>
mov    0x8(%rsp),%rsi
add    0x10(%rsp),%rsi
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i64
%2 = alloca i64
%3 = bitcast i64* %1 to i8*
%4 = bitcast i64* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64* %1, i64* %2)
%6 = load i64, i64* %1
%7 = load i64, i64* %2
%8 = add nsw i64 %7, %6
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i64 %8)
ret i32 0
}
int test_imm_F2uint32_reg(unsigned int val) {
  return ((val) & (0xF2 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_F2uint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0xf2,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_F2uint32_reg(i32 %0) {
%2 = and i32 %0, 242
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int min(int x, int y) {
  int z;
  z = x < y ? x : y;
  return (z);
}


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <min+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1127 <min+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ strnset(char *, char, int);
int main(int argc, char *argv[]) {
  char str[81];
  int i;
  for (i = 0; i < 80; i++)
    str[i] = 'A';
  str[80] = '\0';
  strnset(str, '.', 3);
  puts(str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x74(%rbp)
cmpl   $0x50,-0x74(%rbp)
jge    1161 <main+0x41>
movslq -0x74(%rbp),%rax
movb   $0x41,-0x70(%rbp,%rax,1)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1140 <main+0x20>
movb   $0x0,-0x20(%rbp)
lea    -0x70(%rbp),%rdi
mov    $0x2e,%esi
mov    $0x3,%edx
call   1040 <strnset@plt>
lea    -0x70(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x60,%rsp
movaps 0xed4(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movb   $0x0,0x50(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x2e,%esi
mov    $0x3,%edx
call   1040 <strnset@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [81 x i8]
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
br label %8
8: ; preds = %15, %2
%9 = load i32, i32* %7
%10 = icmp slt i32 %9, 80
br i1 %10, label %11, label %18
11: ; preds = %8
%12 = load i32, i32* %7
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [81 x i8], [81 x i8]* %6, i64 0, i64 %13
store i8 65, i8* %14
br label %15
15: ; preds = %11
%16 = load i32, i32* %7
%17 = add nsw i32 %16, 1
store i32 %17, i32* %7
br label %8
18: ; preds = %8
%19 = getelementptr inbounds [81 x i8], [81 x i8]* %6, i64 0, i64 80
store i8 0, i8* %19
%20 = getelementptr inbounds [81 x i8], [81 x i8]* %6, i64 0, i64 0
%21 = call i32 @strnset(i8* %20, i8 signext 46, i32 3)
%22 = getelementptr inbounds [81 x i8], [81 x i8]* %6, i64 0, i64 0
%23 = call i32 @puts(i8* %22)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [81 x i8]
%4 = getelementptr inbounds [81 x i8], [81 x i8]* %3, i64 0, i64 0
%5 = getelementptr inbounds [81 x i8], [81 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [81 x i8], [81 x i8]* %3, i64 0, i64 80
store i8 0, i8* %6
%7 = call i32 @strnset(i8* %5, i8 signext 46, i32 3)
%8 = call i32 @puts(i8* %5)
ret i32 0
}
void mdp4_dmap_done_dsi_video(int cndx) {}


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

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

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

LLVM IR (-O2):
define void @mdp4_dmap_done_dsi_video(i32 %0) {
ret void
}
double minmaxs(double f1, double f2, double df, double dir) {
  double mins(double f1, double f2, double df);
  double maxs(double f1, double f2, double df);
  if (dir >= 0) {
    return (maxs(f1, f2, df));
  }
  return (mins(f1, f2, df));
}


x86 assembly (clang, -O0):
<minmaxs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     116c <minmaxs+0x4c>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
call   1040 <maxs@plt>
movsd  %xmm0,-0x8(%rbp)
jmp    1185 <minmaxs+0x65>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
call   1030 <mins@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<minmaxs>:
xorpd  %xmm4,%xmm4
ucomisd %xmm4,%xmm3
jae    112f <minmaxs+0xf>
jmp    1030 <mins@plt>
jmp    1040 <maxs@plt>

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

LLVM IR (-O2):
define double @minmaxs(double %0, double %1, double %2, double %3) {
%5 = fcmp ult double %3, 0.000000e+00
br i1 %5, label %8, label %6
6: ; preds = %4
%7 = tail call double @maxs(double %0, double %1, double %2)
br label %10
8: ; preds = %4
%9 = tail call double @mins(double %0, double %1, double %2)
br label %10
10: ; preds = %8, %6
%11 = phi double [ %7, %6 ], [ %9, %8 ]
ret double %11
}
/* Type definitions */
struct tag {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *, int);
int /*<<< orphan*/ stderr;
int not_implemented(const char *input, struct tag *tag) {
  (void)input;
  (void)tag;
  do {
    if (0)
      fprintf(stderr,
              "*** DEBUG *** "
              "%s"
              " at %s:%d\n",
              "conversion not implemented",
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/Hrubon/rfidconv/refs/heads/master/src/"
              "rfidconv.c",
              38);
  } while (0);
  ;
  return (-1);
}


x86 assembly (clang, -O0):
<not_implemented>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
jmp    1111 <not_implemented+0x11>
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.tag = type { i32 }
@stderr = global i32 0
define i32 @not_implemented(i8* %0, %struct.tag* %1) {
%3 = alloca i8*
%4 = alloca %struct.tag*
store i8* %0, i8** %3
store %struct.tag* %1, %struct.tag** %4
%5 = load i8*, i8** %3
%6 = load %struct.tag*, %struct.tag** %4
br label %7
7: ; preds = %2
br label %8
8: ; preds = %7
ret i32 -1
}

LLVM IR (-O2):
%struct.tag = type { i32 }
@stderr = global i32 0
define i32 @not_implemented(i8* nocapture readnone %0, %struct.tag* nocapture readnone %1) {
ret i32 -1
}