// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x960, %rsp            # imm = 0x960
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movw (%rax), %cx
addw $0x1, %cx
movw %cx, (%rax)
leaq -0x60(%rbp), %rdi
leaq 0x39688(%rip), %rsi     # 0x41af0
movl $0x50, %edx
callq 0x10c0
leaq -0x8f8(%rbp), %rdi
xorl %esi, %esi
movl $0x898, %edx            # imm = 0x898
callq 0x1090
leaq -0x60(%rbp), %rsi
leaq -0x8f8(%rbp), %rdi
movl $0x50, %edx
xorl %ecx, %ecx
callq 0x1c6e0
leaq -0x908(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x908(%rbp), %rdi
callq 0x1d330
leaq -0x8f8(%rbp), %rdi
leaq -0x908(%rbp), %rsi
callq 0x2f0a0
movl %eax, -0x90c(%rbp)
cmpl $-0x13, -0x90c(%rbp)
je 0x8515
jmp 0x84df
leaq 0x36bcf(%rip), %rdi     # 0x3f0b5
leaq 0x37378(%rip), %rsi     # 0x3f865
movl $0xad8, %edx            # imm = 0xAD8
movb $0x0, %al
callq 0x1070
movq -0x10(%rbp), %rax
movw 0x2(%rax), %cx
addw $0x1, %cx
movw %cx, 0x2(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x8614
leaq -0x8f8(%rbp), %rdi
leaq -0x908(%rbp), %rsi
callq 0x1d8e0
leaq -0x8f8(%rbp), %rdi
callq 0x1cab0
leaq -0x960(%rbp), %rdi
leaq 0x395fe(%rip), %rsi     # 0x41b40
movl $0x48, %edx
callq 0x10c0
leaq -0x960(%rbp), %rsi
leaq -0x8f8(%rbp), %rdi
movl $0x48, %edx
xorl %ecx, %ecx
callq 0x1c6e0
leaq -0x908(%rbp), %rdi
callq 0x1d330
leaq -0x8f8(%rbp), %rdi
leaq -0x908(%rbp), %rsi
callq 0x2f0a0
movl %eax, -0x90c(%rbp)
cmpl $-0x13, -0x90c(%rbp)
je 0x85c9
jmp 0x8596
leaq 0x36b18(%rip), %rdi     # 0x3f0b5
leaq 0x372c1(%rip), %rsi     # 0x3f865
movl $0xaf0, %edx            # imm = 0xAF0
movb $0x0, %al
callq 0x1070
movq -0x10(%rbp), %rax
movw 0x2(%rax), %cx
addw $0x1, %cx
movw %cx, 0x2(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x8614
leaq -0x8f8(%rbp), %rdi
leaq -0x908(%rbp), %rsi
callq 0x1d8e0
leaq -0x8f8(%rbp), %rdi
callq 0x1cab0
leaq 0x36a5c(%rip), %rdi     # 0x3f04b
leaq 0x3726f(%rip), %rsi     # 0x3f865
movb $0x0, %al
callq 0x1070
movq -0x10(%rbp), %rax
movw 0x4(%rax), %cx
addw $0x1, %cx
movw %cx, 0x4(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x960, %rsp            # imm = 0x960
popq %rbp
retq