#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*/ sequence_back(void *);
scalar_t__ sequence_empty(void *);
int /*<<< orphan*/ sequence_front(void *);
int sequence_size(void *);
int /*<<< orphan*/ stdout;
void sequence_object_show(void *S) {
  fprintf(stdout,
          "  show sequence object :\n"
          "\t__sequence__ -> {\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}\n",
          S, sequence_size(S), (sequence_empty(S) ? "yes" : "no"),
          sequence_front(S), sequence_back(S));
}


x86 assembly (clang, -O0):
<sequence_object_show>:
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   1070 <sequence_size@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <sequence_empty@plt>
mov    %rax,%rdx
lea    0xefc(%rip),%rax
lea    0xef1(%rip),%rcx
cmp    $0x0,%rdx
cmovne %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <sequence_front@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <sequence_back@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   1040 <fprintf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sequence_object_show>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    0x2e7a(%rip),%rax
mov    (%rax),%r14d
call   1070 <sequence_size@plt>
mov    %eax,%r15d
mov    %rbx,%rdi
call   1060 <sequence_empty@plt>
test   %rax,%rax
lea    0xf08(%rip),%rax
lea    0xefd(%rip),%rbp
cmove  %rax,%rbp
mov    %rbx,%rdi
call   1030 <sequence_front@plt>
mov    %eax,%r12d
mov    %rbx,%rdi
call   1050 <sequence_back@plt>
mov    %eax,(%rsp)
lea    0xe55(%rip),%rsi
mov    %r14d,%edi
mov    %rbx,%rdx
mov    %r15d,%ecx
mov    %rbp,%r8
mov    %r12d,%r9d
call   1040 <fprintf@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [135 x i8] c" show sequence object :\0A\09__sequence__ -> {\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}\0A\00"
@.str.1 = [4 x i8] c"yes\00"
@.str.2 = [3 x i8] c"no\00"
define void @sequence_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 @sequence_size(i8* %5)
%7 = load i8*, i8** %2
%8 = call i64 @sequence_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 @sequence_front(i8* %12)
%14 = load i8*, i8** %2
%15 = call i32 @sequence_back(i8* %14)
%16 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([135 x i8], [135 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 = [135 x i8] c" show sequence object :\0A\09__sequence__ -> {\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}\0A\00"
@.str.1 = [4 x i8] c"yes\00"
@.str.2 = [3 x i8] c"no\00"
define void @sequence_object_show(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @sequence_size(i8* %0)
%4 = tail call i64 @sequence_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 @sequence_front(i8* %0)
%8 = tail call i32 @sequence_back(i8* %0)
%9 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([135 x i8], [135 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %3, i8* %6, i32 %7, i32 %8)
ret void
}