xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ gen_inc(char, char);
char inc(char);
int /*<<< orphan*/ limit2_i8(char *, int /*<<< orphan*/, int);
char mksym_i8();
void test_inc() {
  char x, r;
  x = mksym_i8();
  limit2_i8(&x, 0, 127);
  r = inc(x);
  gen_inc(x, r);
}


x86 assembly (clang, -O0):
<test_inc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <mksym_i8@plt>
mov    %al,-0x1(%rbp)
lea    -0x1(%rbp),%rdi
xor    %esi,%esi
mov    $0x7f,%edx
call   1030 <limit2_i8@plt>
movsbl -0x1(%rbp),%edi
call   1060 <inc@plt>
mov    %al,-0x2(%rbp)
mov    -0x1(%rbp),%al
movsbl %al,%edi
movsbl -0x2(%rbp),%esi
call   1050 <gen_inc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_inc>:
push   %rax
xor    %eax,%eax
call   1040 <mksym_i8@plt>
mov    %al,0x7(%rsp)
lea    0x7(%rsp),%rdi
xor    %esi,%esi
mov    $0x7f,%edx
call   1030 <limit2_i8@plt>
movsbl 0x7(%rsp),%edi
call   1060 <inc@plt>
movsbl 0x7(%rsp),%edi
movsbl %al,%esi
call   1050 <gen_inc@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @test_inc() {
%1 = alloca i8
%2 = alloca i8
%3 = call signext i8 (...) @mksym_i8()
store i8 %3, i8* %1
%4 = call i32 @limit2_i8(i8* %1, i32 0, i32 127)
%5 = load i8, i8* %1
%6 = call signext i8 @inc(i8 signext %5)
store i8 %6, i8* %2
%7 = load i8, i8* %1
%8 = load i8, i8* %2
%9 = call i32 @gen_inc(i8 signext %7, i8 signext %8)
ret void
}

LLVM IR (-O2):
define void @test_inc() {
%1 = alloca i8
%2 = tail call signext i8 (...) @mksym_i8()
store i8 %2, i8* %1
%3 = call i32 @limit2_i8(i8* %1, i32 0, i32 127)
%4 = load i8, i8* %1
%5 = call signext i8 @inc(i8 signext %4)
%6 = load i8, i8* %1
%7 = call i32 @gen_inc(i8 signext %6, i8 signext %5)
ret void
}
/* Variables and functions */
char *strstr(char const *, char const *);
long int strpos(const char *haystack, const char *needle) {
  char *position = strstr(haystack, needle);
  return position ? position - haystack : -1;
}


x86 assembly (clang, -O0):
<strpos>:
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   1030 <strstr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1150 <strpos+0x40>
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x20(%rbp)
jmp    1160 <strpos+0x50>
mov    $0xffffffffffffffff,%rax
mov    %rax,-0x20(%rbp)
jmp    1160 <strpos+0x50>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strpos>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strstr@plt>
mov    %rax,%rcx
sub    %rbx,%rcx
cmp    $0x1,%rax
sbb    %rax,%rax
or     %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @strpos(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** %4
%8 = call i8* @strstr(i8* %6, i8* %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %17
11: ; preds = %2
%12 = load i8*, i8** %5
%13 = load i8*, i8** %3
%14 = ptrtoint i8* %12 to i64
%15 = ptrtoint i8* %13 to i64
%16 = sub i64 %14, %15
br label %18
17: ; preds = %2
br label %18
18: ; preds = %17, %11
%19 = phi i64 [ %16, %11 ], [ -1, %17 ]
ret i64 %19
}

LLVM IR (-O2):
define i64 @strpos(i8* %0, i8* nocapture %1) {
%3 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = icmp eq i8* %3, null
%5 = ptrtoint i8* %3 to i64
%6 = ptrtoint i8* %0 to i64
%7 = sub i64 %5, %6
%8 = select i1 %4, i64 -1, i64 %7
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
void se_deconnecter(int sd) {
  printf("Deconnexion du client en cours...\n");
  sleep(3);
  close(sd);
  printf("Deconnexion reussie\nA bientôt!\n");
}


x86 assembly (clang, -O0):
<se_deconnecter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    $0x3,%edi
call   1050 <sleep@plt>
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<se_deconnecter>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rdi
call   1030 <puts@plt>
mov    $0x3,%edi
call   1050 <sleep@plt>
mov    %ebx,%edi
call   1040 <close@plt>
lea    0xecb(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"Deconnexion du client en cours...\0A\00"
@.str.1 = [33 x i8] c"Deconnexion reussie\0AA bient\C3\B4t!\0A\00"
define void @se_deconnecter(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @sleep(i32 3)
%5 = load i32, i32* %2
%6 = call i32 @close(i32 %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [34 x i8] c"Deconnexion du client en cours...\00"
@str.2 = [32 x i8] c"Deconnexion reussie\0AA bient\C3\B4t!\00"
define void @se_deconnecter(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @sleep(i32 3)
%4 = tail call i32 @close(i32 %0)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
uint8_t *_mcp_strrchr(uint8_t *p, uint8_t *start, uint8_t c) {
  while (p >= start) {
    if (*p == c) {
      return p;
    }
    p--;
  }
  return NULL;
}


x86 assembly (clang, -O0):
<_mcp_strrchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jb     114d <_mcp_strrchr+0x4d>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
cmp    -0x20(%rbp),%rax
jne    113c <_mcp_strrchr+0x3c>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1155 <_mcp_strrchr+0x55>
mov    -0x10(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <_mcp_strrchr+0x10>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mcp_strrchr>:
cmp    %rsi,%rdi
jb     111e <_mcp_strrchr+0x1e>
mov    %rdi,%rax
nopl   0x0(%rax,%rax,1)
cmp    %rdx,(%rax)
je     1120 <_mcp_strrchr+0x20>
add    $0xfffffffffffffff8,%rax
cmp    %rsi,%rax
jae    1110 <_mcp_strrchr+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64* @_mcp_strrchr(i64* %0, i64* readnone %1, i64 %2) {
%4 = icmp ult i64* %0, %1
br i1 %4, label %12, label %5
5: ; preds = %3, %9
%6 = phi i64* [ %10, %9 ], [ %0, %3 ]
%7 = load i64, i64* %6
%8 = icmp eq i64 %7, %2
br i1 %8, label %12, label %9
9: ; preds = %5
%10 = getelementptr inbounds i64, i64* %6, i64 -1
%11 = icmp ult i64* %10, %1
br i1 %11, label %12, label %5
12: ; preds = %5, %9, %3
%13 = phi i64* [ null, %3 ], [ null, %9 ], [ %6, %5 ]
ret i64* %13
}
int test_imm_F7uint8_mem(unsigned char *val) {
  return ((*val) & (0xF7 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_F7uint8_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, 247
%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_F7uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -9
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void set_wallpaper(char *str) {
  printf("can't automatically set wallpaper on Linux, please set your "
         "wallpaper path to ~/.fractalart/wallpaper.bmp\n");
}


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

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

LLVM IR (-O0):
@.str = [107 x i8] c"can't automatically set wallpaper on Linux, please set your wallpaper path to ~/.fractalart/wallpaper.bmp\0A\00"
define void @set_wallpaper(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([107 x i8], [107 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [106 x i8] c"can't automatically set wallpaper on Linux, please set your wallpaper path to ~/.fractalart/wallpaper.bmp\00"
define void @set_wallpaper(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ nl_catd;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
nl_catd catopen(const char *name, int type) {
  printf("Warning: catopen ignored\n");
  return (nl_catd)-1;
}


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"Warning: catopen ignored\0A\00"
define i32 @catopen(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@str = [25 x i8] c"Warning: catopen ignored\00"
define i32 @catopen(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void wreport_error(char *msg) { printf("Wick Core Error: %s\n", msg); }


x86 assembly (clang, -O0):
<wreport_error>:
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):
<wreport_error>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [21 x i8] c"Wick Core Error: %s\0A\00"
define void @wreport_error(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ static_declare();
int used(int x) {
  static_declare();
  return 2 * x;
}


x86 assembly (clang, -O0):
<used>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <static_declare@plt>
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<used>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <static_declare@plt>
add    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @used(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @static_declare()
%4 = load i32, i32* %2
%5 = mul nsw i32 2, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @used(i32 %0) {
%2 = tail call i32 (...) @static_declare()
%3 = shl nsw i32 %0, 1
ret i32 %3
}
void evf_msg_exit(void) { return; }


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

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

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

LLVM IR (-O2):
define void @evf_msg_exit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ launchFirm();
int /*<<< orphan*/ loadFirm();
int /*<<< orphan*/ loadSplash();
int /*<<< orphan*/ mountSD();
int /*<<< orphan*/ patchFirm();
int main() {
  mountSD();
  loadSplash();
  loadFirm();
  patchFirm();
  launchFirm();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <mountSD@plt>
mov    $0x0,%al
call   1060 <loadSplash@plt>
mov    $0x0,%al
call   1030 <loadFirm@plt>
mov    $0x0,%al
call   1050 <patchFirm@plt>
mov    $0x0,%al
call   1070 <launchFirm@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <mountSD@plt>
xor    %eax,%eax
call   1060 <loadSplash@plt>
xor    %eax,%eax
call   1030 <loadFirm@plt>
xor    %eax,%eax
call   1050 <patchFirm@plt>
xor    %eax,%eax
call   1070 <launchFirm@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @mountSD()
%3 = call i32 (...) @loadSplash()
%4 = call i32 (...) @loadFirm()
%5 = call i32 (...) @patchFirm()
%6 = call i32 (...) @launchFirm()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @mountSD()
%2 = tail call i32 (...) @loadSplash()
%3 = tail call i32 (...) @loadFirm()
%4 = tail call i32 (...) @patchFirm()
%5 = tail call i32 (...) @launchFirm()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "usage: maemo-application-running -x executable-file\n");
  fprintf(stderr, "       maemo-application-running -d app.desktop\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf06(%rip),%rsi
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [53 x i8] c"usage: maemo-application-running -x executable-file\0A\00"
@.str.1 = [49 x i8] c" maemo-application-running -d app.desktop\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [53 x i8] c"usage: maemo-application-running -x executable-file\0A\00"
@.str.1 = [49 x i8] c" maemo-application-running -d app.desktop\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ GLint;
typedef int /*<<< orphan*/ GLenum;

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


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

x86 assembly (clang, -O2):
<__glGetHistogramParameteriv_size>:
jmp    1030 <__glGetHistogramParameterfv_size@plt>

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

LLVM IR (-O2):
define i32 @__glGetHistogramParameteriv_size(i32 %0) {
%2 = tail call i32 @__glGetHistogramParameterfv_size(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void changeUser(char *user) { printf("User is: %s", user); }


x86 assembly (clang, -O0):
<changeUser>:
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):
<changeUser>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [12 x i8] c"User is: %s\00"
define void @changeUser(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
unsigned fun(int x) { return x + 0u; }


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

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

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

LLVM IR (-O2):
define i32 @fun(i32 returned %0) {
ret i32 %0
}
void vset(float v[3], float x, float y, float z) {
  v[0] = x;
  v[1] = y;
  v[2] = z;
}


x86 assembly (clang, -O0):
<vset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
movss  %xmm2,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
movss  -0x14(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @vset(float* %0, float %1, float %2, float %3) {
%5 = alloca float*
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float* %0, float** %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %6
%10 = load float*, float** %5
%11 = getelementptr inbounds float, float* %10, i64 0
store float %9, float* %11
%12 = load float, float* %7
%13 = load float*, float** %5
%14 = getelementptr inbounds float, float* %13, i64 1
store float %12, float* %14
%15 = load float, float* %8
%16 = load float*, float** %5
%17 = getelementptr inbounds float, float* %16, i64 2
store float %15, float* %17
ret void
}

LLVM IR (-O2):
define void @vset(float* nocapture writeonly %0, float %1, float %2, float %3) {
store float %1, float* %0
%5 = getelementptr inbounds float, float* %0, i64 1
store float %2, float* %5
%6 = getelementptr inbounds float, float* %0, i64 2
store float %3, float* %6
ret void
}
/* Type definitions */
struct sockaddr {
  int sa_data;
  int /*<<< orphan*/ sa_family;
};
typedef int /*<<< orphan*/ sa_family_t;
typedef int /*<<< orphan*/ sa;

/* Variables and functions */
int /*<<< orphan*/ bind(int, struct sockaddr *, int);
int main() {
  struct sockaddr sa = {
      .sa_family = (sa_family_t)-1,
      .sa_data = 42,
  };
  bind(-1, &sa, sizeof(sa));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    $0xffffffff,%edi
lea    -0x10(%rbp),%rsi
mov    $0x8,%edx
call   1030 <bind@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movabs $0xffffffff0000002a,%rax
ff ff ff
mov    %rax,(%rsp)
mov    %rsp,%rsi
mov    $0xffffffff,%edi
mov    $0x8,%edx
call   1030 <bind@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.sockaddr = type { i32, i32 }
@__const.main.sa = %struct.sockaddr { i32 42, i32 -1 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.sockaddr
store i32 0, i32* %1
%3 = bitcast %struct.sockaddr* %2 to i8*
%4 = call i32 @bind(i32 -1, %struct.sockaddr* %2, i32 8)
ret i32 0
}

LLVM IR (-O2):
%struct.sockaddr = type { i32, i32 }
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to %struct.sockaddr*
%3 = bitcast i64* %1 to i8*
store i64 -4294967254, i64* %1
%4 = call i32 @bind(i32 -1, %struct.sockaddr* %2, i32 8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ boolExpression();
int /*<<< orphan*/ emitln(char *, char);
char getName();
int /*<<< orphan*/ match(char);
void assignment() {
  char name;
  name = getName();
  match('=');
  boolExpression();
  emitln("mov\t%%eax,%c", name);
}


x86 assembly (clang, -O0):
<assignment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <getName@plt>
mov    %al,-0x1(%rbp)
mov    $0x3d,%edi
call   1040 <match@plt>
mov    $0x0,%al
call   1050 <boolExpression@plt>
lea    0xe96(%rip),%rdi
movsbl -0x1(%rbp),%esi
call   1030 <emitln@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assignment>:
push   %rbx
xor    %eax,%eax
call   1060 <getName@plt>
mov    %eax,%ebx
mov    $0x3d,%edi
call   1040 <match@plt>
xor    %eax,%eax
call   1050 <boolExpression@plt>
movsbl %bl,%esi
lea    0xe9b(%rip),%rdi
pop    %rbx
jmp    1030 <emitln@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"mov\09%%eax,%c\00"
define void @assignment() {
%1 = alloca i8
%2 = call signext i8 (...) @getName()
store i8 %2, i8* %1
%3 = call i32 @match(i8 signext 61)
%4 = call i32 (...) @boolExpression()
%5 = load i8, i8* %1
%6 = call i32 @emitln(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8 signext %5)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"mov\09%%eax,%c\00"
define void @assignment() {
%1 = tail call signext i8 (...) @getName()
%2 = tail call i32 @match(i8 signext 61)
%3 = tail call i32 (...) @boolExpression()
%4 = tail call i32 @emitln(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8 signext %1)
ret void
}
/* Variables and functions */
scalar_t__ board_is_bbg1();
scalar_t__ board_is_bone();
scalar_t__ board_is_bone_lt();
scalar_t__ board_is_pb();
int board_is_beaglebonex(void) {
  return board_is_pb() || board_is_bone() || board_is_bone_lt() ||
         board_is_bbg1();
}


x86 assembly (clang, -O0):
<board_is_beaglebonex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <board_is_pb@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
jne    11a4 <board_is_beaglebonex+0x64>
mov    $0x0,%al
call   1030 <board_is_bone@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
jne    11a4 <board_is_beaglebonex+0x64>
mov    $0x0,%al
call   1060 <board_is_bone_lt@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
jne    11a4 <board_is_beaglebonex+0x64>
mov    $0x0,%al
call   1050 <board_is_bbg1@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<board_is_beaglebonex>:
push   %rbx
xor    %eax,%eax
call   1040 <board_is_pb@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    1179 <board_is_beaglebonex+0x39>
xor    %eax,%eax
call   1030 <board_is_bone@plt>
test   %rax,%rax
jne    1179 <board_is_beaglebonex+0x39>
xor    %eax,%eax
call   1060 <board_is_bone_lt@plt>
test   %rax,%rax
jne    1179 <board_is_beaglebonex+0x39>
xor    %eax,%eax
call   1050 <board_is_bbg1@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @board_is_beaglebonex() {
%1 = call i64 (...) @board_is_pb()
%2 = icmp ne i64 %1, 0
br i1 %2, label %12, label %3
3: ; preds = %0
%4 = call i64 (...) @board_is_bone()
%5 = icmp ne i64 %4, 0
br i1 %5, label %12, label %6
6: ; preds = %3
%7 = call i64 (...) @board_is_bone_lt()
%8 = icmp ne i64 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %6
%10 = call i64 (...) @board_is_bbg1()
%11 = icmp ne i64 %10, 0
br label %12
12: ; preds = %9, %6, %3, %0
%13 = phi i1 [ true, %6 ], [ true, %3 ], [ true, %0 ], [ %11, %9 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @board_is_beaglebonex() {
%1 = tail call i64 (...) @board_is_pb()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %13
3: ; preds = %0
%4 = tail call i64 (...) @board_is_bone()
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %13
6: ; preds = %3
%7 = tail call i64 (...) @board_is_bone_lt()
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %6
%10 = tail call i64 (...) @board_is_bbg1()
%11 = icmp ne i64 %10, 0
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %9, %6, %3, %0
%14 = phi i32 [ 1, %6 ], [ 1, %3 ], [ 1, %0 ], [ %12, %9 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ rtc_enable_output();
int /*<<< orphan*/ rtc_set_frequency(int);
int main(int argc, char **argv) {
  rtc_set_frequency(3);
  rtc_enable_output();
  (void)argc;
  (void)argv;
  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)
mov    $0x3,%edi
call   1040 <rtc_set_frequency@plt>
mov    $0x0,%al
call   1030 <rtc_enable_output@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @rtc_set_frequency(i32 3)
%7 = call i32 (...) @rtc_enable_output()
%8 = load i32, i32* %4
%9 = load i8**, i8*** %5
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @rtc_set_frequency(i32 3)
%4 = tail call i32 (...) @rtc_enable_output()
ret i32 0
}
void EarlyInitGLXfnPointers() {}


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

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

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

LLVM IR (-O2):
define void @EarlyInitGLXfnPointers() {
ret void
}
/* Variables and functions */
void *dummy_malloc(size_t);
void *dummy_calloc(size_t nmemb, size_t size) {
  void *ptr = dummy_malloc(nmemb * size);
  unsigned int i = 0;
  for (; i < nmemb * size; ++i)
    *((char *)((char *)ptr + i)) = '\0';
  return ptr;
}


x86 assembly (clang, -O0):
<dummy_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
imul   -0x10(%rbp),%rdi
call   1030 <dummy_malloc@plt>
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x8(%rbp),%rcx
imul   -0x10(%rbp),%rcx
cmp    %rcx,%rax
jae    1167 <dummy_calloc+0x57>
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
movb   $0x0,(%rax,%rcx,1)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1139 <dummy_calloc+0x29>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dummy_calloc>:
push   %rbx
mov    %rdi,%rbx
imul   %rsi,%rbx
mov    %rbx,%rdi
call   1030 <dummy_malloc@plt>
test   %rbx,%rbx
je     113c <dummy_calloc+0x2c>
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
movb   $0x0,(%rax,%rcx,1)
add    $0x1,%ecx
cmp    %rcx,%rbx
ja     1130 <dummy_calloc+0x20>
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @dummy_calloc(i64 %0, i64 %1) {
%3 = mul i64 %1, %0
%4 = tail call i8* @dummy_malloc(i64 %3)
%5 = icmp eq i64 %3, 0
br i1 %5, label %12, label %6
6: ; preds = %2, %6
%7 = phi i64 [ %10, %6 ], [ 0, %2 ]
%8 = getelementptr inbounds i8, i8* %4, i64 %7
store i8 0, i8* %8
%9 = add nuw nsw i64 %7, 1
%10 = and i64 %9, 4294967295
%11 = icmp ugt i64 %3, %10
br i1 %11, label %6, label %12
12: ; preds = %6, %2
ret i8* %4
}
char *langEnumControlsJoyArkanoidPad() { return "Arkanoid Pad"; }


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

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

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

LLVM IR (-O2):
@.str = [13 x i8] c"Arkanoid Pad\00"
define i8* @langEnumControlsJoyArkanoidPad() {
ret i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0)
}
void usb_wake(void) {}


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

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

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

LLVM IR (-O2):
define void @usb_wake() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void free_simd(void *p) { free(p); }


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

x86 assembly (clang, -O2):
<free_simd>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_simd(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *);
int /*<<< orphan*/ puts(char *);
void print_usage(const char *prog) {
  printf("Usage: %s [-DsbdlHOLC3]\n", prog);
  puts("  -D --device   device to use (default /dev/spidev1.1)\n"
       "  -s --speed    max speed (Hz)\n"
       "  -d --delay    delay (usec) 0 default\n"
       "  -b --bpw      bits per word \n"
       "  -l --loop     loopback\n"
       "  -H --cpha     clock phase\n"
       "  -O --cpol     clock polarity\n"
       "  -L --lsb      least significant bit first\n"
       "  -C --cs-high  chip select active high\n"
       "  -3 --3wire    SI/SO signals shared\n");
  exit(1);
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
lea    0xec6(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
call   1040 <printf@plt>
lea    0xed2(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Usage: %s [-DsbdlHOLC3]\0A\00"
@.str.1 = [362 x i8] c" -D --device device to use (default /dev/spidev1.1)\0A -s --speed max speed (Hz)\0A -d --delay delay (usec) 0 default\0A -b --bpw bits per word \0A -l --loop loopback\0A -H --cpha clock phase\0A -O --cpol clock polarity\0A -L --lsb least significant bit first\0A -C --cs-high chip select active high\0A -3 --3wire SI/SO signals shared\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @puts(i8* getelementptr inbounds ([362 x i8], [362 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [25 x i8] c"Usage: %s [-DsbdlHOLC3]\0A\00"
@.str.1 = [362 x i8] c" -D --device device to use (default /dev/spidev1.1)\0A -s --speed max speed (Hz)\0A -d --delay delay (usec) 0 default\0A -b --bpw bits per word \0A -l --loop loopback\0A -H --cpha clock phase\0A -O --cpol clock polarity\0A -L --lsb least significant bit first\0A -C --cs-high chip select active high\0A -3 --3wire SI/SO signals shared\0A\00"
define void @print_usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([362 x i8], [362 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @exit(i32 1)
unreachable
}
int test_imm_D8int64_lowword_reg(long long val) {
  return ((val) & (0xD8 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_D8int64_lowword_reg>:
test   $0xd8,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_D8int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 216
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
void __cleanup_fclose_func(FILE **f) {
  if (*f)
    fclose(*f);
}


x86 assembly (clang, -O0):
<__cleanup_fclose_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1136 <__cleanup_fclose_func+0x26>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__cleanup_fclose_func>:
mov    (%rdi),%rdi
test   %rdi,%rdi
je     111d <__cleanup_fclose_func+0xd>
jmp    1030 <fclose@plt>
ret

LLVM IR (-O0):
define void @__cleanup_fclose_func(i32** %0) {
%2 = alloca i32**
store i32** %0, i32*** %2
%3 = load i32**, i32*** %2
%4 = load i32*, i32** %3
%5 = icmp ne i32* %4, null
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32**, i32*** %2
%8 = load i32*, i32** %7
%9 = call i32 @fclose(i32* %8)
br label %10
10: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @__cleanup_fclose_func(i32** nocapture %0) {
%2 = load i32*, i32** %0
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %2)
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FlightStatsSettingsHandle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void FlightStatsSettingsUpdated() {
  UAVObjUpdated(FlightStatsSettingsHandle());
}


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

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

LLVM IR (-O0):
define void @FlightStatsSettingsUpdated() {
%1 = call i32 (...) @FlightStatsSettingsHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @FlightStatsSettingsUpdated() {
%1 = tail call i32 (...) @FlightStatsSettingsHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
int max17058_get_soc_for_led(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @max17058_get_soc_for_led() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ wNotYet(char *);
void wBuiltinChDir() { wNotYet("ChDir"); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"ChDir\00"
define void @wBuiltinChDir() {
%1 = tail call i32 @wNotYet(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
float sk_biscale(float in, float min, float max) {
  return min + (in + 1.0) * 0.5 * (max - min);
}


x86 assembly (clang, -O0):
<sk_biscale>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xedb(%rip),%xmm2
addsd  %xmm2,%xmm0
movsd  0xec7(%rip),%xmm2
mulsd  %xmm2,%xmm0
movss  -0xc(%rbp),%xmm2
subss  -0x8(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sk_biscale>:
cvtss2sd %xmm1,%xmm3
cvtss2sd %xmm0,%xmm0
addsd  0xef0(%rip),%xmm0
mulsd  0xef0(%rip),%xmm0
subss  %xmm1,%xmm2
xorps  %xmm1,%xmm1
cvtss2sd %xmm2,%xmm1
mulsd  %xmm0,%xmm1
addsd  %xmm3,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @sk_biscale(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 = fpext float %7 to double
%9 = load float, float* %4
%10 = fpext float %9 to double
%11 = fadd double %10, 1.000000e+00
%12 = fmul double %11, 5.000000e-01
%13 = load float, float* %6
%14 = load float, float* %5
%15 = fsub float %13, %14
%16 = fpext float %15 to double
%17 = call double @llvm.fmuladd.f64(double %12, double %16, double %8)
%18 = fptrunc double %17 to float
ret float %18
}

LLVM IR (-O2):
define float @sk_biscale(float %0, float %1, float %2) {
%4 = fpext float %1 to double
%5 = fpext float %0 to double
%6 = fadd double %5, 1.000000e+00
%7 = fmul double %6, 5.000000e-01
%8 = fsub float %2, %1
%9 = fpext float %8 to double
%10 = tail call double @llvm.fmuladd.f64(double %7, double %9, double %4)
%11 = fptrunc double %10 to float
ret float %11
}
/* Variables and functions */
int mut_rec1(int);
int mut_rec2(int n) {
  if (n == 0)
    return 1;
  return mut_rec1(n - 1);
}


x86 assembly (clang, -O0):
<mut_rec2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <mut_rec2+0x21>
movl   $0x1,-0x4(%rbp)
jmp    113f <mut_rec2+0x2f>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <mut_rec1@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mut_rec2>:
test   %edi,%edi
je     111c <mut_rec2+0xc>
add    $0xffffffff,%edi
jmp    1030 <mut_rec1@plt>
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @mut_rec2(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = tail call i32 @mut_rec1(i32 %4)
br label %6
6: ; preds = %1, %3
%7 = phi i32 [ %5, %3 ], [ 1, %1 ]
ret i32 %7
}
void RTTimerStart(void) {}


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

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

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

LLVM IR (-O2):
define void @RTTimerStart() {
ret void
}
m2() {}


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

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

LLVM IR (-O0):
define i32 @m2() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @m2() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ host_events_shutdown();
int /*<<< orphan*/ host_threads_shutdown();
void host_shutdown(void) {
  host_events_shutdown();
  host_threads_shutdown();
}


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

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

LLVM IR (-O0):
define void @host_shutdown() {
%1 = call i32 (...) @host_events_shutdown()
%2 = call i32 (...) @host_threads_shutdown()
ret void
}

LLVM IR (-O2):
define void @host_shutdown() {
%1 = tail call i32 (...) @host_events_shutdown()
%2 = tail call i32 (...) @host_threads_shutdown()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ value;
typedef int /*<<< orphan*/ uint8_t;
typedef uintptr_t uint32_t;

/* Variables and functions */
int /*<<< orphan*/ rgph_murmur32s_finalise(int, uintptr_t *);
int /*<<< orphan*/ rgph_murmur32s_mix(int /*<<< orphan*/, uintptr_t *, int);
uint32_t rgph_u32_murmur32s_u8(uint8_t value, uintptr_t seed) {
  uint32_t h[1] = {seed};
  rgph_murmur32s_mix(value, h, 1);
  rgph_murmur32s_finalise(sizeof(value), h);
  return h[0];
}


x86 assembly (clang, -O0):
<rgph_u32_murmur32s_u8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x18(%rbp),%rsi
mov    $0x1,%edx
call   1030 <rgph_murmur32s_mix@plt>
lea    -0x18(%rbp),%rsi
mov    $0x4,%edi
call   1040 <rgph_murmur32s_finalise@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rgph_u32_murmur32s_u8>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,0x8(%rsp)
lea    0x8(%rsp),%rbx
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <rgph_murmur32s_mix@plt>
mov    $0x4,%edi
mov    %rbx,%rsi
call   1040 <rgph_murmur32s_finalise@plt>
mov    0x8(%rsp),%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i64 @rgph_u32_murmur32s_u8(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca [1 x i64]
store i32 %0, i32* %3
store i64 %1, i64* %4
%6 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%7 = load i64, i64* %4
store i64 %7, i64* %6
%8 = load i32, i32* %3
%9 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%10 = call i32 @rgph_murmur32s_mix(i32 %8, i64* %9, i32 1)
%11 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%12 = call i32 @rgph_murmur32s_finalise(i32 4, i64* %11)
%13 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%14 = load i64, i64* %13
ret i64 %14
}

LLVM IR (-O2):
define i64 @rgph_u32_murmur32s_u8(i32 %0, i64 %1) {
%3 = alloca [1 x i64]
%4 = bitcast [1 x i64]* %3 to i8*
%5 = getelementptr inbounds [1 x i64], [1 x i64]* %3, i64 0, i64 0
store i64 %1, i64* %5
%6 = call i32 @rgph_murmur32s_mix(i32 %0, i64* %5, i32 1)
%7 = call i32 @rgph_murmur32s_finalise(i32 4, i64* %5)
%8 = load i64, i64* %5
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/ DebugLogStatusHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void DebugLogStatusRequestUpdate() {
  UAVObjRequestUpdate(DebugLogStatusHandle());
}


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

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

LLVM IR (-O0):
define void @DebugLogStatusRequestUpdate() {
%1 = call i32 (...) @DebugLogStatusHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @DebugLogStatusRequestUpdate() {
%1 = tail call i32 (...) @DebugLogStatusHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void swap(int *m, int *n) {
  int temp;
  temp = *m;
  *m = *n;
  *n = temp;
  printf("*m = %d\t *n = %d\n", *m, *n);
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
mov    (%rdi),%edx
mov    (%rsi),%eax
mov    %eax,(%rdi)
mov    %edx,(%rsi)
mov    (%rdi),%esi
lea    0xedf(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"*m = %d\09 *n = %d\0A\00"
define void @swap(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
%7 = load i32, i32* %6
store i32 %7, i32* %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = load i32*, i32** %4
store i32 %11, i32* %12
%13 = load i32*, i32** %3
%14 = load i32, i32* %13
%15 = load i32*, i32** %4
%16 = load i32, i32* %15
%17 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %14, i32 %16)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"*m = %d\09 *n = %d\0A\00"
define void @swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
%5 = load i32, i32* %0
%6 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %3)
ret void
}