xunge/DecIR huggingface dataset:
int test_imm_ABint64_lowword_reg(long long val) {
  return ((val) & (0xAB << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_ABint64_lowword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0xab,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_ABint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 171
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef unsigned int uint8_t;
typedef int uint64_t;

/* Variables and functions */
void clear_edge(uint8_t *bits, uint64_t index) {
  bits[index / 8] &= ~(1u << (index % 8));
}


x86 assembly (clang, -O0):
<clear_edge>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %edx,%ecx
mov    $0x1,%eax
shl    %cl,%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    -0x1c(%rbp),%edx
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
and    (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_edge>:
mov    %esi,%ecx
and    $0x7,%cl
mov    $0xfffffffe,%eax
rol    %cl,%eax
lea    0x7(%rsi),%ecx
test   %esi,%esi
cmovns %esi,%ecx
sar    $0x3,%ecx
movslq %ecx,%rcx
and    %eax,(%rdi,%rcx,4)
ret

LLVM IR (-O0):
define void @clear_edge(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 = srem i32 %5, 8
%7 = shl i32 1, %6
%8 = xor i32 %7, -1
%9 = load i32*, i32** %3
%10 = load i32, i32* %4
%11 = sdiv i32 %10, 8
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %9, i64 %12
%14 = load i32, i32* %13
%15 = and i32 %14, %8
store i32 %15, i32* %13
ret void
}

LLVM IR (-O2):
define void @clear_edge(i32* nocapture %0, i32 %1) {
%3 = and i32 %1, 7
%4 = shl nuw nsw i32 1, %3
%5 = xor i32 %4, -1
%6 = sdiv i32 %1, 8
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = and i32 %9, %5
store i32 %10, i32* %8
ret void
}
int smp_store_status(int cpu) { return 0; }


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @CRC_CalculateCRC32Table() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ usage();
void help(void) {
  usage();
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <usage@plt>
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<help>:
push   %rax
xor    %eax,%eax
call   1030 <usage@plt>
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define void @help() {
%1 = call i32 (...) @usage()
%2 = load i32, i32* @EXIT_SUCCESS
%3 = call i32 @exit(i32 %2)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define void @help() {
%1 = tail call i32 (...) @usage()
%2 = load i32, i32* @EXIT_SUCCESS
%3 = tail call i32 @exit(i32 %2)
unreachable
}
__attribute__((weak)) void fd_nrf8001_directed_connect_success(void) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define weak void @fd_nrf8001_directed_connect_success() {
ret void
}
int current_working_dir_get(char *buffer) {
  (void)buffer;
  return -1;
}


x86 assembly (clang, -O0):
<current_working_dir_get>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @current_working_dir_get(i8* nocapture readnone %0) {
ret i32 -1
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMRE8_set(void) { return U_WMRCORENONE_set("U_WMRE8"); }


x86 assembly (clang, -O0):
<U_WMRE8_set>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <U_WMRCORENONE_set@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<U_WMRE8_set>:
lea    0xee9(%rip),%rdi
jmp    1030 <U_WMRCORENONE_set@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMRE8\00"
define i8* @U_WMRE8_set() {
%1 = call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRE8\00"
define i8* @U_WMRE8_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
int countPrintn(long n) {
  long a;
  int res;
  res = 0;
  if (n < 0) {
    res++;
    n = -n;
  }
  a = n / 10;
  if (a != 0) {
    res += countPrintn(a);
  }
  return res + 1;
}


x86 assembly (clang, -O0):
<countPrintn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x14(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1141 <countPrintn+0x31>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     116d <countPrintn+0x5d>
mov    -0x10(%rbp),%rdi
call   1030 <countPrintn@plt>
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<countPrintn>:
push   %rbx
mov    %rdi,%rbx
mov    %rdi,%rax
neg    %rax
cmovs  %rdi,%rax
shr    $0x3f,%rbx
cmp    $0xa,%rax
jb     1145 <countPrintn+0x35>
movabs $0xcccccccccccccccd,%rcx
cc cc cc
mul    %rcx
mov    %rdx,%rdi
shr    $0x3,%rdi
call   1030 <countPrintn@plt>
add    %ebx,%eax
mov    %eax,%ebx
add    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @countPrintn(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
%3 = lshr i64 %0, 63
%4 = trunc i64 %3 to i32
%5 = icmp ult i64 %2, 10
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = udiv i64 %2, 10
%8 = tail call i32 @countPrintn(i64 %7)
%9 = add nsw i32 %8, %4
br label %10
10: ; preds = %6, %1
%11 = phi i32 [ %9, %6 ], [ %4, %1 ]
%12 = add nsw i32 %11, 1
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
printTabs(int tabs) {
  int i = 0;
  for (i = 0; i < tabs; i++) {
    printf("\t");
  }
}


x86 assembly (clang, -O0):
<printTabs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    114f <printTabs+0x3f>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1129 <printTabs+0x19>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printTabs>:
push   %rbx
test   %edi,%edi
jle    112f <printTabs+0x1f>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x9,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <printTabs+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @printTabs(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @putchar(i32 9)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret i32 undef
}
/* Type definitions */
struct smap {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ smap_free(struct smap *);
void smap_freep(struct smap **map) {
  if (*map)
    smap_free(*map);
}


x86 assembly (clang, -O0):
<smap_freep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1136 <smap_freep+0x26>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <smap_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smap_freep>:
mov    (%rdi),%rdi
test   %rdi,%rdi
je     111d <smap_freep+0xd>
jmp    1030 <smap_free@plt>
ret

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

LLVM IR (-O2):
%struct.smap = type { i32 }
define void @smap_freep(%struct.smap** nocapture %0) {
%2 = load %struct.smap*, %struct.smap** %0
%3 = icmp eq %struct.smap* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @smap_free(%struct.smap* %2)
br label %6
6: ; preds = %4, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int evpd_ascii_len(int /*<<< orphan*/ *);
uint8_t *evpd_ascii_post_data(uint8_t *evpd_body) {
  return evpd_body + 2 + evpd_ascii_len(evpd_body);
}


x86 assembly (clang, -O0):
<evpd_ascii_post_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <evpd_ascii_len@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<evpd_ascii_post_data>:
push   %rbx
mov    %rdi,%rbx
call   1030 <evpd_ascii_len@plt>
cltq
lea    (%rbx,%rax,4),%rax
add    $0x8,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i32* @evpd_ascii_post_data(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 2
%5 = load i32*, i32** %2
%6 = call i32 @evpd_ascii_len(i32* %5)
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %4, i64 %7
ret i32* %8
}

LLVM IR (-O2):
define i32* @evpd_ascii_post_data(i32* %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 2
%3 = tail call i32 @evpd_ascii_len(i32* %0)
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i32, i32* %2, i64 %4
ret i32* %5
}
int test_6(int a, int b, int c, int d) { return c - (a != b) + d; }


x86 assembly (clang, -O0):
<test_6>:
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
mov    -0x4(%rbp),%ecx
cmp    -0x8(%rbp),%ecx
setne  %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
add    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_6>:
xor    %eax,%eax
cmp    %esi,%edi
setne  %al
sub    %eax,%edx
lea    (%rdx,%rcx,1),%eax
ret

LLVM IR (-O0):
define i32 @test_6(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 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = icmp ne i32 %10, %11
%13 = zext i1 %12 to i32
%14 = sub nsw i32 %9, %13
%15 = load i32, i32* %8
%16 = add nsw i32 %14, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @test_6(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp ne i32 %0, %1
%6 = sext i1 %5 to i32
%7 = add i32 %6, %2
%8 = add nsw i32 %7, %3
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ vp8_short_fdct4x4_simd(short *, short *, int);
void vp8_short_fdct8x4_simd(short *input, short *output, int pitch) {
  vp8_short_fdct4x4_simd(input, output, pitch);
  vp8_short_fdct4x4_simd(input + 4, output + 16, pitch);
}


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

x86 assembly (clang, -O2):
<vp8_short_fdct8x4_simd>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
call   1030 <vp8_short_fdct4x4_simd@plt>
add    $0x8,%rbp
add    $0x20,%rbx
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <vp8_short_fdct4x4_simd@plt>

LLVM IR (-O0):
define void @vp8_short_fdct8x4_simd(i16* %0, i16* %1, i32 %2) {
%4 = alloca i16*
%5 = alloca i16*
%6 = alloca i32
store i16* %0, i16** %4
store i16* %1, i16** %5
store i32 %2, i32* %6
%7 = load i16*, i16** %4
%8 = load i16*, i16** %5
%9 = load i32, i32* %6
%10 = call i32 @vp8_short_fdct4x4_simd(i16* %7, i16* %8, i32 %9)
%11 = load i16*, i16** %4
%12 = getelementptr inbounds i16, i16* %11, i64 4
%13 = load i16*, i16** %5
%14 = getelementptr inbounds i16, i16* %13, i64 16
%15 = load i32, i32* %6
%16 = call i32 @vp8_short_fdct4x4_simd(i16* %12, i16* %14, i32 %15)
ret void
}

LLVM IR (-O2):
define void @vp8_short_fdct8x4_simd(i16* %0, i16* %1, i32 %2) {
%4 = tail call i32 @vp8_short_fdct4x4_simd(i16* %0, i16* %1, i32 %2)
%5 = getelementptr inbounds i16, i16* %0, i64 4
%6 = getelementptr inbounds i16, i16* %1, i64 16
%7 = tail call i32 @vp8_short_fdct4x4_simd(i16* %5, i16* %6, i32 %2)
ret void
}
/* Variables and functions */
int bbm_hostif_select(void *, unsigned int);
signed int bbm_com_hostif_select(void *handle, unsigned int hostif) {
  signed int res;
  res = bbm_hostif_select(handle, hostif);
  return res;
}


x86 assembly (clang, -O0):
<bbm_com_hostif_select>:
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   1030 <bbm_hostif_select@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bbm_com_hostif_select>:
jmp    1030 <bbm_hostif_select@plt>

LLVM IR (-O0):
define i32 @bbm_com_hostif_select(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 @bbm_hostif_select(i8* %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @bbm_com_hostif_select(i8* %0, i32 %1) {
%3 = tail call i32 @bbm_hostif_select(i8* %0, i32 %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_attr_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int pthread_attr_getscope(const pthread_attr_t *a, int *b) { assert(0); }


x86 assembly (clang, -O0):
<pthread_attr_getscope>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
xor    %edi,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @pthread_attr_getscope(i32* nocapture readnone %0, i32* nocapture readnone %1) {
%3 = tail call i32 @assert(i32 0)
ret i32 undef
}
int test_imm_28uint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0x28 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_28uint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x10,%rdx
and    $0x28,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_28uint64_midword_reg>:
test   $0x280000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_28uint64_midword_reg(i64 %0) {
%2 = and i64 %0, 2621440
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ _hmt_register_covercase(char *, char *);
void _hmt_covercase_HMM_Vec3i_init(void) {
  _hmt_register_covercase("HMM_Vec3i", "1");
}


x86 assembly (clang, -O0):
<_hmt_covercase_HMM_Vec3i_init>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee8(%rip),%rsi
call   1030 <_hmt_register_covercase@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_hmt_covercase_HMM_Vec3i_init>:
lea    0xee9(%rip),%rdi
lea    0xeec(%rip),%rsi
jmp    1030 <_hmt_register_covercase@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"HMM_Vec3i\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_Vec3i_init() {
%1 = call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"HMM_Vec3i\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_Vec3i_init() {
%1 = tail call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int f4(int *);
int f5(int *p) { return f4(p); }


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

x86 assembly (clang, -O2):
<f5>:
jmp    1030 <f4@plt>

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

LLVM IR (-O2):
define i32 @f5(i32* %0) {
%2 = tail call i32 @f4(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
char *strdup(char const *);
char *gr_strdup(const char *str) {
  char *ret = strdup(str);
  if (ret == NULL) {
    fprintf(stderr, "Unable to allocate memory.\n");
    exit(EXIT_FAILURE);
  }
  return ret;
}


x86 assembly (clang, -O0):
<gr_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1177 <gr_strdup+0x47>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
lea    0xe9c(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e68(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gr_strdup>:
push   %rax
call   1050 <strdup@plt>
test   %rax,%rax
je     113d <gr_strdup+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [28 x i8] c"Unable to allocate memory.\0A\00"
@EXIT_FAILURE = global i32 0
define i8* @gr_strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strdup(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* @EXIT_FAILURE
%12 = call i32 @exit(i32 %11)
unreachable
13: ; preds = %1
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [28 x i8] c"Unable to allocate memory.\0A\00"
@EXIT_FAILURE = global i32 0
define noalias i8* @gr_strdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, unsigned long);
char const *strdec(unsigned long number) {
  static char buf[24];
  sprintf(buf, "%lu", number);
  return buf;
}


x86 assembly (clang, -O0):
<strdec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0x2f19(%rip),%rdi
lea    0xed2(%rip),%rsi
call   1030 <sprintf@plt>
lea    0x2f06(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdec>:
push   %rbx
mov    %rdi,%rdx
lea    0x2f25(%rip),%rbx
lea    0xede(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@strdec.buf = internal global [24 x i8] zeroinitializer
@.str = [4 x i8] c"%lu\00"
define i8* @strdec(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @sprintf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @strdec.buf, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %3)
ret i8* getelementptr inbounds ([24 x i8], [24 x i8]* @strdec.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@strdec.buf = internal global [24 x i8] zeroinitializer
@.str = [4 x i8] c"%lu\00"
define i8* @strdec(i64 %0) {
%2 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @strdec.buf, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %0)
ret i8* getelementptr inbounds ([24 x i8], [24 x i8]* @strdec.buf, i64 0, i64 0)
}
/* Variables and functions */
unsigned strlen(char s[]) {
  unsigned i = 0;
  while (s[i])
    i++;
  return i;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
cmpb   $0x0,(%rax,%rcx,1)
je     112e <strlen+0x2e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi,%rax,1)
jne    1110 <strlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 0, %1 ], [ %8, %2 ]
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = add i32 %3, 1
br i1 %7, label %9, label %2
9: ; preds = %2
ret i32 %3
}
/* Variables and functions */
int M_PI;
float ykykl(float v1) { return 2 * M_PI * v1; }


x86 assembly (clang, -O0):
<ykykl>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    0x2ed8(%rip),%rax
mov    (%rax),%eax
shl    $0x1,%eax
cvtsi2ss %eax,%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ykykl>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
add    %eax,%eax
cvtsi2ss %eax,%xmm1
mulss  %xmm1,%xmm0
ret

LLVM IR (-O0):
@M_PI = global i32 0
define float @ykykl(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load i32, i32* @M_PI
%4 = mul nsw i32 2, %3
%5 = sitofp i32 %4 to float
%6 = load float, float* %2
%7 = fmul float %5, %6
ret float %7
}

LLVM IR (-O2):
@M_PI = global i32 0
define float @ykykl(float %0) {
%2 = load i32, i32* @M_PI
%3 = shl nsw i32 %2, 1
%4 = sitofp i32 %3 to float
%5 = fmul float %4, %0
ret float %5
}
int do_803() { return 803; }


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

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

LLVM IR (-O0):
define i32 @do_803() {
ret i32 803
}

LLVM IR (-O2):
define i32 @do_803() {
ret i32 803
}
int ft_isalpha(int c) {
  if ((c <= 'Z' && c >= 'A') || (c <= 'z' && c >= 'a'))
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<ft_isalpha>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x5a,-0x8(%rbp)
jg     111b <ft_isalpha+0x1b>
cmpl   $0x41,-0x8(%rbp)
jge    112f <ft_isalpha+0x2f>
cmpl   $0x7a,-0x8(%rbp)
jg     113b <ft_isalpha+0x3b>
cmpl   $0x61,-0x8(%rbp)
jl     113b <ft_isalpha+0x3b>
movl   $0x1,-0x4(%rbp)
jmp    1142 <ft_isalpha+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isalpha>:
and    $0xffffffdf,%edi
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @ft_isalpha(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 %4, 90
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sge i32 %7, 65
br i1 %8, label %15, label %9
9: ; preds = %6, %1
%10 = load i32, i32* %3
%11 = icmp sle i32 %10, 122
br i1 %11, label %12, label %16
12: ; preds = %9
%13 = load i32, i32* %3
%14 = icmp sge i32 %13, 97
br i1 %14, label %15, label %16
15: ; preds = %12, %6
store i32 1, i32* %2
br label %17
16: ; preds = %12, %9
store i32 0, i32* %2
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @ft_isalpha(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
unsigned char freePhysical(void *base_address, unsigned int byte_count) {
  free(base_address);
  return 1;
}


x86 assembly (clang, -O0):
<freePhysical>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freePhysical>:
push   %rax
call   1030 <free@plt>
mov    $0x1,%al
pop    %rcx
ret

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

LLVM IR (-O2):
define zeroext i8 @freePhysical(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @free(i8* %0)
ret i8 1
}
/* Variables and functions */
int fib(int);
int benchmark() {
  int a;
  int r;
  a = 30;
  r = fib(a);
  return r;
}


x86 assembly (clang, -O0):
<benchmark>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1e,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <fib@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<benchmark>:
mov    $0x1e,%edi
jmp    1030 <fib@plt>

LLVM IR (-O0):
define i32 @benchmark() {
%1 = alloca i32
%2 = alloca i32
store i32 30, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @fib(i32 %3)
store i32 %4, i32* %2
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
define i32 @benchmark() {
%1 = tail call i32 @fib(i32 30)
ret i32 %1
}
void border_nw_ext_corner_special_sand_short_vert(unsigned char *pic,
                                                  unsigned char *mirr) {
  *pic = 0x2C;
  *mirr = 0x01 | 0x02;
}


x86 assembly (clang, -O0):
<border_nw_ext_corner_special_sand_short_vert>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x2c,(%rax)
mov    -0x10(%rbp),%rax
movb   $0x3,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<border_nw_ext_corner_special_sand_short_vert>:
movb   $0x2c,(%rdi)
movb   $0x3,(%rsi)
ret

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

LLVM IR (-O2):
define void @border_nw_ext_corner_special_sand_short_vert(i8* nocapture writeonly %0, i8* nocapture writeonly %1) {
store i8 44, i8* %0
store i8 3, i8* %1
ret void
}
int frame_skip(int init) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @frame_skip(i32 %0) {
ret i32 0
}
/* Variables and functions */
int *maxSlidingWindow(int *, int, int, int *);
int /*<<< orphan*/ printList(int *, int);
int main(int argc, const char **argv) {
  int nums[2] = {1, -1};
  int k = 1;
  int returnSize;
  int *maxes = maxSlidingWindow(nums, 2, k, &returnSize);
  printList(maxes, returnSize);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xec3(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
lea    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%edx
mov    $0x2,%esi
lea    -0x20(%rbp),%rcx
call   1030 <maxSlidingWindow@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%esi
call   1040 <printList@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0xffffffff00000001,%rax
ff ff ff
mov    %rax,0x10(%rsp)
lea    0x10(%rsp),%rdi
lea    0xc(%rsp),%rcx
mov    $0x2,%esi
mov    $0x1,%edx
call   1030 <maxSlidingWindow@plt>
mov    0xc(%rsp),%esi
mov    %rax,%rdi
call   1040 <printList@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.nums = [2 x i32] [i32 1, i32 -1]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [2 x i32]
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = bitcast [2 x i32]* %6 to i8*
store i32 1, i32* %7
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%12 = load i32, i32* %7
%13 = call i32* @maxSlidingWindow(i32* %11, i32 2, i32 %12, i32* %8)
store i32* %13, i32** %9
%14 = load i32*, i32** %9
%15 = load i32, i32* %8
%16 = call i32 @printList(i32* %14, i32 %15)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i64
%4 = alloca i32
%5 = bitcast i64* %3 to i8*
store i64 -4294967295, i64* %3
%6 = bitcast i32* %4 to i8*
%7 = bitcast i64* %3 to i32*
%8 = call i32* @maxSlidingWindow(i32* %7, i32 2, i32 1, i32* %4)
%9 = load i32, i32* %4
%10 = call i32 @printList(i32* %8, i32 %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *);
void usage(const char *program_name) {
  printf("Usage: %s [OPTIONS] [FILE]\n"
         "Simple stream calculator.\n\n"
         "  -a        compute arithmetic mean\n"
         "  -p        compute product\n"
         "  -s        compute sum (default)\n"
         "  -d        number of digits after decimal point (default: 0)\n"
         "  -h        print help\n",
         program_name);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [238 x i8] c"Usage: %s [OPTIONS] [FILE]\0ASimple stream calculator.\0A\0A -a compute arithmetic mean\0A -p compute product\0A -s compute sum (default)\0A -d number of digits after decimal point (default: 0)\0A -h print help\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([238 x i8], [238 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@.str = [238 x i8] c"Usage: %s [OPTIONS] [FILE]\0ASimple stream calculator.\0A\0A -a compute arithmetic mean\0A -p compute product\0A -s compute sum (default)\0A -d number of digits after decimal point (default: 0)\0A -h print help\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([238 x i8], [238 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ gen_int16();
int /*<<< orphan*/ gen_int32();
int /*<<< orphan*/ gen_int64();
int /*<<< orphan*/ gen_int8();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("// generated by generate_types_h.c\n\n"
         "#ifndef UTILS_TYPES_H\n"
         "#define UTILS_TYPES_H\n"
         "\n");
  gen_int8();
  gen_int16();
  gen_int32();
  gen_int64();
  printf("\n"
         "#endif // UTILS_TYPES_H\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <gen_int8@plt>
mov    $0x0,%al
call   1050 <gen_int16@plt>
mov    $0x0,%al
call   1070 <gen_int32@plt>
mov    $0x0,%al
call   1060 <gen_int64@plt>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xea8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <gen_int8@plt>
xor    %eax,%eax
call   1050 <gen_int16@plt>
xor    %eax,%eax
call   1070 <gen_int32@plt>
xor    %eax,%eax
call   1060 <gen_int64@plt>
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [82 x i8] c"// generated by generate_types_h.c\0A\0A#ifndef UTILS_TYPES_H\0A#define UTILS_TYPES_H\0A\0A\00"
@.str.1 = [26 x i8] c"\0A#endif // UTILS_TYPES_H\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @gen_int8()
%4 = call i32 (...) @gen_int16()
%5 = call i32 (...) @gen_int32()
%6 = call i32 (...) @gen_int64()
%7 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [81 x i8] c"// generated by generate_types_h.c\0A\0A#ifndef UTILS_TYPES_H\0A#define UTILS_TYPES_H\0A\00"
@str.2 = [25 x i8] c"\0A#endif // UTILS_TYPES_H\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @gen_int8()
%3 = tail call i32 (...) @gen_int16()
%4 = tail call i32 (...) @gen_int32()
%5 = tail call i32 (...) @gen_int64()
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
bool errata_66(void) {
  if ((((*(uint32_t *)0xF0000FE0) & 0x000000FF) == 0x6) &&
      (((*(uint32_t *)0xF0000FE4) & 0x0000000F) == 0x0)) {
    if (((*(uint32_t *)0xF0000FE8) & 0x000000F0) == 0x50) {
      return true;
    }
  }
  return false;
}


x86 assembly (clang, -O0):
<errata_66>:
push   %rbp
mov    %rsp,%rbp
mov    $0xf0000fe0,%eax
mov    (%rax),%eax
and    $0xff,%eax
cmp    $0x6,%eax
jne    1152 <errata_66+0x52>
mov    $0xf0000fe4,%eax
mov    (%rax),%eax
and    $0xf,%eax
cmp    $0x0,%eax
jne    1152 <errata_66+0x52>
mov    $0xf0000fe8,%eax
mov    (%rax),%eax
and    $0xf0,%eax
cmp    $0x50,%eax
jne    114d <errata_66+0x4d>
movl   $0x1,-0x4(%rbp)
jmp    1159 <errata_66+0x59>
jmp    1152 <errata_66+0x52>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<errata_66>:
mov    $0xf0000fe0,%eax
cmpb   $0x6,(%rax)
jne    1122 <errata_66+0x22>
testb  $0xf,0x4(%rax)
jne    1122 <errata_66+0x22>
mov    $0xf0,%ecx
and    0x8(%rax),%ecx
mov    $0x1,%eax
cmp    $0x50,%ecx
je     1124 <errata_66+0x24>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @errata_66() {
%1 = alloca i32
%2 = load i32, i32* inttoptr (i64 4026535904 to i32*)
%3 = and i32 %2, 255
%4 = icmp eq i32 %3, 6
br i1 %4, label %5, label %15
5: ; preds = %0
%6 = load i32, i32* inttoptr (i64 4026535908 to i32*)
%7 = and i32 %6, 15
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %5
%10 = load i32, i32* inttoptr (i64 4026535912 to i32*)
%11 = and i32 %10, 240
%12 = icmp eq i32 %11, 80
br i1 %12, label %13, label %14
13: ; preds = %9
store i32 1, i32* %1
br label %16
14: ; preds = %9
br label %15
15: ; preds = %14, %5, %0
store i32 0, i32* %1
br label %16
16: ; preds = %15, %13
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
define i32 @errata_66() {
%1 = load i32, i32* inttoptr (i64 4026535904 to i32*)
%2 = and i32 %1, 255
%3 = icmp eq i32 %2, 6
br i1 %3, label %4, label %12
4: ; preds = %0
%5 = load i32, i32* inttoptr (i64 4026535908 to i32*)
%6 = and i32 %5, 15
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %4
%9 = load i32, i32* inttoptr (i64 4026535912 to i32*)
%10 = and i32 %9, 240
%11 = icmp eq i32 %10, 80
br i1 %11, label %13, label %12
12: ; preds = %8, %4, %0
br label %13
13: ; preds = %8, %12
%14 = phi i32 [ 0, %12 ], [ 1, %8 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ brsh_init();
int /*<<< orphan*/ brsh_teardown();
int /*<<< orphan*/ refresh();
void resized_(int in_signal) {
  brsh_teardown();
  brsh_init();
  refresh();
}


x86 assembly (clang, -O0):
<resized_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1050 <brsh_teardown@plt>
mov    $0x0,%al
call   1030 <brsh_init@plt>
mov    $0x0,%al
call   1040 <refresh@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<resized_>:
push   %rax
xor    %eax,%eax
call   1050 <brsh_teardown@plt>
xor    %eax,%eax
call   1030 <brsh_init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <refresh@plt>

LLVM IR (-O0):
define void @resized_(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @brsh_teardown()
%4 = call i32 (...) @brsh_init()
%5 = call i32 (...) @refresh()
ret void
}

LLVM IR (-O2):
define void @resized_(i32 %0) {
%2 = tail call i32 (...) @brsh_teardown()
%3 = tail call i32 (...) @brsh_init()
%4 = tail call i32 (...) @refresh()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ simm(int, char *);
void tarvos(int m, char *s) { simm(m, s); }


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

x86 assembly (clang, -O2):
<tarvos>:
jmp    1030 <simm@plt>

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

LLVM IR (-O2):
define void @tarvos(i32 %0, i8* %1) {
%3 = tail call i32 @simm(i32 %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main() {
  int num1, num2, res;
  num1 = 5;
  num2 = 2;
  res = num1 % num2;
  printf("%d / %d = %d", num1, num2, res);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x5,%esi
mov    $0x2,%edx
mov    $0x1,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"%d / %d = %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
store i32 2, i32* %3
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = srem i32 %5, %6
store i32 %7, i32* %4
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9, i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"%d / %d = %d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 5, i32 2, i32 1)
ret i32 0
}
unsigned int rtcClearAlarm(void) {
  (*((volatile unsigned int *const)(0x40010a00 + 0x10))) &=
      ((1 << 6) | (1 << 5) | (1 << 3) | (1 << 2) | (1 << 1) | (1 << 0));
  return 0;
}


x86 assembly (clang, -O0):
<rtcClearAlarm>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40010a10,%eax
mov    (%rax),%ecx
and    $0x6f,%ecx
mov    $0x40010a10,%eax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtcClearAlarm>:
andl   $0x6f,0x40010a10
6f
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @rtcClearAlarm() {
%1 = load volatile i32, i32* inttoptr (i64 1073809936 to i32*)
%2 = and i32 %1, 111
store volatile i32 %2, i32* inttoptr (i64 1073809936 to i32*)
ret i32 0
}

LLVM IR (-O2):
define i32 @rtcClearAlarm() {
%1 = load volatile i32, i32* inttoptr (i64 1073809936 to i32*)
%2 = and i32 %1, 111
store volatile i32 %2, i32* inttoptr (i64 1073809936 to i32*)
ret i32 0
}
/* Variables and functions */
unsigned int list_count(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                        int /*<<< orphan*/ *);
bool test_list_count_null_params(void) {
  bool pass = false;
  unsigned int res = list_count(NULL, NULL, NULL);
  if (res == 1) {
    pass = true;
  }
  return pass;
}


x86 assembly (clang, -O0):
<test_list_count_null_params>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rdi
mov    %rdx,%rsi
call   1030 <list_count@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1142 <test_list_count_null_params+0x32>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_list_count_null_params>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <list_count@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @test_list_count_null_params() {
%1 = tail call i32 @list_count(i32* null, i32* null, i32* null)
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char *);
char rpiwd_direction_to_char(const char *direction) {
  if (strcmp(direction, "from") == 0)
    return '>';
  else if (strcmp(direction, "to") == 0)
    return '<';
  else
    return '?';
}


x86 assembly (clang, -O0):
<rpiwd_direction_to_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    113f <rpiwd_direction_to_char+0x2f>
movb   $0x3e,-0x1(%rbp)
jmp    1166 <rpiwd_direction_to_char+0x56>
mov    -0x10(%rbp),%rdi
lea    0xebb(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1162 <rpiwd_direction_to_char+0x52>
movb   $0x3c,-0x1(%rbp)
jmp    1166 <rpiwd_direction_to_char+0x56>
movb   $0x3f,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rpiwd_direction_to_char>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1144 <rpiwd_direction_to_char+0x34>
lea    0xed9(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
lea    (%rcx,%rcx,2),%eax
add    $0x3c,%eax
pop    %rbx
ret
mov    $0x3e,%al
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"from\00"
@.str.1 = [3 x i8] c"to\00"
define signext i8 @rpiwd_direction_to_char(i8* %0) {
%2 = alloca i8
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i8 62, i8* %2
br label %14
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8
store i8 60, i8* %2
br label %14
13: ; preds = %8
store i8 63, i8* %2
br label %14
14: ; preds = %13, %12, %7
%15 = load i8, i8* %2
ret i8 %15
}

LLVM IR (-O2):
@.str = [5 x i8] c"from\00"
@.str.1 = [3 x i8] c"to\00"
define signext i8 @rpiwd_direction_to_char(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i8 60, i8 63
br label %8
8: ; preds = %4, %1
%9 = phi i8 [ 62, %1 ], [ %7, %4 ]
ret i8 %9
}