// File: /workspace/github_c_makefile_star2_O0/BernardTatin[P]s7sh/s7.c
// Function: g_stacktrace
static s7_pointer g_stacktrace(s7_scheme *sc, s7_pointer args)
                {
#define H_stacktrace "(stacktrace (max-frames 30) (code-cols 50) (total-cols 80) (note-col 50) as-comment) returns \
                    a stacktrace as a string.  Each line has two portions, the code being evaluated and a note giving \
                    the value of local variables in that code.  The first argument sets how many lines are displayed. \
                    The next three arguments set the length and layout of those lines.  'as-comment' if #t causes each \
                    line to be preceded by a semicolon."
#define Q_stacktrace s7_make_signature(sc, 6, sc->is_string_symbol, sc->is_integer_symbol, sc->is_integer_symbol, sc->is_integer_symbol, sc->is_integer_symbol, sc->is_boolean_symbol)

                    s7_int max_frames = 30, code_cols = 50, total_cols = 80, notes_start_col = 50;
                    bool as_comment = false;

                    if (!is_null(args))
                    {
                        if (!s7_is_integer(car(args)))
                            return(method_or_bust(sc, car(args), sc->stacktrace_symbol, args, T_INTEGER, 1));
                        max_frames = s7_integer(car(args));
                        if ((max_frames <= 0) || (max_frames > s7_int32_max))
                            max_frames = 30;
                        args = cdr(args);
                        if (!is_null(args))
                        {
                            if (!s7_is_integer(car(args)))
                                return(wrong_type_argument(sc, sc->stacktrace_symbol, 2, car(args), T_INTEGER));
                            code_cols = s7_integer(car(args));
                            if ((code_cols <= 8) || (code_cols > 1024))
                                code_cols = 50;
                            args = cdr(args);
                            if (!is_null(args))
                            {
                                if (!s7_is_integer(car(args)))
                                    return(wrong_type_argument(sc, sc->stacktrace_symbol, 3, car(args), T_INTEGER));
                                total_cols = s7_integer(car(args));
                                if ((total_cols <= code_cols) || (total_cols > s7_int32_max))
                                    total_cols = 80;
                                args = cdr(args);
                                if (!is_null(args))
                                {
                                    if (!s7_is_integer(car(args)))
                                        return(wrong_type_argument(sc, sc->stacktrace_symbol, 4, car(args), T_INTEGER));
                                    notes_start_col = s7_integer(car(args));
                                    if ((notes_start_col <= 0) || (notes_start_col > s7_int32_max))
                                        notes_start_col = 50;
                                    args = cdr(args);
                                    if (!is_null(args))
                                    {
                                        if (!s7_is_boolean(car(args)))
                                            return(wrong_type_argument(sc, sc->stacktrace_symbol, 5, car(args), T_BOOLEAN));
                                        as_comment = s7_boolean(sc, car(args));
                                    }
                                }
                            }
                        }
                    }
                    return(stacktrace_1(sc, max_frames, code_cols, total_cols, notes_start_col, as_comment));
                }

// Assembly:
subq $0x128, %rsp            # imm = 0x128
movq %rdi, 0x118(%rsp)
movq %rsi, 0x110(%rsp)
movq $0x1e, 0x108(%rsp)
movq $0x32, 0x100(%rsp)
movq $0x50, 0xf8(%rsp)
movq $0x32, 0xf0(%rsp)
movb $0x0, 0xef(%rsp)
movq 0x110(%rsp), %rax
movq 0x118(%rsp), %rcx
cmpq 0x110(%rcx), %rax
je 0xa19f6
movq 0x110(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x11340
testb $0x1, %al
jne 0xa127a
movq 0x118(%rsp), %rdi
movq 0x110(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x118(%rsp), %rax
movq 0x14f8(%rax), %rdx
movq 0x110(%rsp), %rcx
movl $0xb, %r8d
movl $0x1, %r9d
callq 0x13c50
movq %rax, 0x120(%rsp)
jmp 0xa1a38
movq 0x110(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x10790
movq %rax, 0x108(%rsp)
cmpq $0x0, 0x108(%rsp)
jle 0xa12b2
movq 0x108(%rsp), %rax
movslq 0x183c87(%rip), %rcx    # 0x224f34
cmpq %rcx, %rax
jle 0xa12be
movq $0x1e, 0x108(%rsp)
movq 0x110(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x110(%rsp)
movq 0x110(%rsp), %rax
movq 0x118(%rsp), %rcx
cmpq 0x110(%rcx), %rax
je 0xa19f4
movq 0x110(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x11340
testb $0x1, %al
jne 0xa1455
movq 0x118(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x118(%rsp), %rax
movq 0x14f8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x60(%rsp)
movq $0x2, 0xe0(%rsp)
movq 0xe0(%rsp), %rax
andq $-0x800, %rax           # imm = 0xF800
cmpq $0x0, %rax
jne 0xa136a
movq 0xe0(%rsp), %rcx
leaq 0x175124(%rip), %rax    # 0x216480
movq (%rax,%rcx,8), %rax
movq %rax, 0x50(%rsp)
jmp 0xa1402
jmp 0xa136c
movq 0x118(%rsp), %rax
movq 0x90(%rax), %rax
movq 0x118(%rsp), %rcx
cmpq 0x98(%rcx), %rax
ja 0xa1399
movq 0x118(%rsp), %rdi
callq 0xc670
movq 0x118(%rsp), %rcx
movq 0x90(%rcx), %rax
movq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x90(%rcx)
movq -0x8(%rax), %rax
movq %rax, 0xd0(%rsp)
movq 0xd0(%rsp), %rax
movq $0xb, (%rax)
movq 0xe0(%rsp), %rcx
movq 0xd0(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0xd0(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x60(%rsp), %rsi
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0xd8(%rsp), %rdx
movq 0x110(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x118(%rsp), %rax
movq 0x140(%rax), %r8
movq 0x1791a5(%rip), %r9     # 0x21a5e8
callq 0xc560
movq %rax, 0x120(%rsp)
jmp 0xa1a38
movq 0x110(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x10790
movq %rax, 0x100(%rsp)
cmpq $0x8, 0x100(%rsp)
jle 0xa1487
cmpq $0x400, 0x100(%rsp) # imm = 0x400
jle 0xa1493
movq $0x32, 0x100(%rsp)
movq 0x110(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x110(%rsp)
movq 0x110(%rsp), %rax
movq 0x118(%rsp), %rcx
cmpq 0x110(%rcx), %rax
je 0xa19f2
movq 0x110(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x11340
testb $0x1, %al
jne 0xa162a
movq 0x118(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x118(%rsp), %rax
movq 0x14f8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x48(%rsp)
movq $0x3, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
andq $-0x800, %rax           # imm = 0xF800
cmpq $0x0, %rax
jne 0xa153f
movq 0xc0(%rsp), %rcx
leaq 0x174f4f(%rip), %rax    # 0x216480
movq (%rax,%rcx,8), %rax
movq %rax, 0x38(%rsp)
jmp 0xa15d7
jmp 0xa1541
movq 0x118(%rsp), %rax
movq 0x90(%rax), %rax
movq 0x118(%rsp), %rcx
cmpq 0x98(%rcx), %rax
ja 0xa156e
movq 0x118(%rsp), %rdi
callq 0xc670
movq 0x118(%rsp), %rcx
movq 0x90(%rcx), %rax
movq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x90(%rcx)
movq -0x8(%rax), %rax
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
movq $0xb, (%rax)
movq 0xc0(%rsp), %rcx
movq 0xb0(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0xb0(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x48(%rsp), %rsi
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0xb8(%rsp), %rdx
movq 0x110(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x118(%rsp), %rax
movq 0x140(%rax), %r8
movq 0x178fd0(%rip), %r9     # 0x21a5e8
callq 0xc560
movq %rax, 0x120(%rsp)
jmp 0xa1a38
movq 0x110(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x10790
movq %rax, 0xf8(%rsp)
movq 0xf8(%rsp), %rax
cmpq 0x100(%rsp), %rax
jle 0xa1669
movq 0xf8(%rsp), %rax
movslq 0x1838d0(%rip), %rcx    # 0x224f34
cmpq %rcx, %rax
jle 0xa1675
movq $0x50, 0xf8(%rsp)
movq 0x110(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x110(%rsp)
movq 0x110(%rsp), %rax
movq 0x118(%rsp), %rcx
cmpq 0x110(%rcx), %rax
je 0xa19f0
movq 0x110(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x11340
testb $0x1, %al
jne 0xa180c
movq 0x118(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x118(%rsp), %rax
movq 0x14f8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x30(%rsp)
movq $0x4, 0xa0(%rsp)
movq 0xa0(%rsp), %rax
andq $-0x800, %rax           # imm = 0xF800
cmpq $0x0, %rax
jne 0xa1721
movq 0xa0(%rsp), %rcx
leaq 0x174d6d(%rip), %rax    # 0x216480
movq (%rax,%rcx,8), %rax
movq %rax, 0x20(%rsp)
jmp 0xa17b9
jmp 0xa1723
movq 0x118(%rsp), %rax
movq 0x90(%rax), %rax
movq 0x118(%rsp), %rcx
cmpq 0x98(%rcx), %rax
ja 0xa1750
movq 0x118(%rsp), %rdi
callq 0xc670
movq 0x118(%rsp), %rcx
movq 0x90(%rcx), %rax
movq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x90(%rcx)
movq -0x8(%rax), %rax
movq %rax, 0x90(%rsp)
movq 0x90(%rsp), %rax
movq $0xb, (%rax)
movq 0xa0(%rsp), %rcx
movq 0x90(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x90(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rsi
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rdx
movq 0x110(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x118(%rsp), %rax
movq 0x140(%rax), %r8
movq 0x178dee(%rip), %r9     # 0x21a5e8
callq 0xc560
movq %rax, 0x120(%rsp)
jmp 0xa1a38
movq 0x110(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x10790
movq %rax, 0xf0(%rsp)
cmpq $0x0, 0xf0(%rsp)
jle 0xa1844
movq 0xf0(%rsp), %rax
movslq 0x1836f5(%rip), %rcx    # 0x224f34
cmpq %rcx, %rax
jle 0xa1850
movq $0x32, 0xf0(%rsp)
movq 0x110(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x110(%rsp)
movq 0x110(%rsp), %rax
movq 0x118(%rsp), %rcx
cmpq 0x110(%rcx), %rax
je 0xa19ee
movq 0x110(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x9c50
testb $0x1, %al
jne 0xa19cc
movq 0x118(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x118(%rsp), %rax
movq 0x14f8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsp)
movq $0x5, 0x80(%rsp)
movq 0x80(%rsp), %rax
andq $-0x800, %rax           # imm = 0xF800
cmpq $0x0, %rax
jne 0xa18fc
movq 0x80(%rsp), %rcx
leaq 0x174b92(%rip), %rax    # 0x216480
movq (%rax,%rcx,8), %rax
movq %rax, 0x8(%rsp)
jmp 0xa1982
jmp 0xa18fe
movq 0x118(%rsp), %rax
movq 0x90(%rax), %rax
movq 0x118(%rsp), %rcx
cmpq 0x98(%rcx), %rax
ja 0xa192b
movq 0x118(%rsp), %rdi
callq 0xc670
movq 0x118(%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, 0x8(%rsp)
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rdx
movq 0x110(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x118(%rsp), %rax
movq 0x140(%rax), %r8
movq 0x178c0b(%rip), %r9     # 0x21a5c8
callq 0xc560
movq %rax, 0x120(%rsp)
jmp 0xa1a38
movq 0x118(%rsp), %rdi
movq 0x110(%rsp), %rax
movq 0x8(%rax), %rsi
callq 0x9be0
andb $0x1, %al
movb %al, 0xef(%rsp)
jmp 0xa19f0
jmp 0xa19f2
jmp 0xa19f4
jmp 0xa19f6
movq 0x118(%rsp), %rdi
movq 0x108(%rsp), %rsi
movq 0x100(%rsp), %rdx
movq 0xf8(%rsp), %rcx
movq 0xf0(%rsp), %r8
movb 0xef(%rsp), %al
andb $0x1, %al
movzbl %al, %r9d
callq 0x447e0
movq %rax, 0x120(%rsp)
movq 0x120(%rsp), %rax
addq $0x128, %rsp            # imm = 0x128
retq
nopl (%rax,%rax)