#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.6 $", "%*s %s", revision);
  fprintf(stderr,
          "\nSynchronet Ctrl-A-Code to ANSI-Terminal-Sequence Conversion "
          "Utility v%s\n",
          revision);
  fprintf(stderr, "\nusage: %s infile.asc [outfile.ans] [[option] [...]]\n",
          prog);
  fprintf(stderr, "\noptions:\n\n");
  fprintf(stderr, "-strip            strip Ctrl-A codes without ANSI "
                  "equivalent, e.g. pause, delay\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>
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>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [17 x i8] c"$Revision: 1.6 $\00"
@.str.1 = [7 x i8] c"%*s %s\00"
@stderr = global i32 0
@.str.2 = [74 x i8] c"\0ASynchronet Ctrl-A-Code to ANSI-Terminal-Sequence Conversion Utility v%s\0A\00"
@.str.3 = [54 x i8] c"\0Ausage: %s infile.asc [outfile.ans] [[option] [...]]\0A\00"
@.str.4 = [12 x i8] c"\0Aoptions:\0A\0A\00"
@.str.5 = [81 x i8] c"-strip strip Ctrl-A codes without ANSI equivalent, e.g. pause, delay\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 ([81 x i8], [81 x i8]* @.str.5, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"$Revision: 1.6 $\00"
@.str.1 = [7 x i8] c"%*s %s\00"
@stderr = global i32 0
@.str.2 = [74 x i8] c"\0ASynchronet Ctrl-A-Code to ANSI-Terminal-Sequence Conversion Utility v%s\0A\00"
@.str.3 = [54 x i8] c"\0Ausage: %s infile.asc [outfile.ans] [[option] [...]]\0A\00"
@.str.4 = [12 x i8] c"\0Aoptions:\0A\0A\00"
@.str.5 = [81 x i8] c"-strip strip Ctrl-A codes without ANSI equivalent, e.g. pause, delay\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 ([81 x i8], [81 x i8]* @.str.5, i64 0, i64 0))
ret void
}