#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 ZBarcode_Version();
int /*<<< orphan*/ printf(char *, ...);
void usage(void) {
  int zint_version = ZBarcode_Version();
  int version_major = zint_version / 10000;
  int version_minor = (zint_version % 10000) / 100;
  int version_release = zint_version % 100;
  int version_build;
  if (version_release >= 9) {
    version_release = version_release / 10;
    version_build = zint_version % 10;
    printf("Zint version %d.%d.%d.%d (dev)\n", version_major, version_minor,
           version_release, version_build);
  } else {
    printf("Zint version %d.%d.%d\n", version_major, version_minor,
           version_release);
  }
  printf(
      "Encode input data in a barcode and save as "
      "BMP/EMF/EPS/GIF/PCX/PNG/SVG/TIF/TXT\n\n"
      "  -b, --barcode=TYPE    Number or name of barcode type. Default is 20 "
      "(CODE128)\n"
      "  --addongap=NUMBER     Set add-on gap in multiples of X-dimension for "
      "UPC/EAN\n"
      "  --batch               Treat each line of input file as a separate "
      "data set\n"
      "  --bg=COLOUR           Specify a background colour (in hex RGB/RGBA)\n"
      "  --binary              Treat input as raw binary data\n"
      "  --bind                Add boundary bars\n"
      "  --bold                Use bold text\n"
      "  --border=NUMBER       Set width of border in multiples of "
      "X-dimension\n"
      "  --box                 Add a box around the symbol\n"
      "  --cmyk                Use CMYK colour space in EPS/TIF symbols\n"
      "  --cols=NUMBER         Set the number of data columns in symbol\n"
      "  -d, --data=DATA       Set the symbol content\n"
      "  --direct              Send output to stdout\n"
      "  --dmre                Allow Data Matrix Rectangular Extended\n"
      "  --dotsize=NUMBER      Set radius of dots in dotty mode\n"
      "  --dotty               Use dots instead of squares for matrix symbols\n"
      "  --dump                Dump hexadecimal representation to stdout\n"
      "  -e, --ecinos          Display table of ECI character encodings\n"
      "  --eci=NUMBER          Set the ECI (Extended Channel Interpretation) "
      "code\n"
      "  --esc                 Process escape characters in input data\n"
      "  --fg=COLOUR           Specify a foreground colour (in hex RGB/RGBA)\n"
      "  --filetype=TYPE       Set output file type "
      "BMP/EMF/EPS/GIF/PCX/PNG/SVG/TIF/TXT\n"
      "  --fullmultibyte       Use multibyte for binary/Latin (QR/Han Xin/Grid "
      "Matrix)\n"
      "  --gs1                 Treat input as GS1 compatible data\n"
      "  --gs1nocheck          Do not check validity of GS1 data\n"
      "  --gs1parens           Process parentheses \"()\" as GS1 AI "
      "delimiters, not \"[]\"\n"
      "  --gssep               Use separator GS for GS1 (Data Matrix)\n"
      "  -h, --help            Display help message\n"
      "  --height=NUMBER       Set height of symbol in multiples of "
      "X-dimension\n"
      "  -i, --input=FILE      Read input data from FILE\n"
      "  --init                Create reader initialisation/programming "
      "symbol\n"
      "  --mask=NUMBER         Set masking pattern to use (QR/Han "
      "Xin/DotCode)\n"
      "  --mirror              Use batch data to determine filename\n"
      "  --mode=NUMBER         Set encoding mode (MaxiCode/Composite)\n"
      "  --nobackground        Remove background (EMF/EPS/GIF/PNG/SVG/TIF "
      "only)\n"
      "  --notext              Remove human readable text\n"
      "  -o, --output=FILE     Send output to FILE. Default is out.png\n"
      "  --primary=STRING      Set structured primary message "
      "(MaxiCode/Composite)\n"
      "  -r, --reverse         Reverse colours (white on black)\n"
      "  --rotate=NUMBER       Rotate symbol by NUMBER degrees\n"
      "  --rows=NUMBER         Set number of rows (Codablock-F)\n"
      "  --scale=NUMBER        Adjust size of X-dimension\n"
      "  --scmvv=NUMBER        Prefix SCM with \"[)>\\R01\\Gvv\" (vv is "
      "NUMBER) (MaxiCode)\n"
      "  --secure=NUMBER       Set error correction level (ECC)\n"
      "  --separator=NUMBER    Set height of row separator bars (stacked "
      "symbologies)\n"
      "  --small               Use small text\n"
      "  --square              Force Data Matrix symbols to be square\n"
      "  -t, --types           Display table of barcode types\n"
      "  --vers=NUMBER         Set symbol version (size, check digits, other "
      "options)\n"
      "  --vwhitesp=NUMBER     Set height of vertical whitespace in multiples "
      "of X-dim\n"
      "  -w, --whitesp=NUMBER  Set width of horizontal whitespace in multiples "
      "of X-dim\n"
      "  --werror              Convert all warnings into errors\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1030 <ZBarcode_Version@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2710,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2710,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
cmpl   $0x9,-0x10(%rbp)
jl     11ac <usage+0x8c>
mov    -0x10(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
lea    0xe60(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11c3 <usage+0xa3>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xe64(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe6d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
xor    %eax,%eax
call   1040 <ZBarcode_Version@plt>
movslq %eax,%r8
imul   $0x68db8bad,%r8,%rsi
mov    %rsi,%rax
shr    $0x3f,%rax
sar    $0x2c,%rsi
add    %eax,%esi
imul   $0x2710,%esi,%eax
mov    %r8d,%ecx
sub    %eax,%ecx
movswl %cx,%eax
imul   $0x147b,%eax,%edx
mov    %edx,%eax
shr    $0x1f,%eax
sar    $0x13,%edx
add    %eax,%edx
imul   $0x51eb851f,%r8,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x25,%rax
add    %ecx,%eax
imul   $0x64,%eax,%eax
mov    %r8d,%ecx
sub    %eax,%ecx
cmp    $0x9,%ecx
jl     11c6 <usage+0x96>
movzbl %cl,%eax
imul   $0xcd,%eax,%ecx
shr    $0xb,%ecx
imul   $0x66666667,%r8,%rax
mov    %rax,%rdi
shr    $0x3f,%rdi
sar    $0x22,%rax
add    %edi,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%r8d
lea    0xe43(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    11d4 <usage+0xa4>
lea    0xe53(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe5c(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"Zint version %d.%d.%d.%d (dev)\0A\00"
@.str.1 = [23 x i8] c"Zint version %d.%d.%d\0A\00"
@.str.2 = [3412 x i8] c"Encode input data in a barcode and save as BMP/EMF/EPS/GIF/PCX/PNG/SVG/TIF/TXT\0A\0A -b, --barcode=TYPE Number or name of barcode type. Default is 20 (CODE128)\0A --addongap=NUMBER Set add-on gap in multiples of X-dimension for UPC/EAN\0A --batch Treat each line of input file as a separate data set\0A --bg=COLOUR Specify a background colour (in hex RGB/RGBA)\0A --binary Treat input as raw binary data\0A --bind Add boundary bars\0A --bold Use bold text\0A --border=NUMBER Set width of border in multiples of X-dimension\0A --box Add a box around the symbol\0A --cmyk Use CMYK colour space in EPS/TIF symbols\0A --cols=NUMBER Set the number of data columns in symbol\0A -d, --data=DATA Set the symbol content\0A --direct Send output to stdout\0A --dmre Allow Data Matrix Rectangular Extended\0A --dotsize=NUMBER Set radius of dots in dotty mode\0A --dotty Use dots instead of squares for matrix symbols\0A --dump Dump hexadecimal representation to stdout\0A -e, --ecinos Display table of ECI character encodings\0A --eci=NUMBER Set the ECI (Extended Channel Interpretation) code\0A --esc Process escape characters in input data\0A --fg=COLOUR Specify a foreground colour (in hex RGB/RGBA)\0A --filetype=TYPE Set output file type BMP/EMF/EPS/GIF/PCX/PNG/SVG/TIF/TXT\0A --fullmultibyte Use multibyte for binary/Latin (QR/Han Xin/Grid Matrix)\0A --gs1 Treat input as GS1 compatible data\0A --gs1nocheck Do not check validity of GS1 data\0A --gs1parens Process parentheses \22()\22 as GS1 AI delimiters, not \22[]\22\0A --gssep Use separator GS for GS1 (Data Matrix)\0A -h, --help Display help message\0A --height=NUMBER Set height of symbol in multiples of X-dimension\0A -i, --input=FILE Read input data from FILE\0A --init Create reader initialisation/programming symbol\0A --mask=NUMBER Set masking pattern to use (QR/Han Xin/DotCode)\0A --mirror Use batch data to determine filename\0A --mode=NUMBER Set encoding mode (MaxiCode/Composite)\0A --nobackground Remove background (EMF/EPS/GIF/PNG/SVG/TIF only)\0A --notext Remove human readable text\0A -o, --output=FILE Send output to FILE. Default is out.png\0A --primary=STRING Set structured primary message (MaxiCode/Composite)\0A -r, --reverse Reverse colours (white on black)\0A --rotate=NUMBER Rotate symbol by NUMBER degrees\0A --rows=NUMBER Set number of rows (Codablock-F)\0A --scale=NUMBER Adjust size of X-dimension\0A --scmvv=NUMBER Prefix SCM with \22[)>\\R01\\Gvv\22 (vv is NUMBER) (MaxiCode)\0A --secure=NUMBER Set error correction level (ECC)\0A --separator=NUMBER Set height of row separator bars (stacked symbologies)\0A --small Use small text\0A --square Force Data Matrix symbols to be square\0A -t, --types Display table of barcode types\0A --vers=NUMBER Set symbol version (size, check digits, other options)\0A --vwhitesp=NUMBER Set height of vertical whitespace in multiples of X-dim\0A -w, --whitesp=NUMBER Set width of horizontal whitespace in multiples of X-dim\0A --werror Convert all warnings into errors\0A\00"
define void @usage() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = call i32 (...) @ZBarcode_Version()
store i32 %6, i32* %1
%7 = load i32, i32* %1
%8 = sdiv i32 %7, 10000
store i32 %8, i32* %2
%9 = load i32, i32* %1
%10 = srem i32 %9, 10000
%11 = sdiv i32 %10, 100
store i32 %11, i32* %3
%12 = load i32, i32* %1
%13 = srem i32 %12, 100
store i32 %13, i32* %4
%14 = load i32, i32* %4
%15 = icmp sge i32 %14, 9
br i1 %15, label %16, label %26
16: ; preds = %0
%17 = load i32, i32* %4
%18 = sdiv i32 %17, 10
store i32 %18, i32* %4
%19 = load i32, i32* %1
%20 = srem i32 %19, 10
store i32 %20, i32* %5
%21 = load i32, i32* %2
%22 = load i32, i32* %3
%23 = load i32, i32* %4
%24 = load i32, i32* %5
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %21, i32 %22, i32 %23, i32 %24)
br label %31
26: ; preds = %0
%27 = load i32, i32* %2
%28 = load i32, i32* %3
%29 = load i32, i32* %4
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %27, i32 %28, i32 %29)
br label %31
31: ; preds = %26, %16
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3412 x i8], [3412 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"Zint version %d.%d.%d.%d (dev)\0A\00"
@.str.1 = [23 x i8] c"Zint version %d.%d.%d\0A\00"
@str = [3411 x i8] c"Encode input data in a barcode and save as BMP/EMF/EPS/GIF/PCX/PNG/SVG/TIF/TXT\0A\0A -b, --barcode=TYPE Number or name of barcode type. Default is 20 (CODE128)\0A --addongap=NUMBER Set add-on gap in multiples of X-dimension for UPC/EAN\0A --batch Treat each line of input file as a separate data set\0A --bg=COLOUR Specify a background colour (in hex RGB/RGBA)\0A --binary Treat input as raw binary data\0A --bind Add boundary bars\0A --bold Use bold text\0A --border=NUMBER Set width of border in multiples of X-dimension\0A --box Add a box around the symbol\0A --cmyk Use CMYK colour space in EPS/TIF symbols\0A --cols=NUMBER Set the number of data columns in symbol\0A -d, --data=DATA Set the symbol content\0A --direct Send output to stdout\0A --dmre Allow Data Matrix Rectangular Extended\0A --dotsize=NUMBER Set radius of dots in dotty mode\0A --dotty Use dots instead of squares for matrix symbols\0A --dump Dump hexadecimal representation to stdout\0A -e, --ecinos Display table of ECI character encodings\0A --eci=NUMBER Set the ECI (Extended Channel Interpretation) code\0A --esc Process escape characters in input data\0A --fg=COLOUR Specify a foreground colour (in hex RGB/RGBA)\0A --filetype=TYPE Set output file type BMP/EMF/EPS/GIF/PCX/PNG/SVG/TIF/TXT\0A --fullmultibyte Use multibyte for binary/Latin (QR/Han Xin/Grid Matrix)\0A --gs1 Treat input as GS1 compatible data\0A --gs1nocheck Do not check validity of GS1 data\0A --gs1parens Process parentheses \22()\22 as GS1 AI delimiters, not \22[]\22\0A --gssep Use separator GS for GS1 (Data Matrix)\0A -h, --help Display help message\0A --height=NUMBER Set height of symbol in multiples of X-dimension\0A -i, --input=FILE Read input data from FILE\0A --init Create reader initialisation/programming symbol\0A --mask=NUMBER Set masking pattern to use (QR/Han Xin/DotCode)\0A --mirror Use batch data to determine filename\0A --mode=NUMBER Set encoding mode (MaxiCode/Composite)\0A --nobackground Remove background (EMF/EPS/GIF/PNG/SVG/TIF only)\0A --notext Remove human readable text\0A -o, --output=FILE Send output to FILE. Default is out.png\0A --primary=STRING Set structured primary message (MaxiCode/Composite)\0A -r, --reverse Reverse colours (white on black)\0A --rotate=NUMBER Rotate symbol by NUMBER degrees\0A --rows=NUMBER Set number of rows (Codablock-F)\0A --scale=NUMBER Adjust size of X-dimension\0A --scmvv=NUMBER Prefix SCM with \22[)>\\R01\\Gvv\22 (vv is NUMBER) (MaxiCode)\0A --secure=NUMBER Set error correction level (ECC)\0A --separator=NUMBER Set height of row separator bars (stacked symbologies)\0A --small Use small text\0A --square Force Data Matrix symbols to be square\0A -t, --types Display table of barcode types\0A --vers=NUMBER Set symbol version (size, check digits, other options)\0A --vwhitesp=NUMBER Set height of vertical whitespace in multiples of X-dim\0A -w, --whitesp=NUMBER Set width of horizontal whitespace in multiples of X-dim\0A --werror Convert all warnings into errors\00"
define void @usage() {
%1 = tail call i32 (...) @ZBarcode_Version()
%2 = sdiv i32 %1, 10000
%3 = srem i32 %1, 10000
%4 = trunc i32 %3 to i16
%5 = sdiv i16 %4, 100
%6 = sext i16 %5 to i32
%7 = srem i32 %1, 100
%8 = icmp sgt i32 %7, 8
br i1 %8, label %9, label %15
9: ; preds = %0
%10 = trunc i32 %7 to i8
%11 = udiv i8 %10, 10
%12 = zext i8 %11 to i32
%13 = srem i32 %1, 10
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %6, i32 %12, i32 %13)
br label %17
15: ; preds = %0
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %2, i32 %6, i32 %7)
br label %17
17: ; preds = %15, %9
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3411 x i8], [3411 x i8]* @str, i64 0, i64 0))
ret void
}