#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*/ printf(char *);
void _print_normal_boundary(int *col_length, int col_size) {
  int col = 0;
  int i = 0;
  for (col = 0; col < col_size; col++) {
    printf("+");
    for (i = 0; i < col_length[col] + 2; i++) {
      printf("-");
    }
  }
  printf("+\n");
}


x86 assembly (clang, -O0):
<_print_normal_boundary>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1199 <_print_normal_boundary+0x89>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x8(%rbp),%rcx
movslq -0x10(%rbp),%rdx
mov    (%rcx,%rdx,4),%ecx
add    $0x2,%ecx
cmp    %ecx,%eax
jge    1186 <_print_normal_boundary+0x76>
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1153 <_print_normal_boundary+0x43>
jmp    118b <_print_normal_boundary+0x7b>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1134 <_print_normal_boundary+0x24>
lea    0xe64(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_print_normal_boundary>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
jle    1175 <_print_normal_boundary+0x55>
mov    %rdi,%r15
mov    %esi,%r14d
xor    %ebx,%ebx
jmp    1149 <_print_normal_boundary+0x29>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rbx
cmp    %r14,%rbx
je     1175 <_print_normal_boundary+0x55>
mov    $0x2b,%edi
call   1030 <putchar@plt>
cmpl   $0xffffffff,(%r15,%rbx,4)
jl     1140 <_print_normal_boundary+0x20>
mov    $0xffffffff,%ebp
nop
mov    $0x2d,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    (%r15,%rbx,4),%ebp
jle    1160 <_print_normal_boundary+0x40>
jmp    1140 <_print_normal_boundary+0x20>
lea    0xe84(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <puts@plt>

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

LLVM IR (-O2):
@str = [2 x i8] c"+\00"
define void @_print_normal_boundary(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %21
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %18
%7 = phi i64 [ 0, %4 ], [ %19, %18 ]
%8 = tail call i32 @putchar(i32 43)
%9 = getelementptr inbounds i32, i32* %0, i64 %7
%10 = load i32, i32* %9
%11 = icmp sgt i32 %10, -2
br i1 %11, label %12, label %18
12: ; preds = %6, %12
%13 = phi i32 [ %15, %12 ], [ 0, %6 ]
%14 = tail call i32 @putchar(i32 45)
%15 = add nuw nsw i32 %13, 1
%16 = load i32, i32* %9
%17 = icmp sgt i32 %13, %16
br i1 %17, label %18, label %12
18: ; preds = %12, %6
%19 = add nuw nsw i64 %7, 1
%20 = icmp eq i64 %19, %5
br i1 %20, label %21, label %6
21: ; preds = %18, %2
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret void
}