xunge/DecIR huggingface dataset:
int mult(int n, int m) {
  if (m < 0) {
    return mult(n, -m);
  }
  if (m == 0) {
    return 0;
  }
  return n + mult(n, m - 1);
}


x86 assembly (clang, -O0):
<mult>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    113d <mult+0x2d>
mov    -0x8(%rbp),%edi
xor    %esi,%esi
sub    -0xc(%rbp),%esi
call   1030 <mult@plt>
mov    %eax,-0x4(%rbp)
jmp    1171 <mult+0x61>
cmpl   $0x0,-0xc(%rbp)
jne    1153 <mult+0x43>
movl   $0x0,-0x4(%rbp)
jmp    1171 <mult+0x61>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
call   1030 <mult@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mult>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %esi,%ecx
neg    %esi
test   %ecx,%ecx
js     1110 <mult+0x10>
je     1123 <mult+0x23>
add    $0xffffffff,%ecx
add    %edi,%eax
mov    %ecx,%esi
jmp    1110 <mult+0x10>
ret

LLVM IR (-O0):
define i32 @mult(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* %5
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = sub nsw i32 0, %10
%12 = call i32 @mult(i32 %9, i32 %11)
store i32 %12, i32* %3
br label %24
13: ; preds = %2
%14 = load i32, i32* %5
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %13
store i32 0, i32* %3
br label %24
17: ; preds = %13
%18 = load i32, i32* %4
%19 = load i32, i32* %4
%20 = load i32, i32* %5
%21 = sub nsw i32 %20, 1
%22 = call i32 @mult(i32 %19, i32 %21)
%23 = add nsw i32 %18, %22
store i32 %23, i32* %3
br label %24
24: ; preds = %17, %16, %8
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @mult(i32 %0, i32 %1) {
br label %3
3: ; preds = %12, %2
%4 = phi i32 [ %14, %12 ], [ 0, %2 ]
%5 = phi i32 [ %13, %12 ], [ %1, %2 ]
br label %6
6: ; preds = %6, %3
%7 = phi i32 [ %9, %6 ], [ %5, %3 ]
%8 = icmp slt i32 %7, 0
%9 = sub nsw i32 0, %7
br i1 %8, label %6, label %10
10: ; preds = %6
%11 = icmp eq i32 %7, 0
br i1 %11, label %15, label %12
12: ; preds = %10
%13 = add nsw i32 %7, -1
%14 = add nsw i32 %4, %0
br label %3
15: ; preds = %10
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("[-c  NUM_CPUS_TO_STRESS]\n");
  printf("If no parameters are specified all cpu's will be made busy.\n");
  return;
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef5(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"[-c NUM_CPUS_TO_STRESS]\0A\00"
@.str.1 = [61 x i8] c"If no parameters are specified all cpu's will be made busy.\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [25 x i8] c"[-c NUM_CPUS_TO_STRESS]\00"
@str.2 = [60 x i8] c"If no parameters are specified all cpu's will be made busy.\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.2, i64 0, i64 0))
ret void
}
double do_pow_0_75_default(double a) { return __builtin_pow(a, 0.75); }


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

x86 assembly (clang, -O2):
<do_pow_0_75_default>:
movsd  0xee8(%rip),%xmm1
jmp    1030 <pow@plt>

LLVM IR (-O0):
define double @do_pow_0_75_default(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @pow(double %3, double 7.500000e-01)
ret double %4
}

LLVM IR (-O2):
define double @do_pow_0_75_default(double %0) {
%2 = tail call double @pow(double %0, double 7.500000e-01)
ret double %2
}
void encodeDmaStorePeri(void) {}


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

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

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

LLVM IR (-O2):
define void @encodeDmaStorePeri() {
ret void
}
/* Variables and functions */
unsigned int increment_parameter_marshal_outputs_x(unsigned int, int *);
unsigned int increment_parameter_marshal_outputs(int *x) {
  unsigned int _camkes_length_402 = 0;
  _camkes_length_402 =
      increment_parameter_marshal_outputs_x(_camkes_length_402, x);
  if (_camkes_length_402 == 0xffffffffU) {
    return 0xffffffffU;
  }
  (void)0;
  return _camkes_length_402;
}


x86 assembly (clang, -O0):
<increment_parameter_marshal_outputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <increment_parameter_marshal_outputs_x@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    1148 <increment_parameter_marshal_outputs+0x38>
movl   $0xffffffff,-0x4(%rbp)
jmp    114e <increment_parameter_marshal_outputs+0x3e>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<increment_parameter_marshal_outputs>:
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <increment_parameter_marshal_outputs_x@plt>

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

LLVM IR (-O2):
define i32 @increment_parameter_marshal_outputs(i32* %0) {
%2 = tail call i32 @increment_parameter_marshal_outputs_x(i32 0, i32* %0)
ret i32 %2
}
/* Variables and functions */
int fork();
int /*<<< orphan*/ printf(char *, int, int);
int main(void) {
  printf("Guten %d Tag %d\n", fork(), fork());
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <fork@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <fork@plt>
mov    -0x8(%rbp),%esi
mov    %eax,%edx
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <fork@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <fork@plt>
lea    0xec8(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [17 x i8] c"Guten %d Tag %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @fork()
%2 = tail call i32 (...) @fork()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
ret i32 0
}
int parent(int i) {
  if (i < 2)
    return -1;
  if (i < 6)
    return i & 0x1;
  if (i < 22)
    return ((i - 6) & 0x3) + 2;
  if (i < 1046)
    return ((i - 22) & 0xf) + 6;
  return -1;
}


x86 assembly (clang, -O0):
<parent>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    111d <parent+0x1d>
movl   $0xffffffff,-0x4(%rbp)
jmp    117b <parent+0x7b>
cmpl   $0x6,-0x8(%rbp)
jge    1135 <parent+0x35>
mov    -0x8(%rbp),%eax
and    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    117b <parent+0x7b>
cmpl   $0x16,-0x8(%rbp)
jge    1153 <parent+0x53>
mov    -0x8(%rbp),%eax
sub    $0x6,%eax
and    $0x3,%eax
add    $0x2,%eax
mov    %eax,-0x4(%rbp)
jmp    117b <parent+0x7b>
cmpl   $0x416,-0x8(%rbp)
jge    1174 <parent+0x74>
mov    -0x8(%rbp),%eax
sub    $0x16,%eax
and    $0xf,%eax
add    $0x6,%eax
mov    %eax,-0x4(%rbp)
jmp    117b <parent+0x7b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<parent>:
mov    $0xffffffff,%eax
cmp    $0x2,%edi
jl     1137 <parent+0x37>
cmp    $0x5,%edi
ja     1114 <parent+0x14>
and    $0x1,%edi
jmp    1135 <parent+0x35>
cmp    $0x15,%edi
ja     1124 <parent+0x24>
add    $0x2,%edi
and    $0x3,%edi
add    $0x2,%edi
jmp    1135 <parent+0x35>
cmp    $0x415,%edi
ja     1137 <parent+0x37>
add    $0xa,%edi
and    $0xf,%edi
add    $0x6,%edi
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @parent(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %19, label %3
3: ; preds = %1
%4 = icmp ult i32 %0, 6
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = and i32 %0, 1
br label %19
7: ; preds = %3
%8 = icmp ult i32 %0, 22
br i1 %8, label %9, label %13
9: ; preds = %7
%10 = add nuw nsw i32 %0, 2
%11 = and i32 %10, 3
%12 = add nuw nsw i32 %11, 2
br label %19
13: ; preds = %7
%14 = icmp ult i32 %0, 1046
br i1 %14, label %15, label %19
15: ; preds = %13
%16 = add nuw nsw i32 %0, 10
%17 = and i32 %16, 15
%18 = add nuw nsw i32 %17, 6
br label %19
19: ; preds = %13, %1, %15, %9, %5
%20 = phi i32 [ %6, %5 ], [ %12, %9 ], [ %18, %15 ], [ -1, %1 ], [ -1, %13 ]
ret i32 %20
}
float celsius_to_fahr(float celsius) { return (9.0 / 5.0) * celsius + 32.0; }


x86 assembly (clang, -O0):
<celsius_to_fahr>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee6(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xee2(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<celsius_to_fahr>:
cvtss2sd %xmm0,%xmm0
mulsd  0xef4(%rip),%xmm0
addsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @celsius_to_fahr(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = call double @llvm.fmuladd.f64(double 1.800000e+00, double %4, double 3.200000e+01)
%6 = fptrunc double %5 to float
ret float %6
}

LLVM IR (-O2):
define float @celsius_to_fahr(float %0) {
%2 = fpext float %0 to double
%3 = tail call double @llvm.fmuladd.f64(double %2, double 1.800000e+00, double 3.200000e+01)
%4 = fptrunc double %3 to float
ret float %4
}
void mcpelauncher_unhook(void *hook) {}


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

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

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

LLVM IR (-O2):
define void @mcpelauncher_unhook(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ OveroSyncSettingsHandle();
int /*<<< orphan*/ UAVObjLogging(int /*<<< orphan*/);
void OveroSyncSettingsLogging() { UAVObjLogging(OveroSyncSettingsHandle()); }


x86 assembly (clang, -O0):
<OveroSyncSettingsLogging>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <OveroSyncSettingsHandle@plt>
mov    %eax,%edi
call   1030 <UAVObjLogging@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OveroSyncSettingsLogging>:
push   %rax
xor    %eax,%eax
call   1040 <OveroSyncSettingsHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <UAVObjLogging@plt>

LLVM IR (-O0):
define void @OveroSyncSettingsLogging() {
%1 = call i32 (...) @OveroSyncSettingsHandle()
%2 = call i32 @UAVObjLogging(i32 %1)
ret void
}

LLVM IR (-O2):
define void @OveroSyncSettingsLogging() {
%1 = tail call i32 (...) @OveroSyncSettingsHandle()
%2 = tail call i32 @UAVObjLogging(i32 %1)
ret void
}
long _abl(i)
long i;
{ return (i >= 0 ? i : -i); }


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

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

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

LLVM IR (-O2):
define i64 @_abl(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
/* Type definitions */
struct in_addr {
  int dummy;
};

/* Variables and functions */
int inet_aton(char const *, struct in_addr *);
int netcat_inet_pton(const char *src, void *dst) {
  int ret;
  ret = inet_aton(src, (struct in_addr *)dst);
  return ret;
}


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

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

LLVM IR (-O0):
%struct.in_addr = type { i32 }
define i32 @netcat_inet_pton(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = bitcast i8* %7 to %struct.in_addr*
%9 = call i32 @inet_aton(i8* %6, %struct.in_addr* %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
%struct.in_addr = type { i32 }
define i32 @netcat_inet_pton(i8* %0, i8* %1) {
%3 = bitcast i8* %1 to %struct.in_addr*
%4 = tail call i32 @inet_aton(i8* %0, %struct.in_addr* %3)
ret i32 %4
}
double elliott_derivative(const double value_before_activation,
                          const double value_after_activation) {
  (void)value_after_activation;
  double temp = 1.0 + fabs(value_before_activation * 1.0);
  return 1.0 / (2.0 * (temp) * (temp));
}


x86 assembly (clang, -O0):
<elliott_derivative>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xeea(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
movaps 0xeee(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xed2(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xec9(%rip),%xmm1
mulsd  -0x18(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
movsd  0xeaf(%rip),%xmm0
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<elliott_derivative>:
andpd  0xef8(%rip),%xmm0
movsd  0xf00(%rip),%xmm1
addsd  %xmm1,%xmm0
movapd %xmm0,%xmm2
addsd  %xmm0,%xmm2
mulsd  %xmm0,%xmm2
divsd  %xmm2,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @elliott_derivative(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %4
%7 = load double, double* %3
%8 = fmul double %7, 1.000000e+00
%9 = call double @llvm.fabs.f64(double %8)
%10 = fadd double 1.000000e+00, %9
store double %10, double* %5
%11 = load double, double* %5
%12 = fmul double 2.000000e+00, %11
%13 = load double, double* %5
%14 = fmul double %12, %13
%15 = fdiv double 1.000000e+00, %14
ret double %15
}

LLVM IR (-O2):
define double @elliott_derivative(double %0, double %1) {
%3 = tail call double @llvm.fabs.f64(double %0)
%4 = fadd double %3, 1.000000e+00
%5 = fmul double %4, 2.000000e+00
%6 = fmul double %4, %5
%7 = fdiv double 1.000000e+00, %6
ret double %7
}
int csv_check_output(__attribute__((unused)) struct program_options *options,
                     __attribute__((unused)) void *report_data) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.program_options = type opaque
define i32 @csv_check_output(%struct.program_options* %0, i8* %1) {
%3 = alloca %struct.program_options*
%4 = alloca i8*
store %struct.program_options* %0, %struct.program_options** %3
store i8* %1, i8** %4
ret i32 0
}

LLVM IR (-O2):
%struct.program_options = type opaque
define i32 @csv_check_output(%struct.program_options* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ requires_nonnull(char *);
char *strndup(char const *, int);
void test_3(const char *s) {
  char *p = strndup(s, 42);
  requires_nonnull(p);
}


x86 assembly (clang, -O0):
<test_3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2a,%esi
call   1030 <strndup@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <requires_nonnull@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_3>:
push   %rax
mov    $0x2a,%esi
call   1030 <strndup@plt>
mov    %rax,%rdi
pop    %rax
jmp    1040 <requires_nonnull@plt>

LLVM IR (-O0):
define void @test_3(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strndup(i8* %4, i32 42)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @requires_nonnull(i8* %6)
ret void
}

LLVM IR (-O2):
define void @test_3(i8* nocapture %0) {
%2 = tail call i8* @strndup(i8* %0, i32 42)
%3 = tail call i32 @requires_nonnull(i8* %2)
ret void
}
txt_keysig(sf, mi) {
  prtime();
  printf("Key signature, sharp/flats=%d  minor=%d\n", sf, mi);
}


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

x86 assembly (clang, -O2):
<txt_keysig>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <prtime@plt>
lea    0xecb(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"Key signature, sharp/flats=%d minor=%d\0A\00"
define i32 @txt_keysig(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (...) @prtime()
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8)
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
@.str = [41 x i8] c"Key signature, sharp/flats=%d minor=%d\0A\00"
define i32 @txt_keysig(i32 %0, i32 %1) {
%3 = tail call i32 (...) @prtime()
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret i32 undef
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void jtag_pause_ir_instruction(volatile uint32_t *host, uint32_t inst) {
  host[0] = 0x80000000 | (5 << 16) | 0x0F;
  host[0] = 0x40000000 | (9 << 16) | inst;
  host[0] = 0x80000000 | (0 << 16) | 0x00;
}


x86 assembly (clang, -O0):
<jtag_pause_ir_instruction>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x8005000f,(%rax)
mov    -0xc(%rbp),%ecx
or     $0x40090000,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x80000000,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<jtag_pause_ir_instruction>:
movl   $0x8005000f,(%rdi)
or     $0x40090000,%esi
mov    %esi,(%rdi)
movl   $0x80000000,(%rdi)
ret

LLVM IR (-O0):
define void @jtag_pause_ir_instruction(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 = getelementptr inbounds i32, i32* %5, i64 0
store volatile i32 -2147155953, i32* %6
%7 = load i32, i32* %4
%8 = or i32 1074331648, %7
%9 = load i32*, i32** %3
%10 = getelementptr inbounds i32, i32* %9, i64 0
store volatile i32 %8, i32* %10
%11 = load i32*, i32** %3
%12 = getelementptr inbounds i32, i32* %11, i64 0
store volatile i32 -2147483648, i32* %12
ret void
}

LLVM IR (-O2):
define void @jtag_pause_ir_instruction(i32* %0, i32 %1) {
store volatile i32 -2147155953, i32* %0
%3 = or i32 %1, 1074331648
store volatile i32 %3, i32* %0
store volatile i32 -2147483648, i32* %0
ret void
}
/* Variables and functions */
float remainderf(float, float);
float dremf(float x, float y) { return remainderf(x, y); }


x86 assembly (clang, -O0):
<dremf>:
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 <remainderf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define float @dremf(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 @remainderf(float %5, float %6)
ret float %7
}

LLVM IR (-O2):
define float @dremf(float %0, float %1) {
%3 = tail call float @remainderf(float %0, float %1)
ret float %3
}
int facttail(int n, int a) {
  if (n < 0)
    return 0;
  else if (n == 0)
    return 1;
  else if (n == 1)
    return a;
  else
    return facttail(n - 1, n * a);
}


x86 assembly (clang, -O0):
<facttail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1134 <facttail+0x24>
movl   $0x0,-0x4(%rbp)
jmp    1174 <facttail+0x64>
cmpl   $0x0,-0x8(%rbp)
jne    114a <facttail+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    1174 <facttail+0x64>
cmpl   $0x1,-0x8(%rbp)
jne    115f <facttail+0x4f>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1174 <facttail+0x64>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0x8(%rbp),%esi
imul   -0xc(%rbp),%esi
call   1030 <facttail@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<facttail>:
test   %edi,%edi
js     1125 <facttail+0x25>
mov    %esi,%eax
test   %edi,%edi
je     111f <facttail+0x1f>
nopw   0x0(%rax,%rax,1)
cmp    $0x1,%edi
je     1124 <facttail+0x24>
imul   %edi,%eax
add    $0xffffffff,%edi
test   %edi,%edi
jne    1110 <facttail+0x10>
mov    $0x1,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @facttail(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 = icmp slt i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 0, i32* %3
br label %25
9: ; preds = %2
%10 = load i32, i32* %4
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %9
store i32 1, i32* %3
br label %25
13: ; preds = %9
%14 = load i32, i32* %4
%15 = icmp eq i32 %14, 1
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = load i32, i32* %5
store i32 %17, i32* %3
br label %25
18: ; preds = %13
%19 = load i32, i32* %4
%20 = sub nsw i32 %19, 1
%21 = load i32, i32* %4
%22 = load i32, i32* %5
%23 = mul nsw i32 %21, %22
%24 = call i32 @facttail(i32 %20, i32 %23)
store i32 %24, i32* %3
br label %25
25: ; preds = %18, %16, %12, %8
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
define i32 @facttail(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, 0
br i1 %3, label %11, label %4
4: ; preds = %2, %7
%5 = phi i32 [ %9, %7 ], [ %1, %2 ]
%6 = phi i32 [ %8, %7 ], [ %0, %2 ]
switch i32 %6, label %7 [
i32 0, label %10
i32 1, label %11
]
7: ; preds = %4
%8 = add nsw i32 %6, -1
%9 = mul nsw i32 %5, %6
br label %4
10: ; preds = %4
br label %11
11: ; preds = %4, %10, %2
%12 = phi i32 [ 0, %2 ], [ 1, %10 ], [ %5, %4 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ lr_output_message(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ xstrcat(char *, char *);
Action() {
  char str[80];
  strcpy(str, "strings ");
  xstrcat(str, "have been ");
  xstrcat(str, "concatenated.");
  lr_output_message("result: %s", str);
  return 0;
}


x86 assembly (clang, -O0):
<Action>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x50(%rbp),%rdi
lea    0xebd(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x50(%rbp),%rdi
lea    0xeb6(%rip),%rsi
call   1040 <xstrcat@plt>
lea    -0x50(%rbp),%rdi
lea    0xeb1(%rip),%rsi
call   1040 <xstrcat@plt>
lea    -0x50(%rbp),%rsi
lea    0xeaf(%rip),%rdi
call   1050 <lr_output_message@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Action>:
push   %rbx
sub    $0x50,%rsp
lea    0xec4(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xebb(%rip),%rsi
mov    %rbx,%rdi
call   1040 <xstrcat@plt>
lea    0xeb7(%rip),%rsi
mov    %rbx,%rdi
call   1040 <xstrcat@plt>
lea    0xeb6(%rip),%rdi
mov    %rbx,%rsi
call   1050 <lr_output_message@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"strings \00"
@.str.1 = [11 x i8] c"have been \00"
@.str.2 = [14 x i8] c"concatenated.\00"
@.str.3 = [11 x i8] c"result: %s\00"
define i32 @Action() {
%1 = alloca [80 x i8]
%2 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%3 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%5 = call i32 @xstrcat(i8* %4, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%6 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%7 = call i32 @xstrcat(i8* %6, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%8 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%9 = call i32 @lr_output_message(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"strings \00"
@.str.1 = [11 x i8] c"have been \00"
@.str.2 = [14 x i8] c"concatenated.\00"
@.str.3 = [11 x i8] c"result: %s\00"
define i32 @Action() {
%1 = alloca [80 x i8]
%2 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%3 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @xstrcat(i8* %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @xstrcat(i8* %2, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @lr_output_message(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* %2)
ret i32 0
}
unsigned f8(unsigned x, int y) {
  unsigned a = (int)x + y;
  return x - a;
}


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

x86 assembly (clang, -O2):
<f8>:
mov    %esi,%eax
neg    %eax
ret

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

LLVM IR (-O2):
define i32 @f8(i32 %0, i32 %1) {
%3 = sub i32 0, %1
ret i32 %3
}
char *COM_SkipPath(char *pathname) {
  char *last;
  last = pathname;
  while (*pathname) {
    if (*pathname == '/' || *pathname == '\\')
      last = pathname + 1;
    pathname++;
  }
  return last;
}


x86 assembly (clang, -O0):
<COM_SkipPath>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     115a <COM_SkipPath+0x5a>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
je     113d <COM_SkipPath+0x3d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
jne    1149 <COM_SkipPath+0x49>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1110 <COM_SkipPath+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<COM_SkipPath>:
mov    %rdi,%rax
lea    0x1(%rdi),%rcx
jmp    1117 <COM_SkipPath+0x17>
nopl   0x0(%rax)
mov    %rcx,%rax
add    $0x1,%rcx
movzbl -0x1(%rcx),%edx
cmp    $0x2f,%dl
je     1110 <COM_SkipPath+0x10>
cmp    $0x5c,%dl
je     1110 <COM_SkipPath+0x10>
test   %dl,%dl
jne    1113 <COM_SkipPath+0x13>
ret

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

LLVM IR (-O2):
define i8* @COM_SkipPath(i8* %0) {
br label %2
2: ; preds = %8, %1
%3 = phi i8* [ %0, %1 ], [ %10, %8 ]
%4 = phi i8* [ %0, %1 ], [ %9, %8 ]
%5 = load i8, i8* %3
switch i8 %5, label %8 [
i8 0, label %11
i8 47, label %6
i8 92, label %6
]
6: ; preds = %2, %2
%7 = getelementptr inbounds i8, i8* %3, i64 1
br label %8
8: ; preds = %2, %6
%9 = phi i8* [ %7, %6 ], [ %4, %2 ]
%10 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
11: ; preds = %2
ret i8* %4
}
int check_rda_param(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @check_rda_param() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ pstr(char *);
int main(int argc, char **argv) {
  if (argc > 1) {
    pstr(argv[1]);
  } else {
    pstr("hello");
  }
  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)
cmpl   $0x1,-0x8(%rbp)
jle    1142 <main+0x32>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <pstr@plt>
jmp    114e <main+0x3e>
lea    0xeb7(%rip),%rdi
call   1030 <pstr@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jl     111c <main+0xc>
mov    0x8(%rsi),%rdi
jmp    1123 <main+0x13>
lea    0xedd(%rip),%rdi
call   1030 <pstr@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"hello\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp sgt i32 %6, 1
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @pstr(i8* %11)
br label %15
13: ; preds = %2
%14 = call i32 @pstr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %8
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"hello\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
br label %7
7: ; preds = %2, %4
%8 = phi i8* [ %6, %4 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), %2 ]
%9 = tail call i32 @pstr(i8* %8)
ret i32 0
}
void UsageFault_Handler(void) {
  for (;;) {
  }
}


x86 assembly (clang, -O0):
<UsageFault_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <UsageFault_Handler+0x9>
jmp    1109 <UsageFault_Handler+0x9>

x86 assembly (clang, -O2):
<UsageFault_Handler>:
jmp    1100 <UsageFault_Handler>

LLVM IR (-O0):
define void @UsageFault_Handler() {
br label %1
1: ; preds = %1, %0
br label %1
}

LLVM IR (-O2):
define void @UsageFault_Handler() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
scalar_t__ palindrome(int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int number;
  scanf("%d", &number);
  while (palindrome(number) != 0) {
    palindrome(number);
    number++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1030 <palindrome@plt>
cmp    $0x0,%rax
je     1167 <main+0x47>
mov    -0x8(%rbp),%edi
call   1030 <palindrome@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113f <main+0x1f>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
cs nopw 0x0(%rax,%rax,1)
call   1030 <palindrome@plt>
test   %rax,%rax
je     1160 <main+0x40>
mov    0x4(%rsp),%edi
call   1030 <palindrome@plt>
mov    0x4(%rsp),%edi
add    $0x1,%edi
mov    %edi,0x4(%rsp)
jmp    1140 <main+0x20>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i64 @palindrome(i32 %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %14, label %7
7: ; preds = %0, %7
%8 = load i32, i32* %1
%9 = call i64 @palindrome(i32 %8)
%10 = load i32, i32* %1
%11 = add nsw i32 %10, 1
store i32 %11, i32* %1
%12 = call i64 @palindrome(i32 %11)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %7
14: ; preds = %7, %0
ret i32 0
}
/* Type definitions */
struct cursor {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ blockput(int /*<<< orphan*/);
int /*<<< orphan*/ cursor_pop(struct cursor *);
void cursor_pop_blockput(struct cursor *cursor) {
  blockput(cursor_pop(cursor));
}


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

x86 assembly (clang, -O2):
<cursor_pop_blockput>:
push   %rax
call   1030 <cursor_pop@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <blockput@plt>

LLVM IR (-O0):
%struct.cursor = type { i32 }
define void @cursor_pop_blockput(%struct.cursor* %0) {
%2 = alloca %struct.cursor*
store %struct.cursor* %0, %struct.cursor** %2
%3 = load %struct.cursor*, %struct.cursor** %2
%4 = call i32 @cursor_pop(%struct.cursor* %3)
%5 = call i32 @blockput(i32 %4)
ret void
}

LLVM IR (-O2):
%struct.cursor = type { i32 }
define void @cursor_pop_blockput(%struct.cursor* %0) {
%2 = tail call i32 @cursor_pop(%struct.cursor* %0)
%3 = tail call i32 @blockput(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ emit_andimm(int, int, int);
int /*<<< orphan*/ emit_orreq_imm(int, int, int);
int /*<<< orphan*/ emit_testimm(int, int);
void emit_cmppz(int s, int sr) {
  emit_andimm(sr, ~1, sr);
  emit_testimm(s, 0x80000000);
  emit_orreq_imm(sr, 1, sr);
}


x86 assembly (clang, -O0):
<emit_cmppz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    $0xfffffffe,%esi
call   1050 <emit_andimm@plt>
mov    -0x4(%rbp),%edi
mov    $0x80000000,%esi
call   1030 <emit_testimm@plt>
mov    -0x8(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    $0x1,%esi
call   1040 <emit_orreq_imm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_cmppz>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %esi,%edi
mov    $0xfffffffe,%esi
mov    %ebx,%edx
call   1050 <emit_andimm@plt>
mov    %ebp,%edi
mov    $0x80000000,%esi
call   1030 <emit_testimm@plt>
mov    %ebx,%edi
mov    $0x1,%esi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <emit_orreq_imm@plt>

LLVM IR (-O0):
define void @emit_cmppz(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* %4
%7 = call i32 @emit_andimm(i32 %5, i32 -2, i32 %6)
%8 = load i32, i32* %3
%9 = call i32 @emit_testimm(i32 %8, i32 -2147483648)
%10 = load i32, i32* %4
%11 = load i32, i32* %4
%12 = call i32 @emit_orreq_imm(i32 %10, i32 1, i32 %11)
ret void
}

LLVM IR (-O2):
define void @emit_cmppz(i32 %0, i32 %1) {
%3 = tail call i32 @emit_andimm(i32 %1, i32 -2, i32 %1)
%4 = tail call i32 @emit_testimm(i32 %0, i32 -2147483648)
%5 = tail call i32 @emit_orreq_imm(i32 %1, i32 1, i32 %1)
ret void
}
/* Variables and functions */
int socket(int, int, int);
int inheritable_socket(int af, int style, int protocol) {
  return socket(af, style, protocol);
}


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

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

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

LLVM IR (-O2):
define i32 @inheritable_socket(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @socket(i32 %0, i32 %1, i32 %2)
ret i32 %4
}
unsigned xrop3_70_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = T & D;
  stk2 = S | stk3;
  stk1 = D ^ stk2;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_70_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
and    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_70_1_1>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
or     %ecx,%eax
or     %esi,%ecx
xor    $0xff,%ecx
not    %eax
and    %ecx,%eax
or     %edi,%esi
or     %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_70_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = or i32 %4, %5
%8 = xor i32 %7, 255
%9 = or i32 %6, %4
%10 = xor i32 %9, -1
%11 = and i32 %8, %10
%12 = or i8 %1, %0
%13 = zext i8 %12 to i32
%14 = or i32 %11, %13
ret i32 %14
}
void master_exit() { ("master_exit"); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"master_exit\00"
define void @master_exit() {
ret void
}

LLVM IR (-O2):
define void @master_exit() {
ret void
}
/* Type definitions */
struct pooled_fd {
  int dummy;
};

/* Variables and functions */
struct pooled_fd *fdpool_remove_tail();
int /*<<< orphan*/ fdpool_unpool(struct pooled_fd *);
void fdpool_evict(void) {
  struct pooled_fd *tail;
  tail = fdpool_remove_tail();
  fdpool_unpool(tail);
}


x86 assembly (clang, -O0):
<fdpool_evict>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <fdpool_remove_tail@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <fdpool_unpool@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdpool_evict>:
push   %rax
xor    %eax,%eax
call   1030 <fdpool_remove_tail@plt>
mov    %rax,%rdi
pop    %rax
jmp    1040 <fdpool_unpool@plt>

LLVM IR (-O0):
%struct.pooled_fd = type { i32 }
define void @fdpool_evict() {
%1 = alloca %struct.pooled_fd*
%2 = call %struct.pooled_fd* (...) @fdpool_remove_tail()
store %struct.pooled_fd* %2, %struct.pooled_fd** %1
%3 = load %struct.pooled_fd*, %struct.pooled_fd** %1
%4 = call i32 @fdpool_unpool(%struct.pooled_fd* %3)
ret void
}

LLVM IR (-O2):
%struct.pooled_fd = type { i32 }
define void @fdpool_evict() {
%1 = tail call %struct.pooled_fd* (...) @fdpool_remove_tail()
%2 = tail call i32 @fdpool_unpool(%struct.pooled_fd* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0xec() {
  Assert_real((iscntrl(236) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_iscntrl.c",
              1185, ("iscntrl should be 0 for 0xec"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0xec>:
push   %rax
mov    $0xec,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4a1,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xec\00"
define void @t_iscntrl_0xec() {
%1 = call i64 @iscntrl(i32 236)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1185, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xec\00"
define void @t_iscntrl_0xec() {
%1 = tail call i64 @iscntrl(i32 236)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1185, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int isinf(double);
int aa_isinf(double l) { return isinf(l); }


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

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

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

LLVM IR (-O2):
define i32 @aa_isinf(double %0) {
%2 = tail call i32 @isinf(double %0)
ret i32 %2
}