// File: /workspace/github_c_makefile_star2_O0/usgs[P]nshmp-haz-catalogs/src/agrid/adaptive/ck_args_wt_results.c
// Function: check_args
int check_args(int argc, char **argv, char *paramf, char *summf, char *paramf_format, int *stop_run, int *newp)
/*--------------------------------------------------------------------------*/
{
/* CHECK INPUT ARGUMENTS */
  if (  (argc != 2) && (argc != 4) && (argc !=5)  ) {
    fprintf(stderr,"USAGE: %s [parameter file] [parameter file formatting (new/old)] [summary file name] [[ optional quit before run (1) ]]\n", argv[0]);
    fprintf(stderr,"For parameter file formatting, enter -h, as single command line argument.\n");
    fprintf(stderr,"Enter (new/old) to specify the formatting style for the parameter file.\n");
    fprintf(stderr,"Optional quit argument will stop run before seismicity rate calculations to permit check of parameters.\n"); exit(1);
  }
  sscanf(argv[1],"%s",paramf);
  if ( argc > 2) {
    sscanf(argv[2],"%s",paramf_format);
    sscanf(argv[3],"%s",summf);
    if (argc > 4) sscanf(argv[4],"%d", stop_run);
  }

// check for help option
  if ( STREQ(paramf,"-h") ) {
    print_param_format();
    return 1;
  }
// check pareter file formatting
  if ( STREQ(paramf_format,"new") ) {
    fprintf(stderr,"Using new parameter file formatting...\n");
    *newp=1;
    return 0;
  }
  else if ( STREQ(paramf_format,"old") ) {
    fprintf(stderr,"Using old parameter file formatting...\n");
    *newp=0;
    return 0;
  }
  else {
    fprintf(stderr,"User must enter 'new' or 'old' to specify the style of formatting for the parameter file - %s.\n", paramf_format);
    return 1;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq 0x10(%rbp), %rax
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
cmpl $0x2, -0x8(%rbp)
je 0x6706
cmpl $0x4, -0x8(%rbp)
je 0x6706
cmpl $0x5, -0x8(%rbp)
je 0x6706
movq 0x595c(%rip), %rax      # 0xbff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
leaq 0x2f9b(%rip), %rsi      # 0x9648
movb $0x0, %al
callq 0x10e0
movq 0x593d(%rip), %rax      # 0xbff8
movq (%rax), %rdi
leaq 0x2ffc(%rip), %rsi      # 0x96c1
movb $0x0, %al
callq 0x10e0
movq 0x5925(%rip), %rax      # 0xbff8
movq (%rax), %rdi
leaq 0x302f(%rip), %rsi      # 0x970c
movb $0x0, %al
callq 0x10e0
movq 0x590d(%rip), %rax      # 0xbff8
movq (%rax), %rdi
leaq 0x3060(%rip), %rsi      # 0x9755
movb $0x0, %al
callq 0x10e0
movl $0x1, %edi
callq 0x1160
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rdx
leaq 0x1c62(%rip), %rsi      # 0x837b
movb $0x0, %al
callq 0x1100
cmpl $0x2, -0x8(%rbp)
jle 0x677c
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x28(%rbp), %rdx
leaq 0x1c42(%rip), %rsi      # 0x837b
movb $0x0, %al
callq 0x1100
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rdx
leaq 0x1c28(%rip), %rsi      # 0x837b
movb $0x0, %al
callq 0x1100
cmpl $0x4, -0x8(%rbp)
jle 0x677a
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x30(%rbp), %rdx
leaq 0x1c02(%rip), %rsi      # 0x8375
movb $0x0, %al
callq 0x1100
jmp 0x677c
movq -0x18(%rbp), %rdi
leaq 0x3037(%rip), %rsi      # 0x97be
callq 0x10d0
cmpl $0x0, %eax
jne 0x67a2
callq 0x1290
movl $0x1, -0x4(%rbp)
jmp 0x6845
movq -0x28(%rbp), %rdi
leaq 0x3014(%rip), %rsi      # 0x97c1
callq 0x10d0
cmpl $0x0, %eax
jne 0x67e2
movq 0x583a(%rip), %rax      # 0xbff8
movq (%rax), %rdi
leaq 0x2ffd(%rip), %rsi      # 0x97c5
movb $0x0, %al
callq 0x10e0
movq 0x10(%rbp), %rax
movl $0x1, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x6845
movq -0x28(%rbp), %rdi
leaq 0x3000(%rip), %rsi      # 0x97ed
callq 0x10d0
cmpl $0x0, %eax
jne 0x6822
movq 0x57fa(%rip), %rax      # 0xbff8
movq (%rax), %rdi
leaq 0x2fe9(%rip), %rsi      # 0x97f1
movb $0x0, %al
callq 0x10e0
movq 0x10(%rbp), %rax
movl $0x0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x6845
movq 0x57cf(%rip), %rax      # 0xbff8
movq (%rax), %rdi
movq -0x28(%rbp), %rdx
leaq 0x2fe2(%rip), %rsi      # 0x9819
movb $0x0, %al
callq 0x10e0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop