// File: /workspace/github_c_makefile_star2_O0/nkanaev[P]tipsy/src/tigr.c
// Function: dynamic
static void dynamic(State* s) {
    int n, i, nlit, ndist, nlen;
    unsigned char lenlens[19] = { 0 }, lens[288 + 32];
    nlit = 257 + bits(s, 5);
    ndist = 1 + bits(s, 5);
    nlen = 4 + bits(s, 4);
    for (n = 0; n < nlen; n++)
        lenlens[order[n]] = (unsigned char)bits(s, 3);

    // Build the tree for decoding code lengths.
    s->tlen = build(s, s->lencodes, lenlens, 19);

    // Decode code lengths.
    for (n = 0; n < nlit + ndist;) {
        int sym = decode(s, s->lencodes, s->tlen);
        switch (sym) {
            case 16:
                for (i = 3 + bits(s, 2); i; i--, n++)
                    lens[n] = lens[n - 1];
                break;
            case 17:
                for (i = 3 + bits(s, 3); i; i--, n++)
                    lens[n] = 0;
                break;
            case 18:
                for (i = 11 + bits(s, 7); i; i--, n++)
                    lens[n] = 0;
                break;
            default:
                lens[n++] = (unsigned char)sym;
                break;
        }
    }

    // Build lit/dist trees.
    s->tlit = build(s, s->litcodes, lens, nlit);
    s->tdist = build(s, s->distcodes, lens + nlit, ndist);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp            # imm = 0x180
movq %rdi, -0x8(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x13, %edx
callq 0x31d0
movq -0x8(%rbp), %rdi
movl $0x5, %esi
callq 0x5dd0
addl $0x101, %eax            # imm = 0x101
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movl $0x5, %esi
callq 0x5dd0
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl $0x4, %esi
callq 0x5dd0
addl $0x4, %eax
movl %eax, -0x1c(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x61ab
movq -0x8(%rbp), %rdi
movl $0x3, %esi
callq 0x5dd0
movb %al, %cl
movslq -0xc(%rbp), %rdx
leaq 0xe5c9(%rip), %rax      # 0x14760
movsbq (%rax,%rdx), %rax
movb %cl, -0x30(%rbp,%rax)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x6174
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x5f0, %rsi            # imm = 0x5F0
leaq -0x30(%rbp), %rdx
movl $0x13, %ecx
callq 0xa1e0
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x644(%rax)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl -0x14(%rbp), %ecx
addl -0x18(%rbp), %ecx
cmpl %ecx, %eax
jge 0x6325
movq -0x8(%rbp), %rdi
movq %rdi, %rsi
addq $0x5f0, %rsi            # imm = 0x5F0
movl 0x644(%rdi), %edx
callq 0xa3a0
movl %eax, -0x174(%rbp)
movl -0x174(%rbp), %eax
movl %eax, -0x178(%rbp)
subl $0x10, %eax
je 0x623f
jmp 0x621e
movl -0x178(%rbp), %eax
subl $0x11, %eax
je 0x628c
jmp 0x622b
movl -0x178(%rbp), %eax
subl $0x12, %eax
je 0x62c8
jmp 0x6304
movq -0x8(%rbp), %rdi
movl $0x2, %esi
callq 0x5dd0
addl $0x3, %eax
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
je 0x6287
movl -0xc(%rbp), %eax
subl $0x1, %eax
cltq
movb -0x170(%rbp,%rax), %cl
movslq -0xc(%rbp), %rax
movb %cl, -0x170(%rbp,%rax)
movl -0x10(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x6253
jmp 0x6320
movq -0x8(%rbp), %rdi
movl $0x3, %esi
callq 0x5dd0
addl $0x3, %eax
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
je 0x62c6
movslq -0xc(%rbp), %rax
movb $0x0, -0x170(%rbp,%rax)
movl -0x10(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x62a0
jmp 0x6320
movq -0x8(%rbp), %rdi
movl $0x7, %esi
callq 0x5dd0
addl $0xb, %eax
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
je 0x6302
movslq -0xc(%rbp), %rax
movb $0x0, -0x170(%rbp,%rax)
movl -0x10(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x62dc
jmp 0x6320
movl -0x174(%rbp), %eax
movb %al, %cl
movl -0xc(%rbp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, -0xc(%rbp)
cltq
movb %cl, -0x170(%rbp,%rax)
jmp 0x61db
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0xf0, %rsi
leaq -0x170(%rbp), %rdx
movl -0x14(%rbp), %ecx
callq 0xa1e0
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x63c(%rax)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x570, %rsi            # imm = 0x570
leaq -0x170(%rbp), %rdx
movslq -0x14(%rbp), %rax
addq %rax, %rdx
movl -0x18(%rbp), %ecx
callq 0xa1e0
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x640(%rax)
addq $0x180, %rsp            # imm = 0x180
popq %rbp
retq
nopl (%rax)