#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*/ sscanf(char *, char *, char *);
int /*<<< orphan*/ stderr;
void print_usage(const char *prog) {
  char revision[16];
  sscanf("$Revision: 1.9 $", "%*s %s", revision);
  fprintf(stderr,
          "\nSynchronet ANSI-Terminal-Sequence to Ctrl-A-Code Conversion "
          "Utility v%s\n",
          revision);
  fprintf(stderr, "\nusage: %s infile.ans [outfile.asc] [[option] [...]]\n",
          prog);
  fprintf(stderr, "\noptions:\n\n");
  fprintf(stderr, "-clear            insert a clear screen code at beginning "
                  "of output file\n");
  fprintf(stderr, "-pause            append a pause (hit a key) code to end of "
                  "output file\n");
  fprintf(stderr, "-delay <interval> insert a 1/10th second delay code at "
                  "output byte interval\n");
  fprintf(stderr, "                  (lower interval values result in more "
                  "delays, slower display)\n");
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x20(%rbp),%rdx
lea    0xec9(%rip),%rdi
lea    0xed3(%rip),%rsi
call   1040 <sscanf@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
lea    -0x20(%rbp),%rdx
lea    0xec1(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xef0(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e60(%rip),%rax
mov    (%rax),%edi
lea    0xf0f(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e49(%rip),%rax
mov    (%rax),%edi
lea    0xf04(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e32(%rip),%rax
mov    (%rax),%edi
lea    0xf37(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e1b(%rip),%rax
mov    (%rax),%edi
lea    0xf69(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e04(%rip),%rax
mov    (%rax),%edi
lea    0xf9f(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%r15
lea    0xecd(%rip),%rdi
lea    0xed7(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdx
call   1040 <sscanf@plt>
mov    0x2e94(%rip),%rbx
mov    (%rbx),%edi
lea    0xec3(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xefa(%rip),%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf1d(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf19(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf53(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf8c(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfc9(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [17 x i8] c"$Revision: 1.9 $\00"
@.str.1 = [7 x i8] c"%*s %s\00"
@stderr = global i32 0
@.str.2 = [74 x i8] c"\0ASynchronet ANSI-Terminal-Sequence to Ctrl-A-Code Conversion Utility v%s\0A\00"
@.str.3 = [54 x i8] c"\0Ausage: %s infile.ans [outfile.asc] [[option] [...]]\0A\00"
@.str.4 = [12 x i8] c"\0Aoptions:\0A\0A\00"
@.str.5 = [74 x i8] c"-clear insert a clear screen code at beginning of output file\0A\00"
@.str.6 = [73 x i8] c"-pause append a pause (hit a key) code to end of output file\0A\00"
@.str.7 = [77 x i8] c"-delay <interval> insert a 1/10th second delay code at output byte interval\0A\00"
@.str.8 = [81 x i8] c" (lower interval values result in more delays, slower display)\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
%3 = alloca [16 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%5 = call i32 @sscanf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%8 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.2, i64 0, i64 0), i8* %7)
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %2
%11 = call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.3, i64 0, i64 0), i8* %10)
%12 = load i32, i32* @stderr
%13 = call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
%14 = load i32, i32* @stderr
%15 = call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.5, i64 0, i64 0))
%16 = load i32, i32* @stderr
%17 = call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.6, i64 0, i64 0))
%18 = load i32, i32* @stderr
%19 = call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.7, i64 0, i64 0))
%20 = load i32, i32* @stderr
%21 = call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.8, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"$Revision: 1.9 $\00"
@.str.1 = [7 x i8] c"%*s %s\00"
@stderr = global i32 0
@.str.2 = [74 x i8] c"\0ASynchronet ANSI-Terminal-Sequence to Ctrl-A-Code Conversion Utility v%s\0A\00"
@.str.3 = [54 x i8] c"\0Ausage: %s infile.ans [outfile.asc] [[option] [...]]\0A\00"
@.str.4 = [12 x i8] c"\0Aoptions:\0A\0A\00"
@.str.5 = [74 x i8] c"-clear insert a clear screen code at beginning of output file\0A\00"
@.str.6 = [73 x i8] c"-pause append a pause (hit a key) code to end of output file\0A\00"
@.str.7 = [77 x i8] c"-delay <interval> insert a 1/10th second delay code at output byte interval\0A\00"
@.str.8 = [81 x i8] c" (lower interval values result in more delays, slower display)\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca [16 x i8]
%3 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%4 = call i32 @sscanf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @stderr
%6 = call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.2, i64 0, i64 0), i8* %3)
%7 = load i32, i32* @stderr
%8 = call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.3, i64 0, i64 0), i8* %0)
%9 = load i32, i32* @stderr
%10 = call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
%11 = load i32, i32* @stderr
%12 = call i32 (i32, i8*, ...) @fprintf(i32 %11, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.5, i64 0, i64 0))
%13 = load i32, i32* @stderr
%14 = call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.6, i64 0, i64 0))
%15 = load i32, i32* @stderr
%16 = call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.7, i64 0, i64 0))
%17 = load i32, i32* @stderr
%18 = call i32 (i32, i8*, ...) @fprintf(i32 %17, i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.8, i64 0, i64 0))
ret void
}