xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ nand_reset();
void init_nand(void) {
  (*(volatile unsigned int *)(0x7E00F120)) = 0;
  (*(volatile unsigned int *)(0x70200000)) =
      ((*(volatile unsigned int *)(0x70200000)) & 0xBC7F888F) | 0x01000310;
  (*(volatile unsigned int *)(0x70200004)) =
      ((*(volatile unsigned int *)(0x70200004)) & 0xFFFCFF08) | 0xF7;
  nand_reset();
  return;
}


x86 assembly (clang, -O0):
<init_nand>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7e00f120,%eax
movl   $0x0,(%rax)
mov    $0x70200000,%eax
mov    (%rax),%ecx
and    $0xbc7f888f,%ecx
or     $0x1000310,%ecx
mov    $0x70200000,%eax
mov    %ecx,(%rax)
mov    $0x70200004,%eax
mov    (%rax),%ecx
and    $0xfffcff08,%ecx
or     $0xf7,%ecx
mov    $0x70200004,%eax
mov    %ecx,(%rax)
mov    $0x0,%al
call   1030 <nand_reset@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_nand>:
movl   $0x0,0x7e00f120
mov    $0xbc7f888f,%eax
and    0x70200000,%eax
or     $0x1000310,%eax
mov    %eax,0x70200000
mov    $0xfffcff08,%eax
and    0x70200004,%eax
or     $0xf7,%eax
mov    %eax,0x70200004
xor    %eax,%eax
jmp    1030 <nand_reset@plt>

LLVM IR (-O0):
define void @init_nand() {
store volatile i32 0, i32* inttoptr (i64 2113990944 to i32*)
%1 = load volatile i32, i32* inttoptr (i64 1881145344 to i32*)
%2 = and i32 %1, -1132492657
%3 = or i32 %2, 16778000
store volatile i32 %3, i32* inttoptr (i64 1881145344 to i32*)
%4 = load volatile i32, i32* inttoptr (i64 1881145348 to i32*)
%5 = and i32 %4, -196856
%6 = or i32 %5, 247
store volatile i32 %6, i32* inttoptr (i64 1881145348 to i32*)
%7 = call i32 (...) @nand_reset()
ret void
}

LLVM IR (-O2):
define void @init_nand() {
store volatile i32 0, i32* inttoptr (i64 2113990944 to i32*)
%1 = load volatile i32, i32* inttoptr (i64 1881145344 to i32*)
%2 = and i32 %1, -1132492657
%3 = or i32 %2, 16778000
store volatile i32 %3, i32* inttoptr (i64 1881145344 to i32*)
%4 = load volatile i32, i32* inttoptr (i64 1881145348 to i32*)
%5 = and i32 %4, -196856
%6 = or i32 %5, 247
store volatile i32 %6, i32* inttoptr (i64 1881145348 to i32*)
%7 = tail call i32 (...) @nand_reset()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0xef() {
  Assert_real((iscntrl(239) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_iscntrl.c",
              1200, ("iscntrl should be 0 for 0xef"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0xef>:
push   %rax
mov    $0xef,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4b0,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xef\00"
define void @t_iscntrl_0xef() {
%1 = tail call i64 @iscntrl(i32 239)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1200, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void foo412() {}


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

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

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

LLVM IR (-O2):
define void @foo412() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void decode_player_quit(void *data) { printf("Player quit : \n"); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"Player quit : \0A\00"
define void @decode_player_quit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [15 x i8] c"Player quit : \00"
define void @decode_player_quit(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret void
}
int x264_cpu_num_processors(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @x264_cpu_num_processors() {
ret i32 1
}
void polacz2(char *s, char *d) {
  while (*++d != '\0')
    ;
  while (*d++ = *s++)
    ;
}


x86 assembly (clang, -O0):
<polacz2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
je     112d <polacz2+0x2d>
jmp    110c <polacz2+0xc>
jmp    1132 <polacz2+0x32>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     1161 <polacz2+0x61>
jmp    1132 <polacz2+0x32>
pop    %rbp
ret

x86 assembly (clang, -O2):
<polacz2>:
add    $0x1,%rsi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmpb   $0x0,(%rsi)
lea    0x1(%rsi),%rsi
jne    1110 <polacz2+0x10>
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
movzbl (%rdi,%rax,1),%ecx
mov    %cl,-0x1(%rsi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1120 <polacz2+0x20>
ret

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

LLVM IR (-O2):
define void @polacz2(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %5, %3 ]
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3, %8
%9 = phi i8* [ %11, %8 ], [ %0, %3 ]
%10 = phi i8* [ %13, %8 ], [ %5, %3 ]
%11 = getelementptr inbounds i8, i8* %9, i64 1
%12 = load i8, i8* %9
%13 = getelementptr inbounds i8, i8* %10, i64 1
store i8 %12, i8* %10
%14 = icmp eq i8 %12, 0
br i1 %14, label %15, label %8
15: ; preds = %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ *strchr(char *, char);
int ischr(char c, char *category) { return (strchr(category, c) != NULL); }


x86 assembly (clang, -O0):
<ischr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
movsbl -0x1(%rbp),%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ischr>:
push   %rax
mov    %edi,%eax
mov    %rsi,%rdi
mov    %eax,%esi
call   1030 <strchr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ischr(i8 signext %0, i8* %1) {
%3 = alloca i8
%4 = alloca i8*
store i8 %0, i8* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8, i8* %3
%7 = call i32* @strchr(i8* %5, i8 signext %6)
%8 = icmp ne i32* %7, null
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @ischr(i8 signext %0, i8* %1) {
%3 = tail call i32* @strchr(i8* %1, i8 signext %0)
%4 = icmp ne i32* %3, null
%5 = zext i1 %4 to i32
ret i32 %5
}
void g_type_instance_get_private() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
uint32_t EMACTimestampIntStatus(uint32_t ui32Base) {
  ASSERT(ui32Base == 0x400EC000);
  return ((*((volatile uint32_t *)(ui32Base + 0x00000728))));
}


x86 assembly (clang, -O0):
<EMACTimestampIntStatus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x400ec000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x728,%eax
cltq
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EMACTimestampIntStatus>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x400ec000,%ebx
sete   %dil
call   1030 <ASSERT@plt>
movslq %ebx,%rax
mov    0x728(%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @EMACTimestampIntStatus(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1074708480
%5 = zext i1 %4 to i32
%6 = call i32 @ASSERT(i32 %5)
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1832
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = load volatile i32, i32* %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @EMACTimestampIntStatus(i32 %0) {
%2 = icmp eq i32 %0, 1074708480
%3 = zext i1 %2 to i32
%4 = tail call i32 @ASSERT(i32 %3)
%5 = add nsw i32 %0, 1832
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
ret i32 %8
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
void ext4_bmap_bit_clr(uint8_t *bmap, uint32_t bit) {
  *(bmap + (bit >> 3)) &= ~(1 << (bit & 7));
}


x86 assembly (clang, -O0):
<ext4_bmap_bit_clr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
and    $0x7,%ecx
mov    $0x1,%edx
shl    %cl,%edx
xor    $0xffffffff,%edx
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sar    $0x3,%ecx
movslq %ecx,%rcx
and    (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @ext4_bmap_bit_clr(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 = and i32 %5, 7
%7 = shl i32 1, %6
%8 = xor i32 %7, -1
%9 = load i32*, i32** %3
%10 = load i32, i32* %4
%11 = ashr i32 %10, 3
%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 @ext4_bmap_bit_clr(i32* nocapture %0, i32 %1) {
%3 = and i32 %1, 7
%4 = shl nuw nsw i32 1, %3
%5 = xor i32 %4, -1
%6 = ashr i32 %1, 3
%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
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_config_parse_bool() {
  printf("NOT IMPLEMENTED:"
         "pa_config_parse_bool"
         "\n");
}


x86 assembly (clang, -O0):
<pa_config_parse_bool>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [38 x i8] c"NOT IMPLEMENTED:pa_config_parse_bool\0A\00"
define i32 @pa_config_parse_bool() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [37 x i8] c"NOT IMPLEMENTED:pa_config_parse_bool\00"
define i32 @pa_config_parse_bool() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
struct List {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(struct List *);
int /*<<< orphan*/ clear(struct List *);
int /*<<< orphan*/ free(struct List *);
void destroy(struct List *lst) {
  assert(lst);
  clear(lst);
  free(lst);
}


x86 assembly (clang, -O0):
<destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1050 <clear@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<destroy>:
push   %rbx
mov    %rdi,%rbx
call   1040 <assert@plt>
mov    %rbx,%rdi
call   1050 <clear@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.List = type { i32 }
define void @destroy(%struct.List* %0) {
%2 = alloca %struct.List*
store %struct.List* %0, %struct.List** %2
%3 = load %struct.List*, %struct.List** %2
%4 = call i32 @assert(%struct.List* %3)
%5 = load %struct.List*, %struct.List** %2
%6 = call i32 @clear(%struct.List* %5)
%7 = load %struct.List*, %struct.List** %2
%8 = call i32 @free(%struct.List* %7)
ret void
}

LLVM IR (-O2):
%struct.List = type { i32 }
define void @destroy(%struct.List* %0) {
%2 = tail call i32 @assert(%struct.List* %0)
%3 = tail call i32 @clear(%struct.List* %0)
%4 = tail call i32 @free(%struct.List* %0)
ret void
}
void shutdown_mpi(void) {}


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

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

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

LLVM IR (-O2):
define void @shutdown_mpi() {
ret void
}
void s2e_codeselector_enable_address_space(unsigned user_mode_only) {
  __asm__ __volatile__(".byte 0x0f, 0x3f\n"
                       ".byte 0x00, 0xAE, 0x00, 0x00\n"
                       ".byte 0x00, 0x00, 0x00, 0x00\n"
                       :
                       : "c"(user_mode_only));
}


x86 assembly (clang, -O0):
<s2e_codeselector_enable_address_space>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
(bad)
add    %ch,0x0(%rsi)
add    %al,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<s2e_codeselector_enable_address_space>:
mov    %edi,%ecx
(bad)
add    %ch,0x0(%rsi)
add    %al,(%rax)
ret

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

LLVM IR (-O2):
define void @s2e_codeselector_enable_address_space(i32 %0) {
tail call void asm sideeffect ".byte 0x0f, 0x3f\0A.byte 0x00, 0xAE, 0x00, 0x00\0A.byte 0x00, 0x00, 0x00, 0x00\0A", "{cx},~{dirflag},~{fpsr},~{flags}"(i32 %0)
ret void
}
void mdaqled_init(void) {}


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

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

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

LLVM IR (-O2):
define void @mdaqled_init() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
int /*<<< orphan*/ nrf_drv_radio802154_received(int /*<<< orphan*/ *,
                                                int /*<<< orphan*/,
                                                int /*<<< orphan*/);
void nrf_drv_radio802154_notify_received(uint8_t *p_data, int8_t power,
                                         int8_t lqi) {
  nrf_drv_radio802154_received(p_data, power, lqi);
}


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

x86 assembly (clang, -O2):
<nrf_drv_radio802154_notify_received>:
jmp    1030 <nrf_drv_radio802154_received@plt>

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

LLVM IR (-O2):
define void @nrf_drv_radio802154_notify_received(i32* %0, i32 %1, i32 %2) {
%4 = tail call i32 @nrf_drv_radio802154_received(i32* %0, i32 %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ countSort(int *, int, int);
int getMax(int *, int);
void radixsort(int *dizi, int boyut) {
  int taban, max = getMax(dizi, boyut);
  for (taban = 1; (max / taban) > 0; taban *= 10) {
    countSort(dizi, boyut, taban);
  }
}


x86 assembly (clang, -O0):
<radixsort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <getMax@plt>
mov    %eax,-0x14(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x14(%rbp),%eax
cltd
idivl  -0x10(%rbp)
cmp    $0x0,%eax
jle    1170 <radixsort+0x50>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <countSort@plt>
imul   $0xa,-0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1145 <radixsort+0x25>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<radixsort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%r14d
mov    %rdi,%r15
call   1040 <getMax@plt>
test   %eax,%eax
jle    115b <radixsort+0x3b>
mov    %eax,%ebp
mov    $0x1,%ebx
nopl   (%rax)
mov    %r15,%rdi
mov    %r14d,%esi
mov    %ebx,%edx
call   1030 <countSort@plt>
add    %ebx,%ebx
lea    (%rbx,%rbx,4),%ebx
mov    %ebp,%eax
cltd
idiv   %ebx
test   %eax,%eax
jg     1140 <radixsort+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @radixsort(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 @getMax(i32* %7, i32 %8)
store i32 %9, i32* %6
store i32 1, i32* %5
br label %10
10: ; preds = %20, %2
%11 = load i32, i32* %6
%12 = load i32, i32* %5
%13 = sdiv i32 %11, %12
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %23
15: ; preds = %10
%16 = load i32*, i32** %3
%17 = load i32, i32* %4
%18 = load i32, i32* %5
%19 = call i32 @countSort(i32* %16, i32 %17, i32 %18)
br label %20
20: ; preds = %15
%21 = load i32, i32* %5
%22 = mul nsw i32 %21, 10
store i32 %22, i32* %5
br label %10
23: ; preds = %10
ret void
}

LLVM IR (-O2):
define void @radixsort(i32* %0, i32 %1) {
%3 = tail call i32 @getMax(i32* %0, i32 %1)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %2, %5
%6 = phi i32 [ %8, %5 ], [ 1, %2 ]
%7 = tail call i32 @countSort(i32* %0, i32 %1, i32 %6)
%8 = mul nsw i32 %6, 10
%9 = sdiv i32 %3, %8
%10 = icmp sgt i32 %9, 0
br i1 %10, label %5, label %11
11: ; preds = %5, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int strcmp(char const *, char const *);
int64_t run_strcmp(const char *s1, const char *s2) {
  int res = strcmp(s1, s2);
  return (int64_t)res;
}


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

x86 assembly (clang, -O2):
<run_strcmp>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @run_strcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
short absval(short n) { return n < 0 ? -n : n; }


x86 assembly (clang, -O0):
<absval>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
cmp    $0x0,%eax
jge    1128 <absval+0x28>
movswl -0x2(%rbp),%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x8(%rbp)
jmp    112f <absval+0x2f>
movswl -0x2(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<absval>:
mov    %edi,%eax
neg    %ax
cmovs  %di,%ax
ret

LLVM IR (-O0):
define signext i16 @absval(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i16, i16* %2
%8 = sext i16 %7 to i32
%9 = sub nsw i32 0, %8
br label %13
10: ; preds = %1
%11 = load i16, i16* %2
%12 = sext i16 %11 to i32
br label %13
13: ; preds = %10, %6
%14 = phi i32 [ %9, %6 ], [ %12, %10 ]
%15 = trunc i32 %14 to i16
ret i16 %15
}

LLVM IR (-O2):
define signext i16 @absval(i16 signext %0) {
%2 = tail call i16 @llvm.abs.i16(i16 %0, i1 false)
ret i16 %2
}
/* Variables and functions */
int /*<<< orphan*/ writeByteToPrintfStream(int /*<<< orphan*/);
int writeStringToPrintfStream(const char *str) {
  int count = 0;
  while (*str) {
    writeByteToPrintfStream(*str++);
    count++;
  }
  return count;
}


x86 assembly (clang, -O0):
<writeStringToPrintfStream>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1155 <writeStringToPrintfStream+0x45>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <writeByteToPrintfStream@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <writeStringToPrintfStream+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeStringToPrintfStream>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     1138 <writeStringToPrintfStream+0x28>
mov    %rdi,%r14
xor    %ebx,%ebx
nop
movsbl %al,%edi
call   1030 <writeByteToPrintfStream@plt>
movzbl 0x1(%r14,%rbx,1),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <writeStringToPrintfStream+0x10>
jmp    113a <writeStringToPrintfStream+0x2a>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @writeStringToPrintfStream(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 0, %1 ]
%7 = phi i8* [ %8, %4 ], [ %0, %1 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = sext i8 %5 to i32
%10 = tail call i32 @writeByteToPrintfStream(i32 %9)
%11 = add nuw nsw i32 %6, 1
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ convert(int *, int);
int /*<<< orphan*/ free(void *);
scalar_t__ malloc(int);
void prof(void) {
  int *s = (int *)malloc((sizeof(int) * 9973 * 9973));
  for (int c = 0; c < 1000; c++)
    convert(s, 9973);
  free((void *)s);
}


x86 assembly (clang, -O0):
<prof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x17b699e4,%edi
call   1050 <malloc@plt>
mov    %rax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x3e8,-0xc(%rbp)
jge    1176 <prof+0x46>
mov    -0x8(%rbp),%rdi
mov    $0x26f5,%esi
call   1040 <convert@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    114d <prof+0x1d>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prof>:
push   %rbp
push   %rbx
push   %rax
mov    $0x17b699e4,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    $0x3e8,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rbx,%rdi
mov    $0x26f5,%esi
call   1040 <convert@plt>
add    $0xffffffff,%ebp
jne    1150 <prof+0x20>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @prof() {
%1 = alloca i32*
%2 = alloca i32
%3 = call i64 @malloc(i32 397842916)
%4 = inttoptr i64 %3 to i32*
store i32* %4, i32** %1
store i32 0, i32* %2
br label %5
5: ; preds = %11, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 1000
br i1 %7, label %8, label %14
8: ; preds = %5
%9 = load i32*, i32** %1
%10 = call i32 @convert(i32* %9, i32 9973)
br label %11
11: ; preds = %8
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
br label %5
14: ; preds = %5
%15 = load i32*, i32** %1
%16 = bitcast i32* %15 to i8*
%17 = call i32 @free(i8* %16)
ret void
}

LLVM IR (-O2):
define void @prof() {
%1 = tail call i64 @malloc(i32 397842916)
%2 = inttoptr i64 %1 to i32*
br label %6
3: ; preds = %6
%4 = inttoptr i64 %1 to i8*
%5 = tail call i32 @free(i8* %4)
ret void
6: ; preds = %0, %6
%7 = phi i32 [ 0, %0 ], [ %9, %6 ]
%8 = tail call i32 @convert(i32* %2, i32 9973)
%9 = add nuw nsw i32 %7, 1
%10 = icmp eq i32 %9, 1000
br i1 %10, label %3, label %6
}
int main() {
  char arr[2][4], (*p)[4], *q;
  int v[4];
  p = arr;
  q = &arr[1][3];
  arr[1][3] = 2;
  v[0] = 2;
  if (arr[1][3] != 2)
    return 1;
  if (p[1][3] != 2)
    return 1;
  if (*q != 2)
    return 1;
  if (*v != 2)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0xc(%rbp),%rax
add    $0x4,%rax
add    $0x3,%rax
mov    %rax,-0x20(%rbp)
movb   $0x2,-0x5(%rbp)
movl   $0x2,-0x30(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x2,%eax
je     1147 <main+0x47>
movl   $0x1,-0x4(%rbp)
jmp    119d <main+0x9d>
mov    -0x18(%rbp),%rax
movsbl 0x7(%rax),%eax
cmp    $0x2,%eax
je     1164 <main+0x64>
movl   $0x1,-0x4(%rbp)
jmp    119d <main+0x9d>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2,%eax
je     1180 <main+0x80>
movl   $0x1,-0x4(%rbp)
jmp    119d <main+0x9d>
cmpl   $0x2,-0x30(%rbp)
je     1196 <main+0x96>
movl   $0x1,-0x4(%rbp)
jmp    119d <main+0x9d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef int u_short;

/* Variables and functions */
int ntohs(int);
int change_port(u_short *pport) {
  u_short port = ntohs(*pport);
  switch (port) {
  default:
    return 0;
  }
}


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

x86 assembly (clang, -O2):
<change_port>:
push   %rax
mov    (%rdi),%edi
call   1030 <ntohs@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @change_port(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* %4
%6 = call i32 @ntohs(i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
switch i32 %7, label %8 [
]
8: ; preds = %1
ret i32 0
}

LLVM IR (-O2):
define i32 @change_port(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @ntohs(i32 %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ TOSH_CLR_HUM_PWR_PIN();
void HUMIDITY_CLEAR_PWR() { TOSH_CLR_HUM_PWR_PIN(); }


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

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

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

LLVM IR (-O2):
define void @HUMIDITY_CLEAR_PWR() {
%1 = tail call i32 (...) @TOSH_CLR_HUM_PWR_PIN()
ret void
}
/* Variables and functions */
scalar_t__ puts(char const *);
int main(int argc, char *argv[]) {
  const char *s;
  s = (argc > 1) ? argv[1] : "y";
  while (puts(s) >= 0)
    continue;
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1141 <main+0x31>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x20(%rbp)
jmp    1151 <main+0x41>
lea    0xeb8(%rip),%rax
mov    %rax,-0x20(%rbp)
jmp    1151 <main+0x41>
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <puts@plt>
cmp    $0x0,%rax
jl     1171 <main+0x61>
jmp    1159 <main+0x49>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x2,%edi
jl     111c <main+0xc>
mov    0x8(%rsi),%rbx
jmp    1130 <main+0x20>
lea    0xedd(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbx,%rdi
call   1030 <puts@plt>
test   %rax,%rax
jns    1130 <main+0x20>
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"y\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
br label %7
7: ; preds = %2, %4
%8 = phi i8* [ %6, %4 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), %2 ]
br label %9
9: ; preds = %9, %7
%10 = tail call i64 @puts(i8* dereferenceable(1) %8)
%11 = icmp sgt i64 %10, -1
br i1 %11, label %9, label %12
12: ; preds = %9
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void mock_hard_with_a_vengeance(void) { printf("Are you mocking me?\n"); }


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"Are you mocking me?\0A\00"
define void @mock_hard_with_a_vengeance() {
%1 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [20 x i8] c"Are you mocking me?\00"
define void @mock_hard_with_a_vengeance() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usagemessage(void) {
  printf("usage:\nacquire_twophotontimes SECONDS FILEPATHNAME\n");
  printf("      e.g. twophotontimes 10 \"C:\\twophotontimes.txt\"\n");
}


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

x86 assembly (clang, -O2):
<usagemessage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0f(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [52 x i8] c"usage:\0Aacquire_twophotontimes SECONDS FILEPATHNAME\0A\00"
@.str.1 = [54 x i8] c" e.g. twophotontimes 10 \22C:\\twophotontimes.txt\22\0A\00"
define void @usagemessage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [51 x i8] c"usage:\0Aacquire_twophotontimes SECONDS FILEPATHNAME\00"
@str.2 = [53 x i8] c" e.g. twophotontimes 10 \22C:\\twophotontimes.txt\22\00"
define void @usagemessage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int close(int);
int g_ITEAPI_CloseDriverHandle(int hObject) { return (close(hObject)); }


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

x86 assembly (clang, -O2):
<g_ITEAPI_CloseDriverHandle>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @g_ITEAPI_CloseDriverHandle(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ replaceN(char *, char const *, char const *, int);
void replaceAll(char *line, const char *orig, const char *new) {
  replaceN(line, orig, new, -1);
}


x86 assembly (clang, -O0):
<replaceAll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0xffffffff,%ecx
call   1030 <replaceN@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<replaceAll>:
mov    $0xffffffff,%ecx
jmp    1030 <replaceN@plt>

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

LLVM IR (-O2):
define void @replaceAll(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @replaceN(i8* %0, i8* %1, i8* %2, i32 -1)
ret void
}
int graphresult(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @graphresult() {
ret i32 0
}
/* Variables and functions */
scalar_t__ strncmp(char const *, char *, int);
bool is_negated(const char *s) { return strncmp(s, "--no-", 5) == 0; }


x86 assembly (clang, -O0):
<is_negated>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_negated>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"--no-\00"
define i32 @is_negated(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strncmp(i8* %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 5)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
@.str = [6 x i8] c"--no-\00"
define i32 @is_negated(i8* %0) {
%2 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 5)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int test_generate_dungeon();
int test_get_opposite_direction_bit();
int test_neighbours();
int main() {
  int ret = 0;
  ret |= test_generate_dungeon();
  ret |= test_neighbours();
  ret |= test_get_opposite_direction_bit();
  return ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1040 <test_generate_dungeon@plt>
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <test_neighbours@plt>
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <test_get_opposite_direction_bit@plt>
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <test_generate_dungeon@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <test_neighbours@plt>
mov    %eax,%ebp
or     %ebx,%ebp
xor    %eax,%eax
call   1030 <test_get_opposite_direction_bit@plt>
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 (...) @test_generate_dungeon()
%4 = load i32, i32* %2
%5 = or i32 %4, %3
store i32 %5, i32* %2
%6 = call i32 (...) @test_neighbours()
%7 = load i32, i32* %2
%8 = or i32 %7, %6
store i32 %8, i32* %2
%9 = call i32 (...) @test_get_opposite_direction_bit()
%10 = load i32, i32* %2
%11 = or i32 %10, %9
store i32 %11, i32* %2
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_generate_dungeon()
%2 = tail call i32 (...) @test_neighbours()
%3 = or i32 %2, %1
%4 = tail call i32 (...) @test_get_opposite_direction_bit()
%5 = or i32 %3, %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *malloc(int);
void baselineGE(unsigned a) {
  char *b = ((void *)0);
  if (a >= -1U)
    b = malloc(1);
  if (a == -1U)
    free(b);
  return;
}


x86 assembly (clang, -O0):
<baselineGE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
jb     114b <baselineGE+0x2b>
mov    $0x1,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
jne    115e <baselineGE+0x3e>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<baselineGE>:
cmp    $0xffffffff,%edi
je     1126 <baselineGE+0x6>
ret
push   %rax
mov    $0x1,%edi
call   1040 <malloc@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @baselineGE(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
store i8* null, i8** %3
%4 = load i32, i32* %2
%5 = icmp uge i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i8* @malloc(i32 1)
store i8* %7, i8** %3
br label %8
8: ; preds = %6, %1
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, -1
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i8*, i8** %3
%13 = call i32 @free(i8* %12)
br label %14
14: ; preds = %11, %8
ret void
}

LLVM IR (-O2):
define void @baselineGE(i32 %0) {
%2 = icmp eq i32 %0, -1
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call dereferenceable_or_null(1) i8* @malloc(i32 1)
%5 = tail call i32 @free(i8* %4)
br label %6
6: ; preds = %1, %3
ret void
}
int inc(int x) {
  x = x + 1;
  return x;
}


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

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

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

LLVM IR (-O2):
define i32 @inc(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
void push_byte(int *bytes, char byte) { *bytes = ((*bytes) << 8) | byte; }


x86 assembly (clang, -O0):
<push_byte>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
shl    $0x8,%ecx
movsbl -0x9(%rbp),%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<push_byte>:
mov    (%rdi),%eax
shl    $0x8,%eax
or     %esi,%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @push_byte(i32* %0, i8 signext %1) {
%3 = alloca i32*
%4 = alloca i8
store i32* %0, i32** %3
store i8 %1, i8* %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %5
%7 = shl i32 %6, 8
%8 = load i8, i8* %4
%9 = sext i8 %8 to i32
%10 = or i32 %7, %9
%11 = load i32*, i32** %3
store i32 %10, i32* %11
ret void
}

LLVM IR (-O2):
define void @push_byte(i32* nocapture %0, i8 signext %1) {
%3 = load i32, i32* %0
%4 = shl i32 %3, 8
%5 = sext i8 %1 to i32
%6 = or i32 %4, %5
store i32 %6, i32* %0
ret void
}
/* Variables and functions */
int fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
int usage(char *name) {
  return fprintf(
      stderr, "usage: %s --bus=<bus> | -b <bus> --address=<addr> | -a <addr>\n",
      name);
}


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

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [63 x i8] c"usage: %s --bus=<bus> | -b <bus> --address=<addr> | -a <addr>\0A\00"
define i32 @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 %5
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [63 x i8] c"usage: %s --bus=<bus> | -b <bus> --address=<addr> | -a <addr>\0A\00"
define i32 @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 %3
}
int test_0() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @test_0() {
ret i32 0
}
float findxfrom_va_t(float va, float t) { return va * t; }


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

x86 assembly (clang, -O2):
<findxfrom_va_t>:
mulss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @findxfrom_va_t(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fmul float %5, %6
ret float %7
}

LLVM IR (-O2):
define float @findxfrom_va_t(float %0, float %1) {
%3 = fmul float %0, %1
ret float %3
}
/* Type definitions */
struct wlist_t {
  int dummy;
};

/* Variables and functions */
struct wlist_t *wlist_destroy_dupes(struct wlist_t *wlist) {
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.wlist_t = type { i32 }
define %struct.wlist_t* @wlist_destroy_dupes(%struct.wlist_t* %0) {
%2 = alloca %struct.wlist_t*
store %struct.wlist_t* %0, %struct.wlist_t** %2
ret %struct.wlist_t* null
}

LLVM IR (-O2):
%struct.wlist_t = type { i32 }
define noalias %struct.wlist_t* @wlist_destroy_dupes(%struct.wlist_t* nocapture readnone %0) {
ret %struct.wlist_t* null
}