#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*/, int,
                           int /*<<< orphan*/, char const *, char const *,
                           char const *, char const *, char const *,
                           char const *, char const *, char const *);
int /*<<< orphan*/ stderr;
void print_usage(const char *progname) {
  fprintf(
      stderr,
      "ReInk v%d.%d.%d (http://reink.lerlan.ru)\nBasic usage is:\n    - to get "
      "current ink levels (as done by escputil):\n	%s -i -r "
      "printer_raw_device\n\n    - to dump data from EEPROM\n	%s -d "
      "<addr>[-<addr>] -r printer_raw_device\n	<addr> - two-byte address of "
      "EEPROM to read\n	Two addresses recognized as range.\n	Example: %s -d "
      "0000-A000 -r /dev/usb/lp0\n\n    - to write to arbitary EEPROM address "
      "(CAUTION: THIS MAY DAMAGE YOUR PRINTER!)\n	%s -w <addr>=<data> -r "
      "printer_raw_device\n	Writes <data> to <addr>\n	Example: %s -w "
      "0006=00 -r /dev/usb/lp0\n\n    - to reset ink level for ink type "
      "ink_type:\n	%s -z[ink_type] -r printer_raw_device\n	<ink_type> - "
      "is the number of ink how it print by -i\n        if <ink_type> is "
      "omitted, then - reset all known inks\n	Example: %s -z1 -r "
      "/dev/usb/lp0\n\n    - to reset waste ink counter:\n	%s -s -r "
      "printer_raw_device\n\n    - to make an test report, containing some "
      "information about your printer\n	./reink -t -r printer_raw_device > "
      "testreport.log\n\n    You can set REINK_DEBUG environment variable to "
      "enable debug  output to\n stderr.\n REINK_DEBUG=0 - no debug;\n "
      "REINK_DEBUG=1 - debug only reink.c;\n REINK_DEBUG=2 - debug reink.c and "
      "d4lib.c also.\n",
      0, 6, 0, progname, progname, progname, progname, progname, progname,
      progname, progname);
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x40,%rsp
mov    %rdi,-0x28(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%r9
mov    -0x28(%rbp),%r12
mov    -0x28(%rbp),%r15
mov    -0x28(%rbp),%r14
mov    -0x28(%rbp),%rbx
mov    -0x28(%rbp),%r11
mov    -0x28(%rbp),%r10
mov    -0x28(%rbp),%rax
lea    0xead(%rip),%rsi
xor    %r8d,%r8d
mov    $0x6,%ecx
mov    %r8d,%edx
mov    %r12,(%rsp)
mov    %r15,0x8(%rsp)
mov    %r14,0x10(%rsp)
mov    %rbx,0x18(%rsp)
mov    %r11,0x20(%rsp)
mov    %r10,0x28(%rsp)
mov    %rax,0x30(%rsp)
call   1030 <fprintf@plt>
add    $0x40,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
mov    %rdi,%r9
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
sub    $0x8,%rsp
lea    0xed8(%rip),%rsi
xor    %edx,%edx
mov    $0x6,%ecx
xor    %r8d,%r8d
push   %r9
push   %r9
push   %r9
push   %r9
push   %r9
push   %r9
push   %r9
call   1030 <fprintf@plt>
add    $0x40,%rsp
pop    %rax
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [1163 x i8] c"ReInk v%d.%d.%d (http://reink.lerlan.ru)\0ABasic usage is:\0A - to get current ink levels (as done by escputil):\0A\09%s -i -r printer_raw_device\0A\0A - to dump data from EEPROM\0A\09%s -d <addr>[-<addr>] -r printer_raw_device\0A\09<addr> - two-byte address of EEPROM to read\0A\09Two addresses recognized as range.\0A\09Example: %s -d 0000-A000 -r /dev/usb/lp0\0A\0A - to write to arbitary EEPROM address (CAUTION: THIS MAY DAMAGE YOUR PRINTER!)\0A\09%s -w <addr>=<data> -r printer_raw_device\0A\09Writes <data> to <addr>\0A\09Example: %s -w 0006=00 -r /dev/usb/lp0\0A\0A - to reset ink level for ink type ink_type:\0A\09%s -z[ink_type] -r printer_raw_device\0A\09<ink_type> - is the number of ink how it print by -i\0A if <ink_type> is omitted, then - reset all known inks\0A\09Example: %s -z1 -r /dev/usb/lp0\0A\0A - to reset waste ink counter:\0A\09%s -s -r printer_raw_device\0A\0A - to make an test report, containing some information about your printer\0A\09./reink -t -r printer_raw_device > testreport.log\0A\0A You can set REINK_DEBUG environment variable to enable debug output to\0A stderr.\0A REINK_DEBUG=0 - no debug;\0A REINK_DEBUG=1 - debug only reink.c;\0A REINK_DEBUG=2 - debug reink.c and d4lib.c also.\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = load i8*, i8** %2
%7 = load i8*, i8** %2
%8 = load i8*, i8** %2
%9 = load i8*, i8** %2
%10 = load i8*, i8** %2
%11 = load i8*, i8** %2
%12 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([1163 x i8], [1163 x i8]* @.str, i64 0, i64 0), i32 0, i32 6, i32 0, i8* %4, i8* %5, i8* %6, i8* %7, i8* %8, i8* %9, i8* %10, i8* %11)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [1163 x i8] c"ReInk v%d.%d.%d (http://reink.lerlan.ru)\0ABasic usage is:\0A - to get current ink levels (as done by escputil):\0A\09%s -i -r printer_raw_device\0A\0A - to dump data from EEPROM\0A\09%s -d <addr>[-<addr>] -r printer_raw_device\0A\09<addr> - two-byte address of EEPROM to read\0A\09Two addresses recognized as range.\0A\09Example: %s -d 0000-A000 -r /dev/usb/lp0\0A\0A - to write to arbitary EEPROM address (CAUTION: THIS MAY DAMAGE YOUR PRINTER!)\0A\09%s -w <addr>=<data> -r printer_raw_device\0A\09Writes <data> to <addr>\0A\09Example: %s -w 0006=00 -r /dev/usb/lp0\0A\0A - to reset ink level for ink type ink_type:\0A\09%s -z[ink_type] -r printer_raw_device\0A\09<ink_type> - is the number of ink how it print by -i\0A if <ink_type> is omitted, then - reset all known inks\0A\09Example: %s -z1 -r /dev/usb/lp0\0A\0A - to reset waste ink counter:\0A\09%s -s -r printer_raw_device\0A\0A - to make an test report, containing some information about your printer\0A\09./reink -t -r printer_raw_device > testreport.log\0A\0A You can set REINK_DEBUG environment variable to enable debug output to\0A stderr.\0A REINK_DEBUG=0 - no debug;\0A REINK_DEBUG=1 - debug only reink.c;\0A REINK_DEBUG=2 - debug reink.c and d4lib.c also.\0A\00"
define void @print_usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([1163 x i8], [1163 x i8]* @.str, i64 0, i64 0), i32 0, i32 6, i32 0, i8* %0, i8* %0, i8* %0, i8* %0, i8* %0, i8* %0, i8* %0, i8* %0)
ret void
}