// File: /workspace/github_c_makefile_star2_O0/WojciechMula[P]pyahocorasick/src/custompickle/pyhelpers.c
// Function: automaton_save_load_parse_args
bool 
automaton_save_load_parse_args(KeysStore store, PyObject* args, SaveLoadParameters* result) {

    PyObject* string;

    if (store == STORE_ANY) {
        if (PyTuple_GET_SIZE(args) != 2) {
            PyErr_SetString(PyExc_ValueError, "expected exactly two arguments");
            return false;
        }
    } else {
        if (PyTuple_GET_SIZE(args) != 1) {
            PyErr_SetString(PyExc_ValueError, "expected exactly one argument");
            return false;
        }
    }

    string = F(PyTuple_GetItem)(args, 0);
    if (UNLIKELY(string == NULL)) {
        return false;
    }

#if defined(PY3K)
    if (UNLIKELY(!F(PyUnicode_Check)(string))) {
        PyErr_SetString(PyExc_TypeError, "the first argument must be a string");
        return false;
    }
#else
    if (UNLIKELY(!F(PyString_Check)(string))) {
        PyErr_SetString(PyExc_TypeError, "the first argument must be a string");
        return false;
    }
#endif

    if (store == STORE_ANY) {
        result->callback = F(PyTuple_GetItem)(args, 1);
        if (UNLIKELY(result->callback == NULL)) {
            return false;
        }

        if (UNLIKELY(!F(PyCallable_Check)(result->callback))) {
            PyErr_SetString(PyExc_TypeError, "the second argument must be a callable object");
            return false;
        }
    }

#if defined(PY3K)
    result->path = F(PyUnicode_AsUTF8String)(string);
#else
    result->path = string;
    Py_INCREF(string);
#endif
    if (UNLIKELY(result->path == NULL)) {
        return false;
    }

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpl $0x1e, -0x8(%rbp)
jne 0x42ad
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x4000000, %esi        # imm = 0x4000000
callq 0x4450
cmpl $0x0, %eax
je 0x4262
jmp 0x4281
leaq 0x7e8f(%rip), %rdi      # 0xc0f8
leaq 0x7e9c(%rip), %rsi      # 0xc10c
movl $0x9, %edx
leaq 0x7ead(%rip), %rcx      # 0xc129
callq 0x3130
movq -0x10(%rbp), %rax
cmpq $0x2, 0x10(%rax)
je 0x42ab
movq 0xdcf5(%rip), %rax      # 0x11f88
movq (%rax), %rdi
leaq 0x7ede(%rip), %rsi      # 0xc17b
callq 0x3120
movb $0x0, -0x1(%rbp)
jmp 0x4439
jmp 0x4311
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x4000000, %esi        # imm = 0x4000000
callq 0x4450
cmpl $0x0, %eax
je 0x42c6
jmp 0x42e5
leaq 0x7e2b(%rip), %rdi      # 0xc0f8
leaq 0x7e38(%rip), %rsi      # 0xc10c
movl $0xe, %edx
leaq 0x7e49(%rip), %rcx      # 0xc129
callq 0x3130
movq -0x10(%rbp), %rax
cmpq $0x1, 0x10(%rax)
je 0x430f
movq 0xdc91(%rip), %rax      # 0x11f88
movq (%rax), %rdi
leaq 0x7e99(%rip), %rsi      # 0xc19a
callq 0x3120
movb $0x0, -0x1(%rbp)
jmp 0x4439
jmp 0x4311
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3140
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x4340
movb $0x0, -0x1(%rbp)
jmp 0x4439
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x10000000, %esi       # imm = 0x10000000
callq 0x4450
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x4386
movq 0xdc22(%rip), %rax      # 0x11f90
movq (%rax), %rdi
leaq 0x7e40(%rip), %rsi      # 0xc1b8
callq 0x3120
movb $0x0, -0x1(%rbp)
jmp 0x4439
cmpl $0x1e, -0x8(%rbp)
jne 0x4404
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x3140
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
sete %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x43c4
movb $0x0, -0x1(%rbp)
jmp 0x4439
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x32a0
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x4402
movq 0xdba3(%rip), %rax      # 0x11f90
movq (%rax), %rdi
leaq 0x7de5(%rip), %rsi      # 0xc1dc
callq 0x3120
movb $0x0, -0x1(%rbp)
jmp 0x4439
jmp 0x4404
movq -0x20(%rbp), %rdi
callq 0x30b0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
sete %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x4435
movb $0x0, -0x1(%rbp)
jmp 0x4439
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)