// File: /workspace/github_c_makefile_star2_O0/sachinites[P]CommandParser/ut/utinfra/ut_parser.c
// Function: tc_print_result
static void
tc_print_result (glthread_t *head) {

    int rc = 0;
    glthread_t *curr;
    tc_result_t *res;
    char buff[128];
    int pass_cnt = 0, fail_cnt = 0, total_cnt = 0;

    rc = sprintf(buff, "\n****  Result ******\n");
    printf("%s", buff);
    fwrite(buff, 1, rc, ut_log_file);

    ITERATE_GLTHREAD_BEGIN(head, curr) {

        res = glue_to_tc_result(curr);
        rc = sprintf(buff, "%s  STEP: %d : %s\n", 
            res->pattern_match ? "PATTERN-MATCH" : "PATTERN-NOT-PRESENT",
            res->step_no, res->pass ? "PASS" : "FAIL");
        printf("%s", buff);
        fwrite(buff, 1, rc, ut_log_file);
        res->pass ? pass_cnt++ : fail_cnt++;
        total_cnt++;
    } ITERATE_GLTHREAD_END(head, curr);

    printf ("Total TC : %d   Pass : %d   Fail %d\n", total_cnt, pass_cnt, fail_cnt);
    rc = sprintf(buff, "Total TC : %d   Pass : %d   Fail %d\n", 
                total_cnt, pass_cnt, fail_cnt);
    fwrite(buff, 1, rc, ut_log_file);
    fflush(ut_log_file);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x0, -0xa4(%rbp)
movl $0x0, -0xa8(%rbp)
movl $0x0, -0xac(%rbp)
leaq -0xa0(%rbp), %rdi
leaq 0x2cbf(%rip), %rsi      # 0xbb71
movb $0x0, %al
callq 0x1200
movl %eax, -0xc(%rbp)
leaq -0xa0(%rbp), %rsi
leaq 0x230b(%rip), %rdi      # 0xb1d5
movb $0x0, %al
callq 0x10b0
leaq -0xa0(%rbp), %rdi
movslq -0xc(%rbp), %rdx
movq 0xc4ed(%rip), %rcx      # 0x153d0
movl $0x1, %esi
callq 0x1220
movq $0x0, -0xb8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x8ffe
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xb8(%rbp)
movq -0x18(%rbp), %rdi
callq 0x9410
movq %rax, -0x20(%rbp)
leaq -0xa0(%rbp), %rdi
movq -0x20(%rbp), %rax
movb 0x3(%rax), %cl
leaq 0x2c68(%rip), %rdx      # 0xbba8
leaq 0x2c53(%rip), %rax      # 0xbb9a
testb $0x1, %cl
cmovneq %rax, %rdx
movq -0x20(%rbp), %rax
movzwl (%rax), %ecx
movq -0x20(%rbp), %rax
movb 0x2(%rax), %sil
leaq 0x2c5d(%rip), %r8       # 0xbbc1
leaq 0x2c51(%rip), %rax      # 0xbbbc
testb $0x1, %sil
cmovneq %rax, %r8
leaq 0x2c0d(%rip), %rsi      # 0xbb87
movb $0x0, %al
callq 0x1200
movl %eax, -0xc(%rbp)
leaq -0xa0(%rbp), %rsi
leaq 0x2243(%rip), %rdi      # 0xb1d5
movb $0x0, %al
callq 0x10b0
leaq -0xa0(%rbp), %rdi
movslq -0xc(%rbp), %rdx
movq 0xc425(%rip), %rcx      # 0x153d0
movl $0x1, %esi
callq 0x1220
movq -0x20(%rbp), %rax
testb $0x1, 0x2(%rax)
je 0x8fd0
movl -0xa4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa4(%rbp)
jmp 0x8fdf
movl -0xa8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa8(%rbp)
movl -0xac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xac(%rbp)
movq -0xb8(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x8f04
movl -0xac(%rbp), %esi
movl -0xa4(%rbp), %edx
movl -0xa8(%rbp), %ecx
leaq 0x2baf(%rip), %rdi      # 0xbbc6
movb $0x0, %al
callq 0x10b0
leaq -0xa0(%rbp), %rdi
movl -0xac(%rbp), %edx
movl -0xa4(%rbp), %ecx
movl -0xa8(%rbp), %r8d
leaq 0x2b87(%rip), %rsi      # 0xbbc6
movb $0x0, %al
callq 0x1200
movl %eax, -0xc(%rbp)
leaq -0xa0(%rbp), %rdi
movslq -0xc(%rbp), %rdx
movq 0xc375(%rip), %rcx      # 0x153d0
movl $0x1, %esi
callq 0x1220
movq 0xc364(%rip), %rdi      # 0x153d0
callq 0x1170
addq $0xc0, %rsp
popq %rbp
retq
nopw (%rax,%rax)