xunge/DecIR huggingface dataset:
void _infix_operator_minus_float_float(float lhs, float rhs, float *__rval_1) {
  *__rval_1 = lhs - rhs;
}


x86 assembly (clang, -O0):
<_infix_operator_minus_float_float>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_infix_operator_minus_float_float>:
subss  %xmm1,%xmm0
movss  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @_infix_operator_minus_float_float(float %0, float %1, float* %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float*
store float %0, float* %4
store float %1, float* %5
store float* %2, float** %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = fsub float %7, %8
%10 = load float*, float** %6
store float %9, float* %10
ret void
}

LLVM IR (-O2):
define void @_infix_operator_minus_float_float(float %0, float %1, float* nocapture writeonly %2) {
%4 = fsub float %0, %1
store float %4, float* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int freetable(char **table, int size) {
  while (size--)
    free(table[size]);
  return 0;
}


x86 assembly (clang, -O0):
<freetable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     1149 <freetable+0x39>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
jmp    111f <freetable+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freetable>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
je     1142 <freetable+0x32>
mov    %esi,%r15d
movslq %esi,%rax
lea    (%rdi,%rax,8),%r14
add    $0xfffffffffffffff8,%r14
neg    %r15d
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0xffffffffffffffff,%rbx
cmp    %ebx,%r15d
jne    1130 <freetable+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @freetable(i8** nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %14, label %4
4: ; preds = %2
%5 = sext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ %5, %4 ], [ %8, %6 ]
%8 = add nsw i64 %7, -1
%9 = getelementptr inbounds i8*, i8** %0, i64 %8
%10 = load i8*, i8** %9
%11 = tail call i32 @free(i8* %10)
%12 = trunc i64 %8 to i32
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %6
14: ; preds = %6, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assessUniverse();
int /*<<< orphan*/ parseCommandLine(int, char **);
int /*<<< orphan*/ printOptions();
int /*<<< orphan*/ readFiles();
int /*<<< orphan*/ writeData();
int main(int argc, char *argv[]) {
  parseCommandLine(argc, argv);
  printOptions();
  assessUniverse();
  readFiles();
  writeData();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <parseCommandLine@plt>
mov    $0x0,%al
call   1060 <printOptions@plt>
mov    $0x0,%al
call   1050 <assessUniverse@plt>
mov    $0x0,%al
call   1040 <readFiles@plt>
mov    $0x0,%al
call   1070 <writeData@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <parseCommandLine@plt>
xor    %eax,%eax
call   1060 <printOptions@plt>
xor    %eax,%eax
call   1050 <assessUniverse@plt>
xor    %eax,%eax
call   1040 <readFiles@plt>
xor    %eax,%eax
call   1070 <writeData@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @parseCommandLine(i32 %6, i8** %7)
%9 = call i32 (...) @printOptions()
%10 = call i32 (...) @assessUniverse()
%11 = call i32 (...) @readFiles()
%12 = call i32 (...) @writeData()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @parseCommandLine(i32 %0, i8** %1)
%4 = tail call i32 (...) @printOptions()
%5 = tail call i32 (...) @assessUniverse()
%6 = tail call i32 (...) @readFiles()
%7 = tail call i32 (...) @writeData()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ in_addr_t;

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int inet_pton(int /*<<< orphan*/, char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ msg_Err(char *);
in_addr_t check_ip(char *pIp) {
  in_addr_t ip;
  if (inet_pton(AF_INET, pIp, &ip) < 1) {
    msg_Err("Incorrect client IP provided, using 127.0.0.1");
    inet_pton(AF_INET, "127.0.0.1", &ip);
  }
  return ip;
}


x86 assembly (clang, -O0):
<check_ip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <inet_pton@plt>
cmp    $0x1,%eax
jge    1170 <check_ip+0x50>
lea    0xeae(%rip),%rdi
call   1030 <msg_Err@plt>
mov    0x2e8a(%rip),%rax
mov    (%rax),%edi
lea    0xebd(%rip),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <inet_pton@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_ip>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rsi
mov    0x2eb9(%rip),%rbx
mov    (%rbx),%edi
lea    0xc(%rsp),%rdx
call   1040 <inet_pton@plt>
test   %eax,%eax
jg     115e <check_ip+0x3e>
lea    0xeba(%rip),%rdi
call   1030 <msg_Err@plt>
mov    (%rbx),%edi
lea    0xed0(%rip),%rsi
lea    0xc(%rsp),%rdx
call   1040 <inet_pton@plt>
mov    0xc(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@AF_INET = global i32 0
@.str = [46 x i8] c"Incorrect client IP provided, using 127.0.0.1\00"
@.str.1 = [10 x i8] c"127.0.0.1\00"
define i32 @check_ip(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i32, i32* @AF_INET
%5 = load i8*, i8** %2
%6 = call i32 @inet_pton(i32 %4, i8* %5, i32* %3)
%7 = icmp slt i32 %6, 1
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = call i32 @msg_Err(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%10 = load i32, i32* @AF_INET
%11 = call i32 @inet_pton(i32 %10, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32* %3)
br label %12
12: ; preds = %8, %1
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
@AF_INET = global i32 0
@.str = [46 x i8] c"Incorrect client IP provided, using 127.0.0.1\00"
@.str.1 = [10 x i8] c"127.0.0.1\00"
define i32 @check_ip(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* @AF_INET
%5 = call i32 @inet_pton(i32 %4, i8* %0, i32* %2)
%6 = icmp slt i32 %5, 1
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = call i32 @msg_Err(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* @AF_INET
%10 = call i32 @inet_pton(i32 %9, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32* %2)
br label %11
11: ; preds = %7, %1
%12 = load i32, i32* %2
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ __be16_to_cpu(int /*<<< orphan*/ const);
uint16_t get16_be(const uint16_t *p) { return __be16_to_cpu(*p); }


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

x86 assembly (clang, -O2):
<get16_be>:
mov    (%rdi),%edi
jmp    1030 <__be16_to_cpu@plt>

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

LLVM IR (-O2):
define i32 @get16_be(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @__be16_to_cpu(i32 %2)
ret i32 %3
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void USBDMAChannelAddressSet(uint32_t ui32Base, uint32_t ui32Channel,
                             void *pvAddress) {
  ;
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000208 + (0x10 * ui32Channel)))) =
      (uint32_t)pvAddress;
}


x86 assembly (clang, -O0):
<USBDMAChannelAddressSet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,%ecx
mov    -0x4(%rbp),%eax
add    $0x208,%eax
mov    -0x8(%rbp),%edx
shl    $0x4,%edx
add    %edx,%eax
cltq
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBDMAChannelAddressSet>:
movslq %edi,%rax
movslq %esi,%rcx
shl    $0x4,%rcx
mov    %edx,0x208(%rax,%rcx,1)
ret

LLVM IR (-O0):
define void @USBDMAChannelAddressSet(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = ptrtoint i8* %7 to i32
%9 = load i32, i32* %4
%10 = add nsw i32 %9, 520
%11 = load i32, i32* %5
%12 = mul nsw i32 16, %11
%13 = add nsw i32 %10, %12
%14 = sext i32 %13 to i64
%15 = inttoptr i64 %14 to i32*
store volatile i32 %8, i32* %15
ret void
}

LLVM IR (-O2):
define void @USBDMAChannelAddressSet(i32 %0, i32 %1, i8* %2) {
%4 = ptrtoint i8* %2 to i64
%5 = trunc i64 %4 to i32
%6 = add nsw i32 %0, 520
%7 = shl nsw i32 %1, 4
%8 = add nsw i32 %6, %7
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
store volatile i32 %5, i32* %10
ret void
}
int HexCharToNibble(char hex_char) {
  if (hex_char >= '0' && hex_char <= '9') {
    return hex_char - '0';
  } else if (hex_char >= 'A' && hex_char <= 'F') {
    return hex_char + 10 - 'A';
  } else {
    return -1;
  }
}


x86 assembly (clang, -O0):
<HexCharToNibble>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1133 <HexCharToNibble+0x33>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     1133 <HexCharToNibble+0x33>
movsbl -0x5(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    1166 <HexCharToNibble+0x66>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     115f <HexCharToNibble+0x5f>
movsbl -0x5(%rbp),%eax
cmp    $0x46,%eax
jg     115f <HexCharToNibble+0x5f>
movsbl -0x5(%rbp),%eax
add    $0xa,%eax
sub    $0x41,%eax
mov    %eax,-0x4(%rbp)
jmp    1166 <HexCharToNibble+0x66>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<HexCharToNibble>:
mov    %edi,%eax
lea    -0x30(%rax),%ecx
cmp    $0x9,%cl
ja     110e <HexCharToNibble+0xe>
add    $0xffffffd0,%eax
ret
lea    -0x41(%rax),%ecx
add    $0xffffffc9,%eax
cmp    $0x6,%cl
mov    $0xffffffff,%ecx
cmovb  %eax,%ecx
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @HexCharToNibble(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 48
br i1 %6, label %7, label %15
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 57
br i1 %10, label %11, label %15
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 48
store i32 %14, i32* %2
br label %29
15: ; preds = %7, %1
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp sge i32 %17, 65
br i1 %18, label %19, label %28
19: ; preds = %15
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp sle i32 %21, 70
br i1 %22, label %23, label %28
23: ; preds = %19
%24 = load i8, i8* %3
%25 = sext i8 %24 to i32
%26 = add nsw i32 %25, 10
%27 = sub nsw i32 %26, 65
store i32 %27, i32* %2
br label %29
28: ; preds = %19, %15
store i32 -1, i32* %2
br label %29
29: ; preds = %28, %23, %11
%30 = load i32, i32* %2
ret i32 %30
}

LLVM IR (-O2):
define i32 @HexCharToNibble(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add i8 %0, -48
%4 = icmp ult i8 %3, 10
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = add nsw i32 %2, -48
br label %12
7: ; preds = %1
%8 = add i8 %0, -65
%9 = icmp ult i8 %8, 6
%10 = add nsw i32 %2, -55
%11 = select i1 %9, i32 %10, i32 -1
br label %12
12: ; preds = %7, %5
%13 = phi i32 [ %6, %5 ], [ %11, %7 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ new_op(int);
void parse_CONTFW() { new_op(14); }


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

x86 assembly (clang, -O2):
<parse_CONTFW>:
mov    $0xe,%edi
jmp    1030 <new_op@plt>

LLVM IR (-O0):
define void @parse_CONTFW() {
%1 = call i32 @new_op(i32 14)
ret void
}

LLVM IR (-O2):
define void @parse_CONTFW() {
%1 = tail call i32 @new_op(i32 14)
ret void
}
void immediate_update_early(void) {}


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

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

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

LLVM IR (-O2):
define void @immediate_update_early() {
ret void
}
/* Variables and functions */
size_t strlen(char const *);
scalar_t__ strncmp(char const *, char const *, size_t);
char *trimprefix(const char *str, const char *prefix) {
  size_t n;
  n = strlen(prefix);
  if (strncmp(str, prefix, n))
    return NULL;
  return (char *)str + n;
}


x86 assembly (clang, -O0):
<trimprefix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     1165 <trimprefix+0x45>
movq   $0x0,-0x8(%rbp)
jmp    1171 <trimprefix+0x51>
mov    -0x10(%rbp),%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trimprefix>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %rax,%r15
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rax,%rdx
call   1030 <strncmp@plt>
add    %r15,%rbx
xor    %ecx,%ecx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @trimprefix(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = tail call i64 @strncmp(i8* %0, i8* %1, i64 %3)
%5 = icmp eq i64 %4, 0
%6 = getelementptr inbounds i8, i8* %0, i64 %3
%7 = select i1 %5, i8* %6, i8* null
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ ol(char *);
m_div() {
  ol("XCHG AX,BX");
  ol("MOV  DX,0");
  ol("DIV  BX");
  ol("MOV  BX,DX");
}


x86 assembly (clang, -O0):
<m_div>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <ol@plt>
lea    0xee0(%rip),%rdi
call   1030 <ol@plt>
lea    0xede(%rip),%rdi
call   1030 <ol@plt>
lea    0xeda(%rip),%rdi
call   1030 <ol@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m_div>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <ol@plt>
lea    0xee7(%rip),%rdi
call   1030 <ol@plt>
lea    0xee5(%rip),%rdi
call   1030 <ol@plt>
lea    0xee1(%rip),%rdi
pop    %rax
jmp    1030 <ol@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"XCHG AX,BX\00"
@.str.1 = [10 x i8] c"MOV DX,0\00"
@.str.2 = [8 x i8] c"DIV BX\00"
@.str.3 = [11 x i8] c"MOV BX,DX\00"
define i32 @m_div() {
%1 = alloca i32
%2 = call i32 @ol(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @ol(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @ol(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @ol(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
@.str = [11 x i8] c"XCHG AX,BX\00"
@.str.1 = [10 x i8] c"MOV DX,0\00"
@.str.2 = [8 x i8] c"DIV BX\00"
@.str.3 = [11 x i8] c"MOV BX,DX\00"
define i32 @m_div() {
%1 = tail call i32 @ol(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @ol(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @ol(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @ol(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, char *);
int system(char *);
int save_id_file() {
  char cmdx[300];
  snprintf(cmdx, 300, "echo `cpuid` > %s", "/tmp/id");
  return system(cmdx);
}


x86 assembly (clang, -O0):
<save_id_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
lea    -0x130(%rbp),%rdi
mov    $0x12c,%esi
lea    0xec2(%rip),%rdx
lea    0xecd(%rip),%rcx
call   1040 <snprintf@plt>
lea    -0x130(%rbp),%rdi
call   1030 <system@plt>
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<save_id_file>:
push   %rbx
sub    $0x130,%rsp
lea    0xed1(%rip),%rdx
lea    0xedc(%rip),%rcx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x12c,%esi
call   1040 <snprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
add    $0x130,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"echo `cpuid` > %s\00"
@.str.1 = [8 x i8] c"/tmp/id\00"
define i32 @save_id_file() {
%1 = alloca [300 x i8]
%2 = getelementptr inbounds [300 x i8], [300 x i8]* %1, i64 0, i64 0
%3 = call i32 @snprintf(i8* %2, i32 300, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%4 = getelementptr inbounds [300 x i8], [300 x i8]* %1, i64 0, i64 0
%5 = call i32 @system(i8* %4)
ret i32 %5
}

LLVM IR (-O2):
@.str = [18 x i8] c"echo `cpuid` > %s\00"
@.str.1 = [8 x i8] c"/tmp/id\00"
define i32 @save_id_file() {
%1 = alloca [300 x i8]
%2 = getelementptr inbounds [300 x i8], [300 x i8]* %1, i64 0, i64 0
%3 = call i32 @snprintf(i8* %2, i32 300, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @system(i8* %2)
ret i32 %4
}
/* Variables and functions */
double erand48(unsigned short *);
__attribute__((__visibility__("default"))) double
hts_erand48(unsigned short xseed[3]) {
  return erand48(xseed);
}


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

x86 assembly (clang, -O2):
<hts_erand48>:
jmp    1030 <erand48@plt>

LLVM IR (-O0):
define double @hts_erand48(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = call double @erand48(i16* %3)
ret double %4
}

LLVM IR (-O2):
define double @hts_erand48(i16* %0) {
%2 = tail call double @erand48(i16* %0)
ret double %2
}
void invlpg(void *addr) { asm volatile("invlpg (%0)" ::"r"(addr) : "memory"); }


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

x86 assembly (clang, -O2):
<invlpg>:
invlpg (%rdi)
ret

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

LLVM IR (-O2):
define void @invlpg(i8* %0) {
tail call void asm sideeffect "invlpg ($0)", "r,~{memory},~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret void
}
const char *td_ext2fs_version(void) {
  const char *ext2fs_version = "none";
  return ext2fs_version;
}


x86 assembly (clang, -O0):
<td_ext2fs_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<td_ext2fs_version>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"none\00"
define i8* @td_ext2fs_version() {
%1 = alloca i8*
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
ret i8* %2
}

LLVM IR (-O2):
@.str = [5 x i8] c"none\00"
define i8* @td_ext2fs_version() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
scalar_t__ rand();
void ntco_or(float *xs, float *ys, float me) {
  float k;
  k = (float)rand() / (float)(0.25 * me);
  *xs += k;
  *ys += k;
}


x86 assembly (clang, -O0):
<ntco_or>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
movss  -0x14(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xebe(%rip),%xmm1
mulsd  %xmm2,%xmm1
cvtsd2ss %xmm1,%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
mov    -0x8(%rbp),%rax
addss  (%rax),%xmm0
movss  %xmm0,(%rax)
movss  -0x18(%rbp),%xmm0
mov    -0x10(%rbp),%rax
addss  (%rax),%xmm0
movss  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ntco_or>:
push   %r14
push   %rbx
push   %rax
movss  %xmm0,0x4(%rsp)
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
movss  0x4(%rsp),%xmm1
mulss  0xec3(%rip),%xmm1
divss  %xmm1,%xmm0
movss  (%rbx),%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,(%rbx)
addss  (%r14),%xmm0
movss  %xmm0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @ntco_or(float* %0, float* %1, float %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float
%7 = alloca float
store float* %0, float** %4
store float* %1, float** %5
store float %2, float* %6
%8 = call i64 (...) @rand()
%9 = sitofp i64 %8 to float
%10 = load float, float* %6
%11 = fpext float %10 to double
%12 = fmul double 2.500000e-01, %11
%13 = fptrunc double %12 to float
%14 = fdiv float %9, %13
store float %14, float* %7
%15 = load float, float* %7
%16 = load float*, float** %4
%17 = load float, float* %16
%18 = fadd float %17, %15
store float %18, float* %16
%19 = load float, float* %7
%20 = load float*, float** %5
%21 = load float, float* %20
%22 = fadd float %21, %19
store float %22, float* %20
ret void
}

LLVM IR (-O2):
define void @ntco_or(float* nocapture %0, float* nocapture %1, float %2) {
%4 = tail call i64 (...) @rand()
%5 = sitofp i64 %4 to float
%6 = fmul float %2, 2.500000e-01
%7 = fdiv float %5, %6
%8 = load float, float* %0
%9 = fadd float %8, %7
store float %9, float* %0
%10 = load float, float* %1
%11 = fadd float %7, %10
store float %11, float* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clean_up(char *);
int /*<<< orphan*/ md_lock(int /*<<< orphan*/);
int /*<<< orphan*/ messagef(int, char *, char *);
void sf_error(void) {
  md_lock(0);
  messagef(1, "%s", "");
  clean_up("sorry, score file is out of order");
}


x86 assembly (clang, -O0):
<sf_error>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1050 <md_lock@plt>
mov    $0x1,%edi
lea    0xeb9(%rip),%rsi
lea    0xed6(%rip),%rdx
call   1040 <messagef@plt>
lea    0xea9(%rip),%rdi
call   1030 <clean_up@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sf_error>:
push   %rax
xor    %edi,%edi
call   1050 <md_lock@plt>
lea    0xec1(%rip),%rsi
lea    0xede(%rip),%rdx
mov    $0x1,%edi
call   1040 <messagef@plt>
lea    0xeac(%rip),%rdi
pop    %rax
jmp    1030 <clean_up@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [34 x i8] c"sorry, score file is out of order\00"
define void @sf_error() {
%1 = call i32 @md_lock(i32 0)
%2 = call i32 @messagef(i32 1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @clean_up(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [34 x i8] c"sorry, score file is out of order\00"
define void @sf_error() {
%1 = tail call i32 @md_lock(i32 0)
%2 = tail call i32 @messagef(i32 1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @clean_up(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0))
ret void
}
int isHigher(const void *a, const void *b) {
  return (*(double const *)a) - (*(double const *)b);
}


x86 assembly (clang, -O0):
<isHigher>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  (%rax),%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isHigher>:
movsd  (%rdi),%xmm0
subsd  (%rsi),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @isHigher(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to double*
%7 = load double, double* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to double*
%10 = load double, double* %9
%11 = fsub double %7, %10
%12 = fptosi double %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @isHigher(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fsub double %4, %6
%8 = fptosi double %7 to i32
ret i32 %8
}
int mcp23008Setup(int pin_offset, int addr_base) { return 1; }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @mcp23008Setup(i32 %0, i32 %1) {
ret i32 1
}
char precede(char optr1, char optr2) {
  char optr[][8] = {">><<<>>", ">><<<>>", ">>>><>>", ">>>><>>",
                    "<<<<<= ", ">>>> >>", "<<<<< ="};
  return optr[suffix(optr1)][suffix(optr2)];
}


x86 assembly (clang, -O0):
<precede>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xec1(%rip),%rsi
mov    $0x38,%edx
call   1030 <memcpy@plt>
movsbl -0x1(%rbp),%edi
mov    $0x0,%al
call   1040 <suffix@plt>
movslq %eax,%rcx
lea    -0x40(%rbp),%rax
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x48(%rbp)
movsbl -0x2(%rbp),%edi
mov    $0x0,%al
call   1040 <suffix@plt>
mov    %eax,%ecx
mov    -0x48(%rbp),%rax
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<precede>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
xor    %eax,%eax
call   1030 <suffix@plt>
movslq %eax,%rbx
mov    %ebp,%edi
xor    %eax,%eax
call   1030 <suffix@plt>
cltq
lea    0xecf(%rip),%rcx
lea    (%rcx,%rbx,8),%rcx
mov    (%rax,%rcx,1),%al
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@__const.precede.optr = [7 x [8 x i8]] [[8 x i8] c">><<<>>\00", [8 x i8] c">><<<>>\00", [8 x i8] c">>>><>>\00", [8 x i8] c">>>><>>\00", [8 x i8] c"<<<<<= \00", [8 x i8] c">>>> >>\00", [8 x i8] c"<<<<< =\00"]
define signext i8 @precede(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca [7 x [8 x i8]]
store i8 %0, i8* %3
store i8 %1, i8* %4
%6 = bitcast [7 x [8 x i8]]* %5 to i8*
%7 = load i8, i8* %3
%8 = sext i8 %7 to i32
%9 = call i32 (i32, ...) bitcast (i32 (...)* @suffix to i32 (i32, ...)*)(i32 %8)
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [7 x [8 x i8]], [7 x [8 x i8]]* %5, i64 0, i64 %10
%12 = load i8, i8* %4
%13 = sext i8 %12 to i32
%14 = call i32 (i32, ...) bitcast (i32 (...)* @suffix to i32 (i32, ...)*)(i32 %13)
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [8 x i8], [8 x i8]* %11, i64 0, i64 %15
%17 = load i8, i8* %16
ret i8 %17
}

LLVM IR (-O2):
@__const.precede.optr = [7 x [8 x i8]] [[8 x i8] c">><<<>>\00", [8 x i8] c">><<<>>\00", [8 x i8] c">>>><>>\00", [8 x i8] c">>>><>>\00", [8 x i8] c"<<<<<= \00", [8 x i8] c">>>> >>\00", [8 x i8] c"<<<<< =\00"]
define signext i8 @precede(i8 signext %0, i8 signext %1) {
%3 = sext i8 %0 to i32
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @suffix to i32 (i32, ...)*)(i32 %3)
%5 = sext i32 %4 to i64
%6 = sext i8 %1 to i32
%7 = tail call i32 (i32, ...) bitcast (i32 (...)* @suffix to i32 (i32, ...)*)(i32 %6)
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [7 x [8 x i8]], [7 x [8 x i8]]* @__const.precede.optr, i64 0, i64 %5, i64 %8
%10 = load i8, i8* %9
ret i8 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int);
void Usage() {
  printf("Usage: nscb -t[T|xS] -sSrcFile {-dDesFile} \n"
         "       T: indent with table\n"
         "       xS: indent with x(%d<=x<=%d) space\n"
         "       SrcFile: full path source file name(no more than %d bytes)\n"
         "       DesFile: full path destine file name(no more than %d bytes)\n"
         "Note: if thers is no DesFile, SrcFile will be overwritten.\n",
         1, 8, 512, 512);
}


x86 assembly (clang, -O0):
<Usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1,%esi
mov    $0x8,%edx
mov    $0x200,%r8d
mov    %r8d,%ecx
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Usage>:
lea    0xee9(%rip),%rdi
mov    $0x1,%esi
mov    $0x8,%edx
mov    $0x200,%ecx
mov    $0x200,%r8d
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [307 x i8] c"Usage: nscb -t[T|xS] -sSrcFile {-dDesFile} \0A T: indent with table\0A xS: indent with x(%d<=x<=%d) space\0A SrcFile: full path source file name(no more than %d bytes)\0A DesFile: full path destine file name(no more than %d bytes)\0ANote: if thers is no DesFile, SrcFile will be overwritten.\0A\00"
define void @Usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([307 x i8], [307 x i8]* @.str, i64 0, i64 0), i32 1, i32 8, i32 512, i32 512)
ret void
}

LLVM IR (-O2):
@.str = [307 x i8] c"Usage: nscb -t[T|xS] -sSrcFile {-dDesFile} \0A T: indent with table\0A xS: indent with x(%d<=x<=%d) space\0A SrcFile: full path source file name(no more than %d bytes)\0A DesFile: full path destine file name(no more than %d bytes)\0ANote: if thers is no DesFile, SrcFile will be overwritten.\0A\00"
define void @Usage() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([307 x i8], [307 x i8]* @.str, i64 0, i64 0), i32 1, i32 8, i32 512, i32 512)
ret void
}
/* Variables and functions */
int /*<<< orphan*/
__softboundcets_propagate_metadata_shadow_stack_from(int, int /*<<< orphan*/);
char *strcat(char *, char const *);
__attribute__((__weak__, __always___)) char *
softboundcets_strcat(char *dest, const char *src) {
  char *ret_ptr = strcat(dest, src);
  __softboundcets_propagate_metadata_shadow_stack_from(1, 0);
  return ret_ptr;
}


x86 assembly (clang, -O0):
<softboundcets_strcat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcat@plt>
mov    %rax,-0x18(%rbp)
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <__softboundcets_propagate_metadata_shadow_stack_from@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundcets_strcat>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strcat@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <__softboundcets_propagate_metadata_shadow_stack_from@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define weak i8* @softboundcets_strcat(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** %4
%8 = call i8* @strcat(i8* %6, i8* %7)
store i8* %8, i8** %5
%9 = call i32 @__softboundcets_propagate_metadata_shadow_stack_from(i32 1, i32 0)
%10 = load i8*, i8** %5
ret i8* %10
}

LLVM IR (-O2):
define weak i8* @softboundcets_strcat(i8* %0, i8* %1) {
%3 = tail call i8* @strcat(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = tail call i32 @__softboundcets_propagate_metadata_shadow_stack_from(i32 1, i32 0)
ret i8* %0
}
int defaultcmp(const void *l, const void *r) {
  int x = *(int *)l;
  int y = *(int *)r;
  return x - y;
}


x86 assembly (clang, -O0):
<defaultcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
sub    -0x18(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @defaultcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
%9 = load i32, i32* %8
store i32 %9, i32* %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i32*
%12 = load i32, i32* %11
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = sub nsw i32 %13, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @defaultcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
void release_spinlock(int *lock) { *lock = 0; }


x86 assembly (clang, -O0):
<release_spinlock>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<release_spinlock>:
movl   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @release_spinlock(i32* nocapture writeonly %0) {
store i32 0, i32* %0
ret void
}
/* Variables and functions */
void *malloc(size_t);
void *vector_malloc(size_t sz) { return malloc(sz); }


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

x86 assembly (clang, -O2):
<vector_malloc>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @vector_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
void strcpy_contents_Bad() {
  char src[5] = "aaaa";
  char dst[5];
  strcpy(dst, src);
  char c = dst[0];
  if (c >= 'a') {
    int a[5];
    a[c - 'a' + 5] = 0;
  }
}


x86 assembly (clang, -O0):
<strcpy_contents_Bad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xee2(%rip),%eax
mov    %eax,-0x5(%rbp)
mov    0xedd(%rip),%al
mov    %al,-0x1(%rbp)
lea    -0xa(%rbp),%rdi
lea    -0x5(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0xa(%rbp),%al
mov    %al,-0xb(%rbp)
movsbl -0xb(%rbp),%eax
cmp    $0x61,%eax
jl     115e <strcpy_contents_Bad+0x4e>
movsbl -0xb(%rbp),%eax
sub    $0x61,%eax
add    $0x5,%eax
cltq
movl   $0x0,-0x20(%rbp,%rax,4)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy_contents_Bad>:
sub    $0x18,%rsp
movb   $0x0,0x10(%rsp)
movl   $0x61616161,0xc(%rsp)
61
lea    0x13(%rsp),%rdi
lea    0xc(%rsp),%rsi
call   1030 <strcpy@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.strcpy_contents_Bad.src = [5 x i8] c"aaaa\00"
define void @strcpy_contents_Bad() {
%1 = alloca [5 x i8]
%2 = alloca [5 x i8]
%3 = alloca i8
%4 = alloca [5 x i32]
%5 = bitcast [5 x i8]* %1 to i8*
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%8 = call i32 @strcpy(i8* %6, i8* %7)
%9 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%10 = load i8, i8* %9
store i8 %10, i8* %3
%11 = load i8, i8* %3
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 97
br i1 %13, label %14, label %21
14: ; preds = %0
%15 = load i8, i8* %3
%16 = sext i8 %15 to i32
%17 = sub nsw i32 %16, 97
%18 = add nsw i32 %17, 5
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [5 x i32], [5 x i32]* %4, i64 0, i64 %19
store i32 0, i32* %20
br label %21
21: ; preds = %14, %0
ret void
}

LLVM IR (-O2):
@__const.strcpy_contents_Bad.src = [5 x i8] c"aaaa\00"
define void @strcpy_contents_Bad() {
%1 = alloca [5 x i8]
%2 = alloca [5 x i8]
%3 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ boolTerm();
int /*<<< orphan*/ match(char);
int /*<<< orphan*/ popOr();
void boolOr() {
  match('|');
  boolTerm();
  popOr();
}


x86 assembly (clang, -O0):
<boolOr>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7c,%edi
call   1040 <match@plt>
mov    $0x0,%al
call   1050 <boolTerm@plt>
mov    $0x0,%al
call   1030 <popOr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<boolOr>:
push   %rax
mov    $0x7c,%edi
call   1040 <match@plt>
xor    %eax,%eax
call   1050 <boolTerm@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <popOr@plt>

LLVM IR (-O0):
define void @boolOr() {
%1 = call i32 @match(i8 signext 124)
%2 = call i32 (...) @boolTerm()
%3 = call i32 (...) @popOr()
ret void
}

LLVM IR (-O2):
define void @boolOr() {
%1 = tail call i32 @match(i8 signext 124)
%2 = tail call i32 (...) @boolTerm()
%3 = tail call i32 (...) @popOr()
ret void
}
int cmp(const void *a, const void *b) {
  const int *arg1 = a;
  const int *arg2 = b;
  return *arg1 - *arg2;
}


x86 assembly (clang, -O0):
<cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    -0x20(%rbp),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %6
%11 = load i32*, i32** %5
%12 = load i32, i32* %11
%13 = load i32*, i32** %6
%14 = load i32, i32* %13
%15 = sub nsw i32 %12, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sub nsw i32 %5, %6
ret i32 %7
}
int add3(int a) { return a + 3; }


x86 assembly (clang, -O0):
<add3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x3,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<add3>:
lea    0x3(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @add3(i32 %0) {
%2 = add nsw i32 %0, 3
ret i32 %2
}
/* Type definitions */
struct protoent {
  int dummy;
};

/* Variables and functions */
int SOL_SOCKET;
struct protoent *getprotoent();
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ show(struct protoent *);
int main() {
  struct protoent *pent = getprotoent();
  while (pent) {
    show(pent);
    pent = getprotoent();
  }
  printf("SOL_SOCKET: %d\n", SOL_SOCKET);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getprotoent@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     116e <main+0x3e>
mov    -0x10(%rbp),%rdi
call   1050 <show@plt>
mov    $0x0,%al
call   1040 <getprotoent@plt>
mov    %rax,-0x10(%rbp)
jmp    114a <main+0x1a>
mov    0x2e73(%rip),%rax
mov    (%rax),%esi
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <getprotoent@plt>
test   %rax,%rax
je     1156 <main+0x26>
mov    %rax,%rdi
call   1050 <show@plt>
jmp    1140 <main+0x10>
mov    0x2e8b(%rip),%rax
mov    (%rax),%esi
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.protoent = type { i32 }
@.str = [16 x i8] c"SOL_SOCKET: %d\0A\00"
@SOL_SOCKET = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.protoent*
store i32 0, i32* %1
%3 = call %struct.protoent* (...) @getprotoent()
store %struct.protoent* %3, %struct.protoent** %2
br label %4
4: ; preds = %7, %0
%5 = load %struct.protoent*, %struct.protoent** %2
%6 = icmp ne %struct.protoent* %5, null
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = load %struct.protoent*, %struct.protoent** %2
%9 = call i32 @show(%struct.protoent* %8)
%10 = call %struct.protoent* (...) @getprotoent()
store %struct.protoent* %10, %struct.protoent** %2
br label %4
11: ; preds = %4
%12 = load i32, i32* @SOL_SOCKET
%13 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
%struct.protoent = type { i32 }
@.str = [16 x i8] c"SOL_SOCKET: %d\0A\00"
@SOL_SOCKET = global i32 0
define i32 @main() {
%1 = tail call %struct.protoent* (...) @getprotoent()
%2 = icmp eq %struct.protoent* %1, null
br i1 %2, label %8, label %3
3: ; preds = %0, %3
%4 = phi %struct.protoent* [ %6, %3 ], [ %1, %0 ]
%5 = tail call i32 @show(%struct.protoent* %4)
%6 = tail call %struct.protoent* (...) @getprotoent()
%7 = icmp eq %struct.protoent* %6, null
br i1 %7, label %8, label %3
8: ; preds = %3, %0
%9 = load i32, i32* @SOL_SOCKET
%10 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int errno;
scalar_t__ fork();
int _fork_off_to_child(void) {
  pid_t pid;
  pid = fork();
  if (pid < 0)
    return -errno;
  if (pid > 0)
    _exit(EXIT_SUCCESS);
  return 0;
}


x86 assembly (clang, -O0):
<_fork_off_to_child>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <fork@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jge    1151 <_fork_off_to_child+0x31>
xor    %eax,%eax
mov    0x2e99(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    1171 <_fork_off_to_child+0x51>
cmpq   $0x0,-0x10(%rbp)
jle    116a <_fork_off_to_child+0x4a>
mov    0x2e75(%rip),%rax
mov    (%rax),%edi
call   1030 <_exit@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_fork_off_to_child>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <fork@plt>
test   %rax,%rax
js     113f <_fork_off_to_child+0x1f>
je     114a <_fork_off_to_child+0x2a>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
call   1030 <_exit@plt>
mov    0x2e9a(%rip),%rax
xor    %ebx,%ebx
sub    (%rax),%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@errno = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @_fork_off_to_child() {
%1 = alloca i32
%2 = alloca i64
%3 = call i64 (...) @fork()
store i64 %3, i64* %2
%4 = load i64, i64* %2
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* @errno
%8 = sub nsw i32 0, %7
store i32 %8, i32* %1
br label %16
9: ; preds = %0
%10 = load i64, i64* %2
%11 = icmp sgt i64 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load i32, i32* @EXIT_SUCCESS
%14 = call i32 @_exit(i32 %13)
unreachable
15: ; preds = %9
store i32 0, i32* %1
br label %16
16: ; preds = %15, %6
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
@errno = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @_fork_off_to_child() {
%1 = tail call i64 (...) @fork()
%2 = icmp slt i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = load i32, i32* @errno
%5 = sub nsw i32 0, %4
br label %11
6: ; preds = %0
%7 = icmp eq i64 %1, 0
br i1 %7, label %11, label %8
8: ; preds = %6
%9 = load i32, i32* @EXIT_SUCCESS
%10 = tail call i32 @_exit(i32 %9)
unreachable
11: ; preds = %6, %3
%12 = phi i32 [ %5, %3 ], [ 0, %6 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ tmpmysortstringint(int, int /*<<< orphan*/, char **, int *);
void mysortstringint(int N, int sizestr, char **data1, int *data2) {
  tmpmysortstringint(N, 0, data1, data2);
}


x86 assembly (clang, -O0):
<mysortstringint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
xor    %esi,%esi
call   1030 <tmpmysortstringint@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @mysortstringint(i32 %0, i32 %1, i8** %2, i32* %3) {
%5 = tail call i32 @tmpmysortstringint(i32 %0, i32 0, i8** %2, i32* %3)
ret void
}
int sock_create_kern(int family, int type, int proto, struct socket **res) {
  return 0;
}


x86 assembly (clang, -O0):
<sock_create_kern>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.socket = type opaque
define i32 @sock_create_kern(i32 %0, i32 %1, i32 %2, %struct.socket** %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca %struct.socket**
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store %struct.socket** %3, %struct.socket*** %8
ret i32 0
}

LLVM IR (-O2):
%struct.socket = type opaque
define i32 @sock_create_kern(i32 %0, i32 %1, i32 %2, %struct.socket** nocapture readnone %3) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void func1(void) {
  int a = 1;
  {
    int a = 2, b = a;
    assert(b == 2);
  }
  { int a = a; }
}


x86 assembly (clang, -O0):
<func1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @func1() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 1, i32* %1
store i32 2, i32* %2
%5 = load i32, i32* %2
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 2
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i32, i32* %4
store i32 %10, i32* %4
ret void
}

LLVM IR (-O2):
define void @func1() {
%1 = tail call i32 @assert(i32 1)
ret void
}