// File: /workspace/github_cpp_makefile_star2_O3/cjxgm[P]libgpp/src/libgpp.cpp
// Function: (anonymous namespace)::Preprocessor::splice_possible_user(int*, int*, int*, int*, int*, int*, int*, int, int*, int)
int splice_possible_user(int *idstart, int *idend, int *sh_end, int *lg_end,
                int *argb, int *arge, int *argc, int idcheck, int *id, int cmtmode) {
            int match, k, pos;

            if (!match_start_sequence(S->user.macro_start, idstart))
                return 0;
            *idend = identifier_end(*idstart);
            if ((*idend) && !get_char(*idend - 1))
                return 0;

            // look for args or no args
            *sh_end = *idend;
            if (!match_end_sequence(S->user.macro_end, sh_end))
                *sh_end = -1;
            pos = *idend;
            match = match_sequence(S->user.macro_arg_start, &pos);

            if (idcheck) {
                *id = find_ident(C->buf + *idstart, *idend - *idstart);
                if (*id < 0)
                    match = 0;
            }
            *lg_end = -1;

            if (match) {
                *argc = 0;
                while (1) {
                    if (*argc >= max_arg_count)
                        bug("too many macro parameters");
                    argb[*argc] = pos;
                    k = 0;
                    while (1) { // look for macro_arg_end, macro_arg_sep, or comment-start
                        pos = iter_identifier_end(pos);
                        skip_possible_comments(&pos, cmtmode, 0);
                        if (get_char(pos) == 0)
                            return (*sh_end >= 0); // EOF
                        if (strchr(S->user.stackchar, get_char(pos)))
                            k++;
                        if (k) {
                            if (strchr(S->user.unstackchar, get_char(pos)))
                                k--;
                        } else {
                            arge[*argc] = pos;
                            if (match_sequence(S->user.macro_arg_sep, &pos)) {
                                match = 0;
                                break;
                            }
                            if (match_end_sequence(S->user.macro_arg_end, &pos)) {
                                match = 1;
                                break;
                            }
                        }
                        pos++; // nothing matched, go forward
                    }
                    (*argc)++;
                    if (match) { // no more args
                        *lg_end = pos;
                        break;
                    }
                }
            }
            return ((*lg_end >= 0) || (*sh_end >= 0));
        }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %rbp
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %r12
movq (%rdi), %rax
movq (%rax), %rsi
movq %r13, %rdx
callq 0x59ba
testl %eax, %eax
je 0x6ced
movl (%r13), %esi
movq %r12, %rdi
callq 0x61fc
movl %eax, (%r15)
testl %eax, %eax
je 0x6cf4
decl %eax
movq %r12, %rdi
movl %eax, %esi
callq 0x60f8
testb %al, %al
je 0x6ced
movq %rbx, 0x10(%rsp)
movl (%r15), %eax
jmp 0x6cfb
xorl %eax, %eax
jmp 0x6ed5
movq %rbx, 0x10(%rsp)
xorl %eax, %eax
movq %rbp, 0x18(%rsp)
movl 0x70(%rsp), %ebx
movl %eax, (%r14)
movq (%r12), %rax
movq 0x8(%rax), %rsi
movq %r12, %rdi
movq %r14, %rdx
callq 0x5bdc
testl %eax, %eax
jne 0x6d25
movl $0xffffffff, (%r14)     # imm = 0xFFFFFFFF
movq %r14, 0x20(%rsp)
movl (%r15), %eax
leaq 0xc(%rsp), %rdx
movl %eax, (%rdx)
movq (%r12), %rax
movq 0x10(%rax), %rsi
movq %r12, %rdi
callq 0x5e70
movl %eax, %ebp
testl %ebx, %ebx
je 0x6d79
movq 0x78(%rsp), %rbx
movq 0x20(%r12), %rax
movslq (%r13), %rdx
movl (%r15), %ecx
subl %edx, %ecx
addq (%rax), %rdx
movq 0x8(%r12), %rdi
movl 0x10(%r12), %esi
callq 0x6514
movl %eax, (%rbx)
testl %eax, %eax
js 0x6ebe
movq 0x10(%rsp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
testl %ebp, %ebp
je 0x6ec9
movl 0x80(%rsp), %ebp
movq 0x68(%rsp), %rax
movl $0x0, (%rax)
xorl %eax, %eax
leaq 0xc(%rsp), %r13
movl 0xc(%rsp), %r14d
cltq
movq 0x18(%rsp), %rcx
movl %r14d, (%rcx,%rax,4)
xorl %ebx, %ebx
movl %r14d, %r15d
movq %r12, %rdi
movl %r14d, %esi
callq 0x61fc
movl %eax, %r14d
cmpl %r15d, %eax
jne 0x6db7
movl %r15d, 0xc(%rsp)
movq %r12, %rdi
movq %r13, %rsi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x6f00
movl 0xc(%rsp), %r14d
movq %r12, %rdi
movl %r14d, %esi
callq 0x60f8
testb %al, %al
je 0x6ec9
movq (%r12), %rax
movq 0x38(%rax), %r15
movq %r12, %rdi
movl %r14d, %esi
callq 0x60f8
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
xorl %ecx, %ecx
testq %rax, %rax
setne %cl
addl %ecx, %ebx
je 0x6e4a
movq (%r12), %rax
movq 0x40(%rax), %r15
movq %r12, %rdi
movl %r14d, %esi
callq 0x60f8
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
cmpq $0x1, %rax
adcl $-0x1, %ebx
jmp 0x6e90
movq 0x68(%rsp), %rax
movslq (%rax), %rax
movq 0x60(%rsp), %rcx
movl %r14d, (%rcx,%rax,4)
movq (%r12), %rax
movq 0x18(%rax), %rsi
movq %r12, %rdi
movq %r13, %rdx
callq 0x5e70
testl %eax, %eax
jne 0x6e9d
movq (%r12), %rax
movq 0x20(%rax), %rsi
movq %r12, %rdi
movq %r13, %rdx
callq 0x5bdc
xorl %ebx, %ebx
movl 0xc(%rsp), %r14d
testl %eax, %eax
jne 0x6ee4
incl %r14d
movl %r14d, 0xc(%rsp)
jmp 0x6db7
movq 0x68(%rsp), %rdx
movl (%rdx), %ecx
leal 0x1(%rcx), %eax
movl %eax, (%rdx)
cmpl $0x63, %ecx
jl 0x6da5
leaq 0x1c61(%rip), %rdi      # 0x8b1a
callq 0x2fa0
movq 0x10(%rsp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq 0x20(%rsp), %rax
movl (%rax), %eax
notl %eax
shrl $0x1f, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x68(%rsp), %rax
incl (%rax)
movq 0x10(%rsp), %rax
movl %r14d, (%rax)
movl $0x1, %eax
testl %r14d, %r14d
jns 0x6ed5
jmp 0x6ec9
nop