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

    uint8 encoding[96] = {
        0x42, 0x00, 0x08, 0x01, 0x00, 0x00, 0x00, 0x58,
        0x42, 0x00, 0x0A, 0x07, 0x00, 0x00, 0x00, 0x20,
        0x41, 0x70, 0x70, 0x6C, 0x69, 0x63, 0x61, 0x74,
        0x69, 0x6F, 0x6E, 0x20, 0x53, 0x70, 0x65, 0x63,
        0x69, 0x66, 0x69, 0x63, 0x20, 0x49, 0x6E, 0x66,
        0x6F, 0x72, 0x6D, 0x61, 0x74, 0x69, 0x6F, 0x6E,
        0x42, 0x00, 0x0B, 0x01, 0x00, 0x00, 0x00, 0x28,
        0x42, 0x00, 0x03, 0x07, 0x00, 0x00, 0x00, 0x03,
        0x73, 0x73, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x42, 0x00, 0x02, 0x07, 0x00, 0x00, 0x00, 0x0F,
        0x77, 0x77, 0x77, 0x2E, 0x65, 0x78, 0x61, 0x6D,
        0x70, 0x6C, 0x65, 0x2E, 0x63, 0x6F, 0x6D, 0x00
    };

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

    TextString namespace = {0};
    namespace.value = "ssl";
    namespace.size = 3;

    TextString data = {0};
    data.value = "www.example.com";
    data.size = 15;

    ApplicationSpecificInformation asi = {0};
    asi.application_namespace = &namespace;
    asi.application_data = &data;

    Attribute expected = {0};
    kmip_init_attribute(&expected);
    expected.type = KMIP_ATTR_APPLICATION_SPECIFIC_INFORMATION;
    expected.value = &asi;
    Attribute observed = {0};
    kmip_init_attribute(&observed);

    int result = kmip_decode_attribute(&ctx, &observed);
    int comparison = kmip_compare_attribute(&expected, &observed);
    if(!comparison)
    {
        printf("Expected:\n");
        kmip_print_attribute(stderr, 2, &expected);
        printf("Observed:\n");
        kmip_print_attribute(stderr, 2, &observed);
    }
    result = report_decoding_test_result(tracker, &ctx, comparison, result, __func__);

    kmip_free_attribute(&ctx, &observed);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x950, %rsp            # imm = 0x950
movq %rdi, %rbx
incw (%rdi)
leaq 0x231d6(%rip), %rsi     # 0x28ac0
pushq $0xc
popq %rcx
leaq 0x50(%rsp), %r15
movq %r15, %rdi
rep  movsq (%rsi), %es:(%rdi)
leaq 0xb8(%rsp), %r14
movl $0x898, %edx            # imm = 0x898
movq %r14, %rdi
xorl %esi, %esi
callq 0x10c0
pushq $0x60
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x128ed
leaq 0x20f30(%rip), %rax     # 0x26856
leaq 0x40(%rsp), %rcx
movq %rax, (%rcx)
movq $0x3, 0x8(%rcx)
leaq 0x20f1d(%rip), %rax     # 0x2685a
leaq 0x30(%rsp), %rdx
movq %rax, (%rdx)
movq $0xf, 0x8(%rdx)
leaq 0x20(%rsp), %r12
movq %rcx, (%r12)
movq %rdx, 0x8(%r12)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
movq %r15, %rdi
callq 0x12e6d
movl $0x8, (%r15)
movq %r12, 0x8(%r15)
movq %rsp, %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x12e6d
movq %r14, %rdi
movq %r12, %rsi
callq 0x1c743
movl %eax, %ebp
movq %r15, %rdi
movq %r12, %rsi
callq 0x14d69
movl %eax, %r14d
testl %eax, %eax
jne 0x59ef
leaq 0x22d04(%rip), %rdi     # 0x286b7
callq 0x1070
movq 0x38639(%rip), %r12     # 0x3dff8
movq (%r12), %rdi
pushq $0x2
popq %r15
leaq 0x10(%rsp), %rdx
movl %r15d, %esi
callq 0x23eff
leaq 0x22ce6(%rip), %rdi     # 0x286c1
callq 0x1070
movq (%r12), %rdi
movq %rsp, %rdx
movl %r15d, %esi
callq 0x23eff
leaq 0x20ef0(%rip), %r8      # 0x268e6
leaq 0xb8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
movl %ebp, %ecx
callq 0x134d
movl %eax, %ebx
movq %rsp, %rsi
movq %r15, %rdi
callq 0x1309a
movq %r15, %rdi
callq 0x12ade
movl %ebx, %eax
addq $0x950, %rsp            # imm = 0x950
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq