// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movss %xmm0, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x5eeaf
movq -0x28(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x5dfb0
movq %rax, -0x30(%rbp)
movl -0x1c(%rbp), %edi
callq 0x31e0
movq -0x8(%rbp), %rdi
callq 0x4850
movq %rax, -0x40(%rbp)
movq 0x2412d(%rip), %rax     # 0x82ff8
movq (%rax), %rdi
movq -0x40(%rbp), %rdx
leaq 0x154c4(%rip), %rsi     # 0x7439d
movb $0x0, %al
callq 0x3240
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0x39a70
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movl 0x80(%rax), %eax
movl %eax, -0x4c(%rbp)
movl $0x0, -0x50(%rbp)
movl -0x50(%rbp), %eax
movq -0x48(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x5ef40
movss -0x18(%rbp), %xmm0
movq -0x48(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x50(%rbp), %rcx
imulq $0x4a0, %rcx, %rcx      # imm = 0x4A0
addq %rcx, %rax
movss %xmm0, 0x18c(%rax)
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x5ef07
movl $0x0, -0x58(%rbp)
movslq -0x4c(%rbp), %rdi
movl $0x4, %esi
callq 0x3220
movq %rax, -0x60(%rbp)
movq $0x0, -0x68(%rbp)
movq -0x48(%rbp), %rdi
xorl %esi, %esi
callq 0x39b10
movq 0x24065(%rip), %rax     # 0x82fd8
movq (%rax), %rdi
callq 0x3470
movl %eax, %ecx
movl %ecx, -0x58(%rbp)
xorl %eax, %eax
cmpl $-0x1, %ecx
movb %al, -0x6d(%rbp)
je 0x5ef94
cmpl $0x0, -0x58(%rbp)
setne %al
movb %al, -0x6d(%rbp)
movb -0x6d(%rbp), %al
testb $0x1, %al
jne 0x5ef9d
jmp 0x5efd5
movq -0x60(%rbp), %rax
movslq -0x58(%rbp), %rcx
movss 0x1205f(%rip), %xmm0    # 0x7100c
movss %xmm0, (%rax,%rcx,4)
movq -0x48(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x3b160
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rax
movslq -0x58(%rbp), %rcx
xorps %xmm0, %xmm0
movss %xmm0, (%rax,%rcx,4)
jmp 0x5ef6c
movl $0x0, -0x50(%rbp)
movl -0x50(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x5f0a6
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jge 0x5f033
movq -0x68(%rbp), %rax
movslq -0x54(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x161a0(%rip), %xmm0    # 0x751b0
ucomisd %xmm1, %xmm0
jbe 0x5f026
movq -0x68(%rbp), %rax
movslq -0x54(%rbp), %rcx
xorps %xmm0, %xmm0
movss %xmm0, (%rax,%rcx,4)
jmp 0x5f028
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x5efef
movq -0x68(%rbp), %rdi
movl -0x4c(%rbp), %esi
callq 0x5a80
movl %eax, -0x6c(%rbp)
cmpl $0x2e, -0x58(%rbp)
jne 0x5f050
cmpl $0xa, -0x6c(%rbp)
jne 0x5f050
jmp 0x5f0a6
movl -0x6c(%rbp), %eax
movl %eax, -0x58(%rbp)
movl -0x58(%rbp), %edi
movq -0x30(%rbp), %rsi
callq 0x5eba0
movq -0x60(%rbp), %rax
movslq -0x58(%rbp), %rcx
movss 0x11f9a(%rip), %xmm0    # 0x7100c
movss %xmm0, (%rax,%rcx,4)
movq -0x48(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x3b160
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rax
movslq -0x58(%rbp), %rcx
xorps %xmm0, %xmm0
movss %xmm0, (%rax,%rcx,4)
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x5efdc
leaq 0x16d01(%rip), %rdi     # 0x75dae
movb $0x0, %al
callq 0x3130
jmp 0x5ef61
nopl (%rax)