#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);
int /*<<< orphan*/ ft_putstr(char *);
int ft_strlen(char *);
void print_point(char *str) {
  if (ft_strlen(str) <= 7)
    ft_putstr("   |");
  else
    ft_putstr("  |");
  while (*str) {
    if (*str == '\a' || *str == '\b' || *str == '\f' || *str == '\n' ||
        *str == '\r' || *str == '\t' || *str == '\v')
      ft_putchar('.');
    else
      ft_putchar(*str);
    str++;
  }
  ft_putchar('|');
}


x86 assembly (clang, -O0):
<print_point>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ft_strlen@plt>
cmp    $0x7,%eax
jg     115f <print_point+0x2f>
lea    0xeab(%rip),%rdi
call   1050 <ft_putstr@plt>
jmp    116b <print_point+0x3b>
lea    0xe9b(%rip),%rdi
call   1050 <ft_putstr@plt>
jmp    1170 <print_point+0x40>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1219 <print_point+0xe9>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7,%eax
je     11ed <print_point+0xbd>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x8,%eax
je     11ed <print_point+0xbd>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xc,%eax
je     11ed <print_point+0xbd>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
je     11ed <print_point+0xbd>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xd,%eax
je     11ed <print_point+0xbd>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
je     11ed <print_point+0xbd>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xb,%eax
jne    11fc <print_point+0xcc>
mov    $0x2e,%edi
call   1040 <ft_putchar@plt>
jmp    1208 <print_point+0xd8>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1040 <ft_putchar@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1170 <print_point+0x40>
mov    $0x7c,%edi
call   1040 <ft_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_point>:
push   %rbx
mov    %rdi,%rbx
call   1030 <ft_strlen@plt>
cmp    $0x8,%eax
lea    0xebd(%rip),%rax
lea    0xeb7(%rip),%rdi
cmovl  %rax,%rdi
call   1050 <ft_putstr@plt>
jmp    116c <print_point+0x3c>
cs nopw 0x0(%rax,%rax,1)
nop
movsbl %cl,%edi
call   1040 <ft_putchar@plt>
add    $0x1,%rbx
movzbl (%rbx),%eax
mov    $0x2e,%cl
lea    -0x7(%rax),%edx
cmp    $0x7,%dl
jb     1160 <print_point+0x30>
test   %al,%al
je     1181 <print_point+0x51>
mov    %eax,%ecx
jmp    1160 <print_point+0x30>
mov    $0x7c,%edi
pop    %rbx
jmp    1040 <ft_putchar@plt>

LLVM IR (-O0):
@.str = [5 x i8] c" |\00"
@.str.1 = [4 x i8] c" |\00"
define void @print_point(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @ft_strlen(i8* %3)
%5 = icmp sle i32 %4, 7
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @ft_putstr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %10
8: ; preds = %1
%9 = call i32 @ft_putstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
br label %11
11: ; preds = %56, %10
%12 = load i8*, i8** %2
%13 = load i8, i8* %12
%14 = icmp ne i8 %13, 0
br i1 %14, label %15, label %59
15: ; preds = %11
%16 = load i8*, i8** %2
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 7
br i1 %19, label %50, label %20
20: ; preds = %15
%21 = load i8*, i8** %2
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 8
br i1 %24, label %50, label %25
25: ; preds = %20
%26 = load i8*, i8** %2
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, 12
br i1 %29, label %50, label %30
30: ; preds = %25
%31 = load i8*, i8** %2
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = icmp eq i32 %33, 10
br i1 %34, label %50, label %35
35: ; preds = %30
%36 = load i8*, i8** %2
%37 = load i8, i8* %36
%38 = sext i8 %37 to i32
%39 = icmp eq i32 %38, 13
br i1 %39, label %50, label %40
40: ; preds = %35
%41 = load i8*, i8** %2
%42 = load i8, i8* %41
%43 = sext i8 %42 to i32
%44 = icmp eq i32 %43, 9
br i1 %44, label %50, label %45
45: ; preds = %40
%46 = load i8*, i8** %2
%47 = load i8, i8* %46
%48 = sext i8 %47 to i32
%49 = icmp eq i32 %48, 11
br i1 %49, label %50, label %52
50: ; preds = %45, %40, %35, %30, %25, %20, %15
%51 = call i32 @ft_putchar(i8 signext 46)
br label %56
52: ; preds = %45
%53 = load i8*, i8** %2
%54 = load i8, i8* %53
%55 = call i32 @ft_putchar(i8 signext %54)
br label %56
56: ; preds = %52, %50
%57 = load i8*, i8** %2
%58 = getelementptr inbounds i8, i8* %57, i32 1
store i8* %58, i8** %2
br label %11
59: ; preds = %11
%60 = call i32 @ft_putchar(i8 signext 124)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c" |\00"
@.str.1 = [4 x i8] c" |\00"
define void @print_point(i8* %0) {
%2 = tail call i32 @ft_strlen(i8* %0)
%3 = icmp slt i32 %2, 8
%4 = select i1 %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
%5 = tail call i32 @ft_putstr(i8* %4)
br label %6
6: ; preds = %10, %1
%7 = phi i8* [ %0, %1 ], [ %13, %10 ]
%8 = load i8, i8* %7
switch i8 %8, label %9 [
i8 0, label %14
i8 7, label %10
i8 8, label %10
i8 12, label %10
i8 10, label %10
i8 13, label %10
i8 9, label %10
i8 11, label %10
]
9: ; preds = %6
br label %10
10: ; preds = %6, %6, %6, %6, %6, %6, %6, %9
%11 = phi i8 [ %8, %9 ], [ 46, %6 ], [ 46, %6 ], [ 46, %6 ], [ 46, %6 ], [ 46, %6 ], [ 46, %6 ], [ 46, %6 ]
%12 = tail call i32 @ft_putchar(i8 signext %11)
%13 = getelementptr inbounds i8, i8* %7, i64 1
br label %6
14: ; preds = %6
%15 = tail call i32 @ft_putchar(i8 signext 124)
ret void
}