// File: /workspace/github_c_makefile_star2_O2/sachinites[P]CommandParser/ut/utinfra/ut_parser.c
// Function: run_test_case
bool
run_test_case(char *file_name, uint16_t tc_no) {

    int rc = 0;
    char *token;
    char buff[128];
    char *fget_ptr;
    bool tc_found = false;
    glthread_t result_head;
    uint16_t current_tc_no;
    char line[512];
    uint16_t current_step_no;
    bool is_repeat_cmd = false;
    CMD_PARSE_STATUS status = UNKNOWN;

     fget_ptr = NULL;
    init_glthread(&result_head);

    FILE *fp = fopen (file_name, "r");
    assert(fp);

    while (( fget_ptr = (fgets (line, sizeof(line), fp)))) {

            if (strlen(line) == 1 && line[0] == '\n') {
                printf("\n");
                rc = sprintf (buff, "\n");
                fwrite(buff, 1, rc, ut_log_file);
                fflush(ut_log_file);
            }

            if (line[0] != ':') continue;
            strtok(line, "\n");

            rc = sprintf(buff, "%lu", int_store1);
            replaceSubstring(line, "$INT_STORE1", buff);
            rc = sprintf(buff, "%lu", int_store2);
            replaceSubstring(line, "$INT_STORE2", buff);
            rc = sprintf(buff, "%lu", int_store3);
            replaceSubstring(line, "$INT_STORE3", buff);

            if (strncmp (line, ":TESTCASE-BEGIN:", strlen(":TESTCASE-BEGIN:")) == 0) {

                token = strtok(line, ":") ;
                token = strtok(NULL, ":") ;
                current_tc_no = atoi(token);

                while (tc_no &&  current_tc_no != tc_no) {

                    /* skip to next test case */
                    while (( fget_ptr = fgets (line, sizeof(line), fp))) {

                             if (strncmp (line, ":TESTCASE-BEGIN:", strlen(":TESTCASE-BEGIN:"))) {
                                 continue;
                             }
                             break;
                    }

                    if (!fget_ptr) break;
                    token = strtok(line, ":") ;
                    token = strtok(NULL, ":") ;
                    current_tc_no = atoi(token);
                }
                
               if (!fget_ptr) break;

               /* Test case found */
                rc = sprintf(buff, "\n ***** Executing Test case : %s - %d ***** \n",
                                    file_name,  current_tc_no);
                printf("%s", buff);
                fwrite(buff, 1, rc, ut_log_file);
                fflush(ut_log_file);
                TC_RUNNING = true;
                tc_found = true;
            }



            else if (strncmp (line, ":TESTCASE-END:", strlen(":TESTCASE-END:")) == 0) {

                token = strtok(line, ":") ;
                token = strtok(NULL, ":") ;

               /* Test case found */
                rc = sprintf(buff, "\n ***** Test case : %s - %d Finished ***** \n",
                                    file_name,  current_tc_no);
                printf("%s", buff);
                fwrite(buff, 1, rc, ut_log_file);

                tc_print_result(&result_head);
                tc_cleanup_result_list(&result_head);
                fflush(ut_log_file);

                if (  tc_no && TC_RUNNING ) {
                    break;
                }
            }



            else if (strncmp (line, ":DESC:", strlen(":DESC:")) == 0) {
                
                token = strtok(line, ":") ;
                token = strtok(NULL, ":") ;
                rc = sprintf(buff, "Description : %s\n", token);
                 printf("%s", buff);
                 fwrite(buff, 1, rc, ut_log_file);
                 fflush(ut_log_file);
            }



            else if (strncmp (line, ":STEP:", strlen(":STEP:")) == 0) {

                token = strtok(line, ":") ;
                token = strtok(NULL, ":") ;
                rc = sprintf(buff, "STEP : %s\n", token);
                printf("%s", buff);
                fwrite(buff, 1, rc, ut_log_file);
                fflush(ut_log_file);
                current_step_no = atoi(token);
            }



            else if (strncmp (line, ":CMD:", strlen(":CMD:")) == 0) {

                token = strtok(line, ":") ;
                token = strtok(NULL, ":") ;
                rc = sprintf(buff, "CMD : %s\n", token);
                printf("%s", buff);
                fwrite(buff, 1, rc, ut_log_file);
                fflush(ut_log_file);
                status = parse_input_cmd(token, strlen(token), &is_repeat_cmd);
                assert(status == COMPLETE);

                /* block if it is show command */
                if (pattern_match(token, strlen(token), "show") && 
                        TC_RUNNING) {   /* You can load the cmds without testcase script */

                    if (ut_parser_debug) {
                        rc = sprintf(buff, "Waiting for backend data\n");
                        printf("%s", buff);
                        fwrite(buff, 1, rc, ut_log_file);
                    }

                    if ((ut_parser_recv_buff_data_size =
                             mq_timedreceive(UT_PARSER_MSG_Q_FD,
                                        ut_parser_recv_buff, MAX_MSG_SIZE, NULL,
                                        &mq_wait_time)) == -1) {

                            printf ("Msg Q  Time out : No Data Recvd from Backend\n");
                            rc = sprintf(buff, "Msg Q  Time out : No Data Recvd from Backend\n");
                            fwrite(buff, 1, rc, ut_log_file);
                            ut_parser_recv_buff_data_size = 0;
                            memset(ut_parser_recv_buff, 0, sizeof(ut_parser_recv_buff));
                    }

                    else if (ut_parser_debug) {

                        printf("Mq Data Recvd by UT Parser : \n");
                        printf("%s\n", ut_parser_recv_buff);
                        rc = sprintf(buff, "Mq Data Recvd by UT Parser : \n");
                        fwrite(buff, 1, rc, ut_log_file);
                        fwrite(ut_parser_recv_buff, 1, ut_parser_recv_buff_data_size -1, ut_log_file);
			fwrite("\n", 1, 1, ut_log_file);
			ut_parser_recv_buff_data_size = 0;
                        memset(ut_parser_recv_buff, 0, sizeof(ut_parser_recv_buff));
                    }
                }
                fflush(ut_log_file);
            }



            else if (strncmp (line, ":PATTERN-MATCH:", strlen(":PATTERN-MATCH:")) == 0) {

                int rc1 = 0;
                char pattern [256];
                token = strtok(line, ":") ;
                token = strtok(NULL, ":") ;  // this is the pattern to be matched
                rc1 = sprintf(pattern + rc1, "%s", token);

                while(1) {
                    token = strtok(NULL, ":") ;
                    if (!token) break;
                    rc1 += sprintf(pattern + rc1, ":%s", token);
                }
              
                printf("pattern to be matched : |%s|\n", pattern);
                rc = sprintf(buff, "pattern to be matched : |");
                fwrite(buff, 1, rc, ut_log_file);
                fwrite(pattern, 1, rc1, ut_log_file);
                rc = sprintf(buff, "|\n");
                fwrite(buff, 1, rc, ut_log_file);

                if (pattern_match(ut_parser_recv_buff,  ut_parser_recv_buff_data_size, pattern)) {
                    printf("PASS\n");
                    rc = sprintf(buff, "PASS\n");
                    fwrite(buff, 1, rc, ut_log_file);
                    tc_append_result(&result_head, current_step_no, true, true);
                }
                else {
                   printf("FAIL\n");
                   rc = sprintf(buff,  "FAIL\n");
                   fwrite(buff, 1, rc, ut_log_file);
                   tc_append_result(&result_head, current_step_no, false, true);
                }
                fflush(ut_log_file);
            }



            else if (strncmp (line, ":PATTERN-NOT-MATCH:", strlen(":PATTERN-NOT-MATCH:")) == 0) {

                int rc1 = 0;
                char pattern [256];
                token = strtok(line, ":") ;
                token = strtok(NULL, ":") ;  // this is the pattern to be not matched
                rc1 += sprintf(pattern + rc1, "%s", token);

                while(1) {
                    token = strtok(NULL, ":") ;
                    if (!token) break;
                    rc1 += sprintf(pattern + rc1,  ":%s", token);
                }

                printf("pattern to be not matched : |%s|\n", pattern);
                rc = sprintf(buff, "pattern to be not matched : |");
                fwrite(buff, 1, rc, ut_log_file);
                fwrite(pattern, 1, rc1, ut_log_file);
                rc = sprintf(buff, "|\n");
                fwrite(buff, 1, rc, ut_log_file);

                if (!pattern_match(ut_parser_recv_buff, ut_parser_recv_buff_data_size, pattern)) {
                    printf("PASS\n");
                    rc = sprintf(buff, "PASS\n");
                    fwrite(buff, 1, rc, ut_log_file);
                    tc_append_result(&result_head, current_step_no, true, false);
                }
                else {
                    printf("FAIL\n");
                    rc = sprintf(buff, "FAIL\n");
                    fwrite(buff, 1, rc, ut_log_file);
                    tc_append_result(&result_head, current_step_no, false, false);
                }
                fflush(ut_log_file);
            }



            else if (strncmp (line, ":SLEEP:", strlen(":SLEEP:")) == 0) {

                    token = strtok(line, ":") ;
                    token = strtok(NULL, ":") ;
                    rc = sprintf(buff, "Sleeping for %s sec\n", token);
                    printf("%s", buff);
                    fwrite(buff, 1, rc, ut_log_file);
                    fflush(ut_log_file);
                    sleep(atoi(token));
            }



            else if (strncmp (line, ":ABORT:", strlen(":ABORT:")) == 0) {
                    printf("Aborted\n");
                    rc = sprintf(buff, "Aborted\n");
                    fwrite(buff, 1, rc, ut_log_file);
                    break;
            }



            else if (strncmp (line, ":PAUSE:", strlen(":PAUSE:")) == 0) {
                    printf("Paused\n");
                    rc = sprintf(buff, "Paused\n");
                    fwrite(buff, 1, rc, ut_log_file);
                     fflush(ut_log_file);
                    getchar();
            }



             else if (strncmp (line, ":GREP:", strlen(":GREP:")) == 0) {
                    token = strtok(line, ":") ;
                    token = strtok(NULL, ":") ;
                    printf ("Grep Pattern : %s\n", token);
                    rc = sprintf (buff, "Grep Pattern : %s\n", token);
                    fwrite(buff, 1, rc, ut_log_file);
                    ut_parser_recv_buff_data_size = 
                        grep (ut_parser_recv_buff, ut_parser_recv_buff_data_size, token);
                    printf ("Output After Grep : \n");
                    printf("%s", ut_parser_recv_buff);
                    rc = sprintf (buff, "Output After Grep : \n");
                    fwrite(buff, 1, rc, ut_log_file);
                    fwrite(ut_parser_recv_buff, 1, ut_parser_recv_buff_data_size, ut_log_file);
                    fflush(ut_log_file);
             }



             else if (strncmp (line, ":PRINT:", strlen(":PRINT:")) == 0) {
                    token = strtok(line, ":") ;
                    token = strtok(NULL, ":") ;
                    printf ("INFO : %s\n", token);
                    rc = sprintf (buff, "INFO : %s\n", token);
                    fwrite(buff, 1, rc, ut_log_file);
                    fflush(ut_log_file);
             }



            else if (strncmp (line, ":INT_STORE1:", strlen(":INT_STORE1:")) == 0) {

                    int index = 0;
                    token = strtok(line, ":") ;
                    token = strtok(NULL, ":") ;
                    index = atoi(token);
                    assert(index);
                    int_store1 = string_fetch_integer(ut_parser_recv_buff, 
                                        ut_parser_recv_buff_data_size, index);
                    printf("int_store1 = %lu at index %d\n", int_store1, index);
                    rc = sprintf (buff, "int_store1 = %lu at index %d\n", int_store1, index);
                    fwrite(buff, 1, rc, ut_log_file);
                     fflush(ut_log_file);
            }
            
            else if (strncmp (line, ":INT_STORE2:", strlen(":INT_STORE2:")) == 0) {

                    int index = 0;
                    token = strtok(line, ":") ;
                    token = strtok(NULL, ":") ;
                    index = atoi(token);
                    assert(index);
                    int_store2 = string_fetch_integer(ut_parser_recv_buff, 
                                        ut_parser_recv_buff_data_size, index);
                    printf("int_store2 = %lu at index %d\n", int_store2, index);
                    rc = sprintf (buff, "int_store2 = %lu at index %d\n", int_store2, index);
                    fwrite(buff, 1, rc, ut_log_file);
                    fflush(ut_log_file);
            }
            
            else if (strncmp (line, ":INT_STORE3:", strlen(":INT_STORE3:")) == 0) {

                    int index = 0;
                    token = strtok(line, ":") ;
                    token = strtok(NULL, ":") ;
                    index = atoi(token);
                    assert(index);
                    int_store3 = string_fetch_integer(ut_parser_recv_buff, 
                                        ut_parser_recv_buff_data_size, index);
                    printf("int_store3 = %lu at index %d\n", int_store3, index);
                    rc = sprintf (buff, "int_store3 = %lu at index %d\n", int_store3, index);
                    fwrite(buff, 1, rc, ut_log_file);
                     fflush(ut_log_file);
            }




    }

    fclose(fp);
    TC_RUNNING = false;
    fflush(ut_log_file);
    return tc_found;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3d8, %rsp            # imm = 0x3D8
movl %esi, 0x24(%rsp)
movq %rdi, %rbx
movb $0x0, 0xf(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x67b0
leaq 0x20a7(%rip), %rsi      # 0x759c
movq %rbx, 0x28(%rsp)
movq %rbx, %rdi
callq 0x1200
testq %rax, %rax
je 0x6529
movq %rax, %rbx
leaq 0x1d0(%rsp), %r13
pushq $0xa
popq %r14
xorl %ebp, %ebp
movl %eax, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
movq %r13, %rdi
movl $0x200, %esi            # imm = 0x200
movq %rbx, %rdx
callq 0x1130
testq %rax, %rax
je 0x64f6
movq %r13, %rdi
callq 0x10c0
cmpq $0x1, %rax
sete %cl
movb 0x1d0(%rsp), %al
cmpb $0xa, %al
sete %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x5590
movl %r14d, %edi
callq 0x1040
movw $0xa, 0x30(%rsp)
movq 0xce7b(%rip), %rsi      # 0x123f0
movl %r14d, %edi
callq 0x1120
movq 0xce6c(%rip), %rdi      # 0x123f0
callq 0x11b0
movb 0x1d0(%rsp), %al
cmpb $0x3a, %al
jne 0x5524
movq %r13, %rdi
leaq 0x3229(%rip), %rsi      # 0x87c7
callq 0x1210
movq 0xce66(%rip), %rdx      # 0x12410
leaq 0x30(%rsp), %r12
movq %r12, %rdi
leaq 0x31a9(%rip), %r15      # 0x8762
movq %r15, %rsi
xorl %eax, %eax
callq 0x1250
movq %r13, %rdi
leaq 0x3199(%rip), %rsi      # 0x8766
movq %r12, %rdx
callq 0x48f3
movq 0xce3c(%rip), %rdx      # 0x12418
movq %r12, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x1250
movq %r13, %rdi
leaq 0x317f(%rip), %rsi      # 0x8772
movq %r12, %rdx
callq 0x48f3
movq 0xce1e(%rip), %rdx      # 0x12420
movq %r12, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x1250
movq %r13, %rdi
leaq 0x3165(%rip), %rsi      # 0x877e
movq %r12, %rdx
callq 0x48f3
movdqa 0x1d0(%rsp), %xmm0
pcmpeqb 0x305e(%rip), %xmm0     # 0x8690
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x583e
movq %r13, %rdi
leaq 0x317e(%rip), %rsi      # 0x87c9
pushq $0xe
popq %rdx
callq 0x11c0
testl %eax, %eax
pushq $0x6
popq %r15
je 0x58b3
movq %r13, %rdi
leaq 0x319c(%rip), %rsi      # 0x8805
movq %r15, %rdx
callq 0x11c0
movq %r13, %rdi
testl %eax, %eax
je 0x5afb
leaq 0x319b(%rip), %rsi      # 0x881e
movq %r15, %rdx
callq 0x11c0
movq %r13, %rdi
testl %eax, %eax
je 0x643e
leaq 0x3193(%rip), %rsi      # 0x8830
pushq $0x5
popq %rdx
callq 0x11c0
testl %eax, %eax
leaq 0x2e5c(%rip), %r12      # 0x850a
je 0x5b72
movq %r13, %rdi
leaq 0x31fc(%rip), %rsi      # 0x88ba
pushq $0xf
popq %rdx
callq 0x11c0
movzwl 0x1c(%rsp), %r14d
testl %eax, %eax
je 0x5d3c
movq %r13, %rdi
leaq 0x3234(%rip), %rsi      # 0x8912
pushq $0x13
popq %rdx
callq 0x11c0
testl %eax, %eax
je 0x5ed5
movq %r13, %rdi
leaq 0x326e(%rip), %rsi      # 0x8966
pushq $0x7
popq %r14
movq %r14, %rdx
callq 0x11c0
movq %r13, %rdi
testl %eax, %eax
je 0x6059
leaq 0x326d(%rip), %rsi      # 0x8983
movq %r14, %rdx
callq 0x11c0
testl %eax, %eax
je 0x64c2
movq %r13, %rdi
leaq 0x3264(%rip), %rsi      # 0x8994
movq %r14, %rdx
callq 0x11c0
testl %eax, %eax
je 0x6140
movq %r13, %rdi
leaq 0x3252(%rip), %rsi      # 0x899c
pushq $0x6
popq %rdx
callq 0x11c0
testl %eax, %eax
pushq $0xa
popq %r14
movq %r13, %rdi
je 0x61f0
leaq 0x3264(%rip), %rsi      # 0x89cc
pushq $0x7
popq %rdx
callq 0x11c0
movq %r13, %rdi
testl %eax, %eax
je 0x62da
leaq 0x325d(%rip), %rsi      # 0x89df
pushq $0xc
popq %r12
movq %r12, %rdx
callq 0x11c0
testl %eax, %eax
je 0x6335
movq %r13, %rdi
leaq 0x3270(%rip), %rsi      # 0x8a10
movq %r12, %rdx
callq 0x11c0
testl %eax, %eax
je 0x63a6
movq %r13, %rdi
leaq 0x3281(%rip), %rsi      # 0x8a3b
movq %r12, %rdx
callq 0x11c0
testl %eax, %eax
jne 0x5524
movq %rbp, (%rsp)
leaq 0x30(%rsp), %r12
movq %r13, %rdi
leaq 0x2d2d(%rip), %r15      # 0x850a
movq %r15, %rsi
callq 0x1210
xorl %edi, %edi
movq %r15, %rsi
callq 0x1210
movq %rax, %rdi
callq 0x1220
testl %eax, %eax
je 0x6586
movl %eax, %ebp
movl 0xd429(%rip), %esi      # 0x12c30
leaq 0xcc22(%rip), %rdi      # 0x12430
movl %eax, %edx
callq 0x4ad9
movq %rax, 0xcc04(%rip)      # 0x12420
leaq 0x3225(%rip), %r15      # 0x8a48
movq %r15, %rdi
movq %rax, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x10e0
movq 0xcbe7(%rip), %rdx      # 0x12420
jmp 0x6415
pushq $0x6
popq %r12
movq %r13, %rdi
leaq 0x2cbe(%rip), %r15      # 0x850a
movq %r15, %rsi
callq 0x1210
xorl %edi, %edi
movq %r15, %rsi
callq 0x1210
movq %rax, %rdi
callq 0x1220
movl 0x24(%rsp), %ecx
testw %cx, %cx
je 0x5e70
cmpw %cx, %ax
je 0x5e70
movq %r13, %rdi
movl $0x200, %esi            # imm = 0x200
movq %rbx, %rdx
callq 0x1130
testq %rax, %rax
je 0x64f6
movdqa 0x1d0(%rsp), %xmm0
pcmpeqb 0x2dea(%rip), %xmm0     # 0x8690
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x587c
jmp 0x5842
movq %rbp, (%rsp)
movq %rbx, 0xc8(%rsp)
movq %r13, %rdi
leaq 0x2c41(%rip), %r14      # 0x850a
movq %r14, %rsi
callq 0x1210
leaq 0x30(%rsp), %rbx
xorl %r12d, %r12d
xorl %edi, %edi
movq %r14, %rsi
callq 0x1210
movzwl 0x20(%rsp), %ecx
movq %rbx, %rdi
leaq 0x2ee6(%rip), %rsi      # 0x87d8
movq 0x28(%rsp), %rdx
xorl %eax, %eax
callq 0x1250
movl %eax, %r14d
leaq 0x27e9(%rip), %r15      # 0x80f1
movq %r15, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x10e0
movslq %r14d, %rdx
movq 0xcad1(%rip), %rcx      # 0x123f0
movq %rbx, %rdi
pushq $0x1
popq %rbx
movq %rbx, %rsi
callq 0x1270
movdqu 0x31a0(%rip), %xmm0     # 0x8ad5
movdqa %xmm0, 0xd0(%rsp)
movabsq $0xa2a2a2a2a2a2a, %rax  # imm = 0xA2A2A2A2A2A2A
movq %rax, 0xde(%rsp)
movq %r15, %rdi
leaq 0xd0(%rsp), %r14
movq %r14, %rsi
xorl %eax, %eax
callq 0x10e0
movq 0xca84(%rip), %rcx      # 0x123f0
movq %r14, %rdi
movq %rbx, %rsi
pushq $0x15
popq %rdx
callq 0x1270
movq 0xc0(%rsp), %r15
xorl %r13d, %r13d
xorl %r14d, %r14d
testq %r15, %r15
je 0x5a36
movq 0x8(%r15), %rax
movq %rax, 0x10(%rsp)
cmpb $0x0, -0x5(%r15)
leaq 0x3166(%rip), %rdx      # 0x8b0c
leaq 0x3151(%rip), %rax      # 0x8afe
cmovneq %rax, %rdx
cmpb $0x0, -0x6(%r15)
movzwl -0x8(%r15), %ecx
leaq 0x31a7(%rip), %r8       # 0x8b69
leaq 0x31a5(%rip), %rax      # 0x8b6e
cmovneq %rax, %r8
leaq 0xd0(%rsp), %rbp
movq %rbp, %rdi
leaq 0x310c(%rip), %rsi      # 0x8aeb
xorl %eax, %eax
callq 0x1250
movl %r14d, %ebx
movq %r12, %r14
movl %eax, %r12d
leaq 0x26fb(%rip), %rdi      # 0x80f1
movq %rbp, %rsi
xorl %eax, %eax
callq 0x10e0
movslq %r12d, %rdx
movq %r14, %r12
movl %ebx, %r14d
movq 0xc9e0(%rip), %rcx      # 0x123f0
movq %rbp, %rdi
pushq $0x1
popq %rsi
callq 0x1270
movzbl -0x6(%r15), %eax
addl %eax, %r12d
xorl $0x1, %eax
addl %eax, %r13d
incl %r14d
movq 0x10(%rsp), %r15
jmp 0x5988
leaq 0x30e3(%rip), %r15      # 0x8b20
movq %r15, %rdi
movl %r14d, %esi
movl %r12d, %edx
movl %r13d, %ecx
xorl %eax, %eax
callq 0x10e0
leaq 0xd0(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
movl %r12d, %ecx
movl %r13d, %r8d
xorl %eax, %eax
callq 0x1250
movslq %eax, %rdx
movq 0xc978(%rip), %rcx      # 0x123f0
movq %rbx, %rdi
pushq $0x1
popq %rsi
callq 0x1270
movq 0xc966(%rip), %rdi      # 0x123f0
callq 0x11b0
movq 0xc0(%rsp), %r14
leaq 0x1d0(%rsp), %r13
movq (%rsp), %rbp
testq %r14, %r14
je 0x5ac5
movq 0x8(%r14), %rbx
movq %r14, %rdi
callq 0x67e6
addq $-0x8, %r14
movq %r14, %rdi
callq 0x1030
movq %rbx, %r14
jmp 0x5aa3
movq 0xc924(%rip), %rdi      # 0x123f0
callq 0x11b0
cmpw $0x0, 0x24(%rsp)
movq 0xc8(%rsp), %rbx
pushq $0xa
popq %r14
je 0x5524
cmpb $0x0, 0xc938(%rip)      # 0x12428
je 0x5524
jmp 0x64f6
leaq 0x2a08(%rip), %r15      # 0x850a
movq %r15, %rsi
callq 0x1210
xorl %edi, %edi
movq %r15, %rsi
callq 0x1210
leaq 0x30(%rsp), %r15
movq %r15, %rdi
leaq 0x2ce9(%rip), %rsi      # 0x880c
movq %rax, %rdx
xorl %eax, %eax
callq 0x1250
movq %rbp, (%rsp)
movq %r15, %rbp
movl %eax, %r15d
leaq 0x25b3(%rip), %rdi      # 0x80f1
movq %rbp, %rsi
xorl %eax, %eax
callq 0x10e0
movslq %r15d, %rdx
movq %rbp, %rdi
movq (%rsp), %rbp
movq 0xc897(%rip), %rcx      # 0x123f0
pushq $0x1
popq %rsi
callq 0x1270
movq 0xc888(%rip), %rdi      # 0x123f0
callq 0x11b0
jmp 0x5524
movq %rbp, (%rsp)
movq %r12, %r15
movl %r14d, %r12d
movq %r13, %rdi
movq %r15, %rsi
callq 0x1210
xorl %edi, %edi
movq %r15, %rsi
callq 0x1210
movq %rax, %r14
leaq 0x30(%rsp), %rbp
movq %rbp, %rdi
leaq 0x2c93(%rip), %rsi      # 0x8836
movq %rax, %rdx
xorl %eax, %eax
callq 0x1250
movl %eax, %r15d
leaq 0x253a(%rip), %rdi      # 0x80f1
movq %rbp, %rsi
xorl %eax, %eax
callq 0x10e0
movslq %r15d, %rdx
movq 0xc825(%rip), %rcx      # 0x123f0
movq %rbp, %rdi
pushq $0x1
popq %rsi
callq 0x1270
movq 0xc813(%rip), %rdi      # 0x123f0
callq 0x11b0
movq %r14, %rdi
callq 0x10c0
movq %r14, %rdi
movl %eax, %esi
leaq 0xf(%rsp), %rdx
callq 0x3348
testl %eax, %eax
jne 0x6548
movq %r14, %rdi
callq 0x10c0
movq %r14, %rdi
movl %eax, %esi
leaq 0x1838(%rip), %rdx      # 0x744d
callq 0x4a00
testb %al, %al
movl %r12d, %r14d
leaq 0xc80a(%rip), %r12      # 0x12430
movq (%rsp), %rbp
je 0x5b61
cmpb $0x1, 0xc7f1(%rip)      # 0x12428
jne 0x5b61
cmpb $0x1, 0xc7e5(%rip)      # 0x12429
jne 0x5c8b
movups 0x2c10(%rip), %xmm0     # 0x885d
movups %xmm0, 0x3a(%rsp)
movdqu 0x2bf9(%rip), %xmm0     # 0x8853
movdqa %xmm0, 0x30(%rsp)
leaq 0x248a(%rip), %rdi      # 0x80f1
leaq 0x30(%rsp), %r15
movq %r15, %rsi
xorl %eax, %eax
callq 0x10e0
movq 0xc773(%rip), %rcx      # 0x123f0
movq %r15, %rdi
pushq $0x1
popq %rsi
pushq $0x19
popq %rdx
callq 0x1270
movl 0xc767(%rip), %edi      # 0x123f8
movl $0x800, %edx            # imm = 0x800
movq %r12, %rsi
xorl %ecx, %ecx
leaq 0xc75e(%rip), %r8       # 0x12400
callq 0x10b0
movl %eax, 0xcf83(%rip)      # 0x12c30
cmpl $-0x1, %eax
je 0x618c
cmpb $0x1, 0xc76c(%rip)      # 0x12429
jne 0x5b61
leaq 0x2ea9(%rip), %rdi      # 0x8b73
callq 0x1080
movq %r12, %rdi
callq 0x1080
movups 0x2bbd(%rip), %xmm0     # 0x889b
movaps %xmm0, 0x30(%rsp)
movdqu 0x2bbf(%rip), %xmm0     # 0x88aa
movdqu %xmm0, 0x3f(%rsp)
movq 0xc6f8(%rip), %rcx      # 0x123f0
leaq 0x30(%rsp), %rdi
pushq $0x1
popq %r15
movq %r15, %rsi
pushq $0x1e
popq %rdx
callq 0x1270
movslq 0xcf1d(%rip), %rdx      # 0x12c30
decq %rdx
movq 0xc6d3(%rip), %rcx      # 0x123f0
movq %r12, %rdi
movq %r15, %rsi
callq 0x1270
movq 0xc6c1(%rip), %rsi      # 0x123f0
movl %r14d, %edi
callq 0x1120
jmp 0x61d5
movl %r14d, 0x10(%rsp)
movq %r13, %rdi
movq %r12, %rsi
callq 0x1210
xorl %edi, %edi
movq %r12, %rsi
callq 0x1210
leaq 0xd0(%rsp), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x10a0
movq %rax, %r14
subl %r15d, %r14d
leaq 0x2b54(%rip), %r15      # 0x88ca
xorl %edi, %edi
movq %r12, %rsi
callq 0x1210
movslq %r14d, %r14
testq %rax, %rax
je 0x5da5
leaq (%rsp,%r14), %rdi
addq $0xd0, %rdi
movq %r15, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1250
addl %eax, %r14d
jmp 0x5d76
movq %rbp, (%rsp)
leaq 0x2b1e(%rip), %rdi      # 0x88ce
leaq 0xd0(%rsp), %r12
movq %r12, %rsi
xorl %eax, %eax
callq 0x10e0
movups 0x2b23(%rip), %xmm0     # 0x88ec
movaps %xmm0, 0x30(%rsp)
movdqu 0x2b20(%rip), %xmm0     # 0x88f6
movdqu %xmm0, 0x3a(%rsp)
movq 0xc60d(%rip), %rcx      # 0x123f0
leaq 0x30(%rsp), %rbp
movq %rbp, %rdi
pushq $0x1
popq %r15
movq %r15, %rsi
pushq $0x19
popq %rdx
callq 0x1270
movq 0xc5ef(%rip), %rcx      # 0x123f0
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1270
movw $0xa7c, 0x30(%rsp)      # imm = 0xA7C
movb $0x0, 0x32(%rsp)
movq 0xc5ce(%rip), %rcx      # 0x123f0
movq %rbp, %r12
movq %rbp, %rdi
movq %r15, %rsi
pushq $0x2
popq %rdx
callq 0x1270
movl 0xcdf7(%rip), %esi      # 0x12c30
leaq 0xc5f0(%rip), %rdi      # 0x12430
leaq 0xd0(%rsp), %rdx
callq 0x4a00
movl %eax, %ebp
testb %al, %al
je 0x6009
leaq 0x2d10(%rip), %rdi      # 0x8b6e
callq 0x1080
movl $0x53534150, 0x30(%rsp) # imm = 0x53534150
jmp 0x601d
movl %eax, 0x20(%rsp)
movzwl %ax, %ecx
leaq 0x30(%rsp), %r15
movq %r15, %rdi
leaq 0x2915(%rip), %rsi      # 0x879b
movq 0x28(%rsp), %rdx
xorl %eax, %eax
callq 0x1250
movl %eax, %ebp
leaq 0x2256(%rip), %rdi      # 0x80f1
movq %r15, %rsi
xorl %eax, %eax
callq 0x10e0
movslq %ebp, %rdx
movq 0xc541(%rip), %rcx      # 0x123f0
movq %r15, %rdi
pushq $0x1
popq %rsi
callq 0x1270
movq 0xc52f(%rip), %rdi      # 0x123f0
callq 0x11b0
movb $0x1, 0xc55b(%rip)      # 0x12428
movb $0x1, %bpl
jmp 0x5524
movl %r14d, 0x10(%rsp)
movq %r13, %rdi
movq %r12, %rsi
callq 0x1210
xorl %edi, %edi
movq %r12, %rsi
callq 0x1210
leaq 0xd0(%rsp), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x10a0
movq %rax, %r14
subl %r15d, %r14d
leaq 0x29bb(%rip), %r15      # 0x88ca
xorl %edi, %edi
movq %r12, %rsi
callq 0x1210
movslq %r14d, %r14
testq %rax, %rax
je 0x5f3e
leaq (%rsp,%r14), %rdi
addq $0xd0, %rdi
movq %r15, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1250
addl %eax, %r14d
jmp 0x5f0f
movq %rbp, (%rsp)
leaq 0x29dd(%rip), %rdi      # 0x8926
leaq 0xd0(%rsp), %r12
movq %r12, %rsi
xorl %eax, %eax
callq 0x10e0
movups 0x29e6(%rip), %xmm0     # 0x8948
movaps %xmm0, 0x30(%rsp)
movdqu 0x29e7(%rip), %xmm0     # 0x8956
movdqu %xmm0, 0x3e(%rsp)
movq 0xc474(%rip), %rcx      # 0x123f0
leaq 0x30(%rsp), %rbp
movq %rbp, %rdi
pushq $0x1
popq %r15
movq %r15, %rsi
pushq $0x1d
popq %rdx
callq 0x1270
movq 0xc456(%rip), %rcx      # 0x123f0
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1270
movw $0xa7c, 0x30(%rsp)      # imm = 0xA7C
movb $0x0, 0x32(%rsp)
movq 0xc435(%rip), %rcx      # 0x123f0
movq %rbp, %r12
movq %rbp, %rdi
movq %r15, %rsi
pushq $0x2
popq %rdx
callq 0x1270
movl 0xcc5e(%rip), %esi      # 0x12c30
leaq 0xc457(%rip), %rdi      # 0x12430
leaq 0xd0(%rsp), %rdx
callq 0x4a00
movl %eax, %ebp
testb %al, %al
je 0x60d8
leaq 0x2b72(%rip), %rdi      # 0x8b69
callq 0x1080
movl $0x4c494146, 0x30(%rsp) # imm = 0x4C494146
jmp 0x60ec
leaq 0x2b59(%rip), %rdi      # 0x8b69
callq 0x1080
movl $0x4c494146, 0x30(%rsp) # imm = 0x4C494146
movw $0xa, 0x34(%rsp)
pushq $0xa
popq %r14
movl 0x10(%rsp), %r15d
movq 0xc3bc(%rip), %rcx      # 0x123f0
movq %r12, %rdi
pushq $0x1
popq %rsi
pushq $0x5
popq %rdx
callq 0x1270
movzbl %bpl, %edx
leaq 0xb8(%rsp), %rdi
movl %r15d, %esi
pushq $0x1
popq %rcx
jmp 0x6126
movq %r12, %rsi
callq 0x1210
xorl %edi, %edi
movq %r12, %rsi
callq 0x1210
movq %rax, 0x10(%rsp)
leaq 0x30(%rsp), %r15
movq %r15, %rdi
leaq 0x28ef(%rip), %rsi      # 0x896e
movq %rax, %rdx
xorl %eax, %eax
callq 0x1250
movl %eax, %r12d
leaq 0x205e(%rip), %rdi      # 0x80f1
movq %r15, %rsi
xorl %eax, %eax
callq 0x10e0
movslq %r12d, %rdx
movq 0xc349(%rip), %rcx      # 0x123f0
movq %r15, %rdi
pushq $0x1
popq %rsi
callq 0x1270
movq 0xc337(%rip), %rdi      # 0x123f0
callq 0x11b0
movq 0x10(%rsp), %rdi
callq 0x1220
movl %eax, %edi
callq 0x1280
pushq $0xa
popq %r14
jmp 0x5524
leaq 0x2a8f(%rip), %rdi      # 0x8b6e
callq 0x1080
movl $0x53534150, 0x30(%rsp) # imm = 0x53534150
movw $0xa, 0x34(%rsp)
pushq $0xa
popq %r14
movl 0x10(%rsp), %r15d
xorb $0x1, %bpl
movq 0xc2e9(%rip), %rcx      # 0x123f0
movq %r12, %rdi
pushq $0x1
popq %rsi
pushq $0x5
popq %rdx
callq 0x1270
movzbl %bpl, %edx
leaq 0xb8(%rsp), %rdi
movl %r15d, %esi
xorl %ecx, %ecx
callq 0x65c4
movq 0xc2be(%rip), %rdi      # 0x123f0
callq 0x11b0
movq (%rsp), %rbp
jmp 0x5524
leaq 0x2a13(%rip), %rdi      # 0x8b5a
callq 0x1080
movabsq $0xa646573756150, %rax  # imm = 0xA646573756150
movq %rax, 0x30(%rsp)
movq 0xc28e(%rip), %rcx      # 0x123f0
leaq 0x30(%rsp), %rdi
pushq $0x1
popq %rsi
movq %r14, %rdx
callq 0x1270
movq 0xc277(%rip), %rdi      # 0x123f0
callq 0x11b0
callq 0x1150
pushq $0xa
popq %r14
jmp 0x5524
leaq 0x29fe(%rip), %rdi      # 0x8b91
callq 0x1080
movups 0x26ce(%rip), %xmm0     # 0x886d
movaps %xmm0, 0x30(%rsp)
movups 0x26d2(%rip), %xmm0     # 0x887d
movaps %xmm0, 0x40(%rsp)
movdqu 0x26d3(%rip), %xmm0     # 0x888b
movdqu %xmm0, 0x4e(%rsp)
movq 0xc22b(%rip), %rcx      # 0x123f0
leaq 0x30(%rsp), %rdi
pushq $0x1
popq %rsi
pushq $0x2d
popq %rdx
callq 0x1270
andl $0x0, 0xca54(%rip)      # 0x12c30
movl $0x800, %edx            # imm = 0x800
movq %r12, %rdi
xorl %esi, %esi
callq 0x1100
jmp 0x5b61
leaq 0x2313(%rip), %r14      # 0x850a
movq %r14, %rsi
callq 0x1210
xorl %edi, %edi
movq %r14, %rsi
callq 0x1210
movq %rax, %r14
leaq 0x2790(%rip), %r15      # 0x89a3
movq %r15, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x10e0
leaq 0x30(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x1250
movslq %eax, %rdx
movq 0xc1b1(%rip), %rcx      # 0x123f0
movq %r12, %rdi
pushq $0x1
popq %r15
movq %r15, %rsi
callq 0x1270
movl 0xc9dc(%rip), %esi      # 0x12c30
leaq 0xc1d5(%rip), %r12      # 0x12430
movq %r12, %rdi
movq %r14, %rdx
pushq $0xa
popq %r14
callq 0x4a1b
movl %eax, 0xc9c0(%rip)      # 0x12c30
leaq 0x28ce(%rip), %rdi      # 0x8b45
callq 0x1080
leaq 0x1e6e(%rip), %rdi      # 0x80f1
movq %r12, %rsi
xorl %eax, %eax
callq 0x10e0
movabsq $0xa203a20706572, %rax  # imm = 0xA203A20706572
movq %rax, 0x3e(%rsp)
movdqu 0x2712(%rip), %xmm0     # 0x89b6
movdqa %xmm0, 0x30(%rsp)
movq 0xc13f(%rip), %rcx      # 0x123f0
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
pushq $0x15
popq %rdx
callq 0x1270
movslq 0xc968(%rip), %rdx      # 0x12c30
movq 0xc121(%rip), %rcx      # 0x123f0
movq %r12, %rdi
movq %r15, %rsi
jmp 0x5b5c
leaq 0x2229(%rip), %r14      # 0x850a
movq %r14, %rsi
callq 0x1210
xorl %edi, %edi
movq %r14, %rsi
callq 0x1210
movq %rax, %r14
leaq 0x26d7(%rip), %r12      # 0x89d4
movq %r12, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x10e0
leaq 0x30(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
pushq $0xa
popq %r14
xorl %eax, %eax
callq 0x1250
movslq %eax, %rdx
movq 0xc0c3(%rip), %rcx      # 0x123f0
movq %r15, %rdi
jmp 0x5b59
movq %rbp, (%rsp)
leaq 0x30(%rsp), %r12
movq %r13, %rdi
leaq 0x21c2(%rip), %r15      # 0x850a
movq %r15, %rsi
callq 0x1210
xorl %edi, %edi
movq %r15, %rsi
callq 0x1210
movq %rax, %rdi
callq 0x1220
testl %eax, %eax
je 0x6567
movl %eax, %ebp
movl 0xc8be(%rip), %esi      # 0x12c30
leaq 0xc0b7(%rip), %rdi      # 0x12430
movl %eax, %edx
callq 0x4ad9
movq %rax, 0xc089(%rip)      # 0x12410
leaq 0x2664(%rip), %r15      # 0x89f2
movq %r15, %rdi
movq %rax, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x10e0
movq 0xc06c(%rip), %rdx      # 0x12410
jmp 0x6415
movq %rbp, (%rsp)
leaq 0x30(%rsp), %r12
movq %r13, %rdi
leaq 0x2151(%rip), %r15      # 0x850a
movq %r15, %rsi
callq 0x1210
xorl %edi, %edi
movq %r15, %rsi
callq 0x1210
movq %rax, %rdi
callq 0x1220
testl %eax, %eax
je 0x65a5
movl %eax, %ebp
movl 0xc84d(%rip), %esi      # 0x12c30
leaq 0xc046(%rip), %rdi      # 0x12430
movl %eax, %edx
callq 0x4ad9
movq %rax, 0xc020(%rip)      # 0x12418
leaq 0x261e(%rip), %r15      # 0x8a1d
movq %r15, %rdi
movq %rax, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x10e0
movq 0xc003(%rip), %rdx      # 0x12418
movq %r12, %rdi
movq %r15, %rsi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x1250
movslq %eax, %rdx
movq 0xbfc2(%rip), %rcx      # 0x123f0
movq %r12, %rdi
pushq $0x1
popq %rsi
callq 0x1270
jmp 0x612b
leaq 0x20c5(%rip), %r15      # 0x850a
movq %r15, %rsi
callq 0x1210
xorl %edi, %edi
movq %r15, %rsi
callq 0x1210
movq %rax, %r14
leaq 0x30(%rsp), %r15
movq %r15, %rdi
leaq 0x23bc(%rip), %rsi      # 0x8825
movq %rax, %rdx
xorl %eax, %eax
callq 0x1250
movq %rbp, %r12
movq %r15, %rbp
movl %eax, %r15d
leaq 0x1c6e(%rip), %rdi      # 0x80f1
movq %rbp, %rsi
xorl %eax, %eax
callq 0x10e0
movslq %r15d, %rdx
movq %rbp, %rdi
movq %r12, %rbp
movq 0xbf53(%rip), %rcx      # 0x123f0
pushq $0x1
popq %rsi
callq 0x1270
movq 0xbf44(%rip), %rdi      # 0x123f0
callq 0x11b0
movq %r14, %rdi
pushq $0xa
popq %r14
callq 0x1220
jmp 0x5520
leaq 0x2698(%rip), %rdi      # 0x8b61
callq 0x1080
movabsq $0xa646574726f6241, %rax # imm = 0xA646574726F6241
leaq 0x30(%rsp), %rdi
movq %rax, (%rdi)
movb $0x0, 0x8(%rdi)
movq 0xbf05(%rip), %rcx      # 0x123f0
pushq $0x1
popq %rsi
pushq $0x8
popq %rdx
callq 0x1270
movq %rbx, %rdi
callq 0x1090
movb $0x0, 0xbf23(%rip)      # 0x12428
movq 0xbee4(%rip), %rdi      # 0x123f0
callq 0x11b0
andb $0x1, %bpl
movl %ebp, %eax
addq $0x3d8, %rsp            # imm = 0x3D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2209(%rip), %rdi      # 0x8739
leaq 0x219e(%rip), %rsi      # 0x86d5
leaq 0x21fe(%rip), %rcx      # 0x873c
movl $0x99, %edx
callq 0x10f0
leaq 0x22f1(%rip), %rdi      # 0x8840
leaq 0x217f(%rip), %rsi      # 0x86d5
leaq 0x21df(%rip), %rcx      # 0x873c
movl $0x10b, %edx            # imm = 0x10B
callq 0x10f0
leaq 0x247e(%rip), %rdi      # 0x89ec
leaq 0x2160(%rip), %rsi      # 0x86d5
leaq 0x21c0(%rip), %rcx      # 0x873c
movl $0x1c3, %edx            # imm = 0x1C3
callq 0x10f0
leaq 0x245f(%rip), %rdi      # 0x89ec
leaq 0x2141(%rip), %rsi      # 0x86d5
leaq 0x21a1(%rip), %rcx      # 0x873c
movl $0x1e1, %edx            # imm = 0x1E1
callq 0x10f0
leaq 0x2440(%rip), %rdi      # 0x89ec
leaq 0x2122(%rip), %rsi      # 0x86d5
leaq 0x2182(%rip), %rcx      # 0x873c
movl $0x1d2, %edx            # imm = 0x1D2
callq 0x10f0