// File: /workspace/github_c_makefile_star2_O1/BernardTatin[P]s7sh/s7.c
// Function: s7_make_continuation
s7_pointer s7_make_continuation(s7_scheme *sc)
    {
        s7_pointer x, stack;
        int64_t loc;
        block_t *block;

        loc = s7_stack_top(sc);
        stack = copy_stack(sc, sc->stack, loc);
        sc->temp8 = stack;

        new_cell(sc, x, T_CONTINUATION);
        block = mallocate_block(sc);
        continuation_block(x) = block;
        continuation_set_stack(x, stack);
        continuation_stack_size(x) = vector_length(continuation_stack(x));   /* copy_stack can return a smaller stack than the current one */
        continuation_stack_start(x) = stack_elements(continuation_stack(x));
        continuation_stack_end(x) = (s7_pointer *)(continuation_stack_start(x) + loc);
        continuation_op_stack(x) = copy_op_stack(sc);
        continuation_op_loc(x) = (int32_t)(sc->op_stack_now - sc->op_stack);
        continuation_op_size(x) = sc->op_stack_size;
        continuation_key(x) = find_any_baffle(sc);
        sc->temp8 = sc->nil;

        add_continuation(sc, x);
        return(x);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x38(%rdi), %rsi
movq 0x50(%rdi), %r12
subq 0x48(%rdi), %r12
movq %r12, %rdx
sarq $0x3, %rdx
callq 0xd598
movq %rax, %r15
movq %rax, 0x530(%rbx)
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0xd3cd
movq %rbx, %rdi
callq 0xb389
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %r14
movq $0x25, (%r14)
cmpq $0x0, 0x838(%rbx)
jne 0xd430
movl $0x2800, %edi           # imm = 0x2800
callq 0x9480
movq %rax, 0x838(%rbx)
addq $0x28, %rax
movl $0xff, %ecx
movq %rax, -0x10(%rax)
movl $0x0, -0x20(%rax)
addq $0x28, %rax
decl %ecx
jne 0xd40e
movq $0x0, -0x10(%rax)
movl $0x0, -0x20(%rax)
movq 0x838(%rbx), %rax
movq 0x18(%rax), %rcx
movq %rcx, 0x838(%rbx)
movl $0x0, 0x8(%rax)
movq %rax, 0x8(%r14)
movq %r15, 0x10(%r14)
movl 0x8(%r15), %ecx
movl %ecx, 0x18(%rax)
movq 0x10(%r14), %rax
movq 0x10(%rax), %rax
movq %rax, 0x20(%r14)
addq %rax, %r12
movq %r12, 0x28(%r14)
movq 0x68(%rbx), %r12
subq 0x60(%rbx), %r12
shrq $0x3, %r12
movslq %r12d, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3e258
testl %r15d, %r15d
jle 0xd4ac
movq 0x60(%rbx), %rcx
movq 0x10(%rax), %rdx
incl %r12d
xorl %esi, %esi
movq (%rcx,%rsi), %rdi
movq %rdi, (%rdx,%rsi)
addq $0x8, %rsi
decl %r12d
cmpl $0x1, %r12d
jg 0xd497
movq %rax, 0x18(%r14)
movq 0x68(%rbx), %rax
subq 0x60(%rbx), %rax
shrq $0x3, %rax
movq 0x8(%r14), %rcx
movl %eax, 0x1c(%rcx)
movl 0x78(%rbx), %eax
movq 0x8(%r14), %rcx
movl %eax, 0x20(%rcx)
cmpq $0x0, 0xa98(%rbx)
jle 0xd532
movq 0x8(%rbx), %rax
cmpb $0x1c, (%rax)
jne 0xd505
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0xd4ff
movq 0x17d8(%rbx), %rdx
cmpq %rdx, 0x8(%rcx)
je 0xd522
movq 0x18(%rcx), %rcx
testq %rcx, %rcx
jne 0xd4f0
movq 0x10(%rax), %rax
jmp 0xd4db
movq 0x17d8(%rbx), %rax
movq 0x10(%rax), %rax
movb $0x1, %cl
cmpb $0x20, (%rax)
jne 0xd52e
movq 0x10(%rax), %rdx
cmpb $0x27, (%rdx)
je 0xd526
jmp 0xd52e
movq 0x10(%rcx), %rdx
movq 0x8(%rdx), %rax
xorl %ecx, %ecx
jmp 0xd52e
testb %cl, %cl
je 0xd539
movq $-0x1, %rax
movq 0x8(%r14), %rcx
movl %eax, 0x24(%rcx)
movq 0x110(%rbx), %rax
movq %rax, 0x530(%rbx)
movq 0x760(%rbx), %rbx
movq 0x8(%rbx), %rsi
cmpq %rsi, 0x10(%rbx)
jne 0xd576
leaq (%rsi,%rsi), %rax
movq %rax, 0x8(%rbx)
movq (%rbx), %rdi
shlq $0x4, %rsi
callq 0x9510
movq %rax, (%rbx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%rbx)
movq %r14, (%rax,%rcx,8)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq