// File: /workspace/github_c_makefile_star2_O0/BernardTatin[P]s7sh/s7.c
// Function: s7_random_state_to_list
s7_pointer s7_random_state_to_list(s7_scheme *sc, s7_pointer args)
    {
#define H_random_state_to_list "(random-state->list r) returns the random state object as a list.\
        You can later apply random-state to this list to continue a random number sequence from any point."
#define Q_random_state_to_list s7_make_signature(sc, 2, sc->is_pair_symbol, sc->is_random_state_symbol)

#if WITH_GMP
        if ((is_pair(args)) &&
                (!is_random_state(car(args))))
            return(method_or_bust_with_type(sc, car(args), sc->random_state_to_list_symbol, args, a_random_state_object_string, 1));
        return(sc->nil);
#else
        s7_pointer r;
        if (is_null(args))
            r = sc->default_rng;
        else
        {
            r = car(args);
            if (!is_random_state(r))
                return(method_or_bust_with_type(sc, r, sc->random_state_to_list_symbol, args, a_random_state_object_string, 1));
        }
        return(list_2(sc, make_integer(sc, random_seed(r)), make_integer(sc, random_carry(r))));
#endif
    }

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0x98(%rsp)
movq %rsi, 0x90(%rsp)
movq 0x90(%rsp), %rax
movq 0x98(%rsp), %rcx
cmpq 0x110(%rcx), %rax
jne 0x13e39
movq 0x98(%rsp), %rax
movq 0xaa0(%rax), %rax
movq %rax, 0x88(%rsp)
jmp 0x13ea5
movq 0x90(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x24, %eax
je 0x13ea3
movq 0x98(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x98(%rsp), %rax
movq 0x1428(%rax), %rdx
movq 0x90(%rsp), %rcx
movq 0x2066f5(%rip), %r8     # 0x21a580
movl $0x1, %r9d
callq 0x14130
movq %rax, 0xa0(%rsp)
jmp 0x14119
jmp 0x13ea5
movq 0x98(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x88(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rax
andq $-0x800, %rax           # imm = 0xF800
cmpq $0x0, %rax
jne 0x13ef7
movq 0x80(%rsp), %rcx
leaq 0x202597(%rip), %rax    # 0x216480
movq (%rax,%rcx,8), %rax
movq %rax, 0x18(%rsp)
jmp 0x13f7d
jmp 0x13ef9
movq 0x98(%rsp), %rax
movq 0x90(%rax), %rax
movq 0x98(%rsp), %rcx
cmpq 0x98(%rcx), %rax
ja 0x13f26
movq 0x98(%rsp), %rdi
callq 0xc670
movq 0x98(%rsp), %rcx
movq 0x90(%rcx), %rax
movq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x90(%rcx)
movq -0x8(%rax), %rax
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rax
movq $0xb, (%rax)
movq 0x80(%rsp), %rcx
movq 0x70(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x70(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x88(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
andq $-0x800, %rax           # imm = 0xF800
cmpq $0x0, %rax
jne 0x13fcd
movq 0x48(%rsp), %rcx
leaq 0x2024c1(%rip), %rax    # 0x216480
movq (%rax,%rcx,8), %rax
movq %rax, 0x8(%rsp)
jmp 0x14050
jmp 0x13fcf
movq 0x98(%rsp), %rax
movq 0x90(%rax), %rax
movq 0x98(%rsp), %rcx
cmpq 0x98(%rcx), %rax
ja 0x13ffc
movq 0x98(%rsp), %rdi
callq 0xc670
movq 0x98(%rsp), %rcx
movq 0x90(%rcx), %rax
movq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x90(%rcx)
movq -0x8(%rax), %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq $0xb, (%rax)
movq 0x48(%rsp), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x38(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x98(%rsp), %rax
movq 0x110(%rax), %rax
movq %rax, 0x50(%rsp)
movq 0x98(%rsp), %rax
movq 0x90(%rax), %rax
movq 0x98(%rsp), %rcx
cmpq 0x98(%rcx), %rax
ja 0x140a5
movq 0x98(%rsp), %rdi
callq 0xc670
movq 0x98(%rsp), %rcx
movq 0x90(%rcx), %rax
movq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x90(%rcx)
movq -0x8(%rax), %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq $0x200001, (%rax)       # imm = 0x200001
movq 0x10(%rsp), %rsi
movq 0x20(%rsp), %rdi
movq 0x58(%rsp), %rcx
movq 0x60(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x50(%rsp), %rcx
movq 0x60(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x60(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdx
callq 0xd9f0
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rax
addq $0xa8, %rsp
retq
nopl (%rax)