#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*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, char *);
char *strtok(char *, char *);
int main() {
  char recenica[200 + 1] = "";
  char *token[30] = {};
  scanf(" %[^\n]", recenica);
  token[0] = strtok(recenica, " -;,.?!");
  int i = 0;
  int br_rijeci = 0;
  do {
    br_rijeci++;
    i++;
    token[i] = strtok(NULL, " -;,.?!");
  } while (token[i]);
  for (i = br_rijeci - 1; i >= 0; i--) {
    printf("%s ", token[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1d0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xd0(%rbp),%rdi
xor    %esi,%esi
mov    $0xc9,%edx
call   1040 <memset@plt>
lea    -0x1c0(%rbp),%rdi
xor    %esi,%esi
mov    $0xf0,%edx
call   1040 <memset@plt>
lea    -0xd0(%rbp),%rsi
lea    0xe7a(%rip),%rdi
call   1050 <scanf@plt>
lea    -0xd0(%rbp),%rdi
lea    0xe6e(%rip),%rsi
call   1060 <strtok@plt>
mov    %rax,-0x1c0(%rbp)
movl   $0x0,-0x1c4(%rbp)
movl   $0x0,-0x1c8(%rbp)
mov    -0x1c8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c8(%rbp)
mov    -0x1c4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xe25(%rip),%rsi
call   1060 <strtok@plt>
mov    %rax,%rcx
movslq -0x1c4(%rbp),%rax
mov    %rcx,-0x1c0(%rbp,%rax,8)
ff
movslq -0x1c4(%rbp),%rax
cmpq   $0x0,-0x1c0(%rbp,%rax,8)
jne    11b9 <main+0x79>
mov    -0x1c8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x1c4(%rbp)
cmpl   $0x0,-0x1c4(%rbp)
jl     125a <main+0x11a>
movslq -0x1c4(%rbp),%rax
mov    -0x1c0(%rbp,%rax,8),%rsi
ff
lea    0xdce(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c4(%rbp)
jmp    121e <main+0xde>
xor    %eax,%eax
add    $0x1d0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x1c0,%rsp
xorps  %xmm0,%xmm0
movups %xmm0,0x1a9(%rsp)
movaps %xmm0,0x1a0(%rsp)
movaps %xmm0,0x190(%rsp)
movaps %xmm0,0x180(%rsp)
movaps %xmm0,0x170(%rsp)
movaps %xmm0,0x160(%rsp)
movaps %xmm0,0x150(%rsp)
movaps %xmm0,0x140(%rsp)
movaps %xmm0,0x130(%rsp)
movaps %xmm0,0x120(%rsp)
movaps %xmm0,0x110(%rsp)
movaps %xmm0,0x100(%rsp)
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
lea    0xdf3(%rip),%rdi
lea    0xf0(%rsp),%r14
mov    %r14,%rsi
call   1040 <scanf@plt>
lea    0xde3(%rip),%r15
mov    %r14,%rdi
mov    %r15,%rsi
call   1050 <strtok@plt>
mov    %rax,(%rsp)
mov    $0xffffffffffffffff,%rbx
nopw   0x0(%rax,%rax,1)
xor    %edi,%edi
mov    %r15,%rsi
call   1050 <strtok@plt>
mov    %rax,0x10(%rsp,%rbx,8)
add    $0x1,%rbx
test   %rax,%rax
jne    1240 <main+0x110>
mov    %ebx,%ebx
lea    0xdae(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%rsp,%rbx,8),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0xffffffffffffffff,%rbx
jb     1270 <main+0x140>
xor    %eax,%eax
add    $0x1c0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [7 x i8] c" %[^\0A]\00"
@.str.1 = [8 x i8] c" -;,.?!\00"
@.str.2 = [4 x i8] c"%s \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [201 x i8]
%3 = alloca [30 x i8*]
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = bitcast [201 x i8]* %2 to i8*
%7 = bitcast [30 x i8*]* %3 to i8*
%8 = getelementptr inbounds [201 x i8], [201 x i8]* %2, i64 0, i64 0
%9 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = getelementptr inbounds [201 x i8], [201 x i8]* %2, i64 0, i64 0
%11 = call i8* @strtok(i8* %10, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%12 = getelementptr inbounds [30 x i8*], [30 x i8*]* %3, i64 0, i64 0
store i8* %11, i8** %12
store i32 0, i32* %4
store i32 0, i32* %5
br label %13
13: ; preds = %22, %0
%14 = load i32, i32* %5
%15 = add nsw i32 %14, 1
store i32 %15, i32* %5
%16 = load i32, i32* %4
%17 = add nsw i32 %16, 1
store i32 %17, i32* %4
%18 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%19 = load i32, i32* %4
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [30 x i8*], [30 x i8*]* %3, i64 0, i64 %20
store i8* %18, i8** %21
br label %22
22: ; preds = %13
%23 = load i32, i32* %4
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [30 x i8*], [30 x i8*]* %3, i64 0, i64 %24
%26 = load i8*, i8** %25
%27 = icmp ne i8* %26, null
br i1 %27, label %13, label %28
28: ; preds = %22
%29 = load i32, i32* %5
%30 = sub nsw i32 %29, 1
store i32 %30, i32* %4
br label %31
31: ; preds = %40, %28
%32 = load i32, i32* %4
%33 = icmp sge i32 %32, 0
br i1 %33, label %34, label %43
34: ; preds = %31
%35 = load i32, i32* %4
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [30 x i8*], [30 x i8*]* %3, i64 0, i64 %36
%38 = load i8*, i8** %37
%39 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %38)
br label %40
40: ; preds = %34
%41 = load i32, i32* %4
%42 = add nsw i32 %41, -1
store i32 %42, i32* %4
br label %31
43: ; preds = %31
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c" %[^\0A]\00"
@.str.1 = [8 x i8] c" -;,.?!\00"
@.str.2 = [4 x i8] c"%s \00"
define i32 @main() {
%1 = alloca [201 x i8]
%2 = alloca [30 x i8*]
%3 = getelementptr inbounds [201 x i8], [201 x i8]* %1, i64 0, i64 0
%4 = bitcast [30 x i8*]* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %3)
%6 = call i8* @strtok(i8* %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%7 = getelementptr inbounds [30 x i8*], [30 x i8*]* %2, i64 0, i64 0
store i8* %6, i8** %7
br label %8
8: ; preds = %8, %0
%9 = phi i64 [ %10, %8 ], [ 0, %0 ]
%10 = add nuw nsw i64 %9, 1
%11 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%12 = getelementptr inbounds [30 x i8*], [30 x i8*]* %2, i64 0, i64 %10
store i8* %11, i8** %12
%13 = icmp eq i8* %11, null
br i1 %13, label %14, label %8
14: ; preds = %8
%15 = and i64 %9, 4294967295
br label %16
16: ; preds = %14, %16
%17 = phi i64 [ %15, %14 ], [ %21, %16 ]
%18 = getelementptr inbounds [30 x i8*], [30 x i8*]* %2, i64 0, i64 %17
%19 = load i8*, i8** %18
%20 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %19)
%21 = add nsw i64 %17, -1
%22 = icmp eq i64 %17, 0
br i1 %22, label %23, label %16
23: ; preds = %16
ret i32 0
}