#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 /*<<< orphan*/ ft_putstr(char *);
int /*<<< orphan*/ ft_strlen(char *);
int isSubsequence(int /*<<< orphan*/, int /*<<< orphan*/, char *, char *);
int main(int argc, char **argv) {
  if (argc <= 1 || argc > 3) {
    ft_putchar('\n');
    return (0);
  }
  if (isSubsequence(ft_strlen(argv[1]), ft_strlen(argv[2]), argv[1], argv[2]) ==
      1) {
    ft_putstr(argv[1]);
    ft_putchar('\n');
    return (0);
  } else {
    ft_putchar('\n');
    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)
cmpl   $0x1,-0x8(%rbp)
jle    116a <main+0x2a>
cmpl   $0x3,-0x8(%rbp)
jle    1180 <main+0x40>
mov    $0xa,%edi
call   1040 <ft_putchar@plt>
movl   $0x0,-0x4(%rbp)
jmp    11f4 <main+0xb4>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <ft_strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1030 <ft_strlen@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rcx
call   1060 <isSubsequence@plt>
cmp    $0x1,%eax
jne    11e3 <main+0xa3>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <ft_putstr@plt>
mov    $0xa,%edi
call   1040 <ft_putchar@plt>
movl   $0x0,-0x4(%rbp)
jmp    11f4 <main+0xb4>
mov    $0xa,%edi
call   1040 <ft_putchar@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
add    $0xfffffffc,%edi
cmp    $0xfffffffe,%edi
jb     1181 <main+0x41>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1030 <ft_strlen@plt>
mov    %eax,%ebp
mov    0x10(%rbx),%rdi
call   1030 <ft_strlen@plt>
mov    0x8(%rbx),%rdx
mov    0x10(%rbx),%rcx
mov    %ebp,%edi
mov    %eax,%esi
call   1060 <isSubsequence@plt>
cmp    $0x1,%eax
jne    1181 <main+0x41>
mov    0x8(%rbx),%rdi
call   1050 <ft_putstr@plt>
mov    $0xa,%edi
call   1040 <ft_putchar@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
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 sle i32 %6, 1
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i32, i32* %4
%10 = icmp sgt i32 %9, 3
br i1 %10, label %11, label %13
11: ; preds = %8, %2
%12 = call i32 @ft_putchar(i8 signext 10)
store i32 0, i32* %3
br label %38
13: ; preds = %8
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i32 @ft_strlen(i8* %16)
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 2
%20 = load i8*, i8** %19
%21 = call i32 @ft_strlen(i8* %20)
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i64 1
%24 = load i8*, i8** %23
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 2
%27 = load i8*, i8** %26
%28 = call i32 @isSubsequence(i32 %17, i32 %21, i8* %24, i8* %27)
%29 = icmp eq i32 %28, 1
br i1 %29, label %30, label %36
30: ; preds = %13
%31 = load i8**, i8*** %5
%32 = getelementptr inbounds i8*, i8** %31, i64 1
%33 = load i8*, i8** %32
%34 = call i32 @ft_putstr(i8* %33)
%35 = call i32 @ft_putchar(i8 signext 10)
store i32 0, i32* %3
br label %38
36: ; preds = %13
%37 = call i32 @ft_putchar(i8 signext 10)
store i32 0, i32* %3
br label %38
38: ; preds = %36, %30, %11
%39 = load i32, i32* %3
ret i32 %39
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = add i32 %0, -4
%4 = icmp ult i32 %3, -2
br i1 %4, label %19, label %5
5: ; preds = %2
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = tail call i32 @ft_strlen(i8* %7)
%9 = getelementptr inbounds i8*, i8** %1, i64 2
%10 = load i8*, i8** %9
%11 = tail call i32 @ft_strlen(i8* %10)
%12 = load i8*, i8** %6
%13 = load i8*, i8** %9
%14 = tail call i32 @isSubsequence(i32 %8, i32 %11, i8* %12, i8* %13)
%15 = icmp eq i32 %14, 1
br i1 %15, label %16, label %19
16: ; preds = %5
%17 = load i8*, i8** %6
%18 = tail call i32 @ft_putstr(i8* %17)
br label %19
19: ; preds = %5, %2, %16
%20 = tail call i32 @ft_putchar(i8 signext 10)
ret i32 0
}