#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 getHeight();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ topDisplay();
void speechClear() {
  int i;
  topDisplay();
  for (i = 0; i < getHeight() + 1; i++)
    printf("\n");
  for (i = 0; i < 4; i++) {
    int j = 0;
    for (; j < 50; j++)
      printf(" ");
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<speechClear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <topDisplay@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1050 <getHeight@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    $0x1,%ecx
cmp    %ecx,%eax
jge    117d <speechClear+0x4d>
lea    0xe96(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1146 <speechClear+0x16>
movl   $0x0,-0x4(%rbp)
cmpl   $0x4,-0x4(%rbp)
jge    11d3 <speechClear+0xa3>
movl   $0x0,-0x8(%rbp)
cmpl   $0x32,-0x8(%rbp)
jge    11b9 <speechClear+0x89>
lea    0xe5c(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1195 <speechClear+0x65>
lea    0xe40(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1184 <speechClear+0x54>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<speechClear>:
push   %rbx
xor    %eax,%eax
call   1040 <topDisplay@plt>
xor    %eax,%eax
call   1050 <getHeight@plt>
test   %eax,%eax
js     1168 <speechClear+0x38>
mov    $0xffffffff,%ebx
nopl   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1050 <getHeight@plt>
add    $0x1,%ebx
cmp    %eax,%ebx
jl     1150 <speechClear+0x20>
mov    $0x32,%ebx
nopl   (%rax)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1170 <speechClear+0x40>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x32,%ebx
xchg   %ax,%ax
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1190 <speechClear+0x60>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x32,%ebx
xchg   %ax,%ax
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    11b0 <speechClear+0x80>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x32,%ebx
xchg   %ax,%ax
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    11d0 <speechClear+0xa0>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [2 x i8] c" \00"
define void @speechClear() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @topDisplay()
store i32 0, i32* %1
br label %4
4: ; preds = %11, %0
%5 = load i32, i32* %1
%6 = call i32 (...) @getHeight()
%7 = add nsw i32 %6, 1
%8 = icmp slt i32 %5, %7
br i1 %8, label %9, label %14
9: ; preds = %4
%10 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9
%12 = load i32, i32* %1
%13 = add nsw i32 %12, 1
store i32 %13, i32* %1
br label %4
14: ; preds = %4
store i32 0, i32* %1
br label %15
15: ; preds = %29, %14
%16 = load i32, i32* %1
%17 = icmp slt i32 %16, 4
br i1 %17, label %18, label %32
18: ; preds = %15
store i32 0, i32* %2
br label %19
19: ; preds = %24, %18
%20 = load i32, i32* %2
%21 = icmp slt i32 %20, 50
br i1 %21, label %22, label %27
22: ; preds = %19
%23 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %24
24: ; preds = %22
%25 = load i32, i32* %2
%26 = add nsw i32 %25, 1
store i32 %26, i32* %2
br label %19
27: ; preds = %19
%28 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %29
29: ; preds = %27
%30 = load i32, i32* %1
%31 = add nsw i32 %30, 1
store i32 %31, i32* %1
br label %15
32: ; preds = %15
ret void
}

LLVM IR (-O2):
define void @speechClear() {
%1 = tail call i32 (...) @topDisplay()
%2 = tail call i32 (...) @getHeight()
%3 = icmp slt i32 %2, 0
br i1 %3, label %10, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %7, %4 ], [ 0, %0 ]
%6 = tail call i32 @putchar(i32 10)
%7 = add nuw nsw i32 %5, 1
%8 = tail call i32 (...) @getHeight()
%9 = icmp slt i32 %5, %8
br i1 %9, label %4, label %10
10: ; preds = %4, %0
br label %11
11: ; preds = %10, %11
%12 = phi i32 [ %14, %11 ], [ 0, %10 ]
%13 = tail call i32 @putchar(i32 32)
%14 = add nuw nsw i32 %12, 1
%15 = icmp eq i32 %14, 50
br i1 %15, label %16, label %11
16: ; preds = %11
%17 = tail call i32 @putchar(i32 10)
br label %18
18: ; preds = %18, %16
%19 = phi i32 [ 0, %16 ], [ %21, %18 ]
%20 = tail call i32 @putchar(i32 32)
%21 = add nuw nsw i32 %19, 1
%22 = icmp eq i32 %21, 50
br i1 %22, label %23, label %18
23: ; preds = %18
%24 = tail call i32 @putchar(i32 10)
br label %25
25: ; preds = %25, %23
%26 = phi i32 [ 0, %23 ], [ %28, %25 ]
%27 = tail call i32 @putchar(i32 32)
%28 = add nuw nsw i32 %26, 1
%29 = icmp eq i32 %28, 50
br i1 %29, label %30, label %25
30: ; preds = %25
%31 = tail call i32 @putchar(i32 10)
br label %32
32: ; preds = %32, %30
%33 = phi i32 [ 0, %30 ], [ %35, %32 ]
%34 = tail call i32 @putchar(i32 32)
%35 = add nuw nsw i32 %33, 1
%36 = icmp eq i32 %35, 50
br i1 %36, label %37, label %32
37: ; preds = %32
%38 = tail call i32 @putchar(i32 10)
ret void
}