#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*/ printf(char *, ...);
void help_controls(int terse) {
  printf("  -1, --js1[=FILE]            Use P1 joystick FILE (default: %s)\n",
         "/dev/js0");
  printf("  -2, --js2[=FILE]            Use P2 joystick FILE (default: %s)\n",
         "/dev/js1");
  printf("  -J, --joystick-map=MAPSPEC  Reassign joystick button bindings\n"
         "    MAPSPEC:\n"
         "      Specify joystick, then indicate buttons with 'B' and axes with "
         "'A' in\n"
         "      sequence:  A, B, Start, Select, Left, Right, Up, Down, Pause\n"
         "      Multiple buttons may be bound to a single emulator control.\n"
         "      Default bindings will be used if no buttons are specified.\n"
         "      Examples:\n"
         "        1:B0,B1,B5,B2,A0,A1,B4\n"
         "        2:B0,B1,B5,B2,B10,B12,B11,B13,B4\n"
         "        1:B0B8,B1B9,B5,B2\n"
         "        2:,,,,A2,A3\n");
  printf("\n"
         "  Keyboard:\n"
         "    Arrows      - Move (P1)\n"
         "    A, C or Space\n"
         "                - A button (P1)\n"
         "    Z, X or D   - B button (P1)\n"
         "    Tab         - Select button (P1)\n"
         "    Enter       - Start button (P1)\n"
         "    H, J, K, L  - Move (P2)\n"
         "    B           - A button (P2)\n"
         "    V           - B button (P2)\n"
         "    F           - Select button (P2)\n"
         "    G           - Start button (P2)\n"
         "    BackSpace   - Reset game\n"
         "    P, Pause    - Pause or resume emulation\n"
         "    ESC         - Exit game\n"
         "    0-8, `      - Adjust emulation speed\n"
         "      0 stops the game, ` runs the game at half speed\n"
         "      1 runs at normal speed, 2..8 runs at 2..8x normal speed\n"
         "    S, F7, PrintScreen\n"
         "                - Capture screenshot\n"
         "                  Under X11, save to ~/.tuxnes/snap????.xpm\n"
         "                  (Note: XPM/PPM support must be installed and "
         "compiled\n"
         "                   for this to work; see the README file for more "
         "info.)\n");
  printf("\n"
         "  Keypad:\n"
         "    Arrows/12346789  - Move (P1)\n"
         "    Space/Begin/5, Delete/Decimal\n"
         "                     - A button (P1)\n"
         "    Insert/0         - B button (P1)\n"
         "    Add              - Select button (P1)\n"
         "    Enter            - Start button (P1)\n");
  printf("\n"
         "  Joystick Axes:\n"
         "    Axis 0           - Horizontal movement\n"
         "    Axis 1           - Vertical movement\n"
         "    Axis 2           - (unused)\n"
         "    Axis 3           - (unused)\n"
         "    Axis 4           - Horizontal movement\n"
         "    Axis 5           - Vertical movement\n");
  printf("\n"
         "  Joystick Buttons (2-button joysticks):\n"
         "    Button 0         - B button\n"
         "    Button 1         - A button\n");
  printf("\n"
         "  Joystick Buttons (other joysticks):\n"
         "    Button 0         - B button\n"
         "    Button 1         - Select button\n"
         "    Button 2         - A button\n"
         "    Button 3         - Start button\n"
         "    Button 4         - A button\n"
         "    Button 5         - B button\n"
         "    Button 6         - Select button\n"
         "    Button 7         - Start button\n"
         "    Button 8         - Pause or resume emulation\n");
  printf("\n"
         "  Extra keys for old X11 renderer (--renderer=old)\n"
         "    F1          - Disable background\n"
         "    F2          - Re-enable background\n"
         "    F3          - Disable sprites\n"
         "    F4          - Re-enable sprites\n"
         "    F5          - Alternate tiles\n"
         "    F6          - Default tiles\n"
         "    F8          - Flush tile cache\n");
  printf("\n"
         "  Extra Keys for VS UniSystem games:\n"
         "    [/{         - Insert Coin (Left)\n"
         "    ]/}         - Insert Coin (Right)\n"
         "    |/\\         - Service Credit\n"
         "    Q/q         - Toggle Dipswitch #1\n"
         "    W/w         - Toggle Dipswitch #2\n"
         "    E/e         - Toggle Dipswitch #3\n"
         "    R/r         - Toggle Dipswitch #4\n"
         "    T/t         - Toggle Dipswitch #5\n"
         "    Y/y         - Toggle Dipswitch #6\n"
         "    U/u         - Toggle Dipswitch #7\n"
         "    I/i         - Toggle Dipswitch #8\n");
}


x86 assembly (clang, -O0):
<help_controls>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
lea    0xf19(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf14(%rip),%rdi
lea    0xf4f(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf4a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1122(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1489(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1567(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1654(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x16b1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x180e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x192c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help_controls>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xf13(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf0e(%rip),%rdi
lea    0xf49(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf44(%rip),%rdi
call   1030 <puts@plt>
lea    0x111d(%rip),%rdi
call   1030 <puts@plt>
lea    0x1485(%rip),%rdi
call   1030 <puts@plt>
lea    0x1564(%rip),%rdi
call   1030 <puts@plt>
lea    0x1652(%rip),%rdi
call   1030 <puts@plt>
lea    0x16b0(%rip),%rdi
call   1030 <puts@plt>
lea    0x180e(%rip),%rdi
call   1030 <puts@plt>
lea    0x192d(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [66 x i8] c" -1, --js1[=FILE] Use P1 joystick FILE (default: %s)\0A\00"
@.str.1 = [9 x i8] c"/dev/js0\00"
@.str.2 = [66 x i8] c" -2, --js2[=FILE] Use P2 joystick FILE (default: %s)\0A\00"
@.str.3 = [9 x i8] c"/dev/js1\00"
@.str.4 = [486 x i8] c" -J, --joystick-map=MAPSPEC Reassign joystick button bindings\0A MAPSPEC:\0A Specify joystick, then indicate buttons with 'B' and axes with 'A' in\0A sequence: A, B, Start, Select, Left, Right, Up, Down, Pause\0A Multiple buttons may be bound to a single emulator control.\0A Default bindings will be used if no buttons are specified.\0A Examples:\0A 1:B0,B1,B5,B2,A0,A1,B4\0A 2:B0,B1,B5,B2,B10,B12,B11,B13,B4\0A 1:B0B8,B1B9,B5,B2\0A 2:,,,,A2,A3\0A\00"
@.str.5 = [885 x i8] c"\0A Keyboard:\0A Arrows - Move (P1)\0A A, C or Space\0A - A button (P1)\0A Z, X or D - B button (P1)\0A Tab - Select button (P1)\0A Enter - Start button (P1)\0A H, J, K, L - Move (P2)\0A B - A button (P2)\0A V - B button (P2)\0A F - Select button (P2)\0A G - Start button (P2)\0A BackSpace - Reset game\0A P, Pause - Pause or resume emulation\0A ESC - Exit game\0A 0-8, ` - Adjust emulation speed\0A 0 stops the game, ` runs the game at half speed\0A 1 runs at normal speed, 2..8 runs at 2..8x normal speed\0A S, F7, PrintScreen\0A - Capture screenshot\0A Under X11, save to ~/.tuxnes/snap????.xpm\0A (Note: XPM/PPM support must be installed and compiled\0A for this to work; see the README file for more info.)\0A\00"
@.str.6 = [236 x i8] c"\0A Keypad:\0A Arrows/12346789 - Move (P1)\0A Space/Begin/5, Delete/Decimal\0A - A button (P1)\0A Insert/0 - B button (P1)\0A Add - Select button (P1)\0A Enter - Start button (P1)\0A\00"
@.str.7 = [251 x i8] c"\0A Joystick Axes:\0A Axis 0 - Horizontal movement\0A Axis 1 - Vertical movement\0A Axis 2 - (unused)\0A Axis 3 - (unused)\0A Axis 4 - Horizontal movement\0A Axis 5 - Vertical movement\0A\00"
@.str.8 = [107 x i8] c"\0A Joystick Buttons (2-button joysticks):\0A Button 0 - B button\0A Button 1 - A button\0A\00"
@.str.9 = [363 x i8] c"\0A Joystick Buttons (other joysticks):\0A Button 0 - B button\0A Button 1 - Select button\0A Button 2 - A button\0A Button 3 - Start button\0A Button 4 - A button\0A Button 5 - B button\0A Button 6 - Select button\0A Button 7 - Start button\0A Button 8 - Pause or resume emulation\0A\00"
@.str.10 = [300 x i8] c"\0A Extra keys for old X11 renderer (--renderer=old)\0A F1 - Disable background\0A F2 - Re-enable background\0A F3 - Disable sprites\0A F4 - Re-enable sprites\0A F5 - Alternate tiles\0A F6 - Default tiles\0A F8 - Flush tile cache\0A\00"
@.str.11 = [451 x i8] c"\0A Extra Keys for VS UniSystem games:\0A [/{ - Insert Coin (Left)\0A ]/} - Insert Coin (Right)\0A |/\\ - Service Credit\0A Q/q - Toggle Dipswitch\0A W/w - Toggle Dipswitch\0A E/e - Toggle Dipswitch\0A R/r - Toggle Dipswitch\0A T/t - Toggle Dipswitch\0A Y/y - Toggle Dipswitch\0A U/u - Toggle Dipswitch\0A I/i - Toggle Dipswitch\0A\00"
define void @help_controls(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([486 x i8], [486 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([885 x i8], [885 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([236 x i8], [236 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([251 x i8], [251 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([107 x i8], [107 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([363 x i8], [363 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([300 x i8], [300 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([451 x i8], [451 x i8]* @.str.11, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [66 x i8] c" -1, --js1[=FILE] Use P1 joystick FILE (default: %s)\0A\00"
@.str.1 = [9 x i8] c"/dev/js0\00"
@.str.2 = [66 x i8] c" -2, --js2[=FILE] Use P2 joystick FILE (default: %s)\0A\00"
@.str.3 = [9 x i8] c"/dev/js1\00"
@str = [485 x i8] c" -J, --joystick-map=MAPSPEC Reassign joystick button bindings\0A MAPSPEC:\0A Specify joystick, then indicate buttons with 'B' and axes with 'A' in\0A sequence: A, B, Start, Select, Left, Right, Up, Down, Pause\0A Multiple buttons may be bound to a single emulator control.\0A Default bindings will be used if no buttons are specified.\0A Examples:\0A 1:B0,B1,B5,B2,A0,A1,B4\0A 2:B0,B1,B5,B2,B10,B12,B11,B13,B4\0A 1:B0B8,B1B9,B5,B2\0A 2:,,,,A2,A3\00"
@str.12 = [884 x i8] c"\0A Keyboard:\0A Arrows - Move (P1)\0A A, C or Space\0A - A button (P1)\0A Z, X or D - B button (P1)\0A Tab - Select button (P1)\0A Enter - Start button (P1)\0A H, J, K, L - Move (P2)\0A B - A button (P2)\0A V - B button (P2)\0A F - Select button (P2)\0A G - Start button (P2)\0A BackSpace - Reset game\0A P, Pause - Pause or resume emulation\0A ESC - Exit game\0A 0-8, ` - Adjust emulation speed\0A 0 stops the game, ` runs the game at half speed\0A 1 runs at normal speed, 2..8 runs at 2..8x normal speed\0A S, F7, PrintScreen\0A - Capture screenshot\0A Under X11, save to ~/.tuxnes/snap????.xpm\0A (Note: XPM/PPM support must be installed and compiled\0A for this to work; see the README file for more info.)\00"
@str.13 = [235 x i8] c"\0A Keypad:\0A Arrows/12346789 - Move (P1)\0A Space/Begin/5, Delete/Decimal\0A - A button (P1)\0A Insert/0 - B button (P1)\0A Add - Select button (P1)\0A Enter - Start button (P1)\00"
@str.14 = [250 x i8] c"\0A Joystick Axes:\0A Axis 0 - Horizontal movement\0A Axis 1 - Vertical movement\0A Axis 2 - (unused)\0A Axis 3 - (unused)\0A Axis 4 - Horizontal movement\0A Axis 5 - Vertical movement\00"
@str.15 = [106 x i8] c"\0A Joystick Buttons (2-button joysticks):\0A Button 0 - B button\0A Button 1 - A button\00"
@str.16 = [362 x i8] c"\0A Joystick Buttons (other joysticks):\0A Button 0 - B button\0A Button 1 - Select button\0A Button 2 - A button\0A Button 3 - Start button\0A Button 4 - A button\0A Button 5 - B button\0A Button 6 - Select button\0A Button 7 - Start button\0A Button 8 - Pause or resume emulation\00"
@str.17 = [299 x i8] c"\0A Extra keys for old X11 renderer (--renderer=old)\0A F1 - Disable background\0A F2 - Re-enable background\0A F3 - Disable sprites\0A F4 - Re-enable sprites\0A F5 - Alternate tiles\0A F6 - Default tiles\0A F8 - Flush tile cache\00"
@str.18 = [450 x i8] c"\0A Extra Keys for VS UniSystem games:\0A [/{ - Insert Coin (Left)\0A ]/} - Insert Coin (Right)\0A |/\\ - Service Credit\0A Q/q - Toggle Dipswitch\0A W/w - Toggle Dipswitch\0A E/e - Toggle Dipswitch\0A R/r - Toggle Dipswitch\0A T/t - Toggle Dipswitch\0A Y/y - Toggle Dipswitch\0A U/u - Toggle Dipswitch\0A I/i - Toggle Dipswitch\00"
define void @help_controls(i32 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([485 x i8], [485 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([884 x i8], [884 x i8]* @str.12, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([235 x i8], [235 x i8]* @str.13, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([250 x i8], [250 x i8]* @str.14, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @str.15, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([362 x i8], [362 x i8]* @str.16, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([299 x i8], [299 x i8]* @str.17, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([450 x i8], [450 x i8]* @str.18, i64 0, i64 0))
ret void
}