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

    uint8 encoding[216] = {
        0x42, 0x00, 0x2B, 0x01, 0x00, 0x00, 0x00, 0xD0,
        0x42, 0x00, 0x11, 0x05, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
        0x42, 0x00, 0x5F, 0x05, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
        0x42, 0x00, 0x38, 0x05, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
        0x42, 0x00, 0x83, 0x05, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00,
        0x42, 0x00, 0xAE, 0x05, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00 ,0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
        0x42, 0x00, 0x28, 0x05, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
        0x42, 0x00, 0xC5, 0x06, 0x00, 0x00, 0x00, 0x08,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
        0x42, 0x00, 0xCD, 0x02, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00,
        0x42, 0x00, 0xCE, 0x02, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
        0x42, 0x00, 0xCF, 0x02, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
        0x42, 0x00, 0xD2, 0x02, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
        0x42, 0x00, 0xD0, 0x02, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x42, 0x00, 0xD1, 0x02, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
    };
    
    struct kmip ctx = {0};
    kmip_init(&ctx, encoding, ARRAY_LENGTH(encoding), KMIP_1_2);
    
    struct cryptographic_parameters expected = {0};
    kmip_init_cryptographic_parameters(&expected);
    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_SHA256_WITH_RSA;
    expected.cryptographic_algorithm = KMIP_CRYPTOALG_RSA;
    expected.random_iv = KMIP_TRUE;
    expected.iv_length = 128;
    expected.tag_length = 64;
    expected.fixed_field_length = 64;
    expected.invocation_field_length = 64;
    expected.counter_length = 256;
    expected.initial_counter_value = 0;
    
    struct cryptographic_parameters observed = {0};
    kmip_init_cryptographic_parameters(&observed);
    
    int result = kmip_decode_cryptographic_parameters(&ctx, &observed);
    result = report_decoding_test_result(
        tracker,
        &ctx,
        kmip_compare_cryptographic_parameters(&expected, &observed),
        result,
        __func__);
    kmip_free_cryptographic_parameters(&ctx, &observed);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa10, %rsp            # imm = 0xA10
movq %rdi, %rbx
incw (%rdi)
leaq 0x22297(%rip), %rsi     # 0x31f40
leaq 0xa0(%rsp), %r15
movl $0xd8, %edx
movq %r15, %rdi
callq 0x1100
leaq 0x178(%rsp), %r14
movl $0x898, %edx            # imm = 0x898
movq %r14, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0xd8, %edx
movq %r14, %rdi
movq %r15, %rsi
movl $0x2, %ecx
callq 0x13177
xorps %xmm0, %xmm0
leaq 0x50(%rsp), %r15
movaps %xmm0, 0x40(%r15)
movaps %xmm0, 0x30(%r15)
movaps %xmm0, 0x20(%r15)
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
movq %r15, %rdi
callq 0x138a6
movaps 0x1d2f7(%rip), %xmm0    # 0x2d010
movaps %xmm0, (%r15)
movaps 0x1d33c(%rip), %xmm0    # 0x2d060
movaps %xmm0, 0x10(%r15)
movaps 0x1d340(%rip), %xmm0    # 0x2d070
movaps %xmm0, 0x20(%r15)
movl $0x0, 0x30(%r15)
movq %rsp, %r12
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%r12)
movaps %xmm0, 0x30(%r12)
movaps %xmm0, 0x20(%r12)
movaps %xmm0, 0x10(%r12)
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x138a6
movq %r14, %rdi
movq %r12, %rsi
callq 0x1e1d3
movl %eax, %ebp
movq %r15, %rdi
movq %r12, %rsi
callq 0x15e73
leaq 0x1f419(%rip), %r8      # 0x2f1a0
movq %rbx, %rdi
movq %r14, %rsi
movl %eax, %edx
movl %ebp, %ecx
callq 0x1363
movl %eax, %ebx
movq %r14, %rdi
movq %r12, %rsi
callq 0x13c0a
movq %r14, %rdi
callq 0x13455
movl %ebx, %eax
addq $0xa10, %rsp            # imm = 0xA10
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq