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

    CryptographicParameters *observed = NULL;

    observed = kmip_deep_copy_cryptographic_parameters(NULL, NULL);
    if(NULL != observed)
    {
        TEST_FAILED(tracker, __func__, __LINE__);
    }

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

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

    uint8 b[4] = {0x01, 0x02, 0x03, 0x04};
    ByteString p_source = {0};
    p_source.value = b;
    p_source.size = ARRAY_LENGTH(b);

    CryptographicParameters expected = {0};
    expected.block_cipher_mode = KMIP_BLOCK_CBC;
    expected.padding_method = KMIP_PAD_PKCS5;
    expected.hashing_algorithm = KMIP_HASH_SHA1;
    expected.key_role_type = KMIP_ROLE_KEK;

    expected.digital_signature_algorithm = KMIP_DIGITAL_SHA1_WITH_RSA;
    expected.cryptographic_algorithm = KMIP_CRYPTOALG_RSA;
    expected.random_iv = KMIP_TRUE;
    expected.iv_length = 256;
    expected.tag_length = 16;
    expected.fixed_field_length = 1024;
    expected.invocation_field_length = 1024;
    expected.counter_length = 32;
    expected.initial_counter_value = 1;

    expected.salt_length = 64;
    expected.mask_generator = KMIP_MASKGEN_MGF1;
    expected.mask_generator_hashing_algorithm = KMIP_HASH_SHA1;
    expected.p_source = &p_source;
    expected.trailer_field = 32;

    observed = kmip_deep_copy_cryptographic_parameters(&ctx, &expected);
    if(NULL == observed)
    {
        kmip_destroy(&ctx);
        TEST_FAILED(tracker, __func__, __LINE__);
    }
    if(!kmip_compare_cryptographic_parameters(&expected, observed))
    {
        kmip_print_cryptographic_parameters(stderr, 1, &expected);
        kmip_print_cryptographic_parameters(stderr, 1, &expected);
        kmip_free_cryptographic_parameters(&ctx, observed);
        ctx.free_func(ctx.state, observed);
        kmip_destroy(&ctx);
        TEST_FAILED(tracker, __func__, __LINE__);
    }

    kmip_free_cryptographic_parameters(&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 $0x910, %rsp            # imm = 0x910
movq %rdi, %rbx
incw (%rdi)
xorl %edi, %edi
xorl %esi, %esi
callq 0x15621
testq %rax, %rax
je 0x3d72
leaq 0x294be(%rip), %rdi     # 0x2d222
leaq 0x29879(%rip), %rsi     # 0x2d5e4
movl $0x60e, %edx            # imm = 0x60E
jmp 0x3dc0
leaq 0x78(%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 0x15621
testq %rax, %rax
je 0x3de2
leaq 0x78(%rsp), %rdi
callq 0x13455
leaq 0x2946e(%rip), %rdi     # 0x2d222
leaq 0x29829(%rip), %rsi     # 0x2d5e4
movl $0x618, %edx            # imm = 0x618
xorl %eax, %eax
callq 0x1090
incw 0x2(%rbx)
movl $0x1, %ebp
movl %ebp, %eax
addq $0x910, %rsp            # imm = 0x910
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc(%rsp), %rax
movl $0x4030201, (%rax)      # imm = 0x4030201
leaq 0x10(%rsp), %rcx
movq %rax, (%rcx)
movq $0x4, 0x8(%rcx)
leaq 0x20(%rsp), %rsi
movq $0x0, 0x48(%rsi)
movaps 0x291ff(%rip), %xmm0    # 0x2d010
movaps %xmm0, (%rsi)
movaps 0x29205(%rip), %xmm0    # 0x2d020
movaps %xmm0, 0x10(%rsi)
movaps 0x2920a(%rip), %xmm0    # 0x2d030
movaps %xmm0, 0x20(%rsi)
movaps 0x2920f(%rip), %xmm0    # 0x2d040
movaps %xmm0, 0x30(%rsi)
movq %rcx, 0x40(%rsi)
movl $0x20, 0x48(%rsi)
leaq 0x78(%rsp), %rdi
callq 0x15621
testq %rax, %rax
je 0x3ead
movq %rax, %r14
leaq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x15e73
testl %eax, %eax
je 0x3ed8
leaq 0x78(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x13c0a
movq 0x890(%r15), %rdi
movq %r14, %rsi
callq *0x878(%r15)
movq %r15, %rdi
callq 0x13455
leaq 0x29384(%rip), %rdi     # 0x2d217
leaq 0x2974a(%rip), %rsi     # 0x2d5e4
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1090
movl $0x4, %eax
jmp 0x3f53
leaq 0x78(%rsp), %rdi
callq 0x13455
leaq 0x29364(%rip), %rdi     # 0x2d222
leaq 0x2971f(%rip), %rsi     # 0x2d5e4
movl $0x63a, %edx            # imm = 0x63A
xorl %eax, %eax
callq 0x1090
movl $0x1, %ebp
jmp 0x3f4e
movq 0x3f119(%rip), %r12     # 0x42ff8
movq (%r12), %rdi
movl $0x1, %ebp
leaq 0x20(%rsp), %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x2ae33
movq (%r12), %rdi
movl $0x1, %esi
movq %r15, %rdx
callq 0x2ae33
leaq 0x78(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x13c0a
movq 0x890(%r15), %rdi
movq %r14, %rsi
callq *0x878(%r15)
movq %r15, %rdi
callq 0x13455
leaq 0x292e7(%rip), %rdi     # 0x2d222
leaq 0x296a2(%rip), %rsi     # 0x2d5e4
movl $0x643, %edx            # imm = 0x643
xorl %eax, %eax
callq 0x1090
movl $0x2, %eax
incw (%rbx,%rax)
jmp 0x3dd0