#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*/ fgetchar();
int /*<<< orphan*/ getch();
int /*<<< orphan*/ getchar();
char getche();
int /*<<< orphan*/ printf(char *);
main() {
  char ch;
  printf("\nPress any key to continue");
  getch();
  printf("\nType any character");
  ch = getche();
  printf("\nType any character");
  getchar();
  printf("\nContinue Y/N");
  fgetchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1070 <getch@plt>
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <getche@plt>
mov    %al,-0x1(%rbp)
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1060 <fgetchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1070 <getch@plt>
lea    0xeb0(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1050 <getche@plt>
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1060 <fgetchar@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"\0APress any key to continue\00"
@.str.1 = [20 x i8] c"\0AType any character\00"
@.str.2 = [14 x i8] c"\0AContinue Y/N\00"
define i32 @main() {
%1 = alloca i8
%2 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @getch()
%4 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%5 = call signext i8 (...) @getche()
store i8 %5, i8* %1
%6 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 (...) @getchar()
%8 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 (...) @fgetchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"\0APress any key to continue\00"
@.str.1 = [20 x i8] c"\0AType any character\00"
@.str.2 = [14 x i8] c"\0AContinue Y/N\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @getch()
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call signext i8 (...) @getche()
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 (...) @getchar()
%7 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%8 = tail call i32 (...) @fgetchar()
ret i32 0
}