#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 /*<<< orphan*/ stdout;
int text_len(void *);
char *text_str(void *);
void show_text_object(const char *name, void *T) {
  name = (NULL != name ? name : "Default");
  if (NULL != T) {
    fprintf(stdout,
            "\t__text__ '%s' => {\n"
            "\t  object=>0x%p, \n"
            "\t  string=>'%s', \n"
            "\t  length=>%d, \n"
            "\t}\n",
            name, T, text_str(T), text_len(T));
  } else
    fprintf(stdout, "\t__text__ => 0x%p\n", T);
}


x86 assembly (clang, -O0):
<show_text_object>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x8(%rbp),%rax
je     1159 <show_text_object+0x29>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1169 <show_text_object+0x39>
lea    0xea0(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1169 <show_text_object+0x39>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
je     11d4 <show_text_object+0xa4>
mov    0x2e5c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <text_str@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <text_len@plt>
mov    -0x34(%rbp),%edi
mov    -0x30(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    %eax,%r9d
lea    0xe40(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    11ef <show_text_object+0xbf>
mov    0x2e05(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xe6c(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_text_object>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %rsi,%rsi
je     1191 <show_text_object+0x61>
mov    %rsi,%rbx
test   %rdi,%rdi
lea    0xeb7(%rip),%r14
cmovne %rdi,%r14
mov    0x2e8c(%rip),%rax
mov    (%rax),%r15d
mov    %rsi,%rdi
call   1030 <text_str@plt>
mov    %rax,%rbp
mov    %rbx,%rdi
call   1050 <text_len@plt>
lea    0xe97(%rip),%rsi
mov    %r15d,%edi
mov    %r14,%rdx
mov    %rbx,%rcx
mov    %rbp,%r8
mov    %eax,%r9d
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <fprintf@plt>
mov    0x2e48(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
xor    %edx,%edx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Default\00"
@stdout = global i32 0
@.str.1 = [76 x i8] c"\09__text__ '%s' => {\0A\09 object=>0x%p, \0A\09 string=>'%s', \0A\09 length=>%d, \0A\09}\0A\00"
@.str.2 = [19 x i8] c"\09__text__ => 0x%p\0A\00"
define void @show_text_object(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = icmp ne i8* null, %5
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = load i8*, i8** %3
br label %10
9: ; preds = %2
br label %10
10: ; preds = %9, %7
%11 = phi i8* [ %8, %7 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), %9 ]
store i8* %11, i8** %3
%12 = load i8*, i8** %4
%13 = icmp ne i8* null, %12
br i1 %13, label %14, label %23
14: ; preds = %10
%15 = load i32, i32* @stdout
%16 = load i8*, i8** %3
%17 = load i8*, i8** %4
%18 = load i8*, i8** %4
%19 = call i8* @text_str(i8* %18)
%20 = load i8*, i8** %4
%21 = call i32 @text_len(i8* %20)
%22 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1, i64 0, i64 0), i8* %16, i8* %17, i8* %19, i32 %21)
br label %27
23: ; preds = %10
%24 = load i32, i32* @stdout
%25 = load i8*, i8** %4
%26 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %24, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i8* %25)
br label %27
27: ; preds = %23, %14
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"Default\00"
@stdout = global i32 0
@.str.1 = [76 x i8] c"\09__text__ '%s' => {\0A\09 object=>0x%p, \0A\09 string=>'%s', \0A\09 length=>%d, \0A\09}\0A\00"
@.str.2 = [19 x i8] c"\09__text__ => 0x%p\0A\00"
define void @show_text_object(i8* %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %11, label %4
4: ; preds = %2
%5 = icmp eq i8* %0, null
%6 = select i1 %5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0
%7 = load i32, i32* @stdout
%8 = tail call i8* @text_str(i8* %1)
%9 = tail call i32 @text_len(i8* %1)
%10 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1, i64 0, i64 0), i8* %6, i8* %1, i8* %8, i32 %9)
br label %14
11: ; preds = %2
%12 = load i32, i32* @stdout
%13 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i8* null)
br label %14
14: ; preds = %11, %4
ret void
}