// File: /workspace/github_c_makefile_star2_O2/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 0x28346(%rip), %xmm0    # 0x2bb30
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 0x145f8
testq %rax, %rax
je 0x383e
leaq 0x22a00(%rip), %rdi     # 0x26222
leaq 0x22d81(%rip), %rsi     # 0x265aa
movl $0x5ae, %edx            # imm = 0x5AE
xorl %eax, %eax
callq 0x1090
incw 0x2(%rbx)
pushq $0x1
popq %rbp
jmp 0x389d
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 0x128ed
movq %r14, %rdi
xorl %esi, %esi
callq 0x145f8
leaq 0x28(%rsp), %rdi
testq %rax, %rax
je 0x38af
callq 0x12ade
leaq 0x229a2(%rip), %rdi     # 0x26222
leaq 0x22d23(%rip), %rsi     # 0x265aa
movl $0x5b8, %edx            # imm = 0x5B8
xorl %eax, %eax
callq 0x1090
pushq $0x1
popq %rbp
pushq $0x2
popq %rax
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 0x145f8
testq %rax, %rax
je 0x3912
movq %rax, %r14
movq %rsp, %rdi
movq %rax, %rsi
callq 0x14c3f
testl %eax, %eax
je 0x3934
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x12fb4
movq 0x890(%r15), %rdi
movq %r14, %rsi
callq *0x878(%r15)
movq %r15, %rdi
callq 0x12ade
leaq 0x22919(%rip), %rdi     # 0x26217
leaq 0x22ca5(%rip), %rsi     # 0x265aa
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1090
pushq $0x4
jmp 0x3898
leaq 0x28(%rsp), %rdi
callq 0x12ade
leaq 0x228ff(%rip), %rdi     # 0x26222
leaq 0x22c80(%rip), %rsi     # 0x265aa
movl $0x5bf, %edx            # imm = 0x5BF
jmp 0x388c
movq 0x3a6bd(%rip), %r12     # 0x3dff8
movq (%r12), %rdi
leaq 0x22c7f(%rip), %r15     # 0x265c5
pushq $0x1
popq %rbp
movq %rsp, %rcx
movl %ebp, %esi
movq %r15, %rdx
callq 0x23557
movq (%r12), %rdi
movl %ebp, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x23557
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x12fb4
movq 0x890(%r15), %rdi
movq %r14, %rsi
callq *0x878(%r15)
movq %r15, %rdi
callq 0x12ade
leaq 0x2288b(%rip), %rdi     # 0x26222
leaq 0x22c0c(%rip), %rsi     # 0x265aa
movl $0x5c8, %edx            # imm = 0x5C8
xorl %eax, %eax
callq 0x1090
jmp 0x3896