#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ usage_backlight(int /*<<< orphan*/ *);
int /*<<< orphan*/ usage_battery(int /*<<< orphan*/ *);
int /*<<< orphan*/ usage_bt(int /*<<< orphan*/ *);
int /*<<< orphan*/ usage_gps(int /*<<< orphan*/ *);
int /*<<< orphan*/ usage_gsm(int /*<<< orphan*/ *);
int /*<<< orphan*/ usage_help(int /*<<< orphan*/ *);
int /*<<< orphan*/ usage_lead_reset();
int /*<<< orphan*/ usage_led(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ usage_options(int /*<<< orphan*/ *);
int /*<<< orphan*/ usage_power(int /*<<< orphan*/ *);
int /*<<< orphan*/ usage_resume_reason(int /*<<< orphan*/ *);
int /*<<< orphan*/ usage_screen(int /*<<< orphan*/ *);
int /*<<< orphan*/ usage_sysfs(int /*<<< orphan*/ *);
int /*<<< orphan*/ usage_touchscreen(int /*<<< orphan*/ *);
int /*<<< orphan*/ usage_uevent(int /*<<< orphan*/ *);
int /*<<< orphan*/ usage_usb(int /*<<< orphan*/ *);
int /*<<< orphan*/ usage_wifi(int /*<<< orphan*/ *);
void usage(FILE *out) {
  printf("om provides a command line interface to various OpenMoko specific "
         "pieces of hardware.\n"
         "Note that om talks directly to the kernel and might not properly "
         "co-exist with\n"
         "fso-frameworkd that also wants to control the same pieces of "
         "hardware. However, using om\n"
         "to read the state of the hardware should be safe even when using "
         "fso-frameworkd.\n\n");
  usage_lead_reset();
  usage_help(out);
  usage_sysfs(out);
  usage_backlight(out);
  usage_touchscreen(out);
  usage_screen(out);
  usage_bt(out);
  usage_gsm(out);
  usage_gps(out);
  usage_wifi(out);
  usage_battery(out);
  usage_power(out);
  usage_resume_reason(out);
  usage_led(out, NULL);
  usage_uevent(out);
  usage_usb(out);
  putchar('\n');
  usage_options(out);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xdbd(%rip),%rdi
call   1090 <printf@plt>
mov    $0x0,%al
call   1080 <usage_lead_reset@plt>
mov    -0x8(%rbp),%rdi
call   1140 <usage_help@plt>
mov    -0x8(%rbp),%rdi
call   10f0 <usage_sysfs@plt>
mov    -0x8(%rbp),%rdi
call   1070 <usage_backlight@plt>
mov    -0x8(%rbp),%rdi
call   10d0 <usage_touchscreen@plt>
mov    -0x8(%rbp),%rdi
call   10e0 <usage_screen@plt>
mov    -0x8(%rbp),%rdi
call   1150 <usage_bt@plt>
mov    -0x8(%rbp),%rdi
call   10c0 <usage_gsm@plt>
mov    -0x8(%rbp),%rdi
call   1100 <usage_gps@plt>
mov    -0x8(%rbp),%rdi
call   1110 <usage_wifi@plt>
mov    -0x8(%rbp),%rdi
call   1060 <usage_battery@plt>
mov    -0x8(%rbp),%rdi
call   10a0 <usage_power@plt>
mov    -0x8(%rbp),%rdi
call   1050 <usage_resume_reason@plt>
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <usage_led@plt>
mov    -0x8(%rbp),%rdi
call   10b0 <usage_uevent@plt>
mov    -0x8(%rbp),%rdi
call   1120 <usage_usb@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    -0x8(%rbp),%rdi
call   1130 <usage_options@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rbx
lea    0xdc5(%rip),%rdi
call   1070 <puts@plt>
xor    %eax,%eax
call   1090 <usage_lead_reset@plt>
mov    %rbx,%rdi
call   1140 <usage_help@plt>
mov    %rbx,%rdi
call   10f0 <usage_sysfs@plt>
mov    %rbx,%rdi
call   1080 <usage_backlight@plt>
mov    %rbx,%rdi
call   10d0 <usage_touchscreen@plt>
mov    %rbx,%rdi
call   10e0 <usage_screen@plt>
mov    %rbx,%rdi
call   1150 <usage_bt@plt>
mov    %rbx,%rdi
call   10c0 <usage_gsm@plt>
mov    %rbx,%rdi
call   1100 <usage_gps@plt>
mov    %rbx,%rdi
call   1110 <usage_wifi@plt>
mov    %rbx,%rdi
call   1060 <usage_battery@plt>
mov    %rbx,%rdi
call   10a0 <usage_power@plt>
mov    %rbx,%rdi
call   1050 <usage_resume_reason@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <usage_led@plt>
mov    %rbx,%rdi
call   10b0 <usage_uevent@plt>
mov    %rbx,%rdi
call   1120 <usage_usb@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1130 <usage_options@plt>

LLVM IR (-O0):
@.str = [337 x i8] c"om provides a command line interface to various OpenMoko specific pieces of hardware.\0ANote that om talks directly to the kernel and might not properly co-exist with\0Afso-frameworkd that also wants to control the same pieces of hardware. However, using om\0Ato read the state of the hardware should be safe even when using fso-frameworkd.\0A\0A\00"
define void @usage(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([337 x i8], [337 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @usage_lead_reset()
%5 = load i32*, i32** %2
%6 = call i32 @usage_help(i32* %5)
%7 = load i32*, i32** %2
%8 = call i32 @usage_sysfs(i32* %7)
%9 = load i32*, i32** %2
%10 = call i32 @usage_backlight(i32* %9)
%11 = load i32*, i32** %2
%12 = call i32 @usage_touchscreen(i32* %11)
%13 = load i32*, i32** %2
%14 = call i32 @usage_screen(i32* %13)
%15 = load i32*, i32** %2
%16 = call i32 @usage_bt(i32* %15)
%17 = load i32*, i32** %2
%18 = call i32 @usage_gsm(i32* %17)
%19 = load i32*, i32** %2
%20 = call i32 @usage_gps(i32* %19)
%21 = load i32*, i32** %2
%22 = call i32 @usage_wifi(i32* %21)
%23 = load i32*, i32** %2
%24 = call i32 @usage_battery(i32* %23)
%25 = load i32*, i32** %2
%26 = call i32 @usage_power(i32* %25)
%27 = load i32*, i32** %2
%28 = call i32 @usage_resume_reason(i32* %27)
%29 = load i32*, i32** %2
%30 = call i32 @usage_led(i32* %29, i32* null)
%31 = load i32*, i32** %2
%32 = call i32 @usage_uevent(i32* %31)
%33 = load i32*, i32** %2
%34 = call i32 @usage_usb(i32* %33)
%35 = call i32 @putchar(i8 signext 10)
%36 = load i32*, i32** %2
%37 = call i32 @usage_options(i32* %36)
ret void
}

LLVM IR (-O2):
@str = [336 x i8] c"om provides a command line interface to various OpenMoko specific pieces of hardware.\0ANote that om talks directly to the kernel and might not properly co-exist with\0Afso-frameworkd that also wants to control the same pieces of hardware. However, using om\0Ato read the state of the hardware should be safe even when using fso-frameworkd.\0A\00"
define void @usage(i32* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([336 x i8], [336 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (...) @usage_lead_reset()
%4 = tail call i32 @usage_help(i32* %0)
%5 = tail call i32 @usage_sysfs(i32* %0)
%6 = tail call i32 @usage_backlight(i32* %0)
%7 = tail call i32 @usage_touchscreen(i32* %0)
%8 = tail call i32 @usage_screen(i32* %0)
%9 = tail call i32 @usage_bt(i32* %0)
%10 = tail call i32 @usage_gsm(i32* %0)
%11 = tail call i32 @usage_gps(i32* %0)
%12 = tail call i32 @usage_wifi(i32* %0)
%13 = tail call i32 @usage_battery(i32* %0)
%14 = tail call i32 @usage_power(i32* %0)
%15 = tail call i32 @usage_resume_reason(i32* %0)
%16 = tail call i32 @usage_led(i32* %0, i32* null)
%17 = tail call i32 @usage_uevent(i32* %0)
%18 = tail call i32 @usage_usb(i32* %0)
%19 = tail call i32 @putchar(i8 signext 10)
%20 = tail call i32 @usage_options(i32* %0)
ret void
}