#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 ft_atoi(char *);
int /*<<< orphan*/ ft_putchar(char);
int /*<<< orphan*/ ft_putstr(char *);
int /*<<< orphan*/ ft_tail(char *, int);
int main(int ac, char **av) {
  int i;
  int at;
  int end;
  i = 3;
  at = 0;
  end = ft_atoi(av[2]);
  while (av[i]) {
    if (ac > 4) {
      if (at++)
        ft_putchar('\n');
      ft_putstr("==> ");
      ft_putstr(av[i]);
      ft_putstr(" <==\n");
    }
    ft_tail(av[i], end);
    i++;
  }
  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)
movl   $0x3,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1060 <ft_atoi@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     11fa <main+0xba>
cmpl   $0x4,-0x8(%rbp)
jle    11d8 <main+0x98>
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x18(%rbp)
cmp    $0x0,%eax
je     11af <main+0x6f>
mov    $0xa,%edi
call   1040 <ft_putchar@plt>
lea    0xe4a(%rip),%rdi
call   1050 <ft_putstr@plt>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1050 <ft_putstr@plt>
lea    0xe32(%rip),%rdi
call   1050 <ft_putstr@plt>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x1c(%rbp),%esi
call   1030 <ft_tail@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1174 <main+0x34>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%r14d
mov    0x10(%rsi),%rdi
call   1060 <ft_atoi@plt>
mov    0x18(%rbx),%rdi
test   %rdi,%rdi
je     11c9 <main+0x89>
mov    %eax,%r13d
add    $0x18,%rbx
xor    %ebp,%ebp
lea    0xe8d(%rip),%r15
lea    0xe8b(%rip),%r12
jmp    11b3 <main+0x73>
nopl   0x0(%rax)
add    $0x1,%ebp
mov    %r15,%rdi
call   1050 <ft_putstr@plt>
mov    (%rbx),%rdi
call   1050 <ft_putstr@plt>
mov    %r12,%rdi
call   1050 <ft_putstr@plt>
mov    (%rbx),%rdi
mov    %r13d,%esi
call   1030 <ft_tail@plt>
mov    0x8(%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
je     11c9 <main+0x89>
cmp    $0x5,%r14d
jl     119e <main+0x5e>
test   %ebp,%ebp
je     1180 <main+0x40>
mov    $0xa,%edi
call   1040 <ft_putchar@plt>
jmp    1180 <main+0x40>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"==> \00"
@.str.1 = [6 x i8] c" <==\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 3, i32* %6
store i32 0, i32* %7
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 2
%11 = load i8*, i8** %10
%12 = call i32 @ft_atoi(i8* %11)
store i32 %12, i32* %8
br label %13
13: ; preds = %38, %2
%14 = load i8**, i8*** %5
%15 = load i32, i32* %6
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8*, i8** %14, i64 %16
%18 = load i8*, i8** %17
%19 = icmp ne i8* %18, null
br i1 %19, label %20, label %48
20: ; preds = %13
%21 = load i32, i32* %4
%22 = icmp sgt i32 %21, 4
br i1 %22, label %23, label %38
23: ; preds = %20
%24 = load i32, i32* %7
%25 = add nsw i32 %24, 1
store i32 %25, i32* %7
%26 = icmp ne i32 %24, 0
br i1 %26, label %27, label %29
27: ; preds = %23
%28 = call i32 @ft_putchar(i8 signext 10)
br label %29
29: ; preds = %27, %23
%30 = call i32 @ft_putstr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%31 = load i8**, i8*** %5
%32 = load i32, i32* %6
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds i8*, i8** %31, i64 %33
%35 = load i8*, i8** %34
%36 = call i32 @ft_putstr(i8* %35)
%37 = call i32 @ft_putstr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %38
38: ; preds = %29, %20
%39 = load i8**, i8*** %5
%40 = load i32, i32* %6
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds i8*, i8** %39, i64 %41
%43 = load i8*, i8** %42
%44 = load i32, i32* %8
%45 = call i32 @ft_tail(i8* %43, i32 %44)
%46 = load i32, i32* %6
%47 = add nsw i32 %46, 1
store i32 %47, i32* %6
br label %13
48: ; preds = %13
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"==> \00"
@.str.1 = [6 x i8] c" <==\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 2
%4 = load i8*, i8** %3
%5 = tail call i32 @ft_atoi(i8* %4)
%6 = getelementptr inbounds i8*, i8** %1, i64 3
%7 = load i8*, i8** %6
%8 = icmp eq i8* %7, null
br i1 %8, label %35, label %9
9: ; preds = %2
%10 = icmp sgt i32 %0, 4
br label %11
11: ; preds = %9, %27
%12 = phi i8* [ %7, %9 ], [ %33, %27 ]
%13 = phi i64 [ 3, %9 ], [ %31, %27 ]
%14 = phi i8** [ %6, %9 ], [ %32, %27 ]
%15 = phi i32 [ 0, %9 ], [ %29, %27 ]
br i1 %10, label %16, label %27
16: ; preds = %11
%17 = add nsw i32 %15, 1
%18 = icmp eq i32 %15, 0
br i1 %18, label %21, label %19
19: ; preds = %16
%20 = tail call i32 @ft_putchar(i8 signext 10)
br label %21
21: ; preds = %19, %16
%22 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%23 = load i8*, i8** %14
%24 = tail call i32 @ft_putstr(i8* %23)
%25 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%26 = load i8*, i8** %14
br label %27
27: ; preds = %21, %11
%28 = phi i8* [ %26, %21 ], [ %12, %11 ]
%29 = phi i32 [ %17, %21 ], [ %15, %11 ]
%30 = tail call i32 @ft_tail(i8* %28, i32 %5)
%31 = add nuw i64 %13, 1
%32 = getelementptr inbounds i8*, i8** %1, i64 %31
%33 = load i8*, i8** %32
%34 = icmp eq i8* %33, null
br i1 %34, label %35, label %11
35: ; preds = %27, %2
ret i32 0
}