// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/rnn.c
// Function: get_seq2seq_data
float_pair get_seq2seq_data(char **source, char **dest, int n, int characters, size_t len, int batch, int steps)
{
    int i,j;
    float *x = calloc(batch * steps * characters, sizeof(float));
    float *y = calloc(batch * steps * characters, sizeof(float));
    for(i = 0; i < batch; ++i){
        int index = rand()%n;
        //int slen = strlen(source[index]);
        //int dlen = strlen(dest[index]);
        for(j = 0; j < steps; ++j){
            unsigned char curr = source[index][j];
            unsigned char next = dest[index][j];

            x[(j*batch + i)*characters + curr] = 1;
            y[(j*batch + i)*characters + next] = 1;

            if(curr > 255 || curr <= 0 || next > 255 || next <= 0){
                /*text[(index+j+2)%len] = 0;
                printf("%ld %d %d %d %d\n", index, j, len, (int)text[index+j], (int)text[index+j+1]);
                printf("%s", text+index);
                */
                error("Bad char");
            }
        }
    }
    float_pair p;
    p.x = x;
    p.y = y;
    return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movl %edx, -0x24(%rbp)
movl %ecx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
movl -0x34(%rbp), %eax
imull 0x10(%rbp), %eax
imull -0x28(%rbp), %eax
movslq %eax, %rdi
movl $0x4, %esi
callq 0x3220
movq %rax, -0x48(%rbp)
movl -0x34(%rbp), %eax
imull 0x10(%rbp), %eax
imull -0x28(%rbp), %eax
movslq %eax, %rdi
movl $0x4, %esi
callq 0x3220
movq %rax, -0x50(%rbp)
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x34(%rbp), %eax
jge 0x5e3bb
callq 0x34b0
cltd
idivl -0x24(%rbp)
movl %edx, -0x54(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl 0x10(%rbp), %eax
jge 0x5e3ab
movq -0x18(%rbp), %rax
movslq -0x54(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x3c(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x55(%rbp)
movq -0x20(%rbp), %rax
movslq -0x54(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x3c(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x56(%rbp)
movq -0x48(%rbp), %rax
movl -0x3c(%rbp), %ecx
imull -0x34(%rbp), %ecx
addl -0x38(%rbp), %ecx
imull -0x28(%rbp), %ecx
movzbl -0x55(%rbp), %edx
addl %edx, %ecx
movslq %ecx, %rcx
movss 0x12cd2(%rip), %xmm0    # 0x7100c
movss %xmm0, (%rax,%rcx,4)
movq -0x50(%rbp), %rax
movl -0x3c(%rbp), %ecx
imull -0x34(%rbp), %ecx
addl -0x38(%rbp), %ecx
imull -0x28(%rbp), %ecx
movzbl -0x56(%rbp), %edx
addl %edx, %ecx
movslq %ecx, %rcx
movss 0x12caa(%rip), %xmm0    # 0x7100c
movss %xmm0, (%rax,%rcx,4)
movzbl -0x55(%rbp), %eax
cmpl $0xff, %eax
jg 0x5e38f
movzbl -0x55(%rbp), %eax
cmpl $0x0, %eax
jle 0x5e38f
movzbl -0x56(%rbp), %eax
cmpl $0xff, %eax
jg 0x5e38f
movzbl -0x56(%rbp), %eax
cmpl $0x0, %eax
jg 0x5e39b
leaq 0x17e4c(%rip), %rdi     # 0x761e2
callq 0x4c50
jmp 0x5e39d
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x5e2df
jmp 0x5e3ad
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x5e2c0
movq -0x48(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)