#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 */
typedef scalar_t__ off_t;
typedef scalar_t__ __ptr_t;

/* Variables and functions */
int /*<<< orphan*/ _mmap(unsigned long *);
__ptr_t mmap(__ptr_t addr, size_t len, int prot, int flags, int fd, off_t off) {
  unsigned long buffer[6];
  buffer[0] = (unsigned long)addr;
  buffer[1] = (unsigned long)len;
  buffer[2] = (unsigned long)prot;
  buffer[3] = (unsigned long)flags;
  buffer[4] = (unsigned long)fd;
  buffer[5] = (unsigned long)off;
  return (__ptr_t)_mmap(buffer);
}


x86 assembly (clang, -O0):
<mmap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x58(%rbp)
movslq -0x14(%rbp),%rax
mov    %rax,-0x50(%rbp)
movslq -0x18(%rbp),%rax
mov    %rax,-0x48(%rbp)
movslq -0x1c(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x38(%rbp)
lea    -0x60(%rbp),%rdi
call   1030 <_mmap@plt>
cltq
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mmap>:
sub    $0x38,%rsp
mov    %rdi,(%rsp)
mov    %rsi,0x8(%rsp)
movslq %edx,%rax
mov    %rax,0x10(%rsp)
movslq %ecx,%rax
mov    %rax,0x18(%rsp)
movslq %r8d,%rax
mov    %rax,0x20(%rsp)
mov    %r9,0x28(%rsp)
mov    %rsp,%rdi
call   1030 <_mmap@plt>
cltq
add    $0x38,%rsp
ret

LLVM IR (-O0):
define i64 @mmap(i64 %0, i64 %1, i32 %2, i32 %3, i32 %4, i64 %5) {
%7 = alloca i64
%8 = alloca i64
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i64
%13 = alloca [6 x i64]
store i64 %0, i64* %7
store i64 %1, i64* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i64 %5, i64* %12
%14 = load i64, i64* %7
%15 = getelementptr inbounds [6 x i64], [6 x i64]* %13, i64 0, i64 0
store i64 %14, i64* %15
%16 = load i64, i64* %8
%17 = getelementptr inbounds [6 x i64], [6 x i64]* %13, i64 0, i64 1
store i64 %16, i64* %17
%18 = load i32, i32* %9
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [6 x i64], [6 x i64]* %13, i64 0, i64 2
store i64 %19, i64* %20
%21 = load i32, i32* %10
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [6 x i64], [6 x i64]* %13, i64 0, i64 3
store i64 %22, i64* %23
%24 = load i32, i32* %11
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [6 x i64], [6 x i64]* %13, i64 0, i64 4
store i64 %25, i64* %26
%27 = load i64, i64* %12
%28 = getelementptr inbounds [6 x i64], [6 x i64]* %13, i64 0, i64 5
store i64 %27, i64* %28
%29 = getelementptr inbounds [6 x i64], [6 x i64]* %13, i64 0, i64 0
%30 = call i32 @_mmap(i64* %29)
%31 = sext i32 %30 to i64
ret i64 %31
}

LLVM IR (-O2):
define i64 @mmap(i64 %0, i64 %1, i32 %2, i32 %3, i32 %4, i64 %5) {
%7 = alloca [6 x i64]
%8 = bitcast [6 x i64]* %7 to i8*
%9 = getelementptr inbounds [6 x i64], [6 x i64]* %7, i64 0, i64 0
store i64 %0, i64* %9
%10 = getelementptr inbounds [6 x i64], [6 x i64]* %7, i64 0, i64 1
store i64 %1, i64* %10
%11 = sext i32 %2 to i64
%12 = getelementptr inbounds [6 x i64], [6 x i64]* %7, i64 0, i64 2
store i64 %11, i64* %12
%13 = sext i32 %3 to i64
%14 = getelementptr inbounds [6 x i64], [6 x i64]* %7, i64 0, i64 3
store i64 %13, i64* %14
%15 = sext i32 %4 to i64
%16 = getelementptr inbounds [6 x i64], [6 x i64]* %7, i64 0, i64 4
store i64 %15, i64* %16
%17 = getelementptr inbounds [6 x i64], [6 x i64]* %7, i64 0, i64 5
store i64 %5, i64* %17
%18 = call i32 @_mmap(i64* %9)
%19 = sext i32 %18 to i64
ret i64 %19
}