#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 int uint8_t;
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int fs_univ_create(int /*<<< orphan*/, int /*<<< orphan*/, int,
                   int /*<<< orphan*/, int /*<<< orphan*/, int const *, int,
                   int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/,
                   int /*<<< orphan*/, int /*<<< orphan*/ *, int /*<<< orphan*/,
                   int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/,
                   int /*<<< orphan*/ *, int *);
int fsnodes_type_convert(int);
int /*<<< orphan*/ main_time();
uint8_t fs_mknod(uint32_t rootinode, uint8_t sesflags, uint32_t parent,
                 uint16_t nleng, const uint8_t *name, uint8_t type,
                 uint16_t mode, uint16_t cumask, uint32_t uid, uint32_t gids,
                 uint32_t *gid, uint32_t auid, uint32_t agid, uint32_t rdev,
                 uint32_t *inode, uint8_t attr[35]) {
  if (type > 15) {
    type = fsnodes_type_convert(type);
  }
  return fs_univ_create(main_time(), rootinode, sesflags, parent, nleng, name,
                        type, mode, cumask, uid, gids, gid, auid, agid, rdev, 0,
                        inode, attr);
}


x86 assembly (clang, -O0):
<fs_mknod>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
mov    0x58(%rbp),%rax
mov    0x50(%rbp),%rax
mov    0x48(%rbp),%eax
mov    0x40(%rbp),%eax
mov    0x38(%rbp),%eax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x2c(%rbp)
mov    %esi,-0x30(%rbp)
mov    %edx,-0x34(%rbp)
mov    %ecx,-0x38(%rbp)
mov    %r8,-0x40(%rbp)
mov    %r9d,-0x44(%rbp)
cmpl   $0xf,-0x44(%rbp)
jle    118e <fs_mknod+0x5e>
mov    -0x44(%rbp),%edi
call   1040 <fsnodes_type_convert@plt>
mov    %eax,-0x44(%rbp)
mov    $0x0,%al
call   1050 <main_time@plt>
mov    %eax,%edi
mov    -0x2c(%rbp),%esi
mov    -0x30(%rbp),%edx
mov    -0x34(%rbp),%ecx
mov    -0x38(%rbp),%r8d
mov    -0x40(%rbp),%r9
mov    -0x44(%rbp),%eax
mov    %eax,-0x5c(%rbp)
mov    0x10(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    0x18(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    0x20(%rbp),%r13d
mov    0x28(%rbp),%r12d
mov    0x30(%rbp),%r15
mov    0x38(%rbp),%r14d
mov    0x40(%rbp),%ebx
mov    0x48(%rbp),%r11d
mov    0x50(%rbp),%r10
mov    0x58(%rbp),%rax
mov    %rax,-0x50(%rbp)
xor    %eax,%eax
mov    -0x5c(%rbp),%eax
mov    %eax,(%rsp)
mov    -0x58(%rbp),%eax
mov    %eax,0x8(%rsp)
mov    -0x54(%rbp),%eax
mov    %eax,0x10(%rsp)
mov    -0x50(%rbp),%rax
mov    %r13d,0x18(%rsp)
mov    %r12d,0x20(%rsp)
mov    %r15,0x28(%rsp)
mov    %r14d,0x30(%rsp)
mov    %ebx,0x38(%rsp)
mov    %r11d,0x40(%rsp)
movl   $0x0,0x48(%rsp)
mov    %r10,0x50(%rsp)
mov    %rax,0x58(%rsp)
call   1030 <fs_univ_create@plt>
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<fs_mknod>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9d,%ebx
mov    %r8,%r14
mov    %ecx,%r15d
mov    %edx,%r12d
mov    %esi,%r13d
mov    %edi,%ebp
cmp    $0x10,%r9d
jl     115b <fs_mknod+0x2b>
mov    %ebx,%edi
call   1040 <fsnodes_type_convert@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <main_time@plt>
mov    %eax,%edi
mov    %ebp,%esi
mov    %r13d,%edx
mov    %r12d,%ecx
mov    %r15d,%r8d
mov    %r14,%r9
push   0x88(%rsp)
push   0x88(%rsp)
push   $0x0
mov    0x90(%rsp),%eax
push   %rax
mov    0x90(%rsp),%eax
push   %rax
mov    0x90(%rsp),%eax
push   %rax
push   0x90(%rsp)
mov    0x90(%rsp),%eax
push   %rax
mov    0x90(%rsp),%eax
push   %rax
mov    0x90(%rsp),%eax
push   %rax
mov    0x90(%rsp),%eax
push   %rax
push   %rbx
call   1030 <fs_univ_create@plt>
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @fs_mknod(i32 %0, i32 %1, i32 %2, i32 %3, i32* %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i32* %10, i32 %11, i32 %12, i32 %13, i32* %14, i32* %15) {
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32*
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32*
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
%31 = alloca i32*
%32 = alloca i32*
store i32 %0, i32* %17
store i32 %1, i32* %18
store i32 %2, i32* %19
store i32 %3, i32* %20
store i32* %4, i32** %21
store i32 %5, i32* %22
store i32 %6, i32* %23
store i32 %7, i32* %24
store i32 %8, i32* %25
store i32 %9, i32* %26
store i32* %10, i32** %27
store i32 %11, i32* %28
store i32 %12, i32* %29
store i32 %13, i32* %30
store i32* %14, i32** %31
store i32* %15, i32** %32
%33 = load i32, i32* %22
%34 = icmp sgt i32 %33, 15
br i1 %34, label %35, label %38
35: ; preds = %16
%36 = load i32, i32* %22
%37 = call i32 @fsnodes_type_convert(i32 %36)
store i32 %37, i32* %22
br label %38
38: ; preds = %35, %16
%39 = call i32 (...) @main_time()
%40 = load i32, i32* %17
%41 = load i32, i32* %18
%42 = load i32, i32* %19
%43 = load i32, i32* %20
%44 = load i32*, i32** %21
%45 = load i32, i32* %22
%46 = load i32, i32* %23
%47 = load i32, i32* %24
%48 = load i32, i32* %25
%49 = load i32, i32* %26
%50 = load i32*, i32** %27
%51 = load i32, i32* %28
%52 = load i32, i32* %29
%53 = load i32, i32* %30
%54 = load i32*, i32** %31
%55 = load i32*, i32** %32
%56 = call i32 @fs_univ_create(i32 %39, i32 %40, i32 %41, i32 %42, i32 %43, i32* %44, i32 %45, i32 %46, i32 %47, i32 %48, i32 %49, i32* %50, i32 %51, i32 %52, i32 %53, i32 0, i32* %54, i32* %55)
ret i32 %56
}

LLVM IR (-O2):
define i32 @fs_mknod(i32 %0, i32 %1, i32 %2, i32 %3, i32* %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i32* %10, i32 %11, i32 %12, i32 %13, i32* %14, i32* %15) {
%17 = icmp sgt i32 %5, 15
br i1 %17, label %18, label %20
18: ; preds = %16
%19 = tail call i32 @fsnodes_type_convert(i32 %5)
br label %20
20: ; preds = %18, %16
%21 = phi i32 [ %19, %18 ], [ %5, %16 ]
%22 = tail call i32 (...) @main_time()
%23 = tail call i32 @fs_univ_create(i32 %22, i32 %0, i32 %1, i32 %2, i32 %3, i32* %4, i32 %21, i32 %6, i32 %7, i32 %8, i32 %9, i32* %10, i32 %11, i32 %12, i32 %13, i32 0, i32* %14, i32* %15)
ret i32 %23
}