#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*/ putc(char const, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void imprimirMensagemOculpa(const char *linha) {
  int lendoPalavra = 0;
  while (*linha != '\n') {
    if (((*linha) == ' ')) {
      lendoPalavra = 0;
    } else if (!lendoPalavra) {
      putc(*linha, stdout);
      lendoPalavra = 1;
    }
    linha++;
  }
  putc('\n', stdout);
}


x86 assembly (clang, -O0):
<imprimirMensagemOculpa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
je     118d <imprimirMensagemOculpa+0x7d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    114f <imprimirMensagemOculpa+0x3f>
movl   $0x0,-0xc(%rbp)
jmp    117c <imprimirMensagemOculpa+0x6c>
cmpl   $0x0,-0xc(%rbp)
jne    1177 <imprimirMensagemOculpa+0x67>
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    0x2e7a(%rip),%rcx
mov    (%rcx),%esi
movsbl %al,%edi
call   1030 <putc@plt>
movl   $0x1,-0xc(%rbp)
jmp    117c <imprimirMensagemOculpa+0x6c>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1123 <imprimirMensagemOculpa+0x13>
mov    0x2e4c(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1030 <putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imprimirMensagemOculpa>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
mov    0x2ec0(%rip),%r14
jmp    1136 <imprimirMensagemOculpa+0x26>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%rbx
mov    %ebp,%eax
movzbl (%rbx),%ecx
mov    $0x0,%ebp
cmp    $0x20,%cl
je     1130 <imprimirMensagemOculpa+0x20>
cmp    $0xa,%cl
je     115e <imprimirMensagemOculpa+0x4e>
mov    $0x1,%ebp
test   %eax,%eax
jne    1130 <imprimirMensagemOculpa+0x20>
mov    (%r14),%esi
movsbl %cl,%edi
call   1030 <putc@plt>
jmp    1130 <imprimirMensagemOculpa+0x20>
mov    (%r14),%esi
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <putc@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @imprimirMensagemOculpa(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %24, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 10
br i1 %8, label %9, label %27
9: ; preds = %4
%10 = load i8*, i8** %2
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 32
br i1 %13, label %14, label %15
14: ; preds = %9
store i32 0, i32* %3
br label %24
15: ; preds = %9
%16 = load i32, i32* %3
%17 = icmp ne i32 %16, 0
br i1 %17, label %23, label %18
18: ; preds = %15
%19 = load i8*, i8** %2
%20 = load i8, i8* %19
%21 = load i32, i32* @stdout
%22 = call i32 @putc(i8 signext %20, i32 %21)
store i32 1, i32* %3
br label %23
23: ; preds = %18, %15
br label %24
24: ; preds = %23, %14
%25 = load i8*, i8** %2
%26 = getelementptr inbounds i8, i8* %25, i32 1
store i8* %26, i8** %2
br label %4
27: ; preds = %4
%28 = load i32, i32* @stdout
%29 = call i32 @putc(i8 signext 10, i32 %28)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @imprimirMensagemOculpa(i8* nocapture %0) {
br label %2
2: ; preds = %11, %1
%3 = phi i8* [ %0, %1 ], [ %13, %11 ]
%4 = phi i32 [ 0, %1 ], [ %12, %11 ]
%5 = load i8, i8* %3
switch i8 %5, label %6 [
i8 10, label %14
i8 32, label %11
]
6: ; preds = %2
%7 = icmp eq i32 %4, 0
br i1 %7, label %8, label %11
8: ; preds = %6
%9 = load i32, i32* @stdout
%10 = tail call i32 @putc(i8 signext %5, i32 %9)
br label %11
11: ; preds = %2, %6, %8
%12 = phi i32 [ 1, %6 ], [ 1, %8 ], [ 0, %2 ]
%13 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
14: ; preds = %2
%15 = load i32, i32* @stdout
%16 = tail call i32 @putc(i8 signext 10, i32 %15)
ret void
}