#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*/ print_ch(char *);
int /*<<< orphan*/ printf(char *);
void print_top_line(int var_strlen_max[]) {
  int i, j;
  print_ch("\e(0\x6c\e(B");
  for (i = 0; i < 7; i++) {
    for (j = 0; j < var_strlen_max[i]; j++) {
      print_ch("\e(0\x71\e(B");
    }
    if (i == 7 - 1) {
      print_ch("\e(0\x6b\e(B");
    } else {
      print_ch("\e(0\x77\e(B");
    }
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print_top_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1040 <print_ch@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x7,-0xc(%rbp)
jge    11b8 <print_top_line+0x98>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%rcx
movslq -0xc(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jge    117e <print_top_line+0x5e>
lea    0xe9d(%rip),%rdi
call   1040 <print_ch@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1150 <print_top_line+0x30>
cmpl   $0x6,-0xc(%rbp)
jne    1199 <print_top_line+0x79>
lea    0xe81(%rip),%rdi
call   1040 <print_ch@plt>
jmp    11a5 <print_top_line+0x85>
lea    0xe78(%rip),%rdi
call   1040 <print_ch@plt>
jmp    11aa <print_top_line+0x8a>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113f <print_top_line+0x1f>
lea    0xe61(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_top_line>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
lea    0xed2(%rip),%rdi
call   1040 <print_ch@plt>
cmpl   $0x0,(%rbx)
jle    115f <print_top_line+0x3f>
xor    %ebp,%ebp
lea    0xec7(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1040 <print_ch@plt>
add    $0x1,%ebp
cmp    (%rbx),%ebp
jl     1150 <print_top_line+0x30>
lea    0xeb2(%rip),%rdi
call   1040 <print_ch@plt>
cmpl   $0x0,0x4(%rbx)
jle    1190 <print_top_line+0x70>
xor    %ebp,%ebp
lea    0xe8e(%rip),%r14
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1040 <print_ch@plt>
add    $0x1,%ebp
cmp    0x4(%rbx),%ebp
jl     1180 <print_top_line+0x60>
lea    0xe81(%rip),%rdi
call   1040 <print_ch@plt>
cmpl   $0x0,0x8(%rbx)
jle    11c0 <print_top_line+0xa0>
xor    %ebp,%ebp
lea    0xe5d(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1040 <print_ch@plt>
add    $0x1,%ebp
cmp    0x8(%rbx),%ebp
jl     11b0 <print_top_line+0x90>
lea    0xe51(%rip),%rdi
call   1040 <print_ch@plt>
cmpl   $0x0,0xc(%rbx)
jle    11f0 <print_top_line+0xd0>
xor    %ebp,%ebp
lea    0xe2d(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1040 <print_ch@plt>
add    $0x1,%ebp
cmp    0xc(%rbx),%ebp
jl     11e0 <print_top_line+0xc0>
lea    0xe21(%rip),%rdi
call   1040 <print_ch@plt>
cmpl   $0x0,0x10(%rbx)
jle    1220 <print_top_line+0x100>
xor    %ebp,%ebp
lea    0xdfd(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1040 <print_ch@plt>
add    $0x1,%ebp
cmp    0x10(%rbx),%ebp
jl     1210 <print_top_line+0xf0>
lea    0xdf1(%rip),%rdi
call   1040 <print_ch@plt>
cmpl   $0x0,0x14(%rbx)
jle    1250 <print_top_line+0x130>
xor    %ebp,%ebp
lea    0xdcd(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1040 <print_ch@plt>
add    $0x1,%ebp
cmp    0x14(%rbx),%ebp
jl     1240 <print_top_line+0x120>
lea    0xdc1(%rip),%rdi
call   1040 <print_ch@plt>
cmpl   $0x0,0x18(%rbx)
jle    1280 <print_top_line+0x160>
xor    %ebp,%ebp
lea    0xd9d(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1040 <print_ch@plt>
add    $0x1,%ebp
cmp    0x18(%rbx),%ebp
jl     1270 <print_top_line+0x150>
lea    0xd89(%rip),%rdi
call   1040 <print_ch@plt>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"\1B(0l\1B(B\00"
@.str.1 = [8 x i8] c"\1B(0q\1B(B\00"
@.str.2 = [8 x i8] c"\1B(0k\1B(B\00"
@.str.3 = [8 x i8] c"\1B(0w\1B(B\00"
define void @print_top_line(i32* nocapture %0) {
%2 = tail call i32 @print_ch(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %0
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %1, %5
%6 = phi i32 [ %8, %5 ], [ 0, %1 ]
%7 = tail call i32 @print_ch(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%8 = add nuw nsw i32 %6, 1
%9 = load i32, i32* %0
%10 = icmp slt i32 %8, %9
br i1 %10, label %5, label %11
11: ; preds = %5, %1
%12 = tail call i32 @print_ch(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%13 = getelementptr inbounds i32, i32* %0, i64 1
%14 = load i32, i32* %13
%15 = getelementptr inbounds i32, i32* %0, i64 1
%16 = icmp sgt i32 %14, 0
br i1 %16, label %17, label %23
17: ; preds = %11, %17
%18 = phi i32 [ %20, %17 ], [ 0, %11 ]
%19 = tail call i32 @print_ch(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%20 = add nuw nsw i32 %18, 1
%21 = load i32, i32* %15
%22 = icmp slt i32 %20, %21
br i1 %22, label %17, label %23
23: ; preds = %17, %11
%24 = tail call i32 @print_ch(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%25 = getelementptr inbounds i32, i32* %0, i64 2
%26 = load i32, i32* %25
%27 = getelementptr inbounds i32, i32* %0, i64 2
%28 = icmp sgt i32 %26, 0
br i1 %28, label %29, label %35
29: ; preds = %23, %29
%30 = phi i32 [ %32, %29 ], [ 0, %23 ]
%31 = tail call i32 @print_ch(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%32 = add nuw nsw i32 %30, 1
%33 = load i32, i32* %27
%34 = icmp slt i32 %32, %33
br i1 %34, label %29, label %35
35: ; preds = %29, %23
%36 = tail call i32 @print_ch(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%37 = getelementptr inbounds i32, i32* %0, i64 3
%38 = load i32, i32* %37
%39 = icmp sgt i32 %38, 0
%40 = getelementptr inbounds i32, i32* %0, i64 3
br i1 %39, label %41, label %47
41: ; preds = %35, %41
%42 = phi i32 [ %44, %41 ], [ 0, %35 ]
%43 = tail call i32 @print_ch(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%44 = add nuw nsw i32 %42, 1
%45 = load i32, i32* %40
%46 = icmp slt i32 %44, %45
br i1 %46, label %41, label %47
47: ; preds = %41, %35
%48 = tail call i32 @print_ch(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%49 = getelementptr inbounds i32, i32* %0, i64 4
%50 = load i32, i32* %49
%51 = icmp sgt i32 %50, 0
%52 = getelementptr inbounds i32, i32* %0, i64 4
br i1 %51, label %53, label %59
53: ; preds = %47, %53
%54 = phi i32 [ %56, %53 ], [ 0, %47 ]
%55 = tail call i32 @print_ch(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%56 = add nuw nsw i32 %54, 1
%57 = load i32, i32* %52
%58 = icmp slt i32 %56, %57
br i1 %58, label %53, label %59
59: ; preds = %53, %47
%60 = tail call i32 @print_ch(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%61 = getelementptr inbounds i32, i32* %0, i64 5
%62 = load i32, i32* %61
%63 = icmp sgt i32 %62, 0
%64 = getelementptr inbounds i32, i32* %0, i64 5
br i1 %63, label %65, label %71
65: ; preds = %59, %65
%66 = phi i32 [ %68, %65 ], [ 0, %59 ]
%67 = tail call i32 @print_ch(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%68 = add nuw nsw i32 %66, 1
%69 = load i32, i32* %64
%70 = icmp slt i32 %68, %69
br i1 %70, label %65, label %71
71: ; preds = %65, %59
%72 = tail call i32 @print_ch(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%73 = getelementptr inbounds i32, i32* %0, i64 6
%74 = load i32, i32* %73
%75 = icmp sgt i32 %74, 0
%76 = getelementptr inbounds i32, i32* %0, i64 6
br i1 %75, label %77, label %83
77: ; preds = %71, %77
%78 = phi i32 [ %80, %77 ], [ 0, %71 ]
%79 = tail call i32 @print_ch(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%80 = add nuw nsw i32 %78, 1
%81 = load i32, i32* %76
%82 = icmp slt i32 %80, %81
br i1 %82, label %77, label %83
83: ; preds = %77, %71
%84 = tail call i32 @print_ch(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%85 = tail call i32 @putchar(i32 10)
ret void
}