#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 *);
int /*<<< orphan*/ stderr;
int usage(void) {
  fprintf(
      stderr,
      "universal_crc version "
      "1.3a"
      "\n"
      "Copyright (C) 2011 Danjel McGougan <danjel.mcgougan@gmail.com>\n\n"
      "Usage: universal_crc <parameters>\n\n"
      "Parameters:\n"
      "  -b <bits> | --bits=<bits>\n"
      "    Number of bits in the CRC register, 1-64 is supported\n"
      "    Mandatory parameter\n\n"
      "  -p <polynomial> | --poly=<polynomial>\n"
      "    CRC polynomial value;\n"
      "    Coefficient of x^0 is bit 0 (LSB) of this value\n"
      "    Coefficient of x^1 is bit 1 of this value, etc.\n"
      "    Coefficient of x^<bits> is implied 1\n"
      "    Bit-reversed automatically if -r is used\n"
      "    Mandatory parameter\n\n"
      "  -i <init> | --init=<init>\n"
      "    Initial value of the CRC register\n"
      "    Not bit-reversed even if -r is used\n"
      "    Default 0 if not specified\n\n"
      "  -x <xor> | --xor=<xor>\n"
      "    Value that is XORed to the final CRC register value\n"
      "    Not bit-reversed even if -r is used\n"
      "    Default 0 if not specified\n\n"
      "  -r | --reverse\n"
      "    Bit-reverse the CRC register (LSB is shifted out and MSB in)\n"
      "    This also means that message bits are processed LSB first\n"
      "    Default is not to reverse\n\n"
      "  -n | --non-direct\n"
      "    Shift in message bits into the CRC register and augment the\n"
      "    message. This is equivalent to the direct method of not\n"
      "    augmenting the message and XORing the message bits with the\n"
      "    bits shifted out of the CRC register, but the initial CRC\n"
      "    register value needs to be converted (if it is non-zero) for\n"
      "    compatibility.\n"
      "    Default is direct mode.\n\n"
      "  -a <algorithm> | --algorithm=<algorithm>\n"
      "    CRC algorithm to use:\n"
      "      bit    standard bit-at-a-time algorithm (default, smallest cache "
      "footprint)\n"
      "      tab16  table-driven algorithm with small cache footprint (16 "
      "table entries)\n"
      "      tab16i table-driven using two independent lookups (32 table "
      "entries)\n"
      "             good for superscalar cores\n"
      "      tab    standard table-driven algorithm (256 table entries)\n"
      "      tabw   standard table-driven algorithm, word-at-a-time\n"
      "             same as tab but reads 32 bits at a time from memory\n"
      "      tabi   table-driven algorithm, four independent lookups (1024 "
      "entries)\n"
      "             good for superscalar cores\n"
      "             inspired by crc32 algorithm in zlib originally by Rodney "
      "Brown\n"
      "      tabiw  table-driven algorithm, four independent lookups, "
      "word-at-a-time\n"
      "             same as tabi but reads 32 bits at a time from memory\n\n"
      "  --crc-type=<type>\n"
      "    Use <type> as the unsigned integer type to hold the CRC value\n\n"
      "  --tab-type=<type>\n"
      "    Use <type> as the unsigned integer type to hold the CRC table "
      "entries\n\n"
      "  --test\n"
      "    Generate test code\n\n"
      "Examples:\n"
      "  universal_crc -b 32 -p 0x04c11db7 -i 0xffffffff -x 0xffffffff -r\n"
      "  (CRC used in i.e. Ethernet, commonly known as CRC-32)\n\n"
      "  universal_crc -b 16 -p 0x1021\n"
      "  (CRC used in XMODEM/CRC)\n\n"
      "This program is free software; you can redistribute it and/or modify\n"
      "it under the terms of the GNU General Public License as published by\n"
      "the Free Software Foundation; version 2 of the License.\n\n"
      "This program is distributed in the hope that it will be useful,\n"
      "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
      "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n"
      "GNU General Public License for more details.\n");
  return 1;
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [3095 x i8] c"universal_crc version 1.3a\0ACopyright (C) 2011 Danjel McGougan <danjel.mcgougan@gmail.com>\0A\0AUsage: universal_crc <parameters>\0A\0AParameters:\0A -b <bits> | --bits=<bits>\0A Number of bits in the CRC register, 1-64 is supported\0A Mandatory parameter\0A\0A -p <polynomial> | --poly=<polynomial>\0A CRC polynomial value;\0A Coefficient of x^0 is bit 0 (LSB) of this value\0A Coefficient of x^1 is bit 1 of this value, etc.\0A Coefficient of x^<bits> is implied 1\0A Bit-reversed automatically if -r is used\0A Mandatory parameter\0A\0A -i <init> | --init=<init>\0A Initial value of the CRC register\0A Not bit-reversed even if -r is used\0A Default 0 if not specified\0A\0A -x <xor> | --xor=<xor>\0A Value that is XORed to the final CRC register value\0A Not bit-reversed even if -r is used\0A Default 0 if not specified\0A\0A -r | --reverse\0A Bit-reverse the CRC register (LSB is shifted out and MSB in)\0A This also means that message bits are processed LSB first\0A Default is not to reverse\0A\0A -n | --non-direct\0A Shift in message bits into the CRC register and augment the\0A message. This is equivalent to the direct method of not\0A augmenting the message and XORing the message bits with the\0A bits shifted out of the CRC register, but the initial CRC\0A register value needs to be converted (if it is non-zero) for\0A compatibility.\0A Default is direct mode.\0A\0A -a <algorithm> | --algorithm=<algorithm>\0A CRC algorithm to use:\0A bit standard bit-at-a-time algorithm (default, smallest cache footprint)\0A tab16 table-driven algorithm with small cache footprint (16 table entries)\0A tab16i table-driven using two independent lookups (32 table entries)\0A good for superscalar cores\0A tab standard table-driven algorithm (256 table entries)\0A tabw standard table-driven algorithm, word-at-a-time\0A same as tab but reads 32 bits at a time from memory\0A tabi table-driven algorithm, four independent lookups (1024 entries)\0A good for superscalar cores\0A inspired by crc32 algorithm in zlib originally by Rodney Brown\0A tabiw table-driven algorithm, four independent lookups, word-at-a-time\0A same as tabi but reads 32 bits at a time from memory\0A\0A --crc-type=<type>\0A Use <type> as the unsigned integer type to hold the CRC value\0A\0A --tab-type=<type>\0A Use <type> as the unsigned integer type to hold the CRC table entries\0A\0A --test\0A Generate test code\0A\0AExamples:\0A universal_crc -b 32 -p 0x04c11db7 -i 0xffffffff -x 0xffffffff -r\0A (CRC used in i.e. Ethernet, commonly known as CRC-32)\0A\0A universal_crc -b 16 -p 0x1021\0A (CRC used in XMODEM/CRC)\0A\0AThis program is free software; you can redistribute it and/or modify\0Ait under the terms of the GNU General Public License as published by\0Athe Free Software Foundation; version 2 of the License.\0A\0AThis program is distributed in the hope that it will be useful,\0Abut WITHOUT ANY WARRANTY; without even the implied warranty of\0AMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\0AGNU General Public License for more details.\0A\00"
define i32 @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([3095 x i8], [3095 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [3095 x i8] c"universal_crc version 1.3a\0ACopyright (C) 2011 Danjel McGougan <danjel.mcgougan@gmail.com>\0A\0AUsage: universal_crc <parameters>\0A\0AParameters:\0A -b <bits> | --bits=<bits>\0A Number of bits in the CRC register, 1-64 is supported\0A Mandatory parameter\0A\0A -p <polynomial> | --poly=<polynomial>\0A CRC polynomial value;\0A Coefficient of x^0 is bit 0 (LSB) of this value\0A Coefficient of x^1 is bit 1 of this value, etc.\0A Coefficient of x^<bits> is implied 1\0A Bit-reversed automatically if -r is used\0A Mandatory parameter\0A\0A -i <init> | --init=<init>\0A Initial value of the CRC register\0A Not bit-reversed even if -r is used\0A Default 0 if not specified\0A\0A -x <xor> | --xor=<xor>\0A Value that is XORed to the final CRC register value\0A Not bit-reversed even if -r is used\0A Default 0 if not specified\0A\0A -r | --reverse\0A Bit-reverse the CRC register (LSB is shifted out and MSB in)\0A This also means that message bits are processed LSB first\0A Default is not to reverse\0A\0A -n | --non-direct\0A Shift in message bits into the CRC register and augment the\0A message. This is equivalent to the direct method of not\0A augmenting the message and XORing the message bits with the\0A bits shifted out of the CRC register, but the initial CRC\0A register value needs to be converted (if it is non-zero) for\0A compatibility.\0A Default is direct mode.\0A\0A -a <algorithm> | --algorithm=<algorithm>\0A CRC algorithm to use:\0A bit standard bit-at-a-time algorithm (default, smallest cache footprint)\0A tab16 table-driven algorithm with small cache footprint (16 table entries)\0A tab16i table-driven using two independent lookups (32 table entries)\0A good for superscalar cores\0A tab standard table-driven algorithm (256 table entries)\0A tabw standard table-driven algorithm, word-at-a-time\0A same as tab but reads 32 bits at a time from memory\0A tabi table-driven algorithm, four independent lookups (1024 entries)\0A good for superscalar cores\0A inspired by crc32 algorithm in zlib originally by Rodney Brown\0A tabiw table-driven algorithm, four independent lookups, word-at-a-time\0A same as tabi but reads 32 bits at a time from memory\0A\0A --crc-type=<type>\0A Use <type> as the unsigned integer type to hold the CRC value\0A\0A --tab-type=<type>\0A Use <type> as the unsigned integer type to hold the CRC table entries\0A\0A --test\0A Generate test code\0A\0AExamples:\0A universal_crc -b 32 -p 0x04c11db7 -i 0xffffffff -x 0xffffffff -r\0A (CRC used in i.e. Ethernet, commonly known as CRC-32)\0A\0A universal_crc -b 16 -p 0x1021\0A (CRC used in XMODEM/CRC)\0A\0AThis program is free software; you can redistribute it and/or modify\0Ait under the terms of the GNU General Public License as published by\0Athe Free Software Foundation; version 2 of the License.\0A\0AThis program is distributed in the hope that it will be useful,\0Abut WITHOUT ANY WARRANTY; without even the implied warranty of\0AMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\0AGNU General Public License for more details.\0A\00"
define i32 @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([3095 x i8], [3095 x i8]* @.str, i64 0, i64 0))
ret i32 1
}