#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 declare_integer_sensor_katcp(
    struct katcp_dispatch *, int, char *, char *, char *,
    int (*)(struct katcp_dispatch *, struct katcp_acquire *), void *,
    void (*)(struct katcp_dispatch *, struct katcp_acquire *), int, int, int,
    int, int (*)(struct katcp_dispatch *, struct katcp_sensor *));
int register_integer_sensor_katcp(
    struct katcp_dispatch *d, int mode, char *name, char *description,
    char *units, int (*get)(struct katcp_dispatch *d, struct katcp_acquire *a),
    void *local,
    void (*release)(struct katcp_dispatch *d, struct katcp_acquire *a), int min,
    int max, int (*flush)(struct katcp_dispatch *d, struct katcp_sensor *sn)) {
  return declare_integer_sensor_katcp(d, mode, name, description, units, get,
                                      local, release, min, max, min, max,
                                      flush);
}


x86 assembly (clang, -O0):
<register_integer_sensor_katcp>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x70,%rsp
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x28(%rbp)
mov    %esi,-0x2c(%rbp)
mov    %rdx,-0x38(%rbp)
mov    %rcx,-0x40(%rbp)
mov    %r8,-0x48(%rbp)
mov    %r9,-0x50(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    -0x38(%rbp),%rdx
mov    -0x40(%rbp),%rcx
mov    -0x48(%rbp),%r8
mov    -0x50(%rbp),%r9
mov    0x10(%rbp),%r12
mov    0x18(%rbp),%r15
mov    0x20(%rbp),%r14d
mov    0x28(%rbp),%ebx
mov    0x20(%rbp),%r11d
mov    0x28(%rbp),%r10d
mov    0x30(%rbp),%rax
mov    %r12,(%rsp)
mov    %r15,0x8(%rsp)
mov    %r14d,0x10(%rsp)
mov    %ebx,0x18(%rsp)
mov    %r11d,0x20(%rsp)
mov    %r10d,0x28(%rsp)
mov    %rax,0x30(%rsp)
call   1030 <declare_integer_sensor_katcp@plt>
add    $0x70,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<register_integer_sensor_katcp>:
sub    $0x38,%rsp
movaps 0x40(%rsp),%xmm0
mov    0x50(%rsp),%r10d
mov    0x58(%rsp),%eax
mov    0x60(%rsp),%r11
mov    %r11,0x30(%rsp)
mov    %eax,0x28(%rsp)
mov    %r10d,0x20(%rsp)
mov    %eax,0x18(%rsp)
mov    %r10d,0x10(%rsp)
movups %xmm0,(%rsp)
call   1030 <declare_integer_sensor_katcp@plt>
add    $0x38,%rsp
ret

LLVM IR (-O0):
%struct.katcp_dispatch = type { i32 }
%struct.katcp_acquire = type opaque
%struct.katcp_acquire.0 = type opaque
%struct.katcp_sensor = type opaque
%struct.katcp_acquire.1 = type opaque
%struct.katcp_acquire.2 = type opaque
%struct.katcp_sensor.3 = type opaque
define i32 @register_integer_sensor_katcp(%struct.katcp_dispatch* %0, i32 %1, i8* %2, i8* %3, i8* %4, i32 (%struct.katcp_dispatch*, %struct.katcp_acquire*)* %5, i8* %6, void (%struct.katcp_dispatch*, %struct.katcp_acquire.0*)* %7, i32 %8, i32 %9, i32 (%struct.katcp_dispatch*, %struct.katcp_sensor*)* %10) {
%12 = alloca %struct.katcp_dispatch*
%13 = alloca i32
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i8*
%17 = alloca i32 (%struct.katcp_dispatch*, %struct.katcp_acquire*)*
%18 = alloca i8*
%19 = alloca void (%struct.katcp_dispatch*, %struct.katcp_acquire.0*)*
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32 (%struct.katcp_dispatch*, %struct.katcp_sensor*)*
store %struct.katcp_dispatch* %0, %struct.katcp_dispatch** %12
store i32 %1, i32* %13
store i8* %2, i8** %14
store i8* %3, i8** %15
store i8* %4, i8** %16
store i32 (%struct.katcp_dispatch*, %struct.katcp_acquire*)* %5, i32 (%struct.katcp_dispatch*, %struct.katcp_acquire*)** %17
store i8* %6, i8** %18
store void (%struct.katcp_dispatch*, %struct.katcp_acquire.0*)* %7, void (%struct.katcp_dispatch*, %struct.katcp_acquire.0*)** %19
store i32 %8, i32* %20
store i32 %9, i32* %21
store i32 (%struct.katcp_dispatch*, %struct.katcp_sensor*)* %10, i32 (%struct.katcp_dispatch*, %struct.katcp_sensor*)** %22
%23 = load %struct.katcp_dispatch*, %struct.katcp_dispatch** %12
%24 = load i32, i32* %13
%25 = load i8*, i8** %14
%26 = load i8*, i8** %15
%27 = load i8*, i8** %16
%28 = load i32 (%struct.katcp_dispatch*, %struct.katcp_acquire*)*, i32 (%struct.katcp_dispatch*, %struct.katcp_acquire*)** %17
%29 = bitcast i32 (%struct.katcp_dispatch*, %struct.katcp_acquire*)* %28 to i32 (%struct.katcp_dispatch*, %struct.katcp_acquire.1*)*
%30 = load i8*, i8** %18
%31 = load void (%struct.katcp_dispatch*, %struct.katcp_acquire.0*)*, void (%struct.katcp_dispatch*, %struct.katcp_acquire.0*)** %19
%32 = bitcast void (%struct.katcp_dispatch*, %struct.katcp_acquire.0*)* %31 to void (%struct.katcp_dispatch*, %struct.katcp_acquire.2*)*
%33 = load i32, i32* %20
%34 = load i32, i32* %21
%35 = load i32, i32* %20
%36 = load i32, i32* %21
%37 = load i32 (%struct.katcp_dispatch*, %struct.katcp_sensor*)*, i32 (%struct.katcp_dispatch*, %struct.katcp_sensor*)** %22
%38 = bitcast i32 (%struct.katcp_dispatch*, %struct.katcp_sensor*)* %37 to i32 (%struct.katcp_dispatch*, %struct.katcp_sensor.3*)*
%39 = call i32 @declare_integer_sensor_katcp(%struct.katcp_dispatch* %23, i32 %24, i8* %25, i8* %26, i8* %27, i32 (%struct.katcp_dispatch*, %struct.katcp_acquire.1*)* %29, i8* %30, void (%struct.katcp_dispatch*, %struct.katcp_acquire.2*)* %32, i32 %33, i32 %34, i32 %35, i32 %36, i32 (%struct.katcp_dispatch*, %struct.katcp_sensor.3*)* %38)
ret i32 %39
}

LLVM IR (-O2):
%struct.katcp_dispatch = type { i32 }
%struct.katcp_acquire = type opaque
%struct.katcp_acquire.0 = type opaque
%struct.katcp_sensor = type opaque
%struct.katcp_acquire.1 = type opaque
%struct.katcp_acquire.2 = type opaque
%struct.katcp_sensor.3 = type opaque
define i32 @register_integer_sensor_katcp(%struct.katcp_dispatch* %0, i32 %1, i8* %2, i8* %3, i8* %4, i32 (%struct.katcp_dispatch*, %struct.katcp_acquire*)* %5, i8* %6, void (%struct.katcp_dispatch*, %struct.katcp_acquire.0*)* %7, i32 %8, i32 %9, i32 (%struct.katcp_dispatch*, %struct.katcp_sensor*)* %10) {
%12 = bitcast i32 (%struct.katcp_dispatch*, %struct.katcp_acquire*)* %5 to i32 (%struct.katcp_dispatch*, %struct.katcp_acquire.1*)*
%13 = bitcast void (%struct.katcp_dispatch*, %struct.katcp_acquire.0*)* %7 to void (%struct.katcp_dispatch*, %struct.katcp_acquire.2*)*
%14 = bitcast i32 (%struct.katcp_dispatch*, %struct.katcp_sensor*)* %10 to i32 (%struct.katcp_dispatch*, %struct.katcp_sensor.3*)*
%15 = tail call i32 @declare_integer_sensor_katcp(%struct.katcp_dispatch* %0, i32 %1, i8* %2, i8* %3, i8* %4, i32 (%struct.katcp_dispatch*, %struct.katcp_acquire.1*)* %12, i8* %6, void (%struct.katcp_dispatch*, %struct.katcp_acquire.2*)* %13, i32 %8, i32 %9, i32 %8, i32 %9, i32 (%struct.katcp_dispatch*, %struct.katcp_sensor.3*)* %14)
ret i32 %15
}