// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/converters/fsio/dos11.c
// Function: dos11Set
static void dos11Set(
  struct mountedFS *mount,
  uint8_t UNUSED(unit),
  uint8_t UNUSED(present)
)
{
  struct DOS11data *data = &mount->dos11data;
  int idx = 0;
  uint8_t user, group;

  while (setCmds[idx] != NULL) {
    if (strcmp(words[1], setCmds[idx]) == 0) {
      switch (idx) {
        case DOS11SET_UIC:
          if (args == 3) {
            if (sscanf(words[2], "[%hho,%hho]", &group, &user) == 2) {
              data->group = group;
              data->user = user;
            } else fprintf(stderr,
                           "dos11: UIC syntax error \"%s\"\n", words[2]);
          } else fprintf(stderr, "dos11: Invalid syntax for \"set uic\"\n");
          return;

        case DOS11SET_UFD:
          if (args == 3) {
            if (sscanf(words[2], "[%hho,%hho]", &group, &user) == 2) {
              if (dos11CreateUFD(mount, group, user) != 0) {
                data->group = group;
                data->user = user;
              }
            } else fprintf(stderr,
                           "dos11: UIC syntax error \"%s\"\n", words[2]);
          } else fprintf(stderr, "dos11: Invalid syntax for \"set ufd\"\n");
          return;

        default:
          fprintf(stderr, "dos11: \"%s\" not implemented\n", words[1]);
          return;
      }
    }
    idx++;
  }
  fprintf(stderr, "dos11: Unknown set command \"%s\"\n", words[1]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movb %sil, %cl
movq %rdi, -0x8(%rbp)
movb %cl, -0x9(%rbp)
movb %al, -0xa(%rbp)
movq -0x8(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movslq -0x1c(%rbp), %rcx
leaq 0x151eb(%rip), %rax     # 0x1eba0
cmpq $0x0, (%rax,%rcx,8)
je 0x9b83
leaq 0x15911(%rip), %rax     # 0x1f2d8
movq (%rax), %rax
movq 0x8(%rax), %rdi
movslq -0x1c(%rbp), %rcx
leaq 0x151c7(%rip), %rax     # 0x1eba0
movq (%rax,%rcx,8), %rsi
callq 0x31b0
cmpl $0x0, %eax
jne 0x9b75
movl -0x1c(%rbp), %eax
movl %eax, -0x24(%rbp)
testl %eax, %eax
je 0x9a08
jmp 0x99f7
movl -0x24(%rbp), %eax
subl $0x1, %eax
je 0x9a9e
jmp 0x9b4d
leaq 0x158c1(%rip), %rax     # 0x1f2d0
cmpl $0x3, (%rax)
jne 0x9a81
leaq 0x158bd(%rip), %rax     # 0x1f2d8
movq (%rax), %rax
movq 0x10(%rax), %rdi
leaq 0x10191(%rip), %rsi     # 0x19bba
leaq -0x1e(%rbp), %rdx
leaq -0x1d(%rbp), %rcx
movb $0x0, %al
callq 0x3210
cmpl $0x2, %eax
jne 0x9a59
movb -0x1e(%rbp), %cl
movq -0x18(%rbp), %rax
movb %cl, 0x90c(%rax)
movb -0x1d(%rbp), %cl
movq -0x18(%rbp), %rax
movb %cl, 0x90d(%rax)
jmp 0x9a7f
movq 0x14598(%rip), %rax     # 0x1dff8
movq (%rax), %rdi
leaq 0x1586e(%rip), %rax     # 0x1f2d8
movq (%rax), %rax
movq 0x10(%rax), %rdx
leaq 0x1014e(%rip), %rsi     # 0x19bc6
movb $0x0, %al
callq 0x31c0
jmp 0x9a99
movq 0x14570(%rip), %rax     # 0x1dff8
movq (%rax), %rdi
leaq 0x10152(%rip), %rsi     # 0x19be4
movb $0x0, %al
callq 0x31c0
jmp 0x9ba9
leaq 0x1582b(%rip), %rax     # 0x1f2d0
cmpl $0x3, (%rax)
jne 0x9b33
leaq 0x15823(%rip), %rax     # 0x1f2d8
movq (%rax), %rax
movq 0x10(%rax), %rdi
leaq 0x100f7(%rip), %rsi     # 0x19bba
leaq -0x1e(%rbp), %rdx
leaq -0x1d(%rbp), %rcx
movb $0x0, %al
callq 0x3210
cmpl $0x2, %eax
jne 0x9b0b
movq -0x8(%rbp), %rdi
movb -0x1e(%rbp), %al
movzbl %al, %esi
movzbl -0x1d(%rbp), %edx
callq 0xb480
cmpl $0x0, %eax
je 0x9b09
movb -0x1e(%rbp), %cl
movq -0x18(%rbp), %rax
movb %cl, 0x90c(%rax)
movb -0x1d(%rbp), %cl
movq -0x18(%rbp), %rax
movb %cl, 0x90d(%rax)
jmp 0x9b31
movq 0x144e6(%rip), %rax     # 0x1dff8
movq (%rax), %rdi
leaq 0x157bc(%rip), %rax     # 0x1f2d8
movq (%rax), %rax
movq 0x10(%rax), %rdx
leaq 0x1009c(%rip), %rsi     # 0x19bc6
movb $0x0, %al
callq 0x31c0
jmp 0x9b4b
movq 0x144be(%rip), %rax     # 0x1dff8
movq (%rax), %rdi
leaq 0x100c5(%rip), %rsi     # 0x19c09
movb $0x0, %al
callq 0x31c0
jmp 0x9ba9
movq 0x144a4(%rip), %rax     # 0x1dff8
movq (%rax), %rdi
leaq 0x1577a(%rip), %rax     # 0x1f2d8
movq (%rax), %rax
movq 0x8(%rax), %rdx
leaq 0x100c2(%rip), %rsi     # 0x19c2e
movb $0x0, %al
callq 0x31c0
jmp 0x9ba9
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x99aa
movq 0x1446e(%rip), %rax     # 0x1dff8
movq (%rax), %rdi
leaq 0x15744(%rip), %rax     # 0x1f2d8
movq (%rax), %rax
movq 0x8(%rax), %rdx
leaq 0x100a9(%rip), %rsi     # 0x19c4b
movb $0x0, %al
callq 0x31c0
addq $0x30, %rsp
popq %rbp
retq
nop