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

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

    observed = kmip_deep_copy_name(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_name(&ctx, NULL);
    if(observed != NULL)
    {
        kmip_destroy(&ctx);
        TEST_FAILED(tracker, __func__, __LINE__);
    }

    observed = kmip_deep_copy_name(&ctx, &expected);
    if(observed == NULL)
    {
        kmip_destroy(&ctx);
        TEST_FAILED(tracker, __func__, __LINE__);
    }
    if(!kmip_compare_name(&expected, observed))
    {
        kmip_print_name(stderr, 1, &expected);
        kmip_print_name(stderr, 1, observed);
        kmip_free_name(&ctx, observed);
        ctx.free_func(ctx.state, observed);
        kmip_destroy(&ctx);
        TEST_FAILED(tracker, __func__, __LINE__);
    }

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

    TEST_PASSED(tracker, __func__);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x8b8, %rsp            # imm = 0x8B8
movq %rdi, %rbx
incw (%rdi)
leaq 0x22bb3(%rip), %rax     # 0x2657c
leaq 0x10(%rsp), %rcx
andq $0x0, 0x8(%rsp)
movq %rax, (%rcx)
movq $0x7, 0x8(%rcx)
movq %rcx, (%rsp)
movl $0x1, 0x8(%rsp)
xorl %edi, %edi
xorl %esi, %esi
callq 0x1468c
testq %rax, %rax
je 0x3a1c
leaq 0x22822(%rip), %rdi     # 0x26222
leaq 0x22bc9(%rip), %rsi     # 0x265d0
movl $0x5e1, %edx            # imm = 0x5E1
xorl %eax, %eax
callq 0x1090
incw 0x2(%rbx)
pushq $0x1
popq %rbp
jmp 0x3a7b
leaq 0x20(%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 0x1468c
leaq 0x20(%rsp), %rdi
testq %rax, %rax
je 0x3a8b
callq 0x12ade
leaq 0x227c4(%rip), %rdi     # 0x26222
leaq 0x22b6b(%rip), %rsi     # 0x265d0
movl $0x5ea, %edx            # imm = 0x5EA
xorl %eax, %eax
callq 0x1090
pushq $0x1
popq %rbp
pushq $0x2
popq %rax
incw (%rbx,%rax)
movl %ebp, %eax
addq $0x8b8, %rsp            # imm = 0x8B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rsp, %rsi
callq 0x1468c
testq %rax, %rax
je 0x3aee
movq %rax, %r14
movq %rsp, %rdi
movq %rax, %rsi
callq 0x14ca2
testl %eax, %eax
je 0x3b10
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x12ffa
movq 0x890(%r15), %rdi
movq %r14, %rsi
callq *0x878(%r15)
movq %r15, %rdi
callq 0x12ade
leaq 0x2273d(%rip), %rdi     # 0x26217
leaq 0x22aef(%rip), %rsi     # 0x265d0
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1090
pushq $0x4
jmp 0x3a76
leaq 0x20(%rsp), %rdi
callq 0x12ade
leaq 0x22723(%rip), %rdi     # 0x26222
leaq 0x22aca(%rip), %rsi     # 0x265d0
movl $0x5f1, %edx            # imm = 0x5F1
jmp 0x3a6a
movq 0x3a4e1(%rip), %r15     # 0x3dff8
movq (%r15), %rdi
pushq $0x1
popq %rbp
movq %rsp, %rdx
movl %ebp, %esi
callq 0x236ee
movq (%r15), %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x236ee
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x12ffa
movq 0x890(%r15), %rdi
movq %r14, %rsi
callq *0x878(%r15)
movq %r15, %rdi
callq 0x12ade
leaq 0x226be(%rip), %rdi     # 0x26222
leaq 0x22a65(%rip), %rsi     # 0x265d0
movl $0x5fa, %edx            # imm = 0x5FA
xorl %eax, %eax
callq 0x1090
jmp 0x3a74