// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x60
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x128ed
leaq 0x210d2(%rip), %rax     # 0x26856
movq %rax, (%rsp)
movq $0x3, 0x8(%rsp)
leaq 0x210c2(%rip), %rax     # 0x2685a
leaq 0x50(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x40(%rsp), %r12
andq $0x0, (%r12)
movq $0xf, 0x8(%rcx)
movq %rcx, 0x8(%r12)
leaq 0x20(%rsp), %r15
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
movq %r15, %rdi
callq 0x12e6d
movl $0x8, (%r15)
movq %r12, 0x8(%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x17846
cmpl $-0x14, %eax
jne 0x5875
leaq 0xc8(%rsp), %r14
movq %r14, %rdi
callq 0x12ade
leaq 0x60(%rsp), %rsi
pushq $0x60
popq %rdx
xorl %ebp, %ebp
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x128ed
leaq 0x30(%rsp), %r12
andq $0x0, 0x8(%r12)
movq %rsp, %rax
movq %rax, (%r12)
leaq 0x10(%rsp), %r15
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
movq %r15, %rdi
callq 0x12e6d
movl $0x8, (%r15)
movq %r12, 0x8(%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x17846
cmpl $-0x14, %eax
jne 0x5898
leaq 0xc8(%rsp), %rdi
callq 0x12ade
leaq 0x209b4(%rip), %rdi     # 0x26217
leaq 0x21037(%rip), %rsi     # 0x268a1
xorl %eax, %eax
callq 0x1090
pushq $0x4
jmp 0x58b7
leaq 0x209a6(%rip), %rdi     # 0x26222
leaq 0x2101e(%rip), %rsi     # 0x268a1
movl $0xa69, %edx            # imm = 0xA69
xorl %eax, %eax
callq 0x1090
incw 0x2(%rbx)
pushq $0x1
popq %rbp
jmp 0x58bc
leaq 0x20983(%rip), %rdi     # 0x26222
leaq 0x20ffb(%rip), %rsi     # 0x268a1
movl $0xa7b, %edx            # imm = 0xA7B
xorl %eax, %eax
callq 0x1090
pushq $0x1
popq %rbp
pushq $0x2
popq %rax
incw (%rbx,%rax)
movl %ebp, %eax
addq $0x960, %rsp            # imm = 0x960
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq