// File: /workspace/github_c_makefile_star2_O3/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 0x2533d(%rip), %xmm0    # 0x32ba0
leaq 0x30(%rsp), %r14
movaps %xmm0, 0x10(%r14)
movaps 0x2531c(%rip), %xmm0    # 0x32b90
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 0x13177
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
movq %r14, %rdi
callq 0x1388b
movq %r15, %rdi
movq %r14, %rsi
callq 0x1f694
cmpl $-0x13, %eax
jne 0xd948
leaq 0x50(%rsp), %r14
movq %rsp, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x13afe
movq %r14, %rdi
callq 0x13455
movaps 0x24097(%rip), %xmm0    # 0x31980
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
movq $0x6c7373, 0x10(%rsi)   # imm = 0x6C7373
movl $0x18, %edx
movq %r14, %rdi
movl $0x5, %ecx
callq 0x13177
movq %r15, %rdi
callq 0x1388b
movq %r14, %rdi
movq %r15, %rsi
callq 0x1f694
testl %eax, %eax
je 0xd96d
leaq 0x1f8f9(%rip), %rdi     # 0x2d222
leaq 0x2132b(%rip), %rsi     # 0x2ec5b
movl $0x24b5, %edx           # imm = 0x24B5
xorl %eax, %eax
callq 0x1090
movl $0x1, %ebp
movl $0x2, %eax
jmp 0xd9a1
leaq 0x1f8d3(%rip), %rdi     # 0x2d222
leaq 0x21305(%rip), %rsi     # 0x2ec5b
movl $0x24a3, %edx           # imm = 0x24A3
xorl %eax, %eax
callq 0x1090
incw 0x2(%rbx)
movl $0x1, %ebp
jmp 0xd9a5
leaq 0x50(%rsp), %r14
movq %rsp, %rsi
movq %r14, %rdi
callq 0x13afe
movq %r14, %rdi
callq 0x13455
leaq 0x1f88b(%rip), %rdi     # 0x2d217
leaq 0x212c8(%rip), %rsi     # 0x2ec5b
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