// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xa30, %rsp            # imm = 0xA30
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movw (%rax), %cx
addw $0x1, %cx
movw %cx, (%rax)
leaq -0xe0(%rbp), %rdi
leaq 0x2edf5(%rip), %rsi     # 0x461d0
movl $0xd8, %edx
callq 0x10c0
leaq -0x978(%rbp), %rdi
xorl %esi, %esi
movl $0x898, %edx            # imm = 0x898
callq 0x1090
leaq -0xe0(%rbp), %rsi
leaq -0x978(%rbp), %rdi
movl $0xd8, %edx
movl $0x2, %ecx
callq 0x1c6e0
leaq -0x9c8(%rbp), %rdi
xorl %esi, %esi
movl $0x50, %edx
callq 0x1090
leaq -0x9c8(%rbp), %rdi
callq 0x1d370
movl $0x1, -0x9c8(%rbp)
movl $0x3, -0x9c4(%rbp)
movl $0x4, -0x9c0(%rbp)
movl $0xb, -0x9bc(%rbp)
movl $0x5, -0x9b8(%rbp)
movl $0x4, -0x9b4(%rbp)
movl $0x1, -0x9b0(%rbp)
movl $0x80, -0x9ac(%rbp)
movl $0x40, -0x9a8(%rbp)
movl $0x40, -0x9a4(%rbp)
movl $0x40, -0x9a0(%rbp)
movl $0x100, -0x99c(%rbp)    # imm = 0x100
movl $0x0, -0x998(%rbp)
leaq -0xa18(%rbp), %rdi
xorl %esi, %esi
movl $0x50, %edx
callq 0x1090
leaq -0xa18(%rbp), %rdi
callq 0x1d370
leaq -0x978(%rbp), %rdi
leaq -0xa18(%rbp), %rsi
callq 0x2d860
movl %eax, -0xa1c(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xa28(%rbp)
leaq -0x9c8(%rbp), %rdi
leaq -0xa18(%rbp), %rsi
callq 0x21300
movq -0xa28(%rbp), %rdi
movl %eax, %edx
movl -0xa1c(%rbp), %ecx
leaq -0x978(%rbp), %rsi
leaq 0x29bbf(%rip), %r8      # 0x410e8
callq 0x13a0
movl %eax, -0xa1c(%rbp)
leaq -0x978(%rbp), %rdi
leaq -0xa18(%rbp), %rsi
callq 0x1db10
leaq -0x978(%rbp), %rdi
callq 0x1cab0
movl -0xa1c(%rbp), %eax
addq $0xa30, %rsp            # imm = 0xA30
popq %rbp
retq
nopw %cs:(%rax,%rax)