xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(stderr, "%s\n%s\n",
                "usage: sed script [-Ealn] [-i extension] [file ...]",
                "       sed [-Ealn] [-i extension] [-e script] ... [-f "
                "script_file] ... [file ...]");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
lea    0xecc(%rip),%rdx
lea    0xef9(%rip),%rcx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
lea    0xecf(%rip),%rdx
lea    0xefc(%rip),%rcx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [7 x i8] c"%s\0A%s\0A\00"
@.str.1 = [52 x i8] c"usage: sed script [-Ealn] [-i extension] [file ...]\00"
@.str.2 = [82 x i8] c" sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [7 x i8] c"%s\0A%s\0A\00"
@.str.1 = [52 x i8] c"usage: sed script [-Ealn] [-i extension] [file ...]\00"
@.str.2 = [82 x i8] c" sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
void main() {
  int32_t a;
  a = 1, 2;
}


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

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

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

LLVM IR (-O2):
define void @main() {
ret void
}
/* Variables and functions */
char *_DtHelpGetNxtToken(char *, char **);
char *_DtHelpCeGetNxtToken(char *str, char **retToken) {
  return (_DtHelpGetNxtToken(str, retToken));
}


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

x86 assembly (clang, -O2):
<_DtHelpCeGetNxtToken>:
jmp    1030 <_DtHelpGetNxtToken@plt>

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

LLVM IR (-O2):
define i8* @_DtHelpCeGetNxtToken(i8* %0, i8** %1) {
%3 = tail call i8* @_DtHelpGetNxtToken(i8* %0, i8** %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void foobar_init(void) {
  printf("Start: Good Morning, Foobar!\n");
  return;
}


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

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

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

LLVM IR (-O2):
@str = [29 x i8] c"Start: Good Morning, Foobar!\00"
define void @foobar_init() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ find_size(int);
int main(int argc, char **argv) {
  int i;
  for (i = 1; i <= 16; i++) {
    find_size(i);
  }
  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)
movl   $0x1,-0x14(%rbp)
cmpl   $0x10,-0x14(%rbp)
jg     114d <main+0x3d>
mov    -0x14(%rbp),%edi
call   1030 <find_size@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <find_size@plt>
mov    $0x2,%edi
call   1030 <find_size@plt>
mov    $0x3,%edi
call   1030 <find_size@plt>
mov    $0x4,%edi
call   1030 <find_size@plt>
mov    $0x5,%edi
call   1030 <find_size@plt>
mov    $0x6,%edi
call   1030 <find_size@plt>
mov    $0x7,%edi
call   1030 <find_size@plt>
mov    $0x8,%edi
call   1030 <find_size@plt>
mov    $0x9,%edi
call   1030 <find_size@plt>
mov    $0xa,%edi
call   1030 <find_size@plt>
mov    $0xb,%edi
call   1030 <find_size@plt>
mov    $0xc,%edi
call   1030 <find_size@plt>
mov    $0xd,%edi
call   1030 <find_size@plt>
mov    $0xe,%edi
call   1030 <find_size@plt>
mov    $0xf,%edi
call   1030 <find_size@plt>
mov    $0x10,%edi
call   1030 <find_size@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @find_size(i32 1)
%4 = tail call i32 @find_size(i32 2)
%5 = tail call i32 @find_size(i32 3)
%6 = tail call i32 @find_size(i32 4)
%7 = tail call i32 @find_size(i32 5)
%8 = tail call i32 @find_size(i32 6)
%9 = tail call i32 @find_size(i32 7)
%10 = tail call i32 @find_size(i32 8)
%11 = tail call i32 @find_size(i32 9)
%12 = tail call i32 @find_size(i32 10)
%13 = tail call i32 @find_size(i32 11)
%14 = tail call i32 @find_size(i32 12)
%15 = tail call i32 @find_size(i32 13)
%16 = tail call i32 @find_size(i32 14)
%17 = tail call i32 @find_size(i32 15)
%18 = tail call i32 @find_size(i32 16)
ret i32 0
}
/* Variables and functions */
int stb_bitcount(unsigned int a) {
  a = (a & 0x55555555) + ((a >> 1) & 0x55555555);
  a = (a & 0x33333333) + ((a >> 2) & 0x33333333);
  a = (a + (a >> 4)) & 0x0f0f0f0f;
  a = (a + (a >> 8));
  a = (a + (a >> 16));
  return a & 0xff;
}


x86 assembly (clang, -O0):
<stb_bitcount>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x55555555,%eax
mov    -0x4(%rbp),%ecx
shr    $0x1,%ecx
and    $0x55555555,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x33333333,%eax
mov    -0x4(%rbp),%ecx
shr    $0x2,%ecx
and    $0x33333333,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
shr    $0x4,%ecx
add    %ecx,%eax
and    $0xf0f0f0f,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
shr    $0x8,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
shr    $0x10,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stb_bitcount>:
mov    %edi,%eax
and    $0x55555555,%eax
shr    %edi
and    $0x55555555,%edi
add    %eax,%edi
mov    %edi,%eax
and    $0x33333333,%eax
shr    $0x2,%edi
and    $0x33333333,%edi
add    %eax,%edi
mov    %edi,%eax
shr    $0x4,%eax
add    %edi,%eax
and    $0xf0f0f0f,%eax
mov    %eax,%ecx
shr    $0x8,%ecx
add    %eax,%ecx
mov    %ecx,%eax
shr    $0x10,%eax
add    %ecx,%eax
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @stb_bitcount(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 1431655765
%5 = load i32, i32* %2
%6 = lshr i32 %5, 1
%7 = and i32 %6, 1431655765
%8 = add i32 %4, %7
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = and i32 %9, 858993459
%11 = load i32, i32* %2
%12 = lshr i32 %11, 2
%13 = and i32 %12, 858993459
%14 = add i32 %10, %13
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = load i32, i32* %2
%17 = lshr i32 %16, 4
%18 = add i32 %15, %17
%19 = and i32 %18, 252645135
store i32 %19, i32* %2
%20 = load i32, i32* %2
%21 = load i32, i32* %2
%22 = lshr i32 %21, 8
%23 = add i32 %20, %22
store i32 %23, i32* %2
%24 = load i32, i32* %2
%25 = load i32, i32* %2
%26 = lshr i32 %25, 16
%27 = add i32 %24, %26
store i32 %27, i32* %2
%28 = load i32, i32* %2
%29 = and i32 %28, 255
ret i32 %29
}

LLVM IR (-O2):
define i32 @stb_bitcount(i32 %0) {
%2 = and i32 %0, 1431655765
%3 = lshr i32 %0, 1
%4 = and i32 %3, 1431655765
%5 = add nuw i32 %4, %2
%6 = and i32 %5, 858993459
%7 = lshr i32 %5, 2
%8 = and i32 %7, 858993459
%9 = add nuw nsw i32 %8, %6
%10 = lshr i32 %9, 4
%11 = add nuw nsw i32 %10, %9
%12 = and i32 %11, 252645135
%13 = lshr i32 %12, 8
%14 = add nuw nsw i32 %13, %12
%15 = lshr i32 %14, 16
%16 = add nuw nsw i32 %15, %14
%17 = and i32 %16, 63
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, unsigned short);
int /*<<< orphan*/ stdout;
void cutils_cout_unsigned_short_print(unsigned short number) {
  fprintf(stdout, "%hu\n", number);
}


x86 assembly (clang, -O0):
<cutils_cout_unsigned_short_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
lea    0xed1(%rip),%rsi
movzwl -0x2(%rbp),%edx
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cutils_cout_unsigned_short_print>:
mov    %edi,%edx
mov    0x2ec7(%rip),%rax
mov    (%rax),%edi
lea    0xede(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [5 x i8] c"%hu\0A\00"
define void @cutils_cout_unsigned_short_print(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i32, i32* @stdout
%4 = load i16, i16* %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i16 zeroext %4)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [5 x i8] c"%hu\0A\00"
define void @cutils_cout_unsigned_short_print(i16 zeroext %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i16 zeroext %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getmaxyx(int /*<<< orphan*/, int, int);
int /*<<< orphan*/ mvprintw(int, int, char *);
int /*<<< orphan*/ stdscr;
void fill(char ch, int row) {
  char c[2] = {ch, '\0'};
  int y, x;
  (void)(y);
  getmaxyx(stdscr, y, x);
  for (int i = 0; i < x; i++) {
    mvprintw(row, i, c);
  }
}


x86 assembly (clang, -O0):
<fill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0xa(%rbp)
movb   $0x0,-0x9(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <getmaxyx@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    117f <fill+0x5f>
mov    -0x8(%rbp),%edi
mov    -0x18(%rbp),%esi
lea    -0xa(%rbp),%rdx
call   1040 <mvprintw@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1156 <fill+0x36>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fill>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <getmaxyx@plt>

LLVM IR (-O0):
@stdscr = global i32 0
define void @fill(i8 signext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
%5 = alloca [2 x i8]
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
%9 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%10 = load i8, i8* %3
store i8 %10, i8* %9
%11 = getelementptr inbounds i8, i8* %9, i64 1
store i8 0, i8* %11
%12 = load i32, i32* %6
%13 = load i32, i32* @stdscr
%14 = load i32, i32* %6
%15 = load i32, i32* %7
%16 = call i32 @getmaxyx(i32 %13, i32 %14, i32 %15)
store i32 0, i32* %8
br label %17
17: ; preds = %26, %2
%18 = load i32, i32* %8
%19 = load i32, i32* %7
%20 = icmp slt i32 %18, %19
br i1 %20, label %21, label %29
21: ; preds = %17
%22 = load i32, i32* %4
%23 = load i32, i32* %8
%24 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%25 = call i32 @mvprintw(i32 %22, i32 %23, i8* %24)
br label %26
26: ; preds = %21
%27 = load i32, i32* %8
%28 = add nsw i32 %27, 1
store i32 %28, i32* %8
br label %17
29: ; preds = %17
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
define void @fill(i8 signext %0, i32 %1) {
%3 = load i32, i32* @stdscr
%4 = tail call i32 @getmaxyx(i32 %3, i32 undef, i32 undef)
ret void
}
unsigned int call_pick(struct message_header *header, void *data) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.message_header = type opaque
define i32 @call_pick(%struct.message_header* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
int raptor_unicode_is_ideographic(long c) {
  return ((c >= 0x4E00 && c <= 0x9FA5) || (c == 0x3007) ||
          (c >= 0x3021 && c <= 0x3029));
}


x86 assembly (clang, -O0):
<raptor_unicode_is_ideographic>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x4e00,-0x8(%rbp)
jl     1129 <raptor_unicode_is_ideographic+0x29>
mov    $0x1,%al
cmpq   $0x9fa5,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jle    1163 <raptor_unicode_is_ideographic+0x63>
mov    $0x1,%al
cmpq   $0x3007,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1163 <raptor_unicode_is_ideographic+0x63>
xor    %eax,%eax
cmpq   $0x3021,-0x8(%rbp)
mov    %al,-0xa(%rbp)
jl     115d <raptor_unicode_is_ideographic+0x5d>
cmpq   $0x3029,-0x8(%rbp)
setle  %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<raptor_unicode_is_ideographic>:
lea    -0x4e00(%rdi),%rax
cmp    $0x51a6,%rax
setb   %al
cmp    $0x3007,%rdi
sete   %cl
or     %al,%cl
add    $0xffffffffffffcfdf,%rdi
cmp    $0x9,%rdi
setb   %al
or     %cl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @raptor_unicode_is_ideographic(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp sge i64 %3, 19968
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i64, i64* %2
%7 = icmp sle i64 %6, 40869
br i1 %7, label %19, label %8
8: ; preds = %5, %1
%9 = load i64, i64* %2
%10 = icmp eq i64 %9, 12295
br i1 %10, label %19, label %11
11: ; preds = %8
%12 = load i64, i64* %2
%13 = icmp sge i64 %12, 12321
br i1 %13, label %14, label %17
14: ; preds = %11
%15 = load i64, i64* %2
%16 = icmp sle i64 %15, 12329
br label %17
17: ; preds = %14, %11
%18 = phi i1 [ false, %11 ], [ %16, %14 ]
br label %19
19: ; preds = %17, %8, %5
%20 = phi i1 [ true, %8 ], [ true, %5 ], [ %18, %17 ]
%21 = zext i1 %20 to i32
ret i32 %21
}

LLVM IR (-O2):
define i32 @raptor_unicode_is_ideographic(i64 %0) {
%2 = add i64 %0, -19968
%3 = icmp ult i64 %2, 20902
%4 = icmp eq i64 %0, 12295
%5 = or i1 %4, %3
%6 = add i64 %0, -12321
%7 = icmp ult i64 %6, 9
%8 = or i1 %7, %5
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void test_success(int result, const char *testname) {
  if (result != 0) {
    printf("Test %s SUCCEEDED\n", testname);
  } else {
    printf("Test %s FAILED\n", testname);
  }
}


x86 assembly (clang, -O0):
<test_success>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     113e <test_success+0x2e>
mov    -0x10(%rbp),%rsi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
jmp    114e <test_success+0x3e>
mov    -0x10(%rbp),%rsi
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_success>:
test   %edi,%edi
lea    0xefa(%rip),%rax
lea    0xee0(%rip),%rdi
cmove  %rax,%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"Test %s SUCCEEDED\0A\00"
@.str.1 = [16 x i8] c"Test %s FAILED\0A\00"
define void @test_success(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %8)
br label %13
10: ; preds = %2
%11 = load i8*, i8** %4
%12 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* %11)
br label %13
13: ; preds = %10, %7
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"Test %s SUCCEEDED\0A\00"
@.str.1 = [16 x i8] c"Test %s FAILED\0A\00"
define void @test_success(i32 %0, i8* %1) {
%3 = icmp eq i32 %0, 0
%4 = select i1 %3, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0)
%5 = tail call i32 @printf(i8* %4, i8* %1)
ret void
}
unsigned char encode_sound_speed(float ss) {
  return (unsigned char)((ss - 1425.0) * 2);
}


x86 assembly (clang, -O0):
<encode_sound_speed>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee6(%rip),%xmm1
addsd  %xmm1,%xmm0
addsd  %xmm0,%xmm0
cvttsd2si %xmm0,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<encode_sound_speed>:
cvtss2sd %xmm0,%xmm0
addsd  0xef4(%rip),%xmm0
addsd  %xmm0,%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define zeroext i8 @encode_sound_speed(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fsub double %4, 1.425000e+03
%6 = fmul double %5, 2.000000e+00
%7 = fptoui double %6 to i8
ret i8 %7
}

LLVM IR (-O2):
define zeroext i8 @encode_sound_speed(float %0) {
%2 = fpext float %0 to double
%3 = fadd double %2, -1.425000e+03
%4 = fmul double %3, 2.000000e+00
%5 = fptoui double %4 to i8
ret i8 %5
}
void INI_Abs2Conc_ffnc_ctx() { ; }


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

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

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

LLVM IR (-O2):
define void @INI_Abs2Conc_ffnc_ctx() {
ret void
}
char *my_strcpy_s(const char *src, unsigned int dest_len, char *dst) {
  char *ptr;
  ptr = dst;
  unsigned int num_written = 0;
  while ((*dst++ = *src++) && (num_written++ < dest_len))
    ;
  return ptr;
}


x86 assembly (clang, -O0):
<my_strcpy_s>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %al,(%rcx)
movsbl %al,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x25(%rbp)
je     1165 <my_strcpy_s+0x65>
mov    -0x24(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x24(%rbp)
cmp    -0xc(%rbp),%eax
setb   %al
mov    %al,-0x25(%rbp)
mov    -0x25(%rbp),%al
test   $0x1,%al
jne    1175 <my_strcpy_s+0x75>
jmp    117a <my_strcpy_s+0x7a>
jmp    111e <my_strcpy_s+0x1e>
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strcpy_s>:
mov    %rdx,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rdi,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
test   %dl,%dl
je     1126 <my_strcpy_s+0x26>
lea    0x1(%rcx),%rdx
cmp    %esi,%ecx
mov    %rdx,%rcx
jb     1110 <my_strcpy_s+0x10>
ret

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

LLVM IR (-O2):
define i8* @my_strcpy_s(i8* nocapture %0, i32 %1, i8* returned writeonly %2) {
br label %4
4: ; preds = %4, %3
%5 = phi i8* [ %2, %3 ], [ %10, %4 ]
%6 = phi i8* [ %0, %3 ], [ %11, %4 ]
%7 = phi i32 [ 0, %3 ], [ %12, %4 ]
%8 = load i8, i8* %6
store i8 %8, i8* %5
%9 = icmp ne i8 %8, 0
%10 = getelementptr inbounds i8, i8* %5, i64 1
%11 = getelementptr inbounds i8, i8* %6, i64 1
%12 = add i32 %7, 1
%13 = icmp ult i32 %7, %1
%14 = select i1 %9, i1 %13, i1 false
br i1 %14, label %4, label %15
15: ; preds = %4
ret i8* %2
}
/* Variables and functions */
float fastsinfull(float);
float fastcosfull(float x) {
  static const float halfpi = 1.5707963267948966f;
  return fastsinfull(x + halfpi);
}


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

x86 assembly (clang, -O2):
<fastcosfull>:
addss  0xee8(%rip),%xmm0
jmp    1030 <fastsinfull@plt>

LLVM IR (-O0):
@fastcosfull.halfpi = internal constant float 0x3FF921FB60000000
define float @fastcosfull(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fadd float %3, 0x3FF921FB60000000
%5 = call float @fastsinfull(float %4)
ret float %5
}

LLVM IR (-O2):
define float @fastcosfull(float %0) {
%2 = fadd float %0, 0x3FF921FB60000000
%3 = tail call float @fastsinfull(float %2)
ret float %3
}
int bl_u_pocpx(int x, int m) {
  return (x / (m / 16)) * 16 * m + (x - ((x / (m / 16)) * (m / 16))) * 16;
}


x86 assembly (clang, -O0):
<bl_u_pocpx>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
cltd
idiv   %ecx
shl    $0x4,%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x10,%esi
cltd
idiv   %esi
mov    %eax,%esi
mov    -0x14(%rbp),%eax
cltd
idiv   %esi
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x10,%esi
cltd
idiv   %esi
mov    -0x10(%rbp),%edx
mov    %eax,%esi
mov    -0xc(%rbp),%eax
imul   %esi,%edx
sub    %edx,%ecx
shl    $0x4,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bl_u_pocpx>:
mov    %edi,%eax
lea    0xf(%rsi),%ecx
test   %esi,%esi
cmovns %esi,%ecx
sar    $0x4,%ecx
cltd
idiv   %ecx
imul   %esi,%eax
add    %edx,%eax
shl    $0x4,%eax
ret

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

LLVM IR (-O2):
define i32 @bl_u_pocpx(i32 %0, i32 %1) {
%3 = sdiv i32 %1, 16
%4 = sdiv i32 %0, %3
%5 = mul i32 %4, %1
%6 = mul nsw i32 %4, %3
%7 = srem i32 %0, %3
%8 = add i32 %7, %5
%9 = shl i32 %8, 4
ret i32 %9
}
/* Variables and functions */
float RAND_MAX;
scalar_t__ rand();
float randomFloat(float a, float b) {
  return a + (((float)rand()) / RAND_MAX) * (b - a);
}


x86 assembly (clang, -O0):
<randomFloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
movss  -0xc(%rbp),%xmm1
cvtsi2ss %rax,%xmm0
mov    0x2ea4(%rip),%rax
divss  (%rax),%xmm0
movss  -0x8(%rbp),%xmm2
subss  -0x4(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randomFloat>:
push   %rax
movss  %xmm1,0x4(%rsp)
movss  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
xorps  %xmm1,%xmm1
cvtsi2ss %rax,%xmm1
mov    0x2eb6(%rip),%rax
divss  (%rax),%xmm1
movss  0x4(%rsp),%xmm0
movss  (%rsp),%xmm2
subss  %xmm2,%xmm0
mulss  %xmm1,%xmm0
addss  %xmm2,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global float 0.000000e+00
define float @randomFloat(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 = call i64 (...) @rand()
%7 = sitofp i64 %6 to float
%8 = load float, float* @RAND_MAX
%9 = fdiv float %7, %8
%10 = load float, float* %4
%11 = load float, float* %3
%12 = fsub float %10, %11
%13 = call float @llvm.fmuladd.f32(float %9, float %12, float %5)
ret float %13
}

LLVM IR (-O2):
@RAND_MAX = global float 0.000000e+00
define float @randomFloat(float %0, float %1) {
%3 = tail call i64 (...) @rand()
%4 = sitofp i64 %3 to float
%5 = load float, float* @RAND_MAX
%6 = fdiv float %4, %5
%7 = fsub float %1, %0
%8 = tail call float @llvm.fmuladd.f32(float %6, float %7, float %0)
ret float %8
}
/* Variables and functions */
int /*<<< orphan*/ zcoroutine_self();
int /*<<< orphan*/ zcoroutine_yield_my(int /*<<< orphan*/);
void zcoroutine_yield() { zcoroutine_yield_my(zcoroutine_self()); }


x86 assembly (clang, -O0):
<zcoroutine_yield>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <zcoroutine_self@plt>
mov    %eax,%edi
call   1030 <zcoroutine_yield_my@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<zcoroutine_yield>:
push   %rax
xor    %eax,%eax
call   1040 <zcoroutine_self@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <zcoroutine_yield_my@plt>

LLVM IR (-O0):
define void @zcoroutine_yield() {
%1 = call i32 (...) @zcoroutine_self()
%2 = call i32 @zcoroutine_yield_my(i32 %1)
ret void
}

LLVM IR (-O2):
define void @zcoroutine_yield() {
%1 = tail call i32 (...) @zcoroutine_self()
%2 = tail call i32 @zcoroutine_yield_my(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ show_dec_locator_events(char const *, int, int);
int test_dec_locator_events_p(const char *the_title) {
  show_dec_locator_events(the_title, 1, (1));
  return 1;
}


x86 assembly (clang, -O0):
<test_dec_locator_events_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <show_dec_locator_events@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_dec_locator_events_p>:
push   %rax
mov    $0x1,%esi
mov    $0x1,%edx
call   1030 <show_dec_locator_events@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @test_dec_locator_events_p(i8* %0) {
%2 = tail call i32 @show_dec_locator_events(i8* %0, i32 1, i32 1)
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ eeprom_read_byte(int /*<<< orphan*/ *);
uint8_t eeconfig_read_backlight(void) { return eeprom_read_byte((uint8_t *)6); }


x86 assembly (clang, -O0):
<eeconfig_read_backlight>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6,%edi
call   1030 <eeprom_read_byte@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<eeconfig_read_backlight>:
mov    $0x6,%edi
jmp    1030 <eeprom_read_byte@plt>

LLVM IR (-O0):
define i32 @eeconfig_read_backlight() {
%1 = call i32 @eeprom_read_byte(i32* inttoptr (i64 6 to i32*))
ret i32 %1
}

LLVM IR (-O2):
define i32 @eeconfig_read_backlight() {
%1 = tail call i32 @eeprom_read_byte(i32* inttoptr (i64 6 to i32*))
ret i32 %1
}
int func() {
  static int xfunc = 5;
  return xfunc;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f16(%rip),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@func.xfunc = internal global i32 5
define i32 @func() {
%1 = load i32, i32* @func.xfunc
ret i32 %1
}

LLVM IR (-O2):
define i32 @func() {
ret i32 5
}
int round_score(double v) {
  if (v >= 0)
    return (int)(v + .5);
  else
    return (int)(v - .5);
}


x86 assembly (clang, -O0):
<round_score>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1134 <round_score+0x34>
movsd  0xedd(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x4(%rbp)
jmp    114c <round_score+0x4c>
movsd  -0x10(%rbp),%xmm0
movsd  0xebf(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<round_score>:
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm1,%xmm0
setb   %al
lea    0xeec(%rip),%rcx
addsd  (%rcx,%rax,8),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @round_score(double %0) {
%2 = alloca i32
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp oge double %4, 0.000000e+00
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load double, double* %3
%8 = fadd double %7, 5.000000e-01
%9 = fptosi double %8 to i32
store i32 %9, i32* %2
br label %14
10: ; preds = %1
%11 = load double, double* %3
%12 = fsub double %11, 5.000000e-01
%13 = fptosi double %12 to i32
store i32 %13, i32* %2
br label %14
14: ; preds = %10, %6
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @round_score(double %0) {
%2 = fcmp ult double %0, 0.000000e+00
%3 = select i1 %2, double -5.000000e-01, double 5.000000e-01
%4 = fadd double %3, %0
%5 = fptosi double %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int printf(char *, char const *);
int /*<<< orphan*/ stdout;
int ocall_print_string(const char *str) {
  int ret = printf("%s", str);
  fflush(stdout);
  return ret;
}


x86 assembly (clang, -O0):
<ocall_print_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    %eax,-0xc(%rbp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ocall_print_string>:
push   %rbx
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    %eax,%ebx
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@stdout = global i32 0
define i32 @ocall_print_string(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* @stdout
%7 = call i32 @fflush(i32 %6)
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@stdout = global i32 0
define i32 @ocall_print_string(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
ret i32 %2
}
int test_basic() {
  int i;
  int sum_0 = 0;
  int sum_1 = 0;
#pragma acc parallel loop copy(sum_0, sum_1)
  for (i = 0; i < 8192; i++) {
#pragma acc atomic
    sum_0++;
#pragma acc atomic update
    ++sum_1;
  }
  if (sum_0 != (8192)) {
    return 1;
  }
  if (sum_1 != (8192)) {
    return 2;
  }
  return 0;
}


x86 assembly (clang, -O0):
<test_basic>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x2000,-0x8(%rbp)
jge    1146 <test_basic+0x46>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1119 <test_basic+0x19>
cmpl   $0x2000,-0xc(%rbp)
je     115f <test_basic+0x5f>
movl   $0x1,-0x4(%rbp)
jmp    117f <test_basic+0x7f>
cmpl   $0x2000,-0x10(%rbp)
je     1178 <test_basic+0x78>
movl   $0x2,-0x4(%rbp)
jmp    117f <test_basic+0x7f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_basic() {
ret i32 0
}
void gtk_text_view_get_cursor_visible() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_view_get_cursor_visible() {
ret void
}
int inner_sint(int value) { return value; }


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

x86 assembly (clang, -O2):
<inner_sint>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @inner_sint(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *, char *, char *);
int /*<<< orphan*/ system(char *);
int nodered_publish(char *topic, char *value) {
  char cmdline[1024];
  sprintf(cmdline, "wget -q -O temp.mqtt \"%smqtt?topic=%s&payload=%s\"",
          "http://emonpi:1880/", topic, value);
  system(cmdline);
}


x86 assembly (clang, -O0):
<nodered_publish>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
lea    -0x420(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
lea    0xeb7(%rip),%rsi
lea    0xee2(%rip),%rdx
call   1040 <sprintf@plt>
lea    -0x420(%rbp),%rdi
call   1030 <system@plt>
mov    -0x4(%rbp),%eax
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nodered_publish>:
push   %rbx
sub    $0x400,%rsp
mov    %rsi,%r8
mov    %rdi,%rcx
lea    0xecb(%rip),%rsi
lea    0xef6(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [50 x i8] c"wget -q -O temp.mqtt \22%smqtt?topic=%s&payload=%s\22\00"
@.str.1 = [20 x i8] c"http://emonpi:1880/\00"
define i32 @nodered_publish(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca [1024 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %8, i8* %9)
%11 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%12 = call i32 @system(i8* %11)
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
@.str = [50 x i8] c"wget -q -O temp.mqtt \22%smqtt?topic=%s&payload=%s\22\00"
@.str.1 = [20 x i8] c"http://emonpi:1880/\00"
define i32 @nodered_publish(i8* %0, i8* %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* %1)
%6 = call i32 @system(i8* %4)
ret i32 undef
}
int usb_autoresume_device(struct usb_device *udev) { return 0; }


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

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

LLVM IR (-O0):
%struct.usb_device = type opaque
define i32 @usb_autoresume_device(%struct.usb_device* %0) {
%2 = alloca %struct.usb_device*
store %struct.usb_device* %0, %struct.usb_device** %2
ret i32 0
}

LLVM IR (-O2):
%struct.usb_device = type opaque
define i32 @usb_autoresume_device(%struct.usb_device* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  int n = 0;
  if (n = 0)
    printf("Rowne\n");
  else
    printf("Nierowne\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x8(%rbp)
xor    %eax,%eax
test   $0x1,%al
jne    113c <main+0x2c>
jmp    114d <main+0x3d>
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
jmp    1159 <main+0x49>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [7 x i8] c"Rowne\0A\00"
@.str.1 = [10 x i8] c"Nierowne\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %2
br i1 false, label %3, label %5
3: ; preds = %0
%4 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %7
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
@str = [9 x i8] c"Nierowne\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ key_t;

/* Variables and functions */
int /*<<< orphan*/ getkey(int);
int msgget(int /*<<< orphan*/, int);
int getmsgq(int id) {
  key_t clave;
  clave = getkey(id);
  return (msgget(clave, 0660));
}


x86 assembly (clang, -O0):
<getmsgq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <getkey@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x1b0,%esi
call   1030 <msgget@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getmsgq>:
push   %rax
call   1040 <getkey@plt>
mov    %eax,%edi
mov    $0x1b0,%esi
pop    %rax
jmp    1030 <msgget@plt>

LLVM IR (-O0):
define i32 @getmsgq(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @getkey(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = call i32 @msgget(i32 %6, i32 432)
ret i32 %7
}

LLVM IR (-O2):
define i32 @getmsgq(i32 %0) {
%2 = tail call i32 @getkey(i32 %0)
%3 = tail call i32 @msgget(i32 %2, i32 432)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, unsigned int);
void int2hex(char *dst, unsigned int input, int dim) {
  char pattern[5];
  sprintf(pattern, "%%0%dX", dim);
  sprintf(dst, pattern, input);
}


x86 assembly (clang, -O0):
<int2hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
lea    -0x15(%rbp),%rdi
mov    -0x10(%rbp),%edx
lea    0xed0(%rip),%rsi
call   1030 <sprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x15(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <sprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int2hex>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xedc(%rip),%rsi
lea    0xb(%rsp),%r14
mov    %r14,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%%0%dX\00"
define void @int2hex(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca [5 x i8]
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 0
%9 = load i32, i32* %6
%10 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i8*, i8** %4
%12 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 0
%13 = load i32, i32* %5
%14 = call i32 @sprintf(i8* %11, i8* %12, i32 %13)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%%0%dX\00"
define void @int2hex(i8* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = alloca [5 x i8]
%5 = getelementptr inbounds [5 x i8], [5 x i8]* %4, i64 0, i64 0
%6 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %2)
%7 = call i32 @sprintf(i8* dereferenceable(1) %0, i8* %5, i32 %1)
ret void
}
void CAN_TIMER_Stop(void) {}


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

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

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

LLVM IR (-O2):
define void @CAN_TIMER_Stop() {
ret void
}
void INT_Excep_PERIA_INTA217(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_PERIA_INTA217() {
ret void
}
char *rng_name(void) { return "/dev/urandom"; }


x86 assembly (clang, -O0):
<rng_name>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i8] c"/dev/urandom\00"
define i8* @rng_name() {
ret i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [13 x i8] c"/dev/urandom\00"
define i8* @rng_name() {
ret i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void f6(void) {
  union PRESSAO {
    int kelvin;
    float celsius;
  };
  union PRESSAO p;
  p.celsius = 27.1;
  p.kelvin = p.celsius + 273;
  printf("%d\n", p.kelvin);
  printf("%.2f\n", p.celsius);
}


x86 assembly (clang, -O0):
<f6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  0xee4(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xed3(%rip),%xmm0
addss  -0x8(%rbp),%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
cvttss2si -0x8(%rbp),%esi
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f6>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x12c,%esi
call   1030 <printf@plt>
lea    0xedb(%rip),%rdi
xor    %esi,%esi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
%union.PRESSAO = type { i32 }
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [6 x i8] c"%.2f\0A\00"
define void @f6() {
%1 = alloca %union.PRESSAO
%2 = bitcast %union.PRESSAO* %1 to float*
store float 0x403B1999A0000000, float* %2
%3 = bitcast %union.PRESSAO* %1 to float*
%4 = load float, float* %3
%5 = fadd float %4, 2.730000e+02
%6 = fptosi float %5 to i32
%7 = bitcast %union.PRESSAO* %1 to i32*
store i32 %6, i32* %7
%8 = bitcast %union.PRESSAO* %1 to i32*
%9 = load i32, i32* %8
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = bitcast %union.PRESSAO* %1 to float*
%12 = load float, float* %11
%13 = fptosi float %12 to i32
%14 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %13)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [6 x i8] c"%.2f\0A\00"
define void @f6() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 300)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}