xunge/DecIR huggingface dataset:
/* Type definitions */
struct sysinfo {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ sysinfo(struct sysinfo *);
int main() {
  struct sysinfo si;
  sysinfo(&si);
  sysinfo((struct sysinfo *)-1);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    %rsp,%rdi
call   1030 <sysinfo@plt>
mov    $0xffffffffffffffff,%rdi
call   1030 <sysinfo@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.sysinfo = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.sysinfo
store i32 0, i32* %1
%3 = call i32 @sysinfo(%struct.sysinfo* %2)
%4 = call i32 @sysinfo(%struct.sysinfo* inttoptr (i64 -1 to %struct.sysinfo*))
ret i32 0
}

LLVM IR (-O2):
%struct.sysinfo = type { i32 }
define i32 @main() {
%1 = alloca %struct.sysinfo
%2 = bitcast %struct.sysinfo* %1 to i8*
%3 = call i32 @sysinfo(%struct.sysinfo* %1)
%4 = call i32 @sysinfo(%struct.sysinfo* inttoptr (i64 -1 to %struct.sysinfo*))
ret i32 0
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
unsigned long ReadCoreTimer();
void delay_us(uint32_t delay) {
  uint32_t startCnt = ReadCoreTimer();
  uint32_t waitCnt = delay * ((200000000UL) / 2000000);
  while ((ReadCoreTimer() - startCnt) < waitCnt) {
    ;
  }
}


x86 assembly (clang, -O0):
<delay_us>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <ReadCoreTimer@plt>
mov    %rax,-0x10(%rbp)
imul   $0x64,-0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <ReadCoreTimer@plt>
sub    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    114a <delay_us+0x3a>
jmp    1130 <delay_us+0x20>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay_us>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
xor    %eax,%eax
call   1030 <ReadCoreTimer@plt>
mov    %rax,%r15
imul   $0x64,%r14,%rbx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <ReadCoreTimer@plt>
sub    %r15,%rax
cmp    %rbx,%rax
jb     1130 <delay_us+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @delay_us(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %2
%5 = call i64 (...) @ReadCoreTimer()
store i64 %5, i64* %3
%6 = load i64, i64* %2
%7 = mul i64 %6, 100
store i64 %7, i64* %4
br label %8
8: ; preds = %14, %1
%9 = call i64 (...) @ReadCoreTimer()
%10 = load i64, i64* %3
%11 = sub i64 %9, %10
%12 = load i64, i64* %4
%13 = icmp ult i64 %11, %12
br i1 %13, label %14, label %15
14: ; preds = %8
br label %8
15: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @delay_us(i64 %0) {
%2 = tail call i64 (...) @ReadCoreTimer()
%3 = mul i64 %0, 100
br label %4
4: ; preds = %4, %1
%5 = tail call i64 (...) @ReadCoreTimer()
%6 = sub i64 %5, %2
%7 = icmp ult i64 %6, %3
br i1 %7, label %4, label %8
8: ; preds = %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_threaded_mainloop_stop() {
  printf("NOT IMPLEMENTED:"
         "pa_threaded_mainloop_stop"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [42 x i8] c"NOT IMPLEMENTED:pa_threaded_mainloop_stop\00"
define i32 @pa_threaded_mainloop_stop() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void RTVfsSymlinkSetTimes(void) {}


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

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

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

LLVM IR (-O2):
define void @RTVfsSymlinkSetTimes() {
ret void
}
int compare_pchars(void *first, void *second) {
  char *f = (char *)first;
  char *s = (char *)second;
  return (*f - *s);
}


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

x86 assembly (clang, -O2):
<compare_pchars>:
movsbl (%rdi),%eax
movsbl (%rsi),%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @compare_pchars(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = sext i8 %3 to i32
%5 = load i8, i8* %1
%6 = sext i8 %5 to i32
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main(void) {
  printf("% d\n% d\n", 547, -547);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x223,%esi
mov    $0xfffffddd,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"% d\0A% d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 547, i32 -547)
ret i32 0
}
int test_imm_99uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x99 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_99uint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x20,%rdx
and    $0x99,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_99uint64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 32
%6 = and i64 %5, 153
%7 = icmp ne i64 %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_99uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 657129996288
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ putc(int /*<<< orphan*/);
int prints(char *s) {
  while (*s)
    putc(*s++);
}


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

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

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

LLVM IR (-O2):
define i32 @prints(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @putc(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret i32 undef
}
int icmpdesc(const void *a, const void *b) {
  return (*(const int *)b - *(const int *)a);
}


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

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

LLVM IR (-O0):
define i32 @icmpdesc(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %3
%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 @icmpdesc(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %0 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
void RTTimeProgramMilliTS(void) {}


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

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

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

LLVM IR (-O2):
define void @RTTimeProgramMilliTS() {
ret void
}
int mlt_version_get_minor() { return 9; }


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

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

LLVM IR (-O0):
define i32 @mlt_version_get_minor() {
ret i32 9
}

LLVM IR (-O2):
define i32 @mlt_version_get_minor() {
ret i32 9
}
int udp_init() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @udp_init() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int get_total_energy_consumed(int /*<<< orphan*/, int, double *);
int /*<<< orphan*/ pp0_node_to_cpu(int /*<<< orphan*/);
int get_pp0_total_energy_consumed(uint64_t node,
                                  double *total_energy_consumed_joules) {
  uint64_t cpu = pp0_node_to_cpu(node);
  return get_total_energy_consumed(cpu, 0x639, total_energy_consumed_joules);
}


x86 assembly (clang, -O0):
<get_pp0_total_energy_consumed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <pp0_node_to_cpu@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    $0x639,%esi
call   1030 <get_total_energy_consumed@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_pp0_total_energy_consumed>:
push   %rbx
mov    %rsi,%rbx
call   1040 <pp0_node_to_cpu@plt>
mov    %eax,%edi
mov    $0x639,%esi
mov    %rbx,%rdx
pop    %rbx
jmp    1030 <get_total_energy_consumed@plt>

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

LLVM IR (-O2):
define i32 @get_pp0_total_energy_consumed(i32 %0, double* %1) {
%3 = tail call i32 @pp0_node_to_cpu(i32 %0)
%4 = tail call i32 @get_total_energy_consumed(i32 %3, i32 1593, double* %1)
ret i32 %4
}
int is_palindrome(long n) {
  long r, t = 0, n2 = n;
  while (n) {
    r = n % 10;
    t = t * 10 + r;
    n = n / 10;
  }
  return n2 == t;
}


x86 assembly (clang, -O0):
<is_palindrome>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1159 <is_palindrome+0x59>
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    %rdx,-0x10(%rbp)
imul   $0xa,-0x18(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    %rax,-0x8(%rbp)
jmp    1118 <is_palindrome+0x18>
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_palindrome>:
xor    %ecx,%ecx
test   %rdi,%rdi
je     1157 <is_palindrome+0x57>
movabs $0x6666666666666667,%r8
66 66 66
mov    %rdi,%rsi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    (%rcx,%rcx,4),%r9
mov    %rsi,%rax
imul   %r8
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x2,%rdx
add    %rax,%rdx
lea    (%rdx,%rdx,1),%rax
lea    (%rax,%rax,4),%rax
mov    %rsi,%rcx
sub    %rax,%rcx
lea    (%rcx,%r9,2),%rcx
add    $0x9,%rsi
cmp    $0x12,%rsi
mov    %rdx,%rsi
ja     1120 <is_palindrome+0x20>
xor    %eax,%eax
cmp    %rdi,%rcx
sete   %al
ret

LLVM IR (-O0):
define i32 @is_palindrome(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %2
store i64 0, i64* %4
%6 = load i64, i64* %2
store i64 %6, i64* %5
br label %7
7: ; preds = %10, %1
%8 = load i64, i64* %2
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %19
10: ; preds = %7
%11 = load i64, i64* %2
%12 = srem i64 %11, 10
store i64 %12, i64* %3
%13 = load i64, i64* %4
%14 = mul nsw i64 %13, 10
%15 = load i64, i64* %3
%16 = add nsw i64 %14, %15
store i64 %16, i64* %4
%17 = load i64, i64* %2
%18 = sdiv i64 %17, 10
store i64 %18, i64* %2
br label %7
19: ; preds = %7
%20 = load i64, i64* %5
%21 = load i64, i64* %4
%22 = icmp eq i64 %20, %21
%23 = zext i1 %22 to i32
ret i32 %23
}

LLVM IR (-O2):
define i32 @is_palindrome(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %12, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %9, %3 ], [ %0, %1 ]
%5 = phi i64 [ %8, %3 ], [ 0, %1 ]
%6 = srem i64 %4, 10
%7 = mul nsw i64 %5, 10
%8 = add nsw i64 %6, %7
%9 = sdiv i64 %4, 10
%10 = add i64 %4, 9
%11 = icmp ult i64 %10, 19
br i1 %11, label %12, label %3
12: ; preds = %3, %1
%13 = phi i64 [ 0, %1 ], [ %8, %3 ]
%14 = icmp eq i64 %13, %0
%15 = zext i1 %14 to i32
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMR9D_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

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

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

LLVM IR (-O2):
define void @U_WMR9D_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int mill_choose_wait();
int go_select_wait() { return mill_choose_wait(); }


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

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

LLVM IR (-O0):
define i32 @go_select_wait() {
%1 = call i32 (...) @mill_choose_wait()
ret i32 %1
}

LLVM IR (-O2):
define i32 @go_select_wait() {
%1 = tail call i32 (...) @mill_choose_wait()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0xf0() {
  Assert_real((isprint(240) == 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_isprint.c",
              1205, ("isprint should be 0 for 0xf0"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0xf0>:
push   %rax
mov    $0xf0,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4b5,%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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xf0\00"
define void @t_isprint_0xf0() {
%1 = call i64 @isprint(i32 240)
%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 1205, 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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xf0\00"
define void @t_isprint_0xf0() {
%1 = tail call i64 @isprint(i32 240)
%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 1205, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void inverso(int *vetor, int s) {
  int i = 0;
  for (i = s - 1; i >= 0; i--) {
    printf("%d ", vetor[i]);
  }
}


x86 assembly (clang, -O0):
<inverso>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     115e <inverso+0x4e>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    112f <inverso+0x1f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inverso>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1149 <inverso+0x39>
mov    %rdi,%r15
mov    %esi,%ebx
add    $0x1,%rbx
lea    0xed7(%rip),%r14
nopl   0x0(%rax)
lea    -0x2(%rbx),%eax
mov    (%r15,%rax,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0xffffffffffffffff,%rbx
cmp    $0x1,%rbx
ja     1130 <inverso+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
define void @inverso(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
%6 = load i32, i32* %4
%7 = sub nsw i32 %6, 1
store i32 %7, i32* %5
br label %8
8: ; preds = %18, %2
%9 = load i32, i32* %5
%10 = icmp sge i32 %9, 0
br i1 %10, label %11, label %21
11: ; preds = %8
%12 = load i32*, i32** %3
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
%16 = load i32, i32* %15
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %11
%19 = load i32, i32* %5
%20 = add nsw i32 %19, -1
store i32 %20, i32* %5
br label %8
21: ; preds = %8
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @inverso(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ %5, %4 ], [ %8, %6 ]
%8 = add nsw i64 %7, -1
%9 = and i64 %8, 4294967295
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = icmp ugt i64 %7, 1
br i1 %13, label %6, label %14
14: ; preds = %6, %2
ret void
}
int get_fpu_trap_exceptions(void) {
  int res = 0;
  return res;
}


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

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

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

LLVM IR (-O2):
define i32 @get_fpu_trap_exceptions() {
ret i32 0
}
unsigned long HWBISTResultGet(void) {
  return (*((volatile unsigned long *)(0x400FBB00 + 0x00000040)));
}


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

x86 assembly (clang, -O2):
<HWBISTResultGet>:
mov    0x400fbb40,%rax
40
ret

LLVM IR (-O0):
define i64 @HWBISTResultGet() {
%1 = load volatile i64, i64* inttoptr (i64 1074772800 to i64*)
ret i64 %1
}

LLVM IR (-O2):
define i64 @HWBISTResultGet() {
%1 = load volatile i64, i64* inttoptr (i64 1074772800 to i64*)
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ __console_tx_hex8(unsigned char);
void print_info_hex8(unsigned char value) { __console_tx_hex8(value); }


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

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

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

LLVM IR (-O2):
define void @print_info_hex8(i8 zeroext %0) {
%2 = tail call i32 @__console_tx_hex8(i8 zeroext %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
scalar_t__ remove(char *);
void deletefile() {
  if (remove("Changelog.txt") == 0)
    printf("%s file deleted.\n", "Changelog.txt");
  else
    printf("Unable to delete the file: %s.\n", "Changelog.txt");
}


x86 assembly (clang, -O0):
<deletefile>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <remove@plt>
cmp    $0x0,%rax
jne    1152 <deletefile+0x32>
lea    0xecd(%rip),%rdi
lea    0xeb8(%rip),%rsi
call   1040 <printf@plt>
jmp    1165 <deletefile+0x45>
lea    0xec7(%rip),%rdi
lea    0xea0(%rip),%rsi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<deletefile>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <remove@plt>
test   %rax,%rax
lea    0xed4(%rip),%rax
lea    0xedf(%rip),%rdi
cmove  %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"Changelog.txt\00"
@.str.1 = [18 x i8] c"%s file deleted.\0A\00"
@.str.2 = [32 x i8] c"Unable to delete the file: %s.\0A\00"
define void @deletefile() {
%1 = call i64 @remove(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %7
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"Changelog.txt\00"
@.str.1 = [18 x i8] c"%s file deleted.\0A\00"
@.str.2 = [32 x i8] c"Unable to delete the file: %s.\0A\00"
define void @deletefile() {
%1 = tail call i64 @remove(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0)
%4 = tail call i32 @printf(i8* %3, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
int ft_stronly(char *str, int (*fn)(int c)) {
  int i;
  i = 0;
  while (str[i] != '\0') {
    if (!fn(str[i]))
      return (0);
    ++i;
  }
  return (1);
}


x86 assembly (clang, -O0):
<ft_stronly>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1161 <ft_stronly+0x61>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
movslq -0x1c(%rbp),%rdx
movsbl (%rcx,%rdx,1),%edi
call   *%rax
cmp    $0x0,%eax
jne    1153 <ft_stronly+0x53>
movl   $0x0,-0x4(%rbp)
jmp    1168 <ft_stronly+0x68>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1117 <ft_stronly+0x17>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_stronly>:
push   %rbp
push   %r14
push   %rbx
mov    (%rdi),%al
mov    $0x1,%r14d
test   %al,%al
je     113a <ft_stronly+0x3a>
mov    %rsi,%rbx
mov    %rdi,%rbp
add    $0x1,%rbp
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   *%rbx
test   %eax,%eax
je     1137 <ft_stronly+0x37>
movzbl 0x0(%rbp),%eax
add    $0x1,%rbp
test   %al,%al
jne    1120 <ft_stronly+0x20>
jmp    113a <ft_stronly+0x3a>
xor    %r14d,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @ft_stronly(i8* nocapture %0, i32 (i32)* nocapture %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %9
5: ; preds = %9
%6 = getelementptr inbounds i8, i8* %0, i64 %15
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %16, label %9
9: ; preds = %2, %5
%10 = phi i64 [ %15, %5 ], [ 0, %2 ]
%11 = phi i8 [ %7, %5 ], [ %3, %2 ]
%12 = sext i8 %11 to i32
%13 = tail call i32 %1(i32 %12)
%14 = icmp eq i32 %13, 0
%15 = add nuw i64 %10, 1
br i1 %14, label %16, label %5
16: ; preds = %9, %5, %2
%17 = phi i32 [ 1, %2 ], [ 1, %5 ], [ 0, %9 ]
ret i32 %17
}
__attribute__((__visibility__("default"))) int GetLibKmsVersion() {
  return 0x40000;
}


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

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

LLVM IR (-O0):
define i32 @GetLibKmsVersion() {
ret i32 262144
}

LLVM IR (-O2):
define i32 @GetLibKmsVersion() {
ret i32 262144
}
int network_shutdown() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @network_shutdown() {
ret i32 0
}
/* Type definitions */
typedef int __m128i;

/* Variables and functions */
__m128i __attribute__((__always___, __nodebug__))
_mm_andnot_si128(__m128i a, __m128i b) {
  return ~a & b;
}


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

x86 assembly (clang, -O2):
<_mm_andnot_si128>:
mov    %edi,%eax
not    %eax
and    %esi,%eax
ret

LLVM IR (-O0):
define i32 @_mm_andnot_si128(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 = xor i32 %5, -1
%7 = load i32, i32* %4
%8 = and i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @_mm_andnot_si128(i32 %0, i32 %1) {
%3 = xor i32 %0, -1
%4 = and i32 %3, %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
char *strstr(char const *, char const *);
int main() {
  const char haystack[20] = "TutorialsPoint";
  const char needle[10] = "Point";
  char *ret;
  ret = strstr(haystack, needle);
  *ret = '\0';
  printf("The substring is: %s\n", haystack);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec5(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xebf(%rip),%rax
mov    %rax,-0x2a(%rbp)
mov    0xebc(%rip),%ax
mov    %ax,-0x22(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x2a(%rbp),%rsi
call   1040 <strstr@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
movb   $0x0,(%rax)
lea    -0x20(%rbp),%rsi
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movaps 0xed4(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x0,0x10(%rsp)
lea    0xed5(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <strstr@plt>
movb   $0x0,(%rax)
lea    0xeca(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.haystack = [20 x i8] c"TutorialsPoint\00\00\00\00\00\00"
@__const.main.needle = [10 x i8] c"Point\00\00\00\00\00"
@.str = [22 x i8] c"The substring is: %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i8]
%3 = alloca [10 x i8]
%4 = alloca i8*
store i32 0, i32* %1
%5 = bitcast [20 x i8]* %2 to i8*
%6 = bitcast [10 x i8]* %3 to i8*
%7 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%8 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%9 = call i8* @strstr(i8* %7, i8* %8)
store i8* %9, i8** %4
%10 = load i8*, i8** %4
store i8 0, i8* %10
%11 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%12 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %11)
ret i32 0
}

LLVM IR (-O2):
@__const.main.haystack = [20 x i8] c"TutorialsPoint\00\00\00\00\00\00"
@__const.main.needle = [10 x i8] c"Point\00\00\00\00\00"
@.str = [22 x i8] c"The substring is: %s\0A\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = call i8* @strstr(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @__const.main.needle, i64 0, i64 0))
store i8 0, i8* %3
%4 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ hardwaremarkovcurry();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello world\n");
  printf("hardwaremarkovcurry\n");
  hardwaremarkovcurry();
  return (0);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1030 <hardwaremarkovcurry@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [12 x i8] c"Hello world\00"
@str.2 = [20 x i8] c"hardwaremarkovcurry\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.2, i64 0, i64 0))
%3 = tail call i32 (...) @hardwaremarkovcurry()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int main(void) {
  float result = (3.31e-8 * 2.01e-7) / (7.16e-6 + 2.01e-8);
  printf("(3.31e-8 * 2.01e-7)/(7.16e-6 + 2.01e-8) = %e\n", result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xed9(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeec(%rip),%rdi
movss  0xee0(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [46 x i8] c"(3.31e-8 * 2.01e-7)/(7.16e-6 + 2.01e-8) = %e\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
store float 0x3E0FD67BC0000000, float* %2
%3 = load float, float* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), float %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [46 x i8] c"(3.31e-8 * 2.01e-7)/(7.16e-6 + 2.01e-8) = %e\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), float 0x3E0FD67BC0000000)
ret i32 0
}
/* Variables and functions */
scalar_t__ pow(double, double);
int optimal_nside(double lb, double rmax, long np) {
  int nside1 = (int)(8.0 * lb / rmax);
  int nside2 = (int)(pow(0.5 * np, 0.3333333));
  return (((nside1) < (nside2)) ? (nside1) : (nside2));
}


x86 assembly (clang, -O0):
<optimal_nside>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
movsd  0xee2(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x1c(%rbp)
cvtsi2sdq -0x18(%rbp),%xmm1
movsd  0xebb(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xea7(%rip),%xmm1
call   1030 <pow@plt>
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1178 <optimal_nside+0x68>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x24(%rbp)
jmp    117e <optimal_nside+0x6e>
mov    -0x20(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<optimal_nside>:
push   %rbx
mulsd  0xee7(%rip),%xmm0
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%ebx
xorps  %xmm0,%xmm0
cvtsi2sd %rdi,%xmm0
mulsd  0xed7(%rip),%xmm0
movsd  0xed7(%rip),%xmm1
call   1030 <pow@plt>
cmp    %eax,%ebx
cmovl  %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @optimal_nside(double %0, double %1, i64 %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca i64
%7 = alloca i32
%8 = alloca i32
store double %0, double* %4
store double %1, double* %5
store i64 %2, i64* %6
%9 = load double, double* %4
%10 = fmul double 8.000000e+00, %9
%11 = load double, double* %5
%12 = fdiv double %10, %11
%13 = fptosi double %12 to i32
store i32 %13, i32* %7
%14 = load i64, i64* %6
%15 = sitofp i64 %14 to double
%16 = fmul double 5.000000e-01, %15
%17 = call i64 @pow(double %16, double 0x3FD55555318ABC87)
%18 = trunc i64 %17 to i32
store i32 %18, i32* %8
%19 = load i32, i32* %7
%20 = load i32, i32* %8
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %24
22: ; preds = %3
%23 = load i32, i32* %7
br label %26
24: ; preds = %3
%25 = load i32, i32* %8
br label %26
26: ; preds = %24, %22
%27 = phi i32 [ %23, %22 ], [ %25, %24 ]
ret i32 %27
}

LLVM IR (-O2):
define i32 @optimal_nside(double %0, double %1, i64 %2) {
%4 = fmul double %0, 8.000000e+00
%5 = fdiv double %4, %1
%6 = fptosi double %5 to i32
%7 = sitofp i64 %2 to double
%8 = fmul double %7, 5.000000e-01
%9 = tail call i64 @pow(double %8, double 0x3FD55555318ABC87)
%10 = trunc i64 %9 to i32
%11 = icmp slt i32 %6, %10
%12 = select i1 %11, i32 %6, i32 %10
ret i32 %12
}
int ft_isalpha(int c) {
  int mincl;
  int maxcl;
  int min;
  int max;
  min = 'a';
  max = 'z';
  mincl = 'A';
  maxcl = 'Z';
  if ((c >= min && c <= max) || (c >= mincl && c <= maxcl))
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<ft_isalpha>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x61,-0x14(%rbp)
movl   $0x7a,-0x18(%rbp)
movl   $0x41,-0xc(%rbp)
movl   $0x5a,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
jl     113b <ft_isalpha+0x3b>
mov    -0x8(%rbp),%eax
cmp    -0x18(%rbp),%eax
jle    1153 <ft_isalpha+0x53>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     115f <ft_isalpha+0x5f>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     115f <ft_isalpha+0x5f>
movl   $0x1,-0x4(%rbp)
jmp    1166 <ft_isalpha+0x66>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isalpha>:
and    $0xffffffdf,%edi
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @ft_isalpha(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store i32 97, i32* %6
store i32 122, i32* %7
store i32 65, i32* %4
store i32 90, i32* %5
%8 = load i32, i32* %3
%9 = load i32, i32* %6
%10 = icmp sge i32 %8, %9
br i1 %10, label %11, label %15
11: ; preds = %1
%12 = load i32, i32* %3
%13 = load i32, i32* %7
%14 = icmp sle i32 %12, %13
br i1 %14, label %23, label %15
15: ; preds = %11, %1
%16 = load i32, i32* %3
%17 = load i32, i32* %4
%18 = icmp sge i32 %16, %17
br i1 %18, label %19, label %24
19: ; preds = %15
%20 = load i32, i32* %3
%21 = load i32, i32* %5
%22 = icmp sle i32 %20, %21
br i1 %22, label %23, label %24
23: ; preds = %19, %11
store i32 1, i32* %2
br label %25
24: ; preds = %19, %15
store i32 0, i32* %2
br label %25
25: ; preds = %24, %23
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @ft_isalpha(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int do_protectedmain();
int /*<<< orphan*/ lua_closestring();
int /*<<< orphan*/ lua_openstring(char *);
int lua_dostring(char *string) {
  int status;
  lua_openstring(string);
  status = do_protectedmain();
  lua_closestring();
  return status;
}


x86 assembly (clang, -O0):
<lua_dostring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <lua_openstring@plt>
mov    $0x0,%al
call   1050 <do_protectedmain@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <lua_closestring@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lua_dostring>:
push   %rbx
call   1040 <lua_openstring@plt>
xor    %eax,%eax
call   1050 <do_protectedmain@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <lua_closestring@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @lua_dostring(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @lua_openstring(i8* %4)
%6 = call i32 (...) @do_protectedmain()
store i32 %6, i32* %3
%7 = call i32 (...) @lua_closestring()
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @lua_dostring(i8* %0) {
%2 = tail call i32 @lua_openstring(i8* %0)
%3 = tail call i32 (...) @do_protectedmain()
%4 = tail call i32 (...) @lua_closestring()
ret i32 %3
}
void destroyStringArray(char **strArr, int len) {
  int i;
  for (i = 0; i < len; i++) {
    free(*(strArr + i));
  }
  free(strArr);
}


x86 assembly (clang, -O0):
<destroyStringArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <destroyStringArray+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <destroyStringArray+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<destroyStringArray>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <destroyStringArray+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <destroyStringArray+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @destroyStringArray(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
%5 = alloca i32
store i8** %0, i8*** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %16, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %19
10: ; preds = %6
%11 = load i8**, i8*** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8*, i8** %11, i64 %13
%15 = load i8*, i8** %14
br label %16
16: ; preds = %10
%17 = load i32, i32* %5
%18 = add nsw i32 %17, 1
store i32 %18, i32* %5
br label %6
19: ; preds = %6
%20 = load i8**, i8*** %3
%21 = bitcast i8** %20 to i8*
ret void
}

LLVM IR (-O2):
define void @destroyStringArray(i8** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %10, %6 ]
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
tail call void @free(i8* %9)
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %2
%13 = bitcast i8** %0 to i8*
tail call void @free(i8* %13)
ret void
}
/* Variables and functions */
bool test_vdp() { return true; }


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

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

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

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


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"bar is called\00"
define i32 @bar() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void tab_to_space(char *text) {
  while (*text != 0) {
    if (*text == '\t')
      *text = ' ';
    text++;
  }
}


x86 assembly (clang, -O0):
<tab_to_space>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1140 <tab_to_space+0x40>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
jne    112f <tab_to_space+0x2f>
mov    -0x8(%rbp),%rax
movb   $0x20,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <tab_to_space+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tab_to_space>:
jmp    1117 <tab_to_space+0x17>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movb   $0x20,(%rdi)
add    $0x1,%rdi
movzbl (%rdi),%eax
cmp    $0x9,%al
je     1110 <tab_to_space+0x10>
test   %al,%al
jne    1113 <tab_to_space+0x13>
ret

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

LLVM IR (-O2):
define void @tab_to_space(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
switch i8 %4, label %6 [
i8 0, label %8
i8 9, label %5
]
5: ; preds = %2
store i8 32, i8* %3
br label %6
6: ; preds = %2, %5
%7 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
8: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_mem(size_t, int);
scalar_t__ s_len(char *);
char *s_let(char *, int /*<<< orphan*/);
char *new_str(char *s) {
  if (s == NULL)
    return (NULL);
  return (s_let(s, get_mem((size_t)(s_len(s) + 2), sizeof(char))));
}


x86 assembly (clang, -O0):
<new_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <new_str+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1185 <new_str+0x55>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <s_len@plt>
mov    %rax,%rdi
add    $0x2,%rdi
mov    $0x1,%esi
call   1050 <get_mem@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1040 <s_let@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<new_str>:
test   %rdi,%rdi
je     1157 <new_str+0x27>
push   %rbx
mov    %rdi,%rbx
call   1030 <s_len@plt>
lea    0x2(%rax),%rdi
mov    $0x1,%esi
call   1050 <get_mem@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <s_let@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @new_str(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %7
6: ; preds = %1
store i8* null, i8** %2
br label %14
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = load i8*, i8** %3
%10 = call i64 @s_len(i8* %9)
%11 = add nsw i64 %10, 2
%12 = call i32 @get_mem(i64 %11, i32 1)
%13 = call i8* @s_let(i8* %8, i32 %12)
store i8* %13, i8** %2
br label %14
14: ; preds = %7, %6
%15 = load i8*, i8** %2
ret i8* %15
}

LLVM IR (-O2):
define i8* @new_str(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i64 @s_len(i8* %0)
%5 = add nsw i64 %4, 2
%6 = tail call i32 @get_mem(i64 %5, i32 1)
%7 = tail call i8* @s_let(i8* %0, i32 %6)
br label %8
8: ; preds = %1, %3
%9 = phi i8* [ %7, %3 ], [ null, %1 ]
ret i8* %9
}