// File: 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
movq %rsp, %rbp
subq $0x70, %rsp
movl 0x30(%rbp), %eax
movq 0x28(%rbp), %rax
movl 0x20(%rbp), %eax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x50(%rbp)
movq (%rdi), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
callq 0x3c00
cmpl $0x0, %eax
jne 0x8f5a
movl $0x0, -0x4(%rbp)
jmp 0x91e2
movq -0x50(%rbp), %rdi
movq -0x18(%rbp), %rax
movl (%rax), %esi
callq 0x6db0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
je 0x8f9c
movq -0x50(%rbp), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %esi
subl $0x1, %esi
callq 0x6c80
cmpb $0x0, %al
jne 0x8f9c
movl $0x0, -0x4(%rbp)
jmp 0x91e2
movq -0x50(%rbp), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq (%rdi), %rax
movq 0x8(%rax), %rsi
movq -0x28(%rbp), %rdx
callq 0x3f80
cmpl $0x0, %eax
jne 0x8fcb
movq -0x28(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq -0x50(%rbp), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x44(%rbp)
movq (%rdi), %rax
movq 0x10(%rax), %rsi
leaq -0x44(%rbp), %rdx
callq 0x6810
movl %eax, -0x3c(%rbp)
cmpl $0x0, 0x20(%rbp)
je 0x9031
movq -0x50(%rbp), %rdi
movq 0x20(%rdi), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rax
movslq (%rax), %rax
addq %rax, %rsi
movq -0x20(%rbp), %rax
movl (%rax), %edx
movq -0x18(%rbp), %rax
subl (%rax), %edx
callq 0x77e0
movl %eax, %ecx
movq 0x28(%rbp), %rax
movl %ecx, (%rax)
movq 0x28(%rbp), %rax
cmpl $0x0, (%rax)
jge 0x902f
movl $0x0, -0x3c(%rbp)
jmp 0x9031
movq -0x30(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
cmpl $0x0, -0x3c(%rbp)
je 0x91bc
movq 0x18(%rbp), %rax
movl $0x0, (%rax)
movq 0x18(%rbp), %rax
cmpl $0x64, (%rax)
jl 0x9064
leaq 0x2c20(%rip), %rdi      # 0xbc7f
callq 0x35e0
movl -0x44(%rbp), %edx
movq -0x38(%rbp), %rax
movq 0x18(%rbp), %rcx
movslq (%rcx), %rcx
movl %edx, (%rax,%rcx,4)
movl $0x0, -0x40(%rbp)
movq -0x50(%rbp), %rdi
movl -0x44(%rbp), %esi
callq 0x91f0
movq -0x50(%rbp), %rdi
movl %eax, -0x44(%rbp)
movl 0x30(%rbp), %edx
leaq -0x44(%rbp), %rsi
xorl %ecx, %ecx
callq 0x9230
movq -0x50(%rbp), %rdi
movl -0x44(%rbp), %esi
callq 0x6c80
movsbl %al, %eax
cmpl $0x0, %eax
jne 0x90c8
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
setge %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0x91e2
movq -0x50(%rbp), %rdi
movq (%rdi), %rax
movq 0x38(%rax), %rax
movq %rax, -0x58(%rbp)
movl -0x44(%rbp), %esi
callq 0x6c80
movq -0x58(%rbp), %rdi
movsbl %al, %esi
callq 0x2040
cmpq $0x0, %rax
je 0x90fa
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
cmpl $0x0, -0x40(%rbp)
je 0x9134
movq -0x50(%rbp), %rdi
movq (%rdi), %rax
movq 0x40(%rax), %rax
movq %rax, -0x60(%rbp)
movl -0x44(%rbp), %esi
callq 0x6c80
movq -0x60(%rbp), %rdi
movsbl %al, %esi
callq 0x2040
cmpq $0x0, %rax
je 0x9132
movl -0x40(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x918b
movq -0x50(%rbp), %rdi
movl -0x44(%rbp), %edx
movq 0x10(%rbp), %rax
movq 0x18(%rbp), %rcx
movslq (%rcx), %rcx
movl %edx, (%rax,%rcx,4)
movq (%rdi), %rax
movq 0x18(%rax), %rsi
leaq -0x44(%rbp), %rdx
callq 0x6810
cmpl $0x0, %eax
je 0x9167
movl $0x0, -0x3c(%rbp)
jmp 0x9199
movq -0x50(%rbp), %rdi
movq (%rdi), %rax
movq 0x20(%rax), %rsi
leaq -0x44(%rbp), %rdx
callq 0x3f80
cmpl $0x0, %eax
je 0x9189
movl $0x1, -0x3c(%rbp)
jmp 0x9199
jmp 0x918b
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x907c
movq 0x18(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
cmpl $0x0, -0x3c(%rbp)
je 0x91b5
movl -0x44(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
jmp 0x91ba
jmp 0x904f
jmp 0x91bc
movq -0x30(%rbp), %rcx
movb $0x1, %al
cmpl $0x0, (%rcx)
movb %al, -0x61(%rbp)
jge 0x91d7
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
setge %al
movb %al, -0x61(%rbp)
movb -0x61(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)