#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 winsize {
  int ws_col;
};

/* Variables and functions */
int /*<<< orphan*/ TIOCGWINSZ;
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ ioctl(int /*<<< orphan*/, int /*<<< orphan*/,
                         struct winsize *);
int /*<<< orphan*/ stdout;
int strlen(char *);
void printline(char *left, char *right) {
  struct winsize w;
  int l = 0;
  ioctl(0, TIOCGWINSZ, &w);
  fputs(" ", stdout);
  if (left) {
    if (right)
      fputs("\033[93m", stdout);
    else
      fputs("\033[91m", stdout);
    l = strlen(left);
    if (l && left[l - 1] == '\n')
      left[l - 1] = ' ';
    fputs(left, stdout);
    fputs("\033[0m", stdout);
  }
  if (l && l <= w.ws_col / 2 - 2) {
    for (int i = 0; i < w.ws_col / 2 - 2 - l; i++)
      fputs(" ", stdout);
    fputs("| ", stdout);
  } else {
    if (l)
      fputs("\n", stdout);
    for (int i = 0; i < w.ws_col / 2 - 2; i++)
      fputs(" ", stdout);
    fputs("| ", stdout);
  }
  if (right) {
    if (left)
      fputs("\033[93m", stdout);
    else
      fputs("\033[92m", stdout);
    l = strlen(right);
    if (l && right[l - 1] == '\n')
      right[l - 1] = ' ';
    fputs(right, stdout);
    fputs("\033[0m", stdout);
  }
  fputs("\n", stdout);
}


x86 assembly (clang, -O0):
<printline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    0x2e82(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
lea    -0x18(%rbp),%rdx
call   1050 <ioctl@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%esi
lea    0xea7(%rip),%rdi
call   1040 <fputs@plt>
cmpq   $0x0,-0x8(%rbp)
je     121d <printline+0xed>
cmpq   $0x0,-0x10(%rbp)
je     11a0 <printline+0x70>
mov    0x2e53(%rip),%rax
mov    (%rax),%esi
lea    0xe6a(%rip),%rdi
call   1040 <fputs@plt>
jmp    11b5 <printline+0x85>
mov    0x2e39(%rip),%rax
mov    (%rax),%esi
lea    0xe56(%rip),%rdi
call   1040 <fputs@plt>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     11f6 <printline+0xc6>
mov    -0x8(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    11f6 <printline+0xc6>
mov    -0x8(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x20,(%rax,%rcx,1)
mov    -0x8(%rbp),%rdi
mov    0x2ddf(%rip),%rax
mov    (%rax),%esi
call   1040 <fputs@plt>
mov    0x2dd1(%rip),%rax
mov    (%rax),%esi
lea    0xdf4(%rip),%rdi
call   1040 <fputs@plt>
cmpl   $0x0,-0x1c(%rbp)
je     12b0 <printline+0x180>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x18(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x28(%rbp),%eax
sub    $0x2,%ecx
cmp    %ecx,%eax
jg     12b0 <printline+0x180>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x18(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x2c(%rbp),%eax
sub    $0x2,%ecx
sub    -0x1c(%rbp),%ecx
cmp    %ecx,%eax
jge    1296 <printline+0x166>
mov    0x2d66(%rip),%rax
mov    (%rax),%esi
lea    0xd8f(%rip),%rdi
call   1040 <fputs@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    124f <printline+0x11f>
mov    0x2d43(%rip),%rax
mov    (%rax),%esi
lea    0xd6b(%rip),%rdi
call   1040 <fputs@plt>
jmp    132f <printline+0x1ff>
cmpl   $0x0,-0x1c(%rbp)
je     12cf <printline+0x19f>
mov    0x2d1f(%rip),%rax
mov    (%rax),%esi
lea    0xd4a(%rip),%rdi
call   1040 <fputs@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x18(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x30(%rbp),%eax
sub    $0x2,%ecx
cmp    %ecx,%eax
jge    131a <printline+0x1ea>
mov    0x2ce2(%rip),%rax
mov    (%rax),%esi
lea    0xd0b(%rip),%rdi
call   1040 <fputs@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    12d6 <printline+0x1a6>
mov    0x2cbf(%rip),%rax
mov    (%rax),%esi
lea    0xce7(%rip),%rdi
call   1040 <fputs@plt>
cmpq   $0x0,-0x10(%rbp)
je     13dc <printline+0x2ac>
cmpq   $0x0,-0x8(%rbp)
je     135f <printline+0x22f>
mov    0x2c94(%rip),%rax
mov    (%rax),%esi
lea    0xcab(%rip),%rdi
call   1040 <fputs@plt>
jmp    1374 <printline+0x244>
mov    0x2c7a(%rip),%rax
mov    (%rax),%esi
lea    0xca7(%rip),%rdi
call   1040 <fputs@plt>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     13b5 <printline+0x285>
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    13b5 <printline+0x285>
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x20,(%rax,%rcx,1)
mov    -0x10(%rbp),%rdi
mov    0x2c20(%rip),%rax
mov    (%rax),%esi
call   1040 <fputs@plt>
mov    0x2c12(%rip),%rax
mov    (%rax),%esi
lea    0xc35(%rip),%rdi
call   1040 <fputs@plt>
mov    0x2bfd(%rip),%rax
mov    (%rax),%esi
lea    0xc28(%rip),%rdi
call   1040 <fputs@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printline>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
mov    %rdi,%r15
mov    0x2e85(%rip),%rax
mov    (%rax),%esi
lea    0x8(%rsp),%rdx
xor    %edi,%edi
call   1050 <ioctl@plt>
mov    0x2e80(%rip),%r14
mov    (%r14),%esi
lea    0xea8(%rip),%rdi
call   1040 <fputs@plt>
test   %r15,%r15
mov    %rbx,0x10(%rsp)
je     1214 <printline+0xe4>
test   %rbx,%rbx
mov    (%r14),%esi
lea    0xe7c(%rip),%rax
lea    0xe6f(%rip),%rdi
cmove  %rax,%rdi
call   1040 <fputs@plt>
mov    %r15,%rdi
call   1030 <strlen@plt>
test   %eax,%eax
je     11fa <printline+0xca>
mov    %eax,%r12d
cltq
cmpb   $0xa,-0x1(%rax,%r15,1)
jne    11b9 <printline+0x89>
movb   $0x20,-0x1(%r15,%rax,1)
mov    (%r14),%esi
mov    %r15,%rdi
call   1040 <fputs@plt>
mov    (%r14),%esi
lea    0xe3e(%rip),%rdi
call   1040 <fputs@plt>
test   %r12d,%r12d
je     1214 <printline+0xe4>
mov    0x8(%rsp),%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
add    %ecx,%eax
sar    %eax
lea    -0x2(%rax),%ecx
cmp    %ecx,%r12d
jle    12da <printline+0x1aa>
lea    0xe1c(%rip),%rdi
jmp    120c <printline+0xdc>
mov    (%r14),%esi
mov    %r15,%rdi
call   1040 <fputs@plt>
lea    0xe00(%rip),%rdi
mov    (%r14),%esi
call   1040 <fputs@plt>
cmpl   $0x6,0x8(%rsp)
jl     1252 <printline+0x122>
xor    %ebx,%ebx
lea    0xdee(%rip),%rbp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%r14),%esi
mov    %rbp,%rdi
call   1040 <fputs@plt>
add    $0x1,%ebx
mov    0x8(%rsp),%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
add    $0xfffffffe,%ecx
cmp    %ecx,%ebx
jl     1230 <printline+0x100>
mov    (%r14),%esi
lea    0xdb5(%rip),%rdi
call   1040 <fputs@plt>
mov    0x10(%rsp),%rbx
test   %rbx,%rbx
je     12bc <printline+0x18c>
test   %r15,%r15
mov    (%r14),%esi
lea    0xd9e(%rip),%rax
lea    0xd81(%rip),%rdi
cmove  %rax,%rdi
call   1040 <fputs@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
test   %eax,%eax
je     12a2 <printline+0x172>
cltq
cmpb   $0xa,-0x1(%rax,%rbx,1)
jne    12a2 <printline+0x172>
movb   $0x20,-0x1(%rbx,%rax,1)
mov    (%r14),%esi
mov    %rbx,%rdi
call   1040 <fputs@plt>
mov    (%r14),%esi
lea    0xd55(%rip),%rdi
call   1040 <fputs@plt>
mov    (%r14),%esi
lea    0xd4e(%rip),%rdi
call   1040 <fputs@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0xfffffffe,%r13d
sub    %r12d,%r13d
add    %r13d,%eax
test   %eax,%eax
jle    1252 <printline+0x122>
xor    %ebp,%ebp
lea    0xd1b(%rip),%r12
nopw   0x0(%rax,%rax,1)
mov    (%r14),%esi
mov    %r12,%rdi
call   1040 <fputs@plt>
add    $0x1,%ebp
mov    0x8(%rsp),%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
add    %r13d,%ecx
cmp    %ecx,%ebp
jl     1300 <printline+0x1d0>
jmp    1252 <printline+0x122>

LLVM IR (-O0):
%struct.winsize = type { i32 }
@TIOCGWINSZ = global i32 0
@.str = [2 x i8] c" \00"
@stdout = global i32 0
@.str.1 = [6 x i8] c"\1B[93m\00"
@.str.2 = [6 x i8] c"\1B[91m\00"
@.str.3 = [5 x i8] c"\1B[0m\00"
@.str.4 = [3 x i8] c"| \00"
@.str.5 = [2 x i8] c"\0A\00"
@.str.6 = [6 x i8] c"\1B[92m\00"
define void @printline(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca %struct.winsize
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
store i32 0, i32* %6
%9 = load i32, i32* @TIOCGWINSZ
%10 = call i32 @ioctl(i32 0, i32 %9, %struct.winsize* %5)
%11 = load i32, i32* @stdout
%12 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = load i8*, i8** %3
%14 = icmp ne i8* %13, null
br i1 %14, label %15, label %50
15: ; preds = %2
%16 = load i8*, i8** %4
%17 = icmp ne i8* %16, null
br i1 %17, label %18, label %21
18: ; preds = %15
%19 = load i32, i32* @stdout
%20 = call i32 @fputs(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %19)
br label %24
21: ; preds = %15
%22 = load i32, i32* @stdout
%23 = call i32 @fputs(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %22)
br label %24
24: ; preds = %21, %18
%25 = load i8*, i8** %3
%26 = call i32 @strlen(i8* %25)
store i32 %26, i32* %6
%27 = load i32, i32* %6
%28 = icmp ne i32 %27, 0
br i1 %28, label %29, label %44
29: ; preds = %24
%30 = load i8*, i8** %3
%31 = load i32, i32* %6
%32 = sub nsw i32 %31, 1
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds i8, i8* %30, i64 %33
%35 = load i8, i8* %34
%36 = sext i8 %35 to i32
%37 = icmp eq i32 %36, 10
br i1 %37, label %38, label %44
38: ; preds = %29
%39 = load i8*, i8** %3
%40 = load i32, i32* %6
%41 = sub nsw i32 %40, 1
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds i8, i8* %39, i64 %42
store i8 32, i8* %43
br label %44
44: ; preds = %38, %29, %24
%45 = load i8*, i8** %3
%46 = load i32, i32* @stdout
%47 = call i32 @fputs(i8* %45, i32 %46)
%48 = load i32, i32* @stdout
%49 = call i32 @fputs(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %48)
br label %50
50: ; preds = %44, %2
%51 = load i32, i32* %6
%52 = icmp ne i32 %51, 0
br i1 %52, label %53, label %79
53: ; preds = %50
%54 = load i32, i32* %6
%55 = getelementptr inbounds %struct.winsize, %struct.winsize* %5, i32 0, i32 0
%56 = load i32, i32* %55
%57 = sdiv i32 %56, 2
%58 = sub nsw i32 %57, 2
%59 = icmp sle i32 %54, %58
br i1 %59, label %60, label %79
60: ; preds = %53
store i32 0, i32* %7
br label %61
61: ; preds = %73, %60
%62 = load i32, i32* %7
%63 = getelementptr inbounds %struct.winsize, %struct.winsize* %5, i32 0, i32 0
%64 = load i32, i32* %63
%65 = sdiv i32 %64, 2
%66 = sub nsw i32 %65, 2
%67 = load i32, i32* %6
%68 = sub nsw i32 %66, %67
%69 = icmp slt i32 %62, %68
br i1 %69, label %70, label %76
70: ; preds = %61
%71 = load i32, i32* @stdout
%72 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %71)
br label %73
73: ; preds = %70
%74 = load i32, i32* %7
%75 = add nsw i32 %74, 1
store i32 %75, i32* %7
br label %61
76: ; preds = %61
%77 = load i32, i32* @stdout
%78 = call i32 @fputs(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %77)
br label %102
79: ; preds = %53, %50
%80 = load i32, i32* %6
%81 = icmp ne i32 %80, 0
br i1 %81, label %82, label %85
82: ; preds = %79
%83 = load i32, i32* @stdout
%84 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i32 %83)
br label %85
85: ; preds = %82, %79
store i32 0, i32* %8
br label %86
86: ; preds = %96, %85
%87 = load i32, i32* %8
%88 = getelementptr inbounds %struct.winsize, %struct.winsize* %5, i32 0, i32 0
%89 = load i32, i32* %88
%90 = sdiv i32 %89, 2
%91 = sub nsw i32 %90, 2
%92 = icmp slt i32 %87, %91
br i1 %92, label %93, label %99
93: ; preds = %86
%94 = load i32, i32* @stdout
%95 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %94)
br label %96
96: ; preds = %93
%97 = load i32, i32* %8
%98 = add nsw i32 %97, 1
store i32 %98, i32* %8
br label %86
99: ; preds = %86
%100 = load i32, i32* @stdout
%101 = call i32 @fputs(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %100)
br label %102
102: ; preds = %99, %76
%103 = load i8*, i8** %4
%104 = icmp ne i8* %103, null
br i1 %104, label %105, label %140
105: ; preds = %102
%106 = load i8*, i8** %3
%107 = icmp ne i8* %106, null
br i1 %107, label %108, label %111
108: ; preds = %105
%109 = load i32, i32* @stdout
%110 = call i32 @fputs(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %109)
br label %114
111: ; preds = %105
%112 = load i32, i32* @stdout
%113 = call i32 @fputs(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i32 %112)
br label %114
114: ; preds = %111, %108
%115 = load i8*, i8** %4
%116 = call i32 @strlen(i8* %115)
store i32 %116, i32* %6
%117 = load i32, i32* %6
%118 = icmp ne i32 %117, 0
br i1 %118, label %119, label %134
119: ; preds = %114
%120 = load i8*, i8** %4
%121 = load i32, i32* %6
%122 = sub nsw i32 %121, 1
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds i8, i8* %120, i64 %123
%125 = load i8, i8* %124
%126 = sext i8 %125 to i32
%127 = icmp eq i32 %126, 10
br i1 %127, label %128, label %134
128: ; preds = %119
%129 = load i8*, i8** %4
%130 = load i32, i32* %6
%131 = sub nsw i32 %130, 1
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds i8, i8* %129, i64 %132
store i8 32, i8* %133
br label %134
134: ; preds = %128, %119, %114
%135 = load i8*, i8** %4
%136 = load i32, i32* @stdout
%137 = call i32 @fputs(i8* %135, i32 %136)
%138 = load i32, i32* @stdout
%139 = call i32 @fputs(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %138)
br label %140
140: ; preds = %134, %102
%141 = load i32, i32* @stdout
%142 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i32 %141)
ret void
}

LLVM IR (-O2):
%struct.winsize = type { i32 }
@TIOCGWINSZ = global i32 0
@.str = [2 x i8] c" \00"
@stdout = global i32 0
@.str.1 = [6 x i8] c"\1B[93m\00"
@.str.2 = [6 x i8] c"\1B[91m\00"
@.str.3 = [5 x i8] c"\1B[0m\00"
@.str.4 = [3 x i8] c"| \00"
@.str.5 = [2 x i8] c"\0A\00"
@.str.6 = [6 x i8] c"\1B[92m\00"
define void @printline(i8* %0, i8* %1) {
%3 = alloca %struct.winsize
%4 = bitcast %struct.winsize* %3 to i8*
%5 = load i32, i32* @TIOCGWINSZ
%6 = call i32 @ioctl(i32 0, i32 %5, %struct.winsize* %3)
%7 = load i32, i32* @stdout
%8 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = icmp eq i8* %0, null
br i1 %9, label %55, label %10
10: ; preds = %2
%11 = icmp eq i8* %1, null
%12 = load i32, i32* @stdout
%13 = select i1 %11, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0)
%14 = call i32 @fputs(i8* %13, i32 %12)
%15 = call i32 @strlen(i8* %0)
%16 = icmp eq i32 %15, 0
br i1 %16, label %48, label %17
17: ; preds = %10
%18 = add nsw i32 %15, -1
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8, i8* %0, i64 %19
%21 = load i8, i8* %20
%22 = icmp eq i8 %21, 10
br i1 %22, label %23, label %24
23: ; preds = %17
store i8 32, i8* %20
br label %24
24: ; preds = %17, %23
%25 = load i32, i32* @stdout
%26 = call i32 @fputs(i8* %0, i32 %25)
%27 = load i32, i32* @stdout
%28 = call i32 @fputs(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %27)
br i1 %16, label %55, label %29
29: ; preds = %24
%30 = getelementptr inbounds %struct.winsize, %struct.winsize* %3, i64 0, i32 0
%31 = load i32, i32* %30
%32 = sdiv i32 %31, 2
%33 = add nsw i32 %32, -2
%34 = icmp sgt i32 %15, %33
br i1 %34, label %51, label %35
35: ; preds = %29
%36 = sub i32 -2, %15
%37 = add i32 %36, %32
%38 = icmp sgt i32 %37, 0
br i1 %38, label %39, label %68
39: ; preds = %35, %39
%40 = phi i32 [ %43, %39 ], [ 0, %35 ]
%41 = load i32, i32* @stdout
%42 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %41)
%43 = add nuw nsw i32 %40, 1
%44 = load i32, i32* %30
%45 = sdiv i32 %44, 2
%46 = add i32 %36, %45
%47 = icmp slt i32 %43, %46
br i1 %47, label %39, label %68
48: ; preds = %10
%49 = load i32, i32* @stdout
%50 = call i32 @fputs(i8* %0, i32 %49)
br label %51
51: ; preds = %29, %48
%52 = phi i8* [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), %48 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), %29 ]
%53 = load i32, i32* @stdout
%54 = call i32 @fputs(i8* %52, i32 %53)
br label %55
55: ; preds = %51, %2, %24
%56 = getelementptr inbounds %struct.winsize, %struct.winsize* %3, i64 0, i32 0
%57 = load i32, i32* %56
%58 = icmp sgt i32 %57, 5
br i1 %58, label %59, label %68
59: ; preds = %55, %59
%60 = phi i32 [ %63, %59 ], [ 0, %55 ]
%61 = load i32, i32* @stdout
%62 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %61)
%63 = add nuw nsw i32 %60, 1
%64 = load i32, i32* %56
%65 = sdiv i32 %64, 2
%66 = add nsw i32 %65, -2
%67 = icmp slt i32 %63, %66
br i1 %67, label %59, label %68
68: ; preds = %39, %59, %55, %35
%69 = load i32, i32* @stdout
%70 = call i32 @fputs(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %69)
%71 = icmp eq i8* %1, null
br i1 %71, label %90, label %72
72: ; preds = %68
%73 = load i32, i32* @stdout
%74 = select i1 %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0)
%75 = call i32 @fputs(i8* %74, i32 %73)
%76 = call i32 @strlen(i8* %1)
%77 = icmp eq i32 %76, 0
br i1 %77, label %85, label %78
78: ; preds = %72
%79 = add nsw i32 %76, -1
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds i8, i8* %1, i64 %80
%82 = load i8, i8* %81
%83 = icmp eq i8 %82, 10
br i1 %83, label %84, label %85
84: ; preds = %78
store i8 32, i8* %81
br label %85
85: ; preds = %84, %78, %72
%86 = load i32, i32* @stdout
%87 = call i32 @fputs(i8* %1, i32 %86)
%88 = load i32, i32* @stdout
%89 = call i32 @fputs(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %88)
br label %90
90: ; preds = %85, %68
%91 = load i32, i32* @stdout
%92 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i32 %91)
ret void
}