#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 print_help() {
  char *name = "raspi-gpio";
  printf("\n");
  printf("WARNING! %s set writes directly to the GPIO control registers\n",
         name);
  printf(
      "ignoring whatever else may be using them (such as Linux drivers) -\n");
  printf("it is designed as a debug tool, only use it if you know what you\n");
  printf("are doing and at your own risk!\n");
  printf("\n");
  printf("The %s tool is designed to help hack / debug BCM283x GPIO.\n", name);
  printf("Running %s with the help argument prints this help.\n", name);
  printf("%s can get and print the state of a GPIO (or all GPIOs)\n", name);
  printf("and can be used to set the function, pulls and value of a GPIO.\n");
  printf("%s must be run as root.\n", name);
  printf("Use:\n");
  printf("  %s get [GPIO]\n", name);
  printf("OR\n");
  printf("  %s set <GPIO> [options]\n", name);
  printf("OR\n");
  printf("  %s funcs [GPIO]\n", name);
  printf("Note that omitting [GPIO] from %s get prints all GPIOs.\n", name);
  printf(
      "%s funcs will dump all the possible GPIO alt funcions in CSV format\n",
      name);
  printf("or if [GPIO] is specified the alternate funcs just for that specific "
         "GPIO.\n");
  printf("Valid [options] for %s set are:\n", name);
  printf("  ip      set GPIO as input\n");
  printf("  op      set GPIO as output\n");
  printf("  a0-a5   set GPIO to alternate function alt0-alt5\n");
  printf("  pu      set GPIO in-pad pull up\n");
  printf("  pd      set GPIO pin-pad pull down\n");
  printf("  pn      set GPIO pull none (no pull)\n");
  printf("  dh      set GPIO to drive to high (1) level (only valid if set to "
         "be an output)\n");
  printf("  dl      set GPIO to drive low (0) level (only valid if set to be "
         "an output)\n");
  printf("Examples:\n");
  printf("  %s get              Prints state of all GPIOs one per line\n",
         name);
  printf("  %s get 20           Prints state of GPIO20\n", name);
  printf("  %s set 20 a5        Set GPIO20 to ALT5 function (GPCLK0)\n", name);
  printf("  %s set 20 pu        Enable GPIO20 ~50k in-pad pull up\n", name);
  printf("  %s set 20 pd        Enable GPIO20 ~50k in-pad pull down\n", name);
  printf("  %s set 20 op        Set GPIO20 to be an output\n", name);
  printf("  %s set 20 dl        Set GPIO20 to output low/zero (must already be "
         "set as an output)\n",
         name);
  printf("  %s set 20 ip pd     Set GPIO20 to input with pull down\n", name);
  printf("  %s set 35 a0 pu     Set GPIO35 to ALT0 function (SPI_CE1_N) with "
         "pull up\n",
         name);
  printf("  %s set 20 op pn dh  Set GPIO20 to ouput with no pull and drving "
         "high\n",
         name);
}


x86 assembly (clang, -O0):
<print_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xfc5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xecf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf00(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf36(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf6a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf7b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xf6b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xf95(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xfb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfe3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0x1012(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x101d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0x1011(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1014(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0x1006(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xff4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0x1001(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0x1002(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0x1029(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1060(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0x109a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10ad(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10bc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10cc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10f2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1107(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x111f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1139(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x117e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x11bf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0x11b8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0x11e4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0x1200(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0x122a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0x1251(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0x127a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0x129a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0x12e0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0x1308(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0x1342(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_help>:
push   %r14
push   %rbx
push   %rax
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xec6(%rip),%rdi
lea    0xeb4(%rip),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x1302(%rip),%rdi
call   1040 <puts@plt>
lea    0x1339(%rip),%rdi
call   1040 <puts@plt>
lea    0x136e(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xebf(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeea(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf0e(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x1345(%rip),%rdi
call   1040 <puts@plt>
lea    0xf2a(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x1368(%rip),%rdi
call   1040 <puts@plt>
lea    0xf26(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x1350(%rip),%r14
mov    %r14,%rdi
call   1040 <puts@plt>
lea    0xf17(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
lea    0xf19(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf1b(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf43(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x12f8(%rip),%rdi
call   1040 <puts@plt>
lea    0xf6b(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x1326(%rip),%rdi
call   1040 <puts@plt>
lea    0x1336(%rip),%rdi
call   1040 <puts@plt>
lea    0x1347(%rip),%rdi
call   1040 <puts@plt>
lea    0x136e(%rip),%rdi
call   1040 <puts@plt>
lea    0x1384(%rip),%rdi
call   1040 <puts@plt>
lea    0x139d(%rip),%rdi
call   1040 <puts@plt>
lea    0x13b8(%rip),%rdi
call   1040 <puts@plt>
lea    0x13fe(%rip),%rdi
call   1040 <puts@plt>
lea    0x1440(%rip),%rdi
call   1040 <puts@plt>
lea    0xf0f(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf3c(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf59(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf84(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xfac(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xfd6(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xff7(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x103e(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x1067(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x10a2(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <printf@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"raspi-gpio\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [63 x i8] c"WARNING! %s set writes directly to the GPIO control registers\0A\00"
@.str.3 = [68 x i8] c"ignoring whatever else may be using them (such as Linux drivers) -\0A\00"
@.str.4 = [66 x i8] c"it is designed as a debug tool, only use it if you know what you\0A\00"
@.str.5 = [33 x i8] c"are doing and at your own risk!\0A\00"
@.str.6 = [60 x i8] c"The %s tool is designed to help hack / debug BCM283x GPIO.\0A\00"
@.str.7 = [53 x i8] c"Running %s with the help argument prints this help.\0A\00"
@.str.8 = [57 x i8] c"%s can get and print the state of a GPIO (or all GPIOs)\0A\00"
@.str.9 = [65 x i8] c"and can be used to set the function, pulls and value of a GPIO.\0A\00"
@.str.10 = [25 x i8] c"%s must be run as root.\0A\00"
@.str.11 = [6 x i8] c"Use:\0A\00"
@.str.12 = [17 x i8] c" %s get [GPIO]\0A\00"
@.str.13 = [4 x i8] c"OR\0A\00"
@.str.14 = [27 x i8] c" %s set <GPIO> [options]\0A\00"
@.str.15 = [19 x i8] c" %s funcs [GPIO]\0A\00"
@.str.16 = [57 x i8] c"Note that omitting [GPIO] from %s get prints all GPIOs.\0A\00"
@.str.17 = [69 x i8] c"%s funcs will dump all the possible GPIO alt funcions in CSV format\0A\00"
@.str.18 = [76 x i8] c"or if [GPIO] is specified the alternate funcs just for that specific GPIO.\0A\00"
@.str.19 = [33 x i8] c"Valid [options] for %s set are:\0A\00"
@.str.20 = [29 x i8] c" ip set GPIO as input\0A\00"
@.str.21 = [30 x i8] c" op set GPIO as output\0A\00"
@.str.22 = [52 x i8] c" a0-a5 set GPIO to alternate function alt0-alt5\0A\00"
@.str.23 = [35 x i8] c" pu set GPIO in-pad pull up\0A\00"
@.str.24 = [38 x i8] c" pd set GPIO pin-pad pull down\0A\00"
@.str.25 = [40 x i8] c" pn set GPIO pull none (no pull)\0A\00"
@.str.26 = [83 x i8] c" dh set GPIO to drive to high (1) level (only valid if set to be an output)\0A\00"
@.str.27 = [79 x i8] c" dl set GPIO to drive low (0) level (only valid if set to be an output)\0A\00"
@.str.28 = [11 x i8] c"Examples:\0A\00"
@.str.29 = [62 x i8] c" %s get Prints state of all GPIOs one per line\0A\00"
@.str.30 = [46 x i8] c" %s get 20 Prints state of GPIO20\0A\00"
@.str.31 = [60 x i8] c" %s set 20 a5 Set GPIO20 to ALT5 function (GPCLK0)\0A\00"
@.str.32 = [57 x i8] c" %s set 20 pu Enable GPIO20 ~50k in-pad pull up\0A\00"
@.str.33 = [59 x i8] c" %s set 20 pd Enable GPIO20 ~50k in-pad pull down\0A\00"
@.str.34 = [50 x i8] c" %s set 20 op Set GPIO20 to be an output\0A\00"
@.str.35 = [88 x i8] c" %s set 20 dl Set GPIO20 to output low/zero (must already be set as an output)\0A\00"
@.str.36 = [58 x i8] c" %s set 20 ip pd Set GPIO20 to input with pull down\0A\00"
@.str.37 = [76 x i8] c" %s set 35 a0 pu Set GPIO35 to ALT0 function (SPI_CE1_N) with pull up\0A\00"
@.str.38 = [72 x i8] c" %s set 20 op pn dh Set GPIO20 to ouput with no pull and drving high\0A\00"
define void @print_help() {
%1 = alloca i8*
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%3 = load i8*, i8** %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.2, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.4, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%9 = load i8*, i8** %1
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.6, i64 0, i64 0), i8* %9)
%11 = load i8*, i8** %1
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.7, i64 0, i64 0), i8* %11)
%13 = load i8*, i8** %1
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.8, i64 0, i64 0), i8* %13)
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.9, i64 0, i64 0))
%16 = load i8*, i8** %1
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0), i8* %16)
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
%19 = load i8*, i8** %1
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i8* %19)
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0))
%22 = load i8*, i8** %1
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.14, i64 0, i64 0), i8* %22)
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0))
%25 = load i8*, i8** %1
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.15, i64 0, i64 0), i8* %25)
%27 = load i8*, i8** %1
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.16, i64 0, i64 0), i8* %27)
%29 = load i8*, i8** %1
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.17, i64 0, i64 0), i8* %29)
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.18, i64 0, i64 0))
%32 = load i8*, i8** %1
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.19, i64 0, i64 0), i8* %32)
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.20, i64 0, i64 0))
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.21, i64 0, i64 0))
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.22, i64 0, i64 0))
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.23, i64 0, i64 0))
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.24, i64 0, i64 0))
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.25, i64 0, i64 0))
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str.26, i64 0, i64 0))
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.27, i64 0, i64 0))
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.28, i64 0, i64 0))
%43 = load i8*, i8** %1
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.29, i64 0, i64 0), i8* %43)
%45 = load i8*, i8** %1
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.30, i64 0, i64 0), i8* %45)
%47 = load i8*, i8** %1
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.31, i64 0, i64 0), i8* %47)
%49 = load i8*, i8** %1
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.32, i64 0, i64 0), i8* %49)
%51 = load i8*, i8** %1
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.33, i64 0, i64 0), i8* %51)
%53 = load i8*, i8** %1
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.34, i64 0, i64 0), i8* %53)
%55 = load i8*, i8** %1
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([88 x i8], [88 x i8]* @.str.35, i64 0, i64 0), i8* %55)
%57 = load i8*, i8** %1
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.36, i64 0, i64 0), i8* %57)
%59 = load i8*, i8** %1
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.37, i64 0, i64 0), i8* %59)
%61 = load i8*, i8** %1
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.38, i64 0, i64 0), i8* %61)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"raspi-gpio\00"
@.str.2 = [63 x i8] c"WARNING! %s set writes directly to the GPIO control registers\0A\00"
@.str.6 = [60 x i8] c"The %s tool is designed to help hack / debug BCM283x GPIO.\0A\00"
@.str.7 = [53 x i8] c"Running %s with the help argument prints this help.\0A\00"
@.str.8 = [57 x i8] c"%s can get and print the state of a GPIO (or all GPIOs)\0A\00"
@.str.10 = [25 x i8] c"%s must be run as root.\0A\00"
@.str.12 = [17 x i8] c" %s get [GPIO]\0A\00"
@.str.14 = [27 x i8] c" %s set <GPIO> [options]\0A\00"
@.str.15 = [19 x i8] c" %s funcs [GPIO]\0A\00"
@.str.16 = [57 x i8] c"Note that omitting [GPIO] from %s get prints all GPIOs.\0A\00"
@.str.17 = [69 x i8] c"%s funcs will dump all the possible GPIO alt funcions in CSV format\0A\00"
@.str.19 = [33 x i8] c"Valid [options] for %s set are:\0A\00"
@.str.29 = [62 x i8] c" %s get Prints state of all GPIOs one per line\0A\00"
@.str.30 = [46 x i8] c" %s get 20 Prints state of GPIO20\0A\00"
@.str.31 = [60 x i8] c" %s set 20 a5 Set GPIO20 to ALT5 function (GPCLK0)\0A\00"
@.str.32 = [57 x i8] c" %s set 20 pu Enable GPIO20 ~50k in-pad pull up\0A\00"
@.str.33 = [59 x i8] c" %s set 20 pd Enable GPIO20 ~50k in-pad pull down\0A\00"
@.str.34 = [50 x i8] c" %s set 20 op Set GPIO20 to be an output\0A\00"
@.str.35 = [88 x i8] c" %s set 20 dl Set GPIO20 to output low/zero (must already be set as an output)\0A\00"
@.str.36 = [58 x i8] c" %s set 20 ip pd Set GPIO20 to input with pull down\0A\00"
@.str.37 = [76 x i8] c" %s set 35 a0 pu Set GPIO35 to ALT0 function (SPI_CE1_N) with pull up\0A\00"
@.str.38 = [72 x i8] c" %s set 20 op pn dh Set GPIO20 to ouput with no pull and drving high\0A\00"
@str = [67 x i8] c"ignoring whatever else may be using them (such as Linux drivers) -\00"
@str.39 = [65 x i8] c"it is designed as a debug tool, only use it if you know what you\00"
@str.40 = [32 x i8] c"are doing and at your own risk!\00"
@str.41 = [64 x i8] c"and can be used to set the function, pulls and value of a GPIO.\00"
@str.42 = [5 x i8] c"Use:\00"
@str.44 = [3 x i8] c"OR\00"
@str.45 = [75 x i8] c"or if [GPIO] is specified the alternate funcs just for that specific GPIO.\00"
@str.46 = [28 x i8] c" ip set GPIO as input\00"
@str.47 = [29 x i8] c" op set GPIO as output\00"
@str.48 = [51 x i8] c" a0-a5 set GPIO to alternate function alt0-alt5\00"
@str.49 = [34 x i8] c" pu set GPIO in-pad pull up\00"
@str.50 = [37 x i8] c" pd set GPIO pin-pad pull down\00"
@str.51 = [39 x i8] c" pn set GPIO pull none (no pull)\00"
@str.52 = [82 x i8] c" dh set GPIO to drive to high (1) level (only valid if set to be an output)\00"
@str.53 = [78 x i8] c" dl set GPIO to drive low (0) level (only valid if set to be an output)\00"
@str.54 = [10 x i8] c"Examples:\00"
define void @print_help() {
%1 = tail call i32 @putchar(i32 10)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.39, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.40, i64 0, i64 0))
%6 = tail call i32 @putchar(i32 10)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.41, i64 0, i64 0))
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.42, i64 0, i64 0))
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.44, i64 0, i64 0))
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.44, i64 0, i64 0))
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([75 x i8], [75 x i8]* @str.45, i64 0, i64 0))
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.46, i64 0, i64 0))
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.47, i64 0, i64 0))
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.48, i64 0, i64 0))
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.49, i64 0, i64 0))
%26 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.50, i64 0, i64 0))
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.51, i64 0, i64 0))
%28 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([82 x i8], [82 x i8]* @str.52, i64 0, i64 0))
%29 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str.53, i64 0, i64 0))
%30 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.54, i64 0, i64 0))
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @.str.29, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.30, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str.31, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.32, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.33, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%36 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.34, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%37 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([88 x i8], [88 x i8]* @.str.35, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%38 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.36, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%39 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @.str.37, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%40 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @.str.38, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}