xunge/DecIR huggingface dataset:
void InterruptSetPriority(int InterruptSource, int Priority) {
  unsigned long mask = ~(0xFF << ((InterruptSource & 3) * 8));
  ((volatile unsigned long *)(0xE000E000 + (0x400)))[(InterruptSource >> 2)] =
      (((volatile unsigned long *)(0xE000E000 +
                                   (0x400)))[(InterruptSource >> 2)] &
       mask) |
      ((Priority & 0x1F) << (((InterruptSource & 3) * 8) + 3));
}


x86 assembly (clang, -O0):
<InterruptSetPriority>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%ecx
and    $0x3,%ecx
shl    $0x3,%ecx
mov    $0xff,%eax
shl    %cl,%eax
xor    $0xffffffff,%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x2,%eax
movslq %eax,%rcx
mov    $0xe000e400,%eax
mov    (%rax,%rcx,8),%rdx
and    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%eax
and    $0x1f,%eax
mov    -0x4(%rbp),%ecx
and    $0x3,%ecx
shl    $0x3,%ecx
add    $0x3,%ecx
shl    %cl,%eax
cltq
or     %rax,%rdx
mov    -0x4(%rbp),%eax
sar    $0x2,%eax
movslq %eax,%rcx
mov    $0xe000e400,%eax
mov    %rdx,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<InterruptSetPriority>:
lea    0x0(,%rdi,8),%ecx
mov    $0xff,%eax
shl    %cl,%eax
and    $0x18,%cl
not    %eax
cltq
sar    $0x2,%edi
movslq %edi,%rdx
mov    $0xe000e400,%edi
and    (%rdi,%rdx,8),%rax
and    $0x1f,%esi
or     $0x3,%cl
shl    %cl,%esi
movslq %esi,%rcx
or     %rax,%rcx
mov    %rcx,(%rdi,%rdx,8)
ret

LLVM IR (-O0):
define void @InterruptSetPriority(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = and i32 %6, 3
%8 = mul nsw i32 %7, 8
%9 = shl i32 255, %8
%10 = xor i32 %9, -1
%11 = sext i32 %10 to i64
store i64 %11, i64* %5
%12 = load i32, i32* %3
%13 = ashr i32 %12, 2
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i64, i64* inttoptr (i64 3758154752 to i64*), i64 %14
%16 = load volatile i64, i64* %15
%17 = load i64, i64* %5
%18 = and i64 %16, %17
%19 = load i32, i32* %4
%20 = and i32 %19, 31
%21 = load i32, i32* %3
%22 = and i32 %21, 3
%23 = mul nsw i32 %22, 8
%24 = add nsw i32 %23, 3
%25 = shl i32 %20, %24
%26 = sext i32 %25 to i64
%27 = or i64 %18, %26
%28 = load i32, i32* %3
%29 = ashr i32 %28, 2
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i64, i64* inttoptr (i64 3758154752 to i64*), i64 %30
store volatile i64 %27, i64* %31
ret void
}

LLVM IR (-O2):
define void @InterruptSetPriority(i32 %0, i32 %1) {
%3 = shl i32 %0, 3
%4 = and i32 %3, 24
%5 = shl nuw i32 255, %4
%6 = xor i32 %5, -1
%7 = sext i32 %6 to i64
%8 = ashr i32 %0, 2
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i64, i64* inttoptr (i64 3758154752 to i64*), i64 %9
%11 = load volatile i64, i64* %10
%12 = and i64 %11, %7
%13 = and i32 %1, 31
%14 = or i32 %4, 3
%15 = shl i32 %13, %14
%16 = sext i32 %15 to i64
%17 = or i64 %12, %16
store volatile i64 %17, i64* %10
ret void
}
int test_imm_40uint16_mem(unsigned short *val) {
  return ((*val) & (-0x40 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_40uint16_mem>:
cmpw   $0x40,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmovb  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_40uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = icmp ult i16 %2, 64
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int abfab(int, char *, int);
int terminate(int fd) {
  if (fd < 1) {
    return -1;
  }
  return (abfab(fd, "\r\n.\r\n", 5));
}


x86 assembly (clang, -O0):
<terminate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    1131 <terminate+0x21>
movl   $0xffffffff,-0x4(%rbp)
jmp    1148 <terminate+0x38>
mov    -0x8(%rbp),%edi
lea    0xec5(%rip),%rsi
mov    $0x5,%edx
call   1030 <abfab@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<terminate>:
test   %edi,%edi
jle    1125 <terminate+0x15>
lea    0xee5(%rip),%rsi
mov    $0x5,%edx
jmp    1030 <abfab@plt>
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"\0D\0A.\0D\0A\00"
define i32 @terminate(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @abfab(i32 %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 5)
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ %4, %3 ], [ -1, %1 ]
ret i32 %6
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ getchar();
int /*<<< orphan*/ printf(char *, long);
int main(int argc, char const *argv[]) {
  long nc;
  nc = 0;
  while (getchar() != EOF)
    ++nc;
  printf("%ld\n", nc);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    0x2e9c(%rip),%rcx
cmp    (%rcx),%rax
je     1166 <main+0x46>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    113e <main+0x1e>
mov    -0x18(%rbp),%rsi
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0xffffffffffffffff,%rbx
mov    0x2eb6(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1040 <getchar@plt>
add    $0x1,%rbx
cmp    (%r14),%rax
jne    1140 <main+0x20>
lea    0xea9(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@EOF = global i64 0
@.str = [5 x i8] c"%ld\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ 0, %2 ], [ %8, %3 ]
%5 = tail call i64 (...) @getchar()
%6 = load i64, i64* @EOF
%7 = icmp eq i64 %5, %6
%8 = add nuw nsw i64 %4, 1
br i1 %7, label %9, label %3
9: ; preds = %3
%10 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print_array(char *str[], size_t size) {
  int i;
  for (i = 0; i < size; i++) {
    printf("%s\n", str[i]);
  }
}


x86 assembly (clang, -O0):
<print_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movslq -0x14(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    115b <print_array+0x4b>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <print_array+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_array>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rsi,%rsi
je     1145 <print_array+0x35>
mov    %rsi,%r12
mov    %rdi,%r14
xor    %ebx,%ebx
lea    0xed4(%rip),%r15
nopl   0x0(%rax)
mov    (%r14,%rbx,8),%rsi
mov    %r15,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <print_array+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @print_array(i8** nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %11, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %9, %4 ], [ 0, %2 ]
%6 = getelementptr inbounds i8*, i8** %0, i64 %5
%7 = load i8*, i8** %6
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = add nuw i64 %5, 1
%10 = icmp eq i64 %9, %1
br i1 %10, label %11, label %4
11: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ b();
scalar_t__ c();
int main() {
  b();
  c() + 4;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <b@plt>
mov    $0x0,%al
call   1040 <c@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @b()
%2 = call i64 (...) @c()
%3 = add nsw i64 %2, 4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @b()
%2 = tail call i64 (...) @c()
ret i32 0
}
void dump_encrypted_data(struct encrypted_key_payload *epayload,
                         unsigned int encrypted_datalen) {}


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

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

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

LLVM IR (-O2):
%struct.encrypted_key_payload = type opaque
define void @dump_encrypted_data(%struct.encrypted_key_payload* nocapture %0, i32 %1) {
ret void
}
void __attribute__((
    warning("curl_easy_setopt expects a curl_opensocket_callback argument for "
            "this option"))) __attribute__((unused)) __attribute__((no))
_curl_easy_setopt_err_opensocket_cb(void) {
  __asm__("");
}


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

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

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

LLVM IR (-O2):
define void @_curl_easy_setopt_err_opensocket_cb() {
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
size_t strlen(char const *);
size_t trio_length(const char *string) { return strlen(string); }


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

x86 assembly (clang, -O2):
<trio_length>:
jmp    1030 <strlen@plt>

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

LLVM IR (-O2):
define i64 @trio_length(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
ret i64 %2
}
/* Variables and functions */
bool nrf51_errata_12(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf51_errata_12() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int ndelay_on(int);
int socket_sctp4b();
int socket_sctp4(void) {
  int s = socket_sctp4b();
  if (s == -1)
    return -1;
  if (ndelay_on(s) == -1) {
    close(s);
    return -1;
  }
  return s;
}


x86 assembly (clang, -O0):
<socket_sctp4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <socket_sctp4b@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    1158 <socket_sctp4+0x28>
movl   $0xffffffff,-0x4(%rbp)
jmp    1183 <socket_sctp4+0x53>
mov    -0x8(%rbp),%edi
call   1050 <ndelay_on@plt>
cmp    $0xffffffff,%eax
jne    117d <socket_sctp4+0x4d>
mov    -0x8(%rbp),%edi
call   1040 <close@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1183 <socket_sctp4+0x53>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<socket_sctp4>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <socket_sctp4b@plt>
mov    $0xffffffff,%ebx
cmp    $0xffffffff,%eax
je     115d <socket_sctp4+0x2d>
mov    %eax,%ebp
mov    %eax,%edi
call   1050 <ndelay_on@plt>
cmp    $0xffffffff,%eax
je     1156 <socket_sctp4+0x26>
mov    %ebp,%ebx
jmp    115d <socket_sctp4+0x2d>
mov    %ebp,%edi
call   1040 <close@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @socket_sctp4() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @socket_sctp4b()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 -1, i32* %1
br label %16
7: ; preds = %0
%8 = load i32, i32* %2
%9 = call i32 @ndelay_on(i32 %8)
%10 = icmp eq i32 %9, -1
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = load i32, i32* %2
%13 = call i32 @close(i32 %12)
store i32 -1, i32* %1
br label %16
14: ; preds = %7
%15 = load i32, i32* %2
store i32 %15, i32* %1
br label %16
16: ; preds = %14, %11, %6
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
define i32 @socket_sctp4() {
%1 = tail call i32 (...) @socket_sctp4b()
%2 = icmp eq i32 %1, -1
br i1 %2, label %8, label %3
3: ; preds = %0
%4 = tail call i32 @ndelay_on(i32 %1)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @close(i32 %1)
br label %8
8: ; preds = %3, %0, %6
%9 = phi i32 [ -1, %6 ], [ -1, %0 ], [ %1, %3 ]
ret i32 %9
}
long detzcode(codep) const char *const codep;
{
  register long result;
  register int i;
  result = 0;
  for (i = 0; i < 4; ++i)
    result = (result << 8) | (codep[i] & 0xff);
  return result;
}


x86 assembly (clang, -O0):
<detzcode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x4,-0x14(%rbp)
jge    1153 <detzcode+0x53>
mov    -0x10(%rbp),%rax
shl    $0x8,%rax
mov    -0x8(%rbp),%rcx
movslq -0x14(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
and    $0xff,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1117 <detzcode+0x17>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<detzcode>:
mov    (%rdi),%eax
shl    $0x20,%rax
bswap  %rax
ret

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

LLVM IR (-O2):
define i64 @detzcode(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i64
%7 = shl nuw nsw i64 %3, 16
%8 = shl nuw nsw i64 %6, 8
%9 = or i64 %7, %8
%10 = getelementptr inbounds i8, i8* %0, i64 2
%11 = load i8, i8* %10
%12 = zext i8 %11 to i64
%13 = or i64 %9, %12
%14 = shl nuw nsw i64 %13, 8
%15 = getelementptr inbounds i8, i8* %0, i64 3
%16 = load i8, i8* %15
%17 = zext i8 %16 to i64
%18 = or i64 %14, %17
ret i64 %18
}
/* Type definitions */
struct sqlConnection {
  int dummy;
};
struct slName {
  int dummy;
};

/* Variables and functions */
struct slName *extNamesForId(struct sqlConnection *, int, char *);
struct slName *visiGeneRefSeq(struct sqlConnection *conn, int id) {
  return extNamesForId(conn, id, "refSeq");
}


x86 assembly (clang, -O0):
<visiGeneRefSeq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xed3(%rip),%rdx
call   1030 <extNamesForId@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<visiGeneRefSeq>:
lea    0xee9(%rip),%rdx
jmp    1030 <extNamesForId@plt>

LLVM IR (-O0):
%struct.slName = type { i32 }
%struct.sqlConnection = type { i32 }
@.str = [7 x i8] c"refSeq\00"
define %struct.slName* @visiGeneRefSeq(%struct.sqlConnection* %0, i32 %1) {
%3 = alloca %struct.sqlConnection*
%4 = alloca i32
store %struct.sqlConnection* %0, %struct.sqlConnection** %3
store i32 %1, i32* %4
%5 = load %struct.sqlConnection*, %struct.sqlConnection** %3
%6 = load i32, i32* %4
%7 = call %struct.slName* @extNamesForId(%struct.sqlConnection* %5, i32 %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret %struct.slName* %7
}

LLVM IR (-O2):
%struct.slName = type { i32 }
%struct.sqlConnection = type { i32 }
@.str = [7 x i8] c"refSeq\00"
define %struct.slName* @visiGeneRefSeq(%struct.sqlConnection* %0, i32 %1) {
%3 = tail call %struct.slName* @extNamesForId(%struct.sqlConnection* %0, i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret %struct.slName* %3
}
/* Type definitions */
struct hdr_histogram {
  int dummy;
};
typedef scalar_t__ int64_t;

/* Variables and functions */
scalar_t__ hdr_size_of_equivalent_value_range(struct hdr_histogram const *,
                                              scalar_t__);
scalar_t__ lowest_equivalent_value(struct hdr_histogram const *, scalar_t__);
int64_t hdr_next_non_equivalent_value(const struct hdr_histogram *h,
                                      int64_t value) {
  return lowest_equivalent_value(h, value) +
         hdr_size_of_equivalent_value_range(h, value);
}


x86 assembly (clang, -O0):
<hdr_next_non_equivalent_value>:
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 <lowest_equivalent_value@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <hdr_size_of_equivalent_value_range@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hdr_next_non_equivalent_value>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <lowest_equivalent_value@plt>
mov    %rax,%r15
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <hdr_size_of_equivalent_value_range@plt>
add    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.hdr_histogram = type { i32 }
define i64 @hdr_next_non_equivalent_value(%struct.hdr_histogram* %0, i64 %1) {
%3 = alloca %struct.hdr_histogram*
%4 = alloca i64
store %struct.hdr_histogram* %0, %struct.hdr_histogram** %3
store i64 %1, i64* %4
%5 = load %struct.hdr_histogram*, %struct.hdr_histogram** %3
%6 = load i64, i64* %4
%7 = call i64 @lowest_equivalent_value(%struct.hdr_histogram* %5, i64 %6)
%8 = load %struct.hdr_histogram*, %struct.hdr_histogram** %3
%9 = load i64, i64* %4
%10 = call i64 @hdr_size_of_equivalent_value_range(%struct.hdr_histogram* %8, i64 %9)
%11 = add nsw i64 %7, %10
ret i64 %11
}

LLVM IR (-O2):
%struct.hdr_histogram = type { i32 }
define i64 @hdr_next_non_equivalent_value(%struct.hdr_histogram* %0, i64 %1) {
%3 = tail call i64 @lowest_equivalent_value(%struct.hdr_histogram* %0, i64 %1)
%4 = tail call i64 @hdr_size_of_equivalent_value_range(%struct.hdr_histogram* %0, i64 %1)
%5 = add nsw i64 %4, %3
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ EBADF;
int /*<<< orphan*/ errno;
int read(int file, char *ptr, int len) {
  errno = EBADF;
  return -1;
}


x86 assembly (clang, -O0):
<read>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ec3(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec2(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@EBADF = global i32 0
@errno = global i32 0
define i32 @read(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* @EBADF
store i32 %7, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@EBADF = global i32 0
@errno = global i32 0
define i32 @read(i32 %0, i8* nocapture readnone %1, i32 %2) {
%4 = load i32, i32* @EBADF
store i32 %4, i32* @errno
ret i32 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
void fclosep(FILE **fp) {
  if (*fp)
    fclose(*fp);
}


x86 assembly (clang, -O0):
<fclosep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1136 <fclosep+0x26>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fclosep>:
mov    (%rdi),%rdi
test   %rdi,%rdi
je     111d <fclosep+0xd>
jmp    1030 <fclose@plt>
ret

LLVM IR (-O0):
define void @fclosep(i32** %0) {
%2 = alloca i32**
store i32** %0, i32*** %2
%3 = load i32**, i32*** %2
%4 = load i32*, i32** %3
%5 = icmp ne i32* %4, null
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32**, i32*** %2
%8 = load i32*, i32** %7
%9 = call i32 @fclose(i32* %8)
br label %10
10: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @fclosep(i32** nocapture %0) {
%2 = load i32*, i32** %0
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %2)
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void server_log(const char *message) { printf("[Server Log]: %s\n", message); }


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

x86 assembly (clang, -O2):
<server_log>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [18 x i8] c"[Server Log]: %s\0A\00"
define void @server_log(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
uint8_t __rbeu08(uint8_t *buffer) { return buffer[0]; }


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

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

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

LLVM IR (-O2):
define i32 @__rbeu08(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
/* Variables and functions */
double RadToDeg(int /*<<< orphan*/);
int /*<<< orphan*/ atan(int /*<<< orphan*/);
int /*<<< orphan*/ sinh(double);
double MercatorInverseLatitudeSimple(double y) {
  return RadToDeg(atan(sinh(y)));
}


x86 assembly (clang, -O0):
<MercatorInverseLatitudeSimple>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <sinh@plt>
mov    %eax,%edi
call   1050 <atan@plt>
mov    %eax,%edi
call   1030 <RadToDeg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MercatorInverseLatitudeSimple>:
push   %rax
call   1040 <sinh@plt>
mov    %eax,%edi
call   1050 <atan@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <RadToDeg@plt>

LLVM IR (-O0):
define double @MercatorInverseLatitudeSimple(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @sinh(double %3)
%5 = call i32 @atan(i32 %4)
%6 = call double @RadToDeg(i32 %5)
ret double %6
}

LLVM IR (-O2):
define double @MercatorInverseLatitudeSimple(double %0) {
%2 = tail call i32 @sinh(double %0)
%3 = tail call i32 @atan(i32 %2)
%4 = tail call double @RadToDeg(i32 %3)
ret double %4
}
unsigned char dec2hex(int x) {
  if (x >= 0 && x <= 9)
    return x + '0';
  if (x >= 10 && x <= 15)
    return x - 10 + 'a';
  return '0';
}


x86 assembly (clang, -O0):
<dec2hex>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1129 <dec2hex+0x29>
cmpl   $0x9,-0x8(%rbp)
jg     1129 <dec2hex+0x29>
mov    -0x8(%rbp),%eax
add    $0x30,%eax
mov    %al,-0x1(%rbp)
jmp    1152 <dec2hex+0x52>
cmpl   $0xa,-0x8(%rbp)
jl     114e <dec2hex+0x4e>
cmpl   $0xf,-0x8(%rbp)
jg     114e <dec2hex+0x4e>
mov    -0x8(%rbp),%eax
sub    $0xa,%eax
add    $0x61,%eax
mov    %al,-0x1(%rbp)
jmp    1152 <dec2hex+0x52>
movb   $0x30,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dec2hex>:
cmp    $0x9,%edi
ja     110b <dec2hex+0xb>
add    $0x30,%dil
jmp    1119 <dec2hex+0x19>
lea    -0xa(%rdi),%ecx
mov    $0x30,%al
cmp    $0x5,%ecx
ja     111b <dec2hex+0x1b>
add    $0x57,%dil
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define zeroext i8 @dec2hex(i32 %0) {
%2 = icmp ult i32 %0, 10
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = trunc i32 %0 to i8
%5 = add nuw nsw i8 %4, 48
br label %12
6: ; preds = %1
%7 = add i32 %0, -10
%8 = icmp ult i32 %7, 6
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = trunc i32 %0 to i8
%11 = add nuw nsw i8 %10, 87
br label %12
12: ; preds = %6, %9, %3
%13 = phi i8 [ %5, %3 ], [ %11, %9 ], [ 48, %6 ]
ret i8 %13
}
/* Variables and functions */
int /*<<< orphan*/ ERR_free_strings();
void ssl_free(void) { ERR_free_strings(); }


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

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

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

LLVM IR (-O2):
define void @ssl_free() {
%1 = tail call i32 (...) @ERR_free_strings()
ret void
}
void TMTimerFromMilli(void) {}


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

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

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

LLVM IR (-O2):
define void @TMTimerFromMilli() {
ret void
}
__attribute__((always_)) void destroy_rcu_head_on_stack(struct rcu_head *head) {
}


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

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

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

LLVM IR (-O2):
%struct.rcu_head = type opaque
define void @destroy_rcu_head_on_stack(%struct.rcu_head* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ set_compression_mode_pg(struct list_head *, int);
uint8_t set_ult_compression(struct list_head *m, int lvl) {
  ;
  return set_compression_mode_pg(m, lvl);
}


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

x86 assembly (clang, -O2):
<set_ult_compression>:
jmp    1030 <set_compression_mode_pg@plt>

LLVM IR (-O0):
%struct.list_head = type { i32 }
define i32 @set_ult_compression(%struct.list_head* %0, i32 %1) {
%3 = alloca %struct.list_head*
%4 = alloca i32
store %struct.list_head* %0, %struct.list_head** %3
store i32 %1, i32* %4
%5 = load %struct.list_head*, %struct.list_head** %3
%6 = load i32, i32* %4
%7 = call i32 @set_compression_mode_pg(%struct.list_head* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define i32 @set_ult_compression(%struct.list_head* %0, i32 %1) {
%3 = tail call i32 @set_compression_mode_pg(%struct.list_head* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int fsr_fs(unsigned int);
int is_xn_fault(unsigned int fsr) { return ((fsr_fs(fsr) & 0x3c) == 0xc); }


x86 assembly (clang, -O0):
<is_xn_fault>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <fsr_fs@plt>
and    $0x3c,%eax
cmp    $0xc,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_xn_fault>:
push   %rax
call   1030 <fsr_fs@plt>
and    $0x3c,%eax
xor    %ecx,%ecx
cmp    $0xc,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_xn_fault(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @fsr_fs(i32 %3)
%5 = and i32 %4, 60
%6 = icmp eq i32 %5, 12
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @is_xn_fault(i32 %0) {
%2 = tail call i32 @fsr_fs(i32 %0)
%3 = and i32 %2, 60
%4 = icmp eq i32 %3, 12
%5 = zext i1 %4 to i32
ret i32 %5
}
void *test_anti_range_77(int n) {
  extern void *alloc_anti_range_77(int) __attribute__((alloc_size(1)));
  if (1 <= n && n <= 1)
    n = 1 - 1;
  return alloc_anti_range_77(n);
}


x86 assembly (clang, -O0):
<test_anti_range_77>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%eax
cmp    -0x4(%rbp),%eax
jg     113a <test_anti_range_77+0x2a>
cmpl   $0x1,-0x4(%rbp)
jg     113a <test_anti_range_77+0x2a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <alloc_anti_range_77@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anti_range_77>:
xor    %eax,%eax
cmp    $0x1,%edi
cmove  %eax,%edi
jmp    1030 <alloc_anti_range_77@plt>

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

LLVM IR (-O2):
define i8* @test_anti_range_77(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = select i1 %2, i32 0, i32 %0
%4 = tail call i8* @alloc_anti_range_77(i32 %3)
ret i8* %4
}
int dfa_shutdown(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @dfa_shutdown() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ link_error();
int test(void) {
  int exp = -1;
  if ((exp < 2 ? 2U : (unsigned int)exp) != 2)
    link_error();
  return 0;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xffffffff,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
jge    1136 <test+0x26>
mov    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    113c <test+0x2c>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    $0x2,%eax
je     114f <test+0x3f>
mov    $0x0,%al
call   1030 <link_error@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test() {
%1 = alloca i32
store i32 -1, i32* %1
%2 = load i32, i32* %1
%3 = icmp slt i32 %2, 2
br i1 %3, label %4, label %5
4: ; preds = %0
br label %7
5: ; preds = %0
%6 = load i32, i32* %1
br label %7
7: ; preds = %5, %4
%8 = phi i32 [ 2, %4 ], [ %6, %5 ]
%9 = icmp ne i32 %8, 2
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 (...) @link_error()
br label %12
12: ; preds = %10, %7
ret i32 0
}

LLVM IR (-O2):
define i32 @test() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a = 5;
  printf("hello %d", a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x5,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed7(%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
mov    $0x5,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"hello %d\00"
define i32 @main() {
%1 = alloca i32
store i32 5, i32* %1
%2 = load i32, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"hello %d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ clr_key_wait_unix();
void clr_key_wait(void) { clr_key_wait_unix(); }


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

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

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

LLVM IR (-O2):
define void @clr_key_wait() {
%1 = tail call i32 (...) @clr_key_wait_unix()
ret void
}
unsigned long f11(unsigned long x, int y) { return x & ((1UL << y) - 1); }


x86 assembly (clang, -O0):
<f11>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%rdx
mov    %rdx,%rcx
sub    $0x1,%rcx
and    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f11>:
mov    %esi,%ecx
mov    $0xffffffffffffffff,%rax
shl    %cl,%rax
not    %rax
and    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @f11(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 = load i32, i32* %4
%7 = zext i32 %6 to i64
%8 = shl i64 1, %7
%9 = sub i64 %8, 1
%10 = and i64 %5, %9
ret i64 %10
}

LLVM IR (-O2):
define i64 @f11(i64 %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = shl nsw i64 -1, %3
%5 = xor i64 %4, -1
%6 = and i64 %5, %0
ret i64 %6
}
int bitcount(int x) {
  int count = 0;
  while (x != 0) {
    x &= (x - 1);
    count++;
  }
  return count;
}


x86 assembly (clang, -O0):
<bitcount>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1132 <bitcount+0x32>
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
and    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <bitcount+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitcount>:
xor    %eax,%eax
test   %edi,%edi
je     111c <bitcount+0x1c>
cs nopw 0x0(%rax,%rax,1)
lea    -0x1(%rdi),%ecx
add    $0x1,%eax
and    %edi,%ecx
mov    %ecx,%edi
jne    1110 <bitcount+0x10>
ret

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

LLVM IR (-O2):
define i32 @bitcount(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ 0, %1 ]
%5 = phi i32 [ %7, %3 ], [ %0, %1 ]
%6 = add nsw i32 %5, -1
%7 = and i32 %6, %5
%8 = add nuw nsw i32 %4, 1
%9 = icmp eq i32 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %8, %3 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ to_gps(int, int);
void data_bus_test_w(int data) { to_gps(0xf2, data); }


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

x86 assembly (clang, -O2):
<data_bus_test_w>:
mov    %edi,%esi
mov    $0xf2,%edi
jmp    1030 <to_gps@plt>

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

LLVM IR (-O2):
define void @data_bus_test_w(i32 %0) {
%2 = tail call i32 @to_gps(i32 242, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main(int argc, char **argv) {
  char buff[32];
  strcpy(buff, argv[1]);
  printf("buff = %s\n", buff);
  return (0);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
mov    0x8(%rsi),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xec5(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"buff = %s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [32 x i8]
%4 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = call i32 @strcpy(i8* %4, i8* %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
scalar_t__ S_ISBLK(int /*<<< orphan*/);
scalar_t__ stat(char *, struct stat *);
int _is_file_block(char *pathname) {
  struct stat st;
  if (stat(pathname, &st) != 0)
    return 0;
  return S_ISBLK(st.st_mode) ? 1 : 0;
}


x86 assembly (clang, -O0):
<_is_file_block>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
je     114f <_is_file_block+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    116b <_is_file_block+0x4b>
mov    -0x18(%rbp),%edi
call   1040 <S_ISBLK@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_is_file_block>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1135 <_is_file_block+0x15>
pop    %rcx
ret
mov    (%rsp),%edi
call   1040 <S_ISBLK@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @_is_file_block(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = call i64 @S_ISBLK(i32 %8)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %1, %6
%13 = phi i32 [ %11, %6 ], [ 0, %1 ]
ret i32 %13
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void document_output_close_head(FILE *output_stream) {
  fprintf(output_stream, "</head>\n");
}


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

x86 assembly (clang, -O2):
<document_output_close_head>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"</head>\0A\00"
define void @document_output_close_head(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"</head>\0A\00"
define void @document_output_close_head(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 8, i64 1, i32* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
scalar_t__ geopm_region_id_hash(int /*<<< orphan*/);
scalar_t__ geopm_region_id_is_mpi(int /*<<< orphan*/);
int geopm_region_id_is_nested(uint64_t region_id) {
  return (geopm_region_id_is_mpi(region_id) && geopm_region_id_hash(region_id));
}


x86 assembly (clang, -O0):
<geopm_region_id_is_nested>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <geopm_region_id_is_mpi@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
je     1157 <geopm_region_id_is_nested+0x37>
mov    -0x4(%rbp),%edi
call   1030 <geopm_region_id_hash@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<geopm_region_id_is_nested>:
push   %rbx
mov    %edi,%ebx
call   1040 <geopm_region_id_is_mpi@plt>
test   %rax,%rax
je     1141 <geopm_region_id_is_nested+0x21>
mov    %ebx,%edi
call   1030 <geopm_region_id_hash@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @geopm_region_id_is_nested(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @geopm_region_id_is_mpi(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i64 @geopm_region_id_hash(i32 %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @geopm_region_id_is_nested(i32 %0) {
%2 = tail call i64 @geopm_region_id_is_mpi(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @geopm_region_id_hash(i32 %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void SECRET_EXIT(void) {
  printf("DEFENSE FAILURE\n\r");
  exit(0);
}


x86 assembly (clang, -O0):
<SECRET_EXIT>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<SECRET_EXIT>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"DEFENSE FAILURE\0A\0D\00"
define void @SECRET_EXIT() {
%1 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [18 x i8] c"DEFENSE FAILURE\0A\0D\00"
define void @SECRET_EXIT() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
__attribute__((always_)) void check_x2apic(void) {}


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

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

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

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