#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 nlattr {
  int dummy;
};
struct nla_policy {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ nla_data(struct nlattr const *);
int /*<<< orphan*/ nla_len(struct nlattr const *);
int nla_parse(struct nlattr **, int, int /*<<< orphan*/, int /*<<< orphan*/,
              struct nla_policy const *);
int nla_parse_nested(struct nlattr *tb[], int maxtype, const struct nlattr *nla,
                     const struct nla_policy *policy) {
  return nla_parse(tb, maxtype, nla_data(nla), nla_len(nla), policy);
}


x86 assembly (clang, -O0):
<nla_parse_nested>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <nla_data@plt>
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <nla_len@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    %eax,%ecx
mov    -0x20(%rbp),%r8
call   1050 <nla_parse@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nla_parse_nested>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %esi,%r15d
mov    %rdi,%r12
mov    %rdx,%rdi
call   1040 <nla_data@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <nla_len@plt>
mov    %r12,%rdi
mov    %r15d,%esi
mov    %ebp,%edx
mov    %eax,%ecx
mov    %r14,%r8
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <nla_parse@plt>

LLVM IR (-O0):
%struct.nlattr = type { i32 }
%struct.nla_policy = type { i32 }
define i32 @nla_parse_nested(%struct.nlattr** %0, i32 %1, %struct.nlattr* %2, %struct.nla_policy* %3) {
%5 = alloca %struct.nlattr**
%6 = alloca i32
%7 = alloca %struct.nlattr*
%8 = alloca %struct.nla_policy*
store %struct.nlattr** %0, %struct.nlattr*** %5
store i32 %1, i32* %6
store %struct.nlattr* %2, %struct.nlattr** %7
store %struct.nla_policy* %3, %struct.nla_policy** %8
%9 = load %struct.nlattr**, %struct.nlattr*** %5
%10 = load i32, i32* %6
%11 = load %struct.nlattr*, %struct.nlattr** %7
%12 = call i32 @nla_data(%struct.nlattr* %11)
%13 = load %struct.nlattr*, %struct.nlattr** %7
%14 = call i32 @nla_len(%struct.nlattr* %13)
%15 = load %struct.nla_policy*, %struct.nla_policy** %8
%16 = call i32 @nla_parse(%struct.nlattr** %9, i32 %10, i32 %12, i32 %14, %struct.nla_policy* %15)
ret i32 %16
}

LLVM IR (-O2):
%struct.nlattr = type { i32 }
%struct.nla_policy = type { i32 }
define i32 @nla_parse_nested(%struct.nlattr** %0, i32 %1, %struct.nlattr* %2, %struct.nla_policy* %3) {
%5 = tail call i32 @nla_data(%struct.nlattr* %2)
%6 = tail call i32 @nla_len(%struct.nlattr* %2)
%7 = tail call i32 @nla_parse(%struct.nlattr** %0, i32 %1, i32 %5, i32 %6, %struct.nla_policy* %3)
ret i32 %7
}