#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*/ IsBlank(char *);
void StringCopyNoBlanks(char *s, char *t) {
  for (; !IsBlank(s) && (*t = *s) != '\0'; s++, t++)
    ;
}


x86 assembly (clang, -O0):
<StringCopyNoBlanks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <IsBlank@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
jne    1151 <StringCopyNoBlanks+0x41>
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    -0x10(%rbp),%rcx
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1161 <StringCopyNoBlanks+0x51>
jmp    1183 <StringCopyNoBlanks+0x73>
jmp    1166 <StringCopyNoBlanks+0x56>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1120 <StringCopyNoBlanks+0x10>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StringCopyNoBlanks>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <IsBlank@plt>
test   %eax,%eax
jne    114f <StringCopyNoBlanks+0x3f>
add    $0x1,%rbx
nopw   0x0(%rax,%rax,1)
movzbl -0x1(%rbx),%eax
mov    %al,(%r14)
test   %al,%al
je     114f <StringCopyNoBlanks+0x3f>
add    $0x1,%r14
mov    %rbx,%rdi
call   1030 <IsBlank@plt>
add    $0x1,%rbx
test   %eax,%eax
je     1130 <StringCopyNoBlanks+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @StringCopyNoBlanks(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %18, %2
%6 = load i8*, i8** %3
%7 = call i32 @IsBlank(i8* %6)
%8 = icmp ne i32 %7, 0
br i1 %8, label %15, label %9
9: ; preds = %5
%10 = load i8*, i8** %3
%11 = load i8, i8* %10
%12 = load i8*, i8** %4
store i8 %11, i8* %12
%13 = sext i8 %11 to i32
%14 = icmp ne i32 %13, 0
br label %15
15: ; preds = %9, %5
%16 = phi i1 [ false, %5 ], [ %14, %9 ]
br i1 %16, label %17, label %23
17: ; preds = %15
br label %18
18: ; preds = %17
%19 = load i8*, i8** %3
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %3
%21 = load i8*, i8** %4
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %4
br label %5
23: ; preds = %15
ret void
}

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