// File: /workspace/github_c_makefile_star2_O1/usgs[P]nshmp-haz-catalogs/src/agrid/adaptive/read_write_params.c
// Function: write_params
void write_params(struct compl_levels* cat_comp, struct boundaries* reg, 
  struct catalog* cat, struct smoothp* smp1, char *outfnm) 
/*--------------------------------------------------------------------------*/
{
  int cnt;
  
// write out parameters
  fprintf(stdout,"Latitudes: %.2f %.2f\n", reg->minlat, reg->maxlat);
  fprintf(stdout,"Longitudes: %.2f %.2f\n", reg->minlon, reg->maxlon);
  fprintf(stdout,"dlat, dlon: %.2f %.2f\n", reg->dlat, reg->dlon);
// completeness levels
  fprintf(stdout,"Number of magnitude completeness levels: %d\n  M yr\n", cat_comp->nlevels);
  for (cnt=0; cnt<cat_comp->nlevels; cnt++) {
    fprintf(stdout,"  %.2f %d\n", cat_comp->mag_comp[cnt], cat_comp->yr_comp[cnt]);
  }
// catalog end year, name, and min-magnitude/d-mag/b-value
  fprintf(stdout,"Last year of catalog: %d\n", cat->end_yr);
  fprintf(stdout,"Name of catalog file: %s\n", cat->catnm);
  fprintf(stdout,"Minimum-M/dM/b-value: %.2f %.2f %.3f\n", cat->minMag, cat->dMag, cat->bval);
  if ( cat_comp->correctAreaForLat ) {
    fprintf(stdout,"Correcting grid cell area for latitude.\n");
  }
  else {
    fprintf(stdout,"Not correcting grid cell area for latitude.\n");
  }
// effective/actual numbers earthquakes
  if (smp1->use_neff) {
    fprintf(stdout,"Using effective numbers of earthquakes: N>=1.\n");
  }
  else {
    fprintf(stdout,"Using actual numbers of earthquakes (not effective-numbers): N=1.\n");
  }
// smoothing parameters
  if (smp1->cumul_rates) {
    fprintf(stdout,"Output cumulative rates.\n");
  }
  else {
    fprintf(stdout,"Output incremental rates.\n");
  }
  if (smp1->adj_compl) {
    fprintf(stdout,"Adjust completeness levels.\n");
  }
  else {
    fprintf(stdout,"Don't adjust completeness levels.\n");
  }
  if (smp1->apply_sm) {
    fprintf(stdout,"Apply smoothing to seismicity rates... ");
// gauss/power-law
    if ( smp1->gauss_kern ) {
      fprintf(stdout,"  gaussian kernel ... ");
    }
    else {
      fprintf(stdout,"  power-law kernel ... ");
    }
    if (smp1->adapt_sm) {
      fprintf(stdout," adaptive smoothing - ");
      if (smp1->nnum2_log == 0) {
        fprintf(stdout,"neighbor number %d\n", smp1->nnum);
      }
      else {
        fprintf(stdout,"average of neighbor numbers %d, %d\n", smp1->nnum, smp1->nnum2);
      }
    }
    else {
      fprintf(stdout," fixed-radius smoothing: %.1f km\n", smp1->sigfix);
    }
  }
  else {
    fprintf(stdout,"Don't apply smoothing to seismicity rates.\n");
  }
  fprintf(stdout,"Seismicity rates (10^a) written to files, %s[_M0/3/4/5.out]\n", outfnm); 
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, (%rsp)
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r15
movq 0x74c2(%rip), %rbp      # 0x9fd8
movq (%rbp), %rdi
cvtss2sd 0x14(%rsi), %xmm0
cvtss2sd 0x18(%rsi), %xmm1
leaq 0x3ddc(%rip), %rsi      # 0x6907
movb $0x2, %al
callq 0x1100
movq (%rbp), %rdi
xorps %xmm0, %xmm0
cvtss2sd 0xc(%r13), %xmm0
xorps %xmm1, %xmm1
cvtss2sd 0x10(%r13), %xmm1
leaq 0x3dce(%rip), %rsi      # 0x691d
movb $0x2, %al
callq 0x1100
movq (%rbp), %rdi
xorps %xmm0, %xmm0
cvtss2sd 0x20(%r13), %xmm0
xorps %xmm1, %xmm1
cvtss2sd 0x1c(%r13), %xmm1
leaq 0x3dc1(%rip), %rsi      # 0x6934
movb $0x2, %al
callq 0x1100
movq (%rbp), %rdi
movl 0xc(%r15), %edx
leaq 0x3dc2(%rip), %rsi      # 0x694b
xorl %eax, %eax
callq 0x1100
cmpl $0x0, 0xc(%r15)
jle 0x2bc9
xorl %ebx, %ebx
leaq 0x3ddf(%rip), %r13      # 0x697f
movq (%rbp), %rdi
xorps %xmm0, %xmm0
cvtss2sd 0x3c(%r15,%rbx,4), %xmm0
movl 0x14(%r15,%rbx,4), %edx
movq %r13, %rsi
movb $0x1, %al
callq 0x1100
incq %rbx
movslq 0xc(%r15), %rax
cmpq %rax, %rbx
jl 0x2ba0
movq (%rbp), %rdi
movl (%r12), %edx
leaq 0x3db2(%rip), %rsi      # 0x698a
xorl %eax, %eax
callq 0x1100
movq (%rbp), %rdi
leaq 0x10(%r12), %rdx
leaq 0x3db5(%rip), %rsi      # 0x69a4
xorl %eax, %eax
callq 0x1100
movq (%rbp), %rdi
xorps %xmm0, %xmm0
cvtss2sd 0x4(%r12), %xmm0
xorps %xmm1, %xmm1
cvtss2sd 0x8(%r12), %xmm1
cvtss2sd 0xc(%r12), %xmm2
leaq 0x3da2(%rip), %rsi      # 0x69be
movb $0x3, %al
callq 0x1100
cmpl $0x0, 0x8(%r15)
movq (%rbp), %rcx
je 0x2c3c
leaq 0x3daf(%rip), %rdi      # 0x69e4
movl $0x28, %esi
jmp 0x2c48
leaq 0x3dca(%rip), %rdi      # 0x6a0d
movl $0x2c, %esi
movl $0x1, %edx
callq 0x11a0
cmpl $0x0, 0x14(%r14)
movq (%rbp), %rcx
je 0x2c6b
leaq 0x3dd6(%rip), %rdi      # 0x6a3a
movl $0x2e, %esi
jmp 0x2c77
leaq 0x3df7(%rip), %rdi      # 0x6a69
movl $0x42, %esi
movl $0x1, %edx
callq 0x11a0
cmpl $0x0, (%r14)
movq (%rbp), %rcx
je 0x2c99
leaq 0x3e1a(%rip), %rdi      # 0x6aac
movl $0x19, %esi
jmp 0x2ca5
leaq 0x3e26(%rip), %rdi      # 0x6ac6
movl $0x1a, %esi
movl $0x1, %edx
callq 0x11a0
cmpl $0x0, 0x4(%r14)
movq (%rbp), %rcx
je 0x2cc8
leaq 0x3e20(%rip), %rdi      # 0x6ae1
movl $0x1c, %esi
jmp 0x2cd4
leaq 0x3e2f(%rip), %rdi      # 0x6afe
movl $0x22, %esi
movl $0x1, %edx
callq 0x11a0
cmpl $0x0, 0x8(%r14)
movq (%rbp), %rcx
je 0x2d18
leaq 0x3e31(%rip), %rdi      # 0x6b21
movl $0x27, %esi
movl $0x1, %edx
callq 0x11a0
cmpl $0x0, 0x20(%r14)
movq (%rbp), %rcx
je 0x2d33
leaq 0x3e38(%rip), %rdi      # 0x6b49
movl $0x16, %esi
jmp 0x2d3f
leaq 0x3ea8(%rip), %rdi      # 0x6bc7
movl $0x2b, %esi
movl $0x1, %edx
callq 0x11a0
jmp 0x2db7
leaq 0x3e26(%rip), %rdi      # 0x6b60
movl $0x17, %esi
movl $0x1, %edx
callq 0x11a0
cmpl $0x0, 0xc(%r14)
movq (%rbp), %rcx
je 0x2d8d
leaq 0x3e1d(%rip), %rdi      # 0x6b78
movl $0x16, %esi
movl $0x1, %edx
callq 0x11a0
cmpl $0x0, 0x10(%r14)
movq (%rbp), %rdi
movl 0x18(%r14), %edx
je 0x2da9
movl 0x1c(%r14), %ecx
leaq 0x3e1f(%rip), %rsi      # 0x6ba3
xorl %eax, %eax
callq 0x1100
jmp 0x2db7
xorps %xmm0, %xmm0
cvtss2sd 0x2c(%r14), %xmm0
leaq 0x3f49(%rip), %rsi      # 0x6ce6
movq %rcx, %rdi
movb $0x1, %al
callq 0x1100
jmp 0x2db7
leaq 0x3ddf(%rip), %rsi      # 0x6b8f
xorl %eax, %eax
callq 0x1100
movq (%rbp), %rdi
leaq 0x3e31(%rip), %rsi      # 0x6bf3
movq (%rsp), %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1100