#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 */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
scalar_t__ iscntrl(char);
int /*<<< orphan*/ mvwin(int /*<<< orphan*/ *, int, int);
int /*<<< orphan*/ waddch(int /*<<< orphan*/ *, char);
int /*<<< orphan*/ wclear(int /*<<< orphan*/ *);
void vtclock_print_blank_version_of_string(WINDOW *win, int y, int x,
                                           char *str) {
  char *p;
  wclear(win);
  mvwin(win, y, x);
  for (p = str; *p; ++p) {
    if (iscntrl(*p)) {
      waddch(win, *p);
    } else {
      waddch(win, ' ');
    }
  }
}


x86 assembly (clang, -O0):
<vtclock_print_blank_version_of_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <wclear@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1060 <mvwin@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmpb   $0x0,(%rax)
je     11d2 <vtclock_print_blank_version_of_string+0x92>
mov    -0x20(%rbp),%rax
movsbl (%rax),%edi
call   1040 <iscntrl@plt>
cmp    $0x0,%rax
je     11ae <vtclock_print_blank_version_of_string+0x6e>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rax
movsbl (%rax),%esi
call   1030 <waddch@plt>
jmp    11bc <vtclock_print_blank_version_of_string+0x7c>
mov    -0x8(%rbp),%rdi
mov    $0x20,%esi
call   1030 <waddch@plt>
jmp    11c1 <vtclock_print_blank_version_of_string+0x81>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1176 <vtclock_print_blank_version_of_string+0x36>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vtclock_print_blank_version_of_string>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%rbx
mov    %edx,%r15d
mov    %esi,%ebp
mov    %rdi,%r14
call   1050 <wclear@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    %r15d,%edx
call   1060 <mvwin@plt>
mov    (%rbx),%al
test   %al,%al
je     119b <vtclock_print_blank_version_of_string+0x5b>
add    $0x1,%rbx
jmp    118a <vtclock_print_blank_version_of_string+0x4a>
movzbl -0x1(%rbx),%eax
movsbl %al,%esi
mov    %r14,%rdi
call   1030 <waddch@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
je     119b <vtclock_print_blank_version_of_string+0x5b>
movsbl %al,%edi
call   1040 <iscntrl@plt>
test   %rax,%rax
jne    1170 <vtclock_print_blank_version_of_string+0x30>
mov    $0x20,%al
jmp    1174 <vtclock_print_blank_version_of_string+0x34>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @vtclock_print_blank_version_of_string(i32* %0, i32 %1, i32 %2, i8* %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8*
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%10 = load i32*, i32** %5
%11 = call i32 @wclear(i32* %10)
%12 = load i32*, i32** %5
%13 = load i32, i32* %6
%14 = load i32, i32* %7
%15 = call i32 @mvwin(i32* %12, i32 %13, i32 %14)
%16 = load i8*, i8** %8
store i8* %16, i8** %9
br label %17
17: ; preds = %35, %4
%18 = load i8*, i8** %9
%19 = load i8, i8* %18
%20 = icmp ne i8 %19, 0
br i1 %20, label %21, label %38
21: ; preds = %17
%22 = load i8*, i8** %9
%23 = load i8, i8* %22
%24 = call i64 @iscntrl(i8 signext %23)
%25 = icmp ne i64 %24, 0
br i1 %25, label %26, label %31
26: ; preds = %21
%27 = load i32*, i32** %5
%28 = load i8*, i8** %9
%29 = load i8, i8* %28
%30 = call i32 @waddch(i32* %27, i8 signext %29)
br label %34
31: ; preds = %21
%32 = load i32*, i32** %5
%33 = call i32 @waddch(i32* %32, i8 signext 32)
br label %34
34: ; preds = %31, %26
br label %35
35: ; preds = %34
%36 = load i8*, i8** %9
%37 = getelementptr inbounds i8, i8* %36, i32 1
store i8* %37, i8** %9
br label %17
38: ; preds = %17
ret void
}

LLVM IR (-O2):
define void @vtclock_print_blank_version_of_string(i32* %0, i32 %1, i32 %2, i8* nocapture %3) {
%5 = tail call i32 @wclear(i32* %0)
%6 = tail call i32 @mvwin(i32* %0, i32 %1, i32 %2)
%7 = load i8, i8* %3
%8 = icmp eq i8 %7, 0
br i1 %8, label %22, label %9
9: ; preds = %4, %16
%10 = phi i8 [ %20, %16 ], [ %7, %4 ]
%11 = phi i8* [ %19, %16 ], [ %3, %4 ]
%12 = tail call i64 @iscntrl(i8 signext %10)
%13 = icmp eq i64 %12, 0
br i1 %13, label %16, label %14
14: ; preds = %9
%15 = load i8, i8* %11
br label %16
16: ; preds = %9, %14
%17 = phi i8 [ %15, %14 ], [ 32, %9 ]
%18 = tail call i32 @waddch(i32* %0, i8 signext %17)
%19 = getelementptr inbounds i8, i8* %11, i64 1
%20 = load i8, i8* %19
%21 = icmp eq i8 %20, 0
br i1 %21, label %22, label %9
22: ; preds = %16, %4
ret void
}