#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void info() {
  printf("Usage: xy2ij [options] -g <grid file> -o <point file>\n");
  printf("Where:\n");
  printf(
      "  <grid file> -- text file with node coordinates (see remarks below)\n");
  printf("    (use \"stdin\" or \"-\" for standard input)\n");
  printf("  <point file> -- text file with coordinates to be converted (first "
         "two\n");
  printf("    columns used as point coordinates) (use \"stdin\" or \"-\" for "
         "standard input)\n");
  printf("Options:\n");
  printf("  -f -- do not exit with error for points outside grid\n");
  printf("  -i <node type> -- input node type\n");
  printf("  -r -- Make convertion from index to physical space\n");
  printf("  -v -- Verbose / version\n");
  printf("Node types:\n");
  printf("  DD -- double density nodes (default) \n");
  printf("  CO -- cell corner nodes\n");
  printf("Description:\n");
  printf("  `xy2ij' reads grid nodes from a file. After that, it reads points "
         "from\n");
  printf("   standard input, converts them from (X,Y) to (I,J) space or vice "
         "versa,\n");
  printf("   and writes results to the standard output.\n");
  printf("Remarks:\n");
  printf("  1. The input file must contain header describing the node array "
         "dimension:\n");
  printf("     ## <nx> x <ny>\n");
  printf("     where for double density nodes nx = nce1 * 2 + 1, ny = nce2 * 2 "
         "+ 1;\n");
  printf("     for corner nodes  nx = nce1 + 1, ny = nce2 + 1; and for center "
         "nodes\n");
  printf("     nx = nce1, ny = nce2.\n");
  printf("  2. After the header, the grid file must contain (nx * ny) lines "
         "with X and\n");
  printf("     Y node coordinates.\n");
  printf("  3. An empty or commented line in the input grid file as well as "
         "NaNs for\n");
  printf("     node coordinates indicate an invalid node.\n");
  printf("  4. A grid cell is valid if all corner nodes are valid (not NaNs). "
         "Only\n");
  printf("     points in valid cells may be converted between physical and "
         "index\n");
  printf("     space.\n");
  printf("  5. The grid (union of all valid grid cells) must be simply "
         "connected both in\n");
  printf("     physical and index space.\n");
  exit(0);
}


x86 assembly (clang, -O0):
<info>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf00(%rip),%rdi
call   1030 <printf@plt>
lea    0xefc(%rip),%rdi
call   1030 <printf@plt>
lea    0xf36(%rip),%rdi
call   1030 <printf@plt>
lea    0xf57(%rip),%rdi
call   1030 <printf@plt>
lea    0xf94(%rip),%rdi
call   1030 <printf@plt>
lea    0xfd8(%rip),%rdi
call   1030 <printf@plt>
lea    0xfd6(%rip),%rdi
call   1030 <printf@plt>
lea    0x1002(%rip),%rdi
call   1030 <printf@plt>
lea    0x101b(%rip),%rdi
call   1030 <printf@plt>
lea    0x1045(%rip),%rdi
call   1030 <printf@plt>
lea    0x1054(%rip),%rdi
call   1030 <printf@plt>
lea    0x1055(%rip),%rdi
call   1030 <printf@plt>
lea    0x1072(%rip),%rdi
call   1030 <printf@plt>
lea    0x1081(%rip),%rdi
call   1030 <printf@plt>
lea    0x1083(%rip),%rdi
call   1030 <printf@plt>
lea    0x10c1(%rip),%rdi
call   1030 <printf@plt>
lea    0x1100(%rip),%rdi
call   1030 <printf@plt>
lea    0x1123(%rip),%rdi
call   1030 <printf@plt>
lea    0x1121(%rip),%rdi
call   1030 <printf@plt>
lea    0x1163(%rip),%rdi
call   1030 <printf@plt>
lea    0x116c(%rip),%rdi
call   1030 <printf@plt>
lea    0x11ab(%rip),%rdi
call   1030 <printf@plt>
lea    0x11ea(%rip),%rdi
call   1030 <printf@plt>
lea    0x11fa(%rip),%rdi
call   1030 <printf@plt>
lea    0x123c(%rip),%rdi
call   1030 <printf@plt>
lea    0x124a(%rip),%rdi
call   1030 <printf@plt>
lea    0x128a(%rip),%rdi
call   1030 <printf@plt>
lea    0x12af(%rip),%rdi
call   1030 <printf@plt>
lea    0x12ed(%rip),%rdi
call   1030 <printf@plt>
lea    0x1329(%rip),%rdi
call   1030 <printf@plt>
lea    0x132a(%rip),%rdi
call   1030 <printf@plt>
lea    0x136e(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<info>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf02(%rip),%rdi
call   1030 <puts@plt>
lea    0xefd(%rip),%rdi
call   1030 <puts@plt>
lea    0xf36(%rip),%rdi
call   1030 <puts@plt>
lea    0xf56(%rip),%rdi
call   1030 <puts@plt>
lea    0xf92(%rip),%rdi
call   1030 <puts@plt>
lea    0xfd5(%rip),%rdi
call   1030 <puts@plt>
lea    0xfd2(%rip),%rdi
call   1030 <puts@plt>
lea    0xffd(%rip),%rdi
call   1030 <puts@plt>
lea    0x1015(%rip),%rdi
call   1030 <puts@plt>
lea    0x103e(%rip),%rdi
call   1030 <puts@plt>
lea    0x104c(%rip),%rdi
call   1030 <puts@plt>
lea    0x104c(%rip),%rdi
call   1030 <puts@plt>
lea    0x1068(%rip),%rdi
call   1030 <puts@plt>
lea    0x1076(%rip),%rdi
call   1030 <puts@plt>
lea    0x1077(%rip),%rdi
call   1030 <puts@plt>
lea    0x10b4(%rip),%rdi
call   1030 <puts@plt>
lea    0x10f2(%rip),%rdi
call   1030 <puts@plt>
lea    0x1114(%rip),%rdi
call   1030 <puts@plt>
lea    0x1111(%rip),%rdi
call   1030 <puts@plt>
lea    0x1152(%rip),%rdi
call   1030 <puts@plt>
lea    0x115a(%rip),%rdi
call   1030 <puts@plt>
lea    0x1198(%rip),%rdi
call   1030 <puts@plt>
lea    0x11d6(%rip),%rdi
call   1030 <puts@plt>
lea    0x11e5(%rip),%rdi
call   1030 <puts@plt>
lea    0x1226(%rip),%rdi
call   1030 <puts@plt>
lea    0x1233(%rip),%rdi
call   1030 <puts@plt>
lea    0x1272(%rip),%rdi
call   1030 <puts@plt>
lea    0x1296(%rip),%rdi
call   1030 <puts@plt>
lea    0x12d3(%rip),%rdi
call   1030 <puts@plt>
lea    0x130e(%rip),%rdi
call   1030 <puts@plt>
lea    0x130e(%rip),%rdi
call   1030 <puts@plt>
lea    0x1351(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [55 x i8] c"Usage: xy2ij [options] -g <grid file> -o <point file>\0A\00"
@.str.1 = [8 x i8] c"Where:\0A\00"
@.str.2 = [70 x i8] c" <grid file> -- text file with node coordinates (see remarks below)\0A\00"
@.str.3 = [45 x i8] c" (use \22stdin\22 or \22-\22 for standard input)\0A\00"
@.str.4 = [73 x i8] c" <point file> -- text file with coordinates to be converted (first two\0A\00"
@.str.5 = [80 x i8] c" columns used as point coordinates) (use \22stdin\22 or \22-\22 for standard input)\0A\00"
@.str.6 = [10 x i8] c"Options:\0A\00"
@.str.7 = [56 x i8] c" -f -- do not exit with error for points outside grid\0A\00"
@.str.8 = [37 x i8] c" -i <node type> -- input node type\0A\00"
@.str.9 = [54 x i8] c" -r -- Make convertion from index to physical space\0A\00"
@.str.10 = [27 x i8] c" -v -- Verbose / version\0A\00"
@.str.11 = [13 x i8] c"Node types:\0A\00"
@.str.12 = [41 x i8] c" DD -- double density nodes (default) \0A\00"
@.str.13 = [27 x i8] c" CO -- cell corner nodes\0A\00"
@.str.14 = [14 x i8] c"Description:\0A\00"
@.str.15 = [74 x i8] c" `xy2ij' reads grid nodes from a file. After that, it reads points from\0A\00"
@.str.16 = [75 x i8] c" standard input, converts them from (X,Y) to (I,J) space or vice versa,\0A\00"
@.str.17 = [47 x i8] c" and writes results to the standard output.\0A\00"
@.str.18 = [10 x i8] c"Remarks:\0A\00"
@.str.19 = [78 x i8] c" 1. The input file must contain header describing the node array dimension:\0A\00"
@.str.20 = [21 x i8] c" ## <nx> x <ny>\0A\00"
@.str.21 = [75 x i8] c" where for double density nodes nx = nce1 * 2 + 1, ny = nce2 * 2 + 1;\0A\00"
@.str.22 = [75 x i8] c" for corner nodes nx = nce1 + 1, ny = nce2 + 1; and for center nodes\0A\00"
@.str.23 = [28 x i8] c" nx = nce1, ny = nce2.\0A\00"
@.str.24 = [78 x i8] c" 2. After the header, the grid file must contain (nx * ny) lines with X and\0A\00"
@.str.25 = [26 x i8] c" Y node coordinates.\0A\00"
@.str.26 = [76 x i8] c" 3. An empty or commented line in the input grid file as well as NaNs for\0A\00"
@.str.27 = [49 x i8] c" node coordinates indicate an invalid node.\0A\00"
@.str.28 = [74 x i8] c" 4. A grid cell is valid if all corner nodes are valid (not NaNs). Only\0A\00"
@.str.29 = [72 x i8] c" points in valid cells may be converted between physical and index\0A\00"
@.str.30 = [13 x i8] c" space.\0A\00"
@.str.31 = [80 x i8] c" 5. The grid (union of all valid grid cells) must be simply connected both in\0A\00"
@.str.32 = [32 x i8] c" physical and index space.\0A\00"
define void @info() {
%1 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.12, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.13, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.15, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.16, i64 0, i64 0))
%18 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.17, i64 0, i64 0))
%19 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0))
%20 = call i32 @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.19, i64 0, i64 0))
%21 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.20, i64 0, i64 0))
%22 = call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.21, i64 0, i64 0))
%23 = call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.22, i64 0, i64 0))
%24 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.23, i64 0, i64 0))
%25 = call i32 @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.24, i64 0, i64 0))
%26 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.25, i64 0, i64 0))
%27 = call i32 @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.26, i64 0, i64 0))
%28 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.27, i64 0, i64 0))
%29 = call i32 @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.28, i64 0, i64 0))
%30 = call i32 @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.29, i64 0, i64 0))
%31 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.30, i64 0, i64 0))
%32 = call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.31, i64 0, i64 0))
%33 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.32, i64 0, i64 0))
%34 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [54 x i8] c"Usage: xy2ij [options] -g <grid file> -o <point file>\00"
@str.33 = [7 x i8] c"Where:\00"
@str.34 = [69 x i8] c" <grid file> -- text file with node coordinates (see remarks below)\00"
@str.35 = [44 x i8] c" (use \22stdin\22 or \22-\22 for standard input)\00"
@str.36 = [72 x i8] c" <point file> -- text file with coordinates to be converted (first two\00"
@str.37 = [79 x i8] c" columns used as point coordinates) (use \22stdin\22 or \22-\22 for standard input)\00"
@str.38 = [9 x i8] c"Options:\00"
@str.39 = [55 x i8] c" -f -- do not exit with error for points outside grid\00"
@str.40 = [36 x i8] c" -i <node type> -- input node type\00"
@str.41 = [53 x i8] c" -r -- Make convertion from index to physical space\00"
@str.42 = [26 x i8] c" -v -- Verbose / version\00"
@str.43 = [12 x i8] c"Node types:\00"
@str.44 = [40 x i8] c" DD -- double density nodes (default) \00"
@str.45 = [26 x i8] c" CO -- cell corner nodes\00"
@str.46 = [13 x i8] c"Description:\00"
@str.47 = [73 x i8] c" `xy2ij' reads grid nodes from a file. After that, it reads points from\00"
@str.48 = [74 x i8] c" standard input, converts them from (X,Y) to (I,J) space or vice versa,\00"
@str.49 = [46 x i8] c" and writes results to the standard output.\00"
@str.50 = [9 x i8] c"Remarks:\00"
@str.51 = [77 x i8] c" 1. The input file must contain header describing the node array dimension:\00"
@str.52 = [20 x i8] c" ## <nx> x <ny>\00"
@str.53 = [74 x i8] c" where for double density nodes nx = nce1 * 2 + 1, ny = nce2 * 2 + 1;\00"
@str.54 = [74 x i8] c" for corner nodes nx = nce1 + 1, ny = nce2 + 1; and for center nodes\00"
@str.55 = [27 x i8] c" nx = nce1, ny = nce2.\00"
@str.56 = [77 x i8] c" 2. After the header, the grid file must contain (nx * ny) lines with X and\00"
@str.57 = [25 x i8] c" Y node coordinates.\00"
@str.58 = [75 x i8] c" 3. An empty or commented line in the input grid file as well as NaNs for\00"
@str.59 = [48 x i8] c" node coordinates indicate an invalid node.\00"
@str.60 = [73 x i8] c" 4. A grid cell is valid if all corner nodes are valid (not NaNs). Only\00"
@str.61 = [71 x i8] c" points in valid cells may be converted between physical and index\00"
@str.62 = [12 x i8] c" space.\00"
@str.63 = [79 x i8] c" 5. The grid (union of all valid grid cells) must be simply connected both in\00"
@str.64 = [31 x i8] c" physical and index space.\00"
define void @info() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.33, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @str.34, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.35, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @str.36, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @str.37, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.38, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.39, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.40, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.41, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.42, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.43, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.44, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.45, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.46, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str.47, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @str.48, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.49, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.50, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([77 x i8], [77 x i8]* @str.51, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.52, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @str.53, i64 0, i64 0))
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @str.54, i64 0, i64 0))
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.55, i64 0, i64 0))
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([77 x i8], [77 x i8]* @str.56, i64 0, i64 0))
%26 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.57, i64 0, i64 0))
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([75 x i8], [75 x i8]* @str.58, i64 0, i64 0))
%28 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.59, i64 0, i64 0))
%29 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str.60, i64 0, i64 0))
%30 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.61, i64 0, i64 0))
%31 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.62, i64 0, i64 0))
%32 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @str.63, i64 0, i64 0))
%33 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.64, i64 0, i64 0))
%34 = tail call i32 @exit(i32 0)
unreachable
}