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

    uint8 encoding_no_namespace[80] = {
        0x42, 0x00, 0x08, 0x01, 0x00, 0x00, 0x00, 0x18,
        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, 0x18,
        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_no_namespace, ARRAY_LENGTH(encoding_no_namespace), KMIP_1_0);

    Attribute observed = {0};
    kmip_init_attribute(&observed);

    int result = kmip_decode_attribute(&ctx, &observed);
    if(result != KMIP_INVALID_ENCODING)
    {
        TEST_FAILED(tracker, __func__, __LINE__);
    }

    kmip_free_attribute(&ctx, &observed);
    kmip_destroy(&ctx);

    uint8 encoding_no_data[72] = {
        0x42, 0x00, 0x08, 0x01, 0x00, 0x00, 0x00, 0x40,
        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, 0x10,
        0x42, 0x00, 0x03, 0x07, 0x00, 0x00, 0x00, 0x03,
        0x73, 0x73, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00
    };

    kmip_init(&ctx, encoding_no_data, ARRAY_LENGTH(encoding_no_data), KMIP_1_0);
    kmip_init_attribute(&observed);

    result = kmip_decode_attribute(&ctx, &observed);
    if(result != KMIP_INVALID_ENCODING)
    {
        TEST_FAILED(tracker, __func__, __LINE__);
    }

    kmip_free_attribute(&ctx, &observed);
    kmip_destroy(&ctx);

    TEST_PASSED(tracker, __func__);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x948, %rsp            # imm = 0x948
movq %rdi, %rbx
incw (%rdi)
leaq 0x2bccc(%rip), %rsi     # 0x31b30
leaq 0x60(%rsp), %r14
movl $0xa, %ecx
movq %r14, %rdi
rep  movsq (%rsi), %es:(%rdi)
leaq 0xb0(%rsp), %r15
movl $0x898, %edx            # imm = 0x898
movq %r15, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x50, %edx
movq %r15, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x13747
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
movq %r14, %rdi
callq 0x13e59
movq %r15, %rdi
movq %r14, %rsi
callq 0x2050d
cmpl $-0x13, %eax
jne 0x5f5b
leaq 0xb0(%rsp), %r14
movq %rsp, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x140cc
movq %r14, %rdi
callq 0x13a23
leaq 0x2bc98(%rip), %rsi     # 0x31b80
leaq 0x10(%rsp), %rax
movl $0x9, %ecx
movq %rax, %rdi
rep  movsq (%rsi), %es:(%rdi)
xorl %ebp, %ebp
movl $0x48, %edx
movq %r14, %rdi
movq %rax, %rsi
xorl %ecx, %ecx
callq 0x13747
movq %r15, %rdi
callq 0x13e59
movq %r14, %rdi
movq %r15, %rsi
callq 0x2050d
cmpl $-0x13, %eax
jne 0x5f80
leaq 0xb0(%rsp), %r14
movq %rsp, %rsi
movq %r14, %rdi
callq 0x140cc
movq %r14, %rdi
callq 0x13a23
leaq 0x292d1(%rip), %rdi     # 0x2f217
leaq 0x299d0(%rip), %rsi     # 0x2f91d
xorl %eax, %eax
callq 0x1090
movl $0x4, %eax
jmp 0x5fa4
leaq 0x292c0(%rip), %rdi     # 0x2f222
leaq 0x299b4(%rip), %rsi     # 0x2f91d
movl $0xad8, %edx            # imm = 0xAD8
xorl %eax, %eax
callq 0x1090
incw 0x2(%rbx)
movl $0x1, %ebp
jmp 0x5fa8
leaq 0x2929b(%rip), %rdi     # 0x2f222
leaq 0x2998f(%rip), %rsi     # 0x2f91d
movl $0xaf0, %edx            # imm = 0xAF0
xorl %eax, %eax
callq 0x1090
movl $0x1, %ebp
movl $0x2, %eax
incw (%rbx,%rax)
movl %ebp, %eax
addq $0x948, %rsp            # imm = 0x948
popq %rbx
popq %r14
popq %r15
popq %rbp
retq