#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*/ _DtHelpCeStrchr(char *, char *, int, char **);
int /*<<< orphan*/ _DtHelpCeStripSpaces(char *);
void _DtHelpCeCompressSpace(char *string) {
  char *ptr;
  _DtHelpCeStripSpaces(string);
  _DtHelpCeStrchr(string, " ", 1, &ptr);
  while (ptr) {
    ptr++;
    _DtHelpCeStripSpaces(ptr);
    _DtHelpCeStrchr(ptr, " ", 1, &ptr);
  }
}


x86 assembly (clang, -O0):
<_DtHelpCeCompressSpace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <_DtHelpCeStripSpaces@plt>
mov    -0x8(%rbp),%rdi
lea    0xec0(%rip),%rsi
mov    $0x1,%edx
lea    -0x10(%rbp),%rcx
call   1040 <_DtHelpCeStrchr@plt>
cmpq   $0x0,-0x10(%rbp)
je     118c <_DtHelpCeCompressSpace+0x6c>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <_DtHelpCeStripSpaces@plt>
mov    -0x10(%rbp),%rdi
lea    0xe87(%rip),%rsi
mov    $0x1,%edx
lea    -0x10(%rbp),%rcx
call   1040 <_DtHelpCeStrchr@plt>
jmp    114e <_DtHelpCeCompressSpace+0x2e>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_DtHelpCeCompressSpace>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <_DtHelpCeStripSpaces@plt>
lea    0xecd(%rip),%rsi
mov    %rsp,%rcx
mov    %rbx,%rdi
mov    $0x1,%edx
call   1040 <_DtHelpCeStrchr@plt>
mov    (%rsp),%rdi
test   %rdi,%rdi
je     118a <_DtHelpCeCompressSpace+0x6a>
lea    0xead(%rip),%r14
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%rdi
mov    %rdi,(%rsp)
call   1030 <_DtHelpCeStripSpaces@plt>
mov    (%rsp),%rdi
mov    %r14,%rsi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <_DtHelpCeStrchr@plt>
mov    (%rsp),%rdi
test   %rdi,%rdi
jne    1160 <_DtHelpCeCompressSpace+0x40>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
define void @_DtHelpCeCompressSpace(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @_DtHelpCeStripSpaces(i8* %4)
%6 = load i8*, i8** %2
%7 = call i32 @_DtHelpCeStrchr(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1, i8** %3)
br label %8
8: ; preds = %11, %1
%9 = load i8*, i8** %3
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %18
11: ; preds = %8
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %3
%14 = load i8*, i8** %3
%15 = call i32 @_DtHelpCeStripSpaces(i8* %14)
%16 = load i8*, i8** %3
%17 = call i32 @_DtHelpCeStrchr(i8* %16, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1, i8** %3)
br label %8
18: ; preds = %8
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
define void @_DtHelpCeCompressSpace(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = tail call i32 @_DtHelpCeStripSpaces(i8* %0)
%5 = call i32 @_DtHelpCeStrchr(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1, i8** %2)
%6 = load i8*, i8** %2
%7 = icmp eq i8* %6, null
br i1 %7, label %16, label %8
8: ; preds = %1, %8
%9 = phi i8* [ %14, %8 ], [ %6, %1 ]
%10 = getelementptr inbounds i8, i8* %9, i64 1
store i8* %10, i8** %2
%11 = call i32 @_DtHelpCeStripSpaces(i8* %10)
%12 = load i8*, i8** %2
%13 = call i32 @_DtHelpCeStrchr(i8* %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1, i8** %2)
%14 = load i8*, i8** %2
%15 = icmp eq i8* %14, null
br i1 %15, label %16, label %8
16: ; preds = %8, %1
ret void
}