#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ __NR_mmap;
int /*<<< orphan*/ loop();
int /*<<< orphan*/ syscall(int /*<<< orphan*/, int, int, unsigned long, int,
                           int, unsigned long);
int main(void) {
  syscall(__NR_mmap, 0x1ffff000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul);
  syscall(__NR_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x32ul, -1, 0ul);
  syscall(__NR_mmap, 0x21000000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul);
  loop();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
mov    $0x1ffff000,%esi
mov    $0x1000,%edx
xor    %eax,%eax
mov    %eax,%ecx
mov    $0x32,%r8d
mov    $0xffffffff,%r9d
movq   $0x0,(%rsp)
call   1040 <syscall@plt>
mov    0x2e82(%rip),%rax
mov    (%rax),%edi
mov    $0x20000000,%esi
mov    $0x1000000,%edx
mov    $0x7,%ecx
mov    $0x32,%r8d
mov    $0xffffffff,%r9d
xor    %eax,%eax
movq   $0x0,(%rsp)
call   1040 <syscall@plt>
mov    0x2e4f(%rip),%rax
mov    (%rax),%edi
mov    $0x21000000,%esi
mov    $0x1000,%edx
xor    %eax,%eax
mov    %eax,%ecx
mov    $0x32,%r8d
mov    $0xffffffff,%r9d
movq   $0x0,(%rsp)
call   1040 <syscall@plt>
mov    $0x0,%al
call   1030 <loop@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    0x2ebc(%rip),%rbx
mov    (%rbx),%edi
movq   $0x0,(%rsp)
mov    $0x1ffff000,%esi
mov    $0x1000,%edx
xor    %ecx,%ecx
mov    $0x32,%r8d
mov    $0xffffffff,%r9d
call   1040 <syscall@plt>
mov    (%rbx),%edi
movq   $0x0,(%rsp)
mov    $0x7,%ecx
mov    $0x20000000,%esi
mov    $0x1000000,%edx
mov    $0x32,%r8d
mov    $0xffffffff,%r9d
call   1040 <syscall@plt>
mov    (%rbx),%edi
movq   $0x0,(%rsp)
mov    $0x21000000,%esi
mov    $0x1000,%edx
xor    %ecx,%ecx
mov    $0x32,%r8d
mov    $0xffffffff,%r9d
call   1040 <syscall@plt>
xor    %eax,%eax
call   1030 <loop@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__NR_mmap = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @__NR_mmap
%3 = call i32 @syscall(i32 %2, i32 536866816, i32 4096, i64 0, i32 50, i32 -1, i64 0)
%4 = load i32, i32* @__NR_mmap
%5 = call i32 @syscall(i32 %4, i32 536870912, i32 16777216, i64 7, i32 50, i32 -1, i64 0)
%6 = load i32, i32* @__NR_mmap
%7 = call i32 @syscall(i32 %6, i32 553648128, i32 4096, i64 0, i32 50, i32 -1, i64 0)
%8 = call i32 (...) @loop()
ret i32 0
}

LLVM IR (-O2):
@__NR_mmap = global i32 0
define i32 @main() {
%1 = load i32, i32* @__NR_mmap
%2 = tail call i32 @syscall(i32 %1, i32 536866816, i32 4096, i64 0, i32 50, i32 -1, i64 0)
%3 = load i32, i32* @__NR_mmap
%4 = tail call i32 @syscall(i32 %3, i32 536870912, i32 16777216, i64 7, i32 50, i32 -1, i64 0)
%5 = load i32, i32* @__NR_mmap
%6 = tail call i32 @syscall(i32 %5, i32 553648128, i32 4096, i64 0, i32 50, i32 -1, i64 0)
%7 = tail call i32 (...) @loop()
ret i32 0
}