// File: /workspace/github_c_makefile_star2_O3/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 0x29a09(%rip), %rax     # 0x2d57c
leaq 0x10(%rsp), %rcx
movq %rax, (%rcx)
movq $0x7, 0x8(%rcx)
movq $0x0, 0x8(%rsp)
movq %rcx, (%rsp)
movl $0x1, 0x8(%rsp)
xorl %edi, %edi
xorl %esi, %esi
callq 0x155a2
testq %rax, %rax
je 0x3bcb
leaq 0x29675(%rip), %rdi     # 0x2d222
leaq 0x29a1c(%rip), %rsi     # 0x2d5d0
movl $0x5e1, %edx            # imm = 0x5E1
xorl %eax, %eax
callq 0x1090
incw 0x2(%rbx)
movl $0x1, %ebp
jmp 0x3c2e
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 0x13177
movq %r14, %rdi
xorl %esi, %esi
callq 0x155a2
leaq 0x20(%rsp), %rdi
testq %rax, %rax
je 0x3c3e
callq 0x13455
leaq 0x29615(%rip), %rdi     # 0x2d222
leaq 0x299bc(%rip), %rsi     # 0x2d5d0
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 0x155a2
testq %rax, %rax
je 0x3ca4
movq %rax, %r14
movq %rsp, %rdi
movq %rax, %rsi
callq 0x15c8b
testl %eax, %eax
je 0x3cc6
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x13a3d
movq 0x890(%r15), %rdi
movq %r14, %rsi
callq *0x878(%r15)
movq %r15, %rdi
callq 0x13455
leaq 0x2958a(%rip), %rdi     # 0x2d217
leaq 0x2993c(%rip), %rsi     # 0x2d5d0
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1090
movl $0x4, %eax
jmp 0x3c2a
leaq 0x20(%rsp), %rdi
callq 0x13455
leaq 0x2956d(%rip), %rdi     # 0x2d222
leaq 0x29914(%rip), %rsi     # 0x2d5d0
movl $0x5f1, %edx            # imm = 0x5F1
jmp 0x3c19
movq 0x3f32b(%rip), %r15     # 0x42ff8
movq (%r15), %rdi
movl $0x1, %ebp
movq %rsp, %rdx
movl $0x1, %esi
callq 0x2acef
movq (%r15), %rdi
movl $0x1, %esi
movq %r14, %rdx
callq 0x2acef
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x13a3d
movq 0x890(%r15), %rdi
movq %r14, %rsi
callq *0x878(%r15)
movq %r15, %rdi
callq 0x13455
leaq 0x29500(%rip), %rdi     # 0x2d222
leaq 0x298a7(%rip), %rsi     # 0x2d5d0
movl $0x5fa, %edx            # imm = 0x5FA
xorl %eax, %eax
callq 0x1090
jmp 0x3c25