// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: getDigits
static int getDigits(const char *zDate, const char *zFormat, ...){
  /* The aMx[] array translates the 3rd character of each format
  ** spec into a max size:    a   b   c   d   e     f */
  static const u16 aMx[] = { 12, 14, 24, 31, 59, 9999 };
  va_list ap;
  int cnt = 0;
  char nextC;
  va_start(ap, zFormat);
  do{
    char N = zFormat[0] - '0';
    char min = zFormat[1] - '0';
    int val = 0;
    u16 max;

    assert( zFormat[2]>='a' && zFormat[2]<='f' );
    max = aMx[zFormat[2] - 'a'];
    nextC = zFormat[3];
    val = 0;
    while( N-- ){
      if( !sqlite3Isdigit(*zDate) ){
        goto end_getDigits;
      }
      val = val*10 + *zDate - '0';
      zDate++;
    }
    if( val<(int)min || val>(int)max || (nextC!=0 && nextC!=*zDate) ){
      goto end_getDigits;
    }
    *va_arg(ap,int*) = val;
    zDate++;
    cnt++;
    zFormat += 4;
  }while( nextC );
end_getDigits:
  va_end(ap);
  return cnt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
testb %al, %al
je 0x46c97b
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
movq %r9, -0xc8(%rbp)
movq %r8, -0xd0(%rbp)
movq %rcx, -0xd8(%rbp)
movq %rdx, -0xe0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x34(%rbp)
leaq -0x30(%rbp), %rax
leaq -0xf0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
subl $0x30, %eax
movb %al, -0x36(%rbp)
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %eax
subl $0x30, %eax
movb %al, -0x37(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movsbl 0x2(%rax), %eax
subl $0x61, %eax
movslq %eax, %rcx
leaq 0x13e22b(%rip), %rax    # 0x5aac2c
movw (%rax,%rcx,2), %ax
movw %ax, -0x3e(%rbp)
movq -0x10(%rbp), %rax
movb 0x3(%rax), %al
movb %al, -0x35(%rbp)
movl $0x0, -0x3c(%rbp)
movb -0x36(%rbp), %al
movb %al, %cl
addb $-0x1, %cl
movb %cl, -0x36(%rbp)
cmpb $0x0, %al
je 0x46ca6b
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x13a197(%rip), %rax    # 0x5a6bd0
movzbl (%rax,%rcx), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0x46ca4a
jmp 0x46cb3e
imull $0xa, -0x3c(%rbp), %eax
movq -0x8(%rbp), %rcx
movsbl (%rcx), %ecx
addl %ecx, %eax
subl $0x30, %eax
movl %eax, -0x3c(%rbp)
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x46ca1a
movl -0x3c(%rbp), %eax
movsbl -0x37(%rbp), %ecx
cmpl %ecx, %eax
jl 0x46ca99
movl -0x3c(%rbp), %eax
movzwl -0x3e(%rbp), %ecx
cmpl %ecx, %eax
jg 0x46ca99
movsbl -0x35(%rbp), %eax
cmpl $0x0, %eax
je 0x46ca9e
movsbl -0x35(%rbp), %eax
movq -0x8(%rbp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
je 0x46ca9e
jmp 0x46cb3e
movl -0x3c(%rbp), %eax
movl %eax, -0x104(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0x100(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0xf4(%rbp)
cmpl $0x28, %eax
ja 0x46cae2
movq -0x100(%rbp), %rcx
movl -0xf4(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x110(%rbp)
jmp 0x46caff
movq -0x100(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x110(%rbp)
movl -0x104(%rbp), %ecx
movq -0x110(%rbp), %rax
movq (%rax), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x10(%rbp)
cmpb $0x0, -0x35(%rbp)
jne 0x46c9ca
jmp 0x46cb3e
movl -0x34(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopw (%rax,%rax)