xunge/DecIR huggingface dataset:
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
void I2CSlaveIntEnableEx(uint32_t ui32Base, uint32_t ui32IntFlags) {
  ;
  (*((volatile unsigned long *)(ui32Base + 0x0000080C))) |= ui32IntFlags;
}


x86 assembly (clang, -O0):
<I2CSlaveIntEnableEx>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rax
mov    0x80c(%rax),%rcx
or     %rdx,%rcx
mov    %rcx,0x80c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CSlaveIntEnableEx>:
mov    %rdi,-0x8(%rsp)
mov    %rsi,-0x10(%rsp)
mov    -0x10(%rsp),%rax
mov    -0x8(%rsp),%rcx
or     %rax,0x80c(%rcx)
ret

LLVM IR (-O0):
define void @I2CSlaveIntEnableEx(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store volatile i64 %0, i64* %3
store volatile i64 %1, i64* %4
%5 = load volatile i64, i64* %4
%6 = load volatile i64, i64* %3
%7 = add i64 %6, 2060
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
%10 = or i64 %9, %5
store volatile i64 %10, i64* %8
ret void
}

LLVM IR (-O2):
define void @I2CSlaveIntEnableEx(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store volatile i64 %0, i64* %3
store volatile i64 %1, i64* %4
%5 = load volatile i64, i64* %4
%6 = load volatile i64, i64* %3
%7 = add i64 %6, 2060
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
%10 = or i64 %9, %5
store volatile i64 %10, i64* %8
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ find_k_closest(int *, int, int, int);
void main() {
  int a[] = {12, 16, 22, 30, 35, 39, 42, 45, 48, 50, 53, 55, 56};
  int len = sizeof(a) / sizeof(a[0]);
  find_k_closest(a, len, 56, 4);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x40(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x34,%edx
call   1040 <memcpy@plt>
movl   $0xd,-0x44(%rbp)
lea    -0x40(%rbp),%rdi
mov    -0x44(%rbp),%esi
mov    $0x38,%edx
mov    $0x4,%ecx
call   1030 <find_k_closest@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
mov    0xf16(%rip),%eax
mov    %eax,0x30(%rsp)
movaps 0xefb(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xedf(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec3(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0xd,%esi
mov    $0x38,%edx
mov    $0x4,%ecx
call   1030 <find_k_closest@plt>
add    $0x38,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [13 x i32] [i32 12, i32 16, i32 22, i32 30, i32 35, i32 39, i32 42, i32 45, i32 48, i32 50, i32 53, i32 55, i32 56]
define void @main() {
%1 = alloca [13 x i32]
%2 = alloca i32
%3 = bitcast [13 x i32]* %1 to i8*
store i32 13, i32* %2
%4 = getelementptr inbounds [13 x i32], [13 x i32]* %1, i64 0, i64 0
%5 = load i32, i32* %2
%6 = call i32 @find_k_closest(i32* %4, i32 %5, i32 56, i32 4)
ret void
}

LLVM IR (-O2):
@__const.main.a = [13 x i32] [i32 12, i32 16, i32 22, i32 30, i32 35, i32 39, i32 42, i32 45, i32 48, i32 50, i32 53, i32 55, i32 56]
define void @main() {
%1 = alloca [13 x i32]
%2 = bitcast [13 x i32]* %1 to i8*
%3 = getelementptr inbounds [13 x i32], [13 x i32]* %1, i64 0, i64 0
%4 = call i32 @find_k_closest(i32* %3, i32 13, i32 56, i32 4)
ret void
}
char b64char(int x) {
  return "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
         "abcdefghijklmnopqrstuvwxyz0123456789+/"[x];
}


x86 assembly (clang, -O0):
<b64char>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rcx
lea    0xeee(%rip),%rax
movsbl (%rax,%rcx,1),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<b64char>:
movslq %edi,%rax
lea    0xef6(%rip),%rcx
mov    (%rax,%rcx,1),%al
ret

LLVM IR (-O0):
@.str = [65 x i8] c"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\00"
define signext i8 @b64char(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds [65 x i8], [65 x i8]* @.str, i64 0, i64 %4
%6 = load i8, i8* %5
ret i8 %6
}

LLVM IR (-O2):
@.str = [65 x i8] c"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\00"
define signext i8 @b64char(i32 %0) {
%2 = sext i32 %0 to i64
%3 = getelementptr inbounds [65 x i8], [65 x i8]* @.str, i64 0, i64 %2
%4 = load i8, i8* %3
ret i8 %4
}
reg0adrreg1(r0, r1, x0, x1, p0, p1) unsigned char r0, r1;
unsigned char *p0, *p1;
{
  if (r0 <= (p1[1111111 / 4]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<reg0adrreg1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movzbl -0x5(%rbp),%eax
mov    -0x20(%rbp),%rcx
movzbl 0x43d11(%rcx),%ecx
cmp    %ecx,%eax
jg     1141 <reg0adrreg1+0x41>
movl   $0x1,-0x4(%rbp)
jmp    1148 <reg0adrreg1+0x48>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reg0adrreg1>:
movzbl %dil,%ecx
movzbl 0x43d11(%r9),%edx
xor    %eax,%eax
cmp    %edx,%ecx
setbe  %al
ret

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

LLVM IR (-O2):
define i32 @reg0adrreg1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture readnone %4, i8* nocapture %5) {
%7 = and i32 %0, 255
%8 = getelementptr inbounds i8, i8* %5, i64 277777
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = icmp ule i32 %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t read_be_u32(void *s) {
  uint32_t x;
  uint8_t *ptr = (uint8_t *)s;
  x = (ptr[0] << 24) + (ptr[1] << 16) + (ptr[2] << 8) + ptr[3];
  return x;
}


x86 assembly (clang, -O0):
<read_be_u32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
shl    $0x18,%eax
mov    -0x18(%rbp),%rcx
mov    0x4(%rcx),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x18(%rbp),%rcx
mov    0x8(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x18(%rbp),%rcx
add    0xc(%rcx),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_be_u32>:
mov    (%rdi),%eax
mov    0x4(%rdi),%ecx
shl    $0x18,%eax
shl    $0x10,%ecx
add    %eax,%ecx
mov    0x8(%rdi),%eax
shl    $0x8,%eax
add    %ecx,%eax
add    0xc(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @read_be_u32(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = shl i32 %3, 24
%5 = getelementptr inbounds i8, i8* %0, i64 4
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = shl i32 %7, 16
%9 = add nsw i32 %8, %4
%10 = getelementptr inbounds i8, i8* %0, i64 8
%11 = bitcast i8* %10 to i32*
%12 = load i32, i32* %11
%13 = shl i32 %12, 8
%14 = add nsw i32 %9, %13
%15 = getelementptr inbounds i8, i8* %0, i64 12
%16 = bitcast i8* %15 to i32*
%17 = load i32, i32* %16
%18 = add nsw i32 %14, %17
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0xee() {
  Assert_real((isodigit(238) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isodigit.c",
              1195, ("isodigit should be 0 for 0xee"));
}


x86 assembly (clang, -O0):
<t_isodigit_0xee>:
push   %rbp
mov    %rsp,%rbp
mov    $0xee,%edi
call   1040 <isodigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x4ab,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isodigit_0xee>:
push   %rax
mov    $0xee,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x4ab,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xee\00"
define void @t_isodigit_0xee() {
%1 = call i64 @isodigit(i32 238)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1195, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xee\00"
define void @t_isodigit_0xee() {
%1 = tail call i64 @isodigit(i32 238)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1195, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int wycc_type_flags(int);
int wycc_type_is_frac(int id) {
  int flgs = wycc_type_flags(id);
  if (flgs & 8192) {
    return 1;
  };
  return 0;
}


x86 assembly (clang, -O0):
<wycc_type_is_frac>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <wycc_type_flags@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x2000,%eax
cmp    $0x0,%eax
je     1143 <wycc_type_is_frac+0x33>
movl   $0x1,-0x4(%rbp)
jmp    114a <wycc_type_is_frac+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wycc_type_is_frac>:
push   %rax
call   1030 <wycc_type_flags@plt>
shr    $0xd,%eax
and    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @wycc_type_is_frac(i32 %0) {
%2 = tail call i32 @wycc_type_flags(i32 %0)
%3 = lshr i32 %2, 13
%4 = and i32 %3, 1
ret i32 %4
}
int main(void) {
  char arr[] = {1, 2, 3, 4};
  char *ptr = (char *)arr;
  return (int)*ptr;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    0xeef(%rip),%eax
mov    %eax,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.arr = [4 x i8] c"\01\02\03\04"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i8]
%3 = alloca i8*
store i32 0, i32* %1
%4 = bitcast [4 x i8]* %2 to i8*
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, scalar_t__);
scalar_t__ strlen(char *);
void strcpy(char *dest, char *src) { memcpy(dest, src, strlen(src) + 1); }


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
call   1040 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <memcpy@plt>

LLVM IR (-O0):
define void @strcpy(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i64 @strlen(i8* %7)
%9 = add nsw i64 %8, 1
%10 = call i32 @memcpy(i8* %5, i8* %6, i64 %9)
ret void
}

LLVM IR (-O2):
define void @strcpy(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = add nsw i64 %3, 1
%5 = tail call i32 @memcpy(i8* %0, i8* %1, i64 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *);
int /*<<< orphan*/ fputs_unlocked(char *);
int main() {
  fputs("");
  fputs_unlocked("");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <fputs@plt>
mov    %rbx,%rdi
call   1040 <fputs_unlocked@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @fputs(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @fputs_unlocked(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @main() {
%1 = tail call i32 @fputs(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @fputs_unlocked(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct wl_surface {
  int dummy;
};
struct wl_region {
  int dummy;
};
struct wl_proxy {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_proxy_marshal(struct wl_proxy *, int, struct wl_region *);
void wl_surface_set_opaque_region(struct wl_surface *wl_surface,
                                  struct wl_region *region) {
  wl_proxy_marshal((struct wl_proxy *)wl_surface, 4, region);
}


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

x86 assembly (clang, -O2):
<wl_surface_set_opaque_region>:
mov    %rsi,%rdx
mov    $0x4,%esi
jmp    1030 <wl_proxy_marshal@plt>

LLVM IR (-O0):
%struct.wl_surface = type { i32 }
%struct.wl_region = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_surface_set_opaque_region(%struct.wl_surface* %0, %struct.wl_region* %1) {
%3 = alloca %struct.wl_surface*
%4 = alloca %struct.wl_region*
store %struct.wl_surface* %0, %struct.wl_surface** %3
store %struct.wl_region* %1, %struct.wl_region** %4
%5 = load %struct.wl_surface*, %struct.wl_surface** %3
%6 = bitcast %struct.wl_surface* %5 to %struct.wl_proxy*
%7 = load %struct.wl_region*, %struct.wl_region** %4
%8 = call i32 @wl_proxy_marshal(%struct.wl_proxy* %6, i32 4, %struct.wl_region* %7)
ret void
}

LLVM IR (-O2):
%struct.wl_surface = type { i32 }
%struct.wl_region = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_surface_set_opaque_region(%struct.wl_surface* %0, %struct.wl_region* %1) {
%3 = bitcast %struct.wl_surface* %0 to %struct.wl_proxy*
%4 = tail call i32 @wl_proxy_marshal(%struct.wl_proxy* %3, i32 4, %struct.wl_region* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ g(float);
int /*<<< orphan*/ h();
long stub1(int, float);
long stub2(int, float);
long stub3(int, float);
void f(void) {
  h();
  g(3);
  g(3.4);
  g(3.4f);
  long int (*k)(int, float);
  (*k)(1, 23);
  (*k)(1, 2.3);
  (*k)(1.2f, 3.4f);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <h@plt>
movss  0xed5(%rip),%xmm0
call   1040 <g@plt>
movss  0xebc(%rip),%xmm0
call   1040 <g@plt>
movss  0xeaf(%rip),%xmm0
call   1040 <g@plt>
mov    $0x1,%edi
movss  0xea5(%rip),%xmm0
call   *-0x8(%rbp)
mov    $0x1,%edi
movss  0xe91(%rip),%xmm0
call   *-0x8(%rbp)
mov    $0x1,%edi
movss  0xe7d(%rip),%xmm0
call   *-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
xor    %eax,%eax
call   1030 <h@plt>
movss  0xed0(%rip),%xmm0
call   1040 <g@plt>
movss  0xec7(%rip),%xmm0
call   1040 <g@plt>
movss  0xeba(%rip),%xmm0
call   1040 <g@plt>

LLVM IR (-O0):
define void @f() {
%1 = alloca i64 (i32, float)*
%2 = call i32 (...) @h()
%3 = call i32 @g(float 3.000000e+00)
%4 = call i32 @g(float 0x400B333340000000)
%5 = call i32 @g(float 0x400B333340000000)
%6 = load i64 (i32, float)*, i64 (i32, float)** %1
%7 = call i64 %6(i32 1, float 2.300000e+01)
%8 = load i64 (i32, float)*, i64 (i32, float)** %1
%9 = call i64 %8(i32 1, float 0x4002666660000000)
%10 = load i64 (i32, float)*, i64 (i32, float)** %1
%11 = call i64 %10(i32 1, float 0x400B333340000000)
ret void
}

LLVM IR (-O2):
define void @f() {
%1 = tail call i32 (...) @h()
%2 = tail call i32 @g(float 3.000000e+00)
%3 = tail call i32 @g(float 0x400B333340000000)
%4 = tail call i32 @g(float 0x400B333340000000)
unreachable
}
/* Type definitions */
typedef scalar_t__ time_t;

/* Variables and functions */
scalar_t__ time(int /*<<< orphan*/ *);
long int TIME_get_epoch(void) {
  time_t now;
  now = time(NULL);
  return (long int)now;
}


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

x86 assembly (clang, -O2):
<TIME_get_epoch>:
xor    %edi,%edi
jmp    1030 <time@plt>

LLVM IR (-O0):
define i64 @TIME_get_epoch() {
%1 = alloca i64
%2 = call i64 @time(i32* null)
store i64 %2, i64* %1
%3 = load i64, i64* %1
ret i64 %3
}

LLVM IR (-O2):
define i64 @TIME_get_epoch() {
%1 = tail call i64 @time(i32* null)
ret i64 %1
}
void greport_cleanup(void) {}


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

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

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

LLVM IR (-O2):
define void @greport_cleanup() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _close_pending();
int /*<<< orphan*/ printf(char *, char *);
_itx(char *should) {
  _close_pending();
  printf("\t\x1B[36m%s\x1B[0m\n", should);
}


x86 assembly (clang, -O0):
<_itx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <_close_pending@plt>
mov    -0x10(%rbp),%rsi
lea    0xec2(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_itx>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <_close_pending@plt>
lea    0xece(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"\09\1B[36m%s\1B[0m\0A\00"
define i32 @_itx(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i32 (...) @_close_pending()
%5 = load i8*, i8** %3
%6 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i32, i32* %2
ret i32 %7
}

LLVM IR (-O2):
@.str = [14 x i8] c"\09\1B[36m%s\1B[0m\0A\00"
define i32 @_itx(i8* %0) {
%2 = tail call i32 (...) @_close_pending()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 undef
}
void TRACE(const char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @TRACE(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
int /*<<< orphan*/ debugf(char *, int);
int /*<<< orphan*/ kill_all();
__attribute__((noreturn)) void die(int code) {
  debugf("reaper: die with code %d", code);
  kill_all();
  _exit(code);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xebb(%rip),%rdi
call   1040 <debugf@plt>
mov    $0x0,%al
call   1050 <kill_all@plt>
mov    -0x4(%rbp),%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rdi
mov    %ebx,%esi
call   1040 <debugf@plt>
xor    %eax,%eax
call   1050 <kill_all@plt>
mov    %ebx,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"reaper: die with code %d\00"
define void @die(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @debugf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 (...) @kill_all()
%6 = load i32, i32* %2
%7 = call i32 @_exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@.str = [25 x i8] c"reaper: die with code %d\00"
define void @die(i32 %0) {
%2 = tail call i32 @debugf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 (...) @kill_all()
%4 = tail call i32 @_exit(i32 %0)
unreachable
}
double chdtr(df, x)
double df, x;
{
  if ((x < 0.0) || (df < 1.0)) {
    mtherr("chdtr", 1);
    return (0.0);
  }
  return (igam(df / 2.0, x / 2.0));
}


x86 assembly (clang, -O0):
<chdtr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
ja     1153 <chdtr+0x33>
movsd  0xeb8(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1173 <chdtr+0x53>
lea    0xeb6(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1040 <mtherr@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11a5 <chdtr+0x85>
movsd  -0x10(%rbp),%xmm0
movsd  0xe88(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xe77(%rip),%xmm2
divsd  %xmm2,%xmm1
mov    $0x2,%al
call   1030 <igam@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chdtr>:
push   %rax
movsd  0xed7(%rip),%xmm2
ucomisd %xmm0,%xmm2
ja     1159 <chdtr+0x39>
xorpd  %xmm2,%xmm2
ucomisd %xmm1,%xmm2
ja     1159 <chdtr+0x39>
movsd  0xec7(%rip),%xmm2
mulsd  %xmm2,%xmm0
mulsd  %xmm2,%xmm1
mov    $0x2,%al
call   1030 <igam@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rax
ret
lea    0xeb0(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <mtherr@plt>
xorpd  %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [6 x i8] c"chdtr\00"
define double @chdtr(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %5
%7 = fcmp olt double %6, 0.000000e+00
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load double, double* %4
%10 = fcmp olt double %9, 1.000000e+00
br i1 %10, label %11, label %13
11: ; preds = %8, %2
%12 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @mtherr to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 1)
store double 0.000000e+00, double* %3
br label %20
13: ; preds = %8
%14 = load double, double* %4
%15 = fdiv double %14, 2.000000e+00
%16 = load double, double* %5
%17 = fdiv double %16, 2.000000e+00
%18 = call i32 (double, double, ...) bitcast (i32 (...)* @igam to i32 (double, double, ...)*)(double %15, double %17)
%19 = sitofp i32 %18 to double
store double %19, double* %3
br label %20
20: ; preds = %13, %11
%21 = load double, double* %3
ret double %21
}

LLVM IR (-O2):
@.str = [6 x i8] c"chdtr\00"
define double @chdtr(double %0, double %1) {
%3 = fcmp olt double %1, 0.000000e+00
%4 = fcmp olt double %0, 1.000000e+00
%5 = or i1 %4, %3
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @mtherr to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 1)
br label %13
8: ; preds = %2
%9 = fmul double %0, 5.000000e-01
%10 = fmul double %1, 5.000000e-01
%11 = tail call i32 (double, double, ...) bitcast (i32 (...)* @igam to i32 (double, double, ...)*)(double %9, double %10)
%12 = sitofp i32 %11 to double
br label %13
13: ; preds = %8, %6
%14 = phi double [ 0.000000e+00, %6 ], [ %12, %8 ]
ret double %14
}
/* Variables and functions */
size_t strlen(const char *string) {
  size_t result = 0;
  while (string[result]) {
    result++;
  }
  return result;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1133 <strlen+0x33>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen+0x10>
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ smile();
int main(void) {
  smile();
  smile();
  smile();
  printf("\n");
  smile();
  smile();
  printf("\n");
  smile();
  printf("\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <smile@plt>
xor    %eax,%eax
call   1040 <smile@plt>
xor    %eax,%eax
call   1040 <smile@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <smile@plt>
xor    %eax,%eax
call   1040 <smile@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <smile@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @smile()
%2 = tail call i32 (...) @smile()
%3 = tail call i32 (...) @smile()
%4 = tail call i32 @putchar(i32 10)
%5 = tail call i32 (...) @smile()
%6 = tail call i32 (...) @smile()
%7 = tail call i32 @putchar(i32 10)
%8 = tail call i32 (...) @smile()
%9 = tail call i32 @putchar(i32 10)
ret i32 0
}
int VS_NotAFunctionLikelyToEverBeNecessary() { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @VS_NotAFunctionLikelyToEverBeNecessary() {
ret i32 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ __u64;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void print_addr(__u64 addr) {
  if (!addr) {
    return;
  }
  printf("%llx;", addr);
}


x86 assembly (clang, -O0):
<print_addr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    112a <print_addr+0x1a>
jmp    1139 <print_addr+0x29>
mov    -0x4(%rbp),%esi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_addr>:
test   %edi,%edi
je     1122 <print_addr+0x12>
mov    %edi,%esi
lea    0xee3(%rip),%rdi
jmp    1030 <printf@plt>
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%llx;\00"
define void @print_addr(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %5
5: ; preds = %1, %3
ret void
}
void strip_string(char *str) {
  char *c = str;
  char *last_non_white = str;
  while (*c) {
    if (!((*c) == ' ' || (*c) == '\t'))
      last_non_white = c;
    c++;
  }
  if (c > last_non_white)
    *(last_non_white + 1) = 0;
}


x86 assembly (clang, -O0):
<strip_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     115e <strip_string+0x5e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     114d <strip_string+0x4d>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
je     114d <strip_string+0x4d>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1118 <strip_string+0x18>
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jbe    1174 <strip_string+0x74>
mov    -0x18(%rbp),%rax
movb   $0x0,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<strip_string>:
mov    %rdi,%rax
jmp    1114 <strip_string+0x14>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rdi
movzbl (%rdi),%ecx
cmp    $0x9,%cl
je     1110 <strip_string+0x10>
cmp    $0x20,%cl
je     1110 <strip_string+0x10>
test   %cl,%cl
je     112a <strip_string+0x2a>
mov    %rdi,%rax
jmp    1110 <strip_string+0x10>
cmp    %rax,%rdi
jbe    1133 <strip_string+0x33>
movb   $0x0,0x1(%rax)
ret

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

LLVM IR (-O2):
define void @strip_string(i8* %0) {
br label %2
2: ; preds = %7, %1
%3 = phi i8* [ %0, %1 ], [ %9, %7 ]
%4 = phi i8* [ %0, %1 ], [ %8, %7 ]
%5 = load i8, i8* %3
switch i8 %5, label %6 [
i8 0, label %10
i8 32, label %7
i8 9, label %7
]
6: ; preds = %2
br label %7
7: ; preds = %2, %2, %6
%8 = phi i8* [ %3, %6 ], [ %4, %2 ], [ %4, %2 ]
%9 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
10: ; preds = %2
%11 = icmp ugt i8* %3, %4
br i1 %11, label %12, label %14
12: ; preds = %10
%13 = getelementptr inbounds i8, i8* %4, i64 1
store i8 0, i8* %13
br label %14
14: ; preds = %12, %10
ret void
}
/* Variables and functions */
scalar_t__ memcmp(char *, int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main() {
  if (memcmp("test", NULL, 0)) {
    printf("not equal \n");
  } else {
    printf("equal ...\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1040 <memcmp@plt>
cmp    $0x0,%rax
je     115a <main+0x3a>
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
jmp    1166 <main+0x46>
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1040 <memcmp@plt>
test   %rax,%rax
lea    0xeca(%rip),%rax
lea    0xecd(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"test\00"
@.str.1 = [12 x i8] c"not equal \0A\00"
@.str.2 = [11 x i8] c"equal ...\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @memcmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* null, i32 0)
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@.str = [5 x i8] c"test\00"
@str = [10 x i8] c"equal ...\00"
@str.3 = [11 x i8] c"not equal \00"
define i32 @main() {
%1 = tail call i64 @memcmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* null, i32 0)
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @str.3, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ vfprintf(int /*<<< orphan*/, char const *,
                            int /*<<< orphan*/);
void log_vput_internal(const char *format, va_list args) {
  vfprintf(stderr, format, args);
}


x86 assembly (clang, -O0):
<log_vput_internal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <vfprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_vput_internal>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
jmp    1030 <vfprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
define void @log_vput_internal(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @vfprintf(i32 %5, i8* %6, i32 %7)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
define void @log_vput_internal(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @vfprintf(i32 %3, i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *);
void BCFault() { fatal("Illegal bytecode encountered ... SPLAT!"); }


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

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

LLVM IR (-O0):
@.str = [40 x i8] c"Illegal bytecode encountered ... SPLAT!\00"
define void @BCFault() {
%1 = call i32 @fatal(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [40 x i8] c"Illegal bytecode encountered ... SPLAT!\00"
define void @BCFault() {
%1 = tail call i32 @fatal(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
ret void
}
unsigned int number_lenght(unsigned int number) {
  unsigned int mod = 10 % number;
  unsigned int lenght = 0;
  while (mod != 0 && mod != 1) {
    mod = (mod * 10) % number;
    lenght++;
  }
  return lenght;
}


x86 assembly (clang, -O0):
<number_lenght>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0xa,%eax
xor    %edx,%edx
divl   -0x4(%rbp)
mov    %edx,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0xd(%rbp)
je     1134 <number_lenght+0x34>
cmpl   $0x1,-0x8(%rbp)
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1144 <number_lenght+0x44>
jmp    115e <number_lenght+0x5e>
imul   $0xa,-0x8(%rbp),%eax
xor    %edx,%edx
divl   -0x4(%rbp)
mov    %edx,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    111b <number_lenght+0x1b>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<number_lenght>:
xor    %ecx,%ecx
mov    $0xa,%eax
xor    %edx,%edx
div    %edi
cmp    $0x2,%edx
jb     1131 <number_lenght+0x31>
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    %edx,%edx
lea    (%rdx,%rdx,4),%eax
add    $0x1,%ecx
xor    %edx,%edx
div    %edi
cmp    $0x1,%edx
ja     1120 <number_lenght+0x20>
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @number_lenght(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = urem i32 10, %5
store i32 %6, i32* %3
store i32 0, i32* %4
br label %7
7: ; preds = %15, %1
%8 = load i32, i32* %3
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = load i32, i32* %3
%12 = icmp ne i32 %11, 1
br label %13
13: ; preds = %10, %7
%14 = phi i1 [ false, %7 ], [ %12, %10 ]
br i1 %14, label %15, label %22
15: ; preds = %13
%16 = load i32, i32* %3
%17 = mul i32 %16, 10
%18 = load i32, i32* %2
%19 = urem i32 %17, %18
store i32 %19, i32* %3
%20 = load i32, i32* %4
%21 = add i32 %20, 1
store i32 %21, i32* %4
br label %7
22: ; preds = %13
%23 = load i32, i32* %4
ret i32 %23
}

LLVM IR (-O2):
define i32 @number_lenght(i32 %0) {
%2 = urem i32 10, %0
%3 = icmp ult i32 %2, 2
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %9, %4 ], [ %2, %1 ]
%6 = phi i32 [ %8, %4 ], [ 0, %1 ]
%7 = mul i32 %5, 10
%8 = add i32 %6, 1
%9 = urem i32 %7, %0
%10 = icmp ult i32 %9, 2
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
/* Variables and functions */
int devtag_lookup2(char *, size_t, int /*<<< orphan*/ *, int /*<<< orphan*/,
                   char const *);
int devtag_lookup(char *buf, size_t bufsize, const char *devname) {
  return devtag_lookup2(buf, bufsize, NULL, 0, devname);
}


x86 assembly (clang, -O0):
<devtag_lookup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%r8
xor    %eax,%eax
mov    %eax,%edx
xor    %ecx,%ecx
call   1030 <devtag_lookup2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<devtag_lookup>:
mov    %rdx,%r8
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <devtag_lookup2@plt>

LLVM IR (-O0):
define i32 @devtag_lookup(i8* %0, i64 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i64, i64* %5
%9 = load i8*, i8** %6
%10 = call i32 @devtag_lookup2(i8* %7, i64 %8, i32* null, i32 0, i8* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @devtag_lookup(i8* %0, i64 %1, i8* %2) {
%4 = tail call i32 @devtag_lookup2(i8* %0, i64 %1, i32* null, i32 0, i8* %2)
ret i32 %4
}
void touch_hide(void) {}


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

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

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

LLVM IR (-O2):
define void @touch_hide() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_iterate();
void tests(void) { test_iterate(); }


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

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

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

LLVM IR (-O2):
define void @tests() {
%1 = tail call i32 (...) @test_iterate()
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
void csr_writew(uint16_t value, uint32_t addr) {
  *((volatile uint16_t *)addr) = value;
}


x86 assembly (clang, -O0):
<csr_writew>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<csr_writew>:
mov    %edi,(%rsi)
ret

LLVM IR (-O0):
define void @csr_writew(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* %3
%6 = load i64, i64* %4
%7 = inttoptr i64 %6 to i32*
store volatile i32 %5, i32* %7
ret void
}

LLVM IR (-O2):
define void @csr_writew(i32 %0, i64 %1) {
%3 = inttoptr i64 %1 to i32*
store volatile i32 %0, i32* %3
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int permutation_after_dobldobl_loop(int d, int *permutation) {
  int *a, fail;
  double *c;
  fail = _ada_use_c2phc4c(642, a, permutation, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<permutation_after_dobldobl_loop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    $0x282,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<permutation_after_dobldobl_loop>:
mov    %rsi,%rdx
mov    $0x282,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @permutation_after_dobldobl_loop(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca double*
store i32 %0, i32* %3
store i32* %1, i32** %4
%8 = load i32*, i32** %5
%9 = load i32*, i32** %4
%10 = load double*, double** %7
%11 = call i32 @_ada_use_c2phc4c(i32 642, i32* %8, i32* %9, double* %10, i32 0)
store i32 %11, i32* %6
%12 = load i32, i32* %6
ret i32 %12
}

LLVM IR (-O2):
define i32 @permutation_after_dobldobl_loop(i32 %0, i32* %1) {
%3 = tail call i32 @_ada_use_c2phc4c(i32 642, i32* undef, i32* %1, double* undef, i32 0)
ret i32 %3
}
int hash(name)
char *name;
{
  register int result = 0;
  register char *p = name;
  while (*p)
    result = 3 * result + (int)*p++;
  result = result % 1024;
  while (result < 0)
    result = result + 1024;
  return (result);
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1144 <hash+0x44>
imul   $0x3,-0xc(%rbp),%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    1117 <hash+0x17>
mov    -0xc(%rbp),%eax
mov    $0x400,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    116c <hash+0x6c>
mov    -0xc(%rbp),%eax
add    $0x400,%eax
mov    %eax,-0xc(%rbp)
jmp    1152 <hash+0x52>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%al
test   %al,%al
je     1137 <hash+0x37>
add    $0x1,%rdi
xor    %ecx,%ecx
nopl   0x0(%rax)
lea    (%rcx,%rcx,2),%edx
movsbl %al,%ecx
add    %edx,%ecx
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <hash+0x10>
lea    0x3ff(%rcx),%eax
test   %ecx,%ecx
cmovns %ecx,%eax
and    $0xfffffc00,%eax
sub    %eax,%ecx
jmp    1139 <hash+0x39>
xor    %ecx,%ecx
mov    $0x3ff,%eax
sub    %ecx,%eax
and    $0xfffffc00,%eax
add    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %9, %4 ], [ %0, %1 ]
%7 = phi i32 [ %11, %4 ], [ 0, %1 ]
%8 = mul nsw i32 %7, 3
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = sext i8 %5 to i32
%11 = add nsw i32 %8, %10
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = srem i32 %11, 1024
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 0, %1 ], [ %15, %14 ]
%18 = sub nsw i32 1023, %17
%19 = and i32 %18, -1024
%20 = add nsw i32 %17, %19
ret i32 %20
}