xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  char *hw;
  hw = "  Hello World!";
  printf("%s\n", hw + 2);
  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)
lea    0xed3(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
add    $0x2,%rsi
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [15 x i8] c" Hello World!\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 2))
ret i32 0
}
void foo167(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo167(i32 %0) {
ret void
}
double pow1(long minusone, long pow) {
  if (pow & 1)
    return (-1);
  return (1);
}


x86 assembly (clang, -O0):
<pow1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     1130 <pow1+0x30>
movsd  0xee2(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    113d <pow1+0x3d>
movsd  0xec8(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pow1>:
xor    %eax,%eax
test   $0x1,%sil
sete   %al
lea    0xef0(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
ret

LLVM IR (-O0):
define double @pow1(i64 %0, i64 %1) {
%3 = alloca double
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
%6 = load i64, i64* %5
%7 = and i64 %6, 1
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %2
store double -1.000000e+00, double* %3
br label %11
10: ; preds = %2
store double 1.000000e+00, double* %3
br label %11
11: ; preds = %10, %9
%12 = load double, double* %3
ret double %12
}

LLVM IR (-O2):
define double @pow1(i64 %0, i64 %1) {
%3 = and i64 %1, 1
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, double 1.000000e+00, double -1.000000e+00
ret double %5
}
yyerrorexit(rc) int rc;
{ exit(1); }


x86 assembly (clang, -O0):
<yyerrorexit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<yyerrorexit>:
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

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

LLVM IR (-O2):
define i32 @yyerrorexit(i32 %0) {
tail call void @exit(i32 1)
unreachable
}
void foo462(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo462(i32 %0) {
ret void
}
/* Type definitions */
struct widget {
  int dummy;
};
struct view {
  int dummy;
};

/* Variables and functions */
struct widget *createwidget(struct view *);
int /*<<< orphan*/ widget_option_init(struct widget *, char *, char *, char *,
                                      char *);
void pool_create_option(struct view *view, char *id, char *in, char *name,
                        char *value) {
  struct widget *widget = createwidget(view);
  widget_option_init(widget, id, in, name, value);
}


x86 assembly (clang, -O0):
<pool_create_option>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <createwidget@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1040 <widget_option_init@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pool_create_option>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %r8,%r14
mov    %rcx,%r15
mov    %rdx,%r12
mov    %rsi,%rbx
call   1030 <createwidget@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
mov    %r15,%rcx
mov    %r14,%r8
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <widget_option_init@plt>

LLVM IR (-O0):
%struct.view = type { i32 }
%struct.widget = type { i32 }
define void @pool_create_option(%struct.view* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca %struct.view*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca %struct.widget*
store %struct.view* %0, %struct.view** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%12 = load %struct.view*, %struct.view** %6
%13 = call %struct.widget* @createwidget(%struct.view* %12)
store %struct.widget* %13, %struct.widget** %11
%14 = load %struct.widget*, %struct.widget** %11
%15 = load i8*, i8** %7
%16 = load i8*, i8** %8
%17 = load i8*, i8** %9
%18 = load i8*, i8** %10
%19 = call i32 @widget_option_init(%struct.widget* %14, i8* %15, i8* %16, i8* %17, i8* %18)
ret void
}

LLVM IR (-O2):
%struct.view = type { i32 }
%struct.widget = type { i32 }
define void @pool_create_option(%struct.view* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = tail call %struct.widget* @createwidget(%struct.view* %0)
%7 = tail call i32 @widget_option_init(%struct.widget* %6, i8* %1, i8* %2, i8* %3, i8* %4)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void write_32_be(uint32_t value, unsigned char bytes[4]) {
  for (int i = 3; i >= 0; i--, value >>= 8)
    bytes[i] = value & 0xff;
}


x86 assembly (clang, -O0):
<write_32_be>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x3,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     1148 <write_32_be+0x48>
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    %al,%dl
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
mov    %eax,-0x4(%rbp)
jmp    1112 <write_32_be+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_32_be>:
bswap  %edi
mov    %edi,(%rsi)
ret

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

LLVM IR (-O2):
define void @write_32_be(i32 %0, i8* nocapture writeonly %1) {
%3 = trunc i32 %0 to i8
%4 = getelementptr inbounds i8, i8* %1, i64 3
store i8 %3, i8* %4
%5 = lshr i32 %0, 8
%6 = trunc i32 %5 to i8
%7 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %6, i8* %7
%8 = lshr i32 %0, 16
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %9, i8* %10
%11 = lshr i32 %0, 24
%12 = trunc i32 %11 to i8
store i8 %12, i8* %1
ret void
}
/* Type definitions */
struct aFILE {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _get_actual_fp(struct aFILE *);
int fputc(int, int /*<<< orphan*/);
int my_fputc(int c, struct aFILE *fp) { return fputc(c, _get_actual_fp(fp)); }


x86 assembly (clang, -O0):
<my_fputc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <_get_actual_fp@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
call   1040 <fputc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_fputc>:
push   %rbx
mov    %edi,%ebx
mov    %rsi,%rdi
call   1030 <_get_actual_fp@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <fputc@plt>

LLVM IR (-O0):
%struct.aFILE = type { i32 }
define i32 @my_fputc(i32 %0, %struct.aFILE* %1) {
%3 = alloca i32
%4 = alloca %struct.aFILE*
store i32 %0, i32* %3
store %struct.aFILE* %1, %struct.aFILE** %4
%5 = load i32, i32* %3
%6 = load %struct.aFILE*, %struct.aFILE** %4
%7 = call i32 @_get_actual_fp(%struct.aFILE* %6)
%8 = call i32 @fputc(i32 %5, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.aFILE = type { i32 }
define i32 @my_fputc(i32 %0, %struct.aFILE* %1) {
%3 = tail call i32 @_get_actual_fp(%struct.aFILE* %1)
%4 = tail call i32 @fputc(i32 %0, i32 %3)
ret i32 %4
}
int month(int *n) {
  int month;
  int flag = 0;
  month = n[2] * 10 + n[3];
  if ((month < 12) || (month >= 21 && month <= 32) ||
      (month >= 41 && month <= 53)) {
    flag = 1;
  }
  return flag;
}


x86 assembly (clang, -O0):
<month>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
imul   $0xa,0x8(%rax),%eax
mov    -0x8(%rbp),%rcx
add    0xc(%rcx),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0xc,-0xc(%rbp)
jl     1153 <month+0x53>
cmpl   $0x15,-0xc(%rbp)
jl     113f <month+0x3f>
cmpl   $0x20,-0xc(%rbp)
jle    1153 <month+0x53>
cmpl   $0x29,-0xc(%rbp)
jl     115a <month+0x5a>
cmpl   $0x35,-0xc(%rbp)
jg     115a <month+0x5a>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<month>:
mov    0x8(%rdi),%eax
mov    0xc(%rdi),%ecx
lea    (%rax,%rax,4),%eax
lea    (%rcx,%rax,2),%edx
cmp    $0xc,%edx
setl   %dil
lea    (%rcx,%rax,2),%esi
add    $0xffffffeb,%esi
cmp    $0xc,%esi
setb   %dl
or     %dil,%dl
lea    (%rcx,%rax,2),%eax
add    $0xffffffd7,%eax
cmp    $0xd,%eax
setb   %al
or     %dl,%al
movzbl %al,%eax
ret

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

LLVM IR (-O2):
define i32 @month(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 10
%5 = getelementptr inbounds i32, i32* %0, i64 3
%6 = load i32, i32* %5
%7 = add nsw i32 %4, %6
%8 = icmp slt i32 %7, 12
%9 = add i32 %7, -21
%10 = icmp ult i32 %9, 12
%11 = or i1 %8, %10
%12 = add i32 %7, -41
%13 = icmp ult i32 %12, 13
%14 = or i1 %13, %11
%15 = zext i1 %14 to i32
ret i32 %15
}
/* Variables and functions */
int EOF;
int getchar();
void flush() {
  int c;
  while ((c = getchar()) != '\n' && c != EOF)
    ;
}


x86 assembly (clang, -O0):
<flush>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %eax,%ecx
mov    %ecx,-0x4(%rbp)
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x5(%rbp)
je     1144 <flush+0x34>
mov    -0x4(%rbp),%eax
mov    0x2eac(%rip),%rcx
cmp    (%rcx),%eax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
test   $0x1,%al
jne    1154 <flush+0x44>
jmp    1159 <flush+0x49>
jmp    1118 <flush+0x8>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flush>:
push   %rbx
mov    0x2ed0(%rip),%rbx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%eax
je     1130 <flush+0x20>
cmp    (%rbx),%eax
jne    1120 <flush+0x10>
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
define void @flush() {
%1 = alloca i32
br label %2
2: ; preds = %11, %0
%3 = call i32 (...) @getchar()
store i32 %3, i32* %1
%4 = icmp ne i32 %3, 10
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* %1
%7 = load i32, i32* @EOF
%8 = icmp ne i32 %6, %7
br label %9
9: ; preds = %5, %2
%10 = phi i1 [ false, %2 ], [ %8, %5 ]
br i1 %10, label %11, label %12
11: ; preds = %9
br label %2
12: ; preds = %9
ret void
}

LLVM IR (-O2):
@EOF = global i32 0
define void @flush() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @getchar()
%3 = icmp ne i32 %2, 10
%4 = load i32, i32* @EOF
%5 = icmp ne i32 %2, %4
%6 = select i1 %3, i1 %5, i1 false
br i1 %6, label %1, label %7
7: ; preds = %1
ret void
}
int ft_isinstring(char c, char *str) {
  int i;
  i = 0;
  while (str[i]) {
    if (str[i] == c)
      return (1);
    i++;
  }
  return (0);
}


x86 assembly (clang, -O0):
<ft_isinstring>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1159 <ft_isinstring+0x59>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0x5(%rbp),%ecx
cmp    %ecx,%eax
jne    114b <ft_isinstring+0x4b>
movl   $0x1,-0x4(%rbp)
jmp    1160 <ft_isinstring+0x60>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1115 <ft_isinstring+0x15>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isinstring>:
mov    (%rsi),%cl
xor    %eax,%eax
test   %cl,%cl
je     1120 <ft_isinstring+0x20>
add    $0x1,%rsi
nopl   0x0(%rax)
cmp    %dil,%cl
je     1121 <ft_isinstring+0x21>
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1110 <ft_isinstring+0x10>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_isinstring(i8 signext %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %9
5: ; preds = %9
%6 = getelementptr inbounds i8, i8* %1, i64 %13
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %2, %5
%10 = phi i64 [ %13, %5 ], [ 0, %2 ]
%11 = phi i8 [ %7, %5 ], [ %3, %2 ]
%12 = icmp eq i8 %11, %0
%13 = add nuw i64 %10, 1
br i1 %12, label %14, label %5
14: ; preds = %9, %5, %2
%15 = phi i32 [ 0, %2 ], [ 0, %5 ], [ 1, %9 ]
ret i32 %15
}
/* Variables and functions */
size_t backtrace2(void **, int);
int /*<<< orphan*/ printf(char *, size_t);
void print_trace() {
  void *array[10];
  size_t size;
  char **strings;
  size_t i;
  size = backtrace2(array, 10);
  printf("OK3 size:%zu\n", size);
}


x86 assembly (clang, -O0):
<print_trace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
lea    -0x50(%rbp),%rdi
mov    $0xa,%esi
call   1040 <backtrace2@plt>
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rsi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_trace>:
sub    $0x58,%rsp
mov    %rsp,%rdi
mov    $0xa,%esi
call   1040 <backtrace2@plt>
lea    0xec8(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
add    $0x58,%rsp
ret

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

LLVM IR (-O2):
@.str = [14 x i8] c"OK3 size:%zu\0A\00"
define void @print_trace() {
%1 = alloca [10 x i8*]
%2 = bitcast [10 x i8*]* %1 to i8*
%3 = getelementptr inbounds [10 x i8*], [10 x i8*]* %1, i64 0, i64 0
%4 = call i64 @backtrace2(i8** %3, i32 10)
%5 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 %4)
ret void
}
/* Variables and functions */
int fib(int);
int /*<<< orphan*/ printf(char *, int);
int main() { printf("%d\n", fib(35)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x23,%edi
call   1040 <fib@plt>
mov    %eax,%esi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @fib(i32 35)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ testgaussfit();
int /*<<< orphan*/ testgaussfix();
int /*<<< orphan*/ testlinfit();
int /*<<< orphan*/ testquadfit();
int /*<<< orphan*/ testquadfix();
int main(int argc, char *argv[]) {
  int i;
  int niter = 1;
  for (i = 0; i < niter; i++) {
    testlinfit();
    testquadfit();
    testquadfix();
    testgaussfit();
    testgaussfix();
  }
  exit(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)
movl   $0x1,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    11c1 <main+0x61>
mov    $0x0,%al
call   1030 <testlinfit@plt>
mov    $0x0,%al
call   1050 <testquadfit@plt>
mov    $0x0,%al
call   1040 <testquadfix@plt>
mov    $0x0,%al
call   1070 <testgaussfit@plt>
mov    $0x0,%al
call   1060 <testgaussfix@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1184 <main+0x24>
xor    %edi,%edi
call   1080 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <testlinfit@plt>
xor    %eax,%eax
call   1050 <testquadfit@plt>
xor    %eax,%eax
call   1040 <testquadfix@plt>
xor    %eax,%eax
call   1070 <testgaussfit@plt>
xor    %eax,%eax
call   1060 <testgaussfix@plt>
xor    %edi,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %7
store i32 0, i32* %6
br label %8
8: ; preds = %18, %2
%9 = load i32, i32* %6
%10 = load i32, i32* %7
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %21
12: ; preds = %8
%13 = call i32 (...) @testlinfit()
%14 = call i32 (...) @testquadfit()
%15 = call i32 (...) @testquadfix()
%16 = call i32 (...) @testgaussfit()
%17 = call i32 (...) @testgaussfix()
br label %18
18: ; preds = %12
%19 = load i32, i32* %6
%20 = add nsw i32 %19, 1
store i32 %20, i32* %6
br label %8
21: ; preds = %8
%22 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @testlinfit()
%4 = tail call i32 (...) @testquadfit()
%5 = tail call i32 (...) @testquadfix()
%6 = tail call i32 (...) @testgaussfit()
%7 = tail call i32 (...) @testgaussfix()
%8 = tail call i32 @exit(i32 0)
unreachable
}
signed int f30(signed int v_foo) {
  signed int v_and = v_foo & 32766;
  signed int v_shl = v_and << 18;
  return v_shl;
}


x86 assembly (clang, -O0):
<f30>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x7ffe,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x12,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f30>:
mov    %edi,%eax
and    $0xfffffffe,%eax
shl    $0x12,%eax
ret

LLVM IR (-O0):
define i32 @f30(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = and i32 %5, 32766
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = shl i32 %7, 18
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @f30(i32 %0) {
%2 = shl i32 %0, 18
%3 = and i32 %2, -524288
ret i32 %3
}
const char *libdbo_errstr(int errno) {
  switch (errno) {
  case 0:
    return 0;
  case 1:
  default:
    return "Unknown error";
  }
}


x86 assembly (clang, -O0):
<libdbo_errstr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     112b <libdbo_errstr+0x2b>
jmp    111a <libdbo_errstr+0x1a>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     1138 <libdbo_errstr+0x38>
jmp    113d <libdbo_errstr+0x3d>
movq   $0x0,-0x8(%rbp)
jmp    1148 <libdbo_errstr+0x48>
jmp    113d <libdbo_errstr+0x3d>
lea    0xebc(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<libdbo_errstr>:
xor    %eax,%eax
test   %edi,%edi
lea    0xef5(%rip),%rcx
cmovne %rcx,%rax
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Unknown error\00"
define i8* @libdbo_errstr(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 0, label %5
i32 1, label %6
]
5: ; preds = %1
store i8* null, i8** %2
br label %8
6: ; preds = %1
br label %7
7: ; preds = %1, %6
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8** %2
br label %8
8: ; preds = %7, %5
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [14 x i8] c"Unknown error\00"
define i8* @libdbo_errstr(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* null, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void error(char *msg) { fprintf(stderr, "Error: %s\n", msg); }


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

x86 assembly (clang, -O2):
<error>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"Error: %s\0A\00"
define void @error(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 ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"Error: %s\0A\00"
define void @error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int foo(int x, int y, int z) { return x + y - z; }


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

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

LLVM IR (-O0):
define i32 @foo(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = add nsw i32 %7, %8
%10 = load i32, i32* %6
%11 = sub nsw i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @foo(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, %0
%5 = sub i32 %4, %2
ret i32 %5
}
int bar(int i, int j) { return i + j; }


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

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

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

LLVM IR (-O2):
define i32 @bar(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
int *malloc(int);
int main() {
  int *p = malloc(32);
  free(p);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x20,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x20,%edi
call   1040 <malloc@plt>
mov    %rax,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32* @malloc(i32 32)
%2 = tail call i32 @free(i32* %1)
ret i32 0
}
int fb_ConsoleLocate(int row, int col, int cursor) { return 0; }


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

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

LLVM IR (-O0):
define i32 @fb_ConsoleLocate(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @fb_ConsoleLocate(i32 %0, i32 %1, i32 %2) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
int ftell(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, int, ...);
int /*<<< orphan*/ puts(char *);
char *strerror(int);
int main(int argc, char *argv[]) {
  exit(0);
  puts("User Space");
  FILE *fp = fopen("/font/ipaexg.ttf", "rb");
  fseek(fp, 0, SEEK_END);
  printf("file size %u\n", ftell(fp));
  fclose(fp);
  errno = 0;
  printf("errno %d, %s\n", errno, strerror(errno));
  errno = 0xDEAD;
  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)
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@SEEK_END = global i32 0
@errno = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@SEEK_END = global i32 0
@errno = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @exit(i32 0)
unreachable
}
int param_get_bool(char *buffer, struct kernel_param *kp) { return 0; }


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

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

LLVM IR (-O0):
%struct.kernel_param = type opaque
define i32 @param_get_bool(i8* %0, %struct.kernel_param* %1) {
%3 = alloca i8*
%4 = alloca %struct.kernel_param*
store i8* %0, i8** %3
store %struct.kernel_param* %1, %struct.kernel_param** %4
ret i32 0
}

LLVM IR (-O2):
%struct.kernel_param = type opaque
define i32 @param_get_bool(i8* nocapture readnone %0, %struct.kernel_param* nocapture readnone %1) {
ret i32 0
}
float fun(float x) { return x; }


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

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

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

LLVM IR (-O2):
define float @fun(float returned %0) {
ret float %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char const *argv[]) {
  double shoe, foot;
  shoe = 9.0;
  foot = 0.325 * shoe + 7.64;
  printf("Shoe size (men's)    foot length\n");
  printf("%10.1f %15.2f inches\n", shoe, foot);
  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)
movsd  0xee2(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xec0(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xebc(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
lea    0xec6(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xefe(%rip),%rdi
call   1030 <puts@plt>
lea    0xedc(%rip),%rdi
movsd  0xec4(%rip),%xmm0
movsd  0xec4(%rip),%xmm1
mov    $0x2,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"Shoe size (men's) foot length\0A\00"
@.str.1 = [22 x i8] c"%10.1f %15.2f inches\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
%7 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 9.000000e+00, double* %6
%8 = load double, double* %6
%9 = call double @llvm.fmuladd.f64(double 3.250000e-01, double %8, double 0x401E8F5C28F5C28F)
store double %9, double* %7
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%11 = load double, double* %6
%12 = load double, double* %7
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), double %11, double %12)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [22 x i8] c"%10.1f %15.2f inches\0A\00"
@str = [33 x i8] c"Shoe size (men's) foot length\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), double 9.000000e+00, double 1.056500e+01)
ret i32 0
}
void gtk_paned_add2() {}


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

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

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

LLVM IR (-O2):
define void @gtk_paned_add2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int x = 30, y = 20, z = 10;
  if (!(y > x))
    printf("y: %d is not greater than x: %d", y, x);
  else
    printf("expression return false");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1e,-0x8(%rbp)
movl   $0x14,-0xc(%rbp)
movl   $0xa,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1159 <main+0x49>
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1167 <main+0x57>
lea    0xec0(%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
lea    0xee8(%rip),%rdi
mov    $0x14,%esi
mov    $0x1e,%edx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"y: %d is not greater than x: %d\00"
@.str.1 = [24 x i8] c"expression return false\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 30, i32* %2
store i32 20, i32* %3
store i32 10, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = icmp sgt i32 %5, %6
br i1 %7, label %12, label %8
8: ; preds = %0
%9 = load i32, i32* %3
%10 = load i32, i32* %2
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10)
br label %14
12: ; preds = %0
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
br label %14
14: ; preds = %12, %8
ret i32 0
}

LLVM IR (-O2):
@.str = [32 x i8] c"y: %d is not greater than x: %d\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 20, i32 30)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ freeTagNode(void *);
void freeTagInfo(void *tag) { freeTagNode(tag); }


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

x86 assembly (clang, -O2):
<freeTagInfo>:
jmp    1030 <freeTagNode@plt>

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

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

/* Variables and functions */
int /*<<< orphan*/ *fopen(char const *, char *);
FILE *opendict(const char *dict) {
  FILE *fp;
  if ((fp = fopen(dict, "r")) == NULL)
    return (NULL);
  return (fp);
}


x86 assembly (clang, -O0):
<opendict>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1147 <opendict+0x37>
movq   $0x0,-0x8(%rbp)
jmp    114f <opendict+0x3f>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opendict>:
lea    0xee9(%rip),%rsi
jmp    1030 <fopen@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
define i32* @opendict(i8* %0) {
%2 = alloca i32*
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32* @fopen(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %6, i32** %4
%7 = icmp eq i32* %6, null
br i1 %7, label %8, label %9
8: ; preds = %1
store i32* null, i32** %2
br label %11
9: ; preds = %1
%10 = load i32*, i32** %4
store i32* %10, i32** %2
br label %11
11: ; preds = %9, %8
%12 = load i32*, i32** %2
ret i32* %12
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define noalias i32* @opendict(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32* %2
}
/* Variables and functions */
int __copy_user_nocache(void *, void const *, unsigned int, int);
__attribute__((always_)) int
__copy_from_user_nocache(void *dst, const void *src, unsigned size) {
  do {
    do {
    } while (0);
  } while (0);
  return __copy_user_nocache(dst, src, size, 1);
}


x86 assembly (clang, -O0):
<__copy_from_user_nocache>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
jmp    1128 <__copy_from_user_nocache+0x18>
jmp    112d <__copy_from_user_nocache+0x1d>
jmp    1132 <__copy_from_user_nocache+0x22>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x1,%ecx
call   1030 <__copy_user_nocache@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__copy_from_user_nocache>:
mov    $0x1,%ecx
jmp    1030 <__copy_user_nocache@plt>

LLVM IR (-O0):
define i32 @__copy_from_user_nocache(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
br label %7
7: ; preds = %3
br label %8
8: ; preds = %7
br label %9
9: ; preds = %8
br label %10
10: ; preds = %9
%11 = load i8*, i8** %4
%12 = load i8*, i8** %5
%13 = load i32, i32* %6
%14 = call i32 @__copy_user_nocache(i8* %11, i8* %12, i32 %13, i32 1)
ret i32 %14
}

LLVM IR (-O2):
define i32 @__copy_from_user_nocache(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @__copy_user_nocache(i8* %0, i8* %1, i32 %2, i32 1)
ret i32 %4
}
/* Type definitions */
struct Node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ print_node(struct Node *);
int /*<<< orphan*/ printf(char *);
struct Node *print_newline_node(struct Node *node) {
  print_node(node);
  printf("\n");
  return NULL;
}


x86 assembly (clang, -O0):
<print_newline_node>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <print_node@plt>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_newline_node>:
push   %rax
call   1040 <print_node@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.Node = type { i32 }
@.str = [2 x i8] c"\0A\00"
define %struct.Node* @print_newline_node(%struct.Node* %0) {
%2 = alloca %struct.Node*
store %struct.Node* %0, %struct.Node** %2
%3 = load %struct.Node*, %struct.Node** %2
%4 = call i32 @print_node(%struct.Node* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret %struct.Node* null
}

LLVM IR (-O2):
%struct.Node = type { i32 }
define noalias %struct.Node* @print_newline_node(%struct.Node* %0) {
%2 = tail call i32 @print_node(%struct.Node* %0)
%3 = tail call i32 @putchar(i32 10)
ret %struct.Node* null
}
/* Variables and functions */
int /*<<< orphan*/ isprint(char);
int clean(char c) {
  if (!isprint(c))
    c = ' ';
  return c;
}


x86 assembly (clang, -O0):
<clean>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isprint@plt>
cmp    $0x0,%eax
jne    1134 <clean+0x24>
movb   $0x20,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clean>:
push   %rbx
mov    %edi,%ebx
call   1030 <isprint@plt>
test   %eax,%eax
mov    $0x20,%eax
cmovne %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @clean(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @isprint(i8 signext %3)
%5 = icmp ne i32 %4, 0
br i1 %5, label %7, label %6
6: ; preds = %1
store i8 32, i8* %2
br label %7
7: ; preds = %6, %1
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @clean(i8 signext %0) {
%2 = tail call i32 @isprint(i8 signext %0)
%3 = icmp eq i32 %2, 0
%4 = sext i8 %0 to i32
%5 = select i1 %3, i32 32, i32 %4
ret i32 %5
}
/* Type definitions */
struct bufferevent {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ bufferevent_free(struct bufferevent *);
void socket_event_cb(struct bufferevent *bev, short events, void *arg) {
  bufferevent_free(bev);
}


x86 assembly (clang, -O0):
<socket_event_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <bufferevent_free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<socket_event_cb>:
jmp    1030 <bufferevent_free@plt>

LLVM IR (-O0):
%struct.bufferevent = type { i32 }
define void @socket_event_cb(%struct.bufferevent* %0, i16 signext %1, i8* %2) {
%4 = alloca %struct.bufferevent*
%5 = alloca i16
%6 = alloca i8*
store %struct.bufferevent* %0, %struct.bufferevent** %4
store i16 %1, i16* %5
store i8* %2, i8** %6
%7 = load %struct.bufferevent*, %struct.bufferevent** %4
%8 = call i32 @bufferevent_free(%struct.bufferevent* %7)
ret void
}

LLVM IR (-O2):
%struct.bufferevent = type { i32 }
define void @socket_event_cb(%struct.bufferevent* %0, i16 signext %1, i8* nocapture readnone %2) {
%4 = tail call i32 @bufferevent_free(%struct.bufferevent* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gikoMain();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(void) {
  srand(time(NULL));
  gikoMain();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
mov    $0x0,%al
call   1040 <gikoMain@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
xor    %eax,%eax
call   1040 <gikoMain@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @time(i32* null)
%3 = call i32 @srand(i32 %2)
%4 = call i32 (...) @gikoMain()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i32 (...) @gikoMain()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ stderr;
void oops(char *s1, char *s2) {
  fprintf(stderr, "Error: %s", s1);
  perror(s2);
  exit(1);
}


x86 assembly (clang, -O0):
<oops>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xeac(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<oops>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rdx
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
lea    0xeb9(%rip),%rsi
call   1030 <fprintf@plt>
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [10 x i8] c"Error: %s\00"
define void @oops(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i8*, i8** %4
%9 = call i32 @perror(i8* %8)
%10 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [10 x i8] c"Error: %s\00"
define void @oops(i8* %0, i8* nocapture %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = tail call i32 @perror(i8* %1)
%6 = tail call i32 @exit(i32 1)
unreachable
}
void small_free(void *p) {}


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

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

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

LLVM IR (-O2):
define void @small_free(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int version_info() {
  printf("This is millionaer server\n");
  printf("  version 1.0\n");
  printf("  copyright Ludwig Frank & Florian Mayer\n");
  printf("  license: Gnu GPLv3\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [27 x i8] c"This is millionaer server\0A\00"
@.str.1 = [15 x i8] c" version 1.0\0A\00"
@.str.2 = [42 x i8] c" copyright Ludwig Frank & Florian Mayer\0A\00"
@.str.3 = [22 x i8] c" license: Gnu GPLv3\0A\00"
define i32 @version_info() {
%1 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [26 x i8] c"This is millionaer server\00"
@str.4 = [14 x i8] c" version 1.0\00"
@str.5 = [41 x i8] c" copyright Ludwig Frank & Florian Mayer\00"
@str.6 = [21 x i8] c" license: Gnu GPLv3\00"
define i32 @version_info() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.6, i64 0, i64 0))
ret i32 0
}
void mmc1_update() { return; }


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

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

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

LLVM IR (-O2):
define void @mmc1_update() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fh_cli_register(int /*<<< orphan*/ *, void **);
void fh_cli_tree(void **cmd_tree) { fh_cli_register(NULL, cmd_tree); }


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

x86 assembly (clang, -O2):
<fh_cli_tree>:
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <fh_cli_register@plt>

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

LLVM IR (-O2):
define void @fh_cli_tree(i8** %0) {
%2 = tail call i32 @fh_cli_register(i32* null, i8** %0)
ret void
}