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

    uint8 encoding_no_namespace[32] = {
        0x42, 0x00, 0x04, 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_2_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[24] = {
        0x42, 0x00, 0x04, 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_2_0);
    kmip_init_attribute(&observed);

    result = kmip_decode_attribute(&ctx, &observed);
    if(result != KMIP_OK)
    {
        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 $0x8e8, %rsp            # imm = 0x8E8
movq %rdi, %rbx
incw (%rdi)
movaps 0x26fe7(%rip), %xmm0    # 0x34bb0
leaq 0x30(%rsp), %r14
movaps %xmm0, 0x10(%r14)
movaps 0x26fc6(%rip), %xmm0    # 0x34ba0
movaps %xmm0, (%r14)
leaq 0x50(%rsp), %r15
movl $0x898, %edx            # imm = 0x898
movq %r15, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x20, %edx
movq %r15, %rdi
movq %r14, %rsi
movl $0x5, %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 0xdcae
leaq 0x50(%rsp), %r14
movq %rsp, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x140cc
movq %r14, %rdi
callq 0x13a23
movaps 0x25d41(%rip), %xmm0    # 0x33990
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
movq $0x6c7373, 0x10(%rsi)   # imm = 0x6C7373
movl $0x18, %edx
movq %r14, %rdi
movl $0x5, %ecx
callq 0x13747
movq %r15, %rdi
callq 0x13e59
movq %r14, %rdi
movq %r15, %rsi
callq 0x2050d
testl %eax, %eax
je 0xdcd3
leaq 0x21593(%rip), %rdi     # 0x2f222
leaq 0x22fc5(%rip), %rsi     # 0x30c5b
movl $0x24b5, %edx           # imm = 0x24B5
xorl %eax, %eax
callq 0x1090
movl $0x1, %ebp
movl $0x2, %eax
jmp 0xdd07
leaq 0x2156d(%rip), %rdi     # 0x2f222
leaq 0x22f9f(%rip), %rsi     # 0x30c5b
movl $0x24a3, %edx           # imm = 0x24A3
xorl %eax, %eax
callq 0x1090
incw 0x2(%rbx)
movl $0x1, %ebp
jmp 0xdd0b
leaq 0x50(%rsp), %r14
movq %rsp, %rsi
movq %r14, %rdi
callq 0x140cc
movq %r14, %rdi
callq 0x13a23
leaq 0x21525(%rip), %rdi     # 0x2f217
leaq 0x22f62(%rip), %rsi     # 0x30c5b
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1090
movl $0x4, %eax
incw (%rbx,%rax)
movl %ebp, %eax
addq $0x8e8, %rsp            # imm = 0x8E8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq