xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ BNCIO2(int, long);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, long *);
long int BNCLCDEchoOnOff() {
  long int ii, stat = 99;
  printf("LCD echo on/off=1/0 \n");
  printf("Beware of this as you may screw up the current status display of "
         "this program! \n");
  scanf("%li", &ii);
  BNCIO2(33, ii);
  return (stat);
}


x86 assembly (clang, -O0):
<BNCLCDEchoOnOff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x63,-0x10(%rbp)
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
lea    0xf08(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%rsi
mov    $0x21,%edi
call   1040 <BNCIO2@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BNCLCDEchoOnOff>:
push   %rax
lea    0xecc(%rip),%rdi
call   1030 <puts@plt>
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb0(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
mov    (%rsp),%rsi
mov    $0x21,%edi
call   1040 <BNCIO2@plt>
mov    $0x63,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"LCD echo on/off=1/0 \0A\00"
@.str.1 = [81 x i8] c"Beware of this as you may screw up the current status display of this program! \0A\00"
@.str.2 = [4 x i8] c"%li\00"
define i64 @BNCLCDEchoOnOff() {
%1 = alloca i64
%2 = alloca i64
store i64 99, i64* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64* %1)
%6 = load i64, i64* %1
%7 = call i32 @BNCIO2(i32 33, i64 %6)
%8 = load i64, i64* %2
ret i64 %8
}

LLVM IR (-O2):
@.str.2 = [4 x i8] c"%li\00"
@str = [21 x i8] c"LCD echo on/off=1/0 \00"
@str.3 = [80 x i8] c"Beware of this as you may screw up the current status display of this program! \00"
define i64 @BNCLCDEchoOnOff() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str.3, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64* %1)
%6 = load i64, i64* %1
%7 = call i32 @BNCIO2(i32 33, i64 %6)
ret i64 99
}
/* Type definitions */
typedef void *time_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, void *);
void timer_(void) {
  time_t time();
  time_t *tloc = '\0';
  printf("time in seconds since midnight is %d\n", time(tloc));
}


x86 assembly (clang, -O0):
<timer_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <time@plt>
mov    %rax,%rsi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timer_>:
push   %rax
xor    %edi,%edi
xor    %eax,%eax
call   1040 <time@plt>
lea    0xecf(%rip),%rdi
mov    %rax,%rsi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"time in seconds since midnight is %d\0A\00"
define void @timer_() {
%1 = alloca i8**
store i8** null, i8*** %1
%2 = load i8**, i8*** %1
%3 = call i8* (i8**, ...) bitcast (i8* (...)* @time to i8* (i8**, ...)*)(i8** %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"time in seconds since midnight is %d\0A\00"
define void @timer_() {
%1 = tail call i8* (i8**, ...) bitcast (i8* (...)* @time to i8* (i8**, ...)*)(i8** null)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
void addvf(float *result, const float *s1, const float s2) {
  result[0] = s1[0] + s2;
  result[1] = s1[1] + s2;
  result[2] = s1[2] + s2;
}


x86 assembly (clang, -O0):
<addvf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
addss  -0x14(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
addss  -0x14(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
addss  -0x14(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<addvf>:
movss  (%rsi),%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,(%rdi)
movss  0x4(%rsi),%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,0x4(%rdi)
addss  0x8(%rsi),%xmm0
movss  %xmm0,0x8(%rdi)
ret

LLVM IR (-O0):
define void @addvf(float* %0, float* %1, float %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float
store float* %0, float** %4
store float* %1, float** %5
store float %2, float* %6
%7 = load float*, float** %5
%8 = getelementptr inbounds float, float* %7, i64 0
%9 = load float, float* %8
%10 = load float, float* %6
%11 = fadd float %9, %10
%12 = load float*, float** %4
%13 = getelementptr inbounds float, float* %12, i64 0
store float %11, float* %13
%14 = load float*, float** %5
%15 = getelementptr inbounds float, float* %14, i64 1
%16 = load float, float* %15
%17 = load float, float* %6
%18 = fadd float %16, %17
%19 = load float*, float** %4
%20 = getelementptr inbounds float, float* %19, i64 1
store float %18, float* %20
%21 = load float*, float** %5
%22 = getelementptr inbounds float, float* %21, i64 2
%23 = load float, float* %22
%24 = load float, float* %6
%25 = fadd float %23, %24
%26 = load float*, float** %4
%27 = getelementptr inbounds float, float* %26, i64 2
store float %25, float* %27
ret void
}

LLVM IR (-O2):
define void @addvf(float* nocapture writeonly %0, float* nocapture %1, float %2) {
%4 = load float, float* %1
%5 = fadd float %4, %2
store float %5, float* %0
%6 = getelementptr inbounds float, float* %1, i64 1
%7 = load float, float* %6
%8 = fadd float %7, %2
%9 = getelementptr inbounds float, float* %0, i64 1
store float %8, float* %9
%10 = getelementptr inbounds float, float* %1, i64 2
%11 = load float, float* %10
%12 = fadd float %11, %2
%13 = getelementptr inbounds float, float* %0, i64 2
store float %12, float* %13
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int /*<<< orphan*/ closedir(int /*<<< orphan*/ *);
int mkdir(char *, int);
int /*<<< orphan*/ *opendir(char *);
void my_mkdir(char *path) {
  DIR *pDir;
  pDir = opendir(path);
  if (NULL == pDir) {
    if (-1 == mkdir(path, 0777)) {
      return;
    }
  } else
    closedir(pDir);
}


x86 assembly (clang, -O0):
<my_mkdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <opendir@plt>
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
jne    117c <my_mkdir+0x4c>
mov    -0x8(%rbp),%rdi
mov    $0x1ff,%esi
call   1030 <mkdir@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
jne    1177 <my_mkdir+0x47>
jmp    1185 <my_mkdir+0x55>
jmp    1185 <my_mkdir+0x55>
mov    -0x10(%rbp),%rdi
call   1050 <closedir@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_mkdir>:
push   %rbx
mov    %rdi,%rbx
call   1040 <opendir@plt>
test   %rax,%rax
je     1147 <my_mkdir+0x17>
mov    %rax,%rdi
pop    %rbx
jmp    1050 <closedir@plt>
mov    %rbx,%rdi
mov    $0x1ff,%esi
pop    %rbx
jmp    1030 <mkdir@plt>

LLVM IR (-O0):
define void @my_mkdir(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32* @opendir(i8* %4)
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = icmp eq i32* null, %6
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i32 @mkdir(i8* %9, i32 511)
%11 = icmp eq i32 -1, %10
br i1 %11, label %12, label %13
12: ; preds = %8
br label %17
13: ; preds = %8
br label %17
14: ; preds = %1
%15 = load i32*, i32** %3
%16 = call i32 @closedir(i32* %15)
br label %17
17: ; preds = %12, %14, %13
ret void
}

LLVM IR (-O2):
define void @my_mkdir(i8* nocapture %0) {
%2 = tail call i32* @opendir(i8* %0)
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @mkdir(i8* %0, i32 511)
br label %8
6: ; preds = %1
%7 = tail call i32 @closedir(i32* %2)
br label %8
8: ; preds = %4, %6
ret void
}
void glFogxv(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glFogxv() {
ret void
}
void marshal_ppp(void (*fn)(), void *rvalue, void **avalue) {
  *((void **)rvalue) = (*(void *(*)(void *, void *))fn)(
      *((void **)(avalue[0])), *((void **)(avalue[1])));
}


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

x86 assembly (clang, -O2):
<marshal_ppp>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rax
mov    (%rdx),%rcx
mov    0x8(%rdx),%rdx
mov    (%rcx),%rdi
mov    (%rdx),%rsi
call   *%rax
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @marshal_ppp(void (...)* %0, i8* %1, i8** %2) {
%4 = alloca void (...)*
%5 = alloca i8*
%6 = alloca i8**
store void (...)* %0, void (...)** %4
store i8* %1, i8** %5
store i8** %2, i8*** %6
%7 = load void (...)*, void (...)** %4
%8 = bitcast void (...)* %7 to i8* (i8*, i8*)*
%9 = load i8**, i8*** %6
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = bitcast i8* %11 to i8**
%13 = load i8*, i8** %12
%14 = load i8**, i8*** %6
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = bitcast i8* %16 to i8**
%18 = load i8*, i8** %17
%19 = call i8* %8(i8* %13, i8* %18)
%20 = load i8*, i8** %5
%21 = bitcast i8* %20 to i8**
store i8* %19, i8** %21
ret void
}

LLVM IR (-O2):
define void @marshal_ppp(void (...)* nocapture %0, i8* nocapture writeonly %1, i8** nocapture %2) {
%4 = bitcast void (...)* %0 to i8* (i8*, i8*)*
%5 = bitcast i8** %2 to i8***
%6 = load i8**, i8*** %5
%7 = load i8*, i8** %6
%8 = getelementptr inbounds i8*, i8** %2, i64 1
%9 = bitcast i8** %8 to i8***
%10 = load i8**, i8*** %9
%11 = load i8*, i8** %10
%12 = tail call i8* %4(i8* %7, i8* %11)
%13 = bitcast i8* %1 to i8**
store i8* %12, i8** %13
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cstrcpy(char *, char *);
int main() {
  char *s2;
  char *s1;
  cstrcpy(s1, s2);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @cstrcpy(i8* undef, i8* undef)
ret i32 0
}
int function(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @function() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ USBFS_ReInitComponent();
void USBFS_BUS_RESET_ISR(void) { USBFS_ReInitComponent(); }


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

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

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

LLVM IR (-O2):
define void @USBFS_BUS_RESET_ISR() {
%1 = tail call i32 (...) @USBFS_ReInitComponent()
ret void
}
/* Variables and functions */
long long __popcntq(unsigned long long);
long long test__popcntq(unsigned long long __X) { return __popcntq(__X); }


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

x86 assembly (clang, -O2):
<test__popcntq>:
jmp    1030 <__popcntq@plt>

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

LLVM IR (-O2):
define i64 @test__popcntq(i64 %0) {
%2 = tail call i64 @__popcntq(i64 %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int strend(char *, char *);
int main() {
  printf("%d", strend("hello madame", "ame"));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xecd(%rip),%rdi
lea    0xecf(%rip),%rsi
call   1040 <strend@plt>
mov    %eax,%esi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedb(%rip),%rdi
lea    0xedd(%rip),%rsi
call   1040 <strend@plt>
lea    0xec5(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [13 x i8] c"hello madame\00"
@.str.2 = [4 x i8] c"ame\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @strend(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [13 x i8] c"hello madame\00"
@.str.2 = [4 x i8] c"ame\00"
define i32 @main() {
%1 = tail call i32 @strend(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
void view_hotel_volume_start(void) {}


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

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

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

LLVM IR (-O2):
define void @view_hotel_volume_start() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char *, char *);
void code_cmp(char *s, char *s1, char *s2, char *s3) {
  printf("\t%s = %s %s %s\n", s, s1, s2, s3);
}


x86 assembly (clang, -O0):
<code_cmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<code_cmp>:
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xedd(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"\09%s = %s %s %s\0A\00"
define void @code_cmp(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i8*, i8** %8
%13 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10, i8* %11, i8* %12)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"\09%s = %s %s %s\0A\00"
define void @code_cmp(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i8* %2, i8* %3)
ret void
}
void rotate(double magnitude, double *angle) {
  *angle += magnitude;
  if (*angle > 360)
    *angle -= 360;
  else if (*angle < 0)
    *angle += 360;
}


x86 assembly (clang, -O0):
<rotate>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xed2(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1155 <rotate+0x55>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xeb8(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
jmp    117f <rotate+0x7f>
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd (%rax),%xmm0
jbe    117a <rotate+0x7a>
mov    -0x10(%rbp),%rax
movsd  0xe8e(%rip),%xmm0
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
jmp    117f <rotate+0x7f>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotate>:
addsd  (%rdi),%xmm0
movsd  %xmm0,(%rdi)
ucomisd 0xef8(%rip),%xmm0
jbe    111c <rotate+0x1c>
movsd  0xee6(%rip),%xmm1
jmp    112e <rotate+0x2e>
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jbe    1136 <rotate+0x36>
movsd  0xeda(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @rotate(double %0, double* %1) {
%3 = alloca double
%4 = alloca double*
store double %0, double* %3
store double* %1, double** %4
%5 = load double, double* %3
%6 = load double*, double** %4
%7 = load double, double* %6
%8 = fadd double %7, %5
store double %8, double* %6
%9 = load double*, double** %4
%10 = load double, double* %9
%11 = fcmp ogt double %10, 3.600000e+02
br i1 %11, label %12, label %16
12: ; preds = %2
%13 = load double*, double** %4
%14 = load double, double* %13
%15 = fsub double %14, 3.600000e+02
store double %15, double* %13
br label %25
16: ; preds = %2
%17 = load double*, double** %4
%18 = load double, double* %17
%19 = fcmp olt double %18, 0.000000e+00
br i1 %19, label %20, label %24
20: ; preds = %16
%21 = load double*, double** %4
%22 = load double, double* %21
%23 = fadd double %22, 3.600000e+02
store double %23, double* %21
br label %24
24: ; preds = %20, %16
br label %25
25: ; preds = %24, %12
ret void
}

LLVM IR (-O2):
define void @rotate(double %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = fadd double %3, %0
store double %4, double* %1
%5 = fcmp ogt double %4, 3.600000e+02
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = fcmp olt double %4, 0.000000e+00
br i1 %7, label %8, label %11
8: ; preds = %6, %2
%9 = phi double [ -3.600000e+02, %2 ], [ 3.600000e+02, %6 ]
%10 = fadd double %4, %9
store double %10, double* %1
br label %11
11: ; preds = %8, %6
ret void
}
void ipipe_trace_panic_dump(void) {}


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

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

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

LLVM IR (-O2):
define void @ipipe_trace_panic_dump() {
ret void
}
void settextstyle(int i, int i1, int i2) {}


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

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

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

LLVM IR (-O2):
define void @settextstyle(i32 %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
int foo(int);
int goop(int x) { return foo(x - 5) * 7; }


x86 assembly (clang, -O0):
<goop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
sub    $0x5,%edi
call   1030 <foo@plt>
imul   $0x7,%eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<goop>:
push   %rax
add    $0xfffffffb,%edi
call   1030 <foo@plt>
lea    0x0(,%rax,8),%ecx
sub    %eax,%ecx
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @goop(i32 %0) {
%2 = add nsw i32 %0, -5
%3 = tail call i32 @foo(i32 %2)
%4 = mul nsw i32 %3, 7
ret i32 %4
}
void update_ircam_header(void) {}


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

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

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

LLVM IR (-O2):
define void @update_ircam_header() {
ret void
}
/* Variables and functions */
scalar_t__ is_numeric(char const);
int is_number(const char c) { return is_numeric(c) || '.' == c; }


x86 assembly (clang, -O0):
<is_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <is_numeric@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    114a <is_number+0x3a>
movsbl -0x1(%rbp),%ecx
mov    $0x2e,%eax
cmp    %ecx,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_number>:
push   %rbx
mov    %edi,%ebx
call   1030 <is_numeric@plt>
test   %rax,%rax
setne  %al
cmp    $0x2e,%bl
sete   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @is_number(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @is_numeric(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 46, %8
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @is_number(i8 signext %0) {
%2 = tail call i64 @is_numeric(i8 signext %0)
%3 = icmp ne i64 %2, 0
%4 = icmp eq i8 %0, 46
%5 = or i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
void initalizeGesture() {}


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

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

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

LLVM IR (-O2):
define void @initalizeGesture() {
ret void
}
/* Variables and functions */
char __data20_read_char(unsigned long);
int /*<<< orphan*/ __disable_interrupt();
int /*<<< orphan*/ __enable_interrupt();
char flash_read_byte(unsigned long address) {
  char ret;
  __disable_interrupt();
  ret = __data20_read_char(address);
  __enable_interrupt();
  return ret;
}


x86 assembly (clang, -O0):
<flash_read_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__disable_interrupt@plt>
mov    -0x8(%rbp),%rdi
call   1050 <__data20_read_char@plt>
mov    %al,-0x9(%rbp)
mov    $0x0,%al
call   1040 <__enable_interrupt@plt>
movsbl -0x9(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flash_read_byte>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <__disable_interrupt@plt>
mov    %rbx,%rdi
call   1050 <__data20_read_char@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <__enable_interrupt@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @flash_read_byte(i64 %0) {
%2 = alloca i64
%3 = alloca i8
store i64 %0, i64* %2
%4 = call i32 (...) @__disable_interrupt()
%5 = load i64, i64* %2
%6 = call signext i8 @__data20_read_char(i64 %5)
store i8 %6, i8* %3
%7 = call i32 (...) @__enable_interrupt()
%8 = load i8, i8* %3
ret i8 %8
}

LLVM IR (-O2):
define signext i8 @flash_read_byte(i64 %0) {
%2 = tail call i32 (...) @__disable_interrupt()
%3 = tail call signext i8 @__data20_read_char(i64 %0)
%4 = tail call i32 (...) @__enable_interrupt()
ret i8 %3
}
/* Variables and functions */
float logf(scalar_t__);
scalar_t__ sqrtf(float);
float acoshf(float x) { return logf(x + sqrtf(x * x - 1)); }


x86 assembly (clang, -O0):
<acoshf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  0xeb3(%rip),%xmm1
addss  %xmm1,%xmm0
call   1040 <sqrtf@plt>
movss  -0x8(%rbp),%xmm0
cvtsi2ss %rax,%xmm1
addss  %xmm1,%xmm0
cvttss2si %xmm0,%rdi
call   1030 <logf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<acoshf>:
push   %rax
movss  %xmm0,0x4(%rsp)
mulss  %xmm0,%xmm0
addss  0xecd(%rip),%xmm0
call   1040 <sqrtf@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
addss  0x4(%rsp),%xmm0
cvttss2si %xmm0,%rdi
pop    %rax
jmp    1030 <logf@plt>

LLVM IR (-O0):
define float @acoshf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = load float, float* %2
%6 = call float @llvm.fmuladd.f32(float %4, float %5, float -1.000000e+00)
%7 = call i64 @sqrtf(float %6)
%8 = sitofp i64 %7 to float
%9 = fadd float %3, %8
%10 = fptosi float %9 to i64
%11 = call float @logf(i64 %10)
ret float %11
}

LLVM IR (-O2):
define float @acoshf(float %0) {
%2 = tail call float @llvm.fmuladd.f32(float %0, float %0, float -1.000000e+00)
%3 = tail call i64 @sqrtf(float %2)
%4 = sitofp i64 %3 to float
%5 = fadd float %4, %0
%6 = fptosi float %5 to i64
%7 = tail call float @logf(i64 %6)
ret float %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void prt(char *msg) { printf("%s\n", msg); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @prt(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void RandomFunc(unsigned long input[1], unsigned long output[1]) {
  unsigned long state[1];
  unsigned long local2;
  unsigned long local1;
  {
    state[0UL] = input[0UL] + 0xffffffffff660b45UL;
    local1 = 0UL;
    while (local1 < 0UL) {
      local2 = 0UL;
      while (local2 < 0UL) {
        local2 += 2UL;
      }
      local1 += 2UL;
    }
    output[0UL] = (state[0UL] + 146565199UL) + 2631654602UL;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
add    $0xffffffffff660b45,%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jae    1165 <RandomFunc+0x65>
movq   $0x0,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jae    1154 <RandomFunc+0x54>
mov    -0x20(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x20(%rbp)
jmp    1138 <RandomFunc+0x38>
mov    -0x28(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x28(%rbp)
jmp    1125 <RandomFunc+0x25>
mov    -0x18(%rbp),%rcx
add    $0x8bc684f,%rcx
movabs $0x9cdbdcca,%rax
add    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
mov    $0xa4fe505e,%eax
add    (%rdi),%rax
mov    %rax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
%5 = alloca [1 x i64]
%6 = alloca i64
%7 = alloca i64
store i64* %0, i64** %3
store i64* %1, i64** %4
%8 = load i64*, i64** %3
%9 = getelementptr inbounds i64, i64* %8, i64 0
%10 = load i64, i64* %9
%11 = add i64 %10, -10089659
%12 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
store i64 %11, i64* %12
store i64 0, i64* %7
br label %13
13: ; preds = %23, %2
%14 = load i64, i64* %7
%15 = icmp ult i64 %14, 0
br i1 %15, label %16, label %26
16: ; preds = %13
store i64 0, i64* %6
br label %17
17: ; preds = %20, %16
%18 = load i64, i64* %6
%19 = icmp ult i64 %18, 0
br i1 %19, label %20, label %23
20: ; preds = %17
%21 = load i64, i64* %6
%22 = add i64 %21, 2
store i64 %22, i64* %6
br label %17
23: ; preds = %17
%24 = load i64, i64* %7
%25 = add i64 %24, 2
store i64 %25, i64* %7
br label %13
26: ; preds = %13
%27 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%28 = load i64, i64* %27
%29 = add i64 %28, 146565199
%30 = add i64 %29, 2631654602
%31 = load i64*, i64** %4
%32 = getelementptr inbounds i64, i64* %31, i64 0
store i64 %30, i64* %32
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i64* nocapture %0, i64* nocapture writeonly %1) {
%3 = load i64, i64* %0
%4 = add i64 %3, 2768130142
store i64 %4, i64* %1
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int main(int argc, char *argv[]) { return (EXIT_SUCCESS); }


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

x86 assembly (clang, -O2):
<main>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @EXIT_SUCCESS
ret i32 %6
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}
int ilen(int n) {
  int i;
  for (i = 1; n >= 10; i++) {
    n = n / 10;
  }
  return i;
}


x86 assembly (clang, -O0):
<ilen>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0xa,-0x4(%rbp)
jl     1134 <ilen+0x34>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <ilen+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ilen>:
mov    $0x1,%eax
cmp    $0xa,%edi
jl     1134 <ilen+0x34>
mov    $0x1,%eax
mov    $0xcccccccd,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %edi,%edx
imul   %rcx,%rdx
shr    $0x23,%rdx
add    $0x1,%eax
cmp    $0x63,%edi
mov    %edx,%edi
ja     1120 <ilen+0x20>
ret

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

LLVM IR (-O2):
define i32 @ilen(i32 %0) {
%2 = icmp sgt i32 %0, 9
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 1, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = udiv i32 %5, 10
%7 = add nuw nsw i32 %4, 1
%8 = icmp ugt i32 %5, 99
br i1 %8, label %3, label %9
9: ; preds = %3, %1
%10 = phi i32 [ 1, %1 ], [ %7, %3 ]
ret i32 %10
}
/* Type definitions */
struct sockaddr_in6 {
  int /*<<< orphan*/ sin6_addr;
};

/* Variables and functions */
int /*<<< orphan*/ AF_INET6;
int inet_pton(int /*<<< orphan*/, char *, int /*<<< orphan*/ *);
int isValidIpv6Address(char *ipAddress) {
  struct sockaddr_in6 sa;
  int result = inet_pton(AF_INET6, ipAddress, &(sa.sin6_addr));
  return result;
}


x86 assembly (clang, -O0):
<isValidIpv6Address>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1030 <inet_pton@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isValidIpv6Address>:
push   %rax
mov    %rdi,%rsi
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rdx
call   1030 <inet_pton@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.sockaddr_in6 = type { i32 }
@AF_INET6 = global i32 0
define i32 @isValidIpv6Address(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.sockaddr_in6
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i32, i32* @AF_INET6
%6 = load i8*, i8** %2
%7 = getelementptr inbounds %struct.sockaddr_in6, %struct.sockaddr_in6* %3, i32 0, i32 0
%8 = call i32 @inet_pton(i32 %5, i8* %6, i32* %7)
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
%struct.sockaddr_in6 = type { i32 }
@AF_INET6 = global i32 0
define i32 @isValidIpv6Address(i8* %0) {
%2 = alloca %struct.sockaddr_in6
%3 = bitcast %struct.sockaddr_in6* %2 to i8*
%4 = load i32, i32* @AF_INET6
%5 = getelementptr inbounds %struct.sockaddr_in6, %struct.sockaddr_in6* %2, i64 0, i32 0
%6 = call i32 @inet_pton(i32 %4, i8* %0, i32* %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ LibHelloWorld();
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Hello Yocto World...\n");
  LibHelloWorld();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <LibHelloWorld@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [21 x i8] c"Hello Yocto World...\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @LibHelloWorld()
ret i32 0
}
/* Variables and functions */
double ddot_(int *, double *, int *, double *, int *);
double ddot(int N, double *a, int inca, double *b, int incb) {
  return ddot_(&N, a, &inca, b, &incb);
}


x86 assembly (clang, -O0):
<ddot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rcx
lea    -0x4(%rbp),%rdi
lea    -0x14(%rbp),%rdx
lea    -0x24(%rbp),%r8
call   1030 <ddot_@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ddot>:
sub    $0x18,%rsp
mov    %edi,0x14(%rsp)
mov    %edx,0x10(%rsp)
mov    %r8d,0xc(%rsp)
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%r8
call   1030 <ddot_@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @ddot(i32 %0, double* %1, i32 %2, double* %3, i32 %4) {
%6 = alloca i32
%7 = alloca double*
%8 = alloca i32
%9 = alloca double*
%10 = alloca i32
store i32 %0, i32* %6
store double* %1, double** %7
store i32 %2, i32* %8
store double* %3, double** %9
store i32 %4, i32* %10
%11 = load double*, double** %7
%12 = load double*, double** %9
%13 = call double @ddot_(i32* %6, double* %11, i32* %8, double* %12, i32* %10)
ret double %13
}

LLVM IR (-O2):
define double @ddot(i32 %0, double* %1, i32 %2, double* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %6
store i32 %2, i32* %7
store i32 %4, i32* %8
%9 = call double @ddot_(i32* %6, double* %1, i32* %7, double* %3, i32* %8)
ret double %9
}
void CompilerReadFence() { asm volatile("" : : : "memory"); }


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

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

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

LLVM IR (-O2):
define void @CompilerReadFence() {
tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
int test22() {
  int i;
  switch (i)
  default:;
}


x86 assembly (clang, -O0):
<test22>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <test22+0x9>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test22() {
ret i32 undef
}
void XNewModifiermap() {}


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

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

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

LLVM IR (-O2):
define void @XNewModifiermap() {
ret void
}
void g_array_remove_range() {}


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

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

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

LLVM IR (-O2):
define void @g_array_remove_range() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_help(void) {
  printf(
      "Usage: hello-world [OPTION]...\nPrints \"Hello, world!\" to the "
      "console.\n  -h, --help          display this help and exit\n  -v, "
      "--version       display version information and exit\n\nReport bugs to: "
      "<http://github.com/jorgeazevedo/hello-worldo/issues>\nhello-world home "
      "page: <http://github.com/jorgeazevedo/hello-world>\n");
}


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

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

LLVM IR (-O0):
@.str = [317 x i8] c"Usage: hello-world [OPTION]...\0APrints \22Hello, world!\22 to the console.\0A -h, --help display this help and exit\0A -v, --version display version information and exit\0A\0AReport bugs to: <http://github.com/jorgeazevedo/hello-worldo/issues>\0Ahello-world home page: <http://github.com/jorgeazevedo/hello-world>\0A\00"
define void @print_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([317 x i8], [317 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [316 x i8] c"Usage: hello-world [OPTION]...\0APrints \22Hello, world!\22 to the console.\0A -h, --help display this help and exit\0A -v, --version display version information and exit\0A\0AReport bugs to: <http://github.com/jorgeazevedo/hello-worldo/issues>\0Ahello-world home page: <http://github.com/jorgeazevedo/hello-world>\00"
define void @print_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([316 x i8], [316 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int strcmp(char *, char *);
int string_compare(const void *data1, const void *data2) {
  return strcmp((char *)data1, (char *)data2);
}


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

x86 assembly (clang, -O2):
<string_compare>:
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @string_compare(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 i32 @strcmp(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @string_compare(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void exitfunc23(void) {
  printf("Executing exitfunc23.\n");
  exit(0);
}


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

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

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

LLVM IR (-O2):
@str = [22 x i8] c"Executing exitfunc23.\00"
define void @exitfunc23() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
struct protocol_header {
  int dummy;
};
struct data {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ print_transport_layer_proto(int, struct protocol_header *,
                                               struct protocol_header *);
void dsp_pkt_tlproto(int fd, struct protocol_header *datalink_layerph,
                     struct protocol_header *network_layerph,
                     struct protocol_header *transport_layerph,
                     struct data *datagram) {
  print_transport_layer_proto(fd, network_layerph, transport_layerph);
}


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

x86 assembly (clang, -O2):
<dsp_pkt_tlproto>:
mov    %rdx,%rsi
mov    %rcx,%rdx
jmp    1030 <print_transport_layer_proto@plt>

LLVM IR (-O0):
%struct.protocol_header = type { i32 }
%struct.data = type { i32 }
define void @dsp_pkt_tlproto(i32 %0, %struct.protocol_header* %1, %struct.protocol_header* %2, %struct.protocol_header* %3, %struct.data* %4) {
%6 = alloca i32
%7 = alloca %struct.protocol_header*
%8 = alloca %struct.protocol_header*
%9 = alloca %struct.protocol_header*
%10 = alloca %struct.data*
store i32 %0, i32* %6
store %struct.protocol_header* %1, %struct.protocol_header** %7
store %struct.protocol_header* %2, %struct.protocol_header** %8
store %struct.protocol_header* %3, %struct.protocol_header** %9
store %struct.data* %4, %struct.data** %10
%11 = load i32, i32* %6
%12 = load %struct.protocol_header*, %struct.protocol_header** %8
%13 = load %struct.protocol_header*, %struct.protocol_header** %9
%14 = call i32 @print_transport_layer_proto(i32 %11, %struct.protocol_header* %12, %struct.protocol_header* %13)
ret void
}

LLVM IR (-O2):
%struct.protocol_header = type { i32 }
%struct.data = type { i32 }
define void @dsp_pkt_tlproto(i32 %0, %struct.protocol_header* nocapture readnone %1, %struct.protocol_header* %2, %struct.protocol_header* %3, %struct.data* nocapture readnone %4) {
%6 = tail call i32 @print_transport_layer_proto(i32 %0, %struct.protocol_header* %2, %struct.protocol_header* %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ UI;

/* Variables and functions */
int /*<<< orphan*/ UIT_ERROR;
int general_allocate_string(int /*<<< orphan*/ *, char const *,
                            int /*<<< orphan*/, int /*<<< orphan*/,
                            int /*<<< orphan*/, int /*<<< orphan*/ *,
                            int /*<<< orphan*/, int /*<<< orphan*/,
                            int /*<<< orphan*/ *);
int UI_add_error_string(UI *ui, const char *text) {
  return general_allocate_string(ui, text, 0, UIT_ERROR, 0, NULL, 0, 0, NULL);
}


x86 assembly (clang, -O0):
<UI_add_error_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2ec1(%rip),%rax
mov    (%rax),%ecx
xor    %r8d,%r8d
xor    %eax,%eax
mov    %eax,%r9d
mov    %r8d,%edx
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
movq   $0x0,0x10(%rsp)
call   1030 <general_allocate_string@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UI_add_error_string>:
push   %rax
mov    0x2ed8(%rip),%rax
mov    (%rax),%ecx
sub    $0x8,%rsp
xor    %edx,%edx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x0
push   $0x0
call   1030 <general_allocate_string@plt>
add    $0x20,%rsp
pop    %rcx
ret

LLVM IR (-O0):
@UIT_ERROR = global i32 0
define i32 @UI_add_error_string(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = load i8*, i8** %4
%7 = load i32, i32* @UIT_ERROR
%8 = call i32 @general_allocate_string(i32* %5, i8* %6, i32 0, i32 %7, i32 0, i32* null, i32 0, i32 0, i32* null)
ret i32 %8
}

LLVM IR (-O2):
@UIT_ERROR = global i32 0
define i32 @UI_add_error_string(i32* %0, i8* %1) {
%3 = load i32, i32* @UIT_ERROR
%4 = tail call i32 @general_allocate_string(i32* %0, i8* %1, i32 0, i32 %3, i32 0, i32* null, i32 0, i32 0, i32* null)
ret i32 %4
}
/* Type definitions */
typedef unsigned char uint16_t;

/* Variables and functions */
uint16_t get_uint16be(unsigned char *p) { return ((p[0] << 8) | p[1]); }


x86 assembly (clang, -O0):
<get_uint16be>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
or     %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_uint16be>:
mov    0x1(%rdi),%al
ret

LLVM IR (-O0):
define zeroext i8 @get_uint16be(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl i32 %6, 8
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = or i32 %7, %11
%13 = trunc i32 %12 to i8
ret i8 %13
}

LLVM IR (-O2):
define zeroext i8 @get_uint16be(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
ret i8 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
int /*<<< orphan*/ atomic_fetchstore8(int /*<<< orphan*/ *, int);
int8_t spin_trylock_xchg(int8_t *lock) { return atomic_fetchstore8(lock, 1); }


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

x86 assembly (clang, -O2):
<spin_trylock_xchg>:
mov    $0x1,%esi
jmp    1030 <atomic_fetchstore8@plt>

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

LLVM IR (-O2):
define i32 @spin_trylock_xchg(i32* %0) {
%2 = tail call i32 @atomic_fetchstore8(i32* %0, i32 1)
ret i32 %2
}