// File: /workspace/github_c_makefile_star2_O2/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_decode_server_information
int
kmip_decode_server_information(KMIP *ctx, ServerInformation *value)
{
    CHECK_BUFFER_FULL(ctx, 8);

    int result = 0;
    int32 tag_type = 0;
    uint32 length = 0;

    kmip_decode_int32_be(ctx, &tag_type);
    CHECK_TAG_TYPE(ctx, tag_type, KMIP_TAG_SERVER_INFORMATION, KMIP_TYPE_STRUCTURE);

    kmip_decode_int32_be(ctx, &length);
    CHECK_BUFFER_FULL(ctx, length);

    if(kmip_is_tag_next(ctx, KMIP_TAG_SERVER_NAME))
    {
        value->server_name = ctx->calloc_func(ctx->state, 1, sizeof(TextString));
        CHECK_NEW_MEMORY(ctx, value->server_name, sizeof(TextString), "ServerName text string");

        result = kmip_decode_text_string(ctx, KMIP_TAG_SERVER_NAME, value->server_name);
        CHECK_RESULT(ctx, result);
    }

    if(kmip_is_tag_next(ctx, KMIP_TAG_SERVER_SERIAL_NUMBER))
    {
        value->server_serial_number = ctx->calloc_func(ctx->state, 1, sizeof(TextString));
        CHECK_NEW_MEMORY(ctx, value->server_serial_number, sizeof(TextString), "ServerSerialNumber text string");

        result = kmip_decode_text_string(ctx, KMIP_TAG_SERVER_SERIAL_NUMBER, value->server_serial_number);
        CHECK_RESULT(ctx, result);
    }

    if(kmip_is_tag_next(ctx, KMIP_TAG_SERVER_VERSION))
    {
        value->server_version = ctx->calloc_func(ctx->state, 1, sizeof(TextString));
        CHECK_NEW_MEMORY(ctx, value->server_version, sizeof(TextString), "ServerVersion text string");

        result = kmip_decode_text_string(ctx, KMIP_TAG_SERVER_VERSION, value->server_version);
        CHECK_RESULT(ctx, result);
    }

    if(kmip_is_tag_next(ctx, KMIP_TAG_SERVER_LOAD))
    {
        value->server_load = ctx->calloc_func(ctx->state, 1, sizeof(TextString));
        CHECK_NEW_MEMORY(ctx, value->server_load, sizeof(TextString), "ServerLoad text string");

        result = kmip_decode_text_string(ctx, KMIP_TAG_SERVER_LOAD, value->server_load);
        CHECK_RESULT(ctx, result);
    }


    if(kmip_is_tag_next(ctx, KMIP_TAG_PRODUCT_NAME))
    {
        value->product_name = ctx->calloc_func(ctx->state, 1, sizeof(TextString));
        CHECK_NEW_MEMORY(ctx, value->product_name, sizeof(TextString), "ProductName text string");

        result = kmip_decode_text_string(ctx, KMIP_TAG_PRODUCT_NAME, value->product_name);
        CHECK_RESULT(ctx, result);
    }

    if(kmip_is_tag_next(ctx, KMIP_TAG_BUILD_LEVEL))
    {
        value->build_level = ctx->calloc_func(ctx->state, 1, sizeof(TextString));
        CHECK_NEW_MEMORY(ctx, value->build_level, sizeof(TextString), "BuildLevel text string");

        result = kmip_decode_text_string(ctx, KMIP_TAG_BUILD_LEVEL, value->build_level);
        CHECK_RESULT(ctx, result);
    }

    if(kmip_is_tag_next(ctx, KMIP_TAG_BUILD_DATE))
    {
        value->build_date = ctx->calloc_func(ctx->state, 1, sizeof(TextString));
        CHECK_NEW_MEMORY(ctx, value->build_date, sizeof(TextString), "BuildDate text string");

        result = kmip_decode_text_string(ctx, KMIP_TAG_BUILD_DATE, value->build_date);
        CHECK_RESULT(ctx, result);
    }

    if(kmip_is_tag_next(ctx, KMIP_TAG_CLUSTER_INFO))
    {
        value->cluster_info = ctx->calloc_func(ctx->state, 1, sizeof(TextString));
        CHECK_NEW_MEMORY(ctx, value->cluster_info, sizeof(TextString), "ClusterInfo text string");

        result = kmip_decode_text_string(ctx, KMIP_TAG_CLUSTER_INFO, value->cluster_info);
        CHECK_RESULT(ctx, result);
    }

    if(kmip_is_tag_next(ctx, KMIP_TAG_ALTERNATE_FAILOVER_ENDPOINTS))
    {
        value->alternative_failover_endpoints= ctx->calloc_func(ctx->state, 1, sizeof(AltEndpoints));
        CHECK_NEW_MEMORY(ctx, value->alternative_failover_endpoints, sizeof(AltEndpoints), "Alt Endpoints");
        result = kmip_decode_alternative_endpoints(ctx, value->alternative_failover_endpoints);
        CHECK_RESULT(ctx, result);
    }

    return(KMIP_OK);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rax
subq 0x8(%rdi), %rax
addq (%rdi), %rax
cmpq $0x7, %rax
ja 0x162a1
leaq 0x2aa5(%rip), %rsi      # 0x18d34
movq %rbx, %rdi
movl $0x2bc0, %edx           # imm = 0x2BC0
callq 0x6e80
pushq $-0x2
popq %rbp
jmp 0x16319
movq %rsi, %r14
leaq 0x4(%rsp), %r15
andl $0x0, (%r15)
andl $0x0, (%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6a80
movl (%r15), %eax
movl %eax, %ecx
andl $0xffffff00, %ecx       # imm = 0xFFFFFF00
movl $0x2bc7, %edx           # imm = 0x2BC7
cmpl $0x42008800, %ecx       # imm = 0x42008800
jne 0x16303
cmpb $0x1, %al
jne 0x16307
movq %rsp, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6a80
movq 0x10(%rbx), %rax
subq 0x8(%rbx), %rax
addq (%rbx), %rax
movl (%r15), %ecx
cmpq %rcx, %rax
jae 0x16326
pushq $-0x2
popq %rbp
movl $0x2bca, %edx           # imm = 0x2BCA
jmp 0x1630a
pushq $-0x4
jmp 0x16309
pushq $-0x5
popq %rbp
leaq 0x2a23(%rip), %rsi      # 0x18d34
movq %rbx, %rdi
callq 0x6e80
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movl $0x42012d, %esi         # imm = 0x42012D
callq 0x62d0
testl %eax, %eax
je 0x16373
movq 0x890(%rbx), %rdi
pushq $0x1
popq %rsi
pushq $0x10
popq %rdx
callq *0x868(%rbx)
movq %rax, (%r14)
testq %rax, %rax
je 0x16415
movq %rbx, %rdi
movl $0x42012d, %esi         # imm = 0x42012D
movq %rax, %rdx
callq 0x6560
testl %eax, %eax
je 0x16373
movl %eax, %ebp
movl $0x2bd2, %edx           # imm = 0x2BD2
jmp 0x1630a
movq %rbx, %rdi
movl $0x42012e, %esi         # imm = 0x42012E
callq 0x62d0
testl %eax, %eax
je 0x163c4
movq 0x890(%rbx), %rdi
pushq $0x1
popq %rsi
pushq $0x10
popq %rdx
callq *0x868(%rbx)
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x16485
movq %rbx, %rdi
movl $0x42012e, %esi         # imm = 0x42012E
movq %rax, %rdx
callq 0x6560
testl %eax, %eax
je 0x163c4
movl %eax, %ebp
movl $0x2bdb, %edx           # imm = 0x2BDB
jmp 0x1630a
movq %rbx, %rdi
movl $0x42012f, %esi         # imm = 0x42012F
callq 0x62d0
testl %eax, %eax
je 0x16434
movq 0x890(%rbx), %rdi
pushq $0x1
popq %rsi
pushq $0x10
popq %rdx
callq *0x868(%rbx)
movq %rax, 0x10(%r14)
testq %rax, %rax
je 0x164f5
movq %rbx, %rdi
movl $0x42012f, %esi         # imm = 0x42012F
movq %rax, %rdx
callq 0x6560
testl %eax, %eax
je 0x16434
movl %eax, %ebp
movl $0x2be4, %edx           # imm = 0x2BE4
jmp 0x1630a
leaq 0x2937(%rip), %rdx      # 0x18d53
pushq $0x10
popq %rsi
movq %rbx, %rdi
callq 0x6c40
pushq $-0xc
popq %rbp
movl $0x2bcf, %edx           # imm = 0x2BCF
jmp 0x1630a
movq %rbx, %rdi
movl $0x420130, %esi         # imm = 0x420130
callq 0x62d0
testl %eax, %eax
je 0x164a4
movq 0x890(%rbx), %rdi
pushq $0x1
popq %rsi
pushq $0x10
popq %rdx
callq *0x868(%rbx)
movq %rax, 0x18(%r14)
testq %rax, %rax
je 0x16565
movq %rbx, %rdi
movl $0x420130, %esi         # imm = 0x420130
movq %rax, %rdx
callq 0x6560
testl %eax, %eax
je 0x164a4
movl %eax, %ebp
movl $0x2bed, %edx           # imm = 0x2BED
jmp 0x1630a
leaq 0x28de(%rip), %rdx      # 0x18d6a
pushq $0x10
popq %rsi
movq %rbx, %rdi
callq 0x6c40
pushq $-0xc
popq %rbp
movl $0x2bd8, %edx           # imm = 0x2BD8
jmp 0x1630a
movq %rbx, %rdi
movl $0x420131, %esi         # imm = 0x420131
callq 0x62d0
testl %eax, %eax
je 0x16514
movq 0x890(%rbx), %rdi
pushq $0x1
popq %rsi
pushq $0x10
popq %rdx
callq *0x868(%rbx)
movq %rax, 0x20(%r14)
testq %rax, %rax
je 0x165d5
movq %rbx, %rdi
movl $0x420131, %esi         # imm = 0x420131
movq %rax, %rdx
callq 0x6560
testl %eax, %eax
je 0x16514
movl %eax, %ebp
movl $0x2bf7, %edx           # imm = 0x2BF7
jmp 0x1630a
leaq 0x288d(%rip), %rdx      # 0x18d89
pushq $0x10
popq %rsi
movq %rbx, %rdi
callq 0x6c40
pushq $-0xc
popq %rbp
movl $0x2be1, %edx           # imm = 0x2BE1
jmp 0x1630a
movq %rbx, %rdi
movl $0x420132, %esi         # imm = 0x420132
callq 0x62d0
testl %eax, %eax
je 0x16584
movq 0x890(%rbx), %rdi
pushq $0x1
popq %rsi
pushq $0x10
popq %rdx
callq *0x868(%rbx)
movq %rax, 0x28(%r14)
testq %rax, %rax
je 0x16645
movq %rbx, %rdi
movl $0x420132, %esi         # imm = 0x420132
movq %rax, %rdx
callq 0x6560
testl %eax, %eax
je 0x16584
movl %eax, %ebp
movl $0x2c00, %edx           # imm = 0x2C00
jmp 0x1630a
leaq 0x2837(%rip), %rdx      # 0x18da3
pushq $0x10
popq %rsi
movq %rbx, %rdi
callq 0x6c40
pushq $-0xc
popq %rbp
movl $0x2bea, %edx           # imm = 0x2BEA
jmp 0x1630a
movq %rbx, %rdi
movl $0x420133, %esi         # imm = 0x420133
callq 0x62d0
testl %eax, %eax
je 0x165f4
movq 0x890(%rbx), %rdi
pushq $0x1
popq %rsi
pushq $0x10
popq %rdx
callq *0x868(%rbx)
movq %rax, 0x30(%r14)
testq %rax, %rax
je 0x166b6
movq %rbx, %rdi
movl $0x420133, %esi         # imm = 0x420133
movq %rax, %rdx
callq 0x6560
testl %eax, %eax
je 0x165f4
movl %eax, %ebp
movl $0x2c09, %edx           # imm = 0x2C09
jmp 0x1630a
leaq 0x27de(%rip), %rdx      # 0x18dba
pushq $0x10
popq %rsi
movq %rbx, %rdi
callq 0x6c40
pushq $-0xc
popq %rbp
movl $0x2bf4, %edx           # imm = 0x2BF4
jmp 0x1630a
movq %rbx, %rdi
movl $0x420134, %esi         # imm = 0x420134
callq 0x62d0
testl %eax, %eax
je 0x16664
movq 0x890(%rbx), %rdi
pushq $0x1
popq %rsi
pushq $0x10
popq %rdx
callq *0x868(%rbx)
movq %rax, 0x38(%r14)
testq %rax, %rax
je 0x166d5
movq %rbx, %rdi
movl $0x420134, %esi         # imm = 0x420134
movq %rax, %rdx
callq 0x6560
testl %eax, %eax
je 0x16664
movl %eax, %ebp
movl $0x2c12, %edx           # imm = 0x2C12
jmp 0x1630a
leaq 0x2786(%rip), %rdx      # 0x18dd2
pushq $0x10
popq %rsi
movq %rbx, %rdi
callq 0x6c40
pushq $-0xc
popq %rbp
movl $0x2bfd, %edx           # imm = 0x2BFD
jmp 0x1630a
movq %rbx, %rdi
movl $0x420135, %esi         # imm = 0x420135
callq 0x62d0
xorl %ebp, %ebp
testl %eax, %eax
je 0x16319
movq 0x890(%rbx), %rdi
pushq $0x1
popq %rsi
pushq $0x8
popq %rdx
callq *0x868(%rbx)
movq %rax, 0x40(%r14)
testq %rax, %rax
je 0x166f4
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6bd0
testl %eax, %eax
je 0x16319
movl $0x2c1a, %edx           # imm = 0x2C1A
movl %eax, %ebp
jmp 0x1630a
leaq 0x272c(%rip), %rdx      # 0x18de9
pushq $0x10
popq %rsi
movq %rbx, %rdi
callq 0x6c40
pushq $-0xc
popq %rbp
movl $0x2c06, %edx           # imm = 0x2C06
jmp 0x1630a
leaq 0x2723(%rip), %rdx      # 0x18dff
pushq $0x10
popq %rsi
movq %rbx, %rdi
callq 0x6c40
pushq $-0xc
popq %rbp
movl $0x2c0f, %edx           # imm = 0x2C0F
jmp 0x1630a
leaq 0x271c(%rip), %rdx      # 0x18e17
pushq $0x8
popq %rsi
movq %rbx, %rdi
callq 0x6c40
pushq $-0xc
popq %rbp
movl $0x2c18, %edx           # imm = 0x2C18
jmp 0x1630a
nop