#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 usage() {
  printf("Usage ping [-i interval] [-c count] [-p pattern] [-f] [-a] [-h]\n");
  printf("[-i interval] : interval between sent pings in seconds\n");
  printf("[-c count] Number of pings to send before exit. If not provided "
         "pings are continously sent until the program is finished (CTRL-C)\n");
  printf("[-p pattern] The payload of each packet as an HEX string\n");
  printf("[-f] : enable flood pinging (use with caution)");
  printf("[-a] : play an sound on every response received.\n");
  printf("[-h] print this help\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf1a(%rip),%rdi
call   1030 <printf@plt>
lea    0xf46(%rip),%rdi
call   1030 <printf@plt>
lea    0xfbd(%rip),%rdi
call   1030 <printf@plt>
lea    0xfeb(%rip),%rdi
call   1030 <printf@plt>
lea    0x100e(%rip),%rdi
call   1030 <printf@plt>
lea    0x1034(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xf07(%rip),%rdi
call   1030 <puts@plt>
lea    0xf3b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf66(%rip),%rdi
call   1030 <puts@plt>
lea    0xfdc(%rip),%rdi
call   1030 <puts@plt>
lea    0xea8(%rip),%rdi
call   1040 <printf@plt>
lea    0xffd(%rip),%rdi
call   1030 <puts@plt>
lea    0x1022(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [65 x i8] c"Usage ping [-i interval] [-c count] [-p pattern] [-f] [-a] [-h]\0A\00"
@.str.1 = [56 x i8] c"[-i interval] : interval between sent pings in seconds\0A\00"
@.str.2 = [131 x i8] c"[-c count] Number of pings to send before exit. If not provided pings are continously sent until the program is finished (CTRL-C)\0A\00"
@.str.3 = [58 x i8] c"[-p pattern] The payload of each packet as an HEX string\0A\00"
@.str.4 = [47 x i8] c"[-f] : enable flood pinging (use with caution)\00"
@.str.5 = [50 x i8] c"[-a] : play an sound on every response received.\0A\00"
@.str.6 = [22 x i8] c"[-h] print this help\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.4 = [47 x i8] c"[-f] : enable flood pinging (use with caution)\00"
@str = [64 x i8] c"Usage ping [-i interval] [-c count] [-p pattern] [-f] [-a] [-h]\00"
@str.7 = [55 x i8] c"[-i interval] : interval between sent pings in seconds\00"
@str.8 = [130 x i8] c"[-c count] Number of pings to send before exit. If not provided pings are continously sent until the program is finished (CTRL-C)\00"
@str.9 = [57 x i8] c"[-p pattern] The payload of each packet as an HEX string\00"
@str.10 = [49 x i8] c"[-a] : play an sound on every response received.\00"
@str.11 = [21 x i8] c"[-h] print this help\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.7, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([130 x i8], [130 x i8]* @str.8, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str.9, i64 0, i64 0))
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.10, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.11, i64 0, i64 0))
ret void
}