// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/peg.c
// Function: peg_cfun_init
static PegCall peg_cfun_init(int32_t argc, Janet *argv, int get_replace) {
    PegCall ret;
    int32_t min = get_replace ? 3 : 2;
    janet_arity(argc, min, -1);
    if (janet_checktype(argv[0], JANET_ABSTRACT) &&
            janet_abstract_type(janet_unwrap_abstract(argv[0])) == &janet_peg_type) {
        ret.peg = janet_unwrap_abstract(argv[0]);
    } else {
        ret.peg = compile_peg(argv[0]);
    }
    if (get_replace) {
        ret.subst = argv[1];
        ret.bytes = janet_getbytes(argv, 2);
    } else {
        ret.bytes = janet_getbytes(argv, 1);
    }
    if (argc > min) {
        ret.start = janet_gethalfrange(argv, min, ret.bytes.len, "offset");
        ret.s.extrac = argc - min - 1;
        ret.s.extrav = janet_tuple_n(argv + min + 1, argc - min - 1);
    } else {
        ret.start = 0;
        ret.s.extrac = 0;
        ret.s.extrav = NULL;
    }
    ret.s.mode = PEG_MODE_NORMAL;
    ret.s.text_start = ret.bytes.bytes;
    ret.s.text_end = ret.bytes.bytes + ret.bytes.len;
    ret.s.outer_text_end = ret.s.text_end;
    ret.s.depth = JANET_RECURSION_GUARD;
    ret.s.captures = janet_array(0);
    ret.s.tagged_captures = janet_array(0);
    ret.s.scratch = janet_buffer(10);
    ret.s.tags = janet_buffer(10);
    ret.s.constants = ret.peg->constants;
    ret.s.bytecode = ret.peg->bytecode;
    ret.s.linemap = NULL;
    ret.s.linemaplen = -1;
    ret.s.has_backref = ret.peg->has_backref;
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x48(%rbp)
movq %rdi, -0x40(%rbp)
movl %esi, -0x4(%rbp)
movq %rdx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl -0x14(%rbp), %edx
movl $0x2, %eax
movl $0x3, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x18(%rbp)
movl -0x4(%rbp), %edi
movl -0x18(%rbp), %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1ae30
xorl %eax, %eax
testb $0x1, %al
jne 0x54098
jmp 0x540c4
movq -0x10(%rbp), %rax
movsd (%rax), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x540ad
jmp 0x540e4
movq -0x10(%rbp), %rax
movq (%rax), %rax
shrq $0x2f, %rax
andq $0xf, %rax
cmpq $0x0, %rax
je 0x540e4
jmp 0x54115
movq -0x10(%rbp), %rcx
movabsq $-0x800000000000, %rax  # imm = 0xFFFF800000000000
andq (%rcx), %rax
movabsq $-0x1000000000000, %rcx # imm = 0xFFFF000000000000
cmpq %rcx, %rax
jne 0x54115
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x7b260
leaq 0x5ad69(%rip), %rcx     # 0xaee60
cmpq %rcx, -0x10(%rax)
jne 0x54115
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x7b260
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, (%rax)
jmp 0x5412b
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x53ec0
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, (%rax)
cmpl $0x0, -0x14(%rbp)
je 0x54175
movq -0x48(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, 0x88(%rax)
movq -0x10(%rbp), %rdi
movl $0x2, %esi
callq 0x1c4d0
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x28(%rbp)
movl %edx, -0x20(%rbp)
movq -0x28(%rbp), %rcx
movq %rcx, 0x78(%rax)
movq -0x20(%rbp), %rcx
movq %rcx, 0x80(%rax)
jmp 0x541a4
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x1c4d0
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x38(%rbp)
movl %edx, -0x30(%rbp)
movq -0x38(%rbp), %rcx
movq %rcx, 0x78(%rax)
movq -0x30(%rbp), %rcx
movq %rcx, 0x80(%rax)
movl -0x4(%rbp), %eax
cmpl -0x18(%rbp), %eax
jle 0x5420f
movq -0x48(%rbp), %rax
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
movl 0x80(%rax), %edx
leaq 0x311c1(%rip), %rcx     # 0x85385
callq 0x1c9f0
movl %eax, %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x90(%rax)
movl -0x4(%rbp), %ecx
subl -0x18(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, 0x60(%rax)
movq -0x10(%rbp), %rdi
movslq -0x18(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
addq $0x8, %rdi
movl -0x4(%rbp), %esi
subl -0x18(%rbp), %esi
subl $0x1, %esi
callq 0x6a7d0
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x50(%rax)
jmp 0x5422c
movq -0x48(%rbp), %rax
movl $0x0, 0x90(%rax)
movl $0x0, 0x60(%rax)
movq $0x0, 0x50(%rax)
movq -0x48(%rbp), %rax
movl $0x0, 0x70(%rax)
movq 0x78(%rax), %rcx
movq %rcx, 0x8(%rax)
movq 0x78(%rax), %rcx
movslq 0x80(%rax), %rdx
addq %rdx, %rcx
movq %rcx, 0x10(%rax)
movq 0x10(%rax), %rcx
movq %rcx, 0x18(%rax)
movl $0x400, 0x64(%rax)      # imm = 0x400
xorl %edi, %edi
callq 0x13180
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x30(%rax)
xorl %edi, %edi
callq 0x13180
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x48(%rax)
movl $0xa, %edi
callq 0x18490
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x38(%rax)
movl $0xa, %edi
callq 0x18490
movq -0x48(%rbp), %rcx
movq %rax, %rdx
movq -0x40(%rbp), %rax
movq %rdx, 0x40(%rcx)
movq (%rcx), %rdx
movq 0x8(%rdx), %rdx
movq %rdx, 0x28(%rcx)
movq (%rcx), %rdx
movq (%rdx), %rdx
movq %rdx, 0x20(%rcx)
movq $0x0, 0x58(%rcx)
movl $0xffffffff, 0x68(%rcx) # imm = 0xFFFFFFFF
movq (%rcx), %rdx
movl 0x1c(%rdx), %edx
movl %edx, 0x6c(%rcx)
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)