#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_putchar(char);
void ft_print_words_tables(char **tab) {
  int i;
  int j;
  i = 0;
  while (tab[i]) {
    j = 0;
    while (tab[i][j]) {
      ft_putchar(tab[i][j]);
      j++;
    }
    ft_putchar('\n');
    tab++;
  }
}


x86 assembly (clang, -O0):
<ft_print_words_tables>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1199 <ft_print_words_tables+0x89>
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x10(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     117e <ft_print_words_tables+0x6e>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <ft_putchar@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113d <ft_print_words_tables+0x2d>
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
jmp    1123 <ft_print_words_tables+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_print_words_tables>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%rax
test   %rax,%rax
je     1179 <ft_print_words_tables+0x69>
mov    %rdi,%r14
jmp    1147 <ft_print_words_tables+0x37>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
mov    0x8(%r14),%rax
add    $0x8,%r14
test   %rax,%rax
je     1179 <ft_print_words_tables+0x69>
mov    (%rax),%al
test   %al,%al
je     1130 <ft_print_words_tables+0x20>
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %al,%edi
call   1030 <ft_putchar@plt>
mov    (%r14),%rax
movzbl (%rax,%rbx,1),%eax
add    $0x1,%rbx
test   %al,%al
jne    1160 <ft_print_words_tables+0x50>
jmp    1130 <ft_print_words_tables+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @ft_print_words_tables(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %23, label %4
4: ; preds = %1, %18
%5 = phi i8* [ %21, %18 ], [ %2, %1 ]
%6 = phi i8** [ %20, %18 ], [ %0, %1 ]
%7 = load i8, i8* %5
%8 = icmp eq i8 %7, 0
br i1 %8, label %18, label %9
9: ; preds = %4, %9
%10 = phi i64 [ %13, %9 ], [ 0, %4 ]
%11 = phi i8 [ %16, %9 ], [ %7, %4 ]
%12 = tail call i32 @ft_putchar(i8 signext %11)
%13 = add nuw i64 %10, 1
%14 = load i8*, i8** %6
%15 = getelementptr inbounds i8, i8* %14, i64 %13
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %9
18: ; preds = %9, %4
%19 = tail call i32 @ft_putchar(i8 signext 10)
%20 = getelementptr inbounds i8*, i8** %6, i64 1
%21 = load i8*, i8** %20
%22 = icmp eq i8* %21, null
br i1 %22, label %23, label %4
23: ; preds = %18, %1
ret void
}