xunge/DecIR huggingface dataset:
int is_blank_line(const char *l) {
  while (*l && ((*l) == ' ' || (*l) == '\t'))
    l++;
  if (*l)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<is_blank_line>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     1148 <is_blank_line+0x48>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x12(%rbp)
je     1142 <is_blank_line+0x42>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1158 <is_blank_line+0x58>
jmp    1169 <is_blank_line+0x69>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1108 <is_blank_line+0x8>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1182 <is_blank_line+0x82>
movl   $0x0,-0x4(%rbp)
jmp    1189 <is_blank_line+0x89>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_blank_line>:
jmp    1114 <is_blank_line+0x14>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%rdi
movzbl (%rdi),%ecx
cmp    $0x20,%cl
je     1110 <is_blank_line+0x10>
cmp    $0x9,%cl
je     1110 <is_blank_line+0x10>
xor    %eax,%eax
test   %cl,%cl
sete   %al
ret

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

LLVM IR (-O2):
define i32 @is_blank_line(i8* nocapture %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %7 [
i8 9, label %5
i8 32, label %5
]
5: ; preds = %2, %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
%8 = icmp eq i8 %4, 0
%9 = zext i1 %8 to i32
ret i32 %9
}
void ff_hevc_put_hevc_uni_pel_pixels16_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_pel_pixels16_8_sse4() {
ret void
}
/* Variables and functions */
int popNumber();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
int /*<<< orphan*/ ymousescreen(int);
void basYMouseScreen() {
  int n;
  n = popNumber();
  pushNumber(ymousescreen(n));
}


x86 assembly (clang, -O0):
<basYMouseScreen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <ymousescreen@plt>
mov    %eax,%edi
call   1040 <pushNumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basYMouseScreen>:
push   %rax
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%edi
call   1030 <ymousescreen@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <pushNumber@plt>

LLVM IR (-O0):
define void @basYMouseScreen() {
%1 = alloca i32
%2 = call i32 (...) @popNumber()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @ymousescreen(i32 %3)
%5 = call i32 @pushNumber(i32 %4)
ret void
}

LLVM IR (-O2):
define void @basYMouseScreen() {
%1 = tail call i32 (...) @popNumber()
%2 = tail call i32 @ymousescreen(i32 %1)
%3 = tail call i32 @pushNumber(i32 %2)
ret void
}
/* Variables and functions */
scalar_t__ EINTR;
scalar_t__ errno;
int write(int, char *, int);
int sock_write(int fd, char *buf, int bufsize, void *arg) {
  int res;
  do
    res = write(fd, buf, bufsize);
  while (res == -1 && errno == EINTR);
  return res;
}


x86 assembly (clang, -O0):
<sock_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <write@plt>
mov    %eax,-0x24(%rbp)
xor    %eax,%eax
cmpl   $0xffffffff,-0x24(%rbp)
mov    %al,-0x25(%rbp)
jne    1161 <sock_write+0x51>
mov    0x2e92(%rip),%rax
mov    (%rax),%rax
mov    0x2e80(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
mov    %al,-0x25(%rbp)
mov    -0x25(%rbp),%al
test   $0x1,%al
jne    1126 <sock_write+0x16>
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sock_write>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x2eb9(%rip),%r15
mov    0x2eaa(%rip),%r12
xchg   %ax,%ax
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1030 <write@plt>
cmp    $0xffffffff,%eax
jne    114b <sock_write+0x3b>
mov    (%r12),%rcx
cmp    %rcx,(%r15)
je     1130 <sock_write+0x20>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@errno = global i64 0
@EINTR = global i64 0
define i32 @sock_write(i32 %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
br label %10
10: ; preds = %22, %4
%11 = load i32, i32* %5
%12 = load i8*, i8** %6
%13 = load i32, i32* %7
%14 = call i32 @write(i32 %11, i8* %12, i32 %13)
store i32 %14, i32* %9
br label %15
15: ; preds = %10
%16 = load i32, i32* %9
%17 = icmp eq i32 %16, -1
br i1 %17, label %18, label %22
18: ; preds = %15
%19 = load i64, i64* @errno
%20 = load i64, i64* @EINTR
%21 = icmp eq i64 %19, %20
br label %22
22: ; preds = %18, %15
%23 = phi i1 [ false, %15 ], [ %21, %18 ]
br i1 %23, label %10, label %24
24: ; preds = %22
%25 = load i32, i32* %9
ret i32 %25
}

LLVM IR (-O2):
@errno = global i64 0
@EINTR = global i64 0
define i32 @sock_write(i32 %0, i8* nocapture %1, i32 %2, i8* nocapture readnone %3) {
br label %5
5: ; preds = %5, %4
%6 = tail call i32 @write(i32 %0, i8* %1, i32 %2)
%7 = icmp eq i32 %6, -1
%8 = load i64, i64* @errno
%9 = load i64, i64* @EINTR
%10 = icmp eq i64 %8, %9
%11 = select i1 %7, i1 %10, i1 false
br i1 %11, label %5, label %12
12: ; preds = %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ Radix64frombits(char *, char const *, int, char *, char);
void to64frombits(char *out, const char *in, int inlen) {
  Radix64frombits(
      out, in, inlen,
      "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", '=');
}


x86 assembly (clang, -O0):
<to64frombits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
lea    0xecb(%rip),%rcx
mov    $0x3d,%r8d
call   1030 <Radix64frombits@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<to64frombits>:
lea    0xee9(%rip),%rcx
mov    $0x3d,%r8d
jmp    1030 <Radix64frombits@plt>

LLVM IR (-O0):
@.str = [65 x i8] c"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\00"
define void @to64frombits(i8* %0, i8* %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
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @Radix64frombits(i8* %7, i8* %8, i32 %9, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i8 signext 61)
ret void
}

LLVM IR (-O2):
@.str = [65 x i8] c"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\00"
define void @to64frombits(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @Radix64frombits(i8* %0, i8* %1, i32 %2, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i8 signext 61)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SP_Q_Adr();
void WriteSPhigh(void) { SP_Q_Adr(); }


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

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

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

LLVM IR (-O2):
define void @WriteSPhigh() {
%1 = tail call i32 (...) @SP_Q_Adr()
ret void
}
int cmp_int(const void *intvalue1, const void *intvalue2) {
  const int *u1 = intvalue1, *u2 = intvalue2;
  if (*u1 < *u2) {
    return -1;
  }
  if (*u1 > *u2) {
    return +1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<cmp_int>:
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
jge    113a <cmp_int+0x3a>
movl   $0xffffffff,-0x4(%rbp)
jmp    115f <cmp_int+0x5f>
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jle    1158 <cmp_int+0x58>
movl   $0x1,-0x4(%rbp)
jmp    115f <cmp_int+0x5f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_int>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
setg   %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @cmp_int(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 = load i32, i32* %12
%14 = load i32*, i32** %7
%15 = load i32, i32* %14
%16 = icmp slt i32 %13, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 -1, i32* %3
br label %26
18: ; preds = %2
%19 = load i32*, i32** %6
%20 = load i32, i32* %19
%21 = load i32*, i32** %7
%22 = load i32, i32* %21
%23 = icmp sgt i32 %20, %22
br i1 %23, label %24, label %25
24: ; preds = %18
store i32 1, i32* %3
br label %26
25: ; preds = %18
store i32 0, i32* %3
br label %26
26: ; preds = %25, %24, %17
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
define i32 @cmp_int(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 slt i32 %5, %6
%8 = icmp sgt i32 %5, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
float fast_log2(float const);
float fast_log(const float val) { return (fast_log2(val) * 0.69314718f); }


x86 assembly (clang, -O0):
<fast_log>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <fast_log2@plt>
movss  0xed1(%rip),%xmm1
mulss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fast_log>:
push   %rax
call   1030 <fast_log2@plt>
mulss  0xee2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @fast_log(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @fast_log2(float %3)
%5 = fmul float %4, 0x3FE62E4300000000
ret float %5
}

LLVM IR (-O2):
define float @fast_log(float %0) {
%2 = tail call float @fast_log2(float %0)
%3 = fmul float %2, 0x3FE62E4300000000
ret float %3
}
int inmain(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @inmain() {
ret i32 0
}

LLVM IR (-O2):
define i32 @inmain() {
ret i32 0
}
void intel_qrk_imr_lockall(void) {}


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

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

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

LLVM IR (-O2):
define void @intel_qrk_imr_lockall() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ make_empty();
int /*<<< orphan*/ printf(char *);
void stack_overflow(void) {
  printf("Expression is too complex!\n");
  make_empty();
}


x86 assembly (clang, -O0):
<stack_overflow>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <make_empty@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<stack_overflow>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <make_empty@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Expression is too complex!\0A\00"
define void @stack_overflow() {
%1 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @make_empty()
ret void
}

LLVM IR (-O2):
@str = [27 x i8] c"Expression is too complex!\00"
define void @stack_overflow() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @make_empty()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ merge_sort_sub_unboxed(int *, int /*<<< orphan*/, int);
void merge_sort_unboxed(int *array, int length) {
  merge_sort_sub_unboxed(array, 0, length - 1);
}


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

x86 assembly (clang, -O2):
<merge_sort_unboxed>:
lea    -0x1(%rsi),%edx
xor    %esi,%esi
jmp    1030 <merge_sort_sub_unboxed@plt>

LLVM IR (-O0):
define void @merge_sort_unboxed(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %4
%7 = sub nsw i32 %6, 1
%8 = call i32 @merge_sort_sub_unboxed(i32* %5, i32 0, i32 %7)
ret void
}

LLVM IR (-O2):
define void @merge_sort_unboxed(i32* %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = tail call i32 @merge_sort_sub_unboxed(i32* %0, i32 0, i32 %3)
ret void
}
int bmk_cpu_nanohlt(void) {
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<bmk_cpu_nanohlt>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <bmk_cpu_nanohlt+0x9>
jmp    1109 <bmk_cpu_nanohlt+0x9>

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

LLVM IR (-O0):
define i32 @bmk_cpu_nanohlt() {
br label %1
1: ; preds = %1, %0
br label %1
}

LLVM IR (-O2):
define i32 @bmk_cpu_nanohlt() {
br label %1
1: ; preds = %1, %0
br label %1
}
char *truncname(name)
register char *name;
{
  register char ch, *newname;
  newname = name;
  while ((ch = *name++) != 0)
    if (ch == '/' || ch == ':')
      newname = name;
  return (newname);
}


x86 assembly (clang, -O0):
<truncname>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    %al,-0x9(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
je     1157 <truncname+0x57>
movsbl -0x9(%rbp),%eax
cmp    $0x2f,%eax
je     114a <truncname+0x4a>
movsbl -0x9(%rbp),%eax
cmp    $0x3a,%eax
jne    1152 <truncname+0x52>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1110 <truncname+0x10>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<truncname>:
mov    %rdi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rdi),%ecx
test   %cl,%cl
je     1127 <truncname+0x27>
add    $0x1,%rdi
cmp    $0x3a,%cl
je     1100 <truncname>
cmp    $0x2f,%cl
jne    1110 <truncname+0x10>
jmp    1100 <truncname>
ret

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

LLVM IR (-O2):
define i8* @truncname(i8* %0) {
br label %2
2: ; preds = %8, %1
%3 = phi i8* [ %6, %8 ], [ %0, %1 ]
br label %4
4: ; preds = %2, %4
%5 = phi i8* [ %6, %4 ], [ %3, %2 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %5
switch i8 %7, label %4 [
i8 0, label %9
i8 58, label %8
i8 47, label %8
]
8: ; preds = %4, %4
br label %2
9: ; preds = %4
ret i8* %3
}
void BlendPlaneRow_SSSE3() {}


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

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

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

LLVM IR (-O2):
define void @BlendPlaneRow_SSSE3() {
ret void
}
/* Variables and functions */
int strcasecmp(char const *, char const *);
int str_cmp_no_case(const char *s1, const char *s2) {
  return strcasecmp(s1, s2);
}


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

x86 assembly (clang, -O2):
<str_cmp_no_case>:
jmp    1030 <strcasecmp@plt>

LLVM IR (-O0):
define i32 @str_cmp_no_case(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 = call i32 @strcasecmp(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @str_cmp_no_case(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcasecmp(i8* %0, i8* %1)
ret i32 %3
}
int get_color_interval(float max) {
  if (max < 4.0f)
    max = 4.0f;
  return (int)max / 4;
}


x86 assembly (clang, -O0):
<get_color_interval>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    1128 <get_color_interval+0x28>
movss  0xedd(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
cvttss2si -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_color_interval>:
movss  0xef8(%rip),%xmm1
maxss  %xmm0,%xmm1
cvttss2si %xmm1,%ecx
lea    0x3(%rcx),%eax
test   %ecx,%ecx
cmovns %ecx,%eax
sar    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @get_color_interval(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp olt float %3, 4.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %1
store float 4.000000e+00, float* %2
br label %6
6: ; preds = %5, %1
%7 = load float, float* %2
%8 = fptosi float %7 to i32
%9 = sdiv i32 %8, 4
ret i32 %9
}

LLVM IR (-O2):
define i32 @get_color_interval(float %0) {
%2 = fcmp olt float %0, 4.000000e+00
%3 = select i1 %2, float 4.000000e+00, float %0
%4 = fptosi float %3 to i32
%5 = sdiv i32 %4, 4
ret i32 %5
}
/* Variables and functions */
scalar_t__ posix_memalign(void **, size_t, size_t);
void *aligned_malloc(size_t alignment, size_t size) {
  void *p;
  if (posix_memalign(&p, alignment, size) != 0)
    return NULL;
  return p;
}


x86 assembly (clang, -O0):
<aligned_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rdi
call   1030 <posix_memalign@plt>
cmp    $0x0,%rax
je     1148 <aligned_malloc+0x38>
movq   $0x0,-0x8(%rbp)
jmp    1150 <aligned_malloc+0x40>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aligned_malloc>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    %rsp,%rdi
call   1030 <posix_memalign@plt>
test   %rax,%rax
jne    112a <aligned_malloc+0x1a>
mov    (%rsp),%rax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i8* @aligned_malloc(i64 %0, i64 %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = call i64 @posix_memalign(i8** %3, i64 %0, i64 %1)
%6 = icmp eq i64 %5, 0
%7 = load i8*, i8** %3
%8 = select i1 %6, i8* %7, i8* null
ret i8* %8
}
/* Variables and functions */
char *strchr(char const *, int);
int strlen(char const *);
char *strchrnul(const char *s, int c) {
  char *p = strchr(s, c);
  if (p == NULL) {
    return s + strlen(s);
  } else {
    return p;
  }
}


x86 assembly (clang, -O0):
<strchrnul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <strchr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1170 <strchrnul+0x50>
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
jmp    1178 <strchrnul+0x58>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strchrnul>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strchr@plt>
test   %rax,%rax
je     1130 <strchrnul+0x10>
pop    %rbx
ret
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
add    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @strchrnul(i8* %0, i32 %1) {
%3 = tail call i8* @strchr(i8* dereferenceable(1) %0, i32 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i32 @strlen(i8* %0)
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
br label %9
9: ; preds = %2, %5
%10 = phi i8* [ %8, %5 ], [ %3, %2 ]
ret i8* %10
}
void swap(int *e1, int *e2) {
  int tmp = *e1;
  *e1 = *e2;
  *e2 = tmp;
}


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

x86 assembly (clang, -O2):
<swap>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @swap(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
store i32 %7, i32* %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Type definitions */
struct struct_dll1 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct struct_dll1 *);
int /*<<< orphan*/ printf(char *);
void free_struct_dll1(struct struct_dll1 *s) {
  printf("free_struct_dll1\n");
  free(s);
}


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

x86 assembly (clang, -O2):
<free_struct_dll1>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.struct_dll1 = type { i32 }
@.str = [18 x i8] c"free_struct_dll1\0A\00"
define void @free_struct_dll1(%struct.struct_dll1* %0) {
%2 = alloca %struct.struct_dll1*
store %struct.struct_dll1* %0, %struct.struct_dll1** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = load %struct.struct_dll1*, %struct.struct_dll1** %2
%5 = call i32 @free(%struct.struct_dll1* %4)
ret void
}

LLVM IR (-O2):
%struct.struct_dll1 = type { i32 }
@str = [17 x i8] c"free_struct_dll1\00"
define void @free_struct_dll1(%struct.struct_dll1* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @free(%struct.struct_dll1* %0)
ret void
}
void l4x_debug_stats_pagefault_write_hit(void) {}


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

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

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

LLVM IR (-O2):
define void @l4x_debug_stats_pagefault_write_hit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
long double __ieee754_sinhl(long double x) {
  fputs("__ieee754_sinhl not implemented\n", stderr);
  __set_errno(ENOSYS);
  return 0.0;
}


x86 assembly (clang, -O0):
<__ieee754_sinhl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    0x2ea3(%rip),%rax
mov    (%rax),%esi
lea    0xec2(%rip),%rdi
call   1040 <fputs@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
fldz
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ieee754_sinhl>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1040 <fputs@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
fldz
pop    %rax
ret

LLVM IR (-O0):
@.str = [33 x i8] c"__ieee754_sinhl not implemented\0A\00"
@stderr = global i32 0
@ENOSYS = global i32 0
define x86_fp80 @__ieee754_sinhl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fputs(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @ENOSYS
%6 = call i32 @__set_errno(i32 %5)
ret x86_fp80 0xK00000000000000000000
}

LLVM IR (-O2):
@.str = [33 x i8] c"__ieee754_sinhl not implemented\0A\00"
@stderr = global i32 0
@ENOSYS = global i32 0
define x86_fp80 @__ieee754_sinhl(x86_fp80 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fputs(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @ENOSYS
%5 = tail call i32 @__set_errno(i32 %4)
ret x86_fp80 0xK00000000000000000000
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ bswap16(int /*<<< orphan*/);
void set16(char *addr, uint32_t val, bool swap) {
  if (swap)
    val = bswap16(val);
  *(uint16_t *)addr = val;
}


x86 assembly (clang, -O0):
<set16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1137 <set16+0x27>
mov    -0xc(%rbp),%edi
call   1030 <bswap16@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set16>:
push   %rbx
mov    %rdi,%rbx
test   %edx,%edx
je     1121 <set16+0x11>
mov    %esi,%edi
call   1030 <bswap16@plt>
mov    %eax,%esi
mov    %esi,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @set16(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %3
%10 = load i32, i32* %5
%11 = call i32 @bswap16(i32 %10)
store i32 %11, i32* %5
br label %12
12: ; preds = %9, %3
%13 = load i32, i32* %5
%14 = load i8*, i8** %4
%15 = bitcast i8* %14 to i32*
store i32 %13, i32* %15
ret void
}

LLVM IR (-O2):
define void @set16(i8* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @bswap16(i32 %1)
br label %7
7: ; preds = %5, %3
%8 = phi i32 [ %6, %5 ], [ %1, %3 ]
%9 = bitcast i8* %0 to i32*
store i32 %8, i32* %9
ret void
}
char *corta_string(char *apuntador) {
  apuntador = apuntador + 1;
  return apuntador;
}


x86 assembly (clang, -O0):
<corta_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<corta_string>:
lea    0x1(%rdi),%rax
ret

LLVM IR (-O0):
define i8* @corta_string(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 1
store i8* %4, i8** %2
%5 = load i8*, i8** %2
ret i8* %5
}

LLVM IR (-O2):
define i8* @corta_string(i8* readnone %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
ret i8* %2
}
int parity8(unsigned v) {
  int i, c;
  for (i = c = 0; i < 8; i++)
    c += ((v >> i) & 1);
  return !((c & 1) == 0);
}


x86 assembly (clang, -O0):
<parity8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    113e <parity8+0x3e>
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shr    %cl,%eax
and    $0x1,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1115 <parity8+0x15>
mov    -0xc(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
sete   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<parity8>:
mov    %edi,%eax
and    $0x1,%eax
mov    %edi,%ecx
shr    %ecx
and    $0x1,%ecx
add    %eax,%ecx
mov    %edi,%eax
shr    $0x2,%eax
and    $0x1,%eax
add    %ecx,%eax
mov    %edi,%ecx
shr    $0x3,%ecx
and    $0x1,%ecx
add    %eax,%ecx
mov    %edi,%eax
shr    $0x4,%eax
add    %ecx,%eax
mov    %edi,%ecx
shr    $0x5,%ecx
add    %eax,%ecx
mov    %edi,%eax
shr    $0x6,%eax
add    %ecx,%eax
shr    $0x7,%edi
add    %edi,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @parity8(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %4
store i32 0, i32* %3
br label %5
5: ; preds = %15, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 8
br i1 %7, label %8, label %18
8: ; preds = %5
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = lshr i32 %9, %10
%12 = and i32 %11, 1
%13 = load i32, i32* %4
%14 = add i32 %13, %12
store i32 %14, i32* %4
br label %15
15: ; preds = %8
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 1
store i32 %17, i32* %3
br label %5
18: ; preds = %5
%19 = load i32, i32* %4
%20 = and i32 %19, 1
%21 = icmp eq i32 %20, 0
%22 = xor i1 %21, true
%23 = zext i1 %22 to i32
ret i32 %23
}

LLVM IR (-O2):
define i32 @parity8(i32 %0) {
%2 = and i32 %0, 1
%3 = lshr i32 %0, 1
%4 = and i32 %3, 1
%5 = add nuw nsw i32 %4, %2
%6 = lshr i32 %0, 2
%7 = and i32 %6, 1
%8 = add nuw nsw i32 %7, %5
%9 = lshr i32 %0, 3
%10 = and i32 %9, 1
%11 = add nuw nsw i32 %10, %8
%12 = lshr i32 %0, 4
%13 = add nuw nsw i32 %12, %11
%14 = lshr i32 %0, 5
%15 = add nuw nsw i32 %14, %13
%16 = lshr i32 %0, 6
%17 = add nuw nsw i32 %16, %15
%18 = lshr i32 %0, 7
%19 = add nuw nsw i32 %18, %17
%20 = and i32 %19, 1
ret i32 %20
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int read(int, char *, int);
int recvfromcon(int confd, char buf[]) {
  int buf_len;
  if ((buf_len = read(confd, buf, 100)) < 0) {
    puts("connect terminated\n");
    return -1;
  }
  buf[buf_len] = '\0';
  return buf_len;
}


x86 assembly (clang, -O0):
<recvfromcon>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x64,%edx
call   1040 <read@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jge    1164 <recvfromcon+0x44>
lea    0xead(%rip),%rdi
call   1030 <puts@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1176 <recvfromcon+0x56>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recvfromcon>:
push   %rbx
mov    %rsi,%rbx
mov    $0x64,%edx
call   1040 <read@plt>
test   %eax,%eax
js     113a <recvfromcon+0x1a>
mov    %eax,%ecx
movb   $0x0,(%rbx,%rcx,1)
pop    %rbx
ret
lea    0xebf(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [20 x i8] c"connect terminated\0A\00"
define i32 @recvfromcon(i32 %0, i8* nocapture %1) {
%3 = tail call i32 @read(i32 %0, i8* %1, i32 100)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %10
7: ; preds = %2
%8 = zext i32 %3 to i64
%9 = getelementptr inbounds i8, i8* %1, i64 %8
store i8 0, i8* %9
br label %10
10: ; preds = %7, %5
%11 = phi i32 [ -1, %5 ], [ %3, %7 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void gui_cls() {
  printf("%c[m", 27);
  printf("%c[2J", 27);
}


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

x86 assembly (clang, -O2):
<gui_cls>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x1b,%esi
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
mov    $0x1b,%esi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%c[m\00"
@.str.1 = [6 x i8] c"%c[2J\00"
define void @gui_cls() {
%1 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 27)
%2 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 27)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%c[m\00"
@.str.1 = [6 x i8] c"%c[2J\00"
define void @gui_cls() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 27)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 27)
ret void
}
int ascend(const void *a, const void *b) { return (*(int *)a - *(int *)b); }


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

x86 assembly (clang, -O2):
<ascend>:
mov    (%rdi),%eax
sub    (%rsi),%eax
ret

LLVM IR (-O0):
define i32 @ascend(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 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @ascend(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ IO_put_byte(char);
int /*<<< orphan*/ IO_put_string(char *);
void complain(char a, char b) {
  IO_put_string("; ToACME: .");
  if (a)
    IO_put_byte(a);
  if (b)
    IO_put_byte(b);
  IO_put_string(" cannot be converted\n");
}


x86 assembly (clang, -O0):
<complain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
lea    0xec5(%rip),%rdi
call   1030 <IO_put_string@plt>
cmpb   $0x0,-0x1(%rbp)
je     1153 <complain+0x33>
movsbl -0x1(%rbp),%edi
call   1040 <IO_put_byte@plt>
cmpb   $0x0,-0x2(%rbp)
je     1166 <complain+0x46>
movsbl -0x2(%rbp),%edi
call   1040 <IO_put_byte@plt>
lea    0xe9f(%rip),%rdi
call   1030 <IO_put_string@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<complain>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xed2(%rip),%rdi
call   1030 <IO_put_string@plt>
test   %bpl,%bpl
je     1141 <complain+0x21>
movsbl %bpl,%edi
call   1040 <IO_put_byte@plt>
test   %bl,%bl
je     114d <complain+0x2d>
movsbl %bl,%edi
call   1040 <IO_put_byte@plt>
lea    0xeb8(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <IO_put_string@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"; ToACME: .\00"
@.str.1 = [22 x i8] c" cannot be converted\0A\00"
define void @complain(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = call i32 @IO_put_string(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%6 = load i8, i8* %3
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i8, i8* %3
%10 = call i32 @IO_put_byte(i8 signext %9)
br label %11
11: ; preds = %8, %2
%12 = load i8, i8* %4
%13 = icmp ne i8 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %11
%15 = load i8, i8* %4
%16 = call i32 @IO_put_byte(i8 signext %15)
br label %17
17: ; preds = %14, %11
%18 = call i32 @IO_put_string(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"; ToACME: .\00"
@.str.1 = [22 x i8] c" cannot be converted\0A\00"
define void @complain(i8 signext %0, i8 signext %1) {
%3 = tail call i32 @IO_put_string(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i8 %0, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @IO_put_byte(i8 signext %0)
br label %7
7: ; preds = %5, %2
%8 = icmp eq i8 %1, 0
br i1 %8, label %11, label %9
9: ; preds = %7
%10 = tail call i32 @IO_put_byte(i8 signext %1)
br label %11
11: ; preds = %9, %7
%12 = tail call i32 @IO_put_string(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int sumByValue(int a, int b) { return a + b; }


x86 assembly (clang, -O0):
<sumByValue>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sumByValue>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @sumByValue(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @sumByValue(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void ShowMSG(int a, int b) { printf("MESSAGE: %s\n", (char *)b); }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"MESSAGE: %s\0A\00"
define void @ShowMSG(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
%8 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"MESSAGE: %s\0A\00"
define void @ShowMSG(i32 %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = inttoptr i64 %3 to i8*
%5 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ pabort(char *);
int write(int, int /*<<< orphan*/ const *, size_t);
void transfer_ex(int fd, uint8_t const *tx, uint8_t const *rx, size_t len) {
  int ret;
  ret = write(fd, tx, len);
  if (ret < 1)
    pabort("can't send spi message");
}


x86 assembly (clang, -O0):
<transfer_ex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <write@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x1,-0x24(%rbp)
jge    1160 <transfer_ex+0x40>
lea    0xea5(%rip),%rdi
call   1040 <pabort@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<transfer_ex>:
push   %rax
mov    %rcx,%rdx
call   1030 <write@plt>
test   %eax,%eax
jle    112f <transfer_ex+0xf>
pop    %rax
ret
lea    0xeca(%rip),%rdi
pop    %rax
jmp    1040 <pabort@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"can't send spi message\00"
define void @transfer_ex(i32 %0, i32* %1, i32* %2, i64 %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i64
%9 = alloca i32
store i32 %0, i32* %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i64 %3, i64* %8
%10 = load i32, i32* %5
%11 = load i32*, i32** %6
%12 = load i64, i64* %8
%13 = call i32 @write(i32 %10, i32* %11, i64 %12)
store i32 %13, i32* %9
%14 = load i32, i32* %9
%15 = icmp slt i32 %14, 1
br i1 %15, label %16, label %18
16: ; preds = %4
%17 = call i32 @pabort(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %18
18: ; preds = %16, %4
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"can't send spi message\00"
define void @transfer_ex(i32 %0, i32* nocapture %1, i32* nocapture readnone %2, i64 %3) {
%5 = tail call i32 @write(i32 %0, i32* %1, i64 %3)
%6 = icmp slt i32 %5, 1
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 @pabort(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %4
ret void
}
int find(char c, char *str) {
  int i;
  i = 0;
  while (str[i]) {
    if (str[i] == c)
      return i;
    i++;
  }
  return i;
}


x86 assembly (clang, -O0):
<find>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1158 <find+0x58>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0x5(%rbp),%ecx
cmp    %ecx,%eax
jne    114a <find+0x4a>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115e <find+0x5e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1115 <find+0x15>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @find(i8 signext %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %10, %3 ], [ 0, %2 ]
%5 = getelementptr inbounds i8, i8* %1, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = icmp eq i8 %6, %0
%9 = or i1 %7, %8
%10 = add nuw i64 %4, 1
br i1 %9, label %11, label %3
11: ; preds = %3
%12 = trunc i64 %4 to i32
ret i32 %12
}
/* Variables and functions */
scalar_t__ CallBack2(int, void *, void *);
int SetOperationNumVar(const char *varName, double dval) {
  return (int)CallBack2(188, (void *)varName, (void *)&dval);
}


x86 assembly (clang, -O0):
<SetOperationNumVar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdx
mov    $0xbc,%edi
call   1030 <CallBack2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetOperationNumVar>:
push   %rax
mov    %rdi,%rsi
movsd  %xmm0,(%rsp)
mov    %rsp,%rdx
mov    $0xbc,%edi
call   1030 <CallBack2@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @SetOperationNumVar(i8* %0, double %1) {
%3 = alloca i8*
%4 = alloca double
store i8* %0, i8** %3
store double %1, double* %4
%5 = load i8*, i8** %3
%6 = bitcast double* %4 to i8*
%7 = call i64 @CallBack2(i32 188, i8* %5, i8* %6)
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @SetOperationNumVar(i8* %0, double %1) {
%3 = alloca double
store double %1, double* %3
%4 = bitcast double* %3 to i8*
%5 = call i64 @CallBack2(i32 188, i8* %0, i8* %4)
%6 = trunc i64 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void KSI_free(void *ptr) { free(ptr); }


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

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

LLVM IR (-O2):
define void @KSI_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void dummyplay(void) {}


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

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

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

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