#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);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
__attribute__((noreturn)) void print_usage_and_die(int ret) {
  fprintf(stderr, "kwc [options] [files]\n");
  fprintf(stderr, "options:\n");
  fprintf(stderr, "  --lines, -l:     count lines\n");
  fprintf(stderr, "  --words, -w:     count words\n");
  fprintf(stderr, "  --chars, -c:     count character\n");
  fprintf(stderr, "  --parseable, -p: parseable output for use in scripts\n");
  fprintf(stderr, "  --help, -h:      print this help text\n");
  fprintf(stderr, "  --version, -v:   print version imformation\n");
  fprintf(stderr, "By default all options are enabled. If no file is "
                  "specified, stdin is used.\n");
  fprintf(stderr, "(C) Kurt Kanzenbach <kurt@kmk-computers.de>\n");
  exit(ret);
}


x86 assembly (clang, -O0):
<print_usage_and_die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xec7(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
lea    0xebc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e6f(%rip),%rax
mov    (%rax),%edi
lea    0xec7(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e5a(%rip),%rax
mov    (%rax),%edi
lea    0xed2(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e45(%rip),%rax
mov    (%rax),%edi
lea    0xee1(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e30(%rip),%rax
mov    (%rax),%edi
lea    0xf04(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e1b(%rip),%rax
mov    (%rax),%edi
lea    0xf18(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e06(%rip),%rax
mov    (%rax),%edi
lea    0xf31(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2df1(%rip),%rax
mov    (%rax),%edi
lea    0xf69(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<print_usage_and_die>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    0x2eb4(%rip),%rbx
mov    (%rbx),%edi
lea    0xecb(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xed4(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xee2(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xef4(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf0a(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf34(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf4f(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf6f(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfae(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebp,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [23 x i8] c"kwc [options] [files]\0A\00"
@.str.1 = [10 x i8] c"options:\0A\00"
@.str.2 = [32 x i8] c" --lines, -l: count lines\0A\00"
@.str.3 = [32 x i8] c" --words, -w: count words\0A\00"
@.str.4 = [36 x i8] c" --chars, -c: count character\0A\00"
@.str.5 = [56 x i8] c" --parseable, -p: parseable output for use in scripts\0A\00"
@.str.6 = [41 x i8] c" --help, -h: print this help text\0A\00"
@.str.7 = [46 x i8] c" --version, -v: print version imformation\0A\00"
@.str.8 = [77 x i8] c"By default all options are enabled. If no file is specified, stdin is used.\0A\00"
@.str.9 = [45 x i8] c"(C) Kurt Kanzenbach <kurt@kmk-computers.de>\0A\00"
define void @print_usage_and_die(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0))
%11 = load i32, i32* @stderr
%12 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0))
%13 = load i32, i32* @stderr
%14 = call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.5, i64 0, i64 0))
%15 = load i32, i32* @stderr
%16 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.6, i64 0, i64 0))
%17 = load i32, i32* @stderr
%18 = call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.7, i64 0, i64 0))
%19 = load i32, i32* @stderr
%20 = call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.8, i64 0, i64 0))
%21 = load i32, i32* @stderr
%22 = call i32 @fprintf(i32 %21, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.9, i64 0, i64 0))
%23 = load i32, i32* %2
%24 = call i32 @exit(i32 %23)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [23 x i8] c"kwc [options] [files]\0A\00"
@.str.1 = [10 x i8] c"options:\0A\00"
@.str.2 = [32 x i8] c" --lines, -l: count lines\0A\00"
@.str.3 = [32 x i8] c" --words, -w: count words\0A\00"
@.str.4 = [36 x i8] c" --chars, -c: count character\0A\00"
@.str.5 = [56 x i8] c" --parseable, -p: parseable output for use in scripts\0A\00"
@.str.6 = [41 x i8] c" --help, -h: print this help text\0A\00"
@.str.7 = [46 x i8] c" --version, -v: print version imformation\0A\00"
@.str.8 = [77 x i8] c"By default all options are enabled. If no file is specified, stdin is used.\0A\00"
@.str.9 = [45 x i8] c"(C) Kurt Kanzenbach <kurt@kmk-computers.de>\0A\00"
define void @print_usage_and_die(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
%8 = load i32, i32* @stderr
%9 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0))
%10 = load i32, i32* @stderr
%11 = tail call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0))
%12 = load i32, i32* @stderr
%13 = tail call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.5, i64 0, i64 0))
%14 = load i32, i32* @stderr
%15 = tail call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.6, i64 0, i64 0))
%16 = load i32, i32* @stderr
%17 = tail call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.7, i64 0, i64 0))
%18 = load i32, i32* @stderr
%19 = tail call i32 @fprintf(i32 %18, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.8, i64 0, i64 0))
%20 = load i32, i32* @stderr
%21 = tail call i32 @fprintf(i32 %20, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.9, i64 0, i64 0))
%22 = tail call i32 @exit(i32 %0)
unreachable
}