// File: /workspace/github_c_makefile_star2_O2/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 0x1e87a(%rip), %xmm0    # 0x2bba0
leaq 0x30(%rsp), %r14
movaps %xmm0, 0x10(%r14)
movaps 0x1e859(%rip), %xmm0    # 0x2bb90
movaps %xmm0, (%r14)
leaq 0x50(%rsp), %r15
movl $0x898, %edx            # imm = 0x898
movq %r15, %rdi
xorl %esi, %esi
callq 0x10c0
pushq $0x20
popq %rdx
pushq $0x5
popq %rcx
movq %r15, %rdi
movq %r14, %rsi
callq 0x128ed
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
movq %r14, %rdi
callq 0x12e6d
movq %r15, %rdi
movq %r14, %rsi
callq 0x1c743
cmpl $-0x13, %eax
jne 0xd3fa
leaq 0x50(%rsp), %r14
movq %rsp, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x1309a
movq %r14, %rdi
callq 0x12ade
movaps 0x1d5dc(%rip), %xmm0    # 0x2a980
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
movq $0x6c7373, 0x10(%rsi)   # imm = 0x6C7373
pushq $0x18
popq %rdx
pushq $0x5
popq %rcx
movq %r14, %rdi
callq 0x128ed
movq %r15, %rdi
callq 0x12e6d
movq %r14, %rdi
movq %r15, %rsi
callq 0x1c743
testl %eax, %eax
je 0xd41d
leaq 0x18e42(%rip), %rdi     # 0x26222
leaq 0x1a874(%rip), %rsi     # 0x27c5b
movl $0x24b5, %edx           # imm = 0x24B5
xorl %eax, %eax
callq 0x1090
pushq $0x1
popq %rbp
pushq $0x2
jmp 0xd44e
leaq 0x18e21(%rip), %rdi     # 0x26222
leaq 0x1a853(%rip), %rsi     # 0x27c5b
movl $0x24a3, %edx           # imm = 0x24A3
xorl %eax, %eax
callq 0x1090
incw 0x2(%rbx)
pushq $0x1
popq %rbp
jmp 0xd453
leaq 0x50(%rsp), %r14
movq %rsp, %rsi
movq %r14, %rdi
callq 0x1309a
movq %r14, %rdi
callq 0x12ade
leaq 0x18ddb(%rip), %rdi     # 0x26217
leaq 0x1a818(%rip), %rsi     # 0x27c5b
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1090
pushq $0x4
popq %rax
incw (%rbx,%rax)
movl %ebp, %eax
addq $0x8e8, %rsp            # imm = 0x8E8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq