xunge/DecIR huggingface dataset:
void putstr(ss) char *ss;
{
  int t;
  while ((t = *ss++)) {
    if (t >= 'a' && t <= 'z')
      t += 'A' - 'a';
    putchar(t);
  }
}


x86 assembly (clang, -O0):
<putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
je     1166 <putstr+0x56>
cmpl   $0x61,-0xc(%rbp)
jl     1157 <putstr+0x47>
cmpl   $0x7a,-0xc(%rbp)
jg     1157 <putstr+0x47>
mov    -0xc(%rbp),%eax
add    $0xffffffe0,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    $0x0,%al
call   1030 <putchar@plt>
jmp    111c <putstr+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putstr>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1141 <putstr+0x31>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%eax
lea    -0x61(%rax),%ecx
lea    -0x20(%rax),%edi
cmp    $0x1a,%cl
cmovae %eax,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <putstr+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @putstr(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
br label %4
4: ; preds = %19, %1
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i32 1
store i8* %6, i8** %2
%7 = load i8, i8* %5
%8 = sext i8 %7 to i32
store i32 %8, i32* %3
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %22
10: ; preds = %4
%11 = load i32, i32* %3
%12 = icmp sge i32 %11, 97
br i1 %12, label %13, label %19
13: ; preds = %10
%14 = load i32, i32* %3
%15 = icmp sle i32 %14, 122
br i1 %15, label %16, label %19
16: ; preds = %13
%17 = load i32, i32* %3
%18 = add nsw i32 %17, -32
store i32 %18, i32* %3
br label %19
19: ; preds = %16, %13, %10
%20 = load i32, i32* %3
%21 = call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 %20)
br label %4
22: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @putstr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %14, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = sext i8 %5 to i32
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = add i8 %5, -97
%10 = icmp ult i8 %9, 26
%11 = add nsw i32 %7, -32
%12 = select i1 %10, i32 %11, i32 %7
%13 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 %12)
%14 = load i8, i8* %8
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %4
16: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int main(void) {
  float x = 23.44231;
  printf("%-8.1e\n", x);
  printf("%10.6e\n", x);
  printf("%-8.3f\n", x);
  printf("%6.0f\n", x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  0xee0(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
movss  -0x4(%rbp),%xmm0
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
movss  -0x4(%rbp),%xmm0
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
movss  -0x4(%rbp),%xmm0
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeec(%rip),%rdi
movss  0xee0(%rip),%xmm0
call   1030 <printf@plt>
lea    0xee0(%rip),%rdi
movss  0xecc(%rip),%xmm0
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
movss  0xeb8(%rip),%xmm0
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
movss  0xea4(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"%-8.1e\0A\00"
@.str.1 = [8 x i8] c"%10.6e\0A\00"
@.str.2 = [8 x i8] c"%-8.3f\0A\00"
@.str.3 = [7 x i8] c"%6.0f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), float 0x4037713B40000000)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), float 0x4037713B40000000)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), float 0x4037713B40000000)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), float 0x4037713B40000000)
ret i32 0
}
/* Variables and functions */
char *CG_ConfigString(int);
int /*<<< orphan*/ CG_NewClientInfo(int);
void CG_ForceModelChange(void) {
  int i;
  for (i = 0; i < 64; i++) {
    const char *clientInfo;
    clientInfo = CG_ConfigString(((32 + 256) + 256) + i);
    if (!clientInfo[0]) {
      continue;
    }
    CG_NewClientInfo(i);
  }
}


x86 assembly (clang, -O0):
<CG_ForceModelChange>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x40,-0x4(%rbp)
jge    1173 <CG_ForceModelChange+0x53>
mov    -0x4(%rbp),%edi
add    $0x220,%edi
call   1040 <CG_ConfigString@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
jne    115d <CG_ForceModelChange+0x3d>
jmp    1165 <CG_ForceModelChange+0x45>
mov    -0x4(%rbp),%edi
call   1030 <CG_NewClientInfo@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <CG_ForceModelChange+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CG_ForceModelChange>:
push   %rbx
xor    %ebx,%ebx
jmp    1138 <CG_ForceModelChange+0x18>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%ebx
cmp    $0x40,%ebx
je     1151 <CG_ForceModelChange+0x31>
lea    0x220(%rbx),%edi
call   1040 <CG_ConfigString@plt>
cmpb   $0x0,(%rax)
je     1130 <CG_ForceModelChange+0x10>
mov    %ebx,%edi
call   1030 <CG_NewClientInfo@plt>
jmp    1130 <CG_ForceModelChange+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @CG_ForceModelChange() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
br label %3
3: ; preds = %18, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 64
br i1 %5, label %6, label %21
6: ; preds = %3
%7 = load i32, i32* %1
%8 = add nsw i32 544, %7
%9 = call i8* @CG_ConfigString(i32 %8)
store i8* %9, i8** %2
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 0
%12 = load i8, i8* %11
%13 = icmp ne i8 %12, 0
br i1 %13, label %15, label %14
14: ; preds = %6
br label %18
15: ; preds = %6
%16 = load i32, i32* %1
%17 = call i32 @CG_NewClientInfo(i32 %16)
br label %18
18: ; preds = %15, %14
%19 = load i32, i32* %1
%20 = add nsw i32 %19, 1
store i32 %20, i32* %1
br label %3
21: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @CG_ForceModelChange() {
br label %1
1: ; preds = %0, %9
%2 = phi i32 [ 0, %0 ], [ %10, %9 ]
%3 = add nuw nsw i32 %2, 544
%4 = tail call i8* @CG_ConfigString(i32 %3)
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = tail call i32 @CG_NewClientInfo(i32 %2)
br label %9
9: ; preds = %1, %7
%10 = add nuw nsw i32 %2, 1
%11 = icmp eq i32 %10, 64
br i1 %11, label %12, label %1
12: ; preds = %9
ret void
}
/* Variables and functions */
scalar_t__ isdigit(int);
scalar_t__ isxdigit(int);
char toupper(int);
int getdigit(int c) {
  if (isdigit(c))
    return c - '0';
  if (isxdigit(c))
    return toupper(c) - 'A' + 10;
  return 16;
}


x86 assembly (clang, -O0):
<getdigit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     115b <getdigit+0x2b>
mov    -0x8(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    118d <getdigit+0x5d>
mov    -0x8(%rbp),%edi
call   1050 <isxdigit@plt>
cmp    $0x0,%rax
je     1186 <getdigit+0x56>
mov    -0x8(%rbp),%edi
call   1040 <toupper@plt>
movsbl %al,%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    118d <getdigit+0x5d>
movl   $0x10,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getdigit>:
push   %rbx
mov    %edi,%ebx
call   1030 <isdigit@plt>
test   %rax,%rax
je     1142 <getdigit+0x12>
add    $0xffffffd0,%ebx
jmp    1162 <getdigit+0x32>
mov    %ebx,%edi
call   1050 <isxdigit@plt>
test   %rax,%rax
je     115d <getdigit+0x2d>
mov    %ebx,%edi
call   1040 <toupper@plt>
movsbl %al,%ebx
add    $0xffffffc9,%ebx
jmp    1162 <getdigit+0x32>
mov    $0x10,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @getdigit(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @isdigit(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %3
%9 = sub nsw i32 %8, 48
store i32 %9, i32* %2
br label %21
10: ; preds = %1
%11 = load i32, i32* %3
%12 = call i64 @isxdigit(i32 %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %20
14: ; preds = %10
%15 = load i32, i32* %3
%16 = call signext i8 @toupper(i32 %15)
%17 = sext i8 %16 to i32
%18 = sub nsw i32 %17, 65
%19 = add nsw i32 %18, 10
store i32 %19, i32* %2
br label %21
20: ; preds = %10
store i32 16, i32* %2
br label %21
21: ; preds = %20, %14, %7
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @getdigit(i32 %0) {
%2 = tail call i64 @isdigit(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = add nsw i32 %0, -48
br label %13
6: ; preds = %1
%7 = tail call i64 @isxdigit(i32 %0)
%8 = icmp eq i64 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %6
%10 = tail call signext i8 @toupper(i32 %0)
%11 = sext i8 %10 to i32
%12 = add nsw i32 %11, -55
br label %13
13: ; preds = %6, %9, %4
%14 = phi i32 [ %5, %4 ], [ %12, %9 ], [ 16, %6 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, int);
void sig1(int a) {
  printf("child: sigusr2 nr: %d\n", a);
  exit(1);
}


x86 assembly (clang, -O0):
<sig1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sig1>:
push   %rax
mov    %edi,%esi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"child: sigusr2 nr: %d\0A\00"
define void @sig1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [23 x i8] c"child: sigusr2 nr: %d\0A\00"
define void @sig1(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_barrier_t;

/* Variables and functions */
int /*<<< orphan*/ pthread_barrier_wait(int /*<<< orphan*/ *);
int /*<<< orphan*/ sleep(int);
void *sleep1(void *arg) {
  sleep(10);
  pthread_barrier_wait((pthread_barrier_t *)arg);
  return NULL;
}


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

x86 assembly (clang, -O2):
<sleep1>:
push   %rbx
mov    %rdi,%rbx
mov    $0xa,%edi
call   1040 <sleep@plt>
mov    %rbx,%rdi
call   1030 <pthread_barrier_wait@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @sleep1(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @sleep(i32 10)
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
%6 = call i32 @pthread_barrier_wait(i32* %5)
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @sleep1(i8* %0) {
%2 = tail call i32 @sleep(i32 10)
%3 = bitcast i8* %0 to i32*
%4 = tail call i32 @pthread_barrier_wait(i32* %3)
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ stackEmLock_acquire(unsigned int *);
int /*<<< orphan*/ stackEmLock_release(unsigned int *);
void stackEmBarrier_register(unsigned int *barrierAddress) {
  while (!stackEmLock_acquire(barrierAddress)) {
  }
  *(barrierAddress + 1) = *(barrierAddress + 1) + 1;
  *(barrierAddress + 2) = *(barrierAddress + 2) + 1;
  stackEmLock_release(barrierAddress);
}


x86 assembly (clang, -O0):
<stackEmBarrier_register>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <stackEmLock_acquire@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    114a <stackEmBarrier_register+0x2a>
jmp    114f <stackEmBarrier_register+0x2f>
jmp    112c <stackEmBarrier_register+0xc>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%ecx
add    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%ecx
add    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x8(%rbp),%rdi
call   1040 <stackEmLock_release@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stackEmBarrier_register>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <stackEmLock_acquire@plt>
test   %eax,%eax
je     1130 <stackEmBarrier_register+0x10>
addl   $0x1,0x4(%rbx)
addl   $0x1,0x8(%rbx)
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <stackEmLock_release@plt>

LLVM IR (-O0):
define void @stackEmBarrier_register(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
br label %3
3: ; preds = %8, %1
%4 = load i32*, i32** %2
%5 = call i32 @stackEmLock_acquire(i32* %4)
%6 = icmp ne i32 %5, 0
%7 = xor i1 %6, true
br i1 %7, label %8, label %9
8: ; preds = %3
br label %3
9: ; preds = %3
%10 = load i32*, i32** %2
%11 = getelementptr inbounds i32, i32* %10, i64 1
%12 = load i32, i32* %11
%13 = add i32 %12, 1
%14 = load i32*, i32** %2
%15 = getelementptr inbounds i32, i32* %14, i64 1
store i32 %13, i32* %15
%16 = load i32*, i32** %2
%17 = getelementptr inbounds i32, i32* %16, i64 2
%18 = load i32, i32* %17
%19 = add i32 %18, 1
%20 = load i32*, i32** %2
%21 = getelementptr inbounds i32, i32* %20, i64 2
store i32 %19, i32* %21
%22 = load i32*, i32** %2
%23 = call i32 @stackEmLock_release(i32* %22)
ret void
}

LLVM IR (-O2):
define void @stackEmBarrier_register(i32* %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 @stackEmLock_acquire(i32* %0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %2, label %5
5: ; preds = %2
%6 = getelementptr inbounds i32, i32* %0, i64 1
%7 = load i32, i32* %6
%8 = add i32 %7, 1
store i32 %8, i32* %6
%9 = getelementptr inbounds i32, i32* %0, i64 2
%10 = load i32, i32* %9
%11 = add i32 %10, 1
store i32 %11, i32* %9
%12 = tail call i32 @stackEmLock_release(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, uintptr_t *, size_t);
void _br2_store(uintptr_t a, uintptr_t v, size_t sz) {
  memcpy((void *)a, &v, sz);
}


x86 assembly (clang, -O0):
<_br2_store>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    -0x10(%rbp),%rsi
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @_br2_store(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
store i64 %1, i64* %4
%5 = inttoptr i64 %0 to i8*
%6 = call i32 @memcpy(i8* %5, i64* %4, i64 %2)
ret void
}
void kol_key_lang_set(unsigned lang) {
  asm("int $0x40" ::"a"(21), "b"(2), "c"(9), "d"(lang));
}


x86 assembly (clang, -O0):
<kol_key_lang_set>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%edx
mov    $0x15,%eax
mov    $0x2,%ebx
mov    $0x9,%ecx
int    $0x40
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<kol_key_lang_set>:
push   %rbx
mov    $0x15,%eax
mov    $0x2,%ebx
mov    $0x9,%ecx
mov    %edi,%edx
int    $0x40
pop    %rbx
ret

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

LLVM IR (-O2):
define void @kol_key_lang_set(i32 %0) {
tail call void asm sideeffect "int $$0x40", "{ax},{bx},{cx},{dx},~{dirflag},~{fpsr},~{flags}"(i32 21, i32 2, i32 9, i32 %0)
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int celcon_get_inner_normal(int n, int i, double *normal) {
  int *b, fail;
  fail = _ada_use_c2phc4c(87, &i, b, normal, 0);
  return fail;
}


x86 assembly (clang, -O0):
<celcon_get_inner_normal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x18(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    $0x57,%edi
lea    -0x8(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<celcon_get_inner_normal>:
push   %rax
mov    %rdx,%rcx
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x57,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @celcon_get_inner_normal(i32 %0, i32 %1, double* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca double*
%7 = alloca i32*
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store double* %2, double** %6
%9 = load i32*, i32** %7
%10 = load double*, double** %6
%11 = call i32 @_ada_use_c2phc4c(i32 87, i32* %5, i32* %9, double* %10, i32 0)
store i32 %11, i32* %8
%12 = load i32, i32* %8
ret i32 %12
}

LLVM IR (-O2):
define i32 @celcon_get_inner_normal(i32 %0, i32 %1, double* %2) {
%4 = alloca i32
store i32 %1, i32* %4
%5 = call i32 @_ada_use_c2phc4c(i32 87, i32* %4, i32* undef, double* %2, i32 0)
ret i32 %5
}
int get_salt_size(void) { return 2; }


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

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

LLVM IR (-O0):
define i32 @get_salt_size() {
ret i32 2
}

LLVM IR (-O2):
define i32 @get_salt_size() {
ret i32 2
}
void fatalerror(message) char *message;
{
  refer();
  errexit(message);
}


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

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

LLVM IR (-O0):
define void @fatalerror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @refer()
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @errexit to i32 (i8*, ...)*)(i8* %4)
ret void
}

LLVM IR (-O2):
define void @fatalerror(i8* %0) {
%2 = tail call i32 (...) @refer()
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @errexit to i32 (i8*, ...)*)(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usermode_rc4(int argc, char **argv) { printf("rc4 \n"); }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"rc4 \0A\00"
define void @usermode_rc4(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [5 x i8] c"rc4 \00"
define void @usermode_rc4(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dprec();
double init() {
  dprec();
  return 0.0;
}


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

x86 assembly (clang, -O2):
<init>:
push   %rax
xor    %eax,%eax
call   1030 <dprec@plt>
xorps  %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @init() {
%1 = call i32 (...) @dprec()
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @init() {
%1 = tail call i32 (...) @dprec()
ret double 0.000000e+00
}
/* Variables and functions */
int rand();
int cooldown(int heat) {
  if (heat == 0)
    return 0;
  int r = (rand() % heat);
  if (r == 0)
    heat--;
  return heat;
}


x86 assembly (clang, -O0):
<cooldown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <cooldown+0x21>
movl   $0x0,-0x4(%rbp)
jmp    1158 <cooldown+0x48>
mov    $0x0,%al
call   1030 <rand@plt>
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1152 <cooldown+0x42>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cooldown>:
push   %rbx
test   %edi,%edi
je     1129 <cooldown+0x19>
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
cltd
idiv   %ebx
cmp    $0x1,%edx
sbb    $0x0,%ebx
jmp    112b <cooldown+0x1b>
xor    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @cooldown(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = tail call i32 (...) @rand()
%5 = srem i32 %4, %0
%6 = icmp eq i32 %5, 0
%7 = sext i1 %6 to i32
%8 = add nsw i32 %7, %0
br label %9
9: ; preds = %1, %3
%10 = phi i32 [ %8, %3 ], [ 0, %1 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ bar(char, int, int, int);
void main(void) { bar('1', 99, 3, 4); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x31,%edi
mov    $0x63,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
call   1030 <bar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x31,%edi
mov    $0x63,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
jmp    1030 <bar@plt>

LLVM IR (-O0):
define void @main() {
%1 = call i32 @bar(i8 signext 49, i32 99, i32 3, i32 4)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @bar(i8 signext 49, i32 99, i32 3, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ die();
void *malloc(size_t);
void *xmalloc(size_t size) {
  void *res = malloc(size);
  if (res == NULL) {
    die();
  }
  return res;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114b <xmalloc+0x2b>
mov    $0x0,%al
call   1040 <die@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1135 <xmalloc+0x15>
xor    %eax,%eax
call   1040 <die@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @die()
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @die()
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
char getchar();
void flush() {
  while (getchar() != '\n')
    ;
}


x86 assembly (clang, -O0):
<flush>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <flush+0x9>
mov    $0x0,%al
call   1030 <getchar@plt>
movsbl %al,%eax
cmp    $0xa,%eax
je     1131 <flush+0x21>
jmp    1119 <flush+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<flush>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%al
jne    1120 <flush+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @flush() {
br label %1
1: ; preds = %5, %0
%2 = call signext i8 (...) @getchar()
%3 = sext i8 %2 to i32
%4 = icmp ne i32 %3, 10
br i1 %4, label %5, label %6
5: ; preds = %1
br label %1
6: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @flush() {
br label %1
1: ; preds = %1, %0
%2 = tail call signext i8 (...) @getchar()
%3 = icmp eq i8 %2, 10
br i1 %3, label %4, label %1
4: ; preds = %1
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  char *decimal_point;
};

/* Variables and functions */
TYPE_1__ *localeconv();
char *strchr(char *, char const);
void from_locale(char *buffer) {
  const char *point;
  char *pos;
  point = localeconv()->decimal_point;
  if (*point == '.') {
    return;
  }
  pos = strchr(buffer, *point);
  if (pos)
    *pos = '.';
}


x86 assembly (clang, -O0):
<from_locale>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <localeconv@plt>
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
jne    114f <from_locale+0x2f>
jmp    1175 <from_locale+0x55>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
movsbl (%rax),%esi
call   1040 <strchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1175 <from_locale+0x55>
mov    -0x18(%rbp),%rax
movb   $0x2e,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<from_locale>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <localeconv@plt>
mov    (%rax),%rax
mov    (%rax),%al
cmp    $0x2e,%al
je     1147 <from_locale+0x27>
movsbl %al,%esi
mov    %rbx,%rdi
call   1040 <strchr@plt>
test   %rax,%rax
je     1147 <from_locale+0x27>
movb   $0x2e,(%rax)
pop    %rbx
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i8* }
define void @from_locale(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %2
%5 = call %struct.TYPE_2__* (...) @localeconv()
%6 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %5, i32 0, i32 0
%7 = load i8*, i8** %6
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 46
br i1 %11, label %12, label %13
12: ; preds = %1
br label %22
13: ; preds = %1
%14 = load i8*, i8** %2
%15 = load i8*, i8** %3
%16 = load i8, i8* %15
%17 = call i8* @strchr(i8* %14, i8 signext %16)
store i8* %17, i8** %4
%18 = load i8*, i8** %4
%19 = icmp ne i8* %18, null
br i1 %19, label %20, label %22
20: ; preds = %13
%21 = load i8*, i8** %4
store i8 46, i8* %21
br label %22
22: ; preds = %12, %20, %13
ret void
}

LLVM IR (-O2):
%struct.TYPE_2__ = type { i8* }
define void @from_locale(i8* %0) {
%2 = tail call %struct.TYPE_2__* (...) @localeconv()
%3 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %2, i64 0, i32 0
%4 = load i8*, i8** %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 46
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext %5)
%9 = icmp eq i8* %8, null
br i1 %9, label %11, label %10
10: ; preds = %7
store i8 46, i8* %8
br label %11
11: ; preds = %7, %10, %1
ret void
}
void XtCallbackNonexclusive() {}


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

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

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

LLVM IR (-O2):
define void @XtCallbackNonexclusive() {
ret void
}
extern void get_sensor_fault(double time, struct sensordata *sensorData_ptr,
                             struct nav *navData_ptr,
                             struct control *controlData_ptr) {}


x86 assembly (clang, -O0):
<get_sensor_fault>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.sensordata = type opaque
%struct.nav = type opaque
%struct.control = type opaque
define void @get_sensor_fault(double %0, %struct.sensordata* %1, %struct.nav* %2, %struct.control* %3) {
%5 = alloca double
%6 = alloca %struct.sensordata*
%7 = alloca %struct.nav*
%8 = alloca %struct.control*
store double %0, double* %5
store %struct.sensordata* %1, %struct.sensordata** %6
store %struct.nav* %2, %struct.nav** %7
store %struct.control* %3, %struct.control** %8
ret void
}

LLVM IR (-O2):
%struct.sensordata = type opaque
%struct.nav = type opaque
%struct.control = type opaque
define void @get_sensor_fault(double %0, %struct.sensordata* nocapture %1, %struct.nav* nocapture %2, %struct.control* nocapture %3) {
ret void
}
void foo442() {}


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

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

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

LLVM IR (-O2):
define void @foo442() {
ret void
}
/* Variables and functions */
int getDay();
int getMonth();
int getYear();
int /*<<< orphan*/ printf(char *, int, int, int);
void printDate() { printf("%d/%d/%d\n", getDay(), getMonth(), getYear()); }


x86 assembly (clang, -O0):
<printDate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <getDay@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1060 <getMonth@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getYear@plt>
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    %eax,%ecx
lea    0xe8e(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printDate>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <getDay@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1060 <getMonth@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1030 <getYear@plt>
lea    0xe9d(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %eax,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"%d/%d/%d\0A\00"
define void @printDate() {
%1 = call i32 (...) @getDay()
%2 = call i32 (...) @getMonth()
%3 = call i32 (...) @getYear()
%4 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2, i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"%d/%d/%d\0A\00"
define void @printDate() {
%1 = tail call i32 (...) @getDay()
%2 = tail call i32 (...) @getMonth()
%3 = tail call i32 (...) @getYear()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2, i32 %3)
ret void
}
/* Variables and functions */
scalar_t__ strncasecmp(char const *, char const *, size_t);
long fortran_strncasecmp_(const char *s1, const char *s2, long *len) {
  return (long)strncasecmp(s1, s2, (size_t)*len);
}


x86 assembly (clang, -O0):
<fortran_strncasecmp_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    (%rax),%rdx
call   1030 <strncasecmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fortran_strncasecmp_>:
mov    (%rdx),%rdx
jmp    1030 <strncasecmp@plt>

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

LLVM IR (-O2):
define i64 @fortran_strncasecmp_(i8* nocapture %0, i8* nocapture %1, i64* nocapture %2) {
%4 = load i64, i64* %2
%5 = tail call i64 @strncasecmp(i8* %0, i8* %1, i64 %4)
ret i64 %5
}
int contains(int *array, int value, int size) {
  int j;
  for (j = 0; j < size; ++j)
    if (array[j] == value)
      return 1;
  return 0;
}


x86 assembly (clang, -O0):
<contains>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1154 <contains+0x54>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x14(%rbp),%eax
jne    1141 <contains+0x41>
movl   $0x1,-0x4(%rbp)
jmp    115b <contains+0x5b>
jmp    1146 <contains+0x46>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1115 <contains+0x15>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<contains>:
test   %edx,%edx
jle    111e <contains+0x1e>
mov    %edx,%eax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
cmp    %esi,(%rdi,%rcx,4)
je     1121 <contains+0x21>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <contains+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @contains(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %15
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %14, %6
br i1 %8, label %15, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %14, %7 ]
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = icmp eq i32 %12, %1
%14 = add nuw nsw i64 %10, 1
br i1 %13, label %15, label %7
15: ; preds = %9, %7, %3
%16 = phi i32 [ 0, %3 ], [ 0, %7 ], [ 1, %9 ]
ret i32 %16
}
void *get_array_addr(void *addr) { return addr + sizeof(int); }


x86 assembly (clang, -O0):
<get_array_addr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_array_addr>:
lea    0x4(%rdi),%rax
ret

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

LLVM IR (-O2):
define i8* @get_array_addr(i8* readnone %0) {
%2 = getelementptr i8, i8* %0, i64 4
ret i8* %2
}
char *strcpy(char *dst, const char *src) {
  char *d = dst;
  while ((*d++ = *src++) != 0) {
  }
  return dst;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     1147 <strcpy+0x47>
jmp    1114 <strcpy+0x14>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rsi,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <strcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %6, %3 ]
%5 = phi i8* [ %0, %2 ], [ %8, %3 ]
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = load i8, i8* %4
%8 = getelementptr inbounds i8, i8* %5, i64 1
store i8 %7, i8* %5
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i8* %0
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int i, x, y;
  i = 0;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  if (x != 0) {
    while (x > 0 && y > 0) {
      i = i + 1;
      x = (x - 1) - (y - 1);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1196 <main+0x86>
jmp    1149 <main+0x39>
xor    %eax,%eax
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0x11(%rbp)
jle    1162 <main+0x52>
cmpl   $0x0,-0x10(%rbp)
setg   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1172 <main+0x62>
jmp    1191 <main+0x81>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
sub    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    1149 <main+0x39>
jmp    1196 <main+0x86>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %3
%6 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %6, i32* %4
%7 = load i32, i32* %3
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %27
9: ; preds = %0
br label %10
10: ; preds = %18, %9
%11 = load i32, i32* %3
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i32, i32* %4
%15 = icmp sgt i32 %14, 0
br label %16
16: ; preds = %13, %10
%17 = phi i1 [ false, %10 ], [ %15, %13 ]
br i1 %17, label %18, label %26
18: ; preds = %16
%19 = load i32, i32* %2
%20 = add nsw i32 %19, 1
store i32 %20, i32* %2
%21 = load i32, i32* %3
%22 = sub nsw i32 %21, 1
%23 = load i32, i32* %4
%24 = sub nsw i32 %23, 1
%25 = sub nsw i32 %22, %24
store i32 %25, i32* %3
br label %10
26: ; preds = %16
br label %27
27: ; preds = %26, %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
scalar_t__ SOCK_STREAM;
scalar_t__ net_socktype(int);
bool net_is_stream(int sock) { return net_socktype(sock) == SOCK_STREAM; }


x86 assembly (clang, -O0):
<net_is_stream>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <net_socktype@plt>
mov    0x2eb6(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<net_is_stream>:
push   %rax
call   1030 <net_socktype@plt>
mov    0x2ec3(%rip),%rdx
xor    %ecx,%ecx
cmp    (%rdx),%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SOCK_STREAM = global i64 0
define i32 @net_is_stream(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @net_socktype(i32 %3)
%5 = load i64, i64* @SOCK_STREAM
%6 = icmp eq i64 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
@SOCK_STREAM = global i64 0
define i32 @net_is_stream(i32 %0) {
%2 = tail call i64 @net_socktype(i32 %0)
%3 = load i64, i64* @SOCK_STREAM
%4 = icmp eq i64 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ perror(char *);
int write(int, void *, int);
int write_to_pipe(int pipefd, char *input, int nchar) {
  int nwritten;
  nwritten = write(pipefd, (void *)input, nchar);
  if (-1 == nwritten) {
    perror("unable to write to pipe");
  }
  return (nwritten);
}


x86 assembly (clang, -O0):
<write_to_pipe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <write@plt>
mov    %eax,-0x18(%rbp)
mov    $0xffffffff,%eax
cmp    -0x18(%rbp),%eax
jne    115e <write_to_pipe+0x3e>
lea    0xea7(%rip),%rdi
call   1040 <perror@plt>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_to_pipe>:
push   %rbx
call   1030 <write@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
je     1131 <write_to_pipe+0x11>
mov    %ebx,%eax
pop    %rbx
ret
lea    0xec8(%rip),%rdi
call   1040 <perror@plt>
jmp    112d <write_to_pipe+0xd>

LLVM IR (-O0):
@.str = [24 x i8] c"unable to write to pipe\00"
define i32 @write_to_pipe(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @write(i32 %8, i8* %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = icmp eq i32 -1, %12
br i1 %13, label %14, label %16
14: ; preds = %3
%15 = call i32 @perror(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %16
16: ; preds = %14, %3
%17 = load i32, i32* %7
ret i32 %17
}

LLVM IR (-O2):
@.str = [24 x i8] c"unable to write to pipe\00"
define i32 @write_to_pipe(i32 %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @write(i32 %0, i8* %1, i32 %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @perror(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret i32 %4
}
void wifi_rsp_hardware_io_port_read(
    const struct wifi_msg_hardware_io_port_read_rsp_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.wifi_msg_hardware_io_port_read_rsp_t = type opaque
define void @wifi_rsp_hardware_io_port_read(%struct.wifi_msg_hardware_io_port_read_rsp_t* nocapture %0) {
ret void
}
/* Variables and functions */
int SOCK_STREAM;
int _socket(int, int, int);
int /*<<< orphan*/ socket_set(int);
int socket(int domain, int type, int protocol) {
  int ret = _socket(domain, type, protocol);
  if ((type == SOCK_STREAM) && (ret != -1))
    socket_set(ret);
  return ret;
}


x86 assembly (clang, -O0):
<socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <_socket@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    0x2e94(%rip),%rcx
cmp    (%rcx),%eax
jne    1166 <socket+0x46>
cmpl   $0xffffffff,-0x10(%rbp)
je     1166 <socket+0x46>
mov    -0x10(%rbp),%edi
call   1040 <socket_set@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<socket>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
call   1030 <_socket@plt>
mov    %eax,%ebx
mov    0x2ead(%rip),%rax
cmp    %ebp,(%rax)
jne    1143 <socket+0x23>
cmp    $0xffffffff,%ebx
je     1143 <socket+0x23>
mov    %ebx,%edi
call   1040 <socket_set@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@SOCK_STREAM = global i32 0
define i32 @socket(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @_socket(i32 %8, i32 %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %5
%13 = load i32, i32* @SOCK_STREAM
%14 = icmp eq i32 %12, %13
br i1 %14, label %15, label %21
15: ; preds = %3
%16 = load i32, i32* %7
%17 = icmp ne i32 %16, -1
br i1 %17, label %18, label %21
18: ; preds = %15
%19 = load i32, i32* %7
%20 = call i32 @socket_set(i32 %19)
br label %21
21: ; preds = %18, %15, %3
%22 = load i32, i32* %7
ret i32 %22
}

LLVM IR (-O2):
@SOCK_STREAM = global i32 0
define i32 @socket(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @_socket(i32 %0, i32 %1, i32 %2)
%5 = load i32, i32* @SOCK_STREAM
%6 = icmp eq i32 %5, %1
%7 = icmp ne i32 %4, -1
%8 = select i1 %6, i1 %7, i1 false
br i1 %8, label %9, label %11
9: ; preds = %3
%10 = tail call i32 @socket_set(i32 %4)
br label %11
11: ; preds = %9, %3
ret i32 %4
}