xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ reverse(int, int);
void revrot(int rotdist, int n) {
  reverse(0, rotdist - 1);
  reverse(rotdist, n - 1);
  reverse(0, n - 1);
}


x86 assembly (clang, -O0):
<revrot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
sub    $0x1,%esi
xor    %edi,%edi
call   1030 <reverse@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
sub    $0x1,%esi
call   1030 <reverse@plt>
mov    -0x8(%rbp),%esi
sub    $0x1,%esi
xor    %edi,%edi
call   1030 <reverse@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<revrot>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%r14d
lea    -0x1(%r14),%esi
xor    %edi,%edi
call   1030 <reverse@plt>
add    $0xffffffff,%ebx
mov    %r14d,%edi
mov    %ebx,%esi
call   1030 <reverse@plt>
xor    %edi,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <reverse@plt>

LLVM IR (-O0):
define void @revrot(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 = sub nsw i32 %5, 1
%7 = call i32 @reverse(i32 0, i32 %6)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub nsw i32 %9, 1
%11 = call i32 @reverse(i32 %8, i32 %10)
%12 = load i32, i32* %4
%13 = sub nsw i32 %12, 1
%14 = call i32 @reverse(i32 0, i32 %13)
ret void
}

LLVM IR (-O2):
define void @revrot(i32 %0, i32 %1) {
%3 = add nsw i32 %0, -1
%4 = tail call i32 @reverse(i32 0, i32 %3)
%5 = add nsw i32 %1, -1
%6 = tail call i32 @reverse(i32 %0, i32 %5)
%7 = tail call i32 @reverse(i32 0, i32 %5)
ret void
}
/* Type definitions */
typedef float const uint16_t;

/* Variables and functions */
float float_from_u4_12(uint16_t uval) {
  static const float scale = 1. / (float)(1UL << 12);
  return uval * scale;
}


x86 assembly (clang, -O0):
<float_from_u4_12>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
@float_from_u4_12.scale = internal constant float 0x3F30000000000000
define float @float_from_u4_12(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 0x3F30000000000000
ret float %4
}

LLVM IR (-O2):
define float @float_from_u4_12(float %0) {
%2 = fmul float %0, 0x3F30000000000000
ret float %2
}
rectfi_(x1, y1, x2, y2) int *x1, *y1, *x2, *y2;
{ rectf((float)*x1, (float)*y1, (float)*x2, (float)*y2); }


x86 assembly (clang, -O0):
<rectfi_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rax
cvtsi2ssl (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x18(%rbp),%rax
cvtsi2ssl (%rax),%xmm1
cvtss2sd %xmm1,%xmm1
mov    -0x20(%rbp),%rax
cvtsi2ssl (%rax),%xmm2
cvtss2sd %xmm2,%xmm2
mov    -0x28(%rbp),%rax
cvtsi2ssl (%rax),%xmm3
cvtss2sd %xmm3,%xmm3
mov    $0x4,%al
call   1030 <rectf@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rectfi_>:
cvtsi2ssl (%rdi),%xmm0
cvtsi2ssl (%rsi),%xmm1
cvtsi2ssl (%rdx),%xmm2
cvtss2sd %xmm0,%xmm0
cvtsi2ssl (%rcx),%xmm3
cvtss2sd %xmm1,%xmm1
cvtss2sd %xmm2,%xmm2
cvtss2sd %xmm3,%xmm3
mov    $0x4,%al
jmp    1030 <rectf@plt>

LLVM IR (-O0):
define i32 @rectfi_(i32* %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
store i32* %0, i32** %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
%10 = load i32*, i32** %6
%11 = load i32, i32* %10
%12 = sitofp i32 %11 to float
%13 = fpext float %12 to double
%14 = load i32*, i32** %7
%15 = load i32, i32* %14
%16 = sitofp i32 %15 to float
%17 = fpext float %16 to double
%18 = load i32*, i32** %8
%19 = load i32, i32* %18
%20 = sitofp i32 %19 to float
%21 = fpext float %20 to double
%22 = load i32*, i32** %9
%23 = load i32, i32* %22
%24 = sitofp i32 %23 to float
%25 = fpext float %24 to double
%26 = call i32 (double, double, double, double, ...) bitcast (i32 (...)* @rectf to i32 (double, double, double, double, ...)*)(double %13, double %17, double %21, double %25)
%27 = load i32, i32* %5
ret i32 %27
}

LLVM IR (-O2):
define i32 @rectfi_(i32* nocapture %0, i32* nocapture %1, i32* nocapture %2, i32* nocapture %3) {
%5 = load i32, i32* %0
%6 = sitofp i32 %5 to float
%7 = fpext float %6 to double
%8 = load i32, i32* %1
%9 = sitofp i32 %8 to float
%10 = fpext float %9 to double
%11 = load i32, i32* %2
%12 = sitofp i32 %11 to float
%13 = fpext float %12 to double
%14 = load i32, i32* %3
%15 = sitofp i32 %14 to float
%16 = fpext float %15 to double
%17 = tail call i32 (double, double, double, double, ...) bitcast (i32 (...)* @rectf to i32 (double, double, double, double, ...)*)(double %7, double %10, double %13, double %16)
ret i32 undef
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ OLED_SendByte(scalar_t__);
int /*<<< orphan*/ OLED_SetData();
void SendData(uint8_t data) {
  OLED_SetData();
  OLED_SendByte((uint8_t)data);
}


x86 assembly (clang, -O0):
<SendData>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <OLED_SetData@plt>
mov    -0x8(%rbp),%rdi
call   1030 <OLED_SendByte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SendData>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <OLED_SetData@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <OLED_SendByte@plt>

LLVM IR (-O0):
define void @SendData(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i32 (...) @OLED_SetData()
%4 = load i64, i64* %2
%5 = call i32 @OLED_SendByte(i64 %4)
ret void
}

LLVM IR (-O2):
define void @SendData(i64 %0) {
%2 = tail call i32 (...) @OLED_SetData()
%3 = tail call i32 @OLED_SendByte(i64 %0)
ret void
}
int sigsetmask(mask)
int mask;
{ return 0; }


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

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

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

LLVM IR (-O2):
define i32 @sigsetmask(i32 %0) {
ret i32 0
}
int nb_len(long nb) {
  long tmp;
  int i;
  tmp = nb < 0 ? -nb : nb;
  i = 1;
  while (tmp >= 10) {
    (tmp = tmp / 10);
    ++i;
  }
  return (i);
}


x86 assembly (clang, -O0):
<nb_len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1122 <nb_len+0x22>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    112a <nb_len+0x2a>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
cmpq   $0xa,-0x10(%rbp)
jl     1164 <nb_len+0x64>
mov    -0x10(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1139 <nb_len+0x39>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nb_len>:
mov    %rdi,%rcx
neg    %rcx
cmovs  %rdi,%rcx
mov    $0x1,%esi
cmp    $0xa,%rcx
jb     1146 <nb_len+0x46>
mov    $0x1,%esi
movabs $0xcccccccccccccccd,%rdi
cc cc cc
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rcx,%rax
mul    %rdi
shr    $0x3,%rdx
add    $0x1,%esi
cmp    $0x63,%rcx
mov    %rdx,%rcx
ja     1130 <nb_len+0x30>
mov    %esi,%eax
ret

LLVM IR (-O0):
define i32 @nb_len(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %2
%5 = load i64, i64* %2
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i64, i64* %2
%9 = sub nsw i64 0, %8
br label %12
10: ; preds = %1
%11 = load i64, i64* %2
br label %12
12: ; preds = %10, %7
%13 = phi i64 [ %9, %7 ], [ %11, %10 ]
store i64 %13, i64* %3
store i32 1, i32* %4
br label %14
14: ; preds = %17, %12
%15 = load i64, i64* %3
%16 = icmp sge i64 %15, 10
br i1 %16, label %17, label %22
17: ; preds = %14
%18 = load i64, i64* %3
%19 = sdiv i64 %18, 10
store i64 %19, i64* %3
%20 = load i32, i32* %4
%21 = add nsw i32 %20, 1
store i32 %21, i32* %4
br label %14
22: ; preds = %14
%23 = load i32, i32* %4
ret i32 %23
}

LLVM IR (-O2):
define i32 @nb_len(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
%3 = icmp ugt i64 %2, 9
br i1 %3, label %4, label %10
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 1, %1 ]
%6 = phi i64 [ %7, %4 ], [ %2, %1 ]
%7 = udiv i64 %6, 10
%8 = add nuw nsw i32 %5, 1
%9 = icmp ugt i64 %6, 99
br i1 %9, label %4, label %10
10: ; preds = %4, %1
%11 = phi i32 [ 1, %1 ], [ %8, %4 ]
ret i32 %11
}
void go(char *numberArray, int level) {
  if (*(numberArray + level) != 26) {
    *(numberArray + level) += 1;
  } else {
    *(numberArray + level) = 1;
    go(numberArray, level - 1);
  }
}


x86 assembly (clang, -O0):
<go>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x1a,%eax
je     114b <go+0x3b>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edx
add    $0x1,%edx
mov    %dl,(%rax,%rcx,1)
jmp    1166 <go+0x56>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x1,(%rax,%rcx,1)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
call   1030 <go@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<go>:
movslq %esi,%rcx
lea    (%rdi,%rcx,1),%rax
mov    (%rdi,%rcx,1),%cl
cmp    $0x1a,%cl
jne    1120 <go+0x20>
nop
movb   $0x1,(%rax)
movzbl -0x1(%rax),%ecx
add    $0xffffffffffffffff,%rax
cmp    $0x1a,%cl
je     1110 <go+0x10>
add    $0x1,%cl
mov    %cl,(%rax)
ret

LLVM IR (-O0):
define void @go(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 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 26
br i1 %11, label %12, label %21
12: ; preds = %2
%13 = load i8*, i8** %3
%14 = load i32, i32* %4
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = add nsw i32 %18, 1
%20 = trunc i32 %19 to i8
store i8 %20, i8* %16
br label %29
21: ; preds = %2
%22 = load i8*, i8** %3
%23 = load i32, i32* %4
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i8, i8* %22, i64 %24
store i8 1, i8* %25
%26 = load i8*, i8** %3
%27 = load i32, i32* %4
%28 = sub nsw i32 %27, 1
br label %29
29: ; preds = %21, %12
ret void
}

LLVM IR (-O2):
define void @go(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 26
br i1 %6, label %11, label %7
7: ; preds = %11, %2
%8 = phi i8* [ %4, %2 ], [ %15, %11 ]
%9 = phi i8 [ %5, %2 ], [ %16, %11 ]
%10 = add i8 %9, 1
store i8 %10, i8* %8
ret void
11: ; preds = %2, %11
%12 = phi i64 [ %14, %11 ], [ %3, %2 ]
%13 = phi i8* [ %15, %11 ], [ %4, %2 ]
store i8 1, i8* %13
%14 = add i64 %12, -1
%15 = getelementptr inbounds i8, i8* %0, i64 %14
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 26
br i1 %17, label %11, label %7
}
void g_sprintf() {}


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

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

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

LLVM IR (-O2):
define void @g_sprintf() {
ret void
}
/* Variables and functions */
char *_mktemp(char *);
char *mktemp(char *path) { return (_mktemp(path)); }


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

x86 assembly (clang, -O2):
<mktemp>:
jmp    1030 <_mktemp@plt>

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

LLVM IR (-O2):
define i8* @mktemp(i8* %0) {
%2 = tail call i8* @_mktemp(i8* %0)
ret i8* %2
}
int phy_standby(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @phy_standby() {
ret i32 0
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
int clock_gettime(int /*<<< orphan*/, struct timespec *);
int main(int argc, char **argv) {
  struct timespec ts;
  return clock_gettime(CLOCK_REALTIME, &ts);
}


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)
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    -0x18(%rbp),%rsi
call   1030 <clock_gettime@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
call   1030 <clock_gettime@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
@CLOCK_REALTIME = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.timespec
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* @CLOCK_REALTIME
%8 = call i32 @clock_gettime(i32 %7, %struct.timespec* %6)
ret i32 %8
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@CLOCK_REALTIME = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca %struct.timespec
%4 = bitcast %struct.timespec* %3 to i8*
%5 = load i32, i32* @CLOCK_REALTIME
%6 = call i32 @clock_gettime(i32 %5, %struct.timespec* %3)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ abort();
main() {
  int x = -1;
  int y = 4294967295;
  if (x != y)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1140 <main+0x30>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ setup_service();
int main(int argc, char *argv[]) {
  setup_service();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @setup_service()
ret i32 0
}
void lmh_device_deregister(struct lmh_device_ops *ops) { return; }


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

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

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

LLVM IR (-O2):
%struct.lmh_device_ops = type opaque
define void @lmh_device_deregister(%struct.lmh_device_ops* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
unsigned int NsmcGetInterfaceVersion(void) {
  printf("NSMC: NsmcGetInterfaceVersion called.\n");
  return 0x01010000U;
}


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

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

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

LLVM IR (-O2):
@str = [38 x i8] c"NSMC: NsmcGetInterfaceVersion called.\00"
define i32 @NsmcGetInterfaceVersion() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
ret i32 16842752
}
void merge_mech_lists(struct mech_list_item *head_of_target,
                      struct mech_list_item *head_of_source) {}


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

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

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

LLVM IR (-O2):
%struct.mech_list_item = type opaque
define void @merge_mech_lists(%struct.mech_list_item* nocapture %0, %struct.mech_list_item* nocapture %1) {
ret void
}
DF(gdd_f) { err(16); }


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

x86 assembly (clang, -O2):
<DF>:
mov    $0x10,%edi
xor    %eax,%eax
jmp    1030 <err@plt>

LLVM IR (-O0):
define i32 @DF(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (i32, ...) bitcast (i32 (...)* @err to i32 (i32, ...)*)(i32 16)
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
define i32 @DF(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @err to i32 (i32, ...)*)(i32 16)
ret i32 undef
}
/* Variables and functions */
scalar_t__ strncmp(char *, char *, int);
unsigned long findEndOfField(char *str, unsigned long startInd) {
  unsigned long curInd = startInd;
  while (strncmp(&str[curInd + 1], "},\n", 3))
    curInd++;
  return curInd + 3;
}


x86 assembly (clang, -O0):
<findEndOfField>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
add    $0x1,%rax
add    %rax,%rdi
lea    0xec2(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     1163 <findEndOfField+0x53>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <findEndOfField+0x18>
mov    -0x18(%rbp),%rax
add    $0x3,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<findEndOfField>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
add    $0x2,%rbx
lea    0xeda(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
lea    (%r14,%rbx,1),%rdi
add    $0xffffffffffffffff,%rdi
mov    %r15,%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
add    $0x1,%rbx
test   %rax,%rax
jne    1130 <findEndOfField+0x20>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"},\0A\00"
define i64 @findEndOfField(i8* %0, i64 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %1, %2 ], [ %5, %3 ]
%5 = add i64 %4, 1
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = tail call i64 @strncmp(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %3
9: ; preds = %3
%10 = add i64 %4, 3
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ all_done();
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ stdout;
void keyboard(unsigned char key, int x, int y) {
  switch (key) {
  case '\033':
    all_done();
    break;
  default:
    putchar('\007');
    fflush(stdout);
    break;
  }
}


x86 assembly (clang, -O0):
<keyboard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x1(%rbp),%al
sub    $0x1b,%al
jne    1160 <keyboard+0x30>
jmp    1154 <keyboard+0x24>
mov    $0x0,%al
call   1050 <all_done@plt>
jmp    1178 <keyboard+0x48>
mov    $0x7,%edi
call   1030 <putchar@plt>
mov    0x2e6f(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<keyboard>:
cmp    $0x1b,%dil
jne    113d <keyboard+0xd>
xor    %eax,%eax
jmp    1050 <all_done@plt>
push   %rax
mov    $0x7,%edi
call   1030 <putchar@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @keyboard(i8 zeroext %0, i32 %1, i32 %2) {
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
store i8 %0, i8* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
switch i32 %8, label %11 [
i32 27, label %9
]
9: ; preds = %3
%10 = call i32 (...) @all_done()
br label %15
11: ; preds = %3
%12 = call i32 @putchar(i8 signext 7)
%13 = load i32, i32* @stdout
%14 = call i32 @fflush(i32 %13)
br label %15
15: ; preds = %11, %9
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @keyboard(i8 zeroext %0, i32 %1, i32 %2) {
%4 = icmp eq i8 %0, 27
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 (...) @all_done()
br label %11
7: ; preds = %3
%8 = tail call i32 @putchar(i8 signext 7)
%9 = load i32, i32* @stdout
%10 = tail call i32 @fflush(i32 %9)
br label %11
11: ; preds = %7, %5
ret void
}
void s_get_row_values(char *sudoku, char y, char *restrict row) {
  for (char i = 0; i < 9; i++) {
    row[i] = sudoku[9 * y + i];
  }
}


x86 assembly (clang, -O0):
<s_get_row_values>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %rdx,-0x18(%rbp)
movb   $0x0,-0x19(%rbp)
movsbl -0x19(%rbp),%eax
cmp    $0x9,%eax
jge    1153 <s_get_row_values+0x53>
mov    -0x8(%rbp),%rax
movsbl -0x9(%rbp),%ecx
imul   $0x9,%ecx,%ecx
movsbl -0x19(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x18(%rbp),%rax
movsbq -0x19(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x19(%rbp),%al
add    $0x1,%al
mov    %al,-0x19(%rbp)
jmp    1116 <s_get_row_values+0x16>
pop    %rbp
ret

x86 assembly (clang, -O2):
<s_get_row_values>:
movslq %esi,%rax
lea    (%rax,%rax,8),%rax
mov    0x8(%rdi,%rax,1),%cl
mov    %cl,0x8(%rdx)
mov    (%rdi,%rax,1),%rax
mov    %rax,(%rdx)
ret

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

LLVM IR (-O2):
define void @s_get_row_values(i8* nocapture %0, i8 signext %1, i8* noalias nocapture writeonly %2) {
%4 = sext i8 %1 to i64
%5 = mul nsw i64 %4, 9
%6 = getelementptr i8, i8* %0, i64 %5
ret void
}
void delta_act(const void *msg) {}


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

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

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

LLVM IR (-O2):
define void @delta_act(i8* nocapture %0) {
ret void
}
/* Variables and functions */
size_t __digits10(unsigned int num) {
  size_t i = 0;
  do {
    num /= 10;
    i++;
  } while (num != 0);
  return i;
}


x86 assembly (clang, -O0):
<__digits10>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    110f <__digits10+0xf>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__digits10>:
xor    %eax,%eax
mov    $0xcccccccd,%ecx
nopw   0x0(%rax,%rax,1)
mov    %edi,%edx
imul   %rcx,%rdx
shr    $0x23,%rdx
add    $0x1,%rax
cmp    $0x9,%edi
mov    %edx,%edi
ja     1110 <__digits10+0x10>
ret

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

LLVM IR (-O2):
define i64 @__digits10(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ %0, %1 ], [ %5, %2 ]
%4 = phi i64 [ 0, %1 ], [ %6, %2 ]
%5 = udiv i32 %3, 10
%6 = add i64 %4, 1
%7 = icmp ult i32 %3, 10
br i1 %7, label %8, label %2
8: ; preds = %2
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ u_pass();
int /*<<< orphan*/ write(int /*<<< orphan*/, char *, int /*<<< orphan*/);
void main(void) {
  char *msg = "Hello World!";
  write(0, msg, strlen(msg));
  u_pass();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
xor    %edi,%edi
call   1040 <write@plt>
mov    $0x0,%al
call   1030 <u_pass@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rbx
mov    %rbx,%rdi
call   1050 <strlen@plt>
xor    %edi,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <write@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <u_pass@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"Hello World!\00"
define void @main() {
%1 = alloca i8*
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @strlen(i8* %3)
%5 = call i32 @write(i32 0, i8* %2, i32 %4)
%6 = call i32 (...) @u_pass()
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello World!\00"
define void @main() {
%1 = tail call i32 @strlen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @write(i32 0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (...) @u_pass()
ret void
}
void entity_thread_main() {}


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

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

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

LLVM IR (-O2):
define void @entity_thread_main() {
ret void
}
int tegra_get_linear_age() { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @tegra_get_linear_age() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ assertTrue(char *, int);
void test_var_indexes() {
  int a[3][2] = {{0, 1}, {2, 3}, {4, 5}};
  int i = 1;
  int j = 0;
  assertTrue("a[i][j] == 2", a[i][j] == 2);
}


x86 assembly (clang, -O0):
<test_var_indexes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x10(%rbp)
movl   $0x1,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movslq -0x24(%rbp),%rcx
lea    -0x20(%rbp),%rax
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x28(%rbp),%rcx
cmpl   $0x2,(%rax,%rcx,4)
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xeab(%rip),%rdi
call   1030 <assertTrue@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_var_indexes>:
lea    0xee9(%rip),%rdi
mov    $0x1,%esi
jmp    1030 <assertTrue@plt>

LLVM IR (-O0):
@__const.test_var_indexes.a = [3 x [2 x i32]] [[2 x i32] [i32 0, i32 1], [2 x i32] [i32 2, i32 3], [2 x i32] [i32 4, i32 5]]
@.str = [13 x i8] c"a[i][j] == 2\00"
define void @test_var_indexes() {
%1 = alloca [3 x [2 x i32]]
%2 = alloca i32
%3 = alloca i32
%4 = bitcast [3 x [2 x i32]]* %1 to i8*
store i32 1, i32* %2
store i32 0, i32* %3
%5 = load i32, i32* %2
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds [3 x [2 x i32]], [3 x [2 x i32]]* %1, i64 0, i64 %6
%8 = load i32, i32* %3
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 %9
%11 = load i32, i32* %10
%12 = icmp eq i32 %11, 2
%13 = zext i1 %12 to i32
%14 = call i32 @assertTrue(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %13)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"a[i][j] == 2\00"
define void @test_var_indexes() {
%1 = tail call i32 @assertTrue(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t compress32(uint32_t i) { return 2 - (i >> 16) + (i & 0xFFFF); }


x86 assembly (clang, -O0):
<compress32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
sar    $0x10,%ecx
mov    $0x2,%eax
sub    %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xffff,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compress32>:
movzwl %di,%eax
sar    $0x10,%edi
sub    %edi,%eax
add    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @compress32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 16
%5 = sub nsw i32 2, %4
%6 = load i32, i32* %2
%7 = and i32 %6, 65535
%8 = add nsw i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @compress32(i32 %0) {
%2 = ashr i32 %0, 16
%3 = sub nsw i32 2, %2
%4 = and i32 %0, 65535
%5 = add nsw i32 %3, %4
ret i32 %5
}
int main() {
  int foo[10][10];
  foo[9][0] = 0;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x38(%rbp)
xor    %eax,%eax
add    $0x120,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x [10 x i32]]
store i32 0, i32* %1
%3 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %2, i64 0, i64 9
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 0
store i32 0, i32* %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ glmSign3f(float *, float *);
void glmSign3f_(float x[3]) { glmSign3f(x, x); }


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

x86 assembly (clang, -O2):
<glmSign3f_>:
mov    %rdi,%rsi
jmp    1030 <glmSign3f@plt>

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

LLVM IR (-O2):
define void @glmSign3f_(float* %0) {
%2 = tail call i32 @glmSign3f(float* %0, float* %0)
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t smpte_fec_get_type(uint8_t *p_fec) { return (p_fec[12] >> 3) & 0x7; }


x86 assembly (clang, -O0):
<smpte_fec_get_type>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x30(%rax),%eax
sar    $0x3,%eax
and    $0x7,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<smpte_fec_get_type>:
mov    0x30(%rdi),%eax
shr    $0x3,%eax
and    $0x7,%eax
ret

LLVM IR (-O0):
define i32 @smpte_fec_get_type(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 12
%5 = load i32, i32* %4
%6 = ashr i32 %5, 3
%7 = and i32 %6, 7
ret i32 %7
}

LLVM IR (-O2):
define i32 @smpte_fec_get_type(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 12
%3 = load i32, i32* %2
%4 = lshr i32 %3, 3
%5 = and i32 %4, 7
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void getAddress() {
  printf("Current State is: SHIPPING\n");
  printf("Address recieved\n");
}


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

x86 assembly (clang, -O2):
<getAddress>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef7(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Current State is: SHIPPING\0A\00"
@.str.1 = [18 x i8] c"Address recieved\0A\00"
define void @getAddress() {
%1 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [27 x i8] c"Current State is: SHIPPING\00"
@str.2 = [17 x i8] c"Address recieved\00"
define void @getAddress() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ MC_put2_16(int, int /*<<< orphan*/ *,
                              int /*<<< orphan*/ const *, int, int,
                              int /*<<< orphan*/);
void MC_put_y_16_mmxext(uint8_t *dest, const uint8_t *ref, int stride,
                        int height) {
  MC_put2_16(height, dest, ref, stride, stride, 0);
}


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

x86 assembly (clang, -O2):
<MC_put_y_16_mmxext>:
mov    %edx,%r8d
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    %ecx,%edi
mov    %r8d,%ecx
xor    %r9d,%r9d
jmp    1030 <MC_put2_16@plt>

LLVM IR (-O0):
define void @MC_put_y_16_mmxext(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
%9 = load i32, i32* %8
%10 = load i32*, i32** %5
%11 = load i32*, i32** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %7
%14 = call i32 @MC_put2_16(i32 %9, i32* %10, i32* %11, i32 %12, i32 %13, i32 0)
ret void
}

LLVM IR (-O2):
define void @MC_put_y_16_mmxext(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = tail call i32 @MC_put2_16(i32 %3, i32* %0, i32* %1, i32 %2, i32 %2, i32 0)
ret void
}
void bwb_Warning_Overflow(char *Message) {
  bwx_DEBUG(__FUNCTION__);
  if (GetOnError() == 0) {
    puts(Message);
  } else {
    bwb_Warning(6, Message);
  }
}


x86 assembly (clang, -O0):
<bwb_Warning_Overflow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1040 <bwx_DEBUG@plt>
mov    $0x0,%al
call   1050 <GetOnError@plt>
cmp    $0x0,%eax
jne    117a <bwb_Warning_Overflow+0x3a>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
jmp    118a <bwb_Warning_Overflow+0x4a>
mov    -0x8(%rbp),%rsi
mov    $0x6,%edi
mov    $0x0,%al
call   1060 <bwb_Warning@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bwb_Warning_Overflow>:
push   %rbx
mov    %rdi,%rbx
lea    0xeb5(%rip),%rdi
xor    %eax,%eax
call   1040 <bwx_DEBUG@plt>
xor    %eax,%eax
call   1050 <GetOnError@plt>
test   %eax,%eax
je     116d <bwb_Warning_Overflow+0x2d>
mov    $0x6,%edi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1060 <bwb_Warning@plt>
mov    %rbx,%rdi
xor    %eax,%eax
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@__FUNCTION__.bwb_Warning_Overflow = [21 x i8] c"bwb_Warning_Overflow\00"
define void @bwb_Warning_Overflow(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @bwx_DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @__FUNCTION__.bwb_Warning_Overflow, i64 0, i64 0))
%4 = call i32 (...) @GetOnError()
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* %7)
br label %12
9: ; preds = %1
%10 = load i8*, i8** %2
%11 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @bwb_Warning to i32 (i32, i8*, ...)*)(i32 6, i8* %10)
br label %12
12: ; preds = %9, %6
ret void
}

LLVM IR (-O2):
@__FUNCTION__.bwb_Warning_Overflow = [21 x i8] c"bwb_Warning_Overflow\00"
define void @bwb_Warning_Overflow(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @bwx_DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @__FUNCTION__.bwb_Warning_Overflow, i64 0, i64 0))
%3 = tail call i32 (...) @GetOnError()
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* %0)
br label %9
7: ; preds = %1
%8 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @bwb_Warning to i32 (i32, i8*, ...)*)(i32 6, i8* %0)
br label %9
9: ; preds = %7, %5
ret void
}
void shashawen(int index) {
  int a, b, c, d, e, f;
  int i, j;
  int array[2];
  for (i = 0; i < 2; ++i) {
    a = b + c;
    d = b;
    e = c;
    f = e + d;
    array[i] = index;
  }
}


x86 assembly (clang, -O0):
<shashawen>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x20(%rbp)
cmpl   $0x2,-0x20(%rbp)
jge    114f <shashawen+0x4f>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x4(%rbp),%ecx
movslq -0x20(%rbp),%rax
mov    %ecx,-0x2c(%rbp,%rax,4)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    110e <shashawen+0xe>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @shashawen(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca [2 x i32]
store i32 %0, i32* %2
store i32 0, i32* %9
br label %12
12: ; preds = %28, %1
%13 = load i32, i32* %9
%14 = icmp slt i32 %13, 2
br i1 %14, label %15, label %31
15: ; preds = %12
%16 = load i32, i32* %4
%17 = load i32, i32* %5
%18 = add nsw i32 %16, %17
store i32 %18, i32* %3
%19 = load i32, i32* %4
store i32 %19, i32* %6
%20 = load i32, i32* %5
store i32 %20, i32* %7
%21 = load i32, i32* %7
%22 = load i32, i32* %6
%23 = add nsw i32 %21, %22
store i32 %23, i32* %8
%24 = load i32, i32* %2
%25 = load i32, i32* %9
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 %26
store i32 %24, i32* %27
br label %28
28: ; preds = %15
%29 = load i32, i32* %9
%30 = add nsw i32 %29, 1
store i32 %30, i32* %9
br label %12
31: ; preds = %12
ret void
}

LLVM IR (-O2):
define void @shashawen(i32 %0) {
ret void
}
/* Type definitions */
struct tbst_table {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ tree_to_vine(struct tbst_table *);
int /*<<< orphan*/ vine_to_tree(struct tbst_table *);
void tbst_balance(struct tbst_table *tree) {
  assert(tree != NULL);
  tree_to_vine(tree);
  vine_to_tree(tree);
}


x86 assembly (clang, -O0):
<tbst_balance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1030 <tree_to_vine@plt>
mov    -0x8(%rbp),%rdi
call   1040 <vine_to_tree@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tbst_balance>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1050 <assert@plt>
mov    %rbx,%rdi
call   1030 <tree_to_vine@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <vine_to_tree@plt>

LLVM IR (-O0):
%struct.tbst_table = type { i32 }
define void @tbst_balance(%struct.tbst_table* %0) {
%2 = alloca %struct.tbst_table*
store %struct.tbst_table* %0, %struct.tbst_table** %2
%3 = load %struct.tbst_table*, %struct.tbst_table** %2
%4 = icmp ne %struct.tbst_table* %3, null
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = load %struct.tbst_table*, %struct.tbst_table** %2
%8 = call i32 @tree_to_vine(%struct.tbst_table* %7)
%9 = load %struct.tbst_table*, %struct.tbst_table** %2
%10 = call i32 @vine_to_tree(%struct.tbst_table* %9)
ret void
}

LLVM IR (-O2):
%struct.tbst_table = type { i32 }
define void @tbst_balance(%struct.tbst_table* %0) {
%2 = icmp ne %struct.tbst_table* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @tree_to_vine(%struct.tbst_table* %0)
%6 = tail call i32 @vine_to_tree(%struct.tbst_table* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __set_64bit(unsigned long long *, unsigned int,
                               unsigned int);
__attribute__((always_)) void __set_64bit_constant(unsigned long long *ptr,
                                                   unsigned long long value) {
  __set_64bit(ptr, (unsigned int)(value), (unsigned int)((value) >> 32ULL));
}


x86 assembly (clang, -O0):
<__set_64bit_constant>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    %eax,%esi
mov    -0x10(%rbp),%rax
shr    $0x20,%rax
mov    %eax,%edx
call   1030 <__set_64bit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__set_64bit_constant>:
mov    %rsi,%rdx
shr    $0x20,%rdx
jmp    1030 <__set_64bit@plt>

LLVM IR (-O0):
define void @__set_64bit_constant(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 = trunc i64 %6 to i32
%8 = load i64, i64* %4
%9 = lshr i64 %8, 32
%10 = trunc i64 %9 to i32
%11 = call i32 @__set_64bit(i64* %5, i32 %7, i32 %10)
ret void
}

LLVM IR (-O2):
define void @__set_64bit_constant(i64* %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = lshr i64 %1, 32
%5 = trunc i64 %4 to i32
%6 = tail call i32 @__set_64bit(i64* %0, i32 %3, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ write(int /*<<< orphan*/, char *, int);
void editorRefreshScreen() {
  write(STDOUT_FILENO, "\x1b[2J", 4);
  write(STDOUT_FILENO, "\x1b[H", 3);
}


x86 assembly (clang, -O0):
<editorRefreshScreen>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
lea    0xec7(%rip),%rsi
mov    $0x3,%edx
call   1030 <write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<editorRefreshScreen>:
push   %rbx
mov    0x2ed8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
mov    (%rbx),%edi
lea    0xed1(%rip),%rsi
mov    $0x3,%edx
pop    %rbx
jmp    1030 <write@plt>

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
@.str = [5 x i8] c"\1B[2J\00"
@.str.1 = [4 x i8] c"\1B[H\00"
define void @editorRefreshScreen() {
%1 = load i32, i32* @STDOUT_FILENO
%2 = call i32 @write(i32 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%3 = load i32, i32* @STDOUT_FILENO
%4 = call i32 @write(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
ret void
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
@.str = [5 x i8] c"\1B[2J\00"
@.str.1 = [4 x i8] c"\1B[H\00"
define void @editorRefreshScreen() {
%1 = load i32, i32* @STDOUT_FILENO
%2 = tail call i32 @write(i32 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%3 = load i32, i32* @STDOUT_FILENO
%4 = tail call i32 @write(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
ret void
}
void teardown_vec(void) {}


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

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

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

LLVM IR (-O2):
define void @teardown_vec() {
ret void
}
unsigned XXH_versionNumber(void) { return (0 * 100 * 100 + 7 * 100 + 1); }


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

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

LLVM IR (-O0):
define i32 @XXH_versionNumber() {
ret i32 701
}

LLVM IR (-O2):
define i32 @XXH_versionNumber() {
ret i32 701
}
void fx_rpix_obj(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ player_attacks(struct Message *, int);
void cmd_gmelee(int pindex __attribute__((unused)), struct Message *msg) {
  player_attacks(msg, 1);
}


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

x86 assembly (clang, -O2):
<cmd_gmelee>:
mov    %rsi,%rdi
mov    $0x1,%esi
jmp    1030 <player_attacks@plt>

LLVM IR (-O0):
%struct.Message = type { i32 }
define void @cmd_gmelee(i32 %0, %struct.Message* %1) {
%3 = alloca i32
%4 = alloca %struct.Message*
store i32 %0, i32* %3
store %struct.Message* %1, %struct.Message** %4
%5 = load %struct.Message*, %struct.Message** %4
%6 = call i32 @player_attacks(%struct.Message* %5, i32 1)
ret void
}

LLVM IR (-O2):
%struct.Message = type { i32 }
define void @cmd_gmelee(i32 %0, %struct.Message* %1) {
%3 = tail call i32 @player_attacks(%struct.Message* %1, i32 1)
ret void
}
void geo_read(void) {}


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

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

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

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