#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 */
struct bt_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _print_t(struct bt_node *, int /*<<< orphan*/,
                            int /*<<< orphan*/, int /*<<< orphan*/, char **);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
void print_t(struct bt_node *tree) {
  char s[20][255];
  for (int i = 0; i < 20; i++)
    sprintf(s[i], "%80s", " ");
  _print_t(tree, 0, 0, 0, s);
  for (int i = 0; i < 20; i++)
    printf("%s\n", s[i]);
}


x86 assembly (clang, -O0):
<print_t>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1410,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x1404(%rbp)
cmpl   $0x14,-0x1404(%rbp)
jge    1195 <print_t+0x65>
movslq -0x1404(%rbp),%rax
lea    -0x1400(%rbp),%rdi
imul   $0xff,%rax,%rax
add    %rax,%rdi
lea    0xe8b(%rip),%rsi
lea    0xe89(%rip),%rdx
call   1050 <sprintf@plt>
mov    -0x1404(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1404(%rbp)
jmp    1149 <print_t+0x19>
mov    -0x8(%rbp),%rdi
lea    -0x1400(%rbp),%r8
xor    %ecx,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
call   1040 <_print_t@plt>
movl   $0x0,-0x1408(%rbp)
cmpl   $0x14,-0x1408(%rbp)
jge    11fa <print_t+0xca>
movslq -0x1408(%rbp),%rax
lea    -0x1400(%rbp),%rsi
imul   $0xff,%rax,%rax
add    %rax,%rsi
lea    0xe26(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1408(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1408(%rbp)
jmp    11b5 <print_t+0x85>
add    $0x1410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_t>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x13f8,%rsp
mov    %rdi,%rbx
lea    0xeb5(%rip),%rbp
lea    0xeb3(%rip),%r14
mov    %rsp,%r13
mov    %r13,%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
call   1050 <sprintf@plt>
lea    0xff(%rsp),%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
call   1050 <sprintf@plt>
lea    0x1fe(%rsp),%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
call   1050 <sprintf@plt>
lea    0x2fd(%rsp),%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
call   1050 <sprintf@plt>
lea    0x3fc(%rsp),%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
call   1050 <sprintf@plt>
lea    0x4fb(%rsp),%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
call   1050 <sprintf@plt>
lea    0x5fa(%rsp),%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
call   1050 <sprintf@plt>
lea    0x6f9(%rsp),%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
call   1050 <sprintf@plt>
lea    0x7f8(%rsp),%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
call   1050 <sprintf@plt>
lea    0x8f7(%rsp),%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
call   1050 <sprintf@plt>
lea    0x9f6(%rsp),%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
call   1050 <sprintf@plt>
lea    0xaf5(%rsp),%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
call   1050 <sprintf@plt>
lea    0xbf4(%rsp),%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
call   1050 <sprintf@plt>
lea    0xcf3(%rsp),%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
call   1050 <sprintf@plt>
lea    0xdf2(%rsp),%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
call   1050 <sprintf@plt>
lea    0xef1(%rsp),%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
call   1050 <sprintf@plt>
lea    0xff0(%rsp),%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
call   1050 <sprintf@plt>
lea    0x10ef(%rsp),%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
call   1050 <sprintf@plt>
lea    0x11ee(%rsp),%r15
mov    %r15,%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
call   1050 <sprintf@plt>
lea    0x12ed(%rsp),%r12
mov    %r12,%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
call   1050 <sprintf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    %r13,%r8
call   1040 <_print_t@plt>
lea    0xd1d(%rip),%rbx
mov    %rbx,%rdi
mov    %r13,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
lea    0xff(%rsp),%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
lea    0x1fe(%rsp),%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
lea    0x2fd(%rsp),%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
lea    0x3fc(%rsp),%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
lea    0x4fb(%rsp),%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
lea    0x5fa(%rsp),%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
lea    0x6f9(%rsp),%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
lea    0x7f8(%rsp),%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
lea    0x8f7(%rsp),%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
lea    0x9f6(%rsp),%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
lea    0xaf5(%rsp),%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
lea    0xbf4(%rsp),%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
lea    0xcf3(%rsp),%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
lea    0xdf2(%rsp),%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
lea    0xef1(%rsp),%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
lea    0xff0(%rsp),%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
lea    0x10ef(%rsp),%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1030 <printf@plt>
add    $0x13f8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.bt_node = type { i32 }
@.str = [5 x i8] c"%80s\00"
@.str.1 = [2 x i8] c" \00"
@.str.2 = [4 x i8] c"%s\0A\00"
define void @print_t(%struct.bt_node* %0) {
%2 = alloca %struct.bt_node*
%3 = alloca [20 x [255 x i8]]
%4 = alloca i32
%5 = alloca i32
store %struct.bt_node* %0, %struct.bt_node** %2
store i32 0, i32* %4
br label %6
6: ; preds = %15, %1
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 20
br i1 %8, label %9, label %18
9: ; preds = %6
%10 = load i32, i32* %4
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [20 x [255 x i8]], [20 x [255 x i8]]* %3, i64 0, i64 %11
%13 = getelementptr inbounds [255 x i8], [255 x i8]* %12, i64 0, i64 0
%14 = call i32 @sprintf(i8* %13, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %15
15: ; preds = %9
%16 = load i32, i32* %4
%17 = add nsw i32 %16, 1
store i32 %17, i32* %4
br label %6
18: ; preds = %6
%19 = load %struct.bt_node*, %struct.bt_node** %2
%20 = getelementptr inbounds [20 x [255 x i8]], [20 x [255 x i8]]* %3, i64 0, i64 0
%21 = bitcast [255 x i8]* %20 to i8**
%22 = call i32 @_print_t(%struct.bt_node* %19, i32 0, i32 0, i32 0, i8** %21)
store i32 0, i32* %5
br label %23
23: ; preds = %32, %18
%24 = load i32, i32* %5
%25 = icmp slt i32 %24, 20
br i1 %25, label %26, label %35
26: ; preds = %23
%27 = load i32, i32* %5
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [20 x [255 x i8]], [20 x [255 x i8]]* %3, i64 0, i64 %28
%30 = getelementptr inbounds [255 x i8], [255 x i8]* %29, i64 0, i64 0
%31 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %30)
br label %32
32: ; preds = %26
%33 = load i32, i32* %5
%34 = add nsw i32 %33, 1
store i32 %34, i32* %5
br label %23
35: ; preds = %23
ret void
}

LLVM IR (-O2):
%struct.bt_node = type { i32 }
@.str = [5 x i8] c"%80s\00"
@.str.1 = [2 x i8] c" \00"
@.str.2 = [4 x i8] c"%s\0A\00"
define void @print_t(%struct.bt_node* %0) {
%2 = alloca [20 x [255 x i8]]
%3 = getelementptr inbounds [20 x [255 x i8]], [20 x [255 x i8]]* %2, i64 0, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%5 = getelementptr inbounds [20 x [255 x i8]], [20 x [255 x i8]]* %2, i64 0, i64 1, i64 0
%6 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%7 = getelementptr inbounds [20 x [255 x i8]], [20 x [255 x i8]]* %2, i64 0, i64 2, i64 0
%8 = call i32 @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%9 = getelementptr inbounds [20 x [255 x i8]], [20 x [255 x i8]]* %2, i64 0, i64 3, i64 0
%10 = call i32 @sprintf(i8* %9, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%11 = getelementptr inbounds [20 x [255 x i8]], [20 x [255 x i8]]* %2, i64 0, i64 4, i64 0
%12 = call i32 @sprintf(i8* %11, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%13 = getelementptr inbounds [20 x [255 x i8]], [20 x [255 x i8]]* %2, i64 0, i64 5, i64 0
%14 = call i32 @sprintf(i8* %13, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%15 = getelementptr inbounds [20 x [255 x i8]], [20 x [255 x i8]]* %2, i64 0, i64 6, i64 0
%16 = call i32 @sprintf(i8* %15, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%17 = getelementptr inbounds [20 x [255 x i8]], [20 x [255 x i8]]* %2, i64 0, i64 7, i64 0
%18 = call i32 @sprintf(i8* %17, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%19 = getelementptr inbounds [20 x [255 x i8]], [20 x [255 x i8]]* %2, i64 0, i64 8, i64 0
%20 = call i32 @sprintf(i8* %19, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%21 = getelementptr inbounds [20 x [255 x i8]], [20 x [255 x i8]]* %2, i64 0, i64 9, i64 0
%22 = call i32 @sprintf(i8* %21, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%23 = getelementptr inbounds [20 x [255 x i8]], [20 x [255 x i8]]* %2, i64 0, i64 10, i64 0
%24 = call i32 @sprintf(i8* %23, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%25 = getelementptr inbounds [20 x [255 x i8]], [20 x [255 x i8]]* %2, i64 0, i64 11, i64 0
%26 = call i32 @sprintf(i8* %25, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%27 = getelementptr inbounds [20 x [255 x i8]], [20 x [255 x i8]]* %2, i64 0, i64 12, i64 0
%28 = call i32 @sprintf(i8* %27, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%29 = getelementptr inbounds [20 x [255 x i8]], [20 x [255 x i8]]* %2, i64 0, i64 13, i64 0
%30 = call i32 @sprintf(i8* %29, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%31 = getelementptr inbounds [20 x [255 x i8]], [20 x [255 x i8]]* %2, i64 0, i64 14, i64 0
%32 = call i32 @sprintf(i8* %31, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%33 = getelementptr inbounds [20 x [255 x i8]], [20 x [255 x i8]]* %2, i64 0, i64 15, i64 0
%34 = call i32 @sprintf(i8* %33, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%35 = getelementptr inbounds [20 x [255 x i8]], [20 x [255 x i8]]* %2, i64 0, i64 16, i64 0
%36 = call i32 @sprintf(i8* %35, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%37 = getelementptr inbounds [20 x [255 x i8]], [20 x [255 x i8]]* %2, i64 0, i64 17, i64 0
%38 = call i32 @sprintf(i8* %37, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%39 = getelementptr inbounds [20 x [255 x i8]], [20 x [255 x i8]]* %2, i64 0, i64 18, i64 0
%40 = call i32 @sprintf(i8* %39, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%41 = getelementptr inbounds [20 x [255 x i8]], [20 x [255 x i8]]* %2, i64 0, i64 19, i64 0
%42 = call i32 @sprintf(i8* %41, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%43 = bitcast [20 x [255 x i8]]* %2 to i8**
%44 = call i32 @_print_t(%struct.bt_node* %0, i32 0, i32 0, i32 0, i8** %43)
%45 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %3)
%46 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %5)
%47 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %7)
%48 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %9)
%49 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %11)
%50 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %13)
%51 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %15)
%52 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %17)
%53 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %19)
%54 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %21)
%55 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %23)
%56 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %25)
%57 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %27)
%58 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %29)
%59 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %31)
%60 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %33)
%61 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %35)
%62 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %37)
%63 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %39)
%64 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %41)
ret void
}