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

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_p256_to_montgomery(uintptr_t, uintptr_t);
void fiat_p256_to_montgomery(uint64_t out1[4], const uint64_t arg1[4]) {
  internal_fiat_p256_to_montgomery((uintptr_t)out1, (uintptr_t)arg1);
}


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

x86 assembly (clang, -O2):
<fiat_p256_to_montgomery>:
jmp    1030 <internal_fiat_p256_to_montgomery@plt>

LLVM IR (-O0):
define void @fiat_p256_to_montgomery(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 = ptrtoint i32* %5 to i64
%7 = load i32*, i32** %4
%8 = ptrtoint i32* %7 to i64
%9 = call i32 @internal_fiat_p256_to_montgomery(i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
define void @fiat_p256_to_montgomery(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = ptrtoint i32* %1 to i64
%5 = tail call i32 @internal_fiat_p256_to_montgomery(i64 %3, i64 %4)
ret void
}
/* Variables and functions */
int random();
void init(int *array, size_t len, int round) {
  int i;
  for (i = 0; i < len; i++) {
    array[i] = random() % round;
  }
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movslq -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    115c <init+0x4c>
mov    $0x0,%al
call   1030 <random@plt>
cltd
idivl  -0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    112a <init+0x1a>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %rsi,%rsi
je     1148 <init+0x38>
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%r15
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <random@plt>
cltd
idiv   %r14d
mov    %edx,(%r15,%rbp,4)
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1130 <init+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @init(i32* %0, i64 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
store i32 0, i32* %7
br label %8
8: ; preds = %21, %3
%9 = load i32, i32* %7
%10 = sext i32 %9 to i64
%11 = load i64, i64* %5
%12 = icmp ult i64 %10, %11
br i1 %12, label %13, label %24
13: ; preds = %8
%14 = call i32 (...) @random()
%15 = load i32, i32* %6
%16 = srem i32 %14, %15
%17 = load i32*, i32** %4
%18 = load i32, i32* %7
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* %17, i64 %19
store i32 %16, i32* %20
br label %21
21: ; preds = %13
%22 = load i32, i32* %7
%23 = add nsw i32 %22, 1
store i32 %23, i32* %7
br label %8
24: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @init(i32* nocapture writeonly %0, i64 %1, i32 %2) {
%4 = icmp eq i64 %1, 0
br i1 %4, label %12, label %5
5: ; preds = %3, %5
%6 = phi i64 [ %10, %5 ], [ 0, %3 ]
%7 = tail call i32 (...) @random()
%8 = srem i32 %7, %2
%9 = getelementptr inbounds i32, i32* %0, i64 %6
store i32 %8, i32* %9
%10 = add nuw i64 %6, 1
%11 = icmp eq i64 %10, %1
br i1 %11, label %12, label %5
12: ; preds = %5, %3
ret void
}
/* Variables and functions */
int foo4(int);
int foo4t() { return foo4(111) + foo4(99) + foo4(222) + foo4(601); }


x86 assembly (clang, -O0):
<foo4t>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x6f,%edi
call   1030 <foo4@plt>
mov    %eax,-0xc(%rbp)
mov    $0x63,%edi
call   1030 <foo4@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0xde,%edi
call   1030 <foo4@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    $0x259,%edi
call   1030 <foo4@plt>
mov    %eax,%ecx
mov    -0x4(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo4t>:
push   %rbp
push   %rbx
push   %rax
mov    $0x6f,%edi
call   1030 <foo4@plt>
mov    %eax,%ebx
mov    $0x63,%edi
call   1030 <foo4@plt>
mov    %eax,%ebp
add    %ebx,%ebp
mov    $0xde,%edi
call   1030 <foo4@plt>
mov    %eax,%ebx
add    %ebp,%ebx
mov    $0x259,%edi
call   1030 <foo4@plt>
add    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @foo4t() {
%1 = call i32 @foo4(i32 111)
%2 = call i32 @foo4(i32 99)
%3 = add nsw i32 %1, %2
%4 = call i32 @foo4(i32 222)
%5 = add nsw i32 %3, %4
%6 = call i32 @foo4(i32 601)
%7 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @foo4t() {
%1 = tail call i32 @foo4(i32 111)
%2 = tail call i32 @foo4(i32 99)
%3 = add nsw i32 %2, %1
%4 = tail call i32 @foo4(i32 222)
%5 = add nsw i32 %3, %4
%6 = tail call i32 @foo4(i32 601)
%7 = add nsw i32 %5, %6
ret i32 %7
}
unsigned int mus_big_endian_unsigned_int(unsigned char *inp) {
  unsigned int o;
  unsigned char *outp;
  outp = (unsigned char *)&o;
  outp[0] = inp[0];
  outp[1] = inp[1];
  outp[2] = inp[2];
  outp[3] = inp[3];
  return (o);
}


x86 assembly (clang, -O0):
<mus_big_endian_unsigned_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x8(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x8(%rbp),%rax
mov    0x3(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x3(%rax)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mus_big_endian_unsigned_int>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @mus_big_endian_unsigned_int(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i8* %0, i8** %2
%5 = bitcast i32* %3 to i8*
store i8* %5, i8** %4
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = load i8*, i8** %4
%10 = getelementptr inbounds i8, i8* %9, i64 0
store i8 %8, i8* %10
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i64 1
%13 = load i8, i8* %12
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8 %13, i8* %15
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i64 2
%18 = load i8, i8* %17
%19 = load i8*, i8** %4
%20 = getelementptr inbounds i8, i8* %19, i64 2
store i8 %18, i8* %20
%21 = load i8*, i8** %2
%22 = getelementptr inbounds i8, i8* %21, i64 3
%23 = load i8, i8* %22
%24 = load i8*, i8** %4
%25 = getelementptr inbounds i8, i8* %24, i64 3
store i8 %23, i8* %25
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
define i32 @mus_big_endian_unsigned_int(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = load i8, i8* %3
%5 = getelementptr inbounds i8, i8* %0, i64 2
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %0, i64 3
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = shl nuw i32 %9, 24
%11 = zext i8 %6 to i32
%12 = shl nuw nsw i32 %11, 16
%13 = zext i8 %4 to i32
%14 = shl nuw nsw i32 %13, 8
%15 = zext i8 %2 to i32
%16 = or i32 %14, %15
%17 = or i32 %16, %12
%18 = or i32 %17, %10
ret i32 %18
}
/* Variables and functions */
scalar_t__ pthread_self();
void *__PHYSFS_platformGetThreadID(void) {
  return ((void *)((size_t)pthread_self()));
}


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

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

LLVM IR (-O0):
define i8* @__PHYSFS_platformGetThreadID() {
%1 = call i64 (...) @pthread_self()
%2 = inttoptr i64 %1 to i8*
ret i8* %2
}

LLVM IR (-O2):
define i8* @__PHYSFS_platformGetThreadID() {
%1 = tail call i64 (...) @pthread_self()
%2 = inttoptr i64 %1 to i8*
ret i8* %2
}
/* Variables and functions */
int __sunriset__(int, int, int, double, double, double, int /*<<< orphan*/,
                 double *, double *);
int civil_twilight(int year, int month, int day, double lon, double lat,
                   double *start, double *end) {
  return __sunriset__(year, month, day, lon, lat, -6.0, 0, start, end);
}


x86 assembly (clang, -O0):
<civil_twilight>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
movsd  0xeaa(%rip),%xmm2
xor    %ecx,%ecx
call   1030 <__sunriset__@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<civil_twilight>:
mov    %r8,%r9
mov    %rcx,%r8
movsd  0xee2(%rip),%xmm2
xor    %ecx,%ecx
jmp    1030 <__sunriset__@plt>

LLVM IR (-O0):
define i32 @civil_twilight(i32 %0, i32 %1, i32 %2, double %3, double %4, double* %5, double* %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca double
%12 = alloca double
%13 = alloca double*
%14 = alloca double*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store double %3, double* %11
store double %4, double* %12
store double* %5, double** %13
store double* %6, double** %14
%15 = load i32, i32* %8
%16 = load i32, i32* %9
%17 = load i32, i32* %10
%18 = load double, double* %11
%19 = load double, double* %12
%20 = load double*, double** %13
%21 = load double*, double** %14
%22 = call i32 @__sunriset__(i32 %15, i32 %16, i32 %17, double %18, double %19, double -6.000000e+00, i32 0, double* %20, double* %21)
ret i32 %22
}

LLVM IR (-O2):
define i32 @civil_twilight(i32 %0, i32 %1, i32 %2, double %3, double %4, double* %5, double* %6) {
%8 = tail call i32 @__sunriset__(i32 %0, i32 %1, i32 %2, double %3, double %4, double -6.000000e+00, i32 0, double* %5, double* %6)
ret i32 %8
}
/* Variables and functions */
int O_CREAT;
int O_RDWR;
int open(char *, int, int);
int bplus_open(char *filename) {
  return open(filename, O_CREAT | O_RDWR, 0644);
}


x86 assembly (clang, -O0):
<bplus_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
mov    0x2eb0(%rip),%rax
or     (%rax),%esi
mov    $0x1a4,%edx
call   1030 <open@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bplus_open>:
mov    0x2ee1(%rip),%rax
mov    0x2ec2(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    $0x1a4,%edx
jmp    1030 <open@plt>

LLVM IR (-O0):
@O_CREAT = global i32 0
@O_RDWR = global i32 0
define i32 @bplus_open(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @O_CREAT
%5 = load i32, i32* @O_RDWR
%6 = or i32 %4, %5
%7 = call i32 @open(i8* %3, i32 %6, i32 420)
ret i32 %7
}

LLVM IR (-O2):
@O_CREAT = global i32 0
@O_RDWR = global i32 0
define i32 @bplus_open(i8* nocapture %0) {
%2 = load i32, i32* @O_CREAT
%3 = load i32, i32* @O_RDWR
%4 = or i32 %3, %2
%5 = tail call i32 @open(i8* %0, i32 %4, i32 420)
ret i32 %5
}
char hex(int num) { return "0123456789ABCDEF"[num]; }


x86 assembly (clang, -O0):
<hex>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rcx
lea    0xeee(%rip),%rax
movsbl (%rax,%rcx,1),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hex>:
movslq %edi,%rax
lea    0xef6(%rip),%rcx
mov    (%rax,%rcx,1),%al
ret

LLVM IR (-O0):
@.str = [17 x i8] c"0123456789ABCDEF\00"
define signext i8 @hex(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds [17 x i8], [17 x i8]* @.str, i64 0, i64 %4
%6 = load i8, i8* %5
ret i8 %6
}

LLVM IR (-O2):
@.str = [17 x i8] c"0123456789ABCDEF\00"
define signext i8 @hex(i32 %0) {
%2 = sext i32 %0 to i64
%3 = getelementptr inbounds [17 x i8], [17 x i8]* @.str, i64 0, i64 %2
%4 = load i8, i8* %3
ret i8 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ mvwaddstr(int /*<<< orphan*/ *, int, int, char *);
int strlen(char *);
void CenterText(WINDOW *Win, int x, int y, int w, char *Text) {
  mvwaddstr(Win, y, x + (w - strlen(Text)) / 2, Text);
}


x86 assembly (clang, -O0):
<CenterText>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x38(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    %eax,%ecx
mov    -0x28(%rbp),%eax
sub    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    -0x24(%rbp),%edx
add    %eax,%edx
mov    -0x20(%rbp),%rcx
call   1040 <mvwaddstr@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CenterText>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r8,%rbx
mov    %ecx,%ebp
mov    %edx,%r14d
mov    %esi,%r15d
mov    %rdi,%r12
mov    %r8,%rdi
call   1030 <strlen@plt>
sub    %eax,%ebp
mov    %ebp,%edx
shr    $0x1f,%edx
add    %ebp,%edx
sar    %edx
add    %r15d,%edx
mov    %r12,%rdi
mov    %r14d,%esi
mov    %rbx,%rcx
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <mvwaddstr@plt>

LLVM IR (-O0):
define void @CenterText(i32* %0, i32 %1, i32 %2, i32 %3, i8* %4) {
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
store i32* %0, i32** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i8* %4, i8** %10
%11 = load i32*, i32** %6
%12 = load i32, i32* %8
%13 = load i32, i32* %7
%14 = load i32, i32* %9
%15 = load i8*, i8** %10
%16 = call i32 @strlen(i8* %15)
%17 = sub nsw i32 %14, %16
%18 = sdiv i32 %17, 2
%19 = add nsw i32 %13, %18
%20 = load i8*, i8** %10
%21 = call i32 @mvwaddstr(i32* %11, i32 %12, i32 %19, i8* %20)
ret void
}

LLVM IR (-O2):
define void @CenterText(i32* %0, i32 %1, i32 %2, i32 %3, i8* %4) {
%6 = tail call i32 @strlen(i8* %4)
%7 = sub nsw i32 %3, %6
%8 = sdiv i32 %7, 2
%9 = add nsw i32 %8, %1
%10 = tail call i32 @mvwaddstr(i32* %0, i32 %2, i32 %9, i8* %4)
ret void
}
int is_sep(int c) {
  if (c >= '0' && c <= '9')
    return 0;
  if (c >= 'a' && c <= 'z')
    return 0;
  if (c >= 'A' && c <= 'Z')
    return 0;
  if (c == '_')
    return 0;
  if (c == '.')
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<is_sep>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x30,-0x8(%rbp)
jl     1127 <is_sep+0x27>
cmpl   $0x39,-0x8(%rbp)
jg     1127 <is_sep+0x27>
movl   $0x0,-0x4(%rbp)
jmp    119a <is_sep+0x9a>
cmpl   $0x61,-0x8(%rbp)
jl     1147 <is_sep+0x47>
cmpl   $0x7a,-0x8(%rbp)
jg     1147 <is_sep+0x47>
movl   $0x0,-0x4(%rbp)
jmp    119a <is_sep+0x9a>
cmpl   $0x41,-0x8(%rbp)
jl     1167 <is_sep+0x67>
cmpl   $0x5a,-0x8(%rbp)
jg     1167 <is_sep+0x67>
movl   $0x0,-0x4(%rbp)
jmp    119a <is_sep+0x9a>
cmpl   $0x5f,-0x8(%rbp)
jne    117d <is_sep+0x7d>
movl   $0x0,-0x4(%rbp)
jmp    119a <is_sep+0x9a>
cmpl   $0x2e,-0x8(%rbp)
jne    1193 <is_sep+0x93>
movl   $0x0,-0x4(%rbp)
jmp    119a <is_sep+0x9a>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_sep>:
lea    -0x3a(%rdi),%eax
cmp    $0xfffffff6,%eax
setb   %sil
mov    %edi,%ecx
and    $0xffffffdf,%ecx
add    $0xffffffa5,%ecx
cmp    $0xffffffe6,%ecx
setb   %cl
cmp    $0x5f,%edi
setne  %dl
cmp    $0x2e,%edi
setne  %al
and    %dl,%al
and    %sil,%cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_sep(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 57
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 0, i32* %2
br label %33
10: ; preds = %6, %1
%11 = load i32, i32* %3
%12 = icmp sge i32 %11, 97
br i1 %12, label %13, label %17
13: ; preds = %10
%14 = load i32, i32* %3
%15 = icmp sle i32 %14, 122
br i1 %15, label %16, label %17
16: ; preds = %13
store i32 0, i32* %2
br label %33
17: ; preds = %13, %10
%18 = load i32, i32* %3
%19 = icmp sge i32 %18, 65
br i1 %19, label %20, label %24
20: ; preds = %17
%21 = load i32, i32* %3
%22 = icmp sle i32 %21, 90
br i1 %22, label %23, label %24
23: ; preds = %20
store i32 0, i32* %2
br label %33
24: ; preds = %20, %17
%25 = load i32, i32* %3
%26 = icmp eq i32 %25, 95
br i1 %26, label %27, label %28
27: ; preds = %24
store i32 0, i32* %2
br label %33
28: ; preds = %24
%29 = load i32, i32* %3
%30 = icmp eq i32 %29, 46
br i1 %30, label %31, label %32
31: ; preds = %28
store i32 0, i32* %2
br label %33
32: ; preds = %28
store i32 1, i32* %2
br label %33
33: ; preds = %32, %31, %27, %23, %16, %9
%34 = load i32, i32* %2
ret i32 %34
}

LLVM IR (-O2):
define i32 @is_sep(i32 %0) {
%2 = add i32 %0, -58
%3 = icmp ult i32 %2, -10
%4 = and i32 %0, -33
%5 = add i32 %4, -91
%6 = icmp ult i32 %5, -26
%7 = icmp ne i32 %0, 95
%8 = icmp ne i32 %0, 46
%9 = and i1 %7, %8
%10 = and i1 %3, %6
%11 = and i1 %9, %10
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Type definitions */
struct stack_st_OPENSSL_BLOCK {
  int dummy;
};
typedef int /*<<< orphan*/ OPENSSL_STACK;

/* Variables and functions */
int /*<<< orphan*/ OPENSSL_sk_sort(int /*<<< orphan*/ *);
void sk_OPENSSL_BLOCK_sort(struct stack_st_OPENSSL_BLOCK *sk) {
  OPENSSL_sk_sort((OPENSSL_STACK *)sk);
}


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

x86 assembly (clang, -O2):
<sk_OPENSSL_BLOCK_sort>:
jmp    1030 <OPENSSL_sk_sort@plt>

LLVM IR (-O0):
%struct.stack_st_OPENSSL_BLOCK = type { i32 }
define void @sk_OPENSSL_BLOCK_sort(%struct.stack_st_OPENSSL_BLOCK* %0) {
%2 = alloca %struct.stack_st_OPENSSL_BLOCK*
store %struct.stack_st_OPENSSL_BLOCK* %0, %struct.stack_st_OPENSSL_BLOCK** %2
%3 = load %struct.stack_st_OPENSSL_BLOCK*, %struct.stack_st_OPENSSL_BLOCK** %2
%4 = bitcast %struct.stack_st_OPENSSL_BLOCK* %3 to i32*
%5 = call i32 @OPENSSL_sk_sort(i32* %4)
ret void
}

LLVM IR (-O2):
%struct.stack_st_OPENSSL_BLOCK = type { i32 }
define void @sk_OPENSSL_BLOCK_sort(%struct.stack_st_OPENSSL_BLOCK* %0) {
%2 = getelementptr %struct.stack_st_OPENSSL_BLOCK, %struct.stack_st_OPENSSL_BLOCK* %0, i64 0, i32 0
%3 = tail call i32 @OPENSSL_sk_sort(i32* %2)
ret void
}
int header_checkname(void *h, char *name, int len) {
  h = h;
  name = name;
  len = len;
  return 0;
}


x86 assembly (clang, -O0):
<header_checkname>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @header_checkname(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
store i8* %7, i8** %4
%8 = load i8*, i8** %5
store i8* %8, i8** %5
%9 = load i32, i32* %6
store i32 %9, i32* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @header_checkname(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printFriends(int, char **);
int main(int argc, char *argv[]) {
  printFriends(argc, argv);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @printFriends(i32 %0, i8** %1)
ret i32 0
}
int hexchr2nibble(char c) {
  if (c < ':')
    return (c - '0');
  if (c < 'G')
    return (c - 'A' + 10);
  if (c < 'g')
    return (c - 'a' + 10);
  return (-1);
}


x86 assembly (clang, -O0):
<hexchr2nibble>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x3a,%eax
jge    1126 <hexchr2nibble+0x26>
movsbl -0x5(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    116b <hexchr2nibble+0x6b>
movsbl -0x5(%rbp),%eax
cmp    $0x47,%eax
jge    1145 <hexchr2nibble+0x45>
movsbl -0x5(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    116b <hexchr2nibble+0x6b>
movsbl -0x5(%rbp),%eax
cmp    $0x67,%eax
jge    1164 <hexchr2nibble+0x64>
movsbl -0x5(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    116b <hexchr2nibble+0x6b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hexchr2nibble>:
mov    %edi,%eax
cmp    $0x39,%al
jg     110a <hexchr2nibble+0xa>
add    $0xffffffd0,%eax
ret
cmp    $0x46,%al
ja     1112 <hexchr2nibble+0x12>
add    $0xffffffc9,%eax
ret
mov    %eax,%ecx
add    $0xffffffa9,%ecx
cmp    $0x67,%al
mov    $0xffffffff,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @hexchr2nibble(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp slt i32 %5, 58
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = sub nsw i32 %9, 48
store i32 %10, i32* %2
br label %30
11: ; preds = %1
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp slt i32 %13, 71
br i1 %14, label %15, label %20
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = sub nsw i32 %17, 65
%19 = add nsw i32 %18, 10
store i32 %19, i32* %2
br label %30
20: ; preds = %11
%21 = load i8, i8* %3
%22 = sext i8 %21 to i32
%23 = icmp slt i32 %22, 103
br i1 %23, label %24, label %29
24: ; preds = %20
%25 = load i8, i8* %3
%26 = sext i8 %25 to i32
%27 = sub nsw i32 %26, 97
%28 = add nsw i32 %27, 10
store i32 %28, i32* %2
br label %30
29: ; preds = %20
store i32 -1, i32* %2
br label %30
30: ; preds = %29, %24, %15, %7
%31 = load i32, i32* %2
ret i32 %31
}

LLVM IR (-O2):
define i32 @hexchr2nibble(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = icmp slt i8 %0, 58
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = add nsw i32 %2, -48
br label %14
6: ; preds = %1
%7 = icmp ult i8 %0, 71
br i1 %7, label %8, label %10
8: ; preds = %6
%9 = add nsw i32 %2, -55
br label %14
10: ; preds = %6
%11 = icmp ult i8 %0, 103
%12 = add nsw i32 %2, -87
%13 = select i1 %11, i32 %12, i32 -1
br label %14
14: ; preds = %10, %8, %4
%15 = phi i32 [ %5, %4 ], [ %9, %8 ], [ %13, %10 ]
ret i32 %15
}
/* Variables and functions */
int listen(int, int);
int socket_listen(int s, int backlog) { return listen(s, backlog); }


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

x86 assembly (clang, -O2):
<socket_listen>:
jmp    1030 <listen@plt>

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

LLVM IR (-O2):
define i32 @socket_listen(i32 %0, i32 %1) {
%3 = tail call i32 @listen(i32 %0, i32 %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
scalar_t__ fprintf(int /*<<< orphan*/ *, char *, int, char const *);
int /*<<< orphan*/ perror(char *);
void send_statu(FILE *client, int code, const char *reason_phrase) {
  if (fprintf(client, "HTTP/1.1 %d %s\n", code, reason_phrase) < 0) {
    perror("write message");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<send_statu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
lea    0xeab(%rip),%rsi
call   1030 <fprintf@plt>
cmp    $0x0,%rax
jge    117a <send_statu+0x4a>
lea    0xea5(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_statu>:
push   %rax
mov    %rdx,%rcx
mov    %esi,%edx
lea    0xec3(%rip),%rsi
call   1030 <fprintf@plt>
test   %rax,%rax
js     1149 <send_statu+0x19>
pop    %rax
ret
lea    0xec0(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"HTTP/1.1 %d %s\0A\00"
@.str.1 = [14 x i8] c"write message\00"
define void @send_statu(i32* %0, i32 %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i8*
store i32* %0, i32** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
%10 = call i64 @fprintf(i32* %7, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %8, i8* %9)
%11 = icmp slt i64 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %3
%13 = call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%14 = call i32 @exit(i32 1)
unreachable
15: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"HTTP/1.1 %d %s\0A\00"
@.str.1 = [14 x i8] c"write message\00"
define void @send_statu(i32* nocapture %0, i32 %1, i8* %2) {
%4 = tail call i64 @fprintf(i32* %0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %2)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %3
ret void
}
int fun_coverage_if_ge(int x) {
  if (x >= 5) {
    return 8;
  } else {
    return 18;
  }
}


x86 assembly (clang, -O0):
<fun_coverage_if_ge>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jl     111d <fun_coverage_if_ge+0x1d>
movl   $0x8,-0x4(%rbp)
jmp    1124 <fun_coverage_if_ge+0x24>
movl   $0x12,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_coverage_if_ge>:
cmp    $0x5,%edi
mov    $0x8,%ecx
mov    $0x12,%eax
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @fun_coverage_if_ge(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 5
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 8, i32* %2
br label %8
7: ; preds = %1
store i32 18, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @fun_coverage_if_ge(i32 %0) {
%2 = icmp sgt i32 %0, 4
%3 = select i1 %2, i32 8, i32 18
ret i32 %3
}
void startAllThreads() { *((unsigned int *)0xffff0060) = 0xffffffff; }


x86 assembly (clang, -O0):
<startAllThreads>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffff0060,%eax
movl   $0xffffffff,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<startAllThreads>:
mov    $0xffff0060,%eax
movl   $0xffffffff,(%rax)
ret

LLVM IR (-O0):
define void @startAllThreads() {
store i32 -1, i32* inttoptr (i64 4294901856 to i32*)
ret void
}

LLVM IR (-O2):
define void @startAllThreads() {
store i32 -1, i32* inttoptr (i64 4294901856 to i32*)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ DSA;

/* Variables and functions */
int /*<<< orphan*/ *DSAparams_dup(int /*<<< orphan*/ const *);
DSA *DSAparams_dup_wrap(const DSA *dsa) { return DSAparams_dup(dsa); }


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

x86 assembly (clang, -O2):
<DSAparams_dup_wrap>:
jmp    1030 <DSAparams_dup@plt>

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

LLVM IR (-O2):
define i32* @DSAparams_dup_wrap(i32* %0) {
%2 = tail call i32* @DSAparams_dup(i32* %0)
ret i32* %2
}
/* Variables and functions */
int mul(int, int);
int /*<<< orphan*/ printf(char *, ...);
int sum(int, int);
int main() {
  printf("\n The sum of 9 and 5 is: %d", sum(9, 5));
  printf("\n The product of 5 and 5 is: %d", mul(9, 5));
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x9,%edi
mov    $0x5,%esi
call   1040 <sum@plt>
mov    %eax,%esi
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x9,%edi
mov    $0x5,%esi
call   1050 <mul@plt>
mov    %eax,%esi
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x9,%edi
mov    $0x5,%esi
call   1050 <sum@plt>
lea    0xea9(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x9,%edi
mov    $0x5,%esi
call   1060 <mul@plt>
lea    0xea6(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"\0A The sum of 9 and 5 is: %d\00"
@.str.1 = [32 x i8] c"\0A The product of 5 and 5 is: %d\00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @sum(i32 9, i32 5)
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 @mul(i32 9, i32 5)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"\0A The sum of 9 and 5 is: %d\00"
@.str.1 = [32 x i8] c"\0A The product of 5 and 5 is: %d\00"
define i32 @main() {
%1 = tail call i32 @sum(i32 9, i32 5)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @mul(i32 9, i32 5)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = tail call i32 @putchar(i32 10)
ret i32 0
}
void Set800x600_60(void) {
  *((volatile unsigned long *)(0x97000000 + 0x008)) =
      ((128 - 1) << 24) | ((88 - 1) << 16) | (800 - 1);
  *((volatile unsigned long *)(0x97000000 + 0x00c)) =
      ((4 - 1) << 24) | ((23 - 1) << 16) | (600 - 1);
  *((volatile unsigned long *)(0x97000000 + 0x010)) =
      ((1056 - 1) << 16) | (628 - 1);
  *((volatile unsigned long *)(0xB8000000 + 0x018)) = (800 << 16) | 600;
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    $0x97000008,%eax
movq   $0x7f57031f,(%rax)
mov    $0x9700000c,%eax
movq   $0x3160257,(%rax)
mov    $0x97000010,%eax
movq   $0x41f0273,(%rax)
mov    $0xb8000018,%eax
movq   $0x3200258,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
mov    $0x97000008,%eax
movq   $0x7f57031f,(%rax)
movq   $0x3160257,0x4(%rax)
03
movq   $0x41f0273,0x8(%rax)
04
movq   $0x3200258,0x21000010(%rax)
58 02 20 03
ret

LLVM IR (-O0):
define void @Set800x600_60() {
store volatile i64 2136408863, i64* inttoptr (i64 2533359624 to i64*)
store volatile i64 51774039, i64* inttoptr (i64 2533359628 to i64*)
store volatile i64 69141107, i64* inttoptr (i64 2533359632 to i64*)
store volatile i64 52429400, i64* inttoptr (i64 3087007768 to i64*)
ret void
}

LLVM IR (-O2):
define void @Set800x600_60() {
store volatile i64 2136408863, i64* inttoptr (i64 2533359624 to i64*)
store volatile i64 51774039, i64* inttoptr (i64 2533359628 to i64*)
store volatile i64 69141107, i64* inttoptr (i64 2533359632 to i64*)
store volatile i64 52429400, i64* inttoptr (i64 3087007768 to i64*)
ret void
}
int count_spaces(char source[], int posn, int length) {
  int c = 0;
  int i = posn;
  int cond = 1;
  do {
    if (source[i] == ' ') {
      c++;
    } else {
      cond = 0;
    }
    i++;
  } while ((i < length) && cond);
  return c;
}


x86 assembly (clang, -O0):
<count_spaces>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
jne    1145 <count_spaces+0x45>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114c <count_spaces+0x4c>
movl   $0x0,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%ecx
xor    %eax,%eax
cmp    -0x10(%rbp),%ecx
mov    %al,-0x1d(%rbp)
jge    1170 <count_spaces+0x70>
cmpl   $0x0,-0x1c(%rbp)
setne  %al
mov    %al,-0x1d(%rbp)
mov    -0x1d(%rbp),%al
test   $0x1,%al
jne    1122 <count_spaces+0x22>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_spaces>:
movslq %esi,%rcx
movslq %edx,%r8
add    $0x1,%rcx
xor    %eax,%eax
nopl   0x0(%rax)
mov    %eax,%esi
movzbl -0x1(%rdi,%rcx,1),%edx
xor    %eax,%eax
cmp    $0x20,%dl
sete   %al
add    %esi,%eax
cmp    %r8,%rcx
jge    112f <count_spaces+0x2f>
add    $0x1,%rcx
cmp    $0x20,%dl
je     1110 <count_spaces+0x10>
ret

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

LLVM IR (-O2):
define i32 @count_spaces(i8* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = sext i32 %2 to i64
br label %6
6: ; preds = %6, %3
%7 = phi i64 [ %14, %6 ], [ %4, %3 ]
%8 = phi i32 [ %13, %6 ], [ 0, %3 ]
%9 = getelementptr inbounds i8, i8* %0, i64 %7
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 32
%12 = zext i1 %11 to i32
%13 = add nuw nsw i32 %8, %12
%14 = add nsw i64 %7, 1
%15 = icmp slt i64 %14, %5
%16 = select i1 %15, i1 %11, i1 false
br i1 %16, label %6, label %17
17: ; preds = %6
ret i32 %13
}
int __attribute__((no))
foo(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7) {
  char *x = __builtin_alloca(arg7);
  int __attribute__((aligned(32))) y;
  y = 2;
  asm volatile("" : "=m"(y) : "m"(y));
  x[0] = 25;
  asm volatile("" : "=m"(x[0]) : "m"(x[0]));
  return y;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
and    $0xffffffffffffffe0,%rsp
sub    $0x40,%rsp
mov    %rsp,%rbx
mov    0x10(%rbp),%eax
mov    %edi,0x24(%rbx)
mov    %esi,0x20(%rbx)
mov    %edx,0x1c(%rbx)
mov    %ecx,0x18(%rbx)
mov    %r8d,0x14(%rbx)
mov    %r9d,0x10(%rbx)
movslq 0x10(%rbp),%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rax
sub    %rcx,%rax
mov    %rax,%rsp
mov    %rax,0x8(%rbx)
movl   $0x2,(%rbx)
mov    0x8(%rbx),%rax
movb   $0x19,(%rax)
mov    0x8(%rbx),%rax
mov    0x8(%rbx),%rcx
mov    (%rbx),%eax
lea    -0x8(%rbp),%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
and    $0xffffffffffffffe0,%rsp
sub    $0x20,%rsp
mov    %rsp,%rbx
movslq 0x10(%rbp),%rax
mov    %rsp,%rcx
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
mov    %rcx,%rdx
sub    %rax,%rdx
mov    %rdx,%rsp
neg    %rax
movl   $0x2,(%rbx)
movb   $0x19,(%rdx)
mov    (%rbx),%eax
lea    -0x8(%rbp),%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @foo(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i8*
%16 = 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
store i32 %6, i32* %14
%17 = load i32, i32* %14
%18 = sext i32 %17 to i64
%19 = alloca i8, i64 %18
store i8* %19, i8** %15
store i32 2, i32* %16
%20 = load i8*, i8** %15
%21 = getelementptr inbounds i8, i8* %20, i64 0
store i8 25, i8* %21
%22 = load i8*, i8** %15
%23 = getelementptr inbounds i8, i8* %22, i64 0
%24 = load i8*, i8** %15
%25 = getelementptr inbounds i8, i8* %24, i64 0
%26 = load i32, i32* %16
ret i32 %26
}

LLVM IR (-O2):
define i32 @foo(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca i32
%9 = sext i32 %6 to i64
%10 = alloca i8, i64 %9
%11 = bitcast i32* %8 to i8*
store i32 2, i32* %8
store i8 25, i8* %10
%12 = load i32, i32* %8
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void PostfixToPrefix() { printf("hey i am PostfixToPrefix"); }


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

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

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

LLVM IR (-O2):
@.str = [25 x i8] c"hey i am PostfixToPrefix\00"
define void @PostfixToPrefix() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ silly(int *);
int main(int argc, char **argv) {
  int zz[2] = {3, 5};
  silly(zz);
  printf("hello world - %d\n", zz[1]);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movabs $0x500000003,%rax
mov    %rax,(%rsp)
mov    %rsp,%rdi
call   1040 <silly@plt>
mov    0x4(%rsp),%esi
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.zz = [2 x i32] [i32 3, i32 5]
@.str = [18 x i8] c"hello world - %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [2 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [2 x i32]* %6 to i8*
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%9 = call i32 @silly(i32* %8)
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 1
%11 = load i32, i32* %10
%12 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"hello world - %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to [2 x i32]*
%5 = bitcast i64* %3 to i8*
store i64 21474836483, i64* %3
%6 = bitcast i64* %3 to i32*
%7 = call i32 @silly(i32* %6)
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 1
%9 = load i32, i32* %8
%10 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 0
}
void glmAddVector3d(double result[3], const double v1[3], const double v2[3]) {
  result[0] = v1[0] + v2[0];
  result[1] = v1[1] + v2[1];
  result[2] = v1[2] + v2[2];
}


x86 assembly (clang, -O0):
<glmAddVector3d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
addsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
addsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x18(%rbp),%rax
addsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmAddVector3d>:
movsd  (%rsi),%xmm0
addsd  (%rdx),%xmm0
movsd  %xmm0,(%rdi)
movsd  0x8(%rsi),%xmm0
addsd  0x8(%rdx),%xmm0
movsd  %xmm0,0x8(%rdi)
movsd  0x10(%rsi),%xmm0
addsd  0x10(%rdx),%xmm0
movsd  %xmm0,0x10(%rdi)
ret

LLVM IR (-O0):
define void @glmAddVector3d(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** %5
%8 = getelementptr inbounds double, double* %7, i64 0
%9 = load double, double* %8
%10 = load double*, double** %6
%11 = getelementptr inbounds double, double* %10, i64 0
%12 = load double, double* %11
%13 = fadd double %9, %12
%14 = load double*, double** %4
%15 = getelementptr inbounds double, double* %14, i64 0
store double %13, double* %15
%16 = load double*, double** %5
%17 = getelementptr inbounds double, double* %16, i64 1
%18 = load double, double* %17
%19 = load double*, double** %6
%20 = getelementptr inbounds double, double* %19, i64 1
%21 = load double, double* %20
%22 = fadd double %18, %21
%23 = load double*, double** %4
%24 = getelementptr inbounds double, double* %23, i64 1
store double %22, double* %24
%25 = load double*, double** %5
%26 = getelementptr inbounds double, double* %25, i64 2
%27 = load double, double* %26
%28 = load double*, double** %6
%29 = getelementptr inbounds double, double* %28, i64 2
%30 = load double, double* %29
%31 = fadd double %27, %30
%32 = load double*, double** %4
%33 = getelementptr inbounds double, double* %32, i64 2
store double %31, double* %33
ret void
}

LLVM IR (-O2):
define void @glmAddVector3d(double* nocapture writeonly %0, double* nocapture %1, double* nocapture %2) {
%4 = load double, double* %1
%5 = load double, double* %2
%6 = fadd double %4, %5
store double %6, double* %0
%7 = getelementptr inbounds double, double* %1, i64 1
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %2, i64 1
%10 = load double, double* %9
%11 = fadd double %8, %10
%12 = getelementptr inbounds double, double* %0, i64 1
store double %11, double* %12
%13 = getelementptr inbounds double, double* %1, i64 2
%14 = load double, double* %13
%15 = getelementptr inbounds double, double* %2, i64 2
%16 = load double, double* %15
%17 = fadd double %14, %16
%18 = getelementptr inbounds double, double* %0, i64 2
store double %17, double* %18
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EX_USAGE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
char *getprogname();
int /*<<< orphan*/ stderr;
void emit_help(void) {
  fprintf(stderr, "Usage: %s\n", getprogname());
  exit(EX_USAGE);
}


x86 assembly (clang, -O0):
<emit_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2e99(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getprogname@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rdx
lea    0xea8(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<emit_help>:
push   %rbx
mov    0x2ea0(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1030 <getprogname@plt>
lea    0xeb8(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   1040 <fprintf@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"Usage: %s\0A\00"
@EX_USAGE = global i32 0
define void @emit_help() {
%1 = load i32, i32* @stderr
%2 = call i8* (...) @getprogname()
%3 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = load i32, i32* @EX_USAGE
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"Usage: %s\0A\00"
@EX_USAGE = global i32 0
define void @emit_help() {
%1 = load i32, i32* @stderr
%2 = tail call i8* (...) @getprogname()
%3 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = load i32, i32* @EX_USAGE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Variables and functions */
scalar_t__ islower(unsigned int);
scalar_t__ isupper(unsigned int);
int isletter(register unsigned int ch) { return (isupper(ch) || islower(ch)); }


x86 assembly (clang, -O0):
<isletter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <isupper@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1157 <isletter+0x37>
mov    -0x4(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isletter>:
push   %rbx
mov    %edi,%ebx
call   1040 <isupper@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <isletter+0x17>
pop    %rbx
ret
mov    %ebx,%edi
call   1030 <islower@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isletter(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isupper(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i64 @islower(i32 %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @isletter(i32 %0) {
%2 = tail call i64 @isupper(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @islower(i32 %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
size_t g_utf8_strlen(char const *, size_t);
size_t utf8_strlen(const char *p, size_t max_bytes) {
  return g_utf8_strlen(p, max_bytes);
}


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

x86 assembly (clang, -O2):
<utf8_strlen>:
jmp    1030 <g_utf8_strlen@plt>

LLVM IR (-O0):
define i64 @utf8_strlen(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i64 @g_utf8_strlen(i8* %5, i64 %6)
ret i64 %7
}

LLVM IR (-O2):
define i64 @utf8_strlen(i8* %0, i64 %1) {
%3 = tail call i64 @g_utf8_strlen(i8* %0, i64 %1)
ret i64 %3
}