// File: /workspace/github_c_makefile_star2_O1/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 0x803aa
cmpl $0xa, %esi
jae 0x803dc
movq %rdi, %rax
testl %esi, %esi
je 0x80606
orb $0x30, %sil
leaq 0x1(%rdi), %rax
movb %sil, (%rdi)
jmp 0x80606
cmpl $0x2710, %esi           # imm = 0x2710
jae 0x80402
movl %esi, %eax
cmpl $0x3e8, %esi            # imm = 0x3E8
jae 0x80437
imulq $0x51eb851f, %rax, %rax # imm = 0x51EB851F
shrq $0x25, %rax
imull $-0x64, %eax, %ecx
movl %eax, %edx
orb $0x30, %dl
leaq 0x1(%rdi), %rax
movb %dl, (%rdi)
addl %esi, %ecx
jmp 0x805e1
movl %esi, %eax
movl $0xcccccccd, %ecx       # imm = 0xCCCCCCCD
imulq %rax, %rcx
shrq $0x23, %rcx
leal (%rcx,%rcx), %eax
orb $0x30, %cl
movb %cl, (%rdi)
leal (%rax,%rax,4), %eax
subl %eax, %esi
movq %rdi, %rax
movl %esi, %ecx
jmp 0x805fc
cmpl $0xf4240, %esi          # imm = 0xF4240
jae 0x80456
cmpl $0x186a0, %esi          # imm = 0x186A0
jae 0x8048b
movl %esi, %eax
movl $0xd1b71759, %edx       # imm = 0xD1B71759
imulq %rax, %rdx
shrq $0x2d, %rdx
imull $0xffffd8f0, %edx, %ecx # imm = 0xFFFFD8F0
orb $0x30, %dl
leaq 0x1(%rdi), %rax
movb %dl, (%rdi)
addl %esi, %ecx
jmp 0x805a9
imulq $0x10624dd3, %rax, %rax # imm = 0x10624DD3
shrq $0x26, %rax
imull $0xfffffc18, %eax, %ecx # imm = 0xFFFFFC18
addb $0x30, %al
movb %al, (%rdi)
addl %esi, %ecx
movq %rdi, %rax
jmp 0x805c4
cmpl $0x5f5e100, %esi        # imm = 0x5F5E100
jae 0x804af
movl %esi, %eax
cmpl $0x989680, %esi         # imm = 0x989680
jae 0x804d9
imulq $0x431bde83, %rax, %rax # imm = 0x431BDE83
shrq $0x32, %rax
imull $0xfff0bdc0, %eax, %ecx # imm = 0xFFF0BDC0
movl %eax, %edx
addb $0x30, %dl
leaq 0x1(%rdi), %rax
movb %dl, (%rdi)
addl %esi, %ecx
jmp 0x8056a
movl %esi, %eax
shrl $0x5, %eax
imulq $0xa7c5ac5, %rax, %rax  # imm = 0xA7C5AC5
shrq $0x27, %rax
imull $0xfffe7960, %eax, %ecx # imm = 0xFFFE7960
orb $0x30, %al
movb %al, (%rdi)
addl %esi, %ecx
movq %rdi, %rax
jmp 0x80588
cmpl $0x3b9aca00, %esi       # imm = 0x3B9ACA00
jae 0x804f5
movl %esi, %eax
imulq $0x55e63b89, %rax, %rax # imm = 0x55E63B89
shrq $0x39, %rax
imull $0xfa0a1f00, %eax, %ecx # imm = 0xFA0A1F00
movl %eax, %edx
leaq 0x1(%rdi), %rax
orb $0x30, %dl
movb %dl, (%rdi)
addl %esi, %ecx
jmp 0x8052f
imulq $0x6b5fca6b, %rax, %rax # imm = 0x6B5FCA6B
shrq $0x36, %rax
imull $0xff676980, %eax, %ecx # imm = 0xFF676980
orb $0x30, %al
movb %al, (%rdi)
addl %esi, %ecx
movq %rdi, %rax
jmp 0x8054a
movl %esi, %eax
shrl $0x9, %eax
imulq $0x44b83, %rax, %rax    # imm = 0x44B83
shrq $0x27, %rax
imull $0xc4653600, %eax, %ecx # imm = 0xC4653600
orb $0x30, %al
movb %al, (%rdi)
addl %esi, %ecx
imulq $0x55e63b89, %rcx, %rdx # imm = 0x55E63B89
shrq $0x39, %rdx
leal 0x30(%rdx), %esi
leaq 0x2(%rdi), %rax
movb %sil, 0x1(%rdi)
imull $0x5f5e100, %edx, %edx  # imm = 0x5F5E100
subl %edx, %ecx
movl %ecx, %edx
imulq $0x6b5fca6b, %rdx, %rdx # imm = 0x6B5FCA6B
shrq $0x36, %rdx
leal 0x30(%rdx), %esi
movb %sil, (%rax)
imull $0x989680, %edx, %edx   # imm = 0x989680
subl %edx, %ecx
movl %ecx, %edx
imulq $0x431bde83, %rdx, %rdx # imm = 0x431BDE83
shrq $0x32, %rdx
leal 0x30(%rdx), %esi
movb %sil, 0x1(%rax)
addq $0x2, %rax
imull $0xf4240, %edx, %edx    # imm = 0xF4240
subl %edx, %ecx
movl %ecx, %edx
shrl $0x5, %edx
imulq $0xa7c5ac5, %rdx, %rdx  # imm = 0xA7C5AC5
shrq $0x27, %rdx
leal 0x30(%rdx), %esi
movb %sil, (%rax)
imull $0x186a0, %edx, %edx    # imm = 0x186A0
subl %edx, %ecx
movl %ecx, %edx
movl $0xd1b71759, %esi       # imm = 0xD1B71759
imulq %rdx, %rsi
shrq $0x2d, %rsi
leal 0x30(%rsi), %edx
movb %dl, 0x1(%rax)
addq $0x2, %rax
imull $0x2710, %esi, %edx     # imm = 0x2710
subl %edx, %ecx
movl %ecx, %edx
imulq $0x10624dd3, %rdx, %rdx # imm = 0x10624DD3
shrq $0x26, %rdx
leal 0x30(%rdx), %esi
movb %sil, (%rax)
imull $0x3e8, %edx, %edx      # imm = 0x3E8
subl %edx, %ecx
movl %ecx, %edx
imulq $0x51eb851f, %rdx, %rdx # imm = 0x51EB851F
shrq $0x25, %rdx
leal 0x30(%rdx), %esi
movb %sil, 0x1(%rax)
addq $0x2, %rax
imull $0x64, %edx, %edx
subl %edx, %ecx
movl %ecx, %edx
movl $0xcccccccd, %esi       # imm = 0xCCCCCCCD
imulq %rdx, %rsi
shrq $0x23, %rsi
leal 0x30(%rsi), %edx
movb %dl, (%rax)
addl %esi, %esi
leal (%rsi,%rsi,4), %edx
subl %edx, %ecx
addb $0x30, %cl
movb %cl, 0x1(%rax)
addq $0x2, %rax
subl %edi, %eax
retq
nopl (%rax)