#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_table_header_art(int header_size, int left_screen) {
  int i;
  for (i = 0; i < left_screen; i++) {
    printf(" ");
  }
  for (i = 0; i < header_size; i++) {
    if (i == 0 || i == header_size - 1) {
      printf("+");
    } else {
      printf("-");
    }
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print_table_header_art>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    114b <print_table_header_art+0x3b>
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1125 <print_table_header_art+0x15>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    11a9 <print_table_header_art+0x99>
cmpl   $0x0,-0xc(%rbp)
je     1179 <print_table_header_art+0x69>
mov    -0xc(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    118a <print_table_header_art+0x7a>
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
jmp    1196 <print_table_header_art+0x86>
lea    0xe73(%rip),%rdi
call   1030 <printf@plt>
jmp    119b <print_table_header_art+0x8b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1152 <print_table_header_art+0x42>
lea    0xe56(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_table_header_art>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
test   %esi,%esi
jle    112f <print_table_header_art+0x1f>
mov    %esi,%ebp
nopl   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    1120 <print_table_header_art+0x10>
test   %ebx,%ebx
jle    1167 <print_table_header_art+0x57>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
lea    (%rbx,%rbp,1),%eax
sub    $0x1,%ebp
setb   %cl
not    %cl
cmp    $0x1,%eax
setne  %al
and    %cl,%al
movzbl %al,%eax
lea    (%rax,%rax,1),%edi
add    $0x2b,%edi
call   1030 <putchar@plt>
mov    %ebx,%eax
add    %ebp,%eax
jne    1140 <print_table_header_art+0x30>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @print_table_header_art(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %8, label %4
4: ; preds = %8, %2
%5 = icmp sgt i32 %0, 0
br i1 %5, label %6, label %22
6: ; preds = %4
%7 = add nsw i32 %0, -1
br label %13
8: ; preds = %2, %8
%9 = phi i32 [ %11, %8 ], [ 0, %2 ]
%10 = tail call i32 @putchar(i32 32)
%11 = add nuw nsw i32 %9, 1
%12 = icmp eq i32 %11, %1
br i1 %12, label %4, label %8
13: ; preds = %6, %13
%14 = phi i32 [ 0, %6 ], [ %20, %13 ]
%15 = icmp eq i32 %14, 0
%16 = icmp eq i32 %14, %7
%17 = select i1 %15, i1 true, i1 %16
%18 = select i1 %17, i32 43, i32 45
%19 = tail call i32 @putchar(i32 %18)
%20 = add nuw nsw i32 %14, 1
%21 = icmp eq i32 %20, %0
br i1 %21, label %22, label %13
22: ; preds = %13, %4
%23 = tail call i32 @putchar(i32 10)
ret void
}