xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void echo_array(int *a, size_t n) {
  for (size_t i = 0; i < n; ++i)
    printf("%d ", a[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<echo_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1160 <echo_array+0x50>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <echo_array+0x18>
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<echo_array>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rsi,%rsi
je     1157 <echo_array+0x37>
mov    %rsi,%r12
mov    %rdi,%r14
lea    0xec6(%rip),%r15
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    (%r14,%rbx,4),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <echo_array+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @echo_array(i32* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %6, %2
%5 = tail call i32 @putchar(i32 10)
ret void
6: ; preds = %2, %6
%7 = phi i64 [ %11, %6 ], [ 0, %2 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw i64 %7, 1
%12 = icmp eq i64 %11, %1
br i1 %12, label %4, label %6
}
/* Variables and functions */
bool fspath_rename(const char path[], const char new_location[]) {
  return false;
}


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

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

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

LLVM IR (-O2):
define i32 @fspath_rename(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int sd_bus_error_set_errno(void *e,
                                                                  int error) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_bus_error_set_errno>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
mov    0x2ecc(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_bus_error_set_errno>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_bus_error_set_errno(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_error_set_errno(i8* nocapture readnone %0, i32 %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
int seradVstupy(const void *a, const void *b) {
  const int *aR = (const int *)a;
  const int *bR = (const int *)b;
  if (aR[0] == bR[0])
    return aR[1] - bR[1];
  return aR[0] - bR[0];
}


x86 assembly (clang, -O0):
<seradVstupy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jne    1144 <seradVstupy+0x44>
mov    -0x20(%rbp),%rax
mov    0x4(%rax),%eax
mov    -0x28(%rbp),%rcx
sub    0x4(%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <seradVstupy+0x53>
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<seradVstupy>:
mov    (%rdi),%eax
sub    (%rsi),%eax
jne    110c <seradVstupy+0xc>
mov    0x4(%rdi),%eax
sub    0x4(%rsi),%eax
ret

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

LLVM IR (-O2):
define i32 @seradVstupy(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp eq i32 %5, %6
br i1 %7, label %8, label %16
8: ; preds = %2
%9 = getelementptr inbounds i8, i8* %0, i64 4
%10 = bitcast i8* %9 to i32*
%11 = load i32, i32* %10
%12 = getelementptr inbounds i8, i8* %1, i64 4
%13 = bitcast i8* %12 to i32*
%14 = load i32, i32* %13
%15 = sub nsw i32 %11, %14
br label %18
16: ; preds = %2
%17 = sub nsw i32 %5, %6
br label %18
18: ; preds = %16, %8
%19 = phi i32 [ %15, %8 ], [ %17, %16 ]
ret i32 %19
}
int posix_srp_isprotected(void) {
  extern int posix_srp_protected;
  return posix_srp_protected;
}


x86 assembly (clang, -O0):
<posix_srp_isprotected>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<posix_srp_isprotected>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@posix_srp_protected = external global i32
define i32 @posix_srp_isprotected() {
%1 = load i32, i32* @posix_srp_protected
ret i32 %1
}

LLVM IR (-O2):
@posix_srp_protected = external global i32
define i32 @posix_srp_isprotected() {
%1 = load i32, i32* @posix_srp_protected
ret i32 %1
}
void set_automaphostsonresolve() {}


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

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

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

LLVM IR (-O2):
define void @set_automaphostsonresolve() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GPC_DriverIRQHandler();
__attribute__((weak)) void GPC_IRQHandler(void) { GPC_DriverIRQHandler(); }


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

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

LLVM IR (-O0):
define weak void @GPC_IRQHandler() {
%1 = call i32 (...) @GPC_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @GPC_IRQHandler() {
%1 = tail call i32 (...) @GPC_DriverIRQHandler()
ret void
}
int fclose_file_func(void *opaque, void *stream) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @fclose_file_func(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
int mode_Bin(double pi) { return (pi > 0.5); }


x86 assembly (clang, -O0):
<mode_Bin>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mode_Bin>:
xor    %eax,%eax
ucomisd 0xef6(%rip),%xmm0
seta   %al
ret

LLVM IR (-O0):
define i32 @mode_Bin(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp ogt double %3, 5.000000e-01
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @mode_Bin(double %0) {
%2 = fcmp ogt double %0, 5.000000e-01
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fileno(int /*<<< orphan*/ *);
__attribute__((__weak__, __always___)) int softboundmpx_fileno(FILE *stream) {
  return fileno(stream);
}


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

x86 assembly (clang, -O2):
<softboundmpx_fileno>:
jmp    1030 <fileno@plt>

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

LLVM IR (-O2):
define weak i32 @softboundmpx_fileno(i32* %0) {
%2 = tail call i32 @fileno(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ ip(char const *);
int /*<<< orphan*/ line();
int /*<<< orphan*/ name(char const *);
int /*<<< orphan*/ space();
int /*<<< orphan*/ string(char *);
void log_lame(const char server[4], const char *control, const char *referral) {
  string("     lame ");
  ip(server);
  space();
  name(control);
  space();
  name(referral);
  line();
}


x86 assembly (clang, -O0):
<log_lame>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xe95(%rip),%rdi
call   1040 <string@plt>
mov    -0x8(%rbp),%rdi
call   1070 <ip@plt>
mov    $0x0,%al
call   1030 <space@plt>
mov    -0x10(%rbp),%rdi
call   1050 <name@plt>
mov    $0x0,%al
call   1030 <space@plt>
mov    -0x18(%rbp),%rdi
call   1050 <name@plt>
mov    $0x0,%al
call   1060 <line@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_lame>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
lea    0xe9b(%rip),%rdi
call   1040 <string@plt>
mov    %rbx,%rdi
call   1070 <ip@plt>
xor    %eax,%eax
call   1030 <space@plt>
mov    %r15,%rdi
call   1050 <name@plt>
xor    %eax,%eax
call   1030 <space@plt>
mov    %r14,%rdi
call   1050 <name@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1060 <line@plt>

LLVM IR (-O0):
@.str = [11 x i8] c" lame \00"
define void @log_lame(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = call i32 @string(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%8 = load i8*, i8** %4
%9 = call i32 @ip(i8* %8)
%10 = call i32 (...) @space()
%11 = load i8*, i8** %5
%12 = call i32 @name(i8* %11)
%13 = call i32 (...) @space()
%14 = load i8*, i8** %6
%15 = call i32 @name(i8* %14)
%16 = call i32 (...) @line()
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c" lame \00"
define void @log_lame(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @string(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @ip(i8* %0)
%6 = tail call i32 (...) @space()
%7 = tail call i32 @name(i8* %1)
%8 = tail call i32 (...) @space()
%9 = tail call i32 @name(i8* %2)
%10 = tail call i32 (...) @line()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free_2d(char **);
int /*<<< orphan*/ ft_display2d(char **);
int ft_disfree(char *array[], int i) {
  if (i > 0)
    ft_display2d(array);
  free_2d(array);
  return (1);
}


x86 assembly (clang, -O0):
<ft_disfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    1142 <ft_disfree+0x22>
mov    -0x8(%rbp),%rdi
call   1030 <ft_display2d@plt>
mov    -0x8(%rbp),%rdi
call   1040 <free_2d@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_disfree>:
push   %rbx
mov    %rdi,%rbx
test   %esi,%esi
jle    1130 <ft_disfree+0x10>
mov    %rbx,%rdi
call   1030 <ft_display2d@plt>
mov    %rbx,%rdi
call   1040 <free_2d@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ft_disfree(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
store i8** %0, i8*** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8**, i8*** %3
%9 = call i32 @ft_display2d(i8** %8)
br label %10
10: ; preds = %7, %2
%11 = load i8**, i8*** %3
%12 = call i32 @free_2d(i8** %11)
ret i32 1
}

LLVM IR (-O2):
define i32 @ft_disfree(i8** %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @ft_display2d(i8** %0)
br label %6
6: ; preds = %4, %2
%7 = tail call i32 @free_2d(i8** %0)
ret i32 1
}
void foo206(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo206(i32 %0) {
ret void
}
__attribute__((always_)) int aaa() {
  asm("aaa_label: .globl aaa_label");
  return bbb() + 1;
}


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

x86 assembly (clang, -O2):
<aaa>:
push   %rax

LLVM IR (-O0):
define i32 @aaa() {
%1 = call i32 (...) @bbb()
%2 = add nsw i32 %1, 1
ret i32 %2
}

LLVM IR (-O2):
define i32 @aaa() {
tail call void asm sideeffect "aaa_label: .globl aaa_label", "~{dirflag},~{fpsr},~{flags}"()
%1 = tail call i32 (...) @bbb()
%2 = add nsw i32 %1, 1
ret i32 %2
}
int PR8962_c(int *t) {
  if (({ (t ? (_Bool)0 : (_Bool)1); }))
    return 0;
  return *t;
}


x86 assembly (clang, -O0):
<PR8962_c>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1133 <PR8962_c+0x33>
movl   $0x0,-0x4(%rbp)
jmp    113c <PR8962_c+0x3c>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<PR8962_c>:
test   %rdi,%rdi
je     1108 <PR8962_c+0x8>
mov    (%rdi),%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @PR8962_c(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
%5 = load i32*, i32** %3
%6 = icmp ne i32* %5, null
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 0, i32 1
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %1
store i32 0, i32* %2
br label %15
12: ; preds = %1
%13 = load i32*, i32** %3
%14 = load i32, i32* %13
store i32 %14, i32* %2
br label %15
15: ; preds = %12, %11
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @PR8962_c(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = load i32, i32* %0
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ %4, %3 ], [ 0, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ assert(char const *);
scalar_t__ strstr(char const *, char *);
char *build_dest_dir(const char *full_path) {
  assert(full_path);
  if (strstr(full_path, "/x86_64-linux-gnu/"))
    return "/run"
           "/firejail"
           "/mnt"
           "/lib"
           "/x86_64-linux-gnu";
  return "/run"
         "/firejail"
         "/mnt"
         "/lib";
}


x86 assembly (clang, -O0):
<build_dest_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rdi
lea    0xec0(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     115f <build_dest_dir+0x3f>
lea    0xebd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    116a <build_dest_dir+0x4a>
lea    0xed4(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<build_dest_dir>:
push   %rbx
mov    %rdi,%rbx
call   1030 <assert@plt>
lea    0xed0(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strstr@plt>
test   %rax,%rax
lea    0xef8(%rip),%rcx
lea    0xeca(%rip),%rax
cmove  %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"/x86_64-linux-gnu/\00"
@.str.1 = [39 x i8] c"/run/firejail/mnt/lib/x86_64-linux-gnu\00"
@.str.2 = [22 x i8] c"/run/firejail/mnt/lib\00"
define i8* @build_dest_dir(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @assert(i8* %4)
%6 = load i8*, i8** %3
%7 = call i64 @strstr(i8* %6, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
store i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %11
10: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %11
11: ; preds = %10, %9
%12 = load i8*, i8** %2
ret i8* %12
}

LLVM IR (-O2):
@.str = [19 x i8] c"/x86_64-linux-gnu/\00"
@.str.1 = [39 x i8] c"/run/firejail/mnt/lib/x86_64-linux-gnu\00"
@.str.2 = [22 x i8] c"/run/firejail/mnt/lib\00"
define i8* @build_dest_dir(i8* %0) {
%2 = tail call i32 @assert(i8* %0)
%3 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0)
ret i8* %5
}
/* Variables and functions */
char *strchr(char *, char);
char sqlCharComma(char **pS) {
  char *s = *pS;
  char *e = strchr(s, ',');
  int ret;
  *e++ = 0;
  *pS = e;
  ret = s[0];
  return ret;
}


x86 assembly (clang, -O0):
<sqlCharComma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2c,%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movb   $0x0,(%rax)
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
movsbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqlCharComma>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    (%rdi),%r14
mov    %r14,%rdi
mov    $0x2c,%esi
call   1030 <strchr@plt>
movb   $0x0,(%rax)
add    $0x1,%rax
mov    %rax,(%rbx)
mov    (%r14),%al
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define signext i8 @sqlCharComma(i8** %0) {
%2 = alloca i8**
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8** %0, i8*** %2
%6 = load i8**, i8*** %2
%7 = load i8*, i8** %6
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = call i8* @strchr(i8* %8, i8 signext 44)
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %4
store i8 0, i8* %10
%12 = load i8*, i8** %4
%13 = load i8**, i8*** %2
store i8* %12, i8** %13
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i64 0
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
store i32 %17, i32* %5
%18 = load i32, i32* %5
%19 = trunc i32 %18 to i8
ret i8 %19
}

LLVM IR (-O2):
define signext i8 @sqlCharComma(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i8* @strchr(i8* dereferenceable(1) %2, i8 signext 44)
%4 = getelementptr inbounds i8, i8* %3, i64 1
store i8 0, i8* %3
store i8* %4, i8** %0
%5 = load i8, i8* %2
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ print(int, int **);
int main() {
  int t, i, j;
  char str1[20001][2], str2[2001];
  int arr[100][2];
  print(2, arr);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x328,%rsp
mov    %rsp,%rsi
mov    $0x2,%edi
call   1030 <print@plt>
xor    %eax,%eax
add    $0x328,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [20001 x [2 x i8]]
%6 = alloca [2001 x i8]
%7 = alloca [100 x [2 x i32]]
store i32 0, i32* %1
%8 = getelementptr inbounds [100 x [2 x i32]], [100 x [2 x i32]]* %7, i64 0, i64 0
%9 = bitcast [2 x i32]* %8 to i32**
%10 = call i32 @print(i32 2, i32** %9)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [100 x [2 x i32]]
%2 = bitcast [100 x [2 x i32]]* %1 to i8*
%3 = bitcast [100 x [2 x i32]]* %1 to i32**
%4 = call i32 @print(i32 2, i32** %3)
ret i32 0
}
void hb_console_safe_unlock(void) {}


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

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

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

LLVM IR (-O2):
define void @hb_console_safe_unlock() {
ret void
}
/* Variables and functions */
double fma(double, double, double);
double fnma64(double x, double y, double z) { return fma(-x, y, -z); }


x86 assembly (clang, -O0):
<fnma64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
call   1030 <fma@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fnma64>:
movaps 0xee9(%rip),%xmm3
xorps  %xmm3,%xmm0
xorps  %xmm3,%xmm2
jmp    1030 <fma@plt>

LLVM IR (-O0):
define double @fnma64(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = fneg double %7
%9 = load double, double* %5
%10 = load double, double* %6
%11 = fneg double %10
%12 = call double @llvm.fma.f64(double %8, double %9, double %11)
ret double %12
}

LLVM IR (-O2):
define double @fnma64(double %0, double %1, double %2) {
%4 = fneg double %0
%5 = fneg double %2
%6 = tail call double @llvm.fma.f64(double %4, double %1, double %5)
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ print_usage(char const *, int);
int /*<<< orphan*/ printf(char *, char const *);
void print_help(const char *name) {
  print_usage(name, false);
  printf("Colorize output of a command's stdout and stderr.\n"
         "Example: %s make\n\n"
         "Options:\n"
         "  -o <color>    Color for stdout (default: none)\n"
         "  -e <color>    Color for stderr (default: red)\n"
         "  -h            Print this help.\n\n"
         "  Valid colors are: \033[31mred, \033[32mgreen, \033[33mbrown, "
         "\033[34mblue, "
         "\033[35mmagenta, \033[36mcyan, \033[37mwhite\033[39m\n",
         name);
}


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

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

LLVM IR (-O0):
@.str = [315 x i8] c"Colorize output of a command's stdout and stderr.\0AExample: %s make\0A\0AOptions:\0A -o <color> Color for stdout (default: none)\0A -e <color> Color for stderr (default: red)\0A -h Print this help.\0A\0A Valid colors are: \1B[31mred, \1B[32mgreen, \1B[33mbrown, \1B[34mblue, \1B[35mmagenta, \1B[36mcyan, \1B[37mwhite\1B[39m\0A\00"
define void @print_help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @print_usage(i8* %3, i32 0)
%5 = load i8*, i8** %2
%6 = call i32 @printf(i8* getelementptr inbounds ([315 x i8], [315 x i8]* @.str, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [315 x i8] c"Colorize output of a command's stdout and stderr.\0AExample: %s make\0A\0AOptions:\0A -o <color> Color for stdout (default: none)\0A -e <color> Color for stderr (default: red)\0A -h Print this help.\0A\0A Valid colors are: \1B[31mred, \1B[32mgreen, \1B[33mbrown, \1B[34mblue, \1B[35mmagenta, \1B[36mcyan, \1B[37mwhite\1B[39m\0A\00"
define void @print_help(i8* %0) {
%2 = tail call i32 @print_usage(i8* %0, i32 0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([315 x i8], [315 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
struct _stor_freadsnap_req {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct _stor_freadsnap_req *);
void stor_freadsnap_req_free(struct _stor_freadsnap_req *ptr) { free(ptr); }


x86 assembly (clang, -O0):
<stor_freadsnap_req_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):
<stor_freadsnap_req_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct._stor_freadsnap_req = type { i32 }
define void @stor_freadsnap_req_free(%struct._stor_freadsnap_req* %0) {
%2 = alloca %struct._stor_freadsnap_req*
store %struct._stor_freadsnap_req* %0, %struct._stor_freadsnap_req** %2
%3 = load %struct._stor_freadsnap_req*, %struct._stor_freadsnap_req** %2
%4 = call i32 @free(%struct._stor_freadsnap_req* %3)
ret void
}

LLVM IR (-O2):
%struct._stor_freadsnap_req = type { i32 }
define void @stor_freadsnap_req_free(%struct._stor_freadsnap_req* nocapture %0) {
%2 = tail call i32 @free(%struct._stor_freadsnap_req* %0)
ret void
}
int do_reverse_number(unsigned long int number) {
  int reverse_number = 0;
  while (number != 0) {
    reverse_number = reverse_number * 10;
    reverse_number = reverse_number + number % 10;
    number = number / 10;
  }
  return reverse_number;
}


x86 assembly (clang, -O0):
<do_reverse_number>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1158 <do_reverse_number+0x58>
imul   $0xa,-0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    -0x18(%rbp),%rax
add    %rdx,%rax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x8(%rbp)
jmp    110f <do_reverse_number+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_reverse_number>:
test   %rdi,%rdi
je     1144 <do_reverse_number+0x44>
mov    %rdi,%rcx
xor    %eax,%eax
movabs $0xcccccccccccccccd,%r8
cc cc cc
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    (%rax,%rax,4),%esi
mov    %rcx,%rax
mul    %r8
shr    $0x3,%rdx
lea    (%rdx,%rdx,1),%eax
lea    (%rax,%rax,4),%eax
mov    %ecx,%edi
sub    %eax,%edi
lea    (%rdi,%rsi,2),%eax
cmp    $0x9,%rcx
mov    %rdx,%rcx
ja     1120 <do_reverse_number+0x20>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @do_reverse_number(i64 %0) {
%2 = alloca i64
%3 = alloca i32
store i64 %0, i64* %2
store i32 0, i32* %3
br label %4
4: ; preds = %7, %1
%5 = load i64, i64* %2
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %18
7: ; preds = %4
%8 = load i32, i32* %3
%9 = mul nsw i32 %8, 10
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = load i64, i64* %2
%13 = urem i64 %12, 10
%14 = add i64 %11, %13
%15 = trunc i64 %14 to i32
store i32 %15, i32* %3
%16 = load i64, i64* %2
%17 = udiv i64 %16, 10
store i64 %17, i64* %2
br label %4
18: ; preds = %4
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @do_reverse_number(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %12, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %9, %3 ], [ 0, %1 ]
%5 = phi i64 [ %10, %3 ], [ %0, %1 ]
%6 = mul nsw i32 %4, 10
%7 = urem i64 %5, 10
%8 = trunc i64 %7 to i32
%9 = add i32 %6, %8
%10 = udiv i64 %5, 10
%11 = icmp ult i64 %5, 10
br i1 %11, label %12, label %3
12: ; preds = %3, %1
%13 = phi i32 [ 0, %1 ], [ %9, %3 ]
ret i32 %13
}
char *fcvt(arg, ndigits, decpt, sign)
double arg;
int ndigits, *decpt, *sign;
{ return (cvt(arg, ndigits, decpt, sign, 0)); }


x86 assembly (clang, -O0):
<fcvt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
xor    %ecx,%ecx
mov    $0x1,%al
call   1030 <cvt@plt>
cltq
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fcvt>:
push   %rax
xor    %ecx,%ecx
mov    $0x1,%al
call   1030 <cvt@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i8* @fcvt(double %0, i32 %1, i32* %2, i32* %3) {
%5 = alloca double
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32*
store double %0, double* %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load double, double* %5
%10 = load i32, i32* %6
%11 = load i32*, i32** %7
%12 = load i32*, i32** %8
%13 = call i32 (double, i32, i32*, i32*, i32, ...) bitcast (i32 (...)* @cvt to i32 (double, i32, i32*, i32*, i32, ...)*)(double %9, i32 %10, i32* %11, i32* %12, i32 0)
%14 = sext i32 %13 to i64
%15 = inttoptr i64 %14 to i8*
ret i8* %15
}

LLVM IR (-O2):
define i8* @fcvt(double %0, i32 %1, i32* %2, i32* %3) {
%5 = tail call i32 (double, i32, i32*, i32*, i32, ...) bitcast (i32 (...)* @cvt to i32 (double, i32, i32*, i32*, i32, ...)*)(double %0, i32 %1, i32* %2, i32* %3, i32 0)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}
/* Type definitions */
typedef int sig_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ readRewindMem2();
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
void my_handler(sig_t s) {
  fprintf(stderr, "Caught signal %d\n Dumping last bit of mem\n", s);
  readRewindMem2();
  fflush(stdout);
  fclose(stdout);
  fclose(stdin);
  exit(0);
}


x86 assembly (clang, -O0):
<my_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2e76(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xe92(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x0,%al
call   1030 <readRewindMem2@plt>
mov    0x2e4f(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
mov    0x2e41(%rip),%rax
mov    (%rax),%edi
call   1040 <fclose@plt>
mov    0x2e4b(%rip),%rax
mov    (%rax),%edi
call   1040 <fclose@plt>
xor    %edi,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<my_handler>:
push   %rbx
mov    %edi,%edx
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
lea    0xe9d(%rip),%rsi
call   1050 <fprintf@plt>
xor    %eax,%eax
call   1030 <readRewindMem2@plt>
mov    0x2e5a(%rip),%rbx
mov    (%rbx),%edi
call   1060 <fflush@plt>
mov    (%rbx),%edi
call   1040 <fclose@plt>
mov    0x2e5d(%rip),%rax
mov    (%rax),%edi
call   1040 <fclose@plt>
xor    %edi,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [43 x i8] c"Caught signal %d\0A Dumping last bit of mem\0A\00"
@stdout = global i32 0
@stdin = global i32 0
define void @my_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = load i32, i32* %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 (...) @readRewindMem2()
%7 = load i32, i32* @stdout
%8 = call i32 @fflush(i32 %7)
%9 = load i32, i32* @stdout
%10 = call i32 @fclose(i32 %9)
%11 = load i32, i32* @stdin
%12 = call i32 @fclose(i32 %11)
%13 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [43 x i8] c"Caught signal %d\0A Dumping last bit of mem\0A\00"
@stdout = global i32 0
@stdin = global i32 0
define void @my_handler(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = tail call i32 (...) @readRewindMem2()
%5 = load i32, i32* @stdout
%6 = tail call i32 @fflush(i32 %5)
%7 = load i32, i32* @stdout
%8 = tail call i32 @fclose(i32 %7)
%9 = load i32, i32* @stdin
%10 = tail call i32 @fclose(i32 %9)
%11 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ DwEoln();
int /*<<< orphan*/ HelpCommand();
int /*<<< orphan*/ Sb();
void EmptyCommand(void) {
  Sb();
  if (!DwEoln()) {
    HelpCommand();
  }
}


x86 assembly (clang, -O0):
<EmptyCommand>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <Sb@plt>
mov    $0x0,%al
call   1050 <DwEoln@plt>
cmp    $0x0,%eax
jne    1152 <EmptyCommand+0x22>
mov    $0x0,%al
call   1040 <HelpCommand@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<EmptyCommand>:
push   %rax
xor    %eax,%eax
call   1030 <Sb@plt>
xor    %eax,%eax
call   1050 <DwEoln@plt>
test   %eax,%eax
je     1145 <EmptyCommand+0x15>
pop    %rax
ret
xor    %eax,%eax
pop    %rcx
jmp    1040 <HelpCommand@plt>

LLVM IR (-O0):
define void @EmptyCommand() {
%1 = call i32 (...) @Sb()
%2 = call i32 (...) @DwEoln()
%3 = icmp ne i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = call i32 (...) @HelpCommand()
br label %6
6: ; preds = %4, %0
ret void
}

LLVM IR (-O2):
define void @EmptyCommand() {
%1 = tail call i32 (...) @Sb()
%2 = tail call i32 (...) @DwEoln()
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 (...) @HelpCommand()
br label %6
6: ; preds = %4, %0
ret void
}
void osn_memset(void *mem, unsigned char value, int size) {
  while (size--) {
    *(unsigned char *)mem = value;
    mem = (unsigned char *)mem + 1;
  }
}


x86 assembly (clang, -O0):
<osn_memset>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x10(%rbp)
cmp    $0x0,%eax
je     113f <osn_memset+0x3f>
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1111 <osn_memset+0x11>
pop    %rbp
ret

x86 assembly (clang, -O2):
<osn_memset>:
test   %edx,%edx
je     1124 <osn_memset+0x14>
push   %rax
mov    %edx,%edx
movzbl %sil,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @osn_memset(i8* nocapture writeonly %0, i8 zeroext %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_state_compact();
int /*<<< orphan*/ print_state_pretty();
void print_state(bool pretty) {
  if (pretty)
    print_state_pretty();
  else
    print_state_compact();
}


x86 assembly (clang, -O0):
<print_state>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1141 <print_state+0x21>
mov    $0x0,%al
call   1040 <print_state_pretty@plt>
jmp    1148 <print_state+0x28>
mov    $0x0,%al
call   1030 <print_state_compact@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_state>:
xor    %eax,%eax
test   %edi,%edi
je     112b <print_state+0xb>
jmp    1040 <print_state_pretty@plt>
jmp    1030 <print_state_compact@plt>

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

LLVM IR (-O2):
define void @print_state(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (...) @print_state_pretty()
br label %7
5: ; preds = %1
%6 = tail call i32 (...) @print_state_compact()
br label %7
7: ; preds = %5, %3
ret void
}
/* Type definitions */
struct timespec {
  int /*<<< orphan*/ tv_nsec;
  int /*<<< orphan*/ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, int /*<<< orphan*/,
                          char const *, int /*<<< orphan*/);
void print_timespec(struct timespec diff, const char *name) {
  printf("%s.tv_sec=%ld  %s.tv_nsec=%ld\n", name, diff.tv_sec, name,
         diff.tv_nsec);
}


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

x86 assembly (clang, -O2):
<print_timespec>:
mov    %rdi,%rdx
shr    $0x20,%rdx
lea    0xee2(%rip),%rax
mov    %edi,%r8d
mov    %rax,%rdi
mov    %rsi,%rcx
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
@.str = [31 x i8] c"%s.tv_sec=%ld %s.tv_nsec=%ld\0A\00"
define void @print_timespec(i64 %0, i8* %1) {
%3 = alloca %struct.timespec
%4 = alloca i8*
%5 = bitcast %struct.timespec* %3 to i64*
store i64 %0, i64* %5
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
%8 = load i32, i32* %7
%9 = load i8*, i8** %4
%10 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
%11 = load i32, i32* %10
%12 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %6, i32 %8, i8* %9, i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"%s.tv_sec=%ld %s.tv_nsec=%ld\0A\00"
define void @print_timespec(i64 %0, i8* %1) {
%3 = trunc i64 %0 to i32
%4 = lshr i64 %0, 32
%5 = trunc i64 %4 to i32
%6 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %5, i8* %1, i32 %3)
ret void
}
/* Variables and functions */
double pow(int, int);
double round(double);
void fround(double *d, int places) {
  double p = pow(10, places);
  *d = round(*d * p) / p;
}


x86 assembly (clang, -O0):
<fround>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%esi
mov    $0xa,%edi
call   1030 <pow@plt>
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mulsd  -0x18(%rbp),%xmm0
call   1040 <round@plt>
divsd  -0x18(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fround>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    $0xa,%edi
call   1030 <pow@plt>
movapd %xmm0,%xmm1
movsd  %xmm0,0x8(%rsp)
movsd  (%rbx),%xmm0
mulsd  %xmm1,%xmm0
call   1040 <round@plt>
divsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @fround(double* %0, i32 %1) {
%3 = alloca double*
%4 = alloca i32
%5 = alloca double
store double* %0, double** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = call double @pow(i32 10, i32 %6)
store double %7, double* %5
%8 = load double*, double** %3
%9 = load double, double* %8
%10 = load double, double* %5
%11 = fmul double %9, %10
%12 = call double @llvm.round.f64(double %11)
%13 = load double, double* %5
%14 = fdiv double %12, %13
%15 = load double*, double** %3
store double %14, double* %15
ret void
}

LLVM IR (-O2):
define void @fround(double* nocapture %0, i32 %1) {
%3 = tail call double @pow(i32 10, i32 %1)
%4 = load double, double* %0
%5 = fmul double %3, %4
%6 = tail call double @llvm.round.f64(double %5)
%7 = fdiv double %6, %3
store double %7, double* %0
ret void
}
void glGetFloatv(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glGetFloatv() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ addFoncT(char *, void (*)(), int /*<<< orphan*/, int);
void addFonc(char *l, void (*f)(void)) { addFoncT(l, f, 0, 1); }


x86 assembly (clang, -O0):
<addFonc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
mov    $0x1,%ecx
call   1030 <addFoncT@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addFonc>:
xor    %edx,%edx
mov    $0x1,%ecx
jmp    1030 <addFoncT@plt>

LLVM IR (-O0):
define void @addFonc(i8* %0, void ()* %1) {
%3 = alloca i8*
%4 = alloca void ()*
store i8* %0, i8** %3
store void ()* %1, void ()** %4
%5 = load i8*, i8** %3
%6 = load void ()*, void ()** %4
%7 = bitcast void ()* %6 to void (...)*
%8 = call i32 @addFoncT(i8* %5, void (...)* %7, i32 0, i32 1)
ret void
}

LLVM IR (-O2):
define void @addFonc(i8* %0, void ()* %1) {
%3 = bitcast void ()* %1 to void (...)*
%4 = tail call i32 @addFoncT(i8* %0, void (...)* %3, i32 0, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int x1;
  scanf("%i", &x1);
  if (x1 > 0)
    while (x1 > 0)
      x1 = x1 - 1;
  printf("%d", x1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jle    116b <main+0x4b>
jmp    114e <main+0x2e>
cmpl   $0x0,-0x8(%rbp)
jle    1166 <main+0x46>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    114e <main+0x2e>
jmp    116b <main+0x4b>
mov    -0x8(%rbp),%esi
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
test   %esi,%esi
jle    1144 <main+0x24>
movl   $0x0,0x4(%rsp)
xor    %esi,%esi
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 0, i32* %1
br label %7
7: ; preds = %6, %0
%8 = phi i32 [ 0, %6 ], [ %4, %0 ]
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}
void sum1(int rb) {
  typedef unsigned char imgrow[rb];
  typedef imgrow img[rb];
  const img *br;
  int y;
  (*br)[y];
}


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

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

LLVM IR (-O0):
define void @sum1(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = load i32, i32* %2
%8 = zext i32 %7 to i64
%9 = load i8*, i8** %3
%10 = load i32, i32* %4
%11 = sext i32 %10 to i64
%12 = mul nsw i64 %11, %6
%13 = getelementptr inbounds i8, i8* %9, i64 %12
ret void
}

LLVM IR (-O2):
define void @sum1(i32 %0) {
ret void
}
int ary_cb_cmpvlong(const void *a, const void *b) {
  long long x = *(const long long *)a, y = *(const long long *)b;
  return x > y ? 1 : x < y ? -1 : 0;
}


x86 assembly (clang, -O0):
<ary_cb_cmpvlong>:
push   %rbp
mov    %rsp,%rbp
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),%rax
cmp    -0x20(%rbp),%rax
jle    113d <ary_cb_cmpvlong+0x3d>
mov    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1155 <ary_cb_cmpvlong+0x55>
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rsi
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    %rsi,%rdx
cmovl  %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ary_cb_cmpvlong>:
mov    (%rdi),%rax
mov    (%rsi),%rcx
xor    %edx,%edx
cmp    %rcx,%rax
setl   %dl
neg    %edx
cmp    %rcx,%rax
mov    $0x1,%eax
cmovle %edx,%eax
ret

LLVM IR (-O0):
define i32 @ary_cb_cmpvlong(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i64*
%9 = load i64, i64* %8
store i64 %9, i64* %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i64*
%12 = load i64, i64* %11
store i64 %12, i64* %6
%13 = load i64, i64* %5
%14 = load i64, i64* %6
%15 = icmp sgt i64 %13, %14
br i1 %15, label %16, label %17
16: ; preds = %2
br label %23
17: ; preds = %2
%18 = load i64, i64* %5
%19 = load i64, i64* %6
%20 = icmp slt i64 %18, %19
%21 = zext i1 %20 to i64
%22 = select i1 %20, i32 -1, i32 0
br label %23
23: ; preds = %17, %16
%24 = phi i32 [ 1, %16 ], [ %22, %17 ]
ret i32 %24
}

LLVM IR (-O2):
define i32 @ary_cb_cmpvlong(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp sgt i64 %4, %6
%8 = icmp slt i64 %4, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
void plat_gvideo_open(int is_pal) {}


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

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

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

LLVM IR (-O2):
define void @plat_gvideo_open(i32 %0) {
ret void
}