#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;
};

/* Variables and functions */
int store_sensor_mode_katcp(
    struct katcp_dispatch *, unsigned int, char *, int /*<<< orphan*/ *,
    int (*)(struct katcp_dispatch *, struct katcp_notice *, char *,
            unsigned int),
    void (*)(struct katcp_dispatch *, unsigned int), void *,
    void (*)(struct katcp_dispatch *, unsigned int), int /*<<< orphan*/);
int store_full_mode_katcp(
    struct katcp_dispatch *d, unsigned int mode, char *name,
    int (*enter)(struct katcp_dispatch *d, struct katcp_notice *n, char *flags,
                 unsigned int to),
    void (*leave)(struct katcp_dispatch *d, unsigned int to), void *state,
    void (*clear)(struct katcp_dispatch *d, unsigned int mode)) {
  return store_sensor_mode_katcp(d, mode, name, NULL, enter, leave, state,
                                 clear, 0);
}


x86 assembly (clang, -O0):
<store_full_mode_katcp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x30(%rbp),%r10
mov    0x10(%rbp),%rax
xor    %ecx,%ecx
xor    %r11d,%r11d
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
movl   $0x0,0x10(%rsp)
call   1030 <store_sensor_mode_katcp@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<store_full_mode_katcp>:
push   %rax
mov    %r9,%rax
mov    %r8,%r9
mov    %rcx,%r8
sub    $0x8,%rsp
xor    %ecx,%ecx
push   $0x0
push   0x20(%rsp)
push   %rax
call   1030 <store_sensor_mode_katcp@plt>
add    $0x20,%rsp
pop    %rcx
ret

LLVM IR (-O0):
%struct.katcp_dispatch = type { i32 }
%struct.katcp_notice = type opaque
%struct.katcp_notice.0 = type opaque
define i32 @store_full_mode_katcp(%struct.katcp_dispatch* %0, i32 %1, i8* %2, i32 (%struct.katcp_dispatch*, %struct.katcp_notice*, i8*, i32)* %3, void (%struct.katcp_dispatch*, i32)* %4, i8* %5, void (%struct.katcp_dispatch*, i32)* %6) {
%8 = alloca %struct.katcp_dispatch*
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i32 (%struct.katcp_dispatch*, %struct.katcp_notice*, i8*, i32)*
%12 = alloca void (%struct.katcp_dispatch*, i32)*
%13 = alloca i8*
%14 = alloca void (%struct.katcp_dispatch*, i32)*
store %struct.katcp_dispatch* %0, %struct.katcp_dispatch** %8
store i32 %1, i32* %9
store i8* %2, i8** %10
store i32 (%struct.katcp_dispatch*, %struct.katcp_notice*, i8*, i32)* %3, i32 (%struct.katcp_dispatch*, %struct.katcp_notice*, i8*, i32)** %11
store void (%struct.katcp_dispatch*, i32)* %4, void (%struct.katcp_dispatch*, i32)** %12
store i8* %5, i8** %13
store void (%struct.katcp_dispatch*, i32)* %6, void (%struct.katcp_dispatch*, i32)** %14
%15 = load %struct.katcp_dispatch*, %struct.katcp_dispatch** %8
%16 = load i32, i32* %9
%17 = load i8*, i8** %10
%18 = load i32 (%struct.katcp_dispatch*, %struct.katcp_notice*, i8*, i32)*, i32 (%struct.katcp_dispatch*, %struct.katcp_notice*, i8*, i32)** %11
%19 = bitcast i32 (%struct.katcp_dispatch*, %struct.katcp_notice*, i8*, i32)* %18 to i32 (%struct.katcp_dispatch*, %struct.katcp_notice.0*, i8*, i32)*
%20 = load void (%struct.katcp_dispatch*, i32)*, void (%struct.katcp_dispatch*, i32)** %12
%21 = load i8*, i8** %13
%22 = load void (%struct.katcp_dispatch*, i32)*, void (%struct.katcp_dispatch*, i32)** %14
%23 = call i32 @store_sensor_mode_katcp(%struct.katcp_dispatch* %15, i32 %16, i8* %17, i32* null, i32 (%struct.katcp_dispatch*, %struct.katcp_notice.0*, i8*, i32)* %19, void (%struct.katcp_dispatch*, i32)* %20, i8* %21, void (%struct.katcp_dispatch*, i32)* %22, i32 0)
ret i32 %23
}

LLVM IR (-O2):
%struct.katcp_dispatch = type { i32 }
%struct.katcp_notice = type opaque
%struct.katcp_notice.0 = type opaque
define i32 @store_full_mode_katcp(%struct.katcp_dispatch* %0, i32 %1, i8* %2, i32 (%struct.katcp_dispatch*, %struct.katcp_notice*, i8*, i32)* %3, void (%struct.katcp_dispatch*, i32)* %4, i8* %5, void (%struct.katcp_dispatch*, i32)* %6) {
%8 = bitcast i32 (%struct.katcp_dispatch*, %struct.katcp_notice*, i8*, i32)* %3 to i32 (%struct.katcp_dispatch*, %struct.katcp_notice.0*, i8*, i32)*
%9 = tail call i32 @store_sensor_mode_katcp(%struct.katcp_dispatch* %0, i32 %1, i8* %2, i32* null, i32 (%struct.katcp_dispatch*, %struct.katcp_notice.0*, i8*, i32)* %8, void (%struct.katcp_dispatch*, i32)* %4, i8* %5, void (%struct.katcp_dispatch*, i32)* %6, i32 0)
ret i32 %9
}