// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/iseg_layer.c
// Function: make_iseg_layer
layer make_iseg_layer(int batch, int w, int h, int classes, int ids)
{
    layer l = {0};
    l.type = ISEG;

    l.h = h;
    l.w = w;
    l.c = classes + ids;
    l.out_w = l.w;
    l.out_h = l.h;
    l.out_c = l.c;
    l.classes = classes;
    l.batch = batch;
    l.extra = ids;
    l.cost = calloc(1, sizeof(float));
    l.outputs = h*w*l.c;
    l.inputs = l.outputs;
    l.truths = 90*(l.w*l.h+1);
    l.delta = calloc(batch*l.outputs, sizeof(float));
    l.output = calloc(batch*l.outputs, sizeof(float));

    l.counts = calloc(90, sizeof(int));
    l.sums = calloc(90, sizeof(float*));
    if(ids){
        int i;
        for(i = 0; i < 90; ++i){
            l.sums[i] = calloc(ids, sizeof(float));
        }
    }

    l.forward = forward_iseg_layer;
    l.backward = backward_iseg_layer;

    fprintf(stderr, "iseg\n");
    srand(0);

    return l;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x20(%rbp)
movq %rdi, %rax
movq %rax, -0x28(%rbp)
movl %esi, -0x4(%rbp)
movl %edx, -0x8(%rbp)
movl %ecx, -0xc(%rbp)
movl %r8d, -0x10(%rbp)
movl %r9d, -0x14(%rbp)
xorl %esi, %esi
movl $0x4a0, %edx            # imm = 0x4A0
callq 0x3190
movq -0x20(%rbp), %rdi
movl $0x18, (%rdi)
movl -0xc(%rbp), %eax
movl %eax, 0x6c(%rdi)
movl -0x8(%rbp), %eax
movl %eax, 0x70(%rdi)
movl -0x10(%rbp), %eax
addl -0x14(%rbp), %eax
movl %eax, 0x74(%rdi)
movl 0x70(%rdi), %eax
movl %eax, 0x7c(%rdi)
movl 0x6c(%rdi), %eax
movl %eax, 0x78(%rdi)
movl 0x74(%rdi), %eax
movl %eax, 0x80(%rdi)
movl -0x10(%rbp), %eax
movl %eax, 0xfc(%rdi)
movl -0x4(%rbp), %eax
movl %eax, 0x48(%rdi)
movl -0x14(%rbp), %eax
movl %eax, 0x64(%rdi)
movl $0x1, %edi
movl $0x4, %esi
callq 0x3220
movq -0x20(%rbp), %rdi
movq %rax, 0x1d8(%rdi)
movl -0xc(%rbp), %eax
imull -0x8(%rbp), %eax
imull 0x74(%rdi), %eax
movl %eax, 0x58(%rdi)
movl 0x58(%rdi), %eax
movl %eax, 0x54(%rdi)
movl 0x70(%rdi), %eax
imull 0x6c(%rdi), %eax
addl $0x1, %eax
imull $0x5a, %eax, %eax
movl %eax, 0x68(%rdi)
movl -0x4(%rbp), %eax
imull 0x58(%rdi), %eax
movslq %eax, %rdi
movl $0x4, %esi
callq 0x3220
movq -0x20(%rbp), %rdi
movq %rax, 0x260(%rdi)
movl -0x4(%rbp), %eax
imull 0x58(%rdi), %eax
movslq %eax, %rdi
movl $0x4, %esi
callq 0x3220
movq -0x20(%rbp), %rdi
movq %rax, 0x268(%rdi)
movl $0x5a, %edi
movl $0x4, %esi
callq 0x3220
movq -0x20(%rbp), %rdi
movq %rax, 0x1c0(%rdi)
movl $0x5a, %edi
movl $0x8, %esi
callq 0x3220
movq -0x20(%rbp), %rdi
movq %rax, 0x1c8(%rdi)
cmpl $0x0, -0x14(%rbp)
je 0x539fd
movl $0x0, -0x18(%rbp)
cmpl $0x5a, -0x18(%rbp)
jge 0x539fb
movslq -0x14(%rbp), %rdi
movl $0x4, %esi
callq 0x3220
movq %rax, %rdx
movq -0x20(%rbp), %rax
movq 0x1c8(%rax), %rax
movslq -0x18(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x539c6
jmp 0x539fd
movq -0x20(%rbp), %rax
leaq 0x38(%rip), %rcx        # 0x53a40
movq %rcx, 0x10(%rax)
leaq 0xa7d(%rip), %rcx       # 0x54490
movq %rcx, 0x18(%rax)
movq 0x2f5da(%rip), %rax     # 0x82ff8
movq (%rax), %rdi
leaq 0x21d10(%rip), %rsi     # 0x75738
movb $0x0, %al
callq 0x3240
xorl %edi, %edi
callq 0x31e0
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq