xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_memblock_get_length() {
  printf("NOT IMPLEMENTED:"
         "pa_memblock_get_length"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [39 x i8] c"NOT IMPLEMENTED:pa_memblock_get_length\00"
define i32 @pa_memblock_get_length() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M140_f(char *s) {
  debug("M140_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M140_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M140_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"M140_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M140_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [47 x i8] c"M140_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M140_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
double float_uniform(int *seed) {
  int k;
  k = *seed / 127773;
  *seed = 16807 * (*seed - k * 127773) - k * 2836;
  if (*seed < 0)
    *seed += 2147483647;
  return ((double)(*seed) * 4.656612875E-10);
}


x86 assembly (clang, -O0):
<float_uniform>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    $0x1f31d,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
imul   $0x1f31d,-0xc(%rbp),%ecx
sub    %ecx,%eax
imul   $0x41a7,%eax,%ecx
imul   $0xb14,-0xc(%rbp),%eax
sub    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
jge    1158 <float_uniform+0x58>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0x7fffffff,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
cvtsi2sdl (%rax),%xmm0
movsd  0xe98(%rip),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_uniform>:
movslq (%rdi),%rax
imul   $0xffffffff834e0b5f,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x10,%ecx
add    %edx,%ecx
imul   $0xfffe0ce3,%ecx,%edx
add    %eax,%edx
imul   $0x41a7,%edx,%eax
imul   $0xfffff4ec,%ecx,%ecx
lea    (%rax,%rcx,1),%edx
add    $0x7fffffff,%edx
add    %ecx,%eax
cmovns %eax,%edx
mov    %edx,(%rdi)
cvtsi2sd %edx,%xmm0
mulsd  0xeb6(%rip),%xmm0
ret

LLVM IR (-O0):
define double @float_uniform(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* %4
%6 = sdiv i32 %5, 127773
store i32 %6, i32* %3
%7 = load i32*, i32** %2
%8 = load i32, i32* %7
%9 = load i32, i32* %3
%10 = mul nsw i32 %9, 127773
%11 = sub nsw i32 %8, %10
%12 = mul nsw i32 16807, %11
%13 = load i32, i32* %3
%14 = mul nsw i32 %13, 2836
%15 = sub nsw i32 %12, %14
%16 = load i32*, i32** %2
store i32 %15, i32* %16
%17 = load i32*, i32** %2
%18 = load i32, i32* %17
%19 = icmp slt i32 %18, 0
br i1 %19, label %20, label %24
20: ; preds = %1
%21 = load i32*, i32** %2
%22 = load i32, i32* %21
%23 = add nsw i32 %22, 2147483647
store i32 %23, i32* %21
br label %24
24: ; preds = %20, %1
%25 = load i32*, i32** %2
%26 = load i32, i32* %25
%27 = sitofp i32 %26 to double
%28 = fmul double %27, 0x3E000000001C5F68
ret double %28
}

LLVM IR (-O2):
define double @float_uniform(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = sdiv i32 %2, 127773
%4 = mul nsw i32 %3, -127773
%5 = add i32 %4, %2
%6 = mul nsw i32 %5, 16807
%7 = mul nsw i32 %3, -2836
%8 = add i32 %6, %7
%9 = icmp slt i32 %8, 0
%10 = add nsw i32 %8, 2147483647
%11 = select i1 %9, i32 %10, i32 %8
store i32 %11, i32* %0
%12 = sitofp i32 %11 to double
%13 = fmul double %12, 0x3E000000001C5F68
ret double %13
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *_time_t2tm(int /*<<< orphan*/ const *, int /*<<< orphan*/,
                      struct tm *);
struct tm *gmtime_r(const time_t *clock, struct tm *result) {
  return _time_t2tm(clock, 0, result);
}


x86 assembly (clang, -O0):
<gmtime_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <_time_t2tm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gmtime_r>:
mov    %rsi,%rdx
xor    %esi,%esi
jmp    1030 <_time_t2tm@plt>

LLVM IR (-O0):
%struct.tm = type { i32 }
define %struct.tm* @gmtime_r(i32* %0, %struct.tm* %1) {
%3 = alloca i32*
%4 = alloca %struct.tm*
store i32* %0, i32** %3
store %struct.tm* %1, %struct.tm** %4
%5 = load i32*, i32** %3
%6 = load %struct.tm*, %struct.tm** %4
%7 = call %struct.tm* @_time_t2tm(i32* %5, i32 0, %struct.tm* %6)
ret %struct.tm* %7
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define %struct.tm* @gmtime_r(i32* %0, %struct.tm* %1) {
%3 = tail call %struct.tm* @_time_t2tm(i32* %0, i32 0, %struct.tm* %1)
ret %struct.tm* %3
}
int hi(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @hi() {
ret i32 0
}
char *ep2fd(epoch)
double epoch;
{
  double tsec;
  tsec = ep2ts(epoch);
  return (ts2fd(tsec));
}


x86 assembly (clang, -O0):
<ep2fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x1,%al
call   1040 <ep2ts@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0x1,%al
call   1030 <ts2fd@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ep2fd>:
push   %rax
mov    $0x1,%al
call   1040 <ep2ts@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mov    $0x1,%al
call   1030 <ts2fd@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i8* @ep2fd(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call i32 (double, ...) bitcast (i32 (...)* @ep2ts to i32 (double, ...)*)(double %4)
%6 = sitofp i32 %5 to double
store double %6, double* %3
%7 = load double, double* %3
%8 = call i32 (double, ...) bitcast (i32 (...)* @ts2fd to i32 (double, ...)*)(double %7)
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i8*
ret i8* %10
}

LLVM IR (-O2):
define i8* @ep2fd(double %0) {
%2 = tail call i32 (double, ...) bitcast (i32 (...)* @ep2ts to i32 (double, ...)*)(double %0)
%3 = sitofp i32 %2 to double
%4 = tail call i32 (double, ...) bitcast (i32 (...)* @ts2fd to i32 (double, ...)*)(double %3)
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ PrintErrorCode();
int dxl_read_byte(int, int);
int /*<<< orphan*/ printf(char *, int);
void getP(int ID) {
  int pVal;
  pVal = dxl_read_byte(ID, 26);
  if (0)
    printf("dynamixel pVal %d\n", pVal);
  PrintErrorCode();
}


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

x86 assembly (clang, -O2):
<getP>:
push   %rax
mov    $0x1a,%esi
call   1040 <dxl_read_byte@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <PrintErrorCode@plt>

LLVM IR (-O0):
define void @getP(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @dxl_read_byte(i32 %4, i32 26)
store i32 %5, i32* %3
%6 = call i32 (...) @PrintErrorCode()
ret void
}

LLVM IR (-O2):
define void @getP(i32 %0) {
%2 = tail call i32 @dxl_read_byte(i32 %0, i32 26)
%3 = tail call i32 (...) @PrintErrorCode()
ret void
}
/* Variables and functions */
void qsort(void *base, size_t nmemb, size_t size,
           int (*compar)(const void *, const void *)) {}


x86 assembly (clang, -O0):
<qsort>:
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):
<qsort>:
ret

LLVM IR (-O0):
define void @qsort(i8* %0, i64 %1, i64 %2, i32 (i8*, i8*)* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32 (i8*, i8*)*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32 (i8*, i8*)* %3, i32 (i8*, i8*)** %8
ret void
}

LLVM IR (-O2):
define void @qsort(i8* nocapture %0, i64 %1, i64 %2, i32 (i8*, i8*)* nocapture %3) {
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ serial;
};
struct TYPE_4__ {
  TYPE_1__ xcirculaterequest;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xcirculaterequest_serial(void *_p) {
  return (unsigned long)((XEvent *)_p)->xcirculaterequest.serial;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i64 @get_XEvent_xcirculaterequest_serial(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @get_XEvent_xcirculaterequest_serial(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Type definitions */
struct wl_shm_pool {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ shm_pool_unref(struct wl_shm_pool *, int);
__attribute__((visibility("default"))) void
wl_shm_pool_unref(struct wl_shm_pool *pool) {
  shm_pool_unref(pool, true);
}


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

x86 assembly (clang, -O2):
<wl_shm_pool_unref>:
mov    $0x1,%esi
jmp    1030 <shm_pool_unref@plt>

LLVM IR (-O0):
%struct.wl_shm_pool = type { i32 }
define void @wl_shm_pool_unref(%struct.wl_shm_pool* %0) {
%2 = alloca %struct.wl_shm_pool*
store %struct.wl_shm_pool* %0, %struct.wl_shm_pool** %2
%3 = load %struct.wl_shm_pool*, %struct.wl_shm_pool** %2
%4 = call i32 @shm_pool_unref(%struct.wl_shm_pool* %3, i32 1)
ret void
}

LLVM IR (-O2):
%struct.wl_shm_pool = type { i32 }
define void @wl_shm_pool_unref(%struct.wl_shm_pool* %0) {
%2 = tail call i32 @shm_pool_unref(%struct.wl_shm_pool* %0, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
int fibo1(int);
int main() {
  int x = 2;
  int result = fibo1(x);
  if (result == 1) {
    __VERIFIER_error();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <fibo1@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    1152 <main+0x32>
mov    $0x0,%al
call   1040 <__VERIFIER_error@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
call   1030 <fibo1@plt>
cmp    $0x1,%eax
jne    1137 <main+0x17>
xor    %eax,%eax
call   1040 <__VERIFIER_error@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @fibo1(i32 2)
%2 = icmp eq i32 %1, 1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @__VERIFIER_error()
br label %5
5: ; preds = %3, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ TCOFLUSH;
int /*<<< orphan*/ tcflush(int, int /*<<< orphan*/);
int write(int, char *, int);
int uart_send(int fd, char *data, int datalen) {
  int len = 0;
  len = write(fd, data, datalen);
  if (len == datalen) {
    return len;
  } else {
    tcflush(fd, TCOFLUSH);
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<uart_send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <write@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jne    1162 <uart_send+0x42>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    117a <uart_send+0x5a>
mov    -0x8(%rbp),%edi
mov    0x2e84(%rip),%rax
mov    (%rax),%esi
call   1040 <tcflush@plt>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_send>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %edi,%ebp
call   1030 <write@plt>
cmp    %ebx,%eax
je     1145 <uart_send+0x25>
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
mov    %ebp,%edi
call   1040 <tcflush@plt>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@TCOFLUSH = global i32 0
define i32 @uart_send(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 0, i32* %8
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = call i32 @write(i32 %9, i8* %10, i32 %11)
store i32 %12, i32* %8
%13 = load i32, i32* %8
%14 = load i32, i32* %7
%15 = icmp eq i32 %13, %14
br i1 %15, label %16, label %18
16: ; preds = %3
%17 = load i32, i32* %8
store i32 %17, i32* %4
br label %22
18: ; preds = %3
%19 = load i32, i32* %5
%20 = load i32, i32* @TCOFLUSH
%21 = call i32 @tcflush(i32 %19, i32 %20)
store i32 -1, i32* %4
br label %22
22: ; preds = %18, %16
%23 = load i32, i32* %4
ret i32 %23
}

LLVM IR (-O2):
@TCOFLUSH = global i32 0
define i32 @uart_send(i32 %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @write(i32 %0, i8* %1, i32 %2)
%5 = icmp eq i32 %4, %2
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = load i32, i32* @TCOFLUSH
%8 = tail call i32 @tcflush(i32 %0, i32 %7)
br label %9
9: ; preds = %3, %6
%10 = phi i32 [ -1, %6 ], [ %2, %3 ]
ret i32 %10
}
/* Variables and functions */
float fabsf(float);
bool equal_floats(float a, float b) {
  float threshold = 1.0f / 8192.0f;
  return fabsf(a - b) < threshold;
}


x86 assembly (clang, -O0):
<equal_floats>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  0xefa(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm1
subss  -0x8(%rbp),%xmm1
movaps 0xed4(%rip),%xmm0
pand   %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<equal_floats>:
subss  %xmm1,%xmm0
andps  0xef5(%rip),%xmm0
movss  0xefd(%rip),%xmm1
xor    %eax,%eax
ucomiss %xmm0,%xmm1
seta   %al
ret

LLVM IR (-O0):
define i32 @equal_floats(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
store float 0x3F20000000000000, float* %5
%6 = load float, float* %3
%7 = load float, float* %4
%8 = fsub float %6, %7
%9 = call float @llvm.fabs.f32(float %8)
%10 = load float, float* %5
%11 = fcmp olt float %9, %10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @equal_floats(float %0, float %1) {
%3 = fsub float %0, %1
%4 = tail call float @llvm.fabs.f32(float %3)
%5 = fcmp olt float %4, 0x3F20000000000000
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M117_f(char *s) {
  debug("M117_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M117_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M117_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"M117_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M117_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [47 x i8] c"M117_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M117_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, unsigned char, unsigned char,
                           unsigned char, unsigned char);
char *icv2string(unsigned char *icv) {
  char *string = (char *)malloc(12);
  sprintf(string, "%02X %02X %02X %02X", icv[0], icv[1], icv[2], icv[3]);
  return string;
}


x86 assembly (clang, -O0):
<icv2string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0xc,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    (%rax),%dl
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x8(%rbp),%rax
mov    0x2(%rax),%r8b
mov    -0x8(%rbp),%rax
lea    0xea2(%rip),%rsi
movzbl %dl,%edx
movzbl %cl,%ecx
movzbl %r8b,%r8d
movzbl 0x3(%rax),%r9d
call   1040 <sprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<icv2string>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    $0xc,%edi
call   1030 <malloc@plt>
mov    %rax,%r14
movzbl (%rbx),%edx
movzbl 0x1(%rbx),%ecx
movzbl 0x2(%rbx),%r8d
movzbl 0x3(%rbx),%r9d
lea    0xeb4(%rip),%rsi
mov    %rax,%rdi
call   1040 <sprintf@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [20 x i8] c"%02X %02X %02X %02X\00"
define i8* @icv2string(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = call i64 @malloc(i32 12)
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 0
%9 = load i8, i8* %8
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i64 2
%15 = load i8, i8* %14
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i64 3
%18 = load i8, i8* %17
%19 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8 zeroext %9, i8 zeroext %12, i8 zeroext %15, i8 zeroext %18)
%20 = load i8*, i8** %3
ret i8* %20
}

LLVM IR (-O2):
@.str = [20 x i8] c"%02X %02X %02X %02X\00"
define i8* @icv2string(i8* nocapture %0) {
%2 = tail call i64 @malloc(i32 12)
%3 = inttoptr i64 %2 to i8*
%4 = load i8, i8* %0
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %0, i64 2
%8 = load i8, i8* %7
%9 = getelementptr inbounds i8, i8* %0, i64 3
%10 = load i8, i8* %9
%11 = tail call i32 @sprintf(i8* dereferenceable(1) %3, i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8 zeroext %4, i8 zeroext %6, i8 zeroext %8, i8 zeroext %10)
ret i8* %3
}
void cdrom_null_audio_stop() {}


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

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

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

LLVM IR (-O2):
define void @cdrom_null_audio_stop() {
ret void
}
/* Variables and functions */
int countbits(unsigned int);
int bitparity(unsigned int n) { return 1 - (countbits(n) & 1) * 2; }


x86 assembly (clang, -O0):
<bitparity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <countbits@plt>
mov    %eax,%ecx
and    $0x1,%ecx
shl    $0x1,%ecx
mov    $0x1,%eax
sub    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitparity>:
push   %rax
call   1030 <countbits@plt>
add    %eax,%eax
and    $0x2,%eax
mov    $0x1,%ecx
sub    %eax,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @bitparity(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @countbits(i32 %3)
%5 = and i32 %4, 1
%6 = mul nsw i32 %5, 2
%7 = sub nsw i32 1, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @bitparity(i32 %0) {
%2 = tail call i32 @countbits(i32 %0)
%3 = shl i32 %2, 1
%4 = and i32 %3, 2
%5 = sub nsw i32 1, %4
ret i32 %5
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int *malloc(int);
int /*<<< orphan*/ memcpy(int *, int *, int);
uint8_t *bstr_create(uint8_t *data, uint8_t len) {
  uint8_t *str = malloc(1 + len * sizeof(uint8_t));
  if (!str)
    return 0;
  *str = len;
  memcpy(str + 1, data, len);
  return str;
}


x86 assembly (clang, -O0):
<bstr_create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
add    $0x1,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    115e <bstr_create+0x3e>
movq   $0x0,-0x8(%rbp)
jmp    1183 <bstr_create+0x63>
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rdi
add    $0x4,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bstr_create>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%r15d
mov    %rdi,%r14
lea    0x1(,%r15,4),%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1155 <bstr_create+0x35>
mov    %r15d,(%rbx)
mov    %rbx,%rdi
add    $0x4,%rdi
mov    %r14,%rsi
mov    %r15d,%edx
call   1030 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32* @bstr_create(i32* %0, i32 %1) {
%3 = shl i32 %1, 2
%4 = or i32 %3, 1
%5 = tail call i32* @malloc(i32 %4)
%6 = icmp eq i32* %5, null
br i1 %6, label %10, label %7
7: ; preds = %2
store i32 %1, i32* %5
%8 = getelementptr inbounds i32, i32* %5, i64 1
%9 = tail call i32 @memcpy(i32* %8, i32* %0, i32 %1)
br label %10
10: ; preds = %2, %7
ret i32* %5
}
/* Variables and functions */
int ENOSYS;
int /*<<< orphan*/ __set_errno(int);
int __ttyname_r(int fd, char *buf, size_t buflen) {
  __set_errno(ENOSYS);
  return ENOSYS;
}


x86 assembly (clang, -O0):
<__ttyname_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    0x2eb0(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ttyname_r>:
push   %rbx
mov    0x2ed0(%rip),%rbx
mov    (%rbx),%edi
call   1030 <__set_errno@plt>
mov    (%rbx),%eax
pop    %rbx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @__ttyname_r(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i32, i32* @ENOSYS
%8 = call i32 @__set_errno(i32 %7)
%9 = load i32, i32* @ENOSYS
ret i32 %9
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @__ttyname_r(i32 %0, i8* nocapture readnone %1, i64 %2) {
%4 = load i32, i32* @ENOSYS
%5 = tail call i32 @__set_errno(i32 %4)
%6 = load i32, i32* @ENOSYS
ret i32 %6
}
/* Variables and functions */
int rj_readword(int);
int rj_writebyte(int, unsigned char);
int rj_readadc(unsigned char mux) {
  int rval;
  rval = rj_writebyte(0x40, mux);
  rval = rj_readword(0x41);
  return rval;
}


x86 assembly (clang, -O0):
<rj_readadc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x40,%edi
movzbl -0x1(%rbp),%esi
call   1030 <rj_writebyte@plt>
mov    %eax,-0x8(%rbp)
mov    $0x41,%edi
call   1040 <rj_readword@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rj_readadc>:
push   %rax
mov    %edi,%esi
mov    $0x40,%edi
call   1030 <rj_writebyte@plt>
mov    $0x41,%edi
pop    %rax
jmp    1040 <rj_readword@plt>

LLVM IR (-O0):
define i32 @rj_readadc(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = call i32 @rj_writebyte(i32 64, i8 zeroext %4)
store i32 %5, i32* %3
%6 = call i32 @rj_readword(i32 65)
store i32 %6, i32* %3
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @rj_readadc(i8 zeroext %0) {
%2 = tail call i32 @rj_writebyte(i32 64, i8 zeroext %0)
%3 = tail call i32 @rj_readword(i32 65)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void errf(char *program, char *filespc) {
  fprintf(stderr, "%s: %s format error\n", program, filespc);
  exit(-1);
}


x86 assembly (clang, -O0):
<errf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<errf>:
push   %rax
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    0xec9(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [21 x i8] c"%s: %s format error\0A\00"
define void @errf(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7)
%9 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [21 x i8] c"%s: %s format error\0A\00"
define void @errf(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%5 = tail call i32 @exit(i32 -1)
unreachable
}
/* Type definitions */
struct termios {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
int /*<<< orphan*/ serparm_to_str(char *, int, struct termios *);
void show_ser_params(FILE *stream, struct termios *termctl) {
  char buf[80];
  serparm_to_str(buf, 79, termctl);
  fprintf(stream, "%s\n", buf);
}


x86 assembly (clang, -O0):
<show_ser_params>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x60(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    $0x4f,%esi
call   1040 <serparm_to_str@plt>
mov    -0x8(%rbp),%rdi
lea    -0x60(%rbp),%rdx
lea    0xeaf(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_ser_params>:
push   %r14
push   %rbx
sub    $0x58,%rsp
mov    %rsi,%rdx
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x4f,%esi
call   1040 <serparm_to_str@plt>
lea    0xebc(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
call   1030 <fprintf@plt>
add    $0x58,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.termios = type { i32 }
@.str = [4 x i8] c"%s\0A\00"
define void @show_ser_params(i32* %0, %struct.termios* %1) {
%3 = alloca i32*
%4 = alloca %struct.termios*
%5 = alloca [80 x i8]
store i32* %0, i32** %3
store %struct.termios* %1, %struct.termios** %4
%6 = getelementptr inbounds [80 x i8], [80 x i8]* %5, i64 0, i64 0
%7 = load %struct.termios*, %struct.termios** %4
%8 = call i32 @serparm_to_str(i8* %6, i32 79, %struct.termios* %7)
%9 = load i32*, i32** %3
%10 = getelementptr inbounds [80 x i8], [80 x i8]* %5, i64 0, i64 0
%11 = call i32 @fprintf(i32* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %10)
ret void
}

LLVM IR (-O2):
%struct.termios = type { i32 }
@.str = [4 x i8] c"%s\0A\00"
define void @show_ser_params(i32* nocapture %0, %struct.termios* %1) {
%3 = alloca [80 x i8]
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%5 = call i32 @serparm_to_str(i8* %4, i32 79, %struct.termios* %1)
%6 = call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, double);
void print_number(char s[], double number) {
  printf("%s = %1.8f\n", s, number);
}


x86 assembly (clang, -O0):
<print_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
movsd  -0x10(%rbp),%xmm0
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_number>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"%s = %1.8f\0A\00"
define void @print_number(i8* %0, double %1) {
%3 = alloca i8*
%4 = alloca double
store i8* %0, i8** %3
store double %1, double* %4
%5 = load i8*, i8** %3
%6 = load double, double* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %5, double %6)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%s = %1.8f\0A\00"
define void @print_number(i8* %0, double %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0, double %1)
ret void
}
void nseel_asm_mul_op_fast_end(void) {}


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

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

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

LLVM IR (-O2):
define void @nseel_asm_mul_op_fast_end() {
ret void
}
__attribute__((no, noclone)) unsigned __int128 t171_5sub(signed __int128 x) {
  unsigned __int128 r;
  if (__builtin_sub_overflow(x, (signed __int128)(2), &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t171_5sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    %rcx,%r9
sar    $0x3f,%r9
add    $0xfffffffffffffffe,%rdx
adc    $0xffffffffffffffff,%rcx
mov    %r9,%r8
adc    $0xffffffffffffffff,%r8
adc    $0xffffffffffffffff,%r9
mov    %r8d,%eax
and    $0x1,%eax
mov    %eax,%esi
mov    %rsi,%rax
neg    %rax
mov    %rax,%rdi
xor    %r9,%rdi
xor    %r8,%rax
or     %rdi,%rax
or     %rsi,%rax
setne  %al
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x38(%rbp)
test   $0x1,%al
jne    1187 <t171_5sub+0x77>
jmp    118e <t171_5sub+0x7e>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t171_5sub>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
mov    %rdi,%r14
add    $0xfffffffffffffffe,%r14
mov    %rsi,%rbx
adc    $0xffffffffffffffff,%rbx
mov    $0x1,%ecx
cmp    %rdi,%rcx
sbb    %rsi,%rax
jl     1138 <t171_5sub+0x28>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %r14,%rax
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t171_5sub(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = sext i128 %11 to i129
%13 = call { i129, i1 } @llvm.ssub.with.overflow.i129(i129 %12, i129 2)
%14 = extractvalue { i129, i1 } %13, 1
%15 = extractvalue { i129, i1 } %13, 0
%16 = trunc i129 %15 to i128
%17 = zext i128 %16 to i129
%18 = icmp ne i129 %15, %17
%19 = or i1 %14, %18
store i128 %16, i128* %6
br i1 %19, label %20, label %22
20: ; preds = %2
%21 = call i32 (...) @bar()
br label %22
22: ; preds = %20, %2
%23 = load i128, i128* %6
store i128 %23, i128* %3
%24 = bitcast i128* %3 to { i64, i64 }*
%25 = load { i64, i64 }, { i64, i64 }* %24
ret { i64, i64 } %25
}

LLVM IR (-O2):
define { i64, i64 } @t171_5sub(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = zext i128 %6 to i129
%8 = add nsw i129 %7, -2
%9 = icmp slt i128 %6, 2
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i129 %8 to i64
%14 = lshr i129 %8, 64
%15 = trunc i129 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}
int HelpItem132(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem132() {
ret i32 0
}
/* Variables and functions */
scalar_t__ qe_inrange(int, char, float);
int qe_isxdigit(int c) {
  return (qe_inrange(c, '0', '9') || qe_inrange(c | ('a' - 'A'), 'a', 'f'));
}


x86 assembly (clang, -O0):
<qe_isxdigit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x30,%esi
movss  0xed5(%rip),%xmm0
call   1030 <qe_inrange@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1164 <qe_isxdigit+0x54>
mov    -0x4(%rbp),%edi
or     $0x20,%edi
mov    $0x61,%esi
movss  0xeaf(%rip),%xmm0
call   1030 <qe_inrange@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qe_isxdigit>:
push   %rbx
mov    %edi,%ebx
movss  0xee5(%rip),%xmm0
mov    $0x30,%esi
call   1030 <qe_inrange@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1134 <qe_isxdigit+0x24>
pop    %rbx
ret
or     $0x20,%ebx
movss  0xec5(%rip),%xmm0
mov    %ebx,%edi
mov    $0x61,%esi
call   1030 <qe_inrange@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @qe_isxdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @qe_inrange(i32 %3, i8 signext 48, float 5.700000e+01)
%5 = icmp ne i64 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = or i32 %7, 32
%9 = call i64 @qe_inrange(i32 %8, i8 signext 97, float 1.020000e+02)
%10 = icmp ne i64 %9, 0
br label %11
11: ; preds = %6, %1
%12 = phi i1 [ true, %1 ], [ %10, %6 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @qe_isxdigit(i32 %0) {
%2 = tail call i64 @qe_inrange(i32 %0, i8 signext 48, float 5.700000e+01)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = or i32 %0, 32
%6 = tail call i64 @qe_inrange(i32 %5, i8 signext 97, float 1.020000e+02)
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %4, %1
%10 = phi i32 [ 1, %1 ], [ %8, %4 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x74() {
  Assert_real((isspace(116) == 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_isspace.c",
              585, ("isspace should be 0 for t"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0x74>:
push   %rax
mov    $0x74,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x249,%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_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for t\00"
define void @t_isspace_0x74() {
%1 = call i64 @isspace(i32 116)
%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 585, i8* getelementptr inbounds ([26 x i8], [26 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_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for t\00"
define void @t_isspace_0x74() {
%1 = tail call i64 @isspace(i32 116)
%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 585, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ap(int);
void testit(void) {
  int ir[4] = {0, 1, 2, 3};
  int ix, n, m;
  n = 1;
  m = 3;
  for (ix = 1; ix <= 4; ix++) {
    if (n == 1)
      m = 4;
    else
      m = n - 1;
    ap(ir[n - 1]);
    n = m;
  }
}


x86 assembly (clang, -O0):
<testit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x8(%rbp)
movl   $0x1,-0x18(%rbp)
movl   $0x3,-0x1c(%rbp)
movl   $0x1,-0x14(%rbp)
cmpl   $0x4,-0x14(%rbp)
jg     1191 <testit+0x81>
cmpl   $0x1,-0x18(%rbp)
jne    1163 <testit+0x53>
movl   $0x4,-0x1c(%rbp)
jmp    116c <testit+0x5c>
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x10(%rbp,%rax,4),%edi
call   1030 <ap@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1143 <testit+0x33>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testit>:
push   %rax
xor    %edi,%edi
call   1030 <ap@plt>
mov    $0x3,%edi
call   1030 <ap@plt>
mov    $0x2,%edi
call   1030 <ap@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <ap@plt>

LLVM IR (-O0):
@__const.testit.ir = [4 x i32] [i32 0, i32 1, i32 2, i32 3]
define void @testit() {
%1 = alloca [4 x i32]
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast [4 x i32]* %1 to i8*
store i32 1, i32* %3
store i32 3, i32* %4
store i32 1, i32* %2
br label %6
6: ; preds = %24, %0
%7 = load i32, i32* %2
%8 = icmp sle i32 %7, 4
br i1 %8, label %9, label %27
9: ; preds = %6
%10 = load i32, i32* %3
%11 = icmp eq i32 %10, 1
br i1 %11, label %12, label %13
12: ; preds = %9
store i32 4, i32* %4
br label %16
13: ; preds = %9
%14 = load i32, i32* %3
%15 = sub nsw i32 %14, 1
store i32 %15, i32* %4
br label %16
16: ; preds = %13, %12
%17 = load i32, i32* %3
%18 = sub nsw i32 %17, 1
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 %19
%21 = load i32, i32* %20
%22 = call i32 @ap(i32 %21)
%23 = load i32, i32* %4
store i32 %23, i32* %3
br label %24
24: ; preds = %16
%25 = load i32, i32* %2
%26 = add nsw i32 %25, 1
store i32 %26, i32* %2
br label %6
27: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @testit() {
%1 = tail call i32 @ap(i32 0)
%2 = tail call i32 @ap(i32 3)
%3 = tail call i32 @ap(i32 2)
%4 = tail call i32 @ap(i32 1)
ret void
}
void trace_print_seq(struct seq_file *m, struct trace_seq *s) {}


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

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

LLVM IR (-O0):
%struct.seq_file = type opaque
%struct.trace_seq = type opaque
define void @trace_print_seq(%struct.seq_file* %0, %struct.trace_seq* %1) {
%3 = alloca %struct.seq_file*
%4 = alloca %struct.trace_seq*
store %struct.seq_file* %0, %struct.seq_file** %3
store %struct.trace_seq* %1, %struct.trace_seq** %4
ret void
}

LLVM IR (-O2):
%struct.seq_file = type opaque
%struct.trace_seq = type opaque
define void @trace_print_seq(%struct.seq_file* nocapture %0, %struct.trace_seq* nocapture %1) {
ret void
}
int test_imm_CCint8_mem(signed char *val) {
  return ((*val) & (0xCC << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_CCint8_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, 204
%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_CCint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -52
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void get_parsed_section_info() {}


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

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

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

LLVM IR (-O2):
define void @get_parsed_section_info() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dump_error(char *);
scalar_t__ malloc(unsigned int);
unsigned int *uvector(unsigned int nl, unsigned int nh) {
  unsigned int *v;
  v = (unsigned int *)malloc((unsigned)(nh - nl + 1) * sizeof(unsigned int));
  if (!v)
    dump_error("allocation failure in uvector()");
  return v - nl;
}


x86 assembly (clang, -O0):
<uvector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,%eax
shl    $0x2,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115f <uvector+0x3f>
lea    0xea6(%rip),%rdi
call   1030 <dump_error@plt>
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
mov    %ecx,%edx
xor    %ecx,%ecx
sub    %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uvector>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
sub    %edi,%esi
lea    0x4(,%rsi,4),%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1147 <uvector+0x27>
lea    0xebe(%rip),%rdi
call   1030 <dump_error@plt>
mov    %ebp,%eax
shl    $0x2,%rax
sub    %rax,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [32 x i8] c"allocation failure in uvector()\00"
define i32* @uvector(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = sub i32 %6, %7
%9 = add i32 %8, 1
%10 = zext i32 %9 to i64
%11 = mul i64 %10, 4
%12 = trunc i64 %11 to i32
%13 = call i64 @malloc(i32 %12)
%14 = inttoptr i64 %13 to i32*
store i32* %14, i32** %5
%15 = load i32*, i32** %5
%16 = icmp ne i32* %15, null
br i1 %16, label %19, label %17
17: ; preds = %2
%18 = call i32 @dump_error(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %19
19: ; preds = %17, %2
%20 = load i32*, i32** %5
%21 = load i32, i32* %3
%22 = zext i32 %21 to i64
%23 = sub i64 0, %22
%24 = getelementptr inbounds i32, i32* %20, i64 %23
ret i32* %24
}

LLVM IR (-O2):
@.str = [32 x i8] c"allocation failure in uvector()\00"
define i32* @uvector(i32 %0, i32 %1) {
%3 = sub i32 %1, %0
%4 = shl i32 %3, 2
%5 = add i32 %4, 4
%6 = tail call i64 @malloc(i32 %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 @dump_error(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %2
%11 = inttoptr i64 %6 to i32*
%12 = zext i32 %0 to i64
%13 = sub nsw i64 0, %12
%14 = getelementptr inbounds i32, i32* %11, i64 %13
ret i32* %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() { printf("usage: toccut <filename> <prefix>\n"); }


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"usage: toccut <filename> <prefix>\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [34 x i8] c"usage: toccut <filename> <prefix>\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
ret void
}