#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_print_first_word(char *);
int /*<<< orphan*/ ft_putchar(char);
char *ft_whitespaces(char *);
int main(int argc, char **argv) {
  char *ptr;
  ptr = argv[1];
  if (argc != 2) {
    ft_putchar('\n');
    return (0);
  }
  if (argv[1][0] == ' ' || argv[1][0] == '\t')
    ptr = ft_whitespaces(argv[1]);
  ft_print_first_word(ptr);
  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    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1172 <main+0x42>
mov    $0xa,%edi
call   1050 <ft_putchar@plt>
movl   $0x0,-0x4(%rbp)
jmp    11bb <main+0x8b>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     119a <main+0x6a>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
jne    11ab <main+0x7b>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <ft_whitespaces@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <ft_print_first_word@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jne    1153 <main+0x23>
mov    0x8(%rsi),%rdi
mov    (%rdi),%al
cmp    $0x20,%al
je     1144 <main+0x14>
cmp    $0x9,%al
jne    114c <main+0x1c>
call   1030 <ft_whitespaces@plt>
mov    %rax,%rdi
call   1040 <ft_print_first_word@plt>
jmp    115d <main+0x2d>
mov    $0xa,%edi
call   1050 <ft_putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
store i8* %9, i8** %6
%10 = load i32, i32* %4
%11 = icmp ne i32 %10, 2
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 @ft_putchar(i8 signext 10)
store i32 0, i32* %3
br label %38
14: ; preds = %2
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = getelementptr inbounds i8, i8* %17, i64 0
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 32
br i1 %21, label %30, label %22
22: ; preds = %14
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 1
%25 = load i8*, i8** %24
%26 = getelementptr inbounds i8, i8* %25, i64 0
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, 9
br i1 %29, label %30, label %35
30: ; preds = %22, %14
%31 = load i8**, i8*** %5
%32 = getelementptr inbounds i8*, i8** %31, i64 1
%33 = load i8*, i8** %32
%34 = call i8* @ft_whitespaces(i8* %33)
store i8* %34, i8** %6
br label %35
35: ; preds = %30, %22
%36 = load i8*, i8** %6
%37 = call i32 @ft_print_first_word(i8* %36)
store i32 0, i32* %3
br label %38
38: ; preds = %35, %12
%39 = load i32, i32* %3
ret i32 %39
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = icmp eq i32 %0, 2
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @ft_putchar(i8 signext 10)
br label %15
8: ; preds = %2
%9 = load i8, i8* %4
switch i8 %9, label %12 [
i8 32, label %10
i8 9, label %10
]
10: ; preds = %8, %8
%11 = tail call i8* @ft_whitespaces(i8* %4)
br label %12
12: ; preds = %8, %10
%13 = phi i8* [ %11, %10 ], [ %4, %8 ]
%14 = tail call i32 @ft_print_first_word(i8* %13)
br label %15
15: ; preds = %12, %6
ret i32 0
}