xunge/DecIR huggingface dataset:
int is_sorted(int *array, int size) {
  int i, flag;
  for (i = 0, flag = 1; i < size - 1; i++) {
    if (array[i] > array[i + 1]) {
      flag = 0;
      break;
    }
  }
  return flag;
}


x86 assembly (clang, -O0):
<is_sorted>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    116a <is_sorted+0x6a>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
cmp    (%rcx,%rdx,4),%eax
jle    1157 <is_sorted+0x57>
movl   $0x0,-0x14(%rbp)
jmp    116a <is_sorted+0x6a>
jmp    115c <is_sorted+0x5c>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1119 <is_sorted+0x19>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_sorted>:
add    $0xffffffff,%esi
xor    %eax,%eax
test   %esi,%esi
cmovle %eax,%esi
nopw   0x0(%rax,%rax,1)
cmp    %rax,%rsi
je     1128 <is_sorted+0x28>
mov    (%rdi,%rax,4),%ecx
lea    0x1(%rax),%rdx
cmp    0x4(%rdi,%rax,4),%ecx
mov    %rdx,%rax
jle    1110 <is_sorted+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @is_sorted(i32* nocapture %0, i32 %1) {
%3 = add i32 %1, -1
%4 = call i32 @llvm.smax.i32(i32 %3, i32 0)
%5 = zext i32 %4 to i64
br label %6
6: ; preds = %9, %2
%7 = phi i64 [ %12, %9 ], [ 0, %2 ]
%8 = icmp eq i64 %7, %5
br i1 %8, label %16, label %9
9: ; preds = %6
%10 = getelementptr inbounds i32, i32* %0, i64 %7
%11 = load i32, i32* %10
%12 = add nuw nsw i64 %7, 1
%13 = getelementptr inbounds i32, i32* %0, i64 %12
%14 = load i32, i32* %13
%15 = icmp sgt i32 %11, %14
br i1 %15, label %16, label %6
16: ; preds = %9, %6
%17 = phi i32 [ 1, %6 ], [ 0, %9 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ mmc_send_command(int, int /*<<< orphan*/);
int /*<<< orphan*/ regmask32(int, int, int);
void mmc_send_initialization_stream(void) {
  regmask32(0x48060000 + 0x12c, (1 << 1), (1 << 1));
  if (!mmc_send_command(0 << 24, 0))
    while (1)
      ;
  regmask32(0x48060000 + 0x12c, (1 << 1), (0 << 1));
  regmask32(0x48060000 + 0x230, 0x337f07ff, 0x337f07ff);
}


x86 assembly (clang, -O0):
<mmc_send_initialization_stream>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4806012c,%edi
mov    $0x2,%edx
mov    %edx,%esi
call   1030 <regmask32@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1040 <mmc_send_command@plt>
cmp    $0x0,%eax
jne    1151 <mmc_send_initialization_stream+0x31>
jmp    114c <mmc_send_initialization_stream+0x2c>
jmp    114c <mmc_send_initialization_stream+0x2c>
mov    $0x4806012c,%edi
mov    $0x2,%esi
xor    %edx,%edx
call   1030 <regmask32@plt>
mov    $0x48060230,%edi
mov    $0x337f07ff,%edx
mov    %edx,%esi
call   1030 <regmask32@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mmc_send_initialization_stream>:
push   %rax
mov    $0x4806012c,%edi
mov    $0x2,%esi
mov    $0x2,%edx
call   1030 <regmask32@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1040 <mmc_send_command@plt>
test   %eax,%eax
je     1170 <mmc_send_initialization_stream+0x50>
mov    $0x4806012c,%edi
mov    $0x2,%esi
xor    %edx,%edx
call   1030 <regmask32@plt>
mov    $0x48060230,%edi
mov    $0x337f07ff,%esi
mov    $0x337f07ff,%edx
pop    %rax
jmp    1030 <regmask32@plt>
nopl   0x0(%rax,%rax,1)
jmp    1170 <mmc_send_initialization_stream+0x50>

LLVM IR (-O0):
define void @mmc_send_initialization_stream() {
%1 = call i32 @regmask32(i32 1208353068, i32 2, i32 2)
%2 = call i32 @mmc_send_command(i32 0, i32 0)
%3 = icmp ne i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
br label %5
5: ; preds = %4, %5
br label %5
6: ; preds = %0
%7 = call i32 @regmask32(i32 1208353068, i32 2, i32 0)
%8 = call i32 @regmask32(i32 1208353328, i32 863963135, i32 863963135)
ret void
}

LLVM IR (-O2):
define void @mmc_send_initialization_stream() {
%1 = tail call i32 @regmask32(i32 1208353068, i32 2, i32 2)
%2 = tail call i32 @mmc_send_command(i32 0, i32 0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0, %4
br label %4
5: ; preds = %0
%6 = tail call i32 @regmask32(i32 1208353068, i32 2, i32 0)
%7 = tail call i32 @regmask32(i32 1208353328, i32 863963135, i32 863963135)
ret void
}
void BN_BLINDING_convert_ex(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_BLINDING_convert_ex() {
ret void
}
double sgn(const double a) { return (a >= 0 ? 1. : -1); }


x86 assembly (clang, -O0):
<sgn>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  0xeea(%rip),%xmm3
movsd  0xeea(%rip),%xmm2
xorps  %xmm0,%xmm0
cmplesd %xmm1,%xmm0
movaps %xmm0,%xmm1
andpd  %xmm3,%xmm1
andnpd %xmm2,%xmm0
orpd   %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sgn>:
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm1,%xmm0
setae  %al
lea    0xeec(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
ret

LLVM IR (-O0):
define double @sgn(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oge double %3, 0.000000e+00
%5 = zext i1 %4 to i64
%6 = select i1 %4, double 1.000000e+00, double -1.000000e+00
ret double %6
}

LLVM IR (-O2):
define double @sgn(double %0) {
%2 = fcmp oge double %0, 0.000000e+00
%3 = select i1 %2, double 1.000000e+00, double -1.000000e+00
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ TestPolyFit();
int /*<<< orphan*/ testLESolv1();
int /*<<< orphan*/ testLESolv2();
int /*<<< orphan*/ testLESolv3();
int /*<<< orphan*/ testLESolv4();
int /*<<< orphan*/ testOLS1();
int main(void) {
  testLESolv1();
  testLESolv2();
  testLESolv3();
  testLESolv4();
  testOLS1();
  TestPolyFit();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <testLESolv1@plt>
mov    $0x0,%al
call   1040 <testLESolv2@plt>
mov    $0x0,%al
call   1070 <testLESolv3@plt>
mov    $0x0,%al
call   1030 <testLESolv4@plt>
mov    $0x0,%al
call   1080 <testOLS1@plt>
mov    $0x0,%al
call   1050 <TestPolyFit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <testLESolv1@plt>
xor    %eax,%eax
call   1040 <testLESolv2@plt>
xor    %eax,%eax
call   1070 <testLESolv3@plt>
xor    %eax,%eax
call   1030 <testLESolv4@plt>
xor    %eax,%eax
call   1080 <testOLS1@plt>
xor    %eax,%eax
call   1050 <TestPolyFit@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @testLESolv1()
%3 = call i32 (...) @testLESolv2()
%4 = call i32 (...) @testLESolv3()
%5 = call i32 (...) @testLESolv4()
%6 = call i32 (...) @testOLS1()
%7 = call i32 (...) @TestPolyFit()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @testLESolv1()
%2 = tail call i32 (...) @testLESolv2()
%3 = tail call i32 (...) @testLESolv3()
%4 = tail call i32 (...) @testLESolv4()
%5 = tail call i32 (...) @testOLS1()
%6 = tail call i32 (...) @TestPolyFit()
ret i32 0
}
unsigned invert(unsigned x, int p, int n) {
  unsigned xmask = (~(~0 << n)) << (p - n + 1);
  return x ^ xmask;
}


x86 assembly (clang, -O0):
<invert>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
xor    $0xffffffff,%eax
mov    -0x8(%rbp),%ecx
sub    -0xc(%rbp),%ecx
add    $0x1,%ecx
shl    %cl,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<invert>:
mov    %edx,%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
not    %eax
sub    %edx,%esi
lea    0x1(%rsi),%ecx
shl    %cl,%eax
xor    %edi,%eax
ret

LLVM IR (-O0):
define i32 @invert(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* %6
%9 = shl i32 -1, %8
%10 = xor i32 %9, -1
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = sub nsw i32 %11, %12
%14 = add nsw i32 %13, 1
%15 = shl i32 %10, %14
store i32 %15, i32* %7
%16 = load i32, i32* %4
%17 = load i32, i32* %7
%18 = xor i32 %16, %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @invert(i32 %0, i32 %1, i32 %2) {
%4 = shl nsw i32 -1, %2
%5 = xor i32 %4, -1
%6 = add i32 %1, 1
%7 = sub i32 %6, %2
%8 = shl i32 %5, %7
%9 = xor i32 %8, %0
ret i32 %9
}
void XForceScreenSaver() {}


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

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

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

LLVM IR (-O2):
define void @XForceScreenSaver() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() { printf("Usage:  pc [= <addr>]\n"); }


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

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

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

LLVM IR (-O2):
@str = [22 x i8] c"Usage: pc [= <addr>]\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *strrchr(char *, char);
char *basename(char *path) {
  char *p;
  p = strrchr(path, '/');
  return p ? p + 1 : path;
}


x86 assembly (clang, -O0):
<basename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114a <basename+0x3a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1152 <basename+0x42>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basename>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @basename(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strrchr(i8* %4, i8 signext 47)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 1
br label %13
11: ; preds = %1
%12 = load i8*, i8** %2
br label %13
13: ; preds = %11, %8
%14 = phi i8* [ %10, %8 ], [ %12, %11 ]
ret i8* %14
}

LLVM IR (-O2):
define i8* @basename(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void sig_proc(int signo) { printf("catch the signal %d\n", signo); }


x86 assembly (clang, -O0):
<sig_proc>:
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_proc>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [21 x i8] c"catch the signal %d\0A\00"
define void @sig_proc(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
size_t strlen(char *);
char tolower(char);
void alock_string2lower(char *string) {
  const size_t s = strlen(string);
  size_t i;
  for (i = 0; i < s; i++)
    string[i] = tolower(string[i]);
}


x86 assembly (clang, -O0):
<alock_string2lower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    117e <alock_string2lower+0x5e>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <tolower@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1141 <alock_string2lower+0x21>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alock_string2lower>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
call   1030 <strlen@plt>
test   %rax,%rax
je     1157 <alock_string2lower+0x37>
mov    %rax,%r14
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%edi
call   1040 <tolower@plt>
mov    %al,(%r15,%rbx,1)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1140 <alock_string2lower+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @alock_string2lower(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %9, %4 ], [ 0, %1 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = tail call signext i8 @tolower(i8 signext %7)
store i8 %8, i8* %6
%9 = add nuw i64 %5, 1
%10 = icmp eq i64 %9, %2
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
void swap(char *org, char *dest) {
  char temp = *org;
  *org = *dest;
  *dest = temp;
}


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

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

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

LLVM IR (-O2):
define void @swap(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
store i8 %4, i8* %0
store i8 %3, i8* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
char *getprogname();
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(stderr, "usage: %s [-m] [inputfile] headername > encodedfile\n",
                getprogname());
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getprogname@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rdx
lea    0xea8(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2ea8(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1030 <getprogname@plt>
lea    0xeb8(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [53 x i8] c"usage: %s [-m] [inputfile] headername > encodedfile\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i8* (...) @getprogname()
%3 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [53 x i8] c"usage: %s [-m] [inputfile] headername > encodedfile\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i8* (...) @getprogname()
%3 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
scalar_t__ bar(int);
scalar_t__ foo(int);
int main() {
  int r = 0;
  r += foo(r);
  r += 1;
  r += bar(r);
  r += 2;
  return r;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <foo@plt>
mov    %rax,%rcx
movslq -0x8(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <bar@plt>
mov    %rax,%rcx
movslq -0x8(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
call   1040 <foo@plt>
mov    %rax,%rbx
lea    0x1(%rax),%edi
call   1030 <bar@plt>
add    %ebx,%eax
add    $0x3,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @foo(i32 %3)
%5 = load i32, i32* %2
%6 = sext i32 %5 to i64
%7 = add nsw i64 %6, %4
%8 = trunc i64 %7 to i32
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 1
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = call i64 @bar(i32 %11)
%13 = load i32, i32* %2
%14 = sext i32 %13 to i64
%15 = add nsw i64 %14, %12
%16 = trunc i64 %15 to i32
store i32 %16, i32* %2
%17 = load i32, i32* %2
%18 = add nsw i32 %17, 2
store i32 %18, i32* %2
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @foo(i32 0)
%2 = trunc i64 %1 to i32
%3 = add nsw i32 %2, 1
%4 = tail call i64 @bar(i32 %3)
%5 = trunc i64 %4 to i32
%6 = add i32 %5, 2
%7 = add i32 %6, %3
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void Usage(void) {
  fprintf(stderr,
          "Usage: 'eitsecactualtoanother inputeit.sec > outputeit.sec \n");
}


x86 assembly (clang, -O0):
<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):
<Usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [61 x i8] c"Usage: 'eitsecactualtoanother inputeit.sec > outputeit.sec \0A\00"
define void @Usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [61 x i8] c"Usage: 'eitsecactualtoanother inputeit.sec > outputeit.sec \0A\00"
define void @Usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glmExp3f(float *, float *);
void glmExp3f_(float x[3]) { glmExp3f(x, x); }


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

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

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

LLVM IR (-O2):
define void @glmExp3f_(float* %0) {
%2 = tail call i32 @glmExp3f(float* %0, float* %0)
ret void
}
int op_lt(int a, int b) { return (a < b); }


x86 assembly (clang, -O0):
<op_lt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_lt>:
xor    %eax,%eax
cmp    %esi,%edi
setl   %al
ret

LLVM IR (-O0):
define i32 @op_lt(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp slt i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @op_lt(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
char *strncpy(char *, char *, int);
char *xstrncpy(char *des, char *src, int size) {
  des[size - 1] = 0;
  return strncpy(des, src, size - 1);
}


x86 assembly (clang, -O0):
<xstrncpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1030 <strncpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrncpy>:
movslq %edx,%rdx
movb   $0x0,-0x1(%rdi,%rdx,1)
add    $0xffffffffffffffff,%rdx
jmp    1030 <strncpy@plt>

LLVM IR (-O0):
define i8* @xstrncpy(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %6
%9 = sub nsw i32 %8, 1
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %7, i64 %10
store i8 0, i8* %11
%12 = load i8*, i8** %4
%13 = load i8*, i8** %5
%14 = load i32, i32* %6
%15 = sub nsw i32 %14, 1
%16 = call i8* @strncpy(i8* %12, i8* %13, i32 %15)
ret i8* %16
}

LLVM IR (-O2):
define i8* @xstrncpy(i8* %0, i8* %1, i32 %2) {
%4 = add nsw i32 %2, -1
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
store i8 0, i8* %6
%7 = tail call i8* @strncpy(i8* %0, i8* %1, i32 %4)
ret i8* %7
}
int pathconN_nm9_work(int *sz_arg, int *sz_res, int *sz_iw, int *sz_w) {
  if (sz_arg)
    *sz_arg = 1;
  if (sz_res)
    *sz_res = 2;
  if (sz_iw)
    *sz_iw = 0;
  if (sz_w)
    *sz_w = 0;
  return 0;
}


x86 assembly (clang, -O0):
<pathconN_nm9_work>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1129 <pathconN_nm9_work+0x29>
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
cmpq   $0x0,-0x10(%rbp)
je     113e <pathconN_nm9_work+0x3e>
mov    -0x10(%rbp),%rax
movl   $0x2,(%rax)
cmpq   $0x0,-0x18(%rbp)
je     1153 <pathconN_nm9_work+0x53>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
cmpq   $0x0,-0x20(%rbp)
je     1168 <pathconN_nm9_work+0x68>
mov    -0x20(%rbp),%rax
movl   $0x0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathconN_nm9_work>:
test   %rdi,%rdi
je     110b <pathconN_nm9_work+0xb>
movl   $0x1,(%rdi)
test   %rsi,%rsi
je     1116 <pathconN_nm9_work+0x16>
movl   $0x2,(%rsi)
test   %rdx,%rdx
je     1121 <pathconN_nm9_work+0x21>
movl   $0x0,(%rdx)
test   %rcx,%rcx
je     112c <pathconN_nm9_work+0x2c>
movl   $0x0,(%rcx)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @pathconN_nm9_work(i32* writeonly %0, i32* writeonly %1, i32* writeonly %2, i32* writeonly %3) {
%5 = icmp eq i32* %0, null
br i1 %5, label %7, label %6
6: ; preds = %4
store i32 1, i32* %0
br label %7
7: ; preds = %6, %4
%8 = icmp eq i32* %1, null
br i1 %8, label %10, label %9
9: ; preds = %7
store i32 2, i32* %1
br label %10
10: ; preds = %9, %7
%11 = icmp eq i32* %2, null
br i1 %11, label %13, label %12
12: ; preds = %10
store i32 0, i32* %2
br label %13
13: ; preds = %12, %10
%14 = icmp eq i32* %3, null
br i1 %14, label %16, label %15
15: ; preds = %13
store i32 0, i32* %3
br label %16
16: ; preds = %15, %13
ret i32 0
}
void RTSha256FromString(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSha256FromString() {
ret void
}
/* Type definitions */
typedef int uint32_t;
typedef scalar_t__ time_t;
typedef int /*<<< orphan*/ out_msg;

/* Variables and functions */
scalar_t__ _xmit(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ snprintf(char *, int, char *, int, long);
scalar_t__ time(int /*<<< orphan*/ *);
void _job_requeue(long my_job_id) {
  time_t now = time(NULL);
  char out_msg[128];
  snprintf(out_msg, sizeof(out_msg),
           "TS=%u AUTH=root DT=CMD=REQUEUEJOB ARG=%ld", (uint32_t)now,
           my_job_id);
  if (_xmit(out_msg))
    exit(1);
}


x86 assembly (clang, -O0):
<_job_requeue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %rax,-0x10(%rbp)
lea    -0x90(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    %eax,%ecx
mov    -0x8(%rbp),%r8
mov    $0x80,%esi
lea    0xe87(%rip),%rdx
call   1030 <snprintf@plt>
lea    -0x90(%rbp),%rdi
call   1040 <_xmit@plt>
cmp    $0x0,%rax
je     119e <_job_requeue+0x5e>
mov    $0x1,%edi
call   1060 <exit@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_job_requeue>:
push   %r14
push   %rbx
sub    $0x88,%rsp
mov    %rdi,%rbx
xor    %edi,%edi
call   1050 <time@plt>
lea    0xea5(%rip),%rdx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x80,%esi
mov    %eax,%ecx
mov    %rbx,%r8
call   1030 <snprintf@plt>
mov    %r14,%rdi
call   1040 <_xmit@plt>
test   %rax,%rax
jne    1188 <_job_requeue+0x48>
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"TS=%u AUTH=root DT=CMD=REQUEUEJOB ARG=%ld\00"
define void @_job_requeue(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca [128 x i8]
store i64 %0, i64* %2
%5 = call i64 @time(i32* null)
store i64 %5, i64* %3
%6 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%7 = load i64, i64* %3
%8 = trunc i64 %7 to i32
%9 = load i64, i64* %2
%10 = call i32 @snprintf(i8* %6, i32 128, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %8, i64 %9)
%11 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%12 = call i64 @_xmit(i8* %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %1
%15 = call i32 @exit(i32 1)
unreachable
16: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"TS=%u AUTH=root DT=CMD=REQUEUEJOB ARG=%ld\00"
define void @_job_requeue(i64 %0) {
%2 = alloca [128 x i8]
%3 = tail call i64 @time(i32* null)
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%5 = trunc i64 %3 to i32
%6 = call i32 @snprintf(i8* %4, i32 128, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %5, i64 %0)
%7 = call i64 @_xmit(i8* %4)
%8 = icmp eq i64 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %1
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %1
ret void
}
/* Variables and functions */
unsigned char __VERIFIER_nondet_U8();
int calibrate(void) {
  unsigned char tmp;
  {
    tmp = __VERIFIER_nondet_U8();
    return (tmp);
  }
}


x86 assembly (clang, -O0):
<calibrate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_U8@plt>
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calibrate>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_U8@plt>
movzbl %al,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @calibrate() {
%1 = alloca i8
%2 = call zeroext i8 (...) @__VERIFIER_nondet_U8()
store i8 %2, i8* %1
%3 = load i8, i8* %1
%4 = zext i8 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @calibrate() {
%1 = tail call zeroext i8 (...) @__VERIFIER_nondet_U8()
%2 = zext i8 %1 to i32
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void helpAndLeave(const char *progname, int status) {
  fprintf(stderr, "Usage: %s <file> <newfile>\n", progname);
  exit(status);
}


x86 assembly (clang, -O0):
<helpAndLeave>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xebd(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<helpAndLeave>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rdx
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [28 x i8] c"Usage: %s <file> <newfile>\0A\00"
define void @helpAndLeave(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32, i32* %4
%9 = call i32 @exit(i32 %8)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [28 x i8] c"Usage: %s <file> <newfile>\0A\00"
define void @helpAndLeave(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = tail call i32 @exit(i32 %1)
unreachable
}
/* Type definitions */
struct client {
  int dummy;
};

/* Variables and functions */
struct client *get_client(int);
struct client *protocol_basic_newclient(int fd) {
  return get_client(fd);
}


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

x86 assembly (clang, -O2):
<protocol_basic_newclient>:
jmp    1030 <get_client@plt>

LLVM IR (-O0):
%struct.client = type { i32 }
define %struct.client* @protocol_basic_newclient(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call %struct.client* @get_client(i32 %3)
ret %struct.client* %4
}

LLVM IR (-O2):
%struct.client = type { i32 }
define %struct.client* @protocol_basic_newclient(i32 %0) {
%2 = tail call %struct.client* @get_client(i32 %0)
ret %struct.client* %2
}
int BGBDT_MsImaAdpcm_StereoBlockSizeFromSamples(int len) {
  return (8 + ((len + 7) / 8) * 8);
}


x86 assembly (clang, -O0):
<BGBDT_MsImaAdpcm_StereoBlockSizeFromSamples>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x7,%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
shl    $0x3,%eax
add    $0x8,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BGBDT_MsImaAdpcm_StereoBlockSizeFromSamples>:
lea    0x7(%rdi),%ecx
lea    0xe(%rdi),%eax
test   %ecx,%ecx
cmovns %ecx,%eax
and    $0xfffffff8,%eax
add    $0x8,%eax
ret

LLVM IR (-O0):
define i32 @BGBDT_MsImaAdpcm_StereoBlockSizeFromSamples(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 7
%5 = sdiv i32 %4, 8
%6 = mul nsw i32 %5, 8
%7 = add nsw i32 8, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @BGBDT_MsImaAdpcm_StereoBlockSizeFromSamples(i32 %0) {
%2 = add nsw i32 %0, 7
%3 = sdiv i32 %2, 8
%4 = shl nsw i32 %3, 3
%5 = add nsw i32 %4, 8
ret i32 %5
}
void __attribute__((
    __warning__("curl_easy_setopt expects a FILE* argument for this option")))
__attribute__((__unused__)) __attribute__((__no__))
_curl_easy_setopt_err_FILE(void) {
  __asm__("");
}


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

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

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

LLVM IR (-O2):
define void @_curl_easy_setopt_err_FILE() {
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef scalar_t__ uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int set_reg16(uint32_t base, uint8_t reg, uint16_t value) {
  if (base == 0)
    return -1;
  *(uint16_t *)(base + reg) = value;
  return 0;
}


x86 assembly (clang, -O0):
<set_reg16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1126 <set_reg16+0x26>
movl   $0xffffffff,-0x4(%rbp)
jmp    113a <set_reg16+0x3a>
mov    -0x1c(%rbp),%ecx
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_reg16>:
test   %rdi,%rdi
je     110b <set_reg16+0xb>
mov    %edx,(%rsi,%rdi,1)
xor    %eax,%eax
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @set_reg16(i64 %0, i64 %1, i32 %2) {
%4 = icmp eq i64 %0, 0
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = add nsw i64 %1, %0
%7 = inttoptr i64 %6 to i32*
store i32 %2, i32* %7
br label %8
8: ; preds = %3, %5
%9 = phi i32 [ 0, %5 ], [ -1, %3 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ quit();
void die(void) {
  quit();
  exit(1);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <quit@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
xor    %eax,%eax
call   1030 <quit@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @die() {
%1 = call i32 (...) @quit()
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @die() {
%1 = tail call i32 (...) @quit()
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
void console_silence_non_nlip(bool silent) {}


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

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

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

LLVM IR (-O2):
define void @console_silence_non_nlip(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int __VERIFIER_nondet_int();
int sum(int);
int main() {
  int n = __VERIFIER_nondet_int();
  int s = sum(n);
  __VERIFIER_assert(s >= 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <sum@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <__VERIFIER_assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,%edi
call   1030 <sum@plt>
not    %eax
shr    $0x1f,%eax
mov    %eax,%edi
call   1050 <__VERIFIER_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @sum(i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = icmp sge i32 %7, 0
%9 = zext i1 %8 to i32
%10 = call i32 @__VERIFIER_assert(i32 %9)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 @sum(i32 %1)
%3 = xor i32 %2, -1
%4 = lshr i32 %3, 31
%5 = tail call i32 @__VERIFIER_assert(i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
void *list() {
  while (1) {
    printf("Hello\n");
    sleep(1);
  }
}


x86 assembly (clang, -O0):
<list>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <list+0x9>
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1129 <list+0x9>

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

LLVM IR (-O0):
@.str = [7 x i8] c"Hello\0A\00"
define i8* @list() {
br label %1
1: ; preds = %0, %1
%2 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @sleep(i32 1)
br label %1
}

LLVM IR (-O2):
@str = [6 x i8] c"Hello\00"
define noalias i8* @list() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @sleep(i32 1)
br label %1
}
/* Variables and functions */
int f(int);
main() {
  void abort();
  if (f(0) != 0)
    abort();
  if (f(1) != 1)
    abort();
  if (f(2) != 1)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1040 <f@plt>
cmp    $0x0,%eax
je     1144 <main+0x24>
call   1030 <abort@plt>
mov    $0x1,%edi
call   1040 <f@plt>
cmp    $0x1,%eax
je     115c <main+0x3c>
call   1030 <abort@plt>
mov    $0x2,%edi
call   1040 <f@plt>
cmp    $0x1,%eax
je     1174 <main+0x54>
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1040 <f@plt>
test   %eax,%eax
jne    114e <main+0x2e>
mov    $0x1,%edi
call   1040 <f@plt>
cmp    $0x1,%eax
jne    114e <main+0x2e>
mov    $0x2,%edi
call   1040 <f@plt>
cmp    $0x1,%eax
jne    114e <main+0x2e>
xor    %eax,%eax
pop    %rcx
ret
call   1030 <abort@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 0)
%2 = icmp eq i32 %1, 0
br i1 %2, label %4, label %3
3: ; preds = %0
tail call void @abort()
unreachable
4: ; preds = %0
%5 = tail call i32 @f(i32 1)
%6 = icmp eq i32 %5, 1
br i1 %6, label %8, label %7
7: ; preds = %4
tail call void @abort()
unreachable
8: ; preds = %4
%9 = tail call i32 @f(i32 2)
%10 = icmp eq i32 %9, 1
br i1 %10, label %12, label %11
11: ; preds = %8
tail call void @abort()
unreachable
12: ; preds = %8
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ srand(unsigned int);
scalar_t__ time(int /*<<< orphan*/ *);
void initialize_rng(void) { srand((unsigned)time(NULL)); }


x86 assembly (clang, -O0):
<initialize_rng>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @initialize_rng() {
%1 = call i64 @time(i32* null)
%2 = trunc i64 %1 to i32
%3 = call i32 @srand(i32 %2)
ret void
}

LLVM IR (-O2):
define void @initialize_rng() {
%1 = tail call i64 @time(i32* null)
%2 = trunc i64 %1 to i32
%3 = tail call i32 @srand(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int add(int a, int b) {
  printf("a = %d, b = %d\n", a, b);
  return a + b;
}


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

x86 assembly (clang, -O2):
<add>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xee2(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
add    %ebp,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [16 x i8] c"a = %d, b = %d\0A\00"
define i32 @add(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
%4 = add nsw i32 %1, %0
ret i32 %4
}
int _fstat(int file, struct stat *st) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.stat = type opaque
define i32 @_fstat(i32 %0, %struct.stat* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int check_pw(char *guess) {
  char pw[] = "letmein";
  return (0 == strcmp(pw, guess));
}


x86 assembly (clang, -O0):
<check_pw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0xedd(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_pw>:
push   %rax
mov    %rdi,%rsi
movabs $0x6e69656d74656c,%rax
mov    %rax,(%rsp)
mov    %rsp,%rdi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.check_pw.pw = [8 x i8] c"letmein\00"
define i32 @check_pw(i8* %0) {
%2 = alloca i8*
%3 = alloca [8 x i8]
store i8* %0, i8** %2
%4 = bitcast [8 x i8]* %3 to i8*
%5 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 0
%6 = load i8*, i8** %2
%7 = call i64 @strcmp(i8* %5, i8* %6)
%8 = icmp eq i64 0, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @check_pw(i8* %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
store i64 31078131787130220, i64* %2
%4 = call i64 @strcmp(i8* %3, i8* %0)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
int test_imm_5Cint64_lowword_mem(long long *val) {
  return ((*val) & (0x5C << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_5Cint64_lowword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
and    $0x5c,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_5Cint64_lowword_mem>:
testb  $0x5c,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_5Cint64_lowword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = and i64 %4, 92
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_5Cint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 92
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void elink_reset() {
  static int x = 0;
  if (x == 0) {
    x = 1;
    outb(0x110, 0xc0);
  }
}


x86 assembly (clang, -O0):
<elink_reset>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f11(%rip)
jne    113a <elink_reset+0x2a>
movl   $0x1,0x2f01(%rip)
mov    $0x110,%edi
mov    $0xc0,%esi
call   1030 <outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<elink_reset>:
cmpb   $0x0,0x2f15(%rip)
je     111a <elink_reset+0xa>
ret
movb   $0x1,0x2f0b(%rip)
mov    $0x110,%edi
mov    $0xc0,%esi
jmp    1030 <outb@plt>

LLVM IR (-O0):
@elink_reset.x = internal global i32 0
define void @elink_reset() {
%1 = load i32, i32* @elink_reset.x
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
store i32 1, i32* @elink_reset.x
%4 = call i32 @outb(i32 272, i32 192)
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
@elink_reset.x = internal unnamed_addr global i1 false
define void @elink_reset() {
%1 = load i1, i1* @elink_reset.x
br i1 %1, label %4, label %2
2: ; preds = %0
store i1 true, i1* @elink_reset.x
%3 = tail call i32 @outb(i32 272, i32 192)
br label %4
4: ; preds = %2, %0
ret void
}