#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 */
char **ft_split_whitespaces(char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char a[] = "\t\tHello World!";
  char **c = ft_split_whitespaces(a);
  int i = 0;
  while (c[i]) {
    printf("%s\n", c[i]);
    i++;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x13(%rbp)
mov    0xec8(%rip),%eax
mov    %eax,-0xb(%rbp)
mov    0xec2(%rip),%ax
mov    %ax,-0x7(%rbp)
mov    0xeba(%rip),%al
mov    %al,-0x5(%rbp)
lea    -0x13(%rbp),%rdi
call   1040 <ft_split_whitespaces@plt>
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     11a4 <main+0x84>
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xe7e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    116b <main+0x4b>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movabs $0x21646c726f5720,%rax
mov    %rax,0xf(%rsp)
movabs $0x206f6c6c65480909,%rax
6c 6f 20
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rdi
call   1040 <ft_split_whitespaces@plt>
mov    (%rax),%rsi
test   %rsi,%rsi
je     1184 <main+0x64>
mov    %rax,%rbx
add    $0x8,%rbx
lea    0xeaa(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
call   1030 <printf@plt>
mov    (%rbx),%rsi
add    $0x8,%rbx
test   %rsi,%rsi
jne    1170 <main+0x50>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.a = [15 x i8] c"\09\09Hello World!\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [15 x i8]
%3 = alloca i8**
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [15 x i8]* %2 to i8*
%6 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 0
%7 = call i8** @ft_split_whitespaces(i8* %6)
store i8** %7, i8*** %3
store i32 0, i32* %4
br label %8
8: ; preds = %15, %0
%9 = load i8**, i8*** %3
%10 = load i32, i32* %4
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8*, i8** %9, i64 %11
%13 = load i8*, i8** %12
%14 = icmp ne i8* %13, null
br i1 %14, label %15, label %24
15: ; preds = %8
%16 = load i8**, i8*** %3
%17 = load i32, i32* %4
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8*, i8** %16, i64 %18
%20 = load i8*, i8** %19
%21 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %20)
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
store i32 %23, i32* %4
br label %8
24: ; preds = %8
%25 = load i32, i32* %1
ret i32 %25
}

LLVM IR (-O2):
@__const.main.a = [15 x i8] c"\09\09Hello World!\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [15 x i8]
%2 = getelementptr inbounds [15 x i8], [15 x i8]* %1, i64 0, i64 0
%3 = call i8** @ft_split_whitespaces(i8* %2)
%4 = load i8*, i8** %3
%5 = icmp eq i8* %4, null
br i1 %5, label %14, label %6
6: ; preds = %0, %6
%7 = phi i64 [ %10, %6 ], [ 0, %0 ]
%8 = phi i8* [ %12, %6 ], [ %4, %0 ]
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = add nuw i64 %7, 1
%11 = getelementptr inbounds i8*, i8** %3, i64 %10
%12 = load i8*, i8** %11
%13 = icmp eq i8* %12, null
br i1 %13, label %14, label %6
14: ; preds = %6, %0
ret i32 0
}