// File: /workspace/github_c_makefile_star2_O1/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_encode_attribute_application_specific_information_invalid_field
int
test_encode_attribute_application_specific_information_invalid_field(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 observed[96] = {0};
    KMIP ctx = {0};
    kmip_init(&ctx, observed, ARRAY_LENGTH(observed), KMIP_1_0);

    TextString namespace = {0};
    namespace.value = "ssl";
    namespace.size = 3;

    TextString data = {0};
    data.value = "www.example.com";
    data.size = 15;

    ApplicationSpecificInformation asi_a = {0};
    asi_a.application_data = &data;

    Attribute attr_a = {0};
    kmip_init_attribute(&attr_a);

    attr_a.type = KMIP_ATTR_APPLICATION_SPECIFIC_INFORMATION;
    attr_a.value = &asi_a;

    int result = kmip_encode_attribute(&ctx, &attr_a);
    if(result != KMIP_INVALID_FIELD)
    {
        TEST_FAILED(tracker, __func__, __LINE__);
    }

    kmip_destroy(&ctx);
    kmip_init(&ctx, observed, ARRAY_LENGTH(observed), KMIP_1_0);

    ApplicationSpecificInformation asi_b = {0};
    asi_b.application_namespace = &namespace;

    Attribute attr_b = {0};
    kmip_init_attribute(&attr_b);

    attr_b.type = KMIP_ATTR_APPLICATION_SPECIFIC_INFORMATION;
    attr_b.value = &asi_b;

    result = kmip_encode_attribute(&ctx, &attr_b);
    if(result != KMIP_INVALID_FIELD)
    {
        TEST_FAILED(tracker, __func__, __LINE__);
    }

    kmip_destroy(&ctx);

    TEST_PASSED(tracker, __func__);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x960, %rsp            # imm = 0x960
movq %rdi, %rbx
incw (%rdi)
xorps %xmm0, %xmm0
leaq 0x60(%rsp), %r15
movaps %xmm0, 0x50(%r15)
movaps %xmm0, 0x40(%r15)
movaps %xmm0, 0x30(%r15)
movaps %xmm0, 0x20(%r15)
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
leaq 0xc8(%rsp), %r14
movl $0x898, %edx            # imm = 0x898
movq %r14, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x60, %edx
movq %r14, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x13747
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
leaq 0x29cd4(%rip), %rax     # 0x2f856
movq %rax, (%rsp)
movq $0x3, 0x8(%rsp)
leaq 0x50(%rsp), %rax
movaps %xmm0, (%rax)
leaq 0x29cbc(%rip), %rcx     # 0x2f85a
movq %rcx, (%rax)
movq $0xf, 0x8(%rax)
leaq 0x40(%rsp), %r12
movaps %xmm0, (%r12)
movq %rax, 0x8(%r12)
leaq 0x30(%rsp), %r15
movaps %xmm0, (%r15)
movq %r15, %rdi
callq 0x13e59
movl $0x8, (%r15)
movq %r12, 0x8(%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x1954e
cmpl $-0x14, %eax
jne 0x5c77
leaq 0xc8(%rsp), %r14
movq %r14, %rdi
callq 0x13a23
leaq 0x60(%rsp), %rsi
xorl %ebp, %ebp
movl $0x60, %edx
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x13747
leaq 0x20(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %rsp, %rax
movq %rax, (%r12)
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
movq %r15, %rdi
callq 0x13e59
movl $0x8, (%r15)
movq %r12, 0x8(%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x1954e
cmpl $-0x14, %eax
jne 0x5c9c
leaq 0xc8(%rsp), %rdi
callq 0x13a23
leaq 0x295b5(%rip), %rdi     # 0x2f217
leaq 0x29c38(%rip), %rsi     # 0x2f8a1
xorl %eax, %eax
callq 0x1090
movl $0x4, %eax
jmp 0x5cc0
leaq 0x295a4(%rip), %rdi     # 0x2f222
leaq 0x29c1c(%rip), %rsi     # 0x2f8a1
movl $0xa69, %edx            # imm = 0xA69
xorl %eax, %eax
callq 0x1090
incw 0x2(%rbx)
movl $0x1, %ebp
jmp 0x5cc4
leaq 0x2957f(%rip), %rdi     # 0x2f222
leaq 0x29bf7(%rip), %rsi     # 0x2f8a1
movl $0xa7b, %edx            # imm = 0xA7B
xorl %eax, %eax
callq 0x1090
movl $0x1, %ebp
movl $0x2, %eax
incw (%rbx,%rax)
movl %ebp, %eax
addq $0x960, %rsp            # imm = 0x960
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq