// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/htscodecs/htscodecs/tokenise_name3.c
// Function: append_uint32_var
static int append_uint32_var(char *cp, uint32_t i) {
    char *op = cp;
    uint32_t j;

    //if (i < 10)         goto b0;
    if (i < 100)        goto b1;
    //if (i < 1000)       goto b2;
    if (i < 10000)      goto b3;
    //if (i < 100000)     goto b4;
    if (i < 1000000)    goto b5;
    //if (i < 10000000)   goto b6;
    if (i < 100000000)  goto b7;

    if ((j = i / 1000000000)) {*cp++ = j + '0'; i -= j*1000000000; goto x8;}
    if ((j = i / 100000000))  {*cp++ = j + '0'; i -= j*100000000;  goto x7;}
 b7:if ((j = i / 10000000))   {*cp++ = j + '0'; i -= j*10000000;   goto x6;}
    if ((j = i / 1000000))    {*cp++ = j + '0', i -= j*1000000;    goto x5;}
 b5:if ((j = i / 100000))     {*cp++ = j + '0', i -= j*100000;     goto x4;}
    if ((j = i / 10000))      {*cp++ = j + '0', i -= j*10000;      goto x3;}
 b3:if ((j = i / 1000))       {*cp++ = j + '0', i -= j*1000;       goto x2;}
    if ((j = i / 100))        {*cp++ = j + '0', i -= j*100;        goto x1;}
 b1:if ((j = i / 10))         {*cp++ = j + '0', i -= j*10;         goto x0;}
    if (i)                     *cp++ = i + '0';
    return cp-op;

 x8:*cp++ = i / 100000000 + '0', i %= 100000000;
 x7:*cp++ = i / 10000000  + '0', i %= 10000000;
 x6:*cp++ = i / 1000000   + '0', i %= 1000000;
 x5:*cp++ = i / 100000    + '0', i %= 100000;
 x4:*cp++ = i / 10000     + '0', i %= 10000;
 x3:*cp++ = i / 1000      + '0', i %= 1000;
 x2:*cp++ = i / 100       + '0', i %= 100;
 x1:*cp++ = i / 10        + '0', i %= 10;
 x0:*cp++ = i             + '0';

    return cp-op;
}

// Assembly:
cmpl $0x64, %esi
jae 0x63f47
cmpl $0xa, %esi
jae 0x63f77
movq %rdi, %rcx
testl %esi, %esi
je 0x64125
orb $0x30, %sil
leaq 0x1(%rdi), %rcx
movb %sil, (%rdi)
jmp 0x64125
cmpl $0x2710, %esi           # imm = 0x2710
jae 0x63f93
cmpl $0x3e8, %esi            # imm = 0x3E8
jae 0x63fc3
movw $0x64, %cx
movl %esi, %eax
xorl %edx, %edx
divw %cx
movzwl %ax, %eax
imull $-0x64, %eax, %edx
orb $0x30, %al
leaq 0x1(%rdi), %rcx
movb %al, (%rdi)
addl %esi, %edx
jmp 0x6410e
movzbl %sil, %eax
movb $0xa, %cl
divb %cl
movzbl %al, %eax
imull $-0xa, %eax, %edx
orb $0x30, %al
movb %al, (%rdi)
addl %esi, %edx
movq %rdi, %rcx
jmp 0x6411b
cmpl $0xf4240, %esi          # imm = 0xF4240
jae 0x63fe6
cmpl $0x186a0, %esi          # imm = 0x186A0
jae 0x64017
movl $0x2710, %ecx           # imm = 0x2710
movl %esi, %eax
xorl %edx, %edx
divl %ecx
imull $0xffffd8f0, %eax, %edx # imm = 0xFFFFD8F0
orb $0x30, %al
leaq 0x1(%rdi), %rcx
movb %al, (%rdi)
addl %esi, %edx
jmp 0x640ed
movw $0x3e8, %cx             # imm = 0x3E8
movl %esi, %eax
xorl %edx, %edx
divw %cx
movzwl %ax, %eax
leal 0x30(%rax), %ecx
movb %cl, (%rdi)
imull $0xfffffc18, %eax, %edx # imm = 0xFFFFFC18
addl %esi, %edx
movq %rdi, %rcx
jmp 0x640fc
cmpl $0x5f5e100, %esi        # imm = 0x5F5E100
jae 0x64036
cmpl $0x989680, %esi         # imm = 0x989680
jae 0x6405c
movl $0xf4240, %ecx          # imm = 0xF4240
movl %esi, %eax
xorl %edx, %edx
divl %ecx
leal 0x30(%rax), %edx
leaq 0x1(%rdi), %rcx
movb %dl, (%rdi)
imull $0xfff0bdc0, %eax, %edx # imm = 0xFFF0BDC0
addl %esi, %edx
jmp 0x640ca
movl $0x186a0, %ecx          # imm = 0x186A0
movl %esi, %eax
xorl %edx, %edx
divl %ecx
imull $0xfffe7960, %eax, %edx # imm = 0xFFFE7960
orb $0x30, %al
movb %al, (%rdi)
addl %esi, %edx
movq %rdi, %rcx
jmp 0x640d9
cmpl $0x3b9aca00, %esi       # imm = 0x3B9ACA00
jae 0x64078
leaq 0x1(%rdi), %rcx
movl $0x5f5e100, %r8d        # imm = 0x5F5E100
movl %esi, %eax
xorl %edx, %edx
divl %r8d
movl %eax, %r8d
imull $0xfa0a1f00, %eax, %edx # imm = 0xFA0A1F00
addl %esi, %edx
jmp 0x640a0
movl $0x989680, %ecx         # imm = 0x989680
movl %esi, %eax
xorl %edx, %edx
divl %ecx
imull $0xff676980, %eax, %edx # imm = 0xFF676980
orb $0x30, %al
movb %al, (%rdi)
addl %esi, %edx
movq %rdi, %rcx
jmp 0x640b6
movl $0x3b9aca00, %ecx       # imm = 0x3B9ACA00
movl %esi, %eax
xorl %edx, %edx
divl %ecx
movl %eax, %r8d
imull $0xc4653600, %eax, %eax # imm = 0xC4653600
addl %esi, %eax
movl $0x5f5e100, %ecx        # imm = 0x5F5E100
xorl %edx, %edx
divl %ecx
addb $0x30, %al
leaq 0x2(%rdi), %rcx
movb %al, 0x1(%rdi)
orb $0x30, %r8b
movb %r8b, (%rdi)
movl $0x989680, %esi         # imm = 0x989680
movl %edx, %eax
xorl %edx, %edx
divl %esi
addb $0x30, %al
movb %al, (%rcx)
movl $0xf4240, %esi          # imm = 0xF4240
movl %edx, %eax
xorl %edx, %edx
divl %esi
addb $0x30, %al
movb %al, 0x1(%rcx)
addq $0x2, %rcx
movl $0x186a0, %esi          # imm = 0x186A0
movl %edx, %eax
xorl %edx, %edx
divl %esi
addb $0x30, %al
movb %al, (%rcx)
movl $0x2710, %esi           # imm = 0x2710
movl %edx, %eax
xorl %edx, %edx
divl %esi
addb $0x30, %al
movb %al, 0x1(%rcx)
addq $0x2, %rcx
movl $0x3e8, %esi            # imm = 0x3E8
movl %edx, %eax
xorl %edx, %edx
divl %esi
addb $0x30, %al
movb %al, (%rcx)
pushq $0x64
popq %rsi
movl %edx, %eax
xorl %edx, %edx
divl %esi
addb $0x30, %al
movb %al, 0x1(%rcx)
addq $0x2, %rcx
pushq $0xa
popq %rsi
movl %edx, %eax
xorl %edx, %edx
divl %esi
addb $0x30, %al
movb %al, (%rcx)
addb $0x30, %dl
movb %dl, 0x1(%rcx)
addq $0x2, %rcx
subl %edi, %ecx
movl %ecx, %eax
retq
nop