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

/* Variables and functions */
struct master_item *dll_create_master();
int /*<<< orphan*/ dll_destroy_master(struct master_item *);
int /*<<< orphan*/ dll_destroy_nested_lists(struct master_item *);
int /*<<< orphan*/ dll_reinit_nested_lists(struct master_item *);
int /*<<< orphan*/ inspect_dangling(struct master_item *);
int /*<<< orphan*/ inspect_full(struct master_item *);
int /*<<< orphan*/ inspect_init(struct master_item *);
int main() {
  struct master_item *dll = dll_create_master();
  inspect_full(dll);
  dll_destroy_nested_lists(dll);
  inspect_dangling(dll);
  dll_reinit_nested_lists(dll);
  inspect_init(dll);
  dll_destroy_master(dll);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1080 <dll_create_master@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1070 <inspect_full@plt>
mov    -0x10(%rbp),%rdi
call   1060 <dll_destroy_nested_lists@plt>
mov    -0x10(%rbp),%rdi
call   1050 <inspect_dangling@plt>
mov    -0x10(%rbp),%rdi
call   1090 <dll_reinit_nested_lists@plt>
mov    -0x10(%rbp),%rdi
call   1030 <inspect_init@plt>
mov    -0x10(%rbp),%rdi
call   1040 <dll_destroy_master@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1080 <dll_create_master@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1070 <inspect_full@plt>
mov    %rbx,%rdi
call   1060 <dll_destroy_nested_lists@plt>
mov    %rbx,%rdi
call   1050 <inspect_dangling@plt>
mov    %rbx,%rdi
call   1090 <dll_reinit_nested_lists@plt>
mov    %rbx,%rdi
call   1030 <inspect_init@plt>
mov    %rbx,%rdi
call   1040 <dll_destroy_master@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.master_item = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.master_item*
store i32 0, i32* %1
%3 = call %struct.master_item* (...) @dll_create_master()
store %struct.master_item* %3, %struct.master_item** %2
%4 = load %struct.master_item*, %struct.master_item** %2
%5 = call i32 @inspect_full(%struct.master_item* %4)
%6 = load %struct.master_item*, %struct.master_item** %2
%7 = call i32 @dll_destroy_nested_lists(%struct.master_item* %6)
%8 = load %struct.master_item*, %struct.master_item** %2
%9 = call i32 @inspect_dangling(%struct.master_item* %8)
%10 = load %struct.master_item*, %struct.master_item** %2
%11 = call i32 @dll_reinit_nested_lists(%struct.master_item* %10)
%12 = load %struct.master_item*, %struct.master_item** %2
%13 = call i32 @inspect_init(%struct.master_item* %12)
%14 = load %struct.master_item*, %struct.master_item** %2
%15 = call i32 @dll_destroy_master(%struct.master_item* %14)
ret i32 0
}

LLVM IR (-O2):
%struct.master_item = type { i32 }
define i32 @main() {
%1 = tail call %struct.master_item* (...) @dll_create_master()
%2 = tail call i32 @inspect_full(%struct.master_item* %1)
%3 = tail call i32 @dll_destroy_nested_lists(%struct.master_item* %1)
%4 = tail call i32 @inspect_dangling(%struct.master_item* %1)
%5 = tail call i32 @dll_reinit_nested_lists(%struct.master_item* %1)
%6 = tail call i32 @inspect_init(%struct.master_item* %1)
%7 = tail call i32 @dll_destroy_master(%struct.master_item* %1)
ret i32 0
}