// File: /workspace/github_c_makefile_star2_O0/mmayer[P]pcal/src/pcal.c
// Function: display_usage
void display_usage (FILE *fp,       /* destination of usage message */
                    int fullmsg)    /* print complete message? */
{
   FLAG_MSG *pflag;
   PARAM_MSG *ppar;
   char buf[30], *p, flag, *meta;
   int nchars, first, i, indent, n;
   
   sprintf(buf, "%s: %s", W_USAGE, progname);
   nchars = indent = strlen(buf);
   first = TRUE;
   meta = p = NULL;
   fprintf(fp, "\n%s", buf);
   
   /* convert various values to strings for printing (cf. pcallang.h) */
   sprintf(Xtval, "%d", 0);
   sprintf(Ytval, "%d", 0);
   sprintf(Xsval, "%.3f", 1.0);
   sprintf(Ysval, "%.3f", 1.0);
   sprintf(gen_diags_val, "%d", 0);
   
   sprintf(Ncopy, "%d", NCOPY);
   
   /* Display the basic command-line syntax message (by group of flags)... */
   
   for (pflag = flag_msg; (flag = pflag->flag) != '\0'; pflag++) {
      if (flag == '\n') {   /* end of group? */
         if (p) *p = '\0';
         if (meta) {   /* append metavariable name */
            strcat(buf, " ");
            strcat(buf, meta);
         }
         strcat(buf, "]");
         n = strlen(buf);
         if (nchars + n > SCREENWIDTH) {   /* does it fit on line? */
            fprintf(fp, "\n");   /* no - start new one */
            for (nchars = 0; nchars < indent; nchars++) fprintf(fp, " ");
         }
         fprintf(fp, "%s", buf);
         nchars += n;
         first = TRUE;
      }
      else if (flag != ' ') {   /* accumulate flags for group */
         if (first) {
            sprintf(buf, " [");
            p = buf + strlen(buf);
         }
         else *p++ = '|';

         *p++ = '-';
         *p++ = flag;
         meta = pflag->meta;   /* save metavariable name */
         first = FALSE;
      }
   }

   /* After displaying all the possible flag options, we now loop to append a
      display of the various possible formats of the numeric parameter
      descriptions (starting year, starting month, and number of months, in
      various permutations)... */

   for (i = 0; i < PARAM_MSGS; i++) {
      sprintf(buf, " [%s]%s", param_msg[i].desc, i < PARAM_MSGS - 1 ? " |" : "");
      n = strlen(buf);
      if (nchars + n > SCREENWIDTH) {   /* does it fit on line? */
         fprintf(fp, "\n");   /* no - start new one */
         for (nchars = 0; nchars < indent; nchars++) fprintf(fp, " ");
      }
      fprintf(fp, "%s", buf);
      nchars += n;
   }
   
   fprintf(fp, "\n\n");
   if (! fullmsg) {
      fprintf(fp, USAGE_MSG, progname, F_HELP);
      return;
   }
   
   /* Display detailed descriptions of each of the possible command-line
      flags... */

   for (pflag = flag_msg; (flag = pflag->flag) != '\0'; pflag++) {
      if (flag == '\n') {   /* newline?  print and quit */
         fprintf(fp, "\n");
         continue;
      }
      p = buf;   /* copy flag and metavariable to buffer */
      if (flag != ' ') *p++ = '-';
      
      *p++ = flag;
      
      *p = '\0';
      if (pflag->meta) sprintf(p, " %s", pflag->meta);

      fprintf(fp, "\t%-20.20s", buf);
      if (pflag->text) fprintf(fp, "%s", pflag->text);

      /* print default value if specified */
      if (pflag->def) {
         fprintf(fp, " (%s: %s)", W_DEFAULT, pflag->def[0] ? pflag->def : "\"\"" );
      }
      fprintf(fp, "\n");

      /* special case - print color messages after F_OUTLINE_GRAY */
      if (flag == F_OUTLINE_GRAY) {
         fprintf(fp, "\t%20s  (%s: %s)\n", "", W_DEFAULT, color_msg());
      }

   }
   
   /* now print the information about the numeric parameters */
   
   for (ppar = param_msg; ppar->desc; ppar++) {
      fprintf(fp, "\t%-16.16s%s\n", ppar->desc, ppar->text);
   }

   fprintf(fp, "\n");

   return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq -0x40(%rbp), %rdi
leaq 0x16469(%rip), %rsi     # 0x1bdf6
leaq 0x16469(%rip), %rdx     # 0x1bdfd
leaq 0x2cf15(%rip), %rcx     # 0x328b0
movb $0x0, %al
callq 0x52a0
leaq -0x40(%rbp), %rdi
callq 0x50e0
movl %eax, -0x68(%rbp)
movl %eax, -0x5c(%rbp)
movl $0x1, -0x60(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x40(%rbp), %rdx
leaq 0x1642c(%rip), %rsi     # 0x1be03
movb $0x0, %al
callq 0x51b0
leaq 0x2cd87(%rip), %rdi     # 0x3276c
leaq 0x1fb74(%rip), %rsi     # 0x25560
xorl %edx, %edx
movb $0x0, %al
callq 0x52a0
leaq 0x2cd7c(%rip), %rdi     # 0x32778
leaq 0x1fb5d(%rip), %rsi     # 0x25560
xorl %edx, %edx
movb $0x0, %al
callq 0x52a0
leaq 0x2cd71(%rip), %rdi     # 0x32784
leaq 0x163ed(%rip), %rsi     # 0x1be07
movsd 0x155e6(%rip), %xmm0    # 0x1b008
movb $0x1, %al
callq 0x52a0
leaq 0x2cd60(%rip), %rdi     # 0x32790
leaq 0x163d0(%rip), %rsi     # 0x1be07
movsd 0x155c9(%rip), %xmm0    # 0x1b008
movb $0x1, %al
callq 0x52a0
leaq 0x2cd13(%rip), %rdi     # 0x32760
leaq 0x1fb0c(%rip), %rsi     # 0x25560
xorl %edx, %edx
movb $0x0, %al
callq 0x52a0
leaq 0x2cd38(%rip), %rdi     # 0x3279c
leaq 0x1faf5(%rip), %rsi     # 0x25560
movl $0x1, %edx
movb $0x0, %al
callq 0x52a0
leaq 0x292d2(%rip), %rax     # 0x2ed50
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb (%rax), %al
movb %al, -0x49(%rbp)
movsbl %al, %eax
cmpl $0x0, %eax
je 0x5c0e
movsbl -0x49(%rbp), %eax
cmpl $0xa, %eax
jne 0x5b68
cmpq $0x0, -0x48(%rbp)
je 0x5ab2
movq -0x48(%rbp), %rax
movb $0x0, (%rax)
cmpq $0x0, -0x58(%rbp)
je 0x5ad6
leaq -0x40(%rbp), %rdi
leaq 0x24d24(%rip), %rsi     # 0x2a7e8
callq 0x5290
leaq -0x40(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x5290
leaq -0x40(%rbp), %rdi
leaq 0x24cbe(%rip), %rsi     # 0x2a79f
callq 0x5290
leaq -0x40(%rbp), %rdi
callq 0x50e0
movl %eax, -0x6c(%rbp)
movl -0x5c(%rbp), %eax
addl -0x6c(%rbp), %eax
cmpl $0x4e, %eax
jle 0x5b3d
movq -0x8(%rbp), %rdi
leaq 0x22a21(%rip), %rsi     # 0x28529
movb $0x0, %al
callq 0x51b0
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0x68(%rbp), %eax
jge 0x5b3b
movq -0x8(%rbp), %rdi
leaq 0x24cbf(%rip), %rsi     # 0x2a7e8
movb $0x0, %al
callq 0x51b0
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x5b16
jmp 0x5b3d
movq -0x8(%rbp), %rdi
leaq -0x40(%rbp), %rdx
leaq 0x162b8(%rip), %rsi     # 0x1be04
movb $0x0, %al
callq 0x51b0
movl -0x6c(%rbp), %eax
addl -0x5c(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl $0x1, -0x60(%rbp)
jmp 0x5bfb
movsbl -0x49(%rbp), %eax
cmpl $0x20, %eax
je 0x5bf9
cmpl $0x0, -0x60(%rbp)
je 0x5bae
leaq -0x40(%rbp), %rdi
leaq 0x2011a(%rip), %rsi     # 0x25ca0
movb $0x0, %al
callq 0x52a0
leaq -0x40(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x50e0
movq %rax, %rcx
movq -0x78(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x48(%rbp)
jmp 0x5bc0
movq -0x48(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x48(%rbp)
movb $0x7c, (%rax)
movq -0x48(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x48(%rbp)
movb $0x2d, (%rax)
movb -0x49(%rbp), %cl
movq -0x48(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x48(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x58(%rbp)
movl $0x0, -0x60(%rbp)
jmp 0x5bfb
jmp 0x5bfd
movq -0x18(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x18(%rbp)
jmp 0x5a82
movl $0x0, -0x64(%rbp)
cmpl $0x3, -0x64(%rbp)
jge 0x5ce2
leaq -0x40(%rbp), %rdi
movslq -0x64(%rbp), %rcx
leaq 0x29d02(%rip), %rax     # 0x2f930
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdx
movl -0x64(%rbp), %esi
leaq 0x20049(%rip), %rcx     # 0x25c8b
leaq 0x161cb(%rip), %rax     # 0x1be14
cmpl $0x2, %esi
cmovlq %rax, %rcx
leaq 0x161b5(%rip), %rsi     # 0x1be0c
movb $0x0, %al
callq 0x52a0
leaq -0x40(%rbp), %rdi
callq 0x50e0
movl %eax, -0x6c(%rbp)
movl -0x5c(%rbp), %eax
addl -0x6c(%rbp), %eax
cmpl $0x4e, %eax
jle 0x5cb5
movq -0x8(%rbp), %rdi
leaq 0x228a9(%rip), %rsi     # 0x28529
movb $0x0, %al
callq 0x51b0
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0x68(%rbp), %eax
jge 0x5cb3
movq -0x8(%rbp), %rdi
leaq 0x24b47(%rip), %rsi     # 0x2a7e8
movb $0x0, %al
callq 0x51b0
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x5c8e
jmp 0x5cb5
movq -0x8(%rbp), %rdi
leaq -0x40(%rbp), %rdx
leaq 0x16140(%rip), %rsi     # 0x1be04
movb $0x0, %al
callq 0x51b0
movl -0x6c(%rbp), %eax
addl -0x5c(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x5c15
movq -0x8(%rbp), %rdi
leaq 0x23ee3(%rip), %rsi     # 0x29bd0
movb $0x0, %al
callq 0x51b0
cmpl $0x0, -0xc(%rbp)
jne 0x5d1d
movq -0x8(%rbp), %rdi
leaq 0x16112(%rip), %rsi     # 0x1be17
leaq 0x2cba4(%rip), %rdx     # 0x328b0
movl $0x68, %ecx
movb $0x0, %al
callq 0x51b0
jmp 0x5f19
leaq 0x2902c(%rip), %rax     # 0x2ed50
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb (%rax), %al
movb %al, -0x49(%rbp)
movsbl %al, %eax
cmpl $0x0, %eax
je 0x5ec3
movsbl -0x49(%rbp), %eax
cmpl $0xa, %eax
jne 0x5d5d
movq -0x8(%rbp), %rdi
leaq 0x227d8(%rip), %rsi     # 0x28529
movb $0x0, %al
callq 0x51b0
jmp 0x5eb2
leaq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
movsbl -0x49(%rbp), %eax
cmpl $0x20, %eax
je 0x5d80
movq -0x48(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x48(%rbp)
movb $0x2d, (%rax)
movb -0x49(%rbp), %cl
movq -0x48(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x48(%rbp)
movb %cl, (%rax)
movq -0x48(%rbp), %rax
movb $0x0, (%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x5dc0
movq -0x48(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x16040(%rip), %rsi     # 0x1bdf9
movb $0x0, %al
callq 0x52a0
movq -0x8(%rbp), %rdi
leaq -0x40(%rbp), %rdx
leaq 0x16091(%rip), %rsi     # 0x1be60
movb $0x0, %al
callq 0x51b0
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x5dfb
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdx
leaq 0x16010(%rip), %rsi     # 0x1be04
movb $0x0, %al
callq 0x51b0
movq -0x18(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x5e5f
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x5e2f
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x88(%rbp)
jmp 0x5e3f
leaq 0x16046(%rip), %rax     # 0x1be7c
movq %rax, -0x88(%rbp)
jmp 0x5e3f
movq -0x80(%rbp), %rdi
movq -0x88(%rbp), %rcx
leaq 0x16019(%rip), %rsi     # 0x1be6a
leaq 0x1601c(%rip), %rdx     # 0x1be74
movb $0x0, %al
callq 0x51b0
movq -0x8(%rbp), %rdi
leaq 0x226bf(%rip), %rsi     # 0x28529
movb $0x0, %al
callq 0x51b0
movsbl -0x49(%rbp), %eax
cmpl $0x47, %eax
jne 0x5eb0
movq -0x8(%rbp), %rax
movq %rax, -0x90(%rbp)
callq 0x5f30
movq -0x90(%rbp), %rdi
movq %rax, %r8
leaq 0x15fe4(%rip), %rsi     # 0x1be7f
leaq 0x1fde9(%rip), %rdx     # 0x25c8b
leaq 0x15fcb(%rip), %rcx     # 0x1be74
movb $0x0, %al
callq 0x51b0
jmp 0x5eb2
movq -0x18(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x18(%rbp)
jmp 0x5d28
leaq 0x29a66(%rip), %rax     # 0x2f930
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
je 0x5f07
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rcx
leaq 0x15f9e(%rip), %rsi     # 0x1be90
movb $0x0, %al
callq 0x51b0
movq -0x20(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x20(%rbp)
jmp 0x5ece
movq -0x8(%rbp), %rdi
leaq 0x22617(%rip), %rsi     # 0x28529
movb $0x0, %al
callq 0x51b0
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)