// File: /workspace/github_c_makefile_star2_O1/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)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movaps 0x3109f(%rip), %xmm0    # 0x34b40
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 0x15abd
testq %rax, %rax
je 0x3af7
leaq 0x2b749(%rip), %rdi     # 0x2f222
leaq 0x2baca(%rip), %rsi     # 0x2f5aa
movl $0x5ae, %edx            # imm = 0x5AE
xorl %eax, %eax
callq 0x1090
incw 0x2(%rbx)
movl $0x1, %ebp
jmp 0x3b5a
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 0x13747
movq %r14, %rdi
xorl %esi, %esi
callq 0x15abd
leaq 0x28(%rsp), %rdi
testq %rax, %rax
je 0x3b6c
callq 0x13a23
leaq 0x2b6e9(%rip), %rdi     # 0x2f222
leaq 0x2ba6a(%rip), %rsi     # 0x2f5aa
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 0x15abd
testq %rax, %rax
je 0x3bd2
movq %rax, %r14
movq %rsp, %rdi
movq %rax, %rsi
callq 0x16252
testl %eax, %eax
je 0x3bf4
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x13fbf
movq 0x890(%r15), %rdi
movq %r14, %rsi
callq *0x878(%r15)
movq %r15, %rdi
callq 0x13a23
leaq 0x2b65c(%rip), %rdi     # 0x2f217
leaq 0x2b9e8(%rip), %rsi     # 0x2f5aa
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1090
movl $0x4, %eax
jmp 0x3b56
leaq 0x28(%rsp), %rdi
callq 0x13a23
leaq 0x2b63f(%rip), %rdi     # 0x2f222
leaq 0x2b9c0(%rip), %rsi     # 0x2f5aa
movl $0x5bf, %edx            # imm = 0x5BF
jmp 0x3b45
movq 0x413fd(%rip), %r12     # 0x44ff8
movq (%r12), %rdi
leaq 0x2b9bf(%rip), %r15     # 0x2f5c5
movl $0x1, %ebp
movq %rsp, %rcx
movl $0x1, %esi
movq %r15, %rdx
callq 0x2bf33
movq (%r12), %rdi
movl $0x1, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x2bf33
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x13fbf
movq 0x890(%r15), %rdi
movq %r14, %rsi
callq *0x878(%r15)
movq %r15, %rdi
callq 0x13a23
leaq 0x2b5c3(%rip), %rdi     # 0x2f222
leaq 0x2b944(%rip), %rsi     # 0x2f5aa
movl $0x5c8, %edx            # imm = 0x5C8
xorl %eax, %eax
callq 0x1090
jmp 0x3b51