// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x900, %rsp            # imm = 0x900
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movw (%rax), %cx
addw $0x1, %cx
movw %cx, (%rax)
movq 0x3366c(%rip), %rax     # 0x472c0
movq %rax, -0x30(%rbp)
movq 0x33669(%rip), %rax     # 0x472c8
movq %rax, -0x28(%rbp)
movq 0x33666(%rip), %rax     # 0x472d0
movq %rax, -0x20(%rbp)
movq 0x33663(%rip), %rax     # 0x472d8
movq %rax, -0x18(%rbp)
leaq -0x8c8(%rbp), %rdi
xorl %esi, %esi
movl $0x898, %edx            # imm = 0x898
callq 0x1090
leaq -0x30(%rbp), %rsi
leaq -0x8c8(%rbp), %rdi
movl $0x20, %edx
movl $0x5, %ecx
callq 0x1c6e0
leaq -0x8d8(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x8d8(%rbp), %rdi
callq 0x1d330
leaq -0x8c8(%rbp), %rdi
leaq -0x8d8(%rbp), %rsi
callq 0x2f0a0
movl %eax, -0x8dc(%rbp)
cmpl $-0x13, -0x8dc(%rbp)
je 0x13d1f
jmp 0x13ce9
leaq 0x2b3c5(%rip), %rdi     # 0x3f0b5
leaq 0x2ceac(%rip), %rsi     # 0x40ba3
movl $0x24a3, %edx           # imm = 0x24A3
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 0x13e33
leaq -0x8c8(%rbp), %rdi
leaq -0x8d8(%rbp), %rsi
callq 0x1d8e0
leaq -0x8c8(%rbp), %rdi
callq 0x1cab0
movq 0x31a2b(%rip), %rax     # 0x45770
movq %rax, -0x900(%rbp)
movq 0x31a25(%rip), %rax     # 0x45778
movq %rax, -0x8f8(%rbp)
movq 0x31a1f(%rip), %rax     # 0x45780
movq %rax, -0x8f0(%rbp)
leaq -0x900(%rbp), %rsi
leaq -0x8c8(%rbp), %rdi
movl $0x18, %edx
movl $0x5, %ecx
callq 0x1c6e0
leaq -0x8d8(%rbp), %rdi
callq 0x1d330
leaq -0x8c8(%rbp), %rdi
leaq -0x8d8(%rbp), %rsi
callq 0x2f0a0
movl %eax, -0x8dc(%rbp)
cmpl $0x0, -0x8dc(%rbp)
je 0x13de8
jmp 0x13db5
leaq 0x2b2f9(%rip), %rdi     # 0x3f0b5
leaq 0x2cde0(%rip), %rsi     # 0x40ba3
movl $0x24b5, %edx           # imm = 0x24B5
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 0x13e33
leaq -0x8c8(%rbp), %rdi
leaq -0x8d8(%rbp), %rsi
callq 0x1d8e0
leaq -0x8c8(%rbp), %rdi
callq 0x1cab0
leaq 0x2b23d(%rip), %rdi     # 0x3f04b
leaq 0x2cd8e(%rip), %rsi     # 0x40ba3
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 $0x900, %rsp            # imm = 0x900
popq %rbp
retq
nop