xunge/DecIR huggingface dataset:
int strindex(char *s, char c) {
  int i;
  for (i = 0; *(s + i) != 0; i++) {
    if (s[i] == c)
      break;
  }
  return i;
}


x86 assembly (clang, -O0):
<strindex>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     115a <strindex+0x5a>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
jne    1147 <strindex+0x47>
jmp    115a <strindex+0x5a>
jmp    114c <strindex+0x4c>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1115 <strindex+0x15>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strindex>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rdi),%ecx
add    $0x1,%eax
test   %cl,%cl
je     1123 <strindex+0x23>
add    $0x1,%rdi
cmp    %sil,%cl
jne    1110 <strindex+0x10>
ret

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

LLVM IR (-O2):
define i32 @strindex(i8* nocapture %0, i8 signext %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %10, %3 ], [ 0, %2 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = icmp eq i8 %6, %1
%9 = or i1 %7, %8
%10 = add nuw i64 %4, 1
br i1 %9, label %11, label %3
11: ; preds = %3
%12 = trunc i64 %4 to i32
ret i32 %12
}
void foo() { int a[1 / 0]; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rsp,%rax
mov    %rax,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foo() {
%1 = alloca i8*
%2 = alloca i64
%3 = call i8* @llvm.stacksave()
store i8* %3, i8** %1
%4 = alloca i32, i64 poison
store i64 poison, i64* %2
%5 = load i8*, i8** %1
ret void
}

LLVM IR (-O2):
define void @foo() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ writel(int /*<<< orphan*/, void *);
void write_pxpens(unsigned port, uint32_t value) {
  writel(value, (void *)0xb0010000 + (port * 0x100) + (0x74));
}


x86 assembly (clang, -O0):
<write_pxpens>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%eax
shl    $0x8,%eax
mov    %eax,%eax
mov    $0xb0010000,%esi
add    %rax,%rsi
add    $0x74,%rsi
call   1030 <writel@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_pxpens>:
mov    %esi,%eax
shl    $0x8,%edi
mov    $0xb0010074,%esi
add    %rdi,%rsi
mov    %eax,%edi
jmp    1030 <writel@plt>

LLVM IR (-O0):
define void @write_pxpens(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = mul i32 %6, 256
%8 = zext i32 %7 to i64
%9 = getelementptr i8, i8* inttoptr (i64 2952855552 to i8*), i64 %8
%10 = getelementptr i8, i8* %9, i64 116
%11 = call i32 @writel(i32 %5, i8* %10)
ret void
}

LLVM IR (-O2):
define void @write_pxpens(i32 %0, i32 %1) {
%3 = shl i32 %0, 8
%4 = zext i32 %3 to i64
%5 = getelementptr i8, i8* inttoptr (i64 2952855552 to i8*), i64 %4
%6 = getelementptr i8, i8* %5, i64 116
%7 = tail call i32 @writel(i32 %1, i8* %6)
ret void
}
char *numeric_oct_to_bin(char value[]) { return ""; }


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

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

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

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @numeric_oct_to_bin(i8* nocapture readnone %0) {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ ThrowException(int, int, char *, char *);
void InititalizeSecurityFunctions() {
  ThrowException(1, 6, "This function is not implemented yet.",
                 "InititalizeSecurityFunctions");
}


x86 assembly (clang, -O0):
<InititalizeSecurityFunctions>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x6,%esi
lea    0xedb(%rip),%rdx
lea    0xefa(%rip),%rcx
call   1030 <ThrowException@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<InititalizeSecurityFunctions>:
lea    0xee9(%rip),%rdx
lea    0xf08(%rip),%rcx
mov    $0x1,%edi
mov    $0x6,%esi
jmp    1030 <ThrowException@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"This function is not implemented yet.\00"
@.str.1 = [29 x i8] c"InititalizeSecurityFunctions\00"
define void @InititalizeSecurityFunctions() {
%1 = call i32 @ThrowException(i32 1, i32 6, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"This function is not implemented yet.\00"
@.str.1 = [29 x i8] c"InititalizeSecurityFunctions\00"
define void @InititalizeSecurityFunctions() {
%1 = tail call i32 @ThrowException(i32 1, i32 6, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int mfspr(scalar_t__);
int /*<<< orphan*/ mtspr(scalar_t__, int);
int int_enable(unsigned long vect) {
  if (vect >= 32)
    return -1;
  mtspr(((9 << (11)) + 0), mfspr(((9 << (11)) + 0)) | (0x00000001L << vect));
  return 0;
}


x86 assembly (clang, -O0):
<int_enable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x20,-0x10(%rbp)
jb     1143 <int_enable+0x23>
movl   $0xffffffff,-0x4(%rbp)
jmp    1174 <int_enable+0x54>
mov    $0x4800,%edi
call   1030 <mfspr@plt>
cltq
mov    -0x10(%rbp),%rcx
mov    $0x1,%edx
shl    %cl,%rdx
mov    %rdx,%rcx
or     %rcx,%rax
mov    %eax,%esi
mov    $0x4800,%edi
call   1040 <mtspr@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_enable>:
mov    $0xffffffff,%eax
cmp    $0x1f,%rdi
ja     1152 <int_enable+0x32>
push   %rbx
mov    %rdi,%rbx
mov    $0x4800,%edi
call   1030 <mfspr@plt>
mov    $0x1,%esi
mov    %ebx,%ecx
shl    %cl,%rsi
or     %eax,%esi
mov    $0x4800,%edi
call   1040 <mtspr@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @int_enable(i64 %0) {
%2 = alloca i32
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp uge i64 %4, 32
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 -1, i32* %2
br label %15
7: ; preds = %1
%8 = call i32 @mfspr(i64 18432)
%9 = sext i32 %8 to i64
%10 = load i64, i64* %3
%11 = shl i64 1, %10
%12 = or i64 %9, %11
%13 = trunc i64 %12 to i32
%14 = call i32 @mtspr(i64 18432, i32 %13)
store i32 0, i32* %2
br label %15
15: ; preds = %7, %6
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @int_enable(i64 %0) {
%2 = icmp ugt i64 %0, 31
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = tail call i32 @mfspr(i64 18432)
%5 = shl nuw nsw i64 1, %0
%6 = trunc i64 %5 to i32
%7 = or i32 %4, %6
%8 = tail call i32 @mtspr(i64 18432, i32 %7)
br label %9
9: ; preds = %1, %3
%10 = phi i32 [ 0, %3 ], [ -1, %1 ]
ret i32 %10
}
/* Variables and functions */
unsigned long get_error_values(int /*<<< orphan*/, int, int /*<<< orphan*/ *,
                               int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                               int /*<<< orphan*/ *);
unsigned long ERR_peek_last_error(void) {
  return (get_error_values(0, 1, NULL, NULL, NULL, NULL));
}


x86 assembly (clang, -O0):
<ERR_peek_last_error>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x1,%esi
xor    %eax,%eax
mov    %eax,%r9d
mov    %r9,%rdx
mov    %r9,%rcx
mov    %r9,%r8
call   1030 <get_error_values@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ERR_peek_last_error>:
xor    %edi,%edi
mov    $0x1,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <get_error_values@plt>

LLVM IR (-O0):
define i64 @ERR_peek_last_error() {
%1 = call i64 @get_error_values(i32 0, i32 1, i32* null, i32* null, i32* null, i32* null)
ret i64 %1
}

LLVM IR (-O2):
define i64 @ERR_peek_last_error() {
%1 = tail call i64 @get_error_values(i32 0, i32 1, i32* null, i32* null, i32* null, i32* null)
ret i64 %1
}
void ExttVacationAuxTable(void) {}


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

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

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

LLVM IR (-O2):
define void @ExttVacationAuxTable() {
ret void
}
/* Variables and functions */
int memcmp(const void *s1, const void *s2, size_t n) { return 0; }


x86 assembly (clang, -O0):
<memcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @memcmp(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @memcmp(i8* nocapture readnone %0, i8* nocapture readnone %1, i64 %2) {
ret i32 0
}
/* Variables and functions */
int M_PI;
float asinf(int /*<<< orphan*/);
int /*<<< orphan*/ tanhf(float);
float pixel2lat(int zoom, int pixel_y) {
  float lat_m = (-(pixel_y - ((1 << zoom) * (256 / 2))) * (2 * M_PI)) /
                (256 * (1 << zoom));
  return asinf(tanhf(lat_m));
}


x86 assembly (clang, -O0):
<pixel2lat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    -0x10(%rbp),%ecx
shl    $0x7,%eax
sub    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    0x2e97(%rip),%rcx
mov    (%rcx),%ecx
shl    $0x1,%ecx
imul   %ecx,%eax
mov    -0x4(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
shl    $0x8,%ecx
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
call   1030 <tanhf@plt>
mov    %eax,%edi
call   1040 <asinf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pixel2lat>:
push   %rax
mov    %edi,%ecx
mov    $0x80,%eax
shl    %cl,%eax
sub    %esi,%eax
mov    0x2eb5(%rip),%rdx
imul   (%rdx),%eax
add    %eax,%eax
mov    $0x100,%esi
shl    %cl,%esi
cltd
idiv   %esi
cvtsi2ss %eax,%xmm0
call   1030 <tanhf@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <asinf@plt>

LLVM IR (-O0):
@M_PI = global i32 0
define float @pixel2lat(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = shl i32 1, %7
%9 = mul nsw i32 %8, 128
%10 = sub nsw i32 %6, %9
%11 = sub nsw i32 0, %10
%12 = load i32, i32* @M_PI
%13 = mul nsw i32 2, %12
%14 = mul nsw i32 %11, %13
%15 = load i32, i32* %3
%16 = shl i32 1, %15
%17 = mul nsw i32 256, %16
%18 = sdiv i32 %14, %17
%19 = sitofp i32 %18 to float
store float %19, float* %5
%20 = load float, float* %5
%21 = call i32 @tanhf(float %20)
%22 = call float @asinf(i32 %21)
ret float %22
}

LLVM IR (-O2):
@M_PI = global i32 0
define float @pixel2lat(i32 %0, i32 %1) {
%3 = shl i32 128, %0
%4 = sub i32 %3, %1
%5 = load i32, i32* @M_PI
%6 = shl i32 %4, 1
%7 = mul i32 %6, %5
%8 = shl nuw i32 256, %0
%9 = sdiv i32 %7, %8
%10 = sitofp i32 %9 to float
%11 = tail call i32 @tanhf(float %10)
%12 = tail call float @asinf(i32 %11)
ret float %12
}
/* Variables and functions */
const char *get_system_info(void) { return NULL; }


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

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

LLVM IR (-O0):
define i8* @get_system_info() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @get_system_info() {
ret i8* null
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ TtlSetDeactivated(int /*<<< orphan*/);
uint32_t HandlerActivate(void) { return TtlSetDeactivated(0); }


x86 assembly (clang, -O0):
<HandlerActivate>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <TtlSetDeactivated@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @HandlerActivate() {
%1 = call i32 @TtlSetDeactivated(i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @HandlerActivate() {
%1 = tail call i32 @TtlSetDeactivated(i32 0)
ret i32 %1
}
int main() {
  int i = 3;
  switch (i) {
  case 1 ... 5:
    printf("Hello, World!");
    break;
  case 6 ... 10:
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xffffffff,%eax
sub    $0x5,%eax
jb     1151 <main+0x41>
jmp    113d <main+0x2d>
mov    -0xc(%rbp),%eax
add    $0xfffffffa,%eax
sub    $0x5,%eax
jb     1164 <main+0x54>
jmp    1169 <main+0x59>
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1169 <main+0x59>
jmp    1169 <main+0x59>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [14 x i8] c"Hello, World!\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
double fabs(double x) {
  if (x < 0)
    return (x *= -1.0);
  else
    return (x);
}


x86 assembly (clang, -O0):
<fabs>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1133 <fabs+0x33>
movsd  0xee1(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm0,-0x8(%rbp)
jmp    113d <fabs+0x3d>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fabs>:
movapd 0xef8(%rip),%xmm2
xorpd  %xmm0,%xmm2
xorpd  %xmm3,%xmm3
movapd %xmm0,%xmm1
cmpltsd %xmm3,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @fabs(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp olt double %4, 0.000000e+00
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load double, double* %3
%8 = fmul double %7, -1.000000e+00
store double %8, double* %3
store double %8, double* %2
br label %11
9: ; preds = %1
%10 = load double, double* %3
store double %10, double* %2
br label %11
11: ; preds = %9, %6
%12 = load double, double* %2
ret double %12
}

LLVM IR (-O2):
define double @fabs(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %3, double %0
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ strspn(char *, char *);
char *skip_allws(char *str) {
  str += strspn(str, " \t\r\n");
  return str;
}


x86 assembly (clang, -O0):
<skip_allws>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strspn@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_allws>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strspn@plt>
cltq
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c" \09\0D\0A\00"
define i8* @skip_allws(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strspn(i8* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = load i8*, i8** %2
%6 = sext i32 %4 to i64
%7 = getelementptr inbounds i8, i8* %5, i64 %6
store i8* %7, i8** %2
%8 = load i8*, i8** %2
ret i8* %8
}

LLVM IR (-O2):
@.str = [5 x i8] c" \09\0D\0A\00"
define i8* @skip_allws(i8* %0) {
%2 = tail call i32 @strspn(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
ret i8* %4
}
int XConnectionNumber() {}


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

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

LLVM IR (-O0):
define i32 @XConnectionNumber() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @XConnectionNumber() {
ret i32 undef
}
int isAlpha(char c) { return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z'; }


x86 assembly (clang, -O0):
<isAlpha>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     1129 <isAlpha+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x7a,%ecx
mov    %al,-0x2(%rbp)
jle    114e <isAlpha+0x4e>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x41,%ecx
mov    %al,-0x3(%rbp)
jl     1148 <isAlpha+0x48>
movsbl -0x1(%rbp),%eax
cmp    $0x5a,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isAlpha>:
and    $0xdf,%dil
add    $0xbf,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @isAlpha(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 122
br i1 %9, label %20, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 65
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 90
br label %18
18: ; preds = %14, %10
%19 = phi i1 [ false, %10 ], [ %17, %14 ]
br label %20
20: ; preds = %18, %6
%21 = phi i1 [ true, %6 ], [ %19, %18 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @isAlpha(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void destroyIPC(int sockfd) {
  if (sockfd > 0) {
    close(sockfd);
  }
}


x86 assembly (clang, -O0):
<destroyIPC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    112d <destroyIPC+0x1d>
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<destroyIPC>:
test   %edi,%edi
jle    1119 <destroyIPC+0x9>
jmp    1030 <close@plt>
ret

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

LLVM IR (-O2):
define void @destroyIPC(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @close(i32 %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef double GLfloat;
typedef double GLdouble;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
void shoveFloat(GLdouble value, int index, void *data) {
  assert(0.0 <= value && value <= 1.0);
  ((GLfloat *)data)[index] = value;
}


x86 assembly (clang, -O0):
<shoveFloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x19(%rbp)
jb     114e <shoveFloat+0x3e>
movsd  0xebd(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
setae  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  -0x8(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shoveFloat>:
push   %rbp
push   %rbx
push   %rax
movsd  %xmm0,(%rsp)
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
setae  %al
movsd  0xed5(%rip),%xmm1
ucomisd %xmm0,%xmm1
mov    %rsi,%rbx
mov    %edi,%ebp
setae  %cl
and    %al,%cl
movzbl %cl,%edi
call   1030 <assert@plt>
movslq %ebp,%rax
movsd  (%rsp),%xmm0
movsd  %xmm0,(%rbx,%rax,8)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @shoveFloat(double %0, i32 %1, i8* %2) {
%4 = alloca double
%5 = alloca i32
%6 = alloca i8*
store double %0, double* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load double, double* %4
%8 = fcmp ole double 0.000000e+00, %7
br i1 %8, label %9, label %12
9: ; preds = %3
%10 = load double, double* %4
%11 = fcmp ole double %10, 1.000000e+00
br label %12
12: ; preds = %9, %3
%13 = phi i1 [ false, %3 ], [ %11, %9 ]
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
%16 = load double, double* %4
%17 = load i8*, i8** %6
%18 = bitcast i8* %17 to double*
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds double, double* %18, i64 %20
store double %16, double* %21
ret void
}

LLVM IR (-O2):
define void @shoveFloat(double %0, i32 %1, i8* nocapture writeonly %2) {
%4 = fcmp oge double %0, 0.000000e+00
%5 = fcmp ole double %0, 1.000000e+00
%6 = and i1 %4, %5
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = bitcast i8* %2 to double*
%10 = sext i32 %1 to i64
%11 = getelementptr inbounds double, double* %9, i64 %10
store double %0, double* %11
ret void
}
void ff_hevc_put_hevc_uni_epel_v8_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_v8_12_sse4() {
ret void
}
/* Variables and functions */
int check_arg_count(int, int);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_error(char *);
void cmd_in_wch(int nargs, char **args) {
  if (check_arg_count(nargs, 1) == 1)
    return;
  report_count(1);
  report_error("UNSUPPORTED");
}


x86 assembly (clang, -O0):
<cmd_in_wch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    115a <cmd_in_wch+0x2a>
jmp    1170 <cmd_in_wch+0x40>
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xe95(%rip),%rdi
call   1050 <report_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_in_wch>:
push   %rax
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1142 <cmd_in_wch+0x12>
pop    %rax
ret
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xead(%rip),%rdi
pop    %rax
jmp    1050 <report_error@plt>

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

LLVM IR (-O2):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_in_wch(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %5
ret void
}
int hash(char *s) {
  char c;
  unsigned long hash = 5381;
  while ((c = *s++) > 0)
    hash = (hash << 5) + hash + c;
  return (int)(hash % 65536);
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1505,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    %al,-0x9(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
jle    114d <hash+0x4d>
mov    -0x18(%rbp),%rax
shl    $0x5,%rax
add    -0x18(%rbp),%rax
movsbq -0x9(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
jmp    1110 <hash+0x10>
mov    -0x18(%rbp),%rax
and    $0xffff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%cl
test   %cl,%cl
jle    112f <hash+0x2f>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %rax,%rdx
shl    $0x5,%rdx
add    %rax,%rdx
movzbl %cl,%eax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jg     1110 <hash+0x10>
movzwl %ax,%eax
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp sgt i8 %2, 0
br i1 %3, label %4, label %17
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i64 [ %11, %4 ], [ 5381, %1 ]
%7 = phi i8* [ %8, %4 ], [ %0, %1 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = mul i64 %6, 33
%10 = zext i8 %5 to i64
%11 = add i64 %9, %10
%12 = load i8, i8* %8
%13 = icmp sgt i8 %12, 0
br i1 %13, label %4, label %14
14: ; preds = %4
%15 = trunc i64 %11 to i32
%16 = and i32 %15, 65535
br label %17
17: ; preds = %14, %1
%18 = phi i32 [ 5381, %1 ], [ %16, %14 ]
ret i32 %18
}
void kasan_check_write(const volatile void *p, unsigned int size) {}


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

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

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

LLVM IR (-O2):
define void @kasan_check_write(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ atoi(char *);
int /*<<< orphan*/ otoi(char *);
int /*<<< orphan*/ umask(int /*<<< orphan*/);
void setmask(char *p) { umask((*p == '0' ? otoi(p) : atoi(p))); }


x86 assembly (clang, -O0):
<setmask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jne    115d <setmask+0x2d>
mov    -0x8(%rbp),%rdi
call   1040 <otoi@plt>
mov    %eax,-0xc(%rbp)
jmp    1169 <setmask+0x39>
mov    -0x8(%rbp),%rdi
call   1050 <atoi@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <umask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setmask>:
push   %rax
cmpb   $0x30,(%rdi)
jne    113d <setmask+0xd>
call   1040 <otoi@plt>
jmp    1142 <setmask+0x12>
call   1050 <atoi@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <umask@plt>

LLVM IR (-O0):
define void @setmask(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 48
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i32 @otoi(i8* %8)
br label %13
10: ; preds = %1
%11 = load i8*, i8** %2
%12 = call i32 @atoi(i8* %11)
br label %13
13: ; preds = %10, %7
%14 = phi i32 [ %9, %7 ], [ %12, %10 ]
%15 = call i32 @umask(i32 %14)
ret void
}

LLVM IR (-O2):
define void @setmask(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 48
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @otoi(i8* %0)
br label %8
6: ; preds = %1
%7 = tail call i32 @atoi(i8* %0)
br label %8
8: ; preds = %6, %4
%9 = phi i32 [ %5, %4 ], [ %7, %6 ]
%10 = tail call i32 @umask(i32 %9)
ret void
}
/* Type definitions */
typedef int uint;

/* Variables and functions */
int fromsig6(uint v) {
  uint tmp;
  int *ret = (int *)(&tmp);
  if (v & 0x20) {
    tmp = 0xffffffc0 | (v & 0x3f);
  } else {
    tmp = v & 0x3f;
  }
  return *ret;
}


x86 assembly (clang, -O0):
<fromsig6>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    $0x20,%eax
cmp    $0x0,%eax
je     1131 <fromsig6+0x31>
mov    -0x4(%rbp),%eax
and    $0x3f,%eax
or     $0xffffffc0,%eax
mov    %eax,-0x8(%rbp)
jmp    113a <fromsig6+0x3a>
mov    -0x4(%rbp),%eax
and    $0x3f,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fromsig6>:
mov    %edi,%eax
shl    $0x1a,%eax
sar    $0x1f,%eax
and    $0x3f,%edi
and    $0xffffffc0,%eax
or     %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @fromsig6(i32 %0) {
%2 = and i32 %0, 32
%3 = icmp eq i32 %2, 0
%4 = and i32 %0, 63
%5 = select i1 %3, i32 0, i32 -64
%6 = or i32 %5, %4
ret i32 %6
}
int fsync(int fildes) {
  anvil_syslog(0, "%s unimplemented\n", __FUNCTION__);
  return 0;
}


x86 assembly (clang, -O0):
<fsync>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
lea    0xedc(%rip),%rsi
lea    0xee7(%rip),%rdx
mov    $0x0,%al
call   1030 <anvil_syslog@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsync>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0xef3(%rip),%rdx
xor    %edi,%edi
xor    %eax,%eax
call   1030 <anvil_syslog@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"%s unimplemented\0A\00"
@__FUNCTION__.fsync = [6 x i8] c"fsync\00"
define i32 @fsync(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @anvil_syslog to i32 (i32, i8*, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__FUNCTION__.fsync, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"%s unimplemented\0A\00"
@__FUNCTION__.fsync = [6 x i8] c"fsync\00"
define i32 @fsync(i32 %0) {
%2 = tail call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @anvil_syslog to i32 (i32, i8*, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__FUNCTION__.fsync, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(int *, int *, int);
int sub1(int i, int j) {
  typedef int c[i + 2];
  int x[10], y[10];
  if (j == 2) {
    memcpy(x, y, 10 * sizeof(int));
    return sizeof(c);
  } else
    return sizeof(c) * 3;
}


x86 assembly (clang, -O0):
<sub1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,%eax
mov    %rax,-0x78(%rbp)
cmpl   $0x2,-0xc(%rbp)
jne    1159 <sub1+0x49>
lea    -0x40(%rbp),%rdi
lea    -0x70(%rbp),%rsi
mov    $0x28,%edx
call   1030 <memcpy@plt>
mov    -0x78(%rbp),%rax
shl    $0x2,%rax
mov    %eax,-0x4(%rbp)
jmp    1168 <sub1+0x58>
mov    -0x78(%rbp),%rax
shl    $0x2,%rax
imul   $0x3,%rax,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sub1>:
push   %rbx
sub    $0x60,%rsp
mov    %edi,%ebx
add    $0x2,%ebx
cmp    $0x2,%esi
jne    1136 <sub1+0x26>
lea    0x30(%rsp),%rdi
mov    %rsp,%rsi
mov    $0x28,%edx
call   1030 <memcpy@plt>
shl    $0x2,%ebx
jmp    113c <sub1+0x2c>
shl    $0x2,%ebx
lea    (%rbx,%rbx,2),%ebx
mov    %ebx,%eax
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @sub1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [10 x i32]
%7 = alloca [10 x i32]
store i32 %0, i32* %4
store i32 %1, i32* %5
%8 = load i32, i32* %4
%9 = add nsw i32 %8, 2
%10 = zext i32 %9 to i64
%11 = load i32, i32* %5
%12 = icmp eq i32 %11, 2
br i1 %12, label %13, label %19
13: ; preds = %2
%14 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 0
%15 = getelementptr inbounds [10 x i32], [10 x i32]* %7, i64 0, i64 0
%16 = call i32 @memcpy(i32* %14, i32* %15, i32 40)
%17 = mul nuw i64 4, %10
%18 = trunc i64 %17 to i32
store i32 %18, i32* %3
br label %23
19: ; preds = %2
%20 = mul nuw i64 4, %10
%21 = mul i64 %20, 3
%22 = trunc i64 %21 to i32
store i32 %22, i32* %3
br label %23
23: ; preds = %19, %13
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @sub1(i32 %0, i32 %1) {
%3 = alloca [10 x i32]
%4 = alloca [10 x i32]
%5 = add nsw i32 %0, 2
%6 = bitcast [10 x i32]* %3 to i8*
%7 = bitcast [10 x i32]* %4 to i8*
%8 = icmp eq i32 %1, 2
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 0
%11 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 0
%12 = call i32 @memcpy(i32* %10, i32* %11, i32 40)
%13 = shl i32 %5, 2
br label %16
14: ; preds = %2
%15 = mul i32 %5, 12
br label %16
16: ; preds = %14, %9
%17 = phi i32 [ %13, %9 ], [ %15, %14 ]
ret i32 %17
}
void BotAI_Print(int type, char *fmt, ...) { return; }


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

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

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

LLVM IR (-O2):
define void @BotAI_Print(i32 %0, i8* nocapture %1, ...) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint32_t;
typedef int /*<<< orphan*/ tmp;

/* Variables and functions */
int /*<<< orphan*/ ivory_serialize_pack_prim_8_le(int /*<<< orphan*/ *,
                                                  int /*<<< orphan*/ *);
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ **, double const *, int);
void ivory_serialize_pack_double_le(uint8_t *dst, uint32_t offs,
                                    const double *src) {
  uint8_t tmp[8] = {0};
  memcpy(&tmp, src, sizeof(tmp));
  ivory_serialize_pack_prim_8_le(dst + offs, tmp);
}


x86 assembly (clang, -O0):
<ivory_serialize_pack_double_le>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1040 <memset@plt>
lea    -0x40(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x20,%edx
call   1050 <memcpy@plt>
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
lea    -0x40(%rbp),%rsi
call   1030 <ivory_serialize_pack_prim_8_le@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ivory_serialize_pack_double_le>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %esi,%ebx
mov    %rdi,%r14
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
mov    %rsp,%r15
mov    %r15,%rdi
mov    %rdx,%rsi
mov    $0x20,%edx
call   1040 <memcpy@plt>
movslq %ebx,%rax
lea    (%r14,%rax,4),%rdi
mov    %r15,%rsi
call   1030 <ivory_serialize_pack_prim_8_le@plt>
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @ivory_serialize_pack_double_le(i32* %0, i32 %1, double* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca double*
%7 = alloca [8 x i32]
store i32* %0, i32** %4
store i32 %1, i32* %5
store double* %2, double** %6
%8 = bitcast [8 x i32]* %7 to i8*
%9 = bitcast [8 x i32]* %7 to i32**
%10 = load double*, double** %6
%11 = call i32 @memcpy(i32** %9, double* %10, i32 32)
%12 = load i32*, i32** %4
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
%16 = getelementptr inbounds [8 x i32], [8 x i32]* %7, i64 0, i64 0
%17 = call i32 @ivory_serialize_pack_prim_8_le(i32* %15, i32* %16)
ret void
}

LLVM IR (-O2):
define void @ivory_serialize_pack_double_le(i32* %0, i32 %1, double* %2) {
%4 = alloca [8 x i32]
%5 = bitcast [8 x i32]* %4 to i8*
%6 = bitcast [8 x i32]* %4 to i32**
%7 = call i32 @memcpy(i32** %6, double* %2, i32 32)
%8 = sext i32 %1 to i64
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 0
%11 = call i32 @ivory_serialize_pack_prim_8_le(i32* %9, i32* %10)
ret void
}
/* Type definitions */
typedef int socklen_t;
typedef int /*<<< orphan*/ opt;

/* Variables and functions */
int /*<<< orphan*/ SOL_SOCKET;
int /*<<< orphan*/ SO_ERROR;
scalar_t__ getsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/, char *,
                      int *);
int g_tcp_socket_ok(int sck) {
  int opt;
  socklen_t opt_len = sizeof(opt);
  if (getsockopt(sck, SOL_SOCKET, SO_ERROR, (char *)(&opt), &opt_len) == 0) {
    if (opt == 0) {
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<g_tcp_socket_ok>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x4,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2ebc(%rip),%rax
mov    (%rax),%esi
mov    0x2ea3(%rip),%rax
mov    (%rax),%edx
lea    -0xc(%rbp),%rcx
lea    -0x10(%rbp),%r8
call   1030 <getsockopt@plt>
cmp    $0x0,%rax
jne    1169 <g_tcp_socket_ok+0x59>
cmpl   $0x0,-0xc(%rbp)
jne    1164 <g_tcp_socket_ok+0x54>
movl   $0x1,-0x4(%rbp)
jmp    1170 <g_tcp_socket_ok+0x60>
jmp    1169 <g_tcp_socket_ok+0x59>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_tcp_socket_ok>:
push   %rax
movl   $0x4,(%rsp)
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
mov    0x2eb0(%rip),%rax
mov    (%rax),%edx
lea    0x4(%rsp),%rcx
mov    %rsp,%r8
call   1030 <getsockopt@plt>
test   %rax,%rax
sete   %al
cmpl   $0x0,0x4(%rsp)
sete   %cl
and    %al,%cl
movzbl %cl,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@SOL_SOCKET = global i32 0
@SO_ERROR = global i32 0
define i32 @g_tcp_socket_ok(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %2 to i8*
%5 = bitcast i32* %3 to i8*
store i32 4, i32* %3
%6 = load i32, i32* @SOL_SOCKET
%7 = load i32, i32* @SO_ERROR
%8 = call i64 @getsockopt(i32 %0, i32 %6, i32 %7, i8* %4, i32* %3)
%9 = icmp eq i64 %8, 0
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 0
%12 = select i1 %9, i1 %11, i1 false
%13 = zext i1 %12 to i32
ret i32 %13
}
void freeDigits(long long *value) {}


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

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

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

LLVM IR (-O2):
define void @freeDigits(i64* nocapture %0) {
ret void
}
void mixColumns(unsigned char *const block) {
  int i;
  unsigned char *temp = block;
  for (i = 0; i < 4; i++) {
    mixColumn(temp);
    temp += 4;
  }
}


x86 assembly (clang, -O0):
<mixColumns>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    115a <mixColumns+0x4a>
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1030 <mixColumn@plt>
mov    -0x18(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112b <mixColumns+0x1b>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mixColumns>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <mixColumn@plt>
lea    0x4(%rbx),%rdi
xor    %eax,%eax
call   1030 <mixColumn@plt>
lea    0x8(%rbx),%rdi
xor    %eax,%eax
call   1030 <mixColumn@plt>
add    $0xc,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
pop    %rbx
jmp    1030 <mixColumn@plt>

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

LLVM IR (-O2):
define void @mixColumns(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @mixColumn to i32 (i8*, ...)*)(i8* %0)
%3 = getelementptr inbounds i8, i8* %0, i64 4
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @mixColumn to i32 (i8*, ...)*)(i8* %3)
%5 = getelementptr inbounds i8, i8* %0, i64 8
%6 = tail call i32 (i8*, ...) bitcast (i32 (...)* @mixColumn to i32 (i8*, ...)*)(i8* %5)
%7 = getelementptr inbounds i8, i8* %0, i64 12
%8 = tail call i32 (i8*, ...) bitcast (i32 (...)* @mixColumn to i32 (i8*, ...)*)(i8* %7)
ret void
}
/* Variables and functions */
int g(int, int /*<<< orphan*/);
int f(int i) { return g(i, 0); }


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

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

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = tail call i32 @g(i32 %0, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void BSP_boom(void) {
  printf("BOOM!!!");
  fflush(stdout);
  _exit(0);
}


x86 assembly (clang, -O0):
<BSP_boom>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<BSP_boom>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"BOOM!!!\00"
@stdout = global i32 0
define void @BSP_boom() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = call i32 @fflush(i32 %2)
%4 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [8 x i8] c"BOOM!!!\00"
@stdout = global i32 0
define void @BSP_boom() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = tail call i32 @fflush(i32 %2)
%4 = tail call i32 @_exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ f(int);
main() {
  f(3);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @f(i32 3)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x23() {
  Assert_real((iscntrl(35) == 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_iscntrl.c",
              180, ("iscntrl should be 0 for #"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0x23>:
push   %rax
mov    $0x23,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xb4,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for #\00"
define void @t_iscntrl_0x23() {
%1 = call i64 @iscntrl(i32 35)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 180, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for #\00"
define void @t_iscntrl_0x23() {
%1 = tail call i64 @iscntrl(i32 35)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 180, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}