user: Translate the below assembly code into C programming language:

```asm
<cmdln_get_nsec_or_help>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x20,%rsp
  mov    %rdx,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  movabs $0x3736353433323130,%rax
  mov    %rax,0xe(%rsp)
  movw   $0x3938,0x16(%rsp)
  cmp    $0x2,%esi
  je     L131
  jg     L68
L28:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L8
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L131:
  mov    %rdi,%rbp
  mov    0x8(%rdx),%r12
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    %r12,%r9
  lea    (%r12,%rax,1),%r10
  mov    $0x0,%ecx
  lea    0x18(%rsp),%r8
  jmp    L108
L19:
  add    $0x1,%r9
L108:
  cmp    %r10,%r9
  je     L89
  movzbl (%r9),%edi
  lea    0xe(%rsp),%rdx
L125:
  cmp    (%rdx),%dil
  sete   %sil
  movzbl %sil,%esi
  add    %esi,%ecx
  add    $0x1,%rdx
  cmp    %r8,%rdx
  jne    L125
  jmp    L19
L89:
  movslq %ecx,%rcx
  cmp    %rcx,%rax
  je     L7
  lea    D34(%rip),%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L64
  lea    D26(%rip),%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L64
  lea    D21(%rip),%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L76
L64:
  mov    (%rbx),%rsi
  lea    D32(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L28
L7:
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <atoi@plt>
  mov    %eax,0x0(%rbp)
  jmp    L28
L76:
  mov    %r12,%rsi
  lea    D51(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L68:
  mov    (%rdx),%rsi
  lea    D32(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L28
L8:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D34
data_type: string
name: disassemble_data
arguments: data_label: D26
data_type: string
name: disassemble_data
arguments: data_label: D21
data_type: string
name: disassemble_data
arguments: data_label: D32
data_type: string
name: disassemble_data
arguments: data_label: D51
data_type: string

tool: D34: help

tool: D26: -help

tool: D21: --help

tool: D32: Usage: %s [ string [-[-]]help | int seconds] 


tool: D51:  Did not understand argument " %s ".


assistant: ```c
void cmdln_get_nsec_or_help(int *nsec, int argc, char *argv[]) {
  int i, j;
  char digits[10] = {"0"
                     "1"
                     "2"
                     "3"
                     "4"
                     "5"
                     "6"
                     "7"
                     "8"
                     "9"};
  int knt = 0;
  if (argc == 2) {
    for (j = 0; j < strlen(argv[1]); j++)
      for (i = 0; i < 10; i++)
        if (argv[1][j] == digits[i]) {
          knt++;
        };
    if (knt == strlen(argv[1])) {
      *nsec = atoi(argv[1]);
    } else if (!strcmp(argv[1], "help") || !strcmp(argv[1], "-help") || !strcmp(argv[1], "--help"))
      printf("Usage: %s [ string [-[-]]help | int seconds] \n", argv[0]);
    else {
      printf(" Did not understand argument \" %s \".\n", argv[1]);
      exit(1);
    }
  }
  if (argc > 2)
    printf("Usage: %s [ string [-[-]]help | int seconds] \n", argv[0]);
}
```