#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*/, int /*<<< orphan*/);
int /*<<< orphan*/ slist_back(void *);
int /*<<< orphan*/ slist_begin(void *);
scalar_t__ slist_empty(void *);
int /*<<< orphan*/ slist_end(void *);
int /*<<< orphan*/ slist_front(void *);
int slist_size(void *);
int /*<<< orphan*/ stdout;
void slist_object_show(void *L) {
  fprintf(stdout,
          "\t__slist__ : __object__ = {\n"
          "\t  object => 0x%p,\n"
          "\t  size => %d,\n"
          "\t  empty => '%s',\n"
          "\t  front => 0x%p,\n"
          "\t  back => 0x%p,\n"
          "\t  begin => 0x%p,\n"
          "\t  end => 0x%p,\n"
          "\t}\n",
          L, slist_size(L), (slist_empty(L) ? "yes" : "no"), slist_front(L),
          slist_back(L), slist_begin(L), slist_end(L));
}


x86 assembly (clang, -O0):
<slist_object_show>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e5d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <slist_size@plt>
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <slist_empty@plt>
mov    %rax,%rdx
lea    0xeee(%rip),%rax
lea    0xee3(%rip),%rcx
cmp    $0x0,%rdx
cmovne %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <slist_front@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1080 <slist_back@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1070 <slist_begin@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1090 <slist_end@plt>
mov    -0x34(%rbp),%edi
mov    -0x30(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    -0x20(%rbp),%r8
mov    -0x14(%rbp),%r9d
mov    -0x10(%rbp),%r11d
mov    -0xc(%rbp),%r10d
lea    0xdf0(%rip),%rsi
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1060 <fprintf@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slist_object_show>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2e5b(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x4(%rsp)
call   1050 <slist_size@plt>
mov    %eax,%r15d
mov    %rbx,%rdi
call   1040 <slist_empty@plt>
test   %rax,%rax
lea    0xef8(%rip),%rax
lea    0xeed(%rip),%rbp
cmove  %rax,%rbp
mov    %rbx,%rdi
call   1030 <slist_front@plt>
mov    %eax,%r12d
mov    %rbx,%rdi
call   1080 <slist_back@plt>
mov    %eax,%r13d
mov    %rbx,%rdi
call   1070 <slist_begin@plt>
mov    %eax,%r14d
mov    %rbx,%rdi
call   1090 <slist_end@plt>
sub    $0x8,%rsp
lea    0xe1c(%rip),%rsi
mov    0xc(%rsp),%edi
mov    %rbx,%rdx
mov    %r15d,%ecx
mov    %rbp,%r8
mov    %r12d,%r9d
push   %rax
push   %r14
push   %r13
call   1060 <fprintf@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [153 x i8] c"\09__slist__ : __object__ = {\0A\09 object => 0x%p,\0A\09 size => %d,\0A\09 empty => '%s',\0A\09 front => 0x%p,\0A\09 back => 0x%p,\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 @slist_object_show(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 @slist_size(i8* %5)
%7 = load i8*, i8** %2
%8 = call i64 @slist_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 @slist_front(i8* %12)
%14 = load i8*, i8** %2
%15 = call i32 @slist_back(i8* %14)
%16 = load i8*, i8** %2
%17 = call i32 @slist_begin(i8* %16)
%18 = load i8*, i8** %2
%19 = call i32 @slist_end(i8* %18)
%20 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str, i64 0, i64 0), i8* %4, i32 %6, i8* %11, i32 %13, i32 %15, i32 %17, i32 %19)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [153 x i8] c"\09__slist__ : __object__ = {\0A\09 object => 0x%p,\0A\09 size => %d,\0A\09 empty => '%s',\0A\09 front => 0x%p,\0A\09 back => 0x%p,\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 @slist_object_show(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @slist_size(i8* %0)
%4 = tail call i64 @slist_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 @slist_front(i8* %0)
%8 = tail call i32 @slist_back(i8* %0)
%9 = tail call i32 @slist_begin(i8* %0)
%10 = tail call i32 @slist_end(i8* %0)
%11 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %3, i8* %6, i32 %7, i32 %8, i32 %9, i32 %10)
ret void
}