#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 *, char const *);
int /*<<< orphan*/ puts(char *);
void print_usage(const char *prog) {
  puts("\ngps-gpsd - read GPS data form the gpsd device\n");
  printf("Usage: %s [-hHp]\n", prog);
  puts("  -h --help\t print this help message");
  puts("  -H --host\t input the host IP - Deafult 127.0.0.1");
  puts("  -p --post\t input the port - Default 2947");
  exit(1);
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xebd(%rip),%rdi
call   1030 <puts@plt>
mov    -0x8(%rbp),%rsi
lea    0xedd(%rip),%rdi
call   1040 <printf@plt>
lea    0xee3(%rip),%rdi
call   1030 <puts@plt>
lea    0xefc(%rip),%rdi
call   1030 <puts@plt>
lea    0xf23(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<print_usage>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rdi
call   1030 <puts@plt>
lea    0xee9(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
lea    0xeec(%rip),%rdi
call   1030 <puts@plt>
lea    0xf05(%rip),%rdi
call   1030 <puts@plt>
lea    0xf2c(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [48 x i8] c"\0Agps-gpsd - read GPS data form the gpsd device\0A\00"
@.str.1 = [18 x i8] c"Usage: %s [-hHp]\0A\00"
@.str.2 = [37 x i8] c" -h --help\09 print this help message\00"
@.str.3 = [51 x i8] c" -H --host\09 input the host IP - Deafult 127.0.0.1\00"
@.str.4 = [43 x i8] c" -p --post\09 input the port - Default 2947\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @puts(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = call i32 @puts(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @puts(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 @puts(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [48 x i8] c"\0Agps-gpsd - read GPS data form the gpsd device\0A\00"
@.str.1 = [18 x i8] c"Usage: %s [-hHp]\0A\00"
@.str.2 = [37 x i8] c" -h --help\09 print this help message\00"
@.str.3 = [51 x i8] c" -H --host\09 input the host IP - Deafult 127.0.0.1\00"
@.str.4 = [43 x i8] c" -p --post\09 input the port - Default 2947\00"
define void @print_usage(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.3, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
}