xunge/DecIR huggingface dataset:
void fd228(int n) {
P0A:
  goto P0A;
  {
    typedef int(*b)[n];
  P01A:
    goto P01A;
    {
      typedef int(*c)[n];
    P012A:
      goto P012A;
      0;
    }
  P01B:
    goto P01B;
    {
      typedef int(*d)[n];
    P013A:
      goto P013A;
      0;
    }
  P01C:
    goto P01C;
    ;
    typedef int(*e)[n];
  P014A:
    goto P014A;
    0;
  };
a : {
  typedef int(*f)[n];
P02A:
  goto P02A;
  {
    typedef int(*g)[n];
  P024A:
    goto P024A;
    0;
  };
P02B:
  goto P02B;
  {
    typedef int(*h)[n];
  P025A:
    goto P025A;
    0;
  };
P02C:
  goto P02C;
  ;
  typedef int(*i)[n];
p026A:
  goto p026A;
  goto a;
P026A:
  goto P026A;
  0;
};
P0C:
  goto P0C;
  ;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


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

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

LLVM IR (-O0):
define void @fd228(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
br label %3
4: ; No predecessors!
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %7, %4
br label %7
8: ; No predecessors!
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
br label %11
11: ; preds = %11, %8
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
br label %16
16: ; preds = %16, %13
br label %16
17: ; preds = %17
br label %17
18: ; No predecessors!
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
br label %21
21: ; preds = %21, %18
br label %21
22: ; No predecessors!
%23 = load i32, i32* %2
%24 = zext i32 %23 to i64
br label %25
25: ; preds = %25, %22
br label %25
26: ; No predecessors!
%27 = load i32, i32* %2
%28 = zext i32 %27 to i64
br label %29
29: ; preds = %29, %26
br label %29
30: ; preds = %30
br label %30
31: ; No predecessors!
%32 = load i32, i32* %2
%33 = zext i32 %32 to i64
br label %34
34: ; preds = %34, %31
br label %34
35: ; preds = %35
br label %35
36: ; No predecessors!
%37 = load i32, i32* %2
%38 = zext i32 %37 to i64
br label %39
39: ; preds = %39, %36
br label %39
40: ; preds = %40
br label %40
41: ; preds = %41
br label %41
42: ; No predecessors!
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
br label %45
45: ; preds = %45, %42
br label %45
46: ; preds = %46
br label %46
}

LLVM IR (-O2):
define void @fd228(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
int CHAR_BIT;
int /*<<< orphan*/ assert(int);
void set_bit_one(volatile uint32_t *current, uint8_t shift) {
  assert(shift <= (sizeof((*current)) * CHAR_BIT - 1));
  *current |= (1 << shift);
}


x86 assembly (clang, -O0):
<set_bit_one>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movslq -0xc(%rbp),%rax
mov    0x2eb6(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x2,%rcx
sub    $0x1,%rcx
cmp    %rcx,%rax
setbe  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_bit_one>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
movslq %esi,%rbx
mov    0x2ebf(%rip),%rax
movslq (%rax),%rax
lea    -0x1(,%rax,4),%rax
ff
xor    %edi,%edi
cmp    %rbx,%rax
setae  %dil
call   1030 <assert@plt>
mov    $0x1,%eax
mov    %ebx,%ecx
shl    %cl,%eax
or     %eax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@CHAR_BIT = global i32 0
define void @set_bit_one(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 = load i32, i32* @CHAR_BIT
%8 = sext i32 %7 to i64
%9 = mul i64 4, %8
%10 = sub i64 %9, 1
%11 = icmp ule i64 %6, %10
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = load i32, i32* %4
%15 = shl i32 1, %14
%16 = load i32*, i32** %3
%17 = load volatile i32, i32* %16
%18 = or i32 %17, %15
store volatile i32 %18, i32* %16
ret void
}

LLVM IR (-O2):
@CHAR_BIT = global i32 0
define void @set_bit_one(i32* %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = load i32, i32* @CHAR_BIT
%5 = sext i32 %4 to i64
%6 = shl nsw i64 %5, 2
%7 = add nsw i64 %6, -1
%8 = icmp uge i64 %7, %3
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
%11 = shl nuw i32 1, %1
%12 = load volatile i32, i32* %0
%13 = or i32 %12, %11
store volatile i32 %13, i32* %0
ret void
}
int empty_fun() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @empty_fun() {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ DES_cblock;

/* Variables and functions */
int /*<<< orphan*/ DES_random_key(int /*<<< orphan*/ *);
scalar_t__ malloc(int);
DES_cblock *genkey() {
  DES_cblock *retval;
  retval = (DES_cblock *)malloc(sizeof(DES_cblock));
  if (retval != NULL) {
    DES_random_key(retval);
  }
  return retval;
}


x86 assembly (clang, -O0):
<genkey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     114a <genkey+0x2a>
mov    -0x8(%rbp),%rdi
call   1030 <DES_random_key@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<genkey>:
push   %rbx
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     113b <genkey+0x1b>
mov    %rbx,%rdi
call   1030 <DES_random_key@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i32* @genkey() {
%1 = alloca i32*
%2 = call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = icmp ne i32* %4, null
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32*, i32** %1
%8 = call i32 @DES_random_key(i32* %7)
br label %9
9: ; preds = %6, %0
%10 = load i32*, i32** %1
ret i32* %10
}

LLVM IR (-O2):
define i32* @genkey() {
%1 = tail call i64 @malloc(i32 4)
%2 = inttoptr i64 %1 to i32*
%3 = icmp eq i64 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 @DES_random_key(i32* %2)
br label %6
6: ; preds = %4, %0
ret i32* %2
}
/* Variables and functions */
unsigned long fls_long(unsigned long);
__attribute__((const)) unsigned long __roundup_pow_of_two(unsigned long n) {
  return 1UL << fls_long(n - 1);
}


x86 assembly (clang, -O0):
<__roundup_pow_of_two>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
sub    $0x1,%rdi
call   1030 <fls_long@plt>
mov    %rax,%rcx
mov    $0x1,%eax
shl    %cl,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__roundup_pow_of_two>:
push   %rax
add    $0xffffffffffffffff,%rdi
call   1030 <fls_long@plt>
mov    $0x1,%edx
mov    %eax,%ecx
shl    %cl,%rdx
mov    %rdx,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @__roundup_pow_of_two(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sub i64 %3, 1
%5 = call i64 @fls_long(i64 %4)
%6 = shl i64 1, %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @__roundup_pow_of_two(i64 %0) {
%2 = add i64 %0, -1
%3 = tail call i64 @fls_long(i64 %2)
%4 = shl nuw i64 1, %3
ret i64 %4
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void displayDashes(uint8_t *buf) {
  buf[0] = 0x40;
  buf[1] = 0x40;
  buf[2] = 0x40;
  buf[3] = 0x40;
}


x86 assembly (clang, -O0):
<displayDashes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x40,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x40,0x4(%rax)
mov    -0x8(%rbp),%rax
movl   $0x40,0x8(%rax)
mov    -0x8(%rbp),%rax
movl   $0x40,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<displayDashes>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @displayDashes(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
store i32 64, i32* %4
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 1
store i32 64, i32* %6
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 2
store i32 64, i32* %8
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 3
store i32 64, i32* %10
ret void
}

LLVM IR (-O2):
define void @displayDashes(i32* nocapture writeonly %0) {
%2 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> <i32 64, i32 64, i32 64, i32 64>, <4 x i32>* %2
ret void
}
void my_swap(int *a, int *b) {
  int tmp;
  tmp = *a;
  *a = *b;
  *b = tmp;
}


x86 assembly (clang, -O0):
<my_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):
<my_swap>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @my_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 @my_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 */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ u64_to_le(int /*<<< orphan*/, int /*<<< orphan*/ *);
void double_to_le(double val, uint8_t *buf) {
  union {
    uint64_t u;
    double f;
  } convert;
  convert.f = val;
  u64_to_le(convert.u, buf);
}


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

x86 assembly (clang, -O2):
<double_to_le>:
mov    %rdi,%rsi
movq   %xmm0,%rdi
jmp    1030 <u64_to_le@plt>

LLVM IR (-O0):
%union.anon = type { double }
define void @double_to_le(double %0, i32* %1) {
%3 = alloca double
%4 = alloca i32*
%5 = alloca %union.anon
store double %0, double* %3
store i32* %1, i32** %4
%6 = load double, double* %3
%7 = bitcast %union.anon* %5 to double*
store double %6, double* %7
%8 = bitcast %union.anon* %5 to i32*
%9 = load i32, i32* %8
%10 = load i32*, i32** %4
%11 = call i32 @u64_to_le(i32 %9, i32* %10)
ret void
}

LLVM IR (-O2):
define void @double_to_le(double %0, i32* %1) {
%3 = bitcast double %0 to i64
%4 = trunc i64 %3 to i32
%5 = tail call i32 @u64_to_le(i32 %4, i32* %1)
ret void
}
int f3(int x, unsigned int y) { return x & ((1 << y) - 1); }


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
sub    $0x1,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
mov    %esi,%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
not    %eax
and    %edi,%eax
ret

LLVM IR (-O0):
define i32 @f3(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 = shl i32 1, %6
%8 = sub nsw i32 %7, 1
%9 = and i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @f3(i32 %0, i32 %1) {
%3 = shl nsw i32 -1, %1
%4 = xor i32 %3, -1
%5 = and i32 %4, %0
ret i32 %5
}
void print_book(char ****book) {
  int i;
  for (i = 0; *(book + i) != '\0'; i++) {
    print_chap(*(book + i));
  }
}


x86 assembly (clang, -O0):
<print_book>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1157 <print_book+0x47>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    $0x0,%al
call   1030 <print_chap@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <print_book+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_book>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1133 <print_book+0x23>
add    $0x8,%rbx
xor    %eax,%eax
call   1030 <print_chap@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1120 <print_book+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @print_book(i8**** nocapture %0) {
%2 = load i8***, i8**** %0
%3 = icmp eq i8*** %2, null
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8*** [ %10, %4 ], [ %2, %1 ]
%7 = tail call i32 (i8***, ...) bitcast (i32 (...)* @print_chap to i32 (i8***, ...)*)(i8*** %6)
%8 = add nuw i64 %5, 1
%9 = getelementptr inbounds i8***, i8**** %0, i64 %8
%10 = load i8***, i8**** %9
%11 = icmp eq i8*** %10, null
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ scriptExecFile(char *);
char *utilExpandPath(char *);
void consoleCmdSource(char *path) {
  path = utilExpandPath(path);
  scriptExecFile(path);
}


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

x86 assembly (clang, -O2):
<consoleCmdSource>:
push   %rax
call   1040 <utilExpandPath@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <scriptExecFile@plt>

LLVM IR (-O0):
define void @consoleCmdSource(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @utilExpandPath(i8* %3)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @scriptExecFile(i8* %5)
ret void
}

LLVM IR (-O2):
define void @consoleCmdSource(i8* %0) {
%2 = tail call i8* @utilExpandPath(i8* %0)
%3 = tail call i32 @scriptExecFile(i8* %2)
ret void
}
void RGBAToUVRow_Any_SSSE3() {}


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

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

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

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

/* Variables and functions */
int float_to_uint32(float value) {
  union {
    uint32_t iv;
    float val;
  } a;
  a.val = value;
  return a.iv;
}


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

x86 assembly (clang, -O2):
<float_to_uint32>:
movd   %xmm0,%eax
ret

LLVM IR (-O0):
%union.anon = type { i32 }
define i32 @float_to_uint32(float %0) {
%2 = alloca float
%3 = alloca %union.anon
store float %0, float* %2
%4 = load float, float* %2
%5 = bitcast %union.anon* %3 to float*
store float %4, float* %5
%6 = bitcast %union.anon* %3 to i32*
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @float_to_uint32(float %0) {
%2 = bitcast float %0 to i32
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_histogram_row(const char *name, int frequency) {
  printf("%-10s: ", name);
  for (int i = 0; i < frequency; ++i) {
    printf("*");
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print_histogram_row>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1160 <print_histogram_row+0x50>
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1138 <print_histogram_row+0x28>
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_histogram_row>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rsi
lea    0xed3(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
test   %ebx,%ebx
jle    114f <print_histogram_row+0x2f>
nopl   0x0(%rax,%rax,1)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1140 <print_histogram_row+0x20>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"%-10s: \00"
define void @print_histogram_row(i8* %0, i32 %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = icmp sgt i32 %1, 0
br i1 %4, label %7, label %5
5: ; preds = %7, %2
%6 = tail call i32 @putchar(i32 10)
ret void
7: ; preds = %2, %7
%8 = phi i32 [ %10, %7 ], [ 0, %2 ]
%9 = tail call i32 @putchar(i32 42)
%10 = add nuw nsw i32 %8, 1
%11 = icmp eq i32 %10, %1
br i1 %11, label %5, label %7
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, size_t, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
char *strchr(char *, char);
void get_line(char *buf, size_t size) {
  char *nl;
  fgets(buf, size, stdin);
  nl = strchr(buf, '\n');
  if (nl != NULL)
    *nl = 0;
}


x86 assembly (clang, -O0):
<get_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2ea9(%rip),%rax
mov    (%rax),%edx
call   1040 <fgets@plt>
mov    -0x8(%rbp),%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     116a <get_line+0x4a>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_line>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ebd(%rip),%rax
mov    (%rax),%edx
call   1040 <fgets@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1147 <get_line+0x27>
movb   $0x0,(%rax)
pop    %rbx
ret

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

LLVM IR (-O2):
@stdin = global i32 0
define void @get_line(i8* %0, i64 %1) {
%3 = load i32, i32* @stdin
%4 = tail call i32 @fgets(i8* %0, i64 %1, i32 %3)
%5 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 10)
%6 = icmp eq i8* %5, null
br i1 %6, label %8, label %7
7: ; preds = %2
store i8 0, i8* %5
br label %8
8: ; preds = %7, %2
ret void
}
void sme_event_assoc_reject(struct wpa_supplicant *wpa_s,
                            union wpa_event_data *data) {}


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

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

LLVM IR (-O0):
%struct.wpa_supplicant = type opaque
%union.wpa_event_data = type opaque
define void @sme_event_assoc_reject(%struct.wpa_supplicant* %0, %union.wpa_event_data* %1) {
%3 = alloca %struct.wpa_supplicant*
%4 = alloca %union.wpa_event_data*
store %struct.wpa_supplicant* %0, %struct.wpa_supplicant** %3
store %union.wpa_event_data* %1, %union.wpa_event_data** %4
ret void
}

LLVM IR (-O2):
%struct.wpa_supplicant = type opaque
%union.wpa_event_data = type opaque
define void @sme_event_assoc_reject(%struct.wpa_supplicant* nocapture %0, %union.wpa_event_data* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ quicksort(void *, size_t, int /*<<< orphan*/, size_t,
                             int (*)(void const *, void const *));
void qsort(void *base, size_t nmemb, size_t size,
           int (*compar)(const void *, const void *)) {
  if (nmemb >= (((size_t)-1) >> 1) || size >= (((size_t)-1) >> 1))
    return;
  if (nmemb > 1)
    quicksort(base, size, 0, nmemb - 1, compar);
}


x86 assembly (clang, -O0):
<qsort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movabs $0x7fffffffffffffff,%rax
ff ff 7f
cmp    %rax,-0x10(%rbp)
jae    1150 <qsort+0x40>
movabs $0x7fffffffffffffff,%rax
ff ff 7f
cmp    %rax,-0x18(%rbp)
jb     1155 <qsort+0x45>
jmp    117b <qsort+0x6b>
cmpq   $0x1,-0x10(%rbp)
jbe    117b <qsort+0x6b>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
mov    -0x20(%rbp),%r8
xor    %edx,%edx
call   1030 <quicksort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qsort>:
mov    %rcx,%r8
mov    %rsi,%rcx
movabs $0x7ffffffffffffffd,%rax
ff ff 7f
add    $0xfffffffffffffffe,%rsi
cmp    %rax,%rsi
jae    1140 <qsort+0x30>
or     $0x2,%rax
cmp    %rax,%rdx
jae    1140 <qsort+0x30>
add    $0xffffffffffffffff,%rcx
mov    %rdx,%rsi
xor    %edx,%edx
jmp    1030 <quicksort@plt>
ret

LLVM IR (-O0):
define void @qsort(i8* %0, i64 %1, i64 %2, i32 (i8*, i8*)* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32 (i8*, i8*)*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32 (i8*, i8*)* %3, i32 (i8*, i8*)** %8
%9 = load i64, i64* %6
%10 = icmp uge i64 %9, 9223372036854775807
br i1 %10, label %14, label %11
11: ; preds = %4
%12 = load i64, i64* %7
%13 = icmp uge i64 %12, 9223372036854775807
br i1 %13, label %14, label %15
14: ; preds = %11, %4
br label %25
15: ; preds = %11
%16 = load i64, i64* %6
%17 = icmp ugt i64 %16, 1
br i1 %17, label %18, label %25
18: ; preds = %15
%19 = load i8*, i8** %5
%20 = load i64, i64* %7
%21 = load i64, i64* %6
%22 = sub i64 %21, 1
%23 = load i32 (i8*, i8*)*, i32 (i8*, i8*)** %8
%24 = call i32 @quicksort(i8* %19, i64 %20, i32 0, i64 %22, i32 (i8*, i8*)* %23)
br label %25
25: ; preds = %14, %18, %15
ret void
}

LLVM IR (-O2):
define void @qsort(i8* %0, i64 %1, i64 %2, i32 (i8*, i8*)* %3) {
%5 = icmp ult i64 %2, 9223372036854775807
%6 = add i64 %1, -2
%7 = icmp ult i64 %6, 9223372036854775805
%8 = and i1 %7, %5
br i1 %8, label %9, label %12
9: ; preds = %4
%10 = add nsw i64 %1, -1
%11 = tail call i32 @quicksort(i8* %0, i64 %2, i32 0, i64 %10, i32 (i8*, i8*)* %3)
br label %12
12: ; preds = %4, %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void sserv_debug(size_t received, size_t written) {
  printf("%lu bytes received.\n", received);
  printf("%lu bytes written.\n", written);
  printf("---\n");
}


x86 assembly (clang, -O0):
<sserv_debug>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sserv_debug>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rsi
lea    0xed2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed9(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xedc(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"%lu bytes received.\0A\00"
@.str.1 = [20 x i8] c"%lu bytes written.\0A\00"
@.str.2 = [5 x i8] c"---\0A\00"
define void @sserv_debug(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i64 %5)
%7 = load i64, i64* %4
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i64 %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"%lu bytes received.\0A\00"
@.str.1 = [20 x i8] c"%lu bytes written.\0A\00"
@str = [4 x i8] c"---\00"
define void @sserv_debug(i64 %0, i64 %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i64 %0)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i64 %1)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct rw_semaphore {
  int dummy;
};

/* Variables and functions */
int __down_read_trylock(struct rw_semaphore *);
__attribute__((always_)) int down_read_trylock(struct rw_semaphore *sem) {
  int ret;
  ;
  ret = __down_read_trylock(sem);
  ;
  return ret;
}


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

x86 assembly (clang, -O2):
<down_read_trylock>:
jmp    1030 <__down_read_trylock@plt>

LLVM IR (-O0):
%struct.rw_semaphore = type { i32 }
define i32 @down_read_trylock(%struct.rw_semaphore* %0) {
%2 = alloca %struct.rw_semaphore*
%3 = alloca i32
store %struct.rw_semaphore* %0, %struct.rw_semaphore** %2
%4 = load %struct.rw_semaphore*, %struct.rw_semaphore** %2
%5 = call i32 @__down_read_trylock(%struct.rw_semaphore* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
%struct.rw_semaphore = type { i32 }
define i32 @down_read_trylock(%struct.rw_semaphore* %0) {
%2 = tail call i32 @__down_read_trylock(%struct.rw_semaphore* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: "
                  "imagedump options <image filename> ...\n"
                  " -v              Print version info and exit\n"
                  " -q              Perform a quick check to see if file has\n"
                  "                 an imagezip header; exit non-zero if not\n"
                  " -d              Turn on progressive levels of detail\n"
                  " -c              Verify chunk checksums\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [302 x i8] c"usage: imagedump options <image filename> ...\0A -v Print version info and exit\0A -q Perform a quick check to see if file has\0A an imagezip header; exit non-zero if not\0A -d Turn on progressive levels of detail\0A -c Verify chunk checksums\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([302 x i8], [302 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [302 x i8] c"usage: imagedump options <image filename> ...\0A -v Print version info and exit\0A -q Perform a quick check to see if file has\0A an imagezip header; exit non-zero if not\0A -d Turn on progressive levels of detail\0A -c Verify chunk checksums\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([302 x i8], [302 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ yylex();
main() { yylex(); }


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <yylex@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @yylex()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @yylex()
ret i32 0
}
/* Variables and functions */
long long sqrt(long long);
int isSquare(long long n) {
  long long c, ans;
  c = sqrt(n);
  ans = c * c;
  if (ans == n)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<isSquare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <sqrt@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
imul   -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    1150 <isSquare+0x40>
movl   $0x0,-0x4(%rbp)
jmp    1157 <isSquare+0x47>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isSquare>:
push   %rbx
mov    %rdi,%rbx
call   1030 <sqrt@plt>
imul   %rax,%rax
xor    %ecx,%ecx
cmp    %rbx,%rax
setne  %cl
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @isSquare(i64 %0) {
%2 = tail call i64 @sqrt(i64 %0)
%3 = mul nsw i64 %2, %2
%4 = icmp ne i64 %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
float nthRan4(unsigned long);
int /*<<< orphan*/ seedRan4(unsigned long *);
float seededNthRan4(unsigned long seed, unsigned long n) {
  unsigned long l = seed;
  seedRan4(&l);
  return (nthRan4(n));
}


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

x86 assembly (clang, -O2):
<seededNthRan4>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    %rdi,0x8(%rsp)
lea    0x8(%rsp),%rdi
call   1030 <seedRan4@plt>
mov    %rbx,%rdi
call   1040 <nthRan4@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define float @seededNthRan4(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
store i64 %6, i64* %5
%7 = call i32 @seedRan4(i64* %5)
%8 = load i64, i64* %4
%9 = call float @nthRan4(i64 %8)
ret float %9
}

LLVM IR (-O2):
define float @seededNthRan4(i64 %0, i64 %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
store i64 %0, i64* %3
%5 = call i32 @seedRan4(i64* %3)
%6 = call float @nthRan4(i64 %1)
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void usage(char *name) {
  fprintf(stderr, "usage: %s <image-filename>\n", name);
  fprintf(stderr, "\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
lea    0xed3(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rbx
mov    (%rbx),%edi
lea    0xedc(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xee6(%rip),%rsi
xor    %eax,%eax
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [28 x i8] c"usage: %s <image-filename>\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [28 x i8] c"usage: %s <image-filename>\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ LINES;
int /*<<< orphan*/ addstr(char const *);
int /*<<< orphan*/ gui_clrtoeol();
int /*<<< orphan*/ move(scalar_t__, int /*<<< orphan*/);
void gui_printprompt(const char *p) {
  move(LINES - 1, 0);
  gui_clrtoeol();
  addstr(p);
}


x86 assembly (clang, -O0):
<gui_printprompt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%rdi
sub    $0x1,%rdi
xor    %esi,%esi
call   1050 <move@plt>
mov    $0x0,%al
call   1030 <gui_clrtoeol@plt>
mov    -0x8(%rbp),%rdi
call   1040 <addstr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gui_printprompt>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ead(%rip),%rax
mov    (%rax),%rdi
add    $0xffffffffffffffff,%rdi
xor    %esi,%esi
call   1050 <move@plt>
xor    %eax,%eax
call   1030 <gui_clrtoeol@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <addstr@plt>

LLVM IR (-O0):
@LINES = global i64 0
define void @gui_printprompt(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i64, i64* @LINES
%4 = sub nsw i64 %3, 1
%5 = call i32 @move(i64 %4, i32 0)
%6 = call i32 (...) @gui_clrtoeol()
%7 = load i8*, i8** %2
%8 = call i32 @addstr(i8* %7)
ret void
}

LLVM IR (-O2):
@LINES = global i64 0
define void @gui_printprompt(i8* %0) {
%2 = load i64, i64* @LINES
%3 = add nsw i64 %2, -1
%4 = tail call i32 @move(i64 %3, i32 0)
%5 = tail call i32 (...) @gui_clrtoeol()
%6 = tail call i32 @addstr(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *version() {
  printf("Version: %s\n", "1.0");
  return "1.0";
}


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

x86 assembly (clang, -O2):
<version>:
push   %rbx
lea    0xee8(%rip),%rdi
lea    0xeee(%rip),%rbx
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Version: %s\0A\00"
@.str.1 = [4 x i8] c"1.0\00"
define i8* @version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [13 x i8] c"Version: %s\0A\00"
@.str.1 = [4 x i8] c"1.0\00"
define i8* @version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
}
/* Variables and functions */
void *calloc(int, int);
void *ptr_malloc(int size) { return calloc(1, size); }


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

x86 assembly (clang, -O2):
<ptr_malloc>:
mov    %edi,%esi
mov    $0x1,%edi
jmp    1030 <calloc@plt>

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

LLVM IR (-O2):
define noalias i8* @ptr_malloc(i32 %0) {
%2 = tail call i8* @calloc(i32 1, i32 %0)
ret i8* %2
}
int ValArrayDefaultCompareFn(const void *pleft, const void *pright) {
  const long long *left = pleft, *right = pright;
  return *left < *right ? -1 : (*left > *right ? 1 : 0);
}


x86 assembly (clang, -O0):
<ValArrayDefaultCompareFn>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    -0x20(%rbp),%rcx
cmp    (%rcx),%rax
jge    113d <ValArrayDefaultCompareFn+0x3d>
mov    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
jmp    115b <ValArrayDefaultCompareFn+0x5b>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdx
mov    -0x20(%rbp),%rax
mov    (%rax),%rsi
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %rsi,%rdx
cmovg  %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @ValArrayDefaultCompareFn(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = bitcast i8* %1 to i64*
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp slt i64 %5, %6
%8 = icmp sgt i64 %5, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ yylex();
int main(int argc, char *argv[]) {
  yylex();
  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    $0x0,%al
call   1030 <yylex@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <yylex@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @yylex()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @yylex()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int __infer_nondet_int();
int pthread_mutex_lock(pthread_mutex_t *mutex) {
  if (mutex == 0)
    while (1)
      ;
  return __infer_nondet_int();
}


x86 assembly (clang, -O0):
<pthread_mutex_lock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1131 <pthread_mutex_lock+0x21>
jmp    112c <pthread_mutex_lock+0x1c>
jmp    112c <pthread_mutex_lock+0x1c>
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_mutex_lock>:
test   %rdi,%rdi
je     1120 <pthread_mutex_lock+0x10>
xor    %eax,%eax
jmp    1030 <__infer_nondet_int@plt>
nopl   0x0(%rax)
jmp    1120 <pthread_mutex_lock+0x10>

LLVM IR (-O0):
define i32 @pthread_mutex_lock(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
br label %6
6: ; preds = %5, %6
br label %6
7: ; preds = %1
%8 = call i32 (...) @__infer_nondet_int()
ret i32 %8
}

LLVM IR (-O2):
define i32 @pthread_mutex_lock(i32* readnone %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %3, label %4
3: ; preds = %1, %3
br label %3
4: ; preds = %1
%5 = tail call i32 (...) @__infer_nondet_int()
ret i32 %5
}
__attribute__((noipa, optimize("Ofast"))) int f6(float x) {
  return __builtin_sqrtf(x) < 0x1.4da1cp-19f;
}


x86 assembly (clang, -O0):
<f6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <sqrtf@plt>
movaps %xmm0,%xmm1
movss  0xece(%rip),%xmm0
ucomiss %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f6>:
push   %rax
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     111f <f6+0xf>
sqrtss %xmm0,%xmm0
jmp    1124 <f6+0x14>
call   1030 <sqrtf@plt>
movss  0xed4(%rip),%xmm1
xor    %eax,%eax
ucomiss %xmm0,%xmm1
seta   %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @f6(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @sqrtf(float %3)
%5 = fcmp olt float %4, 0x3EC4DA1C00000000
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @f6(float %0) {
%2 = tail call float @sqrtf(float %0)
%3 = fcmp olt float %2, 0x3EC4DA1C00000000
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ shim_enosys(int /*<<< orphan*/, unsigned int *, unsigned int *,
                       void *);
long shim_getcpu(unsigned *cpu, unsigned *node, void *tcache) {
  return (long)shim_enosys(0, cpu, node, tcache);
}


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

x86 assembly (clang, -O2):
<shim_getcpu>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <shim_enosys@plt>

LLVM IR (-O0):
define i64 @shim_getcpu(i32* %0, i32* %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i8*
store i32* %0, i32** %4
store i32* %1, i32** %5
store i8* %2, i8** %6
%7 = load i32*, i32** %4
%8 = load i32*, i32** %5
%9 = load i8*, i8** %6
%10 = call i64 @shim_enosys(i32 0, i32* %7, i32* %8, i8* %9)
ret i64 %10
}

LLVM IR (-O2):
define i64 @shim_getcpu(i32* %0, i32* %1, i8* %2) {
%4 = tail call i64 @shim_enosys(i32 0, i32* %0, i32* %1, i8* %2)
ret i64 %4
}
int Bematech_FI_ContadorSequencial(Var, Retorno) {
  return Formata("\x1b|35|06|\x1b", Var, Retorno);
}


x86 assembly (clang, -O0):
<Bematech_FI_ContadorSequencial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <Formata@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Bematech_FI_ContadorSequencial>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
xor    %eax,%eax
jmp    1030 <Formata@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"\1B|35|06|\1B\00"
define i32 @Bematech_FI_ContadorSequencial(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 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @Formata to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
@.str = [10 x i8] c"\1B|35|06|\1B\00"
define i32 @Bematech_FI_ContadorSequencial(i32 %0, i32 %1) {
%3 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @Formata to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret i32 %3
}
void g_cclosure_marshal_VOID__CHAR() {}


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

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

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

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