// File: tomfunkhouser[P]gaps/apps/grd2grd/grd2grd.cpp
// Function: ParseArgs(int, char**)
static int 
ParseArgs(int argc, char **argv)
{
  // Check number of arguments
  if (argc < 2) {
    printf("Usage: grd2grd inputfile outputfile [-v]\n");
    exit(0);
  }

  // Parse arguments
  argc--; argv++;
  while (argc > 0) {
    if ((*argv)[0] == '-') {
      if (!strcmp(*argv, "-v")) {
        print_verbose = 1; 
      }
      else if (!strcmp(*argv, "-debug")) {
        print_debug = 1; 
      }
      else if (!strcmp(*argv, "-abs")) {
        assert(noperations < max_operations);
        Operation *operation = &operations[noperations++];
        operation->type = ABS_OPERATION;
      }
      else if (!strcmp(*argv, "-square")) {
        assert(noperations < max_operations);
        Operation *operation = &operations[noperations++];
        operation->type = SQUARE_OPERATION;
      }
      else if (!strcmp(*argv, "-sqrt")) {
        assert(noperations < max_operations);
        Operation *operation = &operations[noperations++];
        operation->type = SQRT_OPERATION;
      }
      else if (!strcmp(*argv, "-negate")) {
        assert(noperations < max_operations);
        Operation *operation = &operations[noperations++];
        operation->type = NEGATE_OPERATION;
      }
      else if (!strcmp(*argv, "-invert")) {
        assert(noperations < max_operations);
        Operation *operation = &operations[noperations++];
        operation->type = INVERT_OPERATION;
      }
      else if (!strcmp(*argv, "-gradient_magnitude")) {
        assert(noperations < max_operations);
        Operation *operation = &operations[noperations++];
        operation->type = GRADIENT_MAGNITUDE_OPERATION;
      }
      else if (!strcmp(*argv, "-normalize")) {
        assert(noperations < max_operations);
        Operation *operation = &operations[noperations++];
        operation->type = NORMALIZE_OPERATION;
      }
      else if (!strcmp(*argv, "-edge_detect")) {
        assert(noperations < max_operations);
        Operation *operation = &operations[noperations++];
        operation->type = EDGE_DETECT_OPERATION;
      }
      else if (!strcmp(*argv, "-signed_distance")) {
        assert(noperations < max_operations);
        Operation *operation = &operations[noperations++];
        operation->type = SIGNED_DISTANCE_OPERATION;
      }
      else if (!strcmp(*argv, "-squared_distance")) {
        assert(noperations < max_operations);
        Operation *operation = &operations[noperations++];
        operation->type = SQUARED_DISTANCE_OPERATION;
      }
      else if (!strcmp(*argv, "-voronoi")) {
        assert(noperations < max_operations);
        Operation *operation = &operations[noperations++];
        operation->type = VORONOI_OPERATION;
      }
      else if (!strcmp(*argv, "-fill_holes")) {
        assert(noperations < max_operations);
        Operation *operation = &operations[noperations++];
        operation->type = FILL_HOLES_OPERATION;
      }
      else if (!strcmp(*argv, "-clear")) {
        assert(noperations < max_operations);
        Operation *operation = &operations[noperations++];
        operation->type = CLEAR_OPERATION;
        argc--; argv++; operation->operand1 = *argv; 
      }
      else if (!strcmp(*argv, "-add")) {
        assert(noperations < max_operations);
        Operation *operation = &operations[noperations++];
        operation->type = ADD_OPERATION;
        argc--; argv++; operation->operand1 = *argv; 
      }
      else if (!strcmp(*argv, "-subtract")) {
        assert(noperations < max_operations);
        Operation *operation = &operations[noperations++];
        operation->type = SUBTRACT_OPERATION;
        argc--; argv++; operation->operand1 = *argv; 
      }
      else if (!strcmp(*argv, "-multiply")) {
        assert(noperations < max_operations);
        Operation *operation = &operations[noperations++];
        operation->type = MULTIPLY_OPERATION;
        argc--; argv++; operation->operand1 = *argv; 
      }
      else if (!strcmp(*argv, "-divide")) {
        assert(noperations < max_operations);
        Operation *operation = &operations[noperations++];
        operation->type = DIVIDE_OPERATION;
        argc--; argv++; operation->operand1 = *argv; 
      }
      else if (!strcmp(*argv, "-pow")) {
        assert(noperations < max_operations);
        Operation *operation = &operations[noperations++];
        operation->type = POW_OPERATION;
        argc--; argv++; operation->operand1 = *argv; 
      }
      else if (!strcmp(*argv, "-dilate")) {
        assert(noperations < max_operations);
        Operation *operation = &operations[noperations++];
        operation->type = DILATE_OPERATION;
        argc--; argv++; operation->operand1 = *argv; 
      }
      else if (!strcmp(*argv, "-erode")) {
        assert(noperations < max_operations);
        Operation *operation = &operations[noperations++];
        operation->type = ERODE_OPERATION;
        argc--; argv++; operation->operand1 = *argv; 
      }
      else if (!strcmp(*argv, "-blur")) {
        assert(noperations < max_operations);
        Operation *operation = &operations[noperations++];
        operation->type = BLUR_OPERATION;
        argc--; argv++; operation->operand1 = *argv; 
      }
      else if (!strcmp(*argv, "-threshold")) {
        assert(noperations < max_operations);
        Operation *operation = &operations[noperations++];
        operation->type = THRESHOLD_OPERATION;
        argc--; argv++; operation->operand1 = *argv; 
        argc--; argv++; operation->operand2 = *argv; 
        argc--; argv++; operation->operand3 = *argv; 
      }
      else if (!strcmp(*argv, "-resample")) {
        assert(noperations < max_operations);
        Operation *operation = &operations[noperations++];
        operation->type = RESAMPLE_OPERATION;
        argc--; argv++; operation->operand1 = *argv; 
        argc--; argv++; operation->operand2 = *argv; 
        argc--; argv++; operation->operand3 = *argv; 
      }
      else if (!strcmp(*argv, "-add_grid")) {
        assert(noperations < max_operations);
        Operation *operation = &operations[noperations++];
        operation->type = ADD_GRID_OPERATION;
        argc--; argv++; operation->operand1 = *argv;
      }
      else if (!strcmp(*argv, "-subtract_grid")) {
        assert(noperations < max_operations);
        Operation *operation = &operations[noperations++];
        operation->type = SUBTRACT_GRID_OPERATION;
        argc--; argv++; operation->operand1 = *argv;
      }
      else if (!strcmp(*argv, "-multiply_grid")) {
        assert(noperations < max_operations);
        Operation *operation = &operations[noperations++];
        operation->type = MULTIPLY_GRID_OPERATION;
        argc--; argv++; operation->operand1 = *argv;
      }
      else if (!strcmp(*argv, "-divide_grid")) {
        assert(noperations < max_operations);
        Operation *operation = &operations[noperations++];
        operation->type = DIVIDE_GRID_OPERATION;
        argc--; argv++; operation->operand1 = *argv;
      }
      else if (!strcmp(*argv, "-mask_grid")) {
        assert(noperations < max_operations);
        Operation *operation = &operations[noperations++];
        operation->type = MASK_GRID_OPERATION;
        argc--; argv++; operation->operand1 = *argv;
      }
      else { 
        RNFail("Invalid program argument: %s", *argv); 
        exit(1); 
      }
    }
    else {
      if (!input_name) input_name = *argv;
      else if (!output_name) output_name = *argv;
      else { 
        RNFail("Invalid program argument: %s", *argv); 
        exit(1); 
      }
    }
    argv++; argc--;
  }

  // Check input filename
  if (!input_name) {
    RNFail("You did not specify an input file.\n");
    return 0;
  }

  // Check output filename
  if (!output_name) {
    RNFail("You did not specify an output file.\n");
    return 0;
  }

  // Return OK status 
  return 1;
}

// Assembly:
subq $0xf8, %rsp
movl %edi, 0xf0(%rsp)
movq %rsi, 0xe8(%rsp)
cmpl $0x2, 0xf0(%rsp)
jge 0x125a5
leaq 0x121ae1(%rip), %rdi    # 0x134078
movb $0x0, %al
callq 0xf070
xorl %edi, %edi
callq 0xf600
movl 0xf0(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xf0(%rsp)
movq 0xe8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0xe8(%rsp)
cmpl $0x0, 0xf0(%rsp)
jle 0x1350f
movq 0xe8(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x13482
movq 0xe8(%rsp), %rax
movq (%rax), %rdi
leaq 0x121aa1(%rip), %rsi    # 0x1340a2
callq 0xf700
cmpl $0x0, %eax
jne 0x1261a
movl $0x1, 0x167bdb(%rip)    # 0x17a1f0
jmp 0x13480
movq 0xe8(%rsp), %rax
movq (%rax), %rdi
leaq 0x121a79(%rip), %rsi    # 0x1340a5
callq 0xf700
cmpl $0x0, %eax
jne 0x12645
movl $0x1, 0x167bb4(%rip)    # 0x17a1f4
jmp 0x1347e
movq 0xe8(%rsp), %rax
movq (%rax), %rdi
leaq 0x121a55(%rip), %rsi    # 0x1340ac
callq 0xf700
cmpl $0x0, %eax
jne 0x1269e
movl 0x167b79(%rip), %eax    # 0x17a1e0
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x167b6e(%rip)    # 0x17a1e0
movslq %eax, %rcx
leaq 0x166ee4(%rip), %rax    # 0x179560
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0xe0(%rsp)
movq 0xe0(%rsp), %rax
movl $0x1, (%rax)
jmp 0x1347c
movq 0xe8(%rsp), %rax
movq (%rax), %rdi
leaq 0x121a01(%rip), %rsi    # 0x1340b1
callq 0xf700
cmpl $0x0, %eax
jne 0x126f7
movl 0x167b20(%rip), %eax    # 0x17a1e0
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x167b15(%rip)    # 0x17a1e0
movslq %eax, %rcx
leaq 0x166e8b(%rip), %rax    # 0x179560
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0xd8(%rsp)
movq 0xd8(%rsp), %rax
movl $0x2, (%rax)
jmp 0x1347a
movq 0xe8(%rsp), %rax
movq (%rax), %rdi
leaq 0x1219b0(%rip), %rsi    # 0x1340b9
callq 0xf700
cmpl $0x0, %eax
jne 0x12750
movl 0x167ac7(%rip), %eax    # 0x17a1e0
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x167abc(%rip)    # 0x17a1e0
movslq %eax, %rcx
leaq 0x166e32(%rip), %rax    # 0x179560
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0xd0(%rsp)
movq 0xd0(%rsp), %rax
movl $0x3, (%rax)
jmp 0x13478
movq 0xe8(%rsp), %rax
movq (%rax), %rdi
leaq 0x12195d(%rip), %rsi    # 0x1340bf
callq 0xf700
cmpl $0x0, %eax
jne 0x127a9
movl 0x167a6e(%rip), %eax    # 0x17a1e0
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x167a63(%rip)    # 0x17a1e0
movslq %eax, %rcx
leaq 0x166dd9(%rip), %rax    # 0x179560
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0xc8(%rsp)
movq 0xc8(%rsp), %rax
movl $0x4, (%rax)
jmp 0x13476
movq 0xe8(%rsp), %rax
movq (%rax), %rdi
leaq 0x12190c(%rip), %rsi    # 0x1340c7
callq 0xf700
cmpl $0x0, %eax
jne 0x12802
movl 0x167a15(%rip), %eax    # 0x17a1e0
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x167a0a(%rip)    # 0x17a1e0
movslq %eax, %rcx
leaq 0x166d80(%rip), %rax    # 0x179560
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
movl $0x5, (%rax)
jmp 0x13474
movq 0xe8(%rsp), %rax
movq (%rax), %rdi
leaq 0x1218bb(%rip), %rsi    # 0x1340cf
callq 0xf700
cmpl $0x0, %eax
jne 0x1285b
movl 0x1679bc(%rip), %eax    # 0x17a1e0
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x1679b1(%rip)    # 0x17a1e0
movslq %eax, %rcx
leaq 0x166d27(%rip), %rax    # 0x179560
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0xb8(%rsp)
movq 0xb8(%rsp), %rax
movl $0x6, (%rax)
jmp 0x13472
movq 0xe8(%rsp), %rax
movq (%rax), %rdi
leaq 0x121876(%rip), %rsi    # 0x1340e3
callq 0xf700
cmpl $0x0, %eax
jne 0x128b4
movl 0x167963(%rip), %eax    # 0x17a1e0
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x167958(%rip)    # 0x17a1e0
movslq %eax, %rcx
leaq 0x166cce(%rip), %rax    # 0x179560
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
movl $0x7, (%rax)
jmp 0x13470
movq 0xe8(%rsp), %rax
movq (%rax), %rdi
leaq 0x121828(%rip), %rsi    # 0x1340ee
callq 0xf700
cmpl $0x0, %eax
jne 0x1290d
movl 0x16790a(%rip), %eax    # 0x17a1e0
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x1678ff(%rip)    # 0x17a1e0
movslq %eax, %rcx
leaq 0x166c75(%rip), %rax    # 0x179560
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0xa8(%rsp)
movq 0xa8(%rsp), %rax
movl $0x8, (%rax)
jmp 0x1346e
movq 0xe8(%rsp), %rax
movq (%rax), %rdi
leaq 0x1217dc(%rip), %rsi    # 0x1340fb
callq 0xf700
cmpl $0x0, %eax
jne 0x12966
movl 0x1678b1(%rip), %eax    # 0x17a1e0
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x1678a6(%rip)    # 0x17a1e0
movslq %eax, %rcx
leaq 0x166c1c(%rip), %rax    # 0x179560
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rax
movl $0x9, (%rax)
jmp 0x1346c
movq 0xe8(%rsp), %rax
movq (%rax), %rdi
leaq 0x121794(%rip), %rsi    # 0x13410c
callq 0xf700
cmpl $0x0, %eax
jne 0x129bf
movl 0x167858(%rip), %eax    # 0x17a1e0
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x16784d(%rip)    # 0x17a1e0
movslq %eax, %rcx
leaq 0x166bc3(%rip), %rax    # 0x179560
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rax
movl $0xa, (%rax)
jmp 0x1346a
movq 0xe8(%rsp), %rax
movq (%rax), %rdi
leaq 0x12174d(%rip), %rsi    # 0x13411e
callq 0xf700
cmpl $0x0, %eax
jne 0x12a18
movl 0x1677ff(%rip), %eax    # 0x17a1e0
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x1677f4(%rip)    # 0x17a1e0
movslq %eax, %rcx
leaq 0x166b6a(%rip), %rax    # 0x179560
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0x90(%rsp)
movq 0x90(%rsp), %rax
movl $0xb, (%rax)
jmp 0x13468
movq 0xe8(%rsp), %rax
movq (%rax), %rdi
leaq 0x1216fd(%rip), %rsi    # 0x134127
callq 0xf700
cmpl $0x0, %eax
jne 0x12a71
movl 0x1677a6(%rip), %eax    # 0x17a1e0
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x16779b(%rip)    # 0x17a1e0
movslq %eax, %rcx
leaq 0x166b11(%rip), %rax    # 0x179560
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rax
movl $0xc, (%rax)
jmp 0x13466
movq 0xe8(%rsp), %rax
movq (%rax), %rdi
leaq 0x1216b0(%rip), %rsi    # 0x134133
callq 0xf700
cmpl $0x0, %eax
jne 0x12b06
movl 0x16774d(%rip), %eax    # 0x17a1e0
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x167742(%rip)    # 0x17a1e0
movslq %eax, %rcx
leaq 0x166ab8(%rip), %rax    # 0x179560
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rax
movl $0xd, (%rax)
movl 0xf0(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xf0(%rsp)
movq 0xe8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
movq (%rax), %rcx
movq 0x80(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x13464
movq 0xe8(%rsp), %rax
movq (%rax), %rdi
leaq 0x121622(%rip), %rsi    # 0x13413a
callq 0xf700
cmpl $0x0, %eax
jne 0x12b92
movl 0x1676b8(%rip), %eax    # 0x17a1e0
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x1676ad(%rip)    # 0x17a1e0
movslq %eax, %rcx
leaq 0x166a23(%rip), %rax    # 0x179560
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rax
movl $0xe, (%rax)
movl 0xf0(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xf0(%rsp)
movq 0xe8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
movq (%rax), %rcx
movq 0x78(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x13462
movq 0xe8(%rsp), %rax
movq (%rax), %rdi
leaq 0x12159b(%rip), %rsi    # 0x13413f
callq 0xf700
cmpl $0x0, %eax
jne 0x12c1e
movl 0x16762c(%rip), %eax    # 0x17a1e0
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x167621(%rip)    # 0x17a1e0
movslq %eax, %rcx
leaq 0x166997(%rip), %rax    # 0x179560
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rax
movl $0xf, (%rax)
movl 0xf0(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xf0(%rsp)
movq 0xe8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
movq (%rax), %rcx
movq 0x70(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x13460
movq 0xe8(%rsp), %rax
movq (%rax), %rdi
leaq 0x121519(%rip), %rsi    # 0x134149
callq 0xf700
cmpl $0x0, %eax
jne 0x12caa
movl 0x1675a0(%rip), %eax    # 0x17a1e0
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x167595(%rip)    # 0x17a1e0
movslq %eax, %rcx
leaq 0x16690b(%rip), %rax    # 0x179560
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rax
movl $0x10, (%rax)
movl 0xf0(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xf0(%rsp)
movq 0xe8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
movq (%rax), %rcx
movq 0x68(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x1345e
movq 0xe8(%rsp), %rax
movq (%rax), %rdi
leaq 0x121497(%rip), %rsi    # 0x134153
callq 0xf700
cmpl $0x0, %eax
jne 0x12d36
movl 0x167514(%rip), %eax    # 0x17a1e0
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x167509(%rip)    # 0x17a1e0
movslq %eax, %rcx
leaq 0x16687f(%rip), %rax    # 0x179560
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
movl $0x11, (%rax)
movl 0xf0(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xf0(%rsp)
movq 0xe8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
movq (%rax), %rcx
movq 0x60(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x1345c
movq 0xe8(%rsp), %rax
movq (%rax), %rdi
leaq 0x121413(%rip), %rsi    # 0x13415b
callq 0xf700
cmpl $0x0, %eax
jne 0x12dc2
movl 0x167488(%rip), %eax    # 0x17a1e0
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x16747d(%rip)    # 0x17a1e0
movslq %eax, %rcx
leaq 0x1667f3(%rip), %rax    # 0x179560
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
movl $0x12, (%rax)
movl 0xf0(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xf0(%rsp)
movq 0xe8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
movq (%rax), %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x1345a
movq 0xe8(%rsp), %rax
movq (%rax), %rdi
leaq 0x12138c(%rip), %rsi    # 0x134160
callq 0xf700
cmpl $0x0, %eax
jne 0x12e4e
movl 0x1673fc(%rip), %eax    # 0x17a1e0
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x1673f1(%rip)    # 0x17a1e0
movslq %eax, %rcx
leaq 0x166767(%rip), %rax    # 0x179560
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movl $0x13, (%rax)
movl 0xf0(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xf0(%rsp)
movq 0xe8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
movq (%rax), %rcx
movq 0x50(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x13458
movq 0xe8(%rsp), %rax
movq (%rax), %rdi
leaq 0x121308(%rip), %rsi    # 0x134168
callq 0xf700
cmpl $0x0, %eax
jne 0x12eda
movl 0x167370(%rip), %eax    # 0x17a1e0
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x167365(%rip)    # 0x17a1e0
movslq %eax, %rcx
leaq 0x1666db(%rip), %rax    # 0x179560
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
movl $0x14, (%rax)
movl 0xf0(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xf0(%rsp)
movq 0xe8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
movq (%rax), %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x13456
movq 0xe8(%rsp), %rax
movq (%rax), %rdi
leaq 0x121283(%rip), %rsi    # 0x13416f
callq 0xf700
cmpl $0x0, %eax
jne 0x12f66
movl 0x1672e4(%rip), %eax    # 0x17a1e0
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x1672d9(%rip)    # 0x17a1e0
movslq %eax, %rcx
leaq 0x16664f(%rip), %rax    # 0x179560
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movl $0x15, (%rax)
movl 0xf0(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xf0(%rsp)
movq 0xe8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
movq (%rax), %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x13454
movq 0xe8(%rsp), %rax
movq (%rax), %rdi
leaq 0x1211fd(%rip), %rsi    # 0x134175
callq 0xf700
cmpl $0x0, %eax
jne 0x13068
movl 0x167254(%rip), %eax    # 0x17a1e0
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x167249(%rip)    # 0x17a1e0
movslq %eax, %rcx
leaq 0x1665bf(%rip), %rax    # 0x179560
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
movl $0x16, (%rax)
movl 0xf0(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xf0(%rsp)
movq 0xe8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
movq (%rax), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x8(%rax)
movl 0xf0(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xf0(%rsp)
movq 0xe8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
movq (%rax), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x10(%rax)
movl 0xf0(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xf0(%rsp)
movq 0xe8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
movq (%rax), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x18(%rax)
jmp 0x13452
movq 0xe8(%rsp), %rax
movq (%rax), %rdi
leaq 0x121106(%rip), %rsi    # 0x134180
callq 0xf700
cmpl $0x0, %eax
jne 0x1316a
movl 0x167152(%rip), %eax    # 0x17a1e0
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x167147(%rip)    # 0x17a1e0
movslq %eax, %rcx
leaq 0x1664bd(%rip), %rax    # 0x179560
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movl $0x17, (%rax)
movl 0xf0(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xf0(%rsp)
movq 0xe8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
movq (%rax), %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x8(%rax)
movl 0xf0(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xf0(%rsp)
movq 0xe8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
movq (%rax), %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x10(%rax)
movl 0xf0(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xf0(%rsp)
movq 0xe8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
movq (%rax), %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x18(%rax)
jmp 0x13450
movq 0xe8(%rsp), %rax
movq (%rax), %rdi
leaq 0x12100e(%rip), %rsi    # 0x13418a
callq 0xf700
cmpl $0x0, %eax
jne 0x131f6
movl 0x167054(%rip), %eax    # 0x17a1e0
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x167049(%rip)    # 0x17a1e0
movslq %eax, %rcx
leaq 0x1663bf(%rip), %rax    # 0x179560
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movl $0x18, (%rax)
movl 0xf0(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xf0(%rsp)
movq 0xe8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
movq (%rax), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x1344e
movq 0xe8(%rsp), %rax
movq (%rax), %rdi
leaq 0x120f8c(%rip), %rsi    # 0x134194
callq 0xf700
cmpl $0x0, %eax
jne 0x13282
movl 0x166fc8(%rip), %eax    # 0x17a1e0
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x166fbd(%rip)    # 0x17a1e0
movslq %eax, %rcx
leaq 0x166333(%rip), %rax    # 0x179560
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movl $0x19, (%rax)
movl 0xf0(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xf0(%rsp)
movq 0xe8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
movq (%rax), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x1344c
movq 0xe8(%rsp), %rax
movq (%rax), %rdi
leaq 0x120f0f(%rip), %rsi    # 0x1341a3
callq 0xf700
cmpl $0x0, %eax
jne 0x1330e
movl 0x166f3c(%rip), %eax    # 0x17a1e0
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x166f31(%rip)    # 0x17a1e0
movslq %eax, %rcx
leaq 0x1662a7(%rip), %rax    # 0x179560
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movl $0x1a, (%rax)
movl 0xf0(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xf0(%rsp)
movq 0xe8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
movq (%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x1344a
movq 0xe8(%rsp), %rax
movq (%rax), %rdi
leaq 0x120e92(%rip), %rsi    # 0x1341b2
callq 0xf700
cmpl $0x0, %eax
jne 0x1339a
movl 0x166eb0(%rip), %eax    # 0x17a1e0
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x166ea5(%rip)    # 0x17a1e0
movslq %eax, %rcx
leaq 0x16621b(%rip), %rax    # 0x179560
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movl $0x1b, (%rax)
movl 0xf0(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xf0(%rsp)
movq 0xe8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
movq (%rax), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x13448
movq 0xe8(%rsp), %rax
movq (%rax), %rdi
leaq 0x120e13(%rip), %rsi    # 0x1341bf
callq 0xf700
cmpl $0x0, %eax
jne 0x13423
movl 0x166e24(%rip), %eax    # 0x17a1e0
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x166e19(%rip)    # 0x17a1e0
movslq %eax, %rcx
leaq 0x16618f(%rip), %rax    # 0x179560
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movl $0x1c, (%rax)
movl 0xf0(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xf0(%rsp)
movq 0xe8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
movq (%rax), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x13446
movq 0xe8(%rsp), %rax
movq (%rax), %rsi
leaq 0x120d95(%rip), %rdi    # 0x1341ca
movb $0x0, %al
callq 0xd5850
movl $0x1, %edi
callq 0xf600
jmp 0x13448
jmp 0x1344a
jmp 0x1344c
jmp 0x1344e
jmp 0x13450
jmp 0x13452
jmp 0x13454
jmp 0x13456
jmp 0x13458
jmp 0x1345a
jmp 0x1345c
jmp 0x1345e
jmp 0x13460
jmp 0x13462
jmp 0x13464
jmp 0x13466
jmp 0x13468
jmp 0x1346a
jmp 0x1346c
jmp 0x1346e
jmp 0x13470
jmp 0x13472
jmp 0x13474
jmp 0x13476
jmp 0x13478
jmp 0x1347a
jmp 0x1347c
jmp 0x1347e
jmp 0x13480
jmp 0x134e5
cmpq $0x0, 0x1660c6(%rip)    # 0x179550
jne 0x134a0
movq 0xe8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x1660b2(%rip)    # 0x179550
jmp 0x134e3
cmpq $0x0, 0x166d40(%rip)    # 0x17a1e8
jne 0x134be
movq 0xe8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x166d2c(%rip)    # 0x17a1e8
jmp 0x134e1
movq 0xe8(%rsp), %rax
movq (%rax), %rsi
leaq 0x120cfa(%rip), %rdi    # 0x1341ca
movb $0x0, %al
callq 0xd5850
movl $0x1, %edi
callq 0xf600
jmp 0x134e3
jmp 0x134e5
movq 0xe8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0xe8(%rsp)
movl 0xf0(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xf0(%rsp)
jmp 0x125ca
cmpq $0x0, 0x166039(%rip)    # 0x179550
jne 0x13534
leaq 0x120cc7(%rip), %rdi    # 0x1341e7
movb $0x0, %al
callq 0xd5850
movl $0x0, 0xf4(%rsp)
jmp 0x13564
cmpq $0x0, 0x166cac(%rip)    # 0x17a1e8
jne 0x13559
leaq 0x120cc6(%rip), %rdi    # 0x13420b
movb $0x0, %al
callq 0xd5850
movl $0x0, 0xf4(%rsp)
jmp 0x13564
movl $0x1, 0xf4(%rsp)
movl 0xf4(%rsp), %eax
addq $0xf8, %rsp
retq
nopw %cs:(%rax,%rax)