// File: mertyildiran[P]Plexus/plexus/wrapper.cpp
// Function: PyNetwork_init(PyNetwork*, _object*, _object*)
static int PyNetwork_init(PyNetwork *self, PyObject *args, PyObject *kwargs)
{
    int size;
    int input_dim = 0;
    int output_dim = 0;
    double connectivity = 0.01;
    int precision = 2;
    int randomly_fire = false;
    int dynamic_output = false;
    int visualization = false;
    double decay_factor =  1.0;

    static char *kwlist[] = {
        "size",
        "input_dim",
        "output_dim",
        "connectivity",
        "precision",
        "randomly_fire",
        "dynamic_output",
        "visualization",
        "decay_factor",
        NULL
    };

    if (! PyArg_ParseTupleAndKeywords(
        args,
        kwargs,
        "i|iidipppd",
        kwlist,
        &size,
        &input_dim,
        &output_dim,
        &connectivity,
        &precision,
        &randomly_fire,
        &dynamic_output,
        &visualization,
        &decay_factor
    ))
        return -1;

    self->ptrObj = new Network(
        size,
        input_dim,
        output_dim,
        connectivity,
        precision,
        randomly_fire,
        dynamic_output,
        visualization,
        decay_factor
    );

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xc0, %rsp
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
movq %rdi, -0x68(%rbp)
movq %rsi, -0x70(%rbp)
movq %rdx, -0x78(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movsd 0x33b7(%rip), %xmm0     # 0x27498
movsd %xmm0, -0x40(%rbp)
movl $0x2, -0x44(%rbp)
movl $0x0, -0x48(%rbp)
movl $0x0, -0x4c(%rbp)
movl $0x0, -0x50(%rbp)
movsd 0x2ef6(%rip), %xmm0     # 0x27000
movsd %xmm0, -0x58(%rbp)
movq -0x70(%rbp), %rdi
movq -0x78(%rbp), %rsi
leaq 0x3934(%rip), %rdx      # 0x27a52
leaq 0xdafb(%rip), %rcx      # 0x31c20
leaq -0x2c(%rbp), %r8
leaq -0x30(%rbp), %r9
leaq -0x34(%rbp), %r12
leaq -0x40(%rbp), %r15
leaq -0x44(%rbp), %r14
leaq -0x48(%rbp), %rbx
leaq -0x4c(%rbp), %r11
leaq -0x50(%rbp), %r10
leaq -0x58(%rbp), %rax
movq %r12, (%rsp)
movq %r15, 0x8(%rsp)
movq %r14, 0x10(%rsp)
movq %rbx, 0x18(%rsp)
movq %r11, 0x20(%rsp)
movq %r10, 0x28(%rsp)
movq %rax, 0x30(%rsp)
movb $0x0, %al
callq 0x16120
cmpl $0x0, %eax
jne 0x24183
movl $0xffffffff, -0x5c(%rbp) # imm = 0xFFFFFFFF
jmp 0x24226
movl $0x188, %edi            # imm = 0x188
callq 0x162c0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x90(%rbp)
movl -0x2c(%rbp), %esi
movl -0x30(%rbp), %edx
movl -0x34(%rbp), %ecx
movsd -0x40(%rbp), %xmm0
movl -0x44(%rbp), %r8d
movl -0x48(%rbp), %eax
testl %eax, %eax
setne %al
movl -0x4c(%rbp), %r9d
testl %r9d, %r9d
setne %r10b
movl -0x50(%rbp), %r9d
testl %r9d, %r9d
setne %r9b
movsd -0x58(%rbp), %xmm1
movzbl %r9b, %r11d
movq %rsp, %r9
movl %r11d, 0x8(%r9)
movzbl %r10b, %r10d
movl %r10d, (%r9)
movzbl %al, %r9d
callq 0x16fe0
jmp 0x241ec
movq -0x90(%rbp), %rcx
movq -0x68(%rbp), %rax
movq %rcx, 0x10(%rax)
movl $0x0, -0x5c(%rbp)
jmp 0x24226
movq -0x90(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
movl $0x188, %esi            # imm = 0x188
callq 0x162d0
jmp 0x24257
movl -0x5c(%rbp), %eax
movl %eax, -0x94(%rbp)
movq %fs:0x28, %rax
movq -0x28(%rbp), %rcx
cmpq %rcx, %rax
jne 0x24280
movl -0x94(%rbp), %eax
addq $0xc0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq -0x80(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq %fs:0x28, %rax
movq -0x28(%rbp), %rcx
cmpq %rcx, %rax
jne 0x24280
movq -0xa0(%rbp), %rdi
callq 0x164e0
callq 0x16340
nopw %cs:(%rax,%rax)