xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ puts(char *);
int read(int /*<<< orphan*/, char *, int);
int vuln() {
  char buf[80];
  int r;
  r = read(0, buf, 400);
  printf("0x%p", buf);
  printf("\nRead %d bytes. buf is %s\n", r, buf);
  puts("No shell for you :(");
  return 0;
}


x86 assembly (clang, -O0):
<vuln>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    -0x50(%rbp),%rsi
xor    %edi,%edi
mov    $0x190,%edx
call   1050 <read@plt>
mov    %eax,-0x54(%rbp)
lea    -0x50(%rbp),%rsi
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x54(%rbp),%esi
lea    -0x50(%rbp),%rdx
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xea7(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vuln>:
push   %rbp
push   %rbx
sub    $0x58,%rsp
mov    %rsp,%rbx
xor    %edi,%edi
mov    %rbx,%rsi
mov    $0x190,%edx
call   1050 <read@plt>
mov    %eax,%ebp
lea    0xeaf(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea3(%rip),%rdi
mov    %ebp,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeab(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x58,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"0x%p\00"
@.str.1 = [27 x i8] c"\0ARead %d bytes. buf is %s\0A\00"
@.str.2 = [20 x i8] c"No shell for you :(\00"
define i32 @vuln() {
%1 = alloca [80 x i8]
%2 = alloca i32
%3 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%4 = call i32 @read(i32 0, i8* %3, i32 400)
store i32 %4, i32* %2
%5 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i32, i32* %2
%8 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %7, i8* %8)
%10 = call i32 @puts(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"0x%p\00"
@.str.1 = [27 x i8] c"\0ARead %d bytes. buf is %s\0A\00"
@.str.2 = [20 x i8] c"No shell for you :(\00"
define i32 @vuln() {
%1 = alloca [80 x i8]
%2 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%3 = call i32 @read(i32 0, i8* %2, i32 400)
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %3, i8* %2)
%6 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
void exit(int status) {
  asm volatile("movl $1, %eax\n"
               "int $0x80\n");
}


x86 assembly (clang, -O0):
<exit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%eax
int    $0x80

x86 assembly (clang, -O2):
<exit>:
mov    $0x1,%eax
int    $0x80

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

LLVM IR (-O2):
define void @exit(i32 %0) {
tail call void asm sideeffect "movl $$1, %eax\0Aint $$0x80\0A", "~{dirflag},~{fpsr},~{flags}"()
unreachable
}
int key_hash(int h) {
  h ^= (h >> 20) ^ (h >> 12);
  return h ^ (h >> 7) ^ (h >> 4);
}


x86 assembly (clang, -O0):
<key_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x14,%eax
mov    -0x4(%rbp),%ecx
sar    $0xc,%ecx
xor    %ecx,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x7,%ecx
xor    %ecx,%eax
mov    -0x4(%rbp),%ecx
sar    $0x4,%ecx
xor    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<key_hash>:
mov    %edi,%eax
sar    $0xc,%eax
xor    %edi,%eax
sar    $0x14,%edi
xor    %edi,%eax
mov    %eax,%ecx
sar    $0x7,%ecx
xor    %eax,%ecx
sar    $0x4,%eax
xor    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @key_hash(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 20
%5 = load i32, i32* %2
%6 = ashr i32 %5, 12
%7 = xor i32 %4, %6
%8 = load i32, i32* %2
%9 = xor i32 %8, %7
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = load i32, i32* %2
%12 = ashr i32 %11, 7
%13 = xor i32 %10, %12
%14 = load i32, i32* %2
%15 = ashr i32 %14, 4
%16 = xor i32 %13, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @key_hash(i32 %0) {
%2 = ashr i32 %0, 20
%3 = ashr i32 %0, 12
%4 = xor i32 %3, %0
%5 = xor i32 %4, %2
%6 = ashr i32 %5, 7
%7 = xor i32 %6, %5
%8 = ashr i32 %5, 4
%9 = xor i32 %7, %8
ret i32 %9
}
/* Variables and functions */
scalar_t__ sqrt(int);
int strlen(char const *);
int stateSize(const char *state) {
  int len = strlen(state);
  int size = (int)sqrt(len);
  if ((size * size) == len) {
    return size;
  }
  return -1;
}


x86 assembly (clang, -O0):
<stateSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <sqrt@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
imul   -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jne    115e <stateSize+0x3e>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1165 <stateSize+0x45>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stateSize>:
push   %rbx
call   1030 <strlen@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
imul   %eax,%ecx
cmp    %ebx,%ecx
mov    $0xffffffff,%ecx
cmovne %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @stateSize(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = call i64 @sqrt(i32 %8)
%10 = trunc i64 %9 to i32
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = load i32, i32* %5
%13 = mul nsw i32 %11, %12
%14 = load i32, i32* %4
%15 = icmp eq i32 %13, %14
br i1 %15, label %16, label %18
16: ; preds = %1
%17 = load i32, i32* %5
store i32 %17, i32* %2
br label %19
18: ; preds = %1
store i32 -1, i32* %2
br label %19
19: ; preds = %18, %16
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @stateSize(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i64 @sqrt(i32 %2)
%4 = trunc i64 %3 to i32
%5 = mul nsw i32 %4, %4
%6 = icmp eq i32 %5, %2
%7 = select i1 %6, i32 %4, i32 -1
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ evaluate_uniform_flow_c();
void evaluate_uniform_flow() { evaluate_uniform_flow_c(); }


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

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

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

LLVM IR (-O2):
define void @evaluate_uniform_flow() {
%1 = tail call i32 (...) @evaluate_uniform_flow_c()
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ initscr();
int main(void) {
  initscr();
  endwin();
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <initscr@plt>
mov    $0x0,%al
call   1040 <endwin@plt>
mov    0x2e9c(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <initscr@plt>
xor    %eax,%eax
call   1040 <endwin@plt>
mov    0x2eaa(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @initscr()
%3 = call i32 (...) @endwin()
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @initscr()
%2 = tail call i32 (...) @endwin()
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void printUsage() {
  puts("Synopsis:\n"
       "  Print fasta stats\n"
       "Usage:\n"
       "  biotool [options] contigs.fasta [another.fa ...]\n"
       "Options:\n"
       "  --help         Show this help\n"
       "  --version      Print version and exit\n"
       "  --log LOG_FILE Log program progress to LOG_FILE\n"
       "  --minlen N     Minimum length sequence to include in stats "
       "(default=0)");
}


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

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

LLVM IR (-O0):
@.str = [292 x i8] c"Synopsis:\0A Print fasta stats\0AUsage:\0A biotool [options] contigs.fasta [another.fa ...]\0AOptions:\0A --help Show this help\0A --version Print version and exit\0A --log LOG_FILE Log program progress to LOG_FILE\0A --minlen N Minimum length sequence to include in stats (default=0)\00"
define void @printUsage() {
%1 = call i32 @puts(i8* getelementptr inbounds ([292 x i8], [292 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [292 x i8] c"Synopsis:\0A Print fasta stats\0AUsage:\0A biotool [options] contigs.fasta [another.fa ...]\0AOptions:\0A --help Show this help\0A --version Print version and exit\0A --log LOG_FILE Log program progress to LOG_FILE\0A --minlen N Minimum length sequence to include in stats (default=0)\00"
define void @printUsage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([292 x i8], [292 x i8]* @.str, i64 0, i64 0))
ret void
}
void proc44() {}


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

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

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

LLVM IR (-O2):
define void @proc44() {
ret void
}
int chomp(char *s) {
  int i;
  for (i = 0; *(s + i) != '\n' && *(s + i) != '\0'; ++i)
    ;
  if (*(s + i) == '\n')
    *(s + i) = '\0';
  return 0;
}


x86 assembly (clang, -O0):
<chomp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0xd(%rbp)
je     113e <chomp+0x3e>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    114e <chomp+0x4e>
jmp    1161 <chomp+0x61>
jmp    1153 <chomp+0x53>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <chomp+0xf>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    1182 <chomp+0x82>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<chomp>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rax,1),%ecx
test   %cl,%cl
je     1129 <chomp+0x29>
cmp    $0xa,%cl
je     1123 <chomp+0x23>
add    $0x1,%rax
jmp    1110 <chomp+0x10>
mov    %eax,%eax
movb   $0x0,(%rdi,%rax,1)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @chomp(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i64 [ %7, %6 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
switch i8 %5, label %6 [
i8 10, label %8
i8 0, label %11
]
6: ; preds = %2
%7 = add nuw i64 %3, 1
br label %2
8: ; preds = %2
%9 = and i64 %3, 4294967295
%10 = getelementptr inbounds i8, i8* %0, i64 %9
store i8 0, i8* %10
br label %11
11: ; preds = %2, %8
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ mvinnstr(int, int, char *, int /*<<< orphan*/);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strlen(char *);
bool window_has_string(int x, int y, char *string) {
  char buf[1024];
  mvinnstr(y, x, buf, strlen(string));
  return strcmp(string, buf) == 0;
}


x86 assembly (clang, -O0):
<window_has_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x420(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x41c(%rbp)
lea    -0x410(%rbp),%rax
mov    %rax,-0x418(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x420(%rbp),%edi
mov    -0x41c(%rbp),%esi
mov    -0x418(%rbp),%rdx
mov    %eax,%ecx
call   1040 <mvinnstr@plt>
mov    -0x10(%rbp),%rdi
lea    -0x410(%rbp),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<window_has_string>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x408,%rsp
mov    %rdx,%rbx
mov    %esi,%ebp
mov    %edi,%r14d
mov    %rdx,%rdi
call   1030 <strlen@plt>
mov    %rsp,%r15
mov    %ebp,%edi
mov    %r14d,%esi
mov    %r15,%rdx
mov    %eax,%ecx
call   1040 <mvinnstr@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x408,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @window_has_string(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca [1024 x i8]
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%11 = load i8*, i8** %6
%12 = call i32 @strlen(i8* %11)
%13 = call i32 @mvinnstr(i32 %8, i32 %9, i8* %10, i32 %12)
%14 = load i8*, i8** %6
%15 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%16 = call i64 @strcmp(i8* %14, i8* %15)
%17 = icmp eq i64 %16, 0
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @window_has_string(i32 %0, i32 %1, i8* %2) {
%4 = alloca [1024 x i8]
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%6 = tail call i32 @strlen(i8* %2)
%7 = call i32 @mvinnstr(i32 %1, i32 %0, i8* %5, i32 %6)
%8 = call i64 @strcmp(i8* %2, i8* %5)
%9 = icmp eq i64 %8, 0
%10 = zext i1 %9 to i32
ret i32 %10
}
void SysExcIntEnable(unsigned long ulIntFlags) {
  (*((volatile unsigned long *)(0x400F9004))) |= ulIntFlags;
}


x86 assembly (clang, -O0):
<SysExcIntEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x400f9004,%ecx
mov    (%rcx),%rcx
or     %rax,%rcx
mov    $0x400f9004,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysExcIntEnable>:
or     %rdi,0x400f9004
40
ret

LLVM IR (-O0):
define void @SysExcIntEnable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load volatile i64, i64* inttoptr (i64 1074761732 to i64*)
%5 = or i64 %4, %3
store volatile i64 %5, i64* inttoptr (i64 1074761732 to i64*)
ret void
}

LLVM IR (-O2):
define void @SysExcIntEnable(i64 %0) {
%2 = load volatile i64, i64* inttoptr (i64 1074761732 to i64*)
%3 = or i64 %2, %0
store volatile i64 %3, i64* inttoptr (i64 1074761732 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ teardown_clock();
int /*<<< orphan*/ teardown_pieces();
int /*<<< orphan*/ teardown_sym_set();
int /*<<< orphan*/ teardown_symmetries();
int /*<<< orphan*/ teardown_vec();
void teardown(void) {
  teardown_pieces();
  teardown_sym_set();
  teardown_symmetries();
  teardown_vec();
  teardown_clock();
}


x86 assembly (clang, -O0):
<teardown>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <teardown_pieces@plt>
mov    $0x0,%al
call   1070 <teardown_sym_set@plt>
mov    $0x0,%al
call   1030 <teardown_symmetries@plt>
mov    $0x0,%al
call   1060 <teardown_vec@plt>
mov    $0x0,%al
call   1050 <teardown_clock@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<teardown>:
push   %rax
xor    %eax,%eax
call   1040 <teardown_pieces@plt>
xor    %eax,%eax
call   1070 <teardown_sym_set@plt>
xor    %eax,%eax
call   1030 <teardown_symmetries@plt>
xor    %eax,%eax
call   1060 <teardown_vec@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <teardown_clock@plt>

LLVM IR (-O0):
define void @teardown() {
%1 = call i32 (...) @teardown_pieces()
%2 = call i32 (...) @teardown_sym_set()
%3 = call i32 (...) @teardown_symmetries()
%4 = call i32 (...) @teardown_vec()
%5 = call i32 (...) @teardown_clock()
ret void
}

LLVM IR (-O2):
define void @teardown() {
%1 = tail call i32 (...) @teardown_pieces()
%2 = tail call i32 (...) @teardown_sym_set()
%3 = tail call i32 (...) @teardown_symmetries()
%4 = tail call i32 (...) @teardown_vec()
%5 = tail call i32 (...) @teardown_clock()
ret void
}
/* Variables and functions */
scalar_t__ strncmp(char const *, char *, unsigned int);
char const *_is_terminal(char const *peek, char *terminal, unsigned size) {
  if (!peek)
    return NULL;
  if (strncmp(peek, terminal, size))
    return NULL;
  return peek + size;
}


x86 assembly (clang, -O0):
<_is_terminal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    113b <_is_terminal+0x2b>
movq   $0x0,-0x8(%rbp)
jmp    1170 <_is_terminal+0x60>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     1162 <_is_terminal+0x52>
movq   $0x0,-0x8(%rbp)
jmp    1170 <_is_terminal+0x60>
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_is_terminal>:
push   %rbp
push   %rbx
push   %rax
test   %rdi,%rdi
je     1127 <_is_terminal+0x17>
mov    %edx,%ebp
mov    %rdi,%rbx
call   1030 <strncmp@plt>
test   %rax,%rax
je     112b <_is_terminal+0x1b>
xor    %ebx,%ebx
jmp    1130 <_is_terminal+0x20>
mov    %ebp,%eax
add    %rax,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @_is_terminal(i8* %0, i8* %1, i32 %2) {
%4 = icmp eq i8* %0, null
br i1 %4, label %11, label %5
5: ; preds = %3
%6 = tail call i64 @strncmp(i8* %0, i8* %1, i32 %2)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = zext i32 %2 to i64
%10 = getelementptr inbounds i8, i8* %0, i64 %9
br label %11
11: ; preds = %5, %3, %8
%12 = phi i8* [ %10, %8 ], [ null, %3 ], [ null, %5 ]
ret i8* %12
}
void fc33(int n) {
  {
    typedef int(*b)[n];
  a:
    goto a;
    {
      typedef int(*c)[n];
      0;
    }
    {
      typedef int(*d)[n];
      0;
    };
    typedef int(*e)[n];
    0;
  };
  {
    typedef int(*f)[n];
    {
      typedef int(*g)[n];
      0;
    };
    {
      typedef int(*h)[n];
      0;
    };
    ;
    typedef int(*i)[n];
    0;
  };
  ;
  typedef int(*j)[n];
  0;
}


x86 assembly (clang, -O0):
<fc33>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fc33+0x7>

x86 assembly (clang, -O2):
<fc33>:
jmp    1100 <fc33>

LLVM IR (-O0):
define void @fc33(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
br label %5
5: ; preds = %5, %1
br label %5
6: ; No predecessors!
%7 = load i32, i32* %2
%8 = zext i32 %7 to i64
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
%11 = load i32, i32* %2
%12 = zext i32 %11 to i64
%13 = load i32, i32* %2
%14 = zext i32 %13 to i64
%15 = load i32, i32* %2
%16 = zext i32 %15 to i64
%17 = load i32, i32* %2
%18 = zext i32 %17 to i64
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
%21 = load i32, i32* %2
%22 = zext i32 %21 to i64
ret void
}

LLVM IR (-O2):
define void @fc33(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
int __attribute__((weak)) _execve() { return -1; }


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

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

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

LLVM IR (-O2):
define weak i32 @_execve() {
ret i32 -1
}
int main() {
  const unsigned char *str = "£";
  if (str[0] != 0xc2 || str[1] != 0xa3) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
lea    0xeee(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
cmp    $0xc2,%eax
jne    113b <main+0x3b>
mov    -0x10(%rbp),%rax
movzbl 0x1(%rax),%eax
cmp    $0xa3,%eax
je     1147 <main+0x47>
movl   $0x1,-0x4(%rbp)
jmp    114e <main+0x4e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [3 x i8] c"\C2\A3\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = icmp ne i32 %6, 194
br i1 %7, label %14, label %8
8: ; preds = %0
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = icmp ne i32 %12, 163
br i1 %13, label %14, label %15
14: ; preds = %8, %0
store i32 1, i32* %1
br label %16
15: ; preds = %8
store i32 0, i32* %1
br label %16
16: ; preds = %15, %14
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int ssearch(int n, int *a, int x) {
  int i;
  for (i = 0; i < n; i++) {
    if (a[i] == x) {
      return i;
    }
  }
  return n;
}


x86 assembly (clang, -O0):
<ssearch>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1153 <ssearch+0x53>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x14(%rbp),%eax
jne    1140 <ssearch+0x40>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1159 <ssearch+0x59>
jmp    1145 <ssearch+0x45>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1115 <ssearch+0x15>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ssearch>:
mov    %edi,%eax
test   %edi,%edi
jle    111e <ssearch+0x1e>
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
cmp    %edx,(%rsi,%rcx,4)
je     111f <ssearch+0x1f>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <ssearch+0x10>
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @ssearch(i32 %0, i32* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %0 to i64
br label %7
7: ; preds = %5, %12
%8 = phi i64 [ 0, %5 ], [ %13, %12 ]
%9 = getelementptr inbounds i32, i32* %1, i64 %8
%10 = load i32, i32* %9
%11 = icmp eq i32 %10, %2
br i1 %11, label %15, label %12
12: ; preds = %7
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %17, label %7
15: ; preds = %7
%16 = trunc i64 %8 to i32
br label %17
17: ; preds = %12, %15, %3
%18 = phi i32 [ %0, %3 ], [ %16, %15 ], [ %0, %12 ]
ret i32 %18
}
int test_imm_C7uint8_reg(unsigned char val) {
  return ((val) & (0xC7 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_C7uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xc7,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_C7uint8_reg>:
test   $0xc7,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_C7uint8_reg(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, 199
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_C7uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -57
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int tpl_cpu_bigendian();
int tpl_needs_endian_swap(void *d) {
  char *c;
  int cpu_is_bigendian;
  c = (char *)d;
  cpu_is_bigendian = tpl_cpu_bigendian();
  return ((c[3] & (1 << 0)) == cpu_is_bigendian) ? 0 : 1;
}


x86 assembly (clang, -O0):
<tpl_needs_endian_swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <tpl_cpu_bigendian@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x3(%rax),%edx
and    $0x1,%edx
mov    -0x14(%rbp),%esi
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    %esi,%edx
cmove  %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tpl_needs_endian_swap>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <tpl_cpu_bigendian@plt>
movzbl 0x3(%rbx),%edx
and    $0x1,%edx
xor    %ecx,%ecx
cmp    %edx,%eax
setne  %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @tpl_needs_endian_swap(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
store i8* %5, i8** %3
%6 = call i32 (...) @tpl_cpu_bigendian()
store i32 %6, i32* %4
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 3
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = and i32 %10, 1
%12 = load i32, i32* %4
%13 = icmp eq i32 %11, %12
%14 = zext i1 %13 to i64
%15 = select i1 %13, i32 0, i32 1
ret i32 %15
}

LLVM IR (-O2):
define i32 @tpl_needs_endian_swap(i8* nocapture %0) {
%2 = tail call i32 (...) @tpl_cpu_bigendian()
%3 = getelementptr inbounds i8, i8* %0, i64 3
%4 = load i8, i8* %3
%5 = and i8 %4, 1
%6 = zext i8 %5 to i32
%7 = icmp ne i32 %2, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
char *getenv(char *);
int dcc_get_tmp_top(const char **p_ret) {
  const char *d;
  d = getenv("TMPDIR");
  if (!d || d[0] == '\0') {
    *p_ret = "/tmp";
    return 0;
  } else {
    *p_ret = d;
    return 0;
  }
}


x86 assembly (clang, -O0):
<dcc_get_tmp_top>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1147 <dcc_get_tmp_top+0x37>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1161 <dcc_get_tmp_top+0x51>
mov    -0x10(%rbp),%rax
lea    0xeb5(%rip),%rcx
mov    %rcx,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    1173 <dcc_get_tmp_top+0x63>
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dcc_get_tmp_top>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     1135 <dcc_get_tmp_top+0x25>
cmpb   $0x0,(%rax)
lea    0xed8(%rip),%rcx
cmovne %rax,%rcx
jmp    113c <dcc_get_tmp_top+0x2c>
lea    0xecb(%rip),%rcx
mov    %rcx,(%rbx)
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"TMPDIR\00"
@.str.1 = [5 x i8] c"/tmp\00"
define i32 @dcc_get_tmp_top(i8** %0) {
%2 = alloca i32
%3 = alloca i8**
%4 = alloca i8*
store i8** %0, i8*** %3
%5 = call i8* @getenv(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i8* %5, i8** %4
%6 = load i8*, i8** %4
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = load i8*, i8** %4
%10 = getelementptr inbounds i8, i8* %9, i64 0
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %8, %1
%15 = load i8**, i8*** %3
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8** %15
store i32 0, i32* %2
br label %19
16: ; preds = %8
%17 = load i8*, i8** %4
%18 = load i8**, i8*** %3
store i8* %17, i8** %18
store i32 0, i32* %2
br label %19
19: ; preds = %16, %14
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
@.str = [7 x i8] c"TMPDIR\00"
@.str.1 = [5 x i8] c"/tmp\00"
define i32 @dcc_get_tmp_top(i8** nocapture writeonly %0) {
%2 = tail call i8* @getenv(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i8* %2, null
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = load i8, i8* %2
%6 = icmp eq i8 %5, 0
%7 = select i1 %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %2
br label %8
8: ; preds = %4, %1
%9 = phi i8* [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), %1 ], [ %7, %4 ]
store i8* %9, i8** %0
ret i32 0
}
/* Variables and functions */
char *crypt(char *, char *);
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ strncmp(char *, char *, int /*<<< orphan*/);
int passCheck(char *supplied, char *hash) {
  char *hash2 = crypt(supplied, hash);
  return !strncmp(hash2, hash, strlen(hash));
}


x86 assembly (clang, -O0):
<passCheck>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <crypt@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<passCheck>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1040 <crypt@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1050 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @passCheck(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i8* @crypt(i8* %6, i8* %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = load i8*, i8** %4
%11 = load i8*, i8** %4
%12 = call i32 @strlen(i8* %11)
%13 = call i32 @strncmp(i8* %9, i8* %10, i32 %12)
%14 = icmp ne i32 %13, 0
%15 = xor i1 %14, true
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @passCheck(i8* %0, i8* %1) {
%3 = tail call i8* @crypt(i8* %0, i8* %1)
%4 = tail call i32 @strlen(i8* %1)
%5 = tail call i32 @strncmp(i8* %3, i8* %1, i32 %4)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void redislite_free(void *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<redislite_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @redislite_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
f(b, c) unsigned char *b;
int c;
{
  unsigned long v = 0;
  switch (c) {
  case 'd':
    v = ((unsigned long)b[0] << 8) + b[1];
    v >>= 9;
    break;
  case 'k':
    v = b[3] >> 4;
    break;
  default:
    abort();
  }
  return v;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
sub    $0x64,%eax
je     114c <f+0x3c>
jmp    113b <f+0x2b>
mov    -0x1c(%rbp),%eax
sub    $0x6b,%eax
je     1177 <f+0x67>
jmp    118d <f+0x7d>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
shl    $0x8,%rax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
shr    $0x9,%rax
mov    %rax,-0x18(%rbp)
jmp    1192 <f+0x82>
mov    -0x8(%rbp),%rax
movzbl 0x3(%rax),%eax
sar    $0x4,%eax
cltq
mov    %rax,-0x18(%rbp)
jmp    1192 <f+0x82>
call   1030 <abort@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
mov    $0x1,%cl
cmp    $0x64,%esi
je     1123 <f+0x13>
cmp    $0x6b,%esi
jne    112a <f+0x1a>
add    $0x3,%rdi
mov    $0x4,%cl
movzbl (%rdi),%eax
shr    %cl,%eax
pop    %rcx
ret
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @f(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i64
store i8* %0, i8** %3
store i32 %1, i32* %4
store i64 0, i64* %5
%6 = load i32, i32* %4
switch i32 %6, label %27 [
i32 100, label %7
i32 107, label %20
]
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 0
%10 = load i8, i8* %9
%11 = zext i8 %10 to i64
%12 = shl i64 %11, 8
%13 = load i8*, i8** %3
%14 = getelementptr inbounds i8, i8* %13, i64 1
%15 = load i8, i8* %14
%16 = zext i8 %15 to i64
%17 = add i64 %12, %16
store i64 %17, i64* %5
%18 = load i64, i64* %5
%19 = lshr i64 %18, 9
store i64 %19, i64* %5
br label %28
20: ; preds = %2
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i64 3
%23 = load i8, i8* %22
%24 = zext i8 %23 to i32
%25 = ashr i32 %24, 4
%26 = sext i32 %25 to i64
store i64 %26, i64* %5
br label %28
27: ; preds = %2
unreachable
28: ; preds = %20, %7
%29 = load i64, i64* %5
%30 = trunc i64 %29 to i32
ret i32 %30
}

LLVM IR (-O2):
define i32 @f(i8* nocapture %0, i32 %1) {
switch i32 %1, label %5 [
i32 100, label %6
i32 107, label %3
]
3: ; preds = %2
%4 = getelementptr inbounds i8, i8* %0, i64 3
br label %6
5: ; preds = %2
tail call void @abort()
unreachable
6: ; preds = %2, %3
%7 = phi i8* [ %4, %3 ], [ %0, %2 ]
%8 = phi i8 [ 4, %3 ], [ 1, %2 ]
%9 = load i8, i8* %7
%10 = lshr i8 %9, %8
%11 = zext i8 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ fprintRTF(char *);
void EndCellRTF(void) { fprintRTF("\\cell}\n"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"\\cell}\0A\00"
define void @EndCellRTF() {
%1 = call i32 @fprintRTF(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"\\cell}\0A\00"
define void @EndCellRTF() {
%1 = tail call i32 @fprintRTF(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int stun_is_command_message_str(unsigned char const *, size_t);
int stun_is_command_message_offset_str(const unsigned char *buf, size_t blen,
                                       int offset) {
  return stun_is_command_message_str(buf + offset, blen);
}


x86 assembly (clang, -O0):
<stun_is_command_message_offset_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x14(%rbp),%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
call   1030 <stun_is_command_message_str@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stun_is_command_message_offset_str>:
movslq %edx,%rax
add    %rax,%rdi
jmp    1030 <stun_is_command_message_str@plt>

LLVM IR (-O0):
define i32 @stun_is_command_message_offset_str(i8* %0, i64 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %6
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %7, i64 %9
%11 = load i64, i64* %5
%12 = call i32 @stun_is_command_message_str(i8* %10, i64 %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @stun_is_command_message_offset_str(i8* %0, i64 %1, i32 %2) {
%4 = sext i32 %2 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = tail call i32 @stun_is_command_message_str(i8* %5, i64 %1)
ret i32 %6
}
/* Variables and functions */
int check_int(int /*<<< orphan*/);
int main() { return check_int(0); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @check_int(i32 0)
ret i32 %1
}
/* Variables and functions */
unsigned int cmd_isp_io(unsigned int);
unsigned int at_io(unsigned int cmd) { return cmd_isp_io(cmd); }


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

x86 assembly (clang, -O2):
<at_io>:
jmp    1030 <cmd_isp_io@plt>

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

LLVM IR (-O2):
define i32 @at_io(i32 %0) {
%2 = tail call i32 @cmd_isp_io(i32 %0)
ret i32 %2
}
/* Variables and functions */
float floor(float);
float _floor(float s) { return floor(s); }


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

x86 assembly (clang, -O2):
<_floor>:
jmp    1030 <floorf@plt>

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

LLVM IR (-O2):
define float @_floor(float %0) {
%2 = tail call float @llvm.floor.f32(float %0)
ret float %2
}
void gtk_color_selection_is_adjusting() {}


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

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

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

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


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

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

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

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

/* Variables and functions */
uint32_t fixed_round(uint32_t x) {
  uint8_t round;
  x >>= 16 - 1;
  round = x & 1;
  x >>= 1;
  return x + round;
}


x86 assembly (clang, -O0):
<fixed_round>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0xf,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fixed_round>:
mov    %edi,%eax
shr    $0xf,%eax
and    $0x1,%eax
sar    $0x10,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @fixed_round(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = ashr i32 %4, 15
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = and i32 %6, 1
store i32 %7, i32* %3
%8 = load i32, i32* %2
%9 = ashr i32 %8, 1
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = add nsw i32 %10, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @fixed_round(i32 %0) {
%2 = lshr i32 %0, 15
%3 = and i32 %2, 1
%4 = ashr i32 %0, 16
%5 = add nsw i32 %3, %4
ret i32 %5
}
XStoreColors() {}


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

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

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

LLVM IR (-O2):
define i32 @XStoreColors() {
ret i32 undef
}
long foo() {
  {{{}}} {
    {
      {}
    }
  }
}


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

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

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

LLVM IR (-O2):
define i64 @foo() {
ret i64 undef
}
/* Variables and functions */
int /*<<< orphan*/ arm_memio_ldrb(int /*<<< orphan*/);
int /*<<< orphan*/ t16_memio_reg_op();
void t16_ldrb_reg() { arm_memio_ldrb(t16_memio_reg_op()); }


x86 assembly (clang, -O0):
<t16_ldrb_reg>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <t16_memio_reg_op@plt>
mov    %eax,%edi
call   1040 <arm_memio_ldrb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t16_ldrb_reg>:
push   %rax
xor    %eax,%eax
call   1030 <t16_memio_reg_op@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <arm_memio_ldrb@plt>

LLVM IR (-O0):
define void @t16_ldrb_reg() {
%1 = call i32 (...) @t16_memio_reg_op()
%2 = call i32 @arm_memio_ldrb(i32 %1)
ret void
}

LLVM IR (-O2):
define void @t16_ldrb_reg() {
%1 = tail call i32 (...) @t16_memio_reg_op()
%2 = tail call i32 @arm_memio_ldrb(i32 %1)
ret void
}
float mix(const float in_A, const float in_B, const float in_T) {
  return in_A + in_T * (in_B - in_A);
}


x86 assembly (clang, -O0):
<mix>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
movss  -0x8(%rbp),%xmm2
subss  -0x4(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mix>:
subss  %xmm0,%xmm1
mulss  %xmm2,%xmm1
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @mix(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %6
%9 = load float, float* %5
%10 = load float, float* %4
%11 = fsub float %9, %10
%12 = call float @llvm.fmuladd.f32(float %8, float %11, float %7)
ret float %12
}

LLVM IR (-O2):
define float @mix(float %0, float %1, float %2) {
%4 = fsub float %1, %0
%5 = tail call float @llvm.fmuladd.f32(float %2, float %4, float %0)
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ action_exec(int /*<<< orphan*/);
int /*<<< orphan*/ action_get(int, int);
void action_exec2(int id) { action_exec(action_get(id, true)); }


x86 assembly (clang, -O0):
<action_exec2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1040 <action_get@plt>
mov    %eax,%edi
call   1030 <action_exec@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<action_exec2>:
push   %rax
mov    $0x1,%esi
call   1040 <action_get@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <action_exec@plt>

LLVM IR (-O0):
define void @action_exec2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @action_get(i32 %3, i32 1)
%5 = call i32 @action_exec(i32 %4)
ret void
}

LLVM IR (-O2):
define void @action_exec2(i32 %0) {
%2 = tail call i32 @action_get(i32 %0, i32 1)
%3 = tail call i32 @action_exec(i32 %2)
ret void
}
char is_in_bound(int *arr, int size, int *ptr) {
  if (ptr < arr + size)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_in_bound>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rcx
movslq -0x14(%rbp),%rdx
shl    $0x2,%rdx
add    %rdx,%rcx
cmp    %rcx,%rax
jae    1134 <is_in_bound+0x34>
movb   $0x1,-0x1(%rbp)
jmp    1138 <is_in_bound+0x38>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_in_bound>:
movslq %esi,%rax
lea    (%rdi,%rax,4),%rax
cmp    %rdx,%rax
seta   %al
ret

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

LLVM IR (-O2):
define signext i8 @is_in_bound(i32* readnone %0, i32 %1, i32* readnone %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = icmp ugt i32* %5, %2
%7 = zext i1 %6 to i8
ret i8 %7
}
int Operand_soffsetx4_ator(unsigned int *valp, unsigned int pc) {
  *valp -= (pc & ~0x3);
  return 0;
}


x86 assembly (clang, -O0):
<Operand_soffsetx4_ator>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edx
and    $0xfffffffc,%edx
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
sub    %edx,%ecx
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Operand_soffsetx4_ator>:
and    $0xfffffffc,%esi
sub    %esi,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @Operand_soffsetx4_ator(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 = and i32 %5, -4
%7 = load i32*, i32** %3
%8 = load i32, i32* %7
%9 = sub i32 %8, %6
store i32 %9, i32* %7
ret i32 0
}

LLVM IR (-O2):
define i32 @Operand_soffsetx4_ator(i32* nocapture %0, i32 %1) {
%3 = and i32 %1, -4
%4 = load i32, i32* %0
%5 = sub i32 %4, %3
store i32 %5, i32* %0
ret i32 0
}