#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 */

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, void *, int, char *,
                           int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ table_begin(void *);
scalar_t__ table_empty(void *);
int /*<<< orphan*/ table_end(void *);
int table_size(void *);
void table_object(void *T) {
  fprintf(stdout,
          "\t__table__ -> {\n"
          "\t  object=>0x%p,\n"
          "\t  size=>%d,\n"
          "\t  empty=>'%s',\n"
          "\t  begin=>0x%p,\n"
          "\t  end=>0x%p,\n"
          "\t}\n",
          T, table_size(T), (table_empty(T) ? "yes" : "no"), table_begin(T),
          table_end(T));
}


x86 assembly (clang, -O0):
<table_object>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e7d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <table_size@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
call   1070 <table_empty@plt>
mov    %rax,%rdx
lea    0xed5(%rip),%rax
lea    0xeca(%rip),%rcx
cmp    $0x0,%rdx
cmovne %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <table_begin@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <table_end@plt>
mov    -0x2c(%rbp),%edi
mov    -0x28(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x18(%rbp),%r8
mov    -0xc(%rbp),%r9d
lea    0xe30(%rip),%rsi
mov    %eax,(%rsp)
call   1060 <fprintf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<table_object>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    0x2e7a(%rip),%rax
mov    (%rax),%r14d
call   1030 <table_size@plt>
mov    %eax,%r15d
mov    %rbx,%rdi
call   1070 <table_empty@plt>
test   %rax,%rax
lea    0xee1(%rip),%rax
lea    0xed6(%rip),%rbp
cmove  %rax,%rbp
mov    %rbx,%rdi
call   1040 <table_begin@plt>
mov    %eax,%r12d
mov    %rbx,%rdi
call   1050 <table_end@plt>
mov    %eax,(%rsp)
lea    0xe55(%rip),%rsi
mov    %r14d,%edi
mov    %rbx,%rdx
mov    %r15d,%ecx
mov    %rbp,%r8
mov    %r12d,%r9d
call   1060 <fprintf@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [96 x i8] c"\09__table__ -> {\0A\09 object=>0x%p,\0A\09 size=>%d,\0A\09 empty=>'%s',\0A\09 begin=>0x%p,\0A\09 end=>0x%p,\0A\09}\0A\00"
@.str.1 = [4 x i8] c"yes\00"
@.str.2 = [3 x i8] c"no\00"
define void @table_object(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stdout
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @table_size(i8* %5)
%7 = load i8*, i8** %2
%8 = call i64 @table_empty(i8* %7)
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i64
%11 = select i1 %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0)
%12 = load i8*, i8** %2
%13 = call i32 @table_begin(i8* %12)
%14 = load i8*, i8** %2
%15 = call i32 @table_end(i8* %14)
%16 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str, i64 0, i64 0), i8* %4, i32 %6, i8* %11, i32 %13, i32 %15)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [96 x i8] c"\09__table__ -> {\0A\09 object=>0x%p,\0A\09 size=>%d,\0A\09 empty=>'%s',\0A\09 begin=>0x%p,\0A\09 end=>0x%p,\0A\09}\0A\00"
@.str.1 = [4 x i8] c"yes\00"
@.str.2 = [3 x i8] c"no\00"
define void @table_object(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @table_size(i8* %0)
%4 = tail call i64 @table_empty(i8* %0)
%5 = icmp eq i64 %4, 0
%6 = select i1 %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
%7 = tail call i32 @table_begin(i8* %0)
%8 = tail call i32 @table_end(i8* %0)
%9 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %3, i8* %6, i32 %7, i32 %8)
ret void
}