#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 */
struct katcp_dispatch {
  int dummy;
};
struct katcp_arb {
  int dummy;
};

/* Variables and functions */
struct katcp_arb *create_type_arb_katcp(
    struct katcp_dispatch *, char *, int /*<<< orphan*/, int, unsigned int,
    int (*)(struct katcp_dispatch *, struct katcp_arb *, unsigned int), void *);
struct katcp_arb *create_arb_katcp(struct katcp_dispatch *d, char *name, int fd,
                                   unsigned int mode,
                                   int (*run)(struct katcp_dispatch *d,
                                              struct katcp_arb *a,
                                              unsigned int mode),
                                   void *data) {
  return create_type_arb_katcp(d, name, 0, fd, mode, run, data);
}


x86 assembly (clang, -O0):
<create_arb_katcp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    -0x20(%rbp),%r9
mov    -0x28(%rbp),%rax
xor    %edx,%edx
mov    %rax,(%rsp)
call   1030 <create_type_arb_katcp@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_arb_katcp>:
push   %rax
mov    %r8,%rax
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %r9,(%rsp)
xor    %edx,%edx
mov    %rax,%r9
call   1030 <create_type_arb_katcp@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.katcp_arb = type { i32 }
%struct.katcp_dispatch = type { i32 }
define %struct.katcp_arb* @create_arb_katcp(%struct.katcp_dispatch* %0, i8* %1, i32 %2, i32 %3, i32 (%struct.katcp_dispatch*, %struct.katcp_arb*, i32)* %4, i8* %5) {
%7 = alloca %struct.katcp_dispatch*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32 (%struct.katcp_dispatch*, %struct.katcp_arb*, i32)*
%12 = alloca i8*
store %struct.katcp_dispatch* %0, %struct.katcp_dispatch** %7
store i8* %1, i8** %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 (%struct.katcp_dispatch*, %struct.katcp_arb*, i32)* %4, i32 (%struct.katcp_dispatch*, %struct.katcp_arb*, i32)** %11
store i8* %5, i8** %12
%13 = load %struct.katcp_dispatch*, %struct.katcp_dispatch** %7
%14 = load i8*, i8** %8
%15 = load i32, i32* %9
%16 = load i32, i32* %10
%17 = load i32 (%struct.katcp_dispatch*, %struct.katcp_arb*, i32)*, i32 (%struct.katcp_dispatch*, %struct.katcp_arb*, i32)** %11
%18 = load i8*, i8** %12
%19 = call %struct.katcp_arb* @create_type_arb_katcp(%struct.katcp_dispatch* %13, i8* %14, i32 0, i32 %15, i32 %16, i32 (%struct.katcp_dispatch*, %struct.katcp_arb*, i32)* %17, i8* %18)
ret %struct.katcp_arb* %19
}

LLVM IR (-O2):
%struct.katcp_arb = type { i32 }
%struct.katcp_dispatch = type { i32 }
define %struct.katcp_arb* @create_arb_katcp(%struct.katcp_dispatch* %0, i8* %1, i32 %2, i32 %3, i32 (%struct.katcp_dispatch*, %struct.katcp_arb*, i32)* %4, i8* %5) {
%7 = tail call %struct.katcp_arb* @create_type_arb_katcp(%struct.katcp_dispatch* %0, i8* %1, i32 0, i32 %2, i32 %3, i32 (%struct.katcp_dispatch*, %struct.katcp_arb*, i32)* %4, i8* %5)
ret %struct.katcp_arb* %7
}