xunge/DecIR huggingface dataset:
void addrspace(int __attribute__((address_space(256))) * P) {
  __sync_bool_compare_and_swap(P, 0, 1);
  __sync_val_compare_and_swap(P, 0, 1);
  __sync_xor_and_fetch(P, 123);
}


x86 assembly (clang, -O0):
<addrspace>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
xor    %eax,%eax
mov    %eax,-0x1c(%rbp)
mov    $0x1,%edx
lock cmpxchg %edx,%gs:(%rcx)
mov    -0x1c(%rbp),%eax
mov    -0x8(%rbp),%rcx
lock cmpxchg %edx,%gs:(%rcx)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    %gs:(%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x18(%rbp),%rcx
mov    %eax,%edx
xor    $0x7b,%edx
lock cmpxchg %edx,%gs:(%rcx)
sete   %cl
test   $0x1,%cl
mov    %eax,-0xc(%rbp)
jne    115a <addrspace+0x5a>
jmp    1135 <addrspace+0x35>
pop    %rbp
ret

x86 assembly (clang, -O2):
<addrspace>:
mov    $0x1,%ecx
xor    %eax,%eax
lock cmpxchg %ecx,%gs:(%rdi)
xor    %eax,%eax
lock cmpxchg %ecx,%gs:(%rdi)
lock xorl $0x7b,%gs:(%rdi)
ret

LLVM IR (-O0):
define void @addrspace(i32 addrspace(256)* %0) {
%2 = alloca i32 addrspace(256)*
store i32 addrspace(256)* %0, i32 addrspace(256)** %2
%3 = load i32 addrspace(256)*, i32 addrspace(256)** %2
%4 = cmpxchg i32 addrspace(256)* %3, i32 0, i32 1 seq_cst seq_cst
%5 = extractvalue { i32, i1 } %4, 1
%6 = load i32 addrspace(256)*, i32 addrspace(256)** %2
%7 = cmpxchg i32 addrspace(256)* %6, i32 0, i32 1 seq_cst seq_cst
%8 = extractvalue { i32, i1 } %7, 0
%9 = load i32 addrspace(256)*, i32 addrspace(256)** %2
%10 = atomicrmw xor i32 addrspace(256)* %9, i32 123 seq_cst
%11 = xor i32 %10, 123
ret void
}

LLVM IR (-O2):
define void @addrspace(i32 addrspace(256)* nocapture %0) {
%2 = cmpxchg i32 addrspace(256)* %0, i32 0, i32 1 seq_cst seq_cst
%3 = cmpxchg i32 addrspace(256)* %0, i32 0, i32 1 seq_cst seq_cst
%4 = atomicrmw xor i32 addrspace(256)* %0, i32 123 seq_cst
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x97() {
  Assert_real((iscntrl(151) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_iscntrl.c",
              760, ("iscntrl should be 0 for 0x97"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0x97\00"
define void @t_iscntrl_0x97() {
%1 = tail call i64 @iscntrl(i32 151)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 760, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main(void) { printf("%p\n", 0); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%p\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 0
}
/* Type definitions */
struct evwsconnlistener {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
void ws_listener_error(struct evwsconnlistener *wslistener, void *user_data) {
  fprintf(stderr, "Error on Web Socket listener: %s\n", strerror(errno));
  exit(-1);
}


x86 assembly (clang, -O0):
<ws_listener_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e99(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    -0x14(%rbp),%edi
mov    %rax,%rdx
lea    0xe99(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<ws_listener_error>:
push   %rbx
mov    0x2ea8(%rip),%rax
mov    (%rax),%ebx
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
lea    0xeb1(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
%struct.evwsconnlistener = type { i32 }
@stderr = global i32 0
@.str = [34 x i8] c"Error on Web Socket listener: %s\0A\00"
@errno = global i32 0
define void @ws_listener_error(%struct.evwsconnlistener* %0, i8* %1) {
%3 = alloca %struct.evwsconnlistener*
%4 = alloca i8*
store %struct.evwsconnlistener* %0, %struct.evwsconnlistener** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i32, i32* @errno
%7 = call i8* @strerror(i32 %6)
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
%struct.evwsconnlistener = type { i32 }
@stderr = global i32 0
@.str = [34 x i8] c"Error on Web Socket listener: %s\0A\00"
@errno = global i32 0
define void @ws_listener_error(%struct.evwsconnlistener* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @stderr
%4 = load i32, i32* @errno
%5 = tail call i8* @strerror(i32 %4)
%6 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = tail call i32 @exit(i32 -1)
unreachable
}
unsigned int one_to_one(value)
unsigned int value;
{ return (value); }


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

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

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

LLVM IR (-O2):
define i32 @one_to_one(i32 returned %0) {
ret i32 %0
}
void sanity_check(void) {}


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

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

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

LLVM IR (-O2):
define void @sanity_check() {
ret void
}
/* Variables and functions */
scalar_t__ isspace(char);
int dbline_candidate(char *buf) {
  char c = buf[0];
  return (c == '#' || c == '!' || isspace(c) ? -1 : 0);
}


x86 assembly (clang, -O0):
<dbline_candidate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%ecx
mov    $0x1,%al
cmp    $0x23,%ecx
mov    %al,-0xa(%rbp)
je     115c <dbline_candidate+0x4c>
movsbl -0x9(%rbp),%ecx
mov    $0x1,%al
cmp    $0x21,%ecx
mov    %al,-0xa(%rbp)
je     115c <dbline_candidate+0x4c>
movsbl -0x9(%rbp),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%dl
xor    %eax,%eax
mov    $0xffffffff,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbline_candidate>:
push   %rax
mov    (%rdi),%cl
mov    %ecx,%edx
and    $0xfd,%dl
mov    $0xffffffff,%eax
cmp    $0x21,%dl
je     112f <dbline_candidate+0x1f>
movsbl %cl,%edi
call   1030 <isspace@plt>
neg    %rax
sbb    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @dbline_candidate(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
store i8 %6, i8* %3
%7 = load i8, i8* %3
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 35
br i1 %9, label %18, label %10
10: ; preds = %1
%11 = load i8, i8* %3
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 33
br i1 %13, label %18, label %14
14: ; preds = %10
%15 = load i8, i8* %3
%16 = call i64 @isspace(i8 signext %15)
%17 = icmp ne i64 %16, 0
br label %18
18: ; preds = %14, %10, %1
%19 = phi i1 [ true, %10 ], [ true, %1 ], [ %17, %14 ]
%20 = zext i1 %19 to i64
%21 = select i1 %19, i32 -1, i32 0
ret i32 %21
}

LLVM IR (-O2):
define i32 @dbline_candidate(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -3
%4 = icmp eq i8 %3, 33
br i1 %4, label %9, label %5
5: ; preds = %1
%6 = tail call i64 @isspace(i8 signext %2)
%7 = icmp ne i64 %6, 0
%8 = sext i1 %7 to i32
br label %9
9: ; preds = %5, %1
%10 = phi i32 [ -1, %1 ], [ %8, %5 ]
ret i32 %10
}
/* Variables and functions */
double floor(double);
double ceiling(double d) {
  if (d >= 0)
    return (double)(int)(d + 0.99);
  else
    return -floor(-d);
}


x86 assembly (clang, -O0):
<ceiling>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     114e <ceiling+0x3e>
movsd  0xec9(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    118b <ceiling+0x7b>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <floor@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ceiling>:
push   %rax
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jae    1132 <ceiling+0x22>
xorpd  0xeed(%rip),%xmm0
call   1030 <floor@plt>
xorpd  0xee0(%rip),%xmm0
pop    %rax
ret
addsd  0xec6(%rip),%xmm0
cvttpd2dq %xmm0,%xmm0
cvtdq2pd %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @ceiling(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp oge double %4, 0.000000e+00
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load double, double* %3
%8 = fadd double %7, 0x3FEFAE147AE147AE
%9 = fptosi double %8 to i32
%10 = sitofp i32 %9 to double
store double %10, double* %2
br label %16
11: ; preds = %1
%12 = load double, double* %3
%13 = fneg double %12
%14 = call double @llvm.floor.f64(double %13)
%15 = fneg double %14
store double %15, double* %2
br label %16
16: ; preds = %11, %6
%17 = load double, double* %2
ret double %17
}

LLVM IR (-O2):
define double @ceiling(double %0) {
%2 = fcmp ult double %0, 0.000000e+00
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = fadd double %0, 0x3FEFAE147AE147AE
%5 = fptosi double %4 to i32
%6 = sitofp i32 %5 to double
br label %11
7: ; preds = %1
%8 = fneg double %0
%9 = tail call double @llvm.floor.f64(double %8)
%10 = fneg double %9
br label %11
11: ; preds = %7, %3
%12 = phi double [ %6, %3 ], [ %10, %7 ]
ret double %12
}
void f(int a) {
  if (a > 0) {
#pragma css restart
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1116 <f+0x16>
jmp    1116 <f+0x16>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %6
6: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @f(i32 %0) {
ret void
}
void INT_Excep_PERIB_INTB166(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_PERIB_INTB166() {
ret void
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
uint64_t bmax_uint64(uint64_t a, uint64_t b) { return (a > b ? a : b); }


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

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

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

LLVM IR (-O2):
define i64 @bmax_uint64(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
void dwc3_debugfs_exit(struct dwc3 *d) {}


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

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

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

LLVM IR (-O2):
%struct.dwc3 = type opaque
define void @dwc3_debugfs_exit(%struct.dwc3* nocapture %0) {
ret void
}
int execute_readahead() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_readahead() {
ret i32 0
}
/* Variables and functions */
float acoshf(float);
void __hv_acosh_f(float bIn, float *bOut) { *bOut = acoshf(bIn); }


x86 assembly (clang, -O0):
<__hv_acosh_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <acoshf@plt>
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__hv_acosh_f>:
push   %rbx
mov    %rdi,%rbx
call   1030 <acoshf@plt>
movss  %xmm0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @__hv_acosh_f(float %0, float* %1) {
%3 = alloca float
%4 = alloca float*
store float %0, float* %3
store float* %1, float** %4
%5 = load float, float* %3
%6 = call float @acoshf(float %5)
%7 = load float*, float** %4
store float %6, float* %7
ret void
}

LLVM IR (-O2):
define void @__hv_acosh_f(float %0, float* nocapture writeonly %1) {
%3 = tail call float @acoshf(float %0)
store float %3, float* %1
ret void
}
void __attribute__((weak)) dma2_stream7_isr() { debug_handler(__FUNCTION__); }


x86 assembly (clang, -O0):
<dma2_stream7_isr>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <debug_handler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dma2_stream7_isr>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <debug_handler@plt>

LLVM IR (-O0):
@__FUNCTION__.dma2_stream7_isr = [17 x i8] c"dma2_stream7_isr\00"
define weak void @dma2_stream7_isr() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.dma2_stream7_isr, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__FUNCTION__.dma2_stream7_isr = [17 x i8] c"dma2_stream7_isr\00"
define weak void @dma2_stream7_isr() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.dma2_stream7_isr, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
void mixedSignedness5(unsigned a) {
  int min = (-((~0U) & ((~0U) >> 1)) - 1);
  clang_analyzer_eval(a < min);
  clang_analyzer_eval((a + 2) < min);
  clang_analyzer_eval((a + 2U) < min);
}


x86 assembly (clang, -O0):
<mixedSignedness5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x80000000,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
cmp    -0x8(%rbp),%eax
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
cmp    -0x8(%rbp),%eax
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mixedSignedness5>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
not    %edi
shr    $0x1f,%edi
call   1030 <clang_analyzer_eval@plt>
mov    $0xfffffffd,%ebp
sub    %ebx,%ebp
shr    $0x1f,%ebp
mov    %ebp,%edi
call   1030 <clang_analyzer_eval@plt>
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <clang_analyzer_eval@plt>

LLVM IR (-O0):
define void @mixedSignedness5(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 -2147483648, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = icmp ult i32 %4, %5
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
%9 = load i32, i32* %2
%10 = add i32 %9, 2
%11 = load i32, i32* %3
%12 = icmp ult i32 %10, %11
%13 = zext i1 %12 to i32
%14 = call i32 @clang_analyzer_eval(i32 %13)
%15 = load i32, i32* %2
%16 = add i32 %15, 2
%17 = load i32, i32* %3
%18 = icmp ult i32 %16, %17
%19 = zext i1 %18 to i32
%20 = call i32 @clang_analyzer_eval(i32 %19)
ret void
}

LLVM IR (-O2):
define void @mixedSignedness5(i32 %0) {
%2 = xor i32 %0, -1
%3 = lshr i32 %2, 31
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
%5 = sub i32 -3, %0
%6 = lshr i32 %5, 31
%7 = tail call i32 @clang_analyzer_eval(i32 %6)
%8 = tail call i32 @clang_analyzer_eval(i32 %6)
ret void
}
void Init_wers(void) {}


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

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

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

LLVM IR (-O2):
define void @Init_wers() {
ret void
}
double PSItoMB(double PSI) {
  double MB = 68.9476 * PSI;
  return MB;
}


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

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

LLVM IR (-O0):
define double @PSItoMB(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fmul double 6.894760e+01, %4
store double %5, double* %3
%6 = load double, double* %3
ret double %6
}

LLVM IR (-O2):
define double @PSItoMB(double %0) {
%2 = fmul double %0, 6.894760e+01
ret double %2
}
/* Variables and functions */
double RAND_MAX;
double rand();
void *random_selection(int num_items, void *items, int item_size, void **ctx) {
  int new_idx;
  new_idx = (int)(num_items * (rand() / (RAND_MAX + 1.0)));
  return items + new_idx * item_size;
}


x86 assembly (clang, -O0):
<random_selection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
movsd  0xeb9(%rip),%xmm2
mov    0x2e9a(%rip),%rax
addsd  (%rax),%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
imul   -0x14(%rbp),%ecx
movslq %ecx,%rcx
add    %rcx,%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_selection>:
push   %r14
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %rsi,%r14
cvtsi2sd %edi,%xmm0
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
mov    0x2eb8(%rip),%rax
movsd  (%rax),%xmm1
addsd  0xec4(%rip),%xmm1
divsd  %xmm1,%xmm0
mulsd  (%rsp),%xmm0
cvttsd2si %xmm0,%eax
imul   %ebx,%eax
cltq
add    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define i8* @random_selection(i32 %0, i8* %1, i32 %2, i8** %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8**
%9 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8** %3, i8*** %8
%10 = load i32, i32* %5
%11 = sitofp i32 %10 to double
%12 = call double (...) @rand()
%13 = load double, double* @RAND_MAX
%14 = fadd double %13, 1.000000e+00
%15 = fdiv double %12, %14
%16 = fmul double %11, %15
%17 = fptosi double %16 to i32
store i32 %17, i32* %9
%18 = load i8*, i8** %6
%19 = load i32, i32* %9
%20 = load i32, i32* %7
%21 = mul nsw i32 %19, %20
%22 = sext i32 %21 to i64
%23 = getelementptr i8, i8* %18, i64 %22
ret i8* %23
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define i8* @random_selection(i32 %0, i8* readnone %1, i32 %2, i8** nocapture readnone %3) {
%5 = sitofp i32 %0 to double
%6 = tail call double (...) @rand()
%7 = load double, double* @RAND_MAX
%8 = fadd double %7, 1.000000e+00
%9 = fdiv double %6, %8
%10 = fmul double %9, %5
%11 = fptosi double %10 to i32
%12 = mul nsw i32 %11, %2
%13 = sext i32 %12 to i64
%14 = getelementptr i8, i8* %1, i64 %13
ret i8* %14
}
/* Variables and functions */
int /*<<< orphan*/ llenarletras();
int /*<<< orphan*/ menu1();
int /*<<< orphan*/ printf(char *);
int main() {
  llenarletras();
  menu1();
  printf("\n");
  printf("Gracias por utilizar este programa. \n");
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <llenarletras@plt>
mov    $0x0,%al
call   1050 <menu1@plt>
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <llenarletras@plt>
xor    %eax,%eax
call   1060 <menu1@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xea0(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [38 x i8] c"Gracias por utilizar este programa. \0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @llenarletras()
%3 = call i32 (...) @menu1()
%4 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [37 x i8] c"Gracias por utilizar este programa. \00"
define i32 @main() {
%1 = tail call i32 (...) @llenarletras()
%2 = tail call i32 (...) @menu1()
%3 = tail call i32 @putchar(i32 10)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @putchar(i32 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_ips();
int /*<<< orphan*/ test_ports();
int main() {
  test_ports();
  test_ips();
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @test_ports()
%2 = call i32 (...) @test_ips()
ret i32 0
}

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

/* Variables and functions */
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
unsigned char *ufgets(unsigned char *s, int size, FILE *f) {
  return (unsigned char *)fgets((char *)s, size, f);
}


x86 assembly (clang, -O0):
<ufgets>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <fgets@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ufgets>:
jmp    1030 <fgets@plt>

LLVM IR (-O0):
define i8* @ufgets(i8* %0, i32 %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i32*, i32** %6
%10 = call i64 @fgets(i8* %7, i32 %8, i32* %9)
%11 = inttoptr i64 %10 to i8*
ret i8* %11
}

LLVM IR (-O2):
define i8* @ufgets(i8* %0, i32 %1, i32* nocapture %2) {
%4 = tail call i64 @fgets(i8* %0, i32 %1, i32* %2)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
/* Variables and functions */
void *calloc(size_t, size_t);
int /*<<< orphan*/ err(int, char *);
void *mycalloc(size_t nmemb, size_t size) {
  void *result = calloc(nmemb, size);
  if (!result)
    err(-2, "mycalloc() failed!");
  return result;
}


x86 assembly (clang, -O0):
<mycalloc>:
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   1030 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    115d <mycalloc+0x3d>
mov    $0xfffffffe,%edi
lea    0xea8(%rip),%rsi
call   1040 <err@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mycalloc>:
push   %rbx
call   1030 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113f <mycalloc+0x1f>
lea    0xecb(%rip),%rsi
mov    $0xfffffffe,%edi
call   1040 <err@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"mycalloc() failed!\00"
define i8* @mycalloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = call i8* @calloc(i64 %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %13, label %11
11: ; preds = %2
%12 = call i32 @err(i32 -2, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %2
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
@.str = [19 x i8] c"mycalloc() failed!\00"
define noalias i8* @mycalloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @err(i32 -2, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void func2(void) { printf("func2()\n"); }


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

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

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

LLVM IR (-O2):
@str = [8 x i8] c"func2()\00"
define void @func2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ exp(double);
int log(scalar_t__);
double logpexp(double x) { return (x >= 16) * x + (x < 16) * log(1 + exp(x)); }


x86 assembly (clang, -O0):
<logpexp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xec6(%rip),%xmm1
ucomisd %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe9f(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1040 <log@plt>
movsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
imul   %ecx,%eax
cvtsi2sd %eax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logpexp>:
sub    $0x28,%rsp
movapd %xmm0,(%rsp)
movsd  0xecf(%rip),%xmm2
cmplesd %xmm0,%xmm2
movsd  0xeca(%rip),%xmm1
andpd  %xmm2,%xmm1
movapd %xmm1,0x10(%rsp)
call   1030 <exp@plt>
lea    0x1(%rax),%rdi
call   1040 <log@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movapd (%rsp),%xmm0
movapd 0x10(%rsp),%xmm2
mulsd  %xmm0,%xmm2
cmpltsd 0xe8b(%rip),%xmm0
andpd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @logpexp(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oge double %3, 1.600000e+01
%5 = zext i1 %4 to i32
%6 = sitofp i32 %5 to double
%7 = load double, double* %2
%8 = load double, double* %2
%9 = fcmp olt double %8, 1.600000e+01
%10 = zext i1 %9 to i32
%11 = load double, double* %2
%12 = call i64 @exp(double %11)
%13 = add nsw i64 1, %12
%14 = call i32 @log(i64 %13)
%15 = mul nsw i32 %10, %14
%16 = sitofp i32 %15 to double
%17 = call double @llvm.fmuladd.f64(double %6, double %7, double %16)
ret double %17
}

LLVM IR (-O2):
define double @logpexp(double %0) {
%2 = fcmp oge double %0, 1.600000e+01
%3 = uitofp i1 %2 to double
%4 = fcmp olt double %0, 1.600000e+01
%5 = tail call i64 @exp(double %0)
%6 = add nsw i64 %5, 1
%7 = tail call i32 @log(i64 %6)
%8 = sitofp i32 %7 to double
%9 = select i1 %4, double %8, double 0.000000e+00
%10 = tail call double @llvm.fmuladd.f64(double %3, double %0, double %9)
ret double %10
}
int main(int argc, char const *argv[]) {
  char test[] = "hello";
  int len = 0;
  int used[5];
  char out[5];
  memset(used, 0, sizeof(used));
  memset(out, 0, sizeof(out));
  permute(test, out, &len, used);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xec4(%rip),%eax
mov    %eax,-0x16(%rbp)
mov    0xebe(%rip),%ax
mov    %ax,-0x12(%rbp)
movl   $0x0,-0x1c(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x14,%edx
call   1040 <memset@plt>
lea    -0x35(%rbp),%rdi
xor    %esi,%esi
mov    $0x5,%edx
call   1040 <memset@plt>
lea    -0x16(%rbp),%rdi
lea    -0x35(%rbp),%rsi
lea    -0x30(%rbp),%rcx
lea    -0x1c(%rbp),%rdx
mov    $0x0,%al
call   1030 <permute@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
movw   $0x6f,0x1c(%rsp)
movl   $0x6c6c6568,0x18(%rsp)
6c
movl   $0x0,0x14(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0x20(%rsp)
movl   $0x0,0x30(%rsp)
movl   $0x0,0xc(%rsp)
movb   $0x0,0x10(%rsp)
lea    0x18(%rsp),%rdi
lea    0xc(%rsp),%rsi
lea    0x14(%rsp),%rdx
lea    0x20(%rsp),%rcx
xor    %eax,%eax
call   1030 <permute@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
@__const.main.test = [6 x i8] c"hello\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [6 x i8]
%7 = alloca i32
%8 = alloca [5 x i32]
%9 = alloca [5 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = bitcast [6 x i8]* %6 to i8*
store i32 0, i32* %7
%11 = getelementptr inbounds [5 x i32], [5 x i32]* %8, i64 0, i64 0
%12 = bitcast i32* %11 to i8*
%13 = getelementptr inbounds [5 x i8], [5 x i8]* %9, i64 0, i64 0
%14 = getelementptr inbounds [6 x i8], [6 x i8]* %6, i64 0, i64 0
%15 = getelementptr inbounds [5 x i8], [5 x i8]* %9, i64 0, i64 0
%16 = getelementptr inbounds [5 x i32], [5 x i32]* %8, i64 0, i64 0
%17 = call i32 (i8*, i8*, i32*, i32*, ...) bitcast (i32 (...)* @permute to i32 (i8*, i8*, i32*, i32*, ...)*)(i8* %14, i8* %15, i32* %7, i32* %16)
ret i32 0
}

LLVM IR (-O2):
@__const.main.test = [6 x i8] c"hello\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [6 x i8]
%4 = alloca i32
%5 = alloca [5 x i32]
%6 = alloca [5 x i8]
%7 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%8 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%9 = bitcast [5 x i32]* %5 to i8*
%10 = getelementptr inbounds [5 x i8], [5 x i8]* %6, i64 0, i64 0
%11 = getelementptr inbounds [5 x i32], [5 x i32]* %5, i64 0, i64 0
%12 = call i32 (i8*, i8*, i32*, i32*, ...) bitcast (i32 (...)* @permute to i32 (i8*, i8*, i32*, i32*, ...)*)(i8* %7, i8* %10, i32* %4, i32* %11)
ret i32 0
}
/* Type definitions */
struct sts_word {
  int dummy;
};

/* Variables and functions */
double sts_mindist_ab(struct sts_word const *, struct sts_word const *,
                      double *, double *);
double sts_mindist(const struct sts_word *a, const struct sts_word *b) {
  double above, below;
  return sts_mindist_ab(a, b, &above, &below);
}


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

x86 assembly (clang, -O2):
<sts_mindist>:
sub    $0x18,%rsp
lea    0x10(%rsp),%rdx
lea    0x8(%rsp),%rcx
call   1030 <sts_mindist_ab@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sts_word = type { i32 }
define double @sts_mindist(%struct.sts_word* %0, %struct.sts_word* %1) {
%3 = alloca %struct.sts_word*
%4 = alloca %struct.sts_word*
%5 = alloca double
%6 = alloca double
store %struct.sts_word* %0, %struct.sts_word** %3
store %struct.sts_word* %1, %struct.sts_word** %4
%7 = load %struct.sts_word*, %struct.sts_word** %3
%8 = load %struct.sts_word*, %struct.sts_word** %4
%9 = call double @sts_mindist_ab(%struct.sts_word* %7, %struct.sts_word* %8, double* %5, double* %6)
ret double %9
}

LLVM IR (-O2):
%struct.sts_word = type { i32 }
define double @sts_mindist(%struct.sts_word* %0, %struct.sts_word* %1) {
%3 = alloca double
%4 = alloca double
%5 = bitcast double* %3 to i8*
%6 = bitcast double* %4 to i8*
%7 = call double @sts_mindist_ab(%struct.sts_word* %0, %struct.sts_word* %1, double* %3, double* %4)
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ GLUT_ELAPSED_TIME;
int glutGet(int /*<<< orphan*/);
int /*<<< orphan*/ glutPostRedisplay();
void Idle() {
  int nWaitUntil = glutGet(GLUT_ELAPSED_TIME);
  int nTimer = glutGet(GLUT_ELAPSED_TIME);
  if (nTimer >= nWaitUntil) {
    glutPostRedisplay();
    nWaitUntil = nTimer + (1000 / 20);
  }
}


x86 assembly (clang, -O0):
<Idle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
call   1030 <glutGet@plt>
mov    %eax,-0x4(%rbp)
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
call   1030 <glutGet@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jl     1166 <Idle+0x46>
mov    $0x0,%al
call   1040 <glutPostRedisplay@plt>
mov    -0x8(%rbp),%eax
add    $0x32,%eax
mov    %eax,-0x4(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Idle>:
push   %r14
push   %rbx
push   %rax
mov    0x2eb5(%rip),%r14
mov    (%r14),%edi
call   1030 <glutGet@plt>
mov    %eax,%ebx
mov    (%r14),%edi
call   1030 <glutGet@plt>
cmp    %ebx,%eax
jge    1149 <Idle+0x29>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <glutPostRedisplay@plt>

LLVM IR (-O0):
@GLUT_ELAPSED_TIME = global i32 0
define void @Idle() {
%1 = alloca i32
%2 = alloca i32
%3 = load i32, i32* @GLUT_ELAPSED_TIME
%4 = call i32 @glutGet(i32 %3)
store i32 %4, i32* %1
%5 = load i32, i32* @GLUT_ELAPSED_TIME
%6 = call i32 @glutGet(i32 %5)
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = load i32, i32* %1
%9 = icmp sge i32 %7, %8
br i1 %9, label %10, label %14
10: ; preds = %0
%11 = call i32 (...) @glutPostRedisplay()
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 50
store i32 %13, i32* %1
br label %14
14: ; preds = %10, %0
ret void
}

LLVM IR (-O2):
@GLUT_ELAPSED_TIME = global i32 0
define void @Idle() {
%1 = load i32, i32* @GLUT_ELAPSED_TIME
%2 = tail call i32 @glutGet(i32 %1)
%3 = load i32, i32* @GLUT_ELAPSED_TIME
%4 = tail call i32 @glutGet(i32 %3)
%5 = icmp slt i32 %4, %2
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = tail call i32 (...) @glutPostRedisplay()
br label %8
8: ; preds = %6, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GPIODirModeSet(unsigned long, unsigned char, int);
int /*<<< orphan*/ GPIOPadConfigSet(unsigned long, unsigned char, int, int);
void GPIOPinTypeGPIOInput(unsigned long ulPort, unsigned char ucPins) {
  ;
  GPIODirModeSet(ulPort, ucPins, 0x00000000);
  GPIOPadConfigSet(ulPort, ucPins, 0x00000001, 0x00000008);
}


x86 assembly (clang, -O0):
<GPIOPinTypeGPIOInput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
xor    %edx,%edx
movzbl -0x9(%rbp),%esi
call   1040 <GPIODirModeSet@plt>
mov    -0x8(%rbp),%rdi
mov    $0x1,%edx
mov    $0x8,%ecx
movzbl -0x9(%rbp),%esi
call   1030 <GPIOPadConfigSet@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPIOPinTypeGPIOInput>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %edx,%edx
call   1040 <GPIODirModeSet@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x1,%edx
mov    $0x8,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <GPIOPadConfigSet@plt>

LLVM IR (-O0):
define void @GPIOPinTypeGPIOInput(i64 %0, i8 zeroext %1) {
%3 = alloca i64
%4 = alloca i8
store i64 %0, i64* %3
store i8 %1, i8* %4
%5 = load i64, i64* %3
%6 = load i8, i8* %4
%7 = call i32 @GPIODirModeSet(i64 %5, i8 zeroext %6, i32 0)
%8 = load i64, i64* %3
%9 = load i8, i8* %4
%10 = call i32 @GPIOPadConfigSet(i64 %8, i8 zeroext %9, i32 1, i32 8)
ret void
}

LLVM IR (-O2):
define void @GPIOPinTypeGPIOInput(i64 %0, i8 zeroext %1) {
%3 = tail call i32 @GPIODirModeSet(i64 %0, i8 zeroext %1, i32 0)
%4 = tail call i32 @GPIOPadConfigSet(i64 %0, i8 zeroext %1, i32 1, i32 8)
ret void
}
/* Type definitions */
struct timespec {
  int dummy;
};
typedef int /*<<< orphan*/ pthread_rwlock_t;

/* Variables and functions */
int /*<<< orphan*/ *hybris_set_realrwlock(int /*<<< orphan*/ *);
int pthread_rwlock_timedrdlock(int /*<<< orphan*/ *, struct timespec const *);
int my_pthread_rwlock_timedrdlock(pthread_rwlock_t *__rwlock,
                                  __const struct timespec *abs_timeout) {
  pthread_rwlock_t *realrwlock = hybris_set_realrwlock(__rwlock);
  return pthread_rwlock_timedrdlock(realrwlock, abs_timeout);
}


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

x86 assembly (clang, -O2):
<my_pthread_rwlock_timedrdlock>:
push   %rbx
mov    %rsi,%rbx
call   1030 <hybris_set_realrwlock@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <pthread_rwlock_timedrdlock@plt>

LLVM IR (-O0):
%struct.timespec = type { i32 }
define i32 @my_pthread_rwlock_timedrdlock(i32* %0, %struct.timespec* %1) {
%3 = alloca i32*
%4 = alloca %struct.timespec*
%5 = alloca i32*
store i32* %0, i32** %3
store %struct.timespec* %1, %struct.timespec** %4
%6 = load i32*, i32** %3
%7 = call i32* @hybris_set_realrwlock(i32* %6)
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = load %struct.timespec*, %struct.timespec** %4
%10 = call i32 @pthread_rwlock_timedrdlock(i32* %8, %struct.timespec* %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
define i32 @my_pthread_rwlock_timedrdlock(i32* %0, %struct.timespec* %1) {
%3 = tail call i32* @hybris_set_realrwlock(i32* %0)
%4 = tail call i32 @pthread_rwlock_timedrdlock(i32* %3, %struct.timespec* %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fz_is_big_endian();
void fz_accelerate(void) {
  if (sizeof(int) == 4 && sizeof(unsigned int) == 4 && !fz_is_big_endian()) {
  }
}


x86 assembly (clang, -O0):
<fz_accelerate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <fz_is_big_endian@plt>
cmp    $0x0,%eax
jne    1129 <fz_accelerate+0x19>
jmp    1129 <fz_accelerate+0x19>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @fz_accelerate() {
%1 = call i32 (...) @fz_is_big_endian()
%2 = icmp ne i32 %1, 0
br i1 %2, label %4, label %3
3: ; preds = %0
br label %4
4: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
define void @fz_accelerate() {
%1 = tail call i32 (...) @fz_is_big_endian()
ret void
}
/* Variables and functions */
int ENOSYS;
int nvhost_vpr_info_fetch(void) { return -ENOSYS; }


x86 assembly (clang, -O0):
<nvhost_vpr_info_fetch>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    0x2edb(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nvhost_vpr_info_fetch>:
mov    0x2ee1(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @nvhost_vpr_info_fetch() {
%1 = load i32, i32* @ENOSYS
%2 = sub nsw i32 0, %1
ret i32 %2
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @nvhost_vpr_info_fetch() {
%1 = load i32, i32* @ENOSYS
%2 = sub nsw i32 0, %1
ret i32 %2
}
/* Variables and functions */
scalar_t__ isPowerOfTwo(int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  for (int i = 0; i < 1025; i++) {
    if (isPowerOfTwo(i)) {
      printf("%d\n", i);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x401,-0x8(%rbp)
jge    1177 <main+0x57>
mov    -0x8(%rbp),%edi
call   1030 <isPowerOfTwo@plt>
cmp    $0x0,%rax
je     1164 <main+0x44>
mov    -0x8(%rbp),%esi
lea    0xea1(%rip),%rdi
call   1040 <printf@plt>
jmp    1169 <main+0x49>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xed3(%rip),%r14
jmp    113b <main+0x1b>
nop
add    $0x1,%ebx
cmp    $0x401,%ebx
je     1153 <main+0x33>
mov    %ebx,%edi
call   1030 <isPowerOfTwo@plt>
test   %rax,%rax
je     1130 <main+0x10>
mov    %r14,%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
jmp    1130 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %14, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 1025
br i1 %5, label %6, label %17
6: ; preds = %3
%7 = load i32, i32* %2
%8 = call i64 @isPowerOfTwo(i32 %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %6
%11 = load i32, i32* %2
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
br label %13
13: ; preds = %10, %6
br label %14
14: ; preds = %13
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 1
store i32 %16, i32* %2
br label %3
17: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
br label %2
1: ; preds = %8
ret i32 0
2: ; preds = %0, %8
%3 = phi i32 [ 0, %0 ], [ %9, %8 ]
%4 = tail call i64 @isPowerOfTwo(i32 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
br label %8
8: ; preds = %2, %6
%9 = add nuw nsw i32 %3, 1
%10 = icmp eq i32 %9, 1025
br i1 %10, label %1, label %2
}
void *luaI_buffer(unsigned long size) {
  static unsigned long buffsize = 0;
  static char *buffer = 0;
  if (size > buffsize)
    buffer = luaI_realloc(buffer, buffsize = size);
  return buffer;
}


x86 assembly (clang, -O0):
<luaI_buffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmp    0x2f09(%rip),%rax
jbe    114f <luaI_buffer+0x3f>
mov    0x2f04(%rip),%rdi
mov    -0x8(%rbp),%rsi
mov    %rsi,0x2ef1(%rip)
mov    $0x0,%al
call   1030 <luaI_realloc@plt>
cltq
mov    %rax,0x2ee9(%rip)
mov    0x2ee2(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<luaI_buffer>:
push   %rax
mov    0x2f20(%rip),%rax
cmp    %rdi,0x2f11(%rip)
jae    113e <luaI_buffer+0x2e>
mov    %rdi,%rsi
mov    %rdi,0x2f05(%rip)
mov    %rax,%rdi
xor    %eax,%eax
call   1030 <luaI_realloc@plt>
cltq
mov    %rax,0x2efa(%rip)
pop    %rcx
ret

LLVM IR (-O0):
@luaI_buffer.buffsize = internal global i64 0
@luaI_buffer.buffer = internal global i8* null
define i8* @luaI_buffer(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load i64, i64* @luaI_buffer.buffsize
%5 = icmp ugt i64 %3, %4
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i8*, i8** @luaI_buffer.buffer
%8 = load i64, i64* %2
store i64 %8, i64* @luaI_buffer.buffsize
%9 = call i32 (i8*, i64, ...) bitcast (i32 (...)* @luaI_realloc to i32 (i8*, i64, ...)*)(i8* %7, i64 %8)
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** @luaI_buffer.buffer
br label %12
12: ; preds = %6, %1
%13 = load i8*, i8** @luaI_buffer.buffer
ret i8* %13
}

LLVM IR (-O2):
@luaI_buffer.buffsize = internal unnamed_addr global i64 0
@luaI_buffer.buffer = internal unnamed_addr global i8* null
define i8* @luaI_buffer(i64 %0) {
%2 = load i64, i64* @luaI_buffer.buffsize
%3 = icmp ult i64 %2, %0
%4 = load i8*, i8** @luaI_buffer.buffer
br i1 %3, label %5, label %9
5: ; preds = %1
store i64 %0, i64* @luaI_buffer.buffsize
%6 = tail call i32 (i8*, i64, ...) bitcast (i32 (...)* @luaI_realloc to i32 (i8*, i64, ...)*)(i8* %4, i64 %0)
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** @luaI_buffer.buffer
br label %9
9: ; preds = %1, %5
%10 = phi i8* [ %8, %5 ], [ %4, %1 ]
ret i8* %10
}
sub(int i, int array[i++]) { return i; }


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

x86 assembly (clang, -O2):
<sub>:
lea    0x1(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @sub(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32, i32* %3
%6 = add nsw i32 %5, 1
store i32 %6, i32* %3
%7 = zext i32 %5 to i64
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @sub(i32 %0, i32* nocapture readnone %1) {
%3 = add nsw i32 %0, 1
ret i32 %3
}