// File: /workspace/github_c_makefile_star2_O1/0xADE1A1DE[P]MeasureSuite/bin/arg_parse.c
// Function: parse
int parse(struct opts *dest, int argc, char *argv[]) {
  *dest = default_opts;

  while (1) {
    int this_option_optind = optind ? optind : 1;
    int option_index = 0;

    int option =
        getopt_long(argc, argv, "w:i:o:n:b:cs:", long_options, &option_index);
    if (option == -1)
      break;

    switch (option) {
    case 'c':
      dest->check = 1;
      break;
    case 'w':
      PARSE(dest->arg_width)
      break;
    case 'i':
      PARSE(dest->arg_num_in);
      break;
    case 'o':
      PARSE(dest->arg_num_out);
      break;
    case 'n':
      PARSE(dest->num_batches);
      break;
    case 'b':
      PARSE(dest->batch_size);
      break;
    case 's':
      DEBUG("reading symbol now %s\n", optarg);
      if (optarg == NULL)
        break;
      dest->sym = calloc(strlen(optarg), sizeof(char));
      if (dest->sym == NULL) {
        break;
      }
      strncpy(dest->sym, optarg, strlen(optarg));
      DEBUG("symbol %s\n", optarg);
      break;

    case '?':
      break;

    default:
      printf("?? getopt returned character code 0%o ??\n", option);
    }
  }

  return optind;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movl %esi, %ebp
movups 0x2c2a(%rip), %xmm0     # 0x5040
movups %xmm0, 0x10(%rdi)
movups 0x2c0f(%rip), %xmm0     # 0x5030
movq %rdi, 0x8(%rsp)
movups %xmm0, (%rdi)
leaq 0x6690(%rip), %r12      # 0x8ac0
leaq 0x14(%rsp), %r13
movl $0x0, 0x14(%rsp)
movl %ebp, %edi
movq %rbx, %rsi
leaq 0x2c07(%rip), %rdx      # 0x5050
movq %r12, %rcx
movq %r13, %r8
callq 0x20c0
cmpl $0x62, %eax
jg 0x2481
cmpl $0x3f, %eax
je 0x2435
cmpl $0x62, %eax
jne 0x24d9
movq 0x6b6e(%rip), %rax      # 0x8fd8
movq (%rax), %rdi
testq %rdi, %rdi
je 0x2435
callq 0x2240
movq 0x8(%rsp), %rcx
movl %eax, 0x10(%rcx)
jmp 0x2435
leal -0x6e(%rax), %ecx
cmpl $0x9, %ecx
ja 0x24ba
leaq 0x2b74(%rip), %rdx      # 0x5004
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq 0x6b38(%rip), %rax      # 0x8fd8
movq (%rax), %rdi
testq %rdi, %rdi
je 0x2435
callq 0x2240
movq 0x8(%rsp), %rcx
movl %eax, 0xc(%rcx)
jmp 0x2435
cmpl $0x69, %eax
je 0x2598
cmpl $0x63, %eax
jne 0x24e2
movq 0x8(%rsp), %rax
movl $0x1, 0x14(%rax)
jmp 0x2435
cmpl $-0x1, %eax
je 0x25bd
leaq 0x2b75(%rip), %rdi      # 0x505e
movl %eax, %esi
xorl %eax, %eax
callq 0x20d0
jmp 0x2435
movq 0x6ada(%rip), %rax      # 0x8fd8
movq (%rax), %rdi
testq %rdi, %rdi
je 0x2435
callq 0x2240
movq 0x8(%rsp), %rcx
movl %eax, 0x8(%rcx)
jmp 0x2435
movq 0x6ab5(%rip), %rax      # 0x8fd8
movq (%rax), %r14
testq %r14, %r14
je 0x2435
movq %r14, %rdi
callq 0x20a0
movl $0x1, %esi
movq %rax, %rdi
callq 0x2160
movq %rax, %r15
movq 0x8(%rsp), %rax
movq %r15, 0x18(%rax)
testq %r15, %r15
je 0x2435
movq %r14, %rdi
callq 0x20a0
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x2070
jmp 0x2435
movq 0x6a5d(%rip), %rax      # 0x8fd8
movq (%rax), %rdi
testq %rdi, %rdi
je 0x2435
callq 0x2240
movq 0x8(%rsp), %rcx
movl %eax, (%rcx)
jmp 0x2435
movq 0x6a39(%rip), %rax      # 0x8fd8
movq (%rax), %rdi
testq %rdi, %rdi
je 0x2435
callq 0x2240
movq 0x8(%rsp), %rcx
movl %eax, 0x4(%rcx)
jmp 0x2435
movq 0x6a0c(%rip), %rax      # 0x8fd0
movl (%rax), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)