// File: /workspace/github_c_makefile_star2_O2/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 0x230d1(%rip), %rsi     # 0x28b20
pushq $0xa
popq %rcx
leaq 0x60(%rsp), %r14
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
pushq $0x50
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
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 0x5b3b
leaq 0xb0(%rsp), %r14
movq %rsp, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x1309a
movq %r14, %rdi
callq 0x12ade
leaq 0x230a1(%rip), %rsi     # 0x28b70
pushq $0x9
popq %rcx
leaq 0x10(%rsp), %rax
movq %rax, %rdi
rep  movsq (%rsi), %es:(%rdi)
pushq $0x48
popq %rdx
xorl %ebp, %ebp
movq %r14, %rdi
movq %rax, %rsi
xorl %ecx, %ecx
callq 0x128ed
movq %r15, %rdi
callq 0x12e6d
movq %r14, %rdi
movq %r15, %rsi
callq 0x1c743
cmpl $-0x13, %eax
jne 0x5b5e
leaq 0xb0(%rsp), %r14
movq %rsp, %rsi
movq %r14, %rdi
callq 0x1309a
movq %r14, %rdi
callq 0x12ade
leaq 0x206ee(%rip), %rdi     # 0x26217
leaq 0x20ded(%rip), %rsi     # 0x2691d
xorl %eax, %eax
callq 0x1090
pushq $0x4
jmp 0x5b7d
leaq 0x206e0(%rip), %rdi     # 0x26222
leaq 0x20dd4(%rip), %rsi     # 0x2691d
movl $0xad8, %edx            # imm = 0xAD8
xorl %eax, %eax
callq 0x1090
incw 0x2(%rbx)
pushq $0x1
popq %rbp
jmp 0x5b82
leaq 0x206bd(%rip), %rdi     # 0x26222
leaq 0x20db1(%rip), %rsi     # 0x2691d
movl $0xaf0, %edx            # imm = 0xAF0
xorl %eax, %eax
callq 0x1090
pushq $0x1
popq %rbp
pushq $0x2
popq %rax
incw (%rbx,%rax)
movl %ebp, %eax
addq $0x948, %rsp            # imm = 0x948
popq %rbx
popq %r14
popq %r15
popq %rbp
retq