xunge/DecIR huggingface dataset:
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
scalar_t__ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
long long venc_time_microsec() {
  struct timeval time;
  long long time_microsec = 0;
  if (gettimeofday(&time, NULL) == 0) {
    time_microsec =
        ((long long)time.tv_sec * 1000 * 1000) + ((long long)time.tv_usec);
  }
  return time_microsec;
}


x86 assembly (clang, -O0):
<venc_time_microsec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movq   $0x0,-0x18(%rbp)
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
cmp    $0x0,%rax
jne    114e <venc_time_microsec+0x3e>
imul   $0x3e8,-0x8(%rbp),%rax
imul   $0x3e8,%rax,%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<venc_time_microsec>:
push   %rbx
sub    $0x10,%rsp
xor    %ebx,%ebx
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,0x8(%rsp),%rcx
add    (%rsp),%rcx
test   %rax,%rax
cmovne %rbx,%rcx
mov    %rcx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define i64 @venc_time_microsec() {
%1 = alloca %struct.timeval
%2 = alloca i64
store i64 0, i64* %2
%3 = call i64 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %13
5: ; preds = %0
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%7 = load i64, i64* %6
%8 = mul nsw i64 %7, 1000
%9 = mul nsw i64 %8, 1000
%10 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%11 = load i64, i64* %10
%12 = add nsw i64 %9, %11
store i64 %12, i64* %2
br label %13
13: ; preds = %5, %0
%14 = load i64, i64* %2
ret i64 %14
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define i64 @venc_time_microsec() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i64 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = icmp eq i64 %3, 0
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%6 = load i64, i64* %5
%7 = mul i64 %6, 1000000
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%9 = load i64, i64* %8
%10 = add nsw i64 %7, %9
%11 = select i1 %4, i64 %10, i64 0
ret i64 %11
}
/* Variables and functions */
double atan2(double, double);
double futhark_atan2_32(double x, double y) { return atan2(x, y); }


x86 assembly (clang, -O0):
<futhark_atan2_32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <atan2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<futhark_atan2_32>:
jmp    1030 <atan2@plt>

LLVM IR (-O0):
define double @futhark_atan2_32(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call double @atan2(double %5, double %6)
ret double %7
}

LLVM IR (-O2):
define double @futhark_atan2_32(double %0, double %1) {
%3 = tail call double @atan2(double %0, double %1)
ret double %3
}
void GPIOPinTypeGPIOInput(unsigned long i, unsigned long j) {}


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

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

LLVM IR (-O0):
define void @GPIOPinTypeGPIOInput(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
ret void
}

LLVM IR (-O2):
define void @GPIOPinTypeGPIOInput(i64 %0, i64 %1) {
ret void
}
/* Variables and functions */
int floor(int /*<<< orphan*/);
int /*<<< orphan*/ helper_random_float_min_max(float, float);
int helper_random_int_min_max(int i_min, int i_max) {
  return floor(helper_random_float_min_max((float)i_min, (float)i_max));
}


x86 assembly (clang, -O0):
<helper_random_int_min_max>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
cvtsi2ssl -0x8(%rbp),%xmm1
call   1030 <helper_random_float_min_max@plt>
mov    %eax,%edi
call   1040 <floor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<helper_random_int_min_max>:
push   %rax
cvtsi2ss %edi,%xmm0
cvtsi2ss %esi,%xmm1
call   1030 <helper_random_float_min_max@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <floor@plt>

LLVM IR (-O0):
define i32 @helper_random_int_min_max(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = sitofp i32 %5 to float
%7 = load i32, i32* %4
%8 = sitofp i32 %7 to float
%9 = call i32 @helper_random_float_min_max(float %6, float %8)
%10 = call i32 @floor(i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @helper_random_int_min_max(i32 %0, i32 %1) {
%3 = sitofp i32 %0 to float
%4 = sitofp i32 %1 to float
%5 = tail call i32 @helper_random_float_min_max(float %3, float %4)
%6 = tail call i32 @floor(i32 %5)
ret i32 %6
}
adrreg0adrreg1(r0, r1, x0, x1, p0, p1) unsigned int r0, r1;
unsigned int *p0, *p1;
{
  if ((p0[10000000]) <= (p1[1111111 / 4]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<adrreg0adrreg1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    0x2625a00(%rax),%eax
mov    -0x28(%rbp),%rcx
cmp    0x10f444(%rcx),%eax
ja     113e <adrreg0adrreg1+0x3e>
movl   $0x1,-0x4(%rbp)
jmp    1145 <adrreg0adrreg1+0x45>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adrreg0adrreg1>:
mov    0x2625a00(%r8),%ecx
xor    %eax,%eax
cmp    0x10f444(%r9),%ecx
setbe  %al
ret

LLVM IR (-O0):
define i32 @adrreg0adrreg1(i32 %0, i32 %1, i32 %2, i32 %3, i32* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32* %4, i32** %12
store i32* %5, i32** %13
%14 = load i32*, i32** %12
%15 = getelementptr inbounds i32, i32* %14, i64 10000000
%16 = load i32, i32* %15
%17 = load i32*, i32** %13
%18 = getelementptr inbounds i32, i32* %17, i64 277777
%19 = load i32, i32* %18
%20 = icmp ule i32 %16, %19
br i1 %20, label %21, label %22
21: ; preds = %6
store i32 1, i32* %7
br label %23
22: ; preds = %6
store i32 0, i32* %7
br label %23
23: ; preds = %22, %21
%24 = load i32, i32* %7
ret i32 %24
}

LLVM IR (-O2):
define i32 @adrreg0adrreg1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture %4, i32* nocapture %5) {
%7 = getelementptr inbounds i32, i32* %4, i64 10000000
%8 = load i32, i32* %7
%9 = getelementptr inbounds i32, i32* %5, i64 277777
%10 = load i32, i32* %9
%11 = icmp ule i32 %8, %10
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int dlib_free(void *self) {
  free(self);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @dlib_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int LZ4HC_Free(void **LZ4HC_Data) {
  free(*LZ4HC_Data);
  *LZ4HC_Data = NULL;
  return (1);
}


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

x86 assembly (clang, -O2):
<LZ4HC_Free>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
movq   $0x0,(%rbx)
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @LZ4HC_Free(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @free(i8* %2)
store i8* null, i8** %0
ret i32 1
}
/* Type definitions */
typedef scalar_t__ base;

/* Variables and functions */
int /*<<< orphan*/ barrier();
unsigned long get_uart_base();
void putc(int c) {
  unsigned long base = get_uart_base();
  if (!base)
    return;
  while ((*(volatile unsigned char *)((base) + 0x18)) & (1 << 5))
    barrier();
  (*(volatile unsigned char *)((base) + 0x00)) = c;
}


x86 assembly (clang, -O0):
<putc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <get_uart_base@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1146 <putc+0x26>
jmp    1178 <putc+0x58>
jmp    114b <putc+0x2b>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%al
movzbl %al,%eax
and    $0x20,%eax
cmp    $0x0,%eax
je     116d <putc+0x4d>
mov    $0x0,%al
call   1030 <barrier@plt>
jmp    114b <putc+0x2b>
mov    -0x4(%rbp),%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putc>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <get_uart_base@plt>
test   %rax,%rax
je     1150 <putc+0x30>
mov    %rax,%rbx
testb  $0x20,0x18(%rbx)
je     114d <putc+0x2d>
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <barrier@plt>
testb  $0x20,0x18(%rbx)
jne    1140 <putc+0x20>
mov    %bpl,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @putc(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
%4 = call i64 (...) @get_uart_base()
store i64 %4, i64* %3
%5 = load i64, i64* %3
%6 = icmp ne i64 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %1
br label %25
8: ; preds = %1
br label %9
9: ; preds = %17, %8
%10 = load i64, i64* %3
%11 = add i64 %10, 24
%12 = inttoptr i64 %11 to i8*
%13 = load volatile i8, i8* %12
%14 = zext i8 %13 to i32
%15 = and i32 %14, 32
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %9
%18 = call i32 (...) @barrier()
br label %9
19: ; preds = %9
%20 = load i32, i32* %2
%21 = trunc i32 %20 to i8
%22 = load i64, i64* %3
%23 = add i64 %22, 0
%24 = inttoptr i64 %23 to i8*
store volatile i8 %21, i8* %24
br label %25
25: ; preds = %19, %7
ret void
}

LLVM IR (-O2):
define void @putc(i32 %0) {
%2 = tail call i64 (...) @get_uart_base()
%3 = icmp eq i64 %2, 0
br i1 %3, label %18, label %4
4: ; preds = %1
%5 = add i64 %2, 24
%6 = inttoptr i64 %5 to i8*
%7 = load volatile i8, i8* %6
%8 = and i8 %7, 32
%9 = icmp eq i8 %8, 0
br i1 %9, label %15, label %10
10: ; preds = %4, %10
%11 = tail call i32 (...) @barrier()
%12 = load volatile i8, i8* %6
%13 = and i8 %12, 32
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %10
15: ; preds = %10, %4
%16 = trunc i32 %0 to i8
%17 = inttoptr i64 %2 to i8*
store volatile i8 %16, i8* %17
br label %18
18: ; preds = %1, %15
ret void
}
/* Variables and functions */
int /*<<< orphan*/ rdp_reset_state();
void rdesktop_reset_state(void) { rdp_reset_state(); }


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

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

LLVM IR (-O0):
define void @rdesktop_reset_state() {
%1 = call i32 (...) @rdp_reset_state()
ret void
}

LLVM IR (-O2):
define void @rdesktop_reset_state() {
%1 = tail call i32 (...) @rdp_reset_state()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Msp430GpioC__9__GeneralIO__makeOutput();
void CC2420ControlP__VREN__makeOutput(void) {
  Msp430GpioC__9__GeneralIO__makeOutput();
}


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

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

LLVM IR (-O0):
define void @CC2420ControlP__VREN__makeOutput() {
%1 = call i32 (...) @Msp430GpioC__9__GeneralIO__makeOutput()
ret void
}

LLVM IR (-O2):
define void @CC2420ControlP__VREN__makeOutput() {
%1 = tail call i32 (...) @Msp430GpioC__9__GeneralIO__makeOutput()
ret void
}
/* Variables and functions */
int errno;
int *__errno(void) { return &errno; }


x86 assembly (clang, -O0):
<__errno>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__errno>:
mov    0x2ed9(%rip),%rax
ret

LLVM IR (-O0):
@errno = global i32 0
define i32* @__errno() {
ret i32* @errno
}

LLVM IR (-O2):
@errno = global i32 0
define i32* @__errno() {
ret i32* @errno
}
/* Variables and functions */
int /*<<< orphan*/ tommy_hashlin_done(void *);
void deinitialize_hash_table(void *ht) { tommy_hashlin_done(ht); }


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

x86 assembly (clang, -O2):
<deinitialize_hash_table>:
jmp    1030 <tommy_hashlin_done@plt>

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

LLVM IR (-O2):
define void @deinitialize_hash_table(i8* %0) {
%2 = tail call i32 @tommy_hashlin_done(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("__NR_memfd_create is not defined, skipping test.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
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 = [50 x i8] c"__NR_memfd_create is not defined, skipping test.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [49 x i8] c"__NR_memfd_create is not defined, skipping test.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
void timestamp_early_init(uint64_t base) {}


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

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

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

LLVM IR (-O2):
define void @timestamp_early_init(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ tab_free(scalar_t__);
scalar_t__ tabs_cur();
int /*<<< orphan*/ tabs_set_cur(int /*<<< orphan*/ *);
void tabs_term(void) {
  if (tabs_cur()) {
    tab_free(tabs_cur());
    tabs_set_cur(NULL);
  }
}


x86 assembly (clang, -O0):
<tabs_term>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <tabs_cur@plt>
cmp    $0x0,%rax
je     115d <tabs_term+0x2d>
mov    $0x0,%al
call   1030 <tabs_cur@plt>
mov    %rax,%rdi
call   1050 <tab_free@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <tabs_set_cur@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tabs_term>:
push   %rax
xor    %eax,%eax
call   1030 <tabs_cur@plt>
test   %rax,%rax
je     1154 <tabs_term+0x24>
xor    %eax,%eax
call   1030 <tabs_cur@plt>
mov    %rax,%rdi
call   1050 <tab_free@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <tabs_set_cur@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @tabs_term() {
%1 = call i64 (...) @tabs_cur()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = call i64 (...) @tabs_cur()
%5 = call i32 @tab_free(i64 %4)
%6 = call i32 @tabs_set_cur(i32* null)
br label %7
7: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
define void @tabs_term() {
%1 = tail call i64 (...) @tabs_cur()
%2 = icmp eq i64 %1, 0
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i64 (...) @tabs_cur()
%5 = tail call i32 @tab_free(i64 %4)
%6 = tail call i32 @tabs_set_cur(i32* null)
br label %7
7: ; preds = %3, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar(float *);
void foo(void) {
  float c[1024] = {};
  bar(c);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1000,%rsp
lea    -0x1000(%rbp),%rdi
xor    %esi,%esi
mov    $0x1000,%edx
call   1040 <memset@plt>
lea    -0x1000(%rbp),%rdi
call   1030 <bar@plt>
add    $0x1000,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbx
sub    $0x1000,%rsp
mov    %rsp,%rbx
mov    $0x1000,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
mov    %rbx,%rdi
call   1030 <bar@plt>
add    $0x1000,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @foo() {
%1 = alloca [1024 x float]
%2 = bitcast [1024 x float]* %1 to i8*
%3 = getelementptr inbounds [1024 x float], [1024 x float]* %1, i64 0, i64 0
%4 = call i32 @bar(float* %3)
ret void
}

LLVM IR (-O2):
define void @foo() {
%1 = alloca [1024 x float]
%2 = bitcast [1024 x float]* %1 to i8*
%3 = getelementptr inbounds [1024 x float], [1024 x float]* %1, i64 0, i64 0
%4 = call i32 @bar(float* %3)
ret void
}
/* Variables and functions */
char *strchr(char *, char);
int add_delim(char *line) {
  char *ptr;
  int ret = 1;
  ptr = strchr(line, '"');
  if (ptr == NULL) {
    ret = 0;
  } else
    *ptr = '\0';
  return ret;
}


x86 assembly (clang, -O0):
<add_delim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x22,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114c <add_delim+0x3c>
movl   $0x0,-0x14(%rbp)
jmp    1153 <add_delim+0x43>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_delim>:
push   %rax
mov    $0x22,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     112a <add_delim+0x1a>
movb   $0x0,(%rax)
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @add_delim(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
store i32 1, i32* %4
%5 = load i8*, i8** %2
%6 = call i8* @strchr(i8* %5, i8 signext 34)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 0, i32* %4
br label %12
10: ; preds = %1
%11 = load i8*, i8** %3
store i8 0, i8* %11
br label %12
12: ; preds = %10, %9
%13 = load i32, i32* %4
ret i32 %13
}

LLVM IR (-O2):
define i32 @add_delim(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 34)
%3 = icmp eq i8* %2, null
br i1 %3, label %5, label %4
4: ; preds = %1
store i8 0, i8* %2
br label %5
5: ; preds = %1, %4
%6 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ e_txs();
void e_txs_accu() { e_txs(); }


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

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

LLVM IR (-O0):
define void @e_txs_accu() {
%1 = call i32 (...) @e_txs()
ret void
}

LLVM IR (-O2):
define void @e_txs_accu() {
%1 = tail call i32 (...) @e_txs()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stdout;
void tarefa(int a) { fprintf(stdout, "%d\n", a); }


x86 assembly (clang, -O0):
<tarefa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xed2(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tarefa>:
mov    %edi,%edx
mov    0x2ec7(%rip),%rax
mov    (%rax),%edi
lea    0xede(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [4 x i8] c"%d\0A\00"
define void @tarefa(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stdout
%4 = load i32, i32* %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [4 x i8] c"%d\0A\00"
define void @tarefa(i32 %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
void eat_ws(const char *s, int *i) {
  while ((((s[*i]) == '\t') || ((s[*i]) == ' ')))
    (*i)++;
}


x86 assembly (clang, -O0):
<eat_ws>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movslq (%rcx),%rcx
movsbl (%rax,%rcx,1),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x11(%rbp)
je     1141 <eat_ws+0x41>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movslq (%rcx),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1151 <eat_ws+0x51>
jmp    1161 <eat_ws+0x61>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
jmp    110c <eat_ws+0xc>
pop    %rbp
ret

x86 assembly (clang, -O2):
<eat_ws>:
movslq (%rsi),%rax
jmp    1116 <eat_ws+0x16>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rax
mov    %eax,(%rsi)
movzbl (%rdi,%rax,1),%ecx
cmp    $0x20,%cl
je     1110 <eat_ws+0x10>
cmp    $0x9,%cl
je     1110 <eat_ws+0x10>
ret

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

LLVM IR (-O2):
define void @eat_ws(i8* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
br label %4
4: ; preds = %9, %2
%5 = phi i32 [ %10, %9 ], [ %3, %2 ]
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
switch i8 %8, label %11 [
i8 9, label %9
i8 32, label %9
]
9: ; preds = %4, %4
%10 = add nsw i32 %5, 1
store i32 %10, i32* %1
br label %4
11: ; preds = %4
ret void
}
int close(int fd) {
  int r;
  __asm__ __volatile__("\tint $0x80\n" : "=a"(r) : "a"(6), "b"(fd) : "memory");
  return r;
}


x86 assembly (clang, -O0):
<close>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%ebx
mov    $0x6,%eax
int    $0x80
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<close>:
push   %rbx
mov    %edi,%ebx
mov    $0x6,%eax
int    $0x80
pop    %rbx
ret

LLVM IR (-O0):
define i32 @close(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 asm sideeffect "\09int $$0x80\0A", "={ax},{ax},{bx},~{memory},~{dirflag},~{fpsr},~{flags}"(i32 6, i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @close(i32 %0) {
%2 = tail call i32 asm sideeffect "\09int $$0x80\0A", "={ax},{ax},{bx},~{memory},~{dirflag},~{fpsr},~{flags}"(i32 6, i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ lookNarray(char *, unsigned int);
void lookinteger4array_(void *x, unsigned int *n) {
  lookNarray((char *)x, (*n * 4));
}


x86 assembly (clang, -O0):
<lookinteger4array_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
shl    $0x2,%esi
call   1030 <lookNarray@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lookinteger4array_>:
mov    (%rsi),%esi
shl    $0x2,%esi
jmp    1030 <lookNarray@plt>

LLVM IR (-O0):
define void @lookinteger4array_(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i8*, i8** %3
%6 = load i32*, i32** %4
%7 = load i32, i32* %6
%8 = mul i32 %7, 4
%9 = call i32 @lookNarray(i8* %5, i32 %8)
ret void
}

LLVM IR (-O2):
define void @lookinteger4array_(i8* %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = shl i32 %3, 2
%5 = tail call i32 @lookNarray(i8* %0, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ check_align(char *, int);
b() {
  int i = 3;
  char c[i];
  c[0] = 0;
  c[1] = 0;
  c[2] = 0;
  check_align(c, i);
}


x86 assembly (clang, -O0):
<b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x3,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,%rsp
mov    %rax,-0x18(%rbp)
movb   $0x0,(%rdi)
movb   $0x0,0x1(%rdi)
movb   $0x0,0x2(%rdi)
mov    -0x8(%rbp),%esi
call   1030 <check_align@plt>
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b>:
push   %rax
movw   $0x0,(%rsp)
movb   $0x0,0x2(%rsp)
mov    %rsp,%rdi
mov    $0x3,%esi
call   1030 <check_align@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @b() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
store i32 3, i32* %2
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = call i8* @llvm.stacksave()
store i8* %7, i8** %3
%8 = alloca i8, i64 %6
store i64 %6, i64* %4
%9 = getelementptr inbounds i8, i8* %8, i64 0
store i8 0, i8* %9
%10 = getelementptr inbounds i8, i8* %8, i64 1
store i8 0, i8* %10
%11 = getelementptr inbounds i8, i8* %8, i64 2
store i8 0, i8* %11
%12 = load i32, i32* %2
%13 = call i32 @check_align(i8* %8, i32 %12)
%14 = load i8*, i8** %3
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
define i32 @b() {
%1 = alloca [3 x i8]
%2 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
store i8 0, i8* %2
%3 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 1
store i8 0, i8* %3
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 2
store i8 0, i8* %4
%5 = call i32 @check_align(i8* %2, i32 3)
ret i32 undef
}
void SSMR3PutRCPtr(void) {}


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

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

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

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

/* Variables and functions */
uint64_t hash_int64(uint64_t a) {
  a = a ^ (a >> 4);
  a = (a ^ 0xdeadbeefdeadbeefLL) + (a << 5);
  a = a ^ (a >> 11);
  return a;
}


x86 assembly (clang, -O0):
<hash_int64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x4,%ecx
xor    %ecx,%eax
mov    %eax,-0x4(%rbp)
movslq -0x4(%rbp),%rax
movabs $0xdeadbeefdeadbeef,%rcx
be ad de
xor    %rcx,%rax
mov    -0x4(%rbp),%ecx
shl    $0x5,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0xb,%ecx
xor    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_int64>:
mov    %edi,%ecx
sar    $0x4,%ecx
xor    %edi,%ecx
mov    %ecx,%eax
xor    $0xdeadbeef,%eax
shl    $0x5,%ecx
add    %eax,%ecx
mov    %ecx,%eax
sar    $0xb,%eax
xor    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @hash_int64(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = ashr i32 %4, 4
%6 = xor i32 %3, %5
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = sext i32 %7 to i64
%9 = xor i64 %8, -2401053088876216593
%10 = load i32, i32* %2
%11 = shl i32 %10, 5
%12 = sext i32 %11 to i64
%13 = add i64 %9, %12
%14 = trunc i64 %13 to i32
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = load i32, i32* %2
%17 = ashr i32 %16, 11
%18 = xor i32 %15, %17
store i32 %18, i32* %2
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @hash_int64(i32 %0) {
%2 = ashr i32 %0, 4
%3 = xor i32 %2, %0
%4 = xor i32 %3, -559038737
%5 = shl i32 %3, 5
%6 = add i32 %4, %5
%7 = ashr i32 %6, 11
%8 = xor i32 %7, %6
ret i32 %8
}
int x4(int x) { return (x - 1) < x; }


x86 assembly (clang, -O0):
<x4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
cmp    -0x4(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @x4(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 1
%5 = load i32, i32* %2
%6 = icmp slt i32 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @x4(i32 %0) {
ret i32 1
}
void g_del_char(char *input, char *output, char match) {
  while (input[0]) {
    if (input[0] != match) {
      output[0] = input[0];
      output++;
    }
    input++;
  }
  output[0] = 0x0;
}


x86 assembly (clang, -O0):
<g_del_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     115a <g_del_char+0x5a>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
je     1149 <g_del_char+0x49>
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1111 <g_del_char+0x11>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_del_char>:
mov    (%rdi),%al
test   %al,%al
je     1127 <g_del_char+0x27>
add    $0x1,%rdi
jmp    111b <g_del_char+0x1b>
nopl   0x0(%rax)
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
je     1127 <g_del_char+0x27>
cmp    %dl,%al
je     1110 <g_del_char+0x10>
mov    %al,(%rsi)
add    $0x1,%rsi
jmp    1110 <g_del_char+0x10>
movb   $0x0,(%rsi)
ret

LLVM IR (-O0):
define void @g_del_char(i8* %0, i8* %1, i8 signext %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8 %2, i8* %6
br label %7
7: ; preds = %28, %3
%8 = load i8*, i8** %4
%9 = getelementptr inbounds i8, i8* %8, i64 0
%10 = load i8, i8* %9
%11 = icmp ne i8 %10, 0
br i1 %11, label %12, label %31
12: ; preds = %7
%13 = load i8*, i8** %4
%14 = getelementptr inbounds i8, i8* %13, i64 0
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = load i8, i8* %6
%18 = sext i8 %17 to i32
%19 = icmp ne i32 %16, %18
br i1 %19, label %20, label %28
20: ; preds = %12
%21 = load i8*, i8** %4
%22 = getelementptr inbounds i8, i8* %21, i64 0
%23 = load i8, i8* %22
%24 = load i8*, i8** %5
%25 = getelementptr inbounds i8, i8* %24, i64 0
store i8 %23, i8* %25
%26 = load i8*, i8** %5
%27 = getelementptr inbounds i8, i8* %26, i32 1
store i8* %27, i8** %5
br label %28
28: ; preds = %20, %12
%29 = load i8*, i8** %4
%30 = getelementptr inbounds i8, i8* %29, i32 1
store i8* %30, i8** %4
br label %7
31: ; preds = %7
%32 = load i8*, i8** %5
%33 = getelementptr inbounds i8, i8* %32, i64 0
store i8 0, i8* %33
ret void
}

LLVM IR (-O2):
define void @g_del_char(i8* nocapture %0, i8* nocapture writeonly %1, i8 signext %2) {
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %18, label %6
6: ; preds = %3, %13
%7 = phi i8 [ %16, %13 ], [ %4, %3 ]
%8 = phi i8* [ %15, %13 ], [ %0, %3 ]
%9 = phi i8* [ %14, %13 ], [ %1, %3 ]
%10 = icmp eq i8 %7, %2
br i1 %10, label %13, label %11
11: ; preds = %6
store i8 %7, i8* %9
%12 = getelementptr inbounds i8, i8* %9, i64 1
br label %13
13: ; preds = %11, %6
%14 = phi i8* [ %12, %11 ], [ %9, %6 ]
%15 = getelementptr inbounds i8, i8* %8, i64 1
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %6
18: ; preds = %13, %3
%19 = phi i8* [ %1, %3 ], [ %14, %13 ]
store i8 0, i8* %19
ret void
}
/* Variables and functions */
int /*<<< orphan*/ isvalid(char const);
bool isvalidword(const char *s) {
  while (*s) {
    if (!isvalid(*s))
      return false;
    s++;
  }
  return true;
}


x86 assembly (clang, -O0):
<isvalidword>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     115b <isvalidword+0x4b>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isvalid@plt>
cmp    $0x0,%eax
jne    114a <isvalidword+0x3a>
movl   $0x0,-0x4(%rbp)
jmp    1162 <isvalidword+0x52>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111c <isvalidword+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isvalidword>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
mov    $0x1,%ebp
test   %al,%al
je     114b <isvalidword+0x3b>
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
movsbl %al,%edi
call   1030 <isvalid@plt>
test   %eax,%eax
je     1149 <isvalidword+0x39>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <isvalidword+0x20>
jmp    114b <isvalidword+0x3b>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @isvalidword(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %7
4: ; preds = %7
%5 = load i8, i8* %12
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %12, %4 ], [ %0, %1 ]
%10 = tail call i32 @isvalid(i8 signext %8)
%11 = icmp eq i32 %10, 0
%12 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %11, label %13, label %4
13: ; preds = %7, %4, %1
%14 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ]
ret i32 %14
}
int str_truncate_words() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @str_truncate_words() {
ret i32 0
}
/* Variables and functions */
int u8isdigiti(int /*<<< orphan*/);
int /*<<< orphan*/ u8tointc(char *);
int u8isdigitc(char *c) { return u8isdigiti(u8tointc(c)); }


x86 assembly (clang, -O0):
<u8isdigitc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <u8tointc@plt>
mov    %eax,%edi
call   1040 <u8isdigiti@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<u8isdigitc>:
push   %rax
call   1030 <u8tointc@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <u8isdigiti@plt>

LLVM IR (-O0):
define i32 @u8isdigitc(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @u8tointc(i8* %3)
%5 = call i32 @u8isdigiti(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @u8isdigitc(i8* %0) {
%2 = tail call i32 @u8tointc(i8* %0)
%3 = tail call i32 @u8isdigiti(i32 %2)
ret i32 %3
}
/* Variables and functions */
float __ocml_lgamma_f32(float);
float lgammaf(float x) { return __ocml_lgamma_f32(x); }


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

x86 assembly (clang, -O2):
<lgammaf>:
jmp    1030 <__ocml_lgamma_f32@plt>

LLVM IR (-O0):
define float @lgammaf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @__ocml_lgamma_f32(float %3)
ret float %4
}

LLVM IR (-O2):
define float @lgammaf(float %0) {
%2 = tail call float @__ocml_lgamma_f32(float %0)
ret float %2
}
/* Variables and functions */
int findKthLargest(int *, int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int nums[10] = {3, 2, 3, 1, 2, 4, 5, 5, 6};
  printf("%d\n", findKthLargest(nums, 9, 9));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x28,%edx
call   1050 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0x9,%edx
mov    %edx,%esi
call   1040 <findKthLargest@plt>
mov    %eax,%esi
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xef5(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x9,%esi
mov    $0x9,%edx
call   1040 <findKthLargest@plt>
lea    0xec8(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

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

LLVM IR (-O2):
@__const.main.nums = [10 x i32] [i32 3, i32 2, i32 3, i32 1, i32 2, i32 4, i32 5, i32 5, i32 6, i32 0]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @findKthLargest(i32* %3, i32 9, i32 9)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
int eratosthenesOdd(int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int total = eratosthenesOdd(1000000000, 1);
  printf("%d\n", total);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @eratosthenesOdd(i32 1000000000, i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
unsigned char fgetc(int /*<<< orphan*/ *);
unsigned char read1(FILE *f) { return (fgetc(f)); }


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

x86 assembly (clang, -O2):
<read1>:
jmp    1030 <fgetc@plt>

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

LLVM IR (-O2):
define zeroext i8 @read1(i32* nocapture %0) {
%2 = tail call zeroext i8 @fgetc(i32* %0)
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ get_or_create_locale(char const *);
void locale_create(const char *lang) { get_or_create_locale(lang); }


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

x86 assembly (clang, -O2):
<locale_create>:
jmp    1030 <get_or_create_locale@plt>

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

LLVM IR (-O2):
define void @locale_create(i8* %0) {
%2 = tail call i32 @get_or_create_locale(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ bzero(char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
size_t strlen(char *);
int /*<<< orphan*/ write(int, char *, size_t);
void writeThat(char *theStringToWrite) {
  char buf[40];
  size_t nbytes;
  ssize_t bytes_written;
  int fd;
  fd = 1;
  strcpy(buf, theStringToWrite);
  nbytes = strlen(buf);
  bytes_written = write(fd, buf, nbytes);
  bzero(buf, 40);
}


x86 assembly (clang, -O0):
<writeThat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0x40(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x30(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,-0x38(%rbp)
mov    -0x40(%rbp),%edi
lea    -0x30(%rbp),%rsi
mov    -0x38(%rbp),%rdx
call   1040 <write@plt>
mov    %eax,-0x3c(%rbp)
lea    -0x30(%rbp),%rdi
mov    $0x28,%esi
call   1060 <bzero@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeThat>:
push   %rbx
sub    $0x30,%rsp
mov    %rdi,%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %rax,%rdx
call   1040 <write@plt>
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @writeThat(i8* %0) {
%2 = alloca i8*
%3 = alloca [40 x i8]
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %2
store i32 1, i32* %6
%7 = getelementptr inbounds [40 x i8], [40 x i8]* %3, i64 0, i64 0
%8 = load i8*, i8** %2
%9 = call i32 @strcpy(i8* %7, i8* %8)
%10 = getelementptr inbounds [40 x i8], [40 x i8]* %3, i64 0, i64 0
%11 = call i64 @strlen(i8* %10)
store i64 %11, i64* %4
%12 = load i32, i32* %6
%13 = getelementptr inbounds [40 x i8], [40 x i8]* %3, i64 0, i64 0
%14 = load i64, i64* %4
%15 = call i32 @write(i32 %12, i8* %13, i64 %14)
store i32 %15, i32* %5
%16 = getelementptr inbounds [40 x i8], [40 x i8]* %3, i64 0, i64 0
%17 = call i32 @bzero(i8* %16, i32 40)
ret void
}

LLVM IR (-O2):
define void @writeThat(i8* %0) {
%2 = alloca [40 x i8]
%3 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 0
%4 = call i32 @strcpy(i8* %3, i8* %0)
%5 = call i64 @strlen(i8* %3)
%6 = call i32 @write(i32 1, i8* %3, i64 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_warnIfReached();
void do_while_loop_exits() {
  int i = 0;
  do {
    ++i;
  } while (i < 10);
  clang_analyzer_warnIfReached();
}


x86 assembly (clang, -O0):
<do_while_loop_exits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jl     111f <do_while_loop_exits+0xf>
mov    $0x0,%al
call   1030 <clang_analyzer_warnIfReached@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @do_while_loop_exits() {
%1 = tail call i32 (...) @clang_analyzer_warnIfReached()
ret void
}
void EVP_PKEY_add1_attr_by_txt(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_PKEY_add1_attr_by_txt() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long long, long long);
void PrintFib(long long *lNumbers) {
  printf("%d %d ", lNumbers[0], lNumbers[1]);
}


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

x86 assembly (clang, -O2):
<PrintFib>:
mov    (%rdi),%rsi
mov    0x8(%rdi),%rdx
lea    0xee2(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d %d \00"
define void @PrintFib(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = getelementptr inbounds i64, i64* %0, i64 1
%4 = load i64, i64* %3
%5 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i64 %2, i64 %4)
ret void
}
int cg_calculate_offset_expr(struct NExpr *expr) {
  static float sf4;
  static int s4;
  static unsigned int u4;
  static short int s2;
  static unsigned short int u2;
  static unsigned char u1;
}


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

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

LLVM IR (-O0):
%struct.NExpr = type opaque
@cg_calculate_offset_expr.sf4 = internal global float 0.000000e+00
@cg_calculate_offset_expr.s4 = internal global i32 0
@cg_calculate_offset_expr.u4 = internal global i32 0
@cg_calculate_offset_expr.s2 = internal global i16 0
@cg_calculate_offset_expr.u2 = internal global i16 0
@cg_calculate_offset_expr.u1 = internal global i8 0
define i32 @cg_calculate_offset_expr(%struct.NExpr* %0) {
%2 = alloca i32
%3 = alloca %struct.NExpr*
store %struct.NExpr* %0, %struct.NExpr** %3
%4 = load i32, i32* %2
ret i32 %4
}

LLVM IR (-O2):
%struct.NExpr = type opaque
define i32 @cg_calculate_offset_expr(%struct.NExpr* nocapture readnone %0) {
ret i32 undef
}