xunge/DecIR huggingface dataset:
double QuarticValue(double quartic[5], double x) {
  return quartic[0] +
         x * (quartic[1] +
              x * (quartic[2] + x * (quartic[3] + x * quartic[4])));
}


x86 assembly (clang, -O0):
<QuarticValue>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm3
movsd  -0x10(%rbp),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm5
movsd  -0x10(%rbp),%xmm4
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm7
movsd  -0x10(%rbp),%xmm6
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm8
mulsd  %xmm8,%xmm6
addsd  %xmm7,%xmm6
mulsd  %xmm6,%xmm4
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<QuarticValue>:
movsd  0x20(%rdi),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x18(%rdi),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x10(%rdi),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x8(%rdi),%xmm1
mulsd  %xmm1,%xmm0
addsd  (%rdi),%xmm0
ret

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

LLVM IR (-O2):
define double @QuarticValue(double* nocapture %0, double %1) {
%3 = load double, double* %0
%4 = getelementptr inbounds double, double* %0, i64 1
%5 = load double, double* %4
%6 = getelementptr inbounds double, double* %0, i64 2
%7 = load double, double* %6
%8 = getelementptr inbounds double, double* %0, i64 3
%9 = load double, double* %8
%10 = getelementptr inbounds double, double* %0, i64 4
%11 = load double, double* %10
%12 = tail call double @llvm.fmuladd.f64(double %1, double %11, double %9)
%13 = tail call double @llvm.fmuladd.f64(double %1, double %12, double %7)
%14 = tail call double @llvm.fmuladd.f64(double %1, double %13, double %5)
%15 = tail call double @llvm.fmuladd.f64(double %1, double %14, double %3)
ret double %15
}
void g_utf8_strchr() {}


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

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

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

LLVM IR (-O2):
define void @g_utf8_strchr() {
ret void
}
void UARTAutoIdleModeControl(unsigned int baseAdd, unsigned int modeFlag) {
  (*((volatile unsigned int *)(baseAdd + (0x54)))) &= ~((0x00000001u));
  (*((volatile unsigned int *)(baseAdd + (0x54)))) |=
      (modeFlag & (0x00000001u));
}


x86 assembly (clang, -O0):
<UARTAutoIdleModeControl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x54,%eax
mov    %eax,%eax
mov    (%rax),%ecx
and    $0xfffffffe,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%edx
and    $0x1,%edx
mov    -0x4(%rbp),%eax
add    $0x54,%eax
mov    %eax,%eax
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTAutoIdleModeControl>:
add    $0x54,%edi
andl   $0xfffffffe,(%rdi)
and    $0x1,%esi
or     %esi,(%rdi)
ret

LLVM IR (-O0):
define void @UARTAutoIdleModeControl(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = add i32 %5, 84
%7 = zext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
%9 = load volatile i32, i32* %8
%10 = and i32 %9, -2
store volatile i32 %10, i32* %8
%11 = load i32, i32* %4
%12 = and i32 %11, 1
%13 = load i32, i32* %3
%14 = add i32 %13, 84
%15 = zext i32 %14 to i64
%16 = inttoptr i64 %15 to i32*
%17 = load volatile i32, i32* %16
%18 = or i32 %17, %12
store volatile i32 %18, i32* %16
ret void
}

LLVM IR (-O2):
define void @UARTAutoIdleModeControl(i32 %0, i32 %1) {
%3 = add i32 %0, 84
%4 = zext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
%7 = and i32 %6, -2
store volatile i32 %7, i32* %5
%8 = and i32 %1, 1
%9 = load volatile i32, i32* %5
%10 = or i32 %9, %8
store volatile i32 %10, i32* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clampClose();
int /*<<< orphan*/ clampOpen();
int /*<<< orphan*/ delay(int);
int /*<<< orphan*/ injectDown();
int /*<<< orphan*/ injectUp();
void loop() {
  clampClose();
  delay(1000);
  injectDown();
  delay(5000);
  injectUp();
  delay(5000);
  clampOpen();
  delay(3000);
}


x86 assembly (clang, -O0):
<loop>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <clampClose@plt>
mov    $0x3e8,%edi
call   1050 <delay@plt>
mov    $0x0,%al
call   1060 <injectDown@plt>
mov    $0x1388,%edi
call   1050 <delay@plt>
mov    $0x0,%al
call   1070 <injectUp@plt>
mov    $0x1388,%edi
call   1050 <delay@plt>
mov    $0x0,%al
call   1040 <clampOpen@plt>
mov    $0xbb8,%edi
call   1050 <delay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<loop>:
push   %rax
xor    %eax,%eax
call   1030 <clampClose@plt>
mov    $0x3e8,%edi
call   1050 <delay@plt>
xor    %eax,%eax
call   1060 <injectDown@plt>
mov    $0x1388,%edi
call   1050 <delay@plt>
xor    %eax,%eax
call   1070 <injectUp@plt>
mov    $0x1388,%edi
call   1050 <delay@plt>
xor    %eax,%eax
call   1040 <clampOpen@plt>
mov    $0xbb8,%edi
pop    %rax
jmp    1050 <delay@plt>

LLVM IR (-O0):
define void @loop() {
%1 = call i32 (...) @clampClose()
%2 = call i32 @delay(i32 1000)
%3 = call i32 (...) @injectDown()
%4 = call i32 @delay(i32 5000)
%5 = call i32 (...) @injectUp()
%6 = call i32 @delay(i32 5000)
%7 = call i32 (...) @clampOpen()
%8 = call i32 @delay(i32 3000)
ret void
}

LLVM IR (-O2):
define void @loop() {
%1 = tail call i32 (...) @clampClose()
%2 = tail call i32 @delay(i32 1000)
%3 = tail call i32 (...) @injectDown()
%4 = tail call i32 @delay(i32 5000)
%5 = tail call i32 (...) @injectUp()
%6 = tail call i32 @delay(i32 5000)
%7 = tail call i32 (...) @clampOpen()
%8 = tail call i32 @delay(i32 3000)
ret void
}
/* Variables and functions */
int u8islatinsigni(int /*<<< orphan*/);
int /*<<< orphan*/ u8tointc(char *);
int u8islatinsignc(char *c) { return u8islatinsigni(u8tointc(c)); }


x86 assembly (clang, -O0):
<u8islatinsignc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <u8tointc@plt>
mov    %eax,%edi
call   1040 <u8islatinsigni@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<u8islatinsignc>:
push   %rax
call   1030 <u8tointc@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <u8islatinsigni@plt>

LLVM IR (-O0):
define i32 @u8islatinsignc(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @u8tointc(i8* %3)
%5 = call i32 @u8islatinsigni(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @u8islatinsignc(i8* %0) {
%2 = tail call i32 @u8tointc(i8* %0)
%3 = tail call i32 @u8islatinsigni(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_check_signal_is_blocked() {
  printf("NOT IMPLEMENTED:"
         "pa_check_signal_is_blocked"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [44 x i8] c"NOT IMPLEMENTED:pa_check_signal_is_blocked\0A\00"
define i32 @pa_check_signal_is_blocked() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [43 x i8] c"NOT IMPLEMENTED:pa_check_signal_is_blocked\00"
define i32 @pa_check_signal_is_blocked() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ mpd_close(int);
int mpd_connect();
int /*<<< orphan*/ mpd_play(int, char *);
int play_album(char *album) {
  int sock;
  if ((sock = mpd_connect()) == -1)
    return -1;
  mpd_play(sock, album);
  mpd_close(sock);
  return 0;
}


x86 assembly (clang, -O0):
<play_album>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <mpd_connect@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xffffffff,%eax
jne    115b <play_album+0x2b>
movl   $0xffffffff,-0x4(%rbp)
jmp    1176 <play_album+0x46>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <mpd_play@plt>
mov    -0x14(%rbp),%edi
call   1040 <mpd_close@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<play_album>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <mpd_connect@plt>
cmp    $0xffffffff,%eax
je     115a <play_album+0x2a>
mov    %eax,%ebp
mov    %eax,%edi
mov    %r14,%rsi
call   1050 <mpd_play@plt>
mov    %ebp,%edi
call   1040 <mpd_close@plt>
jmp    115f <play_album+0x2f>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @play_album(i8* %0) {
%2 = tail call i32 (...) @mpd_connect()
%3 = icmp eq i32 %2, -1
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @mpd_play(i32 %2, i8* %0)
%6 = tail call i32 @mpd_close(i32 %2)
br label %7
7: ; preds = %1, %4
%8 = phi i32 [ 0, %4 ], [ -1, %1 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ OPLinkSettingsHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void OPLinkSettingsRequestUpdate() {
  UAVObjRequestUpdate(OPLinkSettingsHandle());
}


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

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

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

LLVM IR (-O2):
define void @OPLinkSettingsRequestUpdate() {
%1 = tail call i32 (...) @OPLinkSettingsHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
unsigned long long ror64(unsigned long long x, int s) {
  asm("rorq %%cl,%0" : "=r"(x) : "0"(x), "c"(s));
  return x;
}


x86 assembly (clang, -O0):
<ror64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
ror    %cl,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ror64>:
mov    %esi,%ecx
mov    %rdi,%rax
ror    %cl,%rax
ret

LLVM IR (-O0):
define i64 @ror64(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = load i32, i32* %4
%7 = call i64 asm "rorq %cl,$0", "=r,0,{cx},~{dirflag},~{fpsr},~{flags}"(i64 %5, i32 %6)
store i64 %7, i64* %3
%8 = load i64, i64* %3
ret i64 %8
}

LLVM IR (-O2):
define i64 @ror64(i64 %0, i32 %1) {
%3 = tail call i64 asm "rorq %cl,$0", "=r,0,{cx},~{dirflag},~{fpsr},~{flags}"(i64 %0, i32 %1)
ret i64 %3
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int64_t cfs_stub_getxattr(const char *path, const char *name, void *data,
                          size_t size) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<cfs_stub_getxattr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2ecd(%rip),%rax
mov    (%rax),%ecx
mov    0x2eb4(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfs_stub_getxattr>:
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 @cfs_stub_getxattr(i8* %0, i8* %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i32, i32* @ENOSYS
store i32 %9, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @cfs_stub_getxattr(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i64 %3) {
%5 = load i32, i32* @ENOSYS
store i32 %5, i32* @errno
ret i32 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int putc(char, int /*<<< orphan*/ *);
int char_writer(char *buffer, FILE *ptr) { return putc(buffer[0], ptr); }


x86 assembly (clang, -O0):
<char_writer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    -0x10(%rbp),%rsi
movsbl %al,%edi
call   1030 <putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_writer>:
movsbl (%rdi),%edi
jmp    1030 <putc@plt>

LLVM IR (-O0):
define i32 @char_writer(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = load i32*, i32** %4
%9 = call i32 @putc(i8 signext %7, i32* %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @char_writer(i8* nocapture %0, i32* nocapture %1) {
%3 = load i8, i8* %0
%4 = tail call i32 @putc(i8 signext %3, i32* %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
void test2() {
  int len = 0;
  while (1) {
    switch (len) {
    case 0:
      break;
      break;
    case -1:
      break;
      break;
    }
    sleep(1);
    printf("------21----------\n");
  }
  printf("------22----------\n");
}


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0xffffffff,%eax
je     1158 <test2+0x38>
jmp    1143 <test2+0x23>
mov    -0x8(%rbp),%eax
test   %eax,%eax
jne    115d <test2+0x3d>
jmp    1153 <test2+0x33>
jmp    115d <test2+0x3d>
jmp    115d <test2+0x3d>
mov    $0x1,%edi
call   1040 <sleep@plt>
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <test2+0xf>

x86 assembly (clang, -O2):
<test2>:
push   %rbx
lea    0xed8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
jmp    1130 <test2+0x10>

LLVM IR (-O0):
@.str = [20 x i8] c"------21----------\0A\00"
define void @test2() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %6
%3 = load i32, i32* %1
switch i32 %3, label %6 [
i32 0, label %4
i32 -1, label %5
]
4: ; preds = %2
br label %6
5: ; preds = %2
br label %6
6: ; preds = %2, %5, %4
%7 = call i32 @sleep(i32 1)
%8 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %2
}

LLVM IR (-O2):
@str = [19 x i8] c"------21----------\00"
define void @test2() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @sleep(i32 1)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
br label %1
}
void gtk_window_get_mnemonic_modifier() {}


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

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

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

LLVM IR (-O2):
define void @gtk_window_get_mnemonic_modifier() {
ret void
}
unsigned long BLInternalFlashSizeGet(void) {
  return ((((*((volatile unsigned long *)(0x400FE008))) & 0x0000FFFF) + 1)
          << 11);
}


x86 assembly (clang, -O0):
<BLInternalFlashSizeGet>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400fe008,%eax
mov    (%rax),%rax
and    $0xffff,%rax
add    $0x1,%rax
shl    $0xb,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BLInternalFlashSizeGet>:
mov    0x400fe008,%rax
40
movzwl %ax,%eax
shl    $0xb,%rax
add    $0x800,%rax
ret

LLVM IR (-O0):
define i64 @BLInternalFlashSizeGet() {
%1 = load volatile i64, i64* inttoptr (i64 1074782216 to i64*)
%2 = and i64 %1, 65535
%3 = add i64 %2, 1
%4 = shl i64 %3, 11
ret i64 %4
}

LLVM IR (-O2):
define i64 @BLInternalFlashSizeGet() {
%1 = load volatile i64, i64* inttoptr (i64 1074782216 to i64*)
%2 = shl i64 %1, 11
%3 = and i64 %2, 134215680
%4 = add nuw nsw i64 %3, 2048
ret i64 %4
}
void testFunc2() { extern int j; }


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

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

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

LLVM IR (-O2):
define void @testFunc2() {
ret void
}
void kmemleak_erase(void **ptr) {}


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

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

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

LLVM IR (-O2):
define void @kmemleak_erase(i8** nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3;

/* Variables and functions */
int sqlite3_open(char *, int /*<<< orphan*/ **);
int main(int argc, char *argv[]) {
  int dbres;
  sqlite3 *db;
  dbres = sqlite3_open("testdb.sqlite3", &db);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [15 x i8] c"testdb.sqlite3\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32*
%4 = bitcast i32** %3 to i8*
%5 = call i32 @sqlite3_open(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32** %3)
ret i32 0
}
fatal(str) char *str;
{
  printf("%s\n", str);
  exit(10);
}


x86 assembly (clang, -O0):
<fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0xa,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<fatal>:
push   %rax
call   1030 <puts@plt>
mov    $0xa,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
define i32 @fatal(i8* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) %0)
tail call void @exit(i32 10)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, double *);
double Division(double a, double b) {
  printf("Enter a number: ");
  scanf("%lf", &a);
  printf("Enter a number: ");
  scanf("%lf", &b);
  return (a / b);
}


x86 assembly (clang, -O0):
<Division>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
lea    0xecc(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb0(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Division>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
lea    0xec6(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xec8(%rip),%r14
lea    0x10(%rsp),%rsi
mov    %r14,%rdi
call   1040 <scanf@plt>
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %r14,%rdi
call   1040 <scanf@plt>
movsd  0x10(%rsp),%xmm0
divsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Enter a number: \00"
@.str.1 = [4 x i8] c"%lf\00"
define double @Division(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %3)
%7 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %4)
%9 = load double, double* %3
%10 = load double, double* %4
%11 = fdiv double %9, %10
ret double %11
}

LLVM IR (-O2):
@.str = [17 x i8] c"Enter a number: \00"
@.str.1 = [4 x i8] c"%lf\00"
define double @Division(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %3)
%7 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %4)
%9 = load double, double* %3
%10 = load double, double* %4
%11 = fdiv double %9, %10
ret double %11
}
/* Type definitions */
struct usd_device {
  int dummy;
};
struct usd_cq {
  int dummy;
};

/* Variables and functions */
int usd_create_cq_with_cv(struct usd_device *, unsigned int, int, int,
                          int /*<<< orphan*/ *, struct usd_cq **);
int usd_create_cq(struct usd_device *dev, unsigned num_entries, int comp_fd,
                  struct usd_cq **cq_o) {
  return usd_create_cq_with_cv(dev, num_entries, comp_fd, -1, NULL, cq_o);
}


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

x86 assembly (clang, -O2):
<usd_create_cq>:
mov    %rcx,%r9
mov    $0xffffffff,%ecx
xor    %r8d,%r8d
jmp    1030 <usd_create_cq_with_cv@plt>

LLVM IR (-O0):
%struct.usd_device = type { i32 }
%struct.usd_cq = type { i32 }
define i32 @usd_create_cq(%struct.usd_device* %0, i32 %1, i32 %2, %struct.usd_cq** %3) {
%5 = alloca %struct.usd_device*
%6 = alloca i32
%7 = alloca i32
%8 = alloca %struct.usd_cq**
store %struct.usd_device* %0, %struct.usd_device** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store %struct.usd_cq** %3, %struct.usd_cq*** %8
%9 = load %struct.usd_device*, %struct.usd_device** %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load %struct.usd_cq**, %struct.usd_cq*** %8
%13 = call i32 @usd_create_cq_with_cv(%struct.usd_device* %9, i32 %10, i32 %11, i32 -1, i32* null, %struct.usd_cq** %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.usd_device = type { i32 }
%struct.usd_cq = type { i32 }
define i32 @usd_create_cq(%struct.usd_device* %0, i32 %1, i32 %2, %struct.usd_cq** %3) {
%5 = tail call i32 @usd_create_cq_with_cv(%struct.usd_device* %0, i32 %1, i32 %2, i32 -1, i32* null, %struct.usd_cq** %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ __nvvm_vote_all(int);
int /*<<< orphan*/ __nvvm_vote_any(int);
int /*<<< orphan*/ __nvvm_vote_ballot(int);
int /*<<< orphan*/ __nvvm_vote_uni(int);
__attribute__((device)) void nvvm_vote(int pred) {
  __nvvm_vote_all(pred);
  __nvvm_vote_any(pred);
  __nvvm_vote_uni(pred);
  __nvvm_vote_ballot(pred);
}


x86 assembly (clang, -O0):
<nvvm_vote>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <__nvvm_vote_all@plt>
mov    -0x4(%rbp),%edi
call   1040 <__nvvm_vote_any@plt>
mov    -0x4(%rbp),%edi
call   1050 <__nvvm_vote_uni@plt>
mov    -0x4(%rbp),%edi
call   1060 <__nvvm_vote_ballot@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nvvm_vote>:
push   %rbx
mov    %edi,%ebx
call   1030 <__nvvm_vote_all@plt>
mov    %ebx,%edi
call   1040 <__nvvm_vote_any@plt>
mov    %ebx,%edi
call   1050 <__nvvm_vote_uni@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1060 <__nvvm_vote_ballot@plt>

LLVM IR (-O0):
define void @nvvm_vote(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @__nvvm_vote_all(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @__nvvm_vote_any(i32 %5)
%7 = load i32, i32* %2
%8 = call i32 @__nvvm_vote_uni(i32 %7)
%9 = load i32, i32* %2
%10 = call i32 @__nvvm_vote_ballot(i32 %9)
ret void
}

LLVM IR (-O2):
define void @nvvm_vote(i32 %0) {
%2 = tail call i32 @__nvvm_vote_all(i32 %0)
%3 = tail call i32 @__nvvm_vote_any(i32 %0)
%4 = tail call i32 @__nvvm_vote_uni(i32 %0)
%5 = tail call i32 @__nvvm_vote_ballot(i32 %0)
ret void
}
int main(int argc, char *argv[]) {
  (void)argc;
  (void)argv;
  return 1;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 1
}
int mdrv_sd_multi_transfer(unsigned int dev_addr, unsigned int blocks,
                           unsigned int blksz, int write) {
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @mdrv_sd_multi_transfer(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @mdrv_sd_multi_transfer(i32 %0, i32 %1, i32 %2, i32 %3) {
ret i32 0
}
/* Variables and functions */
size_t m_min_size(size_t left, size_t right) {
  return (left < right) ? left : right;
}


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

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

LLVM IR (-O0):
define i64 @m_min_size(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 @m_min_size(i64 %0, i64 %1) {
%3 = icmp ult i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
double pdiff(double x, double y) {
  if (x != x || y != y) {
    return 0.0 / 0.0;
  }
  if (x > y) {
    return x - y;
  }
  return 0.0;
}


x86 assembly (clang, -O0):
<pdiff>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jne    113f <pdiff+0x3f>
jp     113f <pdiff+0x3f>
movsd  -0x18(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jne    113f <pdiff+0x3f>
jp     113f <pdiff+0x3f>
jmp    1151 <pdiff+0x51>
movsd  0xeb9(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    117d <pdiff+0x7d>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1175 <pdiff+0x75>
movsd  -0x10(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    117d <pdiff+0x7d>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pdiff>:
ucomisd %xmm1,%xmm0
jp     1119 <pdiff+0x19>
xorpd  %xmm2,%xmm2
jbe    1114 <pdiff+0x14>
subsd  %xmm1,%xmm0
movapd %xmm0,%xmm2
movapd %xmm2,%xmm0
ret
movsd  0xedf(%rip),%xmm0
ret

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

LLVM IR (-O2):
define double @pdiff(double %0, double %1) {
%3 = fcmp uno double %0, %1
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = fcmp ogt double %0, %1
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = fsub double %0, %1
br label %8
8: ; preds = %4, %2, %6
%9 = phi double [ %7, %6 ], [ 0x7FF8000000000000, %2 ], [ 0.000000e+00, %4 ]
ret double %9
}
/* Type definitions */
typedef int /*<<< orphan*/ i2d_of_void;
typedef int /*<<< orphan*/ DSA;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int PEM_ASN1_write_bio(int /*<<< orphan*/ *, int /*<<< orphan*/,
                       int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                       int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                       int /*<<< orphan*/, int /*<<< orphan*/ *,
                       int /*<<< orphan*/ *);
int /*<<< orphan*/ PEM_STRING_PUBLIC;
scalar_t__ i2d_DSA_PUBKEY;
int PEM_write_bio_DSA_PUBKEY(BIO *bp, DSA *x) {
  return PEM_ASN1_write_bio((i2d_of_void *)i2d_DSA_PUBKEY, PEM_STRING_PUBLIC,
                            bp, x, NULL, NULL, 0, NULL, NULL);
}


x86 assembly (clang, -O0):
<PEM_write_bio_DSA_PUBKEY>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%rdi
mov    0x2eb7(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%r9d
xor    %eax,%eax
mov    %r9,%r8
movl   $0x0,(%rsp)
movq   $0x0,0x8(%rsp)
movq   $0x0,0x10(%rsp)
call   1030 <PEM_ASN1_write_bio@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PEM_write_bio_DSA_PUBKEY>:
sub    $0x18,%rsp
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2eaf(%rip),%rax
mov    (%rax),%rdi
mov    0x2ebd(%rip),%rax
mov    (%rax),%esi
xorps  %xmm0,%xmm0
movups %xmm0,0x8(%rsp)
movl   $0x0,(%rsp)
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <PEM_ASN1_write_bio@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@i2d_DSA_PUBKEY = global i64 0
@PEM_STRING_PUBLIC = global i32 0
define i32 @PEM_write_bio_DSA_PUBKEY(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i64, i64* @i2d_DSA_PUBKEY
%6 = inttoptr i64 %5 to i32*
%7 = load i32, i32* @PEM_STRING_PUBLIC
%8 = load i32*, i32** %3
%9 = load i32*, i32** %4
%10 = call i32 @PEM_ASN1_write_bio(i32* %6, i32 %7, i32* %8, i32* %9, i32* null, i32* null, i32 0, i32* null, i32* null)
ret i32 %10
}

LLVM IR (-O2):
@i2d_DSA_PUBKEY = global i64 0
@PEM_STRING_PUBLIC = global i32 0
define i32 @PEM_write_bio_DSA_PUBKEY(i32* %0, i32* %1) {
%3 = load i64, i64* @i2d_DSA_PUBKEY
%4 = inttoptr i64 %3 to i32*
%5 = load i32, i32* @PEM_STRING_PUBLIC
%6 = tail call i32 @PEM_ASN1_write_bio(i32* %4, i32 %5, i32* %0, i32* %1, i32* null, i32* null, i32 0, i32* null, i32* null)
ret i32 %6
}
unsigned xrop3_221_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned stk1;
  unsigned stk2;
  stk2 = ~D;
  stk1 = S | stk2;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_221_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
or     -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_221_0_0>:
lea    -0x100(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @xrop3_221_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 8
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = or i32 %11, %13
store i32 %14, i32* %6
%15 = load i32, i32* %5
%16 = xor i32 %15, -1
store i32 %16, i32* %8
%17 = load i32, i32* %6
%18 = load i32, i32* %8
%19 = or i32 %17, %18
store i32 %19, i32* %7
%20 = load i32, i32* %7
ret i32 %20
}

LLVM IR (-O2):
define i32 @xrop3_221_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = or i32 %3, -256
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ SIGCHLD;
int /*<<< orphan*/ SIG_SETMASK;
int /*<<< orphan*/ sigaddset(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
int /*<<< orphan*/ sigprocmask(int /*<<< orphan*/, int /*<<< orphan*/ *,
                               int /*<<< orphan*/ *);
main() {
  sigset_t ss;
  sigemptyset(&ss);
  sigaddset(&ss, SIGCHLD);
  sigprocmask(SIG_SETMASK, &ss, (sigset_t *)0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1040 <sigemptyset@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%esi
lea    -0x4(%rbp),%rdi
call   1050 <sigaddset@plt>
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
lea    -0x4(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <sigprocmask@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <sigemptyset@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1050 <sigaddset@plt>
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1030 <sigprocmask@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@SIGCHLD = global i32 0
@SIG_SETMASK = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = call i32 @sigemptyset(i32* %1)
%3 = load i32, i32* @SIGCHLD
%4 = call i32 @sigaddset(i32* %1, i32 %3)
%5 = load i32, i32* @SIG_SETMASK
%6 = call i32 @sigprocmask(i32 %5, i32* %1, i32* null)
ret i32 0
}

LLVM IR (-O2):
@SIGCHLD = global i32 0
@SIG_SETMASK = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @sigemptyset(i32* %1)
%4 = load i32, i32* @SIGCHLD
%5 = call i32 @sigaddset(i32* %1, i32 %4)
%6 = load i32, i32* @SIG_SETMASK
%7 = call i32 @sigprocmask(i32 %6, i32* %1, i32* null)
ret i32 0
}
/* Variables and functions */
char *getCrrentTime(char const *);
int /*<<< orphan*/ printf(char *, char *, char const *);
void debug(const char *msg) {
  const char *date_f = "%Y-%m-%d %I:%M:%S";
  char *datetime = getCrrentTime(date_f);
  printf("%s\t[DEBUG]%s\n", datetime, msg);
}


x86 assembly (clang, -O0):
<debug>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <getCrrentTime@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x8(%rbp),%rdx
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<debug>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1040 <getCrrentTime@plt>
lea    0xedb(%rip),%rdi
mov    %rax,%rsi
mov    %rbx,%rdx
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"%Y-%m-%d %I:%M:%S\00"
@.str.1 = [14 x i8] c"%s\09[DEBUG]%s\0A\00"
define void @debug(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %2
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8** %3
%5 = load i8*, i8** %3
%6 = call i8* @getCrrentTime(i8* %5)
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = load i8*, i8** %2
%9 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %7, i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"%Y-%m-%d %I:%M:%S\00"
@.str.1 = [14 x i8] c"%s\09[DEBUG]%s\0A\00"
define void @debug(i8* %0) {
%2 = tail call i8* @getCrrentTime(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %2, i8* %0)
ret void
}
/* Type definitions */
struct rq_asset_dividend_yield {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/
rq_asset_dividend_yield_free(struct rq_asset_dividend_yield *);
void rq_asset_dividend_yield_freefunc(void *asset_data) {
  rq_asset_dividend_yield_free((struct rq_asset_dividend_yield *)asset_data);
}


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

x86 assembly (clang, -O2):
<rq_asset_dividend_yield_freefunc>:
jmp    1030 <rq_asset_dividend_yield_free@plt>

LLVM IR (-O0):
%struct.rq_asset_dividend_yield = type { i32 }
define void @rq_asset_dividend_yield_freefunc(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.rq_asset_dividend_yield*
%5 = call i32 @rq_asset_dividend_yield_free(%struct.rq_asset_dividend_yield* %4)
ret void
}

LLVM IR (-O2):
%struct.rq_asset_dividend_yield = type { i32 }
define void @rq_asset_dividend_yield_freefunc(i8* %0) {
%2 = bitcast i8* %0 to %struct.rq_asset_dividend_yield*
%3 = tail call i32 @rq_asset_dividend_yield_free(%struct.rq_asset_dividend_yield* %2)
ret void
}
/* Variables and functions */
double pow(int, int);
double quadrat(int zahl) { return pow(zahl, 2); }


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

x86 assembly (clang, -O2):
<quadrat>:
mov    $0x2,%esi
jmp    1030 <pow@plt>

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

LLVM IR (-O2):
define double @quadrat(i32 %0) {
%2 = tail call double @pow(i32 %0, i32 2)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void start_a3(void) { printf("start_a3\n"); }


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

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

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

LLVM IR (-O2):
@str = [9 x i8] c"start_a3\00"
define void @start_a3() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ itoa(int, char *);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char **argv) {
  char s[100];
  int n = -2147483648;
  itoa(n, s);
  printf("%s\n", s);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
mov    %rsp,%rbx
mov    $0x80000000,%edi
mov    %rbx,%rsi
call   1040 <itoa@plt>
lea    0xec4(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [100 x i8]
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%5 = call i32 @itoa(i32 -2147483648, i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}
/* Variables and functions */
unsigned char *percentile_value_location(unsigned char **);
int percentile_value(unsigned char **sec) {
  unsigned char *p;
  p = percentile_value_location(sec);
  if (p == NULL)
    return -1;
  return (int)*p;
}


x86 assembly (clang, -O0):
<percentile_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <percentile_value_location@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1140 <percentile_value+0x30>
movl   $0xffffffff,-0x4(%rbp)
jmp    114a <percentile_value+0x3a>
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<percentile_value>:
push   %rax
call   1030 <percentile_value_location@plt>
test   %rax,%rax
je     1120 <percentile_value+0x10>
movzbl (%rax),%eax
pop    %rcx
ret
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @percentile_value(i8** %0) {
%2 = tail call i8* @percentile_value_location(i8** %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = load i8, i8* %2
%6 = zext i8 %5 to i32
br label %7
7: ; preds = %1, %4
%8 = phi i32 [ %6, %4 ], [ -1, %1 ]
ret i32 %8
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_bus_error_set(void *e, const char *name, const char *message) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_bus_error_set>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
mov    0x2ec7(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_error_set(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = load i32, i32* @EINVAL
%5 = sub nsw i32 0, %4
ret i32 %5
}
stream_test(void) {
  static float input[20];
  int k;
  for (k = 0; k < 20; k++)
    input[k] = k * 1.0;
}


x86 assembly (clang, -O0):
<stream_test>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x8(%rbp)
cmpl   $0x14,-0x8(%rbp)
jge    1148 <stream_test+0x48>
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xede(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movslq -0x8(%rbp),%rcx
lea    0x2efb(%rip),%rax
movss  %xmm0,(%rax,%rcx,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110b <stream_test+0xb>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@stream_test.input = internal global [20 x float] zeroinitializer
define i32 @stream_test() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %2
br label %3
3: ; preds = %14, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 20
br i1 %5, label %6, label %17
6: ; preds = %3
%7 = load i32, i32* %2
%8 = sitofp i32 %7 to double
%9 = fmul double %8, 1.000000e+00
%10 = fptrunc double %9 to float
%11 = load i32, i32* %2
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [20 x float], [20 x float]* @stream_test.input, i64 0, i64 %12
store float %10, float* %13
br label %14
14: ; preds = %6
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 1
store i32 %16, i32* %2
br label %3
17: ; preds = %3
%18 = load i32, i32* %1
ret i32 %18
}

LLVM IR (-O2):
define i32 @stream_test() {
ret i32 undef
}