#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 snd_card {
  int dummy;
};

/* Variables and functions */
int snd_card_rw_proc_new(struct snd_card *, char const *, void *,
                         void (*)(struct snd_info_entry *,
                                  struct snd_info_buffer *),
                         int /*<<< orphan*/ *);
int snd_card_ro_proc_new(struct snd_card *card, const char *name,
                         void *private_data,
                         void (*read)(struct snd_info_entry *,
                                      struct snd_info_buffer *)) {
  return snd_card_rw_proc_new(card, name, private_data, read, NULL);
}


x86 assembly (clang, -O0):
<snd_card_ro_proc_new>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%r8d
call   1030 <snd_card_rw_proc_new@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<snd_card_ro_proc_new>:
xor    %r8d,%r8d
jmp    1030 <snd_card_rw_proc_new@plt>

LLVM IR (-O0):
%struct.snd_card = type { i32 }
%struct.snd_info_entry = type opaque
%struct.snd_info_buffer = type opaque
%struct.snd_info_entry.0 = type opaque
%struct.snd_info_buffer.1 = type opaque
define i32 @snd_card_ro_proc_new(%struct.snd_card* %0, i8* %1, i8* %2, void (%struct.snd_info_entry*, %struct.snd_info_buffer*)* %3) {
%5 = alloca %struct.snd_card*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca void (%struct.snd_info_entry*, %struct.snd_info_buffer*)*
store %struct.snd_card* %0, %struct.snd_card** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store void (%struct.snd_info_entry*, %struct.snd_info_buffer*)* %3, void (%struct.snd_info_entry*, %struct.snd_info_buffer*)** %8
%9 = load %struct.snd_card*, %struct.snd_card** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load void (%struct.snd_info_entry*, %struct.snd_info_buffer*)*, void (%struct.snd_info_entry*, %struct.snd_info_buffer*)** %8
%13 = bitcast void (%struct.snd_info_entry*, %struct.snd_info_buffer*)* %12 to void (%struct.snd_info_entry.0*, %struct.snd_info_buffer.1*)*
%14 = call i32 @snd_card_rw_proc_new(%struct.snd_card* %9, i8* %10, i8* %11, void (%struct.snd_info_entry.0*, %struct.snd_info_buffer.1*)* %13, i32* null)
ret i32 %14
}

LLVM IR (-O2):
%struct.snd_card = type { i32 }
%struct.snd_info_entry = type opaque
%struct.snd_info_buffer = type opaque
%struct.snd_info_entry.0 = type opaque
%struct.snd_info_buffer.1 = type opaque
define i32 @snd_card_ro_proc_new(%struct.snd_card* %0, i8* %1, i8* %2, void (%struct.snd_info_entry*, %struct.snd_info_buffer*)* %3) {
%5 = bitcast void (%struct.snd_info_entry*, %struct.snd_info_buffer*)* %3 to void (%struct.snd_info_entry.0*, %struct.snd_info_buffer.1*)*
%6 = tail call i32 @snd_card_rw_proc_new(%struct.snd_card* %0, i8* %1, i8* %2, void (%struct.snd_info_entry.0*, %struct.snd_info_buffer.1*)* %5, i32* null)
ret i32 %6
}