#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*/ exit(int);
int /*<<< orphan*/ printf(char *);
void print_usage(int code) {
  printf("usage: getscom [-c|--chip chip-id] [-b|--list-bits] addr\n");
  printf("       getscom -l|--list-chips\n");
  printf("       getscom -v|--version\n");
  printf("\n");
  printf("       NB: --list-bits shows which PPC bits are set\n");
  exit(code);
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
lea    0xefc(%rip),%rdi
call   1030 <printf@plt>
lea    0xf10(%rip),%rdi
call   1030 <printf@plt>
lea    0xf1f(%rip),%rdi
call   1030 <printf@plt>
lea    0xf15(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<print_usage>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rdi
call   1040 <puts@plt>
lea    0xef3(%rip),%rdi
call   1040 <puts@plt>
lea    0xf06(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf0c(%rip),%rdi
call   1040 <puts@plt>
mov    %ebx,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [58 x i8] c"usage: getscom [-c|--chip chip-id] [-b|--list-bits] addr\0A\00"
@.str.1 = [32 x i8] c" getscom -l|--list-chips\0A\00"
@.str.2 = [29 x i8] c" getscom -v|--version\0A\00"
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [53 x i8] c" NB: --list-bits shows which PPC bits are set\0A\00"
define void @print_usage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.4, i64 0, i64 0))
%8 = load i32, i32* %2
%9 = call i32 @exit(i32 %8)
unreachable
}

LLVM IR (-O2):
@str = [57 x i8] c"usage: getscom [-c|--chip chip-id] [-b|--list-bits] addr\00"
@str.5 = [31 x i8] c" getscom -l|--list-chips\00"
@str.6 = [28 x i8] c" getscom -v|--version\00"
@str.7 = [52 x i8] c" NB: --list-bits shows which PPC bits are set\00"
define void @print_usage(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.6, i64 0, i64 0))
%5 = tail call i32 @putchar(i32 10)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.7, i64 0, i64 0))
%7 = tail call i32 @exit(i32 %0)
unreachable
}