#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_putline(int /*<<< orphan*/);
int /*<<< orphan*/ ft_str_sort(int, char **);
int main(int argc, char **argv) {
  if (argc < 2)
    return (0);
  ft_str_sort(--argc, ++argv);
  while (argc--)
    ft_putline(*argv++);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    114c <main+0x2c>
movl   $0x0,-0x4(%rbp)
jmp    1198 <main+0x78>
mov    -0x8(%rbp),%edi
add    $0xffffffff,%edi
mov    %edi,-0x8(%rbp)
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
mov    %rsi,-0x10(%rbp)
call   1040 <ft_str_sort@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     1198 <main+0x78>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%rax
mov    %eax,%edi
call   1030 <ft_putline@plt>
jmp    1166 <main+0x46>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
cmp    $0x2,%edi
jl     1162 <main+0x42>
mov    %rsi,%r15
mov    %edi,%r14d
lea    -0x1(%r14),%edi
add    $0x8,%rsi
call   1040 <ft_str_sort@plt>
mov    %r14d,%r14d
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r15,%rbx,8),%edi
call   1030 <ft_putline@plt>
add    $0x1,%rbx
cmp    %ebx,%r14d
jne    1150 <main+0x30>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %18, label %4
4: ; preds = %2
%5 = add nsw i32 %0, -1
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = tail call i32 @ft_str_sort(i32 %5, i8** %6)
br label %8
8: ; preds = %4, %8
%9 = phi i8** [ %12, %8 ], [ %6, %4 ]
%10 = phi i32 [ %11, %8 ], [ %5, %4 ]
%11 = add nsw i32 %10, -1
%12 = getelementptr inbounds i8*, i8** %9, i64 1
%13 = load i8*, i8** %9
%14 = ptrtoint i8* %13 to i64
%15 = trunc i64 %14 to i32
%16 = tail call i32 @ft_putline(i32 %15)
%17 = icmp eq i32 %11, 0
br i1 %17, label %18, label %8
18: ; preds = %8, %2
ret i32 0
}