#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 */
scalar_t__ printf(char *, int /*<<< orphan*/, char);
int main(int argc, char **argv) {
  argv++;
  while (*argv && (printf("%s%c", *argv++, *argv ? ' ' : '\n') >= 0))
    ;
  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)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
cmpq   $0x0,(%rcx)
mov    %al,-0x11(%rbp)
je     118a <main+0x7a>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%rax
mov    %eax,%esi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
mov    $0xa,%eax
mov    $0x20,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
lea    0xe88(%rip),%rdi
movsbl %al,%edx
call   1030 <printf@plt>
cmp    $0x0,%rax
setge  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    119a <main+0x8a>
jmp    119f <main+0x8f>
jmp    1132 <main+0x22>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
add    $0x10,%rbx
mov    $0xa,%ebp
lea    0xed9(%rip),%r14
nopw   0x0(%rax,%rax,1)
mov    -0x8(%rbx),%rsi
test   %rsi,%rsi
je     1156 <main+0x46>
cmpq   $0x0,(%rbx)
mov    $0x20,%edx
cmove  %ebp,%edx
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x8,%rbx
test   %rax,%rax
jns    1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%s%c\00"
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 i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i32 1
store i8** %7, i8*** %5
br label %8
8: ; preds = %27, %2
%9 = load i8**, i8*** %5
%10 = load i8*, i8** %9
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %25
12: ; preds = %8
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i32 1
store i8** %14, i8*** %5
%15 = load i8*, i8** %13
%16 = ptrtoint i8* %15 to i32
%17 = load i8**, i8*** %5
%18 = load i8*, i8** %17
%19 = icmp ne i8* %18, null
%20 = zext i1 %19 to i64
%21 = select i1 %19, i32 32, i32 10
%22 = trunc i32 %21 to i8
%23 = call i64 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %16, i8 signext %22)
%24 = icmp sge i64 %23, 0
br label %25
25: ; preds = %12, %8
%26 = phi i1 [ false, %8 ], [ %24, %12 ]
br i1 %26, label %27, label %28
27: ; preds = %25
br label %8
28: ; preds = %25
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%s%c\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
br label %4
4: ; preds = %8, %2
%5 = phi i8** [ %3, %2 ], [ %9, %8 ]
%6 = load i8*, i8** %5
%7 = icmp eq i8* %6, null
br i1 %7, label %17, label %8
8: ; preds = %4
%9 = getelementptr inbounds i8*, i8** %5, i64 1
%10 = ptrtoint i8* %6 to i64
%11 = trunc i64 %10 to i32
%12 = load i8*, i8** %9
%13 = icmp eq i8* %12, null
%14 = select i1 %13, i8 10, i8 32
%15 = tail call i64 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %11, i8 signext %14)
%16 = icmp sgt i64 %15, -1
br i1 %16, label %4, label %17
17: ; preds = %4, %8
ret i32 0
}