#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 catsort_help() {
  char line[1000];
  fprintf(stderr, "\nUsage: catsort [posfile] [catfile] [outfile] ");
  fprintf(stderr, "[calcmethod] ([format])\n\n");
  fprintf(stderr, "  catfile is the file containing the catalog\n");
  fprintf(stderr, "  posfile is the file containing the RA, Dec of the");
  fprintf(stderr, " central object.\n");
  fprintf(stderr, "   Format: id RA_hr RA_min RA_sec Dec_deg Dec_min");
  fprintf(stderr, " Dec_sec\n");
  fprintf(stderr, "  calcmethod sets the method for calculating the offsets.");
  fprintf(stderr, "\n");
  fprintf(stderr, "    For calcmethod = xy distances are based on");
  fprintf(stderr, " (x,y) coordinates.\n");
  fprintf(stderr, "    For calcmethod = radec distances are based on");
  fprintf(stderr, " (RA,Dec) coordinates.\n\n");
  fprintf(stderr, " The optional format flag indicates the format of the");
  fprintf(stderr, " input file:\n");
  fprintf(stderr, "Hit return to see the format options: ");
  fgets(line, 1000, stdin);
  secat_format();
}


x86 assembly (clang, -O0):
<catsort_help>:
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    0xecf(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2e6c(%rip),%rax
mov    (%rax),%edi
lea    0xed4(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2e57(%rip),%rax
mov    (%rax),%edi
lea    0xeed(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2e42(%rip),%rax
mov    (%rax),%edi
lea    0xf0c(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2e2d(%rip),%rax
mov    (%rax),%edi
lea    0xf09(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2e18(%rip),%rax
mov    (%rax),%edi
lea    0xf26(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2e03(%rip),%rax
mov    (%rax),%edi
lea    0xf1b(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2dee(%rip),%rax
mov    (%rax),%edi
lea    0xe54(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2dd9(%rip),%rax
mov    (%rax),%edi
lea    0xf2b(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2dc4(%rip),%rax
mov    (%rax),%edi
lea    0xf45(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2daf(%rip),%rax
mov    (%rax),%edi
lea    0xf45(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2d9a(%rip),%rax
mov    (%rax),%edi
lea    0xf62(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2d85(%rip),%rax
mov    (%rax),%edi
lea    0xf66(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2d70(%rip),%rax
mov    (%rax),%edi
lea    0xf87(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2d5b(%rip),%rax
mov    (%rax),%edi
lea    0xf80(%rip),%rsi
call   1050 <fprintf@plt>
lea    -0x3f0(%rbp),%rdi
mov    0x2d4f(%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):
<catsort_help>:
push   %rbx
sub    $0x3f0,%rsp
mov    0x2e99(%rip),%rbx
mov    (%rbx),%edi
lea    0xeb8(%rip),%rsi
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xed9(%rip),%rsi
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xee5(%rip),%rsi
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf05(%rip),%rsi
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf2b(%rip),%rsi
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf2f(%rip),%rsi
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf53(%rip),%rsi
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf4f(%rip),%rsi
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xe8f(%rip),%rsi
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf6d(%rip),%rsi
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf8e(%rip),%rsi
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf95(%rip),%rsi
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfb9(%rip),%rsi
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfc4(%rip),%rsi
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfec(%rip),%rsi
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfec(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2dc2(%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 = [47 x i8] c"\0AUsage: catsort [posfile] [catfile] [outfile] \00"
@.str.1 = [26 x i8] c"[calcmethod] ([format])\0A\0A\00"
@.str.2 = [46 x i8] c" catfile is the file containing the catalog\0A\00"
@.str.3 = [52 x i8] c" posfile is the file containing the RA, Dec of the\00"
@.str.4 = [18 x i8] c" central object.\0A\00"
@.str.5 = [50 x i8] c" Format: id RA_hr RA_min RA_sec Dec_deg Dec_min\00"
@.str.6 = [10 x i8] c" Dec_sec\0A\00"
@.str.7 = [58 x i8] c" calcmethod sets the method for calculating the offsets.\00"
@.str.8 = [2 x i8] c"\0A\00"
@.str.9 = [47 x i8] c" For calcmethod = xy distances are based on\00"
@.str.10 = [21 x i8] c" (x,y) coordinates.\0A\00"
@.str.11 = [50 x i8] c" For calcmethod = radec distances are based on\00"
@.str.12 = [25 x i8] c" (RA,Dec) coordinates.\0A\0A\00"
@.str.13 = [54 x i8] c" The optional format flag indicates the format of the\00"
@.str.14 = [14 x i8] c" input file:\0A\00"
@.str.15 = [39 x i8] c"Hit return to see the format options: \00"
@stdin = global i32 0
define void @catsort_help() {
%1 = alloca [1000 x i8]
%2 = load i32, i32* @stderr
%3 = call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stderr
%5 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0))
%8 = load i32, i32* @stderr
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.3, i64 0, i64 0))
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
%12 = load i32, i32* @stderr
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.5, i64 0, i64 0))
%14 = load i32, i32* @stderr
%15 = call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%16 = load i32, i32* @stderr
%17 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.7, i64 0, i64 0))
%18 = load i32, i32* @stderr
%19 = call i32 @fprintf(i32 %18, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%20 = load i32, i32* @stderr
%21 = call i32 @fprintf(i32 %20, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.9, i64 0, i64 0))
%22 = load i32, i32* @stderr
%23 = call i32 @fprintf(i32 %22, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.10, i64 0, i64 0))
%24 = load i32, i32* @stderr
%25 = call i32 @fprintf(i32 %24, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.11, i64 0, i64 0))
%26 = load i32, i32* @stderr
%27 = call i32 @fprintf(i32 %26, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.12, i64 0, i64 0))
%28 = load i32, i32* @stderr
%29 = call i32 @fprintf(i32 %28, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.13, i64 0, i64 0))
%30 = load i32, i32* @stderr
%31 = call i32 @fprintf(i32 %30, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0))
%32 = load i32, i32* @stderr
%33 = call i32 @fprintf(i32 %32, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.15, i64 0, i64 0))
%34 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%35 = load i32, i32* @stdin
%36 = call i32 @fgets(i8* %34, i32 1000, i32 %35)
%37 = call i32 (...) @secat_format()
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [47 x i8] c"\0AUsage: catsort [posfile] [catfile] [outfile] \00"
@.str.1 = [26 x i8] c"[calcmethod] ([format])\0A\0A\00"
@.str.2 = [46 x i8] c" catfile is the file containing the catalog\0A\00"
@.str.3 = [52 x i8] c" posfile is the file containing the RA, Dec of the\00"
@.str.4 = [18 x i8] c" central object.\0A\00"
@.str.5 = [50 x i8] c" Format: id RA_hr RA_min RA_sec Dec_deg Dec_min\00"
@.str.6 = [10 x i8] c" Dec_sec\0A\00"
@.str.7 = [58 x i8] c" calcmethod sets the method for calculating the offsets.\00"
@.str.8 = [2 x i8] c"\0A\00"
@.str.9 = [47 x i8] c" For calcmethod = xy distances are based on\00"
@.str.10 = [21 x i8] c" (x,y) coordinates.\0A\00"
@.str.11 = [50 x i8] c" For calcmethod = radec distances are based on\00"
@.str.12 = [25 x i8] c" (RA,Dec) coordinates.\0A\0A\00"
@.str.13 = [54 x i8] c" The optional format flag indicates the format of the\00"
@.str.14 = [14 x i8] c" input file:\0A\00"
@.str.15 = [39 x i8] c"Hit return to see the format options: \00"
@stdin = global i32 0
define void @catsort_help() {
%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 ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0))
%9 = load i32, i32* @stderr
%10 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.3, i64 0, i64 0))
%11 = load i32, i32* @stderr
%12 = tail call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
%13 = load i32, i32* @stderr
%14 = tail call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.5, i64 0, i64 0))
%15 = load i32, i32* @stderr
%16 = tail call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%17 = load i32, i32* @stderr
%18 = tail call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.7, i64 0, i64 0))
%19 = load i32, i32* @stderr
%20 = tail call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%21 = load i32, i32* @stderr
%22 = tail call i32 @fprintf(i32 %21, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.9, i64 0, i64 0))
%23 = load i32, i32* @stderr
%24 = tail call i32 @fprintf(i32 %23, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.10, i64 0, i64 0))
%25 = load i32, i32* @stderr
%26 = tail call i32 @fprintf(i32 %25, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.11, i64 0, i64 0))
%27 = load i32, i32* @stderr
%28 = tail call i32 @fprintf(i32 %27, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.12, i64 0, i64 0))
%29 = load i32, i32* @stderr
%30 = tail call i32 @fprintf(i32 %29, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.13, i64 0, i64 0))
%31 = load i32, i32* @stderr
%32 = tail call i32 @fprintf(i32 %31, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0))
%33 = load i32, i32* @stderr
%34 = tail call i32 @fprintf(i32 %33, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.15, i64 0, i64 0))
%35 = load i32, i32* @stdin
%36 = call i32 @fgets(i8* %2, i32 1000, i32 %35)
%37 = call i32 (...) @secat_format()
ret void
}