xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ halt();
int /*<<< orphan*/ printf(char *, char *);
void assert(int cond, char *msg) {
  if (!cond) {
    printf("ASSERTION FAILED: %s\n", msg);
    halt();
  }
}


x86 assembly (clang, -O0):
<assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1150 <assert+0x30>
mov    -0x10(%rbp),%rsi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <halt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert>:
test   %edi,%edi
je     1125 <assert+0x5>
ret
push   %rax
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <halt@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"ASSERTION FAILED: %s\0A\00"
define void @assert(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 = icmp ne i32 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = call i32 (...) @halt()
br label %11
11: ; preds = %7, %2
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"ASSERTION FAILED: %s\0A\00"
define void @assert(i32 %0, i8* %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %1)
%6 = tail call i32 (...) @halt()
br label %7
7: ; preds = %4, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ cs;

/* Variables and functions */
int /*<<< orphan*/ Info_SetValueForKey(char *, char const *, char const *);
int /*<<< orphan*/ trap_GetConfigstring(int, char *, int);
int /*<<< orphan*/ trap_SetConfigstring(int, char *);
void G_SetConfigStringValue(int num, const char *key, const char *value) {
  char cs[1024];
  trap_GetConfigstring(num, cs, sizeof(cs));
  Info_SetValueForKey(cs, key, value);
  trap_SetConfigstring(num, cs);
}


x86 assembly (clang, -O0):
<G_SetConfigStringValue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x420(%rbp),%rsi
mov    $0x400,%edx
call   1040 <trap_GetConfigstring@plt>
lea    -0x420(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <Info_SetValueForKey@plt>
mov    -0x4(%rbp),%edi
lea    -0x420(%rbp),%rsi
call   1050 <trap_SetConfigstring@plt>
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<G_SetConfigStringValue>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x408,%rsp
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsp,%r15
mov    %r15,%rsi
mov    $0x400,%edx
call   1040 <trap_GetConfigstring@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <Info_SetValueForKey@plt>
mov    %ebp,%edi
mov    %r15,%rsi
call   1050 <trap_SetConfigstring@plt>
add    $0x408,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @G_SetConfigStringValue(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca [1024 x i8]
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i32, i32* %4
%9 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%10 = call i32 @trap_GetConfigstring(i32 %8, i8* %9, i32 1024)
%11 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%12 = load i8*, i8** %5
%13 = load i8*, i8** %6
%14 = call i32 @Info_SetValueForKey(i8* %11, i8* %12, i8* %13)
%15 = load i32, i32* %4
%16 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%17 = call i32 @trap_SetConfigstring(i32 %15, i8* %16)
ret void
}

LLVM IR (-O2):
define void @G_SetConfigStringValue(i32 %0, i8* %1, i8* %2) {
%4 = alloca [1024 x i8]
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%6 = call i32 @trap_GetConfigstring(i32 %0, i8* %5, i32 1024)
%7 = call i32 @Info_SetValueForKey(i8* %5, i8* %1, i8* %2)
%8 = call i32 @trap_SetConfigstring(i32 %0, i8* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
char *adin_input_name() {
  printf("input name function was called\n");
  return ("default");
}


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

x86 assembly (clang, -O2):
<adin_input_name>:
push   %rax
lea    0xef0(%rip),%rdi
call   1030 <puts@plt>
lea    0xedc(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"input name function was called\0A\00"
@.str.1 = [8 x i8] c"default\00"
define i8* @adin_input_name() {
%1 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0)
}

LLVM IR (-O2):
@.str.1 = [8 x i8] c"default\00"
@str = [31 x i8] c"input name function was called\00"
define i8* @adin_input_name() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0)
}
/* Variables and functions */
unsigned long _funcion_hash(const char *str, size_t tamanio_hash) {
  unsigned long hash = 5381;
  unsigned int c;
  while ((c = (unsigned)*str++))
    hash = ((hash << 5) + hash) + c;
  return hash % tamanio_hash;
}


x86 assembly (clang, -O0):
<_funcion_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x1505,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
je     114d <_funcion_hash+0x4d>
mov    -0x18(%rbp),%rax
shl    $0x5,%rax
add    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
jmp    1114 <_funcion_hash+0x14>
mov    -0x18(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x10(%rbp)
mov    %rdx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_funcion_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1130 <_funcion_hash+0x30>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
movsbq %cl,%rcx
mov    %rax,%rdx
shl    $0x5,%rdx
add    %rax,%rdx
mov    %ecx,%eax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <_funcion_hash+0x10>
jmp    1135 <_funcion_hash+0x35>
mov    $0x1505,%eax
mov    %rax,%rcx
or     %rsi,%rcx
shr    $0x20,%rcx
je     114a <_funcion_hash+0x4a>
xor    %edx,%edx
div    %rsi
mov    %rdx,%rax
ret
xor    %edx,%edx
div    %esi
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i64 @_funcion_hash(i8* nocapture %0, i64 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %14, %5 ], [ %3, %2 ]
%7 = phi i8* [ %10, %5 ], [ %0, %2 ]
%8 = phi i64 [ %13, %5 ], [ 5381, %2 ]
%9 = sext i8 %6 to i64
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = mul i64 %8, 33
%12 = and i64 %9, 4294967295
%13 = add i64 %12, %11
%14 = load i8, i8* %10
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %5
16: ; preds = %5, %2
%17 = phi i64 [ 5381, %2 ], [ %13, %5 ]
%18 = urem i64 %17, %1
ret i64 %18
}
int do_b() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @do_b() {
ret i32 1
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ getchar();
int /*<<< orphan*/ printf(char *, long);
main() {
  long count = 0;
  while (getchar() != EOF) {
    ++count;
  }
  printf("%ld\n", count);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    0x2ea3(%rip),%rcx
cmp    (%rcx),%rax
je     115f <main+0x3f>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1137 <main+0x17>
mov    -0x10(%rbp),%rsi
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

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


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"XKeysymToString called\0A\00"
define i32 @XKeysymToString() {
%1 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [23 x i8] c"XKeysymToString called\00"
define i32 @XKeysymToString() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ write_char(int, char);
int /*<<< orphan*/ write_ulong(int, long);
void write_long(int fd, long i) {
  if (i < 0) {
    write_char(fd, '-');
    write_ulong(fd, -((unsigned long)i));
  } else {
    write_ulong(fd, i);
  }
}


x86 assembly (clang, -O0):
<write_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jge    115c <write_long+0x3c>
mov    -0x4(%rbp),%edi
mov    $0x2d,%esi
call   1040 <write_char@plt>
mov    -0x4(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
sub    -0x10(%rbp),%rsi
call   1030 <write_ulong@plt>
jmp    1168 <write_long+0x48>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <write_ulong@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_long>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
test   %rsi,%rsi
jns    113c <write_long+0x1c>
mov    %ebp,%edi
mov    $0x2d,%esi
call   1040 <write_char@plt>
neg    %rbx
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <write_ulong@plt>

LLVM IR (-O0):
define void @write_long(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %14
7: ; preds = %2
%8 = load i32, i32* %3
%9 = call i32 @write_char(i32 %8, i8 signext 45)
%10 = load i32, i32* %3
%11 = load i64, i64* %4
%12 = sub i64 0, %11
%13 = call i32 @write_ulong(i32 %10, i64 %12)
br label %18
14: ; preds = %2
%15 = load i32, i32* %3
%16 = load i64, i64* %4
%17 = call i32 @write_ulong(i32 %15, i64 %16)
br label %18
18: ; preds = %14, %7
ret void
}

LLVM IR (-O2):
define void @write_long(i32 %0, i64 %1) {
%3 = icmp slt i64 %1, 0
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 @write_char(i32 %0, i8 signext 45)
%6 = sub i64 0, %1
br label %7
7: ; preds = %2, %4
%8 = phi i64 [ %6, %4 ], [ %1, %2 ]
%9 = tail call i32 @write_ulong(i32 %0, i64 %8)
ret void
}
/* Variables and functions */
void _byte_set(char *dest, int ch, size_t n) {
  for (size_t i = 0; i < n; ++i) {
    dest[i] = ch;
  }
}


x86 assembly (clang, -O0):
<_byte_set>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1146 <_byte_set+0x46>
mov    -0xc(%rbp),%eax
mov    %al,%dl
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1117 <_byte_set+0x17>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_byte_set>:
test   %rdx,%rdx
je     111f <_byte_set+0xf>
push   %rax
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @_byte_set(i8* nocapture writeonly %0, i32 %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = trunc i32 %1 to i8
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LCD_WriteData(int);
void createDisruption_Five() {
  LCD_WriteData(0x0);
  LCD_WriteData(0x2);
  LCD_WriteData(0x6);
  LCD_WriteData(0xe);
  LCD_WriteData(0xe);
  LCD_WriteData(0x6);
  LCD_WriteData(0x2);
  LCD_WriteData(0x0);
}


x86 assembly (clang, -O0):
<createDisruption_Five>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <LCD_WriteData@plt>
mov    $0x2,%edi
call   1030 <LCD_WriteData@plt>
mov    $0x6,%edi
call   1030 <LCD_WriteData@plt>
mov    $0xe,%edi
call   1030 <LCD_WriteData@plt>
mov    $0xe,%edi
call   1030 <LCD_WriteData@plt>
mov    $0x6,%edi
call   1030 <LCD_WriteData@plt>
mov    $0x2,%edi
call   1030 <LCD_WriteData@plt>
xor    %edi,%edi
call   1030 <LCD_WriteData@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<createDisruption_Five>:
push   %rax
xor    %edi,%edi
call   1030 <LCD_WriteData@plt>
mov    $0x2,%edi
call   1030 <LCD_WriteData@plt>
mov    $0x6,%edi
call   1030 <LCD_WriteData@plt>
mov    $0xe,%edi
call   1030 <LCD_WriteData@plt>
mov    $0xe,%edi
call   1030 <LCD_WriteData@plt>
mov    $0x6,%edi
call   1030 <LCD_WriteData@plt>
mov    $0x2,%edi
call   1030 <LCD_WriteData@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <LCD_WriteData@plt>

LLVM IR (-O0):
define void @createDisruption_Five() {
%1 = call i32 @LCD_WriteData(i32 0)
%2 = call i32 @LCD_WriteData(i32 2)
%3 = call i32 @LCD_WriteData(i32 6)
%4 = call i32 @LCD_WriteData(i32 14)
%5 = call i32 @LCD_WriteData(i32 14)
%6 = call i32 @LCD_WriteData(i32 6)
%7 = call i32 @LCD_WriteData(i32 2)
%8 = call i32 @LCD_WriteData(i32 0)
ret void
}

LLVM IR (-O2):
define void @createDisruption_Five() {
%1 = tail call i32 @LCD_WriteData(i32 0)
%2 = tail call i32 @LCD_WriteData(i32 2)
%3 = tail call i32 @LCD_WriteData(i32 6)
%4 = tail call i32 @LCD_WriteData(i32 14)
%5 = tail call i32 @LCD_WriteData(i32 14)
%6 = tail call i32 @LCD_WriteData(i32 6)
%7 = tail call i32 @LCD_WriteData(i32 2)
%8 = tail call i32 @LCD_WriteData(i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
struct mlx4dv_obj {
  int dummy;
};

/* Variables and functions */
int mlx4dv_init_obj(struct mlx4dv_obj *, int /*<<< orphan*/);
int mlx4_glue_dv_init_obj(struct mlx4dv_obj *obj, uint64_t obj_type) {
  return mlx4dv_init_obj(obj, obj_type);
}


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

x86 assembly (clang, -O2):
<mlx4_glue_dv_init_obj>:
jmp    1030 <mlx4dv_init_obj@plt>

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

LLVM IR (-O2):
%struct.mlx4dv_obj = type { i32 }
define i32 @mlx4_glue_dv_init_obj(%struct.mlx4dv_obj* %0, i32 %1) {
%3 = tail call i32 @mlx4dv_init_obj(%struct.mlx4dv_obj* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printerror(char *);
void Usage() {
  printerror(
      "argument syntax error\n	hw6 tablecheck -t=tablefile\n    hw6 modprod "
      "-p1=poly1 -p2=poly2\n    hw6 keyexpand -k=key -t=tablefile\n    hw6 "
      "encrypt -k=key -t=tablefile [file]\n    hw6 decrypt -k=key -t=tablefile "
      "[file]\n    hw6 inverse -p=poly\n");
}


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

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

LLVM IR (-O0):
@.str = [236 x i8] c"argument syntax error\0A\09hw6 tablecheck -t=tablefile\0A hw6 modprod -p1=poly1 -p2=poly2\0A hw6 keyexpand -k=key -t=tablefile\0A hw6 encrypt -k=key -t=tablefile [file]\0A hw6 decrypt -k=key -t=tablefile [file]\0A hw6 inverse -p=poly\0A\00"
define void @Usage() {
%1 = call i32 @printerror(i8* getelementptr inbounds ([236 x i8], [236 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [236 x i8] c"argument syntax error\0A\09hw6 tablecheck -t=tablefile\0A hw6 modprod -p1=poly1 -p2=poly2\0A hw6 keyexpand -k=key -t=tablefile\0A hw6 encrypt -k=key -t=tablefile [file]\0A hw6 decrypt -k=key -t=tablefile [file]\0A hw6 inverse -p=poly\0A\00"
define void @Usage() {
%1 = tail call i32 @printerror(i8* getelementptr inbounds ([236 x i8], [236 x i8]* @.str, i64 0, i64 0))
ret void
}
char *OS_getPref(const char *name, const char *defVal) { return "8"; }


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

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

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

LLVM IR (-O2):
@.str = [2 x i8] c"8\00"
define i8* @OS_getPref(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
}
unsigned long hash_long32(unsigned long a) {
  a = (a + 0x7ed55d16) + (a << 12);
  a = (a ^ 0xc761c23c) ^ (a >> 19);
  a = (a + 0x165667b1) + (a << 5);
  a = (a + 0xd3a2646c) ^ (a << 9);
  a = (a + 0xfd7046c5) + (a << 3);
  a = (a ^ 0xb55a4f09) ^ (a >> 16);
  return a;
}


x86 assembly (clang, -O0):
<hash_long32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x7ed55d16,%rax
mov    -0x8(%rbp),%rcx
shl    $0xc,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
movabs $0xc761c23c,%rax
xor    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
shr    $0x13,%rcx
xor    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x165667b1,%rax
mov    -0x8(%rbp),%rcx
shl    $0x5,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
movabs $0xd3a2646c,%rax
add    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
shl    $0x9,%rcx
xor    %rcx,%rax
mov    %rax,-0x8(%rbp)
movabs $0xfd7046c5,%rax
add    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
movabs $0xb55a4f09,%rax
xor    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
shr    $0x10,%rcx
xor    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_long32>:
mov    %rdi,%rax
shl    $0xc,%rax
add    %rdi,%rax
add    $0x7ed55d16,%rax
mov    $0xb55a4f09,%ecx
lea    0x12077333(%rcx),%rdx
xor    %rax,%rdx
shr    $0x13,%rax
xor    %rax,%rdx
mov    %rdx,%rax
shl    $0x5,%rax
lea    (%rdx,%rax,1),%rsi
add    %rdx,%rax
add    $0x165667b1,%rax
lea    (%rcx,%rsi,1),%rdx
add    $0x349e7d14,%rdx
shl    $0x9,%rax
xor    %rdx,%rax
lea    (%rax,%rax,8),%rax
add    %rcx,%rax
add    $0x4815f7bc,%rax
mov    %rax,%rdx
shr    $0x10,%rdx
xor    %rcx,%rax
xor    %rdx,%rax
ret

LLVM IR (-O0):
define i64 @hash_long32(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 2127912214
%5 = load i64, i64* %2
%6 = shl i64 %5, 12
%7 = add i64 %4, %6
store i64 %7, i64* %2
%8 = load i64, i64* %2
%9 = xor i64 %8, 3345072700
%10 = load i64, i64* %2
%11 = lshr i64 %10, 19
%12 = xor i64 %9, %11
store i64 %12, i64* %2
%13 = load i64, i64* %2
%14 = add i64 %13, 374761393
%15 = load i64, i64* %2
%16 = shl i64 %15, 5
%17 = add i64 %14, %16
store i64 %17, i64* %2
%18 = load i64, i64* %2
%19 = add i64 %18, 3550635116
%20 = load i64, i64* %2
%21 = shl i64 %20, 9
%22 = xor i64 %19, %21
store i64 %22, i64* %2
%23 = load i64, i64* %2
%24 = add i64 %23, 4251993797
%25 = load i64, i64* %2
%26 = shl i64 %25, 3
%27 = add i64 %24, %26
store i64 %27, i64* %2
%28 = load i64, i64* %2
%29 = xor i64 %28, 3042594569
%30 = load i64, i64* %2
%31 = lshr i64 %30, 16
%32 = xor i64 %29, %31
store i64 %32, i64* %2
%33 = load i64, i64* %2
ret i64 %33
}

LLVM IR (-O2):
define i64 @hash_long32(i64 %0) {
%2 = add i64 %0, 2127912214
%3 = shl i64 %0, 12
%4 = add i64 %2, %3
%5 = lshr i64 %4, 19
%6 = xor i64 %4, %5
%7 = xor i64 %6, 3345072700
%8 = add i64 %7, 374761393
%9 = shl i64 %7, 5
%10 = add i64 %8, %9
%11 = add i64 %10, 3550635116
%12 = shl i64 %10, 9
%13 = xor i64 %11, %12
%14 = add i64 %13, 4251993797
%15 = shl i64 %13, 3
%16 = add i64 %14, %15
%17 = lshr i64 %16, 16
%18 = xor i64 %16, %17
%19 = xor i64 %18, 3042594569
ret i64 %19
}
/* Variables and functions */
int /*<<< orphan*/ gmvwrite_flag_endflag();
void fgmvwrite_flag_endflag_() { gmvwrite_flag_endflag(); }


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

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

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

LLVM IR (-O2):
define void @fgmvwrite_flag_endflag_() {
%1 = tail call i32 (...) @gmvwrite_flag_endflag()
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ system(char *);
int main() {
  system("toilet -F border --gay -f pagga \"Hola loca\"");
  return EXIT_SUCCESS;
}


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

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

LLVM IR (-O0):
@.str = [44 x i8] c"toilet -F border --gay -f pagga \22Hola loca\22\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @system(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}

LLVM IR (-O2):
@.str = [44 x i8] c"toilet -F border --gay -f pagga \22Hola loca\22\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
int printSpace(FILE *fd, int i) {
  int setp = i;
  while (i > 0) {
    fprintf(fd, " ");
    i--;
  }
  return setp;
}


x86 assembly (clang, -O0):
<printSpace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    114d <printSpace+0x3d>
mov    -0x8(%rbp),%rdi
lea    0xec6(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1125 <printSpace+0x15>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printSpace>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
test   %esi,%esi
jle    1145 <printSpace+0x35>
mov    %rdi,%rbx
lea    0x1(%r14),%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x20,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
add    $0xffffffff,%ebp
cmp    $0x1,%ebp
ja     1130 <printSpace+0x20>
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @printSpace(i32* nocapture %0, i32 returned %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %9
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ %1, %2 ]
%6 = tail call i32 @fputc(i32 32, i32* %0)
%7 = add nsw i32 %5, -1
%8 = icmp ugt i32 %5, 1
br i1 %8, label %4, label %9
9: ; preds = %4, %2
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
void wait_for_key(int timeout) { sleep(2); }


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

x86 assembly (clang, -O2):
<wait_for_key>:
mov    $0x2,%edi
jmp    1030 <sleep@plt>

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

LLVM IR (-O2):
define void @wait_for_key(i32 %0) {
%2 = tail call i32 @sleep(i32 2)
ret void
}
unsigned int string_hash_func(const void *p) {
  unsigned int hash = 5381;
  const signed char *c;
  for (c = p; *c; c++)
    hash = (hash << 5) + hash + (unsigned int)*c;
  return hash;
}


x86 assembly (clang, -O0):
<string_hash_func>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1505,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     114a <string_hash_func+0x4a>
mov    -0xc(%rbp),%eax
shl    $0x5,%eax
add    -0xc(%rbp),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1117 <string_hash_func+0x17>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_hash_func>:
mov    (%rdi),%cl
test   %cl,%cl
je     1128 <string_hash_func+0x28>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %eax,%edx
shl    $0x5,%edx
add    %eax,%edx
movsbl %cl,%eax
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <string_hash_func+0x10>
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i32 @string_hash_func(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %11, %4 ], [ %0, %1 ]
%7 = phi i32 [ %10, %4 ], [ 5381, %1 ]
%8 = mul i32 %7, 33
%9 = sext i8 %5 to i32
%10 = add i32 %8, %9
%11 = getelementptr inbounds i8, i8* %6, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 5381, %1 ], [ %10, %4 ]
ret i32 %15
}
void driveRight(int dist) {}


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

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

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

LLVM IR (-O2):
define void @driveRight(i32 %0) {
ret void
}
/* Variables and functions */
void *malloc(unsigned int);
int /*<<< orphan*/ mfatal(char *, unsigned int);
void *emalloc(unsigned int size) {
  void *ret = malloc(size);
  if (!ret)
    mfatal("malloc", size);
  return ret;
}


x86 assembly (clang, -O0):
<emalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1151 <emalloc+0x31>
mov    -0x4(%rbp),%esi
lea    0xeb4(%rip),%rdi
call   1040 <mfatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emalloc>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1140 <emalloc+0x20>
lea    0xec7(%rip),%rdi
mov    %ebp,%esi
call   1040 <mfatal@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"malloc\00"
define noalias i8* @emalloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @mfatal(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %6
6: ; preds = %4, %1
ret i8* %2
}
unsigned char LOWNIBBLE(unsigned char byte) { return byte & 15; }


x86 assembly (clang, -O0):
<LOWNIBBLE>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0xf,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<LOWNIBBLE>:
mov    %edi,%eax
and    $0xf,%al
ret

LLVM IR (-O0):
define zeroext i8 @LOWNIBBLE(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 15
%6 = trunc i32 %5 to i8
ret i8 %6
}

LLVM IR (-O2):
define zeroext i8 @LOWNIBBLE(i8 zeroext %0) {
%2 = and i8 %0, 15
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void banner_chars(char *s) {
  printf("               ********%-26s********\n", s);
}


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

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

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

LLVM IR (-O2):
@.str = [38 x i8] c" ********%-26s********\0A\00"
define void @banner_chars(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int raw_clz64(scalar_t__);
int clz32(uint32_t n) { return n ? raw_clz64(n) - 32 : 32; }


x86 assembly (clang, -O0):
<clz32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113b <clz32+0x2b>
mov    -0x8(%rbp),%rdi
call   1030 <raw_clz64@plt>
sub    $0x20,%eax
mov    %eax,-0xc(%rbp)
jmp    1148 <clz32+0x38>
mov    $0x20,%eax
mov    %eax,-0xc(%rbp)
jmp    1148 <clz32+0x38>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clz32>:
test   %rdi,%rdi
je     1123 <clz32+0x13>
push   %rax
call   1030 <raw_clz64@plt>
add    $0xffffffe0,%eax
add    $0x8,%rsp
ret
mov    $0x20,%eax
ret

LLVM IR (-O0):
define i32 @clz32(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i64, i64* %2
%7 = call i32 @raw_clz64(i64 %6)
%8 = sub nsw i32 %7, 32
br label %10
9: ; preds = %1
br label %10
10: ; preds = %9, %5
%11 = phi i32 [ %8, %5 ], [ 32, %9 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @clz32(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @raw_clz64(i64 %0)
%5 = add nsw i32 %4, -32
br label %6
6: ; preds = %1, %3
%7 = phi i32 [ %5, %3 ], [ 32, %1 ]
ret i32 %7
}
int lsm_process_label_set(const char *label, int use_default, int on_exec) {
  return 0;
}


x86 assembly (clang, -O0):
<lsm_process_label_set>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @lsm_process_label_set(i8* nocapture readnone %0, i32 %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Terminal_Clear();
unsigned int Command_Cls_Execute(char **args, unsigned int argCount) {
  Terminal_Clear();
  return 1;
}


x86 assembly (clang, -O0):
<Command_Cls_Execute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <Terminal_Clear@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @Command_Cls_Execute(i8** nocapture readnone %0, i32 %1) {
%3 = tail call i32 (...) @Terminal_Clear()
ret i32 1
}
void str_sanitize_strong(char *str_in) {
  unsigned char *str = (unsigned char *)str_in;
  while (*str) {
    *str &= 0x7f;
    if (*str < 32)
      *str = 32;
    str++;
  }
}


x86 assembly (clang, -O0):
<str_sanitize_strong>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1151 <str_sanitize_strong+0x51>
mov    -0x10(%rbp),%rax
movzbl (%rax),%ecx
and    $0x7f,%ecx
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x20,%eax
jge    1140 <str_sanitize_strong+0x40>
mov    -0x10(%rbp),%rax
movb   $0x20,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <str_sanitize_strong+0x10>
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_sanitize_strong>:
mov    (%rdi),%al
test   %al,%al
je     1128 <str_sanitize_strong+0x28>
add    $0x1,%rdi
mov    $0x20,%ecx
nop
and    $0x7f,%al
cmp    $0x21,%al
movzbl %al,%eax
cmovb  %ecx,%eax
mov    %al,-0x1(%rdi)
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <str_sanitize_strong+0x10>
ret

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

LLVM IR (-O2):
define void @str_sanitize_strong(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %11, %4 ], [ %2, %1 ]
%6 = phi i8* [ %10, %4 ], [ %0, %1 ]
%7 = and i8 %5, 127
%8 = icmp ugt i8 %7, 32
%9 = select i1 %8, i8 %7, i8 32
store i8 %9, i8* %6
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
ret void
}
/* Variables and functions */
int intlen(int);
int get_max_perc_len(int max_percent) { return intlen((int)max_percent); }


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

x86 assembly (clang, -O2):
<get_max_perc_len>:
jmp    1030 <intlen@plt>

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

LLVM IR (-O2):
define i32 @get_max_perc_len(i32 %0) {
%2 = tail call i32 @intlen(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int _assert_pointer_mismatch(char *func, void *expected, void *found) {
  printf("F");
  return 1;
}


x86 assembly (clang, -O0):
<_assert_pointer_mismatch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_assert_pointer_mismatch>:
push   %rax
mov    $0x46,%edi
call   1030 <putchar@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @_assert_pointer_mismatch(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32 @putchar(i32 70)
ret i32 1
}
unsigned char key_available() { return 0; }


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

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

LLVM IR (-O0):
define zeroext i8 @key_available() {
ret i8 0
}

LLVM IR (-O2):
define zeroext i8 @key_available() {
ret i8 0
}
void av_find_nearest_q_idx() {}


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

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

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

LLVM IR (-O2):
define void @av_find_nearest_q_idx() {
ret void
}
/* Variables and functions */
char *malloc(int);
int rand();
char *realloc(char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
char *fn44() {
  char *result;
  result = malloc(20 + rand() % 20);
  result = realloc(result, 30 + rand() % 20);
  strcpy((char *)result, "fn44");
  return result;
}


x86 assembly (clang, -O0):
<fn44>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0x10(%rbp),%rdi
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x1e,%esi
call   1050 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe67(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn44>:
push   %rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1e,%esi
mov    %rbx,%rdi
call   1050 <realloc@plt>
mov    %rax,%rbx
lea    0xe4f(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"fn44\00"
define i8* @fn44() {
%1 = alloca i8*
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 20
%4 = add nsw i32 20, %3
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 20
%9 = add nsw i32 30, %8
%10 = call i8* @realloc(i8* %6, i32 %9)
store i8* %10, i8** %1
%11 = load i8*, i8** %1
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"fn44\00"
define i8* @fn44() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 20
%3 = add nsw i32 %2, 20
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 20
%7 = add nsw i32 %6, 30
%8 = tail call i8* @realloc(i8* %4, i32 %7)
%9 = tail call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %8
}
/* Variables and functions */
char *px_malloc0(size_t);
int /*<<< orphan*/ strncpy(char *, char const *, size_t);
char *px_strndup(const char *s, size_t n) {
  if (!s)
    return NULL;
  char *tmp = px_malloc0(n + 1);
  strncpy(tmp, s, n);
  return tmp;
}


x86 assembly (clang, -O0):
<px_strndup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1148 <px_strndup+0x28>
movq   $0x0,-0x8(%rbp)
jmp    1172 <px_strndup+0x52>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
call   1040 <px_malloc0@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <strncpy@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<px_strndup>:
push   %r15
push   %r14
push   %rbx
test   %rdi,%rdi
je     114c <px_strndup+0x2c>
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0x1(%rsi),%rdi
call   1040 <px_malloc0@plt>
mov    %rax,%r15
mov    %rax,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <strncpy@plt>
jmp    114f <px_strndup+0x2f>
xor    %r15d,%r15d
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @px_strndup(i8* %0, i64 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = add i64 %1, 1
%6 = tail call i8* @px_malloc0(i64 %5)
%7 = tail call i32 @strncpy(i8* %6, i8* %0, i64 %1)
br label %8
8: ; preds = %2, %4
%9 = phi i8* [ %6, %4 ], [ null, %2 ]
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(void) {
  int arr[10000] = {42, 42, 42, 42, 42, 42};
  puts("Hello, world!");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x9c50,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x9c50(%rbp),%rdi
xor    %esi,%esi
mov    $0x9c40,%edx
call   1040 <memset@plt>
movl   $0x2a,-0x9c50(%rbp)
movl   $0x2a,-0x9c4c(%rbp)
movl   $0x2a,-0x9c48(%rbp)
movl   $0x2a,-0x9c44(%rbp)
movl   $0x2a,-0x9c40(%rbp)
movl   $0x2a,-0x9c3c(%rbp)
lea    0xe78(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x9c50,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello, world!\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10000 x i32]
store i32 0, i32* %1
%3 = bitcast [10000 x i32]* %2 to i8*
%4 = bitcast i8* %3 to <{ i32, i32, i32, i32, i32, i32, [9994 x i32] }>*
%5 = getelementptr inbounds <{ i32, i32, i32, i32, i32, i32, [9994 x i32] }>, <{ i32, i32, i32, i32, i32, i32, [9994 x i32] }>* %4, i32 0, i32 0
store i32 42, i32* %5
%6 = getelementptr inbounds <{ i32, i32, i32, i32, i32, i32, [9994 x i32] }>, <{ i32, i32, i32, i32, i32, i32, [9994 x i32] }>* %4, i32 0, i32 1
store i32 42, i32* %6
%7 = getelementptr inbounds <{ i32, i32, i32, i32, i32, i32, [9994 x i32] }>, <{ i32, i32, i32, i32, i32, i32, [9994 x i32] }>* %4, i32 0, i32 2
store i32 42, i32* %7
%8 = getelementptr inbounds <{ i32, i32, i32, i32, i32, i32, [9994 x i32] }>, <{ i32, i32, i32, i32, i32, i32, [9994 x i32] }>* %4, i32 0, i32 3
store i32 42, i32* %8
%9 = getelementptr inbounds <{ i32, i32, i32, i32, i32, i32, [9994 x i32] }>, <{ i32, i32, i32, i32, i32, i32, [9994 x i32] }>* %4, i32 0, i32 4
store i32 42, i32* %9
%10 = getelementptr inbounds <{ i32, i32, i32, i32, i32, i32, [9994 x i32] }>, <{ i32, i32, i32, i32, i32, i32, [9994 x i32] }>* %4, i32 0, i32 5
store i32 42, i32* %10
%11 = call i32 @puts(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Hello, world!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}