xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ load_operators(char *);
int /*<<< orphan*/ parse_file(char *);
int /*<<< orphan*/ usage();
int main(int argc, char **argv) {
  if (argc != 3) {
    usage();
    return -1;
  }
  load_operators(argv[1]);
  parse_file(argv[2]);
}


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)
cmpl   $0x3,-0x8(%rbp)
je     1163 <main+0x33>
mov    $0x0,%al
call   1040 <usage@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    117d <main+0x4d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <load_operators@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1050 <parse_file@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x3,%edi
jne    114f <main+0x1f>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1030 <load_operators@plt>
mov    0x10(%rbx),%rdi
call   1050 <parse_file@plt>
xor    %eax,%eax
pop    %rbx
ret
xor    %eax,%eax
call   1040 <usage@plt>
mov    $0xffffffff,%eax
pop    %rbx
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 = load i32, i32* %4
%7 = icmp ne i32 %6, 3
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 (...) @usage()
store i32 -1, i32* %3
br label %19
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @load_operators(i8* %13)
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 2
%17 = load i8*, i8** %16
%18 = call i32 @parse_file(i8* %17)
br label %19
19: ; preds = %10, %8
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 (...) @usage()
br label %13
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 @load_operators(i8* %8)
%10 = getelementptr inbounds i8*, i8** %1, i64 2
%11 = load i8*, i8** %10
%12 = tail call i32 @parse_file(i8* %11)
br label %13
13: ; preds = %6, %4
%14 = phi i32 [ -1, %4 ], [ 0, %6 ]
ret i32 %14
}
/* Type definitions */
typedef int uint32_t;
typedef int uint16_t;

/* Variables and functions */
void UARTTxIntModeSet(uint32_t ui32Base, uint32_t ui32Mode) {
  ;

  ;
  (*((volatile uint16_t *)(ui32Base + 0xA))) =
      (((*((volatile uint32_t *)(ui32Base + 0xA))) & ~(0x0000001F)) | ui32Mode);
}


x86 assembly (clang, -O0):
<UARTTxIntModeSet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0xa,%eax
cltq
mov    (%rax),%ecx
and    $0xffffffe0,%ecx
or     -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    $0xa,%eax
cltq
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTTxIntModeSet>:
movslq %edi,%rax
mov    0xa(%rax),%ecx
and    $0xffffffe0,%ecx
or     %esi,%ecx
mov    %ecx,0xa(%rax)
ret

LLVM IR (-O0):
define void @UARTTxIntModeSet(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 = add nsw i32 %5, 10
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
%9 = load volatile i32, i32* %8
%10 = and i32 %9, -32
%11 = load i32, i32* %4
%12 = or i32 %10, %11
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 10
%15 = sext i32 %14 to i64
%16 = inttoptr i64 %15 to i32*
store volatile i32 %12, i32* %16
ret void
}

LLVM IR (-O2):
define void @UARTTxIntModeSet(i32 %0, i32 %1) {
%3 = add nsw i32 %0, 10
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
%7 = and i32 %6, -32
%8 = or i32 %7, %1
store volatile i32 %8, i32* %5
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int /*<<< orphan*/ abort_report(char *, ...);
int open(char const *, int /*<<< orphan*/);
int fifo_open(const char *path, mode_t mode) {
  int fd;
  if ((fd = open(path, mode)) < 0)
    (1 == 1) ? abort_report("daemon: Could not open fifo", "")
             : abort_report("daemon: Could not open fifo");
  return fd;
}


x86 assembly (clang, -O0):
<fifo_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <open@plt>
mov    %eax,-0x10(%rbp)
cmp    $0x0,%eax
jge    115c <fifo_open+0x3c>
lea    0xeb2(%rip),%rdi
lea    0xec6(%rip),%rsi
mov    $0x0,%al
call   1030 <abort_report@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fifo_open>:
push   %rbx
call   1040 <open@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    1141 <fifo_open+0x21>
lea    0xecd(%rip),%rdi
lea    0xee1(%rip),%rsi
xor    %eax,%eax
call   1030 <abort_report@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"daemon: Could not open fifo\00"
@.str.1 = [1 x i8] zeroinitializer
define i32 @fifo_open(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 = load i32, i32* %4
%8 = call i32 @open(i8* %6, i32 %7)
store i32 %8, i32* %5
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 (i8*, ...) @abort_report(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %10, %2
%13 = load i32, i32* %5
ret i32 %13
}

LLVM IR (-O2):
@.str = [28 x i8] c"daemon: Could not open fifo\00"
@.str.1 = [1 x i8] zeroinitializer
define i32 @fifo_open(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @open(i8* %0, i32 %1)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (i8*, ...) @abort_report(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret i32 %3
}
void s2e_codext_init_lua() {
  __asm__ __volatile__(".byte 0x0f, 0x3f\n"
                       ".byte 0x00, 0xFA, 0x08, 0x00\n"
                       ".byte 0x00, 0x00, 0x00, 0x00\n");
}


x86 assembly (clang, -O0):
<s2e_codext_init_lua>:
push   %rbp
mov    %rsp,%rbp
(bad)
add    %bh,%dl
or     %al,(%rax)
add    %al,(%rax)
add    %al,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<s2e_codext_init_lua>:
(bad)
add    %bh,%dl
or     %al,(%rax)
add    %al,(%rax)
add    %al,(%rax)
ret

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

LLVM IR (-O2):
define void @s2e_codext_init_lua() {
tail call void asm sideeffect ".byte 0x0f, 0x3f\0A.byte 0x00, 0xFA, 0x08, 0x00\0A.byte 0x00, 0x00, 0x00, 0x00\0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
unsigned int vcmpgeu4(unsigned int, unsigned int);
unsigned int vmaxu4(unsigned int a, unsigned int b) {
  unsigned int r, s;
  s = vcmpgeu4(a, b);
  r = a & s;
  s = b & ~s;
  r = r | s;
  return r;
}


x86 assembly (clang, -O0):
<vmaxu4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <vcmpgeu4@plt>
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
or     -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vmaxu4>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <vcmpgeu4@plt>
xor    %ebx,%ebp
and    %ebp,%eax
xor    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @vmaxu4(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = call i32 @vcmpgeu4(i32 %7, i32 %8)
store i32 %9, i32* %6
%10 = load i32, i32* %3
%11 = load i32, i32* %6
%12 = and i32 %10, %11
store i32 %12, i32* %5
%13 = load i32, i32* %4
%14 = load i32, i32* %6
%15 = xor i32 %14, -1
%16 = and i32 %13, %15
store i32 %16, i32* %6
%17 = load i32, i32* %5
%18 = load i32, i32* %6
%19 = or i32 %17, %18
store i32 %19, i32* %5
%20 = load i32, i32* %5
ret i32 %20
}

LLVM IR (-O2):
define i32 @vmaxu4(i32 %0, i32 %1) {
%3 = tail call i32 @vcmpgeu4(i32 %0, i32 %1)
%4 = and i32 %3, %0
%5 = xor i32 %3, -1
%6 = and i32 %5, %1
%7 = or i32 %4, %6
ret i32 %7
}
/* Type definitions */
typedef scalar_t__ __x;
typedef int __u32;

/* Variables and functions */
__u32 __fswahw32(__u32 x) {
  return ({
    __u32 __x = (x);
    ((__u32)((((__u32)(__x) & (__u32)0x0000ffffUL) << 16) |
             (((__u32)(__x) & (__u32)0xffff0000UL) >> 16)));
  });
}


x86 assembly (clang, -O0):
<__fswahw32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xffff,%eax
shl    $0x10,%eax
mov    -0x8(%rbp),%ecx
and    $0xffff0000,%ecx
sar    $0x10,%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__fswahw32>:
mov    %edi,%eax
shl    $0x10,%eax
sar    $0x10,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @__fswahw32(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = and i32 %6, 65535
%8 = shl i32 %7, 16
%9 = load i32, i32* %3
%10 = and i32 %9, -65536
%11 = ashr i32 %10, 16
%12 = or i32 %8, %11
store i32 %12, i32* %4
%13 = load i32, i32* %4
ret i32 %13
}

LLVM IR (-O2):
define i32 @__fswahw32(i32 %0) {
%2 = shl i32 %0, 16
%3 = ashr i32 %0, 16
%4 = or i32 %2, %3
ret i32 %4
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ bits_per_pixel;
};
typedef TYPE_1__ XImage;

/* Variables and functions */
int get_XImage_bits_per_pixel(void *_p) {
  return (int)((XImage *)_p)->bits_per_pixel;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XImage_bits_per_pixel(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XImage_bits_per_pixel(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ load_bank(char *, int);
void load_banks(void) {
  load_bank("../bank1.bin", 0);
  load_bank("../bank2.bin", 0x4000);
  load_bank("../bank3.bin", 0x8000);
  load_bank("../bank4.bin", 0xC000);
}


x86 assembly (clang, -O0):
<load_banks>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
xor    %esi,%esi
call   1030 <load_bank@plt>
lea    0xee4(%rip),%rdi
mov    $0x4000,%esi
call   1030 <load_bank@plt>
lea    0xee0(%rip),%rdi
mov    $0x8000,%esi
call   1030 <load_bank@plt>
lea    0xedc(%rip),%rdi
mov    $0xc000,%esi
call   1030 <load_bank@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_banks>:
push   %rax
lea    0xee8(%rip),%rdi
xor    %esi,%esi
call   1030 <load_bank@plt>
lea    0xee7(%rip),%rdi
mov    $0x4000,%esi
call   1030 <load_bank@plt>
lea    0xee3(%rip),%rdi
mov    $0x8000,%esi
call   1030 <load_bank@plt>
lea    0xedf(%rip),%rdi
mov    $0xc000,%esi
pop    %rax
jmp    1030 <load_bank@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"../bank1.bin\00"
@.str.1 = [13 x i8] c"../bank2.bin\00"
@.str.2 = [13 x i8] c"../bank3.bin\00"
@.str.3 = [13 x i8] c"../bank4.bin\00"
define void @load_banks() {
%1 = call i32 @load_bank(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = call i32 @load_bank(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 16384)
%3 = call i32 @load_bank(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 32768)
%4 = call i32 @load_bank(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 49152)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"../bank1.bin\00"
@.str.1 = [13 x i8] c"../bank2.bin\00"
@.str.2 = [13 x i8] c"../bank3.bin\00"
@.str.3 = [13 x i8] c"../bank4.bin\00"
define void @load_banks() {
%1 = tail call i32 @load_bank(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = tail call i32 @load_bank(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 16384)
%3 = tail call i32 @load_bank(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 32768)
%4 = tail call i32 @load_bank(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 49152)
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t aes_get_preferred_block_size(void) { return 16; }


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

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

LLVM IR (-O0):
define i32 @aes_get_preferred_block_size() {
ret i32 16
}

LLVM IR (-O2):
define i32 @aes_get_preferred_block_size() {
ret i32 16
}
void unInitTempDir(void) {}


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

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

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

LLVM IR (-O2):
define void @unInitTempDir() {
ret void
}
void del_set(a, v) {
  register int jj;
  jj = idx(a, v);
  if (!(jj == 0)) {
    str(a, jj, val(a, len(a)));
    pop(a);
  }
}


x86 assembly (clang, -O0):
<del_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x0,%al
call   1040 <idx@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     11b9 <del_set+0x69>
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1030 <len@plt>
mov    -0x18(%rbp),%edi
mov    %eax,%esi
mov    $0x0,%al
call   1060 <val@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    %eax,%edx
mov    $0x0,%al
call   1070 <str@plt>
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1050 <pop@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<del_set>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <idx@plt>
test   %eax,%eax
je     1192 <del_set+0x42>
mov    %eax,%ebp
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <len@plt>
mov    %ebx,%edi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <val@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1070 <str@plt>
mov    %ebx,%edi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <pop@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @del_set(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* %4
%8 = call i32 (i32, i32, ...) bitcast (i32 (...)* @idx to i32 (i32, i32, ...)*)(i32 %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp eq i32 %9, 0
br i1 %10, label %21, label %11
11: ; preds = %2
%12 = load i32, i32* %3
%13 = load i32, i32* %5
%14 = load i32, i32* %3
%15 = load i32, i32* %3
%16 = call i32 (i32, ...) bitcast (i32 (...)* @len to i32 (i32, ...)*)(i32 %15)
%17 = call i32 (i32, i32, ...) bitcast (i32 (...)* @val to i32 (i32, i32, ...)*)(i32 %14, i32 %16)
%18 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @str to i32 (i32, i32, i32, ...)*)(i32 %12, i32 %13, i32 %17)
%19 = load i32, i32* %3
%20 = call i32 (i32, ...) bitcast (i32 (...)* @pop to i32 (i32, ...)*)(i32 %19)
br label %21
21: ; preds = %11, %2
ret void
}

LLVM IR (-O2):
define void @del_set(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @idx to i32 (i32, i32, ...)*)(i32 %0, i32 %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %2
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @len to i32 (i32, ...)*)(i32 %0)
%7 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @val to i32 (i32, i32, ...)*)(i32 %0, i32 %6)
%8 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @str to i32 (i32, i32, i32, ...)*)(i32 %0, i32 %3, i32 %7)
%9 = tail call i32 (i32, ...) bitcast (i32 (...)* @pop to i32 (i32, ...)*)(i32 %0)
br label %10
10: ; preds = %5, %2
ret void
}
void test_two(int x, int y) {
#pragma omp target teams distribute parallel for
  for (int i = 0; i < x; i++)
    for (int i = 0; i < y; i++)
      ;
}


x86 assembly (clang, -O0):
<test_two>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1156 <test_two+0x56>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1143 <test_two+0x43>
jmp    1135 <test_two+0x35>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1124 <test_two+0x24>
jmp    1148 <test_two+0x48>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1111 <test_two+0x11>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @test_two(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int i = 0;
  scanf("%d", &i);
  printf("i=%d\n", i);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%esi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"i=%d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%3 = load i32, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"i=%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}
void g_str_has_prefix() {}


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

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

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

LLVM IR (-O2):
define void @g_str_has_prefix() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ con_uncol();
int /*<<< orphan*/ io_con_free();
void con_free() {
  con_uncol();
  io_con_free();
}


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

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

LLVM IR (-O0):
define void @con_free() {
%1 = call i32 (...) @con_uncol()
%2 = call i32 (...) @io_con_free()
ret void
}

LLVM IR (-O2):
define void @con_free() {
%1 = tail call i32 (...) @con_uncol()
%2 = tail call i32 (...) @io_con_free()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ puts(char *);
int val(int *x) {
  puts("This is Value==");
  printf("X:%d \n", *x);
  return 0;
}


x86 assembly (clang, -O0):
<val>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <puts@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xecb(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<val>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
mov    (%rbx),%esi
lea    0xed7(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"This is Value==\00"
@.str.1 = [7 x i8] c"X:%d \0A\00"
define i32 @val(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 @puts(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = load i32*, i32** %2
%5 = load i32, i32* %4
%6 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"This is Value==\00"
@.str.1 = [7 x i8] c"X:%d \0A\00"
define i32 @val(i32* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}
double dge(x, y)
double x, y;
{ return ((double)(x >= y)); }


x86 assembly (clang, -O0):
<dge>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dge>:
cmplesd %xmm0,%xmm1
movsd  0xef3(%rip),%xmm0
andpd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @dge(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp oge double %5, %6
%8 = zext i1 %7 to i32
%9 = sitofp i32 %8 to double
ret double %9
}

LLVM IR (-O2):
define double @dge(double %0, double %1) {
%3 = fcmp oge double %0, %1
%4 = uitofp i1 %3 to double
ret double %4
}
void foo(int x) {
  if (x)
    ;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1116 <foo+0x16>
jmp    1116 <foo+0x16>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %6
6: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @foo(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ iexit();
void quit_prog() {
  iexit();
  exit(0);
}


x86 assembly (clang, -O0):
<quit_prog>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <iexit@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<quit_prog>:
push   %rax
xor    %eax,%eax
call   1030 <iexit@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @quit_prog() {
%1 = call i32 (...) @iexit()
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @quit_prog() {
%1 = tail call i32 (...) @iexit()
%2 = tail call i32 @exit(i32 0)
unreachable
}
int test_015(int a, int c, int b, int d) { return (b & 1) + a + d + b; }


x86 assembly (clang, -O0):
<test_015>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    $0x1,%eax
add    -0x4(%rbp),%eax
add    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_015>:
mov    %edx,%eax
and    $0x1,%eax
add    %edi,%eax
add    %edx,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_015(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %7
%10 = and i32 %9, 1
%11 = load i32, i32* %5
%12 = add nsw i32 %10, %11
%13 = load i32, i32* %8
%14 = add nsw i32 %12, %13
%15 = load i32, i32* %7
%16 = add nsw i32 %14, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @test_015(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = and i32 %2, 1
%6 = add i32 %2, %0
%7 = add i32 %6, %5
%8 = add i32 %7, %3
ret i32 %8
}
unsigned tree_sitter_r2cmd_external_scanner_serialize(void *payload,
                                                      char *buffer) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @tree_sitter_r2cmd_external_scanner_serialize(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
unsigned int _check_times(unsigned x, unsigned y) {
  unsigned long long whole_ans =
      ((unsigned long long)x) * ((unsigned long long)y);
  unsigned word_ans = (unsigned)whole_ans;
  if (word_ans < whole_ans || word_ans > (1 << 28))
    (_throw_badalloc_fn("/scratch/repos/new/home/jordi_armengol_estape/"
                        "c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/"
                        "cyclone/refs/heads/master/bin/genfiles/cycdoc.c",
                        284));
  return word_ans;
}


x86 assembly (clang, -O0):
<_check_times>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%rax
jb     114d <_check_times+0x3d>
cmpl   $0x10000000,-0x14(%rbp)
jbe    1160 <_check_times+0x50>
lea    0xeac(%rip),%rdi
mov    $0x11c,%esi
mov    $0x0,%al
call   1030 <_throw_badalloc_fn@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_check_times>:
push   %rbx
mov    %edi,%eax
mul    %esi
mov    %eax,%ebx
jo     1121 <_check_times+0x11>
cmp    $0x10000001,%ebx
jb     1134 <_check_times+0x24>
lea    0xed8(%rip),%rdi
mov    $0x11c,%esi
xor    %eax,%eax
call   1030 <_throw_badalloc_fn@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [147 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/cycdoc.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = mul i64 %8, %10
store i64 %11, i64* %5
%12 = load i64, i64* %5
%13 = trunc i64 %12 to i32
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = zext i32 %14 to i64
%16 = load i64, i64* %5
%17 = icmp ult i64 %15, %16
br i1 %17, label %21, label %18
18: ; preds = %2
%19 = load i32, i32* %6
%20 = icmp ugt i32 %19, 268435456
br i1 %20, label %21, label %23
21: ; preds = %18, %2
%22 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str, i64 0, i64 0), i32 284)
br label %23
23: ; preds = %21, %18
%24 = load i32, i32* %6
ret i32 %24
}

LLVM IR (-O2):
@.str = [147 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/cycdoc.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = tail call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %0, i32 %1)
%4 = extractvalue { i32, i1 } %3, 0
%5 = extractvalue { i32, i1 } %3, 1
%6 = icmp ugt i32 %4, 268435456
%7 = or i1 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str, i64 0, i64 0), i32 284)
br label %10
10: ; preds = %2, %8
ret i32 %4
}
int compare_function(const void *a, const void *b) {
  double *x = (double *)a;
  double *y = (double *)b;
  if (*x < *y) {
    return -1;
  } else if (*x > *y) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<compare_function>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    1142 <compare_function+0x42>
movl   $0xffffffff,-0x4(%rbp)
jmp    1170 <compare_function+0x70>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
ucomisd (%rax),%xmm0
jbe    1164 <compare_function+0x64>
movl   $0x1,-0x4(%rbp)
jmp    1170 <compare_function+0x70>
jmp    1169 <compare_function+0x69>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_function>:
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_function(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*
store double* %9, double** %6
%10 = load i8*, i8** %5
%11 = bitcast i8* %10 to double*
store double* %11, double** %7
%12 = load double*, double** %6
%13 = load double, double* %12
%14 = load double*, double** %7
%15 = load double, double* %14
%16 = fcmp olt double %13, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 -1, i32* %3
br label %27
18: ; preds = %2
%19 = load double*, double** %6
%20 = load double, double* %19
%21 = load double*, double** %7
%22 = load double, double* %21
%23 = fcmp ogt double %20, %22
br i1 %23, label %24, label %25
24: ; preds = %18
store i32 1, i32* %3
br label %27
25: ; preds = %18
br label %26
26: ; preds = %25
store i32 0, i32* %3
br label %27
27: ; preds = %26, %24, %17
%28 = load i32, i32* %3
ret i32 %28
}

LLVM IR (-O2):
define i32 @compare_function(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = bitcast i8* %1 to double*
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp olt double %5, %6
%8 = fcmp ogt double %5, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
int /*<<< orphan*/ NOROM_CPUdelay(int);
void I2CMasterControl(uint32_t ui32Base, uint32_t ui32Cmd) {
  ;

  ;
  (*((volatile unsigned long *)(0x40002000 + 0x00000804))) = ui32Cmd;
  NOROM_CPUdelay(2);
}


x86 assembly (clang, -O0):
<I2CMasterControl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    $0x40002804,%eax
mov    %rcx,(%rax)
mov    $0x2,%edi
call   1030 <NOROM_CPUdelay@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CMasterControl>:
mov    %rsi,0x40002804
40
mov    $0x2,%edi
jmp    1030 <NOROM_CPUdelay@plt>

LLVM IR (-O0):
define void @I2CMasterControl(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
store volatile i64 %5, i64* inttoptr (i64 1073752068 to i64*)
%6 = call i32 @NOROM_CPUdelay(i32 2)
ret void
}

LLVM IR (-O2):
define void @I2CMasterControl(i64 %0, i64 %1) {
store volatile i64 %1, i64* inttoptr (i64 1073752068 to i64*)
%3 = tail call i32 @NOROM_CPUdelay(i32 2)
ret void
}
int test_imm_8Cint8_mem(signed char *val) {
  return ((*val) & (0x8C << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_8Cint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0x8c,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_8Cint8_mem>:
testb  $0x8c,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_8Cint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -116
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int find_annexb(char *buf, int size) {}


x86 assembly (clang, -O0):
<find_annexb>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @find_annexb(i8* nocapture readnone %0, i32 %1) {
ret i32 undef
}
void initv(double *r, const double x) {
  r[0] = x;
  r[1] = x;
  r[2] = x;
}


x86 assembly (clang, -O0):
<initv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<initv>:
movsd  %xmm0,(%rdi)
movsd  %xmm0,0x8(%rdi)
movsd  %xmm0,0x10(%rdi)
ret

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

LLVM IR (-O2):
define void @initv(double* nocapture writeonly %0, double %1) {
store double %1, double* %0
%3 = getelementptr inbounds double, double* %0, i64 1
store double %1, double* %3
%4 = getelementptr inbounds double, double* %0, i64 2
store double %1, double* %4
ret void
}
int sorted_order(int a, int b) { return a - b > 0; }


x86 assembly (clang, -O0):
<sorted_order>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
cmp    $0x0,%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sorted_order>:
xor    %eax,%eax
cmp    %esi,%edi
setg   %al
ret

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

LLVM IR (-O2):
define i32 @sorted_order(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
void gevent_noop(struct ev_loop *_loop, void *watcher, int revents) {}


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

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

LLVM IR (-O0):
%struct.ev_loop = type opaque
define void @gevent_noop(%struct.ev_loop* %0, i8* %1, i32 %2) {
%4 = alloca %struct.ev_loop*
%5 = alloca i8*
%6 = alloca i32
store %struct.ev_loop* %0, %struct.ev_loop** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
%struct.ev_loop = type opaque
define void @gevent_noop(%struct.ev_loop* nocapture %0, i8* nocapture %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vit216(long *, unsigned char *, unsigned char *,
                          unsigned int, int **, int /*<<< orphan*/,
                          int /*<<< orphan*/);
void vit216_(unsigned char symbols[], unsigned int *Nbits, int mettab[2][256],
             unsigned char ddec[], long *Metric) {
  long metric;
  vit216(&metric, ddec, symbols, *Nbits, mettab, 0, 0);
  *Metric = metric;
}


x86 assembly (clang, -O0):
<vit216_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x20(%rbp),%rsi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%r8
lea    -0x30(%rbp),%rdi
xor    %r9d,%r9d
movl   $0x0,(%rsp)
call   1030 <vit216@plt>
mov    -0x30(%rbp),%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,(%rax)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vit216_>:
push   %rbx
sub    $0x10,%rsp
mov    %r8,%rbx
mov    %rdx,%r8
mov    %rdi,%rdx
mov    (%rsi),%eax
movl   $0x0,(%rsp)
lea    0x8(%rsp),%rdi
mov    %rcx,%rsi
mov    %eax,%ecx
xor    %r9d,%r9d
call   1030 <vit216@plt>
mov    0x8(%rsp),%rax
mov    %rax,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @vit216_(i8* %0, i32* %1, [256 x i32]* %2, i8* %3, i64* %4) {
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca [256 x i32]*
%9 = alloca i8*
%10 = alloca i64*
%11 = alloca i64
store i8* %0, i8** %6
store i32* %1, i32** %7
store [256 x i32]* %2, [256 x i32]** %8
store i8* %3, i8** %9
store i64* %4, i64** %10
%12 = load i8*, i8** %9
%13 = load i8*, i8** %6
%14 = load i32*, i32** %7
%15 = load i32, i32* %14
%16 = load [256 x i32]*, [256 x i32]** %8
%17 = bitcast [256 x i32]* %16 to i32**
%18 = call i32 @vit216(i64* %11, i8* %12, i8* %13, i32 %15, i32** %17, i32 0, i32 0)
%19 = load i64, i64* %11
%20 = load i64*, i64** %10
store i64 %19, i64* %20
ret void
}

LLVM IR (-O2):
define void @vit216_(i8* %0, i32* nocapture %1, [256 x i32]* %2, i8* %3, i64* nocapture writeonly %4) {
%6 = alloca i64
%7 = bitcast i64* %6 to i8*
%8 = load i32, i32* %1
%9 = bitcast [256 x i32]* %2 to i32**
%10 = call i32 @vit216(i64* %6, i8* %3, i8* %0, i32 %8, i32** %9, i32 0, i32 0)
%11 = load i64, i64* %6
store i64 %11, i64* %4
ret void
}
void ARGBMultiplyRow_NEON() {}


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

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

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

LLVM IR (-O2):
define void @ARGBMultiplyRow_NEON() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, size_t);
int /*<<< orphan*/ puts(char *);
size_t sip24_valid();
int main(void) {
  size_t ok = sip24_valid();
  if (ok)
    printf("OK: %zd hashes generated\n", ok);
  else
    puts("FAIL");
  return !ok;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <sip24_valid@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     116a <main+0x3a>
mov    -0x10(%rbp),%rsi
lea    0xea0(%rip),%rdi
call   1040 <printf@plt>
jmp    1176 <main+0x46>
lea    0xea9(%rip),%rdi
call   1030 <puts@plt>
cmpq   $0x0,-0x10(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1050 <sip24_valid@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1151 <main+0x21>
lea    0xeb9(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
jmp    115d <main+0x2d>
lea    0xec2(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
test   %rbx,%rbx
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"OK: %zd hashes generated\0A\00"
@.str.1 = [5 x i8] c"FAIL\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
%3 = call i64 (...) @sip24_valid()
store i64 %3, i64* %2
%4 = load i64, i64* %2
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i64, i64* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i64 %7)
br label %11
9: ; preds = %0
%10 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %6
%12 = load i64, i64* %2
%13 = icmp ne i64 %12, 0
%14 = xor i1 %13, true
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
@.str = [26 x i8] c"OK: %zd hashes generated\0A\00"
@.str.1 = [5 x i8] c"FAIL\00"
define i32 @main() {
%1 = tail call i64 (...) @sip24_valid()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i64 %1)
br label %7
5: ; preds = %0
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
%8 = zext i1 %2 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
void b_float_print(int idx, int *cells) {
  float value = cells[idx] / 100.0;
  printf("%.2f", value);
}


x86 assembly (clang, -O0):
<b_float_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm0
movsd  0xecc(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_float_print>:
movslq %edi,%rax
cvtsi2sdl (%rsi,%rax,4),%xmm0
divsd  0xee0(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
lea    0xedd(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%.2f\00"
define void @b_float_print(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca float
store i32 %0, i32* %3
store i32* %1, i32** %4
%6 = load i32*, i32** %4
%7 = load i32, i32* %3
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %6, i64 %8
%10 = load i32, i32* %9
%11 = sitofp i32 %10 to double
%12 = fdiv double %11, 1.000000e+02
%13 = fptrunc double %12 to float
store float %13, float* %5
%14 = load float, float* %5
%15 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float %14)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%.2f\00"
define void @b_float_print(i32 %0, i32* nocapture %1) {
%3 = sext i32 %0 to i64
%4 = getelementptr inbounds i32, i32* %1, i64 %3
%5 = load i32, i32* %4
%6 = sitofp i32 %5 to double
%7 = fdiv double %6, 1.000000e+02
%8 = fptrunc double %7 to float
%9 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float %8)
ret void
}
char *langDbgDevV9938() { return "V9938"; }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"V9938\00"
define i8* @langDbgDevV9938() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
void *foo(void) { return (void *)foo; }


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

x86 assembly (clang, -O2):
<foo>:
mov    0x2ee1(%rip),%rax
ret

LLVM IR (-O0):
define i8* @foo() {
ret i8* bitcast (i8* ()* @foo to i8*)
}

LLVM IR (-O2):
define i8* @foo() {
ret i8* bitcast (i8* ()* @foo to i8*)
}
/* Variables and functions */
int /*<<< orphan*/ dec2bin_v0(int);
int /*<<< orphan*/ dec2bin_v1(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num;
  printf("entre com um inteiro: ");
  scanf("%d", &num);
  dec2bin_v0(num);
  dec2bin_v1(num);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1040 <printf@plt>
lea    0xeb5(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1030 <dec2bin_v0@plt>
mov    -0x8(%rbp),%edi
call   1050 <dec2bin_v1@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
lea    0xec3(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <dec2bin_v0@plt>
mov    0x4(%rsp),%edi
call   1050 <dec2bin_v1@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"entre com um inteiro: \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 @dec2bin_v0(i32 %5)
%7 = load i32, i32* %2
%8 = call i32 @dec2bin_v1(i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"entre com um inteiro: \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @dec2bin_v0(i32 %5)
%7 = load i32, i32* %1
%8 = call i32 @dec2bin_v1(i32 %7)
ret i32 0
}