xunge/DecIR huggingface dataset:
/* Type definitions */
struct iax_session {
  int dummy;
};

/* Variables and functions */
int __send_command(struct iax_session *, char, int, unsigned int,
                   unsigned char *, int, int, int, int /*<<< orphan*/,
                   int /*<<< orphan*/, int /*<<< orphan*/);
int send_command_immediate(struct iax_session *i, char type, int command,
                           unsigned int ts, unsigned char *data, int datalen,
                           int seqno) {
  return __send_command(i, type, command, ts, data, datalen, seqno, 1, 0, 0, 0);
}


x86 assembly (clang, -O0):
<send_command_immediate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %sil,%al
mov    0x10(%rbp),%esi
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x9(%rbp),%sil
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8
mov    -0x24(%rbp),%r9d
mov    0x10(%rbp),%eax
xor    %r10d,%r10d
movsbl %sil,%esi
mov    %eax,(%rsp)
movl   $0x1,0x8(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0x18(%rsp)
movl   $0x0,0x20(%rsp)
call   1030 <__send_command@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_command_immediate>:
push   %rax
mov    0x10(%rsp),%eax
sub    $0x8,%rsp
push   $0x0
push   $0x0
push   $0x0
push   $0x1
push   %rax
call   1030 <__send_command@plt>
add    $0x30,%rsp
pop    %rcx
ret

LLVM IR (-O0):
%struct.iax_session = type { i32 }
define i32 @send_command_immediate(%struct.iax_session* %0, i8 signext %1, i32 %2, i32 %3, i8* %4, i32 %5, i32 %6) {
%8 = alloca %struct.iax_session*
%9 = alloca i8
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i32
store %struct.iax_session* %0, %struct.iax_session** %8
store i8 %1, i8* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i8* %4, i8** %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%15 = load %struct.iax_session*, %struct.iax_session** %8
%16 = load i8, i8* %9
%17 = load i32, i32* %10
%18 = load i32, i32* %11
%19 = load i8*, i8** %12
%20 = load i32, i32* %13
%21 = load i32, i32* %14
%22 = call i32 @__send_command(%struct.iax_session* %15, i8 signext %16, i32 %17, i32 %18, i8* %19, i32 %20, i32 %21, i32 1, i32 0, i32 0, i32 0)
ret i32 %22
}

LLVM IR (-O2):
%struct.iax_session = type { i32 }
define i32 @send_command_immediate(%struct.iax_session* %0, i8 signext %1, i32 %2, i32 %3, i8* %4, i32 %5, i32 %6) {
%8 = tail call i32 @__send_command(%struct.iax_session* %0, i8 signext %1, i32 %2, i32 %3, i8* %4, i32 %5, i32 %6, i32 1, i32 0, i32 0, i32 0)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ plot4_work(unsigned char **, unsigned char **, unsigned int,
                              unsigned char, unsigned int);
void plot4_clipped_work(unsigned char (*screen1)[2],
                        unsigned char (*screen2)[2],
                        unsigned output_surface_offset, unsigned char depth,
                        unsigned pixels, unsigned palette_mask,
                        unsigned clip_mask) {
  pixels &= clip_mask;
  if (!pixels)
    return;
  plot4_work(screen1, screen2, output_surface_offset, depth, pixels);
}


x86 assembly (clang, -O0):
<plot4_clipped_work>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cl,%al
mov    0x10(%rbp),%ecx
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %al,-0x15(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
mov    0x10(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jne    114b <plot4_clipped_work+0x3b>
jmp    1165 <plot4_clipped_work+0x55>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x15(%rbp),%al
mov    -0x1c(%rbp),%r8d
movzbl %al,%ecx
call   1030 <plot4_work@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<plot4_clipped_work>:
and    0x8(%rsp),%r8d
je     111f <plot4_clipped_work+0xf>
movzbl %cl,%ecx
jmp    1030 <plot4_work@plt>
ret

LLVM IR (-O0):
define void @plot4_clipped_work([2 x i8]* %0, [2 x i8]* %1, i32 %2, i8 zeroext %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca [2 x i8]*
%9 = alloca [2 x i8]*
%10 = alloca i32
%11 = alloca i8
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store [2 x i8]* %0, [2 x i8]** %8
store [2 x i8]* %1, [2 x i8]** %9
store i32 %2, i32* %10
store i8 %3, i8* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%15 = load i32, i32* %14
%16 = load i32, i32* %12
%17 = and i32 %16, %15
store i32 %17, i32* %12
%18 = load i32, i32* %12
%19 = icmp ne i32 %18, 0
br i1 %19, label %21, label %20
20: ; preds = %7
br label %30
21: ; preds = %7
%22 = load [2 x i8]*, [2 x i8]** %8
%23 = bitcast [2 x i8]* %22 to i8**
%24 = load [2 x i8]*, [2 x i8]** %9
%25 = bitcast [2 x i8]* %24 to i8**
%26 = load i32, i32* %10
%27 = load i8, i8* %11
%28 = load i32, i32* %12
%29 = call i32 @plot4_work(i8** %23, i8** %25, i32 %26, i8 zeroext %27, i32 %28)
br label %30
30: ; preds = %21, %20
ret void
}

LLVM IR (-O2):
define void @plot4_clipped_work([2 x i8]* %0, [2 x i8]* %1, i32 %2, i8 zeroext %3, i32 %4, i32 %5, i32 %6) {
%8 = and i32 %6, %4
%9 = icmp eq i32 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %7
%11 = bitcast [2 x i8]* %0 to i8**
%12 = bitcast [2 x i8]* %1 to i8**
%13 = tail call i32 @plot4_work(i8** %11, i8** %12, i32 %2, i8 zeroext %3, i32 %8)
br label %14
14: ; preds = %7, %10
ret void
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
scalar_t__ S_ISDIR(int /*<<< orphan*/);
scalar_t__ stat(char const *, struct stat *);
int dirExists(const char *dir) {
  struct stat buf;
  return stat(dir, &buf) == 0 && S_ISDIR(buf.st_mode);
}


x86 assembly (clang, -O0):
<dirExists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <stat@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
jne    115d <dirExists+0x3d>
mov    -0x10(%rbp),%edi
call   1030 <S_ISDIR@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dirExists>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1135 <dirExists+0x15>
pop    %rcx
ret
mov    (%rsp),%edi
call   1030 <S_ISDIR@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @dirExists(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @stat(i8* %4, %struct.stat* %3)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%9 = load i32, i32* %8
%10 = call i64 @S_ISDIR(i32 %9)
%11 = icmp ne i64 %10, 0
br label %12
12: ; preds = %7, %1
%13 = phi i1 [ false, %1 ], [ %11, %7 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @dirExists(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = call i64 @S_ISDIR(i32 %8)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %6, %1
%13 = phi i32 [ 0, %1 ], [ %11, %6 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ LLONG_MAX;
int /*<<< orphan*/ LLONG_MIN;
long long parse_ll_bounds(char const *, int /*<<< orphan*/, int /*<<< orphan*/,
                          int *);
long long parse_ll(const char *sval, int *out_status) {
  return parse_ll_bounds(sval, LLONG_MIN, LLONG_MAX, out_status);
}


x86 assembly (clang, -O0):
<parse_ll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
mov    0x2eb4(%rip),%rax
mov    (%rax),%edx
mov    -0x10(%rbp),%rcx
call   1030 <parse_ll_bounds@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_ll>:
mov    %rsi,%rcx
mov    0x2ebe(%rip),%rax
mov    (%rax),%esi
mov    0x2ec5(%rip),%rax
mov    (%rax),%edx
jmp    1030 <parse_ll_bounds@plt>

LLVM IR (-O0):
@LLONG_MIN = global i32 0
@LLONG_MAX = global i32 0
define i64 @parse_ll(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i8*, i8** %3
%6 = load i32, i32* @LLONG_MIN
%7 = load i32, i32* @LLONG_MAX
%8 = load i32*, i32** %4
%9 = call i64 @parse_ll_bounds(i8* %5, i32 %6, i32 %7, i32* %8)
ret i64 %9
}

LLVM IR (-O2):
@LLONG_MIN = global i32 0
@LLONG_MAX = global i32 0
define i64 @parse_ll(i8* %0, i32* %1) {
%3 = load i32, i32* @LLONG_MIN
%4 = load i32, i32* @LLONG_MAX
%5 = tail call i64 @parse_ll_bounds(i8* %0, i32 %3, i32 %4, i32* %1)
ret i64 %5
}
int kume_farki_bul(int A[], int A_size, int B[], int B_size, int sonuc[]) {
  return -1;
}


x86 assembly (clang, -O0):
<kume_farki_bul>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @kume_farki_bul(i32* %0, i32 %1, i32* %2, i32 %3, i32* %4) {
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32*
store i32* %0, i32** %6
store i32 %1, i32* %7
store i32* %2, i32** %8
store i32 %3, i32* %9
store i32* %4, i32** %10
ret i32 -1
}

LLVM IR (-O2):
define i32 @kume_farki_bul(i32* nocapture readnone %0, i32 %1, i32* nocapture readnone %2, i32 %3, i32* nocapture readnone %4) {
ret i32 -1
}
/* Variables and functions */
int Fibonacci(int);
int Fibonacci_NOR(int);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d \n", Fibonacci(7));
  printf("%d \n", Fibonacci_NOR(7));
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x7,%edi
call   1030 <Fibonacci@plt>
mov    %eax,%esi
lea    0xe9e(%rip),%rdi
call   1040 <printf@plt>
mov    $0x7,%edi
call   1060 <Fibonacci_NOR@plt>
mov    %eax,%esi
lea    0xe86(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x7,%edi
call   1030 <Fibonacci@plt>
lea    0xeae(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x7,%edi
call   1060 <Fibonacci_NOR@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d \0A\00"
define i32 @main() {
%1 = tail call i32 @Fibonacci(i32 7)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @Fibonacci_NOR(i32 7)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 (...) @getchar()
ret i32 0
}
unsigned addval_171(unsigned x) { return x + 3286272332U; }


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

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

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

LLVM IR (-O2):
define i32 @addval_171(i32 %0) {
%2 = add i32 %0, -1008694964
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void HTML5() { puts("\n<!DOCTYPE html>"); }


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"\0A<!DOCTYPE html>\00"
define void @HTML5() {
%1 = call i32 @puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"\0A<!DOCTYPE html>\00"
define void @HTML5() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
void ref_add_int64_t(int64_t arg1, int64_t arg2, int64_t *result) {
  *result = arg1 + arg2;
}


x86 assembly (clang, -O0):
<ref_add_int64_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rcx
add    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ref_add_int64_t>:
add    %rsi,%rdi
mov    %rdi,(%rdx)
ret

LLVM IR (-O0):
define void @ref_add_int64_t(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 = add nsw i64 %7, %8
%10 = load i64*, i64** %6
store i64 %9, i64* %10
ret void
}

LLVM IR (-O2):
define void @ref_add_int64_t(i64 %0, i64 %1, i64* nocapture writeonly %2) {
%4 = add nsw i64 %1, %0
store i64 %4, i64* %2
ret void
}
int foo(int a) {
  int x = a * 2 + 1;
  return 1;
}


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

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

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
ret i32 1
}
void dfill(int n, double val, double a[], int ia) {
  int i;
  for (i = 0; i < (n - 1) * ia + 1; i += ia)
    a[i] = val;
}


x86 assembly (clang, -O0):
<dfill>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
imul   -0x1c(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    1152 <dfill+0x52>
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    111a <dfill+0x1a>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dfill>:
add    $0xffffffff,%edi
imul   %edx,%edi
test   %edi,%edi
js     112d <dfill+0x2d>
movslq %edx,%rax
mov    %edi,%ecx
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  %xmm0,(%rsi,%rdx,8)
add    %rax,%rdx
cmp    %rcx,%rdx
jle    1120 <dfill+0x20>
ret

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

LLVM IR (-O2):
define void @dfill(i32 %0, double %1, double* nocapture writeonly %2, i32 %3) {
%5 = add nsw i32 %0, -1
%6 = mul nsw i32 %5, %3
%7 = icmp slt i32 %6, 0
br i1 %7, label %16, label %8
8: ; preds = %4
%9 = sext i32 %3 to i64
%10 = zext i32 %6 to i64
br label %11
11: ; preds = %8, %11
%12 = phi i64 [ 0, %8 ], [ %14, %11 ]
%13 = getelementptr inbounds double, double* %2, i64 %12
store double %1, double* %13
%14 = add i64 %12, %9
%15 = icmp sgt i64 %14, %10
br i1 %15, label %16, label %11
16: ; preds = %11, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void trois(void) { printf("trois\n"); }


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

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

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

LLVM IR (-O2):
@str = [6 x i8] c"trois\00"
define void @trois() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *vect_mus_audio_system_name(int);
char *mus_audio_system_name(int system) {
  return (vect_mus_audio_system_name(system));
}


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

x86 assembly (clang, -O2):
<mus_audio_system_name>:
jmp    1030 <vect_mus_audio_system_name@plt>

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

LLVM IR (-O2):
define i8* @mus_audio_system_name(i32 %0) {
%2 = tail call i8* @vect_mus_audio_system_name(i32 %0)
ret i8* %2
}
const double large() { return 1.0e+6; }


x86 assembly (clang, -O0):
<large>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<large>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @large() {
ret double 1.000000e+06
}

LLVM IR (-O2):
define double @large() {
ret double 1.000000e+06
}
int main() {
  int c, b;
  int d = c || b;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
jne    1124 <main+0x24>
cmpl   $0x0,-0xc(%rbp)
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x10(%rbp)
xor    %eax,%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
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %0
%8 = load i32, i32* %3
%9 = icmp ne i32 %8, 0
br label %10
10: ; preds = %7, %0
%11 = phi i1 [ true, %0 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
store i32 %12, i32* %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int test_imm_78uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x78 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_78uint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x20,%rdx
and    $0x78,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_78uint64_highword_mem>:
testb  $0x78,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_78uint64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 32
%6 = and i64 %5, 120
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_78uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 515396075520
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ pm_error(char *);
void WaitForDecodedFrame(int const id) {
  pm_error("This version of Ppmtompeg cannot run parallel mode because "
           "it does not have socket capability.");
}


x86 assembly (clang, -O0):
<WaitForDecodedFrame>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <pm_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [95 x i8] c"This version of Ppmtompeg cannot run parallel mode because it does not have socket capability.\00"
define void @WaitForDecodedFrame(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @pm_error(i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [95 x i8] c"This version of Ppmtompeg cannot run parallel mode because it does not have socket capability.\00"
define void @WaitForDecodedFrame(i32 %0) {
%2 = tail call i32 @pm_error(i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str, i64 0, i64 0))
ret void
}
void __DELETE_java_util_Locale(void *me, void *client_data) {}


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

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

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

LLVM IR (-O2):
define void @__DELETE_java_util_Locale(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_help() {
  fprintf(stderr, "lcat is a tunnelling tool useful for transparently\n"
                  "tunnelling TCP connections over a SOCKS proxy, like ssh -D\n"
                  "\n"
                  "Usage: lcat [-p port] [-t] [-d] [-h] [-s sleeptime]\n"
                  "\n"
                  "You can use lcat to throttle the amount of bandwidth you\n"
                  "use.\n");
}


x86 assembly (clang, -O0):
<print_help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_help>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [227 x i8] c"lcat is a tunnelling tool useful for transparently\0Atunnelling TCP connections over a SOCKS proxy, like ssh -D\0A\0AUsage: lcat [-p port] [-t] [-d] [-h] [-s sleeptime]\0A\0AYou can use lcat to throttle the amount of bandwidth you\0Ause.\0A\00"
define void @print_help() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([227 x i8], [227 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [227 x i8] c"lcat is a tunnelling tool useful for transparently\0Atunnelling TCP connections over a SOCKS proxy, like ssh -D\0A\0AUsage: lcat [-p port] [-t] [-d] [-h] [-s sleeptime]\0A\0AYou can use lcat to throttle the amount of bandwidth you\0Ause.\0A\00"
define void @print_help() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([227 x i8], [227 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *duplica_string(char *);
int /*<<< orphan*/ free(char *);
char *malloc(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strlen(char *);
int main(void) {
  char *s_a = "Campos verdes";
  char *s;
  s = malloc(strlen(s_a));
  s = s_a;
  char *s_duplicado;
  s_duplicado = duplica_string(s_a);
  printf("%s\n", s_duplicado);
  free(s_duplicado);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9a(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <duplica_string@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
lea    0xe70(%rip),%rdi
call   1050 <printf@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xeb8(%rip),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
call   1060 <duplica_string@plt>
mov    %rax,%rbx
lea    0xeac(%rip),%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Campos verdes\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = call i8* @malloc(i32 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %2
store i8* %8, i8** %3
%9 = load i8*, i8** %2
%10 = call i8* @duplica_string(i8* %9)
store i8* %10, i8** %4
%11 = load i8*, i8** %4
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%13 = load i8*, i8** %4
%14 = call i32 @free(i8* %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Campos verdes\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = tail call i32 @strlen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i8* @duplica_string(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%4 = tail call i32 @free(i8* %2)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ GLint;
typedef int /*<<< orphan*/ GLenum;

/* Variables and functions */
int /*<<< orphan*/ __glGetColorTableParameterfv_size(int /*<<< orphan*/);
GLint __glGetColorTableParameteriv_size(GLenum pname) {
  return __glGetColorTableParameterfv_size(pname);
}


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

x86 assembly (clang, -O2):
<__glGetColorTableParameteriv_size>:
jmp    1030 <__glGetColorTableParameterfv_size@plt>

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

LLVM IR (-O2):
define i32 @__glGetColorTableParameteriv_size(i32 %0) {
%2 = tail call i32 @__glGetColorTableParameterfv_size(i32 %0)
ret i32 %2
}
void Userdef_BSC_CS5Init(void) {}


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

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

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

LLVM IR (-O2):
define void @Userdef_BSC_CS5Init() {
ret void
}
int fun(int n) {
  if (n == 0) {
    return 2;
  }
  if (n == 1) {
    return 1;
  }
  if (n > 1) {
    return fun(n - 1) + fun(n - 2);
  }
}


x86 assembly (clang, -O0):
<fun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <fun+0x21>
movl   $0x2,-0x4(%rbp)
jmp    1174 <fun+0x64>
cmpl   $0x1,-0x8(%rbp)
jne    1147 <fun+0x37>
movl   $0x1,-0x4(%rbp)
jmp    1174 <fun+0x64>
cmpl   $0x1,-0x8(%rbp)
jle    1174 <fun+0x64>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fun@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fun@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
mov    $0x2,%eax
test   %ebx,%ebx
je     1144 <fun+0x34>
cmp    $0x1,%ebx
je     113f <fun+0x2f>
jle    1144 <fun+0x34>
lea    -0x1(%rbx),%edi
call   1030 <fun@plt>
add    %eax,%ebp
add    $0xfffffffe,%ebx
jmp    1120 <fun+0x10>
mov    $0x1,%eax
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fun(i32 %0) {
br label %2
2: ; preds = %7, %1
%3 = phi i32 [ 0, %1 ], [ %11, %7 ]
%4 = phi i32 [ %0, %1 ], [ %10, %7 ]
switch i32 %4, label %5 [
i32 0, label %12
i32 1, label %13
]
5: ; preds = %2
%6 = icmp sgt i32 %4, 1
br i1 %6, label %7, label %12
7: ; preds = %5
%8 = add nsw i32 %4, -1
%9 = tail call i32 @fun(i32 %8)
%10 = add nsw i32 %4, -2
%11 = add nsw i32 %9, %3
br label %2
12: ; preds = %5, %2
br label %13
13: ; preds = %2, %12
%14 = phi i32 [ 2, %12 ], [ 1, %2 ]
%15 = add nsw i32 %14, %3
ret i32 %15
}
__attribute((always_)) void *g() {
  static void *p = &&a;
a:
  return p;
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <g+0x9>
mov    0x2f10(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
lea    -0x7(%rip),%rax
ret

LLVM IR (-O0):
@g.p = internal global i8* blockaddress(@g, %1)
define i8* @g() {
br label %1
1: ; preds = %0, %3
%2 = load i8*, i8** @g.p
ret i8* %2
3: ; No predecessors!
indirectbr i8* undef, [label %1]
}

LLVM IR (-O2):
define i8* @g() {
br label %1
1: ; preds = %0
ret i8* blockaddress(@g, %1)
}
/* Variables and functions */
int tracepoint_probe_unregister(char *, void *);
__attribute__((always_)) int unregister_trace_mm_page_pcpu_drain(
    void (*probe)(struct page *page, int order, int migratetype)) {
  return tracepoint_probe_unregister("mm_page_pcpu_drain", (void *)probe);
}


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

x86 assembly (clang, -O2):
<unregister_trace_mm_page_pcpu_drain>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <tracepoint_probe_unregister@plt>

LLVM IR (-O0):
%struct.page = type opaque
@.str = [19 x i8] c"mm_page_pcpu_drain\00"
define i32 @unregister_trace_mm_page_pcpu_drain(void (%struct.page*, i32, i32)* %0) {
%2 = alloca void (%struct.page*, i32, i32)*
store void (%struct.page*, i32, i32)* %0, void (%struct.page*, i32, i32)** %2
%3 = load void (%struct.page*, i32, i32)*, void (%struct.page*, i32, i32)** %2
%4 = bitcast void (%struct.page*, i32, i32)* %3 to i8*
%5 = call i32 @tracepoint_probe_unregister(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.page = type opaque
@.str = [19 x i8] c"mm_page_pcpu_drain\00"
define i32 @unregister_trace_mm_page_pcpu_drain(void (%struct.page*, i32, i32)* %0) {
%2 = bitcast void (%struct.page*, i32, i32)* %0 to i8*
%3 = tail call i32 @tracepoint_probe_unregister(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ afp_main_loop(int);
void *afp_main_quick_startup_thread(void *other) {
  afp_main_loop(-1);
  return NULL;
}


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

x86 assembly (clang, -O2):
<afp_main_quick_startup_thread>:
push   %rax
mov    $0xffffffff,%edi
call   1030 <afp_main_loop@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @afp_main_quick_startup_thread(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @afp_main_loop(i32 -1)
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @afp_main_quick_startup_thread(i8* nocapture readnone %0) {
%2 = tail call i32 @afp_main_loop(i32 -1)
ret i8* null
}
int first_char(char *str) { return str[0]; }


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

x86 assembly (clang, -O2):
<first_char>:
movsbl (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @first_char(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
ret i32 %3
}
/* Type definitions */
struct MYSOFA_EASY {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mysofa_cache_release(struct MYSOFA_EASY *);
void mysofa_close_cached(struct MYSOFA_EASY *easy) {
  mysofa_cache_release(easy);
}


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

x86 assembly (clang, -O2):
<mysofa_close_cached>:
jmp    1030 <mysofa_cache_release@plt>

LLVM IR (-O0):
%struct.MYSOFA_EASY = type { i32 }
define void @mysofa_close_cached(%struct.MYSOFA_EASY* %0) {
%2 = alloca %struct.MYSOFA_EASY*
store %struct.MYSOFA_EASY* %0, %struct.MYSOFA_EASY** %2
%3 = load %struct.MYSOFA_EASY*, %struct.MYSOFA_EASY** %2
%4 = call i32 @mysofa_cache_release(%struct.MYSOFA_EASY* %3)
ret void
}

LLVM IR (-O2):
%struct.MYSOFA_EASY = type { i32 }
define void @mysofa_close_cached(%struct.MYSOFA_EASY* %0) {
%2 = tail call i32 @mysofa_cache_release(%struct.MYSOFA_EASY* %0)
ret void
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ xmlescape_real(char const *, char *, int *, int);
char *xmlescape(const char *str, int attribute) {
  int len;
  char *out;
  xmlescape_real(str, NULL, &len, attribute);
  out = malloc(len + 1);
  xmlescape_real(str, out, NULL, attribute);
  return out;
}


x86 assembly (clang, -O0):
<xmlescape>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%ecx
xor    %eax,%eax
mov    %eax,%esi
lea    -0x10(%rbp),%rdx
call   1030 <xmlescape_real@plt>
mov    -0x10(%rbp),%edi
add    $0x1,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0xc(%rbp),%ecx
xor    %eax,%eax
mov    %eax,%edx
call   1030 <xmlescape_real@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlescape>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %esi,%r14d
mov    %rdi,%rbx
lea    0xc(%rsp),%rdx
xor    %esi,%esi
mov    %r14d,%ecx
call   1030 <xmlescape_real@plt>
mov    0xc(%rsp),%edi
add    $0x1,%edi
call   1040 <malloc@plt>
mov    %rax,%rbp
mov    %rbx,%rdi
mov    %rax,%rsi
xor    %edx,%edx
mov    %r14d,%ecx
call   1030 <xmlescape_real@plt>
mov    %rbp,%rax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @xmlescape(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = load i8*, i8** %3
%8 = load i32, i32* %4
%9 = call i32 @xmlescape_real(i8* %7, i8* null, i32* %5, i32 %8)
%10 = load i32, i32* %5
%11 = add nsw i32 %10, 1
%12 = call i8* @malloc(i32 %11)
store i8* %12, i8** %6
%13 = load i8*, i8** %3
%14 = load i8*, i8** %6
%15 = load i32, i32* %4
%16 = call i32 @xmlescape_real(i8* %13, i8* %14, i32* null, i32 %15)
%17 = load i8*, i8** %6
ret i8* %17
}

LLVM IR (-O2):
define i8* @xmlescape(i8* %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @xmlescape_real(i8* %0, i8* null, i32* %3, i32 %1)
%6 = load i32, i32* %3
%7 = add nsw i32 %6, 1
%8 = call i8* @malloc(i32 %7)
%9 = call i32 @xmlescape_real(i8* %0, i8* %8, i32* null, i32 %1)
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ issi_init();
int /*<<< orphan*/ keyscanner_init();
void setup(void) {
  keyscanner_init();
  issi_init();
}


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

x86 assembly (clang, -O2):
<setup>:
push   %rax
xor    %eax,%eax
call   1030 <keyscanner_init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <issi_init@plt>

LLVM IR (-O0):
define void @setup() {
%1 = call i32 (...) @keyscanner_init()
%2 = call i32 (...) @issi_init()
ret void
}

LLVM IR (-O2):
define void @setup() {
%1 = tail call i32 (...) @keyscanner_init()
%2 = tail call i32 (...) @issi_init()
ret void
}
float vec2_cross(const float a[2], const float b[2]) {
  return a[0] * b[1] - a[1] * b[0];
}


x86 assembly (clang, -O0):
<vec2_cross>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulss  (%rax),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec2_cross>:
movss  (%rsi),%xmm1
mulss  0x4(%rdi),%xmm1
movss  (%rdi),%xmm0
mulss  0x4(%rsi),%xmm0
subss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @vec2_cross(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = getelementptr inbounds float, float* %5, i64 0
%7 = load float, float* %6
%8 = load float*, float** %4
%9 = getelementptr inbounds float, float* %8, i64 1
%10 = load float, float* %9
%11 = load float*, float** %3
%12 = getelementptr inbounds float, float* %11, i64 1
%13 = load float, float* %12
%14 = load float*, float** %4
%15 = getelementptr inbounds float, float* %14, i64 0
%16 = load float, float* %15
%17 = fmul float %13, %16
%18 = fneg float %17
%19 = call float @llvm.fmuladd.f32(float %7, float %10, float %18)
ret float %19
}

LLVM IR (-O2):
define float @vec2_cross(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = getelementptr inbounds float, float* %1, i64 1
%5 = load float, float* %4
%6 = getelementptr inbounds float, float* %0, i64 1
%7 = load float, float* %6
%8 = load float, float* %1
%9 = fneg float %7
%10 = fmul float %8, %9
%11 = tail call float @llvm.fmuladd.f32(float %3, float %5, float %10)
ret float %11
}
/* Variables and functions */
int /*<<< orphan*/ armprintf(char *);
int /*<<< orphan*/ events_do();
scalar_t__ events_has_event();
int /*<<< orphan*/ events_init();
int main() {
  events_init();
  armprintf("critterprompt> ");
  while (1) {
    if (events_has_event())
      events_do();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <events_init@plt>
lea    0xea3(%rip),%rdi
call   1030 <armprintf@plt>
mov    $0x0,%al
call   1050 <events_has_event@plt>
cmp    $0x0,%rax
je     117a <main+0x3a>
mov    $0x0,%al
call   1060 <events_do@plt>
jmp    1162 <main+0x22>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <events_init@plt>
lea    0xeb1(%rip),%rdi
call   1030 <armprintf@plt>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1050 <events_has_event@plt>
test   %rax,%rax
je     1160 <main+0x20>
xor    %eax,%eax
call   1060 <events_do@plt>
jmp    1160 <main+0x20>

LLVM IR (-O0):
@.str = [16 x i8] c"critterprompt> \00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @events_init()
%3 = call i32 @armprintf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %0, %9
%5 = call i64 (...) @events_has_event()
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = call i32 (...) @events_do()
br label %9
9: ; preds = %7, %4
br label %4
}

LLVM IR (-O2):
@.str = [16 x i8] c"critterprompt> \00"
define i32 @main() {
%1 = tail call i32 (...) @events_init()
%2 = tail call i32 @armprintf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %3
3: ; preds = %8, %0
%4 = tail call i64 (...) @events_has_event()
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 (...) @events_do()
br label %8
8: ; preds = %6, %3
br label %3
}
void genc_f_d() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define i32 @db5500_prcmu_get_ddr_opp() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ BSP_DisableIntIrqSave();
int SpinLock(int);
int BSP_GetSpinlockIrqSaved(int id) {
  BSP_DisableIntIrqSave();
  return SpinLock(id);
}


x86 assembly (clang, -O0):
<BSP_GetSpinlockIrqSaved>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <BSP_DisableIntIrqSave@plt>
mov    -0x4(%rbp),%edi
call   1040 <SpinLock@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BSP_GetSpinlockIrqSaved>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <BSP_DisableIntIrqSave@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <SpinLock@plt>

LLVM IR (-O0):
define i32 @BSP_GetSpinlockIrqSaved(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @BSP_DisableIntIrqSave()
%4 = load i32, i32* %2
%5 = call i32 @SpinLock(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @BSP_GetSpinlockIrqSaved(i32 %0) {
%2 = tail call i32 (...) @BSP_DisableIntIrqSave()
%3 = tail call i32 @SpinLock(i32 %0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ putChar(int);
void linesUp(unsigned int lines) {
  unsigned int i;
  for (i = 0; i < lines; ++i) {
    putChar(0x1b);
    putChar(0x5b);
    putChar(0x41);
  }
}


x86 assembly (clang, -O0):
<linesUp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    115a <linesUp+0x4a>
mov    $0x1b,%edi
call   1030 <putChar@plt>
mov    $0x5b,%edi
call   1030 <putChar@plt>
mov    $0x41,%edi
call   1030 <putChar@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <linesUp+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<linesUp>:
push   %rbx
test   %edi,%edi
je     1143 <linesUp+0x33>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x1b,%edi
call   1030 <putChar@plt>
mov    $0x5b,%edi
call   1030 <putChar@plt>
mov    $0x41,%edi
call   1030 <putChar@plt>
add    $0xffffffff,%ebx
jne    1120 <linesUp+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @linesUp(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ 0, %1 ]
%5 = tail call i32 @putChar(i32 27)
%6 = tail call i32 @putChar(i32 91)
%7 = tail call i32 @putChar(i32 65)
%8 = add nuw i32 %4, 1
%9 = icmp eq i32 %8, %0
br i1 %9, label %10, label %3
10: ; preds = %3, %1
ret void
}
long SPUshutdown(void) { return 0; }


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

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

LLVM IR (-O0):
define i64 @SPUshutdown() {
ret i64 0
}

LLVM IR (-O2):
define i64 @SPUshutdown() {
ret i64 0
}
void AKSC_SetLayout(void) {}


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

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

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

LLVM IR (-O2):
define void @AKSC_SetLayout() {
ret void
}
int f0(int i) {
  if (i == 0)
    return 0;
  return i / 10;
}


x86 assembly (clang, -O0):
<f0>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111d <f0+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    112b <f0+0x2b>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f0>:
movslq %edi,%rax
imul   $0x66666667,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @f0(i32 %0) {
%2 = sdiv i32 %0, 10
ret i32 %2
}
/* Variables and functions */
float fastexp(float);
float fastcosh(float p) { return 0.5f * (fastexp(p) + fastexp(-p)); }


x86 assembly (clang, -O0):
<fastcosh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <fastexp@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
call   1030 <fastexp@plt>
movss  -0x8(%rbp),%xmm1
addss  %xmm0,%xmm1
movss  0xeac(%rip),%xmm0
mulss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fastcosh>:
sub    $0x28,%rsp
movaps %xmm0,0x10(%rsp)
call   1030 <fastexp@plt>
movss  %xmm0,0xc(%rsp)
movaps 0x10(%rsp),%xmm0
xorps  0xed0(%rip),%xmm0
call   1030 <fastexp@plt>
addss  0xc(%rsp),%xmm0
mulss  0xecd(%rip),%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define float @fastcosh(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @fastexp(float %3)
%5 = load float, float* %2
%6 = fneg float %5
%7 = call float @fastexp(float %6)
%8 = fadd float %4, %7
%9 = fmul float 5.000000e-01, %8
ret float %9
}

LLVM IR (-O2):
define float @fastcosh(float %0) {
%2 = tail call float @fastexp(float %0)
%3 = fneg float %0
%4 = tail call float @fastexp(float %3)
%5 = fadd float %2, %4
%6 = fmul float %5, 5.000000e-01
ret float %6
}