#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*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ secat_format();
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdin;
void help_catcompare() {
  char line[1000];
  fprintf(stderr, "\nUsage: \n");
  fprintf(stderr, "  catcompare [catfile1] [format1] ... [catfileN] ");
  fprintf(stderr, "[formatN]\n\n");
  fprintf(stderr, " At least 2 input catalogs are required\n\n");
  fprintf(stderr, "The format flags indicate the formats of the input ");
  fprintf(stderr, "catalogs.\n");
  fprintf(stderr, "Hit return to see format options: ");
  fgets(line, 1000, stdin);
  secat_format();
}


x86 assembly (clang, -O0):
<help_catcompare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
lea    0xeb5(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
lea    0xeaa(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2e6c(%rip),%rax
mov    (%rax),%edi
lea    0xec7(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2e57(%rip),%rax
mov    (%rax),%edi
lea    0xebe(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2e42(%rip),%rax
mov    (%rax),%edi
lea    0xed3(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2e2d(%rip),%rax
mov    (%rax),%edi
lea    0xef2(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2e18(%rip),%rax
mov    (%rax),%edi
lea    0xee8(%rip),%rsi
call   1050 <fprintf@plt>
lea    -0x3f0(%rbp),%rdi
mov    0x2e0c(%rip),%rax
mov    (%rax),%edx
mov    $0x3e8,%esi
call   1040 <fgets@plt>
mov    $0x0,%al
call   1030 <secat_format@plt>
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help_catcompare>:
push   %rbx
sub    $0x3f0,%rsp
mov    0x2e99(%rip),%rbx
mov    (%rbx),%edi
lea    0xeb8(%rip),%rsi
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xeb4(%rip),%rsi
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xed8(%rip),%rsi
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xed6(%rip),%rsi
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xef2(%rip),%rsi
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf18(%rip),%rsi
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf15(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2e40(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1040 <fgets@plt>
xor    %eax,%eax
call   1030 <secat_format@plt>
add    $0x3f0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [10 x i8] c"\0AUsage: \0A\00"
@.str.1 = [50 x i8] c" catcompare [catfile1] [format1] ... [catfileN] \00"
@.str.2 = [12 x i8] c"[formatN]\0A\0A\00"
@.str.3 = [42 x i8] c" At least 2 input catalogs are required\0A\0A\00"
@.str.4 = [52 x i8] c"The format flags indicate the formats of the input \00"
@.str.5 = [11 x i8] c"catalogs.\0A\00"
@.str.6 = [35 x i8] c"Hit return to see format options: \00"
@stdin = global i32 0
define void @help_catcompare() {
%1 = alloca [1000 x i8]
%2 = load i32, i32* @stderr
%3 = call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stderr
%5 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%8 = load i32, i32* @stderr
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0))
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.4, i64 0, i64 0))
%12 = load i32, i32* @stderr
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%14 = load i32, i32* @stderr
%15 = call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0))
%16 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%17 = load i32, i32* @stdin
%18 = call i32 @fgets(i8* %16, i32 1000, i32 %17)
%19 = call i32 (...) @secat_format()
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [10 x i8] c"\0AUsage: \0A\00"
@.str.1 = [50 x i8] c" catcompare [catfile1] [format1] ... [catfileN] \00"
@.str.2 = [12 x i8] c"[formatN]\0A\0A\00"
@.str.3 = [42 x i8] c" At least 2 input catalogs are required\0A\0A\00"
@.str.4 = [52 x i8] c"The format flags indicate the formats of the input \00"
@.str.5 = [11 x i8] c"catalogs.\0A\00"
@.str.6 = [35 x i8] c"Hit return to see format options: \00"
@stdin = global i32 0
define void @help_catcompare() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%9 = load i32, i32* @stderr
%10 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0))
%11 = load i32, i32* @stderr
%12 = tail call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.4, i64 0, i64 0))
%13 = load i32, i32* @stderr
%14 = tail call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%15 = load i32, i32* @stderr
%16 = tail call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0))
%17 = load i32, i32* @stdin
%18 = call i32 @fgets(i8* %2, i32 1000, i32 %17)
%19 = call i32 (...) @secat_format()
ret void
}