#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*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ quitnow(int);
int /*<<< orphan*/ stderr;
void usageerr(const char *why) {
  fprintf(stderr,
          "bad usage: %s\n"
          "usage: adnstest [-<initflagsnum>[,<owninitflags>]] [/<initstring>]\n"
          "              [ :<typenum>,... ]\n"
          "              [ [<queryflagsnum>[,<ownqueryflags>]/]<domain> ... ]\n"
          "initflags:   p  use poll(2) instead of select(2)\n"
          "             s  use adns_wait with specified query, instead of 0\n"
          "queryflags:  a  print status abbrevs instead of strings\n"
          "exit status:  0 ok (though some queries may have failed)\n"
          "              1 used by test harness to indicate test failed\n"
          "              2 unable to submit or init or some such\n"
          "              3 unexpected failure\n"
          "              4 usage error\n"
          "              5 operation not supported on this system\n",
          why);
  quitnow(4);
}


x86 assembly (clang, -O0):
<usageerr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x4,%edi
call   1040 <quitnow@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usageerr>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x4,%edi
pop    %rax
jmp    1040 <quitnow@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [642 x i8] c"bad usage: %s\0Ausage: adnstest [-<initflagsnum>[,<owninitflags>]] [/<initstring>]\0A [ :<typenum>,... ]\0A [ [<queryflagsnum>[,<ownqueryflags>]/]<domain> ... ]\0Ainitflags: p use poll(2) instead of select(2)\0A s use adns_wait with specified query, instead of 0\0Aqueryflags: a print status abbrevs instead of strings\0Aexit status: 0 ok (though some queries may have failed)\0A 1 used by test harness to indicate test failed\0A 2 unable to submit or init or some such\0A 3 unexpected failure\0A 4 usage error\0A 5 operation not supported on this system\0A\00"
define void @usageerr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([642 x i8], [642 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @quitnow(i32 4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [642 x i8] c"bad usage: %s\0Ausage: adnstest [-<initflagsnum>[,<owninitflags>]] [/<initstring>]\0A [ :<typenum>,... ]\0A [ [<queryflagsnum>[,<ownqueryflags>]/]<domain> ... ]\0Ainitflags: p use poll(2) instead of select(2)\0A s use adns_wait with specified query, instead of 0\0Aqueryflags: a print status abbrevs instead of strings\0Aexit status: 0 ok (though some queries may have failed)\0A 1 used by test harness to indicate test failed\0A 2 unable to submit or init or some such\0A 3 unexpected failure\0A 4 usage error\0A 5 operation not supported on this system\0A\00"
define void @usageerr(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([642 x i8], [642 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @quitnow(i32 4)
ret void
}