xunge/DecIR huggingface dataset:
void propagateExpire(void) {
  _serverPanic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/"
               "heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c",
               101, "Function '%s' is disabled.", __func__);
}


x86 assembly (clang, -O0):
<propagateExpire>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x65,%esi
lea    0xf79(%rip),%rdx
lea    0xf8d(%rip),%rcx
mov    $0x0,%al
call   1030 <_serverPanic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<propagateExpire>:
lea    0xee9(%rip),%rdi
lea    0xf82(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x65,%esi
xor    %eax,%eax
jmp    1030 <_serverPanic@plt>

LLVM IR (-O0):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.propagateExpire = [16 x i8] c"propagateExpire\00"
define void @propagateExpire() {
%1 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 101, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.propagateExpire, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.propagateExpire = [16 x i8] c"propagateExpire\00"
define void @propagateExpire() {
%1 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 101, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.propagateExpire, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void espcomm_delay_ms(int ms) { usleep(ms * 1000); }


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

x86 assembly (clang, -O2):
<espcomm_delay_ms>:
imul   $0x3e8,%edi,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @espcomm_delay_ms(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 1000
%5 = call i32 @usleep(i32 %4)
ret void
}

LLVM IR (-O2):
define void @espcomm_delay_ms(i32 %0) {
%2 = mul nsw i32 %0, 1000
%3 = tail call i32 @usleep(i32 %2)
ret void
}
/* Variables and functions */
char *error_name(int);
char *error_get_message(int error) { return error_name(error); }


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

x86 assembly (clang, -O2):
<error_get_message>:
jmp    1030 <error_name@plt>

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

LLVM IR (-O2):
define i8* @error_get_message(i32 %0) {
%2 = tail call i8* @error_name(i32 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ rb_loaderror(char *);
void *dln_load(const char *file) {
  rb_loaderror("this executable file can't load extension libraries");
}


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

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

LLVM IR (-O0):
@.str = [52 x i8] c"this executable file can't load extension libraries\00"
define i8* @dln_load(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i32 @rb_loaderror(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
%5 = load i8*, i8** %2
ret i8* %5
}

LLVM IR (-O2):
@.str = [52 x i8] c"this executable file can't load extension libraries\00"
define noalias i8* @dln_load(i8* nocapture readnone %0) {
%2 = tail call i32 @rb_loaderror(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ assume(int);
int main() {
  int i;
  int j;
  int k;
  assume(i < j && k > 0);
  while (i < j) {
    k = k + 1;
    i = i + 1;
  }
  assert(k > j - i);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%ecx
xor    %eax,%eax
cmp    -0xc(%rbp),%ecx
mov    %al,-0x11(%rbp)
jge    114a <main+0x2a>
cmpl   $0x0,-0x10(%rbp)
setg   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assume@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    117a <main+0x5a>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1157 <main+0x37>
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    -0x8(%rbp),%ecx
cmp    %ecx,%eax
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assume(i32 0)
%2 = tail call i32 @assert(i32 0)
ret i32 0
}
/* Type definitions */
struct circlist_item {
  int dummy;
};

/* Variables and functions */
bool circlist_empty(const struct circlist_item *list) { return list == NULL; }


x86 assembly (clang, -O0):
<circlist_empty>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.circlist_item = type { i32 }
define i32 @circlist_empty(%struct.circlist_item* %0) {
%2 = alloca %struct.circlist_item*
store %struct.circlist_item* %0, %struct.circlist_item** %2
%3 = load %struct.circlist_item*, %struct.circlist_item** %2
%4 = icmp eq %struct.circlist_item* %3, null
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
%struct.circlist_item = type { i32 }
define i32 @circlist_empty(%struct.circlist_item* readnone %0) {
%2 = icmp eq %struct.circlist_item* %0, null
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
unsigned int submask_unzip(unsigned int);
unsigned int submask_broadcastip(unsigned int ip, unsigned int mask) {
  unsigned int network = ip & mask;
  unsigned int broadcast = ((network) | (~mask));
  return submask_unzip(broadcast);
}


x86 assembly (clang, -O0):
<submask_broadcastip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
xor    $0xffffffff,%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
call   1030 <submask_unzip@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<submask_broadcastip>:
not    %esi
or     %esi,%edi
jmp    1030 <submask_unzip@plt>

LLVM IR (-O0):
define i32 @submask_broadcastip(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = and i32 %7, %8
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = load i32, i32* %4
%12 = xor i32 %11, -1
%13 = or i32 %10, %12
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = call i32 @submask_unzip(i32 %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @submask_broadcastip(i32 %0, i32 %1) {
%3 = xor i32 %1, -1
%4 = or i32 %3, %0
%5 = tail call i32 @submask_unzip(i32 %4)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int _mm_ucomineq_ss(int /*<<< orphan*/, int /*<<< orphan*/);
int test_mm_ucomineq_ss(__m128 A, __m128 B) { return _mm_ucomineq_ss(A, B); }


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

x86 assembly (clang, -O2):
<test_mm_ucomineq_ss>:
jmp    1030 <_mm_ucomineq_ss@plt>

LLVM IR (-O0):
define i32 @test_mm_ucomineq_ss(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @_mm_ucomineq_ss(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_mm_ucomineq_ss(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_ucomineq_ss(i32 %0, i32 %1)
ret i32 %3
}
int owSpeed(int portnum, int new_speed) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @owSpeed(i32 %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ putc(int);
void uart_send_string(char *str) {
  while (*str) {
    putc(*str++);
  }
  putc(0x0d);
  putc(0x0a);
}


x86 assembly (clang, -O0):
<uart_send_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <uart_send_string+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <putc@plt>
jmp    111c <uart_send_string+0xc>
mov    $0xd,%edi
call   1030 <putc@plt>
mov    $0xa,%edi
call   1030 <putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_send_string>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <uart_send_string+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <putc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <uart_send_string+0x10>
mov    $0xd,%edi
call   1030 <putc@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putc@plt>

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

LLVM IR (-O2):
define void @uart_send_string(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @putc(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
%13 = tail call i32 @putc(i32 13)
%14 = tail call i32 @putc(i32 10)
ret void
}
void bd_release(struct block_device *x) { return; }


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

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

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

LLVM IR (-O2):
%struct.block_device = type opaque
define void @bd_release(%struct.block_device* nocapture %0) {
ret void
}
unsigned NI_GPCT_PFI_CLOCK_SRC_BITS(unsigned n) { return 0x20 + n; }


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

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

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

LLVM IR (-O2):
define i32 @NI_GPCT_PFI_CLOCK_SRC_BITS(i32 %0) {
%2 = add i32 %0, 32
ret i32 %2
}
int test_imm_07int64_highword_reg(long long val) {
  return ((val >> 32) & (0x07 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_07int64_highword_reg>:
movabs $0x700000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_07int64_highword_reg(i64 %0) {
%2 = and i64 %0, 30064771072
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ assert(size_t);
int /*<<< orphan*/ gn_fatal(char *);
void *malloc(size_t);
void *gn_malloc(size_t size) {
  assert(size);
  void *mem = malloc(size);
  if (!mem)
    gn_fatal("out of memory");
  return mem;
}


x86 assembly (clang, -O0):
<gn_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1169 <gn_malloc+0x39>
lea    0xe9c(%rip),%rdi
call   1040 <gn_fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gn_malloc>:
push   %rbx
mov    %rdi,%rbx
call   1030 <assert@plt>
mov    %rbx,%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1155 <gn_malloc+0x25>
lea    0xeb0(%rip),%rdi
call   1040 <gn_fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"out of memory\00"
define i8* @gn_malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i32 @assert(i64 %4)
%6 = load i64, i64* %2
%7 = call i8* @malloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = icmp ne i8* %8, null
br i1 %9, label %12, label %10
10: ; preds = %1
%11 = call i32 @gn_fatal(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@.str = [14 x i8] c"out of memory\00"
define noalias i8* @gn_malloc(i64 %0) {
%2 = tail call i32 @assert(i64 %0)
%3 = tail call i8* @malloc(i64 %0)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @gn_fatal(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
ret i8* %3
}
int dosquit(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @dosquit() {
ret i32 1
}
void settilecolor(char x, char y, unsigned char c) {
  unsigned short ofs = 0x4000 + 192 * 32 + x * 2 + y * 64;
  *((char *)ofs) = c;
  *((char *)ofs + 1) = c;
  *((char *)ofs + 32) = c;
  *((char *)ofs + 33) = c;
}


x86 assembly (clang, -O0):
<settilecolor>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
movsbl -0x1(%rbp),%eax
shl    $0x1,%eax
add    $0x5800,%eax
movsbl -0x2(%rbp),%ecx
shl    $0x6,%ecx
add    %ecx,%eax
mov    %ax,-0x6(%rbp)
mov    -0x3(%rbp),%cl
movzwl -0x6(%rbp),%eax
mov    %cl,(%rax)
mov    -0x3(%rbp),%cl
movzwl -0x6(%rbp),%eax
mov    %cl,0x1(%rax)
mov    -0x3(%rbp),%cl
movzwl -0x6(%rbp),%eax
mov    %cl,0x20(%rax)
mov    -0x3(%rbp),%cl
movzwl -0x6(%rbp),%eax
mov    %cl,0x21(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<settilecolor>:
shl    $0x6,%esi
lea    (%rsi,%rdi,2),%eax
add    $0x5800,%eax
movzwl %ax,%eax
mov    %dl,(%rax)
mov    %dl,0x1(%rax)
mov    %dl,0x20(%rax)
mov    %dl,0x21(%rax)
ret

LLVM IR (-O0):
define void @settilecolor(i8 signext %0, i8 signext %1, i8 zeroext %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
%7 = alloca i16
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%8 = load i8, i8* %4
%9 = sext i8 %8 to i32
%10 = mul nsw i32 %9, 2
%11 = add nsw i32 22528, %10
%12 = load i8, i8* %5
%13 = sext i8 %12 to i32
%14 = mul nsw i32 %13, 64
%15 = add nsw i32 %11, %14
%16 = trunc i32 %15 to i16
store i16 %16, i16* %7
%17 = load i8, i8* %6
%18 = load i16, i16* %7
%19 = zext i16 %18 to i64
%20 = inttoptr i64 %19 to i8*
store i8 %17, i8* %20
%21 = load i8, i8* %6
%22 = load i16, i16* %7
%23 = zext i16 %22 to i64
%24 = inttoptr i64 %23 to i8*
%25 = getelementptr inbounds i8, i8* %24, i64 1
store i8 %21, i8* %25
%26 = load i8, i8* %6
%27 = load i16, i16* %7
%28 = zext i16 %27 to i64
%29 = inttoptr i64 %28 to i8*
%30 = getelementptr inbounds i8, i8* %29, i64 32
store i8 %26, i8* %30
%31 = load i8, i8* %6
%32 = load i16, i16* %7
%33 = zext i16 %32 to i64
%34 = inttoptr i64 %33 to i8*
%35 = getelementptr inbounds i8, i8* %34, i64 33
store i8 %31, i8* %35
ret void
}

LLVM IR (-O2):
define void @settilecolor(i8 signext %0, i8 signext %1, i8 zeroext %2) {
%4 = sext i8 %0 to i64
%5 = shl nsw i64 %4, 1
%6 = add nsw i64 %5, 22528
%7 = sext i8 %1 to i64
%8 = shl nsw i64 %7, 6
%9 = add nsw i64 %6, %8
%10 = and i64 %9, 65534
%11 = inttoptr i64 %10 to i8*
store i8 %2, i8* %11
%12 = getelementptr inbounds i8, i8* %11, i64 1
store i8 %2, i8* %12
%13 = getelementptr inbounds i8, i8* %11, i64 32
store i8 %2, i8* %13
%14 = getelementptr inbounds i8, i8* %11, i64 33
store i8 %2, i8* %14
ret void
}
/* Variables and functions */
unsigned char *hmac_tiger2(unsigned char *, unsigned char const *, size_t,
                           unsigned char const *, size_t);
unsigned char *mac_hmac_tiger2(unsigned char *out, const unsigned char *key,
                               size_t key_len, const unsigned char *msg,
                               size_t msg_len) {
  return hmac_tiger2(out, key, key_len, msg, msg_len);
}


x86 assembly (clang, -O0):
<mac_hmac_tiger2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1030 <hmac_tiger2@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mac_hmac_tiger2>:
jmp    1030 <hmac_tiger2@plt>

LLVM IR (-O0):
define i8* @mac_hmac_tiger2(i8* %0, i8* %1, i64 %2, i8* %3, i64 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i8*
%10 = alloca i64
store i8* %0, i8** %6
store i8* %1, i8** %7
store i64 %2, i64* %8
store i8* %3, i8** %9
store i64 %4, i64* %10
%11 = load i8*, i8** %6
%12 = load i8*, i8** %7
%13 = load i64, i64* %8
%14 = load i8*, i8** %9
%15 = load i64, i64* %10
%16 = call i8* @hmac_tiger2(i8* %11, i8* %12, i64 %13, i8* %14, i64 %15)
ret i8* %16
}

LLVM IR (-O2):
define i8* @mac_hmac_tiger2(i8* %0, i8* %1, i64 %2, i8* %3, i64 %4) {
%6 = tail call i8* @hmac_tiger2(i8* %0, i8* %1, i64 %2, i8* %3, i64 %4)
ret i8* %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int __fchown(int fd, uid_t owner, gid_t group) {
  if (fd < 0) {
    __set_errno(EINVAL);
    return -1;
  }
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<__fchown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1145 <__fchown+0x35>
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    115a <__fchown+0x4a>
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__fchown>:
push   %rax
test   %edi,%edi
jns    111e <__fchown+0xe>
mov    0x2ebc(%rip),%rax
jmp    1125 <__fchown+0x15>
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@EINVAL = global i32 0
@ENOSYS = global i32 0
define i32 @__fchown(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %5
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %3
%11 = load i32, i32* @EINVAL
%12 = call i32 @__set_errno(i32 %11)
store i32 -1, i32* %4
br label %16
13: ; preds = %3
%14 = load i32, i32* @ENOSYS
%15 = call i32 @__set_errno(i32 %14)
store i32 -1, i32* %4
br label %16
16: ; preds = %13, %10
%17 = load i32, i32* %4
ret i32 %17
}

LLVM IR (-O2):
@EINVAL = global i32 0
@ENOSYS = global i32 0
define i32 @__fchown(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, 0
%5 = load i32, i32* @EINVAL
%6 = load i32, i32* @ENOSYS
%7 = select i1 %4, i32 %5, i32 %6
%8 = tail call i32 @__set_errno(i32 %7)
ret i32 -1
}
/* Variables and functions */
int f();
main() {
  int x[] = {f(), f(), f()};
  struct {
    int i, j, k;
  } y = {f(), f(), f()};
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1030 <f@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <f@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <f@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <f@plt>
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <f@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1030 <f@plt>
mov    %eax,-0x10(%rbp)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.anon = type { i32, i32, i32 }
define i32 @main() {
%1 = alloca [3 x i32]
%2 = alloca %struct.anon
%3 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%4 = call i32 (...) @f()
store i32 %4, i32* %3
%5 = getelementptr inbounds i32, i32* %3, i64 1
%6 = call i32 (...) @f()
store i32 %6, i32* %5
%7 = getelementptr inbounds i32, i32* %5, i64 1
%8 = call i32 (...) @f()
store i32 %8, i32* %7
%9 = getelementptr inbounds %struct.anon, %struct.anon* %2, i32 0, i32 0
%10 = call i32 (...) @f()
store i32 %10, i32* %9
%11 = getelementptr inbounds %struct.anon, %struct.anon* %2, i32 0, i32 1
%12 = call i32 (...) @f()
store i32 %12, i32* %11
%13 = getelementptr inbounds %struct.anon, %struct.anon* %2, i32 0, i32 2
%14 = call i32 (...) @f()
store i32 %14, i32* %13
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f()
%2 = tail call i32 (...) @f()
%3 = tail call i32 (...) @f()
%4 = tail call i32 (...) @f()
%5 = tail call i32 (...) @f()
%6 = tail call i32 (...) @f()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ GetGf18(int);
int /*<<< orphan*/ SetGf18(int, int);
void ClearGf1Ints(void) {
  int i;
  SetGf18(0x41, 0x00);
  SetGf18(0x45, 0x00);
  SetGf18(0x49, 0x00);
  GetGf18(0x41);
  GetGf18(0x49);
  for (i = 0; i < 32; i++)
    ;
  GetGf18(0x8F);
}


x86 assembly (clang, -O0):
<ClearGf1Ints>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x41,%edi
xor    %esi,%esi
call   1040 <SetGf18@plt>
mov    $0x45,%edi
xor    %esi,%esi
call   1040 <SetGf18@plt>
mov    $0x49,%edi
xor    %esi,%esi
call   1040 <SetGf18@plt>
mov    $0x41,%edi
call   1030 <GetGf18@plt>
mov    $0x49,%edi
call   1030 <GetGf18@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x20,-0x4(%rbp)
jge    1184 <ClearGf1Ints+0x64>
jmp    1176 <ClearGf1Ints+0x56>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1167 <ClearGf1Ints+0x47>
mov    $0x8f,%edi
call   1030 <GetGf18@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ClearGf1Ints>:
push   %rax
mov    $0x41,%edi
xor    %esi,%esi
call   1040 <SetGf18@plt>
mov    $0x45,%edi
xor    %esi,%esi
call   1040 <SetGf18@plt>
mov    $0x49,%edi
xor    %esi,%esi
call   1040 <SetGf18@plt>
mov    $0x41,%edi
call   1030 <GetGf18@plt>
mov    $0x49,%edi
call   1030 <GetGf18@plt>
mov    $0x8f,%edi
pop    %rax
jmp    1030 <GetGf18@plt>

LLVM IR (-O0):
define void @ClearGf1Ints() {
%1 = alloca i32
%2 = call i32 @SetGf18(i32 65, i32 0)
%3 = call i32 @SetGf18(i32 69, i32 0)
%4 = call i32 @SetGf18(i32 73, i32 0)
%5 = call i32 @GetGf18(i32 65)
%6 = call i32 @GetGf18(i32 73)
store i32 0, i32* %1
br label %7
7: ; preds = %11, %0
%8 = load i32, i32* %1
%9 = icmp slt i32 %8, 32
br i1 %9, label %10, label %14
10: ; preds = %7
br label %11
11: ; preds = %10
%12 = load i32, i32* %1
%13 = add nsw i32 %12, 1
store i32 %13, i32* %1
br label %7
14: ; preds = %7
%15 = call i32 @GetGf18(i32 143)
ret void
}

LLVM IR (-O2):
define void @ClearGf1Ints() {
%1 = tail call i32 @SetGf18(i32 65, i32 0)
%2 = tail call i32 @SetGf18(i32 69, i32 0)
%3 = tail call i32 @SetGf18(i32 73, i32 0)
%4 = tail call i32 @GetGf18(i32 65)
%5 = tail call i32 @GetGf18(i32 73)
%6 = tail call i32 @GetGf18(i32 143)
ret void
}
char *langRomTypeSccExtended() { return "SCC Extended"; }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"SCC Extended\00"
define i8* @langRomTypeSccExtended() {
ret i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [13 x i8] c"SCC Extended\00"
define i8* @langRomTypeSccExtended() {
ret i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ dec2bin(char *, int);
int /*<<< orphan*/ printf(char *);
void bit_and(int flag, int mask) {
  dec2bin("   flag ", flag);
  dec2bin("   mask ", mask);
  dec2bin("and (&) ", flag & mask);
  printf("\n");
}


x86 assembly (clang, -O0):
<bit_and>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
lea    0xec8(%rip),%rdi
call   1040 <dec2bin@plt>
mov    -0x8(%rbp),%esi
lea    0xec2(%rip),%rdi
call   1040 <dec2bin@plt>
mov    -0x4(%rbp),%esi
and    -0x8(%rbp),%esi
lea    0xeb9(%rip),%rdi
call   1040 <dec2bin@plt>
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_and>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xed2(%rip),%rdi
mov    %ebp,%esi
call   1040 <dec2bin@plt>
lea    0xecd(%rip),%rdi
mov    %ebx,%esi
call   1040 <dec2bin@plt>
and    %ebp,%ebx
lea    0xec6(%rip),%rdi
mov    %ebx,%esi
call   1040 <dec2bin@plt>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [9 x i8] c" flag \00"
@.str.1 = [9 x i8] c" mask \00"
@.str.2 = [9 x i8] c"and (&) \00"
@.str.3 = [2 x i8] c"\0A\00"
define void @bit_and(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = call i32 @dec2bin(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %4
%8 = call i32 @dec2bin(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = and i32 %9, %10
%12 = call i32 @dec2bin(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c" flag \00"
@.str.1 = [9 x i8] c" mask \00"
@.str.2 = [9 x i8] c"and (&) \00"
define void @bit_and(i32 %0, i32 %1) {
%3 = tail call i32 @dec2bin(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = tail call i32 @dec2bin(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %1)
%5 = and i32 %1, %0
%6 = tail call i32 @dec2bin(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = tail call i32 @putchar(i32 10)
ret void
}
void rpdrs_(dx, dy, dz) short *dx, *dy, *dz;
{ rpdr((float)*dx, (float)*dy, (float)*dz); }


x86 assembly (clang, -O0):
<rpdrs_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%eax
cvtsi2ss %eax,%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movswl (%rax),%eax
cvtsi2ss %eax,%xmm1
cvtss2sd %xmm1,%xmm1
mov    -0x18(%rbp),%rax
movswl (%rax),%eax
cvtsi2ss %eax,%xmm2
cvtss2sd %xmm2,%xmm2
mov    $0x3,%al
call   1030 <rpdr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rpdrs_>:
movswl (%rdi),%eax
cvtsi2sd %eax,%xmm0
movswl (%rsi),%eax
cvtsi2sd %eax,%xmm1
movswl (%rdx),%eax
cvtsi2sd %eax,%xmm2
mov    $0x3,%al
jmp    1030 <rpdr@plt>

LLVM IR (-O0):
define void @rpdrs_(i16* %0, i16* %1, i16* %2) {
%4 = alloca i16*
%5 = alloca i16*
%6 = alloca i16*
store i16* %0, i16** %4
store i16* %1, i16** %5
store i16* %2, i16** %6
%7 = load i16*, i16** %4
%8 = load i16, i16* %7
%9 = sitofp i16 %8 to float
%10 = fpext float %9 to double
%11 = load i16*, i16** %5
%12 = load i16, i16* %11
%13 = sitofp i16 %12 to float
%14 = fpext float %13 to double
%15 = load i16*, i16** %6
%16 = load i16, i16* %15
%17 = sitofp i16 %16 to float
%18 = fpext float %17 to double
%19 = call i32 (double, double, double, ...) bitcast (i32 (...)* @rpdr to i32 (double, double, double, ...)*)(double %10, double %14, double %18)
ret void
}

LLVM IR (-O2):
define void @rpdrs_(i16* nocapture %0, i16* nocapture %1, i16* nocapture %2) {
%4 = load i16, i16* %0
%5 = sitofp i16 %4 to double
%6 = load i16, i16* %1
%7 = sitofp i16 %6 to double
%8 = load i16, i16* %2
%9 = sitofp i16 %8 to double
%10 = tail call i32 (double, double, double, ...) bitcast (i32 (...)* @rpdr to i32 (double, double, double, ...)*)(double %5, double %7, double %9)
ret void
}
void rlSetAgentConnection(int agentConnection) {}


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

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

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

LLVM IR (-O2):
define void @rlSetAgentConnection(i32 %0) {
ret void
}
/* Variables and functions */
scalar_t__ AA_MAX(int /*<<< orphan*/, scalar_t__);
int AA_MIN(int, int);
int aa_cla_sgelsd_smlsiz();
scalar_t__ log2(int);
int aa_cla_sgelsd_nlvl(int m, int n) {
  int minmn = AA_MIN(m, n);
  int smlsiz = aa_cla_sgelsd_smlsiz();
  return (int)AA_MAX(0, 1 + log2(minmn / (1 + smlsiz)));
}


x86 assembly (clang, -O0):
<aa_cla_sgelsd_nlvl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <AA_MIN@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1060 <aa_cla_sgelsd_smlsiz@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
add    $0x1,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <log2@plt>
mov    %rax,%rsi
add    $0x1,%rsi
xor    %edi,%edi
call   1050 <AA_MAX@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aa_cla_sgelsd_nlvl>:
push   %rbx
call   1040 <AA_MIN@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1060 <aa_cla_sgelsd_smlsiz@plt>
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ebx,%eax
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <log2@plt>
lea    0x1(%rax),%rsi
xor    %edi,%edi
pop    %rbx
jmp    1050 <AA_MAX@plt>

LLVM IR (-O0):
define i32 @aa_cla_sgelsd_nlvl(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = call i32 @AA_MIN(i32 %7, i32 %8)
store i32 %9, i32* %5
%10 = call i32 (...) @aa_cla_sgelsd_smlsiz()
store i32 %10, i32* %6
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = add nsw i32 1, %12
%14 = sdiv i32 %11, %13
%15 = call i64 @log2(i32 %14)
%16 = add nsw i64 1, %15
%17 = call i64 @AA_MAX(i32 0, i64 %16)
%18 = trunc i64 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @aa_cla_sgelsd_nlvl(i32 %0, i32 %1) {
%3 = tail call i32 @AA_MIN(i32 %0, i32 %1)
%4 = tail call i32 (...) @aa_cla_sgelsd_smlsiz()
%5 = add nsw i32 %4, 1
%6 = sdiv i32 %3, %5
%7 = tail call i64 @log2(i32 %6)
%8 = add nsw i64 %7, 1
%9 = tail call i64 @AA_MAX(i32 0, i64 %8)
%10 = trunc i64 %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int song(int);
int main() {
  while ((song(99), exit(0), 0)) {
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x63,%edi
call   1030 <song@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x63,%edi
call   1030 <song@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %6, %0
%3 = call i32 @song(i32 99)
%4 = call i32 @exit(i32 0)
unreachable
5: ; No predecessors!
br i1 false, label %6, label %7
6: ; preds = %5
br label %2
7: ; preds = %5
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @song(i32 99)
%2 = tail call i32 @exit(i32 0)
unreachable
}
void g_rand_double() {}


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

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

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

LLVM IR (-O2):
define void @g_rand_double() {
ret void
}
/* Variables and functions */
int strtol(char const *, void *, int);
int atoi(const char *nptr) { return strtol(nptr, ((void *)0), 10); }


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

x86 assembly (clang, -O2):
<atoi>:
xor    %esi,%esi
mov    $0xa,%edx
jmp    1030 <strtol@plt>

LLVM IR (-O0):
define i32 @atoi(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strtol(i8* %3, i8* null, i32 10)
ret i32 %4
}

LLVM IR (-O2):
define i32 @atoi(i8* nocapture %0) {
%2 = tail call i32 @strtol(i8* nocapture %0, i8* null, i32 10)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fork();
int second() {
  fork();
  return 12;
}


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

x86 assembly (clang, -O2):
<second>:
push   %rax
xor    %eax,%eax
call   1030 <fork@plt>
mov    $0xc,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @second() {
%1 = call i32 (...) @fork()
ret i32 12
}

LLVM IR (-O2):
define i32 @second() {
%1 = tail call i32 (...) @fork()
ret i32 12
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, int, char const *, char *);
char *strerror(int);
void open_fail(const char *name, int error) {
  printf("Error %d opening %s: %s\n", error, name, strerror(error));
  exit(1);
}


x86 assembly (clang, -O0):
<open_fail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <strerror@plt>
mov    -0x1c(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    %rax,%rcx
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<open_fail>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
mov    %esi,%edi
call   1050 <strerror@plt>
lea    0xeb9(%rip),%rdi
mov    %ebx,%esi
mov    %r14,%rdx
mov    %rax,%rcx
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Error %d opening %s: %s\0A\00"
define void @open_fail(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i8* @strerror(i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %5, i8* %6, i8* %8)
%10 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [25 x i8] c"Error %d opening %s: %s\0A\00"
define void @open_fail(i8* %0, i32 %1) {
%3 = tail call i8* @strerror(i32 %1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %0, i8* %3)
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
struct instrument {
  int dummy;
};

/* Variables and functions */
int inst_qryint(struct instrument *, char *);
int inst_488_2_esr(struct instrument *gd) { return inst_qryint(gd, "*ESR?\n"); }


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

x86 assembly (clang, -O2):
<inst_488_2_esr>:
lea    0xee9(%rip),%rsi
jmp    1030 <inst_qryint@plt>

LLVM IR (-O0):
%struct.instrument = type { i32 }
@.str = [7 x i8] c"*ESR?\0A\00"
define i32 @inst_488_2_esr(%struct.instrument* %0) {
%2 = alloca %struct.instrument*
store %struct.instrument* %0, %struct.instrument** %2
%3 = load %struct.instrument*, %struct.instrument** %2
%4 = call i32 @inst_qryint(%struct.instrument* %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}

LLVM IR (-O2):
%struct.instrument = type { i32 }
@.str = [7 x i8] c"*ESR?\0A\00"
define i32 @inst_488_2_esr(%struct.instrument* %0) {
%2 = tail call i32 @inst_qryint(%struct.instrument* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
/* Variables and functions */
int get_stcsbb1(int, int, int *);
int /*<<< orphan*/ printf(char *, int, int, int, int, int);
void print_stcsbb1(int a, int b, int mask) {
  int f, r;
  f = get_stcsbb1(a, b, &r);
  f &= mask;
  printf("stcsbb"
         " 1"
         " %08x %08x %08x %08x %08x\n",
         a, b, r, f, mask);
}


x86 assembly (clang, -O0):
<print_stcsbb1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
lea    -0x14(%rbp),%rdx
call   1040 <get_stcsbb1@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    -0xc(%rbp),%r9d
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_stcsbb1>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
lea    0xc(%rsp),%rdx
call   1040 <get_stcsbb1@plt>
and    %r14d,%eax
mov    0xc(%rsp),%ecx
lea    0xeb9(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %eax,%r8d
mov    %r14d,%r9d
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [35 x i8] c"stcsbb 1 %08x %08x %08x %08x %08x\0A\00"
define void @print_stcsbb1(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = call i32 @get_stcsbb1(i32 %9, i32 %10, i32* %8)
store i32 %11, i32* %7
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = and i32 %13, %12
store i32 %14, i32* %7
%15 = load i32, i32* %4
%16 = load i32, i32* %5
%17 = load i32, i32* %8
%18 = load i32, i32* %7
%19 = load i32, i32* %6
%20 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %15, i32 %16, i32 %17, i32 %18, i32 %19)
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"stcsbb 1 %08x %08x %08x %08x %08x\0A\00"
define void @print_stcsbb1(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = call i32 @get_stcsbb1(i32 %0, i32 %1, i32* %4)
%7 = and i32 %6, %2
%8 = load i32, i32* %4
%9 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %8, i32 %7, i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int /*<<< orphan*/ __NR_setresgid;
scalar_t__ syscall(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/,
                   int /*<<< orphan*/);
int syscall_setresgid(gid_t rgid, gid_t egid, gid_t sgid) {
  return (int)syscall(__NR_setresgid, rgid, egid, sgid);
}


x86 assembly (clang, -O0):
<syscall_setresgid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscall_setresgid>:
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@__NR_setresgid = global i32 0
define i32 @syscall_setresgid(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* @__NR_setresgid
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i64 @syscall(i32 %7, i32 %8, i32 %9, i32 %10)
%12 = trunc i64 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
@__NR_setresgid = global i32 0
define i32 @syscall_setresgid(i32 %0, i32 %1, i32 %2) {
%4 = load i32, i32* @__NR_setresgid
%5 = tail call i64 @syscall(i32 %4, i32 %0, i32 %1, i32 %2)
%6 = trunc i64 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef scalar_t__ u_short;

/* Variables and functions */
u_short ntohs(u_short netshort) {
  u_short result = 0;
  ((char *)&result)[0] = ((char *)&netshort)[1];
  ((char *)&result)[1] = ((char *)&netshort)[0];
  return result;
}


x86 assembly (clang, -O0):
<ntohs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x7(%rbp),%al
mov    %al,-0x10(%rbp)
mov    -0x8(%rbp),%al
mov    %al,-0xf(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ntohs>:
rol    $0x8,%di
movzwl %di,%eax
ret

LLVM IR (-O0):
define i64 @ntohs(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
store i64 0, i64* %3
%4 = bitcast i64* %2 to i8*
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %5
%7 = bitcast i64* %3 to i8*
%8 = getelementptr inbounds i8, i8* %7, i64 0
store i8 %6, i8* %8
%9 = bitcast i64* %2 to i8*
%10 = getelementptr inbounds i8, i8* %9, i64 0
%11 = load i8, i8* %10
%12 = bitcast i64* %3 to i8*
%13 = getelementptr inbounds i8, i8* %12, i64 1
store i8 %11, i8* %13
%14 = load i64, i64* %3
ret i64 %14
}

LLVM IR (-O2):
define i64 @ntohs(i64 %0) {
%2 = trunc i64 %0 to i16
%3 = tail call i16 @llvm.bswap.i16(i16 %2)
%4 = zext i16 %3 to i64
ret i64 %4
}
void type_2_data_transfer(void) {}


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

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

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

LLVM IR (-O2):
define void @type_2_data_transfer() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("I'm a main project bar.\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"I'm a main project bar.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [24 x i8] c"I'm a main project bar.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int main(int argc, char *argv[]) {
  char *target = 'F';
  char *pattern = "Fr.*Fr.*";
  find_track(target);
  find_track_regex(pattern);
  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)
mov    $0x46,%eax
mov    %rax,-0x18(%rbp)
lea    0xeba(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1030 <find_track@plt>
mov    -0x20(%rbp),%rdi
mov    $0x0,%al
call   1040 <find_track_regex@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x46,%edi
xor    %eax,%eax
call   1030 <find_track@plt>
lea    0xecc(%rip),%rdi
xor    %eax,%eax
call   1040 <find_track_regex@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"Fr.*Fr.*\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* inttoptr (i64 70 to i8*), i8** %6
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8** %7
%8 = load i8*, i8** %6
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @find_track to i32 (i8*, ...)*)(i8* %8)
%10 = load i8*, i8** %7
%11 = call i32 (i8*, ...) bitcast (i32 (...)* @find_track_regex to i32 (i8*, ...)*)(i8* %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"Fr.*Fr.*\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @find_track to i32 (i8*, ...)*)(i8* inttoptr (i64 70 to i8*))
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @find_track_regex to i32 (i8*, ...)*)(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}