#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*/ EXIT_SUCCESS;
int /*<<< orphan*/ EX_USAGE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  if (argc < 2) {
    fputs("Usage: aslines text ..\n", stderr);
    exit(EX_USAGE);
  }
  argv++;
  while (*argv) {
    puts(*argv);
    argv++;
  }
  exit(EXIT_SUCCESS);
}


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    1173 <main+0x43>
mov    0x2e81(%rip),%rax
mov    (%rax),%esi
lea    0xea0(%rip),%rdi
call   1040 <fputs@plt>
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     11aa <main+0x7a>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <puts@plt>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    117f <main+0x4f>
mov    0x2e1f(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x2,%edi
jge    1159 <main+0x29>
mov    0x2e9b(%rip),%rax
mov    (%rax),%esi
lea    0xeba(%rip),%rdi
call   1040 <fputs@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
test   %rdi,%rdi
je     1181 <main+0x51>
add    $0x10,%rbx
nopl   0x0(%rax)
call   1030 <puts@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1170 <main+0x40>
mov    0x2e48(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"Usage: aslines text ..\0A\00"
@stderr = global i32 0
@EX_USAGE = global i32 0
@EXIT_SUCCESS = global i32 0
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 %13
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = call i32 @fputs(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i32, i32* @EX_USAGE
%12 = call i32 @exit(i32 %11)
unreachable
13: ; preds = %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i32 1
store i8** %15, i8*** %5
br label %16
16: ; preds = %20, %13
%17 = load i8**, i8*** %5
%18 = load i8*, i8** %17
%19 = icmp ne i8* %18, null
br i1 %19, label %20, label %26
20: ; preds = %16
%21 = load i8**, i8*** %5
%22 = load i8*, i8** %21
%23 = call i32 @puts(i8* %22)
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i32 1
store i8** %25, i8*** %5
br label %16
26: ; preds = %16
%27 = load i32, i32* @EXIT_SUCCESS
%28 = call i32 @exit(i32 %27)
unreachable
}

LLVM IR (-O2):
@.str = [24 x i8] c"Usage: aslines text ..\0A\00"
@stderr = global i32 0
@EX_USAGE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = icmp eq i8* %6, null
br i1 %7, label %20, label %13
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = tail call i32 @fputs(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i32, i32* @EX_USAGE
%12 = tail call i32 @exit(i32 %11)
unreachable
13: ; preds = %4, %13
%14 = phi i8* [ %18, %13 ], [ %6, %4 ]
%15 = phi i8** [ %17, %13 ], [ %5, %4 ]
%16 = tail call i32 @puts(i8* %14)
%17 = getelementptr inbounds i8*, i8** %15, i64 1
%18 = load i8*, i8** %17
%19 = icmp eq i8* %18, null
br i1 %19, label %20, label %13
20: ; preds = %13, %4
%21 = load i32, i32* @EXIT_SUCCESS
%22 = tail call i32 @exit(i32 %21)
unreachable
}