// File: /workspace/github_c_makefile_star2_O1/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)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rax
movaps %xmm0, (%rax)
leaq 0x2b8e0(%rip), %rcx     # 0x2f57c
movq %rcx, (%rax)
movq $0x7, 0x8(%rax)
movaps %xmm0, (%rsp)
movq %rax, (%rsp)
movl $0x1, 0x8(%rsp)
xorl %edi, %edi
xorl %esi, %esi
callq 0x15b5b
testq %rax, %rax
je 0x3cea
leaq 0x2b556(%rip), %rdi     # 0x2f222
leaq 0x2b8fd(%rip), %rsi     # 0x2f5d0
movl $0x5e1, %edx            # imm = 0x5E1
xorl %eax, %eax
callq 0x1090
incw 0x2(%rbx)
movl $0x1, %ebp
jmp 0x3d4d
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 0x13747
movq %r14, %rdi
xorl %esi, %esi
callq 0x15b5b
leaq 0x20(%rsp), %rdi
testq %rax, %rax
je 0x3d5d
callq 0x13a23
leaq 0x2b4f6(%rip), %rdi     # 0x2f222
leaq 0x2b89d(%rip), %rsi     # 0x2f5d0
movl $0x5ea, %edx            # imm = 0x5EA
xorl %eax, %eax
callq 0x1090
movl $0x1, %ebp
movl $0x2, %eax
incw (%rbx,%rax)
movl %ebp, %eax
addq $0x8b8, %rsp            # imm = 0x8B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rsp, %rsi
callq 0x15b5b
testq %rax, %rax
je 0x3dc3
movq %rax, %r14
movq %rsp, %rdi
movq %rax, %rsi
callq 0x162d3
testl %eax, %eax
je 0x3de5
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x1400b
movq 0x890(%r15), %rdi
movq %r14, %rsi
callq *0x878(%r15)
movq %r15, %rdi
callq 0x13a23
leaq 0x2b46b(%rip), %rdi     # 0x2f217
leaq 0x2b81d(%rip), %rsi     # 0x2f5d0
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1090
movl $0x4, %eax
jmp 0x3d49
leaq 0x20(%rsp), %rdi
callq 0x13a23
leaq 0x2b44e(%rip), %rdi     # 0x2f222
leaq 0x2b7f5(%rip), %rsi     # 0x2f5d0
movl $0x5f1, %edx            # imm = 0x5F1
jmp 0x3d38
movq 0x4120c(%rip), %r15     # 0x44ff8
movq (%r15), %rdi
movl $0x1, %ebp
movq %rsp, %rdx
movl $0x1, %esi
callq 0x2c0d3
movq (%r15), %rdi
movl $0x1, %esi
movq %r14, %rdx
callq 0x2c0d3
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x1400b
movq 0x890(%r15), %rdi
movq %r14, %rsi
callq *0x878(%r15)
movq %r15, %rdi
callq 0x13a23
leaq 0x2b3e1(%rip), %rdi     # 0x2f222
leaq 0x2b788(%rip), %rsi     # 0x2f5d0
movl $0x5fa, %edx            # imm = 0x5FA
xorl %eax, %eax
callq 0x1090
jmp 0x3d44