#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*/ ft_putchar(char);
void ft_putline(int line_size) {
  int i;
  i = 0;
  while (i < line_size) {
    ft_putchar(' ');
    i++;
  }
  ft_putchar('/');
  while (i < line_size - 2) {
    ft_putchar('*');
    i++;
  }
  ft_putchar('\\');
  ft_putchar('\n');
}


x86 assembly (clang, -O0):
<ft_putline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1146 <ft_putline+0x36>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <ft_putline+0x12>
mov    $0x2f,%edi
call   1030 <ft_putchar@plt>
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jge    1179 <ft_putline+0x69>
mov    $0x2a,%edi
call   1030 <ft_putchar@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1150 <ft_putline+0x40>
mov    $0x5c,%edi
call   1030 <ft_putchar@plt>
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putline>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
test   %edi,%edi
jle    1133 <ft_putline+0x23>
mov    %ebx,%ebp
nopl   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
add    $0xffffffff,%ebp
jne    1120 <ft_putline+0x10>
mov    %ebx,%ebp
jmp    1135 <ft_putline+0x25>
xor    %ebp,%ebp
mov    $0x2f,%edi
call   1030 <ft_putchar@plt>
lea    -0x2(%rbx),%eax
cmp    %eax,%ebp
jge    115f <ft_putline+0x4f>
sub    %ebp,%ebx
add    $0xfffffffe,%ebx
nopl   0x0(%rax,%rax,1)
mov    $0x2a,%edi
call   1030 <ft_putchar@plt>
add    $0xffffffff,%ebx
jne    1150 <ft_putline+0x40>
mov    $0x5c,%edi
call   1030 <ft_putchar@plt>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <ft_putchar@plt>

LLVM IR (-O0):
define void @ft_putline(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %8, %1
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = icmp slt i32 %5, %6
br i1 %7, label %8, label %12
8: ; preds = %4
%9 = call i32 @ft_putchar(i8 signext 32)
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
store i32 %11, i32* %3
br label %4
12: ; preds = %4
%13 = call i32 @ft_putchar(i8 signext 47)
br label %14
14: ; preds = %19, %12
%15 = load i32, i32* %3
%16 = load i32, i32* %2
%17 = sub nsw i32 %16, 2
%18 = icmp slt i32 %15, %17
br i1 %18, label %19, label %23
19: ; preds = %14
%20 = call i32 @ft_putchar(i8 signext 42)
%21 = load i32, i32* %3
%22 = add nsw i32 %21, 1
store i32 %22, i32* %3
br label %14
23: ; preds = %14
%24 = call i32 @ft_putchar(i8 signext 92)
%25 = call i32 @ft_putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @ft_putline(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @ft_putchar(i8 signext 32)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
%9 = phi i32 [ 0, %1 ], [ %0, %3 ]
%10 = tail call i32 @ft_putchar(i8 signext 47)
%11 = add i32 %0, -2
%12 = icmp slt i32 %9, %11
br i1 %12, label %13, label %18
13: ; preds = %8, %13
%14 = phi i32 [ %16, %13 ], [ %9, %8 ]
%15 = tail call i32 @ft_putchar(i8 signext 42)
%16 = add nuw i32 %14, 1
%17 = icmp eq i32 %16, %11
br i1 %17, label %18, label %13
18: ; preds = %13, %8
%19 = tail call i32 @ft_putchar(i8 signext 92)
%20 = tail call i32 @ft_putchar(i8 signext 10)
ret void
}