#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*/ free_3d(char ***);
int /*<<< orphan*/ ft_error(char *);
int /*<<< orphan*/ ft_letter(char ***);
char **ft_solver(char ***);
int /*<<< orphan*/ ft_to_upleft(char ***);
char ***preprocessor(int, char **);
int main(int argc, char *argv[]) {
  char ***array;
  char **res;
  if (!(array = preprocessor(argc, argv)))
    return (1);
  ft_to_upleft(array);
  ft_letter(array);
  res = ft_solver(array);
  if (!res) {
    ft_error("error\n");
    return (1);
  }
  free_3d(array);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <preprocessor@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    119c <main+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    11ee <main+0x8e>
mov    -0x18(%rbp),%rdi
call   1070 <ft_to_upleft@plt>
mov    -0x18(%rbp),%rdi
call   1060 <ft_letter@plt>
mov    -0x18(%rbp),%rdi
call   1050 <ft_solver@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    11de <main+0x7e>
lea    0xe33(%rip),%rdi
call   1080 <ft_error@plt>
movl   $0x1,-0x4(%rbp)
jmp    11ee <main+0x8e>
mov    -0x18(%rbp),%rdi
call   1030 <free_3d@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
call   1040 <preprocessor@plt>
mov    $0x1,%ebp
test   %rax,%rax
je     11aa <main+0x4a>
mov    %rax,%rbx
mov    %rax,%rdi
call   1070 <ft_to_upleft@plt>
mov    %rbx,%rdi
call   1060 <ft_letter@plt>
mov    %rbx,%rdi
call   1050 <ft_solver@plt>
test   %rax,%rax
je     119e <main+0x3e>
mov    %rbx,%rdi
call   1030 <free_3d@plt>
xor    %ebp,%ebp
jmp    11aa <main+0x4a>
lea    0xe5b(%rip),%rdi
call   1080 <ft_error@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"error\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8***
%7 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = load i8**, i8*** %5
%10 = call i8*** @preprocessor(i32 %8, i8** %9)
store i8*** %10, i8**** %6
%11 = icmp ne i8*** %10, null
br i1 %11, label %13, label %12
12: ; preds = %2
store i32 1, i32* %3
br label %27
13: ; preds = %2
%14 = load i8***, i8**** %6
%15 = call i32 @ft_to_upleft(i8*** %14)
%16 = load i8***, i8**** %6
%17 = call i32 @ft_letter(i8*** %16)
%18 = load i8***, i8**** %6
%19 = call i8** @ft_solver(i8*** %18)
store i8** %19, i8*** %7
%20 = load i8**, i8*** %7
%21 = icmp ne i8** %20, null
br i1 %21, label %24, label %22
22: ; preds = %13
%23 = call i32 @ft_error(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %27
24: ; preds = %13
%25 = load i8***, i8**** %6
%26 = call i32 @free_3d(i8*** %25)
store i32 0, i32* %3
br label %27
27: ; preds = %24, %22, %12
%28 = load i32, i32* %3
ret i32 %28
}

LLVM IR (-O2):
@.str = [7 x i8] c"error\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i8*** @preprocessor(i32 %0, i8** %1)
%4 = icmp eq i8*** %3, null
br i1 %4, label %14, label %5
5: ; preds = %2
%6 = tail call i32 @ft_to_upleft(i8*** %3)
%7 = tail call i32 @ft_letter(i8*** %3)
%8 = tail call i8** @ft_solver(i8*** %3)
%9 = icmp eq i8** %8, null
br i1 %9, label %10, label %12
10: ; preds = %5
%11 = tail call i32 @ft_error(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %14
12: ; preds = %5
%13 = tail call i32 @free_3d(i8*** %3)
br label %14
14: ; preds = %2, %12, %10
%15 = phi i32 [ 0, %12 ], [ 1, %10 ], [ 1, %2 ]
ret i32 %15
}