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

    /* This encoding matches the following value:
    *  Application Specific Information
    *    Application Namespace - ssl
    *    Application Data - www.example.com
    */
    uint8 encoding[48] = {
        0x42, 0x00, 0x04, 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_2_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 $0x920, %rsp            # imm = 0x920
movq %rdi, %rbx
incw (%rdi)
movaps 0x25f3d(%rip), %xmm0    # 0x33980
leaq 0x50(%rsp), %r15
movaps %xmm0, 0x20(%r15)
movaps 0x25f1c(%rip), %xmm0    # 0x33970
movaps %xmm0, 0x10(%r15)
movaps 0x25f00(%rip), %xmm0    # 0x33960
movaps %xmm0, (%r15)
leaq 0x88(%rsp), %r14
movl $0x898, %edx            # imm = 0x898
movq %r14, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x30, %edx
movq %r14, %rdi
movq %r15, %rsi
movl $0x5, %ecx
callq 0x13747
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %rax
movaps %xmm0, (%rax)
leaq 0x21db4(%rip), %rcx     # 0x2f856
movq %rcx, (%rax)
movq $0x3, 0x8(%rax)
leaq 0x30(%rsp), %rcx
movaps %xmm0, (%rcx)
leaq 0x21d9e(%rip), %rdx     # 0x2f85a
movq %rdx, (%rcx)
movq $0xf, 0x8(%rcx)
leaq 0x20(%rsp), %r12
movaps %xmm0, (%r12)
movq %rax, (%r12)
movq %rcx, 0x8(%r12)
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
movq %r15, %rdi
callq 0x13e59
movl $0x8, (%r15)
movq %r12, 0x8(%r15)
movq %rsp, %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x13e59
movq %r14, %rdi
movq %r12, %rsi
callq 0x2050d
movl %eax, %ebp
movq %r15, %rdi
movq %r12, %rsi
callq 0x163c1
movl %eax, %r14d
testl %eax, %eax
jne 0xdb69
leaq 0x23b8e(%rip), %rdi     # 0x316bd
callq 0x1070
movq 0x374bd(%rip), %r15     # 0x44ff8
movq (%r15), %rdi
leaq 0x10(%rsp), %rdx
movl $0x2, %esi
callq 0x2c91e
leaq 0x23b73(%rip), %rdi     # 0x316c7
callq 0x1070
movq (%r15), %rdi
movq %rsp, %rdx
movl $0x2, %esi
callq 0x2c91e
leaq 0x230b1(%rip), %r8      # 0x30c21
leaq 0x88(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
movl %ebp, %ecx
callq 0x1397
movl %eax, %ebx
movq %rsp, %rsi
movq %r15, %rdi
callq 0x140cc
movq %r15, %rdi
callq 0x13a23
movl %ebx, %eax
addq $0x920, %rsp            # imm = 0x920
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq