// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x960, %rsp            # imm = 0x960
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movw (%rax), %cx
addw $0x1, %cx
movw %cx, (%rax)
leaq -0x70(%rbp), %rdi
leaq 0x39848(%rip), %rsi     # 0x41a90
movl $0x60, %edx
callq 0x10c0
leaq -0x908(%rbp), %rdi
xorl %esi, %esi
movl $0x898, %edx            # imm = 0x898
callq 0x1090
leaq -0x70(%rbp), %rsi
leaq -0x908(%rbp), %rdi
movl $0x60, %edx
xorl %ecx, %ecx
callq 0x1c6e0
leaq -0x918(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq 0x374f2(%rip), %rax     # 0x3f788
movq %rax, -0x918(%rbp)
movq $0x3, -0x910(%rbp)
leaq -0x928(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq 0x374ca(%rip), %rax     # 0x3f78c
movq %rax, -0x928(%rbp)
movq $0xf, -0x920(%rbp)
leaq -0x938(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x918(%rbp), %rax
movq %rax, -0x938(%rbp)
leaq -0x928(%rbp), %rax
movq %rax, -0x930(%rbp)
leaq -0x948(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x948(%rbp), %rdi
callq 0x1d330
movl $0x8, -0x948(%rbp)
leaq -0x938(%rbp), %rax
movq %rax, -0x940(%rbp)
leaq -0x958(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x958(%rbp), %rdi
callq 0x1d330
leaq -0x908(%rbp), %rdi
leaq -0x958(%rbp), %rsi
callq 0x2f0a0
movl %eax, -0x95c(%rbp)
leaq -0x948(%rbp), %rdi
leaq -0x958(%rbp), %rsi
callq 0x20f80
movl %eax, -0x960(%rbp)
cmpl $0x0, -0x960(%rbp)
jne 0x83e6
leaq 0x3747d(%rip), %rdi     # 0x3f818
movb $0x0, %al
callq 0x1070
movq 0x4bc4f(%rip), %rax     # 0x53ff8
movq (%rax), %rdi
movl $0x2, %esi
leaq -0x948(%rbp), %rdx
callq 0x3c210
leaq 0x3745f(%rip), %rdi     # 0x3f823
movb $0x0, %al
callq 0x1070
movq 0x4bc26(%rip), %rax     # 0x53ff8
movq (%rax), %rdi
movl $0x2, %esi
leaq -0x958(%rbp), %rdx
callq 0x3c210
movq -0x8(%rbp), %rdi
movl -0x960(%rbp), %edx
movl -0x95c(%rbp), %ecx
leaq -0x908(%rbp), %rsi
leaq 0x3742a(%rip), %r8      # 0x3f82e
callq 0x13a0
movl %eax, -0x95c(%rbp)
leaq -0x908(%rbp), %rdi
leaq -0x958(%rbp), %rsi
callq 0x1d8e0
leaq -0x908(%rbp), %rdi
callq 0x1cab0
movl -0x95c(%rbp), %eax
addq $0x960, %rsp            # imm = 0x960
popq %rbp
retq
nopl (%rax)