xunge/DecIR huggingface dataset:
int sys$modify(struct _fab *fab, void *err, void *suc) {
  return ({
    unsigned long resultvar;
    register long int _a3 asm("rdx") = (long)(suc);
    register long int _a2 asm("rsi") = (long)(err);
    register long int _a1 asm("rdi") = (long)(fab);
    asm volatile("movq %1, %%rax\n\t"
                 "int $0x82\n\t"
                 : "=a"(resultvar)
                 : "i"(14), "r"(_a1), "r"(_a2), "r"(_a3)
                 : "memory", "cc", "r11", "cx");
    (long)resultvar;
  });
}


x86 assembly (clang, -O0):
<sys$modify>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    $0xe,%rax
int    $0x82
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys$modify>:
mov    $0xe,%rax
int    $0x82
ret

LLVM IR (-O0):
%struct._fab = type opaque
define i32 @"sys$modify"(%struct._fab* %0, i8* %1, i8* %2) {
%4 = alloca %struct._fab*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
store %struct._fab* %0, %struct._fab** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%12 = load i8*, i8** %6
%13 = ptrtoint i8* %12 to i64
store i64 %13, i64* %8
%14 = load i8*, i8** %5
%15 = ptrtoint i8* %14 to i64
store i64 %15, i64* %9
%16 = load %struct._fab*, %struct._fab** %4
%17 = ptrtoint %struct._fab* %16 to i64
store i64 %17, i64* %10
%18 = load i64, i64* %10
%19 = load i64, i64* %9
%20 = load i64, i64* %8
%21 = call i64 asm sideeffect "movq $1, %rax\0A\09int $$0x82\0A\09", "={ax},i,{rdi},{rsi},{rdx},~{memory},~{cc},~{r11},~{cx},~{dirflag},~{fpsr},~{flags}"(i32 14, i64 %18, i64 %19, i64 %20)
store i64 %21, i64* %7
%22 = load i64, i64* %7
store i64 %22, i64* %11
%23 = load i64, i64* %11
%24 = trunc i64 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
%struct._fab = type opaque
define i32 @"sys$modify"(%struct._fab* %0, i8* %1, i8* %2) {
%4 = ptrtoint i8* %2 to i64
%5 = ptrtoint i8* %1 to i64
%6 = ptrtoint %struct._fab* %0 to i64
%7 = tail call i64 asm sideeffect "movq $1, %rax\0A\09int $$0x82\0A\09", "={ax},i,{rdi},{rsi},{rdx},~{memory},~{cc},~{r11},~{cx},~{dirflag},~{fpsr},~{flags}"(i32 14, i64 %6, i64 %5, i64 %4)
%8 = trunc i64 %7 to i32
ret i32 %8
}
/* Type definitions */
struct upnphttp {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ BuildResp2_upnphttp(struct upnphttp *, int, char *,
                                       char const *, int);
void BuildResp_upnphttp(struct upnphttp *h, const char *body, int bodylen) {
  BuildResp2_upnphttp(h, 200, "OK", body, bodylen);
}


x86 assembly (clang, -O0):
<BuildResp_upnphttp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
mov    $0xc8,%esi
lea    0xec5(%rip),%rdx
call   1030 <BuildResp2_upnphttp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BuildResp_upnphttp>:
mov    %edx,%r8d
mov    %rsi,%rcx
lea    0xee3(%rip),%rdx
mov    $0xc8,%esi
jmp    1030 <BuildResp2_upnphttp@plt>

LLVM IR (-O0):
%struct.upnphttp = type { i32 }
@.str = [3 x i8] c"OK\00"
define void @BuildResp_upnphttp(%struct.upnphttp* %0, i8* %1, i32 %2) {
%4 = alloca %struct.upnphttp*
%5 = alloca i8*
%6 = alloca i32
store %struct.upnphttp* %0, %struct.upnphttp** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load %struct.upnphttp*, %struct.upnphttp** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @BuildResp2_upnphttp(%struct.upnphttp* %7, i32 200, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %8, i32 %9)
ret void
}

LLVM IR (-O2):
%struct.upnphttp = type { i32 }
@.str = [3 x i8] c"OK\00"
define void @BuildResp_upnphttp(%struct.upnphttp* %0, i8* %1, i32 %2) {
%4 = tail call i32 @BuildResp2_upnphttp(%struct.upnphttp* %0, i32 200, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %2)
ret void
}
void _Jv_CheckArrayStore() {}


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

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

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

LLVM IR (-O2):
define void @_Jv_CheckArrayStore() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void *realloc(void *, size_t);
void *xrealloc(void *ptr, size_t sz) {
  void *p = realloc(ptr, sz);
  assert(p || !sz);
  return p;
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
mov    $0x1,%al
cmpq   $0x0,-0x18(%rbp)
mov    %al,-0x19(%rbp)
jne    115e <xrealloc+0x3e>
cmpq   $0x0,-0x10(%rbp)
setne  %al
xor    $0xff,%al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1040 <realloc@plt>
mov    %rax,%r14
test   %rax,%rax
setne  %al
test   %rbx,%rbx
sete   %cl
or     %al,%cl
movzbl %cl,%edi
call   1030 <assert@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @xrealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %15, label %11
11: ; preds = %2
%12 = load i64, i64* %4
%13 = icmp ne i64 %12, 0
%14 = xor i1 %13, true
br label %15
15: ; preds = %11, %2
%16 = phi i1 [ true, %2 ], [ %14, %11 ]
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = load i8*, i8** %5
ret i8* %19
}

LLVM IR (-O2):
define noalias i8* @xrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp ne i8* %3, null
%5 = icmp eq i64 %1, 0
%6 = or i1 %5, %4
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
ret i8* %3
}
/* Variables and functions */
scalar_t__ ASRT_Char(char, char);
int /*<<< orphan*/ ASRT_Mark(char *, int, char *);
int test_CharFail() {
  do {
    ASRT_Mark("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/cohadar/c-learning/refs/heads/master/"
              "src/asrt_tests.c",
              195,
              "'X'"
              " == "
              "'Y'");
    if (ASRT_Char('X', 'Y')) {
      return 1;
    };
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<test_CharFail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0xc3,%esi
lea    0xf55(%rip),%rdx
call   1040 <ASRT_Mark@plt>
mov    $0x58,%edi
mov    $0x59,%esi
call   1030 <ASRT_Char@plt>
cmp    $0x0,%rax
je     1165 <test_CharFail+0x45>
movl   $0x1,-0x4(%rbp)
jmp    1171 <test_CharFail+0x51>
jmp    116a <test_CharFail+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_CharFail>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xf61(%rip),%rdx
mov    $0xc3,%esi
call   1040 <ASRT_Mark@plt>
mov    $0x58,%edi
mov    $0x59,%esi
call   1030 <ASRT_Char@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/cohadar/c-learning/refs/heads/master/src/asrt_tests.c\00"
@.str.1 = [11 x i8] c"'X' == 'Y'\00"
define i32 @test_CharFail() {
%1 = alloca i32
br label %2
2: ; preds = %0
%3 = call i32 @ASRT_Mark(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 195, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%4 = call i64 @ASRT_Char(i8 signext 88, i8 signext 89)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %2
store i32 1, i32* %1
br label %9
7: ; preds = %2
br label %8
8: ; preds = %7
store i32 0, i32* %1
br label %9
9: ; preds = %8, %6
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@.str = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/cohadar/c-learning/refs/heads/master/src/asrt_tests.c\00"
@.str.1 = [11 x i8] c"'X' == 'Y'\00"
define i32 @test_CharFail() {
%1 = tail call i32 @ASRT_Mark(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 195, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i64 @ASRT_Char(i8 signext 88, i8 signext 89)
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ full_name;

/* Variables and functions */
int /*<<< orphan*/ cpgname_to_crc(char *, int);
int /*<<< orphan*/ snprintf(char *, int, char *, char const *);
int strlen(char const *);
uint32_t global_id(const char *name) {
  char full_name[strlen(name) + 8];
  snprintf(full_name, sizeof(full_name), "dlm:ls:%s", name);
  return cpgname_to_crc(full_name, strlen(full_name) + 1);
}


x86 assembly (clang, -O0):
<global_id>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x8,%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x20(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x18(%rbp)
mov    %eax,%esi
mov    -0x8(%rbp),%rcx
lea    0xe88(%rip),%rdx
call   1050 <snprintf@plt>
mov    -0x20(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
add    $0x1,%esi
call   1040 <cpgname_to_crc@plt>
mov    -0x10(%rbp),%rcx
mov    %rcx,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<global_id>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
lea    0x8(%rax),%esi
mov    %rsp,%rbx
lea    0xf(%rsi),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
lea    0xea6(%rip),%rdx
mov    %rbx,%rdi
mov    %r14,%rcx
call   1050 <snprintf@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    0x1(%rax),%esi
mov    %rbx,%rdi
call   1040 <cpgname_to_crc@plt>
lea    -0x10(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"dlm:ls:%s\00"
define i32 @global_id(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = add nsw i32 %6, 8
%8 = zext i32 %7 to i64
%9 = call i8* @llvm.stacksave()
store i8* %9, i8** %3
%10 = alloca i8, i64 %8
store i64 %8, i64* %4
%11 = trunc i64 %8 to i32
%12 = load i8*, i8** %2
%13 = call i32 @snprintf(i8* %10, i32 %11, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = call i32 @strlen(i8* %10)
%15 = add nsw i32 %14, 1
%16 = call i32 @cpgname_to_crc(i8* %10, i32 %15)
%17 = load i8*, i8** %3
ret i32 %16
}

LLVM IR (-O2):
@.str = [10 x i8] c"dlm:ls:%s\00"
define i32 @global_id(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 8
%4 = zext i32 %3 to i64
%5 = alloca i8, i64 %4
%6 = call i32 @snprintf(i8* %5, i32 %3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %0)
%7 = call i32 @strlen(i8* %5)
%8 = add nsw i32 %7, 1
%9 = call i32 @cpgname_to_crc(i8* %5, i32 %8)
ret i32 %9
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(int);
int main(void) {
  int c;
  while ((c = getchar()) != EOF)
    if (c != '\r')
      putchar(c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ea8(%rip),%rcx
cmp    (%rcx),%eax
je     115f <main+0x3f>
cmpl   $0xd,-0x8(%rbp)
je     115a <main+0x3a>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb9(%rip),%rbx
jmp    1147 <main+0x27>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
je     1159 <main+0x39>
cmp    $0xd,%eax
je     1140 <main+0x20>
mov    %eax,%edi
call   1030 <putchar@plt>
jmp    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %13, %0
%4 = call i32 (...) @getchar()
store i32 %4, i32* %2
%5 = load i32, i32* @EOF
%6 = icmp ne i32 %4, %5
br i1 %6, label %7, label %14
7: ; preds = %3
%8 = load i32, i32* %2
%9 = icmp ne i32 %8, 13
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = load i32, i32* %2
%12 = call i32 @putchar(i32 %11)
br label %13
13: ; preds = %10, %7
br label %3
14: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %13, label %4
4: ; preds = %0, %9
%5 = phi i32 [ %10, %9 ], [ %1, %0 ]
%6 = icmp eq i32 %5, 13
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @putchar(i32 %5)
br label %9
9: ; preds = %7, %4
%10 = tail call i32 (...) @getchar()
%11 = load i32, i32* @EOF
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %4
13: ; preds = %9, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ set_value(int, int);
void lock_sem(int sem) { set_value(sem, -1); }


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

x86 assembly (clang, -O2):
<lock_sem>:
mov    $0xffffffff,%esi
jmp    1030 <set_value@plt>

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

LLVM IR (-O2):
define void @lock_sem(i32 %0) {
%2 = tail call i32 @set_value(i32 %0, i32 -1)
ret void
}
void bar(Void) {}


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

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

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

LLVM IR (-O2):
define void @bar(i32 %0) {
ret void
}
int test1_frame_cb() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @test1_frame_cb() {
ret i32 0
}
/* Variables and functions */
scalar_t__ genalloc(void *, scalar_t__);
int /*<<< orphan*/ genstrcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *CopyString(void *theEnv, const char *theString) {
  char *stringCopy = NULL;
  if (theString != NULL) {
    stringCopy = (char *)genalloc(theEnv, strlen(theString) + 1);
    genstrcpy(stringCopy, theString);
  }
  return stringCopy;
}


x86 assembly (clang, -O0):
<CopyString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1185 <CopyString+0x55>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    %rax,%rsi
add    $0x1,%rsi
call   1030 <genalloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <genstrcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CopyString>:
push   %r14
push   %rbx
push   %rax
test   %rsi,%rsi
je     1163 <CopyString+0x33>
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%rsi
mov    %r14,%rdi
call   1030 <genalloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    %rbx,%rsi
call   1050 <genstrcpy@plt>
jmp    1166 <CopyString+0x36>
xor    %r14d,%r14d
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @CopyString(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
store i8* null, i8** %5
%6 = load i8*, i8** %4
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %18
8: ; preds = %2
%9 = load i8*, i8** %3
%10 = load i8*, i8** %4
%11 = call i64 @strlen(i8* %10)
%12 = add nsw i64 %11, 1
%13 = call i64 @genalloc(i8* %9, i64 %12)
%14 = inttoptr i64 %13 to i8*
store i8* %14, i8** %5
%15 = load i8*, i8** %5
%16 = load i8*, i8** %4
%17 = call i32 @genstrcpy(i8* %15, i8* %16)
br label %18
18: ; preds = %8, %2
%19 = load i8*, i8** %5
ret i8* %19
}

LLVM IR (-O2):
define i8* @CopyString(i8* %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = tail call i64 @strlen(i8* %1)
%6 = add nsw i64 %5, 1
%7 = tail call i64 @genalloc(i8* %0, i64 %6)
%8 = inttoptr i64 %7 to i8*
%9 = tail call i32 @genstrcpy(i8* %8, i8* %1)
br label %10
10: ; preds = %4, %2
%11 = phi i8* [ %8, %4 ], [ null, %2 ]
ret i8* %11
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  unsigned long property;
};
struct TYPE_4__ {
  TYPE_1__ xselectionrequest;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xselectionrequest_property(void *_p, unsigned long _v) {
  ((XEvent *)_p)->xselectionrequest.property = (unsigned long)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define void @set_XEvent_xselectionrequest_property(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i64 %5, i64* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xselectionrequest_property(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMR5D_get(void) { return U_WMRCORENONE_get("U_WMR5D"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR5D\00"
define i32 @U_WMR5D_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR5D\00"
define i32 @U_WMR5D_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
void XtGetValues() {}


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

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

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

LLVM IR (-O2):
define void @XtGetValues() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vga_gotoxy(int /*<<< orphan*/, int /*<<< orphan*/);
void vga_clearscreen(void) { vga_gotoxy(0, 0); }


x86 assembly (clang, -O0):
<vga_clearscreen>:
push   %rbp
mov    %rsp,%rbp
xor    %esi,%esi
mov    %esi,%edi
call   1030 <vga_gotoxy@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<vga_clearscreen>:
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <vga_gotoxy@plt>

LLVM IR (-O0):
define void @vga_clearscreen() {
%1 = call i32 @vga_gotoxy(i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @vga_clearscreen() {
%1 = tail call i32 @vga_gotoxy(i32 0, i32 0)
ret void
}
void mpc_signal_deinit(void) { ; }


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

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

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

LLVM IR (-O2):
define void @mpc_signal_deinit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ subtract_array_array(double *, double *, double *, int, int);
void subtract_arrays_inplace(double *a, double *b, int ncol, int nlns) {
  subtract_array_array(a, a, b, ncol, nlns);
}


x86 assembly (clang, -O0):
<subtract_arrays_inplace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
call   1030 <subtract_array_array@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<subtract_arrays_inplace>:
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%rsi
jmp    1030 <subtract_array_array@plt>

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

LLVM IR (-O2):
define void @subtract_arrays_inplace(double* %0, double* %1, i32 %2, i32 %3) {
%5 = tail call i32 @subtract_array_array(double* %0, double* %0, double* %1, i32 %2, i32 %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ data;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printbits(int data) {
  for (int i = sizeof(int) * 8 - 1; i >= 0; i--) {
    if ((data) & (1 << i))
      printf("1");
    else
      printf("0");
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<printbits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1f,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1176 <printbits+0x66>
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1157 <printbits+0x47>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
jmp    1163 <printbits+0x53>
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
jmp    1168 <printbits+0x58>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <printbits+0x12>
lea    0xe87(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printbits>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x1f,%ebp
nopw   0x0(%rax,%rax,1)
bt     %ebp,%ebx
mov    $0x31,%edi
adc    $0xffffffff,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jb     1120 <printbits+0x10>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"1\00"
@.str.1 = [2 x i8] c"0\00"
@.str.2 = [2 x i8] c"\0A\00"
define void @printbits(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 31, i32* %3
br label %4
4: ; preds = %18, %1
%5 = load i32, i32* %3
%6 = icmp sge i32 %5, 0
br i1 %6, label %7, label %21
7: ; preds = %4
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = shl i32 1, %9
%11 = and i32 %8, %10
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %7
%14 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %17
15: ; preds = %7
%16 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %17
17: ; preds = %15, %13
br label %18
18: ; preds = %17
%19 = load i32, i32* %3
%20 = add nsw i32 %19, -1
store i32 %20, i32* %3
br label %4
21: ; preds = %4
%22 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
define void @printbits(i32 %0) {
br label %4
2: ; preds = %4
%3 = tail call i32 @putchar(i32 10)
ret void
4: ; preds = %1, %4
%5 = phi i32 [ 31, %1 ], [ %11, %4 ]
%6 = shl nuw i32 1, %5
%7 = and i32 %6, %0
%8 = icmp eq i32 %7, 0
%9 = select i1 %8, i32 48, i32 49
%10 = tail call i32 @putchar(i32 %9)
%11 = add nsw i32 %5, -1
%12 = icmp eq i32 %5, 0
br i1 %12, label %2, label %4
}
int hey() {
  int x, y, z;
  z = x ?: y;
}


x86 assembly (clang, -O0):
<hey>:
push   %rbp
mov    %rsp,%rbp
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     111e <hey+0x1e>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    1124 <hey+0x24>
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @hey() {
ret i32 undef
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMRB3_get(void) { return U_WMRCORENONE_get("U_WMRB3"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMRB3\00"
define i32 @U_WMRB3_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRB3\00"
define i32 @U_WMRB3_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
size_t _fcgi_owire_min(size_t a, size_t b) { return ((a < b) ? a : b); }


x86 assembly (clang, -O0):
<_fcgi_owire_min>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1127 <_fcgi_owire_min+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <_fcgi_owire_min+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_fcgi_owire_min>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovb  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @_fcgi_owire_min(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp ult i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @_fcgi_owire_min(i64 %0, i64 %1) {
%3 = icmp ult i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
int test_imm_A4uint8_mem(unsigned char *val) {
  return ((*val) & (0xA4 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_A4uint8_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, 164
%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_A4uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -92
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ __get_cpuid(int, unsigned int *, unsigned int *,
                               unsigned int *, unsigned int *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ vector_1_x();
int main() {
  unsigned int eax, ebx, ecx, edx;
  if (!__get_cpuid(1, &eax, &ebx, &ecx, &edx))
    return 0;
  if (ecx & (1 << 28))
    vector_1_x();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
call   1030 <__get_cpuid@plt>
cmp    $0x0,%eax
jne    116a <main+0x3a>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret
mov    -0x10(%rbp),%eax
and    $0x10000000,%eax
cmp    $0x0,%eax
je     1182 <main+0x52>
mov    $0x0,%al
call   1040 <vector_1_x@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0x8(%rsp),%rcx
lea    0xc(%rsp),%r8
mov    $0x1,%edi
call   1030 <__get_cpuid@plt>
test   %eax,%eax
jne    115d <main+0x2d>
xor    %eax,%eax
add    $0x18,%rsp
ret
testb  $0x10,0xb(%rsp)
je     116b <main+0x3b>
xor    %eax,%eax
call   1040 <vector_1_x@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 @__get_cpuid(i32 1, i32* %2, i32* %3, i32* %4, i32* %5)
%7 = icmp ne i32 %6, 0
br i1 %7, label %9, label %8
8: ; preds = %0
ret i32 0
9: ; preds = %0
%10 = load i32, i32* %4
%11 = and i32 %10, 268435456
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %9
%14 = call i32 (...) @vector_1_x()
br label %15
15: ; preds = %13, %9
%16 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 @__get_cpuid(i32 1, i32* %1, i32* %2, i32* %3, i32* %4)
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %0
ret i32 0
12: ; preds = %0
%13 = load i32, i32* %3
%14 = and i32 %13, 268435456
%15 = icmp eq i32 %14, 0
br i1 %15, label %18, label %16
16: ; preds = %12
%17 = call i32 (...) @vector_1_x()
br label %18
18: ; preds = %16, %12
%19 = call i32 @exit(i32 0)
unreachable
}
void wifi_evt_tcpip_configuration(
    const struct wifi_msg_tcpip_configuration_evt_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.wifi_msg_tcpip_configuration_evt_t = type opaque
define void @wifi_evt_tcpip_configuration(%struct.wifi_msg_tcpip_configuration_evt_t* nocapture %0) {
ret void
}
/* Variables and functions */
int _printf_putl(unsigned long, int, int, int, unsigned int, char *);
int putfnum(unsigned long x, int base, int isSigned, int width,
            unsigned int fillChar) {
  return _printf_putl(x, base, isSigned, width, fillChar, ((char *)0x3000000));
}


x86 assembly (clang, -O0):
<putfnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    $0x3000000,%r9d
call   1030 <_printf_putl@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putfnum>:
mov    $0x3000000,%r9d
jmp    1030 <_printf_putl@plt>

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

LLVM IR (-O2):
define i32 @putfnum(i64 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @_printf_putl(i64 %0, i32 %1, i32 %2, i32 %3, i32 %4, i8* inttoptr (i64 50331648 to i8*))
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ CommonFree(void *);
void HoloStor_QuickFree(void *p) { CommonFree(p); }


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

x86 assembly (clang, -O2):
<HoloStor_QuickFree>:
jmp    1030 <CommonFree@plt>

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

LLVM IR (-O2):
define void @HoloStor_QuickFree(i8* %0) {
%2 = tail call i32 @CommonFree(i8* %0)
ret void
}
long fibonacci(int n) {
  long r;
  if (n <= 1) {
    r = n;
  } else {
    r = fibonacci(n - 1) + fibonacci(n - 2);
  }
  return r;
}


x86 assembly (clang, -O0):
<fibonacci>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jg     1132 <fibonacci+0x22>
movslq -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    115a <fibonacci+0x4a>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1030 <fibonacci@plt>
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
sub    $0x2,%edi
call   1030 <fibonacci@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibonacci>:
push   %r14
push   %rbx
push   %rax
xor    %r14d,%r14d
cmp    $0x2,%edi
jl     1135 <fibonacci+0x25>
mov    %edi,%ebx
xchg   %ax,%ax
lea    -0x1(%rbx),%edi
call   1030 <fibonacci@plt>
lea    -0x2(%rbx),%edi
add    %rax,%r14
cmp    $0x4,%ebx
mov    %edi,%ebx
jae    1120 <fibonacci+0x10>
movslq %edi,%rax
add    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i64 @fibonacci(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %3, label %8
3: ; preds = %8, %1
%4 = phi i64 [ 0, %1 ], [ %14, %8 ]
%5 = phi i32 [ %0, %1 ], [ %13, %8 ]
%6 = sext i32 %5 to i64
%7 = add nsw i64 %4, %6
ret i64 %7
8: ; preds = %1, %8
%9 = phi i32 [ %13, %8 ], [ %0, %1 ]
%10 = phi i64 [ %14, %8 ], [ 0, %1 ]
%11 = add nsw i32 %9, -1
%12 = tail call i64 @fibonacci(i32 %11)
%13 = add nsw i32 %9, -2
%14 = add nsw i64 %12, %10
%15 = icmp ult i32 %9, 4
br i1 %15, label %3, label %8
}
/* Variables and functions */
int /*<<< orphan*/ dxl_hal_close(int *);
void terminate(int socket) { dxl_hal_close(&socket); }


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

x86 assembly (clang, -O2):
<terminate>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <dxl_hal_close@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @terminate(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @dxl_hal_close(i32* %2)
ret void
}

LLVM IR (-O2):
define void @terminate(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @dxl_hal_close(i32* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
void int_free(int *pA) { free(pA); }


x86 assembly (clang, -O0):
<int_free>:
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):
<int_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @int_free(i32* nocapture %0) {
%2 = tail call i32 @free(i32* %0)
ret void
}
/* Variables and functions */
scalar_t__ ds_get_boolean(int /*<<< orphan*/, int);
scalar_t__ isalnum(int);
int is_labelchar(int ich) {
  if ((isalnum(ich)) || (ich == '-'))
    return 1;
  if (ich == '_' && ds_get_boolean(0, 3))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_labelchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <isalnum@plt>
cmp    $0x0,%rax
jne    1147 <is_labelchar+0x27>
cmpl   $0x2d,-0x8(%rbp)
jne    1153 <is_labelchar+0x33>
movl   $0x1,-0x4(%rbp)
jmp    1186 <is_labelchar+0x66>
cmpl   $0x5f,-0x8(%rbp)
jne    117f <is_labelchar+0x5f>
xor    %edi,%edi
mov    $0x3,%esi
call   1040 <ds_get_boolean@plt>
cmp    $0x0,%rax
je     117f <is_labelchar+0x5f>
movl   $0x1,-0x4(%rbp)
jmp    1186 <is_labelchar+0x66>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_labelchar>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1030 <isalnum@plt>
mov    $0x1,%ebx
cmp    $0x2d,%ebp
je     1151 <is_labelchar+0x31>
test   %rax,%rax
jne    1151 <is_labelchar+0x31>
cmp    $0x5f,%ebp
jne    114f <is_labelchar+0x2f>
xor    %edi,%edi
mov    $0x3,%esi
call   1040 <ds_get_boolean@plt>
test   %rax,%rax
jne    1151 <is_labelchar+0x31>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @is_labelchar(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @isalnum(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 45
br i1 %9, label %10, label %11
10: ; preds = %7, %1
store i32 1, i32* %2
br label %19
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 95
br i1 %13, label %14, label %18
14: ; preds = %11
%15 = call i64 @ds_get_boolean(i32 0, i32 3)
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %14
store i32 1, i32* %2
br label %19
18: ; preds = %14, %11
store i32 0, i32* %2
br label %19
19: ; preds = %18, %17, %10
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @is_labelchar(i32 %0) {
%2 = tail call i64 @isalnum(i32 %0)
%3 = icmp ne i64 %2, 0
%4 = icmp eq i32 %0, 45
%5 = or i1 %4, %3
br i1 %5, label %12, label %6
6: ; preds = %1
%7 = icmp eq i32 %0, 95
br i1 %7, label %8, label %11
8: ; preds = %6
%9 = tail call i64 @ds_get_boolean(i32 0, i32 3)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %8, %6
br label %12
12: ; preds = %8, %1, %11
%13 = phi i32 [ 0, %11 ], [ 1, %1 ], [ 1, %8 ]
ret i32 %13
}
void adis16350_uninitialize_ring(struct iio_ring_buffer *ring) {}


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

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

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

LLVM IR (-O2):
%struct.iio_ring_buffer = type opaque
define void @adis16350_uninitialize_ring(%struct.iio_ring_buffer* nocapture %0) {
ret void
}
/* Variables and functions */
int cos(double);
double generateSinusoidalAlea(void) {
  static double xn = 1;
  double value = xn;
  xn = 2 * cos(xn);
  if (xn < 0)
    xn = xn * -1;
  return value * 100000000000;
}


x86 assembly (clang, -O0):
<generateSinusoidalAlea>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  0x2f08(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0x2efb(%rip),%xmm0
call   1030 <cos@plt>
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x2ee7(%rip)
xorps  %xmm0,%xmm0
ucomisd 0x2edc(%rip),%xmm0
jbe    116a <generateSinusoidalAlea+0x5a>
movsd  0xea6(%rip),%xmm0
mulsd  0x2ec6(%rip),%xmm0
movsd  %xmm0,0x2ebe(%rip)
movsd  0xe96(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generateSinusoidalAlea>:
push   %rax
movsd  0x2f0f(%rip),%xmm0
movsd  %xmm0,(%rsp)
call   1030 <cos@plt>
lea    (%rax,%rax,1),%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
test   %eax,%eax
jns    1139 <generateSinusoidalAlea+0x29>
xorpd  0xec7(%rip),%xmm0
movsd  %xmm0,0x2ee7(%rip)
movsd  (%rsp),%xmm0
mulsd  0xec2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@generateSinusoidalAlea.xn = internal global double 1.000000e+00
define double @generateSinusoidalAlea() {
%1 = alloca double
%2 = load double, double* @generateSinusoidalAlea.xn
store double %2, double* %1
%3 = load double, double* @generateSinusoidalAlea.xn
%4 = call i32 @cos(double %3)
%5 = mul nsw i32 2, %4
%6 = sitofp i32 %5 to double
store double %6, double* @generateSinusoidalAlea.xn
%7 = load double, double* @generateSinusoidalAlea.xn
%8 = fcmp olt double %7, 0.000000e+00
br i1 %8, label %9, label %12
9: ; preds = %0
%10 = load double, double* @generateSinusoidalAlea.xn
%11 = fmul double %10, -1.000000e+00
store double %11, double* @generateSinusoidalAlea.xn
br label %12
12: ; preds = %9, %0
%13 = load double, double* %1
%14 = fmul double %13, 1.000000e+11
ret double %14
}

LLVM IR (-O2):
@generateSinusoidalAlea.xn = internal unnamed_addr global double 1.000000e+00
define double @generateSinusoidalAlea() {
%1 = load double, double* @generateSinusoidalAlea.xn
%2 = tail call i32 @cos(double %1)
%3 = shl nsw i32 %2, 1
%4 = sitofp i32 %3 to double
%5 = icmp slt i32 %2, 0
%6 = fneg double %4
%7 = select i1 %5, double %6, double %4
store double %7, double* @generateSinusoidalAlea.xn
%8 = fmul double %1, 1.000000e+11
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int fun1(void) {
  printf("hello world.\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [13 x i8] c"hello world.\00"
define i32 @fun1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strpbrk(char const *, char *);
__attribute__((pure)) bool string_is_glob(const char *p) {
  return !!strpbrk(p, "*?[");
}


x86 assembly (clang, -O0):
<string_is_glob>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strpbrk@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_is_glob>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strpbrk@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"*?[\00"
define i32 @string_is_glob(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strpbrk(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = xor i1 %6, true
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
@.str = [4 x i8] c"*?[\00"
define i32 @string_is_glob(i8* %0) {
%2 = tail call i32 @strpbrk(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ showConst();
int /*<<< orphan*/ showId();
int /*<<< orphan*/ showPIF();
void show() {
  showConst();
  showId();
  showPIF();
}


x86 assembly (clang, -O0):
<show>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <showConst@plt>
mov    $0x0,%al
call   1040 <showId@plt>
mov    $0x0,%al
call   1050 <showPIF@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<show>:
push   %rax
xor    %eax,%eax
call   1030 <showConst@plt>
xor    %eax,%eax
call   1040 <showId@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <showPIF@plt>

LLVM IR (-O0):
define void @show() {
%1 = call i32 (...) @showConst()
%2 = call i32 (...) @showId()
%3 = call i32 (...) @showPIF()
ret void
}

LLVM IR (-O2):
define void @show() {
%1 = tail call i32 (...) @showConst()
%2 = tail call i32 (...) @showId()
%3 = tail call i32 (...) @showPIF()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PPCMMU(int, int /*<<< orphan*/, int /*<<< orphan*/,
                          int /*<<< orphan*/);
void MmuCallbackRet() { PPCMMU(0x10d, 0, 0, 0); }


x86 assembly (clang, -O0):
<MmuCallbackRet>:
push   %rbp
mov    %rsp,%rbp
mov    $0x10d,%edi
xor    %ecx,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <PPCMMU@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<MmuCallbackRet>:
mov    $0x10d,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <PPCMMU@plt>

LLVM IR (-O0):
define void @MmuCallbackRet() {
%1 = call i32 @PPCMMU(i32 269, i32 0, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @MmuCallbackRet() {
%1 = tail call i32 @PPCMMU(i32 269, i32 0, i32 0, i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, unsigned char);
void fprint_anl_atRi(FILE *stream, unsigned char i) {
  fprintf(stream, "ANL   A, @R%X                    ", i);
}


x86 assembly (clang, -O0):
<fprint_anl_atRi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed3(%rip),%rsi
movzbl -0x9(%rbp),%edx
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fprint_anl_atRi>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"ANL A, @R%X \00"
define void @fprint_anl_atRi(i32* %0, i8 zeroext %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 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %6)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"ANL A, @R%X \00"
define void @fprint_anl_atRi(i32* nocapture %0, i8 zeroext %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %1)
ret void
}