#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*/ set_begin(void *);
scalar_t__ set_empty(void *);
int /*<<< orphan*/ set_end(void *);
int set_size(void *);
int /*<<< orphan*/ stdout;
void set_object(void *S) {
  fprintf(stdout,
          "\t__set__ -> {\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",
          S, set_size(S), (set_empty(S) ? "yes" : "no"), set_begin(S),
          set_end(S));
}


x86 assembly (clang, -O0):
<set_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   1040 <set_size@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <set_empty@plt>
mov    %rax,%rdx
lea    0xed3(%rip),%rax
lea    0xec8(%rip),%rcx
cmp    $0x0,%rdx
cmovne %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1070 <set_begin@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <set_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   1050 <fprintf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_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   1040 <set_size@plt>
mov    %eax,%r15d
mov    %rbx,%rdi
call   1060 <set_empty@plt>
test   %rax,%rax
lea    0xedf(%rip),%rax
lea    0xed4(%rip),%rbp
cmove  %rax,%rbp
mov    %rbx,%rdi
call   1070 <set_begin@plt>
mov    %eax,%r12d
mov    %rbx,%rdi
call   1030 <set_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   1050 <fprintf@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [94 x i8] c"\09__set__ -> {\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 @set_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 @set_size(i8* %5)
%7 = load i8*, i8** %2
%8 = call i64 @set_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 @set_begin(i8* %12)
%14 = load i8*, i8** %2
%15 = call i32 @set_end(i8* %14)
%16 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([94 x i8], [94 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 = [94 x i8] c"\09__set__ -> {\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 @set_object(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @set_size(i8* %0)
%4 = tail call i64 @set_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 @set_begin(i8* %0)
%8 = tail call i32 @set_end(i8* %0)
%9 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %3, i8* %6, i32 %7, i32 %8)
ret void
}