// File: /workspace/github_c_makefile_star2_O2/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 0x14704
testq %rax, %rax
je 0x3bb4
leaq 0x2267c(%rip), %rdi     # 0x26222
leaq 0x22a37(%rip), %rsi     # 0x265e4
movl $0x60e, %edx            # imm = 0x60E
jmp 0x3c02
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 0x128ed
movq %r14, %rdi
xorl %esi, %esi
callq 0x14704
testq %rax, %rax
je 0x3c22
leaq 0x78(%rsp), %rdi
callq 0x12ade
leaq 0x2262c(%rip), %rdi     # 0x26222
leaq 0x229e7(%rip), %rsi     # 0x265e4
movl $0x618, %edx            # imm = 0x618
xorl %eax, %eax
callq 0x1090
incw 0x2(%rbx)
pushq $0x1
popq %rbp
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
leaq 0x20(%rsp), %rsi
andq $0x0, 0x48(%rsi)
movq %rax, (%rcx)
movq $0x4, 0x8(%rcx)
movaps 0x223c2(%rip), %xmm0    # 0x26010
movaps %xmm0, (%rsi)
movaps 0x223c8(%rip), %xmm0    # 0x26020
movaps %xmm0, 0x10(%rsi)
movaps 0x223cd(%rip), %xmm0    # 0x26030
movaps %xmm0, 0x20(%rsi)
movaps 0x223d2(%rip), %xmm0    # 0x26040
movaps %xmm0, 0x30(%rsi)
movq %rcx, 0x40(%rsi)
movl $0x20, 0x48(%rsi)
leaq 0x78(%rsp), %rdi
callq 0x14704
testq %rax, %rax
je 0x3ce7
movq %rax, %r14
leaq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x14e63
testl %eax, %eax
je 0x3d10
leaq 0x78(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x13194
movq 0x890(%r15), %rdi
movq %r14, %rsi
callq *0x878(%r15)
movq %r15, %rdi
callq 0x12ade
leaq 0x22547(%rip), %rdi     # 0x26217
leaq 0x2290d(%rip), %rsi     # 0x265e4
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1090
pushq $0x4
jmp 0x3d80
leaq 0x78(%rsp), %rdi
callq 0x12ade
leaq 0x2252a(%rip), %rdi     # 0x26222
leaq 0x228e5(%rip), %rsi     # 0x265e4
movl $0x63a, %edx            # imm = 0x63A
xorl %eax, %eax
callq 0x1090
pushq $0x1
popq %rbp
jmp 0x3d7e
movq 0x3a2e1(%rip), %r12     # 0x3dff8
movq (%r12), %rdi
pushq $0x1
popq %rbp
leaq 0x20(%rsp), %r15
movl %ebp, %esi
movq %r15, %rdx
callq 0x23830
movq (%r12), %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x23830
leaq 0x78(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x13194
movq 0x890(%r15), %rdi
movq %r14, %rsi
callq *0x878(%r15)
movq %r15, %rdi
callq 0x12ade
leaq 0x224b7(%rip), %rdi     # 0x26222
leaq 0x22872(%rip), %rsi     # 0x265e4
movl $0x643, %edx            # imm = 0x643
xorl %eax, %eax
callq 0x1090
pushq $0x2
popq %rax
incw (%rbx,%rax)
jmp 0x3c10