xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ ptr;

/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void **, int);
void *mm_alloc(unsigned int);
int ss128_mm_alloc(void *data_, void *res, unsigned int z) {
  (void)data_;
  void *ptr = mm_alloc(z);
  memcpy(res, &ptr, sizeof(ptr));
  return !ptr;
}


x86 assembly (clang, -O0):
<ss128_mm_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <mm_alloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
cmpq   $0x0,-0x20(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ss128_mm_alloc>:
push   %rbx
sub    $0x10,%rsp
mov    %edx,%edi
mov    %rsi,%rbx
call   1040 <mm_alloc@plt>
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x8,%edx
call   1030 <memcpy@plt>
xor    %eax,%eax
cmpq   $0x0,0x8(%rsp)
sete   %al
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ss128_mm_alloc(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = load i32, i32* %6
%10 = call i8* @mm_alloc(i32 %9)
store i8* %10, i8** %7
%11 = load i8*, i8** %5
%12 = call i32 @memcpy(i8* %11, i8** %7, i32 8)
%13 = load i8*, i8** %7
%14 = icmp ne i8* %13, null
%15 = xor i1 %14, true
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @ss128_mm_alloc(i8* nocapture readnone %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = bitcast i8** %4 to i8*
%6 = tail call i8* @mm_alloc(i32 %2)
store i8* %6, i8** %4
%7 = call i32 @memcpy(i8* %1, i8** %4, i32 8)
%8 = load i8*, i8** %4
%9 = icmp eq i8* %8, null
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ f(int, int, int, int);
int /*<<< orphan*/ g(int, int, int, int);
int main() {
  f(1, 2, 3, 4);
  g(8, 9, 3, 4);
  f(3, 4, 8, 9);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
call   1030 <f@plt>
mov    $0x8,%edi
mov    $0x9,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
call   1040 <g@plt>
mov    $0x3,%edi
mov    $0x4,%esi
mov    $0x8,%edx
mov    $0x9,%ecx
call   1030 <f@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
call   1030 <f@plt>
mov    $0x8,%edi
mov    $0x9,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
call   1040 <g@plt>
mov    $0x3,%edi
mov    $0x4,%esi
mov    $0x8,%edx
mov    $0x9,%ecx
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @f(i32 1, i32 2, i32 3, i32 4)
%2 = call i32 @g(i32 8, i32 9, i32 3, i32 4)
%3 = call i32 @f(i32 3, i32 4, i32 8, i32 9)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 1, i32 2, i32 3, i32 4)
%2 = tail call i32 @g(i32 8, i32 9, i32 3, i32 4)
%3 = tail call i32 @f(i32 3, i32 4, i32 8, i32 9)
ret i32 0
}
/* Type definitions */
struct timeval {
  unsigned long tv_usec;
  int tv_sec;
};

/* Variables and functions */
scalar_t__ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
unsigned long time_usec(void) {
  struct timeval tv;
  if (gettimeofday(&tv, NULL) < 0)
    return 0;
  return tv.tv_usec + tv.tv_sec * 1000000;
}


x86 assembly (clang, -O0):
<time_usec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
cmp    $0x0,%rax
jge    113c <time_usec+0x2c>
movq   $0x0,-0x8(%rbp)
jmp    1151 <time_usec+0x41>
mov    -0x18(%rbp),%rax
imul   $0xf4240,-0x10(%rbp),%ecx
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.timeval = type { i64, i32 }
define i64 @time_usec() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i64 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = icmp slt i64 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %0
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%7 = load i64, i64* %6
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%9 = load i32, i32* %8
%10 = mul nsw i32 %9, 1000000
%11 = sext i32 %10 to i64
%12 = add i64 %7, %11
br label %13
13: ; preds = %0, %5
%14 = phi i64 [ %12, %5 ], [ 0, %0 ]
ret i64 %14
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint64_t;
typedef int uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int UINT16_MAX;
int UINT32_MAX;
int UINT8_MAX;
uint32_t mp_sizeof_uint(uint64_t num) {
  if (num <= 0x7f) {
    return 1;
  } else if (num <= UINT8_MAX) {
    return 1 + sizeof(uint8_t);
  } else if (num <= UINT16_MAX) {
    return 1 + sizeof(uint16_t);
  } else if (num <= UINT32_MAX) {
    return 1 + sizeof(uint32_t);
  } else {
    return 1 + sizeof(uint64_t);
  }
}


x86 assembly (clang, -O0):
<mp_sizeof_uint>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x7f,-0x8(%rbp)
jg     111d <mp_sizeof_uint+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    117e <mp_sizeof_uint+0x7e>
mov    -0x8(%rbp),%eax
mov    0x2eb1(%rip),%rcx
cmp    (%rcx),%eax
jg     113b <mp_sizeof_uint+0x3b>
movl   $0x5,-0x4(%rbp)
jmp    117e <mp_sizeof_uint+0x7e>
mov    -0x8(%rbp),%eax
mov    0x2e8b(%rip),%rcx
cmp    (%rcx),%eax
jg     1159 <mp_sizeof_uint+0x59>
movl   $0x5,-0x4(%rbp)
jmp    117e <mp_sizeof_uint+0x7e>
mov    -0x8(%rbp),%eax
mov    0x2e95(%rip),%rcx
cmp    (%rcx),%eax
jg     1177 <mp_sizeof_uint+0x77>
movl   $0x5,-0x4(%rbp)
jmp    117e <mp_sizeof_uint+0x7e>
movl   $0x5,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp_sizeof_uint>:
xor    %eax,%eax
cmp    $0x7f,%edi
setg   %al
lea    0x1(,%rax,4),%eax
ret

LLVM IR (-O0):
@UINT8_MAX = global i32 0
@UINT16_MAX = global i32 0
@UINT32_MAX = global i32 0
define i32 @mp_sizeof_uint(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 %4, 127
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 1, i32* %2
br label %23
7: ; preds = %1
%8 = load i32, i32* %3
%9 = load i32, i32* @UINT8_MAX
%10 = icmp sle i32 %8, %9
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 5, i32* %2
br label %23
12: ; preds = %7
%13 = load i32, i32* %3
%14 = load i32, i32* @UINT16_MAX
%15 = icmp sle i32 %13, %14
br i1 %15, label %16, label %17
16: ; preds = %12
store i32 5, i32* %2
br label %23
17: ; preds = %12
%18 = load i32, i32* %3
%19 = load i32, i32* @UINT32_MAX
%20 = icmp sle i32 %18, %19
br i1 %20, label %21, label %22
21: ; preds = %17
store i32 5, i32* %2
br label %23
22: ; preds = %17
store i32 5, i32* %2
br label %23
23: ; preds = %22, %21, %16, %11, %6
%24 = load i32, i32* %2
ret i32 %24
}

LLVM IR (-O2):
@UINT8_MAX = global i32 0
@UINT16_MAX = global i32 0
@UINT32_MAX = global i32 0
define i32 @mp_sizeof_uint(i32 %0) {
%2 = icmp slt i32 %0, 128
%3 = select i1 %2, i32 1, i32 5
ret i32 %3
}
/* Variables and functions */
void ft_strclean(char *str, size_t len) {
  size_t i;
  i = 0;
  while (i < len)
    str[i++] = '\0';
}


x86 assembly (clang, -O0):
<ft_strclean>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    113e <ft_strclean+0x3e>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movb   $0x0,(%rax,%rcx,1)
jmp    1114 <ft_strclean+0x14>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strclean>:
test   %rsi,%rsi
je     1124 <ft_strclean+0x14>
push   %rax
mov    %rsi,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define void @ft_strclean(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
store i64 0, i64* %5
br label %6
6: ; preds = %10, %2
%7 = load i64, i64* %5
%8 = load i64, i64* %4
%9 = icmp ult i64 %7, %8
br i1 %9, label %10, label %15
10: ; preds = %6
%11 = load i8*, i8** %3
%12 = load i64, i64* %5
%13 = add i64 %12, 1
store i64 %13, i64* %5
%14 = getelementptr inbounds i8, i8* %11, i64 %12
store i8 0, i8* %14
br label %6
15: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @ft_strclean(i8* nocapture writeonly %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %5, label %4
4: ; preds = %2
br label %5
5: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sendConf(int, int);
void setPurpleAudio(int sockfd) {
  sendConf(sockfd, (1 << 7) | (1 << 3) | (1 << 1));
}


x86 assembly (clang, -O0):
<setPurpleAudio>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x8a,%esi
call   1030 <sendConf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setPurpleAudio>:
mov    $0x8a,%esi
jmp    1030 <sendConf@plt>

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

LLVM IR (-O2):
define void @setPurpleAudio(i32 %0) {
%2 = tail call i32 @sendConf(i32 %0, i32 138)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int main() {
  int x = 0;
  while (1) {
    __VERIFIER_assert(x == 0);
  }
  __VERIFIER_assert(x != 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
sete   %al
and    $0x1,%al
mov    %al,-0x9(%rbp)
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
jmp    1126 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1030 <__VERIFIER_assert@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %0, %3
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
%7 = call i32 @__VERIFIER_assert(i32 %6)
br label %3
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @__VERIFIER_assert(i32 1)
br label %1
}
/* Variables and functions */
char *leaky_malloc(int);
int /*<<< orphan*/ memcpy(char *, char const *, int);
int strlen(char const *);
char *leaky_strdup(const char *src) {
  int len = strlen(src) + 1;
  char *res = leaky_malloc(len);
  memcpy(res, src, len);
  return res;
}


x86 assembly (clang, -O0):
<leaky_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <leaky_malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1050 <memcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<leaky_strdup>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%ebp
mov    %ebp,%edi
call   1030 <leaky_malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1050 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @leaky_strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = add nsw i32 %6, 1
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = call i8* @leaky_malloc(i32 %8)
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = load i8*, i8** %2
%12 = load i32, i32* %3
%13 = call i32 @memcpy(i8* %10, i8* %11, i32 %12)
%14 = load i8*, i8** %4
ret i8* %14
}

LLVM IR (-O2):
define i8* @leaky_strdup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i8* @leaky_malloc(i32 %3)
%5 = tail call i32 @memcpy(i8* %4, i8* %0, i32 %3)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ errno;
int fsync(int fildes) {
  errno = EINVAL;
  return -1;
}


x86 assembly (clang, -O0):
<fsync>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    0x2eca(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec9(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsync>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
@errno = global i32 0
define i32 @fsync(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @EINVAL
store i32 %3, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@EINVAL = global i32 0
@errno = global i32 0
define i32 @fsync(i32 %0) {
%2 = load i32, i32* @EINVAL
store i32 %2, i32* @errno
ret i32 -1
}
/* Variables and functions */
double exp(double);
double sqrt(int);
double normalpdf(double x, double m, double s) {
  double z = (x - m) / s;
  return exp(-z * z / 2) / (sqrt(2 * 3.1415926) * s);
}


x86 assembly (clang, -O0):
<normalpdf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  0xe8c(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  %xmm0,-0x28(%rbp)
mov    $0x6,%edi
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<normalpdf>:
sub    $0x18,%rsp
movsd  %xmm2,0x10(%rsp)
subsd  %xmm1,%xmm0
divsd  %xmm2,%xmm0
mulsd  %xmm0,%xmm0
mulsd  0xec2(%rip),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,0x8(%rsp)
mov    $0x6,%edi
call   1040 <sqrt@plt>
mulsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @normalpdf(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%8 = load double, double* %4
%9 = load double, double* %5
%10 = fsub double %8, %9
%11 = load double, double* %6
%12 = fdiv double %10, %11
store double %12, double* %7
%13 = load double, double* %7
%14 = fneg double %13
%15 = load double, double* %7
%16 = fmul double %14, %15
%17 = fdiv double %16, 2.000000e+00
%18 = call double @exp(double %17)
%19 = call double @sqrt(i32 6)
%20 = load double, double* %6
%21 = fmul double %19, %20
%22 = fdiv double %18, %21
ret double %22
}

LLVM IR (-O2):
define double @normalpdf(double %0, double %1, double %2) {
%4 = fsub double %0, %1
%5 = fdiv double %4, %2
%6 = fneg double %5
%7 = fmul double %5, %6
%8 = fmul double %7, 5.000000e-01
%9 = tail call double @exp(double %8)
%10 = tail call double @sqrt(i32 6)
%11 = fmul double %10, %2
%12 = fdiv double %9, %11
ret double %12
}
/* Variables and functions */
int /*<<< orphan*/ EX_USAGE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(char const *progname) {
  fprintf(stderr,
          "Usage: %s [-hfv] [files...]\n"
          "Options:\n"
          "  -f		faster allocation (don't trace)\n"
          "  -h		print this message\n"
          "  -t		time command execution\n"
          "  -v		more verbose logging (v ... vvv)\n"
          "\n",
          progname);
  exit(EX_USAGE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [170 x i8] c"Usage: %s [-hfv] [files...]\0AOptions:\0A -f\09\09faster allocation (don't trace)\0A -h\09\09print this message\0A -t\09\09time command execution\0A -v\09\09more verbose logging (v ... vvv)\0A\0A\00"
@EX_USAGE = global i32 0
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EX_USAGE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [170 x i8] c"Usage: %s [-hfv] [files...]\0AOptions:\0A -f\09\09faster allocation (don't trace)\0A -h\09\09print this message\0A -t\09\09time command execution\0A -v\09\09more verbose logging (v ... vvv)\0A\0A\00"
@EX_USAGE = global i32 0
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EX_USAGE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
double cimag(double _Complex z) { abort(); }


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

x86 assembly (clang, -O2):
<cimag>:
push   %rax
call   1030 <abort@plt>

LLVM IR (-O0):
define double @cimag(double %0, double %1) {
%3 = alloca { double, double }
%4 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
store double %0, double* %4
%5 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 1
store double %1, double* %5
unreachable
}

LLVM IR (-O2):
define double @cimag(double %0, double %1) {
tail call void @abort()
unreachable
}
void *threadFunc(void *x) {
  printf("\n %s: \n", __func__);
  return x;
}


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

x86 assembly (clang, -O2):
<threadFunc>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
lea    0xee6(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"\0A %s: \0A\00"
@__func__.threadFunc = [11 x i8] c"threadFunc\00"
define i8* @threadFunc(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.threadFunc, i64 0, i64 0))
%4 = load i8*, i8** %2
ret i8* %4
}

LLVM IR (-O2):
@.str = [8 x i8] c"\0A %s: \0A\00"
@__func__.threadFunc = [11 x i8] c"threadFunc\00"
define i8* @threadFunc(i8* readnone returned %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.threadFunc, i64 0, i64 0))
ret i8* %0
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int refine_root(int n, int *m, double *c) {
  int *a, fail;
  int b[2];
  b[0] = n;
  b[1] = *m;
  fail = _ada_use_c2phc4c(149, a, b, c, 0);
  *m = b[1];
  return fail;
}


x86 assembly (clang, -O0):
<refine_root>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x28(%rbp)
mov    -0x20(%rbp),%rsi
lea    -0x2c(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x95,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x24(%rbp)
mov    -0x28(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<refine_root>:
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%rcx
mov    %rsi,%rbx
mov    %edi,0x8(%rsp)
mov    (%rsi),%eax
mov    %eax,0xc(%rsp)
lea    0x8(%rsp),%rdx
mov    $0x95,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    0xc(%rsp),%ecx
mov    %ecx,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @refine_root(i32 %0, i32* %1, double* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca double*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca [2 x i32]
store i32 %0, i32* %4
store i32* %1, i32** %5
store double* %2, double** %6
%10 = load i32, i32* %4
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 0
store i32 %10, i32* %11
%12 = load i32*, i32** %5
%13 = load i32, i32* %12
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 1
store i32 %13, i32* %14
%15 = load i32*, i32** %7
%16 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 0
%17 = load double*, double** %6
%18 = call i32 @_ada_use_c2phc4c(i32 149, i32* %15, i32* %16, double* %17, i32 0)
store i32 %18, i32* %8
%19 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 1
%20 = load i32, i32* %19
%21 = load i32*, i32** %5
store i32 %20, i32* %21
%22 = load i32, i32* %8
ret i32 %22
}

LLVM IR (-O2):
define i32 @refine_root(i32 %0, i32* nocapture %1, double* %2) {
%4 = alloca [2 x i32]
%5 = bitcast [2 x i32]* %4 to i8*
%6 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
store i32 %0, i32* %6
%7 = load i32, i32* %1
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 1
store i32 %7, i32* %8
%9 = call i32 @_ada_use_c2phc4c(i32 149, i32* undef, i32* %6, double* %2, i32 0)
%10 = load i32, i32* %8
store i32 %10, i32* %1
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ try_write_some(int, void const **, unsigned int *);
int try_write(int fd, void const *data, unsigned size) {
  while (size)
    if (!try_write_some(fd, &data, &size))
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<try_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1156 <try_write+0x46>
mov    -0x8(%rbp),%edi
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
call   1030 <try_write_some@plt>
cmp    $0x0,%eax
jne    1151 <try_write+0x41>
movl   $0x0,-0x4(%rbp)
jmp    115d <try_write+0x4d>
jmp    1122 <try_write+0x12>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<try_write>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,0x10(%rsp)
mov    %edx,0xc(%rsp)
mov    $0x1,%r14d
test   %edx,%edx
je     115d <try_write+0x4d>
mov    %edi,%ebp
lea    0x10(%rsp),%r15
lea    0xc(%rsp),%rbx
nopl   0x0(%rax)
mov    %ebp,%edi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1030 <try_write_some@plt>
test   %eax,%eax
je     115a <try_write+0x4a>
cmpl   $0x0,0xc(%rsp)
jne    1140 <try_write+0x30>
jmp    115d <try_write+0x4d>
xor    %r14d,%r14d
mov    %r14d,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @try_write(i32 %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
store i8* %1, i8** %4
store i32 %2, i32* %5
%6 = icmp eq i32 %2, 0
br i1 %6, label %13, label %10
7: ; preds = %10
%8 = load i32, i32* %5
%9 = icmp eq i32 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %3, %7
%11 = call i32 @try_write_some(i32 %0, i8** %4, i32* %5)
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %7
13: ; preds = %10, %7, %3
%14 = phi i32 [ 1, %3 ], [ 1, %7 ], [ 0, %10 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("open source SW project\n");
  printf("First GitHub : tranning\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>
lea    0xee6(%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>
lea    0xef3(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"open source SW project\0A\00"
@.str.1 = [25 x i8] c"First GitHub : tranning\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [23 x i8] c"open source SW project\00"
@str.2 = [24 x i8] c"First GitHub : tranning\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
int imod(int a, int b) {
  int r = a % b;
  return r < 0 ? r + b : r;
}


x86 assembly (clang, -O0):
<imod>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    112c <imod+0x2c>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1132 <imod+0x32>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<imod>:
mov    %edi,%eax
cltd
idiv   %esi
mov    %edx,%eax
sar    $0x1f,%eax
and    %esi,%eax
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @imod(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 = srem i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load i32, i32* %5
%13 = load i32, i32* %4
%14 = add nsw i32 %12, %13
br label %17
15: ; preds = %2
%16 = load i32, i32* %5
br label %17
17: ; preds = %15, %11
%18 = phi i32 [ %14, %11 ], [ %16, %15 ]
ret i32 %18
}

LLVM IR (-O2):
define i32 @imod(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
%4 = icmp slt i32 %3, 0
%5 = select i1 %4, i32 %1, i32 0
%6 = add nsw i32 %5, %3
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *);
int open(char const *, int);
int ec_open(const char *filename, int mode) {
  int fd;
  fd = open(filename, mode);
  if (fd == -1) {
    fatal("in ec_open() on opening file");
  }
  return fd;
}


x86 assembly (clang, -O0):
<ec_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <open@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0xffffffff,-0x10(%rbp)
jne    1154 <ec_open+0x34>
lea    0xeb1(%rip),%rdi
call   1040 <fatal@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ec_open>:
push   %rbx
call   1030 <open@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
jne    1139 <ec_open+0x19>
lea    0xecc(%rip),%rdi
call   1040 <fatal@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"in ec_open() on opening file\00"
define i32 @ec_open(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @open(i8* %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp eq i32 %9, -1
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 @fatal(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %2
%14 = load i32, i32* %5
ret i32 %14
}

LLVM IR (-O2):
@.str = [29 x i8] c"in ec_open() on opening file\00"
define i32 @ec_open(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @open(i8* %0, i32 %1)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @fatal(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ write(char *, char *, int /*<<< orphan*/ *);
void function_empty_priority() { write("csv-task.csv", ",", NULL); }


x86 assembly (clang, -O0):
<function_empty_priority>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeeb(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<function_empty_priority>:
lea    0xee9(%rip),%rdi
lea    0xeef(%rip),%rsi
xor    %edx,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"csv-task.csv\00"
@.str.1 = [2 x i8] c",\00"
define void @function_empty_priority() {
%1 = call i32 @write(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"csv-task.csv\00"
@.str.1 = [2 x i8] c",\00"
define void @function_empty_priority() {
%1 = tail call i32 @write(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}
int sum_efibs(int limit) {
  int sum = 0;
  int a = 1;
  int b = 1;
  int c = a + b;
  while (c < limit) {
    sum = sum + c;
    a = b + c;
    b = c + a;
    c = a + b;
  }
  return sum;
}


x86 assembly (clang, -O0):
<sum_efibs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    115a <sum_efibs+0x5a>
mov    -0x8(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x14(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1125 <sum_efibs+0x25>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum_efibs>:
xor    %eax,%eax
cmp    $0x3,%edi
jl     1132 <sum_efibs+0x32>
xor    %eax,%eax
mov    $0x1,%ecx
mov    $0x2,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    %edx,%eax
add    %edx,%ecx
mov    %edx,%esi
add    %ecx,%esi
add    %esi,%ecx
mov    %ecx,%edx
cmp    %edi,%ecx
mov    %esi,%ecx
jl     1120 <sum_efibs+0x20>
ret

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

LLVM IR (-O2):
define i32 @sum_efibs(i32 %0) {
%2 = icmp sgt i32 %0, 2
br i1 %2, label %3, label %12
3: ; preds = %1, %3
%4 = phi i32 [ %10, %3 ], [ 2, %1 ]
%5 = phi i32 [ %9, %3 ], [ 1, %1 ]
%6 = phi i32 [ %7, %3 ], [ 0, %1 ]
%7 = add nsw i32 %4, %6
%8 = add nsw i32 %4, %5
%9 = add nsw i32 %8, %4
%10 = add nsw i32 %9, %8
%11 = icmp slt i32 %10, %0
br i1 %11, label %3, label %12
12: ; preds = %3, %1
%13 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %13
}
double dist(double *x, double *y) {
  int i;
  double d = 0;
  for (i = 0; i < 2; i++) {
    d += (x[i] - y[i]) * (x[i] - y[i]);
  }
  return d;
}


x86 assembly (clang, -O0):
<dist>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x2,-0x14(%rbp)
jge    1179 <dist+0x79>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm2
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111b <dist+0x1b>
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dist>:
movsd  (%rdi),%xmm1
subsd  (%rsi),%xmm1
movsd  0x8(%rdi),%xmm0
mulsd  %xmm1,%xmm1
xorpd  %xmm2,%xmm2
addsd  %xmm1,%xmm2
subsd  0x8(%rsi),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @dist(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca i32
%6 = alloca double
store double* %0, double** %3
store double* %1, double** %4
store double 0.000000e+00, double* %6
store i32 0, i32* %5
br label %7
7: ; preds = %35, %2
%8 = load i32, i32* %5
%9 = icmp slt i32 %8, 2
br i1 %9, label %10, label %38
10: ; preds = %7
%11 = load double*, double** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds double, double* %11, i64 %13
%15 = load double, double* %14
%16 = load double*, double** %4
%17 = load i32, i32* %5
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds double, double* %16, i64 %18
%20 = load double, double* %19
%21 = fsub double %15, %20
%22 = load double*, double** %3
%23 = load i32, i32* %5
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds double, double* %22, i64 %24
%26 = load double, double* %25
%27 = load double*, double** %4
%28 = load i32, i32* %5
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds double, double* %27, i64 %29
%31 = load double, double* %30
%32 = fsub double %26, %31
%33 = load double, double* %6
%34 = call double @llvm.fmuladd.f64(double %21, double %32, double %33)
store double %34, double* %6
br label %35
35: ; preds = %10
%36 = load i32, i32* %5
%37 = add nsw i32 %36, 1
store i32 %37, i32* %5
br label %7
38: ; preds = %7
%39 = load double, double* %6
ret double %39
}

LLVM IR (-O2):
define double @dist(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = fsub double %3, %4
%6 = tail call double @llvm.fmuladd.f64(double %5, double %5, double 0.000000e+00)
%7 = getelementptr inbounds double, double* %0, i64 1
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %1, i64 1
%10 = load double, double* %9
%11 = fsub double %8, %10
%12 = tail call double @llvm.fmuladd.f64(double %11, double %11, double %6)
ret double %12
}
/* Type definitions */
typedef int /*<<< orphan*/ z_stream;

/* Variables and functions */
int /*<<< orphan*/ Z_NO_FLUSH;
int deflate(int /*<<< orphan*/ *, int /*<<< orphan*/);
int streaming_commons_call_deflate_noflush(z_stream *stream) {
  return deflate(stream, Z_NO_FLUSH);
}


x86 assembly (clang, -O0):
<streaming_commons_call_deflate_noflush>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
call   1030 <deflate@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<streaming_commons_call_deflate_noflush>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <deflate@plt>

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

LLVM IR (-O2):
@Z_NO_FLUSH = global i32 0
define i32 @streaming_commons_call_deflate_noflush(i32* %0) {
%2 = load i32, i32* @Z_NO_FLUSH
%3 = tail call i32 @deflate(i32* %0, i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ do_set_softvol(int);
int /*<<< orphan*/ parse_bool(char const *, int *);
void set_softvol(unsigned int id, const char *buf) {
  int soft;
  if (!parse_bool(buf, &soft))
    return;
  do_set_softvol(soft);
}


x86 assembly (clang, -O0):
<set_softvol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <parse_bool@plt>
cmp    $0x0,%eax
jne    114a <set_softvol+0x2a>
jmp    1152 <set_softvol+0x32>
mov    -0x14(%rbp),%edi
call   1040 <do_set_softvol@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_softvol>:
push   %rax
mov    %rsi,%rdi
lea    0x4(%rsp),%rsi
call   1030 <parse_bool@plt>
test   %eax,%eax
je     113b <set_softvol+0x1b>
mov    0x4(%rsp),%edi
call   1040 <do_set_softvol@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @set_softvol(i32 %0, i8* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @parse_bool(i8* %1, i32* %3)
%6 = icmp eq i32 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i32, i32* %3
%9 = call i32 @do_set_softvol(i32 %8)
br label %10
10: ; preds = %2, %7
ret void
}
void init_trampoline_kaslr(void) {}


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

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

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

LLVM IR (-O2):
define void @init_trampoline_kaslr() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ reverse_words_aux(char *, int /*<<< orphan*/);
void reverse_words_1(char *str) { (void)reverse_words_aux(str, 0); }


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

x86 assembly (clang, -O2):
<reverse_words_1>:
xor    %esi,%esi
jmp    1030 <reverse_words_aux@plt>

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

LLVM IR (-O2):
define void @reverse_words_1(i8* %0) {
%2 = tail call i32 @reverse_words_aux(i8* %0, i32 0)
ret void
}
int *copyip(ipf, ipt)
register int *ipf, *ipt;
{
  while ((*ipt = *ipf) && *ipf++ != -1)
    ipt++;
  *ipt = 0;
  return (ipt);
}


x86 assembly (clang, -O0):
<copyip>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     113e <copyip+0x3e>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
cmpl   $0xffffffff,(%rax)
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    114e <copyip+0x4e>
jmp    115f <copyip+0x5f>
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
jmp    110c <copyip+0xc>
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<copyip>:
mov    %rsi,%rax
mov    (%rdi),%ecx
mov    %ecx,(%rsi)
test   %ecx,%ecx
je     1127 <copyip+0x27>
add    $0x4,%rdi
nop
cmpl   $0xffffffff,-0x4(%rdi)
je     1127 <copyip+0x27>
mov    (%rdi),%ecx
mov    %ecx,0x4(%rax)
add    $0x4,%rax
add    $0x4,%rdi
test   %ecx,%ecx
jne    1110 <copyip+0x10>
movl   $0x0,(%rax)
ret

LLVM IR (-O0):
define i32* @copyip(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
br label %5
5: ; preds = %17, %2
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
%8 = load i32*, i32** %4
store i32 %7, i32* %8
%9 = icmp ne i32 %7, 0
br i1 %9, label %10, label %15
10: ; preds = %5
%11 = load i32*, i32** %3
%12 = getelementptr inbounds i32, i32* %11, i32 1
store i32* %12, i32** %3
%13 = load i32, i32* %11
%14 = icmp ne i32 %13, -1
br label %15
15: ; preds = %10, %5
%16 = phi i1 [ false, %5 ], [ %14, %10 ]
br i1 %16, label %17, label %20
17: ; preds = %15
%18 = load i32*, i32** %4
%19 = getelementptr inbounds i32, i32* %18, i32 1
store i32* %19, i32** %4
br label %5
20: ; preds = %15
%21 = load i32*, i32** %4
store i32 0, i32* %21
%22 = load i32*, i32** %4
ret i32* %22
}

LLVM IR (-O2):
define i32* @copyip(i32* nocapture %0, i32* writeonly %1) {
%3 = load i32, i32* %0
store i32 %3, i32* %1
%4 = icmp eq i32 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %10
%6 = phi i32* [ %12, %10 ], [ %1, %2 ]
%7 = phi i32* [ %11, %10 ], [ %0, %2 ]
%8 = load i32, i32* %7
%9 = icmp eq i32 %8, -1
br i1 %9, label %15, label %10
10: ; preds = %5
%11 = getelementptr inbounds i32, i32* %7, i64 1
%12 = getelementptr inbounds i32, i32* %6, i64 1
%13 = load i32, i32* %11
store i32 %13, i32* %12
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %10, %2
%16 = phi i32* [ %1, %2 ], [ %12, %10 ], [ %6, %5 ]
store i32 0, i32* %16
ret i32* %16
}
double foo06(double a, double b, double c) { return (a - b * c); }


x86 assembly (clang, -O0):
<foo06>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo06>:
mulsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @foo06(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
%7 = load double, double* %4
%8 = load double, double* %5
%9 = load double, double* %6
%10 = fneg double %8
%11 = call double @llvm.fmuladd.f64(double %10, double %9, double %7)
ret double %11
}

LLVM IR (-O2):
define double @foo06(double %0, double %1, double %2) {
%4 = fneg double %1
%5 = tail call double @llvm.fmuladd.f64(double %4, double %2, double %0)
ret double %5
}
/* Type definitions */
typedef int /*<<< orphan*/ X509_VERIFY_PARAM;

/* Variables and functions */
int /*<<< orphan*/ OPENSSL_free(int /*<<< orphan*/ *);
int /*<<< orphan*/ x509_verify_param_zero(int /*<<< orphan*/ *);
void X509_VERIFY_PARAM_free(X509_VERIFY_PARAM *param) {
  x509_verify_param_zero(param);
  OPENSSL_free(param);
}


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

x86 assembly (clang, -O2):
<X509_VERIFY_PARAM_free>:
push   %rbx
mov    %rdi,%rbx
call   1030 <x509_verify_param_zero@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <OPENSSL_free@plt>

LLVM IR (-O0):
define void @X509_VERIFY_PARAM_free(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @x509_verify_param_zero(i32* %3)
%5 = load i32*, i32** %2
%6 = call i32 @OPENSSL_free(i32* %5)
ret void
}

LLVM IR (-O2):
define void @X509_VERIFY_PARAM_free(i32* %0) {
%2 = tail call i32 @x509_verify_param_zero(i32* %0)
%3 = tail call i32 @OPENSSL_free(i32* %0)
ret void
}
void _dtable_unregister(int d) {}


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

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

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

LLVM IR (-O2):
define void @_dtable_unregister(i32 %0) {
ret void
}
void alphabet_free(struct alphabet *alpha) { alpha = alpha; }


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

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

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

LLVM IR (-O2):
%struct.alphabet = type opaque
define void @alphabet_free(%struct.alphabet* nocapture %0) {
ret void
}