xunge/DecIR huggingface dataset:
/* Variables and functions */
unsigned int exynos_5410_gpio_read(unsigned int);
unsigned int odroid_xu_gpio_read_20() {
  unsigned int bank_offset = 0x0C40;
  unsigned int bit_index = 4;
  return (exynos_5410_gpio_read(bank_offset) >> bit_index) & 0x1;
}


x86 assembly (clang, -O0):
<odroid_xu_gpio_read_20>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xc40,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <exynos_5410_gpio_read@plt>
mov    -0x8(%rbp),%ecx
shr    %cl,%eax
and    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<odroid_xu_gpio_read_20>:
push   %rax
mov    $0xc40,%edi
call   1030 <exynos_5410_gpio_read@plt>
shr    $0x4,%eax
and    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @odroid_xu_gpio_read_20() {
%1 = alloca i32
%2 = alloca i32
store i32 3136, i32* %1
store i32 4, i32* %2
%3 = load i32, i32* %1
%4 = call i32 @exynos_5410_gpio_read(i32 %3)
%5 = load i32, i32* %2
%6 = lshr i32 %4, %5
%7 = and i32 %6, 1
ret i32 %7
}

LLVM IR (-O2):
define i32 @odroid_xu_gpio_read_20() {
%1 = tail call i32 @exynos_5410_gpio_read(i32 3136)
%2 = lshr i32 %1, 4
%3 = and i32 %2, 1
ret i32 %3
}
/* Variables and functions */
double ranf();
double sample_Unif(double lo, double hi) { return lo + ranf() * (hi - lo); }


x86 assembly (clang, -O0):
<sample_Unif>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    $0x0,%al
call   1030 <ranf@plt>
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
subsd  -0x8(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sample_Unif>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1030 <ranf@plt>
movsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
subsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @sample_Unif(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = call double (...) @ranf()
%7 = load double, double* %4
%8 = load double, double* %3
%9 = fsub double %7, %8
%10 = call double @llvm.fmuladd.f64(double %6, double %9, double %5)
ret double %10
}

LLVM IR (-O2):
define double @sample_Unif(double %0, double %1) {
%3 = tail call double (...) @ranf()
%4 = fsub double %1, %0
%5 = tail call double @llvm.fmuladd.f64(double %3, double %4, double %0)
ret double %5
}
char HttpStatus_isError(int code) { return (code >= 400); }


x86 assembly (clang, -O0):
<HttpStatus_isError>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x190,-0x4(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<HttpStatus_isError>:
cmp    $0x190,%edi
setge  %al
ret

LLVM IR (-O0):
define signext i8 @HttpStatus_isError(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 400
%5 = zext i1 %4 to i32
%6 = trunc i32 %5 to i8
ret i8 %6
}

LLVM IR (-O2):
define signext i8 @HttpStatus_isError(i32 %0) {
%2 = icmp sgt i32 %0, 399
%3 = zext i1 %2 to i8
ret i8 %3
}
/* Variables and functions */
char getchar();
int /*<<< orphan*/ system(char *);
char getCh() {
  system("/bin/stty raw");
  char c = 0;
  while (c != '0' && c != '1')
    c = getchar();
  system("/bin/stty cooked");
  return c;
}


x86 assembly (clang, -O0):
<getCh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <system@plt>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x2(%rbp)
je     1157 <getCh+0x37>
movsbl -0x1(%rbp),%eax
cmp    $0x31,%eax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
test   $0x1,%al
jne    1167 <getCh+0x47>
jmp    1176 <getCh+0x56>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x1(%rbp)
jmp    1138 <getCh+0x18>
lea    0xe91(%rip),%rdi
call   1030 <system@plt>
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getCh>:
push   %rbx
lea    0xed8(%rip),%rdi
call   1030 <system@plt>
nopl   (%rax)
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %eax,%ebx
and    $0xfe,%al
cmp    $0x30,%al
jne    1130 <getCh+0x10>
lea    0xec8(%rip),%rdi
call   1030 <system@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"/bin/stty raw\00"
@.str.1 = [17 x i8] c"/bin/stty cooked\00"
define signext i8 @getCh() {
%1 = alloca i8
%2 = call i32 @system(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
store i8 0, i8* %1
br label %3
3: ; preds = %13, %0
%4 = load i8, i8* %1
%5 = sext i8 %4 to i32
%6 = icmp ne i32 %5, 48
br i1 %6, label %7, label %11
7: ; preds = %3
%8 = load i8, i8* %1
%9 = sext i8 %8 to i32
%10 = icmp ne i32 %9, 49
br label %11
11: ; preds = %7, %3
%12 = phi i1 [ false, %3 ], [ %10, %7 ]
br i1 %12, label %13, label %15
13: ; preds = %11
%14 = call signext i8 (...) @getchar()
store i8 %14, i8* %1
br label %3
15: ; preds = %11
%16 = call i32 @system(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%17 = load i8, i8* %1
ret i8 %17
}

LLVM IR (-O2):
@.str = [14 x i8] c"/bin/stty raw\00"
@.str.1 = [17 x i8] c"/bin/stty cooked\00"
define signext i8 @getCh() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
%3 = tail call signext i8 (...) @getchar()
%4 = and i8 %3, -2
%5 = icmp eq i8 %4, 48
br i1 %5, label %6, label %2
6: ; preds = %2
%7 = tail call i32 @system(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
ret i8 %3
}
void scrittura_matrice_doppia(int **matrice, unsigned int numero_riga,
                              unsigned int numero_colonna, int valore) {
  matrice[numero_riga][numero_colonna] = valore;
  return;
}


x86 assembly (clang, -O0):
<scrittura_matrice_doppia>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    (%rax,%rcx,8),%rax
mov    -0x10(%rbp),%ecx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<scrittura_matrice_doppia>:
mov    %esi,%eax
mov    (%rdi,%rax,8),%rax
mov    %edx,%edx
mov    %ecx,(%rax,%rdx,4)
ret

LLVM IR (-O0):
define void @scrittura_matrice_doppia(i32** %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32** %0, i32*** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %8
%10 = load i32**, i32*** %5
%11 = load i32, i32* %6
%12 = zext i32 %11 to i64
%13 = getelementptr inbounds i32*, i32** %10, i64 %12
%14 = load i32*, i32** %13
%15 = load i32, i32* %7
%16 = zext i32 %15 to i64
%17 = getelementptr inbounds i32, i32* %14, i64 %16
store i32 %9, i32* %17
ret void
}

LLVM IR (-O2):
define void @scrittura_matrice_doppia(i32** nocapture %0, i32 %1, i32 %2, i32 %3) {
%5 = zext i32 %1 to i64
%6 = getelementptr inbounds i32*, i32** %0, i64 %5
%7 = load i32*, i32** %6
%8 = zext i32 %2 to i64
%9 = getelementptr inbounds i32, i32* %7, i64 %8
store i32 %3, i32* %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __ESBMC_assume(int *);
int /*<<< orphan*/ free(int *);
int *malloc(int);
int main() {
  int *p;
  unsigned int n;
  p = malloc(sizeof(int) * 10);
  __ESBMC_assume(p);
  free(p);
  free(p);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x28,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <__ESBMC_assume@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32*
%2 = alloca i32
%3 = call i32* @malloc(i32 40)
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = call i32 @__ESBMC_assume(i32* %4)
%6 = load i32*, i32** %1
%7 = call i32 @free(i32* %6)
%8 = load i32*, i32** %1
%9 = call i32 @free(i32* %8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32* @malloc(i32 40)
%2 = tail call i32 @__ESBMC_assume(i32* %1)
%3 = tail call i32 @free(i32* %1)
%4 = tail call i32 @free(i32* %1)
ret i32 0
}
/* Variables and functions */
int u8isupperi(int /*<<< orphan*/);
int /*<<< orphan*/ u8tointcc(char const *);
int u8isuppercc(const char *c) { return u8isupperi(u8tointcc(c)); }


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

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

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

LLVM IR (-O2):
define i32 @u8isuppercc(i8* %0) {
%2 = tail call i32 @u8tointcc(i8* %0)
%3 = tail call i32 @u8isupperi(i32 %2)
ret i32 %3
}
int test_imm_20uint16_reg(unsigned short val) {
  return ((val) & (-0x20 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_20uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xffffffe0,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_20uint16_reg>:
cmp    $0x20,%di
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_20uint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, -32
%6 = icmp ne i32 %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_20uint16_reg(i16 zeroext %0) {
%2 = icmp ult i16 %0, 32
%3 = select i1 %2, i32 -40, i32 -20
ret i32 %3
}
main() {
  __complex__ double c;
  if (c = f())
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <f@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm1,%xmm1
movsd  %xmm1,-0x10(%rbp)
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
setne  %al
setp   %cl
or     %cl,%al
or     $0x0,%al
test   $0x1,%al
jne    1175 <main+0x45>
jmp    117a <main+0x4a>
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <f@plt>
test   %eax,%eax
jne    1143 <main+0x13>
xor    %edi,%edi
call   1050 <exit@plt>
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca { double, double }
store i32 0, i32* %1
%3 = call i32 (...) @f()
%4 = sitofp i32 %3 to double
%5 = getelementptr inbounds { double, double }, { double, double }* %2, i32 0, i32 0
%6 = getelementptr inbounds { double, double }, { double, double }* %2, i32 0, i32 1
store double %4, double* %5
store double 0.000000e+00, double* %6
%7 = fcmp une double %4, 0.000000e+00
%8 = or i1 %7, false
br i1 %8, label %9, label %10
9: ; preds = %0
unreachable
10: ; preds = %0
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f()
%2 = icmp eq i32 %1, 0
br i1 %2, label %4, label %3
3: ; preds = %0
tail call void @abort()
unreachable
4: ; preds = %0
tail call void @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int restore_tty() { return !system("stty echo") && !system("stty icanon"); }


x86 assembly (clang, -O0):
<restore_tty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <system@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x1(%rbp)
jne    114b <restore_tty+0x3b>
lea    0xecf(%rip),%rdi
call   1030 <system@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<restore_tty>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <system@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
je     1127 <restore_tty+0x17>
pop    %rcx
ret
lea    0xedc(%rip),%rdi
call   1030 <system@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"stty echo\00"
@.str.1 = [12 x i8] c"stty icanon\00"
define i32 @restore_tty() {
%1 = call i32 @system(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = icmp ne i32 %1, 0
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = call i32 @system(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
br label %7
7: ; preds = %3, %0
%8 = phi i1 [ false, %0 ], [ %6, %3 ]
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
@.str = [10 x i8] c"stty echo\00"
@.str.1 = [12 x i8] c"stty icanon\00"
define i32 @restore_tty() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i32 @system(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 0, %0 ], [ %6, %3 ]
ret i32 %8
}
void remote_leave_powersave(void) {}


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

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

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

LLVM IR (-O2):
define void @remote_leave_powersave() {
ret void
}
unsigned long long bit_window(unsigned long long value, unsigned int offset,
                              unsigned int bits) {
  unsigned long long mask = (1ULL << bits) - 1;
  if (mask == 0)
    return (value >> offset);
  value = (value >> offset) & mask;
  return value;
}


x86 assembly (clang, -O0):
<bit_window>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%rax
sub    $0x1,%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1141 <bit_window+0x41>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
shr    %cl,%rax
mov    %rax,-0x8(%rbp)
jmp    115b <bit_window+0x5b>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
shr    %cl,%rax
and    -0x20(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_window>:
mov    %rdi,%rax
test   %edx,%edx
je     111f <bit_window+0x1f>
mov    $0xffffffffffffffff,%rdi
mov    %edx,%ecx
shl    %cl,%rdi
not    %rdi
mov    %esi,%ecx
shr    %cl,%rax
and    %rdi,%rax
ret
mov    %esi,%ecx
shr    %cl,%rax
ret

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

LLVM IR (-O2):
define i64 @bit_window(i64 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = zext i32 %1 to i64
%7 = lshr i64 %0, %6
br label %15
8: ; preds = %3
%9 = zext i32 %2 to i64
%10 = shl nsw i64 -1, %9
%11 = xor i64 %10, -1
%12 = zext i32 %1 to i64
%13 = lshr i64 %0, %12
%14 = and i64 %13, %11
br label %15
15: ; preds = %8, %5
%16 = phi i64 [ %7, %5 ], [ %14, %8 ]
ret i64 %16
}
/* Variables and functions */
scalar_t__ pow(double, double);
double sqrt(scalar_t__);
double Distance(double x1, double y1, double x2, double y2) {
  return sqrt(pow(x1 - x2, 2.0) + pow(y1 - y2, 2.0));
}


x86 assembly (clang, -O0):
<Distance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  0xeb2(%rip),%xmm1
call   1030 <pow@plt>
mov    %rax,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  0xe97(%rip),%xmm1
call   1030 <pow@plt>
mov    -0x28(%rbp),%rdi
add    %rax,%rdi
call   1040 <sqrt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Distance>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm3,0x8(%rsp)
movsd  %xmm1,(%rsp)
subsd  %xmm2,%xmm0
movsd  0xec4(%rip),%xmm1
call   1030 <pow@plt>
mov    %rax,%rbx
movsd  (%rsp),%xmm0
subsd  0x8(%rsp),%xmm0
movsd  0xea9(%rip),%xmm1
call   1030 <pow@plt>
add    %rax,%rbx
mov    %rbx,%rdi
add    $0x10,%rsp
pop    %rbx
jmp    1040 <sqrt@plt>

LLVM IR (-O0):
define double @Distance(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %5
%10 = load double, double* %7
%11 = fsub double %9, %10
%12 = call i64 @pow(double %11, double 2.000000e+00)
%13 = load double, double* %6
%14 = load double, double* %8
%15 = fsub double %13, %14
%16 = call i64 @pow(double %15, double 2.000000e+00)
%17 = add nsw i64 %12, %16
%18 = call double @sqrt(i64 %17)
ret double %18
}

LLVM IR (-O2):
define double @Distance(double %0, double %1, double %2, double %3) {
%5 = fsub double %0, %2
%6 = tail call i64 @pow(double %5, double 2.000000e+00)
%7 = fsub double %1, %3
%8 = tail call i64 @pow(double %7, double 2.000000e+00)
%9 = add nsw i64 %8, %6
%10 = tail call double @sqrt(i64 %9)
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x97() {
  Assert_real((isodigit(151) == 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_isodigit.c",
              760, ("isodigit should be 0 for 0x97"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0x97>:
push   %rax
mov    $0x97,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x2f8,%edx
pop    %rax
jmp    1030 <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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0x97\00"
define void @t_isodigit_0x97() {
%1 = call i64 @isodigit(i32 151)
%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 760, 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0x97\00"
define void @t_isodigit_0x97() {
%1 = tail call i64 @isodigit(i32 151)
%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 760, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int cloog_version_revision(void) { return 7; }


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

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

LLVM IR (-O0):
define i32 @cloog_version_revision() {
ret i32 7
}

LLVM IR (-O2):
define i32 @cloog_version_revision() {
ret i32 7
}
/* Type definitions */
typedef union fc_sockaddr {
  int dummy;
} fc_sockaddr;
struct genlist_link {
  int dummy;
};
struct genlist {
  int dummy;
};
struct fc_sockaddr_list_link {
  int dummy;
};
struct fc_sockaddr_list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ genlist_insert_before(struct genlist *, union fc_sockaddr *,
                                         struct genlist_link *);
void fc_sockaddr_list_insert_before(struct fc_sockaddr_list *tthis,
                                    union fc_sockaddr *pfoo,
                                    struct fc_sockaddr_list_link *plink) {
  genlist_insert_before((struct genlist *)tthis, pfoo,
                        (struct genlist_link *)plink);
}


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

x86 assembly (clang, -O2):
<fc_sockaddr_list_insert_before>:
jmp    1030 <genlist_insert_before@plt>

LLVM IR (-O0):
%struct.fc_sockaddr_list = type { i32 }
%union.fc_sockaddr = type { i32 }
%struct.fc_sockaddr_list_link = type { i32 }
%struct.genlist = type { i32 }
%struct.genlist_link = type { i32 }
define void @fc_sockaddr_list_insert_before(%struct.fc_sockaddr_list* %0, %union.fc_sockaddr* %1, %struct.fc_sockaddr_list_link* %2) {
%4 = alloca %struct.fc_sockaddr_list*
%5 = alloca %union.fc_sockaddr*
%6 = alloca %struct.fc_sockaddr_list_link*
store %struct.fc_sockaddr_list* %0, %struct.fc_sockaddr_list** %4
store %union.fc_sockaddr* %1, %union.fc_sockaddr** %5
store %struct.fc_sockaddr_list_link* %2, %struct.fc_sockaddr_list_link** %6
%7 = load %struct.fc_sockaddr_list*, %struct.fc_sockaddr_list** %4
%8 = bitcast %struct.fc_sockaddr_list* %7 to %struct.genlist*
%9 = load %union.fc_sockaddr*, %union.fc_sockaddr** %5
%10 = load %struct.fc_sockaddr_list_link*, %struct.fc_sockaddr_list_link** %6
%11 = bitcast %struct.fc_sockaddr_list_link* %10 to %struct.genlist_link*
%12 = call i32 @genlist_insert_before(%struct.genlist* %8, %union.fc_sockaddr* %9, %struct.genlist_link* %11)
ret void
}

LLVM IR (-O2):
%struct.fc_sockaddr_list = type { i32 }
%union.fc_sockaddr = type { i32 }
%struct.fc_sockaddr_list_link = type { i32 }
%struct.genlist = type { i32 }
%struct.genlist_link = type { i32 }
define void @fc_sockaddr_list_insert_before(%struct.fc_sockaddr_list* %0, %union.fc_sockaddr* %1, %struct.fc_sockaddr_list_link* %2) {
%4 = bitcast %struct.fc_sockaddr_list* %0 to %struct.genlist*
%5 = bitcast %struct.fc_sockaddr_list_link* %2 to %struct.genlist_link*
%6 = tail call i32 @genlist_insert_before(%struct.genlist* %4, %union.fc_sockaddr* %1, %struct.genlist_link* %5)
ret void
}
int fun1169() { return 1169; }


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

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

LLVM IR (-O0):
define i32 @fun1169() {
ret i32 1169
}

LLVM IR (-O2):
define i32 @fun1169() {
ret i32 1169
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
uint8_t m185_chrGetGarbage(uint16_t addr) {
  (void)addr;
  return 1;
}


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

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

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

LLVM IR (-O2):
define i32 @m185_chrGetGarbage(i32 %0) {
ret i32 1
}
long double _Complex conjl(long double _Complex z) { abort(); }


x86 assembly (clang, -O0):
<conjl>:
push   %rbp
mov    %rsp,%rbp
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<conjl>:
push   %rax
call   1030 <abort@plt>

LLVM IR (-O0):
define { x86_fp80, x86_fp80 } @conjl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %0) {
unreachable
}

LLVM IR (-O2):
define { x86_fp80, x86_fp80 } @conjl({ x86_fp80, x86_fp80 }* nocapture readnone byval({ x86_fp80, x86_fp80 }) align 16 %0) {
tail call void @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ errno;
__attribute__((__weak__)) int _kill(int pid __attribute__((unused)),
                                    int sig __attribute__((unused))) {
  errno = EINVAL;
  return (-1);
}


x86 assembly (clang, -O0):
<_kill>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2ec7(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec6(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_kill>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
@errno = global i32 0
define weak i32 @_kill(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* @EINVAL
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@EINVAL = global i32 0
@errno = global i32 0
define weak i32 @_kill(i32 %0, i32 %1) {
%3 = load i32, i32* @EINVAL
store i32 %3, i32* @errno
ret i32 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/
unicode_code_point_byte_requirement_utf16(int /*<<< orphan*/);
scalar_t__ unicode_utf7_is_direct_char(int /*<<< orphan*/);
unsigned int utilities_multiply_round_up(int /*<<< orphan*/, double);
unsigned int unicode_code_point_byte_requirement_utf7(uint32_t code_point) {
  if (unicode_utf7_is_direct_char(code_point))
    return 1;
  return 2 +
         utilities_multiply_round_up(
             unicode_code_point_byte_requirement_utf16(code_point), 4.0 / 3.0);
}


x86 assembly (clang, -O0):
<unicode_code_point_byte_requirement_utf7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <unicode_utf7_is_direct_char@plt>
cmp    $0x0,%rax
je     1159 <unicode_code_point_byte_requirement_utf7+0x29>
movl   $0x1,-0x4(%rbp)
jmp    1176 <unicode_code_point_byte_requirement_utf7+0x46>
mov    -0x8(%rbp),%edi
call   1050 <unicode_code_point_byte_requirement_utf16@plt>
mov    %eax,%edi
movsd  0xe95(%rip),%xmm0
call   1040 <utilities_multiply_round_up@plt>
add    $0x2,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unicode_code_point_byte_requirement_utf7>:
push   %rbx
mov    %edi,%ebx
call   1030 <unicode_utf7_is_direct_char@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1147 <unicode_code_point_byte_requirement_utf7+0x17>
pop    %rbx
ret
mov    %ebx,%edi
call   1050 <unicode_code_point_byte_requirement_utf16@plt>
movsd  0xeaa(%rip),%xmm0
mov    %eax,%edi
call   1040 <utilities_multiply_round_up@plt>
add    $0x2,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @unicode_code_point_byte_requirement_utf7(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @unicode_utf7_is_direct_char(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %13
8: ; preds = %1
%9 = load i32, i32* %3
%10 = call i32 @unicode_code_point_byte_requirement_utf16(i32 %9)
%11 = call i32 @utilities_multiply_round_up(i32 %10, double 0x3FF5555555555555)
%12 = add i32 2, %11
store i32 %12, i32* %2
br label %13
13: ; preds = %8, %7
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @unicode_code_point_byte_requirement_utf7(i32 %0) {
%2 = tail call i64 @unicode_utf7_is_direct_char(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @unicode_code_point_byte_requirement_utf16(i32 %0)
%6 = tail call i32 @utilities_multiply_round_up(i32 %5, double 0x3FF5555555555555)
%7 = add i32 %6, 2
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 1, %1 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xd0() {
  Assert_real((isascii(208) == 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_isascii.c",
              1045, ("isascii should be 0 for 0xd0"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0xd0>:
push   %rax
mov    $0xd0,%edi
call   1030 <isascii@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x415,%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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xd0\00"
define void @t_isascii_0xd0() {
%1 = call i64 @isascii(i32 208)
%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 1045, 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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xd0\00"
define void @t_isascii_0xd0() {
%1 = tail call i64 @isascii(i32 208)
%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 1045, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
double RAND_MAX;
double rand();
int irand(int a, int e) {
  double r = e - a + 1;
  return a + (int)(r * rand() / (RAND_MAX + 1.0));
}


x86 assembly (clang, -O0):
<irand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    -0x1c(%rbp),%eax
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xea2(%rip),%xmm1
mov    0x2e83(%rip),%rcx
addsd  (%rcx),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%ecx
add    %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irand>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
sub    %edi,%esi
add    $0x1,%esi
cvtsi2sd %esi,%xmm0
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
mulsd  0x8(%rsp),%xmm0
mov    0x2eae(%rip),%rax
movsd  (%rax),%xmm1
addsd  0xeba(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
add    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define i32 @irand(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = sub nsw i32 %6, %7
%9 = add nsw i32 %8, 1
%10 = sitofp i32 %9 to double
store double %10, double* %5
%11 = load i32, i32* %3
%12 = load double, double* %5
%13 = call double (...) @rand()
%14 = fmul double %12, %13
%15 = load double, double* @RAND_MAX
%16 = fadd double %15, 1.000000e+00
%17 = fdiv double %14, %16
%18 = fptosi double %17 to i32
%19 = add nsw i32 %11, %18
ret i32 %19
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define i32 @irand(i32 %0, i32 %1) {
%3 = sub i32 1, %0
%4 = add i32 %3, %1
%5 = sitofp i32 %4 to double
%6 = tail call double (...) @rand()
%7 = fmul double %6, %5
%8 = load double, double* @RAND_MAX
%9 = fadd double %8, 1.000000e+00
%10 = fdiv double %7, %9
%11 = fptosi double %10 to i32
%12 = add nsw i32 %11, %0
ret i32 %12
}
void IRC_OnChannelDeOp(const struct instance_data *pID,
                       const struct userinfo *pUI, const char *szChannel,
                       const char *szTargetNick) {}


x86 assembly (clang, -O0):
<IRC_OnChannelDeOp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.instance_data = type opaque
%struct.userinfo = type opaque
define void @IRC_OnChannelDeOp(%struct.instance_data* %0, %struct.userinfo* %1, i8* %2, i8* %3) {
%5 = alloca %struct.instance_data*
%6 = alloca %struct.userinfo*
%7 = alloca i8*
%8 = alloca i8*
store %struct.instance_data* %0, %struct.instance_data** %5
store %struct.userinfo* %1, %struct.userinfo** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
ret void
}

LLVM IR (-O2):
%struct.instance_data = type opaque
%struct.userinfo = type opaque
define void @IRC_OnChannelDeOp(%struct.instance_data* nocapture %0, %struct.userinfo* nocapture %1, i8* nocapture %2, i8* nocapture %3) {
ret void
}
/* Variables and functions */
unsigned int str_rehash(char const *);
unsigned int str_hash_init(const char *fpath) { return str_rehash(fpath); }


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

x86 assembly (clang, -O2):
<str_hash_init>:
jmp    1030 <str_rehash@plt>

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

LLVM IR (-O2):
define i32 @str_hash_init(i8* %0) {
%2 = tail call i32 @str_rehash(i8* %0)
ret i32 %2
}
/* Variables and functions */
char *peApiName();
char *peGetApiName(void) { return peApiName(); }


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

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

LLVM IR (-O0):
define i8* @peGetApiName() {
%1 = call i8* (...) @peApiName()
ret i8* %1
}

LLVM IR (-O2):
define i8* @peGetApiName() {
%1 = tail call i8* (...) @peApiName()
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
#pragma xmp reflect(a) async(1)
#pragma xmp wait_async(1)
#pragma xmp task on p(1, 1)
  { printf("PASS\n"); }
  return 0;
}


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>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [5 x i8] c"PASS\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int QCC_Long(int l) { return l; }


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

x86 assembly (clang, -O2):
<QCC_Long>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @QCC_Long(i32 returned %0) {
ret i32 %0
}
int do_716() { return 716; }


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

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

LLVM IR (-O0):
define i32 @do_716() {
ret i32 716
}

LLVM IR (-O2):
define i32 @do_716() {
ret i32 716
}
/* Type definitions */
struct timeval {
  int tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double getTime(void) {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return (double)tv.tv_sec + (1e-6 * tv.tv_usec);
}


x86 assembly (clang, -O0):
<getTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq -0x8(%rbp),%xmm1
cvtsi2sdl -0x10(%rbp),%xmm0
movsd  0xec8(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getTime>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq 0x10(%rsp),%xmm1
cvtsi2sdl 0x8(%rsp),%xmm0
mulsd  0xecb(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define double @getTime() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%4 = load i64, i64* %3
%5 = sitofp i64 %4 to double
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%7 = load i32, i32* %6
%8 = sitofp i32 %7 to double
%9 = call double @llvm.fmuladd.f64(double 0x3EB0C6F7A0B5ED8D, double %8, double %5)
ret double %9
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
define double @getTime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load i32, i32* %7
%9 = sitofp i32 %8 to double
%10 = tail call double @llvm.fmuladd.f64(double %9, double 0x3EB0C6F7A0B5ED8D, double %6)
ret double %10
}
void inclass_element2CR() {}


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

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

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

LLVM IR (-O2):
define void @inclass_element2CR() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
char *strdup(char const *);
char *xstrdup(const char *s) {
  char *ret = strdup(s);
  assert(ret != NULL);
  return ret;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %rbx
call   1040 <strdup@plt>
mov    %rax,%rbx
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1030 <assert@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @xstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strdup(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
define noalias i8* @xstrdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp ne i8* %2, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ BNO55_ReadEuler();
int /*<<< orphan*/ BNO55_ReadTemp();
void BNO55_Read() {
  BNO55_ReadTemp();
  BNO55_ReadEuler();
}


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

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

LLVM IR (-O0):
define void @BNO55_Read() {
%1 = call i32 (...) @BNO55_ReadTemp()
%2 = call i32 (...) @BNO55_ReadEuler()
ret void
}

LLVM IR (-O2):
define void @BNO55_Read() {
%1 = tail call i32 (...) @BNO55_ReadTemp()
%2 = tail call i32 (...) @BNO55_ReadEuler()
ret void
}
void ExttNSAuxTable(void) {}


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

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

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

LLVM IR (-O2):
define void @ExttNSAuxTable() {
ret void
}
int add_person(int list[128], int age) {
  if (age >= 0 && age < 128) {
    list[age]++;
    return 0;
  }
  return -1;
}


x86 assembly (clang, -O0):
<add_person>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     113f <add_person+0x3f>
cmpl   $0x80,-0x14(%rbp)
jge    113f <add_person+0x3f>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
add    $0x1,%edx
mov    %edx,(%rax,%rcx,4)
movl   $0x0,-0x4(%rbp)
jmp    1146 <add_person+0x46>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_person>:
mov    $0xffffffff,%eax
cmp    $0x7f,%esi
ja     1112 <add_person+0x12>
mov    %esi,%eax
addl   $0x1,(%rdi,%rax,4)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @add_person(i32* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp sge i32 %6, 0
br i1 %7, label %8, label %18
8: ; preds = %2
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 128
br i1 %10, label %11, label %18
11: ; preds = %8
%12 = load i32*, i32** %4
%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 = add nsw i32 %16, 1
store i32 %17, i32* %15
store i32 0, i32* %3
br label %19
18: ; preds = %8, %2
store i32 -1, i32* %3
br label %19
19: ; preds = %18, %11
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @add_person(i32* nocapture %0, i32 %1) {
%3 = icmp ult i32 %1, 128
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = zext i32 %1 to i64
%6 = getelementptr inbounds i32, i32* %0, i64 %5
%7 = load i32, i32* %6
%8 = add nsw i32 %7, 1
store i32 %8, i32* %6
br label %9
9: ; preds = %2, %4
%10 = phi i32 [ 0, %4 ], [ -1, %2 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ perror(char const *);
int terminate(const char *s, int sock) {
  perror(s);
  if (sock)
    close(sock);
  return 0;
}


x86 assembly (clang, -O0):
<terminate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
cmpl   $0x0,-0xc(%rbp)
je     114a <terminate+0x2a>
mov    -0xc(%rbp),%edi
call   1030 <close@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<terminate>:
push   %rbx
mov    %esi,%ebx
call   1040 <perror@plt>
test   %ebx,%ebx
je     1133 <terminate+0x13>
mov    %ebx,%edi
call   1030 <close@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @terminate(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 = call i32 @perror(i8* %5)
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load i32, i32* %4
%11 = call i32 @close(i32 %10)
br label %12
12: ; preds = %9, %2
ret i32 0
}

LLVM IR (-O2):
define i32 @terminate(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @perror(i8* %0)
%4 = icmp eq i32 %1, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @close(i32 %1)
br label %7
7: ; preds = %5, %2
ret i32 0
}
/* Variables and functions */
int syscall(int, char const *);
int delete_module(const char *name) { return syscall(129, name); }


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

x86 assembly (clang, -O2):
<delete_module>:
mov    %rdi,%rsi
mov    $0x81,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @delete_module(i8* %0) {
%2 = tail call i32 @syscall(i32 129, i8* %0)
ret i32 %2
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("=======\n");
  return EXIT_SUCCESS;
}


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

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

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

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [8 x i8] c"=======\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Set_DataBus_from_DB07_to_DB00(int);
int /*<<< orphan*/ Set_DataBus_from_DB15_to_DB08(int);
int /*<<< orphan*/ Set_DataBus_from_DB23_to_DB16(int);
void Set_DataBus_to_Initial_Default_State_After_Power_ON(void) {
  Set_DataBus_from_DB07_to_DB00(0x00);
  Set_DataBus_from_DB15_to_DB08(0x00);
  Set_DataBus_from_DB23_to_DB16(0x00);
}


x86 assembly (clang, -O0):
<Set_DataBus_to_Initial_Default_State_After_Power_ON>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <Set_DataBus_from_DB07_to_DB00@plt>
xor    %edi,%edi
call   1040 <Set_DataBus_from_DB15_to_DB08@plt>
xor    %edi,%edi
call   1050 <Set_DataBus_from_DB23_to_DB16@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Set_DataBus_to_Initial_Default_State_After_Power_ON>:
push   %rax
xor    %edi,%edi
call   1030 <Set_DataBus_from_DB07_to_DB00@plt>
xor    %edi,%edi
call   1040 <Set_DataBus_from_DB15_to_DB08@plt>
xor    %edi,%edi
pop    %rax
jmp    1050 <Set_DataBus_from_DB23_to_DB16@plt>

LLVM IR (-O0):
define void @Set_DataBus_to_Initial_Default_State_After_Power_ON() {
%1 = call i32 @Set_DataBus_from_DB07_to_DB00(i32 0)
%2 = call i32 @Set_DataBus_from_DB15_to_DB08(i32 0)
%3 = call i32 @Set_DataBus_from_DB23_to_DB16(i32 0)
ret void
}

LLVM IR (-O2):
define void @Set_DataBus_to_Initial_Default_State_After_Power_ON() {
%1 = tail call i32 @Set_DataBus_from_DB07_to_DB00(i32 0)
%2 = tail call i32 @Set_DataBus_from_DB15_to_DB08(i32 0)
%3 = tail call i32 @Set_DataBus_from_DB23_to_DB16(i32 0)
ret void
}