xunge/DecIR huggingface dataset:
/* Variables and functions */
int ENOENT;
int log_cnt_matches_after_timestamp(int /*<<< orphan*/, double *,
                                    int /*<<< orphan*/ *);
int log_get_last_timestamp(double *timestamp) {
  int ret = log_cnt_matches_after_timestamp(0, timestamp, NULL);
  if (!ret)
    return -ENOENT;
  return (ret > 0) ? 0 : ret;
}


x86 assembly (clang, -O0):
<log_get_last_timestamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
xor    %edi,%edi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <log_cnt_matches_after_timestamp@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    114b <log_get_last_timestamp+0x3b>
xor    %eax,%eax
mov    0x2e97(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    116b <log_get_last_timestamp+0x5b>
cmpl   $0x0,-0x14(%rbp)
jle    115f <log_get_last_timestamp+0x4f>
xor    %eax,%eax
mov    %eax,-0x18(%rbp)
jmp    1165 <log_get_last_timestamp+0x55>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_get_last_timestamp>:
push   %rbx
mov    %rdi,%rsi
xor    %ebx,%ebx
xor    %edi,%edi
xor    %edx,%edx
call   1030 <log_cnt_matches_after_timestamp@plt>
mov    %eax,%ecx
sar    $0x1f,%ecx
mov    0x2ead(%rip),%rdx
sub    (%rdx),%ebx
and    %eax,%ecx
test   %eax,%eax
cmovne %ecx,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@ENOENT = global i32 0
define i32 @log_get_last_timestamp(double* %0) {
%2 = alloca i32
%3 = alloca double*
%4 = alloca i32
store double* %0, double** %3
%5 = load double*, double** %3
%6 = call i32 @log_cnt_matches_after_timestamp(i32 0, double* %5, i32* null)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %1
%10 = load i32, i32* @ENOENT
%11 = sub nsw i32 0, %10
store i32 %11, i32* %2
br label %20
12: ; preds = %1
%13 = load i32, i32* %4
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %12
br label %18
16: ; preds = %12
%17 = load i32, i32* %4
br label %18
18: ; preds = %16, %15
%19 = phi i32 [ 0, %15 ], [ %17, %16 ]
store i32 %19, i32* %2
br label %20
20: ; preds = %18, %9
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
@ENOENT = global i32 0
define i32 @log_get_last_timestamp(double* %0) {
%2 = tail call i32 @log_cnt_matches_after_timestamp(i32 0, double* %0, i32* null)
%3 = icmp eq i32 %2, 0
%4 = icmp slt i32 %2, 0
%5 = select i1 %4, i32 %2, i32 0
%6 = load i32, i32* @ENOENT
%7 = sub nsw i32 0, %6
%8 = select i1 %3, i32 %7, i32 %5
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void xxfree(void *s) { free(s); }


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

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

LLVM IR (-O2):
define void @xxfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
struct vmfile {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ memset(int /*<<< orphan*/, int /*<<< orphan*/, size_t);
size_t vmfile_alloc(struct vmfile *, size_t);
int /*<<< orphan*/ vmfile_data_ofs(struct vmfile *, size_t);
size_t vmfile_alloczero(struct vmfile *vmb, size_t n) {
  size_t loc = vmfile_alloc(vmb, n);
  memset(vmfile_data_ofs(vmb, loc), 0, n);
  return loc;
}


x86 assembly (clang, -O0):
<vmfile_alloczero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <vmfile_alloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <vmfile_data_ofs@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vmfile_alloczero>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <vmfile_alloc@plt>
mov    %rax,%r15
mov    %rbx,%rdi
mov    %rax,%rsi
call   1050 <vmfile_data_ofs@plt>
mov    %eax,%edi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.vmfile = type { i32 }
define i64 @vmfile_alloczero(%struct.vmfile* %0, i64 %1) {
%3 = alloca %struct.vmfile*
%4 = alloca i64
%5 = alloca i64
store %struct.vmfile* %0, %struct.vmfile** %3
store i64 %1, i64* %4
%6 = load %struct.vmfile*, %struct.vmfile** %3
%7 = load i64, i64* %4
%8 = call i64 @vmfile_alloc(%struct.vmfile* %6, i64 %7)
store i64 %8, i64* %5
%9 = load %struct.vmfile*, %struct.vmfile** %3
%10 = load i64, i64* %5
%11 = call i32 @vmfile_data_ofs(%struct.vmfile* %9, i64 %10)
%12 = load i64, i64* %4
%13 = call i32 @memset(i32 %11, i32 0, i64 %12)
%14 = load i64, i64* %5
ret i64 %14
}

LLVM IR (-O2):
%struct.vmfile = type { i32 }
define i64 @vmfile_alloczero(%struct.vmfile* %0, i64 %1) {
%3 = tail call i64 @vmfile_alloc(%struct.vmfile* %0, i64 %1)
%4 = tail call i32 @vmfile_data_ofs(%struct.vmfile* %0, i64 %3)
%5 = tail call i32 @memset(i32 %4, i32 0, i64 %1)
ret i64 %3
}
unsigned int fn3(int a) { return a - (unsigned)((a / 3) * 3); }


x86 assembly (clang, -O0):
<fn3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
imul   $0x3,%ecx,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn3>:
movslq %edi,%rax
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @fn3(i32 %0) {
%2 = srem i32 %0, 3
ret i32 %2
}
/* Variables and functions */
double fpoint();
int /*<<< orphan*/ printf(char *, double);
int main(int argc, char **argv) { printf("%f\n", fpoint()); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call double (...) @fpoint()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %3)
ret i32 0
}
__attribute__((no, noclone)) unsigned bar(void) {
  asm volatile("" : : : "memory");
  return 2001;
}


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

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

LLVM IR (-O0):
define i32 @bar() {
ret i32 2001
}

LLVM IR (-O2):
define i32 @bar() {
tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret i32 2001
}
/* Variables and functions */
char *strjoin(char *array[], int n) { return NULL; }


x86 assembly (clang, -O0):
<strjoin>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @strjoin(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
store i8** %0, i8*** %3
store i32 %1, i32* %4
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @strjoin(i8** nocapture readnone %0, i32 %1) {
ret i8* null
}
void zlibVersion(void) {}


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

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

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

LLVM IR (-O2):
define void @zlibVersion() {
ret void
}
void __prussintc_set_cmr(unsigned int *pruintc_io, unsigned short sysevt,
                         unsigned short channel) {
  pruintc_io[(0x400 + (sysevt & ~(0x3))) >> 2] |=
      ((channel & 0xF) << ((sysevt & 0x3) << 3));
}


x86 assembly (clang, -O0):
<__prussintc_set_cmr>:
push   %rbp
mov    %rsp,%rbp
mov    %dx,%ax
mov    %si,%cx
mov    %rdi,-0x8(%rbp)
mov    %cx,-0xa(%rbp)
mov    %ax,-0xc(%rbp)
movzwl -0xc(%rbp),%edx
and    $0xf,%edx
movzwl -0xa(%rbp),%ecx
and    $0x3,%ecx
shl    $0x3,%ecx
shl    %cl,%edx
mov    -0x8(%rbp),%rax
movzwl -0xa(%rbp),%ecx
and    $0xfffffffc,%ecx
add    $0x400,%ecx
sar    $0x2,%ecx
movslq %ecx,%rcx
or     (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__prussintc_set_cmr>:
and    $0xf,%edx
lea    0x0(,%rsi,8),%ecx
shl    %cl,%edx
and    $0xfffffffc,%esi
or     %edx,0x400(%rsi,%rdi,1)
ret

LLVM IR (-O0):
define void @__prussintc_set_cmr(i32* %0, i16 zeroext %1, i16 zeroext %2) {
%4 = alloca i32*
%5 = alloca i16
%6 = alloca i16
store i32* %0, i32** %4
store i16 %1, i16* %5
store i16 %2, i16* %6
%7 = load i16, i16* %6
%8 = zext i16 %7 to i32
%9 = and i32 %8, 15
%10 = load i16, i16* %5
%11 = zext i16 %10 to i32
%12 = and i32 %11, 3
%13 = shl i32 %12, 3
%14 = shl i32 %9, %13
%15 = load i32*, i32** %4
%16 = load i16, i16* %5
%17 = zext i16 %16 to i32
%18 = and i32 %17, -4
%19 = add nsw i32 1024, %18
%20 = ashr i32 %19, 2
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i32, i32* %15, i64 %21
%23 = load i32, i32* %22
%24 = or i32 %23, %14
store i32 %24, i32* %22
ret void
}

LLVM IR (-O2):
define void @__prussintc_set_cmr(i32* nocapture %0, i16 zeroext %1, i16 zeroext %2) {
%4 = and i16 %2, 15
%5 = zext i16 %4 to i32
%6 = zext i16 %1 to i32
%7 = shl nuw nsw i32 %6, 3
%8 = and i32 %7, 24
%9 = shl nuw nsw i32 %5, %8
%10 = and i32 %6, 65532
%11 = add nuw nsw i32 %10, 1024
%12 = lshr exact i32 %11, 2
%13 = zext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %0, i64 %13
%15 = load i32, i32* %14
%16 = or i32 %15, %9
store i32 %16, i32* %14
ret void
}
void dump_decrypted_data(struct encrypted_key_payload *epayload) {}


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

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

LLVM IR (-O0):
%struct.encrypted_key_payload = type opaque
define void @dump_decrypted_data(%struct.encrypted_key_payload* %0) {
%2 = alloca %struct.encrypted_key_payload*
store %struct.encrypted_key_payload* %0, %struct.encrypted_key_payload** %2
ret void
}

LLVM IR (-O2):
%struct.encrypted_key_payload = type opaque
define void @dump_decrypted_data(%struct.encrypted_key_payload* nocapture %0) {
ret void
}
unsigned short __max_unsigned_short(unsigned short x, unsigned short y) {
  return ((x) > (y) ? (x) : (y));
}


x86 assembly (clang, -O0):
<__max_unsigned_short>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movzwl -0x2(%rbp),%eax
movzwl -0x4(%rbp),%ecx
cmp    %ecx,%eax
jle    112e <__max_unsigned_short+0x2e>
movzwl -0x2(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1135 <__max_unsigned_short+0x35>
movzwl -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__max_unsigned_short>:
mov    %esi,%eax
cmp    %ax,%di
cmova  %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @__max_unsigned_short(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = load i16, i16* %4
%8 = zext i16 %7 to i32
%9 = icmp sgt i32 %6, %8
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i16, i16* %3
%12 = zext i16 %11 to i32
br label %16
13: ; preds = %2
%14 = load i16, i16* %4
%15 = zext i16 %14 to i32
br label %16
16: ; preds = %13, %10
%17 = phi i32 [ %12, %10 ], [ %15, %13 ]
%18 = trunc i32 %17 to i16
ret i16 %18
}

LLVM IR (-O2):
define zeroext i16 @__max_unsigned_short(i16 zeroext %0, i16 zeroext %1) {
%3 = icmp ugt i16 %0, %1
%4 = select i1 %3, i16 %0, i16 %1
ret i16 %4
}
void __attribute__((unused)) out_of_stack_marker() {}


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

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

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

LLVM IR (-O2):
define void @out_of_stack_marker() {
ret void
}
/* Variables and functions */
char *_s2_f2cstr(char *, long);
int /*<<< orphan*/ free(char *);
unsigned int ss2lt(char *);
unsigned int ss2lt_(char *itexturefn, long int textlen) {
  char *ttex = _s2_f2cstr(itexturefn, textlen);
  unsigned int result = ss2lt(ttex);
  free(ttex);
  return result;
}


x86 assembly (clang, -O0):
<ss2lt_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <_s2_f2cstr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <ss2lt@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ss2lt_>:
push   %rbp
push   %rbx
push   %rax
call   1040 <_s2_f2cstr@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <ss2lt@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ss2lt_(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %3
store i64 %1, i64* %4
%7 = load i8*, i8** %3
%8 = load i64, i64* %4
%9 = call i8* @_s2_f2cstr(i8* %7, i64 %8)
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = call i32 @ss2lt(i8* %10)
store i32 %11, i32* %6
%12 = load i8*, i8** %5
%13 = call i32 @free(i8* %12)
%14 = load i32, i32* %6
ret i32 %14
}

LLVM IR (-O2):
define i32 @ss2lt_(i8* %0, i64 %1) {
%3 = tail call i8* @_s2_f2cstr(i8* %0, i64 %1)
%4 = tail call i32 @ss2lt(i8* %3)
%5 = tail call i32 @free(i8* %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ AbsoluteIndexedXX1(int);
int /*<<< orphan*/ ROR16(int /*<<< orphan*/, int);
void Op7EM0X1(void) { ROR16(AbsoluteIndexedXX1(3), 0xFFFFFF); }


x86 assembly (clang, -O0):
<Op7EM0X1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1040 <AbsoluteIndexedXX1@plt>
mov    %eax,%edi
mov    $0xffffff,%esi
call   1030 <ROR16@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Op7EM0X1>:
push   %rax
mov    $0x3,%edi
call   1040 <AbsoluteIndexedXX1@plt>
mov    %eax,%edi
mov    $0xffffff,%esi
pop    %rax
jmp    1030 <ROR16@plt>

LLVM IR (-O0):
define void @Op7EM0X1() {
%1 = call i32 @AbsoluteIndexedXX1(i32 3)
%2 = call i32 @ROR16(i32 %1, i32 16777215)
ret void
}

LLVM IR (-O2):
define void @Op7EM0X1() {
%1 = tail call i32 @AbsoluteIndexedXX1(i32 3)
%2 = tail call i32 @ROR16(i32 %1, i32 16777215)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x36() {
  Assert_real((iscntrl(54) == 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",
              275, ("iscntrl should be 0 for 6"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0x36>:
push   %rax
mov    $0x36,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x113,%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 = [26 x i8] c"iscntrl should be 0 for 6\00"
define void @t_iscntrl_0x36() {
%1 = call i64 @iscntrl(i32 54)
%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 275, 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_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for 6\00"
define void @t_iscntrl_0x36() {
%1 = tail call i64 @iscntrl(i32 54)
%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 275, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int ffs(long long);
int ffsll(long long int i) {
  unsigned long long int x = i & -i;
  if (x <= 0xffffffff)
    return ffs(i);
  else
    return 32 + ffs(i >> 32);
}


x86 assembly (clang, -O0):
<ffsll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
xor    %ecx,%ecx
sub    -0x10(%rbp),%rcx
and    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    $0xffffffff,%eax
cmp    %rax,-0x18(%rbp)
ja     114d <ffsll+0x3d>
mov    -0x10(%rbp),%rdi
call   1030 <ffs@plt>
mov    %eax,-0x4(%rbp)
jmp    1160 <ffsll+0x50>
mov    -0x10(%rbp),%rdi
sar    $0x20,%rdi
call   1030 <ffs@plt>
add    $0x20,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ffsll>:
mov    %rdi,%rax
neg    %rax
and    %rdi,%rax
shr    $0x20,%rax
jne    111f <ffsll+0x1f>
bsf    %rdi,%rcx
add    $0x1,%ecx
xor    %eax,%eax
test   %rdi,%rdi
cmovne %ecx,%eax
ret
sar    $0x20,%rdi
bsf    %rdi,%rax
add    $0x21,%eax
ret

LLVM IR (-O0):
define i32 @ffsll(i64 %0) {
%2 = alloca i32
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
%5 = load i64, i64* %3
%6 = load i64, i64* %3
%7 = sub nsw i64 0, %6
%8 = and i64 %5, %7
store i64 %8, i64* %4
%9 = load i64, i64* %4
%10 = icmp ule i64 %9, 4294967295
br i1 %10, label %11, label %14
11: ; preds = %1
%12 = load i64, i64* %3
%13 = call i32 @ffs(i64 %12)
store i32 %13, i32* %2
br label %19
14: ; preds = %1
%15 = load i64, i64* %3
%16 = ashr i64 %15, 32
%17 = call i32 @ffs(i64 %16)
%18 = add nsw i32 32, %17
store i32 %18, i32* %2
br label %19
19: ; preds = %14, %11
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @ffsll(i64 %0) {
%2 = sub nsw i64 0, %0
%3 = and i64 %2, %0
%4 = icmp ult i64 %3, 4294967296
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = tail call i64 @llvm.cttz.i64(i64 %0, i1 true)
%7 = trunc i64 %6 to i32
%8 = add nuw nsw i32 %7, 1
%9 = icmp eq i64 %0, 0
%10 = select i1 %9, i32 0, i32 %8
br label %16
11: ; preds = %1
%12 = ashr i64 %0, 32
%13 = tail call i64 @llvm.cttz.i64(i64 %12, i1 true)
%14 = trunc i64 %13 to i32
%15 = add nuw nsw i32 %14, 33
br label %16
16: ; preds = %11, %5
%17 = phi i32 [ %10, %5 ], [ %15, %11 ]
ret i32 %17
}
/* Variables and functions */
char *mac_rand();
int /*<<< orphan*/ strncpy(char *, char *, int);
char *mac_rand_half(void) {
  static char half_buffer[9] = {0};
  char *full_buffer = {0};
  full_buffer = mac_rand();
  strncpy(half_buffer, full_buffer, 8);
  return (half_buffer);
}


x86 assembly (clang, -O0):
<mac_rand_half>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1040 <mac_rand@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0x2eeb(%rip),%rdi
mov    $0x8,%edx
call   1030 <strncpy@plt>
lea    0x2eda(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mac_rand_half>:
push   %rbx
xor    %eax,%eax
call   1040 <mac_rand@plt>
lea    0x2f02(%rip),%rbx
mov    %rbx,%rdi
mov    %rax,%rsi
mov    $0x8,%edx
call   1030 <strncpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@mac_rand_half.half_buffer = internal global [9 x i8] zeroinitializer
define i8* @mac_rand_half() {
%1 = alloca i8*
store i8* null, i8** %1
%2 = call i8* (...) @mac_rand()
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @strncpy(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @mac_rand_half.half_buffer, i64 0, i64 0), i8* %3, i32 8)
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @mac_rand_half.half_buffer, i64 0, i64 0)
}

LLVM IR (-O2):
@mac_rand_half.half_buffer = internal global [9 x i8] zeroinitializer
define i8* @mac_rand_half() {
%1 = tail call i8* (...) @mac_rand()
%2 = tail call i32 @strncpy(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @mac_rand_half.half_buffer, i64 0, i64 0), i8* %1, i32 8)
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @mac_rand_half.half_buffer, i64 0, i64 0)
}
const char *guess_tuntap_dev(const char *dev, const char *dev_type,
                             const char *dev_node, struct gc_arena *gc) {
  return dev;
}


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

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

LLVM IR (-O0):
%struct.gc_arena = type opaque
define i8* @guess_tuntap_dev(i8* %0, i8* %1, i8* %2, %struct.gc_arena* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca %struct.gc_arena*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store %struct.gc_arena* %3, %struct.gc_arena** %8
%9 = load i8*, i8** %5
ret i8* %9
}

LLVM IR (-O2):
%struct.gc_arena = type opaque
define i8* @guess_tuntap_dev(i8* readnone returned %0, i8* nocapture readnone %1, i8* nocapture readnone %2, %struct.gc_arena* nocapture readnone %3) {
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ hej();
int main() {
  hej();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @hej()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_cvtsi64_si128(long long);
__m128i test_mm_cvtsi64_si128(long long A) { return _mm_cvtsi64_si128(A); }


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

x86 assembly (clang, -O2):
<test_mm_cvtsi64_si128>:
jmp    1030 <_mm_cvtsi64_si128@plt>

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

LLVM IR (-O2):
define i32 @test_mm_cvtsi64_si128(i64 %0) {
%2 = tail call i32 @_mm_cvtsi64_si128(i64 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ clock();
void dosomething(void) {
  int i;
  for (i = 0; i < 900000; i++) {
    clock();
  }
}


x86 assembly (clang, -O0):
<dosomething>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0xdbba0,-0x4(%rbp)
jge    1141 <dosomething+0x31>
mov    $0x0,%al
call   1030 <clock@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <dosomething+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dosomething>:
push   %rbx
mov    $0xdbba0,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <clock@plt>
add    $0xffffffff,%ebx
jne    1120 <dosomething+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @dosomething() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 (...) @clock()
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 900000
br i1 %5, label %6, label %1
6: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int posix_memalign(void **, int, size_t);
void *aligned16_malloc(size_t size) {
  void *memptr = NULL;
  int r = posix_memalign(&memptr, 16, size);
  assert(r == 0);
  return memptr;
}


x86 assembly (clang, -O0):
<aligned16_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdx
lea    -0x10(%rbp),%rdi
mov    $0x10,%esi
call   1040 <posix_memalign@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aligned16_malloc>:
push   %rax
mov    %rdi,%rdx
movq   $0x0,(%rsp)
mov    %rsp,%rdi
mov    $0x10,%esi
call   1040 <posix_memalign@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1030 <assert@plt>
mov    (%rsp),%rax
pop    %rcx
ret

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

LLVM IR (-O2):
define i8* @aligned16_malloc(i64 %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
store i8* null, i8** %2
%4 = call i32 @posix_memalign(i8** %2, i32 16, i64 %0)
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load i8*, i8** %2
ret i8* %8
}
/* Type definitions */
typedef int /*<<< orphan*/ aio_context_t;

/* Variables and functions */
int /*<<< orphan*/ __NR_io_destroy;
int syscall(int /*<<< orphan*/, int /*<<< orphan*/);
int __io_destroy(aio_context_t ctx_id) {
  return syscall(__NR_io_destroy, ctx_id);
}


x86 assembly (clang, -O0):
<__io_destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__io_destroy>:
mov    %edi,%esi
mov    0x2ebf(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@__NR_io_destroy = global i32 0
define i32 @__io_destroy(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @__NR_io_destroy
%4 = load i32, i32* %2
%5 = call i32 @syscall(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@__NR_io_destroy = global i32 0
define i32 @__io_destroy(i32 %0) {
%2 = load i32, i32* @__NR_io_destroy
%3 = tail call i32 @syscall(i32 %2, i32 %0)
ret i32 %3
}
int sys_waitpid(tcp)
struct tcb *tcp;
{
  return printwaitn(tcp, 3, 0);
}


x86 assembly (clang, -O0):
<sys_waitpid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3,%esi
xor    %edx,%edx
mov    $0x0,%al
call   1030 <printwaitn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_waitpid>:
mov    $0x3,%esi
xor    %edx,%edx
xor    %eax,%eax
jmp    1030 <printwaitn@plt>

LLVM IR (-O0):
%struct.tcb = type opaque
define i32 @sys_waitpid(%struct.tcb* %0) {
%2 = alloca %struct.tcb*
store %struct.tcb* %0, %struct.tcb** %2
%3 = load %struct.tcb*, %struct.tcb** %2
%4 = call i32 (%struct.tcb*, i32, i32, ...) bitcast (i32 (...)* @printwaitn to i32 (%struct.tcb*, i32, i32, ...)*)(%struct.tcb* %3, i32 3, i32 0)
ret i32 %4
}

LLVM IR (-O2):
%struct.tcb = type opaque
define i32 @sys_waitpid(%struct.tcb* %0) {
%2 = tail call i32 (%struct.tcb*, i32, i32, ...) bitcast (i32 (...)* @printwaitn to i32 (%struct.tcb*, i32, i32, ...)*)(%struct.tcb* %0, i32 3, i32 0)
ret i32 %2
}
/* Variables and functions */
int getindex(double const, double const *);
int nitem(const double *range) { return getindex(range[1], range) + 1; }


x86 assembly (clang, -O0):
<nitem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rdi
call   1030 <getindex@plt>
add    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nitem>:
push   %rax
movsd  0x8(%rdi),%xmm0
call   1030 <getindex@plt>
add    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @nitem(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 1
%5 = load double, double* %4
%6 = load double*, double** %2
%7 = call i32 @getindex(double %5, double* %6)
%8 = add nsw i32 %7, 1
ret i32 %8
}

LLVM IR (-O2):
define i32 @nitem(double* %0) {
%2 = getelementptr inbounds double, double* %0, i64 1
%3 = load double, double* %2
%4 = tail call i32 @getindex(double %3, double* %0)
%5 = add nsw i32 %4, 1
ret i32 %5
}
char isWhitespace(int c) {
  return (c == ' ' || c == '\r' || c == '\n' || c == '\t' || c == '\f' ||
          c == '\v');
}


x86 assembly (clang, -O0):
<isWhitespace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <isWhitespace+0x5c>
mov    $0x1,%al
cmpl   $0xd,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <isWhitespace+0x5c>
mov    $0x1,%al
cmpl   $0xa,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <isWhitespace+0x5c>
mov    $0x1,%al
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <isWhitespace+0x5c>
mov    $0x1,%al
cmpl   $0xc,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <isWhitespace+0x5c>
cmpl   $0xb,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isWhitespace>:
cmp    $0x20,%edi
ja     111a <isWhitespace+0x1a>
mov    $0x1,%al
mov    %edi,%ecx
movabs $0x100003600,%rdx
bt     %rcx,%rdx
jae    111a <isWhitespace+0x1a>
ret
cmp    $0xb,%edi
sete   %al
ret

LLVM IR (-O0):
define signext i8 @isWhitespace(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 32
br i1 %4, label %20, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 13
br i1 %7, label %20, label %8
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 10
br i1 %10, label %20, label %11
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 9
br i1 %13, label %20, label %14
14: ; preds = %11
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 12
br i1 %16, label %20, label %17
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp eq i32 %18, 11
br label %20
20: ; preds = %17, %14, %11, %8, %5, %1
%21 = phi i1 [ true, %14 ], [ true, %11 ], [ true, %8 ], [ true, %5 ], [ true, %1 ], [ %19, %17 ]
%22 = zext i1 %21 to i32
%23 = trunc i32 %22 to i8
ret i8 %23
}

LLVM IR (-O2):
define signext i8 @isWhitespace(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %5
i32 13, label %5
i32 12, label %5
i32 10, label %5
i32 9, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 11
%4 = zext i1 %3 to i8
br label %5
5: ; preds = %1, %1, %1, %1, %1, %2
%6 = phi i8 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i8 %6
}
int base32_handles_dots() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @base32_handles_dots() {
ret i32 0
}
indreg0adr1(r0, r1, x0, x1, p0, p1) double r0, r1;
double *p0, *p1;
{
  if ((*p0) <= (*((double *)(11111111 & ~(__alignof__(double) - 1)))))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<indreg0adr1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
mov    %esi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm1
mov    $0xa98ac0,%eax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jb     1143 <indreg0adr1+0x43>
movl   $0x1,-0x4(%rbp)
jmp    114a <indreg0adr1+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<indreg0adr1>:
movsd  0xa98ac0,%xmm0
xor    %eax,%eax
ucomisd (%rdx),%xmm0
setae  %al
ret

LLVM IR (-O0):
define i32 @indreg0adr1(double %0, double %1, i32 %2, i32 %3, double* %4, double* %5) {
%7 = alloca i32
%8 = alloca double
%9 = alloca double
%10 = alloca i32
%11 = alloca i32
%12 = alloca double*
%13 = alloca double*
store double %0, double* %8
store double %1, double* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store double* %4, double** %12
store double* %5, double** %13
%14 = load double*, double** %12
%15 = load double, double* %14
%16 = load double, double* inttoptr (i64 11111104 to double*)
%17 = fcmp ole double %15, %16
br i1 %17, label %18, label %19
18: ; preds = %6
store i32 1, i32* %7
br label %20
19: ; preds = %6
store i32 0, i32* %7
br label %20
20: ; preds = %19, %18
%21 = load i32, i32* %7
ret i32 %21
}

LLVM IR (-O2):
define i32 @indreg0adr1(double %0, double %1, i32 %2, i32 %3, double* nocapture %4, double* nocapture readnone %5) {
%7 = load double, double* %4
%8 = load double, double* inttoptr (i64 11111104 to double*)
%9 = fcmp ole double %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ set_warn_handler(void *);
int /*<<< orphan*/ warn_obj_v(char const *, char const *, int /*<<< orphan*/);
void die_obj_v(const char *obj, const char *p, va_list args) {
  set_warn_handler(((void *)0));
  warn_obj_v(obj, p, args);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<die_obj_v>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <set_warn_handler@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <warn_obj_v@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<die_obj_v>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
xor    %edi,%edi
call   1040 <set_warn_handler@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1030 <warn_obj_v@plt>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @die_obj_v(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = call i32 @set_warn_handler(i8* null)
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @warn_obj_v(i8* %8, i8* %9, i32 %10)
%12 = load i32, i32* @EXIT_FAILURE
%13 = call i32 @exit(i32 %12)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @die_obj_v(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @set_warn_handler(i8* null)
%5 = tail call i32 @warn_obj_v(i8* %0, i8* %1, i32 %2)
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int is_supported_msr(int);
uint64_t is_supported_domain(uint64_t power_domain) {
  uint64_t supported = 0;
  switch (power_domain) {
  case 0:
    supported = is_supported_msr(0x610);
    break;
  case 1:
    supported = is_supported_msr(0x638);
    break;
  case 2:
    supported = is_supported_msr(0x640);
    break;
  case 3:
    supported = is_supported_msr(0x618);
    break;
  }
  return supported;
}


x86 assembly (clang, -O0):
<is_supported_domain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x3,%rax
ja     118a <is_supported_domain+0x7a>
mov    -0x10(%rbp),%rax
lea    0xec2(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x610,%edi
call   1030 <is_supported_msr@plt>
mov    %eax,-0x8(%rbp)
jmp    118a <is_supported_domain+0x7a>
mov    $0x638,%edi
call   1030 <is_supported_msr@plt>
mov    %eax,-0x8(%rbp)
jmp    118a <is_supported_domain+0x7a>
mov    $0x640,%edi
call   1030 <is_supported_msr@plt>
mov    %eax,-0x8(%rbp)
jmp    118a <is_supported_domain+0x7a>
mov    $0x618,%edi
call   1030 <is_supported_msr@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_supported_domain>:
cmp    $0x3,%edi
ja     1127 <is_supported_domain+0x17>
movslq %edi,%rax
lea    0xee1(%rip),%rcx
mov    (%rcx,%rax,4),%edi
jmp    1030 <is_supported_msr@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @is_supported_domain(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
switch i32 %4, label %13 [
i32 0, label %5
i32 1, label %7
i32 2, label %9
i32 3, label %11
]
5: ; preds = %1
%6 = call i32 @is_supported_msr(i32 1552)
store i32 %6, i32* %3
br label %13
7: ; preds = %1
%8 = call i32 @is_supported_msr(i32 1592)
store i32 %8, i32* %3
br label %13
9: ; preds = %1
%10 = call i32 @is_supported_msr(i32 1600)
store i32 %10, i32* %3
br label %13
11: ; preds = %1
%12 = call i32 @is_supported_msr(i32 1560)
store i32 %12, i32* %3
br label %13
13: ; preds = %1, %11, %9, %7, %5
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
@switch.table.is_supported_domain = [4 x i32] [i32 1552, i32 1592, i32 1600, i32 1560]
define i32 @is_supported_domain(i32 %0) {
%2 = icmp ult i32 %0, 4
br i1 %2, label %3, label %8
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = getelementptr inbounds [4 x i32], [4 x i32]* @switch.table.is_supported_domain, i64 0, i64 %4
%6 = load i32, i32* %5
%7 = tail call i32 @is_supported_msr(i32 %6)
br label %8
8: ; preds = %1, %3
%9 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %9
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
scalar_t__ round(double);
scalar_t__ trunc(double);
void dtime2ts(double dtime, uint32_t *ts_sec, uint32_t *ts_usec) {
  *ts_sec = trunc(dtime);
  *ts_usec = round(1000000.0 * (dtime - ((double)*ts_sec)));
}


x86 assembly (clang, -O0):
<dtime2ts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <trunc@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
movsd  -0x8(%rbp),%xmm1
mov    -0x10(%rbp),%rax
cvtsi2sdq (%rax),%xmm0
subsd  %xmm0,%xmm1
movsd  0xe9d(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1040 <round@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dtime2ts>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  %xmm0,(%rsp)
call   1030 <trunc@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
mov    %rax,(%rbx)
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
mulsd  0xeb0(%rip),%xmm1
movapd %xmm1,%xmm0
call   1040 <round@plt>
mov    %rax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @dtime2ts(double %0, i64* %1, i64* %2) {
%4 = alloca double
%5 = alloca i64*
%6 = alloca i64*
store double %0, double* %4
store i64* %1, i64** %5
store i64* %2, i64** %6
%7 = load double, double* %4
%8 = call i64 @trunc(double %7)
%9 = load i64*, i64** %5
store i64 %8, i64* %9
%10 = load double, double* %4
%11 = load i64*, i64** %5
%12 = load i64, i64* %11
%13 = sitofp i64 %12 to double
%14 = fsub double %10, %13
%15 = fmul double 1.000000e+06, %14
%16 = call i64 @round(double %15)
%17 = load i64*, i64** %6
store i64 %16, i64* %17
ret void
}

LLVM IR (-O2):
define void @dtime2ts(double %0, i64* nocapture writeonly %1, i64* nocapture writeonly %2) {
%4 = tail call i64 @trunc(double %0)
store i64 %4, i64* %1
%5 = sitofp i64 %4 to double
%6 = fsub double %0, %5
%7 = fmul double %6, 1.000000e+06
%8 = tail call i64 @round(double %7)
store i64 %8, i64* %2
ret void
}
int a_cas(volatile int *p, int t, int s) {
  __asm__("lock ; cmpxchgl %3, %1"
          : "=a"(t), "=m"(*p)
          : "a"(t), "r"(s)
          : "memory");
  return t;
}


x86 assembly (clang, -O0):
<a_cas>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%edx
lock cmpxchg %edx,(%rcx)
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_cas>:
mov    %esi,%eax
lock cmpxchg %edx,(%rdi)
ret

LLVM IR (-O0):
define i32 @a_cas(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 asm "lock ; cmpxchgl $3, $1", "={ax},=*m,{ax},r,~{memory},~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %7, i32 %8, i32 %9)
store i32 %10, i32* %5
%11 = load i32, i32* %5
ret i32 %11
}

LLVM IR (-O2):
define i32 @a_cas(i32* %0, i32 %1, i32 %2) {
%4 = tail call i32 asm "lock ; cmpxchgl $3, $1", "={ax},=*m,{ax},r,~{memory},~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int stoinost1, stoinost2, stoinost3;
  scanf("%d", &stoinost1);
  stoinost2 = stoinost1 * stoinost1;
  stoinost3 = stoinost2 * stoinost1;
  printf("%d\n", stoinost2);
  printf("%d\n", stoinost3);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%ebx
mov    %ebx,%esi
imul   %ebx,%esi
imul   %esi,%ebx
lea    0xebb(%rip),%r14
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = mul nsw i32 %4, %4
%6 = mul nsw i32 %5, %4
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}
void gdk_window_set_skip_pager_hint() {}


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

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

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

LLVM IR (-O2):
define void @gdk_window_set_skip_pager_hint() {
ret void
}
/* Type definitions */
struct bson_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(struct bson_info *);
int /*<<< orphan*/ bson_cleanup(struct bson_info *);
void test_bson_cleanup(struct bson_info *bson_info) {
  assert(bson_info);
  bson_cleanup(bson_info);
}


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

x86 assembly (clang, -O2):
<test_bson_cleanup>:
push   %rbx
mov    %rdi,%rbx
call   1040 <assert@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <bson_cleanup@plt>

LLVM IR (-O0):
%struct.bson_info = type { i32 }
define void @test_bson_cleanup(%struct.bson_info* %0) {
%2 = alloca %struct.bson_info*
store %struct.bson_info* %0, %struct.bson_info** %2
%3 = load %struct.bson_info*, %struct.bson_info** %2
%4 = call i32 @assert(%struct.bson_info* %3)
%5 = load %struct.bson_info*, %struct.bson_info** %2
%6 = call i32 @bson_cleanup(%struct.bson_info* %5)
ret void
}

LLVM IR (-O2):
%struct.bson_info = type { i32 }
define void @test_bson_cleanup(%struct.bson_info* %0) {
%2 = tail call i32 @assert(%struct.bson_info* %0)
%3 = tail call i32 @bson_cleanup(%struct.bson_info* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
int main() {
  printf("Running ls with system\n");
  system("ls");
  printf("Done\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str.1 = [3 x i8] c"ls\00"
@str = [23 x i8] c"Running ls with system\00"
@str.3 = [5 x i8] c"Done\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.3, i64 0, i64 0))
ret i32 0
}