xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ cmd_usage(int);
void cmd_usages() {
  int j;
  for (j = 0; j < 15; j++) {
    cmd_usage(j);
  }
}


x86 assembly (clang, -O0):
<cmd_usages>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0xf,-0x4(%rbp)
jge    113f <cmd_usages+0x2f>
mov    -0x4(%rbp),%edi
call   1030 <cmd_usage@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <cmd_usages+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_usages>:
push   %rax
xor    %edi,%edi
call   1030 <cmd_usage@plt>
mov    $0x1,%edi
call   1030 <cmd_usage@plt>
mov    $0x2,%edi
call   1030 <cmd_usage@plt>
mov    $0x3,%edi
call   1030 <cmd_usage@plt>
mov    $0x4,%edi
call   1030 <cmd_usage@plt>
mov    $0x5,%edi
call   1030 <cmd_usage@plt>
mov    $0x6,%edi
call   1030 <cmd_usage@plt>
mov    $0x7,%edi
call   1030 <cmd_usage@plt>
mov    $0x8,%edi
call   1030 <cmd_usage@plt>
mov    $0x9,%edi
call   1030 <cmd_usage@plt>
mov    $0xa,%edi
call   1030 <cmd_usage@plt>
mov    $0xb,%edi
call   1030 <cmd_usage@plt>
mov    $0xc,%edi
call   1030 <cmd_usage@plt>
mov    $0xd,%edi
call   1030 <cmd_usage@plt>
mov    $0xe,%edi
pop    %rax
jmp    1030 <cmd_usage@plt>

LLVM IR (-O0):
define void @cmd_usages() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %8, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 15
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = load i32, i32* %1
%7 = call i32 @cmd_usage(i32 %6)
br label %8
8: ; preds = %5
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
br label %2
11: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @cmd_usages() {
%1 = tail call i32 @cmd_usage(i32 0)
%2 = tail call i32 @cmd_usage(i32 1)
%3 = tail call i32 @cmd_usage(i32 2)
%4 = tail call i32 @cmd_usage(i32 3)
%5 = tail call i32 @cmd_usage(i32 4)
%6 = tail call i32 @cmd_usage(i32 5)
%7 = tail call i32 @cmd_usage(i32 6)
%8 = tail call i32 @cmd_usage(i32 7)
%9 = tail call i32 @cmd_usage(i32 8)
%10 = tail call i32 @cmd_usage(i32 9)
%11 = tail call i32 @cmd_usage(i32 10)
%12 = tail call i32 @cmd_usage(i32 11)
%13 = tail call i32 @cmd_usage(i32 12)
%14 = tail call i32 @cmd_usage(i32 13)
%15 = tail call i32 @cmd_usage(i32 14)
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint16_t;
typedef int /*<<< orphan*/ p;

/* Variables and functions */
uint16_t compat_be16dec(const void *pp) {
  const uint8_t *p = (uint8_t const *)pp;
  return ((uint16_t)(p[1]) + ((uint16_t)(p[0]) << 8));
}


x86 assembly (clang, -O0):
<compat_be16dec>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    -0x10(%rbp),%rcx
mov    (%rcx),%rcx
shl    $0x8,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compat_be16dec>:
mov    (%rdi),%eax
shl    $0x8,%eax
add    0x8(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @compat_be16dec(i8* %0) {
%2 = alloca i8*
%3 = alloca i64*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i64*
store i64* %5, i64** %3
%6 = load i64*, i64** %3
%7 = getelementptr inbounds i64, i64* %6, i64 1
%8 = load i64, i64* %7
%9 = trunc i64 %8 to i32
%10 = load i64*, i64** %3
%11 = getelementptr inbounds i64, i64* %10, i64 0
%12 = load i64, i64* %11
%13 = trunc i64 %12 to i32
%14 = shl i32 %13, 8
%15 = add nsw i32 %9, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @compat_be16dec(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = getelementptr inbounds i8, i8* %0, i64 8
%4 = bitcast i8* %3 to i64*
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = load i64, i64* %2
%8 = trunc i64 %7 to i32
%9 = shl i32 %8, 8
%10 = add nsw i32 %9, %6
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Subject:\tComputer Programming\tSection:\t1\n");
  printf("ID:\t\t54079999\t\tName:\t\tSomchai Somying\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>
lea    0xef8(%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>
lea    0xf05(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [42 x i8] c"Subject:\09Computer Programming\09Section:\091\0A\00"
@.str.1 = [39 x i8] c"ID:\09\0954079999\09\09Name:\09\09Somchai Somying\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [41 x i8] c"Subject:\09Computer Programming\09Section:\091\00"
@str.2 = [38 x i8] c"ID:\09\0954079999\09\09Name:\09\09Somchai Somying\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int nrfx_usbd_errata_type_52840();
bool nrfx_usbd_errata_type_52840_eng_a_or_later(void) {
  return nrfx_usbd_errata_type_52840();
}


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

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

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

LLVM IR (-O2):
define i32 @nrfx_usbd_errata_type_52840_eng_a_or_later() {
%1 = tail call i32 (...) @nrfx_usbd_errata_type_52840()
ret i32 %1
}
int test_imm_61int8_mem(signed char *val) {
  return ((*val) & (0x61 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_61int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 97
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct stat {
  int dummy;
};
struct FTW {
  int dummy;
};

/* Variables and functions */
int remove(char const *);
int rmfn(const char *fpath, const struct stat *st, int flag, struct FTW *ftw) {
  return remove(fpath);
}


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

x86 assembly (clang, -O2):
<rmfn>:
jmp    1030 <remove@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
%struct.FTW = type { i32 }
define i32 @rmfn(i8* %0, %struct.stat* %1, i32 %2, %struct.FTW* %3) {
%5 = alloca i8*
%6 = alloca %struct.stat*
%7 = alloca i32
%8 = alloca %struct.FTW*
store i8* %0, i8** %5
store %struct.stat* %1, %struct.stat** %6
store i32 %2, i32* %7
store %struct.FTW* %3, %struct.FTW** %8
%9 = load i8*, i8** %5
%10 = call i32 @remove(i8* %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.stat = type { i32 }
%struct.FTW = type { i32 }
define i32 @rmfn(i8* nocapture %0, %struct.stat* nocapture readnone %1, i32 %2, %struct.FTW* nocapture readnone %3) {
%5 = tail call i32 @remove(i8* %0)
ret i32 %5
}
double mix(double v0, double v1, double t) { return v0 + (v1 - v0) * t; }


x86 assembly (clang, -O0):
<mix>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mix>:
subsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @mix(double %0, double %1, double %2) {
%4 = fsub double %1, %0
%5 = tail call double @llvm.fmuladd.f64(double %4, double %2, double %0)
ret double %5
}
/* Variables and functions */
scalar_t__ KIONIX_ACCEL_read_bytes(int, char *, int);
int /*<<< orphan*/ KIONIX_ACCEL_write_byte(int, char);
int KIONIX_ACCEL_position_unmask_fu(void) {
  char ctrl_reg2 = 0;
  int status = 0;
  if (KIONIX_ACCEL_read_bytes(0x1C, &ctrl_reg2, 1) == 0) {
    ctrl_reg2 &= ~0x01;
    KIONIX_ACCEL_write_byte(0x1C, ctrl_reg2);
  } else
    status = 1;
  return status;
}


x86 assembly (clang, -O0):
<KIONIX_ACCEL_position_unmask_fu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x0,-0x1(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x1c,%edi
lea    -0x1(%rbp),%rsi
mov    $0x1,%edx
call   1030 <KIONIX_ACCEL_read_bytes@plt>
cmp    $0x0,%rax
jne    116d <KIONIX_ACCEL_position_unmask_fu+0x4d>
movsbl -0x1(%rbp),%eax
and    $0xfffffffe,%eax
mov    %al,-0x1(%rbp)
mov    $0x1c,%edi
movsbl -0x1(%rbp),%esi
call   1040 <KIONIX_ACCEL_write_byte@plt>
jmp    1174 <KIONIX_ACCEL_position_unmask_fu+0x54>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<KIONIX_ACCEL_position_unmask_fu>:
push   %rbx
sub    $0x10,%rsp
movb   $0x0,0xf(%rsp)
lea    0xf(%rsp),%rsi
mov    $0x1,%ebx
mov    $0x1c,%edi
mov    $0x1,%edx
call   1030 <KIONIX_ACCEL_read_bytes@plt>
test   %rax,%rax
jne    1161 <KIONIX_ACCEL_position_unmask_fu+0x41>
movsbl 0xf(%rsp),%esi
and    $0xfffffffe,%esi
mov    %sil,0xf(%rsp)
mov    $0x1c,%edi
call   1040 <KIONIX_ACCEL_write_byte@plt>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @KIONIX_ACCEL_position_unmask_fu() {
%1 = alloca i8
%2 = alloca i32
store i8 0, i8* %1
store i32 0, i32* %2
%3 = call i64 @KIONIX_ACCEL_read_bytes(i32 28, i8* %1, i32 1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %12
5: ; preds = %0
%6 = load i8, i8* %1
%7 = sext i8 %6 to i32
%8 = and i32 %7, -2
%9 = trunc i32 %8 to i8
store i8 %9, i8* %1
%10 = load i8, i8* %1
%11 = call i32 @KIONIX_ACCEL_write_byte(i32 28, i8 signext %10)
br label %13
12: ; preds = %0
store i32 1, i32* %2
br label %13
13: ; preds = %12, %5
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @KIONIX_ACCEL_position_unmask_fu() {
%1 = alloca i8
store i8 0, i8* %1
%2 = call i64 @KIONIX_ACCEL_read_bytes(i32 28, i8* %1, i32 1)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = load i8, i8* %1
%6 = and i8 %5, -2
store i8 %6, i8* %1
%7 = call i32 @KIONIX_ACCEL_write_byte(i32 28, i8 signext %6)
br label %8
8: ; preds = %0, %4
%9 = phi i32 [ 0, %4 ], [ 1, %0 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ ch341Release();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ toggle_reset(int /*<<< orphan*/);
void ch_exit(void) {
  toggle_reset(0);
  ch341Release();
  exit(0);
}


x86 assembly (clang, -O0):
<ch_exit>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <toggle_reset@plt>
mov    $0x0,%al
call   1040 <ch341Release@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<ch_exit>:
push   %rax
xor    %edi,%edi
call   1030 <toggle_reset@plt>
xor    %eax,%eax
call   1040 <ch341Release@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define void @ch_exit() {
%1 = call i32 @toggle_reset(i32 0)
%2 = call i32 (...) @ch341Release()
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @ch_exit() {
%1 = tail call i32 @toggle_reset(i32 0)
%2 = tail call i32 (...) @ch341Release()
%3 = tail call i32 @exit(i32 0)
unreachable
}
int test_imm_83int32_reg(int val) { return ((val) & (0x83 << 0)) ? -20 : -40; }


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

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

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

LLVM IR (-O2):
define i32 @test_imm_83int32_reg(i32 %0) {
%2 = and i32 %0, 131
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
double ICIncrement(double parameter) {
  parameter = parameter + 1;
  return parameter;
}


x86 assembly (clang, -O0):
<ICIncrement>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ICIncrement>:
addsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @ICIncrement(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fadd double %3, 1.000000e+00
store double %4, double* %2
%5 = load double, double* %2
ret double %5
}

LLVM IR (-O2):
define double @ICIncrement(double %0) {
%2 = fadd double %0, 1.000000e+00
ret double %2
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int /*<<< orphan*/ ENOMEM;
int /*<<< orphan*/ errno;
pid_t fork(void) {
  errno = ENOMEM;
  return -1;
}


x86 assembly (clang, -O0):
<fork>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec4(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fork>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOMEM = global i32 0
@errno = global i32 0
define i32 @fork() {
%1 = load i32, i32* @ENOMEM
store i32 %1, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOMEM = global i32 0
@errno = global i32 0
define i32 @fork() {
%1 = load i32, i32* @ENOMEM
store i32 %1, i32* @errno
ret i32 -1
}
/* Type definitions */
struct network {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ update_sensitivity(struct network *);
int /*<<< orphan*/ update_weights(struct network *);
void backprop(struct network *network) {
  update_sensitivity(network);
  update_weights(network);
}


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

x86 assembly (clang, -O2):
<backprop>:
push   %rbx
mov    %rdi,%rbx
call   1040 <update_sensitivity@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <update_weights@plt>

LLVM IR (-O0):
%struct.network = type { i32 }
define void @backprop(%struct.network* %0) {
%2 = alloca %struct.network*
store %struct.network* %0, %struct.network** %2
%3 = load %struct.network*, %struct.network** %2
%4 = call i32 @update_sensitivity(%struct.network* %3)
%5 = load %struct.network*, %struct.network** %2
%6 = call i32 @update_weights(%struct.network* %5)
ret void
}

LLVM IR (-O2):
%struct.network = type { i32 }
define void @backprop(%struct.network* %0) {
%2 = tail call i32 @update_sensitivity(%struct.network* %0)
%3 = tail call i32 @update_weights(%struct.network* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int32_t;

/* Variables and functions */
int /*<<< orphan*/ Interpolate_3(int /*<<< orphan*/, int, int /*<<< orphan*/,
                                 int, int /*<<< orphan*/, int, int);
u_int32_t Interp2(u_int32_t c1, u_int32_t c2, u_int32_t c3) {
  return Interpolate_3(c1, 2, c2, 1, c3, 1, 2);
}


x86 assembly (clang, -O0):
<Interp2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%r8d
mov    $0x2,%esi
mov    $0x1,%r9d
mov    %r9d,%ecx
movl   $0x2,(%rsp)
call   1030 <Interpolate_3@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Interp2>:
push   %rax
mov    %edx,%r8d
mov    %esi,%edx
movl   $0x2,(%rsp)
mov    $0x2,%esi
mov    $0x1,%ecx
mov    $0x1,%r9d
call   1030 <Interpolate_3@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @Interp2(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @Interpolate_3(i32 %0, i32 2, i32 %1, i32 1, i32 %2, i32 1, i32 2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x9e() {
  Assert_real((iscntrl(158) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_iscntrl.c",
              795, ("iscntrl should be 0 for 0x9e"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0x9e\00"
define void @t_iscntrl_0x9e() {
%1 = call i64 @iscntrl(i32 158)
%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 795, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0x9e\00"
define void @t_iscntrl_0x9e() {
%1 = tail call i64 @iscntrl(i32 158)
%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 795, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ out_byte(int);
void out_le32(int c) {
  out_byte(c);
  out_byte(c >> 8);
  out_byte(c >> 16);
  out_byte(c >> 24);
}


x86 assembly (clang, -O0):
<out_le32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <out_byte@plt>
mov    -0x4(%rbp),%edi
sar    $0x8,%edi
call   1030 <out_byte@plt>
mov    -0x4(%rbp),%edi
sar    $0x10,%edi
call   1030 <out_byte@plt>
mov    -0x4(%rbp),%edi
sar    $0x18,%edi
call   1030 <out_byte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<out_le32>:
push   %rbx
mov    %edi,%ebx
call   1030 <out_byte@plt>
mov    %ebx,%edi
sar    $0x8,%edi
call   1030 <out_byte@plt>
mov    %ebx,%edi
sar    $0x10,%edi
call   1030 <out_byte@plt>
sar    $0x18,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <out_byte@plt>

LLVM IR (-O0):
define void @out_le32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @out_byte(i32 %3)
%5 = load i32, i32* %2
%6 = ashr i32 %5, 8
%7 = call i32 @out_byte(i32 %6)
%8 = load i32, i32* %2
%9 = ashr i32 %8, 16
%10 = call i32 @out_byte(i32 %9)
%11 = load i32, i32* %2
%12 = ashr i32 %11, 24
%13 = call i32 @out_byte(i32 %12)
ret void
}

LLVM IR (-O2):
define void @out_le32(i32 %0) {
%2 = tail call i32 @out_byte(i32 %0)
%3 = ashr i32 %0, 8
%4 = tail call i32 @out_byte(i32 %3)
%5 = ashr i32 %0, 16
%6 = tail call i32 @out_byte(i32 %5)
%7 = ashr i32 %0, 24
%8 = tail call i32 @out_byte(i32 %7)
ret void
}
int inzcont(fields, nfields)
register char **const fields;
const int nfields;
{
  if (nfields < 3 || nfields > 7) {
    error("wrong number of fields on Zone continuation line");
    return 0;
  }
  return inzsub(fields, nfields, 1);
}


x86 assembly (clang, -O0):
<inzcont>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jl     1143 <inzcont+0x23>
cmpl   $0x7,-0x14(%rbp)
jle    115d <inzcont+0x3d>
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1040 <error@plt>
movl   $0x0,-0x4(%rbp)
jmp    1173 <inzcont+0x53>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    $0x1,%edx
mov    $0x0,%al
call   1030 <inzsub@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inzcont>:
lea    -0x8(%rsi),%eax
cmp    $0xfffffffa,%eax
ja     113b <inzcont+0x1b>
push   %rax
lea    0xed0(%rip),%rdi
xor    %eax,%eax
call   1040 <error@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    $0x1,%edx
xor    %eax,%eax
jmp    1030 <inzsub@plt>

LLVM IR (-O0):
@.str = [49 x i8] c"wrong number of fields on Zone continuation line\00"
define i32 @inzcont(i8** %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
store i8** %0, i8*** %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp slt i32 %6, 3
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i32, i32* %5
%10 = icmp sgt i32 %9, 7
br i1 %10, label %11, label %13
11: ; preds = %8, %2
%12 = call i32 (i8*, ...) bitcast (i32 (...)* @error to i32 (i8*, ...)*)(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %17
13: ; preds = %8
%14 = load i8**, i8*** %4
%15 = load i32, i32* %5
%16 = call i32 (i8**, i32, i32, ...) bitcast (i32 (...)* @inzsub to i32 (i8**, i32, i32, ...)*)(i8** %14, i32 %15, i32 1)
store i32 %16, i32* %3
br label %17
17: ; preds = %13, %11
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@.str = [49 x i8] c"wrong number of fields on Zone continuation line\00"
define i32 @inzcont(i8** %0, i32 %1) {
%3 = add i32 %1, -8
%4 = icmp ult i32 %3, -5
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (i8*, ...) bitcast (i32 (...)* @error to i32 (i8*, ...)*)(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
br label %9
7: ; preds = %2
%8 = tail call i32 (i8**, i32, i32, ...) bitcast (i32 (...)* @inzsub to i32 (i8**, i32, i32, ...)*)(i8** %0, i32 %1, i32 1)
br label %9
9: ; preds = %7, %5
%10 = phi i32 [ 0, %5 ], [ %8, %7 ]
ret i32 %10
}
void trifree(memptr) int *memptr;
{ free(memptr); }


x86 assembly (clang, -O0):
<trifree>:
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):
<trifree>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @trifree(i32* nocapture %0) {
%2 = bitcast i32* %0 to i8*
tail call void @free(i8* %2)
ret void
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
scalar_t__ imul(scalar_t__, scalar_t__);
int32_t ilerp(int32_t a, int32_t b, int32_t t) { return a + imul(b - a, t); }


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

x86 assembly (clang, -O2):
<ilerp>:
push   %rbx
mov    %rdi,%rbx
sub    %rdi,%rsi
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1030 <imul@plt>
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @ilerp(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %4
%8 = load i64, i64* %5
%9 = load i64, i64* %4
%10 = sub nsw i64 %8, %9
%11 = load i64, i64* %6
%12 = call i64 @imul(i64 %10, i64 %11)
%13 = add nsw i64 %7, %12
ret i64 %13
}

LLVM IR (-O2):
define i64 @ilerp(i64 %0, i64 %1, i64 %2) {
%4 = sub nsw i64 %1, %0
%5 = tail call i64 @imul(i64 %4, i64 %2)
%6 = add nsw i64 %5, %0
ret i64 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ swscanf(int /*<<< orphan*/ *, int /*<<< orphan*/ *, ...);
void uninitvar_swscanf(void) {
  wchar_t *s;
  wchar_t *format;
  int i;
  (void)swscanf(s, format);
  (void)swscanf(s, format, &i);
}


x86 assembly (clang, -O0):
<uninitvar_swscanf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <swscanf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
mov    $0x0,%al
call   1030 <swscanf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninitvar_swscanf>:
push   %rax
xor    %eax,%eax
call   1030 <swscanf@plt>
lea    0x4(%rsp),%rdx
xor    %eax,%eax
call   1030 <swscanf@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @uninitvar_swscanf() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = load i32*, i32** %1
%5 = load i32*, i32** %2
%6 = call i32 (i32*, i32*, ...) @swscanf(i32* %4, i32* %5)
%7 = load i32*, i32** %1
%8 = load i32*, i32** %2
%9 = call i32 (i32*, i32*, ...) @swscanf(i32* %7, i32* %8, i32* %3)
ret void
}

LLVM IR (-O2):
define void @uninitvar_swscanf() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i32*, i32*, ...) @swscanf(i32* undef, i32* undef)
%4 = call i32 (i32*, i32*, ...) @swscanf(i32* undef, i32* undef, i32* %1)
ret void
}
/* Variables and functions */
double calcSqrt(double);
int /*<<< orphan*/ printf(char *, double, double);
int main() {
  double d = 100;
  printf("sqrt(%3.0f)=%2.0f\n", d, calcSqrt(d));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xec9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <calcSqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
call   1040 <calcSqrt@plt>
movaps %xmm0,%xmm1
lea    0xed0(%rip),%rdi
movsd  0xec0(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"sqrt(%3.0f)=%2.0f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
store double 1.000000e+02, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = call double @calcSqrt(double %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), double %3, double %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"sqrt(%3.0f)=%2.0f\0A\00"
define i32 @main() {
%1 = tail call double @calcSqrt(double 1.000000e+02)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), double 1.000000e+02, double %1)
ret i32 0
}
unsigned char gf4_mul_2(unsigned char a) {
  unsigned char r = a << 1;
  r ^= (a >> 1) * 7;
  return r;
}


x86 assembly (clang, -O0):
<gf4_mul_2>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x1,%eax
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
sar    $0x1,%eax
imul   $0x7,%eax,%ecx
movzbl -0x2(%rbp),%eax
xor    %ecx,%eax
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gf4_mul_2>:
lea    (%rdi,%rdi,1),%ecx
shr    %dil
movzbl %dil,%edx
lea    0x0(,%rdx,8),%eax
sub    %edx,%eax
xor    %cl,%al
ret

LLVM IR (-O0):
define zeroext i8 @gf4_mul_2(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = zext i8 %4 to i32
%6 = shl i32 %5, 1
%7 = trunc i32 %6 to i8
store i8 %7, i8* %3
%8 = load i8, i8* %2
%9 = zext i8 %8 to i32
%10 = ashr i32 %9, 1
%11 = mul nsw i32 %10, 7
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = xor i32 %13, %11
%15 = trunc i32 %14 to i8
store i8 %15, i8* %3
%16 = load i8, i8* %3
ret i8 %16
}

LLVM IR (-O2):
define zeroext i8 @gf4_mul_2(i8 zeroext %0) {
%2 = shl i8 %0, 1
%3 = lshr i8 %0, 1
%4 = mul i8 %3, 7
%5 = xor i8 %4, %2
ret i8 %5
}
/* Type definitions */
struct pollfd {
  int /*<<< orphan*/ member_2;
  int /*<<< orphan*/ member_1;
  int /*<<< orphan*/ member_0;
};

/* Variables and functions */
int /*<<< orphan*/ POLLIN;
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
scalar_t__ poll(struct pollfd *, int, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int key_avail() {
  struct pollfd fd = {0, POLLIN, 0};
  fflush(stdout);
  return poll(&fd, 1, 0) > 0;
}


x86 assembly (clang, -O0):
<key_avail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x10(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
call   1030 <fflush@plt>
lea    -0x10(%rbp),%rdi
mov    $0x1,%esi
xor    %edx,%edx
call   1040 <poll@plt>
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<key_avail>:
sub    $0x18,%rsp
movl   $0x0,0x8(%rsp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%eax
mov    %eax,0xc(%rsp)
movl   $0x0,0x10(%rsp)
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1030 <fflush@plt>
lea    0x8(%rsp),%rdi
mov    $0x1,%esi
xor    %edx,%edx
call   1040 <poll@plt>
xor    %ecx,%ecx
test   %rax,%rax
setg   %cl
mov    %ecx,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.pollfd = type { i32, i32, i32 }
@POLLIN = global i32 0
@stdout = global i32 0
define i32 @key_avail() {
%1 = alloca %struct.pollfd
%2 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %1, i32 0, i32 0
store i32 0, i32* %2
%3 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %1, i32 0, i32 1
%4 = load i32, i32* @POLLIN
store i32 %4, i32* %3
%5 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %1, i32 0, i32 2
store i32 0, i32* %5
%6 = load i32, i32* @stdout
%7 = call i32 @fflush(i32 %6)
%8 = call i64 @poll(%struct.pollfd* %1, i32 1, i32 0)
%9 = icmp sgt i64 %8, 0
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
%struct.pollfd = type { i32, i32, i32 }
@POLLIN = global i32 0
@stdout = global i32 0
define i32 @key_avail() {
%1 = alloca %struct.pollfd
%2 = bitcast %struct.pollfd* %1 to i8*
%3 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %1, i64 0, i32 0
store i32 0, i32* %3
%4 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %1, i64 0, i32 1
%5 = load i32, i32* @POLLIN
store i32 %5, i32* %4
%6 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %1, i64 0, i32 2
store i32 0, i32* %6
%7 = load i32, i32* @stdout
%8 = tail call i32 @fflush(i32 %7)
%9 = call i64 @poll(%struct.pollfd* %1, i32 1, i32 0)
%10 = icmp sgt i64 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
void notvoid(int type) {
  if (type == (0 << 2))
    error("cannot be void type");
}


x86 assembly (clang, -O0):
<notvoid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1131 <notvoid+0x21>
lea    0xed4(%rip),%rdi
call   1030 <error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<notvoid>:
test   %edi,%edi
je     1115 <notvoid+0x5>
ret
lea    0xee4(%rip),%rdi
jmp    1030 <error@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"cannot be void type\00"
define void @notvoid(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @error(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"cannot be void type\00"
define void @notvoid(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @error(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ siginfo_t;

/* Variables and functions */
int /*<<< orphan*/ fetchData();
void signalHandler(int cause, siginfo_t *HowCome, void *ucontext) {
  fetchData();
}


x86 assembly (clang, -O0):
<signalHandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1030 <fetchData@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @signalHandler(i32 %0, i32* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i8*
store i32 %0, i32* %4
store i32* %1, i32** %5
store i8* %2, i8** %6
%7 = call i32 (...) @fetchData()
ret void
}

LLVM IR (-O2):
define void @signalHandler(i32 %0, i32* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32 (...) @fetchData()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cam_reset_proj();
int /*<<< orphan*/ cam_reset_stereo();
int /*<<< orphan*/ cam_reset_view();
void cam_reset(void) {
  cam_reset_view();
  cam_reset_proj();
  cam_reset_stereo();
}


x86 assembly (clang, -O0):
<cam_reset>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <cam_reset_view@plt>
mov    $0x0,%al
call   1030 <cam_reset_proj@plt>
mov    $0x0,%al
call   1050 <cam_reset_stereo@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cam_reset>:
push   %rax
xor    %eax,%eax
call   1040 <cam_reset_view@plt>
xor    %eax,%eax
call   1030 <cam_reset_proj@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <cam_reset_stereo@plt>

LLVM IR (-O0):
define void @cam_reset() {
%1 = call i32 (...) @cam_reset_view()
%2 = call i32 (...) @cam_reset_proj()
%3 = call i32 (...) @cam_reset_stereo()
ret void
}

LLVM IR (-O2):
define void @cam_reset() {
%1 = tail call i32 (...) @cam_reset_view()
%2 = tail call i32 (...) @cam_reset_proj()
%3 = tail call i32 (...) @cam_reset_stereo()
ret void
}
/* Variables and functions */
int exact_square(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int number = 9;
  int has_square = 0;
  has_square = exact_square(number);
  printf("%d\n", has_square);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x9,%edi
call   1040 <exact_square@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @exact_square(i32 9)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int kmain() {
  idt_init();
  system_timer_init();
  keyboard_init();
  asm("sti");
  nibbles_play();
  do {
    asm("hlt");
  } while (1);
  return 0;
}


x86 assembly (clang, -O0):
<kmain>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <idt_init@plt>
mov    $0x0,%al
call   1060 <system_timer_init@plt>
mov    $0x0,%al
call   1040 <keyboard_init@plt>
sti
mov    $0x0,%al
call   1030 <nibbles_play@plt>
hlt
mov    $0x1,%al
test   $0x1,%al
jne    1161 <kmain+0x21>
jmp    1171 <kmain+0x31>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kmain>:
push   %rax
xor    %eax,%eax
call   1050 <idt_init@plt>
xor    %eax,%eax
call   1060 <system_timer_init@plt>
xor    %eax,%eax
call   1040 <keyboard_init@plt>
sti
xor    %eax,%eax
call   1030 <nibbles_play@plt>
xchg   %ax,%ax
hlt
jmp    1160 <kmain+0x20>

LLVM IR (-O0):
define i32 @kmain() {
%1 = call i32 (...) @idt_init()
%2 = call i32 (...) @system_timer_init()
%3 = call i32 (...) @keyboard_init()
%4 = call i32 (...) @nibbles_play()
br label %5
5: ; preds = %6, %0
br label %6
6: ; preds = %5
br i1 true, label %5, label %7
7: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
define i32 @kmain() {
%1 = tail call i32 (...) @idt_init()
%2 = tail call i32 (...) @system_timer_init()
%3 = tail call i32 (...) @keyboard_init()
tail call void asm sideeffect "sti", "~{dirflag},~{fpsr},~{flags}"()
%4 = tail call i32 (...) @nibbles_play()
br label %5
5: ; preds = %5, %0
tail call void asm sideeffect "hlt", "~{dirflag},~{fpsr},~{flags}"()
br label %5
}
/* Variables and functions */
int /*<<< orphan*/ RRA();
int /*<<< orphan*/ T_WAIT_UNTIL(int);
void op_0x1f(void) {
  RRA();
  T_WAIT_UNTIL(4);
  return;
}


x86 assembly (clang, -O0):
<op_0x1f>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <RRA@plt>
mov    $0x4,%edi
call   1040 <T_WAIT_UNTIL@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_0x1f>:
push   %rax
xor    %eax,%eax
call   1030 <RRA@plt>
mov    $0x4,%edi
pop    %rax
jmp    1040 <T_WAIT_UNTIL@plt>

LLVM IR (-O0):
define void @op_0x1f() {
%1 = call i32 (...) @RRA()
%2 = call i32 @T_WAIT_UNTIL(i32 4)
ret void
}

LLVM IR (-O2):
define void @op_0x1f() {
%1 = tail call i32 (...) @RRA()
%2 = tail call i32 @T_WAIT_UNTIL(i32 4)
ret void
}
/* Variables and functions */
double cos(double);
double blackman(int n, int N) {
  return (0.42 - 0.5 * cos(2.0 * 3.14 * (double)n / (double)(N - 1)) +
          0.08 * cos(4.0 * 3.14 * (double)n / (double)(N - 1)));
}


x86 assembly (clang, -O0):
<blackman>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm1
movsd  0xef5(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
call   1030 <cos@plt>
movsd  0xec6(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xec2(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm1
movsd  0xe9c(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
call   1030 <cos@plt>
movsd  -0x10(%rbp),%xmm1
movsd  0xe70(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blackman>:
sub    $0x18,%rsp
cvtsi2sd %edi,%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  0xeda(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0xffffffff,%esi
xorps  %xmm1,%xmm1
cvtsi2sd %esi,%xmm1
movsd  %xmm1,(%rsp)
divsd  %xmm1,%xmm0
call   1030 <cos@plt>
mulsd  0xebe(%rip),%xmm0
addsd  0xebe(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
mulsd  0xeb2(%rip),%xmm0
divsd  (%rsp),%xmm0
call   1030 <cos@plt>
mulsd  0xea8(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @blackman(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 = sitofp i32 %5 to double
%7 = fmul double 6.280000e+00, %6
%8 = load i32, i32* %4
%9 = sub nsw i32 %8, 1
%10 = sitofp i32 %9 to double
%11 = fdiv double %7, %10
%12 = call double @cos(double %11)
%13 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %12, double 4.200000e-01)
%14 = load i32, i32* %3
%15 = sitofp i32 %14 to double
%16 = fmul double 1.256000e+01, %15
%17 = load i32, i32* %4
%18 = sub nsw i32 %17, 1
%19 = sitofp i32 %18 to double
%20 = fdiv double %16, %19
%21 = call double @cos(double %20)
%22 = call double @llvm.fmuladd.f64(double 8.000000e-02, double %21, double %13)
ret double %22
}

LLVM IR (-O2):
define double @blackman(i32 %0, i32 %1) {
%3 = sitofp i32 %0 to double
%4 = fmul double %3, 6.280000e+00
%5 = add nsw i32 %1, -1
%6 = sitofp i32 %5 to double
%7 = fdiv double %4, %6
%8 = tail call double @cos(double %7)
%9 = tail call double @llvm.fmuladd.f64(double %8, double -5.000000e-01, double 4.200000e-01)
%10 = fmul double %3, 1.256000e+01
%11 = fdiv double %10, %6
%12 = tail call double @cos(double %11)
%13 = tail call double @llvm.fmuladd.f64(double %12, double 8.000000e-02, double %9)
ret double %13
}
void Get_Receipt() {}


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

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

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

LLVM IR (-O2):
define void @Get_Receipt() {
ret void
}
/* Variables and functions */
scalar_t__ chdir(char *);
char *curdir();
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ perror(char *);
void cwd(void) {
  char *dir = curdir();
  if (chdir(dir) != 0) {
    perror("setting current dir");
  }
  free(dir);
}


x86 assembly (clang, -O0):
<cwd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <curdir@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <chdir@plt>
cmp    $0x0,%rax
je     1172 <cwd+0x32>
lea    0xe93(%rip),%rdi
call   1060 <perror@plt>
mov    -0x8(%rbp),%rdi
call   1040 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cwd>:
push   %rbx
xor    %eax,%eax
call   1030 <curdir@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <chdir@plt>
test   %rax,%rax
jne    1161 <cwd+0x21>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <free@plt>
lea    0xe98(%rip),%rdi
call   1060 <perror@plt>
jmp    1158 <cwd+0x18>

LLVM IR (-O0):
@.str = [20 x i8] c"setting current dir\00"
define void @cwd() {
%1 = alloca i8*
%2 = call i8* (...) @curdir()
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i64 @chdir(i8* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %0
%9 = load i8*, i8** %1
%10 = call i32 @free(i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"setting current dir\00"
define void @cwd() {
%1 = tail call i8* (...) @curdir()
%2 = tail call i64 @chdir(i8* %1)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %0
%7 = tail call i32 @free(i8* %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int /*<<< orphan*/ BIO_get_data(int /*<<< orphan*/ *);
int /*<<< orphan*/ BIO_set_data(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ BIO_set_init(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ EVP_MD_CTX_free(int /*<<< orphan*/);
int md_free(BIO *a) {
  if (a == NULL)
    return (0);
  EVP_MD_CTX_free(BIO_get_data(a));
  BIO_set_data(a, NULL);
  BIO_set_init(a, 0);
  return 1;
}


x86 assembly (clang, -O0):
<md_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1163 <md_free+0x23>
movl   $0x0,-0x4(%rbp)
jmp    1192 <md_free+0x52>
mov    -0x10(%rbp),%rdi
call   1060 <BIO_get_data@plt>
mov    %eax,%edi
call   1030 <EVP_MD_CTX_free@plt>
mov    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <BIO_set_data@plt>
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1050 <BIO_set_init@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<md_free>:
test   %rdi,%rdi
je     1170 <md_free+0x30>
push   %rbx
mov    %rdi,%rbx
call   1060 <BIO_get_data@plt>
mov    %eax,%edi
call   1030 <EVP_MD_CTX_free@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <BIO_set_data@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1050 <BIO_set_init@plt>
mov    $0x1,%eax
pop    %rbx
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @md_free(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i32 @BIO_get_data(i32* %0)
%5 = tail call i32 @EVP_MD_CTX_free(i32 %4)
%6 = tail call i32 @BIO_set_data(i32* %0, i32* null)
%7 = tail call i32 @BIO_set_init(i32* %0, i32 0)
br label %8
8: ; preds = %1, %3
%9 = phi i32 [ 1, %3 ], [ 0, %1 ]
ret i32 %9
}
void mus_lshort_to_char(unsigned char *j, short x) {
  unsigned char *ox;
  ox = (unsigned char *)&x;
  j[0] = ox[1];
  j[1] = ox[0];
}


x86 assembly (clang, -O0):
<mus_lshort_to_char>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
lea    -0xa(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mus_lshort_to_char>:
rol    $0x8,%si
mov    %si,(%rdi)
ret

LLVM IR (-O0):
define void @mus_lshort_to_char(i8* %0, i16 signext %1) {
%3 = alloca i8*
%4 = alloca i16
%5 = alloca i8*
store i8* %0, i8** %3
store i16 %1, i16* %4
%6 = bitcast i16* %4 to i8*
store i8* %6, i8** %5
%7 = load i8*, i8** %5
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 0
store i8 %9, i8* %11
%12 = load i8*, i8** %5
%13 = getelementptr inbounds i8, i8* %12, i64 0
%14 = load i8, i8* %13
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8 %14, i8* %16
ret void
}

LLVM IR (-O2):
define void @mus_lshort_to_char(i8* nocapture writeonly %0, i16 signext %1) {
%3 = trunc i16 %1 to i8
%4 = lshr i16 %1, 8
%5 = trunc i16 %4 to i8
store i8 %5, i8* %0
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %3, i8* %6
ret void
}
void (*signal(int sig))(int) { return 0; }


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

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

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

LLVM IR (-O2):
define noalias void (i32)* @signal(i32 %0) {
ret void (i32)* null
}