#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_memdel(void **);
int /*<<< orphan*/ ft_strdel(char **);
int ft_splitdel(char ***split) {
  char **str;
  int i;
  i = 0;
  str = *split;
  while (*str) {
    ft_strdel(str);
    i++;
    str = &(*split)[i];
  }
  ft_memdel((void **)split);
  return (0);
}


x86 assembly (clang, -O0):
<ft_splitdel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     1179 <ft_splitdel+0x59>
mov    -0x10(%rbp),%rdi
call   1040 <ft_strdel@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movslq -0x14(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    113e <ft_splitdel+0x1e>
mov    -0x8(%rbp),%rdi
call   1030 <ft_memdel@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_splitdel>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rdi
cmpq   $0x0,(%rdi)
je     1157 <ft_splitdel+0x37>
mov    $0x8,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
call   1040 <ft_strdel@plt>
mov    (%r14),%rax
lea    (%rax,%rbx,1),%rdi
cmpq   $0x0,(%rax,%rbx,1)
lea    0x8(%rbx),%rbx
jne    1140 <ft_splitdel+0x20>
mov    %r14,%rdi
call   1030 <ft_memdel@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @ft_splitdel(i8*** %0) {
%2 = alloca i8***
%3 = alloca i8**
%4 = alloca i32
store i8*** %0, i8**** %2
store i32 0, i32* %4
%5 = load i8***, i8**** %2
%6 = load i8**, i8*** %5
store i8** %6, i8*** %3
br label %7
7: ; preds = %11, %1
%8 = load i8**, i8*** %3
%9 = load i8*, i8** %8
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %21
11: ; preds = %7
%12 = load i8**, i8*** %3
%13 = call i32 @ft_strdel(i8** %12)
%14 = load i32, i32* %4
%15 = add nsw i32 %14, 1
store i32 %15, i32* %4
%16 = load i8***, i8**** %2
%17 = load i8**, i8*** %16
%18 = load i32, i32* %4
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8*, i8** %17, i64 %19
store i8** %20, i8*** %3
br label %7
21: ; preds = %7
%22 = load i8***, i8**** %2
%23 = bitcast i8*** %22 to i8**
%24 = call i32 @ft_memdel(i8** %23)
ret i32 0
}

LLVM IR (-O2):
define i32 @ft_splitdel(i8*** %0) {
%2 = load i8**, i8*** %0
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %14, label %5
5: ; preds = %1, %5
%6 = phi i64 [ %9, %5 ], [ 0, %1 ]
%7 = phi i8** [ %11, %5 ], [ %2, %1 ]
%8 = tail call i32 @ft_strdel(i8** %7)
%9 = add nuw i64 %6, 1
%10 = load i8**, i8*** %0
%11 = getelementptr inbounds i8*, i8** %10, i64 %9
%12 = load i8*, i8** %11
%13 = icmp eq i8* %12, null
br i1 %13, label %14, label %5
14: ; preds = %5, %1
%15 = bitcast i8*** %0 to i8**
%16 = tail call i32 @ft_memdel(i8** %15)
ret i32 0
}