#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 node {
  int dummy;
};

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


x86 assembly (clang, -O0):
<draw_tree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1400,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x14,-0xc(%rbp)
jge    1186 <draw_tree+0x56>
movslq -0xc(%rbp),%rax
lea    -0x1400(%rbp),%rdi
imul   $0xff,%rax,%rax
add    %rax,%rdi
lea    0xe94(%rip),%rsi
lea    0xe92(%rip),%rdx
call   1050 <sprintf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1146 <draw_tree+0x16>
mov    -0x8(%rbp),%rdi
lea    -0x1400(%rbp),%r8
xor    %ecx,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
call   1040 <_print_t@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x14,-0xc(%rbp)
jge    11dc <draw_tree+0xac>
movslq -0xc(%rbp),%rax
lea    -0x1400(%rbp),%rsi
imul   $0xff,%rax,%rax
add    %rax,%rsi
lea    0xe3e(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11a3 <draw_tree+0x73>
add    $0x1400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_tree>:
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.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 @draw_tree(%struct.node* %0) {
%2 = alloca %struct.node*
%3 = alloca i32
%4 = alloca [20 x [255 x i8]]
store %struct.node* %0, %struct.node** %2
store i32 0, i32* %3
br label %5
5: ; preds = %14, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 20
br i1 %7, label %8, label %17
8: ; preds = %5
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [20 x [255 x i8]], [20 x [255 x i8]]* %4, i64 0, i64 %10
%12 = getelementptr inbounds [255 x i8], [255 x i8]* %11, i64 0, i64 0
%13 = call i32 @sprintf(i8* %12, 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 %14
14: ; preds = %8
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %5
17: ; preds = %5
%18 = load %struct.node*, %struct.node** %2
%19 = getelementptr inbounds [20 x [255 x i8]], [20 x [255 x i8]]* %4, i64 0, i64 0
%20 = bitcast [255 x i8]* %19 to i8**
%21 = call i32 @_print_t(%struct.node* %18, i32 0, i32 0, i32 0, i8** %20)
store i32 0, i32* %3
br label %22
22: ; preds = %31, %17
%23 = load i32, i32* %3
%24 = icmp slt i32 %23, 20
br i1 %24, label %25, label %34
25: ; preds = %22
%26 = load i32, i32* %3
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [20 x [255 x i8]], [20 x [255 x i8]]* %4, i64 0, i64 %27
%29 = getelementptr inbounds [255 x i8], [255 x i8]* %28, i64 0, i64 0
%30 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %29)
br label %31
31: ; preds = %25
%32 = load i32, i32* %3
%33 = add nsw i32 %32, 1
store i32 %33, i32* %3
br label %22
34: ; preds = %22
ret void
}

LLVM IR (-O2):
%struct.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 @draw_tree(%struct.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.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
}