xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;
typedef int /*<<< orphan*/ posix_spawnattr_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int posix_spawnattr_setsigmask(posix_spawnattr_t *attr,
                               const sigset_t *sigmask) {
  ;
  errno = ENOSYS;
  return -1;
  ;
}


x86 assembly (clang, -O0):
<posix_spawnattr_setsigmask>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ed5(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebc(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<posix_spawnattr_setsigmask>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @posix_spawnattr_setsigmask(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32, i32* @ENOSYS
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @posix_spawnattr_setsigmask(i32* nocapture readnone %0, i32* nocapture readnone %1) {
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ write_fmt(char *, char *, ...);
int main() {
  write_fmt("named %s integer : %d\n", "Linkerist", 98);
  write_fmt("named %s, real %s\n", "Linkerist", "Heracles");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    0xeea(%rip),%rsi
mov    $0x62,%edx
mov    $0x0,%al
call   1030 <write_fmt@plt>
lea    0xee1(%rip),%rdi
lea    0xed0(%rip),%rsi
lea    0xee6(%rip),%rdx
mov    $0x0,%al
call   1030 <write_fmt@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rdi
lea    0xef8(%rip),%rbx
mov    %rbx,%rsi
mov    $0x62,%edx
xor    %eax,%eax
call   1030 <write_fmt@plt>
lea    0xeec(%rip),%rdi
lea    0xef8(%rip),%rdx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <write_fmt@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"named %s integer : %d\0A\00"
@.str.1 = [10 x i8] c"Linkerist\00"
@.str.2 = [19 x i8] c"named %s, real %s\0A\00"
@.str.3 = [9 x i8] c"Heracles\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, i8*, ...) @write_fmt(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 98)
%3 = call i32 (i8*, i8*, ...) @write_fmt(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"named %s integer : %d\0A\00"
@.str.1 = [10 x i8] c"Linkerist\00"
@.str.2 = [19 x i8] c"named %s, real %s\0A\00"
@.str.3 = [9 x i8] c"Heracles\00"
define i32 @main() {
%1 = tail call i32 (i8*, i8*, ...) @write_fmt(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 98)
%2 = tail call i32 (i8*, i8*, ...) @write_fmt(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
unsigned long long gs(unsigned long long, unsigned long long);
unsigned long long h(unsigned long long a, unsigned long long b) {
  return gs(a | 0x100000000ull, b | 0x600000000ull);
}


x86 assembly (clang, -O0):
<h>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movabs $0x100000000,%rdi
or     -0x8(%rbp),%rdi
movabs $0x600000000,%rsi
or     -0x10(%rbp),%rsi
call   1030 <gs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h>:
movabs $0x100000000,%rax
or     %rax,%rdi
movabs $0x600000000,%rax
or     %rax,%rsi
jmp    1030 <gs@plt>

LLVM IR (-O0):
define i64 @h(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 = or i64 %5, 4294967296
%7 = load i64, i64* %4
%8 = or i64 %7, 25769803776
%9 = call i64 @gs(i64 %6, i64 %8)
ret i64 %9
}

LLVM IR (-O2):
define i64 @h(i64 %0, i64 %1) {
%3 = or i64 %0, 4294967296
%4 = or i64 %1, 25769803776
%5 = tail call i64 @gs(i64 %3, i64 %4)
ret i64 %5
}
/* Variables and functions */
int readlink(char *, char *, int);
char *get_exename(char *exename, int size) {
  int res;
  if ((res = readlink("/proc/self/exe", exename, size - 1)) == -1) {
    exename[0] = '\0';
  } else {
    exename[res] = '\0';
  }
  return (exename);
}


x86 assembly (clang, -O0):
<get_exename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
lea    0xed0(%rip),%rdi
call   1030 <readlink@plt>
mov    %eax,-0x10(%rbp)
cmp    $0xffffffff,%eax
jne    114d <get_exename+0x3d>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
jmp    1159 <get_exename+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_exename>:
push   %rbx
mov    %rdi,%rbx
lea    -0x1(%rsi),%edx
lea    0xee2(%rip),%rdi
mov    %rbx,%rsi
call   1030 <readlink@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
cmovne %eax,%ecx
movslq %ecx,%rax
movb   $0x0,(%rbx,%rax,1)
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"/proc/self/exe\00"
define i8* @get_exename(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = sub nsw i32 %7, 1
%9 = call i32 @readlink(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %6, i32 %8)
store i32 %9, i32* %5
%10 = icmp eq i32 %9, -1
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i64 0
store i8 0, i8* %13
br label %19
14: ; preds = %2
%15 = load i8*, i8** %3
%16 = load i32, i32* %5
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %15, i64 %17
store i8 0, i8* %18
br label %19
19: ; preds = %14, %11
%20 = load i8*, i8** %3
ret i8* %20
}

LLVM IR (-O2):
@.str = [15 x i8] c"/proc/self/exe\00"
define i8* @get_exename(i8* returned %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = tail call i32 @readlink(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %3)
%5 = icmp eq i32 %4, -1
%6 = select i1 %5, i32 0, i32 %4
%7 = sext i32 %6 to i64
%8 = getelementptr i8, i8* %0, i64 %7
store i8 0, i8* %8
ret i8* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void show_usage(FILE *fp, char *arg) {
  fprintf(fp, "network socket usage: %s [ -o <filename> ] [ -s <src-ip> ]\n",
          arg);
  fprintf(fp,
          "pcap capture usage:   %s -p -i <interface> [ -o <filename> ]  [ -s "
          "<src-ip> ] \n",
          arg);
}


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

x86 assembly (clang, -O2):
<show_usage>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xedf(%rip),%rsi
mov    %r14,%rdx
call   1030 <fprintf@plt>
lea    0xf0c(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [60 x i8] c"network socket usage: %s [ -o <filename> ] [ -s <src-ip> ]\0A\00"
@.str.1 = [80 x i8] c"pcap capture usage: %s -p -i <interface> [ -o <filename> ] [ -s <src-ip> ] \0A\00"
define void @show_usage(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = load i8*, i8** %4
%7 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32*, i32** %3
%9 = load i8*, i8** %4
%10 = call i32 @fprintf(i32* %8, i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.1, i64 0, i64 0), i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [60 x i8] c"network socket usage: %s [ -o <filename> ] [ -s <src-ip> ]\0A\00"
@.str.1 = [80 x i8] c"pcap capture usage: %s -p -i <interface> [ -o <filename> ] [ -s <src-ip> ] \0A\00"
define void @show_usage(i32* nocapture %0, i8* %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.1, i64 0, i64 0), i8* %1)
ret void
}
void CameraCaptureStart(unsigned long ulBase) {
  (*((volatile unsigned long *)(ulBase + 0x00000040))) &= ~0xF;
  (*((volatile unsigned long *)(ulBase + 0x00000040))) |= 0x00010000;
}


x86 assembly (clang, -O0):
<CameraCaptureStart>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x40(%rax),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rcx,0x40(%rax)
mov    -0x8(%rbp),%rax
mov    0x40(%rax),%rcx
or     $0x10000,%rcx
mov    %rcx,0x40(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<CameraCaptureStart>:
andq   $0xfffffffffffffff0,0x40(%rdi)
orq    $0x10000,0x40(%rdi)
ret

LLVM IR (-O0):
define void @CameraCaptureStart(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 64
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, -16
store volatile i64 %7, i64* %5
%8 = load i64, i64* %2
%9 = add i64 %8, 64
%10 = inttoptr i64 %9 to i64*
%11 = load volatile i64, i64* %10
%12 = or i64 %11, 65536
store volatile i64 %12, i64* %10
ret void
}

LLVM IR (-O2):
define void @CameraCaptureStart(i64 %0) {
%2 = add i64 %0, 64
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
%5 = and i64 %4, -16
store volatile i64 %5, i64* %3
%6 = load volatile i64, i64* %3
%7 = or i64 %6, 65536
store volatile i64 %7, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ revs(char *);
int main() {
  char s[110];
  gets(s);
  revs(s);
  puts(s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x80(%rbp),%rdi
call   1040 <gets@plt>
lea    -0x80(%rbp),%rdi
call   1050 <revs@plt>
lea    -0x80(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <gets@plt>
mov    %rbx,%rdi
call   1050 <revs@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [110 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [110 x i8], [110 x i8]* %2, i64 0, i64 0
%4 = call i32 @gets(i8* %3)
%5 = getelementptr inbounds [110 x i8], [110 x i8]* %2, i64 0, i64 0
%6 = call i32 @revs(i8* %5)
%7 = getelementptr inbounds [110 x i8], [110 x i8]* %2, i64 0, i64 0
%8 = call i32 @puts(i8* %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [110 x i8]
%2 = getelementptr inbounds [110 x i8], [110 x i8]* %1, i64 0, i64 0
%3 = call i32 @gets(i8* %2)
%4 = call i32 @revs(i8* %2)
%5 = call i32 @puts(i8* %2)
ret i32 0
}
/* Variables and functions */
long milli_kelvin_to_millicelsius(long);
long kelvin_to_millicelsius(long t) {
  return milli_kelvin_to_millicelsius(t * 1000);
}


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

x86 assembly (clang, -O2):
<kelvin_to_millicelsius>:
imul   $0x3e8,%rdi,%rdi
jmp    1030 <milli_kelvin_to_millicelsius@plt>

LLVM IR (-O0):
define i64 @kelvin_to_millicelsius(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = mul nsw i64 %3, 1000
%5 = call i64 @milli_kelvin_to_millicelsius(i64 %4)
ret i64 %5
}

LLVM IR (-O2):
define i64 @kelvin_to_millicelsius(i64 %0) {
%2 = mul nsw i64 %0, 1000
%3 = tail call i64 @milli_kelvin_to_millicelsius(i64 %2)
ret i64 %3
}
int mult(int x, int y) {
  int mresult;
  mresult = (x * y);
  return mresult;
}


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

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

LLVM IR (-O0):
define i32 @mult(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* %4
%8 = mul nsw i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @mult(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void cow_time(void) { system("/bin/date | /usr/games/cowsay"); }


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

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

LLVM IR (-O0):
@.str = [30 x i8] c"/bin/date | /usr/games/cowsay\00"
define void @cow_time() {
%1 = call i32 @system(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"/bin/date | /usr/games/cowsay\00"
define void @cow_time() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct ibv_cq {
  int dummy;
};

/* Variables and functions */
int _resize_cq(struct ibv_cq *, int);
int /*<<< orphan*/ dmtcp_plugin_disable_ckpt();
int /*<<< orphan*/ dmtcp_plugin_enable_ckpt();
int ibv_resize_cq(struct ibv_cq *cq, int cqe) {
  dmtcp_plugin_disable_ckpt();
  int rslt = _resize_cq(cq, cqe);
  dmtcp_plugin_enable_ckpt();
  return rslt;
}


x86 assembly (clang, -O0):
<ibv_resize_cq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <dmtcp_plugin_disable_ckpt@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <_resize_cq@plt>
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1050 <dmtcp_plugin_enable_ckpt@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ibv_resize_cq>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <dmtcp_plugin_disable_ckpt@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <_resize_cq@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <dmtcp_plugin_enable_ckpt@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.ibv_cq = type { i32 }
define i32 @ibv_resize_cq(%struct.ibv_cq* %0, i32 %1) {
%3 = alloca %struct.ibv_cq*
%4 = alloca i32
%5 = alloca i32
store %struct.ibv_cq* %0, %struct.ibv_cq** %3
store i32 %1, i32* %4
%6 = call i32 (...) @dmtcp_plugin_disable_ckpt()
%7 = load %struct.ibv_cq*, %struct.ibv_cq** %3
%8 = load i32, i32* %4
%9 = call i32 @_resize_cq(%struct.ibv_cq* %7, i32 %8)
store i32 %9, i32* %5
%10 = call i32 (...) @dmtcp_plugin_enable_ckpt()
%11 = load i32, i32* %5
ret i32 %11
}

LLVM IR (-O2):
%struct.ibv_cq = type { i32 }
define i32 @ibv_resize_cq(%struct.ibv_cq* %0, i32 %1) {
%3 = tail call i32 (...) @dmtcp_plugin_disable_ckpt()
%4 = tail call i32 @_resize_cq(%struct.ibv_cq* %0, i32 %1)
%5 = tail call i32 (...) @dmtcp_plugin_enable_ckpt()
ret i32 %4
}
void S_AdpcmDecode(const char indata[], short *outdata, int len,
                   struct adpcm_state *state) {}


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

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

LLVM IR (-O0):
%struct.adpcm_state = type opaque
define void @S_AdpcmDecode(i8* %0, i16* %1, i32 %2, %struct.adpcm_state* %3) {
%5 = alloca i8*
%6 = alloca i16*
%7 = alloca i32
%8 = alloca %struct.adpcm_state*
store i8* %0, i8** %5
store i16* %1, i16** %6
store i32 %2, i32* %7
store %struct.adpcm_state* %3, %struct.adpcm_state** %8
ret void
}

LLVM IR (-O2):
%struct.adpcm_state = type opaque
define void @S_AdpcmDecode(i8* nocapture %0, i16* nocapture %1, i32 %2, %struct.adpcm_state* nocapture %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ia64_atomic_add(int, int volatile *);
void atomic_inc(volatile int *a) { ia64_atomic_add(1, a); }


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

x86 assembly (clang, -O2):
<atomic_inc>:
mov    %rdi,%rsi
mov    $0x1,%edi
jmp    1030 <ia64_atomic_add@plt>

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

LLVM IR (-O2):
define void @atomic_inc(i32* %0) {
%2 = tail call i32 @ia64_atomic_add(i32 1, i32* %0)
ret void
}
int plc_strlen(const char *pStr) {
  int iSize = 0;
  while (pStr[iSize] != 0)
    iSize++;
  return iSize;
}


x86 assembly (clang, -O0):
<plc_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1132 <plc_strlen+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <plc_strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<plc_strlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <plc_strlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @plc_strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int timezone;
char **tzname;
int /*<<< orphan*/ tzset();
void show_timezone() {
  tzset();
  printf("tzname  : %s,%s\n", tzname[0], tzname[1]);
  printf("timezone: %ldsec (%dhour)\n", timezone, timezone / 3600);
}


x86 assembly (clang, -O0):
<show_timezone>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <tzset@plt>
mov    0x2ea6(%rip),%rax
mov    (%rax),%rax
mov    (%rax),%rsi
mov    0x2e99(%rip),%rax
mov    (%rax),%rax
mov    0x8(%rax),%rdx
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e85(%rip),%rax
mov    (%rax),%esi
mov    0x2e7c(%rip),%rax
mov    (%rax),%eax
mov    $0xe10,%ecx
cltd
idiv   %ecx
mov    %eax,%edx
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_timezone>:
push   %rax
xor    %eax,%eax
call   1040 <tzset@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%rax
mov    (%rax),%rsi
mov    0x8(%rax),%rdx
lea    0xec0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2e92(%rip),%rax
movslq (%rax),%rsi
imul   $0xffffffff91a2b3c5,%rsi,%rdx
shr    $0x20,%rdx
add    %esi,%edx
mov    %edx,%eax
shr    $0x1f,%eax
sar    $0xb,%edx
add    %eax,%edx
lea    0xea2(%rip),%rdi
xor    %eax,%eax
pop    %rcx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"tzname : %s,%s\0A\00"
@tzname = global i8** null
@.str.1 = [27 x i8] c"timezone: %ldsec (%dhour)\0A\00"
@timezone = global i32 0
define void @show_timezone() {
%1 = call i32 (...) @tzset()
%2 = load i8**, i8*** @tzname
%3 = getelementptr inbounds i8*, i8** %2, i64 0
%4 = load i8*, i8** %3
%5 = load i8**, i8*** @tzname
%6 = getelementptr inbounds i8*, i8** %5, i64 1
%7 = load i8*, i8** %6
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %7)
%9 = load i32, i32* @timezone
%10 = load i32, i32* @timezone
%11 = sdiv i32 %10, 3600
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %9, i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"tzname : %s,%s\0A\00"
@tzname = global i8** null
@.str.1 = [27 x i8] c"timezone: %ldsec (%dhour)\0A\00"
@timezone = global i32 0
define void @show_timezone() {
%1 = tail call i32 (...) @tzset()
%2 = load i8**, i8*** @tzname
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8*, i8** %2, i64 1
%5 = load i8*, i8** %4
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %5)
%7 = load i32, i32* @timezone
%8 = sdiv i32 %7, 3600
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %7, i32 %8)
ret void
}
/* Variables and functions */
scalar_t__ acoshl(long double);
int /*<<< orphan*/ link_failure_acoshl();
void test_acoshl(long double ld) {
  if (acoshl(ld) != acoshl(ld))
    link_failure_acoshl();
}


x86 assembly (clang, -O0):
<test_acoshl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <acoshl@plt>
mov    %rax,-0x18(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <acoshl@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
je     1163 <test_acoshl+0x43>
mov    $0x0,%al
call   1030 <link_failure_acoshl@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_acoshl>:
push   %rbx
sub    $0x20,%rsp
fldt   0x30(%rsp)
fld    %st(0)
fstpt  0x14(%rsp)
fstpt  (%rsp)
call   1040 <acoshl@plt>
mov    %rax,%rbx
fldt   0x14(%rsp)
fstpt  (%rsp)
call   1040 <acoshl@plt>
cmp    %rax,%rbx
jne    1151 <test_acoshl+0x31>
add    $0x20,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
jmp    1030 <link_failure_acoshl@plt>

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

LLVM IR (-O2):
define void @test_acoshl(x86_fp80 %0) {
%2 = tail call i64 @acoshl(x86_fp80 %0)
%3 = tail call i64 @acoshl(x86_fp80 %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_acoshl()
br label %7
7: ; preds = %5, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cos(int);
short doubleToFixed(int /*<<< orphan*/);
short closeToFrequencyFullScaleCosine(int n) {
  return doubleToFixed(cos(2 * 3.1415926535 * (60000 + 100) * n / 345));
}


x86 assembly (clang, -O0):
<closeToFrequencyFullScaleCosine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm1
movsd  0xed0(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xebc(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <cos@plt>
mov    %eax,%edi
call   1030 <doubleToFixed@plt>
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<closeToFrequencyFullScaleCosine>:
push   %rax
cvtsi2sd %edi,%xmm0
mulsd  0xed3(%rip),%xmm0
divsd  0xed3(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <cos@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <doubleToFixed@plt>

LLVM IR (-O0):
define signext i16 @closeToFrequencyFullScaleCosine(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
%5 = fmul double 0x41170C4DBF70011A, %4
%6 = fdiv double %5, 3.450000e+02
%7 = fptosi double %6 to i32
%8 = call i32 @cos(i32 %7)
%9 = call signext i16 @doubleToFixed(i32 %8)
ret i16 %9
}

LLVM IR (-O2):
define signext i16 @closeToFrequencyFullScaleCosine(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = fmul double %2, 0x41170C4DBF70011A
%4 = fdiv double %3, 3.450000e+02
%5 = fptosi double %4 to i32
%6 = tail call i32 @cos(i32 %5)
%7 = tail call signext i16 @doubleToFixed(i32 %6)
ret i16 %7
}
void curl_multi_perform() {}


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

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

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

LLVM IR (-O2):
define void @curl_multi_perform() {
ret void
}
/* Type definitions */
struct num {
  int dummy;
};

/* Variables and functions */
struct num *num_add(struct num *, int /*<<< orphan*/);
int /*<<< orphan*/ num_neg(struct num *);
struct num *num_sub(struct num *a, struct num *b) {
  return num_add(a, num_neg(b));
}


x86 assembly (clang, -O0):
<num_sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <num_neg@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1030 <num_add@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<num_sub>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1040 <num_neg@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <num_add@plt>

LLVM IR (-O0):
%struct.num = type { i32 }
define %struct.num* @num_sub(%struct.num* %0, %struct.num* %1) {
%3 = alloca %struct.num*
%4 = alloca %struct.num*
store %struct.num* %0, %struct.num** %3
store %struct.num* %1, %struct.num** %4
%5 = load %struct.num*, %struct.num** %3
%6 = load %struct.num*, %struct.num** %4
%7 = call i32 @num_neg(%struct.num* %6)
%8 = call %struct.num* @num_add(%struct.num* %5, i32 %7)
ret %struct.num* %8
}

LLVM IR (-O2):
%struct.num = type { i32 }
define %struct.num* @num_sub(%struct.num* %0, %struct.num* %1) {
%3 = tail call i32 @num_neg(%struct.num* %1)
%4 = tail call %struct.num* @num_add(%struct.num* %0, i32 %3)
ret %struct.num* %4
}
const char *get_endpoint_token() { return "test_series"; }


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

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"test_series\00"
define i8* @get_endpoint_token() {
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
}
const char *GetRev() { return "1253"; }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"1253\00"
define i8* @GetRev() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
void cdie(int res, const char *s) {
  if (!res) {
    error("\n%s: %d\n", s, res);
  }
}


x86 assembly (clang, -O0):
<cdie>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    113e <cdie+0x2e>
mov    -0x10(%rbp),%rsi
mov    -0x4(%rbp),%edx
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdie>:
test   %edi,%edi
je     1115 <cdie+0x5>
ret
lea    0xee4(%rip),%rdi
xor    %edx,%edx
xor    %eax,%eax
jmp    1030 <error@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"\0A%s: %d\0A\00"
define void @cdie(i32 %0, i8* %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @error to i32 (i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %1, i32 0)
br label %6
6: ; preds = %4, %2
ret void
}
int iscontentname(char *cp) { return cp[0] == '/'; }


x86 assembly (clang, -O0):
<iscontentname>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iscontentname>:
xor    %eax,%eax
cmpb   $0x2f,(%rdi)
sete   %al
ret

LLVM IR (-O0):
define i32 @iscontentname(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 47
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @iscontentname(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 47
%4 = zext i1 %3 to i32
ret i32 %4
}
void lruCacheSet(int key, int value) {}


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

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

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

LLVM IR (-O2):
define void @lruCacheSet(i32 %0, i32 %1) {
ret void
}
int ti_qstick_start(double const *options) { return (int)options[0] - 1; }


x86 assembly (clang, -O0):
<ti_qstick_start>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cvttsd2si (%rax),%eax
sub    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ti_qstick_start>:
cvttsd2si (%rdi),%eax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @ti_qstick_start(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = fptosi double %5 to i32
%7 = sub nsw i32 %6, 1
ret i32 %7
}

LLVM IR (-O2):
define i32 @ti_qstick_start(double* nocapture %0) {
%2 = load double, double* %0
%3 = fptosi double %2 to i32
%4 = add nsw i32 %3, -1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *xmalloc(size_t n) {
  void *p = malloc(n);
  if (!p) {
    fprintf(stderr, "out of memory\n");
    exit(2);
  }
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1173 <xmalloc+0x43>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
lea    0xe9c(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rax
call   1040 <malloc@plt>
test   %rax,%rax
je     113d <xmalloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"out of memory\0A\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %12, label %8
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 2)
unreachable
12: ; preds = %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"out of memory\0A\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 2)
unreachable
8: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, size_t, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int strlen(char *);
void msg_read_string(char *buf, size_t count) {
  fgets(buf, count, stdin);
  buf[strlen(buf) - 1] = 0;
}


x86 assembly (clang, -O0):
<msg_read_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2ea9(%rip),%rax
mov    (%rax),%edx
call   1040 <fgets@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msg_read_string>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ebd(%rip),%rax
mov    (%rax),%edx
call   1040 <fgets@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
define void @msg_read_string(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = load i32, i32* @stdin
%8 = call i32 @fgets(i8* %5, i64 %6, i32 %7)
%9 = load i8*, i8** %3
%10 = load i8*, i8** %3
%11 = call i32 @strlen(i8* %10)
%12 = sub nsw i32 %11, 1
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %9, i64 %13
store i8 0, i8* %14
ret void
}

LLVM IR (-O2):
@stdin = global i32 0
define void @msg_read_string(i8* %0, i64 %1) {
%3 = load i32, i32* @stdin
%4 = tail call i32 @fgets(i8* %0, i64 %1, i32 %3)
%5 = tail call i32 @strlen(i8* %0)
%6 = add nsw i32 %5, -1
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
store i8 0, i8* %8
ret void
}
int account_name_hash(char *name, int len) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @account_name_hash(i8* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
char *ultoa(unsigned int, char *, int);
extern char *utoa(unsigned int value, char *string, int radix) {
  return ultoa(value, string, radix);
}


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

x86 assembly (clang, -O2):
<utoa>:
jmp    1030 <ultoa@plt>

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

LLVM IR (-O2):
define i8* @utoa(i32 %0, i8* %1, i32 %2) {
%4 = tail call i8* @ultoa(i32 %0, i8* %1, i32 %2)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char *, int);
unsigned get_ul(unsigned char *buf) {
  unsigned result;
  unsigned char foo[4];
  memcpy(foo, buf, 4);
  result = (foo[0] << 24) | (foo[1] << 16) | (foo[2] << 8) | foo[3];
  return result;
}


x86 assembly (clang, -O0):
<get_ul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
movzbl -0x10(%rbp),%eax
shl    $0x18,%eax
movzbl -0xf(%rbp),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
movzbl -0xe(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
movzbl -0xd(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_ul>:
push   %rax
mov    %rdi,%rsi
lea    0x4(%rsp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    0x4(%rsp),%eax
bswap  %eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @get_ul(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca [4 x i8]
store i8* %0, i8** %2
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%6 = load i8*, i8** %2
%7 = call i32 @memcpy(i8* %5, i8* %6, i32 4)
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 24
%12 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 1
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = shl i32 %14, 16
%16 = or i32 %11, %15
%17 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 2
%18 = load i8, i8* %17
%19 = zext i8 %18 to i32
%20 = shl i32 %19, 8
%21 = or i32 %16, %20
%22 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 3
%23 = load i8, i8* %22
%24 = zext i8 %23 to i32
%25 = or i32 %21, %24
store i32 %25, i32* %3
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
define i32 @get_ul(i8* %0) {
%2 = alloca [4 x i8]
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%4 = call i32 @memcpy(i8* %3, i8* %0, i32 4)
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = shl nuw i32 %6, 24
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 1
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = shl nuw nsw i32 %10, 16
%12 = or i32 %11, %7
%13 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 2
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
%16 = shl nuw nsw i32 %15, 8
%17 = or i32 %12, %16
%18 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 3
%19 = load i8, i8* %18
%20 = zext i8 %19 to i32
%21 = or i32 %17, %20
ret i32 %21
}
/* Variables and functions */
int /*<<< orphan*/ blinkdash();
int /*<<< orphan*/ blinkdot();
int /*<<< orphan*/ sleep(double);
int blink6() {
  blinkdash();
  int c = 0;
  while (c != 4) {
    blinkdot();
    c++;
  }
  sleep(1.5);
  return 0;
}


x86 assembly (clang, -O0):
<blink6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <blinkdash@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x4,-0x4(%rbp)
je     1165 <blink6+0x35>
mov    $0x0,%al
call   1030 <blinkdot@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1146 <blink6+0x16>
movsd  0xe93(%rip),%xmm0
call   1050 <sleep@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blink6>:
push   %rax
xor    %eax,%eax
call   1040 <blinkdash@plt>
xor    %eax,%eax
call   1030 <blinkdot@plt>
xor    %eax,%eax
call   1030 <blinkdot@plt>
xor    %eax,%eax
call   1030 <blinkdot@plt>
xor    %eax,%eax
call   1030 <blinkdot@plt>
movsd  0xea4(%rip),%xmm0
call   1050 <sleep@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @blink6() {
%1 = alloca i32
%2 = call i32 (...) @blinkdash()
store i32 0, i32* %1
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %1
%5 = icmp ne i32 %4, 4
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = call i32 (...) @blinkdot()
%8 = load i32, i32* %1
%9 = add nsw i32 %8, 1
store i32 %9, i32* %1
br label %3
10: ; preds = %3
%11 = call i32 @sleep(double 1.500000e+00)
ret i32 0
}

LLVM IR (-O2):
define i32 @blink6() {
%1 = tail call i32 (...) @blinkdash()
%2 = tail call i32 (...) @blinkdot()
%3 = tail call i32 (...) @blinkdot()
%4 = tail call i32 (...) @blinkdot()
%5 = tail call i32 (...) @blinkdot()
%6 = tail call i32 @sleep(double 1.500000e+00)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ USBSTK5505_wait(unsigned long);
void USBSTK5505_waitusec(unsigned long usec) {
  USBSTK5505_wait((unsigned long)usec * 8);
}


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

x86 assembly (clang, -O2):
<USBSTK5505_waitusec>:
shl    $0x3,%rdi
jmp    1030 <USBSTK5505_wait@plt>

LLVM IR (-O0):
define void @USBSTK5505_waitusec(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = mul i64 %3, 8
%5 = call i32 @USBSTK5505_wait(i64 %4)
ret void
}

LLVM IR (-O2):
define void @USBSTK5505_waitusec(i64 %0) {
%2 = shl i64 %0, 3
%3 = tail call i32 @USBSTK5505_wait(i64 %2)
ret void
}
/* Type definitions */
typedef int ssize_t;

/* Variables and functions */
int lstPush(char ***, char const *);
ssize_t mapPush(char ***map, const char *key, const char *value) {
  if (-1 == lstPush(map, key)) {
    return -1;
  }
  return lstPush(map, value);
}


x86 assembly (clang, -O0):
<mapPush>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <lstPush@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
jne    114c <mapPush+0x3c>
movl   $0xffffffff,-0x4(%rbp)
jmp    115c <mapPush+0x4c>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <lstPush@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mapPush>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
call   1030 <lstPush@plt>
cmp    $0xffffffff,%eax
je     1136 <mapPush+0x26>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <lstPush@plt>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @mapPush(i8*** %0, i8* %1, i8* %2) {
%4 = tail call i32 @lstPush(i8*** %0, i8* %1)
%5 = icmp eq i32 %4, -1
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @lstPush(i8*** %0, i8* %2)
br label %8
8: ; preds = %3, %6
%9 = phi i32 [ %7, %6 ], [ -1, %3 ]
ret i32 %9
}
void TMTimerUnlock(void) {}


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

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

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

LLVM IR (-O2):
define void @TMTimerUnlock() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ op_to_ccr(char *);
void i_andi_ccr(void) { op_to_ccr("and"); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"and\00"
define void @i_andi_ccr() {
%1 = tail call i32 @op_to_ccr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void rpi_car_forward() {
  printf("### RPi Car Forward ###\n");
  ;
  ;
  ;
  ;
}


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"### RPi Car Forward ###\0A\00"
define void @rpi_car_forward() {
%1 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [24 x i8] c"### RPi Car Forward ###\00"
define void @rpi_car_forward() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
void *thread_function(void *arg) { return NULL; }


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

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

LLVM IR (-O0):
define i8* @thread_function(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @thread_function(i8* nocapture readnone %0) {
ret i8* null
}
/* Variables and functions */
int invert(unsigned int, int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  unsigned x = 111;
  int p = 4;
  int n = 3;
  printf("%u\n", invert(x, p, n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x6f,-0x8(%rbp)
movl   $0x4,-0xc(%rbp)
movl   $0x3,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <invert@plt>
mov    %eax,%esi
lea    0xea5(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x6f,%edi
mov    $0x4,%esi
mov    $0x3,%edx
call   1030 <invert@plt>
lea    0xec4(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = tail call i32 @invert(i32 111, i32 4, i32 3)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int NMI320_i2c_addr(void) { return 0xc0; }


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

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

LLVM IR (-O0):
define i32 @NMI320_i2c_addr() {
ret i32 192
}

LLVM IR (-O2):
define i32 @NMI320_i2c_addr() {
ret i32 192
}
int get_samplerate() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @get_samplerate() {
ret i32 0
}