// File: /workspace/github_c_makefile_star2_O0/radforddc[P]icpc_siggen/read_config.c
// Function: read_config
int read_config(char *config_file_name, MJD_Siggen_Setup *setup) {

  /* reads and parses configuration file of name config_file_name
     fills in values of MJD_Siggen_Setup setup, defined in mjd_siggen.h
     returns 0 on success, 1 otherwise
  */

  char key_word[][32] = {
    "xtal_length",
    "xtal_radius",
    "top_bullet_radius",
    "bottom_bullet_radius",
    "pc_length",
    "pc_radius",
    "bulletize_PC",
    "bottom_taper_length",  // note: these two keywords must stay adjacent, in this order
    "taper_length",         // <- for compatibility with old mjd config files, == "bottom taper_length
    "outer_taper_length",
    "outer_taper_width",
    "taper_angle",
    "inner_taper_length",
    "inner_taper_width",
    "hole_length_gap",     // can use gap (i.e. xtal_length - hole_length) instead. This keyword must be before "hole_length".
    "hole_length",
    "hole_radius",
    "hole_bullet_radius",
    "wrap_around_radius",
    "ditch_depth",
    "ditch_thickness",
    "Li_thickness",
    "vacuum_gap",
    "xtal_grid",
    "impurity_z0",
    "impurity_gradient",
    "impurity_quadratic",
    "impurity_surface",
    "impurity_radial_add",
    "impurity_radial_mult",
    "impurity_rpower",
    "xtal_HV",
    "surface_drift_vel_factor",

    "drift_name",
    "field_name",
    "wp_name",
    "xtal_temp",
    "preamp_tau",
    "time_steps_calc",
    "step_time_calc",
    "step_time_out",
    "charge_cloud_size",
    "use_diffusion",
    "energy",
    "verbosity_level",
    "max_iterations",
    "write_field",
    "write_WP",
    ""
  };

  int   ii, i, l, n=0, ok, iint = 0, diameter = 0;
  float fi;
  char  *c, line[256], line2[256], name[256];
  FILE  *file;


  /* initialize everything to zero... */
  memset(setup, 0, sizeof(*setup));
  /* ...except for impurity_radial_mult */
  setup->impurity_radial_mult = 1.0f;      // 1.0 is neutral (no radial gradient)
  setup->surface_drift_vel_factor = 1.0f;  // normal fast drift, same as bulk

  if (!(file = fopen(config_file_name, "r"))) {
    printf("\nERROR: config file %s does not exist?\n", config_file_name);
    return 1;
  }
  /* read config file */
  printf("\nReading values from config file %s\n", config_file_name);
  while (fgets(line, sizeof(line), file)) {
    n++;
    /* ignore comments and blank lines */
    if (strlen(line) < 3 || *line == ' ' || *line == '\t' || *line == '#') continue;
    /* if line contains "_diam" (for diameter) replace with "_radius"
       this allows the user to specify diametwrs instead of radii */
    diameter = 0;
    if ((c = strstr(line, "_diam"))) {
      diameter = 1;
      if (setup->verbosity >= CHATTY) printf("Line: %s", line);
      strcpy(line2, c+5);
      strcpy(c, "_radius");
      strcpy(c+7, line2);
      if (setup->verbosity >= CHATTY) printf("   -->  %s", line);      
    }

    for (i=0; (l=strlen(key_word[i])) > 0; i++) {
      if (!strncmp(line, key_word[i], l)) {
	/* line starts with key_word[i] */
      if (setup->verbosity >= CHATTY) printf("Line: %s", line);
	if (line[l] != ' ' && line[l] != '\t') {
	  ok = 0;
	} else {
	  // for (c = line + l; *c != ' ' && *c != '\t'; c++) ;
	  /* find next non-white-space char */
	  for (c = line + l; *c == ' ' || *c == '\t'; c++) ;
	  name[0] = 0;
	  ii = iint = 0;
	  fi = 0;
	  if (strstr(key_word[i], "_name")) {
	    /* extract character string for file name */
	    for (ok=0; ok<256 && *c != ' ' && *c != '\t' && *c != '\n' &&  *c != '\r'; ok++) {
	      name[ok] = *c;
	      c++;
	    }
	    name[ok] = '\0';	    
	  } else if (!strncmp("time_steps_calc", key_word[i], l) ||
		     !strncmp("use_diffusion", key_word[i], l) ||
		     !strncmp("verbosity_level", key_word[i], l) ||
		     !strncmp("max_iterations", key_word[i], l) ||
		     !strncmp("write_field", key_word[i], l) ||
		     !strncmp("write_WP", key_word[i], l) ||
		     !strncmp("bulletize_PC", key_word[i], l)) {
	    /* extract integer value */
	    ok = sscanf(c, "%d", &ii);
	    iint = 1;
	  } else {
	    /* extract float value */
	    ok = sscanf(c, "%f", &fi);
            if (diameter) fi /= 2.0;
	  }
	}
	if (ok < 1) {
	  printf("ERROR reading %s from config file %s\n"
		 "   ...line number %d is: %s",
		 key_word[i], config_file_name, n, line);
	  return 1;
	}

        if (!strncmp(key_word[i], "taper_length", l)) {
          i--;                      // use previous keyword = "bottom_taper_length" instead
          l=strlen(key_word[i]);    // for backwards compatibiity wth old mjd config files
        }

	if (strstr(key_word[i], "verbosity_level")) {
	  setup->verbosity = ii;
	} else if (strstr(key_word[i], "xtal_length")) {
	  setup->xtal_length = fi;
	} else if (strstr(key_word[i], "xtal_radius")) {
	  setup->xtal_radius = fi;
	} else if (strstr(key_word[i], "top_bullet_radius")) {
	  setup->top_bullet_radius = fi;
	} else if (strstr(key_word[i], "bottom_bullet_radius")) {
	  setup->bottom_bullet_radius = fi;
	} else if (strstr(key_word[i], "pc_length")) {
	  setup->pc_length = fi;
	} else if (strstr(key_word[i], "pc_radius")) {
	  setup->pc_radius = fi;
	} else if (strstr(key_word[i], "bulletize_PC")) {
	  setup->bulletize_PC = ii;
	} else if (strstr(key_word[i], "bottom_taper_length")) {
	  setup->bottom_taper_length = fi;
	} else if (strstr(key_word[i], "outer_taper_length")) {
	  setup->outer_taper_length = fi;
	} else if (strstr(key_word[i], "outer_taper_width")) {
	  setup->outer_taper_width = fi;
	} else if (strstr(key_word[i], "taper_angle")) {
	  setup->taper_angle = fi;
	} else if (strstr(key_word[i], "inner_taper_length")) {
	  setup->inner_taper_length = fi;
	} else if (strstr(key_word[i], "inner_taper_width")) {
	  setup->inner_taper_width = fi;
	} else if (strstr(key_word[i], "hole_length")) {
	  setup->hole_length = fi;
          /* the user can specify "hole_length_gap" = xtal_length - hole_length, instead of "hole_length" */
          if (strstr(line, "hole_length_gap")  && fi < setup->xtal_length) {
            setup->hole_length = setup->xtal_length - fi;
            if (setup->verbosity >= CHATTY) printf("   -->  hole_length: %f\n", setup->hole_length);
          }
	} else if (strstr(key_word[i], "hole_radius")) {
	  setup->hole_radius = fi;
	} else if (strstr(key_word[i], "hole_bullet_radius")) {
	  setup->hole_bullet_radius = fi;
	} else if (strstr(key_word[i], "wrap_around_radius")) {
	  setup->wrap_around_radius = fi;
	} else if (strstr(key_word[i], "ditch_depth")) {
	  setup->ditch_depth = fi;
	} else if (strstr(key_word[i], "ditch_thickness")) {
	  setup->ditch_thickness = fi;
	} else if (strstr(key_word[i], "Li_thickness")) {
	  setup->Li_thickness = fi;
	} else if (strstr(key_word[i], "vacuum_gap")) {
	  setup->vacuum_gap = fi;
	} else if (strstr(key_word[i], "xtal_grid")) {
	  setup->xtal_grid = fi;
	} else if (strstr(key_word[i], "impurity_z0")) {
	  setup->impurity_z0 = fi;
	} else if (strstr(key_word[i], "impurity_gradient")) {
	  setup->impurity_gradient = fi;
	} else if (strstr(key_word[i], "impurity_quadratic")) {
	  setup->impurity_quadratic = fi;
	} else if (strstr(key_word[i], "impurity_surface")) {
	  setup->impurity_surface = fi;
	} else if (strstr(key_word[i], "impurity_radial_add")) {
	  setup->impurity_radial_add = fi;
	} else if (strstr(key_word[i], "impurity_radial_mult")) {
	  setup->impurity_radial_mult = fi;
	} else if (strstr(key_word[i], "impurity_rpower")) {
	  setup->impurity_rpower = fi;
	} else if (strstr(key_word[i], "xtal_HV")) {
	  setup->xtal_HV = fi;
	} else if (strstr(key_word[i], "surface_drift_vel_factor")) {
	  setup->surface_drift_vel_factor = fi;
	} else if (strstr(key_word[i], "drift_name")) {
	  strncpy(setup->drift_name, name, 256);
	} else if (strstr(key_word[i], "field_name")) {
	  strncpy(setup->field_name, name, 256);
	} else if (strstr(key_word[i], "wp_name")) {
	  strncpy(setup->wp_name, name, 256);
	} else if (strstr(key_word[i], "xtal_temp")) {
	  setup->xtal_temp = fi;
	} else if (strstr(key_word[i], "preamp_tau")) {
	  setup->preamp_tau = fi;
	} else if (strstr(key_word[i], "time_steps_calc")) {
	  setup->time_steps_calc = ii;
	} else if (strstr(key_word[i], "step_time_calc")) {
	  setup->step_time_calc = fi;
	} else if (strstr(key_word[i], "step_time_out")) {
	  setup->step_time_out = fi;
	} else if (strstr(key_word[i], "charge_cloud_size")) {
	  setup->charge_cloud_size = fi;
	} else if (strstr(key_word[i], "use_diffusion")) {
	  setup->use_diffusion = ii;
	} else if (strstr(key_word[i], "energy")) {
	  setup->energy = fi;
	} else if (strstr(key_word[i], "max_iterations")) {
	  setup->max_iterations = ii;
	} else if (strstr(key_word[i], "write_field")) {
	  setup->write_field = ii;
	} else if (strstr(key_word[i], "write_WP")) {
	  setup->write_WP = ii;
	} else {
	  printf("ERROR; unrecognized keyword %s\n", key_word[i]);
	  return 1;
	}

	if (setup->verbosity >= CHATTY) {
	  // printf("%s", line);
	  if (iint) {
	    printf("%s: %d\n", key_word[i], ii);
	  } else if (strlen(name) > 0) {
	    printf("%s: %s\n", key_word[i], name);
	  } else {
	    printf("%s: %f\n", key_word[i], fi);
	  }
	}
	break;
      }
    }
  }
  fclose(file);

  /* some consistency checks */
  if (setup->inner_taper_length > setup->hole_length - setup->hole_bullet_radius)
    setup->inner_taper_length = setup->hole_length - setup->hole_bullet_radius;
  if (setup->hole_bullet_radius > setup->hole_radius)
    setup->hole_bullet_radius = setup->hole_radius;
  if (setup->outer_taper_length > setup->xtal_length ||
      setup->inner_taper_length > setup->hole_length ||
      setup->hole_length > setup->xtal_length ||
      setup->hole_length < setup->hole_bullet_radius ||
      setup->inner_taper_length > setup->hole_length - setup->hole_bullet_radius ||
      (setup->hole_radius +
       setup->outer_taper_width +
       setup->inner_taper_width) > setup->xtal_radius) {
    printf("\nERROR: Inconsistent detector dimensions:\n"
           "   crystal length and radius: %5.2f %5.2f\n"
           "      hole length and radius: %5.2f %5.2f\n"
           "outer taper length and width: %5.2f %5.2f\n"
           "inner taper length and width: %5.2f %5.2f\n\n",
           setup->xtal_length, setup->xtal_radius,
           setup->hole_length, setup->hole_radius,
           setup->outer_taper_length, setup->outer_taper_width,
           setup->inner_taper_length, setup->inner_taper_width);
    return 1;
  }

  if (setup->taper_angle > 0) {
    /* convert taper angle to taper widths */
    if (setup->outer_taper_length > 0) {
      setup->outer_taper_width =
        setup->outer_taper_length * tan(setup->taper_angle * 3.14159/180.0);
      if (setup->verbosity >= CHATTY) printf("  ->>  outer taper width: %f\n", setup->outer_taper_width);
    }
    if (setup->inner_taper_length > 0) {
      setup->inner_taper_width =
        setup->inner_taper_length * tan(setup->taper_angle * 3.14159/180.0);
      if (setup->verbosity >= CHATTY) printf("  ->>  inner taper width: %f\n", setup->inner_taper_width);
    }
  } else {
    /* convert taper width to taper angle */
    if (setup->outer_taper_length > 0 &&
        setup->outer_taper_width > 0)
      setup->taper_angle =
        atan(setup->outer_taper_width/setup->outer_taper_length) * 180.0/3.14159;
    else if (setup->inner_taper_length > 0 &&
             setup->inner_taper_width > 0)
      setup->taper_angle =
        atan(setup->inner_taper_width/setup->inner_taper_length) * 180.0/3.14159;
    if (setup->taper_angle > 0)
      if (setup->verbosity >= CHATTY) printf("  ->>  taper angle: %f\n", setup->taper_angle);
  }
  if (setup->wrap_around_radius > 0 &&
      setup->ditch_depth > 0 && setup->ditch_thickness > 0 &&
      (setup->pc_radius == 0 || setup->pc_radius > setup->wrap_around_radius - setup->ditch_thickness))
    setup->pc_radius = setup->wrap_around_radius - setup->ditch_thickness;
  if (setup->wrap_around_radius == 0 ||
      setup->wrap_around_radius > setup->xtal_radius - setup->bottom_taper_length)
    setup->wrap_around_radius = setup->xtal_radius - setup->bottom_taper_length;

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x990, %rsp            # imm = 0x990
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
leaq -0x640(%rbp), %rdi
leaq 0x20af(%rip), %rsi      # 0x4770
movl $0x620, %edx            # imm = 0x620
callq 0x10d0
movl $0x0, -0x650(%rbp)
movl $0x0, -0x658(%rbp)
movl $0x0, -0x65c(%rbp)
movq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0x15b0, %edx           # imm = 0x15B0
callq 0x10b0
movq -0x18(%rbp), %rax
movss 0x205f(%rip), %xmm0     # 0x4764
movss %xmm0, 0x6c(%rax)
movq -0x18(%rbp), %rax
movss 0x204e(%rip), %xmm0     # 0x4764
movss %xmm0, 0x1590(%rax)
movq -0x10(%rbp), %rdi
leaq 0x196b(%rip), %rsi      # 0x4094
callq 0x1100
movq %rax, -0x978(%rbp)
cmpq $0x0, %rax
jne 0x2759
movq -0x10(%rbp), %rsi
leaq 0x264a(%rip), %rdi      # 0x4d90
movb $0x0, %al
callq 0x10a0
movl $0x1, -0x4(%rbp)
jmp 0x3ed1
movq -0x10(%rbp), %rsi
leaq 0x2654(%rip), %rdi      # 0x4db8
movb $0x0, %al
callq 0x10a0
leaq -0x770(%rbp), %rdi
movq -0x978(%rbp), %rdx
movl $0x100, %esi            # imm = 0x100
callq 0x10c0
cmpq $0x0, %rax
je 0x3a25
movl -0x650(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x650(%rbp)
leaq -0x770(%rbp), %rdi
callq 0x1090
cmpq $0x3, %rax
jb 0x27d2
movsbl -0x770(%rbp), %eax
cmpl $0x20, %eax
je 0x27d2
movsbl -0x770(%rbp), %eax
cmpl $0x9, %eax
je 0x27d2
movsbl -0x770(%rbp), %eax
cmpl $0x23, %eax
jne 0x27d4
jmp 0x276b
movl $0x0, -0x65c(%rbp)
leaq -0x770(%rbp), %rdi
leaq 0x25f1(%rip), %rsi      # 0x4ddd
callq 0x1120
movq %rax, -0x668(%rbp)
cmpq $0x0, %rax
je 0x288b
movl $0x1, -0x65c(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x2, (%rax)
jl 0x282a
leaq -0x770(%rbp), %rsi
leaq 0x25c0(%rip), %rdi      # 0x4de3
movb $0x0, %al
callq 0x10a0
leaq -0x870(%rbp), %rdi
movq -0x668(%rbp), %rsi
addq $0x5, %rsi
callq 0x1050
movq -0x668(%rbp), %rdi
leaq 0x2699(%rip), %rsi      # 0x4ee8
callq 0x1050
movq -0x668(%rbp), %rdi
addq $0x7, %rdi
leaq -0x870(%rbp), %rsi
callq 0x1050
movq -0x18(%rbp), %rax
cmpl $0x2, (%rax)
jl 0x2889
leaq -0x770(%rbp), %rsi
leaq 0x256a(%rip), %rdi      # 0x4dec
movb $0x0, %al
callq 0x10a0
jmp 0x288b
movl $0x0, -0x648(%rbp)
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
callq 0x1090
movl %eax, -0x64c(%rbp)
cmpl $0x0, %eax
jle 0x3a20
leaq -0x770(%rbp), %rdi
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rsi
shlq $0x5, %rax
addq %rax, %rsi
movslq -0x64c(%rbp), %rdx
callq 0x1040
cmpl $0x0, %eax
jne 0x3a0a
movq -0x18(%rbp), %rax
cmpl $0x2, (%rax)
jl 0x290d
leaq -0x770(%rbp), %rsi
leaq 0x24dd(%rip), %rdi      # 0x4de3
movb $0x0, %al
callq 0x10a0
movslq -0x64c(%rbp), %rax
movsbl -0x770(%rbp,%rax), %eax
cmpl $0x20, %eax
je 0x2944
movslq -0x64c(%rbp), %rax
movsbl -0x770(%rbp,%rax), %eax
cmpl $0x9, %eax
je 0x2944
movl $0x0, -0x654(%rbp)
jmp 0x2ca0
leaq -0x770(%rbp), %rax
movslq -0x64c(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x668(%rbp)
movq -0x668(%rbp), %rax
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0x20, %ecx
movb %al, -0x979(%rbp)
je 0x2989
movq -0x668(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
sete %al
movb %al, -0x979(%rbp)
movb -0x979(%rbp), %al
testb $0x1, %al
jne 0x2995
jmp 0x29ab
jmp 0x2997
movq -0x668(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x668(%rbp)
jmp 0x295c
movb $0x0, -0x970(%rbp)
movl $0x0, -0x658(%rbp)
movl $0x0, -0x644(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x660(%rbp)
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x26be(%rip), %rsi      # 0x50ab
callq 0x1120
cmpq $0x0, %rax
je 0x2ad2
movl $0x0, -0x654(%rbp)
xorl %eax, %eax
cmpl $0x100, -0x654(%rbp)    # imm = 0x100
movb %al, -0x97a(%rbp)
jge 0x2a75
movq -0x668(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x20, %ecx
movb %al, -0x97a(%rbp)
je 0x2a75
movq -0x668(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x9, %ecx
movb %al, -0x97a(%rbp)
je 0x2a75
movq -0x668(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0xa, %ecx
movb %al, -0x97a(%rbp)
je 0x2a75
movq -0x668(%rbp), %rax
movsbl (%rax), %eax
cmpl $0xd, %eax
setne %al
movb %al, -0x97a(%rbp)
movb -0x97a(%rbp), %al
testb $0x1, %al
jne 0x2a81
jmp 0x2abe
movq -0x668(%rbp), %rax
movb (%rax), %cl
movslq -0x654(%rbp), %rax
movb %cl, -0x970(%rbp,%rax)
movq -0x668(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x668(%rbp)
movl -0x654(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x654(%rbp)
jmp 0x2a06
movslq -0x654(%rbp), %rax
movb $0x0, -0x970(%rbp,%rax)
jmp 0x2c9e
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rsi
shlq $0x5, %rax
addq %rax, %rsi
movslq -0x64c(%rbp), %rdx
leaq 0x2302(%rip), %rdi      # 0x4df7
callq 0x1040
cmpl $0x0, %eax
je 0x2c1d
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rsi
shlq $0x5, %rax
addq %rax, %rsi
movslq -0x64c(%rbp), %rdx
leaq 0x22e1(%rip), %rdi      # 0x4e07
callq 0x1040
cmpl $0x0, %eax
je 0x2c1d
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rsi
shlq $0x5, %rax
addq %rax, %rsi
movslq -0x64c(%rbp), %rdx
leaq 0x22be(%rip), %rdi      # 0x4e15
callq 0x1040
cmpl $0x0, %eax
je 0x2c1d
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rsi
shlq $0x5, %rax
addq %rax, %rsi
movslq -0x64c(%rbp), %rdx
leaq 0x229d(%rip), %rdi      # 0x4e25
callq 0x1040
cmpl $0x0, %eax
je 0x2c1d
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rsi
shlq $0x5, %rax
addq %rax, %rsi
movslq -0x64c(%rbp), %rdx
leaq 0x227b(%rip), %rdi      # 0x4e34
callq 0x1040
cmpl $0x0, %eax
je 0x2c1d
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rsi
shlq $0x5, %rax
addq %rax, %rsi
movslq -0x64c(%rbp), %rdx
leaq 0x225a(%rip), %rdi      # 0x4e40
callq 0x1040
cmpl $0x0, %eax
je 0x2c1d
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rsi
shlq $0x5, %rax
addq %rax, %rsi
movslq -0x64c(%rbp), %rdx
leaq 0x2236(%rip), %rdi      # 0x4e49
callq 0x1040
cmpl $0x0, %eax
jne 0x2c4b
movq -0x668(%rbp), %rdi
leaq 0x222b(%rip), %rsi      # 0x4e56
leaq -0x644(%rbp), %rdx
movb $0x0, %al
callq 0x10f0
movl %eax, -0x654(%rbp)
movl $0x1, -0x658(%rbp)
jmp 0x2c9c
movq -0x668(%rbp), %rdi
leaq 0x2200(%rip), %rsi      # 0x4e59
leaq -0x660(%rbp), %rdx
movb $0x0, %al
callq 0x10f0
movl %eax, -0x654(%rbp)
cmpl $0x0, -0x65c(%rbp)
je 0x2c9a
movss -0x660(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x13d6(%rip), %xmm1     # 0x4060
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x660(%rbp)
jmp 0x2c9c
jmp 0x2c9e
jmp 0x2ca0
cmpl $0x1, -0x654(%rbp)
jge 0x2ce9
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rsi
shlq $0x5, %rax
addq %rax, %rsi
movq -0x10(%rbp), %rdx
movl -0x650(%rbp), %ecx
leaq -0x770(%rbp), %r8
leaq 0x2186(%rip), %rdi      # 0x4e5c
movb $0x0, %al
callq 0x10a0
movl $0x1, -0x4(%rbp)
jmp 0x3ed1
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
movslq -0x64c(%rbp), %rdx
leaq 0x21eb(%rip), %rsi      # 0x4ef7
callq 0x1040
cmpl $0x0, %eax
jne 0x2d45
movl -0x648(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x648(%rbp)
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
callq 0x1090
movl %eax, -0x64c(%rbp)
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x20b4(%rip), %rsi      # 0x4e15
callq 0x1120
cmpq $0x0, %rax
je 0x2d7d
movl -0x644(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
jmp 0x3956
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x2104(%rip), %rsi      # 0x4e9d
callq 0x1120
cmpq $0x0, %rax
je 0x2dba
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x4(%rax)
jmp 0x3954
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x20d3(%rip), %rsi      # 0x4ea9
callq 0x1120
cmpq $0x0, %rax
je 0x2df7
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x8(%rax)
jmp 0x3952
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x20a2(%rip), %rsi      # 0x4eb5
callq 0x1120
cmpq $0x0, %rax
je 0x2e34
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x40(%rax)
jmp 0x3950
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x2077(%rip), %rsi      # 0x4ec7
callq 0x1120
cmpq $0x0, %rax
je 0x2e71
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x44(%rax)
jmp 0x394e
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x204f(%rip), %rsi      # 0x4edc
callq 0x1120
cmpq $0x0, %rax
je 0x2eae
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0xc(%rax)
jmp 0x394c
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x201c(%rip), %rsi      # 0x4ee6
callq 0x1120
cmpq $0x0, %rax
je 0x2eeb
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x10(%rax)
jmp 0x394a
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1f42(%rip), %rsi      # 0x4e49
callq 0x1120
cmpq $0x0, %rax
je 0x2f27
movl -0x644(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x84(%rax)
jmp 0x3948
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1fad(%rip), %rsi      # 0x4ef0
callq 0x1120
cmpq $0x0, %rax
je 0x2f64
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x20(%rax)
jmp 0x3946
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1f84(%rip), %rsi      # 0x4f04
callq 0x1120
cmpq $0x0, %rax
je 0x2fa1
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x2c(%rax)
jmp 0x3944
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1f5a(%rip), %rsi      # 0x4f17
callq 0x1120
cmpq $0x0, %rax
je 0x2fde
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x38(%rax)
jmp 0x3942
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1f2f(%rip), %rsi      # 0x4f29
callq 0x1120
cmpq $0x0, %rax
je 0x301b
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x30(%rax)
jmp 0x3940
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1efe(%rip), %rsi      # 0x4f35
callq 0x1120
cmpq $0x0, %rax
je 0x3058
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x34(%rax)
jmp 0x393e
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1ed4(%rip), %rsi      # 0x4f48
callq 0x1120
cmpq $0x0, %rax
je 0x3095
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x3c(%rax)
jmp 0x393c
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1ea9(%rip), %rsi      # 0x4f5a
callq 0x1120
cmpq $0x0, %rax
je 0x3145
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x24(%rax)
leaq -0x770(%rbp), %rdi
leaq 0x1e87(%rip), %rsi      # 0x4f66
callq 0x1120
cmpq $0x0, %rax
je 0x3140
movss -0x660(%rbp), %xmm1
movq -0x18(%rbp), %rax
movss 0x4(%rax), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x3140
movq -0x18(%rbp), %rax
movss 0x4(%rax), %xmm0
subss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x24(%rax)
movq -0x18(%rbp), %rax
cmpl $0x2, (%rax)
jl 0x313e
movq -0x18(%rbp), %rax
movss 0x24(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x1e3f(%rip), %rdi      # 0x4f76
movb $0x1, %al
callq 0x10a0
jmp 0x3140
jmp 0x393a
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1e2e(%rip), %rsi      # 0x4f8f
callq 0x1120
cmpq $0x0, %rax
je 0x3182
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x28(%rax)
jmp 0x3938
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1dfd(%rip), %rsi      # 0x4f9b
callq 0x1120
cmpq $0x0, %rax
je 0x31bf
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x48(%rax)
jmp 0x3936
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1dd3(%rip), %rsi      # 0x4fae
callq 0x1120
cmpq $0x0, %rax
je 0x31fc
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x14(%rax)
jmp 0x3934
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1da9(%rip), %rsi      # 0x4fc1
callq 0x1120
cmpq $0x0, %rax
je 0x3239
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x18(%rax)
jmp 0x3932
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1d78(%rip), %rsi      # 0x4fcd
callq 0x1120
cmpq $0x0, %rax
je 0x3276
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x1c(%rax)
jmp 0x3930
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1d4b(%rip), %rsi      # 0x4fdd
callq 0x1120
cmpq $0x0, %rax
je 0x32b3
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x4c(%rax)
jmp 0x392e
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1d1b(%rip), %rsi      # 0x4fea
callq 0x1120
cmpq $0x0, %rax
je 0x32f0
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x50(%rax)
jmp 0x392c
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1ce9(%rip), %rsi      # 0x4ff5
callq 0x1120
cmpq $0x0, %rax
je 0x332d
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x54(%rax)
jmp 0x392a
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1cb6(%rip), %rsi      # 0x4fff
callq 0x1120
cmpq $0x0, %rax
je 0x336a
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x58(%rax)
jmp 0x3928
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1c85(%rip), %rsi      # 0x500b
callq 0x1120
cmpq $0x0, %rax
je 0x33a7
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x5c(%rax)
jmp 0x3926
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1c5a(%rip), %rsi      # 0x501d
callq 0x1120
cmpq $0x0, %rax
je 0x33e4
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x60(%rax)
jmp 0x3924
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1c30(%rip), %rsi      # 0x5030
callq 0x1120
cmpq $0x0, %rax
je 0x3421
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x64(%rax)
jmp 0x3922
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1c04(%rip), %rsi      # 0x5041
callq 0x1120
cmpq $0x0, %rax
je 0x345e
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x68(%rax)
jmp 0x3920
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1bdb(%rip), %rsi      # 0x5055
callq 0x1120
cmpq $0x0, %rax
je 0x349b
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x6c(%rax)
jmp 0x391e
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1bb3(%rip), %rsi      # 0x506a
callq 0x1120
cmpq $0x0, %rax
je 0x34d8
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x70(%rax)
jmp 0x391c
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1b86(%rip), %rsi      # 0x507a
callq 0x1120
cmpq $0x0, %rax
je 0x3515
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x74(%rax)
jmp 0x391a
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1b51(%rip), %rsi      # 0x5082
callq 0x1120
cmpq $0x0, %rax
je 0x3555
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x1590(%rax)
jmp 0x3918
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1b2a(%rip), %rsi      # 0x509b
callq 0x1120
cmpq $0x0, %rax
je 0x359d
movq -0x18(%rbp), %rdi
addq $0x88, %rdi
leaq -0x970(%rbp), %rsi
movl $0x100, %edx            # imm = 0x100
callq 0x1030
jmp 0x3916
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1aed(%rip), %rsi      # 0x50a6
callq 0x1120
cmpq $0x0, %rax
je 0x35e5
movq -0x18(%rbp), %rdi
addq $0x188, %rdi            # imm = 0x188
leaq -0x970(%rbp), %rsi
movl $0x100, %edx            # imm = 0x100
callq 0x1030
jmp 0x3914
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1ab0(%rip), %rsi      # 0x50b1
callq 0x1120
cmpq $0x0, %rax
je 0x362d
movq -0x18(%rbp), %rdi
addq $0x288, %rdi            # imm = 0x288
leaq -0x970(%rbp), %rsi
movl $0x100, %edx            # imm = 0x100
callq 0x1030
jmp 0x3912
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1a70(%rip), %rsi      # 0x50b9
callq 0x1120
cmpq $0x0, %rax
je 0x366d
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x388(%rax)
jmp 0x3910
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1a3a(%rip), %rsi      # 0x50c3
callq 0x1120
cmpq $0x0, %rax
je 0x36ad
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x38c(%rax)
jmp 0x390e
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x172e(%rip), %rsi      # 0x4df7
callq 0x1120
cmpq $0x0, %rax
je 0x36e9
movl -0x644(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x390(%rax)
jmp 0x390c
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x19c9(%rip), %rsi      # 0x50ce
callq 0x1120
cmpq $0x0, %rax
je 0x3729
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x394(%rax)
jmp 0x390a
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1998(%rip), %rsi      # 0x50dd
callq 0x1120
cmpq $0x0, %rax
je 0x3769
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x398(%rax)
jmp 0x3908
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1966(%rip), %rsi      # 0x50eb
callq 0x1120
cmpq $0x0, %rax
je 0x37a9
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x39c(%rax)
jmp 0x3906
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1642(%rip), %rsi      # 0x4e07
callq 0x1120
cmpq $0x0, %rax
je 0x37e5
movl -0x644(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x3a0(%rax)
jmp 0x3904
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x18fc(%rip), %rsi      # 0x50fd
callq 0x1120
cmpq $0x0, %rax
je 0x3825
movss -0x660(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x3a4(%rax)
jmp 0x3902
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x15e4(%rip), %rsi      # 0x4e25
callq 0x1120
cmpq $0x0, %rax
je 0x385e
movl -0x644(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x78(%rax)
jmp 0x3900
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x15ba(%rip), %rsi      # 0x4e34
callq 0x1120
cmpq $0x0, %rax
je 0x3894
movl -0x644(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x7c(%rax)
jmp 0x38fe
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq 0x1590(%rip), %rsi      # 0x4e40
callq 0x1120
cmpq $0x0, %rax
je 0x38cd
movl -0x644(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x80(%rax)
jmp 0x38fc
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rsi
shlq $0x5, %rax
addq %rax, %rsi
leaq 0x181b(%rip), %rdi      # 0x5104
movb $0x0, %al
callq 0x10a0
movl $0x1, -0x4(%rbp)
jmp 0x3ed1
jmp 0x38fe
jmp 0x3900
jmp 0x3902
jmp 0x3904
jmp 0x3906
jmp 0x3908
jmp 0x390a
jmp 0x390c
jmp 0x390e
jmp 0x3910
jmp 0x3912
jmp 0x3914
jmp 0x3916
jmp 0x3918
jmp 0x391a
jmp 0x391c
jmp 0x391e
jmp 0x3920
jmp 0x3922
jmp 0x3924
jmp 0x3926
jmp 0x3928
jmp 0x392a
jmp 0x392c
jmp 0x392e
jmp 0x3930
jmp 0x3932
jmp 0x3934
jmp 0x3936
jmp 0x3938
jmp 0x393a
jmp 0x393c
jmp 0x393e
jmp 0x3940
jmp 0x3942
jmp 0x3944
jmp 0x3946
jmp 0x3948
jmp 0x394a
jmp 0x394c
jmp 0x394e
jmp 0x3950
jmp 0x3952
jmp 0x3954
jmp 0x3956
movq -0x18(%rbp), %rax
cmpl $0x2, (%rax)
jl 0x3a08
cmpl $0x0, -0x658(%rbp)
je 0x3997
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rsi
shlq $0x5, %rax
addq %rax, %rsi
movl -0x644(%rbp), %edx
leaq 0x1796(%rip), %rdi      # 0x5124
movb $0x0, %al
callq 0x10a0
jmp 0x3a06
leaq -0x970(%rbp), %rdi
callq 0x1090
cmpq $0x0, %rax
jbe 0x39d5
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rsi
shlq $0x5, %rax
addq %rax, %rsi
leaq -0x970(%rbp), %rdx
leaq 0x1760(%rip), %rdi      # 0x512c
movb $0x0, %al
callq 0x10a0
jmp 0x3a04
movslq -0x648(%rbp), %rax
leaq -0x640(%rbp), %rsi
shlq $0x5, %rax
addq %rax, %rsi
movss -0x660(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x1737(%rip), %rdi      # 0x5134
movb $0x1, %al
callq 0x10a0
jmp 0x3a06
jmp 0x3a08
jmp 0x3a20
jmp 0x3a0c
movl -0x648(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x648(%rbp)
jmp 0x2895
jmp 0x276b
movq -0x978(%rbp), %rdi
callq 0x1080
movq -0x18(%rbp), %rax
movss 0x34(%rax), %xmm0
movq -0x18(%rbp), %rax
movss 0x24(%rax), %xmm1
movq -0x18(%rbp), %rax
subss 0x48(%rax), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x3a6c
movq -0x18(%rbp), %rax
movss 0x24(%rax), %xmm0
movq -0x18(%rbp), %rax
subss 0x48(%rax), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x34(%rax)
movq -0x18(%rbp), %rax
movss 0x48(%rax), %xmm0
movq -0x18(%rbp), %rax
ucomiss 0x28(%rax), %xmm0
jbe 0x3a91
movq -0x18(%rbp), %rax
movss 0x28(%rax), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x48(%rax)
movq -0x18(%rbp), %rax
movss 0x2c(%rax), %xmm0
movq -0x18(%rbp), %rax
ucomiss 0x4(%rax), %xmm0
ja 0x3b2e
movq -0x18(%rbp), %rax
movss 0x34(%rax), %xmm0
movq -0x18(%rbp), %rax
ucomiss 0x24(%rax), %xmm0
ja 0x3b2e
movq -0x18(%rbp), %rax
movss 0x24(%rax), %xmm0
movq -0x18(%rbp), %rax
ucomiss 0x4(%rax), %xmm0
ja 0x3b2e
movq -0x18(%rbp), %rax
movss 0x24(%rax), %xmm1
movq -0x18(%rbp), %rax
movss 0x48(%rax), %xmm0
ucomiss %xmm1, %xmm0
ja 0x3b2e
movq -0x18(%rbp), %rax
movss 0x34(%rax), %xmm0
movq -0x18(%rbp), %rax
movss 0x24(%rax), %xmm1
movq -0x18(%rbp), %rax
subss 0x48(%rax), %xmm1
ucomiss %xmm1, %xmm0
ja 0x3b2e
movq -0x18(%rbp), %rax
movss 0x28(%rax), %xmm0
movq -0x18(%rbp), %rax
addss 0x38(%rax), %xmm0
movq -0x18(%rbp), %rax
addss 0x3c(%rax), %xmm0
movq -0x18(%rbp), %rax
ucomiss 0x8(%rax), %xmm0
jbe 0x3bb0
movq -0x18(%rbp), %rax
movss 0x4(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x18(%rbp), %rax
movss 0x8(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
movq -0x18(%rbp), %rax
movss 0x24(%rax), %xmm2
cvtss2sd %xmm2, %xmm2
movq -0x18(%rbp), %rax
movss 0x28(%rax), %xmm3
cvtss2sd %xmm3, %xmm3
movq -0x18(%rbp), %rax
movss 0x2c(%rax), %xmm4
cvtss2sd %xmm4, %xmm4
movq -0x18(%rbp), %rax
movss 0x38(%rax), %xmm5
cvtss2sd %xmm5, %xmm5
movq -0x18(%rbp), %rax
movss 0x34(%rax), %xmm6
cvtss2sd %xmm6, %xmm6
movq -0x18(%rbp), %rax
movss 0x3c(%rax), %xmm7
cvtss2sd %xmm7, %xmm7
leaq 0x159f(%rip), %rdi      # 0x513c
movb $0x8, %al
callq 0x10a0
movl $0x1, -0x4(%rbp)
jmp 0x3ed1
movq -0x18(%rbp), %rax
movss 0x30(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x3cf6
movq -0x18(%rbp), %rax
movss 0x2c(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x3c5b
movq -0x18(%rbp), %rax
movss 0x2c(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x988(%rbp)
movq -0x18(%rbp), %rax
movss 0x30(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x41c(%rip), %xmm1      # 0x4020
mulsd %xmm1, %xmm0
movsd 0x408(%rip), %xmm1      # 0x4018
divsd %xmm1, %xmm0
callq 0x10e0
movaps %xmm0, %xmm1
movsd -0x988(%rbp), %xmm0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x38(%rax)
movq -0x18(%rbp), %rax
cmpl $0x2, (%rax)
jl 0x3c59
movq -0x18(%rbp), %rax
movss 0x38(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x15be(%rip), %rdi      # 0x5210
movb $0x1, %al
callq 0x10a0
jmp 0x3c5b
movq -0x18(%rbp), %rax
movss 0x34(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x3cf1
movq -0x18(%rbp), %rax
movss 0x34(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x990(%rbp)
movq -0x18(%rbp), %rax
movss 0x30(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x386(%rip), %xmm1      # 0x4020
mulsd %xmm1, %xmm0
movsd 0x372(%rip), %xmm1      # 0x4018
divsd %xmm1, %xmm0
callq 0x10e0
movaps %xmm0, %xmm1
movsd -0x990(%rbp), %xmm0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x3c(%rax)
movq -0x18(%rbp), %rax
cmpl $0x2, (%rax)
jl 0x3cef
movq -0x18(%rbp), %rax
movss 0x3c(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x1546(%rip), %rdi      # 0x522e
movb $0x1, %al
callq 0x10a0
jmp 0x3cf1
jmp 0x3df7
movq -0x18(%rbp), %rax
movss 0x2c(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x3d5a
movq -0x18(%rbp), %rax
movss 0x38(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x3d5a
movq -0x18(%rbp), %rax
movss 0x38(%rax), %xmm0
movq -0x18(%rbp), %rax
divss 0x2c(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x1070
movsd 0x2dd(%rip), %xmm1      # 0x4018
mulsd %xmm1, %xmm0
movsd 0x2d9(%rip), %xmm1      # 0x4020
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x30(%rax)
jmp 0x3dbe
movq -0x18(%rbp), %rax
movss 0x34(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x3dbc
movq -0x18(%rbp), %rax
movss 0x3c(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x3dbc
movq -0x18(%rbp), %rax
movss 0x3c(%rax), %xmm0
movq -0x18(%rbp), %rax
divss 0x34(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x1070
movsd 0x279(%rip), %xmm1      # 0x4018
mulsd %xmm1, %xmm0
movsd 0x275(%rip), %xmm1      # 0x4020
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x30(%rax)
jmp 0x3dbe
movq -0x18(%rbp), %rax
movss 0x30(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x3df5
movq -0x18(%rbp), %rax
cmpl $0x2, (%rax)
jl 0x3df3
movq -0x18(%rbp), %rax
movss 0x30(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x1460(%rip), %rdi      # 0x524c
movb $0x1, %al
callq 0x10a0
jmp 0x3df5
jmp 0x3df7
movq -0x18(%rbp), %rax
movss 0x14(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x3e7a
movq -0x18(%rbp), %rax
movss 0x18(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x3e7a
movq -0x18(%rbp), %rax
movss 0x1c(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x3e7a
movq -0x18(%rbp), %rax
movss 0x10(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x3e3f
jp 0x3e3f
jmp 0x3e5f
movq -0x18(%rbp), %rax
movss 0x10(%rax), %xmm0
movq -0x18(%rbp), %rax
movss 0x14(%rax), %xmm1
movq -0x18(%rbp), %rax
subss 0x1c(%rax), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x3e7a
movq -0x18(%rbp), %rax
movss 0x14(%rax), %xmm0
movq -0x18(%rbp), %rax
subss 0x1c(%rax), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x10(%rax)
movq -0x18(%rbp), %rax
movss 0x14(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x3e8f
jp 0x3e8f
jmp 0x3eaf
movq -0x18(%rbp), %rax
movss 0x14(%rax), %xmm0
movq -0x18(%rbp), %rax
movss 0x8(%rax), %xmm1
movq -0x18(%rbp), %rax
subss 0x20(%rax), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x3eca
movq -0x18(%rbp), %rax
movss 0x8(%rax), %xmm0
movq -0x18(%rbp), %rax
subss 0x20(%rax), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x14(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x990, %rsp            # imm = 0x990
popq %rbp
retq