// File: /workspace/github_c_makefile_star2_O1/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)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
leaq 0x2bcbe(%rip), %rax     # 0x2f57c
movq %rax, (%rsp)
movq $0x7, 0x8(%rsp)
xorl %edi, %edi
xorl %esi, %esi
callq 0x15a0e
testq %rax, %rax
je 0x38fe
leaq 0x2b942(%rip), %rdi     # 0x2f222
leaq 0x2bc9d(%rip), %rsi     # 0x2f584
movl $0x579, %edx            # imm = 0x579
xorl %eax, %eax
callq 0x1090
incw 0x2(%rbx)
movl $0x1, %ebp
jmp 0x3961
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 0x13747
movq %r14, %rdi
xorl %esi, %esi
callq 0x15a0e
leaq 0x18(%rsp), %rdi
testq %rax, %rax
je 0x3973
callq 0x13a23
leaq 0x2b8e2(%rip), %rdi     # 0x2f222
leaq 0x2bc3d(%rip), %rsi     # 0x2f584
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
movq %rsp, %rsi
callq 0x15a0e
testq %rax, %rax
je 0x39d9
movq %rax, %r14
movq %rsp, %rdi
movq %rax, %rsi
callq 0x161d1
testl %eax, %eax
je 0x39fb
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x13f68
movq 0x890(%r15), %rdi
movq %r14, %rsi
callq *0x878(%r15)
movq %r15, %rdi
callq 0x13a23
leaq 0x2b855(%rip), %rdi     # 0x2f217
leaq 0x2bbbb(%rip), %rsi     # 0x2f584
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1090
movl $0x4, %eax
jmp 0x395d
leaq 0x18(%rsp), %rdi
callq 0x13a23
leaq 0x2b838(%rip), %rdi     # 0x2f222
leaq 0x2bb93(%rip), %rsi     # 0x2f584
movl $0x589, %edx            # imm = 0x589
jmp 0x394c
movq 0x415f6(%rip), %r12     # 0x44ff8
movq (%r12), %rdi
leaq 0x2bb92(%rip), %r15     # 0x2f59f
movl $0x1, %ebp
movq %rsp, %rcx
movl $0x1, %esi
movq %r15, %rdx
callq 0x2bed5
movq (%r12), %rdi
movl $0x1, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x2bed5
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x13f68
movq 0x890(%r15), %rdi
movq %r14, %rsi
callq *0x878(%r15)
movq %r15, %rdi
callq 0x13a23
leaq 0x2b7bc(%rip), %rdi     # 0x2f222
leaq 0x2bb17(%rip), %rsi     # 0x2f584
movl $0x592, %edx            # imm = 0x592
xorl %eax, %eax
callq 0x1090
jmp 0x3958