xunge/DecIR huggingface dataset:
float __nearbyintf(float x) {
  float two23 = copysignf(0x1.0p23, x);
  float r;
  r = x + two23;
  r = r - two23;
  return copysign(r, x);
}


x86 assembly (clang, -O0):
<__nearbyintf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movaps 0xf0b(%rip),%xmm1
pand   %xmm1,%xmm0
movaps 0xf10(%rip),%xmm1
por    %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movaps 0xea0(%rip),%xmm2
pand   %xmm2,%xmm1
movaps 0xea5(%rip),%xmm2
pand   %xmm2,%xmm0
por    %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<__nearbyintf>:
movaps 0xef9(%rip),%xmm1
andps  %xmm0,%xmm1
movaps 0xeff(%rip),%xmm2
orps   %xmm1,%xmm2
addss  %xmm2,%xmm0
subss  %xmm2,%xmm0
andps  0xefd(%rip),%xmm0
orps   %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @__nearbyintf(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
store float %0, float* %2
%5 = load float, float* %2
%6 = call float @llvm.copysign.f32(float 0x4160000000000000, float %5)
store float %6, float* %3
%7 = load float, float* %2
%8 = load float, float* %3
%9 = fadd float %7, %8
store float %9, float* %4
%10 = load float, float* %4
%11 = load float, float* %3
%12 = fsub float %10, %11
store float %12, float* %4
%13 = load float, float* %4
%14 = fpext float %13 to double
%15 = load float, float* %2
%16 = fpext float %15 to double
%17 = call double @llvm.copysign.f64(double %14, double %16)
%18 = fptrunc double %17 to float
ret float %18
}

LLVM IR (-O2):
define float @__nearbyintf(float %0) {
%2 = tail call float @llvm.copysign.f32(float 0x4160000000000000, float %0)
%3 = fadd float %2, %0
%4 = fsub float %3, %2
%5 = fpext float %4 to double
%6 = fpext float %0 to double
%7 = tail call double @llvm.copysign.f64(double %5, double %6)
%8 = fptrunc double %7 to float
ret float %8
}
int Wait() {
  int exitcode;
  asm("int $57; movl %%eax, %0" : "=g"(exitcode) : : "eax");
  return exitcode;
}


x86 assembly (clang, -O0):
<Wait>:
push   %rbp
mov    %rsp,%rbp
int    $0x39
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Wait>:
int    $0x39
mov    %eax,-0x4(%rsp)
mov    -0x4(%rsp),%eax
ret

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

LLVM IR (-O2):
define i32 @Wait() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = load i32, i32* %1
ret i32 %3
}
double simple_weight(double flux, double x, double y) { return 1.0; }


x86 assembly (clang, -O0):
<simple_weight>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  0xee5(%rip),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @simple_weight(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
ret double 1.000000e+00
}

LLVM IR (-O2):
define double @simple_weight(double %0, double %1, double %2) {
ret double 1.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xcb() {
  Assert_real((isspace(203) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isspace.c",
              1020, ("isspace should be 0 for 0xcb"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xcb\00"
define void @t_isspace_0xcb() {
%1 = call i64 @isspace(i32 203)
%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 1020, 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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xcb\00"
define void @t_isspace_0xcb() {
%1 = tail call i64 @isspace(i32 203)
%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 1020, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(int argc, char *argv[], int exitcode) {
  fprintf(stderr, "Usage: %s [-s socket] command\n", argv[0]);
  exit(exitcode);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xeb7(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x14(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %edx,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
mov    (%rsi),%rdx
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [31 x i8] c"Usage: %s [-s socket] command\0A\00"
define void @usage(i32 %0, i8** %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 %2, i32* %6
%7 = load i32, i32* @stderr
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 0
%10 = load i8*, i8** %9
%11 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = load i32, i32* %6
%13 = call i32 @exit(i32 %12)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [31 x i8] c"Usage: %s [-s socket] command\0A\00"
define void @usage(i32 %0, i8** nocapture %1, i32 %2) {
%4 = load i32, i32* @stderr
%5 = load i8*, i8** %1
%6 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = tail call i32 @exit(i32 %2)
unreachable
}
/* Type definitions */
struct demod_state {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ pocsag_deinit(struct demod_state *);
void poc24_deinit(struct demod_state *s) { pocsag_deinit(s); }


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

x86 assembly (clang, -O2):
<poc24_deinit>:
jmp    1030 <pocsag_deinit@plt>

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

LLVM IR (-O2):
%struct.demod_state = type { i32 }
define void @poc24_deinit(%struct.demod_state* %0) {
%2 = tail call i32 @pocsag_deinit(%struct.demod_state* %0)
ret void
}
int spl_debug_init(void) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @spl_debug_init() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ absolute();
int /*<<< orphan*/ tsb16(int /*<<< orphan*/);
void tsbAbs16(void) { tsb16(absolute()); }


x86 assembly (clang, -O0):
<tsbAbs16>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <absolute@plt>
mov    %eax,%edi
call   1030 <tsb16@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tsbAbs16>:
push   %rax
xor    %eax,%eax
call   1040 <absolute@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <tsb16@plt>

LLVM IR (-O0):
define void @tsbAbs16() {
%1 = call i32 (...) @absolute()
%2 = call i32 @tsb16(i32 %1)
ret void
}

LLVM IR (-O2):
define void @tsbAbs16() {
%1 = tail call i32 (...) @absolute()
%2 = tail call i32 @tsb16(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getname(char **, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ putname(char **, int);
int main() {
  char name[3][20];
  getname(name, 3);
  putname(name, 3);
  printf("");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
mov    $0x3,%esi
call   1050 <getname@plt>
lea    -0x40(%rbp),%rdi
mov    $0x3,%esi
call   1040 <putname@plt>
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1040 <getname@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <putname@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x [20 x i8]]
store i32 0, i32* %1
%3 = getelementptr inbounds [3 x [20 x i8]], [3 x [20 x i8]]* %2, i64 0, i64 0
%4 = bitcast [20 x i8]* %3 to i8**
%5 = call i32 @getname(i8** %4, i32 3)
%6 = getelementptr inbounds [3 x [20 x i8]], [3 x [20 x i8]]* %2, i64 0, i64 0
%7 = bitcast [20 x i8]* %6 to i8**
%8 = call i32 @putname(i8** %7, i32 3)
%9 = call i32 @printf(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [3 x [20 x i8]]
%2 = getelementptr inbounds [3 x [20 x i8]], [3 x [20 x i8]]* %1, i64 0, i64 0, i64 0
%3 = bitcast [3 x [20 x i8]]* %1 to i8**
%4 = call i32 @getname(i8** %3, i32 3)
%5 = call i32 @putname(i8** %3, i32 3)
ret i32 0
}
/* Type definitions */
typedef int uint64_t;
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
uint64_t structTimeval2usecs(struct timeval t) {
  return (uint64_t)t.tv_sec * (uint64_t)1000000 + (uint64_t)t.tv_usec;
}


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

x86 assembly (clang, -O2):
<structTimeval2usecs>:
imul   $0xf4240,%esi,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define i32 @structTimeval2usecs(i64 %0, i64 %1) {
%3 = alloca %struct.timeval
%4 = bitcast %struct.timeval* %3 to { i64, i64 }*
%5 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %4, i32 0, i32 0
store i64 %0, i64* %5
%6 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %4, i32 0, i32 1
store i64 %1, i64* %6
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 1
%8 = load i64, i64* %7
%9 = trunc i64 %8 to i32
%10 = mul nsw i32 %9, 1000000
%11 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 0
%12 = load i64, i64* %11
%13 = trunc i64 %12 to i32
%14 = add nsw i32 %10, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @structTimeval2usecs(i64 %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = mul nsw i32 %3, 1000000
%5 = trunc i64 %0 to i32
%6 = add nsw i32 %4, %5
ret i32 %6
}
void rop3_216_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = S ^ T;
  stk2 = *D & stk3;
  stk1 = T ^ stk2;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
<rop3_216_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xa(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xd(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
movzbl -0xb(%rbp),%ecx
movzbl -0xa(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
movzbl -0xa(%rbp),%ecx
movzbl -0x9(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
mov    -0x8(%rbp),%rdx
movzbl (%rdx),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_216_0_1>:
mov    %edx,%eax
xor    %sil,%al
mov    (%rdi),%r8b
and    %r8b,%al
mov    %edx,%ecx
not    %cl
and    %al,%cl
xor    %dl,%al
and    %sil,%al
not    %sil
and    %dl,%sil
and    %r8b,%sil
or     %cl,%sil
or     %al,%sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_216_0_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %5
%11 = zext i8 %10 to i32
%12 = load i8, i8* %6
%13 = zext i8 %12 to i32
%14 = xor i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %9
%16 = load i8*, i8** %4
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = load i8, i8* %9
%20 = zext i8 %19 to i32
%21 = and i32 %18, %20
%22 = trunc i32 %21 to i8
store i8 %22, i8* %8
%23 = load i8, i8* %6
%24 = zext i8 %23 to i32
%25 = load i8, i8* %8
%26 = zext i8 %25 to i32
%27 = xor i32 %24, %26
%28 = trunc i32 %27 to i8
store i8 %28, i8* %7
%29 = load i8, i8* %7
%30 = zext i8 %29 to i32
%31 = load i8, i8* %5
%32 = zext i8 %31 to i32
%33 = and i32 %30, %32
%34 = load i8, i8* %7
%35 = zext i8 %34 to i32
%36 = load i8, i8* %6
%37 = zext i8 %36 to i32
%38 = xor i32 %37, -1
%39 = and i32 %35, %38
%40 = or i32 %33, %39
%41 = load i8, i8* %6
%42 = zext i8 %41 to i32
%43 = load i8, i8* %5
%44 = zext i8 %43 to i32
%45 = xor i32 %44, -1
%46 = and i32 %42, %45
%47 = load i8*, i8** %4
%48 = load i8, i8* %47
%49 = zext i8 %48 to i32
%50 = and i32 %46, %49
%51 = or i32 %40, %50
%52 = trunc i32 %51 to i8
%53 = load i8*, i8** %4
store i8 %52, i8* %53
ret void
}

LLVM IR (-O2):
define void @rop3_216_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %2, %1
%5 = load i8, i8* %0
%6 = and i8 %5, %4
%7 = xor i8 %6, %2
%8 = and i8 %7, %1
%9 = xor i8 %2, -1
%10 = and i8 %6, %9
%11 = xor i8 %1, -1
%12 = and i8 %11, %2
%13 = and i8 %12, %5
%14 = or i8 %10, %13
%15 = or i8 %14, %8
store i8 %15, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void printErrorExit(char *str) {
  printf("error message:%s\n", str);
  exit(1);
}


x86 assembly (clang, -O0):
<printErrorExit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<printErrorExit>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"error message:%s\0A\00"
define void @printErrorExit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [18 x i8] c"error message:%s\0A\00"
define void @printErrorExit(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, const char *argv[]) {
  typedef enum { Red, Orange, Yellow, Green, Blue, Violet } colorT;
  printf("Hello, wolrd!\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"Hello, wolrd!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int test_imm_96uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x96 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_96uint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x20,%rdx
and    $0x96,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_96uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 644245094400
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void foo460() {}


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

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

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

LLVM IR (-O2):
define void @foo460() {
ret void
}
int ffi_test_10(int a, int b, double c, int d, float e, int f, int g, int h) {
  return (int)(a - b - c - d - e - f - g - h);
}


x86 assembly (clang, -O0):
<ffi_test_10>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movss  %xmm1,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
cvtsi2sd %eax,%xmm0
subsd  -0x10(%rbp),%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
subsd  %xmm1,%xmm0
movss  -0x18(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
subsd  %xmm1,%xmm0
cvtsi2sdl -0x1c(%rbp),%xmm1
subsd  %xmm1,%xmm0
cvtsi2sdl -0x20(%rbp),%xmm1
subsd  %xmm1,%xmm0
cvtsi2sdl -0x24(%rbp),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ffi_test_10>:
sub    %esi,%edi
cvtsi2sd %edi,%xmm2
subsd  %xmm0,%xmm2
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
subsd  %xmm0,%xmm2
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
subsd  %xmm0,%xmm2
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
subsd  %xmm0,%xmm2
xorps  %xmm0,%xmm0
cvtsi2sd %r8d,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %r9d,%xmm1
subsd  %xmm0,%xmm2
subsd  %xmm1,%xmm2
cvttsd2si %xmm2,%eax
ret

LLVM IR (-O0):
define i32 @ffi_test_10(i32 %0, i32 %1, double %2, i32 %3, float %4, i32 %5, i32 %6, i32 %7) {
%9 = alloca i32
%10 = alloca i32
%11 = alloca double
%12 = alloca i32
%13 = alloca float
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
store i32 %0, i32* %9
store i32 %1, i32* %10
store double %2, double* %11
store i32 %3, i32* %12
store float %4, float* %13
store i32 %5, i32* %14
store i32 %6, i32* %15
store i32 %7, i32* %16
%17 = load i32, i32* %9
%18 = load i32, i32* %10
%19 = sub nsw i32 %17, %18
%20 = sitofp i32 %19 to double
%21 = load double, double* %11
%22 = fsub double %20, %21
%23 = load i32, i32* %12
%24 = sitofp i32 %23 to double
%25 = fsub double %22, %24
%26 = load float, float* %13
%27 = fpext float %26 to double
%28 = fsub double %25, %27
%29 = load i32, i32* %14
%30 = sitofp i32 %29 to double
%31 = fsub double %28, %30
%32 = load i32, i32* %15
%33 = sitofp i32 %32 to double
%34 = fsub double %31, %33
%35 = load i32, i32* %16
%36 = sitofp i32 %35 to double
%37 = fsub double %34, %36
%38 = fptosi double %37 to i32
ret i32 %38
}

LLVM IR (-O2):
define i32 @ffi_test_10(i32 %0, i32 %1, double %2, i32 %3, float %4, i32 %5, i32 %6, i32 %7) {
%9 = sub nsw i32 %0, %1
%10 = sitofp i32 %9 to double
%11 = fsub double %10, %2
%12 = sitofp i32 %3 to double
%13 = fsub double %11, %12
%14 = fpext float %4 to double
%15 = fsub double %13, %14
%16 = sitofp i32 %5 to double
%17 = fsub double %15, %16
%18 = sitofp i32 %6 to double
%19 = fsub double %17, %18
%20 = sitofp i32 %7 to double
%21 = fsub double %19, %20
%22 = fptosi double %21 to i32
ret i32 %22
}
void glmMakeVector2f(float result[2], const float p1[2], const float p2[2]) {
  result[0] = p2[0] - p1[0];
  result[1] = p2[1] - p1[1];
}


x86 assembly (clang, -O0):
<glmMakeVector2f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
subss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x10(%rbp),%rax
subss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmMakeVector2f>:
movss  (%rdx),%xmm0
subss  (%rsi),%xmm0
movss  %xmm0,(%rdi)
movss  0x4(%rdx),%xmm0
subss  0x4(%rsi),%xmm0
movss  %xmm0,0x4(%rdi)
ret

LLVM IR (-O0):
define void @glmMakeVector2f(float* %0, float* %1, float* %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float*
store float* %0, float** %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load float*, float** %6
%8 = getelementptr inbounds float, float* %7, i64 0
%9 = load float, float* %8
%10 = load float*, float** %5
%11 = getelementptr inbounds float, float* %10, i64 0
%12 = load float, float* %11
%13 = fsub float %9, %12
%14 = load float*, float** %4
%15 = getelementptr inbounds float, float* %14, i64 0
store float %13, float* %15
%16 = load float*, float** %6
%17 = getelementptr inbounds float, float* %16, i64 1
%18 = load float, float* %17
%19 = load float*, float** %5
%20 = getelementptr inbounds float, float* %19, i64 1
%21 = load float, float* %20
%22 = fsub float %18, %21
%23 = load float*, float** %4
%24 = getelementptr inbounds float, float* %23, i64 1
store float %22, float* %24
ret void
}

LLVM IR (-O2):
define void @glmMakeVector2f(float* nocapture writeonly %0, float* nocapture %1, float* nocapture %2) {
%4 = load float, float* %2
%5 = load float, float* %1
%6 = fsub float %4, %5
store float %6, float* %0
%7 = getelementptr inbounds float, float* %2, i64 1
%8 = load float, float* %7
%9 = getelementptr inbounds float, float* %1, i64 1
%10 = load float, float* %9
%11 = fsub float %8, %10
%12 = getelementptr inbounds float, float* %0, i64 1
store float %11, float* %12
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int sweep_clear_definitions(void) {
  int fail, *a, *b;
  double *c;
  fail = _ada_use_c2phc(617, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<sweep_clear_definitions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x269,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sweep_clear_definitions>:
mov    $0x269,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @sweep_clear_definitions() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca double*
%5 = load i32*, i32** %2
%6 = load i32*, i32** %3
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 617, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %1
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
define i32 @sweep_clear_definitions() {
%1 = tail call i32 @_ada_use_c2phc(i32 617, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void test2() {
  int i = 0;
  for (i = 0; i < 32; i++) {
    printf("i %d: %u\n", i, 0x1 << i);
  }
}


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x20,-0x4(%rbp)
jge    1157 <test2+0x47>
mov    -0x4(%rbp),%esi
mov    -0x4(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1126 <test2+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test2>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xee3(%rip),%r14
nopl   (%rax)
mov    $0x1,%edx
mov    %ebx,%ecx
shl    %cl,%edx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x20,%ebx
jne    1120 <test2+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"i %d: %u\0A\00"
define void @test2() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = shl nuw i32 1, %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3)
%5 = add nuw nsw i32 %2, 1
%6 = icmp eq i32 %5, 32
br i1 %6, label %7, label %1
7: ; preds = %1
ret void
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMRD9_get(void) { return U_WMRCORENONE_get("U_WMRD9"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMRD9\00"
define i32 @U_WMRD9_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRD9\00"
define i32 @U_WMRD9_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void merge_sort(int *a, int len) {
  int mid = len / 2;
  printf("mid = %i\n", mid);
  printf("wip\n");
}


x86 assembly (clang, -O0):
<merge_sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<merge_sort>:
push   %rax
mov    %esi,%eax
shr    $0x1f,%eax
add    %eax,%esi
sar    %esi
lea    0xecf(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xecb(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@.str = [10 x i8] c"mid = %i\0A\00"
@str = [4 x i8] c"wip\00"
define void @merge_sort(i32* nocapture readnone %0, i32 %1) {
%3 = sdiv i32 %1, 2
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret void
}
char *outl(p, l, maxl)
char *p;
long l;
long *maxl;
{
  long *q = (long *)p;
  if (*maxl < sizeof(long))
    fatal("out of space to store resource");
  *maxl = *maxl - sizeof(long);
  *q++ = l;
  return (char *)q;
}


x86 assembly (clang, -O0):
<outl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmpq   $0x8,(%rax)
jae    1148 <outl+0x38>
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <fatal@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%rcx
sub    $0x8,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %rax,%rdx
add    $0x8,%rdx
mov    %rdx,-0x20(%rbp)
mov    %rcx,(%rax)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outl>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r15
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdx),%rax
cmp    $0x7,%rax
ja     1138 <outl+0x28>
lea    0xed2(%rip),%rdi
xor    %eax,%eax
call   1030 <fatal@plt>
mov    (%r15),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,(%r15)
mov    %r14,(%rbx)
add    $0x8,%rbx
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [31 x i8] c"out of space to store resource\00"
define i8* @outl(i8* %0, i64 %1, i64* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64*
%7 = alloca i64*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i64* %2, i64** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i64*
store i64* %9, i64** %7
%10 = load i64*, i64** %6
%11 = load i64, i64* %10
%12 = icmp ult i64 %11, 8
br i1 %12, label %13, label %15
13: ; preds = %3
%14 = call i32 (i8*, ...) bitcast (i32 (...)* @fatal to i32 (i8*, ...)*)(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %3
%16 = load i64*, i64** %6
%17 = load i64, i64* %16
%18 = sub i64 %17, 8
%19 = load i64*, i64** %6
store i64 %18, i64* %19
%20 = load i64, i64* %5
%21 = load i64*, i64** %7
%22 = getelementptr inbounds i64, i64* %21, i32 1
store i64* %22, i64** %7
store i64 %20, i64* %21
%23 = load i64*, i64** %7
%24 = bitcast i64* %23 to i8*
ret i8* %24
}

LLVM IR (-O2):
@.str = [31 x i8] c"out of space to store resource\00"
define i8* @outl(i8* writeonly %0, i64 %1, i64* nocapture %2) {
%4 = load i64, i64* %2
%5 = icmp ult i64 %4, 8
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 (i8*, ...) bitcast (i32 (...)* @fatal to i32 (i8*, ...)*)(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%8 = load i64, i64* %2
br label %9
9: ; preds = %6, %3
%10 = phi i64 [ %8, %6 ], [ %4, %3 ]
%11 = bitcast i8* %0 to i64*
%12 = add i64 %10, -8
store i64 %12, i64* %2
%13 = getelementptr inbounds i8, i8* %0, i64 8
store i64 %1, i64* %11
ret i8* %13
}
/* Variables and functions */
scalar_t__ strchr(char *, char);
int isoper(char c) {
  if (strchr("@;:,+-/*^=()[]<>", c))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isoper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
lea    0xedb(%rip),%rdi
movsbl -0x5(%rbp),%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     1144 <isoper+0x34>
movl   $0x1,-0x4(%rbp)
jmp    114b <isoper+0x3b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isoper>:
push   %rax
mov    %edi,%esi
lea    0xee6(%rip),%rdi
call   1030 <strchr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"@;:,+-/*^=()[]<>\00"
define i32 @isoper(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i64 @strchr(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8 signext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
@.str = [17 x i8] c"@;:,+-/*^=()[]<>\00"
define i32 @isoper(i8 signext %0) {
%2 = tail call i64 @strchr(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8 signext %0)
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int embed_standard_system(int d) {
  int fail;
  int *b;
  double *c;
  fail = _ada_use_c2phc4c(66, &d, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<embed_standard_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x42,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<embed_standard_system>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x42,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @embed_standard_system(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
%5 = alloca double*
store i32 %0, i32* %2
%6 = load i32*, i32** %4
%7 = load double*, double** %5
%8 = call i32 @_ada_use_c2phc4c(i32 66, i32* %2, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @embed_standard_system(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc4c(i32 66, i32* %2, i32* undef, double* undef, i32 0)
ret i32 %3
}
void unsigned_prune_ge1_Good(unsigned int x, unsigned int y) {
  if (x >= y) {
    unsigned int z = x - y;
  }
}


x86 assembly (clang, -O0):
<unsigned_prune_ge1_Good>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jb     111f <unsigned_prune_ge1_Good+0x1f>
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @unsigned_prune_ge1_Good(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = icmp uge i32 %6, %7
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = sub i32 %10, %11
store i32 %12, i32* %5
br label %13
13: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
define void @unsigned_prune_ge1_Good(i32 %0, i32 %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ write_be64(int /*<<< orphan*/ *, int /*<<< orphan*/);
void write_at_be64(void *dest, uint64_t val, size_t offset) {
  uint8_t *d = dest;
  d += offset;
  write_be64(d, val);
}


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

x86 assembly (clang, -O2):
<write_at_be64>:
lea    (%rdi,%rdx,4),%rdi
jmp    1030 <write_be64@plt>

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

LLVM IR (-O2):
define void @write_at_be64(i8* %0, i32 %1, i64 %2) {
%4 = bitcast i8* %0 to i32*
%5 = getelementptr inbounds i32, i32* %4, i64 %2
%6 = tail call i32 @write_be64(i32* %5, i32 %1)
ret void
}
void TIM1_CC_IRQHandler() {}


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

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

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

LLVM IR (-O2):
define void @TIM1_CC_IRQHandler() {
ret void
}
int do_353() { return 353; }


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

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

LLVM IR (-O0):
define i32 @do_353() {
ret i32 353
}

LLVM IR (-O2):
define i32 @do_353() {
ret i32 353
}
/* Type definitions */
struct _DriBufferPool {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct _DriBufferPool *);
void pool_takedown(struct _DriBufferPool *pool) { free(pool); }


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

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

LLVM IR (-O2):
%struct._DriBufferPool = type { i32 }
define void @pool_takedown(%struct._DriBufferPool* nocapture %0) {
%2 = tail call i32 @free(%struct._DriBufferPool* %0)
ret void
}
void ds_log_init(const char *argv0) {}


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

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

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

LLVM IR (-O2):
define void @ds_log_init(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void array_std_free(void *baton, void *p) { free(p); }


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

x86 assembly (clang, -O2):
<array_std_free>:
mov    %rsi,%rdi
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @array_std_free(i8* nocapture readnone %0, i8* nocapture %1) {
%3 = tail call i32 @free(i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void show_bytes(char *p, int size) {
  int i;
  for (i = 0; i < size; i++) {
    printf("%x ", p[i]);
  }
}


x86 assembly (clang, -O0):
<show_bytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1158 <show_bytes+0x48>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
lea    0xebf(%rip),%rdi
movsbl (%rax,%rcx,1),%esi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <show_bytes+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_bytes>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1146 <show_bytes+0x36>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <show_bytes+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%x \00"
define void @show_bytes(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
int add_numbers(int a, int b) { return a + b; }


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

x86 assembly (clang, -O2):
<add_numbers>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @add_numbers(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 = load i32, i32* %4
%7 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @add_numbers(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void ck_do_nothing(void) { assert(0); }


x86 assembly (clang, -O0):
<ck_do_nothing>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ck_do_nothing>:
xor    %edi,%edi
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @ck_do_nothing() {
%1 = call i32 @assert(i32 0)
ret void
}

LLVM IR (-O2):
define void @ck_do_nothing() {
%1 = tail call i32 @assert(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void msleep(unsigned int msecs) { usleep(1000 * msecs); }


x86 assembly (clang, -O0):
<msleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
imul   $0x3e8,-0x4(%rbp),%edi
call   1030 <usleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msleep>:
imul   $0x3e8,%edi,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @msleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul i32 1000, %3
%5 = call i32 @usleep(i32 %4)
ret void
}

LLVM IR (-O2):
define void @msleep(i32 %0) {
%2 = mul i32 %0, 1000
%3 = tail call i32 @usleep(i32 %2)
ret void
}
/* Variables and functions */
scalar_t__ strstr(char *, char *);
int sports_or_workout(char *s) {
  return strstr(s, "sports") || strstr(s, "woking out");
}


x86 assembly (clang, -O0):
<sports_or_workout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strstr@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    1158 <sports_or_workout+0x48>
mov    -0x8(%rbp),%rdi
lea    0xebe(%rip),%rsi
call   1030 <strstr@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sports_or_workout>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strstr@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     112f <sports_or_workout+0x1f>
pop    %rbx
ret
lea    0xed1(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strstr@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"sports\00"
@.str.1 = [11 x i8] c"woking out\00"
define i32 @sports_or_workout(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strstr(i8* %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i64 @strstr(i8* %7, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
@.str = [7 x i8] c"sports\00"
@.str.1 = [11 x i8] c"woking out\00"
define i32 @sports_or_workout(i8* %0) {
%2 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int tor_main(int, char **);
int main(int argc, char *argv[]) {
  int r;
  r = tor_main(argc, argv);
  if (r < 0 || r > 255)
    return 1;
  else
    return r;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <tor_main@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     114c <main+0x3c>
cmpl   $0xff,-0x14(%rbp)
jle    1158 <main+0x48>
movl   $0x1,-0x4(%rbp)
jmp    115e <main+0x4e>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <tor_main@plt>
cmp    $0x100,%eax
mov    $0x1,%ecx
cmovae %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = call i32 @tor_main(i32 %7, i8** %8)
store i32 %9, i32* %6
%10 = load i32, i32* %6
%11 = icmp slt i32 %10, 0
br i1 %11, label %15, label %12
12: ; preds = %2
%13 = load i32, i32* %6
%14 = icmp sgt i32 %13, 255
br i1 %14, label %15, label %16
15: ; preds = %12, %2
store i32 1, i32* %3
br label %18
16: ; preds = %12
%17 = load i32, i32* %6
store i32 %17, i32* %3
br label %18
18: ; preds = %16, %15
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @tor_main(i32 %0, i8** %1)
%4 = icmp ugt i32 %3, 255
%5 = select i1 %4, i32 1, i32 %3
ret i32 %5
}