#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*/ SSL_library_init();
int /*<<< orphan*/ SSL_load_error_strings();
int /*<<< orphan*/ check_hosts();
char getopt(int, char **, char *);
int /*<<< orphan*/ load_hostlist(char *);
scalar_t__ optind;
int /*<<< orphan*/ results();
int /*<<< orphan*/ usage();
int main(int argc, char *argv[]) {
  char *hpath;
  char ch;
  SSL_library_init();
  SSL_load_error_strings();
  while ((ch = getopt(argc, argv, "h")) != -1) {
    switch (ch) {
    case 'h':
    default:
      usage();
      break;
    }
  }
  argc -= optind;
  argv += optind;
  if (argc != 1)
    usage();
  hpath = argv[0];
  load_hostlist(hpath);
  check_hosts();
  results();
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <SSL_library_init@plt>
mov    $0x0,%al
call   1080 <SSL_load_error_strings@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xe5e(%rip),%rdx
call   1090 <getopt@plt>
mov    %al,-0x19(%rbp)
movsbl %al,%eax
cmp    $0xffffffff,%eax
je     11d7 <main+0x67>
mov    -0x19(%rbp),%al
sub    $0x68,%al
jne    11cb <main+0x5b>
jmp    11c6 <main+0x56>
jmp    11cb <main+0x5b>
mov    $0x0,%al
call   1060 <usage@plt>
jmp    1194 <main+0x24>
mov    0x2e0a(%rip),%rax
mov    (%rax),%rcx
movslq -0x8(%rbp),%rax
sub    %rcx,%rax
mov    %eax,-0x8(%rbp)
mov    0x2df6(%rip),%rax
mov    (%rax),%rax
shl    $0x3,%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
je     1212 <main+0xa2>
mov    $0x0,%al
call   1060 <usage@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <load_hostlist@plt>
mov    $0x0,%al
call   1050 <check_hosts@plt>
mov    $0x0,%al
call   1070 <results@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <SSL_library_init@plt>
xor    %eax,%eax
call   1080 <SSL_load_error_strings@plt>
lea    0xe72(%rip),%rdx
mov    %ebp,%edi
mov    %rbx,%rsi
call   1090 <getopt@plt>
cmp    $0xff,%al
je     11c8 <main+0x58>
lea    0xe5d(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %eax,%eax
call   1060 <usage@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1090 <getopt@plt>
cmp    $0xff,%al
jne    11b0 <main+0x40>
mov    0x2e19(%rip),%rax
mov    (%rax),%r14
sub    %r14d,%ebp
cmp    $0x1,%ebp
je     11e1 <main+0x71>
xor    %eax,%eax
call   1060 <usage@plt>
mov    (%rbx,%r14,8),%rdi
call   1030 <load_hostlist@plt>
xor    %eax,%eax
call   1050 <check_hosts@plt>
xor    %eax,%eax
call   1070 <results@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"h\00"
@optind = global i64 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 (...) @SSL_library_init()
%9 = call i32 (...) @SSL_load_error_strings()
br label %10
10: ; preds = %22, %2
%11 = load i32, i32* %4
%12 = load i8**, i8*** %5
%13 = call signext i8 @getopt(i32 %11, i8** %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8 %13, i8* %7
%14 = sext i8 %13 to i32
%15 = icmp ne i32 %14, -1
br i1 %15, label %16, label %23
16: ; preds = %10
%17 = load i8, i8* %7
%18 = sext i8 %17 to i32
switch i32 %18, label %20 [
i32 104, label %19
]
19: ; preds = %16
br label %20
20: ; preds = %16, %19
%21 = call i32 (...) @usage()
br label %22
22: ; preds = %20
br label %10
23: ; preds = %10
%24 = load i64, i64* @optind
%25 = load i32, i32* %4
%26 = sext i32 %25 to i64
%27 = sub nsw i64 %26, %24
%28 = trunc i64 %27 to i32
store i32 %28, i32* %4
%29 = load i64, i64* @optind
%30 = load i8**, i8*** %5
%31 = getelementptr inbounds i8*, i8** %30, i64 %29
store i8** %31, i8*** %5
%32 = load i32, i32* %4
%33 = icmp ne i32 %32, 1
br i1 %33, label %34, label %36
34: ; preds = %23
%35 = call i32 (...) @usage()
br label %36
36: ; preds = %34, %23
%37 = load i8**, i8*** %5
%38 = getelementptr inbounds i8*, i8** %37, i64 0
%39 = load i8*, i8** %38
store i8* %39, i8** %6
%40 = load i8*, i8** %6
%41 = call i32 @load_hostlist(i8* %40)
%42 = call i32 (...) @check_hosts()
%43 = call i32 (...) @results()
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"h\00"
@optind = global i64 0
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 (...) @SSL_library_init()
%4 = tail call i32 (...) @SSL_load_error_strings()
%5 = tail call signext i8 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i8 %5, -1
br i1 %6, label %11, label %7
7: ; preds = %2, %7
%8 = tail call i32 (...) @usage()
%9 = tail call signext i8 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%10 = icmp eq i8 %9, -1
br i1 %10, label %11, label %7
11: ; preds = %7, %2
%12 = load i64, i64* @optind
%13 = trunc i64 %12 to i32
%14 = sub i32 %0, %13
%15 = icmp eq i32 %14, 1
br i1 %15, label %18, label %16
16: ; preds = %11
%17 = tail call i32 (...) @usage()
br label %18
18: ; preds = %16, %11
%19 = getelementptr inbounds i8*, i8** %1, i64 %12
%20 = load i8*, i8** %19
%21 = tail call i32 @load_hostlist(i8* %20)
%22 = tail call i32 (...) @check_hosts()
%23 = tail call i32 (...) @results()
ret i32 0
}