xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
void prntWelcome(void) {
  system("clear");
  printf("\nBienvenido al cliente\n\n");
}


x86 assembly (clang, -O0):
<prntWelcome>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <system@plt>
lea    0xecf(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<prntWelcome>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <system@plt>
lea    0xed2(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"clear\00"
@.str.1 = [25 x i8] c"\0ABienvenido al cliente\0A\0A\00"
define void @prntWelcome() {
%1 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
@str = [24 x i8] c"\0ABienvenido al cliente\0A\00"
define void @prntWelcome() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int bnxt_check_zero_bytes(const uint8_t *bytes, int len) {
  int i;
  for (i = 0; i < len; i++)
    if (bytes[i] != 0x00)
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<bnxt_check_zero_bytes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    114f <bnxt_check_zero_bytes+0x4f>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     113c <bnxt_check_zero_bytes+0x3c>
movl   $0x0,-0x4(%rbp)
jmp    1156 <bnxt_check_zero_bytes+0x56>
jmp    1141 <bnxt_check_zero_bytes+0x41>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1112 <bnxt_check_zero_bytes+0x12>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bnxt_check_zero_bytes>:
mov    $0x1,%eax
test   %esi,%esi
jle    111f <bnxt_check_zero_bytes+0x1f>
mov    %esi,%ecx
xor    %edx,%edx
nopl   (%rax)
cmpl   $0x0,(%rdi,%rdx,4)
jne    1120 <bnxt_check_zero_bytes+0x20>
add    $0x1,%rdx
cmp    %rdx,%rcx
jne    1110 <bnxt_check_zero_bytes+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @bnxt_check_zero_bytes(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8
%7 = icmp eq i64 %13, %5
br i1 %7, label %14, label %8
8: ; preds = %4, %6
%9 = phi i64 [ 0, %4 ], [ %13, %6 ]
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = icmp eq i32 %11, 0
%13 = add nuw nsw i64 %9, 1
br i1 %12, label %6, label %14
14: ; preds = %8, %6, %2
%15 = phi i32 [ 1, %2 ], [ 1, %6 ], [ 0, %8 ]
ret i32 %15
}
/* Variables and functions */
size_t __ht_fold_hash(size_t hash, int M) {
  if (hash == ((size_t)-1)) {
    hash = ((size_t)-1) - ((size_t)1 << ((sizeof(size_t) * 8) - 1)) / 2;
  }
  hash &= ~((size_t)1 << ((sizeof(size_t) * 8) - 1));
  return (hash << ((sizeof(size_t) * 8) - M - 1)) | (hash >> M) |
         ((size_t)1 << ((sizeof(size_t) * 8) - 1));
}


x86 assembly (clang, -O0):
<__ht_fold_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0xffffffffffffffff,-0x8(%rbp)
jne    1124 <__ht_fold_hash+0x24>
movabs $0xbfffffffffffffff,%rax
ff ff bf
mov    %rax,-0x8(%rbp)
movabs $0x7fffffffffffffff,%rax
ff ff 7f
and    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rdx
mov    $0x40,%ecx
sub    %rdx,%rcx
sub    $0x1,%rcx
shl    %cl,%rax
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
shr    %cl,%rdx
mov    %rdx,%rcx
or     %rcx,%rax
movabs $0x8000000000000000,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ht_fold_hash>:
movabs $0x7fffffffffffffff,%rax
ff ff 7f
mov    %rdi,%rcx
and    %rax,%rcx
cmp    $0xffffffffffffffff,%rdi
movabs $0x3fffffffffffffff,%rdx
ff ff 3f
cmovne %rcx,%rdx
mov    $0x3f,%cl
sub    %sil,%cl
mov    %rdx,%rdi
shl    %cl,%rdi
mov    %esi,%ecx
shr    %cl,%rdx
or     %rdi,%rdx
add    $0x1,%rax
or     %rdx,%rax
ret

LLVM IR (-O0):
define i64 @__ht_fold_hash(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = icmp eq i64 %5, -1
br i1 %6, label %7, label %8
7: ; preds = %2
store i64 -4611686018427387905, i64* %3
br label %8
8: ; preds = %7, %2
%9 = load i64, i64* %3
%10 = and i64 %9, 9223372036854775807
store i64 %10, i64* %3
%11 = load i64, i64* %3
%12 = load i32, i32* %4
%13 = sext i32 %12 to i64
%14 = sub i64 64, %13
%15 = sub i64 %14, 1
%16 = shl i64 %11, %15
%17 = load i64, i64* %3
%18 = load i32, i32* %4
%19 = zext i32 %18 to i64
%20 = lshr i64 %17, %19
%21 = or i64 %16, %20
%22 = or i64 %21, -9223372036854775808
ret i64 %22
}

LLVM IR (-O2):
define i64 @__ht_fold_hash(i64 %0, i32 %1) {
%3 = icmp eq i64 %0, -1
%4 = and i64 %0, 9223372036854775807
%5 = select i1 %3, i64 4611686018427387903, i64 %4
%6 = sext i32 %1 to i64
%7 = sub nsw i64 63, %6
%8 = shl i64 %5, %7
%9 = zext i32 %1 to i64
%10 = lshr i64 %5, %9
%11 = or i64 %10, %8
%12 = or i64 %11, -9223372036854775808
ret i64 %12
}
/* Variables and functions */
scalar_t__ EINTR;
scalar_t__ errno;
int scanf(char const *, void *);
bool s_scanf(const char *format, void *loc) {
  while (scanf(format, loc) == -1) {
    if (errno == EINTR)
      continue;
    else
      return false;
  }
  return true;
}


x86 assembly (clang, -O0):
<s_scanf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <scanf@plt>
cmp    $0xffffffff,%eax
jne    1161 <s_scanf+0x51>
mov    0x2ea3(%rip),%rax
mov    (%rax),%rax
mov    0x2e91(%rip),%rcx
cmp    (%rcx),%rax
jne    1155 <s_scanf+0x45>
jmp    1120 <s_scanf+0x10>
movl   $0x0,-0x4(%rbp)
jmp    1168 <s_scanf+0x58>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s_scanf>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2ebb(%rip),%r15
mov    0x2eac(%rip),%r12
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <scanf@plt>
cmp    $0xffffffff,%eax
jne    114d <s_scanf+0x3d>
mov    (%r15),%rax
cmp    (%r12),%rax
je     1130 <s_scanf+0x20>
xor    %eax,%eax
jmp    1152 <s_scanf+0x42>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@errno = global i64 0
@EINTR = global i64 0
define i32 @s_scanf(i8* nocapture %0, i8* %1) {
br label %3
3: ; preds = %6, %2
%4 = tail call i32 @scanf(i8* %0, i8* %1)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = load i64, i64* @errno
%8 = load i64, i64* @EINTR
%9 = icmp eq i64 %7, %8
br i1 %9, label %3, label %10
10: ; preds = %3, %6
%11 = phi i32 [ 0, %6 ], [ 1, %3 ]
ret i32 %11
}
__attribute__((no, noclone)) signed __int128 t111_5sub(signed __int128 x) {
  signed __int128 r;
  if (__builtin_sub_overflow(x, (signed __int128)(-1), &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t111_5sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdx
mov    -0x28(%rbp),%rcx
add    $0x1,%rdx
adc    $0x0,%rcx
seto   %al
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x38(%rbp)
test   $0x1,%al
jne    1158 <t111_5sub+0x48>
jmp    115f <t111_5sub+0x4f>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t111_5sub>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
add    $0x1,%rbx
adc    $0x0,%r14
jno    112b <t111_5sub+0x1b>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %rbx,%rax
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t111_5sub(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = call { i128, i1 } @llvm.ssub.with.overflow.i128(i128 %11, i128 -1)
%13 = extractvalue { i128, i1 } %12, 1
%14 = extractvalue { i128, i1 } %12, 0
store i128 %14, i128* %6
br i1 %13, label %15, label %17
15: ; preds = %2
%16 = call i32 (...) @bar()
br label %17
17: ; preds = %15, %2
%18 = load i128, i128* %6
store i128 %18, i128* %3
%19 = bitcast i128* %3 to { i64, i64 }*
%20 = load { i64, i64 }, { i64, i64 }* %19
ret { i64, i64 } %20
}

LLVM IR (-O2):
define { i64, i64 } @t111_5sub(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = tail call { i128, i1 } @llvm.sadd.with.overflow.i128(i128 %6, i128 1)
%8 = extractvalue { i128, i1 } %7, 1
%9 = extractvalue { i128, i1 } %7, 0
br i1 %8, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i128 %9 to i64
%14 = lshr i128 %9, 64
%15 = trunc i128 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
void printStart() {
  system("CLS");
  system("COLOR A");
  printf("\n\tROBCO INDUSTRIES UNIFIED OPERATING SYSTEM\n\t  COPYRIGHT "
         "2075-2077 ROBCO INDUSTRIES\n\t\t\t-Server 1-\n");
  printf("\t__________________________________________\n");
}


x86 assembly (clang, -O0):
<printStart>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <system@plt>
lea    0xecd(%rip),%rdi
call   1030 <system@plt>
lea    0xec9(%rip),%rdi
call   1040 <printf@plt>
lea    0xf20(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printStart>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <system@plt>
lea    0xed0(%rip),%rdi
call   1040 <system@plt>
lea    0xecc(%rip),%rdi
call   1030 <puts@plt>
lea    0xf22(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"CLS\00"
@.str.1 = [8 x i8] c"COLOR A\00"
@.str.2 = [99 x i8] c"\0A\09ROBCO INDUSTRIES UNIFIED OPERATING SYSTEM\0A\09 COPYRIGHT 2075-2077 ROBCO INDUSTRIES\0A\09\09\09-Server 1-\0A\00"
@.str.3 = [45 x i8] c"\09__________________________________________\0A\00"
define void @printStart() {
%1 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @system(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([99 x i8], [99 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"CLS\00"
@.str.1 = [8 x i8] c"COLOR A\00"
@str = [98 x i8] c"\0A\09ROBCO INDUSTRIES UNIFIED OPERATING SYSTEM\0A\09 COPYRIGHT 2075-2077 ROBCO INDUSTRIES\0A\09\09\09-Server 1-\00"
@str.4 = [44 x i8] c"\09__________________________________________\00"
define void @printStart() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([98 x i8], [98 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.4, i64 0, i64 0))
ret void
}
double f4_cb_send_pre_double_double_int(double (*cb)(double, double, int)) {
  int r = 44;
  return cb(8.25, 9.25, r) + 1.0;
}


x86 assembly (clang, -O0):
<f4_cb_send_pre_double_double_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x2c,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%edi
movsd  0xee6(%rip),%xmm0
movsd  0xee6(%rip),%xmm1
call   *%rax
movsd  0xecc(%rip),%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4_cb_send_pre_double_double_int>:
push   %rax
mov    %rdi,%rax
movsd  0xef4(%rip),%xmm0
movsd  0xef4(%rip),%xmm1
mov    $0x2c,%edi
call   *%rax
addsd  0xeed(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @f4_cb_send_pre_double_double_int(double (double, double, i32)* %0) {
%2 = alloca double (double, double, i32)*
%3 = alloca i32
store double (double, double, i32)* %0, double (double, double, i32)** %2
store i32 44, i32* %3
%4 = load double (double, double, i32)*, double (double, double, i32)** %2
%5 = load i32, i32* %3
%6 = call double %4(double 8.250000e+00, double 9.250000e+00, i32 %5)
%7 = fadd double %6, 1.000000e+00
ret double %7
}

LLVM IR (-O2):
define double @f4_cb_send_pre_double_double_int(double (double, double, i32)* nocapture %0) {
%2 = tail call double %0(double 8.250000e+00, double 9.250000e+00, i32 44)
%3 = fadd double %2, 1.000000e+00
ret double %3
}
const char *n_basename(const char *path) {
  const char *current;
  for (current = path; *current; current++)
    if (('/' == *current) || ('\\' == *current))
      path = current + 1;
  return path;
}


x86 assembly (clang, -O0):
<n_basename>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1167 <n_basename+0x67>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x2f,%eax
cmp    %ecx,%eax
je     1145 <n_basename+0x45>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x5c,%eax
cmp    %ecx,%eax
jne    1151 <n_basename+0x51>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1156 <n_basename+0x56>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <n_basename+0x10>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<n_basename>:
mov    %rdi,%rax
lea    0x1(%rdi),%rcx
jmp    1117 <n_basename+0x17>
nopl   0x0(%rax)
mov    %rcx,%rax
add    $0x1,%rcx
movzbl -0x1(%rcx),%edx
cmp    $0x2f,%dl
je     1110 <n_basename+0x10>
cmp    $0x5c,%dl
je     1110 <n_basename+0x10>
test   %dl,%dl
jne    1113 <n_basename+0x13>
ret

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

LLVM IR (-O2):
define i8* @n_basename(i8* %0) {
br label %2
2: ; preds = %8, %1
%3 = phi i8* [ %0, %1 ], [ %9, %8 ]
%4 = phi i8* [ %0, %1 ], [ %10, %8 ]
%5 = load i8, i8* %4
switch i8 %5, label %8 [
i8 0, label %11
i8 47, label %6
i8 92, label %6
]
6: ; preds = %2, %2
%7 = getelementptr inbounds i8, i8* %4, i64 1
br label %8
8: ; preds = %2, %6
%9 = phi i8* [ %7, %6 ], [ %3, %2 ]
%10 = getelementptr inbounds i8, i8* %4, i64 1
br label %2
11: ; preds = %2
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
void __moddi3(int64_t a, int64_t b) {}


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

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

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

LLVM IR (-O2):
define void @__moddi3(i32 %0, i32 %1) {
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t cp_GetColor(uint8_t cp) {
  cp >>= 4;
  cp &= 1;
  return cp;
}


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

x86 assembly (clang, -O2):
<cp_GetColor>:
mov    %edi,%eax
shr    $0x4,%eax
and    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @cp_GetColor(i32 %0) {
%2 = lshr i32 %0, 4
%3 = and i32 %2, 1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ bzero(char *, int);
int read(int, char *, int);
int readMessage(char buffer[], int sockfd) {
  bzero(buffer, 256);
  return read(sockfd, buffer, 255);
}


x86 assembly (clang, -O0):
<readMessage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x100,%esi
call   1040 <bzero@plt>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    $0xff,%edx
call   1030 <read@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readMessage>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    $0x100,%esi
call   1040 <bzero@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0xff,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <read@plt>

LLVM IR (-O0):
define i32 @readMessage(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = call i32 @bzero(i8* %5, i32 256)
%7 = load i32, i32* %4
%8 = load i8*, i8** %3
%9 = call i32 @read(i32 %7, i8* %8, i32 255)
ret i32 %9
}

LLVM IR (-O2):
define i32 @readMessage(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @bzero(i8* %0, i32 256)
%4 = tail call i32 @read(i32 %1, i8* %0, i32 255)
ret i32 %4
}
/* Variables and functions */
size_t strlen(char const *);
scalar_t__ strncmp(char const *, char const *, size_t);
int str_starts_with(const char *str, const char *pre) {
  size_t lenpre = strlen(pre), lenstr = strlen(str);
  return lenstr < lenpre ? 0 : strncmp(pre, str, lenpre) == 0;
}


x86 assembly (clang, -O0):
<str_starts_with>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1162 <str_starts_with+0x42>
xor    %eax,%eax
mov    %eax,-0x24(%rbp)
jmp    1182 <str_starts_with+0x62>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_starts_with>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %rax,%rbx
mov    %r15,%rdi
call   1040 <strlen@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rbx,%rcx
jb     1161 <str_starts_with+0x41>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1030 <strncmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @str_starts_with(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %4
%8 = call i64 @strlen(i8* %7)
store i64 %8, i64* %5
%9 = load i8*, i8** %3
%10 = call i64 @strlen(i8* %9)
store i64 %10, i64* %6
%11 = load i64, i64* %6
%12 = load i64, i64* %5
%13 = icmp ult i64 %11, %12
br i1 %13, label %14, label %15
14: ; preds = %2
br label %22
15: ; preds = %2
%16 = load i8*, i8** %4
%17 = load i8*, i8** %3
%18 = load i64, i64* %5
%19 = call i64 @strncmp(i8* %16, i8* %17, i64 %18)
%20 = icmp eq i64 %19, 0
%21 = zext i1 %20 to i32
br label %22
22: ; preds = %15, %14
%23 = phi i32 [ 0, %14 ], [ %21, %15 ]
ret i32 %23
}

LLVM IR (-O2):
define i32 @str_starts_with(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%5 = icmp ult i64 %4, %3
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = tail call i64 @strncmp(i8* %1, i8* %0, i64 %3)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %2, %6
%11 = phi i32 [ %9, %6 ], [ 0, %2 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
main() {
  struct {
    signed int s : 3;
    unsigned int u : 3;
    int i : 3;
  } x = {-1, -1, -1};
  if (x.u != 7)
    abort();
  if (x.s != -1)
    abort();
  if (x.i != -1 && x.i != 7)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xecb(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%ax
shr    $0x3,%ax
and    $0x7,%ax
movzwl %ax,%eax
cmp    $0x7,%eax
je     1157 <main+0x37>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%ax
shl    $0xd,%ax
sar    $0xd,%ax
cwtl
cmp    $0xffffffff,%eax
je     1174 <main+0x54>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%ax
shl    $0x7,%ax
sar    $0xd,%ax
cwtl
cmp    $0xffffffff,%eax
je     11a7 <main+0x87>
mov    -0x8(%rbp),%ax
shl    $0x7,%ax
sar    $0xd,%ax
cwtl
cmp    $0x7,%eax
je     11a7 <main+0x87>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
%struct.anon = type { i16, [2 x i8] }
@__const.main.x = { i8, i8, [2 x i8] } { i8 -1, i8 1, [2 x i8] undef }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.anon
store i32 0, i32* %1
%3 = bitcast %struct.anon* %2 to i8*
%4 = bitcast %struct.anon* %2 to i16*
%5 = load i16, i16* %4
%6 = lshr i16 %5, 3
%7 = and i16 %6, 7
%8 = zext i16 %7 to i32
%9 = icmp ne i32 %8, 7
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = call i32 (...) @abort()
unreachable
12: ; preds = %0
%13 = bitcast %struct.anon* %2 to i16*
%14 = load i16, i16* %13
%15 = shl i16 %14, 13
%16 = ashr i16 %15, 13
%17 = sext i16 %16 to i32
%18 = icmp ne i32 %17, -1
br i1 %18, label %19, label %21
19: ; preds = %12
%20 = call i32 (...) @abort()
unreachable
21: ; preds = %12
%22 = bitcast %struct.anon* %2 to i16*
%23 = load i16, i16* %22
%24 = shl i16 %23, 7
%25 = ashr i16 %24, 13
%26 = sext i16 %25 to i32
%27 = icmp ne i32 %26, -1
br i1 %27, label %28, label %37
28: ; preds = %21
%29 = bitcast %struct.anon* %2 to i16*
%30 = load i16, i16* %29
%31 = shl i16 %30, 7
%32 = ashr i16 %31, 13
%33 = sext i16 %32 to i32
%34 = icmp ne i32 %33, 7
br i1 %34, label %35, label %37
35: ; preds = %28
%36 = call i32 (...) @abort()
unreachable
37: ; preds = %28, %21
%38 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ sqlite3_sleep(int);
int cb_busy(void *p, int cnt) {
  sqlite3_sleep(5);
  return 1;
}


x86 assembly (clang, -O0):
<cb_busy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x5,%edi
call   1030 <sqlite3_sleep@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cb_busy>:
push   %rax
mov    $0x5,%edi
call   1030 <sqlite3_sleep@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @cb_busy(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @sqlite3_sleep(i32 5)
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int fwrite(int *, int, int, int /*<<< orphan*/ *);
int putc(int c, FILE *stream) {
  int ret = fwrite(&c, 1, 1, stream);
  return (ret == 1) ? c : EOF;
}


x86 assembly (clang, -O0):
<putc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
lea    -0x4(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <fwrite@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jne    114b <putc+0x3b>
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    1157 <putc+0x47>
mov    0x2e96(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putc>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rcx
mov    %edi,0xc(%rsp)
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
call   1030 <fwrite@plt>
cmp    $0x1,%eax
je     113f <putc+0x2f>
mov    0x2ea9(%rip),%rbx
mov    (%rbx),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @putc(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
store i32 %0, i32* %3
store i32* %1, i32** %4
%6 = load i32*, i32** %4
%7 = call i32 @fwrite(i32* %3, i32 1, i32 1, i32* %6)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load i32, i32* %3
br label %14
12: ; preds = %2
%13 = load i32, i32* @EOF
br label %14
14: ; preds = %12, %10
%15 = phi i32 [ %11, %10 ], [ %13, %12 ]
ret i32 %15
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @putc(i32 %0, i32* nocapture %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @fwrite(i32* %3, i32 1, i32 1, i32* %1)
%5 = icmp eq i32 %4, 1
%6 = load i32, i32* %3
%7 = load i32, i32* @EOF
%8 = select i1 %5, i32 %6, i32 %7
ret i32 %8
}
int __stub_one() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @__stub_one() {
ret i32 1
}
int sum(int a, int b, int c, int d, int e, int f) {
  int total = a + b + c + d + e + f;
  return total;
}


x86 assembly (clang, -O0):
<sum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum>:
lea    (%rdi,%rsi,1),%eax
add    %edx,%eax
add    %ecx,%eax
add    %r8d,%eax
add    %r9d,%eax
ret

LLVM IR (-O0):
define i32 @sum(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%14 = load i32, i32* %7
%15 = load i32, i32* %8
%16 = add nsw i32 %14, %15
%17 = load i32, i32* %9
%18 = add nsw i32 %16, %17
%19 = load i32, i32* %10
%20 = add nsw i32 %18, %19
%21 = load i32, i32* %11
%22 = add nsw i32 %20, %21
%23 = load i32, i32* %12
%24 = add nsw i32 %22, %23
store i32 %24, i32* %13
%25 = load i32, i32* %13
ret i32 %25
}

LLVM IR (-O2):
define i32 @sum(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = add nsw i32 %1, %0
%8 = add nsw i32 %7, %2
%9 = add nsw i32 %8, %3
%10 = add nsw i32 %9, %4
%11 = add nsw i32 %10, %5
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ mysql_library_end();
void database_terminate() { mysql_library_end(); }


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

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

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

LLVM IR (-O2):
define void @database_terminate() {
%1 = tail call i32 (...) @mysql_library_end()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int life;
  while (1) {
    scanf("%d", &life);
    if (life == 42)
      return 0;
    printf("%d", life);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x2a,-0x8(%rbp)
jne    1151 <main+0x31>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret
mov    -0x8(%rbp),%esi
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
cmp    $0x2a,%esi
je     116c <main+0x4c>
lea    0xebb(%rip),%rbx
lea    0x4(%rsp),%r14
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
cmp    $0x2a,%esi
jne    1150 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 42
br i1 %5, label %6, label %7
6: ; preds = %7, %0
ret i32 0
7: ; preds = %0, %7
%8 = phi i32 [ %11, %7 ], [ %4, %0 ]
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%11 = load i32, i32* %1
%12 = icmp eq i32 %11, 42
br i1 %12, label %6, label %7
}
/* Variables and functions */
scalar_t__ __simplePNG_is_little_endian();
int /*<<< orphan*/ __simplePNG_swap(void *, size_t);
void __simplePNG_to_lendian(void *data, size_t size) {
  if (__simplePNG_is_little_endian())
    return;
  else
    __simplePNG_swap(data, size);
}


x86 assembly (clang, -O0):
<__simplePNG_to_lendian>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <__simplePNG_is_little_endian@plt>
cmp    $0x0,%rax
je     1146 <__simplePNG_to_lendian+0x26>
jmp    1153 <__simplePNG_to_lendian+0x33>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <__simplePNG_swap@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__simplePNG_to_lendian>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <__simplePNG_is_little_endian@plt>
test   %rax,%rax
je     113e <__simplePNG_to_lendian+0x1e>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <__simplePNG_swap@plt>

LLVM IR (-O0):
define void @__simplePNG_to_lendian(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = call i64 (...) @__simplePNG_is_little_endian()
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %2
br label %12
8: ; preds = %2
%9 = load i8*, i8** %3
%10 = load i64, i64* %4
%11 = call i32 @__simplePNG_swap(i8* %9, i64 %10)
br label %12
12: ; preds = %7, %8
ret void
}

LLVM IR (-O2):
define void @__simplePNG_to_lendian(i8* %0, i64 %1) {
%3 = tail call i64 (...) @__simplePNG_is_little_endian()
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @__simplePNG_swap(i8* %0, i64 %1)
br label %7
7: ; preds = %2, %5
ret void
}
/* Type definitions */
struct super_block {
  int dummy;
};
struct inode {
  int dummy;
};

/* Variables and functions */
struct inode *iget4_locked(struct super_block *, unsigned long, void *, void *);
struct inode *iget_locked(struct super_block *sb, unsigned long ino) {
  return iget4_locked(sb, ino, ((void *)0), ((void *)0));
}


x86 assembly (clang, -O0):
<iget_locked>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%ecx
mov    %rcx,%rdx
call   1030 <iget4_locked@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iget_locked>:
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <iget4_locked@plt>

LLVM IR (-O0):
%struct.inode = type { i32 }
%struct.super_block = type { i32 }
define %struct.inode* @iget_locked(%struct.super_block* %0, i64 %1) {
%3 = alloca %struct.super_block*
%4 = alloca i64
store %struct.super_block* %0, %struct.super_block** %3
store i64 %1, i64* %4
%5 = load %struct.super_block*, %struct.super_block** %3
%6 = load i64, i64* %4
%7 = call %struct.inode* @iget4_locked(%struct.super_block* %5, i64 %6, i8* null, i8* null)
ret %struct.inode* %7
}

LLVM IR (-O2):
%struct.inode = type { i32 }
%struct.super_block = type { i32 }
define %struct.inode* @iget_locked(%struct.super_block* %0, i64 %1) {
%3 = tail call %struct.inode* @iget4_locked(%struct.super_block* %0, i64 %1, i8* null, i8* null)
ret %struct.inode* %3
}
int xmlUCSIsEnclosedCJKLettersandMonths(int code) {
  return (((code >= 0x3200) && (code <= 0x32FF)));
}


x86 assembly (clang, -O0):
<xmlUCSIsEnclosedCJKLettersandMonths>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x3200,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsEnclosedCJKLettersandMonths+0x26>
cmpl   $0x32ff,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsEnclosedCJKLettersandMonths>:
and    $0xffffff00,%edi
xor    %eax,%eax
cmp    $0x3200,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @xmlUCSIsEnclosedCJKLettersandMonths(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 12800
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 13055
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @xmlUCSIsEnclosedCJKLettersandMonths(i32 %0) {
%2 = and i32 %0, -256
%3 = icmp eq i32 %2, 12800
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct buff {
  int dummy;
};

/* Variables and functions */
int btcmsg_craft_msgheader(struct buff **, char *, int /*<<< orphan*/ *);
int btcmsg_craft_verack(struct buff **bufOut) {
  return btcmsg_craft_msgheader(bufOut, "verack", NULL);
}


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

x86 assembly (clang, -O2):
<btcmsg_craft_verack>:
lea    0xee9(%rip),%rsi
xor    %edx,%edx
jmp    1030 <btcmsg_craft_msgheader@plt>

LLVM IR (-O0):
%struct.buff = type { i32 }
@.str = [7 x i8] c"verack\00"
define i32 @btcmsg_craft_verack(%struct.buff** %0) {
%2 = alloca %struct.buff**
store %struct.buff** %0, %struct.buff*** %2
%3 = load %struct.buff**, %struct.buff*** %2
%4 = call i32 @btcmsg_craft_msgheader(%struct.buff** %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* null)
ret i32 %4
}

LLVM IR (-O2):
%struct.buff = type { i32 }
@.str = [7 x i8] c"verack\00"
define i32 @btcmsg_craft_verack(%struct.buff** %0) {
%2 = tail call i32 @btcmsg_craft_msgheader(%struct.buff** %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* null)
ret i32 %2
}
double cross_2d(double *p0, double *p1) {
  return (p1[1] * p0[0] - p1[0] * p0[1]);
}


x86 assembly (clang, -O0):
<cross_2d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x8(%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<cross_2d>:
movsd  0x8(%rdi),%xmm1
mulsd  (%rsi),%xmm1
movsd  0x8(%rsi),%xmm0
mulsd  (%rdi),%xmm0
subsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @cross_2d(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %4
%6 = getelementptr inbounds double, double* %5, i64 1
%7 = load double, double* %6
%8 = load double*, double** %3
%9 = getelementptr inbounds double, double* %8, i64 0
%10 = load double, double* %9
%11 = load double*, double** %4
%12 = getelementptr inbounds double, double* %11, i64 0
%13 = load double, double* %12
%14 = load double*, double** %3
%15 = getelementptr inbounds double, double* %14, i64 1
%16 = load double, double* %15
%17 = fmul double %13, %16
%18 = fneg double %17
%19 = call double @llvm.fmuladd.f64(double %7, double %10, double %18)
ret double %19
}

LLVM IR (-O2):
define double @cross_2d(double* nocapture %0, double* nocapture %1) {
%3 = getelementptr inbounds double, double* %1, i64 1
%4 = load double, double* %3
%5 = load double, double* %0
%6 = load double, double* %1
%7 = getelementptr inbounds double, double* %0, i64 1
%8 = load double, double* %7
%9 = fneg double %6
%10 = fmul double %8, %9
%11 = tail call double @llvm.fmuladd.f64(double %4, double %5, double %10)
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ __require_allocated_array(char *);
char *strlwr(char *s) {
  __require_allocated_array(s);
  return s;
}


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

x86 assembly (clang, -O2):
<strlwr>:
push   %rbx
mov    %rdi,%rbx
call   1030 <__require_allocated_array@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @strlwr(i8* returned %0) {
%2 = tail call i32 @__require_allocated_array(i8* %0)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ e_plp();
void e_plp_accu() { e_plp(); }


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

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

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

LLVM IR (-O2):
define void @e_plp_accu() {
%1 = tail call i32 (...) @e_plp()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("User-Agent: Linux-DUC/"
         "abcdefg");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [30 x i8] c"User-Agent: Linux-DUC/abcdefg\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"User-Agent: Linux-DUC/abcdefg\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ lower(char *);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char random[15] = "HELLO World!";
  lower(random);
  printf("%s\n", random);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x13(%rbp)
mov    0xec8(%rip),%eax
mov    %eax,-0xb(%rbp)
mov    0xec2(%rip),%ax
mov    %ax,-0x7(%rbp)
mov    0xeba(%rip),%al
mov    %al,-0x5(%rbp)
lea    -0x13(%rbp),%rdi
call   1040 <lower@plt>
lea    -0x13(%rbp),%rsi
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movabs $0x21646c726f,%rax
mov    %rax,0x7(%rsp)
movabs $0x6f57204f4c4c4548,%rax
20 57 6f
mov    %rax,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <lower@plt>
lea    0xebb(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.random = [15 x i8] c"HELLO World!\00\00\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [15 x i8]
store i32 0, i32* %1
%3 = bitcast [15 x i8]* %2 to i8*
%4 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 0
%5 = call i32 @lower(i8* %4)
%6 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 0
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
ret i32 0
}

LLVM IR (-O2):
@__const.main.random = [15 x i8] c"HELLO World!\00\00\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [15 x i8]
%2 = getelementptr inbounds [15 x i8], [15 x i8]* %1, i64 0, i64 0
%3 = call i32 @lower(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
extern void outl(unsigned int value, unsigned short port) {
  __asm__ __volatile__("out"
                       "l"
                       " %"
                       "0,%"
                       "w"
                       "1"
                       :
                       : "a"(value), "Nd"(port));
}


x86 assembly (clang, -O0):
<outl>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %edi,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x6(%rbp),%dx
out    %eax,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outl>:
mov    %esi,%edx
mov    %edi,%eax
out    %eax,(%dx)
ret

LLVM IR (-O0):
define void @outl(i32 %0, i16 zeroext %1) {
%3 = alloca i32
%4 = alloca i16
store i32 %0, i32* %3
store i16 %1, i16* %4
%5 = load i32, i32* %3
%6 = load i16, i16* %4
ret void
}

LLVM IR (-O2):
define void @outl(i32 %0, i16 zeroext %1) {
tail call void asm sideeffect "outl $0,${1:w}", "{ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i32 %0, i16 %1)
ret void
}
/* Type definitions */
struct dnaSeq {
  int dummy;
};

/* Variables and functions */
struct dnaSeq *faReadAllSeq(char *, int /*<<< orphan*/);
struct dnaSeq *faReadAllPep(char *fileName) {
  return faReadAllSeq(fileName, 0);
}


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

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

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

LLVM IR (-O2):
%struct.dnaSeq = type { i32 }
define %struct.dnaSeq* @faReadAllPep(i8* %0) {
%2 = tail call %struct.dnaSeq* @faReadAllSeq(i8* %0, i32 0)
ret %struct.dnaSeq* %2
}