#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*/ move_cursor_xy(int, int);
int /*<<< orphan*/ printf(char *, char);
void show_controls(int row, int col) {
  move_cursor_xy(row, col);
  printf("%c - move left\n", 'a');
  move_cursor_xy(++row, col);
  printf("%c - move right\n", 'd');
  move_cursor_xy(++row, col);
  printf("%c - move down faster\n", 's');
  move_cursor_xy(row += 2, col);
  printf("%c - rotate left\n", 'w');
  move_cursor_xy(++row, col);
  printf("%c - rotate right\n", 'e');
  move_cursor_xy(row += 2, col);
  printf("%c - pause/unpause\n", 'p');
  move_cursor_xy(++row, col);
  printf("%c - reset\n", 'r');
  move_cursor_xy(++row, col);
  printf("%c - quit\n", 'q');
}


x86 assembly (clang, -O0):
<show_controls>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <move_cursor_xy@plt>
lea    0xec0(%rip),%rdi
mov    $0x61,%esi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
mov    %edi,-0x4(%rbp)
mov    -0x8(%rbp),%esi
call   1040 <move_cursor_xy@plt>
lea    0xeae(%rip),%rdi
mov    $0x64,%esi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
mov    %edi,-0x4(%rbp)
mov    -0x8(%rbp),%esi
call   1040 <move_cursor_xy@plt>
lea    0xe9d(%rip),%rdi
mov    $0x73,%esi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
add    $0x2,%edi
mov    %edi,-0x4(%rbp)
mov    -0x8(%rbp),%esi
call   1040 <move_cursor_xy@plt>
lea    0xe92(%rip),%rdi
mov    $0x77,%esi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
mov    %edi,-0x4(%rbp)
mov    -0x8(%rbp),%esi
call   1040 <move_cursor_xy@plt>
lea    0xe82(%rip),%rdi
mov    $0x65,%esi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
add    $0x2,%edi
mov    %edi,-0x4(%rbp)
mov    -0x8(%rbp),%esi
call   1040 <move_cursor_xy@plt>
lea    0xe73(%rip),%rdi
mov    $0x70,%esi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
mov    %edi,-0x4(%rbp)
mov    -0x8(%rbp),%esi
call   1040 <move_cursor_xy@plt>
lea    0xe65(%rip),%rdi
mov    $0x72,%esi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
mov    %edi,-0x4(%rbp)
mov    -0x8(%rbp),%esi
call   1040 <move_cursor_xy@plt>
lea    0xe4f(%rip),%rdi
mov    $0x71,%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_controls>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %edi,%ebx
call   1040 <move_cursor_xy@plt>
lea    0xecd(%rip),%rdi
mov    $0x61,%esi
call   1030 <printf@plt>
lea    0x1(%rbx),%edi
mov    %ebp,%esi
call   1040 <move_cursor_xy@plt>
lea    0xec2(%rip),%rdi
mov    $0x64,%esi
call   1030 <printf@plt>
lea    0x2(%rbx),%edi
mov    %ebp,%esi
call   1040 <move_cursor_xy@plt>
lea    0xeb8(%rip),%rdi
mov    $0x73,%esi
call   1030 <printf@plt>
lea    0x4(%rbx),%edi
mov    %ebp,%esi
call   1040 <move_cursor_xy@plt>
lea    0xeb4(%rip),%rdi
mov    $0x77,%esi
call   1030 <printf@plt>
lea    0x5(%rbx),%edi
mov    %ebp,%esi
call   1040 <move_cursor_xy@plt>
lea    0xeab(%rip),%rdi
mov    $0x65,%esi
call   1030 <printf@plt>
lea    0x7(%rbx),%edi
mov    %ebp,%esi
call   1040 <move_cursor_xy@plt>
lea    0xea3(%rip),%rdi
mov    $0x70,%esi
call   1030 <printf@plt>
lea    0x8(%rbx),%edi
mov    %ebp,%esi
call   1040 <move_cursor_xy@plt>
lea    0xe9c(%rip),%rdi
mov    $0x72,%esi
call   1030 <printf@plt>
add    $0x9,%ebx
mov    %ebx,%edi
mov    %ebp,%esi
call   1040 <move_cursor_xy@plt>
lea    0xe8b(%rip),%rdi
mov    $0x71,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"%c - move left\0A\00"
@.str.1 = [17 x i8] c"%c - move right\0A\00"
@.str.2 = [23 x i8] c"%c - move down faster\0A\00"
@.str.3 = [18 x i8] c"%c - rotate left\0A\00"
@.str.4 = [19 x i8] c"%c - rotate right\0A\00"
@.str.5 = [20 x i8] c"%c - pause/unpause\0A\00"
@.str.6 = [12 x i8] c"%c - reset\0A\00"
@.str.7 = [11 x i8] c"%c - quit\0A\00"
define void @show_controls(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @move_cursor_xy(i32 %5, i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8 signext 97)
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 1
store i32 %10, i32* %3
%11 = load i32, i32* %4
%12 = call i32 @move_cursor_xy(i32 %10, i32 %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8 signext 100)
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
%16 = load i32, i32* %4
%17 = call i32 @move_cursor_xy(i32 %15, i32 %16)
%18 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i8 signext 115)
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 2
store i32 %20, i32* %3
%21 = load i32, i32* %4
%22 = call i32 @move_cursor_xy(i32 %20, i32 %21)
%23 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8 signext 119)
%24 = load i32, i32* %3
%25 = add nsw i32 %24, 1
store i32 %25, i32* %3
%26 = load i32, i32* %4
%27 = call i32 @move_cursor_xy(i32 %25, i32 %26)
%28 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), i8 signext 101)
%29 = load i32, i32* %3
%30 = add nsw i32 %29, 2
store i32 %30, i32* %3
%31 = load i32, i32* %4
%32 = call i32 @move_cursor_xy(i32 %30, i32 %31)
%33 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i8 signext 112)
%34 = load i32, i32* %3
%35 = add nsw i32 %34, 1
store i32 %35, i32* %3
%36 = load i32, i32* %4
%37 = call i32 @move_cursor_xy(i32 %35, i32 %36)
%38 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i8 signext 114)
%39 = load i32, i32* %3
%40 = add nsw i32 %39, 1
store i32 %40, i32* %3
%41 = load i32, i32* %4
%42 = call i32 @move_cursor_xy(i32 %40, i32 %41)
%43 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i8 signext 113)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"%c - move left\0A\00"
@.str.1 = [17 x i8] c"%c - move right\0A\00"
@.str.2 = [23 x i8] c"%c - move down faster\0A\00"
@.str.3 = [18 x i8] c"%c - rotate left\0A\00"
@.str.4 = [19 x i8] c"%c - rotate right\0A\00"
@.str.5 = [20 x i8] c"%c - pause/unpause\0A\00"
@.str.6 = [12 x i8] c"%c - reset\0A\00"
@.str.7 = [11 x i8] c"%c - quit\0A\00"
define void @show_controls(i32 %0, i32 %1) {
%3 = tail call i32 @move_cursor_xy(i32 %0, i32 %1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8 signext 97)
%5 = add nsw i32 %0, 1
%6 = tail call i32 @move_cursor_xy(i32 %5, i32 %1)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8 signext 100)
%8 = add nsw i32 %0, 2
%9 = tail call i32 @move_cursor_xy(i32 %8, i32 %1)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i8 signext 115)
%11 = add nsw i32 %0, 4
%12 = tail call i32 @move_cursor_xy(i32 %11, i32 %1)
%13 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8 signext 119)
%14 = add nsw i32 %0, 5
%15 = tail call i32 @move_cursor_xy(i32 %14, i32 %1)
%16 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), i8 signext 101)
%17 = add nsw i32 %0, 7
%18 = tail call i32 @move_cursor_xy(i32 %17, i32 %1)
%19 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i8 signext 112)
%20 = add nsw i32 %0, 8
%21 = tail call i32 @move_cursor_xy(i32 %20, i32 %1)
%22 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i8 signext 114)
%23 = add nsw i32 %0, 9
%24 = tail call i32 @move_cursor_xy(i32 %23, i32 %1)
%25 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i8 signext 113)
ret void
}