#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 */
char getchar();
int /*<<< orphan*/ printf(char *);
void print_title(void) {
  int count;
  printf("\x1b[2J\x1b[H");
  for (count = 0; count < 30; count++)
    printf(" ");
  printf("SINE WAVE\n");
  for (count = 0; count < 15; count++)
    printf(" ");
  printf("CREATIVE COMPUTING  MORRISTOWN, NEW JERSEY");
  for (count = 0; count < 5; count++)
    printf("\n");
  printf("Press <ENTER> to begin...");
  while (getchar() != '\n')
    ;
}


x86 assembly (clang, -O0):
<print_title>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x1e,-0x4(%rbp)
jge    115f <print_title+0x3f>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    113b <print_title+0x1b>
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0xf,-0x4(%rbp)
jge    1196 <print_title+0x76>
lea    0xe85(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1172 <print_title+0x52>
lea    0xe78(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jge    11cd <print_title+0xad>
lea    0xe59(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11a9 <print_title+0x89>
lea    0xe6c(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
movsbl %al,%eax
cmp    $0xa,%eax
je     11f1 <print_title+0xd1>
jmp    11d9 <print_title+0xb9>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_title>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1050 <printf@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
lea    0xdcd(%rip),%rdi
call   1040 <puts@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
lea    0xce6(%rip),%rdi
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xcd3(%rip),%rdi
call   1050 <printf@plt>
cs nopw 0x0(%rax,%rax,1)
nop
xor    %eax,%eax
call   1060 <getchar@plt>
cmp    $0xa,%al
jne    1370 <print_title+0x230>
pop    %rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"\1B[2J\1B[H\00"
@.str.1 = [2 x i8] c" \00"
@.str.2 = [11 x i8] c"SINE WAVE\0A\00"
@.str.3 = [43 x i8] c"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY\00"
@.str.4 = [2 x i8] c"\0A\00"
@.str.5 = [26 x i8] c"Press <ENTER> to begin...\00"
define void @print_title() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %1
br label %3
3: ; preds = %8, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 30
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
br label %3
11: ; preds = %3
%12 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %1
br label %13
13: ; preds = %18, %11
%14 = load i32, i32* %1
%15 = icmp slt i32 %14, 15
br i1 %15, label %16, label %21
16: ; preds = %13
%17 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %18
18: ; preds = %16
%19 = load i32, i32* %1
%20 = add nsw i32 %19, 1
store i32 %20, i32* %1
br label %13
21: ; preds = %13
%22 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %1
br label %23
23: ; preds = %28, %21
%24 = load i32, i32* %1
%25 = icmp slt i32 %24, 5
br i1 %25, label %26, label %31
26: ; preds = %23
%27 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %28
28: ; preds = %26
%29 = load i32, i32* %1
%30 = add nsw i32 %29, 1
store i32 %30, i32* %1
br label %23
31: ; preds = %23
%32 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0))
br label %33
33: ; preds = %37, %31
%34 = call signext i8 (...) @getchar()
%35 = sext i8 %34 to i32
%36 = icmp ne i32 %35, 10
br i1 %36, label %37, label %38
37: ; preds = %33
br label %33
38: ; preds = %33
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"\1B[2J\1B[H\00"
@.str.3 = [43 x i8] c"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY\00"
@.str.5 = [26 x i8] c"Press <ENTER> to begin...\00"
@str = [10 x i8] c"SINE WAVE\00"
define void @print_title() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @putchar(i32 32)
%3 = tail call i32 @putchar(i32 32)
%4 = tail call i32 @putchar(i32 32)
%5 = tail call i32 @putchar(i32 32)
%6 = tail call i32 @putchar(i32 32)
%7 = tail call i32 @putchar(i32 32)
%8 = tail call i32 @putchar(i32 32)
%9 = tail call i32 @putchar(i32 32)
%10 = tail call i32 @putchar(i32 32)
%11 = tail call i32 @putchar(i32 32)
%12 = tail call i32 @putchar(i32 32)
%13 = tail call i32 @putchar(i32 32)
%14 = tail call i32 @putchar(i32 32)
%15 = tail call i32 @putchar(i32 32)
%16 = tail call i32 @putchar(i32 32)
%17 = tail call i32 @putchar(i32 32)
%18 = tail call i32 @putchar(i32 32)
%19 = tail call i32 @putchar(i32 32)
%20 = tail call i32 @putchar(i32 32)
%21 = tail call i32 @putchar(i32 32)
%22 = tail call i32 @putchar(i32 32)
%23 = tail call i32 @putchar(i32 32)
%24 = tail call i32 @putchar(i32 32)
%25 = tail call i32 @putchar(i32 32)
%26 = tail call i32 @putchar(i32 32)
%27 = tail call i32 @putchar(i32 32)
%28 = tail call i32 @putchar(i32 32)
%29 = tail call i32 @putchar(i32 32)
%30 = tail call i32 @putchar(i32 32)
%31 = tail call i32 @putchar(i32 32)
%32 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%33 = tail call i32 @putchar(i32 32)
%34 = tail call i32 @putchar(i32 32)
%35 = tail call i32 @putchar(i32 32)
%36 = tail call i32 @putchar(i32 32)
%37 = tail call i32 @putchar(i32 32)
%38 = tail call i32 @putchar(i32 32)
%39 = tail call i32 @putchar(i32 32)
%40 = tail call i32 @putchar(i32 32)
%41 = tail call i32 @putchar(i32 32)
%42 = tail call i32 @putchar(i32 32)
%43 = tail call i32 @putchar(i32 32)
%44 = tail call i32 @putchar(i32 32)
%45 = tail call i32 @putchar(i32 32)
%46 = tail call i32 @putchar(i32 32)
%47 = tail call i32 @putchar(i32 32)
%48 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0))
%49 = tail call i32 @putchar(i32 10)
%50 = tail call i32 @putchar(i32 10)
%51 = tail call i32 @putchar(i32 10)
%52 = tail call i32 @putchar(i32 10)
%53 = tail call i32 @putchar(i32 10)
%54 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0))
br label %55
55: ; preds = %55, %0
%56 = tail call signext i8 (...) @getchar()
%57 = icmp eq i8 %56, 10
br i1 %57, label %58, label %55
58: ; preds = %55
ret void
}