#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 /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
void printUsage(char *argv[]) {
  printf("Usage: %s [OPTION] HOST[:PORT][URL]\n", argv[0]);
  printf("SSL Certificate server, Copyright 2014, RTX A/S ("
         "Mar 15 2022"
         ", "
         "19:39:33"
         ")\n");
  printf("Generate a binary certificate (for the server) with the command:\n");
  printf("  SharkSSLParseCert NAME.pem NAME.key -b NAME.cert.bin\n");
  printf("And a binary CAList with the command:\n");
  printf("  SharkSSLParseCAList NAME.pem -b NAME.calist.bin\n");
  printf("where NAME is some descriptive name and NAME.pem is a certificate\n");
  printf("for example generated with 'openssl x509/req'\n");
  printf("OPTIONS:\n");
  printf("  -s       Start as server\n");
  printf("  -p PORT  Port number (default is %d)\n", 1443);
  printf("  -v       Be more verbose (can be repeated up to 4 times)\n");
  printf("  -q       Be more quiet (can be repeated up to 4 times)\n");
  printf("  -h       Help\n");
  printf("Client Examples:\n");
  printf("  %s localhost/cert-kingfisher\n", argv[0]);
  printf("Server Examples:\n");
  printf("  %s -s -p 1043 -vv\n", argv[0]);
  exit(0);
}


x86 assembly (clang, -O0):
<printUsage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf18(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf4c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf76(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfb4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfe9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x100a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1006(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1014(%rip),%rdi
mov    $0x5a3,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1029(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1057(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1083(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1086(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
lea    0x1083(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1095(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
lea    0x1092(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<printUsage>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rsi
lea    0xec2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf36(%rip),%rdi
call   1030 <puts@plt>
lea    0xf72(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa7(%rip),%rdi
call   1030 <puts@plt>
lea    0xfd2(%rip),%rdi
call   1030 <puts@plt>
lea    0xfec(%rip),%rdi
call   1030 <puts@plt>
lea    0x1012(%rip),%rdi
call   1030 <puts@plt>
lea    0x1048(%rip),%rdi
call   1030 <puts@plt>
lea    0x106a(%rip),%rdi
call   1030 <puts@plt>
lea    0x1067(%rip),%rdi
call   1030 <puts@plt>
lea    0xe6d(%rip),%rdi
mov    $0x5a3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1063(%rip),%rdi
call   1030 <puts@plt>
lea    0x1092(%rip),%rdi
call   1030 <puts@plt>
lea    0x10bf(%rip),%rdi
call   1030 <puts@plt>
lea    0x10c3(%rip),%rdi
call   1030 <puts@plt>
mov    (%rbx),%rsi
lea    0xe4f(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x10b7(%rip),%rdi
call   1030 <puts@plt>
mov    (%rbx),%rsi
lea    0xe52(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"Usage: %s [OPTION] HOST[:PORT][URL]\0A\00"
@.str.1 = [73 x i8] c"SSL Certificate server, Copyright 2014, RTX A/S (Mar 15 2022, 19:39:33)\0A\00"
@.str.2 = [66 x i8] c"Generate a binary certificate (for the server) with the command:\0A\00"
@.str.3 = [56 x i8] c" SharkSSLParseCert NAME.pem NAME.key -b NAME.cert.bin\0A\00"
@.str.4 = [39 x i8] c"And a binary CAList with the command:\0A\00"
@.str.5 = [51 x i8] c" SharkSSLParseCAList NAME.pem -b NAME.calist.bin\0A\00"
@.str.6 = [67 x i8] c"where NAME is some descriptive name and NAME.pem is a certificate\0A\00"
@.str.7 = [47 x i8] c"for example generated with 'openssl x509/req'\0A\00"
@.str.8 = [10 x i8] c"OPTIONS:\0A\00"
@.str.9 = [28 x i8] c" -s Start as server\0A\00"
@.str.10 = [40 x i8] c" -p PORT Port number (default is %d)\0A\00"
@.str.11 = [60 x i8] c" -v Be more verbose (can be repeated up to 4 times)\0A\00"
@.str.12 = [58 x i8] c" -q Be more quiet (can be repeated up to 4 times)\0A\00"
@.str.13 = [17 x i8] c" -h Help\0A\00"
@.str.14 = [18 x i8] c"Client Examples:\0A\00"
@.str.15 = [32 x i8] c" %s localhost/cert-kingfisher\0A\00"
@.str.16 = [18 x i8] c"Server Examples:\0A\00"
@.str.17 = [21 x i8] c" %s -s -p 1043 -vv\0A\00"
define void @printUsage(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = getelementptr inbounds i8*, i8** %3, i64 0
%5 = load i8*, i8** %4
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.3, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.5, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.6, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.7, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.10, i64 0, i64 0), i32 1443)
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.11, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.12, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.13, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.14, i64 0, i64 0))
%21 = load i8**, i8*** %2
%22 = getelementptr inbounds i8*, i8** %21, i64 0
%23 = load i8*, i8** %22
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.15, i64 0, i64 0), i8* %23)
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.16, i64 0, i64 0))
%26 = load i8**, i8*** %2
%27 = getelementptr inbounds i8*, i8** %26, i64 0
%28 = load i8*, i8** %27
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.17, i64 0, i64 0), i8* %28)
%30 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [37 x i8] c"Usage: %s [OPTION] HOST[:PORT][URL]\0A\00"
@.str.10 = [40 x i8] c" -p PORT Port number (default is %d)\0A\00"
@.str.15 = [32 x i8] c" %s localhost/cert-kingfisher\0A\00"
@.str.17 = [21 x i8] c" %s -s -p 1043 -vv\0A\00"
@str = [72 x i8] c"SSL Certificate server, Copyright 2014, RTX A/S (Mar 15 2022, 19:39:33)\00"
@str.18 = [65 x i8] c"Generate a binary certificate (for the server) with the command:\00"
@str.19 = [55 x i8] c" SharkSSLParseCert NAME.pem NAME.key -b NAME.cert.bin\00"
@str.20 = [38 x i8] c"And a binary CAList with the command:\00"
@str.21 = [50 x i8] c" SharkSSLParseCAList NAME.pem -b NAME.calist.bin\00"
@str.22 = [66 x i8] c"where NAME is some descriptive name and NAME.pem is a certificate\00"
@str.23 = [46 x i8] c"for example generated with 'openssl x509/req'\00"
@str.24 = [9 x i8] c"OPTIONS:\00"
@str.25 = [27 x i8] c" -s Start as server\00"
@str.26 = [59 x i8] c" -v Be more verbose (can be repeated up to 4 times)\00"
@str.27 = [57 x i8] c" -q Be more quiet (can be repeated up to 4 times)\00"
@str.28 = [16 x i8] c" -h Help\00"
@str.29 = [17 x i8] c"Client Examples:\00"
@str.30 = [17 x i8] c"Server Examples:\00"
define void @printUsage(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.18, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.19, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.20, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.21, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @str.22, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.23, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.24, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.25, i64 0, i64 0))
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.10, i64 0, i64 0), i32 1443)
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.26, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str.27, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.28, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.29, i64 0, i64 0))
%18 = load i8*, i8** %0
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.15, i64 0, i64 0), i8* %18)
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.30, i64 0, i64 0))
%21 = load i8*, i8** %0
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.17, i64 0, i64 0), i8* %21)
%23 = tail call i32 @exit(i32 0)
unreachable
}