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

    TextString expected = {0};
    expected.value = "example";
    expected.size = 7;
    TextString *observed = NULL;

    observed = kmip_deep_copy_text_string(NULL, NULL);
    if(observed != NULL)
        TEST_FAILED(tracker, __func__, __LINE__);

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

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

    observed = kmip_deep_copy_text_string(&ctx, &expected);
    if(observed == NULL)
    {
        kmip_destroy(&ctx);
        TEST_FAILED(tracker, __func__, __LINE__);
    }
    if(!kmip_compare_text_string(&expected, observed))
    {
        kmip_print_text_string(stderr, 1, "Name Value", &expected);
        kmip_print_text_string(stderr, 1, "Name Value", observed);
        kmip_free_text_string(&ctx, observed);
        ctx.free_func(ctx.state, observed);
        kmip_destroy(&ctx);
        TEST_FAILED(tracker, __func__, __LINE__);
    }

    kmip_free_text_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 $0x8b0, %rsp            # imm = 0x8B0
movq %rdi, %rbx
incw (%rdi)
leaq 0x29ddc(%rip), %rax     # 0x2d57c
movq %rax, 0x8(%rsp)
movq $0x7, 0x10(%rsp)
xorl %edi, %edi
xorl %esi, %esi
callq 0x1545d
testq %rax, %rax
je 0x37e1
leaq 0x29a5f(%rip), %rdi     # 0x2d222
leaq 0x29dba(%rip), %rsi     # 0x2d584
movl $0x579, %edx            # imm = 0x579
xorl %eax, %eax
callq 0x1090
incw 0x2(%rbx)
movl $0x1, %ebp
jmp 0x3844
leaq 0x18(%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 0x1545d
leaq 0x18(%rsp), %rdi
testq %rax, %rax
je 0x3856
callq 0x13455
leaq 0x299ff(%rip), %rdi     # 0x2d222
leaq 0x29d5a(%rip), %rsi     # 0x2d584
movl $0x582, %edx            # imm = 0x582
xorl %eax, %eax
callq 0x1090
movl $0x1, %ebp
movl $0x2, %eax
incw (%rbx,%rax)
movl %ebp, %eax
addq $0x8b0, %rsp            # imm = 0x8B0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8(%rsp), %rsi
callq 0x1545d
testq %rax, %rax
je 0x38c0
movq %rax, %r14
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x15bcb
testl %eax, %eax
je 0x38e2
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x1399a
movq 0x890(%r15), %rdi
movq %r14, %rsi
callq *0x878(%r15)
movq %r15, %rdi
callq 0x13455
leaq 0x2996e(%rip), %rdi     # 0x2d217
leaq 0x29cd4(%rip), %rsi     # 0x2d584
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1090
movl $0x4, %eax
jmp 0x3840
leaq 0x18(%rsp), %rdi
callq 0x13455
leaq 0x29951(%rip), %rdi     # 0x2d222
leaq 0x29cac(%rip), %rsi     # 0x2d584
movl $0x589, %edx            # imm = 0x589
jmp 0x382f
movq 0x3f70f(%rip), %r12     # 0x42ff8
movq (%r12), %rdi
leaq 0x29cab(%rip), %r15     # 0x2d59f
movl $0x1, %ebp
leaq 0x8(%rsp), %rcx
movl $0x1, %esi
movq %r15, %rdx
callq 0x2aaf1
movq (%r12), %rdi
movl $0x1, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x2aaf1
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x1399a
movq 0x890(%r15), %rdi
movq %r14, %rsi
callq *0x878(%r15)
movq %r15, %rdi
callq 0x13455
leaq 0x298d3(%rip), %rdi     # 0x2d222
leaq 0x29c2e(%rip), %rsi     # 0x2d584
movl $0x592, %edx            # imm = 0x592
xorl %eax, %eax
callq 0x1090
jmp 0x383b