xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0xc7() {
  Assert_real((isupper(199) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isupper.c",
              1000, ("isupper should be 0 for 0xc7"));
}


x86 assembly (clang, -O0):
<t_isupper_0xc7>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc7,%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x3e8,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isupper_0xc7>:
push   %rax
mov    $0xc7,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3e8,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xc7\00"
define void @t_isupper_0xc7() {
%1 = call i64 @isupper(i32 199)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1000, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xc7\00"
define void @t_isupper_0xc7() {
%1 = tail call i64 @isupper(i32 199)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1000, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void LeaveMutex(void) {}


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

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

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

LLVM IR (-O2):
define void @LeaveMutex() {
ret void
}
/* Variables and functions */
scalar_t__ strtol(char const *, void *, int);
int atoi(const char *pszString) {
  return (int)strtol(pszString, (void *)0, 10);
}


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

x86 assembly (clang, -O2):
<atoi>:
xor    %esi,%esi
mov    $0xa,%edx
jmp    1030 <strtol@plt>

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

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


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

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

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

LLVM IR (-O2):
define void @mbc_none_cleanup() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BTCrackStep1(unsigned char *, unsigned char *,
                                unsigned char *, unsigned char *,
                                unsigned char *);
void GetSRES(unsigned char *in_kab, unsigned char *in_aurand,
             unsigned char *in_bdaddr, unsigned char *out_sres,
             unsigned char *out_aco) {
  BTCrackStep1(in_kab, in_aurand, in_bdaddr, out_sres, out_aco);
}


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

x86 assembly (clang, -O2):
<GetSRES>:
jmp    1030 <BTCrackStep1@plt>

LLVM IR (-O0):
define void @GetSRES(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%11 = load i8*, i8** %6
%12 = load i8*, i8** %7
%13 = load i8*, i8** %8
%14 = load i8*, i8** %9
%15 = load i8*, i8** %10
%16 = call i32 @BTCrackStep1(i8* %11, i8* %12, i8* %13, i8* %14, i8* %15)
ret void
}

LLVM IR (-O2):
define void @GetSRES(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = tail call i32 @BTCrackStep1(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ StubBug(char *);
int sigdelset(sigset_t *set, int signum) {
  (void)set;
  (void)signum;
  StubBug("STUB:"
          "sigdelset");
  return 0;
}


x86 assembly (clang, -O0):
<sigdelset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <StubBug@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [15 x i8] c"STUB:sigdelset\00"
define i32 @sigdelset(i32* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @StubBug(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
struct netent *getnetent() {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.netent = type opaque
define %struct.netent* @getnetent() {
ret %struct.netent* null
}

LLVM IR (-O2):
%struct.netent = type opaque
define noalias %struct.netent* @getnetent() {
ret %struct.netent* null
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int puts(char *);
int vsprintf(char *, char const *, int /*<<< orphan*/);
signed int vprintf(const char *pFormat, va_list ap) {
  char pStr[255];
  char pError[] = "stdio.c: increase MAX_STRING_SIZE\r\n";
  if (vsprintf(pStr, pFormat, ap) >= 255) {
    puts(pError);
    while (1)
      ;
  }
  return puts(pStr);
}


x86 assembly (clang, -O0):
<vprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x140(%rbp),%rdi
lea    0xeb0(%rip),%rsi
mov    $0x24,%edx
call   1040 <memcpy@plt>
lea    -0x110(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1050 <vsprintf@plt>
cmp    $0xff,%eax
jl     1189 <vprintf+0x59>
lea    -0x140(%rbp),%rdi
call   1030 <puts@plt>
jmp    1184 <vprintf+0x54>
lea    -0x110(%rbp),%rdi
call   1030 <puts@plt>
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vprintf>:
sub    $0x138,%rsp
mov    %esi,%edx
mov    %rdi,%rsi
movaps 0xedd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec1(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0xa0d45,0x20(%rsp)
lea    0x30(%rsp),%rdi
call   1040 <vsprintf@plt>
cmp    $0xff,%eax
jl     1172 <vprintf+0x52>
mov    %rsp,%rdi
call   1030 <puts@plt>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
jmp    1170 <vprintf+0x50>
lea    0x30(%rsp),%rdi
call   1030 <puts@plt>
add    $0x138,%rsp
ret

LLVM IR (-O0):
@__const.vprintf.pError = [36 x i8] c"stdio.c: increase MAX_STRING_SIZE\0D\0A\00"
define i32 @vprintf(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [255 x i8]
%6 = alloca [36 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = bitcast [36 x i8]* %6 to i8*
%8 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%9 = load i8*, i8** %3
%10 = load i32, i32* %4
%11 = call i32 @vsprintf(i8* %8, i8* %9, i32 %10)
%12 = icmp sge i32 %11, 255
br i1 %12, label %13, label %17
13: ; preds = %2
%14 = getelementptr inbounds [36 x i8], [36 x i8]* %6, i64 0, i64 0
%15 = call i32 @puts(i8* %14)
br label %16
16: ; preds = %13, %16
br label %16
17: ; preds = %2
%18 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%19 = call i32 @puts(i8* %18)
ret i32 %19
}

LLVM IR (-O2):
@__const.vprintf.pError = [36 x i8] c"stdio.c: increase MAX_STRING_SIZE\0D\0A\00"
define i32 @vprintf(i8* nocapture %0, i32 %1) {
%3 = alloca [255 x i8]
%4 = alloca [36 x i8]
%5 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [36 x i8], [36 x i8]* %4, i64 0, i64 0
%7 = call i32 @vsprintf(i8* %5, i8* %0, i32 %1)
%8 = icmp sgt i32 %7, 254
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = call i32 @puts(i8* %6)
br label %11
11: ; preds = %11, %9
br label %11
12: ; preds = %2
%13 = call i32 @puts(i8* %5)
ret i32 %13
}
int test_imm_BBuint8_mem(unsigned char *val) {
  return ((*val) & (0xBB << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_BBuint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0xbb,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_BBuint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, 187
%7 = icmp ne i32 %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_BBuint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -69
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
__attribute__((__noreturn__)) void exitfunc8(void) {
  printf("Executing exitfunc"
         "8"
         ".\n");
  exit(0);
}


x86 assembly (clang, -O0):
<exitfunc8>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exitfunc8>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"Executing exitfunc8.\0A\00"
define void @exitfunc8() {
%1 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [21 x i8] c"Executing exitfunc8.\00"
define void @exitfunc8() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
void gtk_file_chooser_set_select_multiple() {}


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

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

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

LLVM IR (-O2):
define void @gtk_file_chooser_set_select_multiple() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
void op_inc_16(void *_a, void *_b) {
  uint16_t *a = (uint16_t *)_a;
  (*a)++;
}


x86 assembly (clang, -O0):
<op_inc_16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_inc_16>:
addl   $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @op_inc_16(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = load i32, i32* %8
%10 = add nsw i32 %9, 1
store i32 %10, i32* %8
ret void
}

LLVM IR (-O2):
define void @op_inc_16(i8* nocapture %0, i8* nocapture readnone %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = add nsw i32 %4, 1
store i32 %5, i32* %3
ret void
}
void dummy_proc_7(int a0, int a1, int a2, int a3, int a4, int a5, int a6) {
  return;
}


x86 assembly (clang, -O0):
<dummy_proc_7>:
push   %rbp
mov    %rsp,%rbp
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @dummy_proc_7(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
ret void
}

LLVM IR (-O2):
define void @dummy_proc_7(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hola();
int main() { hola(); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @hola()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @hola()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __builtin_stwio(void *, int);
int /*<<< orphan*/ udelay();
void sd_delay(unsigned int count) {
  while (count--) {
    __builtin_stwio(((void *)(((unsigned char *)(0x018810c0)) + (((0)) * (4)))),
                    (0));
    udelay();
    __builtin_stwio(((void *)(((unsigned char *)(0x018810c0)) + (((0)) * (4)))),
                    (1));
  }
}


x86 assembly (clang, -O0):
<sd_delay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
je     1166 <sd_delay+0x46>
mov    $0x18810c0,%edi
xor    %esi,%esi
call   1040 <__builtin_stwio@plt>
mov    $0x0,%al
call   1030 <udelay@plt>
mov    $0x18810c0,%edi
mov    $0x1,%esi
call   1040 <__builtin_stwio@plt>
jmp    112b <sd_delay+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_delay>:
push   %rbx
test   %edi,%edi
je     1157 <sd_delay+0x37>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x18810c0,%edi
xor    %esi,%esi
call   1040 <__builtin_stwio@plt>
xor    %eax,%eax
call   1030 <udelay@plt>
mov    $0x18810c0,%edi
mov    $0x1,%esi
call   1040 <__builtin_stwio@plt>
add    $0xffffffff,%ebx
jne    1130 <sd_delay+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @sd_delay(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = load i32, i32* %2
%5 = add i32 %4, -1
store i32 %5, i32* %2
%6 = icmp ne i32 %4, 0
br i1 %6, label %7, label %11
7: ; preds = %3
%8 = call i32 @__builtin_stwio(i8* inttoptr (i64 25694400 to i8*), i32 0)
%9 = call i32 (...) @udelay()
%10 = call i32 @__builtin_stwio(i8* inttoptr (i64 25694400 to i8*), i32 1)
br label %3
11: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @sd_delay(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %5, %3 ], [ %0, %1 ]
%5 = add i32 %4, -1
%6 = tail call i32 @__builtin_stwio(i8* inttoptr (i64 25694400 to i8*), i32 0)
%7 = tail call i32 (...) @udelay()
%8 = tail call i32 @__builtin_stwio(i8* inttoptr (i64 25694400 to i8*), i32 1)
%9 = icmp eq i32 %5, 0
br i1 %9, label %10, label %3
10: ; preds = %3, %1
ret void
}
void artsrch_init() {}


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

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

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

LLVM IR (-O2):
define void @artsrch_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ isdigit(char);
int isnumber(char *nbrstr) {
  int i = 0;
  while (nbrstr[i] != '\0') {
    if (!isdigit(nbrstr[i]))
      return 0;
    i++;
  }
  return 1;
}


x86 assembly (clang, -O0):
<isnumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     116c <isnumber+0x5c>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    115e <isnumber+0x4e>
movl   $0x0,-0x4(%rbp)
jmp    1173 <isnumber+0x63>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1123 <isnumber+0x13>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isnumber>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
mov    $0x1,%ebp
test   %al,%al
je     114b <isnumber+0x3b>
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
movsbl %al,%edi
call   1030 <isdigit@plt>
test   %eax,%eax
je     1149 <isnumber+0x39>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <isnumber+0x20>
jmp    114b <isnumber+0x3b>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @isnumber(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %8
4: ; preds = %8
%5 = getelementptr inbounds i8, i8* %0, i64 %13
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %1, %4
%9 = phi i64 [ %13, %4 ], [ 0, %1 ]
%10 = phi i8 [ %6, %4 ], [ %2, %1 ]
%11 = tail call i32 @isdigit(i8 signext %10)
%12 = icmp eq i32 %11, 0
%13 = add nuw i64 %9, 1
br i1 %12, label %14, label %4
14: ; preds = %8, %4, %1
%15 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %8 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(
      stderr,
      "Usage: bootlogd [-v] [-r] [-d] [-s] [-c] [-p pidfile] [-l logfile]\n");
  exit(1);
}


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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [68 x i8] c"Usage: bootlogd [-v] [-r] [-d] [-s] [-c] [-p pidfile] [-l logfile]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [68 x i8] c"Usage: bootlogd [-v] [-r] [-d] [-s] [-c] [-p pidfile] [-l logfile]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
void swap(char **str1, char **str2) {
  char *tmp;
  tmp = *str1;
  *str1 = *str2;
  *str2 = tmp;
  return;
}


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

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

LLVM IR (-O0):
define void @swap(i8** %0, i8** %1) {
%3 = alloca i8**
%4 = alloca i8**
%5 = alloca i8*
store i8** %0, i8*** %3
store i8** %1, i8*** %4
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
store i8* %7, i8** %5
%8 = load i8**, i8*** %4
%9 = load i8*, i8** %8
%10 = load i8**, i8*** %3
store i8* %9, i8** %10
%11 = load i8*, i8** %5
%12 = load i8**, i8*** %4
store i8* %11, i8** %12
ret void
}

LLVM IR (-O2):
define void @swap(i8** nocapture %0, i8** nocapture %1) {
%3 = load i8*, i8** %0
%4 = load i8*, i8** %1
store i8* %4, i8** %0
store i8* %3, i8** %1
ret void
}
/* Variables and functions */
int day_of_year(int, int, int);
int /*<<< orphan*/ month_day(int, int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int day, mo, dat;
  day = day_of_year(1988, 2, 29);
  printf("%d\n", day);
  month_day(1988, 60);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x7c4,%edi
mov    $0x2,%esi
mov    $0x1d,%edx
call   1050 <day_of_year@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xea0(%rip),%rdi
call   1040 <printf@plt>
mov    $0x7c4,%edi
mov    $0x3c,%esi
call   1030 <month_day@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x7c4,%edi
mov    $0x2,%esi
mov    $0x1d,%edx
call   1050 <day_of_year@plt>
lea    0xeb4(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x7c4,%edi
mov    $0x3c,%esi
call   1030 <month_day@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @day_of_year(i32 1988, i32 2, i32 29)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @month_day(i32 1988, i32 60)
ret i32 0
}
void foo_1_2_2_2_1_1_2_1_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_2_2_2_1_1_2_1_1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ my_fini();
void __attribute__((destructor)) fini(void) { my_fini(); }


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

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

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

LLVM IR (-O2):
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @fini, i8* null }]
define void @fini() {
%1 = tail call i32 (...) @my_fini()
ret void
}
int is_prime(int value) {
  int i;
  if (value <= 2)
    return 1;
  for (i = 2; i < value; i++) {
    if ((value % i) == 0)
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<is_prime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jg     111d <is_prime+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    1166 <is_prime+0x66>
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    115f <is_prime+0x5f>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    114c <is_prime+0x4c>
movl   $0x0,-0x4(%rbp)
jmp    1166 <is_prime+0x66>
jmp    1151 <is_prime+0x51>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1124 <is_prime+0x24>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_prime>:
mov    $0x1,%ecx
cmp    $0x3,%edi
jl     1120 <is_prime+0x20>
mov    $0x2,%esi
nop
mov    %edi,%eax
cltd
idiv   %esi
test   %edx,%edx
je     1123 <is_prime+0x23>
add    $0x1,%esi
cmp    %esi,%edi
jne    1110 <is_prime+0x10>
mov    %ecx,%eax
ret
xor    %ecx,%ecx
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @is_prime(i32 %0) {
%2 = icmp sgt i32 %0, 2
br i1 %2, label %5, label %10
3: ; preds = %5
%4 = icmp eq i32 %9, %0
br i1 %4, label %10, label %5
5: ; preds = %1, %3
%6 = phi i32 [ %9, %3 ], [ 2, %1 ]
%7 = srem i32 %0, %6
%8 = icmp eq i32 %7, 0
%9 = add nuw nsw i32 %6, 1
br i1 %8, label %10, label %3
10: ; preds = %5, %3, %1
%11 = phi i32 [ 1, %1 ], [ 0, %5 ], [ 1, %3 ]
ret i32 %11
}
/* Type definitions */
struct spaceSaver {
  int dummy;
};
struct spaceNode {
  int dummy;
};

/* Variables and functions */
struct spaceNode *spaceSaverAddOverflow(struct spaceSaver *, int, int, void *,
                                        int /*<<< orphan*/);
struct spaceNode *spaceSaverAdd(struct spaceSaver *ss, int start, int end,
                                void *val) {
  return spaceSaverAddOverflow(ss, start, end, val, 0);
}


x86 assembly (clang, -O0):
<spaceSaverAdd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
xor    %r8d,%r8d
call   1030 <spaceSaverAddOverflow@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spaceSaverAdd>:
xor    %r8d,%r8d
jmp    1030 <spaceSaverAddOverflow@plt>

LLVM IR (-O0):
%struct.spaceNode = type { i32 }
%struct.spaceSaver = type { i32 }
define %struct.spaceNode* @spaceSaverAdd(%struct.spaceSaver* %0, i32 %1, i32 %2, i8* %3) {
%5 = alloca %struct.spaceSaver*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store %struct.spaceSaver* %0, %struct.spaceSaver** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load %struct.spaceSaver*, %struct.spaceSaver** %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i8*, i8** %8
%13 = call %struct.spaceNode* @spaceSaverAddOverflow(%struct.spaceSaver* %9, i32 %10, i32 %11, i8* %12, i32 0)
ret %struct.spaceNode* %13
}

LLVM IR (-O2):
%struct.spaceNode = type { i32 }
%struct.spaceSaver = type { i32 }
define %struct.spaceNode* @spaceSaverAdd(%struct.spaceSaver* %0, i32 %1, i32 %2, i8* %3) {
%5 = tail call %struct.spaceNode* @spaceSaverAddOverflow(%struct.spaceSaver* %0, i32 %1, i32 %2, i8* %3, i32 0)
ret %struct.spaceNode* %5
}
/* Variables and functions */
int /*<<< orphan*/ safe_printf(char *, unsigned long);
void tap_plan(unsigned long n) { safe_printf("1..%lu\n", n); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"1..%lu\0A\00"
define void @tap_plan(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @safe_printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64 %3)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"1..%lu\0A\00"
define void @tap_plan(i64 %0) {
%2 = tail call i32 @safe_printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64 %0)
ret void
}
/* Type definitions */
struct szl_obj {
  int dummy;
};
struct szl_interp {
  int dummy;
};

/* Variables and functions */
scalar_t__ szl_int_to_str(struct szl_interp *, struct szl_obj *);
scalar_t__ szl_str_to_list(struct szl_interp *, struct szl_obj *);
int szl_int_to_list(struct szl_interp *interp, struct szl_obj *obj) {
  return szl_int_to_str(interp, obj) && szl_str_to_list(interp, obj);
}


x86 assembly (clang, -O0):
<szl_int_to_list>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <szl_int_to_str@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
je     1166 <szl_int_to_list+0x46>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <szl_str_to_list@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):
<szl_int_to_list>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <szl_int_to_str@plt>
test   %rax,%rax
je     114c <szl_int_to_list+0x2c>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <szl_str_to_list@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
jmp    114e <szl_int_to_list+0x2e>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.szl_interp = type { i32 }
%struct.szl_obj = type { i32 }
define i32 @szl_int_to_list(%struct.szl_interp* %0, %struct.szl_obj* %1) {
%3 = alloca %struct.szl_interp*
%4 = alloca %struct.szl_obj*
store %struct.szl_interp* %0, %struct.szl_interp** %3
store %struct.szl_obj* %1, %struct.szl_obj** %4
%5 = load %struct.szl_interp*, %struct.szl_interp** %3
%6 = load %struct.szl_obj*, %struct.szl_obj** %4
%7 = call i64 @szl_int_to_str(%struct.szl_interp* %5, %struct.szl_obj* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load %struct.szl_interp*, %struct.szl_interp** %3
%11 = load %struct.szl_obj*, %struct.szl_obj** %4
%12 = call i64 @szl_str_to_list(%struct.szl_interp* %10, %struct.szl_obj* %11)
%13 = icmp ne i64 %12, 0
br label %14
14: ; preds = %9, %2
%15 = phi i1 [ false, %2 ], [ %13, %9 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
%struct.szl_interp = type { i32 }
%struct.szl_obj = type { i32 }
define i32 @szl_int_to_list(%struct.szl_interp* %0, %struct.szl_obj* %1) {
%3 = tail call i64 @szl_int_to_str(%struct.szl_interp* %0, %struct.szl_obj* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = tail call i64 @szl_str_to_list(%struct.szl_interp* %0, %struct.szl_obj* %1)
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ 0, %2 ], [ %8, %5 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ normalize_range(double *, int, double, double);
void normalize(double *values, int size) {
  normalize_range(values, size, 0.0, 1.0);
}


x86 assembly (clang, -O0):
<normalize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
xorps  %xmm0,%xmm0
movsd  0xecf(%rip),%xmm1
call   1030 <normalize_range@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<normalize>:
movsd  0xee8(%rip),%xmm1
xorps  %xmm0,%xmm0
jmp    1030 <normalize_range@plt>

LLVM IR (-O0):
define void @normalize(double* %0, i32 %1) {
%3 = alloca double*
%4 = alloca i32
store double* %0, double** %3
store i32 %1, i32* %4
%5 = load double*, double** %3
%6 = load i32, i32* %4
%7 = call i32 @normalize_range(double* %5, i32 %6, double 0.000000e+00, double 1.000000e+00)
ret void
}

LLVM IR (-O2):
define void @normalize(double* %0, i32 %1) {
%3 = tail call i32 @normalize_range(double* %0, i32 %1, double 0.000000e+00, double 1.000000e+00)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close_readline();
int /*<<< orphan*/ exit(int);
void exit_calc(int *status) {
  close_readline();
  exit(*status);
}


x86 assembly (clang, -O0):
<exit_calc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <close_readline@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exit_calc>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <close_readline@plt>
mov    (%rbx),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @exit_calc(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 (...) @close_readline()
%4 = load i32*, i32** %2
%5 = load i32, i32* %4
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
define void @exit_calc(i32* nocapture %0) {
%2 = tail call i32 (...) @close_readline()
%3 = load i32, i32* %0
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct bit_trie_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ bit_trie_free_r(struct bit_trie_node *);
uint32_t bit_trie_free(struct bit_trie_node *node) {
  return bit_trie_free_r(node);
}


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

x86 assembly (clang, -O2):
<bit_trie_free>:
jmp    1030 <bit_trie_free_r@plt>

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

LLVM IR (-O2):
%struct.bit_trie_node = type { i32 }
define i32 @bit_trie_free(%struct.bit_trie_node* %0) {
%2 = tail call i32 @bit_trie_free_r(%struct.bit_trie_node* %0)
ret i32 %2
}
/* Type definitions */
struct iovec {
  int dummy;
};

/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_bus_message_append_string_iovec(void *m, const struct iovec *iov,
                                   unsigned n) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_bus_message_append_string_iovec>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
mov    0x2ec8(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_bus_message_append_string_iovec>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
%struct.iovec = type { i32 }
@EINVAL = global i32 0
define i32 @sd_bus_message_append_string_iovec(i8* %0, %struct.iovec* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca %struct.iovec*
%6 = alloca i32
store i8* %0, i8** %4
store %struct.iovec* %1, %struct.iovec** %5
store i32 %2, i32* %6
%7 = load i32, i32* @EINVAL
%8 = sub nsw i32 0, %7
ret i32 %8
}

LLVM IR (-O2):
%struct.iovec = type { i32 }
@EINVAL = global i32 0
define i32 @sd_bus_message_append_string_iovec(i8* nocapture readnone %0, %struct.iovec* nocapture readnone %1, i32 %2) {
%4 = load i32, i32* @EINVAL
%5 = sub nsw i32 0, %4
ret i32 %5
}
unsigned s2e_get_path_id(void) {
  unsigned id;
  __asm__ __volatile__(".byte 0x0f, 0x3f\n"
                       ".byte 0x00, 0x05, 0x00, 0x00\n"
                       ".byte 0x00, 0x00, 0x00, 0x00\n"
                       : "=a"(id));
  return id;
}


x86 assembly (clang, -O0):
<s2e_get_path_id>:
push   %rbp
mov    %rsp,%rbp
(bad)
add    %al,0x0(%rip)
add    %al,(%rax)
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<s2e_get_path_id>:
(bad)
add    %al,0x0(%rip)
add    %al,(%rax)
ret

LLVM IR (-O0):
define i32 @s2e_get_path_id() {
%1 = alloca i32
%2 = call i32 asm sideeffect ".byte 0x0f, 0x3f\0A.byte 0x00, 0x05, 0x00, 0x00\0A.byte 0x00, 0x00, 0x00, 0x00\0A", "={ax},~{dirflag},~{fpsr},~{flags}"()
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @s2e_get_path_id() {
%1 = tail call i32 asm sideeffect ".byte 0x0f, 0x3f\0A.byte 0x00, 0x05, 0x00, 0x00\0A.byte 0x00, 0x00, 0x00, 0x00\0A", "={ax},~{dirflag},~{fpsr},~{flags}"()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
int main() {
  for (;;)
    sleep(1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1030 <sleep@plt>
jmp    111f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1030 <sleep@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %2, %0
%3 = call i32 @sleep(i32 1)
br label %2
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @sleep(i32 1)
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t hal_bsp_get_nvic_priority(int irq_num, uint32_t pri) {
  uint32_t cfg_pri;
  switch (irq_num) {
  default:
    cfg_pri = pri;
  }
  return cfg_pri;
}


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

x86 assembly (clang, -O2):
<hal_bsp_get_nvic_priority>:
mov    %esi,%eax
ret

LLVM IR (-O0):
define i32 @hal_bsp_get_nvic_priority(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
switch i32 %6, label %7 [
]
7: ; preds = %2
%8 = load i32, i32* %4
store i32 %8, i32* %5
br label %9
9: ; preds = %7
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @hal_bsp_get_nvic_priority(i32 %0, i32 returned %1) {
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ __rb_exit();
void __gc_exit() { __rb_exit(); }


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

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

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

LLVM IR (-O2):
define void @__gc_exit() {
%1 = tail call i32 (...) @__rb_exit()
ret void
}
void nrom_switch_banks() { return; }


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

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

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

LLVM IR (-O2):
define void @nrom_switch_banks() {
ret void
}
void stress_ftrace_free(void) {}


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

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

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

LLVM IR (-O2):
define void @stress_ftrace_free() {
ret void
}
char *xstrdup(str)
char *str;
{
  char *tmp;
  tmp = xmalloc(strlen(str) + 1);
  strcpy(tmp, str);
  return tmp;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
mov    $0x0,%al
call   1050 <xmalloc@plt>
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
xor    %eax,%eax
call   1050 <xmalloc@plt>
movslq %eax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @xstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add i64 %5, 1
%7 = call i32 (i64, ...) bitcast (i32 (...)* @xmalloc to i32 (i64, ...)*)(i64 %6)
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %3
%10 = load i8*, i8** %3
%11 = load i8*, i8** %2
%12 = call i8* @strcpy(i8* %10, i8* %11)
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
define i8* @xstrdup(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add i64 %2, 1
%4 = tail call i32 (i64, ...) bitcast (i32 (...)* @xmalloc to i32 (i64, ...)*)(i64 %3)
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
%7 = tail call i8* @strcpy(i8* dereferenceable(1) %6, i8* dereferenceable(1) %0)
ret i8* %6
}
double sqr(double a) {
  return a * a;
  __builtin_unreachable();
}


x86 assembly (clang, -O0):
<sqr>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqr>:
mulsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @sqr(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
ret double %5
}

LLVM IR (-O2):
define double @sqr(double %0) {
%2 = fmul double %0, %0
ret double %2
}
void top() {}


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

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

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

LLVM IR (-O2):
define void @top() {
ret void
}
/* Variables and functions */
int write(int, void *, int);
int ms6931_write(int fd, void *str, int len) { return write(fd, str, len); }


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

x86 assembly (clang, -O2):
<ms6931_write>:
jmp    1030 <write@plt>

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

LLVM IR (-O2):
define i32 @ms6931_write(i32 %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @write(i32 %0, i8* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int dnothing(void) {
  printf("nothing\n");
  return 10;
}


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

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

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

LLVM IR (-O2):
@str = [8 x i8] c"nothing\00"
define i32 @dnothing() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret i32 10
}
float TrowReitzDInverseApprox(float alpha) {
  float b = alpha - .2f;
  return .913173f - 0.378603f * b + .239374f * b * b;
}


x86 assembly (clang, -O0):
<TrowReitzDInverseApprox>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xef6(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm1
movss  0xed8(%rip),%xmm0
mulss  %xmm0,%xmm1
movss  0xed0(%rip),%xmm0
addss  %xmm0,%xmm1
movss  0xebc(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  -0x8(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<TrowReitzDInverseApprox>:
addss  0xef8(%rip),%xmm0
movss  0xef4(%rip),%xmm1
mulss  %xmm0,%xmm1
addss  0xeec(%rip),%xmm1
movss  0xee8(%rip),%xmm2
mulss  %xmm0,%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @TrowReitzDInverseApprox(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fsub float %4, 0x3FC99999A0000000
store float %5, float* %3
%6 = load float, float* %3
%7 = call float @llvm.fmuladd.f32(float 0xBFD83B0820000000, float %6, float 0x3FED38B6A0000000)
%8 = load float, float* %3
%9 = fmul float 0x3FCEA3CEA0000000, %8
%10 = load float, float* %3
%11 = call float @llvm.fmuladd.f32(float %9, float %10, float %7)
ret float %11
}

LLVM IR (-O2):
define float @TrowReitzDInverseApprox(float %0) {
%2 = fadd float %0, 0xBFC99999A0000000
%3 = tail call float @llvm.fmuladd.f32(float %2, float 0xBFD83B0820000000, float 0x3FED38B6A0000000)
%4 = fmul float %2, 0x3FCEA3CEA0000000
%5 = tail call float @llvm.fmuladd.f32(float %4, float %2, float %3)
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
void loop() {
  while (1) {
    sleep(1);
  }
}


x86 assembly (clang, -O0):
<loop>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <loop+0x9>
mov    $0x1,%edi
call   1030 <sleep@plt>
jmp    1119 <loop+0x9>

x86 assembly (clang, -O2):
<loop>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1030 <sleep@plt>
jmp    1120 <loop+0x10>

LLVM IR (-O0):
define void @loop() {
br label %1
1: ; preds = %0, %1
%2 = call i32 @sleep(i32 1)
br label %1
}

LLVM IR (-O2):
define void @loop() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 @sleep(i32 1)
br label %1
}