xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ CalcMarsSatElem(double, int, double *);
void CalcAllMarsSatElem(double t, double elem[12]) {
  CalcMarsSatElem(t, 0, elem + (0 * 6));
  CalcMarsSatElem(t, 1, elem + (1 * 6));
}


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

x86 assembly (clang, -O2):
<CalcAllMarsSatElem>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movsd  %xmm0,0x8(%rsp)
xor    %edi,%edi
mov    %rbx,%rsi
call   1030 <CalcMarsSatElem@plt>
add    $0x30,%rbx
movsd  0x8(%rsp),%xmm0
mov    $0x1,%edi
mov    %rbx,%rsi
add    $0x10,%rsp
pop    %rbx
jmp    1030 <CalcMarsSatElem@plt>

LLVM IR (-O0):
define void @CalcAllMarsSatElem(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 = getelementptr inbounds double, double* %6, i64 0
%8 = call i32 @CalcMarsSatElem(double %5, i32 0, double* %7)
%9 = load double, double* %3
%10 = load double*, double** %4
%11 = getelementptr inbounds double, double* %10, i64 6
%12 = call i32 @CalcMarsSatElem(double %9, i32 1, double* %11)
ret void
}

LLVM IR (-O2):
define void @CalcAllMarsSatElem(double %0, double* %1) {
%3 = tail call i32 @CalcMarsSatElem(double %0, i32 0, double* %1)
%4 = getelementptr inbounds double, double* %1, i64 6
%5 = tail call i32 @CalcMarsSatElem(double %0, i32 1, double* %4)
ret void
}
double regular_wait(double interval) { return interval; }


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

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

LLVM IR (-O0):
define double @regular_wait(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
ret double %3
}

LLVM IR (-O2):
define double @regular_wait(double returned %0) {
ret double %0
}
/* Variables and functions */
int /*<<< orphan*/ process_set_flags(unsigned int, int /*<<< orphan*/);
void process_freeze(unsigned int process) { process_set_flags(process, 0); }


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

x86 assembly (clang, -O2):
<process_freeze>:
xor    %esi,%esi
jmp    1030 <process_set_flags@plt>

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

LLVM IR (-O2):
define void @process_freeze(i32 %0) {
%2 = tail call i32 @process_set_flags(i32 %0, i32 0)
ret void
}
outasm(ptr) char *ptr;
{
  while (outbyte(*ptr++))
    ;
}


x86 assembly (clang, -O0):
<outasm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%edi
mov    $0x0,%al
call   1030 <outbyte@plt>
cmp    $0x0,%eax
je     1143 <outasm+0x33>
jmp    111c <outasm+0xc>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outasm>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl (%rbx),%edi
add    $0x1,%rbx
xor    %eax,%eax
call   1030 <outbyte@plt>
test   %eax,%eax
jne    1120 <outasm+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define i32 @outasm(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
br label %4
4: ; preds = %11, %1
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i32 1
store i8* %6, i8** %3
%7 = load i8, i8* %5
%8 = sext i8 %7 to i32
%9 = call i32 (i32, ...) bitcast (i32 (...)* @outbyte to i32 (i32, ...)*)(i32 %8)
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %4
br label %4
12: ; preds = %4
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @outasm(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %4, %2 ]
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = tail call i32 (i32, ...) bitcast (i32 (...)* @outbyte to i32 (i32, ...)*)(i32 %6)
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %2
9: ; preds = %2
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
unsigned int ht_wstringhash(void *ky) {
  wchar_t *p = ky;
  unsigned int hash = 5381;
  int c;
  while ((c = *p++))
    hash = ((hash << 5) + hash) + c;
  return hash;
}


x86 assembly (clang, -O0):
<ht_wstringhash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x1505,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
cmp    $0x0,%eax
je     1148 <ht_wstringhash+0x48>
mov    -0x14(%rbp),%eax
shl    $0x5,%eax
add    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1117 <ht_wstringhash+0x17>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ht_wstringhash>:
mov    (%rdi),%ecx
test   %ecx,%ecx
je     1134 <ht_wstringhash+0x34>
add    $0x4,%rdi
mov    $0x1505,%edx
mov    %edx,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
shl    $0x5,%eax
add    %edx,%eax
add    %ecx,%eax
mov    (%rdi),%ecx
add    $0x4,%rdi
mov    %eax,%edx
test   %ecx,%ecx
jne    1120 <ht_wstringhash+0x20>
ret
mov    $0x1505,%eax
ret

LLVM IR (-O0):
define i32 @ht_wstringhash(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %2
%6 = load i8*, i8** %2
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %3
store i32 5381, i32* %4
br label %8
8: ; preds = %13, %1
%9 = load i32*, i32** %3
%10 = getelementptr inbounds i32, i32* %9, i32 1
store i32* %10, i32** %3
%11 = load i32, i32* %9
store i32 %11, i32* %5
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %20
13: ; preds = %8
%14 = load i32, i32* %4
%15 = shl i32 %14, 5
%16 = load i32, i32* %4
%17 = add i32 %15, %16
%18 = load i32, i32* %5
%19 = add i32 %17, %18
store i32 %19, i32* %4
br label %8
20: ; preds = %8
%21 = load i32, i32* %4
ret i32 %21
}

LLVM IR (-O2):
define i32 @ht_wstringhash(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %1, %5
%6 = phi i32 [ %12, %5 ], [ %3, %1 ]
%7 = phi i32* [ %9, %5 ], [ %2, %1 ]
%8 = phi i32 [ %11, %5 ], [ 5381, %1 ]
%9 = getelementptr inbounds i32, i32* %7, i64 1
%10 = mul i32 %8, 33
%11 = add i32 %6, %10
%12 = load i32, i32* %9
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %1
%15 = phi i32 [ 5381, %1 ], [ %11, %5 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void r(void) { printf("r"); }


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

x86 assembly (clang, -O2):
<r>:
mov    $0x72,%edi
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @r() {
%1 = tail call i32 @putchar(i32 114)
ret void
}
/* Variables and functions */
double native___NativeString_atof___impl(char *);
double core___core__NativeString___atof(char *self) {
  double var;
  double var1;
  var1 = native___NativeString_atof___impl(self);
  var = var1;
  goto RET_LABEL;
RET_LABEL:;
  return var;
}


x86 assembly (clang, -O0):
<core___core__NativeString___atof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <native___NativeString_atof___impl@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<core___core__NativeString___atof>:
jmp    1030 <native___NativeString_atof___impl@plt>

LLVM IR (-O0):
define double @core___core__NativeString___atof(i8* %0) {
%2 = alloca i8*
%3 = alloca double
%4 = alloca double
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call double @native___NativeString_atof___impl(i8* %5)
store double %6, double* %4
%7 = load double, double* %4
store double %7, double* %3
br label %8
8: ; preds = %1
%9 = load double, double* %3
ret double %9
}

LLVM IR (-O2):
define double @core___core__NativeString___atof(i8* %0) {
%2 = tail call double @native___NativeString_atof___impl(i8* %0)
ret double %2
}
/* Variables and functions */
char *strstr(char *, char *);
int CheckHeader(char *message) {
  char *head;
  head = strstr(message, "<^C");
  if (head == message)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<CheckHeader>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strstr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    114a <CheckHeader+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    1151 <CheckHeader+0x41>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CheckHeader>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"<^C\00"
define i32 @CheckHeader(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i8* @strstr(i8* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = load i8*, i8** %3
%9 = icmp eq i8* %7, %8
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 1, i32* %2
br label %12
11: ; preds = %1
store i32 0, i32* %2
br label %12
12: ; preds = %11, %10
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
@.str = [4 x i8] c"<^C\00"
define i32 @CheckHeader(i8* nocapture %0) {
%2 = tail call i32 @strncmp(i8* dereferenceable(1) %0, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 3)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ ClearPacketRx();
int /*<<< orphan*/ WF_ProcessRxPacket();
scalar_t__ isPacketRx();
void RxPacketCheck() {
  if (isPacketRx()) {
    ClearPacketRx();
    WF_ProcessRxPacket();
  }
}


x86 assembly (clang, -O0):
<RxPacketCheck>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <isPacketRx@plt>
cmp    $0x0,%rax
je     1153 <RxPacketCheck+0x23>
mov    $0x0,%al
call   1040 <ClearPacketRx@plt>
mov    $0x0,%al
call   1030 <WF_ProcessRxPacket@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<RxPacketCheck>:
push   %rax
xor    %eax,%eax
call   1050 <isPacketRx@plt>
test   %rax,%rax
je     114c <RxPacketCheck+0x1c>
xor    %eax,%eax
call   1040 <ClearPacketRx@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <WF_ProcessRxPacket@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @RxPacketCheck() {
%1 = call i64 (...) @isPacketRx()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = call i32 (...) @ClearPacketRx()
%5 = call i32 (...) @WF_ProcessRxPacket()
br label %6
6: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
define void @RxPacketCheck() {
%1 = tail call i64 (...) @isPacketRx()
%2 = icmp eq i64 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = tail call i32 (...) @ClearPacketRx()
%5 = tail call i32 (...) @WF_ProcessRxPacket()
br label %6
6: ; preds = %3, %0
ret void
}
int ft_int_len(int n) {
  int len;
  len = 0;
  if (n == 0)
    return (1);
  if (n < 0) {
    ++len;
    n *= -1;
  }
  while (n) {
    ++len;
    n /= 10;
  }
  return (len);
}


x86 assembly (clang, -O0):
<ft_int_len>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1124 <ft_int_len+0x24>
movl   $0x1,-0x4(%rbp)
jmp    116f <ft_int_len+0x6f>
cmpl   $0x0,-0x8(%rbp)
jge    113e <ft_int_len+0x3e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
imul   $0xffffffff,-0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1143 <ft_int_len+0x43>
cmpl   $0x0,-0x8(%rbp)
je     1169 <ft_int_len+0x69>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
jmp    1143 <ft_int_len+0x43>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_int_len>:
test   %edi,%edi
je     1133 <ft_int_len+0x33>
mov    %edi,%eax
shr    $0x1f,%eax
mov    %edi,%ecx
neg    %ecx
cmovs  %edi,%ecx
add    $0x1,%eax
movslq %ecx,%rdx
imul   $0x66666667,%rdx,%rcx
mov    %rcx,%rsi
shr    $0x3f,%rsi
sar    $0x22,%rcx
add    %esi,%ecx
add    $0x9,%edx
cmp    $0x12,%edx
ja     1110 <ft_int_len+0x10>
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @ft_int_len(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 0, i32* %4
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %27
8: ; preds = %1
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %8
%12 = load i32, i32* %4
%13 = add nsw i32 %12, 1
store i32 %13, i32* %4
%14 = load i32, i32* %3
%15 = mul nsw i32 %14, -1
store i32 %15, i32* %3
br label %16
16: ; preds = %11, %8
br label %17
17: ; preds = %20, %16
%18 = load i32, i32* %3
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %25
20: ; preds = %17
%21 = load i32, i32* %4
%22 = add nsw i32 %21, 1
store i32 %22, i32* %4
%23 = load i32, i32* %3
%24 = sdiv i32 %23, 10
store i32 %24, i32* %3
br label %17
25: ; preds = %17
%26 = load i32, i32* %4
store i32 %26, i32* %2
br label %27
27: ; preds = %25, %7
%28 = load i32, i32* %2
ret i32 %28
}

LLVM IR (-O2):
define i32 @ft_int_len(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = lshr i32 %0, 31
%5 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
br label %6
6: ; preds = %3, %6
%7 = phi i32 [ %9, %6 ], [ %4, %3 ]
%8 = phi i32 [ %10, %6 ], [ %5, %3 ]
%9 = add nuw nsw i32 %7, 1
%10 = sdiv i32 %8, 10
%11 = add i32 %8, 9
%12 = icmp ult i32 %11, 19
br i1 %12, label %13, label %6
13: ; preds = %6, %1
%14 = phi i32 [ 1, %1 ], [ %9, %6 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int k, m, b;
  scanf("%d", &k);
  m = k * k;
  b = m * k;
  printf("%d\n%d\n", m, b);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edx
mov    %edx,%esi
imul   %edx,%esi
imul   %esi,%edx
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [7 x i8] c"%d\0A%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = mul nsw i32 %4, %4
%6 = mul nsw i32 %5, %4
%7 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %5, i32 %6)
ret i32 0
}
/* Variables and functions */
int checkcmp();
int /*<<< orphan*/ system(char *);
int checkipv6usable() {
  system("tools/chkipv6 >tools/.chk");
  return checkcmp();
}


x86 assembly (clang, -O0):
<checkipv6usable>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <system@plt>
mov    $0x0,%al
call   1030 <checkcmp@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkipv6usable>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <checkcmp@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"tools/chkipv6 >tools/.chk\00"
define i32 @checkipv6usable() {
%1 = call i32 @system(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @checkcmp()
ret i32 %2
}

LLVM IR (-O2):
@.str = [26 x i8] c"tools/chkipv6 >tools/.chk\00"
define i32 @checkipv6usable() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @checkcmp()
ret i32 %2
}
void __attribute__((weak)) xx_cgo_panicmem(void) {}


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

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

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

LLVM IR (-O2):
define weak void @xx_cgo_panicmem() {
ret void
}
long long_fetch_nand_seq_cst(long *ptr, long value) {
  return __atomic_fetch_nand(ptr, value, 5);
}


x86 assembly (clang, -O0):
<long_fetch_nand_seq_cst>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rcx
mov    %rcx,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x30(%rbp)
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    -0x30(%rbp),%rsi
mov    %rax,%rdx
and    %rsi,%rdx
mov    %rdx,-0x48(%rbp)
not    %rdx
lock cmpxchg %rdx,(%rcx)
sete   %cl
mov    %rax,-0x40(%rbp)
test   $0x1,%cl
mov    %rax,-0x28(%rbp)
jne    1162 <long_fetch_nand_seq_cst+0x62>
jmp    112b <long_fetch_nand_seq_cst+0x2b>
mov    -0x40(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<long_fetch_nand_seq_cst>:
mov    (%rdi),%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rax,%rcx
and    %rsi,%rcx
not    %rcx
lock cmpxchg %rcx,(%rdi)
jne    1110 <long_fetch_nand_seq_cst+0x10>
ret

LLVM IR (-O0):
define i64 @long_fetch_nand_seq_cst(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64* %0, i64** %3
store i64 %1, i64* %4
%7 = load i64*, i64** %3
%8 = load i64, i64* %4
store i64 %8, i64* %5
%9 = load i64, i64* %5
%10 = atomicrmw nand i64* %7, i64 %9 seq_cst
store i64 %10, i64* %6
%11 = load i64, i64* %6
ret i64 %11
}

LLVM IR (-O2):
define i64 @long_fetch_nand_seq_cst(i64* nocapture %0, i64 %1) {
%3 = atomicrmw nand i64* %0, i64 %1 seq_cst
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ idOfClass(int);
int /*<<< orphan*/ output(int /*<<< orphan*/);
void printClassName(int c) { output(idOfClass(c)); }


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

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

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

LLVM IR (-O2):
define void @printClassName(i32 %0) {
%2 = tail call i32 @idOfClass(i32 %0)
%3 = tail call i32 @output(i32 %2)
ret void
}
/* Variables and functions */
int strcasecmp(char const *, char const *);
int strcmpi(const char *a, const char *b) { return strcasecmp(a, b); }


x86 assembly (clang, -O0):
<strcmpi>:
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 <strcasecmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmpi>:
jmp    1030 <strcasecmp@plt>

LLVM IR (-O0):
define i32 @strcmpi(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 @strcasecmp(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @strcmpi(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcasecmp(i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ i2cmaster_ClearAckErr(int);
void i2c1master_ClearAckErr(void) { i2cmaster_ClearAckErr(1); }


x86 assembly (clang, -O0):
<i2c1master_ClearAckErr>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <i2cmaster_ClearAckErr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c1master_ClearAckErr>:
mov    $0x1,%edi
jmp    1030 <i2cmaster_ClearAckErr@plt>

LLVM IR (-O0):
define void @i2c1master_ClearAckErr() {
%1 = call i32 @i2cmaster_ClearAckErr(i32 1)
ret void
}

LLVM IR (-O2):
define void @i2c1master_ClearAckErr() {
%1 = tail call i32 @i2cmaster_ClearAckErr(i32 1)
ret void
}
void RTSha512Init(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSha512Init() {
ret void
}
void chkchk(void) {
  int i;
  i = 0;
}


x86 assembly (clang, -O0):
<chkchk>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @chkchk() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ file_open_test(char const *);
int /*<<< orphan*/ file_read_write_test(char const *);
int /*<<< orphan*/ file_truncate_test(char const *);
int /*<<< orphan*/ unlink(char const *);
void test_file_io(void) {
  const char *filename = "file_io.dat";
  file_open_test(filename);
  file_read_write_test(filename);
  file_truncate_test(filename);
  unlink(filename);
}


x86 assembly (clang, -O0):
<test_file_io>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <file_open_test@plt>
mov    -0x8(%rbp),%rdi
call   1030 <file_read_write_test@plt>
mov    -0x8(%rbp),%rdi
call   1060 <file_truncate_test@plt>
mov    -0x8(%rbp),%rdi
call   1040 <unlink@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_file_io>:
push   %rbx
lea    0xeb8(%rip),%rbx
mov    %rbx,%rdi
call   1050 <file_open_test@plt>
mov    %rbx,%rdi
call   1030 <file_read_write_test@plt>
mov    %rbx,%rdi
call   1060 <file_truncate_test@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <unlink@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"file_io.dat\00"
define void @test_file_io() {
%1 = alloca i8*
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = call i32 @file_open_test(i8* %2)
%4 = load i8*, i8** %1
%5 = call i32 @file_read_write_test(i8* %4)
%6 = load i8*, i8** %1
%7 = call i32 @file_truncate_test(i8* %6)
%8 = load i8*, i8** %1
%9 = call i32 @unlink(i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"file_io.dat\00"
define void @test_file_io() {
%1 = tail call i32 @file_open_test(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @file_read_write_test(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @file_truncate_test(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @unlink(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
double plgndr(int, int, double);
int /*<<< orphan*/ printf(char *, double);
int main() {
  int l = 2;
  int m = 2;
  double x = 0.5;
  double ret;
  ret = plgndr(l, m, x);
  printf("The value is : %f\n", ret);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
movsd  0xebb(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
movsd  -0x18(%rbp),%xmm0
call   1040 <plgndr@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
mov    $0x2,%edi
mov    $0x2,%esi
call   1040 <plgndr@plt>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"The value is : %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = alloca double
store i32 0, i32* %1
store i32 2, i32* %2
store i32 2, i32* %3
store double 5.000000e-01, double* %4
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = load double, double* %4
%9 = call double @plgndr(i32 %6, i32 %7, double %8)
store double %9, double* %5
%10 = load double, double* %5
%11 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), double %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"The value is : %f\0A\00"
define i32 @main() {
%1 = tail call double @plgndr(i32 2, i32 2, double 5.000000e-01)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), double %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void sig_handler(int signal) { printf("Received signal %d\n", signal); }


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

x86 assembly (clang, -O2):
<sig_handler>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [20 x i8] c"Received signal %d\0A\00"
define void @sig_handler(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ltrim(char *);
char *rtrim(int /*<<< orphan*/);
char *trim(char *s) { return rtrim(ltrim(s)); }


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

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

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

LLVM IR (-O2):
define i8* @trim(i8* %0) {
%2 = tail call i32 @ltrim(i8* %0)
%3 = tail call i8* @rtrim(i32 %2)
ret i8* %3
}
extern void trace(int level, const char *format, ...) {}


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

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

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

LLVM IR (-O2):
define void @trace(i32 %0, i8* nocapture %1, ...) {
ret void
}
void gtk_box_pack_start() {}


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

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

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

LLVM IR (-O2):
define void @gtk_box_pack_start() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_usage() {
  fprintf(stderr, "Usege: descrypt [-k key] input_file output_file\n"
                  "\t-k\t--key key\t specify the 56-bit key in hex form "
                  "HH-HH-HH-HH-HH-HH-HH\n"
                  "\t-u\t--usage\t print this usage message\n"
                  "\tif a single hyphen-minus (-) is given as a file "
                  "stdout(stdin) is used\n");
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [229 x i8] c"Usege: descrypt [-k key] input_file output_file\0A\09-k\09--key key\09 specify the 56-bit key in hex form HH-HH-HH-HH-HH-HH-HH\0A\09-u\09--usage\09 print this usage message\0A\09if a single hyphen-minus (-) is given as a file stdout(stdin) is used\0A\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([229 x i8], [229 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [229 x i8] c"Usege: descrypt [-k key] input_file output_file\0A\09-k\09--key key\09 specify the 56-bit key in hex form HH-HH-HH-HH-HH-HH-HH\0A\09-u\09--usage\09 print this usage message\0A\09if a single hyphen-minus (-) is given as a file stdout(stdin) is used\0A\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([229 x i8], [229 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EditBookEvent();
void EditBookProc() { EditBookEvent(); }


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

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

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

LLVM IR (-O2):
define void @EditBookProc() {
%1 = tail call i32 (...) @EditBookEvent()
ret void
}
void wpa_debug_close_linux_tracing(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gtk_file_chooser_get_preview_filename() {
ret void
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
typedef int /*<<< orphan*/ u_int;
struct TYPE_3__ {
  int /*<<< orphan*/ x_handy;
};
typedef TYPE_1__ XDR;

/* Variables and functions */
u_int x_getpostn(XDR *xdrs) { return (xdrs->x_handy); }


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

x86 assembly (clang, -O2):
<x_getpostn>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32 }
define i32 @x_getpostn(%struct.TYPE_3__* %0) {
%2 = alloca %struct.TYPE_3__*
store %struct.TYPE_3__* %0, %struct.TYPE_3__** %2
%3 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 0
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32 }
define i32 @x_getpostn(%struct.TYPE_3__* nocapture %0) {
%2 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 0
%3 = load i32, i32* %2
ret i32 %3
}
void E() {}


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

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

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

LLVM IR (-O2):
define void @E() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned long);
int /*<<< orphan*/ put8(int);
void add_reg32_imm32(unsigned long reg32, unsigned long imm32) {
  put8(0x81);
  put8(0xC0 + reg32);
  put32(imm32);
}


x86 assembly (clang, -O0):
<add_reg32_imm32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x81,%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%rax
add    $0xc0,%rax
mov    %eax,%edi
call   1030 <put8@plt>
mov    -0x10(%rbp),%rdi
call   1040 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_reg32_imm32>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x81,%edi
call   1030 <put8@plt>
add    $0xc0,%ebx
mov    %ebx,%edi
call   1030 <put8@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @add_reg32_imm32(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = call i32 @put8(i32 129)
%6 = load i64, i64* %3
%7 = add i64 192, %6
%8 = trunc i64 %7 to i32
%9 = call i32 @put8(i32 %8)
%10 = load i64, i64* %4
%11 = call i32 @put32(i64 %10)
ret void
}

LLVM IR (-O2):
define void @add_reg32_imm32(i64 %0, i64 %1) {
%3 = tail call i32 @put8(i32 129)
%4 = trunc i64 %0 to i32
%5 = add i32 %4, 192
%6 = tail call i32 @put8(i32 %5)
%7 = tail call i32 @put32(i64 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printerror(char *);
int /*<<< orphan*/ readpositiveinteger(int *);
int readunsignedint(int *i) {
  if (!readpositiveinteger(i)) {
    printerror("Positive integer expected");
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<readunsignedint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <readpositiveinteger@plt>
cmp    $0x0,%eax
jne    1156 <readunsignedint+0x36>
lea    0xebb(%rip),%rdi
call   1030 <printerror@plt>
movl   $0x0,-0x4(%rbp)
jmp    115d <readunsignedint+0x3d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readunsignedint>:
push   %rax
call   1040 <readpositiveinteger@plt>
mov    %eax,%ecx
mov    $0x1,%eax
test   %ecx,%ecx
je     1133 <readunsignedint+0x13>
pop    %rcx
ret
lea    0xec6(%rip),%rdi
call   1030 <printerror@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Positive integer expected\00"
define i32 @readunsignedint(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
store i32* %0, i32** %3
%4 = load i32*, i32** %3
%5 = call i32 @readpositiveinteger(i32* %4)
%6 = icmp ne i32 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = call i32 @printerror(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %10
9: ; preds = %1
store i32 1, i32* %2
br label %10
10: ; preds = %9, %7
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@.str = [26 x i8] c"Positive integer expected\00"
define i32 @readunsignedint(i32* %0) {
%2 = tail call i32 @readpositiveinteger(i32* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @printerror(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 0, %4 ], [ 1, %1 ]
ret i32 %7
}
int mod(int n, int base) {
  int m;
  m = n % base;
  if (m < 0)
    return base + m;
  return m;
}


x86 assembly (clang, -O0):
<mod>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jge    112c <mod+0x2c>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1132 <mod+0x32>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mod>:
mov    %edi,%eax
cltd
idiv   %esi
mov    %edx,%eax
sar    $0x1f,%eax
and    %esi,%eax
add    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @mod(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
%4 = icmp slt i32 %3, 0
%5 = select i1 %4, i32 %1, i32 0
%6 = add nsw i32 %5, %3
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ nsc_assert(int);
void copyout(void) {
  nsc_assert(0 && "This function is unimplemented.");
  ;
}


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

x86 assembly (clang, -O2):
<copyout>:
xor    %edi,%edi
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
define void @copyout() {
%1 = call i32 @nsc_assert(i32 0)
ret void
}

LLVM IR (-O2):
define void @copyout() {
%1 = tail call i32 @nsc_assert(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memmove(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ strlen(char *);
int main(void) {
  char p[5] = "hi";
  memmove(p, p + 1, strlen(p));
  p[0] = '1';
  puts(p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xebb(%rip),%eax
mov    %eax,-0x9(%rbp)
mov    0xeb6(%rip),%al
mov    %al,-0x5(%rbp)
lea    -0x9(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x9(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
lea    -0x9(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1050 <memmove@plt>
movb   $0x31,-0x9(%rbp)
lea    -0x9(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
movb   $0x0,0x4(%rsp)
movl   $0x6968,(%rsp)
lea    0x1(%rsp),%r14
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1050 <memmove@plt>
movb   $0x31,(%rsp)
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.p = [5 x i8] c"hi\00\00\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i8]
store i32 0, i32* %1
%3 = bitcast [5 x i8]* %2 to i8*
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%8 = call i32 @strlen(i8* %7)
%9 = call i32 @memmove(i8* %4, i8* %6, i32 %8)
%10 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
store i8 49, i8* %10
%11 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%12 = call i32 @puts(i8* %11)
ret i32 0
}

LLVM IR (-O2):
@__const.main.p = [5 x i8] c"hi\00\00\00"
define i32 @main() {
%1 = alloca [5 x i8]
%2 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%3 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 1
%4 = call i32 @strlen(i8* %2)
%5 = call i32 @memmove(i8* %2, i8* %3, i32 %4)
store i8 49, i8* %2
%6 = call i32 @puts(i8* %2)
ret i32 0
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t getDatacenterId(int datacenter_id) {
  return (uint64_t)datacenter_id % (2 << (2));
}


x86 assembly (clang, -O0):
<getDatacenterId>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getDatacenterId>:
mov    %edi,%eax
lea    0x7(%rax),%ecx
test   %edi,%edi
cmovns %edi,%ecx
and    $0xfffffff8,%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @getDatacenterId(i32 %0) {
%2 = srem i32 %0, 8
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ GLfloat;

/* Variables and functions */
int /*<<< orphan*/ glLoadMatrixf(int /*<<< orphan*/ *);
void LoadMatrixf(GLfloat v[16]) { glLoadMatrixf(v); }


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

x86 assembly (clang, -O2):
<LoadMatrixf>:
jmp    1030 <glLoadMatrixf@plt>

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

LLVM IR (-O2):
define void @LoadMatrixf(i32* %0) {
%2 = tail call i32 @glLoadMatrixf(i32* %0)
ret void
}
int dead_state_resume(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @dead_state_resume() {
ret i32 0
}
void setup_cr0(void) {}


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

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

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

LLVM IR (-O2):
define void @setup_cr0() {
ret void
}
void clipboard_set(const char *text) { ((void)(text)); }


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

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

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

LLVM IR (-O2):
define void @clipboard_set(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int basm_fread(unsigned char *, int, int, void *);
int basm_fgetc(void *fd) {
  unsigned char ch[4];
  int i;
  i = basm_fread(ch, 1, 1, fd);
  if (i < 1)
    return (-1);
  return (ch[0]);
}


x86 assembly (clang, -O0):
<basm_fgetc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
lea    -0x14(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <basm_fread@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x1,-0x18(%rbp)
jge    1149 <basm_fgetc+0x39>
movl   $0xffffffff,-0x4(%rbp)
jmp    1150 <basm_fgetc+0x40>
movzbl -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basm_fgetc>:
push   %rax
mov    %rdi,%rcx
lea    0x4(%rsp),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
call   1030 <basm_fread@plt>
test   %eax,%eax
movzbl 0x4(%rsp),%ecx
mov    $0xffffffff,%eax
cmovg  %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @basm_fgetc(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca [4 x i8]
%5 = alloca i32
store i8* %0, i8** %3
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = call i32 @basm_fread(i8* %6, i32 1, i32 1, i8* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 1
br i1 %10, label %11, label %12
11: ; preds = %1
store i32 -1, i32* %2
br label %16
12: ; preds = %1
%13 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
store i32 %15, i32* %2
br label %16
16: ; preds = %12, %11
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @basm_fgetc(i8* %0) {
%2 = alloca [4 x i8]
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%4 = call i32 @basm_fread(i8* %3, i32 1, i32 1, i8* %0)
%5 = icmp slt i32 %4, 1
%6 = load i8, i8* %3
%7 = zext i8 %6 to i32
%8 = select i1 %5, i32 -1, i32 %7
ret i32 %8
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t get_be16(const uint8_t *p) { return (((uint16_t)p[0]) << 8) | p[1]; }


x86 assembly (clang, -O0):
<get_be16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
or     0x4(%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_be16>:
mov    (%rdi),%eax
shl    $0x8,%eax
or     0x4(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @get_be16(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = shl i32 %5, 8
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 1
%9 = load i32, i32* %8
%10 = or i32 %6, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @get_be16(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 8
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = or i32 %3, %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ glNormal3s(short, short, short);
void Normal3s(short x, short y, short z) { glNormal3s(x, y, z); }


x86 assembly (clang, -O0):
<Normal3s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dx,%ax
mov    %si,%cx
mov    %di,%dx
mov    %dx,-0x2(%rbp)
mov    %cx,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
mov    -0x2(%rbp),%cx
mov    -0x4(%rbp),%ax
movswl %cx,%edi
movswl %ax,%esi
movswl -0x6(%rbp),%edx
call   1030 <glNormal3s@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Normal3s>:
jmp    1030 <glNormal3s@plt>

LLVM IR (-O0):
define void @Normal3s(i16 signext %0, i16 signext %1, i16 signext %2) {
%4 = alloca i16
%5 = alloca i16
%6 = alloca i16
store i16 %0, i16* %4
store i16 %1, i16* %5
store i16 %2, i16* %6
%7 = load i16, i16* %4
%8 = load i16, i16* %5
%9 = load i16, i16* %6
%10 = call i32 @glNormal3s(i16 signext %7, i16 signext %8, i16 signext %9)
ret void
}

LLVM IR (-O2):
define void @Normal3s(i16 signext %0, i16 signext %1, i16 signext %2) {
%4 = tail call i32 @glNormal3s(i16 signext %0, i16 signext %1, i16 signext %2)
ret void
}