xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a = 100;
  int b = 25;
  if (a > b) {
    printf("The higher value is %d\n", a);
  } else
    printf("The higher value is %d\n", b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x64,-0x8(%rbp)
movl   $0x19,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    114d <main+0x3d>
mov    -0x8(%rbp),%esi
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
jmp    115c <main+0x4c>
mov    -0xc(%rbp),%esi
lea    0xea9(%rip),%rdi
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    $0x64,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [24 x i8] c"The higher value is %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 100)
ret i32 0
}
/* Variables and functions */
unsigned int volatile time(int /*<<< orphan*/ *);
volatile unsigned int _time_counter(void) { return time(NULL); }


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

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

LLVM IR (-O0):
define i32 @_time_counter() {
%1 = call i32 @time(i32* null)
ret i32 %1
}

LLVM IR (-O2):
define i32 @_time_counter() {
%1 = tail call i32 @time(i32* null)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void free_int_vector(int *v) { free((char *)v); }


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

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

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

LLVM IR (-O2):
define void @free_int_vector(i32* nocapture %0) {
%2 = bitcast i32* %0 to i8*
%3 = tail call i32 @free(i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ rtems_bsp_delay(int);
void bsp_smp_wait_for(volatile unsigned int *address, unsigned int desired,
                      int maximum_usecs) {
  int iterations;
  volatile unsigned int *p = address;
  for (iterations = 0; iterations < maximum_usecs; iterations++) {
    if (*p == desired)
      break;
    rtems_bsp_delay(1);
  }
}


x86 assembly (clang, -O0):
<bsp_smp_wait_for>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1169 <bsp_smp_wait_for+0x59>
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
cmp    -0xc(%rbp),%eax
jne    1151 <bsp_smp_wait_for+0x41>
jmp    1169 <bsp_smp_wait_for+0x59>
mov    $0x1,%edi
call   1030 <rtems_bsp_delay@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1131 <bsp_smp_wait_for+0x21>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bsp_smp_wait_for>:
push   %rbp
push   %r14
push   %rbx
test   %edx,%edx
jle    1137 <bsp_smp_wait_for+0x27>
mov    %edx,%ebx
mov    %esi,%r14d
mov    %rdi,%rbp
mov    0x0(%rbp),%eax
cmp    %r14d,%eax
je     1137 <bsp_smp_wait_for+0x27>
mov    $0x1,%edi
call   1030 <rtems_bsp_delay@plt>
add    $0xffffffff,%ebx
jne    1120 <bsp_smp_wait_for+0x10>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @bsp_smp_wait_for(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32*, i32** %4
store i32* %9, i32** %8
store i32 0, i32* %7
br label %10
10: ; preds = %22, %3
%11 = load i32, i32* %7
%12 = load i32, i32* %6
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %25
14: ; preds = %10
%15 = load i32*, i32** %8
%16 = load volatile i32, i32* %15
%17 = load i32, i32* %5
%18 = icmp eq i32 %16, %17
br i1 %18, label %19, label %20
19: ; preds = %14
br label %25
20: ; preds = %14
%21 = call i32 @rtems_bsp_delay(i32 1)
br label %22
22: ; preds = %20
%23 = load i32, i32* %7
%24 = add nsw i32 %23, 1
store i32 %24, i32* %7
br label %10
25: ; preds = %19, %10
ret void
}

LLVM IR (-O2):
define void @bsp_smp_wait_for(i32* %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %13
5: ; preds = %3, %9
%6 = phi i32 [ %11, %9 ], [ 0, %3 ]
%7 = load volatile i32, i32* %0
%8 = icmp eq i32 %7, %1
br i1 %8, label %13, label %9
9: ; preds = %5
%10 = tail call i32 @rtems_bsp_delay(i32 1)
%11 = add nuw nsw i32 %6, 1
%12 = icmp eq i32 %11, %2
br i1 %12, label %13, label %5
13: ; preds = %9, %5, %3
ret void
}
OP(fd, f4) {
  illegal_1();
  op_f4();
}


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <illegal_1@plt>
mov    $0x0,%al
call   1040 <op_f4@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OP>:
push   %rax
xor    %eax,%eax
call   1030 <illegal_1@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <op_f4@plt>

LLVM IR (-O0):
define i32 @OP(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 (...) @illegal_1()
%7 = call i32 (...) @op_f4()
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_1()
%4 = tail call i32 (...) @op_f4()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ kill_this_task();
void drop(void) { kill_this_task(); }


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

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

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

LLVM IR (-O2):
define void @drop() {
%1 = tail call i32 (...) @kill_this_task()
ret void
}
int _strlen_recursion(char *s) {
  if (*s == '\0')
    return (0);
  return (_strlen_recursion(s + 1) + 1);
}


x86 assembly (clang, -O0):
<_strlen_recursion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1138 <_strlen_recursion+0x28>
movl   $0x0,-0x4(%rbp)
jmp    114b <_strlen_recursion+0x3b>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1030 <_strlen_recursion@plt>
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_strlen_recursion>:
cmpb   $0x0,(%rdi)
je     111c <_strlen_recursion+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <_strlen_recursion+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @_strlen_recursion(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %7, %4 ], [ %0, %1 ]
%6 = phi i32 [ %8, %4 ], [ 0, %1 ]
%7 = getelementptr inbounds i8, i8* %5, i64 1
%8 = add nuw nsw i32 %6, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
int wtermsig(int stat_val) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @wtermsig(i32 %0) {
ret i32 -1
}
void remove(void) { __asm__ __volatile__("" : : : "memory"); }


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

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

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

LLVM IR (-O2):
define void @remove() {
tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
scalar_t__ check_for_hvm();
int main(void) {
  if (check_for_hvm())
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <check_for_hvm@plt>
cmp    $0x0,%rax
je     113c <main+0x2c>
movl   $0x0,-0x4(%rbp)
jmp    1143 <main+0x33>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @check_for_hvm()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 0, i32* %1
br label %6
5: ; preds = %0
store i32 1, i32* %1
br label %6
6: ; preds = %5, %4
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @check_for_hvm()
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
float M_PI;
double sin(double);
double cos(double angle) { return sin(angle + M_PI * 0.5f); }


x86 assembly (clang, -O0):
<cos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movss  0xed6(%rip),%xmm1
mov    0x2eb7(%rip),%rax
mulss  (%rax),%xmm1
cvtss2sd %xmm1,%xmm1
addsd  %xmm1,%xmm0
call   1030 <sin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cos>:
mov    0x2ed1(%rip),%rax
movss  (%rax),%xmm1
mulss  0xedd(%rip),%xmm1
cvtss2sd %xmm1,%xmm1
addsd  %xmm1,%xmm0
jmp    1030 <sin@plt>

LLVM IR (-O0):
@M_PI = global float 0.000000e+00
define double @cos(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load float, float* @M_PI
%5 = fmul float %4, 5.000000e-01
%6 = fpext float %5 to double
%7 = fadd double %3, %6
%8 = call double @sin(double %7)
ret double %8
}

LLVM IR (-O2):
@M_PI = global float 0.000000e+00
define double @cos(double %0) {
%2 = load float, float* @M_PI
%3 = fmul float %2, 5.000000e-01
%4 = fpext float %3 to double
%5 = fadd double %4, %0
%6 = tail call double @sin(double %5)
ret double %6
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
int64_t min_int64(int64_t a, int64_t b) {
  if (a < b)
    return a;
  else
    return b;
}


x86 assembly (clang, -O0):
<min_int64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    1127 <min_int64+0x27>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    112f <min_int64+0x2f>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min_int64>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovl  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @min_int64(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t apic_prepare_ipi_sipi(uint8_t vector) {
  return 0 | (1 << 14) | (6 << 8) | vector;
}


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

x86 assembly (clang, -O2):
<apic_prepare_ipi_sipi>:
mov    %edi,%eax
or     $0x4600,%eax
ret

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

LLVM IR (-O2):
define i32 @apic_prepare_ipi_sipi(i32 %0) {
%2 = or i32 %0, 17920
ret i32 %2
}
/* Variables and functions */
int f(int);
int g(int);
int h(int n) {
  if (n % 2 == 0)
    return f(n);
  else
    return g(n);
}


x86 assembly (clang, -O0):
<h>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    114f <h+0x2f>
mov    -0x8(%rbp),%edi
call   1030 <f@plt>
mov    %eax,-0x4(%rbp)
jmp    115a <h+0x3a>
mov    -0x8(%rbp),%edi
call   1040 <g@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h>:
test   $0x1,%dil
jne    112b <h+0xb>
jmp    1030 <f@plt>
jmp    1040 <g@plt>

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

LLVM IR (-O2):
define i32 @h(i32 %0) {
%2 = and i32 %0, 1
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @f(i32 %0)
br label %8
6: ; preds = %1
%7 = tail call i32 @g(i32 %0)
br label %8
8: ; preds = %6, %4
%9 = phi i32 [ %5, %4 ], [ %7, %6 ]
ret i32 %9
}
int test_imm_08int64_midword_reg(long long val) {
  return ((val >> 16) & (0x08 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_08int64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x10,%rdx
and    $0x8,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_08int64_midword_reg>:
test   $0x80000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_08int64_midword_reg(i64 %0) {
%2 = and i64 %0, 524288
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void KillServerByName(char *path) {
#pragma error KillServerByName not implemented
}


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

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

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

LLVM IR (-O2):
define void @KillServerByName(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xcc() {
  Assert_real((isxdigit(204) == 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_isxdigit.c",
              1025, ("isxdigit should be 0 for 0xcc"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0xcc>:
push   %rax
mov    $0xcc,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x401,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xcc\00"
define void @t_isxdigit_0xcc() {
%1 = call i64 @isxdigit(i32 204)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1025, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xcc\00"
define void @t_isxdigit_0xcc() {
%1 = tail call i64 @isxdigit(i32 204)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1025, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CRYPTO_cleanup_all_ex_data();
int deinit_openssl() {
  CRYPTO_cleanup_all_ex_data();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @deinit_openssl() {
%1 = call i32 (...) @CRYPTO_cleanup_all_ex_data()
ret i32 0
}

LLVM IR (-O2):
define i32 @deinit_openssl() {
%1 = tail call i32 (...) @CRYPTO_cleanup_all_ex_data()
ret i32 0
}
/* Variables and functions */
double M_PI;
double get_double(char const *);
double get_angle(const char *v, const char *u) {
  return get_double(v) * M_PI / 180.0;
}


x86 assembly (clang, -O0):
<get_angle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <get_double@plt>
mov    0x2eb8(%rip),%rax
mulsd  (%rax),%xmm0
movsd  0xec4(%rip),%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_angle>:
push   %rax
call   1030 <get_double@plt>
mov    0x2ecb(%rip),%rax
mulsd  (%rax),%xmm0
divsd  0xed7(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @get_angle(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = call double @get_double(i8* %5)
%7 = load double, double* @M_PI
%8 = fmul double %6, %7
%9 = fdiv double %8, 1.800000e+02
ret double %9
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @get_angle(i8* %0, i8* nocapture readnone %1) {
%3 = tail call double @get_double(i8* %0)
%4 = load double, double* @M_PI
%5 = fmul double %3, %4
%6 = fdiv double %5, 1.800000e+02
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ MPI_Finalize();
int /*<<< orphan*/ MPI_Init(int, char **);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  MPI_Init(argc, argv);
  printf("it works!\n");
  MPI_Finalize();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <MPI_Init@plt>
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <MPI_Finalize@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [11 x i8] c"it works!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = load i8**, i8*** %4
%7 = call i32 @MPI_Init(i32 %5, i8** %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (...) @MPI_Finalize()
ret i32 0
}

LLVM IR (-O2):
@str = [10 x i8] c"it works!\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @MPI_Init(i32 %0, i8** %1)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 (...) @MPI_Finalize()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ dvr_close_files();
int dvr_open_rw_files();
int /*<<< orphan*/ printf(char *);
int dvr_write_schedule() {
  int ret;
  ret = dvr_open_rw_files();
  printf("TODO");
  dvr_close_files();
  return (ret);
}


x86 assembly (clang, -O0):
<dvr_write_schedule>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <dvr_open_rw_files@plt>
mov    %eax,-0x4(%rbp)
lea    0xeb7(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <dvr_close_files@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dvr_write_schedule>:
push   %rbx
xor    %eax,%eax
call   1050 <dvr_open_rw_files@plt>
mov    %eax,%ebx
lea    0xebf(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <dvr_close_files@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"TODO\00"
define i32 @dvr_write_schedule() {
%1 = alloca i32
%2 = call i32 (...) @dvr_open_rw_files()
store i32 %2, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @dvr_close_files()
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
@.str = [5 x i8] c"TODO\00"
define i32 @dvr_write_schedule() {
%1 = tail call i32 (...) @dvr_open_rw_files()
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @dvr_close_files()
ret i32 %1
}
void timer_start(unsigned int period) {}


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

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

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

LLVM IR (-O2):
define void @timer_start(i32 %0) {
ret void
}
int return_chars_until_chr(const unsigned char *src,
                           const unsigned char breakpoint) {
  const unsigned char *rpos = src;
  int charslen = 0;
  while (*rpos != '\0') {
    charslen++;
    if (*(rpos++) == breakpoint)
      return (charslen);
  }
  return (charslen);
}


x86 assembly (clang, -O0):
<return_chars_until_chr>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x20(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x0,%eax
je     1164 <return_chars_until_chr+0x64>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
movzbl (%rax),%eax
movzbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    115f <return_chars_until_chr+0x5f>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    116a <return_chars_until_chr+0x6a>
jmp    111d <return_chars_until_chr+0x1d>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<return_chars_until_chr>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rax,1),%ecx
test   %cl,%cl
je     1121 <return_chars_until_chr+0x21>
add    $0x1,%rax
cmp    %sil,%cl
jne    1110 <return_chars_until_chr+0x10>
ret

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

LLVM IR (-O2):
define i32 @return_chars_until_chr(i8* nocapture %0, i8 zeroext %1) {
br label %3
3: ; preds = %8, %2
%4 = phi i8* [ %0, %2 ], [ %10, %8 ]
%5 = phi i32 [ 0, %2 ], [ %9, %8 ]
%6 = load i8, i8* %4
%7 = icmp eq i8 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %3
%9 = add nuw nsw i32 %5, 1
%10 = getelementptr inbounds i8, i8* %4, i64 1
%11 = icmp eq i8 %6, %1
br i1 %11, label %12, label %3
12: ; preds = %3, %8
%13 = phi i32 [ %9, %8 ], [ %5, %3 ]
ret i32 %13
}
execl(name, args) char *name, *args;
{
  extern char **environ;
  return (execve(name, &args, environ));
}


x86 assembly (clang, -O0):
<execl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ebd(%rip),%rax
mov    (%rax),%rdx
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <execve@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<execl>:
push   %rax
mov    %rsi,(%rsp)
mov    0x2ecc(%rip),%rax
mov    (%rax),%rdx
mov    %rsp,%rsi
xor    %eax,%eax
call   1030 <execve@plt>
pop    %rcx
ret

LLVM IR (-O0):
@environ = external global i8**
define i32 @execl(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8**, i8*** @environ
%7 = call i32 (i8*, i8**, i8**, ...) bitcast (i32 (...)* @execve to i32 (i8*, i8**, i8**, ...)*)(i8* %5, i8** %4, i8** %6)
ret i32 %7
}

LLVM IR (-O2):
@environ = external global i8**
define i32 @execl(i8* %0, i8* %1) {
%3 = alloca i8*
store i8* %1, i8** %3
%4 = load i8**, i8*** @environ
%5 = call i32 (i8*, i8**, i8**, ...) bitcast (i32 (...)* @execve to i32 (i8*, i8**, i8**, ...)*)(i8* %0, i8** %3, i8** %4)
ret i32 %5
}
/* Variables and functions */
bool band(bool a, bool b) { return a && b; }


x86 assembly (clang, -O0):
<band>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x9(%rbp)
je     1123 <band+0x23>
cmpl   $0x0,-0x8(%rbp)
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<band>:
test   %edi,%edi
setne  %al
test   %esi,%esi
setne  %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @band(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 = icmp ne i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 0
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ false, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @band(i32 %0, i32 %1) {
%3 = icmp ne i32 %0, 0
%4 = icmp ne i32 %1, 0
%5 = and i1 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int delta;
};
typedef TYPE_1__ XTextItem;

/* Variables and functions */
void set_XTextItem_delta(void *_p, int _v) {
  ((XTextItem *)_p)->delta = (int)_v;
}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @init_sub_pixel_color_span_funcs_c() {
ret void
}
void updateactivity(int *c, int act) { c[-4] = act; }


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

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

LLVM IR (-O0):
define void @updateactivity(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 -4
store i32 %5, i32* %7
ret void
}

LLVM IR (-O2):
define void @updateactivity(i32* nocapture writeonly %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 -4
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int O_CREAT;
int O_RDWR;
int /*<<< orphan*/ exit(int);
int open(char *, int);
int /*<<< orphan*/ perror(char *);
int open_file(char *path) {
  int fd;
  fd = open(path, O_RDWR | O_CREAT);
  if (fd < 0) {
    perror("open fail:");
    exit(-1);
  }
  return fd;
}


x86 assembly (clang, -O0):
<open_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e99(%rip),%rax
mov    (%rax),%esi
mov    0x2ea8(%rip),%rax
or     (%rax),%esi
call   1030 <open@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    117a <open_file+0x4a>
lea    0xe95(%rip),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_file>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    0x2eb9(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
call   1030 <open@plt>
test   %eax,%eax
js     114e <open_file+0x1e>
pop    %rcx
ret
lea    0xeab(%rip),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@O_RDWR = global i32 0
@O_CREAT = global i32 0
@.str = [11 x i8] c"open fail:\00"
define i32 @open_file(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = load i32, i32* @O_RDWR
%6 = load i32, i32* @O_CREAT
%7 = or i32 %5, %6
%8 = call i32 @open(i8* %4, i32 %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %1
%12 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%13 = call i32 @exit(i32 -1)
unreachable
14: ; preds = %1
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
@O_RDWR = global i32 0
@O_CREAT = global i32 0
@.str = [11 x i8] c"open fail:\00"
define i32 @open_file(i8* nocapture %0) {
%2 = load i32, i32* @O_RDWR
%3 = load i32, i32* @O_CREAT
%4 = or i32 %3, %2
%5 = tail call i32 @open(i8* %0, i32 %4)
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = tail call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @exit(i32 -1)
unreachable
10: ; preds = %1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ atoi(char const *const);
int dialog_msgbox(char const *, char const *const, int /*<<< orphan*/,
                  int /*<<< orphan*/, int);
int j_msgbox(const char *t, int ac, const char *const *av) {
  return dialog_msgbox(t, av[2], atoi(av[3]), atoi(av[4]), 1);
}


x86 assembly (clang, -O0):
<j_msgbox>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    0x18(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    0x20(%rax),%rdi
call   1040 <atoi@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    %eax,%ecx
mov    $0x1,%r8d
call   1030 <dialog_msgbox@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<j_msgbox>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rdi,%r14
mov    0x10(%rdx),%r15
mov    0x18(%rdx),%rdi
call   1040 <atoi@plt>
mov    %eax,%ebp
mov    0x20(%rbx),%rdi
call   1040 <atoi@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %ebp,%edx
mov    %eax,%ecx
mov    $0x1,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <dialog_msgbox@plt>

LLVM IR (-O0):
define i32 @j_msgbox(i8* %0, i32 %1, i8** %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8**
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8** %2, i8*** %6
%7 = load i8*, i8** %4
%8 = load i8**, i8*** %6
%9 = getelementptr inbounds i8*, i8** %8, i64 2
%10 = load i8*, i8** %9
%11 = load i8**, i8*** %6
%12 = getelementptr inbounds i8*, i8** %11, i64 3
%13 = load i8*, i8** %12
%14 = call i32 @atoi(i8* %13)
%15 = load i8**, i8*** %6
%16 = getelementptr inbounds i8*, i8** %15, i64 4
%17 = load i8*, i8** %16
%18 = call i32 @atoi(i8* %17)
%19 = call i32 @dialog_msgbox(i8* %7, i8* %10, i32 %14, i32 %18, i32 1)
ret i32 %19
}

LLVM IR (-O2):
define i32 @j_msgbox(i8* %0, i32 %1, i8** nocapture %2) {
%4 = getelementptr inbounds i8*, i8** %2, i64 2
%5 = load i8*, i8** %4
%6 = getelementptr inbounds i8*, i8** %2, i64 3
%7 = load i8*, i8** %6
%8 = tail call i32 @atoi(i8* %7)
%9 = getelementptr inbounds i8*, i8** %2, i64 4
%10 = load i8*, i8** %9
%11 = tail call i32 @atoi(i8* %10)
%12 = tail call i32 @dialog_msgbox(i8* %0, i8* %5, i32 %8, i32 %11, i32 1)
ret i32 %12
}
int curs_showmouse(void) { return (-1); }


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

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

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

LLVM IR (-O2):
define i32 @curs_showmouse() {
ret i32 -1
}
int f1(int x) { return ~(1U << (x & 0x1f)); }


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
and    $0x1f,%ecx
mov    $0x1,%eax
shl    %cl,%eax
xor    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
mov    %edi,%ecx
mov    $0xfffffffe,%eax
rol    %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @f1(i32 %0) {
%2 = and i32 %0, 31
%3 = shl nuw i32 1, %2
%4 = xor i32 %3, -1
ret i32 %4
}
/* Type definitions */
struct uftrace_filter_setting {
  int dummy;
};
struct symtabs {
  int dummy;
};
struct rb_root {
  int dummy;
};
typedef enum filter_mode { ____Placeholder_filter_mode } filter_mode;

/* Variables and functions */
int /*<<< orphan*/ setup_trigger(char *, struct symtabs *, struct rb_root *,
                                 int /*<<< orphan*/, int *,
                                 struct uftrace_filter_setting *);
void uftrace_setup_trigger(char *trigger_str, struct symtabs *symtabs,
                           struct rb_root *root, enum filter_mode *mode,
                           struct uftrace_filter_setting *setting) {
  setup_trigger(trigger_str, symtabs, root, 0, mode, setting);
}


x86 assembly (clang, -O0):
<uftrace_setup_trigger>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
xor    %ecx,%ecx
call   1030 <setup_trigger@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uftrace_setup_trigger>:
mov    %r8,%r9
mov    %rcx,%r8
xor    %ecx,%ecx
jmp    1030 <setup_trigger@plt>

LLVM IR (-O0):
%struct.symtabs = type { i32 }
%struct.rb_root = type { i32 }
%struct.uftrace_filter_setting = type { i32 }
define void @uftrace_setup_trigger(i8* %0, %struct.symtabs* %1, %struct.rb_root* %2, i32* %3, %struct.uftrace_filter_setting* %4) {
%6 = alloca i8*
%7 = alloca %struct.symtabs*
%8 = alloca %struct.rb_root*
%9 = alloca i32*
%10 = alloca %struct.uftrace_filter_setting*
store i8* %0, i8** %6
store %struct.symtabs* %1, %struct.symtabs** %7
store %struct.rb_root* %2, %struct.rb_root** %8
store i32* %3, i32** %9
store %struct.uftrace_filter_setting* %4, %struct.uftrace_filter_setting** %10
%11 = load i8*, i8** %6
%12 = load %struct.symtabs*, %struct.symtabs** %7
%13 = load %struct.rb_root*, %struct.rb_root** %8
%14 = load i32*, i32** %9
%15 = load %struct.uftrace_filter_setting*, %struct.uftrace_filter_setting** %10
%16 = call i32 @setup_trigger(i8* %11, %struct.symtabs* %12, %struct.rb_root* %13, i32 0, i32* %14, %struct.uftrace_filter_setting* %15)
ret void
}

LLVM IR (-O2):
%struct.symtabs = type { i32 }
%struct.rb_root = type { i32 }
%struct.uftrace_filter_setting = type { i32 }
define void @uftrace_setup_trigger(i8* %0, %struct.symtabs* %1, %struct.rb_root* %2, i32* %3, %struct.uftrace_filter_setting* %4) {
%6 = tail call i32 @setup_trigger(i8* %0, %struct.symtabs* %1, %struct.rb_root* %2, i32 0, i32* %3, %struct.uftrace_filter_setting* %4)
ret void
}
/* Variables and functions */
int printf(char *);
int main(void) { return printf("Hello world\n"); }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"Hello world\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))
ret i32 %2
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello world\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void free_page(unsigned long addr) {
  void *ptr_page = (void *)addr;
  free(ptr_page);
}


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

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

LLVM IR (-O0):
define void @free_page(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @free(i8* %6)
ret void
}

LLVM IR (-O2):
define void @free_page(i64 %0) {
%2 = inttoptr i64 %0 to i8*
%3 = tail call i32 @free(i8* %2)
ret void
}
adrreg0regx1_set(r0, r1, x0, x1, p0, p1) float r0, r1;
float *p0, *p1;
{ (p0[10000000]) = (p1[x1]); }


x86 assembly (clang, -O0):
<adrreg0regx1_set>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm1,-0x30(%rbp)
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm0
movss  %xmm1,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x2625a00(%rax)
02
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adrreg0regx1_set>:
movslq %esi,%rax
movss  (%rcx,%rax,4),%xmm0
movss  %xmm0,0x2625a00(%rdx)
02
ret

LLVM IR (-O0):
define i32 @adrreg0regx1_set(double %0, double %1, i32 %2, i32 %3, float* %4, float* %5) {
%7 = alloca i32
%8 = alloca float
%9 = alloca float
%10 = alloca i32
%11 = alloca i32
%12 = alloca float*
%13 = alloca float*
%14 = fptrunc double %0 to float
%15 = fptrunc double %1 to float
store float %14, float* %8
store float %15, float* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store float* %4, float** %12
store float* %5, float** %13
%16 = load float*, float** %13
%17 = load i32, i32* %11
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds float, float* %16, i64 %18
%20 = load float, float* %19
%21 = load float*, float** %12
%22 = getelementptr inbounds float, float* %21, i64 10000000
store float %20, float* %22
%23 = load i32, i32* %7
ret i32 %23
}

LLVM IR (-O2):
define i32 @adrreg0regx1_set(double %0, double %1, i32 %2, i32 %3, float* nocapture writeonly %4, float* nocapture %5) {
%7 = sext i32 %3 to i64
%8 = getelementptr inbounds float, float* %5, i64 %7
%9 = load float, float* %8
%10 = getelementptr inbounds float, float* %4, i64 10000000
store float %9, float* %10
ret i32 undef
}
int f(int s, int c) {
  int a1, a2, a3, x1, x2, x3, x;
  a1 = 2 * s;
  x1 = c - a1;
  a2 = 4 * s;
  x2 = c - a2;
  a3 = 6 * s;
  x3 = c - a3;
  x = x1 + x2 + x3;
  return x;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x2,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
imul   $0x6,-0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x14(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%eax
add    -0x1c(%rbp),%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
lea    (%rsi,%rsi,2),%eax
shl    $0x2,%edi
lea    (%rdi,%rdi,2),%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1) {
%3 = mul i32 %1, 3
%4 = mul i32 %0, -12
%5 = add i32 %3, %4
ret i32 %5
}
/* Variables and functions */
int execvp(char *, char **);
int /*<<< orphan*/ printf(char *);
int execvpe(char *program_name, char *argv[], char *envp[]) {
  extern char **environ;
  environ = envp;
  printf("running\n");
  return execvp(program_name, argv);
}


x86 assembly (clang, -O0):
<execvpe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    0x2ea9(%rip),%rax
mov    %rcx,(%rax)
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <execvp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<execvpe>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2eb7(%rip),%rax
mov    %rdx,(%rax)
lea    0xec5(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <execvp@plt>

LLVM IR (-O0):
@environ = external global i8**
@.str = [9 x i8] c"running\0A\00"
define i32 @execvpe(i8* %0, i8** %1, i8** %2) {
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i8**
store i8* %0, i8** %4
store i8** %1, i8*** %5
store i8** %2, i8*** %6
%7 = load i8**, i8*** %6
store i8** %7, i8*** @environ
%8 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%9 = load i8*, i8** %4
%10 = load i8**, i8*** %5
%11 = call i32 @execvp(i8* %9, i8** %10)
ret i32 %11
}

LLVM IR (-O2):
@environ = external global i8**
@str = [8 x i8] c"running\00"
define i32 @execvpe(i8* %0, i8** %1, i8** %2) {
store i8** %2, i8*** @environ
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @execvp(i8* %0, i8** %1)
ret i32 %5
}