// File: /workspace/github_c_makefile_star2_O0/OpenKMIP[P]libkmip/tests/tests.c
// Function: report_encoding_test_result
int
report_encoding_test_result(
    TestTracker *tracker,
    struct kmip *ctx,
    const uint8 *expected,
    const uint8 *observed,
    int result,
    const char *function)
{
    if(result == KMIP_OK)
    {
        for(size_t i = 0; i < ctx->size; i++)
        {
            if(expected[i] != observed[i])
            {
                printf("FAIL - %s\n", function);
                printf("- byte mismatch at: %zu (exp: %X, obs: %X)\n",
                       i, expected[i], observed[i]);
                for(size_t j = 0; j < ctx->size; j++)
                {
                    printf("- %zu: %X - %X\n", j, expected[j], observed[j]);
                }
                tracker->tests_failed++;
                return(1);
            }
        }
        
        TEST_PASSED(tracker, function);
    }
    else
    {
        printf("FAIL - %s\n", function);
        if(result == KMIP_ERROR_BUFFER_FULL)
        {
            printf("- context buffer is full\n");
        }
        kmip_print_stack_trace(stderr, ctx);
        tracker->tests_failed++;
        return(1);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movq %r9, -0x38(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0x133a
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x130d
movq -0x20(%rbp), %rax
movq -0x40(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq -0x28(%rbp), %rcx
movq -0x40(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x12fa
movq -0x38(%rbp), %rsi
leaq 0x3dda5(%rip), %rdi     # 0x3f004
movb $0x0, %al
callq 0x1070
movq -0x40(%rbp), %rsi
movq -0x20(%rbp), %rax
movq -0x40(%rbp), %rcx
movzbl (%rax,%rcx), %edx
movq -0x28(%rbp), %rax
movq -0x40(%rbp), %rcx
movzbl (%rax,%rcx), %ecx
leaq 0x3dd86(%rip), %rdi     # 0x3f00f
movb $0x0, %al
callq 0x1070
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x12de
movq -0x48(%rbp), %rsi
movq -0x20(%rbp), %rax
movq -0x48(%rbp), %rcx
movzbl (%rax,%rcx), %edx
movq -0x28(%rbp), %rax
movq -0x48(%rbp), %rcx
movzbl (%rax,%rcx), %ecx
leaq 0x3dd72(%rip), %rdi     # 0x3f03b
movb $0x0, %al
callq 0x1070
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x1298
movq -0x10(%rbp), %rax
movw 0x2(%rax), %cx
addw $0x1, %cx
movw %cx, 0x2(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x138a
jmp 0x12fc
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x1222
jmp 0x130f
movq -0x38(%rbp), %rsi
leaq 0x3dd31(%rip), %rdi     # 0x3f04b
movb $0x0, %al
callq 0x1070
movq -0x10(%rbp), %rax
movw 0x4(%rax), %cx
addw $0x1, %cx
movw %cx, 0x4(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x138a
movq -0x38(%rbp), %rsi
leaq 0x3dcbf(%rip), %rdi     # 0x3f004
movb $0x0, %al
callq 0x1070
cmpl $-0x2, -0x2c(%rbp)
jne 0x1360
leaq 0x3dcfd(%rip), %rdi     # 0x3f056
movb $0x0, %al
callq 0x1070
movq 0x52c91(%rip), %rax     # 0x53ff8
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x38260
movq -0x10(%rbp), %rax
movw 0x2(%rax), %cx
addw $0x1, %cx
movw %cx, 0x2(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)