xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ task_testcancel();
void pthread_testcancel(void) { task_testcancel(); }


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

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

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

LLVM IR (-O2):
define void @pthread_testcancel() {
%1 = tail call i32 (...) @task_testcancel()
ret void
}
/* Variables and functions */
int O_APPEND;
int O_WRONLY;
int /*<<< orphan*/ close(int);
int open(char *, int);
int /*<<< orphan*/ write(int, char *, int);
void set_monocolor(char *dev, char *color) {
  int fd;
  fd = open(dev, O_WRONLY | O_APPEND);
  if (fd > 0) {
    write(fd, color, 6);
    close(fd);
  }
}


x86 assembly (clang, -O0):
<set_monocolor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e8d(%rip),%rax
mov    (%rax),%esi
mov    0x2e7c(%rip),%rax
or     (%rax),%esi
call   1050 <open@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    1181 <set_monocolor+0x51>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x6,%edx
call   1030 <write@plt>
mov    -0x14(%rbp),%edi
call   1040 <close@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_monocolor>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    0x2e9b(%rip),%rax
mov    0x2e8c(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
call   1050 <open@plt>
test   %eax,%eax
jle    116f <set_monocolor+0x3f>
mov    %eax,%ebp
mov    %eax,%edi
mov    %rbx,%rsi
mov    $0x6,%edx
call   1030 <write@plt>
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <close@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@O_WRONLY = global i32 0
@O_APPEND = global i32 0
define void @set_monocolor(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i32, i32* @O_WRONLY
%8 = load i32, i32* @O_APPEND
%9 = or i32 %7, %8
%10 = call i32 @open(i8* %6, i32 %9)
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %19
13: ; preds = %2
%14 = load i32, i32* %5
%15 = load i8*, i8** %4
%16 = call i32 @write(i32 %14, i8* %15, i32 6)
%17 = load i32, i32* %5
%18 = call i32 @close(i32 %17)
br label %19
19: ; preds = %13, %2
ret void
}

LLVM IR (-O2):
@O_WRONLY = global i32 0
@O_APPEND = global i32 0
define void @set_monocolor(i8* nocapture %0, i8* nocapture %1) {
%3 = load i32, i32* @O_WRONLY
%4 = load i32, i32* @O_APPEND
%5 = or i32 %4, %3
%6 = tail call i32 @open(i8* %0, i32 %5)
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = tail call i32 @write(i32 %6, i8* %1, i32 6)
%10 = tail call i32 @close(i32 %6)
br label %11
11: ; preds = %8, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hello();
int strtol(char *, int /*<<< orphan*/ *, int);
int main(int argc, char *argv[]) {
  int thread_count = 1;
  if (argc == 2) {
    thread_count = strtol(argv[1], NULL, 10);
  }
#pragma omp parallel num_threads(thread_count)
  hello();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    1160 <main+0x40>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1040 <strtol@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1030 <hello@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jne    1136 <main+0x16>
mov    0x8(%rsi),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1040 <strtol@plt>
xor    %eax,%eax
call   1030 <hello@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %6
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 2
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 @strtol(i8* %12, i32* null, i32 10)
store i32 %13, i32* %6
br label %14
14: ; preds = %9, %2
%15 = call i32 (...) @hello()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @strtol(i8* nocapture %6, i32* null, i32 10)
br label %8
8: ; preds = %4, %2
%9 = tail call i32 (...) @hello()
ret i32 0
}
void switch_dev_unregister(struct switch_dev *sdev) {}


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

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

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

LLVM IR (-O2):
%struct.switch_dev = type opaque
define void @switch_dev_unregister(%struct.switch_dev* nocapture %0) {
ret void
}
int precedence(char c) {
  if (c == '(')
    return 0;
  if (c == '+' || c == '-')
    return 1;
  if (c == '*' || c == '/')
    return 2;
}


x86 assembly (clang, -O0):
<precedence>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x28,%eax
jne    1123 <precedence+0x23>
movl   $0x0,-0x4(%rbp)
jmp    116a <precedence+0x6a>
movsbl -0x5(%rbp),%eax
cmp    $0x2b,%eax
je     113d <precedence+0x3d>
movsbl -0x5(%rbp),%eax
cmp    $0x2d,%eax
jne    1149 <precedence+0x49>
movl   $0x1,-0x4(%rbp)
jmp    116a <precedence+0x6a>
movsbl -0x5(%rbp),%eax
cmp    $0x2a,%eax
je     1163 <precedence+0x63>
movsbl -0x5(%rbp),%eax
cmp    $0x2f,%eax
jne    116a <precedence+0x6a>
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<precedence>:
add    $0xd8,%dil
mov    $0x2,%eax
cmp    $0x5,%dil
ja     111d <precedence+0x1d>
movsbq %dil,%rax
lea    0xee6(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @precedence(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 40
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %26
8: ; preds = %1
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 43
br i1 %11, label %16, label %12
12: ; preds = %8
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 45
br i1 %15, label %16, label %17
16: ; preds = %12, %8
store i32 1, i32* %2
br label %26
17: ; preds = %12
%18 = load i8, i8* %3
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %19, 42
br i1 %20, label %25, label %21
21: ; preds = %17
%22 = load i8, i8* %3
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 47
br i1 %24, label %25, label %26
25: ; preds = %21, %17
store i32 2, i32* %2
br label %26
26: ; preds = %7, %16, %25, %21
%27 = load i32, i32* %2
ret i32 %27
}

LLVM IR (-O2):
@switch.table.precedence = [6 x i32] [i32 0, i32 2, i32 2, i32 1, i32 2, i32 1]
define i32 @precedence(i8 signext %0) {
%2 = add i8 %0, -40
%3 = icmp ult i8 %2, 6
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i8 %2 to i64
%6 = getelementptr inbounds [6 x i32], [6 x i32]* @switch.table.precedence, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 2, %1 ]
ret i32 %9
}
/* Variables and functions */
scalar_t__ en_CA_isupper(int);
int en_CA_tolower(int c) {
  { return en_CA_isupper(c) ? (c - 'A' + 'a') : c; }
}


x86 assembly (clang, -O0):
<en_CA_tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <en_CA_isupper@plt>
cmp    $0x0,%rax
je     113e <en_CA_tolower+0x2e>
mov    -0x4(%rbp),%eax
sub    $0x41,%eax
add    $0x61,%eax
mov    %eax,-0x8(%rbp)
jmp    1144 <en_CA_tolower+0x34>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<en_CA_tolower>:
push   %rbx
mov    %edi,%ebx
call   1030 <en_CA_isupper@plt>
lea    0x20(%rbx),%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @en_CA_tolower(i32 %0) {
%2 = tail call i64 @en_CA_isupper(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ delay(int);
int /*<<< orphan*/ fax_send(char *, int);
int /*<<< orphan*/ rmlocks();
int /*<<< orphan*/ tio_flush_queue(int, int);
void fax_close(int fd) {
  tio_flush_queue(fd, (0x01 | 0x02));
  fax_send("AT+FCLASS=0", fd);
  delay(500);
  tio_flush_queue(fd, (0x01 | 0x02));
  close(fd);
  rmlocks();
}


x86 assembly (clang, -O0):
<fax_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x3,%esi
call   1070 <tio_flush_queue@plt>
mov    -0x4(%rbp),%esi
lea    0xe8e(%rip),%rdi
call   1060 <fax_send@plt>
mov    $0x1f4,%edi
call   1050 <delay@plt>
mov    -0x4(%rbp),%edi
mov    $0x3,%esi
call   1070 <tio_flush_queue@plt>
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
mov    $0x0,%al
call   1030 <rmlocks@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fax_close>:
push   %rbx
mov    %edi,%ebx
mov    $0x3,%esi
call   1070 <tio_flush_queue@plt>
lea    0xe9c(%rip),%rdi
mov    %ebx,%esi
call   1060 <fax_send@plt>
mov    $0x1f4,%edi
call   1050 <delay@plt>
mov    %ebx,%edi
mov    $0x3,%esi
call   1070 <tio_flush_queue@plt>
mov    %ebx,%edi
call   1040 <close@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <rmlocks@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"AT+FCLASS=0\00"
define void @fax_close(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @tio_flush_queue(i32 %3, i32 3)
%5 = load i32, i32* %2
%6 = call i32 @fax_send(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = call i32 @delay(i32 500)
%8 = load i32, i32* %2
%9 = call i32 @tio_flush_queue(i32 %8, i32 3)
%10 = load i32, i32* %2
%11 = call i32 @close(i32 %10)
%12 = call i32 (...) @rmlocks()
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"AT+FCLASS=0\00"
define void @fax_close(i32 %0) {
%2 = tail call i32 @tio_flush_queue(i32 %0, i32 3)
%3 = tail call i32 @fax_send(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = tail call i32 @delay(i32 500)
%5 = tail call i32 @tio_flush_queue(i32 %0, i32 3)
%6 = tail call i32 @close(i32 %0)
%7 = tail call i32 (...) @rmlocks()
ret void
}
int is_num(char c) {
  if (c >= '0' && c <= '9') {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<is_num>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1130 <is_num+0x30>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     1130 <is_num+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1137 <is_num+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_num>:
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @is_num(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 48
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 57
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %2
br label %13
12: ; preds = %7, %1
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @is_num(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
char toupper(char);
int working_toupper() {
  if (toupper('9') == '9')
    return 1;
  else {
    fputs("NOTE: toupper() gives problems\n", stderr);
    return 0;
  }
}


x86 assembly (clang, -O0):
<working_toupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x39,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
cmp    $0x39,%eax
jne    114a <working_toupper+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1166 <working_toupper+0x46>
mov    0x2e8f(%rip),%rax
mov    (%rax),%esi
lea    0xea6(%rip),%rdi
call   1040 <fputs@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<working_toupper>:
push   %rax
mov    $0x39,%edi
call   1030 <toupper@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    $0x39,%cl
je     114e <working_toupper+0x2e>
mov    0x2ea2(%rip),%rax
mov    (%rax),%esi
lea    0xeb9(%rip),%rdi
call   1040 <fputs@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"NOTE: toupper() gives problems\0A\00"
@stderr = global i32 0
define i32 @working_toupper() {
%1 = alloca i32
%2 = call signext i8 @toupper(i8 signext 57)
%3 = sext i8 %2 to i32
%4 = icmp eq i32 %3, 57
br i1 %4, label %5, label %6
5: ; preds = %0
store i32 1, i32* %1
br label %9
6: ; preds = %0
%7 = load i32, i32* @stderr
%8 = call i32 @fputs(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %7)
store i32 0, i32* %1
br label %9
9: ; preds = %6, %5
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@.str = [32 x i8] c"NOTE: toupper() gives problems\0A\00"
@stderr = global i32 0
define i32 @working_toupper() {
%1 = tail call signext i8 @toupper(i8 signext 57)
%2 = icmp eq i8 %1, 57
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = load i32, i32* @stderr
%5 = tail call i32 @fputs(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %4)
br label %6
6: ; preds = %0, %3
%7 = phi i32 [ 0, %3 ], [ 1, %0 ]
ret i32 %7
}
long ima4_samples_to_bytes(long samples, int channels) {
  long bytes = samples / 0x40 * 0x22 * channels;
  return bytes;
}


x86 assembly (clang, -O0):
<ima4_samples_to_bytes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x40,%ecx
cqto
idiv   %rcx
imul   $0x22,%rax,%rax
movslq -0xc(%rbp),%rcx
imul   %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ima4_samples_to_bytes>:
lea    0x3f(%rdi),%rax
test   %rdi,%rdi
cmovns %rdi,%rax
sar    $0x6,%rax
movslq %esi,%rcx
imul   %rax,%rcx
mov    %rcx,%rax
shl    $0x5,%rax
lea    (%rax,%rcx,2),%rax
ret

LLVM IR (-O0):
define i64 @ima4_samples_to_bytes(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
%5 = alloca i64
store i64 %0, i64* %3
store i32 %1, i32* %4
%6 = load i64, i64* %3
%7 = sdiv i64 %6, 64
%8 = mul nsw i64 %7, 34
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
%11 = mul nsw i64 %8, %10
store i64 %11, i64* %5
%12 = load i64, i64* %5
ret i64 %12
}

LLVM IR (-O2):
define i64 @ima4_samples_to_bytes(i64 %0, i32 %1) {
%3 = sdiv i64 %0, 64
%4 = mul nsw i64 %3, 34
%5 = sext i32 %1 to i64
%6 = mul nsw i64 %4, %5
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
int *malloc(size_t);
int /*<<< orphan*/ merge_sort_top_down_internal(int *, int *,
                                                int /*<<< orphan*/, size_t);
void merge_sort_top_down(int array[], size_t length) {
  if (length == 0) {
    return;
  }
  int *temp = malloc(length * sizeof(int));
  merge_sort_top_down_internal(array, temp, 0, length - 1);
  free(temp);
}


x86 assembly (clang, -O0):
<merge_sort_top_down>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1150 <merge_sort_top_down+0x20>
jmp    1181 <merge_sort_top_down+0x51>
mov    -0x10(%rbp),%rdi
shl    $0x2,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
xor    %edx,%edx
call   1040 <merge_sort_top_down_internal@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<merge_sort_top_down>:
test   %rsi,%rsi
je     1171 <merge_sort_top_down+0x41>
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0x0(,%rsi,4),%rdi
call   1050 <malloc@plt>
mov    %rax,%r15
add    $0xffffffffffffffff,%rbx
mov    %r14,%rdi
mov    %rax,%rsi
xor    %edx,%edx
mov    %rbx,%rcx
call   1040 <merge_sort_top_down_internal@plt>
mov    %r15,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @merge_sort_top_down(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
%5 = alloca i32*
store i32* %0, i32** %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
br label %20
9: ; preds = %2
%10 = load i64, i64* %4
%11 = mul i64 %10, 4
%12 = call i32* @malloc(i64 %11)
store i32* %12, i32** %5
%13 = load i32*, i32** %3
%14 = load i32*, i32** %5
%15 = load i64, i64* %4
%16 = sub i64 %15, 1
%17 = call i32 @merge_sort_top_down_internal(i32* %13, i32* %14, i32 0, i64 %16)
%18 = load i32*, i32** %5
%19 = call i32 @free(i32* %18)
br label %20
20: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
define void @merge_sort_top_down(i32* %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = shl i64 %1, 2
%6 = tail call i32* @malloc(i64 %5)
%7 = add i64 %1, -1
%8 = tail call i32 @merge_sort_top_down_internal(i32* %0, i32* %6, i32 0, i64 %7)
%9 = tail call i32 @free(i32* %6)
br label %10
10: ; preds = %2, %4
ret void
}
void error_init(void) {}


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

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

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

LLVM IR (-O2):
define void @error_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void introduction() {
  printf("\t\t***%c%c Three Stones %c%c***\n\n\n", 1, 2, 2, 1);
  printf("## This is a human vs. human game.\n");
  printf("## Every player will get chance by turns.\n\n\n");
  return;
}


x86 assembly (clang, -O0):
<introduction>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1,%r8d
mov    $0x2,%ecx
mov    %r8d,%esi
mov    %ecx,%edx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeff(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<introduction>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x2,%ecx
mov    $0x1,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed7(%rip),%rdi
call   1030 <puts@plt>
lea    0xeee(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"\09\09***%c%c Three Stones %c%c***\0A\0A\0A\00"
@.str.1 = [36 x i8] c"## This is a human vs. human game.\0A\00"
@.str.2 = [45 x i8] c"## Every player will get chance by turns.\0A\0A\0A\00"
define void @introduction() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 1, i32 2, i32 2, i32 1)
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"\09\09***%c%c Three Stones %c%c***\0A\0A\0A\00"
@str = [35 x i8] c"## This is a human vs. human game.\00"
@str.3 = [44 x i8] c"## Every player will get chance by turns.\0A\0A\00"
define void @introduction() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 1, i32 2, i32 2, i32 1)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.3, i64 0, i64 0))
ret void
}
void __DELETE_java_lang_RuntimeException(void *me, void *client_data) {}


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

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

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

LLVM IR (-O2):
define void @__DELETE_java_lang_RuntimeException(i8* nocapture %0, i8* nocapture %1) {
ret void
}
void haggle_commands(typ) int typ;
{
  if (typ == -1)
    prt("Specify an asking-price in gold pieces.", 21, 0);
  else
    prt("Specify an offer in gold pieces.", 21, 0);
  prt("ESC) Quit Haggling.", 22, 0);
  erase_line(23, 0);
}


x86 assembly (clang, -O0):
<haggle_commands>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
jne    114f <haggle_commands+0x2f>
lea    0xec4(%rip),%rdi
mov    $0x15,%esi
xor    %edx,%edx
mov    $0x0,%al
call   1030 <prt@plt>
jmp    1164 <haggle_commands+0x44>
lea    0xed2(%rip),%rdi
mov    $0x15,%esi
xor    %edx,%edx
mov    $0x0,%al
call   1030 <prt@plt>
lea    0xede(%rip),%rdi
mov    $0x16,%esi
xor    %edx,%edx
mov    $0x0,%al
call   1030 <prt@plt>
mov    $0x17,%edi
xor    %esi,%esi
mov    $0x0,%al
call   1040 <erase_line@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<haggle_commands>:
push   %rax
cmp    $0xffffffff,%edi
lea    0xed5(%rip),%rax
lea    0xef6(%rip),%rdi
cmove  %rax,%rdi
mov    $0x15,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1030 <prt@plt>
lea    0xefe(%rip),%rdi
mov    $0x16,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1030 <prt@plt>
mov    $0x17,%edi
xor    %esi,%esi
xor    %eax,%eax
pop    %rcx
jmp    1040 <erase_line@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"Specify an asking-price in gold pieces.\00"
@.str.1 = [33 x i8] c"Specify an offer in gold pieces.\00"
@.str.2 = [20 x i8] c"ESC) Quit Haggling.\00"
define void @haggle_commands(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @prt to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 21, i32 0)
br label %9
7: ; preds = %1
%8 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @prt to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 21, i32 0)
br label %9
9: ; preds = %7, %5
%10 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @prt to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 22, i32 0)
%11 = call i32 (i32, i32, ...) bitcast (i32 (...)* @erase_line to i32 (i32, i32, ...)*)(i32 23, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [40 x i8] c"Specify an asking-price in gold pieces.\00"
@.str.1 = [33 x i8] c"Specify an offer in gold pieces.\00"
@.str.2 = [20 x i8] c"ESC) Quit Haggling.\00"
define void @haggle_commands(i32 %0) {
%2 = icmp eq i32 %0, -1
%3 = select i1 %2, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0)
%4 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @prt to i32 (i8*, i32, i32, ...)*)(i8* %3, i32 21, i32 0)
%5 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @prt to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 22, i32 0)
%6 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @erase_line to i32 (i32, i32, ...)*)(i32 23, i32 0)
ret void
}
int main(void) {
  5 >> -1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int w(int (*s)(), int x, int y) { return ((*s)(x, y)); }


x86 assembly (clang, -O0):
<w>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    $0x0,%al
call   *%rcx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<w>:
mov    %rdi,%rcx
mov    %esi,%edi
mov    %edx,%esi
xor    %eax,%eax
jmp    *%rcx

LLVM IR (-O0):
define i32 @w(i32 (...)* %0, i32 %1, i32 %2) {
%4 = alloca i32 (...)*
%5 = alloca i32
%6 = alloca i32
store i32 (...)* %0, i32 (...)** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32 (...)*, i32 (...)** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = bitcast i32 (...)* %7 to i32 (i32, i32, ...)*
%11 = call i32 (i32, i32, ...) %10(i32 %8, i32 %9)
ret i32 %11
}

LLVM IR (-O2):
define i32 @w(i32 (...)* nocapture %0, i32 %1, i32 %2) {
%4 = bitcast i32 (...)* %0 to i32 (i32, i32, ...)*
%5 = tail call i32 (i32, i32, ...) %4(i32 %1, i32 %2)
ret i32 %5
}
void notimp(void) {}


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

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

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

LLVM IR (-O2):
define void @notimp() {
ret void
}
/* Variables and functions */
long double nextafter(double, double);
long double nexttowardl(long double ld, long double td) {
  return nextafter((double)ld, (double)td);
}


x86 assembly (clang, -O0):
<nexttowardl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
fldt   -0x20(%rbp)
fstpl  -0x28(%rbp)
movsd  -0x28(%rbp),%xmm1
call   1030 <nextafter@plt>
fld    %st(0)
fstp   %st(0)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nexttowardl>:
fldt   0x18(%rsp)
fldt   0x8(%rsp)
fstpl  -0x8(%rsp)
movsd  -0x8(%rsp),%xmm0
fstpl  -0x10(%rsp)
movsd  -0x10(%rsp),%xmm1
jmp    1030 <nextafter@plt>

LLVM IR (-O0):
define x86_fp80 @nexttowardl(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = fptrunc x86_fp80 %5 to double
%7 = load x86_fp80, x86_fp80* %4
%8 = fptrunc x86_fp80 %7 to double
%9 = call x86_fp80 @nextafter(double %6, double %8)
ret x86_fp80 %9
}

LLVM IR (-O2):
define x86_fp80 @nexttowardl(x86_fp80 %0, x86_fp80 %1) {
%3 = fptrunc x86_fp80 %0 to double
%4 = fptrunc x86_fp80 %1 to double
%5 = tail call x86_fp80 @nextafter(double %3, double %4)
ret x86_fp80 %5
}
const char *getPartName(int actionPart) {
  return actionPart ? "action" : "test";
}


x86 assembly (clang, -O0):
<getPartName>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0xef6(%rip),%rax
lea    0xee8(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getPartName>:
test   %edi,%edi
lea    0xefe(%rip),%rcx
lea    0xef0(%rip),%rax
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [7 x i8] c"action\00"
@.str.1 = [5 x i8] c"test\00"
define i8* @getPartName(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0)
ret i8* %6
}

LLVM IR (-O2):
@.str = [7 x i8] c"action\00"
@.str.1 = [5 x i8] c"test\00"
define i8* @getPartName(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ put8(int);
void mov_preg64_reg32(int reg1, int reg2) {
  put8(0x89);
  put8((reg2 << 3) | reg1);
}


x86 assembly (clang, -O0):
<mov_preg64_reg32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x89,%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%edi
shl    $0x3,%edi
or     -0x4(%rbp),%edi
call   1030 <put8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mov_preg64_reg32>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x89,%edi
call   1030 <put8@plt>
shl    $0x3,%ebx
or     %ebp,%ebx
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @mov_preg64_reg32(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @put8(i32 137)
%6 = load i32, i32* %4
%7 = shl i32 %6, 3
%8 = load i32, i32* %3
%9 = or i32 %7, %8
%10 = call i32 @put8(i32 %9)
ret void
}

LLVM IR (-O2):
define void @mov_preg64_reg32(i32 %0, i32 %1) {
%3 = tail call i32 @put8(i32 137)
%4 = shl i32 %1, 3
%5 = or i32 %4, %0
%6 = tail call i32 @put8(i32 %5)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct user_desc {
  int dummy;
};

/* Variables and functions */
int install_valid_mode(struct user_desc const *, int /*<<< orphan*/, int);
bool install_valid(const struct user_desc *desc, uint32_t ar) {
  return install_valid_mode(desc, ar, false);
}


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

x86 assembly (clang, -O2):
<install_valid>:
xor    %edx,%edx
jmp    1030 <install_valid_mode@plt>

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

LLVM IR (-O2):
%struct.user_desc = type { i32 }
define i32 @install_valid(%struct.user_desc* %0, i32 %1) {
%3 = tail call i32 @install_valid_mode(%struct.user_desc* %0, i32 %1, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void compose(char *s, size_t l) {
  putchar('{');
  while (l--)
    putchar(*s++);
  putchar('}');
}


x86 assembly (clang, -O0):
<compose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x7b,%edi
call   1030 <putchar@plt>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x10(%rbp)
cmp    $0x0,%rax
je     115f <compose+0x4f>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <putchar@plt>
jmp    112a <compose+0x1a>
mov    $0x7d,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compose>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
mov    $0x7b,%edi
call   1030 <putchar@plt>
test   %r15,%r15
je     1143 <compose+0x33>
xor    %ebx,%ebx
nopl   0x0(%rax)
movsbl (%r14,%rbx,1),%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <compose+0x20>
mov    $0x7d,%edi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @compose(i8* nocapture %0, i64 %1) {
%3 = tail call i32 @putchar(i8 signext 123)
%4 = icmp eq i64 %1, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %8, %5 ], [ %1, %2 ]
%7 = phi i8* [ %9, %5 ], [ %0, %2 ]
%8 = add i64 %6, -1
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = load i8, i8* %7
%11 = tail call i32 @putchar(i8 signext %10)
%12 = icmp eq i64 %8, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = tail call i32 @putchar(i8 signext 125)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void show_usage() {
  fprintf(stderr,
          "usage: statsite [-h] [-f filename]\n\n    -h : Displays this help "
          "info\n    -f : Reads the configuration from this file\n\n");
}


x86 assembly (clang, -O0):
<show_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [119 x i8] c"usage: statsite [-h] [-f filename]\0A\0A -h : Displays this help info\0A -f : Reads the configuration from this file\0A\0A\00"
define void @show_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([119 x i8], [119 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [119 x i8] c"usage: statsite [-h] [-f filename]\0A\0A -h : Displays this help info\0A -f : Reads the configuration from this file\0A\0A\00"
define void @show_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([119 x i8], [119 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printUsage() {
  printf("Usage: pinger -p <pinger port> -s <hostname> -r <reflector port> -n "
         "<number of packets>\n");
}


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

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

LLVM IR (-O0):
@.str = [89 x i8] c"Usage: pinger -p <pinger port> -s <hostname> -r <reflector port> -n <number of packets>\0A\00"
define void @printUsage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [88 x i8] c"Usage: pinger -p <pinger port> -s <hostname> -r <reflector port> -n <number of packets>\00"
define void @printUsage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([88 x i8], [88 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct dive_site {
  int dummy;
};

/* Variables and functions */
int compare_sites(struct dive_site const *, struct dive_site const *);
int sortfn_dive_site_table(const void *_a, const void *_b) {
  const struct dive_site *a = (const struct dive_site *)*(const void **)_a;
  const struct dive_site *b = (const struct dive_site *)*(const void **)_b;
  return compare_sites(a, b);
}


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

x86 assembly (clang, -O2):
<sortfn_dive_site_table>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <compare_sites@plt>

LLVM IR (-O0):
%struct.dive_site = type { i32 }
define i32 @sortfn_dive_site_table(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca %struct.dive_site*
%6 = alloca %struct.dive_site*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i8**
%9 = load i8*, i8** %8
%10 = bitcast i8* %9 to %struct.dive_site*
store %struct.dive_site* %10, %struct.dive_site** %5
%11 = load i8*, i8** %4
%12 = bitcast i8* %11 to i8**
%13 = load i8*, i8** %12
%14 = bitcast i8* %13 to %struct.dive_site*
store %struct.dive_site* %14, %struct.dive_site** %6
%15 = load %struct.dive_site*, %struct.dive_site** %5
%16 = load %struct.dive_site*, %struct.dive_site** %6
%17 = call i32 @compare_sites(%struct.dive_site* %15, %struct.dive_site* %16)
ret i32 %17
}

LLVM IR (-O2):
%struct.dive_site = type { i32 }
define i32 @sortfn_dive_site_table(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to %struct.dive_site**
%4 = load %struct.dive_site*, %struct.dive_site** %3
%5 = bitcast i8* %1 to %struct.dive_site**
%6 = load %struct.dive_site*, %struct.dive_site** %5
%7 = tail call i32 @compare_sites(%struct.dive_site* %4, %struct.dive_site* %6)
ret i32 %7
}
const char *__attribute__((section(".test.a"))) __attribute__((no))
strong_n2(void) {
  return "strong_n2";
}


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"strong_n2\00"
define i8* @strong_n2() section ".test.a" {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [10 x i8] c"strong_n2\00"
define i8* @strong_n2() section ".test.a" {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int aeron_properties_setenv(char const *, char const *);
int aeron_properties_setenv_property(void *clientd, const char *name,
                                     const char *value) {
  return aeron_properties_setenv(name, value);
}


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

x86 assembly (clang, -O2):
<aeron_properties_setenv_property>:
mov    %rsi,%rdi
mov    %rdx,%rsi
jmp    1030 <aeron_properties_setenv@plt>

LLVM IR (-O0):
define i32 @aeron_properties_setenv_property(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 = load i8*, i8** %5
%8 = load i8*, i8** %6
%9 = call i32 @aeron_properties_setenv(i8* %7, i8* %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @aeron_properties_setenv_property(i8* nocapture readnone %0, i8* %1, i8* %2) {
%4 = tail call i32 @aeron_properties_setenv(i8* %1, i8* %2)
ret i32 %4
}
extern void __outwc_p(unsigned short value, unsigned short port) {
  __asm__ __volatile__("out"
                       "w"
                       " %"
                       "w"
                       "0,%"
                       ""
                       "1"
                       :
                       : "a"(value), "id"(port));
  __asm__ __volatile__("outb %al,$0x80");
}


x86 assembly (clang, -O0):
<__outwc_p>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x2(%rbp),%ax
mov    -0x4(%rbp),%dx
out    %ax,(%dx)
out    %al,$0x80
pop    %rbp
ret

x86 assembly (clang, -O2):
<__outwc_p>:
mov    %esi,%edx
mov    %edi,%eax
out    %ax,(%dx)
out    %al,$0x80
ret

LLVM IR (-O0):
define void @__outwc_p(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = load i16, i16* %4
ret void
}

LLVM IR (-O2):
define void @__outwc_p(i16 zeroext %0, i16 zeroext %1) {
tail call void asm sideeffect "outw ${0:w},$1", "{ax},i{dx},~{dirflag},~{fpsr},~{flags}"(i16 %0, i16 %1)
tail call void asm sideeffect "outb %al,$$0x80", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
scalar_t__ perfectSquareString(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char **);
int main() {
  char str[10];
  scanf("%s", &str);
  if (perfectSquareString(str) == 0)
    printf("YES");
  else
    printf("NO");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xe(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1050 <scanf@plt>
lea    -0xe(%rbp),%rdi
call   1040 <perfectSquareString@plt>
cmp    $0x0,%rax
jne    1173 <main+0x43>
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
jmp    117f <main+0x4f>
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
lea    0x6(%rsp),%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1040 <perfectSquareString@plt>
test   %rax,%rax
lea    0xea8(%rip),%rax
lea    0xea5(%rip),%rdi
cmove  %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"YES\00"
@.str.2 = [3 x i8] c"NO\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i8]
store i32 0, i32* %1
%3 = bitcast [10 x i8]* %2 to i8**
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %3)
%5 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%6 = call i64 @perfectSquareString(i8* %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %12
10: ; preds = %0
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %12
12: ; preds = %10, %8
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"YES\00"
@.str.2 = [3 x i8] c"NO\00"
define i32 @main() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = bitcast [10 x i8]* %1 to i8**
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %3)
%5 = call i64 @perfectSquareString(i8* %2)
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0)
%8 = call i32 @printf(i8* dereferenceable(1) %7)
ret i32 0
}
/* Variables and functions */
bool SHAREMIND_SET_KEY_LESS_THAN_voidptr(void *const k1, void *const k2) {
  return k1 < k2;
}


x86 assembly (clang, -O0):
<SHAREMIND_SET_KEY_LESS_THAN_voidptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setb   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_SET_KEY_LESS_THAN_voidptr>:
xor    %eax,%eax
cmp    %rsi,%rdi
setb   %al
ret

LLVM IR (-O0):
define i32 @SHAREMIND_SET_KEY_LESS_THAN_voidptr(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = icmp ult i8* %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @SHAREMIND_SET_KEY_LESS_THAN_voidptr(i8* readnone %0, i8* readnone %1) {
%3 = icmp ult i8* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
scalar_t__ openPort(char const *);
int /*<<< orphan*/ stderr;
int Connect(const char *device) {
  fprintf(stderr, "Connecting to device %s\n", device);
  if (openPort(device) < 0)
    return -1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<Connect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <openPort@plt>
cmp    $0x0,%rax
jge    1164 <Connect+0x44>
movl   $0xffffffff,-0x4(%rbp)
jmp    116b <Connect+0x4b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Connect>:
push   %rbx
mov    %rdi,%rbx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
mov    %rbx,%rdx
call   1040 <fprintf@plt>
mov    %rbx,%rdi
call   1030 <openPort@plt>
sar    $0x3f,%rax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [25 x i8] c"Connecting to device %s\0A\00"
define i32 @Connect(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i32, i32* @stderr
%5 = load i8*, i8** %3
%6 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i8*, i8** %3
%8 = call i64 @openPort(i8* %7)
%9 = icmp slt i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 -1, i32* %2
br label %12
11: ; preds = %1
store i32 0, i32* %2
br label %12
12: ; preds = %11, %10
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"Connecting to device %s\0A\00"
define i32 @Connect(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i64 @openPort(i8* %0)
%5 = ashr i64 %4, 63
%6 = trunc i64 %5 to i32
ret i32 %6
}
void ___fa_plot_trace_now(const char *plot_name, const char *node_name) {
  (void)plot_name;
  (void)node_name;
}


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

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

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

LLVM IR (-O2):
define void @___fa_plot_trace_now(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void ambiguous_option_error(const char *zArg) {
  fprintf(stderr, "Option is ambiguous: %s\n", zArg);
  exit(1);
}


x86 assembly (clang, -O0):
<ambiguous_option_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<ambiguous_option_error>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [25 x i8] c"Option is ambiguous: %s\0A\00"
define void @ambiguous_option_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"Option is ambiguous: %s\0A\00"
define void @ambiguous_option_error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}