// File: /workspace/github_c_makefile_star2_O1/BernardTatin[P]s7sh/s7.c
// Function: resize_stack
static void resize_stack(s7_scheme *sc)
    {
        uint64_t loc;
        uint32_t new_size;
        block_t *ob, *nb;

        loc = s7_stack_top(sc);
        new_size = sc->stack_size * 2;

        /* how can we trap infinite recursion?  Is a warning in order here? I think I'll add 'max-stack-size */
        if (new_size > sc->max_stack_size)
            s7_error(sc, make_symbol(sc, "stack-too-big"), set_elist_1(sc, wrap_string(sc, "stack has grown past (*s7* 'max-stack-size)", 43)));

        ob = stack_block(sc->stack);
        nb = reallocate(sc, ob, new_size * sizeof(s7_pointer));
        block_info(nb) = NULL;
        stack_block(sc->stack) = nb;
        stack_elements(sc->stack) = (s7_pointer *)block_data(nb);
        if (!stack_elements(sc->stack))
        {
            s7_warn(sc, 32, "can't allocate additional stack\n");
#if S7_DEBUGGING
            abort();
#endif
            s7_error(sc, make_symbol(sc, "stack-too-big"), set_elist_1(sc, wrap_string(sc, "no room to expand stack?", 24)));
        }
        {
            s7_pointer *orig;
            s7_int i, left;
            i = sc->stack_size;
            left = new_size - i - 8;
            orig = stack_elements(sc->stack);
            while (i <= left)
                LOOP_8(orig[i++] = sc->nil);
            for (; i < new_size; i++)
                orig[i] = sc->nil;
        }
        vector_length(sc->stack) = new_size;
        sc->stack_size = new_size;

        sc->stack_start = stack_elements(sc->stack);
        sc->stack_end = (s7_pointer *)(sc->stack_start + loc);
        sc->stack_resize_trigger = (s7_pointer *)(sc->stack_start + sc->stack_size / 2);

        if (show_stack_stats(sc))
        {
            s7_warn(sc, 128, "stack grows to %u, %s\n", new_size, DISPLAY_80(sc->code));
            s7_show_let(sc);
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x50(%rdi), %r12
subq 0x48(%rdi), %r12
movl 0x40(%rdi), %r15d
leal (%r15,%r15), %ebp
cmpl 0x7c(%rdi), %ebp
jbe 0xc16d6
movabsq $0x6f742dd2ccc3a1e2, %rcx # imm = 0x6F742DD2CCC3A1E2
movq 0x148(%rbx), %rax
movq 0x10(%rax), %rax
movq 0x25278(%rax), %rax
cmpb $0x1, (%rax)
jne 0xc166f
movabsq $0x6f742d6b63617473, %rdx # imm = 0x6F742D6B63617473
leaq 0x5efff(%rip), %rsi     # 0x120628
cmpq %rcx, 0x18(%rax)
jne 0xc1666
cmpl $0xd, 0x2c(%rax)
jne 0xc1666
movq 0x20(%rax), %rdi
cmpq %rdx, (%rdi)
jne 0xc1666
xorl %r8d, %r8d
movb 0x8(%r8,%rsi), %r9b
movb 0x8(%rdi,%r8), %r10b
cmpb %r10b, %r9b
jne 0xc165d
leaq 0x1(%r8), %r11
cmpq $0x4, %r8
movq %r11, %r8
jne 0xc1641
cmpb %r10b, %r9b
je 0xc1933
movq 0x10(%rax), %rax
cmpb $0x1, (%rax)
je 0xc1629
leaq 0x5efb2(%rip), %rsi     # 0x120628
movl $0xd, %edx
movq %rbx, %rdi
movl $0x4a4f, %r8d           # imm = 0x4A4F
callq 0xa5ef
movq %rax, %rsi
movq 0x820(%rbx), %rax
movslq 0x7dc(%rbx), %rcx
movq (%rax,%rcx,8), %rax
incl %ecx
andl $0x7, %ecx
movl %ecx, 0x7dc(%rbx)
leaq 0x5ef86(%rip), %rcx     # 0x120636
movq %rcx, 0x10(%rax)
movq $0x2b, 0x8(%rax)
movq 0x6d8(%rbx), %rcx
movq %rax, 0x8(%rcx)
movq 0x6d8(%rbx), %rdx
movq %rbx, %rdi
callq 0x3b366
movq 0x38(%rbx), %rax
movq 0x18(%rax), %rsi
movl %ebp, %r13d
leaq (,%r13,8), %rdx
movq %rbx, %rdi
callq 0xae0f
movq $0x0, 0x20(%rax)
movq 0x38(%rbx), %rcx
movq %rax, 0x18(%rcx)
movq (%rax), %rax
movq 0x38(%rbx), %rcx
movq %rax, 0x10(%rcx)
movq 0x38(%rbx), %rax
cmpq $0x0, 0x10(%rax)
jne 0xc1812
movabsq $0x6f742dd2ccc3a1e2, %r14 # imm = 0x6F742DD2CCC3A1E2
leaq 0x5ef36(%rip), %rdx     # 0x120662
movl $0x20, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0xfc3d
movq 0x148(%rbx), %rax
movq 0x10(%rax), %rax
movq 0x25278(%rax), %rax
cmpb $0x1, (%rax)
jne 0xc17a8
leaq 0x5eecf(%rip), %rcx     # 0x120628
movabsq $0x6f742d6b63617473, %rdx # imm = 0x6F742D6B63617473
cmpq %r14, 0x18(%rax)
jne 0xc179f
cmpl $0xd, 0x2c(%rax)
jne 0xc179f
movq 0x20(%rax), %rsi
cmpq %rdx, (%rsi)
jne 0xc179f
xorl %edi, %edi
movb 0x8(%rdi,%rcx), %r8b
movb 0x8(%rsi,%rdi), %r9b
cmpb %r9b, %r8b
jne 0xc1796
leaq 0x1(%rdi), %r10
cmpq $0x4, %rdi
movq %r10, %rdi
jne 0xc177a
cmpb %r9b, %r8b
je 0xc193c
movq 0x10(%rax), %rax
cmpb $0x1, (%rax)
je 0xc1763
leaq 0x5ee79(%rip), %rsi     # 0x120628
movl $0xd, %edx
movq %rbx, %rdi
movq %r14, %rcx
movl $0x4a4f, %r8d           # imm = 0x4A4F
callq 0xa5ef
movq %rax, %rsi
movq 0x820(%rbx), %rax
movslq 0x7dc(%rbx), %rcx
movq (%rax,%rcx,8), %rax
incl %ecx
andl $0x7, %ecx
movl %ecx, 0x7dc(%rbx)
leaq 0x5ee97(%rip), %rcx     # 0x120683
movq %rcx, 0x10(%rax)
movq $0x18, 0x8(%rax)
movq 0x6d8(%rbx), %rcx
movq %rax, 0x8(%rcx)
movq 0x6d8(%rbx), %rdx
movq %rbx, %rdi
callq 0x3b366
movl 0x40(%rbx), %eax
movq %r13, %rdx
subq %rax, %rdx
addq $-0x8, %rdx
movq 0x38(%rbx), %rcx
movq 0x10(%rcx), %rcx
cmpq %rax, %rdx
jl 0xc1894
movq 0x110(%rbx), %rsi
movq %rsi, (%rcx,%rax,8)
movq 0x110(%rbx), %rsi
movq %rsi, 0x8(%rcx,%rax,8)
movq 0x110(%rbx), %rsi
movq %rsi, 0x10(%rcx,%rax,8)
movq 0x110(%rbx), %rsi
movq %rsi, 0x18(%rcx,%rax,8)
movq 0x110(%rbx), %rsi
movq %rsi, 0x20(%rcx,%rax,8)
movq 0x110(%rbx), %rsi
movq %rsi, 0x28(%rcx,%rax,8)
movq 0x110(%rbx), %rsi
movq %rsi, 0x30(%rcx,%rax,8)
movq 0x110(%rbx), %rsi
movq %rsi, 0x38(%rcx,%rax,8)
addq $0x8, %rax
cmpq %rdx, %rax
jle 0xc182c
cmpq %r13, %rax
jae 0xc18ac
movq 0x110(%rbx), %rdx
movq %rdx, (%rcx,%rax,8)
incq %rax
cmpq %rax, %r13
jne 0xc1899
movq 0x38(%rbx), %rax
movq %r13, 0x8(%rax)
movl %ebp, 0x40(%rbx)
movq 0x38(%rbx), %rax
movq 0x10(%rax), %rax
movq %rax, 0x48(%rbx)
addq %rax, %r12
movq %r12, 0x50(%rbx)
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
leaq (%rax,%r15,8), %rax
movq %rax, 0x58(%rbx)
testb $0x4, 0x21c(%rbx)
jne 0xc18f1
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rsi
movl $0x50, %edx
movq %rbx, %rdi
callq 0x469c9
movq 0x10(%rax), %r8
leaq 0x5ed90(%rip), %rdx     # 0x12069c
movl $0x80, %esi
movq %rbx, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0xfc3d
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x39ef8
movq 0x8(%rax), %rsi
jmp 0xc168c
movq 0x8(%rax), %rsi
jmp 0xc17c8