// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x970, %rsp            # imm = 0x970
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movw (%rax), %cx
addw $0x1, %cx
movw %cx, (%rax)
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
movl $0x60, %edx
callq 0x1090
leaq -0x908(%rbp), %rdi
xorl %esi, %esi
movl $0x898, %edx            # imm = 0x898
callq 0x1090
leaq -0x70(%rbp), %rsi
leaq -0x908(%rbp), %rdi
movl $0x60, %edx
xorl %ecx, %ecx
callq 0x1c6e0
leaq -0x918(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq 0x37777(%rip), %rax     # 0x3f788
movq %rax, -0x918(%rbp)
movq $0x3, -0x910(%rbp)
leaq -0x928(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq 0x3774f(%rip), %rax     # 0x3f78c
movq %rax, -0x928(%rbp)
movq $0xf, -0x920(%rbp)
leaq -0x938(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x928(%rbp), %rax
movq %rax, -0x930(%rbp)
leaq -0x948(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x948(%rbp), %rdi
callq 0x1d330
movl $0x8, -0x948(%rbp)
leaq -0x938(%rbp), %rax
movq %rax, -0x940(%rbp)
leaq -0x908(%rbp), %rdi
leaq -0x948(%rbp), %rsi
callq 0x26910
movl %eax, -0x94c(%rbp)
cmpl $-0x14, -0x94c(%rbp)
je 0x8101
jmp 0x80cb
leaq 0x36fe3(%rip), %rdi     # 0x3f0b5
leaq 0x376fa(%rip), %rsi     # 0x3f7d3
movl $0xa69, %edx            # imm = 0xA69
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 0x820b
leaq -0x908(%rbp), %rdi
callq 0x1cab0
leaq -0x70(%rbp), %rsi
leaq -0x908(%rbp), %rdi
movl $0x60, %edx
xorl %ecx, %ecx
callq 0x1c6e0
leaq -0x960(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x918(%rbp), %rax
movq %rax, -0x960(%rbp)
leaq -0x970(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x970(%rbp), %rdi
callq 0x1d330
movl $0x8, -0x970(%rbp)
leaq -0x960(%rbp), %rax
movq %rax, -0x968(%rbp)
leaq -0x908(%rbp), %rdi
leaq -0x970(%rbp), %rsi
callq 0x26910
movl %eax, -0x94c(%rbp)
cmpl $-0x14, -0x94c(%rbp)
je 0x81d3
jmp 0x81a0
leaq 0x36f0e(%rip), %rdi     # 0x3f0b5
leaq 0x37625(%rip), %rsi     # 0x3f7d3
movl $0xa7b, %edx            # imm = 0xA7B
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 0x820b
leaq -0x908(%rbp), %rdi
callq 0x1cab0
leaq 0x36e65(%rip), %rdi     # 0x3f04b
leaq 0x375e6(%rip), %rsi     # 0x3f7d3
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 $0x970, %rsp            # imm = 0x970
popq %rbp
retq
nopw (%rax,%rax)