xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, int);
void f4(int size) {
  char src[12] = "helloworld";
  char dest[12];
  if (size > 0)
    memcpy(dest, src, size);
}


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xedc(%rip),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1149 <f4+0x39>
lea    -0x1c(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    -0x4(%rbp),%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4>:
sub    $0x18,%rsp
movabs $0x726f776f6c6c6568,%rax
77 6f 72
mov    %rax,(%rsp)
movl   $0x646c,0x8(%rsp)
test   %edi,%edi
jle    113d <f4+0x2d>
mov    %edi,%edx
lea    0xc(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <memcpy@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.f4.src = [12 x i8] c"helloworld\00\00"
define void @f4(i32 %0) {
%2 = alloca i32
%3 = alloca [12 x i8]
%4 = alloca [12 x i8]
store i32 %0, i32* %2
%5 = bitcast [12 x i8]* %3 to i8*
%6 = load i32, i32* %2
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = getelementptr inbounds [12 x i8], [12 x i8]* %4, i64 0, i64 0
%10 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%11 = load i32, i32* %2
%12 = call i32 @memcpy(i8* %9, i8* %10, i32 %11)
br label %13
13: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
@__const.f4.src = [12 x i8] c"helloworld\00\00"
define void @f4(i32 %0) {
%2 = alloca [12 x i8]
%3 = alloca [12 x i8]
%4 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%6 = icmp sgt i32 %0, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @memcpy(i8* %5, i8* %4, i32 %0)
br label %9
9: ; preds = %7, %1
ret void
}
/* Variables and functions */
int socketlist_get_next();
int next_socket(void) { return socketlist_get_next(); }


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

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

LLVM IR (-O0):
define i32 @next_socket() {
%1 = call i32 (...) @socketlist_get_next()
ret i32 %1
}

LLVM IR (-O2):
define i32 @next_socket() {
%1 = tail call i32 (...) @socketlist_get_next()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ __uClibc_main(int, char **, char **);
void start1(int argc, char **argv) {
  char **environ;
  environ = &argv[argc + 1];
  if ((char *)environ == *argv)
    --environ;
  __uClibc_main(argc, argv, environ);
}


x86 assembly (clang, -O0):
<start1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%rax
jne    1154 <start1+0x44>
mov    -0x18(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <__uClibc_main@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<start1>:
movslq %edi,%rdi
lea    (%rsi,%rdi,8),%rdx
add    $0x8,%rdx
xor    %eax,%eax
cmp    %rdx,(%rsi)
sete   %al
shl    $0x3,%rax
sub    %rax,%rdx
jmp    1030 <__uClibc_main@plt>

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

LLVM IR (-O2):
define void @start1(i32 %0, i8** %1) {
%3 = add nsw i32 %0, 1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8*, i8** %1, i64 %4
%6 = bitcast i8** %5 to i8*
%7 = load i8*, i8** %1
%8 = icmp eq i8* %7, %6
%9 = sext i1 %8 to i64
%10 = getelementptr i8*, i8** %5, i64 %9
%11 = tail call i32 @__uClibc_main(i32 %0, i8** %1, i8** %10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f();
int /*<<< orphan*/ h();
void g() {
  f();
  h();
}


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

x86 assembly (clang, -O2):
<g>:
push   %rax
xor    %eax,%eax
call   1040 <f@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <h@plt>

LLVM IR (-O0):
define void @g() {
%1 = call i32 (...) @f()
%2 = call i32 (...) @h()
ret void
}

LLVM IR (-O2):
define void @g() {
%1 = tail call i32 (...) @f()
%2 = tail call i32 (...) @h()
ret void
}
int test_imm_41int16_reg(short val) {
  return ((val) & (0x41 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_41int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0x41,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_41int16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, 65
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_41int16_reg(i16 signext %0) {
%2 = and i16 %0, 65
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
unsigned long xCPUbasepriGet();
unsigned long xIntPriorityMaskGet(void) { return (xCPUbasepriGet()); }


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

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

LLVM IR (-O0):
define i64 @xIntPriorityMaskGet() {
%1 = call i64 (...) @xCPUbasepriGet()
ret i64 %1
}

LLVM IR (-O2):
define i64 @xIntPriorityMaskGet() {
%1 = tail call i64 (...) @xCPUbasepriGet()
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x48() {
  Assert_real((isxdigit(72) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isxdigit.c",
              365, ("isxdigit should be 0 for H"));
}


x86 assembly (clang, -O0):
<t_isxdigit_0x48>:
push   %rbp
mov    %rsp,%rbp
mov    $0x48,%edi
call   1030 <isxdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x16d,%edx
lea    0xf5c(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isxdigit_0x48>:
push   %rax
mov    $0x48,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x16d,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for H\00"
define void @t_isxdigit_0x48() {
%1 = call i64 @isxdigit(i32 72)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 365, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for H\00"
define void @t_isxdigit_0x48() {
%1 = tail call i64 @isxdigit(i32 72)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 365, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int population(unsigned long long mask) {
  int count = 0;
  for (; mask; ++count) {
    mask &= mask - 1;
  }
  return count;
}


x86 assembly (clang, -O0):
<population>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1138 <population+0x38>
mov    -0x8(%rbp),%rax
sub    $0x1,%rax
and    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <population+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<population>:
xor    %eax,%eax
test   %rdi,%rdi
je     111c <population+0x1c>
nopw   0x0(%rax,%rax,1)
lea    -0x1(%rdi),%rcx
add    $0x1,%eax
and    %rcx,%rdi
jne    1110 <population+0x10>
ret

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

LLVM IR (-O2):
define i32 @population(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ 0, %1 ]
%5 = phi i64 [ %7, %3 ], [ %0, %1 ]
%6 = add i64 %5, -1
%7 = and i64 %6, %5
%8 = add nuw nsw i32 %4, 1
%9 = icmp eq i64 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %8, %3 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ pass(char *);
int /*<<< orphan*/ stdout;
main() {
  static short cc[64][64];
  static int dd[500];
  pass("large arrays");
  fflush(stdout);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <pass@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <pass@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@main.cc = internal global [64 x [64 x i16]] zeroinitializer
@main.dd = internal global [500 x i32] zeroinitializer
@.str = [13 x i8] c"large arrays\00"
@stdout = global i32 0
define i32 @main() {
%1 = call i32 @pass(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = call i32 @fflush(i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"large arrays\00"
@stdout = global i32 0
define i32 @main() {
%1 = tail call i32 @pass(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = tail call i32 @fflush(i32 %2)
ret i32 0
}
/* Variables and functions */
char *XWBMalloc(scalar_t__, char const *, unsigned int const);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *XWBStrDup(const char *iOrig, const char *iFile,
                const unsigned int iLine) {
  char *result;
  result = XWBMalloc(strlen(iOrig) + 1, iFile, iLine);
  strcpy(result, iOrig);
  return result;
}


x86 assembly (clang, -O0):
<XWBStrDup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1050 <XWBMalloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<XWBStrDup>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1050 <XWBMalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %rbp,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @XWBStrDup(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = call i64 @strlen(i8* %8)
%10 = add nsw i64 %9, 1
%11 = load i8*, i8** %5
%12 = load i32, i32* %6
%13 = call i8* @XWBMalloc(i64 %10, i8* %11, i32 %12)
store i8* %13, i8** %7
%14 = load i8*, i8** %7
%15 = load i8*, i8** %4
%16 = call i32 @strcpy(i8* %14, i8* %15)
%17 = load i8*, i8** %7
ret i8* %17
}

LLVM IR (-O2):
define i8* @XWBStrDup(i8* %0, i8* %1, i32 %2) {
%4 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%5 = add nsw i64 %4, 1
%6 = tail call i8* @XWBMalloc(i64 %5, i8* %1, i32 %2)
%7 = tail call i32 @strcpy(i8* %6, i8* %0)
ret i8* %6
}
/* Variables and functions */
scalar_t__ isupper(unsigned char);
int no_upper(const char *s, size_t len) {
  while (len--)
    if (isupper((unsigned char)*s))
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<no_upper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x18(%rbp)
cmp    $0x0,%rax
je     1160 <no_upper+0x50>
mov    -0x10(%rbp),%rax
movzbl (%rax),%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
je     115b <no_upper+0x4b>
movl   $0x0,-0x4(%rbp)
jmp    1167 <no_upper+0x57>
jmp    1120 <no_upper+0x10>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<no_upper>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
add    $0x1,%rbx
xchg   %ax,%ax
add    $0xffffffffffffffff,%rbx
je     1138 <no_upper+0x28>
movzbl (%r14),%edi
call   1030 <isupper@plt>
test   %rax,%rax
je     1120 <no_upper+0x10>
xor    %eax,%eax
jmp    113d <no_upper+0x2d>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @no_upper(i8* nocapture %0, i64 %1) {
br label %3
3: ; preds = %6, %2
%4 = phi i64 [ %1, %2 ], [ %7, %6 ]
%5 = icmp eq i64 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %3
%7 = add i64 %4, -1
%8 = load i8, i8* %0
%9 = tail call i64 @isupper(i8 zeroext %8)
%10 = icmp eq i64 %9, 0
br i1 %10, label %3, label %11
11: ; preds = %3, %6
%12 = phi i32 [ 0, %6 ], [ 1, %3 ]
ret i32 %12
}
int is_l_end(char c) { return (c == '\0') || (c == ':'); }


x86 assembly (clang, -O0):
<is_l_end>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x2(%rbp)
je     1129 <is_l_end+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x3a,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_l_end>:
test   %dil,%dil
sete   %al
cmp    $0x3a,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_l_end(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 58
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @is_l_end(i8 signext %0) {
%2 = icmp eq i8 %0, 0
%3 = icmp eq i8 %0, 58
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
int f_eq_cr1(float a1) { return (((100) == (a1))); }


x86 assembly (clang, -O0):
<f_eq_cr1>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_eq_cr1>:
cmpeqss 0xef7(%rip),%xmm0
movd   %xmm0,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @f_eq_cr1(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp oeq float 1.000000e+02, %3
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @f_eq_cr1(float %0) {
%2 = fcmp oeq float %0, 1.000000e+02
%3 = zext i1 %2 to i32
ret i32 %3
}
void ScaleARGBColsUp2_C() {}


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

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

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

LLVM IR (-O2):
define void @ScaleARGBColsUp2_C() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int /*<<< orphan*/);
int /*<<< orphan*/ GPIOBaseValid(unsigned long);
unsigned long GPIOGetIntNumber(unsigned long);
int /*<<< orphan*/ IntDisable(unsigned long);
int /*<<< orphan*/ IntUnregister(unsigned long);
void GPIOPortIntUnregister(unsigned long ulPort) {
  DEBUG_ASSERT(GPIOBaseValid(ulPort));
  ulPort = GPIOGetIntNumber(ulPort);
  IntDisable(ulPort);
  IntUnregister(ulPort);
}


x86 assembly (clang, -O0):
<GPIOPortIntUnregister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <GPIOBaseValid@plt>
mov    %eax,%edi
call   1060 <DEBUG_ASSERT@plt>
mov    -0x8(%rbp),%rdi
call   1040 <GPIOGetIntNumber@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <IntDisable@plt>
mov    -0x8(%rbp),%rdi
call   1070 <IntUnregister@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPIOPortIntUnregister>:
push   %rbx
mov    %rdi,%rbx
call   1030 <GPIOBaseValid@plt>
mov    %eax,%edi
call   1060 <DEBUG_ASSERT@plt>
mov    %rbx,%rdi
call   1040 <GPIOGetIntNumber@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <IntDisable@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1070 <IntUnregister@plt>

LLVM IR (-O0):
define void @GPIOPortIntUnregister(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @GPIOBaseValid(i64 %3)
%5 = call i32 @DEBUG_ASSERT(i32 %4)
%6 = load i64, i64* %2
%7 = call i64 @GPIOGetIntNumber(i64 %6)
store i64 %7, i64* %2
%8 = load i64, i64* %2
%9 = call i32 @IntDisable(i64 %8)
%10 = load i64, i64* %2
%11 = call i32 @IntUnregister(i64 %10)
ret void
}

LLVM IR (-O2):
define void @GPIOPortIntUnregister(i64 %0) {
%2 = tail call i32 @GPIOBaseValid(i64 %0)
%3 = tail call i32 @DEBUG_ASSERT(i32 %2)
%4 = tail call i64 @GPIOGetIntNumber(i64 %0)
%5 = tail call i32 @IntDisable(i64 %4)
%6 = tail call i32 @IntUnregister(i64 %4)
ret void
}
/* Variables and functions */
scalar_t__ str_ends_with(char const *, int, char *);
int is_ignored_file(const char *s, int len) {
  return str_ends_with(s, len, "include/generated/autoconf.h") ||
         str_ends_with(s, len, "include/generated/autoksyms.h");
}


x86 assembly (clang, -O0):
<is_ignored_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xed3(%rip),%rdx
call   1030 <str_ends_with@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0xd(%rbp)
jne    1161 <is_ignored_file+0x51>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xecb(%rip),%rdx
call   1030 <str_ends_with@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_ignored_file>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xee1(%rip),%rdx
call   1030 <str_ends_with@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
jne    114d <is_ignored_file+0x3d>
lea    0xee5(%rip),%rdx
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <str_ends_with@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [29 x i8] c"include/generated/autoconf.h\00"
@.str.1 = [30 x i8] c"include/generated/autoksyms.h\00"
define i32 @is_ignored_file(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i64 @str_ends_with(i8* %5, i32 %6, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%8 = icmp ne i64 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %2
%10 = load i8*, i8** %3
%11 = load i32, i32* %4
%12 = call i64 @str_ends_with(i8* %10, i32 %11, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%13 = icmp ne i64 %12, 0
br label %14
14: ; preds = %9, %2
%15 = phi i1 [ true, %2 ], [ %13, %9 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
@.str = [29 x i8] c"include/generated/autoconf.h\00"
@.str.1 = [30 x i8] c"include/generated/autoksyms.h\00"
define i32 @is_ignored_file(i8* %0, i32 %1) {
%3 = tail call i64 @str_ends_with(i8* %0, i32 %1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i64 @str_ends_with(i8* %0, i32 %1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ 1, %2 ], [ %8, %5 ]
ret i32 %10
}
int main() {
  const int ntasks = 4;
  int out[4];
#pragma omp target device(smp) copy_out(out [0:ntasks - 1])
#pragma omp task inout(out [0:ntasks - 1])
  { ntasks; }
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
const char *Cmp_Brief(void) { return "Comparison"; }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"Comparison\00"
define i8* @Cmp_Brief() {
ret i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [11 x i8] c"Comparison\00"
define i8* @Cmp_Brief() {
ret i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ freopen(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int main(int argc, char *argv[]) {
  freopen("sell.in", "r", stdin);
  freopen("sell.out", "w", stdout);
  printf("8\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eab(%rip),%rax
mov    (%rax),%edx
lea    0xeba(%rip),%rdi
lea    0xebb(%rip),%rsi
call   1040 <freopen@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edx
lea    0xea8(%rip),%rdi
lea    0xeaa(%rip),%rsi
call   1040 <freopen@plt>
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edx
lea    0xecf(%rip),%rdi
lea    0xed0(%rip),%rsi
call   1040 <freopen@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edx
lea    0xebd(%rip),%rdi
lea    0xebf(%rip),%rsi
call   1040 <freopen@plt>
lea    0xeb5(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"sell.in\00"
@.str.1 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.2 = [9 x i8] c"sell.out\00"
@.str.3 = [2 x i8] c"w\00"
@stdout = global i32 0
@.str.4 = [3 x i8] c"8\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @stdin
%7 = call i32 @freopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @stdout
%9 = call i32 @freopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i32 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"sell.in\00"
@.str.1 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.2 = [9 x i8] c"sell.out\00"
@.str.3 = [2 x i8] c"w\00"
@stdout = global i32 0
@str = [2 x i8] c"8\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stdin
%4 = tail call i32 @freopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @stdout
%6 = tail call i32 @freopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i32 %5)
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void genbc1fl_out() {}


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

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

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

LLVM IR (-O2):
define void @genbc1fl_out() {
ret void
}
/* Variables and functions */
int get_ticks();
int /*<<< orphan*/ milli_delay(int);
int /*<<< orphan*/ printf(char *, int);
void TestA() {
  int i = 0;
  while (1) {
    printf("<Ticks:%x>", get_ticks());
    milli_delay(200);
  }
}


x86 assembly (clang, -O0):
<TestA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <get_ticks@plt>
mov    %eax,%esi
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
mov    $0xc8,%edi
call   1050 <milli_delay@plt>
jmp    113f <TestA+0xf>

x86 assembly (clang, -O2):
<TestA>:
push   %rbx
lea    0xec8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <get_ticks@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0xc8,%edi
call   1050 <milli_delay@plt>
jmp    1140 <TestA+0x10>

LLVM IR (-O0):
@.str = [11 x i8] c"<Ticks:%x>\00"
define void @TestA() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %2
%3 = call i32 (...) @get_ticks()
%4 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @milli_delay(i32 200)
br label %2
}

LLVM IR (-O2):
@.str = [11 x i8] c"<Ticks:%x>\00"
define void @TestA() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @get_ticks()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = tail call i32 @milli_delay(i32 200)
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("usage: eg inject [-q] [-w <usec>] -i <device>\n");
  printf("\n");
  printf("    -q                    quiet mode\n");
  printf("    -w <usec>             sending interval\n");
  printf("    -i <device>           interface to inject\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xef0(%rip),%rdi
call   1040 <puts@plt>
lea    0xf09(%rip),%rdi
call   1040 <puts@plt>
lea    0xf28(%rip),%rdi
pop    %rax
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [47 x i8] c"usage: eg inject [-q] [-w <usec>] -i <device>\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [38 x i8] c" -q quiet mode\0A\00"
@.str.3 = [44 x i8] c" -w <usec> sending interval\0A\00"
@.str.4 = [47 x i8] c" -i <device> interface to inject\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [46 x i8] c"usage: eg inject [-q] [-w <usec>] -i <device>\00"
@str.5 = [37 x i8] c" -q quiet mode\00"
@str.6 = [43 x i8] c" -w <usec> sending interval\00"
@str.7 = [46 x i8] c" -i <device> interface to inject\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.6, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.7, i64 0, i64 0))
ret void
}
/* Type definitions */
struct eembed_log {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ eembed_fprintf_context(struct eembed_log *);
int /*<<< orphan*/ eembed_system_fprintf(int /*<<< orphan*/, char *,
                                         void const *);
void eembed_fprintf_append_vp(struct eembed_log *log, const void *ptr) {
  eembed_system_fprintf(eembed_fprintf_context(log), "%p", ptr);
}


x86 assembly (clang, -O0):
<eembed_fprintf_append_vp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <eembed_fprintf_context@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rdx
lea    0xeba(%rip),%rsi
call   1030 <eembed_system_fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eembed_fprintf_append_vp>:
push   %rbx
mov    %rsi,%rbx
call   1040 <eembed_fprintf_context@plt>
lea    0xed0(%rip),%rsi
mov    %eax,%edi
mov    %rbx,%rdx
pop    %rbx
jmp    1030 <eembed_system_fprintf@plt>

LLVM IR (-O0):
%struct.eembed_log = type { i32 }
@.str = [3 x i8] c"%p\00"
define void @eembed_fprintf_append_vp(%struct.eembed_log* %0, i8* %1) {
%3 = alloca %struct.eembed_log*
%4 = alloca i8*
store %struct.eembed_log* %0, %struct.eembed_log** %3
store i8* %1, i8** %4
%5 = load %struct.eembed_log*, %struct.eembed_log** %3
%6 = call i32 @eembed_fprintf_context(%struct.eembed_log* %5)
%7 = load i8*, i8** %4
%8 = call i32 @eembed_system_fprintf(i32 %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
%struct.eembed_log = type { i32 }
@.str = [3 x i8] c"%p\00"
define void @eembed_fprintf_append_vp(%struct.eembed_log* %0, i8* %1) {
%3 = tail call i32 @eembed_fprintf_context(%struct.eembed_log* %0)
%4 = tail call i32 @eembed_system_fprintf(i32 %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ raw_local_irq_restore(int /*<<< orphan*/);
void raw_local_irq_disable(void) { raw_local_irq_restore(0); }


x86 assembly (clang, -O0):
<raw_local_irq_disable>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <raw_local_irq_restore@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @raw_local_irq_disable() {
%1 = call i32 @raw_local_irq_restore(i32 0)
ret void
}

LLVM IR (-O2):
define void @raw_local_irq_disable() {
%1 = tail call i32 @raw_local_irq_restore(i32 0)
ret void
}
/* Variables and functions */
unsigned char *malloc(int);
unsigned char *CreerImage(int largeur, int hauteur) {
  unsigned char *p = malloc(largeur * hauteur + 15);
  return p;
}


x86 assembly (clang, -O0):
<CreerImage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
imul   -0x8(%rbp),%edi
add    $0xf,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CreerImage>:
imul   %esi,%edi
add    $0xf,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @CreerImage(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = mul nsw i32 %6, %7
%9 = add nsw i32 %8, 15
%10 = call i8* @malloc(i32 %9)
store i8* %10, i8** %5
%11 = load i8*, i8** %5
ret i8* %11
}

LLVM IR (-O2):
define noalias i8* @CreerImage(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
%4 = add nsw i32 %3, 15
%5 = tail call i8* @malloc(i32 %4)
ret i8* %5
}
void speakup_con_write(int currcons, const char *str, int len) {}


x86 assembly (clang, -O0):
<speakup_con_write>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @speakup_con_write(i32 %0, i8* nocapture %1, i32 %2) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int fd_write(int /*<<< orphan*/ *, char const *, int);
int strlen(char const *);
int fd_puts(BIO *bp, const char *str) {
  int n, ret;
  n = strlen(str);
  ret = fd_write(bp, str, n);
  return (ret);
}


x86 assembly (clang, -O0):
<fd_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <fd_write@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fd_puts>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <fd_write@plt>

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

LLVM IR (-O2):
define i32 @fd_puts(i32* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @fd_write(i32* %0, i8* %1, i32 %3)
ret i32 %4
}
/* Type definitions */
struct bone {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct bone *);
void del_bone(struct bone *b) { free(b); }


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

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

LLVM IR (-O2):
%struct.bone = type { i32 }
define void @del_bone(%struct.bone* nocapture %0) {
%2 = tail call i32 @free(%struct.bone* %0)
ret void
}
int d_bge_rc2(double a1) { return !(__builtin_isgreaterequal(a1, 100)); }


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

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

LLVM IR (-O0):
define i32 @d_bge_rc2(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oge double %3, 1.000000e+02
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @d_bge_rc2(double %0) {
%2 = fcmp ult double %0, 1.000000e+02
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ F_OK;
int access(char const *, int /*<<< orphan*/);
int file_exists(const char *filename) {
  if (access(filename, F_OK) != -1)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<file_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
cmp    $0xffffffff,%eax
je     1143 <file_exists+0x33>
movl   $0x1,-0x4(%rbp)
jmp    114a <file_exists+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_exists>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@F_OK = global i32 0
define i32 @file_exists(i8* nocapture %0) {
%2 = load i32, i32* @F_OK
%3 = tail call i32 @access(i8* %0, i32 %2)
%4 = icmp ne i32 %3, -1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void const *, size_t);
size_t ZBUFF_limitCopy(void *dst, size_t maxDstSize, const void *src,
                       size_t srcSize) {
  size_t length = (((maxDstSize) < (srcSize)) ? (maxDstSize) : (srcSize));
  memcpy(dst, src, length);
  return length;
}


x86 assembly (clang, -O0):
<ZBUFF_limitCopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    1143 <ZBUFF_limitCopy+0x33>
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
jmp    114b <ZBUFF_limitCopy+0x3b>
mov    -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ZBUFF_limitCopy>:
push   %rbx
mov    %rcx,%rbx
cmp    %rcx,%rsi
cmovb  %rsi,%rbx
mov    %rdx,%rsi
mov    %rbx,%rdx
call   1030 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i64 @ZBUFF_limitCopy(i8* %0, i64 %1, i8* %2, i64 %3) {
%5 = icmp ult i64 %1, %3
%6 = select i1 %5, i64 %1, i64 %3
%7 = tail call i32 @memcpy(i8* %0, i8* %2, i64 %6)
ret i64 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ burnstack(int);
int /*<<< orphan*/ do_x25519(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                             int /*<<< orphan*/ const *);
void x25519(uint8_t out[32], const uint8_t scalar[32],
            const uint8_t point[32]) {
  do_x25519(out, scalar, point);
  burnstack(2048);
}


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

x86 assembly (clang, -O2):
<x25519>:
push   %rax
call   1030 <do_x25519@plt>
mov    $0x800,%edi
pop    %rax
jmp    1040 <burnstack@plt>

LLVM IR (-O0):
define void @x25519(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i32*, i32** %4
%8 = load i32*, i32** %5
%9 = load i32*, i32** %6
%10 = call i32 @do_x25519(i32* %7, i32* %8, i32* %9)
%11 = call i32 @burnstack(i32 2048)
ret void
}

LLVM IR (-O2):
define void @x25519(i32* %0, i32* %1, i32* %2) {
%4 = tail call i32 @do_x25519(i32* %0, i32* %1, i32* %2)
%5 = tail call i32 @burnstack(i32 2048)
ret void
}
int compare(const void *first, const void *second) {
  double a = *((double *)first), b = *((double *)second);
  if (a < b) {
    return -1;
  } else if (a > b) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1146 <compare+0x46>
movl   $0xffffffff,-0x4(%rbp)
jmp    1169 <compare+0x69>
movsd  -0x20(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    1162 <compare+0x62>
movl   $0x1,-0x4(%rbp)
jmp    1169 <compare+0x69>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
seta   %cl
ucomisd %xmm0,%xmm1
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @compare(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca double
%7 = alloca double
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to double*
%10 = load double, double* %9
store double %10, double* %6
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to double*
%13 = load double, double* %12
store double %13, double* %7
%14 = load double, double* %6
%15 = load double, double* %7
%16 = fcmp olt double %14, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 -1, i32* %3
br label %24
18: ; preds = %2
%19 = load double, double* %6
%20 = load double, double* %7
%21 = fcmp ogt double %19, %20
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 1, i32* %3
br label %24
23: ; preds = %18
store i32 0, i32* %3
br label %24
24: ; preds = %23, %22, %17
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fcmp olt double %4, %6
%8 = fcmp ogt double %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
int pop(x)
int x;
{
  x = ((x & ~0x5555) >> 1) + (x & 0x5555);
  x = ((x & ~0x3333) >> 2) + (x & 0x3333);
  x = ((x >> 4) + x) & 0x0f0f;
  x = ((x >> 8) + x) & 0xff;
  return x;
}


x86 assembly (clang, -O0):
<pop>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffffaaaa,%eax
sar    $0x1,%eax
mov    -0x4(%rbp),%ecx
and    $0x5555,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffffcccc,%eax
sar    $0x2,%eax
mov    -0x4(%rbp),%ecx
and    $0x3333,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x4,%eax
add    -0x4(%rbp),%eax
and    $0xf0f,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
add    -0x4(%rbp),%eax
and    $0xff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pop>:
mov    %edi,%eax
sar    %eax
and    $0xffffd555,%eax
and    $0x5555,%edi
add    %eax,%edi
mov    %edi,%eax
sar    $0x2,%eax
and    $0xfffff333,%eax
and    $0x3333,%edi
add    %eax,%edi
mov    %edi,%eax
shr    $0x4,%eax
add    %edi,%eax
and    $0xf0f,%eax
mov    %eax,%ecx
shr    $0x8,%ecx
add    %eax,%ecx
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @pop(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, -21846
%5 = ashr i32 %4, 1
%6 = load i32, i32* %2
%7 = and i32 %6, 21845
%8 = add nsw i32 %5, %7
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = and i32 %9, -13108
%11 = ashr i32 %10, 2
%12 = load i32, i32* %2
%13 = and i32 %12, 13107
%14 = add nsw i32 %11, %13
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = ashr i32 %15, 4
%17 = load i32, i32* %2
%18 = add nsw i32 %16, %17
%19 = and i32 %18, 3855
store i32 %19, i32* %2
%20 = load i32, i32* %2
%21 = ashr i32 %20, 8
%22 = load i32, i32* %2
%23 = add nsw i32 %21, %22
%24 = and i32 %23, 255
store i32 %24, i32* %2
%25 = load i32, i32* %2
ret i32 %25
}

LLVM IR (-O2):
define i32 @pop(i32 %0) {
%2 = ashr i32 %0, 1
%3 = and i32 %2, -10923
%4 = and i32 %0, 21845
%5 = add nsw i32 %3, %4
%6 = ashr i32 %5, 2
%7 = and i32 %6, -3277
%8 = and i32 %5, 13107
%9 = add nsw i32 %7, %8
%10 = lshr i32 %9, 4
%11 = add nsw i32 %10, %9
%12 = and i32 %11, 3855
%13 = lshr i32 %12, 8
%14 = add nuw nsw i32 %13, %12
%15 = and i32 %14, 31
ret i32 %15
}