xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ test_break_do_while();
int /*<<< orphan*/ test_break_for();
int /*<<< orphan*/ test_break_while();
int /*<<< orphan*/ test_continue_do_while();
int /*<<< orphan*/ test_continue_for();
int /*<<< orphan*/ test_continue_while();
int /*<<< orphan*/ test_do_while();
int /*<<< orphan*/ test_for();
int /*<<< orphan*/ test_while();
int main(void) {
  test_while();
  test_break_while();
  test_continue_while();
  test_do_while();
  test_break_do_while();
  test_continue_do_while();
  test_for();
  test_break_for();
  test_continue_for();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1090 <test_while@plt>
mov    $0x0,%al
call   10b0 <test_break_while@plt>
mov    $0x0,%al
call   1040 <test_continue_while@plt>
mov    $0x0,%al
call   1080 <test_do_while@plt>
mov    $0x0,%al
call   10a0 <test_break_do_while@plt>
mov    $0x0,%al
call   1070 <test_continue_do_while@plt>
mov    $0x0,%al
call   1060 <test_for@plt>
mov    $0x0,%al
call   1030 <test_break_for@plt>
mov    $0x0,%al
call   1050 <test_continue_for@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1090 <test_while@plt>
xor    %eax,%eax
call   10b0 <test_break_while@plt>
xor    %eax,%eax
call   1040 <test_continue_while@plt>
xor    %eax,%eax
call   1080 <test_do_while@plt>
xor    %eax,%eax
call   10a0 <test_break_do_while@plt>
xor    %eax,%eax
call   1070 <test_continue_do_while@plt>
xor    %eax,%eax
call   1060 <test_for@plt>
xor    %eax,%eax
call   1030 <test_break_for@plt>
xor    %eax,%eax
call   1050 <test_continue_for@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @test_while()
%2 = call i32 (...) @test_break_while()
%3 = call i32 (...) @test_continue_while()
%4 = call i32 (...) @test_do_while()
%5 = call i32 (...) @test_break_do_while()
%6 = call i32 (...) @test_continue_do_while()
%7 = call i32 (...) @test_for()
%8 = call i32 (...) @test_break_for()
%9 = call i32 (...) @test_continue_for()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_while()
%2 = tail call i32 (...) @test_break_while()
%3 = tail call i32 (...) @test_continue_while()
%4 = tail call i32 (...) @test_do_while()
%5 = tail call i32 (...) @test_break_do_while()
%6 = tail call i32 (...) @test_continue_do_while()
%7 = tail call i32 (...) @test_for()
%8 = tail call i32 (...) @test_break_for()
%9 = tail call i32 (...) @test_continue_for()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void czysc() { system("clear"); }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"clear\00"
define void @czysc() {
%1 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
define void @czysc() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
char *grace_get_agr_prompt(void) {
  char *agr_prompt;
  agr_prompt = "<br>&lt;Left Click&gt; to view Grace project file or &lt;Right "
               "Click&gt; to save.";
  return agr_prompt;
}


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

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

LLVM IR (-O0):
@.str = [82 x i8] c"<br>&lt;Left Click&gt; to view Grace project file or &lt;Right Click&gt; to save.\00"
define i8* @grace_get_agr_prompt() {
%1 = alloca i8*
store i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
ret i8* %2
}

LLVM IR (-O2):
@.str = [82 x i8] c"<br>&lt;Left Click&gt; to view Grace project file or &lt;Right Click&gt; to save.\00"
define i8* @grace_get_agr_prompt() {
ret i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str, i64 0, i64 0)
}
int foo(int n) { return n == 0 ? 1 : n * (n - foo(n - 1)); }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1132 <foo+0x22>
mov    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1159 <foo+0x49>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1030 <foo@plt>
mov    -0x10(%rbp),%ecx
mov    %eax,%edx
mov    -0xc(%rbp),%eax
sub    %edx,%ecx
imul   %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
test   %edi,%edi
je     112a <foo+0x1a>
push   %rbx
mov    %edi,%ebx
lea    -0x1(%rbx),%edi
call   1030 <foo@plt>
mov    %eax,%ecx
mov    %ebx,%eax
sub    %ecx,%eax
imul   %ebx,%eax
pop    %rbx
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1, %5
%4 = phi i32 [ %9, %5 ], [ 1, %1 ]
ret i32 %4
5: ; preds = %1
%6 = add nsw i32 %0, -1
%7 = tail call i32 @foo(i32 %6)
%8 = sub nsw i32 %0, %7
%9 = mul nsw i32 %8, %0
br label %3
}
void av_blowfish_alloc() {}


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

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

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

LLVM IR (-O2):
define void @av_blowfish_alloc() {
ret void
}
/* Variables and functions */
int partition(int *, int, int);
void quicksort(int a[], int low, int high) {
  int pindex;
  if ((high - low) < 1)
    return;
  else {
    pindex = partition(a, low, high);
    quicksort(a, low, pindex - 1);
    quicksort(a, pindex + 1, high);
  }
}


x86 assembly (clang, -O0):
<quicksort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
cmp    $0x1,%eax
jge    1146 <quicksort+0x26>
jmp    117c <quicksort+0x5c>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <partition@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1040 <quicksort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1040 <quicksort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quicksort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %esi,%edx
jle    1166 <quicksort+0x46>
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1030 <partition@plt>
mov    %eax,%ebx
lea    -0x1(%rbx),%edx
mov    %r15,%rdi
mov    %ebp,%esi
call   1040 <quicksort@plt>
add    $0x1,%ebx
mov    %ebx,%ebp
cmp    %r14d,%ebx
jl     1140 <quicksort+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @quicksort(i32* %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %2, %1
br i1 %4, label %5, label %11
5: ; preds = %3, %5
%6 = phi i32 [ %9, %5 ], [ %1, %3 ]
%7 = tail call i32 @partition(i32* %0, i32 %6, i32 %2)
%8 = add nsw i32 %7, -1
tail call void @quicksort(i32* %0, i32 %6, i32 %8)
%9 = add nsw i32 %7, 1
%10 = icmp slt i32 %9, %2
br i1 %10, label %5, label %11
11: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ arch_local_irq_restore(int /*<<< orphan*/);
void arch_local_irq_disable(void) { arch_local_irq_restore(0); }


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

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

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

LLVM IR (-O2):
define void @arch_local_irq_disable() {
%1 = tail call i32 @arch_local_irq_restore(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ ioctl_get_msg(int);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  int file_desc, ret_val;
  file_desc = open("/dev/postgresql_seq_dev", 0);
  if (file_desc < 0) {
    printf("Can't open device file: %s\n", "/dev/postgresql_seq_dev");
    exit(-1);
  }
  ioctl_get_msg(file_desc);
  close(file_desc);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xea1(%rip),%rdi
xor    %esi,%esi
call   1060 <open@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1190 <main+0x40>
lea    0xe9e(%rip),%rdi
lea    0xe7f(%rip),%rsi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1070 <exit@plt>
mov    -0x4(%rbp),%edi
call   1050 <ioctl_get_msg@plt>
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xea8(%rip),%rdi
xor    %esi,%esi
call   1060 <open@plt>
test   %eax,%eax
js     1177 <main+0x27>
mov    %eax,%ebx
mov    %eax,%edi
call   1050 <ioctl_get_msg@plt>
mov    %ebx,%edi
call   1040 <close@plt>
xor    %eax,%eax
pop    %rbx
ret
lea    0xe9a(%rip),%rdi
lea    0xe7b(%rip),%rsi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"/dev/postgresql_seq_dev\00"
@.str.1 = [28 x i8] c"Can't open device file: %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 @open(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 0)
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @exit(i32 -1)
unreachable
9: ; preds = %0
%10 = load i32, i32* %1
%11 = call i32 @ioctl_get_msg(i32 %10)
%12 = load i32, i32* %1
%13 = call i32 @close(i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"/dev/postgresql_seq_dev\00"
@.str.1 = [28 x i8] c"Can't open device file: %s\0A\00"
define i32 @main() {
%1 = tail call i32 @open(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @exit(i32 -1)
unreachable
6: ; preds = %0
%7 = tail call i32 @ioctl_get_msg(i32 %1)
%8 = tail call i32 @close(i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ error(int);
void exec_asmend(void) { error(1); }


x86 assembly (clang, -O0):
<exec_asmend>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <error@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @exec_asmend() {
%1 = call i32 @error(i32 1)
ret void
}

LLVM IR (-O2):
define void @exec_asmend() {
%1 = tail call i32 @error(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int test_ais_6(void) {
  fprintf(stderr, "test_ais_6() failed: Not Written\n");
  return 0;
}


x86 assembly (clang, -O0):
<test_ais_6>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ais_6>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [34 x i8] c"test_ais_6() failed: Not Written\0A\00"
define i32 @test_ais_6() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [34 x i8] c"test_ais_6() failed: Not Written\0A\00"
define i32 @test_ais_6() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void fn321E() { return; }


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

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

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

LLVM IR (-O2):
define void @fn321E() {
ret void
}
void SysTick_Init(void) {
  (*((volatile unsigned long *)0xE000E010)) = 0;
  (*((volatile unsigned long *)0xE000E014)) = 0x00FFFFFF;
  (*((volatile unsigned long *)0xE000E018)) = 0;
  (*((volatile unsigned long *)0xE000E010)) = 0x00000001 + 0x00000004;
}


x86 assembly (clang, -O0):
<SysTick_Init>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe000e010,%eax
movq   $0x0,(%rax)
mov    $0xe000e014,%eax
movq   $0xffffff,(%rax)
mov    $0xe000e018,%eax
movq   $0x0,(%rax)
mov    $0xe000e010,%eax
movq   $0x5,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysTick_Init>:
mov    $0xe000e010,%eax
movq   $0x0,(%rax)
movq   $0xffffff,0x4(%rax)
movq   $0x0,0x8(%rax)
movq   $0x5,(%rax)
ret

LLVM IR (-O0):
define void @SysTick_Init() {
store volatile i64 0, i64* inttoptr (i64 3758153744 to i64*)
store volatile i64 16777215, i64* inttoptr (i64 3758153748 to i64*)
store volatile i64 0, i64* inttoptr (i64 3758153752 to i64*)
store volatile i64 5, i64* inttoptr (i64 3758153744 to i64*)
ret void
}

LLVM IR (-O2):
define void @SysTick_Init() {
store volatile i64 0, i64* inttoptr (i64 3758153744 to i64*)
store volatile i64 16777215, i64* inttoptr (i64 3758153748 to i64*)
store volatile i64 0, i64* inttoptr (i64 3758153752 to i64*)
store volatile i64 5, i64* inttoptr (i64 3758153744 to i64*)
ret void
}
unsigned short vdp22_get_ps(unsigned short x) { return (x >> 15) & 0x1; }


x86 assembly (clang, -O0):
<vdp22_get_ps>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
sar    $0xf,%eax
and    $0x1,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vdp22_get_ps>:
mov    %edi,%eax
shr    $0xf,%eax
ret

LLVM IR (-O0):
define zeroext i16 @vdp22_get_ps(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = ashr i32 %4, 15
%6 = and i32 %5, 1
%7 = trunc i32 %6 to i16
ret i16 %7
}

LLVM IR (-O2):
define zeroext i16 @vdp22_get_ps(i16 zeroext %0) {
%2 = lshr i16 %0, 15
ret i16 %2
}
/* Variables and functions */
int /*<<< orphan*/ trap_CIN_RunCinematic(int);
void CG_RunCinematicFrame(int handle) { trap_CIN_RunCinematic(handle); }


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

x86 assembly (clang, -O2):
<CG_RunCinematicFrame>:
jmp    1030 <trap_CIN_RunCinematic@plt>

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

LLVM IR (-O2):
define void @CG_RunCinematicFrame(i32 %0) {
%2 = tail call i32 @trap_CIN_RunCinematic(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void caml_gr_synchronize() { exit(1); }


x86 assembly (clang, -O0):
<caml_gr_synchronize>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<caml_gr_synchronize>:
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @caml_gr_synchronize() {
%1 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @caml_gr_synchronize() {
%1 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ assert(char *);
int /*<<< orphan*/ unicode_reverse_codepoint_utf32(int /*<<< orphan*/, int);
int unicode_write_utf32_imp(uint32_t code_point, char *string, bool reverse) {
  assert(string);
  *((uint32_t *)string) = unicode_reverse_codepoint_utf32(code_point, reverse);
  return 4;
}


x86 assembly (clang, -O0):
<unicode_write_utf32_imp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x4(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1040 <unicode_reverse_codepoint_utf32@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x4,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unicode_write_utf32_imp>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1030 <assert@plt>
mov    %ebp,%edi
mov    %r14d,%esi
call   1040 <unicode_reverse_codepoint_utf32@plt>
mov    %eax,(%rbx)
mov    $0x4,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @unicode_write_utf32_imp(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = call i32 @assert(i8* %7)
%9 = load i32, i32* %4
%10 = load i32, i32* %6
%11 = call i32 @unicode_reverse_codepoint_utf32(i32 %9, i32 %10)
%12 = load i8*, i8** %5
%13 = bitcast i8* %12 to i32*
store i32 %11, i32* %13
ret i32 4
}

LLVM IR (-O2):
define i32 @unicode_write_utf32_imp(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @assert(i8* %1)
%5 = tail call i32 @unicode_reverse_codepoint_utf32(i32 %0, i32 %2)
%6 = bitcast i8* %1 to i32*
store i32 %5, i32* %6
ret i32 4
}
/* Variables and functions */
int /*<<< orphan*/ assert(unsigned int);
int main() {
  unsigned a = 12;
  unsigned b = 2;
  assert(a << b == 48);
  assert(a >> b == 3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xc,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    %cl,%eax
cmp    $0x30,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
shr    %cl,%eax
cmp    $0x3,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 12, i32* %2
store i32 2, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = shl i32 %4, %5
%7 = icmp eq i32 %6, 48
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = lshr i32 %10, %11
%13 = icmp eq i32 %12, 3
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
%2 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Variables and functions */
int WIFCONTINUED(int);
int goose_WIFCONTINUED(int status) { return WIFCONTINUED(status); }


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

x86 assembly (clang, -O2):
<goose_WIFCONTINUED>:
jmp    1030 <WIFCONTINUED@plt>

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

LLVM IR (-O2):
define i32 @goose_WIFCONTINUED(i32 %0) {
%2 = tail call i32 @WIFCONTINUED(i32 %0)
ret i32 %2
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
double wfa_timeval2double(struct timeval *tval) {
  return ((double)tval->tv_sec + (double)tval->tv_usec * 1e-6);
}


x86 assembly (clang, -O0):
<wfa_timeval2double>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cvtsi2sdq 0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
cvtsi2sdq (%rax),%xmm0
movsd  0xedd(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<wfa_timeval2double>:
cvtsi2sdq 0x8(%rdi),%xmm1
cvtsi2sdq (%rdi),%xmm0
mulsd  0xeed(%rip),%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define double @wfa_timeval2double(%struct.timeval* %0) {
%2 = alloca %struct.timeval*
store %struct.timeval* %0, %struct.timeval** %2
%3 = load %struct.timeval*, %struct.timeval** %2
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = load %struct.timeval*, %struct.timeval** %2
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i32 0, i32 0
%9 = load i64, i64* %8
%10 = sitofp i64 %9 to double
%11 = call double @llvm.fmuladd.f64(double %10, double 0x3EB0C6F7A0B5ED8D, double %6)
ret double %11
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define double @wfa_timeval2double(%struct.timeval* nocapture %0) {
%2 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 1
%3 = load i64, i64* %2
%4 = sitofp i64 %3 to double
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 0
%6 = load i64, i64* %5
%7 = sitofp i64 %6 to double
%8 = tail call double @llvm.fmuladd.f64(double %7, double 0x3EB0C6F7A0B5ED8D, double %4)
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hello(void) { printf("Hello Ctypes!\n"); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Hello Ctypes!\0A\00"
define void @hello() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [14 x i8] c"Hello Ctypes!\00"
define void @hello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char const *);
int /*<<< orphan*/ udpSend(int, char const *);
int wpStatus();
void send(const char *s) {
  printf("%4x SENDING: %s\n", wpStatus(), s);
  udpSend(33333, s);
}


x86 assembly (clang, -O0):
<send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1050 <wpStatus@plt>
mov    %eax,%esi
mov    -0x8(%rbp),%rdx
lea    0xeb0(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rsi
mov    $0x8235,%edi
call   1030 <udpSend@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <wpStatus@plt>
lea    0xebe(%rip),%rdi
mov    %eax,%esi
mov    %rbx,%rdx
call   1040 <printf@plt>
mov    $0x8235,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <udpSend@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"%4x SENDING: %s\0A\00"
define void @send(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @wpStatus()
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %3, i8* %4)
%6 = load i8*, i8** %2
%7 = call i32 @udpSend(i32 33333, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"%4x SENDING: %s\0A\00"
define void @send(i8* %0) {
%2 = tail call i32 (...) @wpStatus()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %2, i8* %0)
%4 = tail call i32 @udpSend(i32 33333, i8* %0)
ret void
}
void McASPTxIntEnable(unsigned int baseAddr, unsigned int intMask) {
  (*((volatile unsigned int *)(baseAddr + (0xBC)))) |= intMask;
}


x86 assembly (clang, -O0):
<McASPTxIntEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edx
mov    -0x4(%rbp),%eax
add    $0xbc,%eax
mov    %eax,%eax
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<McASPTxIntEnable>:
add    $0xbc,%edi
or     %esi,(%rdi)
ret

LLVM IR (-O0):
define void @McASPTxIntEnable(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 = load i32, i32* %3
%7 = add i32 %6, 188
%8 = zext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
%10 = load volatile i32, i32* %9
%11 = or i32 %10, %5
store volatile i32 %11, i32* %9
ret void
}

LLVM IR (-O2):
define void @McASPTxIntEnable(i32 %0, i32 %1) {
%3 = add i32 %0, 188
%4 = zext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
%7 = or i32 %6, %1
store volatile i32 %7, i32* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n = 0;
  int p = 0;
  scanf("%d", &n);
  scanf("%d", &p);
  int result = (~(1 << p)) & n;
  printf("%d\n", result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xebc(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeac(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
xor    $0xffffffff,%eax
and    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
lea    0xec4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0x8(%rsp),%al
mov    0xc(%rsp),%esi
btr    %eax,%esi
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %2
%8 = shl nuw i32 1, %7
%9 = xor i32 %8, -1
%10 = load i32, i32* %1
%11 = and i32 %10, %9
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %11)
ret i32 0
}
void putc_ll(char value) {}


x86 assembly (clang, -O0):
<putc_ll>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @putc_ll(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
ret void
}

LLVM IR (-O2):
define void @putc_ll(i8 signext %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ bzero(char *, int);
int /*<<< orphan*/ localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strftime(char *, int, char *, int /*<<< orphan*/);
void time_to_string(char *dest, int len, time_t timestamp) {
  bzero(dest, len);
  strftime(dest, len, "%d/%m/%Y %H:%M", localtime(&timestamp));
}


x86 assembly (clang, -O0):
<time_to_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1050 <bzero@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
lea    -0x10(%rbp),%rdi
call   1030 <localtime@plt>
mov    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    %eax,%ecx
lea    0xe8b(%rip),%rdx
call   1040 <strftime@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_to_string>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    %edx,0x4(%rsp)
call   1050 <bzero@plt>
lea    0x4(%rsp),%rdi
call   1030 <localtime@plt>
lea    0xeae(%rip),%rdx
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %eax,%ecx
call   1040 <strftime@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"%d/%m/%Y %H:%M\00"
define void @time_to_string(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = call i32 @bzero(i8* %7, i32 %8)
%10 = load i8*, i8** %4
%11 = load i32, i32* %5
%12 = call i32 @localtime(i32* %6)
%13 = call i32 @strftime(i8* %10, i32 %11, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %12)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%d/%m/%Y %H:%M\00"
define void @time_to_string(i8* %0, i32 %1, i32 %2) {
%4 = alloca i32
store i32 %2, i32* %4
%5 = tail call i32 @bzero(i8* %0, i32 %1)
%6 = call i32 @localtime(i32* %4)
%7 = call i32 @strftime(i8* %0, i32 %1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}
/* Variables and functions */
scalar_t__ resolve_access();
scalar_t__ resolve_iface();
scalar_t__ resolve_protocol();
int resolve_functions() {
  return resolve_access() && resolve_iface() && resolve_protocol();
}


x86 assembly (clang, -O0):
<resolve_functions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <resolve_access@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
je     117b <resolve_functions+0x4b>
mov    $0x0,%al
call   1050 <resolve_iface@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
je     117b <resolve_functions+0x4b>
mov    $0x0,%al
call   1040 <resolve_protocol@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<resolve_functions>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <resolve_access@plt>
test   %rax,%rax
je     115c <resolve_functions+0x2c>
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <resolve_iface@plt>
test   %rax,%rax
je     115c <resolve_functions+0x2c>
xor    %eax,%eax
call   1040 <resolve_protocol@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @resolve_functions() {
%1 = call i64 (...) @resolve_access()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %9
3: ; preds = %0
%4 = call i64 (...) @resolve_iface()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = call i64 (...) @resolve_protocol()
%8 = icmp ne i64 %7, 0
br label %9
9: ; preds = %6, %3, %0
%10 = phi i1 [ false, %3 ], [ false, %0 ], [ %8, %6 ]
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @resolve_functions() {
%1 = tail call i64 (...) @resolve_access()
%2 = icmp eq i64 %1, 0
br i1 %2, label %10, label %3
3: ; preds = %0
%4 = tail call i64 (...) @resolve_iface()
%5 = icmp eq i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = tail call i64 (...) @resolve_protocol()
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %3, %0
%11 = phi i32 [ 0, %3 ], [ 0, %0 ], [ %9, %6 ]
ret i32 %11
}
/* Type definitions */
struct wpabuf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ os_strlen(char const *);
int /*<<< orphan*/ wpabuf_put_data(struct wpabuf *, char const *,
                                   int /*<<< orphan*/);
void wpabuf_put_str(struct wpabuf *dst, const char *str) {
  wpabuf_put_data(dst, str, os_strlen(str));
}


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

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

LLVM IR (-O0):
%struct.wpabuf = type { i32 }
define void @wpabuf_put_str(%struct.wpabuf* %0, i8* %1) {
%3 = alloca %struct.wpabuf*
%4 = alloca i8*
store %struct.wpabuf* %0, %struct.wpabuf** %3
store i8* %1, i8** %4
%5 = load %struct.wpabuf*, %struct.wpabuf** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @os_strlen(i8* %7)
%9 = call i32 @wpabuf_put_data(%struct.wpabuf* %5, i8* %6, i32 %8)
ret void
}

LLVM IR (-O2):
%struct.wpabuf = type { i32 }
define void @wpabuf_put_str(%struct.wpabuf* %0, i8* %1) {
%3 = tail call i32 @os_strlen(i8* %1)
%4 = tail call i32 @wpabuf_put_data(%struct.wpabuf* %0, i8* %1, i32 %3)
ret void
}
long CRYPTO_dbg_get_options(void) { return (0); }


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

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

LLVM IR (-O0):
define i64 @CRYPTO_dbg_get_options() {
ret i64 0
}

LLVM IR (-O2):
define i64 @CRYPTO_dbg_get_options() {
ret i64 0
}
__attribute__((visibility("default"))) void gcc47_inscount(void) {}


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

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

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

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

/* Variables and functions */
int EOF;
int /*<<< orphan*/ alloc_mtf(int);
int /*<<< orphan*/ free_mtf_table();
int /*<<< orphan*/ get_mtf_c(int);
int getc(int /*<<< orphan*/ *);
int /*<<< orphan*/ putc(int /*<<< orphan*/, int /*<<< orphan*/ *);
void mtf_list_decode(FILE *in, FILE *out) {
  int curr, i;
  alloc_mtf(256);
  while ((i = getc(in)) != EOF) {
    putc(get_mtf_c(i), out);
  }
  free_mtf_table();
}


x86 assembly (clang, -O0):
<mtf_list_decode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x100,%edi
call   1030 <alloc_mtf@plt>
mov    -0x8(%rbp),%rdi
call   1070 <getc@plt>
mov    %eax,-0x18(%rbp)
mov    0x2e6b(%rip),%rcx
cmp    (%rcx),%eax
je     119d <mtf_list_decode+0x4d>
mov    -0x18(%rbp),%edi
call   1060 <get_mtf_c@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
call   1040 <putc@plt>
jmp    116a <mtf_list_decode+0x1a>
mov    $0x0,%al
call   1050 <free_mtf_table@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mtf_list_decode>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x100,%edi
call   1030 <alloc_mtf@plt>
mov    %rbx,%rdi
call   1070 <getc@plt>
mov    0x2e74(%rip),%r15
cmp    (%r15),%eax
je     119e <mtf_list_decode+0x4e>
nopl   0x0(%rax)
mov    %eax,%edi
call   1060 <get_mtf_c@plt>
mov    %eax,%edi
mov    %r14,%rsi
call   1040 <putc@plt>
mov    %rbx,%rdi
call   1070 <getc@plt>
cmp    (%r15),%eax
jne    1180 <mtf_list_decode+0x30>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <free_mtf_table@plt>

LLVM IR (-O0):
@EOF = global i32 0
define void @mtf_list_decode(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 = call i32 @alloc_mtf(i32 256)
br label %8
8: ; preds = %13, %2
%9 = load i32*, i32** %3
%10 = call i32 @getc(i32* %9)
store i32 %10, i32* %6
%11 = load i32, i32* @EOF
%12 = icmp ne i32 %10, %11
br i1 %12, label %13, label %18
13: ; preds = %8
%14 = load i32, i32* %6
%15 = call i32 @get_mtf_c(i32 %14)
%16 = load i32*, i32** %4
%17 = call i32 @putc(i32 %15, i32* %16)
br label %8
18: ; preds = %8
%19 = call i32 (...) @free_mtf_table()
ret void
}

LLVM IR (-O2):
@EOF = global i32 0
define void @mtf_list_decode(i32* nocapture %0, i32* nocapture %1) {
%3 = tail call i32 @alloc_mtf(i32 256)
%4 = tail call i32 @getc(i32* %0)
%5 = load i32, i32* @EOF
%6 = icmp eq i32 %4, %5
br i1 %6, label %14, label %7
7: ; preds = %2, %7
%8 = phi i32 [ %11, %7 ], [ %4, %2 ]
%9 = tail call i32 @get_mtf_c(i32 %8)
%10 = tail call i32 @putc(i32 %9, i32* %1)
%11 = tail call i32 @getc(i32* %0)
%12 = load i32, i32* @EOF
%13 = icmp eq i32 %11, %12
br i1 %13, label %14, label %7
14: ; preds = %7, %2
%15 = tail call i32 (...) @free_mtf_table()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int *);
int main(void) {
  int hoge;
  int *hoge_p;
  hoge_p = &hoge;
  printf("hoge_p..%p\n", hoge_p);
  hoge_p++;
  printf("hoge_p..%p\n", hoge_p);
  printf("hoge_p..%p\n", hoge_p + 3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
add    $0xc,%rsi
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xee4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0x1c(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"hoge_p..%p\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = getelementptr inbounds i32, i32* %1, i64 1
%5 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %4)
%6 = getelementptr inbounds i32, i32* %1, i64 4
%7 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %6)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, float *);
float read_float(FILE *fp) {
  float f;
  fscanf(fp, "%f", &f);
  return f;
}


x86 assembly (clang, -O0):
<read_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
lea    -0xc(%rbp),%rdx
call   1030 <fscanf@plt>
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_float>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1030 <fscanf@plt>
movss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
define float @read_float(i32* %0) {
%2 = alloca i32*
%3 = alloca float
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @fscanf(i32* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %3)
%6 = load float, float* %3
ret float %6
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define float @read_float(i32* nocapture %0) {
%2 = alloca float
%3 = bitcast float* %2 to i8*
%4 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%5 = load float, float* %2
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(void) {
  puts("hello, world");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"hello, world\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"hello, world\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ parse_example();
int /*<<< orphan*/ serialize_example();
int main(void) {
  parse_example();
  serialize_example();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <parse_example@plt>
mov    $0x0,%al
call   1040 <serialize_example@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @parse_example()
%3 = call i32 (...) @serialize_example()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @parse_example()
%2 = tail call i32 (...) @serialize_example()
ret i32 0
}
double min(double a, double b) { return (a > b) ? b : a; }


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    112d <min+0x2d>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1137 <min+0x37>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
minsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @min(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp ogt double %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load double, double* %4
br label %12
10: ; preds = %2
%11 = load double, double* %3
br label %12
12: ; preds = %10, %8
%13 = phi double [ %9, %8 ], [ %11, %10 ]
ret double %13
}

LLVM IR (-O2):
define double @min(double %0, double %1) {
%3 = fcmp ogt double %0, %1
%4 = select i1 %3, double %1, double %0
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void a2(int *a, int b, int c) { printf("%d", (int)(&c - &b)); }


x86 assembly (clang, -O0):
<a2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
lea    -0x10(%rbp),%rax
lea    -0xc(%rbp),%rcx
sub    %rcx,%rax
sar    $0x2,%rax
mov    %eax,%esi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a2>:
push   %rax
mov    %esi,0x4(%rsp)
mov    %edx,(%rsp)
lea    0x4(%rsp),%rax
neg    %rax
lea    (%rsp,%rax,1),%rsi
shr    $0x2,%rsi
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define void @a2(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 = ptrtoint i32* %6 to i64
%8 = ptrtoint i32* %5 to i64
%9 = sub i64 %7, %8
%10 = sdiv exact i64 %9, 4
%11 = trunc i64 %10 to i32
%12 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @a2(i32* nocapture readnone %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
store i32 %1, i32* %4
store i32 %2, i32* %5
%6 = ptrtoint i32* %5 to i64
%7 = ptrtoint i32* %4 to i64
%8 = sub i64 %6, %7
%9 = lshr exact i64 %8, 2
%10 = trunc i64 %9 to i32
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %10)
ret void
}
unsigned __VERIFIER_nondet_unsigned() {
  unsigned val;
  return val;
}


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

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

LLVM IR (-O0):
define i32 @__VERIFIER_nondet_unsigned() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @__VERIFIER_nondet_unsigned() {
ret i32 undef
}
void f() {
  int x = 3;
  int b = 4;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movl   $0x3,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f() {
%1 = alloca i32
%2 = alloca i32
store i32 3, i32* %1
store i32 4, i32* %2
ret void
}

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