#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 EXIT_SUCCESS;
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, char const *);
int /*<<< orphan*/ putchar(char);
int main(const int argc, const char *argv[]) {
  for (int i = argc - 1; i > 0; --i) {
    printf("%s ", argv[i]);
  }
  putchar('\n');
  getchar();
  return EXIT_SUCCESS;
}


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    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    117f <main+0x4f>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xe94(%rip),%rdi
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    114f <main+0x1f>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
mov    0x2e49(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
cmp    $0x2,%edi
jl     1169 <main+0x39>
mov    %rsi,%r15
mov    %edi,%ebx
add    $0x1,%rbx
lea    0xeb6(%rip),%r14
nopw   0x0(%rax,%rax,1)
lea    -0x2(%rbx),%eax
mov    (%r15,%rax,8),%rsi
mov    %r14,%rdi
call   1040 <printf@plt>
add    $0xffffffffffffffff,%rbx
cmp    $0x2,%rbx
ja     1150 <main+0x20>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
mov    0x2e5f(%rip),%rax
mov    (%rax),%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s \00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = sub nsw i32 %7, 1
store i32 %8, i32* %6
br label %9
9: ; preds = %19, %2
%10 = load i32, i32* %6
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %22
12: ; preds = %9
%13 = load i8**, i8*** %5
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %13, i64 %15
%17 = load i8*, i8** %16
%18 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %17)
br label %19
19: ; preds = %12
%20 = load i32, i32* %6
%21 = add nsw i32 %20, -1
store i32 %21, i32* %6
br label %9
22: ; preds = %9
%23 = call i32 @putchar(i8 signext 10)
%24 = call i32 (...) @getchar()
%25 = load i32, i32* @EXIT_SUCCESS
ret i32 %25
}

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