#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*/ stack_printf(char *);
void print_usage() {
  stack_printf("---------- Rapid Stack ----------\n");
  stack_printf("-script [SCRIPT]  Script used for loading image files\n");
  stack_printf("                  Default is to read images in pnm format.\n");
  stack_printf(
      "                  Script must output image in pnm format to stdout.\n");
  stack_printf("                  Insert %%s for the file name of the image in "
               "the script.\n");
  stack_printf("                  ie. -script \"dcraw -a -4 -c %%s\"\n\n");
  stack_printf("-lights      [PATH...] Paths to light frames\n");
  stack_printf("-darks       [PATH...] Paths to dark frames\n");
  stack_printf("-flats       [PATH...] Paths to flat frames\n");
  stack_printf("-dark-flats  [PATH...] Paths to dark flat frames\n");
  stack_printf("-group                 Beginning of new calibration group\n");
  stack_printf(
      "-ref                   Marks next light frame as the reference\n\n");
  stack_printf("Algorithm options MEAN, MEDIAN (default is MEAN)\n");
  stack_printf("-lights-algo     [ALGO]    Sets the algorithm to stack all "
               "light frames\n");
  stack_printf("-darks-algo      [ALGO]    Sets the algorithm to stack all "
               "dark frames\n");
  stack_printf("-flats-algo      [ALGO]    Sets the algorithm to stack all "
               "flat frames\n");
  stack_printf("-dark-flats-algo [ALGO]    Sets the algorithm to stack all "
               "dark flat frames\n\n");
  stack_printf("-search-bound          [0.0-N]       Sets error tolerance for "
               "star match search (default 5.0)\n");
  stack_printf("-nstars              [3-500]       Sets number of stars to be "
               "used in alignment (default 100)\n");
  stack_printf("-nmatches            [3-500]       Sets number of matches to "
               "be used in alignment (default 15)\n");
  stack_printf("-detection-percentile  [0.95-0.999]  Sets star detection "
               "threshold (default 0.99)\n\n");
  stack_printf("-no-temps                   All images are stored in memory "
               "and no temporary files are created\n");
  stack_printf(
      "-output  [FILE]              Path of output file (default is stdout)\n");
  stack_printf(
      "-quiet                      No output is written other than errors\n");
  stack_printf("-threads [NUM of THREADS]   Number of threads to use (default "
               "is number of CPU cores)\n");
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0xefc(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0xf27(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0xf57(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0xf90(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0xfd0(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0xff9(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x101b(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x103c(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x105d(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x1083(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x10b2(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x10e7(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x110d(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x114a(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x1186(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x11c2(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x1204(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x1257(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x12aa(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x12fe(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x1346(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x139a(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x13d4(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x140c(%rip),%rdi
call   1030 <stack_printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0xeff(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0xf2a(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0xf5a(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0xf93(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0xfd3(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0xffc(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x101e(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x103f(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x1060(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x1086(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x10b5(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x10ea(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x1110(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x114d(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x1189(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x11c5(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x1207(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x125a(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x12ad(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x1301(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x1349(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x139d(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x13d7(%rip),%rdi
call   1030 <stack_printf@plt>
lea    0x140f(%rip),%rdi
pop    %rax
jmp    1030 <stack_printf@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"---------- Rapid Stack ----------\0A\00"
@.str.1 = [55 x i8] c"-script [SCRIPT] Script used for loading image files\0A\00"
@.str.2 = [60 x i8] c" Default is to read images in pnm format.\0A\00"
@.str.3 = [69 x i8] c" Script must output image in pnm format to stdout.\0A\00"
@.str.4 = [76 x i8] c" Insert %%s for the file name of the image in the script.\0A\00"
@.str.5 = [53 x i8] c" ie. -script \22dcraw -a -4 -c %%s\22\0A\0A\00"
@.str.6 = [46 x i8] c"-lights [PATH...] Paths to light frames\0A\00"
@.str.7 = [45 x i8] c"-darks [PATH...] Paths to dark frames\0A\00"
@.str.8 = [45 x i8] c"-flats [PATH...] Paths to flat frames\0A\00"
@.str.9 = [50 x i8] c"-dark-flats [PATH...] Paths to dark flat frames\0A\00"
@.str.10 = [59 x i8] c"-group Beginning of new calibration group\0A\00"
@.str.11 = [65 x i8] c"-ref Marks next light frame as the reference\0A\0A\00"
@.str.12 = [50 x i8] c"Algorithm options MEAN, MEDIAN (default is MEAN)\0A\00"
@.str.13 = [73 x i8] c"-lights-algo [ALGO] Sets the algorithm to stack all light frames\0A\00"
@.str.14 = [72 x i8] c"-darks-algo [ALGO] Sets the algorithm to stack all dark frames\0A\00"
@.str.15 = [72 x i8] c"-flats-algo [ALGO] Sets the algorithm to stack all flat frames\0A\00"
@.str.16 = [78 x i8] c"-dark-flats-algo [ALGO] Sets the algorithm to stack all dark flat frames\0A\0A\00"
@.str.17 = [95 x i8] c"-search-bound [0.0-N] Sets error tolerance for star match search (default 5.0)\0A\00"
@.str.18 = [95 x i8] c"-nstars [3-500] Sets number of stars to be used in alignment (default 100)\0A\00"
@.str.19 = [96 x i8] c"-nmatches [3-500] Sets number of matches to be used in alignment (default 15)\0A\00"
@.str.20 = [84 x i8] c"-detection-percentile [0.95-0.999] Sets star detection threshold (default 0.99)\0A\0A\00"
@.str.21 = [96 x i8] c"-no-temps All images are stored in memory and no temporary files are created\0A\00"
@.str.22 = [70 x i8] c"-output [FILE] Path of output file (default is stdout)\0A\00"
@.str.23 = [68 x i8] c"-quiet No output is written other than errors\0A\00"
@.str.24 = [87 x i8] c"-threads [NUM of THREADS] Number of threads to use (default is number of CPU cores)\0A\00"
define void @print_usage() {
%1 = call i32 @stack_printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @stack_printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @stack_printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @stack_printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @stack_printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @stack_printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @stack_printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @stack_printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @stack_printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @stack_printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 @stack_printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 @stack_printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.11, i64 0, i64 0))
%13 = call i32 @stack_printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.12, i64 0, i64 0))
%14 = call i32 @stack_printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.13, i64 0, i64 0))
%15 = call i32 @stack_printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.14, i64 0, i64 0))
%16 = call i32 @stack_printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.15, i64 0, i64 0))
%17 = call i32 @stack_printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.16, i64 0, i64 0))
%18 = call i32 @stack_printf(i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str.17, i64 0, i64 0))
%19 = call i32 @stack_printf(i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str.18, i64 0, i64 0))
%20 = call i32 @stack_printf(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str.19, i64 0, i64 0))
%21 = call i32 @stack_printf(i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str.20, i64 0, i64 0))
%22 = call i32 @stack_printf(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str.21, i64 0, i64 0))
%23 = call i32 @stack_printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.22, i64 0, i64 0))
%24 = call i32 @stack_printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.23, i64 0, i64 0))
%25 = call i32 @stack_printf(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str.24, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"---------- Rapid Stack ----------\0A\00"
@.str.1 = [55 x i8] c"-script [SCRIPT] Script used for loading image files\0A\00"
@.str.2 = [60 x i8] c" Default is to read images in pnm format.\0A\00"
@.str.3 = [69 x i8] c" Script must output image in pnm format to stdout.\0A\00"
@.str.4 = [76 x i8] c" Insert %%s for the file name of the image in the script.\0A\00"
@.str.5 = [53 x i8] c" ie. -script \22dcraw -a -4 -c %%s\22\0A\0A\00"
@.str.6 = [46 x i8] c"-lights [PATH...] Paths to light frames\0A\00"
@.str.7 = [45 x i8] c"-darks [PATH...] Paths to dark frames\0A\00"
@.str.8 = [45 x i8] c"-flats [PATH...] Paths to flat frames\0A\00"
@.str.9 = [50 x i8] c"-dark-flats [PATH...] Paths to dark flat frames\0A\00"
@.str.10 = [59 x i8] c"-group Beginning of new calibration group\0A\00"
@.str.11 = [65 x i8] c"-ref Marks next light frame as the reference\0A\0A\00"
@.str.12 = [50 x i8] c"Algorithm options MEAN, MEDIAN (default is MEAN)\0A\00"
@.str.13 = [73 x i8] c"-lights-algo [ALGO] Sets the algorithm to stack all light frames\0A\00"
@.str.14 = [72 x i8] c"-darks-algo [ALGO] Sets the algorithm to stack all dark frames\0A\00"
@.str.15 = [72 x i8] c"-flats-algo [ALGO] Sets the algorithm to stack all flat frames\0A\00"
@.str.16 = [78 x i8] c"-dark-flats-algo [ALGO] Sets the algorithm to stack all dark flat frames\0A\0A\00"
@.str.17 = [95 x i8] c"-search-bound [0.0-N] Sets error tolerance for star match search (default 5.0)\0A\00"
@.str.18 = [95 x i8] c"-nstars [3-500] Sets number of stars to be used in alignment (default 100)\0A\00"
@.str.19 = [96 x i8] c"-nmatches [3-500] Sets number of matches to be used in alignment (default 15)\0A\00"
@.str.20 = [84 x i8] c"-detection-percentile [0.95-0.999] Sets star detection threshold (default 0.99)\0A\0A\00"
@.str.21 = [96 x i8] c"-no-temps All images are stored in memory and no temporary files are created\0A\00"
@.str.22 = [70 x i8] c"-output [FILE] Path of output file (default is stdout)\0A\00"
@.str.23 = [68 x i8] c"-quiet No output is written other than errors\0A\00"
@.str.24 = [87 x i8] c"-threads [NUM of THREADS] Number of threads to use (default is number of CPU cores)\0A\00"
define void @print_usage() {
%1 = tail call i32 @stack_printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @stack_printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @stack_printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @stack_printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @stack_printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 @stack_printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.5, i64 0, i64 0))
%7 = tail call i32 @stack_printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.6, i64 0, i64 0))
%8 = tail call i32 @stack_printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.7, i64 0, i64 0))
%9 = tail call i32 @stack_printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.8, i64 0, i64 0))
%10 = tail call i32 @stack_printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.9, i64 0, i64 0))
%11 = tail call i32 @stack_printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.10, i64 0, i64 0))
%12 = tail call i32 @stack_printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.11, i64 0, i64 0))
%13 = tail call i32 @stack_printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.12, i64 0, i64 0))
%14 = tail call i32 @stack_printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.13, i64 0, i64 0))
%15 = tail call i32 @stack_printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.14, i64 0, i64 0))
%16 = tail call i32 @stack_printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.15, i64 0, i64 0))
%17 = tail call i32 @stack_printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.16, i64 0, i64 0))
%18 = tail call i32 @stack_printf(i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str.17, i64 0, i64 0))
%19 = tail call i32 @stack_printf(i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str.18, i64 0, i64 0))
%20 = tail call i32 @stack_printf(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str.19, i64 0, i64 0))
%21 = tail call i32 @stack_printf(i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str.20, i64 0, i64 0))
%22 = tail call i32 @stack_printf(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str.21, i64 0, i64 0))
%23 = tail call i32 @stack_printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.22, i64 0, i64 0))
%24 = tail call i32 @stack_printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.23, i64 0, i64 0))
%25 = tail call i32 @stack_printf(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str.24, i64 0, i64 0))
ret void
}