// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x920, %rsp            # imm = 0x920
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movw (%rax), %cx
addw $0x1, %cx
movw %cx, (%rax)
movq $0x0, -0x18(%rbp)
xorl %eax, %eax
movl %eax, %esi
movq %rsi, %rdi
callq 0x20240
movq %rax, -0x18(%rbp)
xorl %eax, %eax
cmpq -0x18(%rbp), %rax
je 0x5655
jmp 0x561f
leaq 0x39a8f(%rip), %rdi     # 0x3f0b5
leaq 0x39ee1(%rip), %rsi     # 0x3f50e
movl $0x60e, %edx            # imm = 0x60E
movb $0x0, %al
callq 0x1070
movq -0x10(%rbp), %rax
movw 0x2(%rax), %cx
addw $0x1, %cx
movw %cx, 0x2(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x5941
leaq -0x8b0(%rbp), %rdi
xorl %esi, %esi
movl $0x898, %edx            # imm = 0x898
callq 0x1090
leaq -0x8b0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
movq %rdx, %rsi
callq 0x1c6e0
leaq -0x8b0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x20240
movq %rax, -0x18(%rbp)
xorl %eax, %eax
cmpq -0x18(%rbp), %rax
je 0x56db
leaq -0x8b0(%rbp), %rdi
callq 0x1cab0
leaq 0x39a09(%rip), %rdi     # 0x3f0b5
leaq 0x39e5b(%rip), %rsi     # 0x3f50e
movl $0x618, %edx            # imm = 0x618
movb $0x0, %al
callq 0x1070
movq -0x10(%rbp), %rax
movw 0x2(%rax), %cx
addw $0x1, %cx
movw %cx, 0x2(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x5941
movl 0x41a37(%rip), %eax     # 0x47118
movl %eax, -0x8b4(%rbp)
leaq -0x8c8(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x8b4(%rbp), %rax
movq %rax, -0x8c8(%rbp)
movq $0x4, -0x8c0(%rbp)
leaq -0x918(%rbp), %rdi
xorl %esi, %esi
movl $0x50, %edx
callq 0x1090
movl $0x1, -0x918(%rbp)
movl $0x3, -0x914(%rbp)
movl $0x4, -0x910(%rbp)
movl $0xb, -0x90c(%rbp)
movl $0x3, -0x908(%rbp)
movl $0x4, -0x904(%rbp)
movl $0x1, -0x900(%rbp)
movl $0x100, -0x8fc(%rbp)    # imm = 0x100
movl $0x10, -0x8f8(%rbp)
movl $0x400, -0x8f4(%rbp)    # imm = 0x400
movl $0x400, -0x8f0(%rbp)    # imm = 0x400
movl $0x20, -0x8ec(%rbp)
movl $0x1, -0x8e8(%rbp)
movl $0x40, -0x8e4(%rbp)
movl $0x1, -0x8e0(%rbp)
movl $0x4, -0x8dc(%rbp)
leaq -0x8c8(%rbp), %rax
movq %rax, -0x8d8(%rbp)
movl $0x20, -0x8d0(%rbp)
leaq -0x8b0(%rbp), %rdi
leaq -0x918(%rbp), %rsi
callq 0x20240
movq %rax, -0x18(%rbp)
xorl %eax, %eax
cmpq -0x18(%rbp), %rax
jne 0x583f
leaq -0x8b0(%rbp), %rdi
callq 0x1cab0
leaq 0x398a5(%rip), %rdi     # 0x3f0b5
leaq 0x39cf7(%rip), %rsi     # 0x3f50e
movl $0x63a, %edx            # imm = 0x63A
movb $0x0, %al
callq 0x1070
movq -0x10(%rbp), %rax
movw 0x2(%rax), %cx
addw $0x1, %cx
movw %cx, 0x2(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x5941
movq -0x18(%rbp), %rsi
leaq -0x918(%rbp), %rdi
callq 0x21300
cmpl $0x0, %eax
jne 0x58eb
movq 0x4e799(%rip), %rax     # 0x53ff8
movq (%rax), %rdi
movl $0x1, %esi
leaq -0x918(%rbp), %rdx
callq 0x3b8d0
movq 0x4e77e(%rip), %rax     # 0x53ff8
movq (%rax), %rdi
movl $0x1, %esi
leaq -0x918(%rbp), %rdx
callq 0x3b8d0
movq -0x18(%rbp), %rsi
leaq -0x8b0(%rbp), %rdi
callq 0x1db10
movq -0x38(%rbp), %rax
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq *%rax
leaq -0x8b0(%rbp), %rdi
callq 0x1cab0
leaq 0x397f6(%rip), %rdi     # 0x3f0b5
leaq 0x39c48(%rip), %rsi     # 0x3f50e
movl $0x643, %edx            # imm = 0x643
movb $0x0, %al
callq 0x1070
movq -0x10(%rbp), %rax
movw 0x2(%rax), %cx
addw $0x1, %cx
movw %cx, 0x2(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x5941
movq -0x18(%rbp), %rsi
leaq -0x8b0(%rbp), %rdi
callq 0x1db10
movq -0x38(%rbp), %rax
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq *%rax
leaq -0x8b0(%rbp), %rdi
callq 0x1cab0
leaq 0x3972f(%rip), %rdi     # 0x3f04b
leaq 0x39beb(%rip), %rsi     # 0x3f50e
movb $0x0, %al
callq 0x1070
movq -0x10(%rbp), %rax
movw 0x4(%rax), %cx
addw $0x1, %cx
movw %cx, 0x4(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x920, %rsp            # imm = 0x920
popq %rbp
retq
nopl (%rax)