#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,
                            int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                            int /*<<< orphan*/ *, int /*<<< orphan*/ *, void *,
                            void (*)(struct katcp_dispatch *, unsigned int),
                            int /*<<< orphan*/);
int store_clear_mode_katcp(struct katcp_dispatch *d, unsigned int mode,
                           void *state,
                           void (*clear)(struct katcp_dispatch *d,
                                         unsigned int mode)) {
  return store_sensor_mode_katcp(d, mode, NULL, NULL, NULL, NULL, state, clear,
                                 0);
}


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

x86 assembly (clang, -O2):
<store_clear_mode_katcp>:
push   %rax
mov    %rcx,%rax
mov    %rdx,%r10
sub    $0x8,%rsp
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   %rax
push   %r10
call   1030 <store_sensor_mode_katcp@plt>
add    $0x20,%rsp
pop    %rcx
ret

LLVM IR (-O0):
%struct.katcp_dispatch = type { i32 }
define i32 @store_clear_mode_katcp(%struct.katcp_dispatch* %0, i32 %1, i8* %2, void (%struct.katcp_dispatch*, i32)* %3) {
%5 = alloca %struct.katcp_dispatch*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca void (%struct.katcp_dispatch*, i32)*
store %struct.katcp_dispatch* %0, %struct.katcp_dispatch** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store void (%struct.katcp_dispatch*, i32)* %3, void (%struct.katcp_dispatch*, i32)** %8
%9 = load %struct.katcp_dispatch*, %struct.katcp_dispatch** %5
%10 = load i32, i32* %6
%11 = load i8*, i8** %7
%12 = load void (%struct.katcp_dispatch*, i32)*, void (%struct.katcp_dispatch*, i32)** %8
%13 = call i32 @store_sensor_mode_katcp(%struct.katcp_dispatch* %9, i32 %10, i32* null, i32* null, i32* null, i32* null, i8* %11, void (%struct.katcp_dispatch*, i32)* %12, i32 0)
ret i32 %13
}

LLVM IR (-O2):
%struct.katcp_dispatch = type { i32 }
define i32 @store_clear_mode_katcp(%struct.katcp_dispatch* %0, i32 %1, i8* %2, void (%struct.katcp_dispatch*, i32)* %3) {
%5 = tail call i32 @store_sensor_mode_katcp(%struct.katcp_dispatch* %0, i32 %1, i32* null, i32* null, i32* null, i32* null, i8* %2, void (%struct.katcp_dispatch*, i32)* %3, i32 0)
ret i32 %5
}