// File: /workspace/github_cpp_makefile_star2_O2/kazel1990[P]Inception-v4/generator.cpp
// Function: create_loss(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void create_loss(std::string prv)
{
    std::string cur = "average_pool";
    //pooling
    print("layer {");
    sprintf(buf,"name: \"%s\"",cur.c_str());
    print(buf);
    print("type: \"Pooling\"");
    in_out(prv, cur);

    print("pooling_param {");
    print("pool: AVE");
    print("global_pooling: true");
    print("}");

    print("}");

    //dropout
    prv = cur;
    cur = "dropout";
    print("layer {");
    sprintf(buf,"name: \"%s\"",cur.c_str());
    print(buf);
    print("type: \"Dropout\"");
    in_out(prv, cur);

    print("dropout_param {");
    sprintf(buf,"dropout_ratio: %s",dropout_ratio);
    print(buf);
    print("}");

    print("}");

    //classifier
    prv = cur;
    cur = "classifier";
    print("layer {");
    sprintf(buf,"name: \"%s\"",cur.c_str());
    print(buf);
    print("type: \"InnerProduct\"");
    in_out(prv, cur);

    print("param {");
    print("lr_mult: 1");
    print("decay_mult: 1");
    print("}");

    print("param {");
    print("lr_mult: 2");
    print("decay_mult: 0");
    print("}");

    print("inner_product_param {");
    print("num_output: 1000");

    print("weight_filler {");
    print("type: \"xavier\"");
    print("}");

    print("bias_filler {");
    print("type: \"constant\"");
    print("value: 0");
    print("}");

    print("}");

    print("}");

    //loss
    prv = cur;
    cur = "loss/loss";
    print("layer {");
    sprintf(buf,"name: \"%s\"",cur.c_str());
    print(buf);
    print("type: \"SoftmaxWithLoss\"");
    in_out({prv, "label"}, cur);
    print("loss_weight: 1");
    print("}");

    cur = "loss/top-1";
    print("layer {");
    sprintf(buf,"name: \"%s\"",cur.c_str());
    print(buf);
    print("type: \"Accuracy\"");
    in_out({prv, "label"}, cur);
    print("include {");
    print("phase: TEST");
    print("}");
    print("}");

    cur = "loss/top-5";
    print("layer {");
    sprintf(buf,"name: \"%s\"",cur.c_str());
    print(buf);
    print("type: \"Accuracy\"");
    in_out({prv, "label"}, cur);
    print("include {");
    print("phase: TEST");
    print("}");
    print("accuracy_param {");
    print("top_k: 5");
    print("}");
    print("}");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
movq %rdi, %rbx
leaq 0x20af(%rip), %rsi      # 0x95df
leaq 0x8(%rsp), %r14
leaq 0x28(%rsp), %rdx
movq %r14, %rdi
callq 0x7fb8
leaq 0x1ad5(%rip), %rdi      # 0x901e
callq 0x12ac
movq (%r14), %rdx
leaq 0x5bb8(%rip), %r14      # 0xd110
leaq 0x1ac7(%rip), %rsi      # 0x9026
movq %r14, %rdi
xorl %eax, %eax
callq 0x1040
movq %r14, %rdi
callq 0x12ac
leaq 0x1c6b(%rip), %rdi      # 0x91e3
callq 0x12ac
leaq 0xf0(%rsp), %rdi
movq %rbx, %rsi
callq 0x1130
leaq 0x1b0(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1130
leaq 0xf0(%rsp), %r14
leaq 0x1b0(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x139b
movq %r15, %rdi
callq 0x1090
movq %r14, %rdi
callq 0x1090
leaq 0x1c22(%rip), %rdi      # 0x91f3
callq 0x12ac
leaq 0x200f(%rip), %rdi      # 0x95ec
callq 0x12ac
leaq 0x200d(%rip), %rdi      # 0x95f6
callq 0x12ac
leaq 0x1a69(%rip), %r14      # 0x905e
movq %r14, %rdi
callq 0x12ac
movq %r14, %rdi
callq 0x12ac
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x10b0
leaq 0x1ff2(%rip), %rsi      # 0x960b
leaq 0x8(%rsp), %rdi
callq 0x11a0
leaq 0x19f4(%rip), %rdi      # 0x901e
callq 0x12ac
movq 0x8(%rsp), %rdx
leaq 0x5ad5(%rip), %r14      # 0xd110
leaq 0x19e4(%rip), %rsi      # 0x9026
movq %r14, %rdi
xorl %eax, %eax
callq 0x1040
movq %r14, %rdi
callq 0x12ac
leaq 0x1fb8(%rip), %rdi      # 0x9613
callq 0x12ac
leaq 0xd0(%rsp), %rdi
movq %rbx, %rsi
callq 0x1130
leaq 0x190(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1130
leaq 0xd0(%rsp), %r14
leaq 0x190(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x139b
movq %r15, %rdi
callq 0x1090
movq %r14, %rdi
callq 0x1090
leaq 0x1f6f(%rip), %rdi      # 0x9623
callq 0x12ac
leaq 0x5a50(%rip), %r14      # 0xd110
leaq 0x1f6c(%rip), %rsi      # 0x9633
leaq 0x21a6(%rip), %rdx      # 0x9874
movq %r14, %rdi
xorl %eax, %eax
callq 0x1040
movq %r14, %rdi
callq 0x12ac
leaq 0x1977(%rip), %r14      # 0x905e
movq %r14, %rdi
callq 0x12ac
movq %r14, %rdi
callq 0x12ac
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x10b0
leaq 0x1f3a(%rip), %rsi      # 0x9645
leaq 0x8(%rsp), %rdi
callq 0x11a0
leaq 0x1902(%rip), %rdi      # 0x901e
callq 0x12ac
movq 0x8(%rsp), %rdx
leaq 0x59e3(%rip), %r14      # 0xd110
leaq 0x18f2(%rip), %rsi      # 0x9026
movq %r14, %rdi
xorl %eax, %eax
callq 0x1040
movq %r14, %rdi
callq 0x12ac
leaq 0x1f03(%rip), %rdi      # 0x9650
callq 0x12ac
leaq 0xb0(%rsp), %rdi
movq %rbx, %rsi
callq 0x1130
leaq 0x170(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1130
leaq 0xb0(%rsp), %r14
leaq 0x170(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x139b
movq %r15, %rdi
callq 0x1090
movq %r14, %rdi
callq 0x1090
leaq 0x1b22(%rip), %r15      # 0x92c8
movq %r15, %rdi
callq 0x12ac
leaq 0x1890(%rip), %rdi      # 0x9045
callq 0x12ac
leaq 0x188f(%rip), %rdi      # 0x9050
callq 0x12ac
leaq 0x1891(%rip), %r14      # 0x905e
movq %r14, %rdi
callq 0x12ac
movq %r15, %rdi
callq 0x12ac
leaq 0x187c(%rip), %rdi      # 0x9060
callq 0x12ac
leaq 0x187b(%rip), %rdi      # 0x906b
callq 0x12ac
movq %r14, %rdi
callq 0x12ac
leaq 0x1e61(%rip), %rdi      # 0x9665
callq 0x12ac
leaq 0x1e6b(%rip), %rdi      # 0x967b
callq 0x12ac
leaq 0x18d1(%rip), %rdi      # 0x90ed
callq 0x12ac
leaq 0x18d5(%rip), %rdi      # 0x90fd
callq 0x12ac
movq %r14, %rdi
callq 0x12ac
leaq 0x18d8(%rip), %rdi      # 0x9114
callq 0x12ac
leaq 0x18da(%rip), %rdi      # 0x9122
callq 0x12ac
leaq 0x1e38(%rip), %rdi      # 0x968c
callq 0x12ac
movq %r14, %rdi
callq 0x12ac
movq %r14, %rdi
callq 0x12ac
movq %r14, %rdi
callq 0x12ac
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x10b0
leaq 0x1e10(%rip), %rsi      # 0x9695
leaq 0x8(%rsp), %rdi
callq 0x11a0
leaq 0x1788(%rip), %rdi      # 0x901e
callq 0x12ac
movq 0x8(%rsp), %rdx
leaq 0x5869(%rip), %r14      # 0xd110
leaq 0x1778(%rip), %rsi      # 0x9026
movq %r14, %rdi
xorl %eax, %eax
callq 0x1040
movq %r14, %rdi
callq 0x12ac
leaq 0x1dd8(%rip), %rdi      # 0x969f
callq 0x12ac
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq 0x1130
leaq 0x48(%rsp), %rdi
leaq 0x1dd2(%rip), %rsi      # 0x96b7
leaq 0x7(%rsp), %rdx
callq 0x7fb8
leaq 0x98(%rsp), %rdi
leaq 0x28(%rsp), %rsi
pushq $0x2
popq %rdx
leaq 0x6(%rsp), %rcx
callq 0x7ff4
leaq 0x150(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1130
leaq 0x98(%rsp), %r14
leaq 0x150(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x132a
movq %r15, %rdi
callq 0x1090
movq %r14, %rdi
callq 0x7f96
pushq $0x20
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x28, %rdi
callq 0x1090
addq $-0x20, %r14
cmpq $-0x20, %r14
jne 0x794a
leaq 0x1d55(%rip), %rdi      # 0x96bd
callq 0x12ac
leaq 0x16ea(%rip), %rdi      # 0x905e
callq 0x12ac
leaq 0x1d4c(%rip), %rsi      # 0x96cc
leaq 0x8(%rsp), %rdi
callq 0x11a0
leaq 0x168d(%rip), %rdi      # 0x901e
callq 0x12ac
movq 0x8(%rsp), %rdx
leaq 0x576e(%rip), %r14      # 0xd110
leaq 0x167d(%rip), %rsi      # 0x9026
movq %r14, %rdi
xorl %eax, %eax
callq 0x1040
movq %r14, %rdi
callq 0x12ac
leaq 0x1d15(%rip), %rdi      # 0x96d7
callq 0x12ac
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq 0x1130
leaq 0x48(%rsp), %rdi
leaq 0x1cd7(%rip), %rsi      # 0x96b7
leaq 0x7(%rsp), %rdx
callq 0x7fb8
leaq 0x80(%rsp), %rdi
leaq 0x28(%rsp), %rsi
pushq $0x2
popq %rdx
leaq 0x6(%rsp), %rcx
callq 0x7ff4
leaq 0x130(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1130
leaq 0x80(%rsp), %r14
leaq 0x130(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x132a
movq %r15, %rdi
callq 0x1090
movq %r14, %rdi
callq 0x7f96
pushq $0x20
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x28, %rdi
callq 0x1090
addq $-0x20, %r14
cmpq $-0x20, %r14
jne 0x7a45
leaq 0x17eb(%rip), %rdi      # 0x924e
callq 0x12ac
leaq 0x1c79(%rip), %rdi      # 0x96e8
callq 0x12ac
leaq 0x15e3(%rip), %r14      # 0x905e
movq %r14, %rdi
callq 0x12ac
movq %r14, %rdi
callq 0x12ac
leaq 0x1c62(%rip), %rsi      # 0x96f4
leaq 0x8(%rsp), %rdi
callq 0x11a0
leaq 0x157b(%rip), %rdi      # 0x901e
callq 0x12ac
movq 0x8(%rsp), %rdx
leaq 0x565c(%rip), %r14      # 0xd110
leaq 0x156b(%rip), %rsi      # 0x9026
movq %r14, %rdi
xorl %eax, %eax
callq 0x1040
movq %r14, %rdi
callq 0x12ac
leaq 0x1c03(%rip), %rdi      # 0x96d7
callq 0x12ac
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq 0x1130
leaq 0x48(%rsp), %rdi
leaq 0x1bc5(%rip), %rsi      # 0x96b7
leaq 0x7(%rsp), %rdx
callq 0x7fb8
leaq 0x68(%rsp), %rdi
leaq 0x28(%rsp), %rsi
pushq $0x2
popq %rdx
leaq 0x6(%rsp), %rcx
callq 0x7ff4
leaq 0x110(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1130
leaq 0x68(%rsp), %rbx
leaq 0x110(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x132a
movq %r14, %rdi
callq 0x1090
movq %rbx, %rdi
callq 0x7f96
pushq $0x20
popq %rbx
leaq (%rsp,%rbx), %rdi
addq $0x28, %rdi
callq 0x1090
addq $-0x20, %rbx
cmpq $-0x20, %rbx
jne 0x7b50
leaq 0x16e0(%rip), %rdi      # 0x924e
callq 0x12ac
leaq 0x1b6e(%rip), %rdi      # 0x96e8
callq 0x12ac
leaq 0x14d8(%rip), %rbx      # 0x905e
movq %rbx, %rdi
callq 0x12ac
leaq 0x1b6a(%rip), %rdi      # 0x96ff
callq 0x12ac
leaq 0x1b6f(%rip), %rdi      # 0x9710
callq 0x12ac
movq %rbx, %rdi
callq 0x12ac
movq %rbx, %rdi
callq 0x12ac
leaq 0x8(%rsp), %rdi
callq 0x1090
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x7f96
jmp 0x7bdf
movq %rax, %rbx
pushq $0x20
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x28, %rdi
callq 0x1090
addq $-0x20, %r14
cmpq $-0x20, %r14
jne 0x7be3
jmp 0x7ca9
jmp 0x7c6e
jmp 0x7ca6
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x7f96
jmp 0x7c1b
movq %rax, %rbx
pushq $0x20
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x28, %rdi
callq 0x1090
addq $-0x20, %r14
cmpq $-0x20, %r14
jne 0x7c1f
jmp 0x7ca9
jmp 0x7c6e
jmp 0x7ca6
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x7f96
jmp 0x7c51
movq %rax, %rbx
pushq $0x20
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x28, %rdi
callq 0x1090
addq $-0x20, %r14
cmpq $-0x20, %r14
jne 0x7c55
jmp 0x7ca9
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
jmp 0x7c9f
jmp 0x7ca6
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
jmp 0x7c9f
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
jmp 0x7c9f
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x1090
jmp 0x7ca9
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1090
movq %rbx, %rdi
callq 0x1170