xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ _spew_one(int);
void _spew(int lines) {
  int i;
  for (i = 0; i < lines; i++)
    _spew_one(i);
}


x86 assembly (clang, -O0):
<_spew>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1144 <_spew+0x34>
mov    -0x8(%rbp),%edi
call   1030 <_spew_one@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <_spew+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_spew>:
push   %rbp
push   %rbx
push   %rax
test   %edi,%edi
jle    112e <_spew+0x1e>
mov    %edi,%ebx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    %ebp,%edi
call   1030 <_spew_one@plt>
add    $0x1,%ebp
cmp    %ebp,%ebx
jne    1120 <_spew+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @_spew(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @_spew_one(i32 %4)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
int sdiv(int X, int Y) { return X / Y; }


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

x86 assembly (clang, -O2):
<sdiv>:
mov    %edi,%eax
cltd
idiv   %esi
ret

LLVM IR (-O0):
define i32 @sdiv(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 = sdiv i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @sdiv(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int ps_cas(unsigned long *, unsigned long, unsigned long);
int ps_upcas(unsigned long *target, unsigned long old, unsigned long updated) {
  return ps_cas(target, old, updated);
}


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

x86 assembly (clang, -O2):
<ps_upcas>:
jmp    1030 <ps_cas@plt>

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

LLVM IR (-O2):
define i32 @ps_upcas(i64* %0, i64 %1, i64 %2) {
%4 = tail call i32 @ps_cas(i64* %0, i64 %1, i64 %2)
ret i32 %4
}
/* Variables and functions */
int in_byte(int);
int /*<<< orphan*/ out_byte(char, int);
int read_cmos(char addr) {
  out_byte(addr, 0x70);
  return in_byte(0x71);
}


x86 assembly (clang, -O0):
<read_cmos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x70,%esi
movsbl -0x1(%rbp),%edi
call   1040 <out_byte@plt>
mov    $0x71,%edi
call   1030 <in_byte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_cmos>:
push   %rax
mov    $0x70,%esi
call   1040 <out_byte@plt>
mov    $0x71,%edi
pop    %rax
jmp    1030 <in_byte@plt>

LLVM IR (-O0):
define i32 @read_cmos(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @out_byte(i8 signext %3, i32 112)
%5 = call i32 @in_byte(i32 113)
ret i32 %5
}

LLVM IR (-O2):
define i32 @read_cmos(i8 signext %0) {
%2 = tail call i32 @out_byte(i8 signext %0, i32 112)
%3 = tail call i32 @in_byte(i32 113)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ sys_cleanup(int /*<<< orphan*/);
__attribute__((__destructor__)) void slr_cleanup(void) { sys_cleanup(0); }


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

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

LLVM IR (-O0):
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @slr_cleanup, i8* null }]
define void @slr_cleanup() {
%1 = call i32 @sys_cleanup(i32 0)
ret void
}

LLVM IR (-O2):
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @slr_cleanup, i8* null }]
define void @slr_cleanup() {
%1 = tail call i32 @sys_cleanup(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init(char *);
int ok();
int /*<<< orphan*/ test_odd();
int /*<<< orphan*/ test_signess();
int /*<<< orphan*/ test_standard();
int /*<<< orphan*/ test_storage();
int main() {
  init("type specifiers");
  test_standard();
  test_signess();
  test_storage();
  test_odd();
  return ok();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe8a(%rip),%rdi
call   1060 <init@plt>
mov    $0x0,%al
call   1030 <test_standard@plt>
mov    $0x0,%al
call   1080 <test_signess@plt>
mov    $0x0,%al
call   1070 <test_storage@plt>
mov    $0x0,%al
call   1050 <test_odd@plt>
mov    $0x0,%al
call   1040 <ok@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xe98(%rip),%rdi
call   1060 <init@plt>
xor    %eax,%eax
call   1030 <test_standard@plt>
xor    %eax,%eax
call   1080 <test_signess@plt>
xor    %eax,%eax
call   1070 <test_storage@plt>
xor    %eax,%eax
call   1050 <test_odd@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <ok@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"type specifiers\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @init(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @test_standard()
%4 = call i32 (...) @test_signess()
%5 = call i32 (...) @test_storage()
%6 = call i32 (...) @test_odd()
%7 = call i32 (...) @ok()
ret i32 %7
}

LLVM IR (-O2):
@.str = [16 x i8] c"type specifiers\00"
define i32 @main() {
%1 = tail call i32 @init(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @test_standard()
%3 = tail call i32 (...) @test_signess()
%4 = tail call i32 (...) @test_storage()
%5 = tail call i32 (...) @test_odd()
%6 = tail call i32 (...) @ok()
ret i32 %6
}
double min_d(double a, double b) {
  if (a >= b)
    return b;
  return a;
}


x86 assembly (clang, -O0):
<min_d>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jb     112d <min_d+0x2d>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1137 <min_d+0x37>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<min_d>:
movapd %xmm1,%xmm2
cmplesd %xmm0,%xmm2
andpd  %xmm2,%xmm1
andnpd %xmm0,%xmm2
orpd   %xmm1,%xmm2
movapd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @min_d(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %4
%7 = load double, double* %5
%8 = fcmp oge double %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load double, double* %5
store double %10, double* %3
br label %13
11: ; preds = %2
%12 = load double, double* %4
store double %12, double* %3
br label %13
13: ; preds = %11, %9
%14 = load double, double* %3
ret double %14
}

LLVM IR (-O2):
define double @min_d(double %0, double %1) {
%3 = fcmp oge double %0, %1
%4 = select i1 %3, double %1, double %0
ret double %4
}
void clear_vector(unsigned char *vector, int size, unsigned char value) {
  int i;
  for (i = 0; i < size; i++) {
    vector[i] = value;
  }
}


x86 assembly (clang, -O0):
<clear_vector>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %al,-0xd(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    113f <clear_vector+0x3f>
mov    -0xd(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1117 <clear_vector+0x17>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_vector>:
test   %esi,%esi
jle    1126 <clear_vector+0x16>
push   %rax
mov    %esi,%eax
movzbl %dl,%esi
mov    %rax,%rdx
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @clear_vector(i8* nocapture writeonly %0, i32 %1, i8 zeroext %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %7
7: ; preds = %5, %3
ret void
}
void BN_MONT_CTX_set(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_MONT_CTX_set() {
ret void
}
int main() {
  int(((p)));
  p = 0;
  return p;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void av_memcpy_backptr() {}


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

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

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

LLVM IR (-O2):
define void @av_memcpy_backptr() {
ret void
}
/* Variables and functions */
float __rasind(float);
float intr_wrap_011(float p1) { return __rasind(p1); }


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

x86 assembly (clang, -O2):
<intr_wrap_011>:
jmp    1030 <__rasind@plt>

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

LLVM IR (-O2):
define float @intr_wrap_011(float %0) {
%2 = tail call float @__rasind(float %0)
ret float %2
}
int do_594() { return 594; }


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

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

LLVM IR (-O0):
define i32 @do_594() {
ret i32 594
}

LLVM IR (-O2):
define i32 @do_594() {
ret i32 594
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ visprintf_alloc(char **, char const *, int /*<<< orphan*/);
char *vsprintf_alloc(const char *fmt, va_list ap) {
  char *r;
  visprintf_alloc(&r, fmt, ap);
  return r;
}


x86 assembly (clang, -O0):
<vsprintf_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    -0x18(%rbp),%rdi
call   1030 <visprintf_alloc@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vsprintf_alloc>:
push   %rax
mov    %esi,%edx
mov    %rdi,%rsi
mov    %rsp,%rdi
call   1030 <visprintf_alloc@plt>
mov    (%rsp),%rax
pop    %rcx
ret

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

LLVM IR (-O2):
define i8* @vsprintf_alloc(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = call i32 @visprintf_alloc(i8** %3, i8* %0, i32 %1)
%6 = load i8*, i8** %3
ret i8* %6
}
/* Variables and functions */
int EOF;
int rfs_getc(unsigned char **p) {
  int i;
  i = **p;
  if (!i)
    return (EOF);
  *p = *p + 1;
  return (i);
}


x86 assembly (clang, -O0):
<rfs_getc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movzbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1130 <rfs_getc+0x30>
mov    0x2ec2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1148 <rfs_getc+0x48>
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rfs_getc>:
mov    (%rdi),%rcx
movzbl (%rcx),%eax
test   %eax,%eax
je     1112 <rfs_getc+0x12>
add    $0x1,%rcx
mov    %rcx,(%rdi)
ret
mov    0x2ecf(%rip),%rax
mov    (%rax),%eax
ret

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

LLVM IR (-O2):
@EOF = global i32 0
define i32 @rfs_getc(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load i32, i32* @EOF
br label %10
7: ; preds = %1
%8 = zext i8 %3 to i32
%9 = getelementptr inbounds i8, i8* %2, i64 1
store i8* %9, i8** %0
br label %10
10: ; preds = %7, %5
%11 = phi i32 [ %8, %7 ], [ %6, %5 ]
ret i32 %11
}
void avio_feof() {}


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

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

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

LLVM IR (-O2):
define void @avio_feof() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ft_isalnum(int);
scalar_t__ ft_isgraph(int);
int ft_ispunct(int c) { return ((ft_isgraph(c) && !ft_isalnum(c)) ? 1 : 0); }


x86 assembly (clang, -O0):
<ft_ispunct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <ft_isgraph@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
je     1158 <ft_ispunct+0x38>
mov    -0x4(%rbp),%edi
call   1040 <ft_isalnum@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_ispunct>:
push   %rbx
mov    %edi,%ebx
call   1030 <ft_isgraph@plt>
test   %rax,%rax
je     113f <ft_ispunct+0x1f>
mov    %ebx,%edi
call   1040 <ft_isalnum@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @ft_ispunct(i32 %0) {
%2 = tail call i64 @ft_isgraph(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @ft_isalnum(i32 %0)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
void ff_hevc_put_hevc_bi_qpel_hv64_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_qpel_hv64_12_sse4() {
ret void
}
/* Variables and functions */
int japi_popupmenu(int, char *);
int j_popupmenu(int arg0, char *arg1) { return (japi_popupmenu(arg0, arg1)); }


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

x86 assembly (clang, -O2):
<j_popupmenu>:
jmp    1030 <japi_popupmenu@plt>

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

LLVM IR (-O2):
define i32 @j_popupmenu(i32 %0, i8* %1) {
%3 = tail call i32 @japi_popupmenu(i32 %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ say_hello(char *);
int main(int argc, char *argv[]) { say_hello("World"); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"World\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @say_hello(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern void shmem_float_p(float *addr, float value, int pe) {
  printf("\nOpenSHMEM Analyzer\n");
}


x86 assembly (clang, -O0):
<shmem_float_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"\0AOpenSHMEM Analyzer\0A\00"
define void @shmem_float_p(float* %0, float %1, i32 %2) {
%4 = alloca float*
%5 = alloca float
%6 = alloca i32
store float* %0, float** %4
store float %1, float* %5
store i32 %2, i32* %6
%7 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [20 x i8] c"\0AOpenSHMEM Analyzer\00"
define void @shmem_float_p(float* nocapture readnone %0, float %1, i32 %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int EXIT_FAILURE;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
int usage(const char *prgname) {
  fprintf(stderr, "Usage: %s [datadir | modulename]\n", prgname);
  return EXIT_FAILURE;
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9c(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [34 x i8] c"Usage: %s [datadir | modulename]\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @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 ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
ret i32 %6
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [34 x i8] c"Usage: %s [datadir | modulename]\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
ret i32 %4
}
__attribute((no)) char *buggy() {
  _Alignas(64) char c[64];
  char *volatile p = c;
  return p;
}


x86 assembly (clang, -O0):
<buggy>:
push   %rbp
mov    %rsp,%rbp
and    $0xffffffffffffffc0,%rsp
sub    $0xc0,%rsp
lea    0x40(%rsp),%rax
mov    %rax,0x38(%rsp)
mov    0x38(%rsp),%rax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buggy>:
push   %rbp
mov    %rsp,%rbp
and    $0xffffffffffffffc0,%rsp
sub    $0xc0,%rsp
lea    0x40(%rsp),%rax
mov    %rax,0x38(%rsp)
mov    0x38(%rsp),%rax
mov    %rbp,%rsp
pop    %rbp
ret

LLVM IR (-O0):
define i8* @buggy() {
%1 = alloca [64 x i8]
%2 = alloca i8*
%3 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 0
store volatile i8* %3, i8** %2
%4 = load volatile i8*, i8** %2
ret i8* %4
}

LLVM IR (-O2):
define i8* @buggy() {
%1 = alloca [64 x i8]
%2 = alloca i8*
%3 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 0
%4 = bitcast i8** %2 to i8*
store volatile i8* %3, i8** %2
%5 = load volatile i8*, i8** %2
ret i8* %5
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ puts(char *);
int test1(void) {
  puts("!!!Hello World!!!");
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eb9(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [18 x i8] c"!!!Hello World!!!\00"
@EXIT_SUCCESS = global i32 0
define i32 @test1() {
%1 = call i32 @puts(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
ret i32 %2
}

LLVM IR (-O2):
@.str = [18 x i8] c"!!!Hello World!!!\00"
@EXIT_SUCCESS = global i32 0
define i32 @test1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
ret i32 %2
}
int test_imm_EBint8_reg(signed char val) {
  return ((val) & (0xEB << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_EBint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xeb,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_EBint8_reg>:
test   $0xeb,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_EBint8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 235
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_EBint8_reg(i8 signext %0) {
%2 = and i8 %0, -21
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ test_dns_naptr_srv();
void test_dns() { test_dns_naptr_srv(); }


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

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

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

LLVM IR (-O2):
define void @test_dns() {
%1 = tail call i32 (...) @test_dns_naptr_srv()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ japi_setcurpos(int, int);
void j_setcurpos(int arg0, int arg1) { japi_setcurpos(arg0, arg1); }


x86 assembly (clang, -O0):
<j_setcurpos>:
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 <japi_setcurpos@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<j_setcurpos>:
jmp    1030 <japi_setcurpos@plt>

LLVM IR (-O0):
define void @j_setcurpos(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 @japi_setcurpos(i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @j_setcurpos(i32 %0, i32 %1) {
%3 = tail call i32 @japi_setcurpos(i32 %0, i32 %1)
ret void
}
/* Variables and functions */
long __arch_strncpy_from_user(char *, char const *, long);
long __strncpy_from_user(char *dst, const char *src, long count) {
  return __arch_strncpy_from_user(dst, src, count);
}


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

x86 assembly (clang, -O2):
<__strncpy_from_user>:
jmp    1030 <__arch_strncpy_from_user@plt>

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

LLVM IR (-O2):
define i64 @__strncpy_from_user(i8* %0, i8* %1, i64 %2) {
%4 = tail call i64 @__arch_strncpy_from_user(i8* %0, i8* %1, i64 %2)
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int counter;
  for (counter = 0; counter < 5; ++counter) {
    printf("x %d, x squared %d\n", counter + 1, (counter + 1 * counter + 1));
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    115e <main+0x4e>
mov    -0x8(%rbp),%esi
add    $0x1,%esi
mov    -0x8(%rbp),%edx
mov    -0x8(%rbp),%eax
shl    $0x0,%eax
add    %eax,%edx
add    $0x1,%edx
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x3,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x5,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x7,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
mov    $0x9,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [20 x i8] c"x %d, x squared %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 1, i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 2, i32 3)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 3, i32 5)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 4, i32 7)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 5, i32 9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_mainloop_new() {
  printf("NOT IMPLEMENTED:"
         "pa_mainloop_new"
         "\n");
}


x86 assembly (clang, -O0):
<pa_mainloop_new>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [33 x i8] c"NOT IMPLEMENTED:pa_mainloop_new\0A\00"
define i32 @pa_mainloop_new() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [32 x i8] c"NOT IMPLEMENTED:pa_mainloop_new\00"
define i32 @pa_mainloop_new() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void parseFail() {
  printf("\033[1m\033[31m"
         "\nUnable to compile program.\n"
         "\033[33m"
         "  *Don't go insane fixing your code :)\n\n"
         "\033[0m");
}


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

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

LLVM IR (-O0):
@.str = [87 x i8] c"\1B[1m\1B[31m\0AUnable to compile program.\0A\1B[33m *Don't go insane fixing your code :)\0A\0A\1B[0m\00"
define void @parseFail() {
%1 = call i32 @printf(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [87 x i8] c"\1B[1m\1B[31m\0AUnable to compile program.\0A\1B[33m *Don't go insane fixing your code :)\0A\0A\1B[0m\00"
define void @parseFail() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([87 x i8], [87 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
uint8_t
rfcomm_event_remote_modem_status_get_modem_status(const uint8_t *event) {
  return event[4];
}


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

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

LLVM IR (-O0):
define i32 @rfcomm_event_remote_modem_status_get_modem_status(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 4
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @rfcomm_event_remote_modem_status_get_modem_status(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 4
%3 = load i32, i32* %2
ret i32 %3
}
void refresh(void) { __asm__("mov $0x5,%eax;int $0x40"); }


x86 assembly (clang, -O0):
<refresh>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%eax
int    $0x40
pop    %rbp
ret

x86 assembly (clang, -O2):
<refresh>:
mov    $0x5,%eax
int    $0x40
ret

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

LLVM IR (-O2):
define void @refresh() {
tail call void asm sideeffect "mov $$0x5,%eax;int $$0x40", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Type definitions */
struct server_list {
  int dummy;
};
struct genlist {
  int dummy;
};

/* Variables and functions */
int genlist_size(struct genlist *);
int server_list_size(const struct server_list *tthis) {
  return genlist_size(((struct genlist *)(tthis)));
}


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

x86 assembly (clang, -O2):
<server_list_size>:
jmp    1030 <genlist_size@plt>

LLVM IR (-O0):
%struct.server_list = type { i32 }
%struct.genlist = type { i32 }
define i32 @server_list_size(%struct.server_list* %0) {
%2 = alloca %struct.server_list*
store %struct.server_list* %0, %struct.server_list** %2
%3 = load %struct.server_list*, %struct.server_list** %2
%4 = bitcast %struct.server_list* %3 to %struct.genlist*
%5 = call i32 @genlist_size(%struct.genlist* %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.server_list = type { i32 }
%struct.genlist = type { i32 }
define i32 @server_list_size(%struct.server_list* %0) {
%2 = bitcast %struct.server_list* %0 to %struct.genlist*
%3 = tail call i32 @genlist_size(%struct.genlist* %2)
ret i32 %3
}
/* Variables and functions */
void *fixup_null_alloc(size_t);
void *malloc(size_t);
void *xmalloc(size_t n) {
  void *p;
  p = malloc(n);
  if (p == 0)
    p = fixup_null_alloc(n);
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1151 <xmalloc+0x31>
mov    -0x8(%rbp),%rdi
call   1030 <fixup_null_alloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
mov    %rdi,%rbx
call   1040 <malloc@plt>
test   %rax,%rax
je     1130 <xmalloc+0x10>
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <fixup_null_alloc@plt>

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

LLVM IR (-O2):
define i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i8* @fixup_null_alloc(i64 %0)
br label %6
6: ; preds = %4, %1
%7 = phi i8* [ %5, %4 ], [ %2, %1 ]
ret i8* %7
}
/* Variables and functions */
scalar_t__ myalloc(int);
int /*<<< orphan*/ mygc();
int /*<<< orphan*/ printallocation();
int /*<<< orphan*/ printf(char *);
void f() {
  int *ip;
  char *cp;
  ip = (int *)myalloc(4 * sizeof(int));
  cp = (char *)myalloc(4 * sizeof(char));
  printf("In f after allocating ip, cp\n");
  printallocation();
  mygc();
  printf("In f after gc\n");
  printallocation();
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x10,%edi
call   1030 <myalloc@plt>
mov    %rax,-0x8(%rbp)
mov    $0x4,%edi
call   1030 <myalloc@plt>
mov    %rax,-0x10(%rbp)
lea    0xe95(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <printallocation@plt>
mov    $0x0,%al
call   1060 <mygc@plt>
lea    0xe99(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <printallocation@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
mov    $0x10,%edi
call   1040 <myalloc@plt>
mov    $0x4,%edi
call   1040 <myalloc@plt>
lea    0xea4(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <printallocation@plt>
xor    %eax,%eax
call   1060 <mygc@plt>
lea    0xea7(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <printallocation@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"In f after allocating ip, cp\0A\00"
@.str.1 = [15 x i8] c"In f after gc\0A\00"
define void @f() {
%1 = alloca i32*
%2 = alloca i8*
%3 = call i64 @myalloc(i32 16)
%4 = inttoptr i64 %3 to i32*
store i32* %4, i32** %1
%5 = call i64 @myalloc(i32 4)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %2
%7 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (...) @printallocation()
%9 = call i32 (...) @mygc()
%10 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 (...) @printallocation()
ret void
}

LLVM IR (-O2):
@str = [29 x i8] c"In f after allocating ip, cp\00"
@str.2 = [14 x i8] c"In f after gc\00"
define void @f() {
%1 = tail call i64 @myalloc(i32 16)
%2 = tail call i64 @myalloc(i32 4)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @printallocation()
%5 = tail call i32 (...) @mygc()
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.2, i64 0, i64 0))
%7 = tail call i32 (...) @printallocation()
ret void
}
int __attribute__((no)) func1(int i) { return i + 2; }


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

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

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

LLVM IR (-O2):
define i32 @func1(i32 %0) {
%2 = add nsw i32 %0, 2
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int main() {
  system("gnome-terminal --geometry=80x10+100+200 -x ./ceva");
  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 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [50 x i8] c"gnome-terminal --geometry=80x10+100+200 -x ./ceva\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @system(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [50 x i8] c"gnome-terminal --geometry=80x10+100+200 -x ./ceva\00"
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
char *next_normal_token(char **p) {
  char *start = *p;
  while (**p) {
    if (**p == ' ' || **p == '\t') {
      **p = 0;
      *p += 1;
      break;
    }
    *p += 1;
  }
  return start;
}


x86 assembly (clang, -O0):
<next_normal_token>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
cmpb   $0x0,(%rax)
je     1179 <next_normal_token+0x79>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     1149 <next_normal_token+0x49>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
jne    1166 <next_normal_token+0x66>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    1179 <next_normal_token+0x79>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    1113 <next_normal_token+0x13>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_normal_token>:
mov    (%rdi),%rax
lea    0x1(%rax),%rcx
nopw   0x0(%rax,%rax,1)
movzbl -0x1(%rcx),%edx
test   %dl,%dl
je     1133 <next_normal_token+0x33>
cmp    $0x20,%dl
je     112b <next_normal_token+0x2b>
cmp    $0x9,%dl
je     112b <next_normal_token+0x2b>
mov    %rcx,(%rdi)
add    $0x1,%rcx
jmp    1110 <next_normal_token+0x10>
movb   $0x0,-0x1(%rcx)
addq   $0x1,(%rdi)
ret

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

LLVM IR (-O2):
define i8* @next_normal_token(i8** nocapture %0) {
%2 = load i8*, i8** %0
br label %3
3: ; preds = %9, %1
%4 = phi i8* [ %10, %9 ], [ %2, %1 ]
%5 = load i8, i8* %4
switch i8 %5, label %9 [
i8 0, label %11
i8 32, label %6
i8 9, label %6
]
6: ; preds = %3, %3
store i8 0, i8* %4
%7 = load i8*, i8** %0
%8 = getelementptr inbounds i8, i8* %7, i64 1
store i8* %8, i8** %0
br label %11
9: ; preds = %3
%10 = getelementptr inbounds i8, i8* %4, i64 1
store i8* %10, i8** %0
br label %3
11: ; preds = %3, %6
ret i8* %2
}
int issep(int ch) {
  int retval;
  if ((ch == 9) || (ch == 10) || (ch == 32) || (ch == 44) || (ch == 59))
    retval = 1;
  else
    retval = 0;
  return retval;
}


x86 assembly (clang, -O0):
<issep>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x9,-0x4(%rbp)
je     1139 <issep+0x39>
cmpl   $0xa,-0x4(%rbp)
je     1139 <issep+0x39>
cmpl   $0x20,-0x4(%rbp)
je     1139 <issep+0x39>
cmpl   $0x2c,-0x4(%rbp)
je     1139 <issep+0x39>
cmpl   $0x3b,-0x4(%rbp)
jne    1145 <issep+0x45>
movl   $0x1,-0x8(%rbp)
jmp    114c <issep+0x4c>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<issep>:
cmp    $0x3b,%edi
ja     111d <issep+0x1d>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x800100100000600,%rdx
bt     %rcx,%rdx
jae    111d <issep+0x1d>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @issep(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 9
br i1 %5, label %18, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 10
br i1 %8, label %18, label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 32
br i1 %11, label %18, label %12
12: ; preds = %9
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, 44
br i1 %14, label %18, label %15
15: ; preds = %12
%16 = load i32, i32* %2
%17 = icmp eq i32 %16, 59
br i1 %17, label %18, label %19
18: ; preds = %15, %12, %9, %6, %1
store i32 1, i32* %3
br label %20
19: ; preds = %15
store i32 0, i32* %3
br label %20
20: ; preds = %19, %18
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @issep(i32 %0) {
switch i32 %0, label %2 [
i32 59, label %3
i32 44, label %3
i32 32, label %3
i32 10, label %3
i32 9, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Variables and functions */
scalar_t__ atol(char const *);
int atoi(const char *s) { return (int)atol(s); }


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

x86 assembly (clang, -O2):
<atoi>:
jmp    1030 <atol@plt>

LLVM IR (-O0):
define i32 @atoi(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @atol(i8* %3)
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @atoi(i8* nocapture %0) {
%2 = tail call i64 @atol(i8* %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
void g_timer_continue() {}


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

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

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

LLVM IR (-O2):
define void @g_timer_continue() {
ret void
}
int touch_update() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @touch_update() {
ret i32 0
}
unsigned long ftrace_call_adjust(unsigned long addr) { return addr; }


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

x86 assembly (clang, -O2):
<ftrace_call_adjust>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @ftrace_call_adjust(i64 returned %0) {
ret i64 %0
}
/* Type definitions */
struct termios {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ TCGETA;
scalar_t__ ioctl(int, int /*<<< orphan*/, struct termios *);
int tty_get_state(struct termios *tty, int tty_fd) {
  if (ioctl(tty_fd, TCGETA, tty) < 0) {
    return (-1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<tty_get_state>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    0x2ebf(%rip),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rdx
call   1030 <ioctl@plt>
cmp    $0x0,%rax
jge    114a <tty_get_state+0x3a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1151 <tty_get_state+0x41>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tty_get_state>:
push   %rax
mov    %esi,%eax
mov    %rdi,%rdx
mov    0x2ecb(%rip),%rcx
mov    (%rcx),%esi
mov    %eax,%edi
call   1030 <ioctl@plt>
sar    $0x3f,%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.termios = type { i32 }
@TCGETA = global i32 0
define i32 @tty_get_state(%struct.termios* %0, i32 %1) {
%3 = alloca i32
%4 = alloca %struct.termios*
%5 = alloca i32
store %struct.termios* %0, %struct.termios** %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = load i32, i32* @TCGETA
%8 = load %struct.termios*, %struct.termios** %4
%9 = call i64 @ioctl(i32 %6, i32 %7, %struct.termios* %8)
%10 = icmp slt i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 -1, i32* %3
br label %13
12: ; preds = %2
store i32 0, i32* %3
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
%struct.termios = type { i32 }
@TCGETA = global i32 0
define i32 @tty_get_state(%struct.termios* %0, i32 %1) {
%3 = load i32, i32* @TCGETA
%4 = tail call i64 @ioctl(i32 %1, i32 %3, %struct.termios* %0)
%5 = ashr i64 %4, 63
%6 = trunc i64 %5 to i32
ret i32 %6
}