#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);
int main(int argc, char **argv) {
  int i;
  int j;
  i = 1;
  j = 0;
  while (i < argc)
    i++;
  i--;
  while (i > 0) {
    while (argv[i][j] != '\0') {
      ft_putchar(argv[i][j]);
      j++;
    }
    j = 0;
    ft_putchar('\n');
    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   $0x1,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    114e <main+0x3e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1134 <main+0x24>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    11c9 <main+0xb9>
jmp    1166 <main+0x56>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     11aa <main+0x9a>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <ft_putchar@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1166 <main+0x56>
movl   $0x0,-0x18(%rbp)
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    1157 <main+0x47>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
cmp    $0x2,%edi
mov    $0x1,%eax
cmovge %edi,%eax
cmp    $0x2,%eax
jb     117a <main+0x6a>
mov    %rsi,%r15
mov    %eax,%r14d
jmp    1143 <main+0x33>
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
cmp    $0x2,%r14
mov    %r12,%r14
jle    117a <main+0x6a>
lea    -0x1(%r14),%r12
mov    -0x8(%r15,%r14,8),%rax
mov    (%rax),%al
test   %al,%al
je     1130 <main+0x20>
mov    $0x1,%ebx
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <ft_putchar@plt>
mov    (%r15,%r12,8),%rax
movzbl (%rax,%rbx,1),%eax
add    $0x1,%rbx
test   %al,%al
jne    1160 <main+0x50>
jmp    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

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