xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ ButtonIsDown(unsigned char);
unsigned char ButtonState(unsigned char btn) {
  if (ButtonIsDown(btn))
    return 0x80 | 0x01;
  else
    return 0x10;
}


x86 assembly (clang, -O0):
<ButtonState>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%edi
call   1030 <ButtonIsDown@plt>
cmp    $0x0,%rax
je     113a <ButtonState+0x2a>
movb   $0x81,-0x1(%rbp)
jmp    113e <ButtonState+0x2e>
movb   $0x10,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ButtonState>:
push   %rax
call   1030 <ButtonIsDown@plt>
test   %rax,%rax
mov    $0x10,%ecx
mov    $0x81,%eax
cmove  %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i8 @ButtonState(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i64 @ButtonIsDown(i8 zeroext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i8 -127, i8* %2
br label %9
8: ; preds = %1
store i8 16, i8* %2
br label %9
9: ; preds = %8, %7
%10 = load i8, i8* %2
ret i8 %10
}

LLVM IR (-O2):
define zeroext i8 @ButtonState(i8 zeroext %0) {
%2 = tail call i64 @ButtonIsDown(i8 zeroext %0)
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i8 16, i8 -127
ret i8 %4
}
/* Type definitions */
typedef int wchar_t;
struct _Locale_monetary {
  int dummy;
};

/* Variables and functions */
wchar_t _WLocale_mon_decimal_point(struct _Locale_monetary *lmon) {
  return L'.';
}


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

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

LLVM IR (-O0):
%struct._Locale_monetary = type { i32 }
define i32 @_WLocale_mon_decimal_point(%struct._Locale_monetary* %0) {
%2 = alloca %struct._Locale_monetary*
store %struct._Locale_monetary* %0, %struct._Locale_monetary** %2
ret i32 46
}

LLVM IR (-O2):
%struct._Locale_monetary = type { i32 }
define i32 @_WLocale_mon_decimal_point(%struct._Locale_monetary* nocapture readnone %0) {
ret i32 46
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ bswap_64(int /*<<< orphan*/);
uint64_t htonll(uint64_t hostlong) { return bswap_64(hostlong); }


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

x86 assembly (clang, -O2):
<htonll>:
jmp    1030 <bswap_64@plt>

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

LLVM IR (-O2):
define i32 @htonll(i32 %0) {
%2 = tail call i32 @bswap_64(i32 %0)
ret i32 %2
}
/* Variables and functions */
float sqrtf(float);
float math_dist(float ax, float ay, float bx, float by) {
  float dx, dy;
  dx = bx - ax;
  dy = by - ay;
  return sqrtf(dx * dx + dy * dy);
}


x86 assembly (clang, -O0):
<math_dist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
movss  -0x14(%rbp),%xmm2
movss  -0x18(%rbp),%xmm1
mulss  -0x18(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1030 <sqrtf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<math_dist>:
subss  %xmm0,%xmm2
subss  %xmm1,%xmm3
mulss  %xmm3,%xmm3
mulss  %xmm2,%xmm2
addss  %xmm3,%xmm2
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm2
jb     1134 <math_dist+0x24>
xorps  %xmm0,%xmm0
sqrtss %xmm2,%xmm0
ret
movaps %xmm2,%xmm0
jmp    1030 <sqrtf@plt>

LLVM IR (-O0):
define float @math_dist(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%11 = load float, float* %7
%12 = load float, float* %5
%13 = fsub float %11, %12
store float %13, float* %9
%14 = load float, float* %8
%15 = load float, float* %6
%16 = fsub float %14, %15
store float %16, float* %10
%17 = load float, float* %9
%18 = load float, float* %9
%19 = load float, float* %10
%20 = load float, float* %10
%21 = fmul float %19, %20
%22 = call float @llvm.fmuladd.f32(float %17, float %18, float %21)
%23 = call float @sqrtf(float %22)
ret float %23
}

LLVM IR (-O2):
define float @math_dist(float %0, float %1, float %2, float %3) {
%5 = fsub float %2, %0
%6 = fsub float %3, %1
%7 = fmul float %6, %6
%8 = tail call float @llvm.fmuladd.f32(float %5, float %5, float %7)
%9 = tail call float @sqrtf(float %8)
ret float %9
}
void av_image_copy_plane() {}


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

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

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

LLVM IR (-O2):
define void @av_image_copy_plane() {
ret void
}
void writeb(unsigned char v, void *a) {
  unsigned char *p = a;
  *p = v;
}


x86 assembly (clang, -O0):
<writeb>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x1(%rbp),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeb>:
mov    %dil,(%rsi)
ret

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

LLVM IR (-O2):
define void @writeb(i8 zeroext %0, i8* nocapture writeonly %1) {
store i8 %0, i8* %1
ret void
}
int fun818() { return 818; }


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

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

LLVM IR (-O0):
define i32 @fun818() {
ret i32 818
}

LLVM IR (-O2):
define i32 @fun818() {
ret i32 818
}
/* Variables and functions */
int /*<<< orphan*/ HplAtm128Timer1P__CompareB__default__fired();
void HplAtm128Timer1P__CompareB__fired(void) {
  HplAtm128Timer1P__CompareB__default__fired();
}


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

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

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

LLVM IR (-O2):
define void @HplAtm128Timer1P__CompareB__fired() {
%1 = tail call i32 (...) @HplAtm128Timer1P__CompareB__default__fired()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(int);
int main() {
  int a = 2;
  foo(a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 2)
ret i32 0
}
char *pathlist_relocation(const char *from_path, const char *to_path_list) {
  return (to_path_list);
}


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

x86 assembly (clang, -O2):
<pathlist_relocation>:
mov    %rsi,%rax
ret

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

LLVM IR (-O2):
define i8* @pathlist_relocation(i8* nocapture readnone %0, i8* readnone returned %1) {
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void wg_amsg(char *msg) { printf("AMSG/%s\n", msg); }


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"AMSG/%s\0A\00"
define void @wg_amsg(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void UninitI420toRGB444() {}


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

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

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

LLVM IR (-O2):
define void @UninitI420toRGB444() {
ret void
}
/* Variables and functions */
float fmodf(float, float);
float nvg__modf(float a, float b) { return fmodf(a, b); }


x86 assembly (clang, -O0):
<nvg__modf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <fmodf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nvg__modf>:
jmp    1030 <fmodf@plt>

LLVM IR (-O0):
define float @nvg__modf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = call float @fmodf(float %5, float %6)
ret float %7
}

LLVM IR (-O2):
define float @nvg__modf(float %0, float %1) {
%3 = tail call float @fmodf(float %0, float %1)
ret float %3
}
void run1(void) {
  char buf[0x1000 / 2];
  int dummy = 0;
  dummy++;
}


x86 assembly (clang, -O0):
<run1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x790,%rsp
movl   $0x0,-0x804(%rbp)
mov    -0x804(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x804(%rbp)
add    $0x790,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @run1() {
%1 = alloca [2048 x i8]
%2 = alloca i32
store i32 0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
store i32 %4, i32* %2
ret void
}

LLVM IR (-O2):
define void @run1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() { printf("hello, world!\n "); }


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

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

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

LLVM IR (-O2):
@.str = [16 x i8] c"hello, world!\0A \00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
double Ft2m(const double valueFt) { return valueFt * 0.3048; }


x86 assembly (clang, -O0):
<Ft2m>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Ft2m>:
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @Ft2m(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 3.048000e-01
ret double %4
}

LLVM IR (-O2):
define double @Ft2m(double %0) {
%2 = fmul double %0, 3.048000e-01
ret double %2
}
void writeVIC(unsigned long add, unsigned long data) {
  *((unsigned long *)(((0xFFFC0000 | add) >> 2) | 0xB0000000)) = data;
}


x86 assembly (clang, -O0):
<writeVIC>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
movabs $0xfffc0000,%rax
or     -0x8(%rbp),%rax
shr    $0x2,%rax
movabs $0xb0000000,%rdx
or     %rdx,%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeVIC>:
shr    $0x2,%rdi
mov    $0xbfff0000,%eax
or     %rdi,%rax
mov    %rsi,(%rax)
ret

LLVM IR (-O0):
define void @writeVIC(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = or i64 4294705152, %6
%8 = lshr i64 %7, 2
%9 = or i64 %8, 2952790016
%10 = inttoptr i64 %9 to i64*
store i64 %5, i64* %10
ret void
}

LLVM IR (-O2):
define void @writeVIC(i64 %0, i64 %1) {
%3 = lshr i64 %0, 2
%4 = or i64 %3, 3221159936
%5 = inttoptr i64 %4 to i64*
store i64 %1, i64* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _IONBF;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *,
                           unsigned long long volatile *);
int /*<<< orphan*/ setvbuf(int /*<<< orphan*/, int /*<<< orphan*/ *,
                           int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void *t2_fun(void *arg) {
  volatile unsigned long long var = 1;
  setvbuf(stdout, NULL, _IONBF, 0);
  fprintf(stdout, "%p\n", &var);
  for (; var;) {
  }
  return NULL;
}


x86 assembly (clang, -O0):
<t2_fun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x1,-0x10(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
mov    0x2ea4(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
xor    %ecx,%ecx
call   1040 <setvbuf@plt>
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
lea    0xe9f(%rip),%rsi
lea    -0x10(%rbp),%rdx
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rax
cmp    $0x0,%rax
je     117d <t2_fun+0x5d>
jmp    116a <t2_fun+0x4a>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t2_fun>:
push   %rbx
sub    $0x10,%rsp
movq   $0x1,0x8(%rsp)
mov    0x2ea3(%rip),%rbx
mov    (%rbx),%edi
mov    0x2eaa(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
xor    %ecx,%ecx
call   1040 <setvbuf@plt>
mov    (%rbx),%edi
lea    0xeae(%rip),%rsi
lea    0x8(%rsp),%rdx
call   1030 <fprintf@plt>
nopl   0x0(%rax)
cmpq   $0x0,0x8(%rsp)
jne    1160 <t2_fun+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stdout = global i32 0
@_IONBF = global i32 0
@.str = [4 x i8] c"%p\0A\00"
define i8* @t2_fun(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
store volatile i64 1, i64* %3
%4 = load i32, i32* @stdout
%5 = load i32, i32* @_IONBF
%6 = call i32 @setvbuf(i32 %4, i32* null, i32 %5, i32 0)
%7 = load i32, i32* @stdout
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %3)
br label %9
9: ; preds = %12, %1
%10 = load volatile i64, i64* %3
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %9
br label %9
13: ; preds = %9
ret i8* null
}

LLVM IR (-O2):
@stdout = global i32 0
@_IONBF = global i32 0
@.str = [4 x i8] c"%p\0A\00"
define noalias i8* @t2_fun(i8* nocapture readnone %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
store volatile i64 1, i64* %2
%4 = load i32, i32* @stdout
%5 = load i32, i32* @_IONBF
%6 = tail call i32 @setvbuf(i32 %4, i32* null, i32 %5, i32 0)
%7 = load i32, i32* @stdout
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %2)
br label %9
9: ; preds = %9, %1
%10 = load volatile i64, i64* %2
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %9
12: ; preds = %9
ret i8* null
}
void report_light_data(struct ssp_data *data, struct sensor_value *lightdata) {
  return;
}


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

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

LLVM IR (-O0):
%struct.ssp_data = type opaque
%struct.sensor_value = type opaque
define void @report_light_data(%struct.ssp_data* %0, %struct.sensor_value* %1) {
%3 = alloca %struct.ssp_data*
%4 = alloca %struct.sensor_value*
store %struct.ssp_data* %0, %struct.ssp_data** %3
store %struct.sensor_value* %1, %struct.sensor_value** %4
ret void
}

LLVM IR (-O2):
%struct.ssp_data = type opaque
%struct.sensor_value = type opaque
define void @report_light_data(%struct.ssp_data* nocapture %0, %struct.sensor_value* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, void *);
int /*<<< orphan*/ stderr;
void rtpp_modman_get_ul_subc_h_fin(void *pub) {
  fprintf(stderr,
          "Method rtpp_modman@%p::get_ul_subc_h (rtpp_modman_get_ul_subc_h) is "
          "invoked after destruction\x0a",
          pub);
  abort();
}


x86 assembly (clang, -O0):
<rtpp_modman_get_ul_subc_h_fin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<rtpp_modman_get_ul_subc_h_fin>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [95 x i8] c"Method rtpp_modman@%p::get_ul_subc_h (rtpp_modman_get_ul_subc_h) is invoked after destruction\0A\00"
define void @rtpp_modman_get_ul_subc_h_fin(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [95 x i8] c"Method rtpp_modman@%p::get_ul_subc_h (rtpp_modman_get_ul_subc_h) is invoked after destruction\0A\00"
define void @rtpp_modman_get_ul_subc_h_fin(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int test_file(char *);
int run_all_search_tests() {
  return test_file("../test/search_tests/easy.test");
}


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

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

LLVM IR (-O0):
@.str = [31 x i8] c"../test/search_tests/easy.test\00"
define i32 @run_all_search_tests() {
%1 = call i32 @test_file(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [31 x i8] c"../test/search_tests/easy.test\00"
define i32 @run_all_search_tests() {
%1 = tail call i32 @test_file(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
unsigned char withinRange(unsigned char color, int balance) {
  int newColor = ((int)color) * 255 / balance;
  if (newColor > 255) {
    return 255;
  } else if (newColor < 0) {
    return 0;
  }
  return (unsigned char)newColor;
}


x86 assembly (clang, -O0):
<withinRange>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
mov    %esi,-0x8(%rbp)
movzbl -0x2(%rbp),%eax
imul   $0xff,%eax,%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,-0xc(%rbp)
cmpl   $0xff,-0xc(%rbp)
jle    1134 <withinRange+0x34>
movb   $0xff,-0x1(%rbp)
jmp    1152 <withinRange+0x52>
cmpl   $0x0,-0xc(%rbp)
jge    1147 <withinRange+0x47>
movb   $0x0,-0x1(%rbp)
jmp    1152 <withinRange+0x52>
jmp    114c <withinRange+0x4c>
mov    -0xc(%rbp),%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<withinRange>:
mov    %edi,%eax
shl    $0x8,%eax
sub    %edi,%eax
cltd
idiv   %esi
xor    %ecx,%ecx
test   %eax,%eax
cmovs  %ecx,%eax
cmp    $0xff,%eax
mov    $0xff,%ecx
cmovae %ecx,%eax
ret

LLVM IR (-O0):
define zeroext i8 @withinRange(i8 zeroext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
store i8 %0, i8* %4
store i32 %1, i32* %5
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = mul nsw i32 %8, 255
%10 = load i32, i32* %5
%11 = sdiv i32 %9, %10
store i32 %11, i32* %6
%12 = load i32, i32* %6
%13 = icmp sgt i32 %12, 255
br i1 %13, label %14, label %15
14: ; preds = %2
store i8 -1, i8* %3
br label %23
15: ; preds = %2
%16 = load i32, i32* %6
%17 = icmp slt i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %15
store i8 0, i8* %3
br label %23
19: ; preds = %15
br label %20
20: ; preds = %19
%21 = load i32, i32* %6
%22 = trunc i32 %21 to i8
store i8 %22, i8* %3
br label %23
23: ; preds = %20, %18, %14
%24 = load i8, i8* %3
ret i8 %24
}

LLVM IR (-O2):
define zeroext i8 @withinRange(i8 zeroext %0, i32 %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 255
%5 = sdiv i32 %4, %1
%6 = icmp sgt i32 %5, 0
%7 = select i1 %6, i32 %5, i32 0
%8 = icmp ult i32 %7, 255
%9 = select i1 %8, i32 %7, i32 255
%10 = trunc i32 %9 to i8
ret i8 %10
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int _resize_usage(void) {
  fputs("Usage: "
        "resize"
        "\n",
        stderr);
  return 1;
}


x86 assembly (clang, -O0):
<_resize_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_resize_usage>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Usage: resize\0A\00"
@stderr = global i32 0
define i32 @_resize_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}

LLVM IR (-O2):
@.str = [15 x i8] c"Usage: resize\0A\00"
@stderr = global i32 0
define i32 @_resize_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}
void free_all_stored_avcodec_context() {}


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

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

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

LLVM IR (-O2):
define void @free_all_stored_avcodec_context() {
ret void
}
char convert_int_char(int nb) { return (char)(nb + 'A'); }


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

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

LLVM IR (-O0):
define signext i8 @convert_int_char(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 65
%5 = trunc i32 %4 to i8
ret i8 %5
}

LLVM IR (-O2):
define signext i8 @convert_int_char(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = add i8 %2, 65
ret i8 %3
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char const *);
void makeDotTxt(char *dst, const char *src) {
  strcat(dst, src);
  strcat(dst, ".txt");
}


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

x86 assembly (clang, -O2):
<makeDotTxt>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strcat@plt>
lea    0xee0(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <strcat@plt>

LLVM IR (-O0):
@.str = [5 x i8] c".txt\00"
define void @makeDotTxt(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @strcat(i8* %5, i8* %6)
%8 = load i8*, i8** %3
%9 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c".txt\00"
define void @makeDotTxt(i8* %0, i8* %1) {
%3 = tail call i32 @strcat(i8* %0, i8* %1)
%4 = tail call i32 @strcat(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct stat {
  long st_size;
};

/* Variables and functions */
int /*<<< orphan*/ stat(char *, struct stat *);
long get_file_size(char *filename) {
  struct stat s;
  stat(filename, &s);
  return s.st_size;
}


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

x86 assembly (clang, -O2):
<get_file_size>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i64 }
define i64 @get_file_size(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @stat(i8* %4, %struct.stat* %3)
%6 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%7 = load i64, i64* %6
ret i64 %7
}

LLVM IR (-O2):
%struct.stat = type { i64 }
define i64 @get_file_size(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ MatLibtest();
int /*<<< orphan*/ QuatLibtest();
int /*<<< orphan*/ getchar();
int main() {
  MatLibtest();
  QuatLibtest();
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <MatLibtest@plt>
mov    $0x0,%al
call   1040 <QuatLibtest@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @MatLibtest()
%3 = call i32 (...) @QuatLibtest()
%4 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @MatLibtest()
%2 = tail call i32 (...) @QuatLibtest()
%3 = tail call i32 (...) @getchar()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ GPIOPinTypeGPIOOutput(int, int);
int /*<<< orphan*/ iic_write_m(unsigned char);
int /*<<< orphan*/ start();
int /*<<< orphan*/ stop();
void ads_point_reg(void) {
  unsigned char Initdata[4] = {0};
  Initdata[0] = 0x90;
  Initdata[1] = 0x00;
  unsigned char i = 0;
  GPIOPinTypeGPIOOutput(0x40007000, 0x00000040);
  start();
  for (i = 0; i < 2; i++) {
    iic_write_m(Initdata[i]);
  }
  stop();
}


x86 assembly (clang, -O0):
<ads_point_reg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1050 <memset@plt>
movb   $0x90,-0x4(%rbp)
movb   $0x0,-0x3(%rbp)
movb   $0x0,-0x5(%rbp)
mov    $0x40007000,%edi
mov    $0x40,%esi
call   1070 <GPIOPinTypeGPIOOutput@plt>
mov    $0x0,%al
call   1060 <start@plt>
movb   $0x0,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
cmp    $0x2,%eax
jge    11b6 <ads_point_reg+0x66>
movzbl -0x5(%rbp),%eax
movzbl -0x4(%rbp,%rax,1),%edi
call   1030 <iic_write_m@plt>
mov    -0x5(%rbp),%al
add    $0x1,%al
mov    %al,-0x5(%rbp)
jmp    118e <ads_point_reg+0x3e>
mov    $0x0,%al
call   1040 <stop@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ads_point_reg>:
push   %rax
mov    $0x40007000,%edi
mov    $0x40,%esi
call   1060 <GPIOPinTypeGPIOOutput@plt>
xor    %eax,%eax
call   1050 <start@plt>
mov    $0x90,%edi
call   1030 <iic_write_m@plt>
xor    %edi,%edi
call   1030 <iic_write_m@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <stop@plt>

LLVM IR (-O0):
define void @ads_point_reg() {
%1 = alloca [4 x i8]
%2 = alloca i8
%3 = bitcast [4 x i8]* %1 to i8*
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
store i8 -112, i8* %4
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 1
store i8 0, i8* %5
store i8 0, i8* %2
%6 = call i32 @GPIOPinTypeGPIOOutput(i32 1073770496, i32 64)
%7 = call i32 (...) @start()
store i8 0, i8* %2
br label %8
8: ; preds = %18, %0
%9 = load i8, i8* %2
%10 = zext i8 %9 to i32
%11 = icmp slt i32 %10, 2
br i1 %11, label %12, label %21
12: ; preds = %8
%13 = load i8, i8* %2
%14 = zext i8 %13 to i64
%15 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 %14
%16 = load i8, i8* %15
%17 = call i32 @iic_write_m(i8 zeroext %16)
br label %18
18: ; preds = %12
%19 = load i8, i8* %2
%20 = add i8 %19, 1
store i8 %20, i8* %2
br label %8
21: ; preds = %8
%22 = call i32 (...) @stop()
ret void
}

LLVM IR (-O2):
define void @ads_point_reg() {
%1 = tail call i32 @GPIOPinTypeGPIOOutput(i32 1073770496, i32 64)
%2 = tail call i32 (...) @start()
%3 = tail call i32 @iic_write_m(i8 zeroext -112)
%4 = tail call i32 @iic_write_m(i8 zeroext 0)
%5 = tail call i32 (...) @stop()
ret void
}
int reglib_is_world_regdom(const char *alpha2) {
  if (alpha2[0] == '0' && alpha2[1] == '0')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<reglib_is_world_regdom>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jne    1135 <reglib_is_world_regdom+0x35>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x30,%eax
jne    1135 <reglib_is_world_regdom+0x35>
movl   $0x1,-0x4(%rbp)
jmp    113c <reglib_is_world_regdom+0x3c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reglib_is_world_regdom>:
cmpb   $0x30,(%rdi)
jne    1110 <reglib_is_world_regdom+0x10>
mov    $0x1,%eax
cmpb   $0x30,0x1(%rdi)
je     1112 <reglib_is_world_regdom+0x12>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @reglib_is_world_regdom(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 48
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 48
br i1 %7, label %9, label %8
8: ; preds = %4, %1
br label %9
9: ; preds = %4, %8
%10 = phi i32 [ 0, %8 ], [ 1, %4 ]
ret i32 %10
}
/* Type definitions */
typedef int uint64_t;
struct timespec {
  int tv_nsec;
  scalar_t__ tv_sec;
};
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
int64_t get_clock_ms(void) {
  struct timespec ts;
  clock_gettime(CLOCK_MONOTONIC, &ts);
  return (uint64_t)ts.tv_sec * 1000 + (ts.tv_nsec / 1000000);
}


x86 assembly (clang, -O0):
<get_clock_ms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <clock_gettime@plt>
mov    -0x8(%rbp),%rax
imul   $0x3e8,%eax,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
mov    $0xf4240,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_clock_ms>:
sub    $0x18,%rsp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <clock_gettime@plt>
imul   $0x3e8,0x10(%rsp),%ecx
movslq 0x8(%rsp),%rax
imul   $0x431bde83,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x32,%rax
add    %edx,%eax
add    %ecx,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i64 }
@CLOCK_MONOTONIC = global i32 0
define i32 @get_clock_ms() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_MONOTONIC
%3 = call i32 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = mul nsw i32 %6, 1000
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%9 = load i32, i32* %8
%10 = sdiv i32 %9, 1000000
%11 = add nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
%struct.timespec = type { i32, i64 }
@CLOCK_MONOTONIC = global i32 0
define i32 @get_clock_ms() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
%8 = mul nsw i32 %7, 1000
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%10 = load i32, i32* %9
%11 = sdiv i32 %10, 1000000
%12 = add nsw i32 %8, %11
ret i32 %12
}
int csub(int arg) { return 2 * arg; }


x86 assembly (clang, -O0):
<csub>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<csub>:
lea    (%rdi,%rdi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @csub(i32 %0) {
%2 = shl nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ UpnpResponse_RemoteIOClient_RemoteIO_GetDeviceInformation(
    void *, char *, int, int, int, int, char *);
int /*<<< orphan*/ printf(char *);
void UpnpRemoteIOClient_RemoteIO_GetDeviceInformation(void *upnptoken) {
  printf("Invoke: UpnpRemoteIOClient_RemoteIO_GetDeviceInformation();\r\n");
  UpnpResponse_RemoteIOClient_RemoteIO_GetDeviceInformation(
      upnptoken, "Sample String", 250, 25000, 250, 250, "Sample String");
}


x86 assembly (clang, -O0):
<UpnpRemoteIOClient_RemoteIO_GetDeviceInformation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
lea    0xefb(%rip),%rax
mov    $0xfa,%r9d
mov    $0x61a8,%ecx
mov    %rax,%rsi
mov    %r9d,%edx
mov    %r9d,%r8d
mov    %rax,(%rsp)
call   1040 <UpnpResponse_RemoteIOClient_RemoteIO_GetDeviceInformation@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UpnpRemoteIOClient_RemoteIO_GetDeviceInformation>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xedf(%rip),%rdi
call   1030 <puts@plt>
lea    0xec5(%rip),%rsi
mov    %rsi,(%rsp)
mov    %rbx,%rdi
mov    $0xfa,%edx
mov    $0x61a8,%ecx
mov    $0xfa,%r8d
mov    $0xfa,%r9d
call   1040 <UpnpResponse_RemoteIOClient_RemoteIO_GetDeviceInformation@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [62 x i8] c"Invoke: UpnpRemoteIOClient_RemoteIO_GetDeviceInformation();\0D\0A\00"
@.str.1 = [14 x i8] c"Sample String\00"
define void @UpnpRemoteIOClient_RemoteIO_GetDeviceInformation(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @UpnpResponse_RemoteIOClient_RemoteIO_GetDeviceInformation(i8* %4, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 250, i32 25000, i32 250, i32 250, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [14 x i8] c"Sample String\00"
@str = [61 x i8] c"Invoke: UpnpRemoteIOClient_RemoteIO_GetDeviceInformation();\0D\00"
define void @UpnpRemoteIOClient_RemoteIO_GetDeviceInformation(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @UpnpResponse_RemoteIOClient_RemoteIO_GetDeviceInformation(i8* %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 250, i32 25000, i32 250, i32 250, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void i2d_RSA_PUBKEY(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_RSA_PUBKEY() {
ret void
}
int ocgrk(long long a, long long b) { return (a | ~b) ? 23 : 42; }


x86 assembly (clang, -O0):
<ocgrk>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rax
xor    $0xffffffffffffffff,%rax
or     %rax,%rdx
mov    $0x2a,%eax
mov    $0x17,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ocgrk>:
not    %rsi
or     %rdi,%rsi
mov    $0x2a,%ecx
mov    $0x17,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @ocgrk(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 = xor i64 %6, -1
%8 = or i64 %5, %7
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 23, i32 42
ret i32 %11
}

LLVM IR (-O2):
define i32 @ocgrk(i64 %0, i64 %1) {
%3 = xor i64 %1, -1
%4 = or i64 %3, %0
%5 = icmp eq i64 %4, 0
%6 = select i1 %5, i32 42, i32 23
ret i32 %6
}
void __swap(char *x, char *y) {
  char n;
  n = *x;
  *x = *y;
  *y = n;
}


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

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

LLVM IR (-O0):
define void @__swap(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
store i8 %7, i8* %5
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = load i8*, i8** %3
store i8 %9, i8* %10
%11 = load i8, i8* %5
%12 = load i8*, i8** %4
store i8 %11, i8* %12
ret void
}

LLVM IR (-O2):
define void @__swap(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
store i8 %4, i8* %0
store i8 %3, i8* %1
ret void
}
void ff_hevc_put_hevc_bi_w_epel_hv8_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_epel_hv8_10_sse4() {
ret void
}
/* Type definitions */
struct tms {
  int dummy;
};
typedef int clock_t;

/* Variables and functions */
int /*<<< orphan*/ _exit(int);
clock_t times(struct tms *buf) {
  _exit(-1);
  return -1;
}


x86 assembly (clang, -O0):
<times>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0xffffffff,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<times>:
push   %rax
mov    $0xffffffff,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
%struct.tms = type { i32 }
define i32 @times(%struct.tms* %0) {
%2 = alloca %struct.tms*
store %struct.tms* %0, %struct.tms** %2
%3 = call i32 @_exit(i32 -1)
unreachable
}

LLVM IR (-O2):
%struct.tms = type { i32 }
define i32 @times(%struct.tms* nocapture readnone %0) {
%2 = tail call i32 @_exit(i32 -1)
unreachable
}
/* Type definitions */
typedef int uint8_t;
typedef scalar_t__ uint32_t;

/* Variables and functions */
void I2CMasterSlaveAddrSet(uint32_t ui32Base, uint8_t ui8SlaveAddr,
                           bool bReceive) {
  ;
  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000000))) =
      (ui8SlaveAddr << 1) | bReceive;
}


x86 assembly (clang, -O0):
<I2CMasterSlaveAddrSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
or     -0x10(%rbp),%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CMasterSlaveAddrSet>:
add    %esi,%esi
or     %edx,%esi
movslq %esi,%rax
mov    %rax,(%rdi)
ret

LLVM IR (-O0):
define void @I2CMasterSlaveAddrSet(i64 %0, i32 %1, i32 %2) {
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32
store i64 %0, i64* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = shl i32 %7, 1
%9 = load i32, i32* %6
%10 = or i32 %8, %9
%11 = sext i32 %10 to i64
%12 = load i64, i64* %4
%13 = add nsw i64 %12, 0
%14 = inttoptr i64 %13 to i64*
store volatile i64 %11, i64* %14
ret void
}

LLVM IR (-O2):
define void @I2CMasterSlaveAddrSet(i64 %0, i32 %1, i32 %2) {
%4 = shl i32 %1, 1
%5 = or i32 %4, %2
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %0 to i64*
store volatile i64 %6, i64* %7
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
scalar_t__ devicetree_find_node_prop(char *, char *);
int /*<<< orphan*/ devicetree_prop_int(scalar_t__, scalar_t__ *);
uint32_t devicetree_find_int(char *node, char *prop, uint32_t *value) {
  uint32_t result;
  result = devicetree_find_node_prop(node, prop);
  if (result < 0) {
    return result;
  }
  devicetree_prop_int(result, value);
  return 0;
}


x86 assembly (clang, -O0):
<devicetree_find_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <devicetree_find_node_prop@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jge    115d <devicetree_find_int+0x3d>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1172 <devicetree_find_int+0x52>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <devicetree_prop_int@plt>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<devicetree_find_int>:
push   %rbx
mov    %rdx,%rbx
call   1030 <devicetree_find_node_prop@plt>
test   %rax,%rax
js     113b <devicetree_find_int+0x1b>
mov    %rax,%rdi
mov    %rbx,%rsi
call   1040 <devicetree_prop_int@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i64 @devicetree_find_int(i8* %0, i8* %1, i64* %2) {
%4 = tail call i64 @devicetree_find_node_prop(i8* %0, i8* %1)
%5 = icmp slt i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @devicetree_prop_int(i64 %4, i64* %2)
br label %8
8: ; preds = %3, %6
%9 = phi i64 [ 0, %6 ], [ %4, %3 ]
ret i64 %9
}
int __getdtablesize(void) { return -1; }


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

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

LLVM IR (-O0):
define i32 @__getdtablesize() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @__getdtablesize() {
ret i32 -1
}
/* Variables and functions */
int inp_emulate(int);
char TOSH_READ_RFM_CTL0_PIN() { return 0x01 & (inp_emulate(0x44) >> 7); }


x86 assembly (clang, -O0):
<TOSH_READ_RFM_CTL0_PIN>:
push   %rbp
mov    %rsp,%rbp
mov    $0x44,%edi
call   1030 <inp_emulate@plt>
sar    $0x7,%eax
and    $0x1,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_READ_RFM_CTL0_PIN>:
push   %rax
mov    $0x44,%edi
call   1030 <inp_emulate@plt>
shr    $0x7,%al
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @TOSH_READ_RFM_CTL0_PIN() {
%1 = call i32 @inp_emulate(i32 68)
%2 = ashr i32 %1, 7
%3 = and i32 1, %2
%4 = trunc i32 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @TOSH_READ_RFM_CTL0_PIN() {
%1 = tail call i32 @inp_emulate(i32 68)
%2 = trunc i32 %1 to i8
%3 = lshr i8 %2, 7
ret i8 %3
}
/* Type definitions */
struct UPnPService {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void RNDResponseSink_RenderingControl_GetLoudness(struct UPnPService *Service,
                                                  int ErrorCode, void *User,
                                                  int CurrentLoudness) {
  printf(
      "RND Invoke Response: RenderingControl/GetLoudness[ErrorCode:%d](%d)\r\n",
      ErrorCode, CurrentLoudness);
}


x86 assembly (clang, -O0):
<RNDResponseSink_RenderingControl_GetLoudness>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x1c(%rbp),%edx
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RNDResponseSink_RenderingControl_GetLoudness>:
lea    0xee9(%rip),%rdi
mov    %ecx,%edx
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.UPnPService = type { i32 }
@.str = [70 x i8] c"RND Invoke Response: RenderingControl/GetLoudness[ErrorCode:%d](%d)\0D\0A\00"
define void @RNDResponseSink_RenderingControl_GetLoudness(%struct.UPnPService* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca %struct.UPnPService*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store %struct.UPnPService* %0, %struct.UPnPService** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i32, i32* %6
%10 = load i32, i32* %8
%11 = call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10)
ret void
}

LLVM IR (-O2):
%struct.UPnPService = type { i32 }
@.str = [70 x i8] c"RND Invoke Response: RenderingControl/GetLoudness[ErrorCode:%d](%d)\0D\0A\00"
define void @RNDResponseSink_RenderingControl_GetLoudness(%struct.UPnPService* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i32 %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %3)
ret void
}
/* Variables and functions */
double __ocml_add_rte_f64(double, double);
double __dadd_rn(double x, double y) { return __ocml_add_rte_f64(x, y); }


x86 assembly (clang, -O0):
<__dadd_rn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <__ocml_add_rte_f64@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__dadd_rn>:
jmp    1030 <__ocml_add_rte_f64@plt>

LLVM IR (-O0):
define double @__dadd_rn(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call double @__ocml_add_rte_f64(double %5, double %6)
ret double %7
}

LLVM IR (-O2):
define double @__dadd_rn(double %0, double %1) {
%3 = tail call double @__ocml_add_rte_f64(double %0, double %1)
ret double %3
}