#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(int argc, char **argv) {
  printf("Usage: %s [OPTIONS]\n", argv[0]);
  printf("Outputs given input to HTTP\n\n");
  printf("Options:\n");
  printf("  -f, --file=FILE\toutputs file to HTTP. If FILE is undefined,\n");
  printf("\t\t\tinput data will be read from stdin\n");
  printf("  -p, --port=PORT\tsets the port to which the program\n");
  printf("\t\t\twill listen for incoming connections.\n");
  printf("\t\t\tDefaults to %d\n", 5000);
  printf("  -m, --mime=MIME\tsets the output MIME type.\n");
  printf("\t\t\tDefaults to %s\n", "application/octet-stream");
  printf("  -v, --verbose\t\tbe verbose (can track sending speed)\n");
  printf("  -s, --silent\t\tbe silent (no output at all)\n");
  printf("  -h, --help\t\tshows this help message\n\n");
  printf("This program is meant to be used as an HTTP pipe.\n");
  printf("It was conceived so it could be possible to easily transfer\n");
  printf("a disk image throught HTTP.\n");
  printf("That can be accomplished by issuing:\n");
  printf("  cat /dev/sda | gzip -9 | %s\n\n", argv[0]);
  printf("And on the client:\n");
  printf("  curl http://example.com/image.img.gz -O\n\n");
  printf("Please be aware that doing so in an unprotected environment,\n");
  printf("(outside your home network for instance) is not recommended,\n");
  printf("due to possible security issues.\n\n");
  printf("HTTPipe home page: <https://github.com/N0NamedGuy/httpipe/>\n");
  printf("Report bugs and issues in the GitHub tracker\n");
  printf("Pull requests are welcome\n");
  printf("Original implementation by:\n");
  printf("David Serrano <david.nonamedguy@gmail.com>\n");
}


x86 assembly (clang, -O0):
<print_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeea(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf17(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf30(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf58(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf74(%rip),%rdi
mov    $0x1388,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf74(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf94(%rip),%rdi
lea    0xfa0(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfd4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xff4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x100e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1033(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1062(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1071(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0x1082(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1094(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x109a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10b8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10e8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1118(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x112d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x115c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x117c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1189(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1198(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_help>:
push   %rbx
mov    %rsi,%rbx
mov    (%rsi),%rsi
lea    0xed2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf38(%rip),%rdi
call   1030 <puts@plt>
lea    0xf49(%rip),%rdi
call   1030 <puts@plt>
lea    0xf46(%rip),%rdi
call   1030 <puts@plt>
lea    0xf78(%rip),%rdi
call   1030 <puts@plt>
lea    0xf92(%rip),%rdi
call   1030 <puts@plt>
lea    0xfbb(%rip),%rdi
call   1030 <puts@plt>
lea    0xe91(%rip),%rdi
mov    $0x1388,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xfc5(%rip),%rdi
call   1030 <puts@plt>
lea    0xe85(%rip),%rdi
lea    0xe91(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xfd1(%rip),%rdi
call   1030 <puts@plt>
lea    0xffb(%rip),%rdi
call   1030 <puts@plt>
lea    0x101c(%rip),%rdi
call   1030 <puts@plt>
lea    0x1037(%rip),%rdi
call   1030 <puts@plt>
lea    0x105d(%rip),%rdi
call   1030 <puts@plt>
lea    0x108d(%rip),%rdi
call   1030 <puts@plt>
lea    0x109d(%rip),%rdi
call   1030 <puts@plt>
mov    (%rbx),%rsi
lea    0xe45(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x10a5(%rip),%rdi
call   1030 <puts@plt>
lea    0x10ac(%rip),%rdi
call   1030 <puts@plt>
lea    0x10cb(%rip),%rdi
call   1030 <puts@plt>
lea    0x10fc(%rip),%rdi
call   1030 <puts@plt>
lea    0x112d(%rip),%rdi
call   1030 <puts@plt>
lea    0x1143(%rip),%rdi
call   1030 <puts@plt>
lea    0x1173(%rip),%rdi
call   1030 <puts@plt>
lea    0x1194(%rip),%rdi
call   1030 <puts@plt>
lea    0x11a2(%rip),%rdi
call   1030 <puts@plt>
lea    0x11b2(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Usage: %s [OPTIONS]\0A\00"
@.str.1 = [30 x i8] c"Outputs given input to HTTP\0A\0A\00"
@.str.2 = [10 x i8] c"Options:\0A\00"
@.str.3 = [63 x i8] c" -f, --file=FILE\09outputs file to HTTP. If FILE is undefined,\0A\00"
@.str.4 = [39 x i8] c"\09\09\09input data will be read from stdin\0A\00"
@.str.5 = [54 x i8] c" -p, --port=PORT\09sets the port to which the program\0A\00"
@.str.6 = [42 x i8] c"\09\09\09will listen for incoming connections.\0A\00"
@.str.7 = [19 x i8] c"\09\09\09Defaults to %d\0A\00"
@.str.8 = [46 x i8] c" -m, --mime=MIME\09sets the output MIME type.\0A\00"
@.str.9 = [19 x i8] c"\09\09\09Defaults to %s\0A\00"
@.str.10 = [25 x i8] c"application/octet-stream\00"
@.str.11 = [55 x i8] c" -v, --verbose\09\09be verbose (can track sending speed)\0A\00"
@.str.12 = [46 x i8] c" -s, --silent\09\09be silent (no output at all)\0A\00"
@.str.13 = [40 x i8] c" -h, --help\09\09shows this help message\0A\0A\00"
@.str.14 = [51 x i8] c"This program is meant to be used as an HTTP pipe.\0A\00"
@.str.15 = [61 x i8] c"It was conceived so it could be possible to easily transfer\0A\00"
@.str.16 = [29 x i8] c"a disk image throught HTTP.\0A\00"
@.str.17 = [38 x i8] c"That can be accomplished by issuing:\0A\00"
@.str.18 = [32 x i8] c" cat /dev/sda | gzip -9 | %s\0A\0A\00"
@.str.19 = [20 x i8] c"And on the client:\0A\00"
@.str.20 = [44 x i8] c" curl http://example.com/image.img.gz -O\0A\0A\00"
@.str.21 = [62 x i8] c"Please be aware that doing so in an unprotected environment,\0A\00"
@.str.22 = [62 x i8] c"(outside your home network for instance) is not recommended,\0A\00"
@.str.23 = [35 x i8] c"due to possible security issues.\0A\0A\00"
@.str.24 = [61 x i8] c"HTTPipe home page: <https://github.com/N0NamedGuy/httpipe/>\0A\00"
@.str.25 = [46 x i8] c"Report bugs and issues in the GitHub tracker\0A\00"
@.str.26 = [27 x i8] c"Pull requests are welcome\0A\00"
@.str.27 = [29 x i8] c"Original implementation by:\0A\00"
@.str.28 = [44 x i8] c"David Serrano <david.nonamedguy@gmail.com>\0A\00"
define void @print_help(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %4
%6 = getelementptr inbounds i8*, i8** %5, i64 0
%7 = load i8*, i8** %6
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.5, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i32 5000)
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.8, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.11, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.12, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.13, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.14, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.15, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.16, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.17, i64 0, i64 0))
%25 = load i8**, i8*** %4
%26 = getelementptr inbounds i8*, i8** %25, i64 0
%27 = load i8*, i8** %26
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.18, i64 0, i64 0), i8* %27)
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.19, i64 0, i64 0))
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.20, i64 0, i64 0))
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.21, i64 0, i64 0))
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.22, i64 0, i64 0))
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.23, i64 0, i64 0))
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.24, i64 0, i64 0))
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.25, i64 0, i64 0))
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.26, i64 0, i64 0))
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.27, i64 0, i64 0))
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.28, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Usage: %s [OPTIONS]\0A\00"
@.str.7 = [19 x i8] c"\09\09\09Defaults to %d\0A\00"
@.str.9 = [19 x i8] c"\09\09\09Defaults to %s\0A\00"
@.str.10 = [25 x i8] c"application/octet-stream\00"
@.str.18 = [32 x i8] c" cat /dev/sda | gzip -9 | %s\0A\0A\00"
@str = [29 x i8] c"Outputs given input to HTTP\0A\00"
@str.29 = [9 x i8] c"Options:\00"
@str.30 = [62 x i8] c" -f, --file=FILE\09outputs file to HTTP. If FILE is undefined,\00"
@str.31 = [38 x i8] c"\09\09\09input data will be read from stdin\00"
@str.32 = [53 x i8] c" -p, --port=PORT\09sets the port to which the program\00"
@str.33 = [41 x i8] c"\09\09\09will listen for incoming connections.\00"
@str.34 = [45 x i8] c" -m, --mime=MIME\09sets the output MIME type.\00"
@str.35 = [54 x i8] c" -v, --verbose\09\09be verbose (can track sending speed)\00"
@str.36 = [45 x i8] c" -s, --silent\09\09be silent (no output at all)\00"
@str.37 = [39 x i8] c" -h, --help\09\09shows this help message\0A\00"
@str.38 = [50 x i8] c"This program is meant to be used as an HTTP pipe.\00"
@str.39 = [60 x i8] c"It was conceived so it could be possible to easily transfer\00"
@str.40 = [28 x i8] c"a disk image throught HTTP.\00"
@str.41 = [37 x i8] c"That can be accomplished by issuing:\00"
@str.42 = [19 x i8] c"And on the client:\00"
@str.43 = [43 x i8] c" curl http://example.com/image.img.gz -O\0A\00"
@str.44 = [61 x i8] c"Please be aware that doing so in an unprotected environment,\00"
@str.45 = [61 x i8] c"(outside your home network for instance) is not recommended,\00"
@str.46 = [34 x i8] c"due to possible security issues.\0A\00"
@str.47 = [60 x i8] c"HTTPipe home page: <https://github.com/N0NamedGuy/httpipe/>\00"
@str.48 = [45 x i8] c"Report bugs and issues in the GitHub tracker\00"
@str.49 = [26 x i8] c"Pull requests are welcome\00"
@str.50 = [28 x i8] c"Original implementation by:\00"
@str.51 = [43 x i8] c"David Serrano <david.nonamedguy@gmail.com>\00"
define void @print_help(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.29, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.30, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.31, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.32, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.33, i64 0, i64 0))
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i32 5000)
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.34, i64 0, i64 0))
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.35, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.36, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.37, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.38, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.39, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.40, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.41, i64 0, i64 0))
%21 = load i8*, i8** %1
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.18, i64 0, i64 0), i8* %21)
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.42, i64 0, i64 0))
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.43, i64 0, i64 0))
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.44, i64 0, i64 0))
%26 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.45, i64 0, i64 0))
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.46, i64 0, i64 0))
%28 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.47, i64 0, i64 0))
%29 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.48, i64 0, i64 0))
%30 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.49, i64 0, i64 0))
%31 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.50, i64 0, i64 0))
%32 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.51, i64 0, i64 0))
ret void
}