// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_deep_copy_byte_string
int
test_deep_copy_byte_string(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    ByteString expected = {0};
    uint8 value[24] = {
        0x73, 0x67, 0x57, 0x80, 0x51, 0x01, 0x2A, 0x6D,
        0x13, 0x4A, 0x85, 0x5E, 0x25, 0xC8, 0xCD, 0x5E,
        0x4C, 0xA1, 0x31, 0x45, 0x57, 0x29, 0xD3, 0xC8
    };
    expected.value = value;
    expected.size = ARRAY_LENGTH(value);

    ByteString *observed = NULL;
    observed = kmip_deep_copy_byte_string(NULL, NULL);
    if(NULL != observed)
    {
        TEST_FAILED(tracker, __func__, __LINE__);
    }

    KMIP ctx = {0};
    kmip_init(&ctx, NULL, 0, KMIP_1_0);

    observed = kmip_deep_copy_byte_string(&ctx, NULL);
    if(NULL != observed)
    {
        kmip_destroy(&ctx);
        TEST_FAILED(tracker, __func__, __LINE__);
    }

    observed = kmip_deep_copy_byte_string(&ctx, &expected);
    if(NULL == observed)
    {
        kmip_destroy(&ctx);
        TEST_FAILED(tracker, __func__, __LINE__);
    }
    if(!kmip_compare_byte_string(&expected, observed))
    {
        kmip_print_byte_string(stderr, 1, "ByteString", &expected);
        kmip_print_byte_string(stderr, 1, "ByteString", observed);
        kmip_free_byte_string(&ctx, observed);
        ctx.free_func(ctx.state, observed);
        kmip_destroy(&ctx);
        TEST_FAILED(tracker, __func__, __LINE__);
    }

    kmip_free_byte_string(&ctx, observed);
    ctx.free_func(ctx.state, observed);
    kmip_destroy(&ctx);

    TEST_PASSED(tracker, __func__);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x8c0, %rsp            # imm = 0x8C0
movq %rdi, %rbx
incw (%rdi)
movaps 0x2f1ad(%rip), %xmm0    # 0x32b30
leaq 0x10(%rsp), %rax
movaps %xmm0, (%rax)
movabsq $-0x372cd6a8bace5eb4, %rcx # imm = 0xC8D329574531A14C
movq %rcx, 0x10(%rax)
movq %rax, (%rsp)
movq $0x18, 0x8(%rsp)
xorl %edi, %edi
xorl %esi, %esi
callq 0x15508
testq %rax, %rax
je 0x39d9
leaq 0x29867(%rip), %rdi     # 0x2d222
leaq 0x29be8(%rip), %rsi     # 0x2d5aa
movl $0x5ae, %edx            # imm = 0x5AE
xorl %eax, %eax
callq 0x1090
incw 0x2(%rbx)
movl $0x1, %ebp
jmp 0x3a3c
leaq 0x28(%rsp), %r14
movl $0x898, %edx            # imm = 0x898
movq %r14, %rdi
xorl %esi, %esi
callq 0x10c0
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x13177
movq %r14, %rdi
xorl %esi, %esi
callq 0x15508
leaq 0x28(%rsp), %rdi
testq %rax, %rax
je 0x3a4e
callq 0x13455
leaq 0x29807(%rip), %rdi     # 0x2d222
leaq 0x29b88(%rip), %rsi     # 0x2d5aa
movl $0x5b8, %edx            # imm = 0x5B8
xorl %eax, %eax
callq 0x1090
movl $0x1, %ebp
movl $0x2, %eax
incw (%rbx,%rax)
movl %ebp, %eax
addq $0x8c0, %rsp            # imm = 0x8C0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rsp, %rsi
callq 0x15508
testq %rax, %rax
je 0x3ab4
movq %rax, %r14
movq %rsp, %rdi
movq %rax, %rsi
callq 0x15c2b
testl %eax, %eax
je 0x3ad6
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x139f1
movq 0x890(%r15), %rdi
movq %r14, %rsi
callq *0x878(%r15)
movq %r15, %rdi
callq 0x13455
leaq 0x2977a(%rip), %rdi     # 0x2d217
leaq 0x29b06(%rip), %rsi     # 0x2d5aa
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1090
movl $0x4, %eax
jmp 0x3a38
leaq 0x28(%rsp), %rdi
callq 0x13455
leaq 0x2975d(%rip), %rdi     # 0x2d222
leaq 0x29ade(%rip), %rsi     # 0x2d5aa
movl $0x5bf, %edx            # imm = 0x5BF
jmp 0x3a27
movq 0x3f51b(%rip), %r12     # 0x42ff8
movq (%r12), %rdi
leaq 0x29add(%rip), %r15     # 0x2d5c5
movl $0x1, %ebp
movq %rsp, %rcx
movl $0x1, %esi
movq %r15, %rdx
callq 0x2ab4f
movq (%r12), %rdi
movl $0x1, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x2ab4f
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x139f1
movq 0x890(%r15), %rdi
movq %r14, %rsi
callq *0x878(%r15)
movq %r15, %rdi
callq 0x13455
leaq 0x296e1(%rip), %rdi     # 0x2d222
leaq 0x29a62(%rip), %rsi     # 0x2d5aa
movl $0x5c8, %edx            # imm = 0x5C8
xorl %eax, %eax
callq 0x1090
jmp 0x3a33