// File: /workspace/github_c_makefile_star2_O0/radforddc[P]icpc_siggen/signal_tester.c
// Function: main
int main(int argc, char **argv) {

  MJD_Siggen_Setup setup;

  char  ans[MAX_LINE], *cp;
  int   i, ncmds;

  
  /* read config file and initialize */
  if (argc < 2) {
    printf("Usage: %s <config_file_name>\n", argv[0]);
    return 1;
  }
  if (signal_calc_init(argv[1], &setup) != 0) return 1;
  setup.coord_type = CYL;

  ncmds = sizeof(cmds)/sizeof(cmds[0]);
  while (1) {
    rl_gets(ans, MAX_LINE);
    for (cp = ans; isspace(*cp); cp++);
    if (strlen(cp) == 0) continue;
    if (strncmp(cp, "quit", 4) == 0) return 0;
    for (i = 0; i < ncmds; i++){
      if (strncmp(cp, cmds[i].cmd, strlen(cmds[i].cmd)) == 0){
	cp += strlen(cmds[i].cmd);
	cmds[i].f(cp, &setup);
	break;
      }
    } 
    if (i == ncmds){
      printf("unknown command: %s\n", ans);
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x17e0, %rsp           # imm = 0x17E0
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x2, -0x8(%rbp)
jge 0xaa50
movq -0x10(%rbp), %rax
movq (%rax), %rsi
leaq 0x3cc3(%rip), %rdi      # 0xe700
movb $0x0, %al
callq 0x2030
movl $0x1, -0x4(%rbp)
jmp 0xac39
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq -0x15c0(%rbp), %rsi
callq 0x2390
cmpl $0x0, %eax
je 0xaa75
movl $0x1, -0x4(%rbp)
jmp 0xac39
movl $0x0, -0x1218(%rbp)
movl $0xc, -0x17d0(%rbp)
leaq -0x17c0(%rbp), %rdi
movl $0x200, %esi            # imm = 0x200
callq 0xac50
leaq -0x17c0(%rbp), %rax
movq %rax, -0x17c8(%rbp)
callq 0x2140
movq (%rax), %rax
movq -0x17c8(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0xaae1
jmp 0xaacd
movq -0x17c8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x17c8(%rbp)
jmp 0xaaa8
movq -0x17c8(%rbp), %rdi
callq 0x2130
cmpq $0x0, %rax
jne 0xaaf5
jmp 0xaa89
movq -0x17c8(%rbp), %rdi
leaq 0x3c1b(%rip), %rsi      # 0xe71e
movl $0x4, %edx
callq 0x20a0
cmpl $0x0, %eax
jne 0xab1e
movl $0x0, -0x4(%rbp)
jmp 0xac39
movl $0x0, -0x17cc(%rbp)
movl -0x17cc(%rbp), %eax
cmpl -0x17d0(%rbp), %eax
jge 0xac11
movq -0x17c8(%rbp), %rax
movq %rax, -0x17e0(%rbp)
movslq -0x17cc(%rbp), %rcx
leaq 0x661a(%rip), %rax      # 0x11170
imulq $0x408, %rcx, %rcx      # imm = 0x408
addq %rcx, %rax
movq %rax, -0x17d8(%rbp)
movslq -0x17cc(%rbp), %rax
leaq 0x65fb(%rip), %rdi      # 0x11170
imulq $0x408, %rax, %rax      # imm = 0x408
addq %rax, %rdi
callq 0x2130
movq -0x17e0(%rbp), %rdi
movq -0x17d8(%rbp), %rsi
movq %rax, %rdx
callq 0x20a0
cmpl $0x0, %eax
jne 0xabfb
movslq -0x17cc(%rbp), %rax
leaq 0x65c3(%rip), %rdi      # 0x11170
imulq $0x408, %rax, %rax      # imm = 0x408
addq %rax, %rdi
callq 0x2130
addq -0x17c8(%rbp), %rax
movq %rax, -0x17c8(%rbp)
movslq -0x17cc(%rbp), %rcx
leaq 0x6598(%rip), %rax      # 0x11170
imulq $0x408, %rcx, %rcx      # imm = 0x408
addq %rcx, %rax
movq 0x200(%rax), %rax
movq -0x17c8(%rbp), %rdi
leaq -0x15c0(%rbp), %rsi
callq *%rax
jmp 0xac11
jmp 0xabfd
movl -0x17cc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x17cc(%rbp)
jmp 0xab28
movl -0x17cc(%rbp), %eax
cmpl -0x17d0(%rbp), %eax
jne 0xac34
leaq -0x17c0(%rbp), %rsi
leaq 0x3af6(%rip), %rdi      # 0xe723
movb $0x0, %al
callq 0x2030
jmp 0xaa89
movl -0x4(%rbp), %eax
addq $0x17e0, %rsp           # imm = 0x17E0
popq %rbp
retq
nopw %cs:(%rax,%rax)