// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/rnn.c
// Function: test_tactic_rnn_multi
void test_tactic_rnn_multi(char *cfgfile, char *weightfile, int num, float temp, int rseed, char *token_file)
{
    char **tokens = 0;
    if(token_file){
        size_t n;
        tokens = read_tokens(token_file, &n);
    }

    srand(rseed);
    char *base = basecfg(cfgfile);
    fprintf(stderr, "%s\n", base);

    network *net = load_network(cfgfile, weightfile, 0);
    int inputs = net->inputs;

    int i, j;
    for(i = 0; i < net->n; ++i) net->layers[i].temperature = temp;
    int c = 0;
    float *input = calloc(inputs, sizeof(float));
    float *out = 0;

    while(1){
        reset_network_state(net, 0);
        while((c = getc(stdin)) != EOF && c != 0){
            input[c] = 1;
            out = network_predict(net, input);
            input[c] = 0;
        }
        for(i = 0; i < num; ++i){
            for(j = 0; j < inputs; ++j){
                if (out[j] < .0001) out[j] = 0;
            }
            int next = sample_array(out, inputs);
            if(c == '.' && next == '\n') break;
            c = next;
            print_symbol(c, tokens);

            input[c] = 1;
            out = network_predict(net, input);
            input[c] = 0;
        }
        printf("\n");
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %ebp
movss %xmm0, 0x4(%rsp)
movl %edx, %r13d
movq %rsi, %rbx
movq %rdi, %r15
xorl %r14d, %r14d
testq %r8, %r8
jne 0x3e00b
movq $0x0, 0x8(%rsp)
jmp 0x3e01d
leaq 0x20(%rsp), %rsi
movq %r8, %rdi
callq 0x3d502
movq %rax, 0x8(%rsp)
movl %ebp, %edi
callq 0x3220
movq %r15, %rdi
callq 0x41c8
movq 0x25fc5(%rip), %rcx     # 0x63ff8
movq (%rcx), %rdi
leaq 0x119bd(%rip), %rsi     # 0x4f9fa
movq %rax, %rdx
xorl %eax, %eax
callq 0x3270
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x22658
movq %rax, %r15
movslq 0x80(%rax), %rax
movq %rax, 0x10(%rsp)
movl (%r15), %eax
testl %eax, %eax
cmovlel %r14d, %eax
imulq $0x4a0, %rax, %rax      # imm = 0x4A0
movss 0x4(%rsp), %xmm0
cmpq %r14, %rax
je 0x3e095
movq 0x20(%r15), %rcx
movss %xmm0, 0x18c(%rcx,%r14)
addq $0x4a0, %r14            # imm = 0x4A0
jmp 0x3e079
pushq $0x4
popq %rsi
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x3250
xorl %ebp, %ebp
testl %ebx, %ebx
movl $0x0, %r12d
cmovgl %ebx, %r12d
testl %r13d, %r13d
cmovlel %ebp, %r13d
movl %r13d, 0x4(%rsp)
movq %rax, %r13
movq 0x25f0f(%rip), %r14     # 0x63fd8
movq %r15, 0x18(%rsp)
movq %r15, %rdi
xorl %esi, %esi
callq 0x226ac
movq (%r14), %rdi
callq 0x34a0
movl %eax, %ebx
leal -0x1(%rbx), %eax
cmpl $-0x2, %eax
jae 0x3e10c
movslq %ebx, %rbx
movl $0x3f800000, (%r13,%rbx,4) # imm = 0x3F800000
movq %r15, %rdi
movq %r13, %rsi
callq 0x233e2
movq %rax, %rbp
andl $0x0, (%r13,%rbx,4)
jmp 0x3e0d8
xorl %r15d, %r15d
cmpl 0x4(%rsp), %r15d
je 0x3e18c
xorl %eax, %eax
movsd 0x128b0(%rip), %xmm1    # 0x509d0
cmpq %rax, %r12
je 0x3e13b
cvtss2sd (%rbp,%rax,4), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x3e136
andl $0x0, (%rbp,%rax,4)
incq %rax
jmp 0x3e120
movq %rbp, %rdi
movq 0x10(%rsp), %rsi
callq 0x4b9e
movl %eax, %r14d
xorl $0x2e, %ebx
xorl $0xa, %eax
orl %ebx, %eax
je 0x3e18c
movl %r14d, %edi
movq 0x8(%rsp), %rsi
callq 0x3ddd2
movslq %r14d, %rbx
movl $0x3f800000, (%r13,%rbx,4) # imm = 0x3F800000
movq 0x18(%rsp), %rdi
movq %r13, %rsi
callq 0x233e2
andl $0x0, (%r13,%rbx,4)
movq %rax, %rbp
incl %r15d
movl %r14d, %ebx
jmp 0x3e10f
pushq $0xa
popq %rdi
callq 0x3060
movq 0x18(%rsp), %r15
movq 0x25e38(%rip), %r14     # 0x63fd8
jmp 0x3e0ce