// File: /workspace/github_c_makefile_star2_O3/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 0x13177
leaq 0x27e3c(%rip), %rax     # 0x2d856
movq %rax, (%rsp)
movq $0x3, 0x8(%rsp)
leaq 0x27e2c(%rip), %rax     # 0x2d85a
leaq 0x50(%rsp), %rcx
movq %rax, (%rcx)
movq $0xf, 0x8(%rcx)
leaq 0x40(%rsp), %r12
movq $0x0, (%r12)
movq %rcx, 0x8(%r12)
leaq 0x20(%rsp), %r15
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
movq %r15, %rdi
callq 0x1388b
movl $0x8, (%r15)
movq %r12, 0x8(%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x18d26
cmpl $-0x14, %eax
jne 0x5b16
leaq 0xc8(%rsp), %r14
movq %r14, %rdi
callq 0x13455
leaq 0x60(%rsp), %rsi
xorl %ebp, %ebp
movl $0x60, %edx
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x13177
leaq 0x30(%rsp), %r12
movq $0x0, 0x8(%r12)
movq %rsp, %rax
movq %rax, (%r12)
leaq 0x10(%rsp), %r15
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
movq %r15, %rdi
callq 0x1388b
movl $0x8, (%r15)
movq %r12, 0x8(%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x18d26
cmpl $-0x14, %eax
jne 0x5b3b
leaq 0xc8(%rsp), %rdi
callq 0x13455
leaq 0x27716(%rip), %rdi     # 0x2d217
leaq 0x27d99(%rip), %rsi     # 0x2d8a1
xorl %eax, %eax
callq 0x1090
movl $0x4, %eax
jmp 0x5b5f
leaq 0x27705(%rip), %rdi     # 0x2d222
leaq 0x27d7d(%rip), %rsi     # 0x2d8a1
movl $0xa69, %edx            # imm = 0xA69
xorl %eax, %eax
callq 0x1090
incw 0x2(%rbx)
movl $0x1, %ebp
jmp 0x5b63
leaq 0x276e0(%rip), %rdi     # 0x2d222
leaq 0x27d58(%rip), %rsi     # 0x2d8a1
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