// File: /workspace/github_c_makefile_star2_O2/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_decode_query_response_payload
int
kmip_decode_query_response_payload(KMIP *ctx, QueryResponsePayload *value)
{
    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_RESPONSE_PAYLOAD, KMIP_TYPE_STRUCTURE);

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

    if(kmip_is_tag_next(ctx, KMIP_TAG_OPERATION))
    {
        value->operations = ctx->calloc_func(ctx->state, 1, sizeof(Operations));
        CHECK_NEW_MEMORY(ctx, value->operations, sizeof(Operations), "Operations");
        result = kmip_decode_operations(ctx, value->operations);
        CHECK_RESULT(ctx, result);
    }

    if(kmip_is_tag_next(ctx, KMIP_TAG_OBJECT_TYPE))
    {
        value->objects = ctx->calloc_func(ctx->state, 1, sizeof(ObjectTypes));
        CHECK_NEW_MEMORY(ctx, value->objects, sizeof(ObjectTypes), "Object_Types");
        result = kmip_decode_object_types(ctx, value->objects);
        CHECK_RESULT(ctx, result);
    }

    if(kmip_is_tag_next(ctx, KMIP_TAG_VENDOR_IDENTIFICATION))
    {
        value->vendor_identification = ctx->calloc_func(ctx->state, 1, sizeof(TextString));
        CHECK_NEW_MEMORY(ctx, value->vendor_identification, sizeof(TextString), "Vendor Identifier text string");
        result = kmip_decode_text_string(ctx, KMIP_TAG_VENDOR_IDENTIFICATION, (TextString*)value->vendor_identification);
        CHECK_RESULT(ctx, result);
    }

    if(kmip_is_tag_next(ctx, KMIP_TAG_SERVER_INFORMATION))
    {
        value->server_information = ctx->calloc_func(ctx->state, 1, sizeof(ServerInformation));
        CHECK_NEW_MEMORY(ctx, value->server_information, sizeof(ServerInformation), "Server Information");
        result = kmip_decode_server_information(ctx, value->server_information);
        CHECK_RESULT(ctx, result);
    }

    return(KMIP_OK);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
leaq 0x4(%rsp), %r15
andl $0x0, (%r15)
movq %rdi, %rbx
andl $0x0, (%rsp)
movq %r15, %rsi
callq 0x6a80
movl (%r15), %eax
movl %eax, %ecx
andl $0xffffff00, %ecx       # imm = 0xFFFFFF00
cmpl $0x42007c00, %ecx       # imm = 0x42007C00
jne 0x1439e
cmpb $0x1, %al
jne 0x143b6
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 0x143da
leaq 0x4a98(%rip), %rsi      # 0x18e25
movq %rbx, %rdi
movl $0x2c2c, %edx           # imm = 0x2C2C
callq 0x6e80
pushq $-0x2
jmp 0x143cc
leaq 0x4a80(%rip), %rsi      # 0x18e25
movq %rbx, %rdi
movl $0x2c29, %edx           # imm = 0x2C29
callq 0x6e80
pushq $-0x4
jmp 0x143cc
leaq 0x4a68(%rip), %rsi      # 0x18e25
movq %rbx, %rdi
movl $0x2c29, %edx           # imm = 0x2C29
callq 0x6e80
pushq $-0x5
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movl $0x42005c, %esi         # imm = 0x42005C
callq 0x62d0
testl %eax, %eax
je 0x1442f
movq 0x890(%rbx), %rdi
pushq $0x1
popq %rsi
pushq $0x8
popq %rdx
callq *0x868(%rbx)
movq %rax, (%r14)
testq %rax, %rax
je 0x144e2
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6c80
testl %eax, %eax
je 0x1442f
movl %eax, %ebp
leaq 0x4a03(%rip), %rsi      # 0x18e25
movq %rbx, %rdi
movl $0x2c33, %edx           # imm = 0x2C33
jmp 0x144d8
movq %rbx, %rdi
movl $0x420057, %esi         # imm = 0x420057
callq 0x62d0
testl %eax, %eax
je 0x14482
movq 0x890(%rbx), %rdi
pushq $0x1
popq %rsi
pushq $0x8
popq %rdx
callq *0x868(%rbx)
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x1456d
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6760
testl %eax, %eax
je 0x14482
movl %eax, %ebp
leaq 0x49ad(%rip), %rsi      # 0x18e25
movq %rbx, %rdi
movl $0x2c3b, %edx           # imm = 0x2C3B
jmp 0x144d8
movq %rbx, %rdi
movl $0x42009d, %esi         # imm = 0x42009D
callq 0x62d0
testl %eax, %eax
je 0x14508
movq 0x890(%rbx), %rdi
pushq $0x1
popq %rsi
pushq $0x10
popq %rdx
callq *0x868(%rbx)
movq %rax, 0x10(%r14)
testq %rax, %rax
je 0x14590
movq %rbx, %rdi
movl $0x42009d, %esi         # imm = 0x42009D
movq %rax, %rdx
callq 0x6560
testl %eax, %eax
je 0x14508
movl %eax, %ebp
leaq 0x4955(%rip), %rsi      # 0x18e25
movq %rbx, %rdi
movl $0x2c43, %edx           # imm = 0x2C43
callq 0x6e80
jmp 0x143cd
leaq 0x495f(%rip), %rdx      # 0x18e48
pushq $0x8
popq %rsi
movq %rbx, %rdi
callq 0x6c40
leaq 0x492a(%rip), %rsi      # 0x18e25
movq %rbx, %rdi
movl $0x2c31, %edx           # imm = 0x2C31
jmp 0x145d4
movq %rbx, %rdi
movl $0x420088, %esi         # imm = 0x420088
callq 0x62d0
xorl %ebp, %ebp
testl %eax, %eax
je 0x143cd
movq 0x890(%rbx), %rdi
pushq $0x1
popq %rsi
pushq $0x48
popq %rdx
callq *0x868(%rbx)
movq %rax, 0x18(%r14)
testq %rax, %rax
je 0x145b3
movq %rbx, %rdi
movq %rax, %rsi
callq 0x69d0
testl %eax, %eax
je 0x143cd
movl %eax, %r14d
leaq 0x48cd(%rip), %rsi      # 0x18e25
movq %rbx, %rdi
movl $0x2c4b, %edx           # imm = 0x2C4B
callq 0x6e80
movl %r14d, %ebp
jmp 0x143cd
leaq 0x48df(%rip), %rdx      # 0x18e53
pushq $0x8
popq %rsi
movq %rbx, %rdi
callq 0x6c40
leaq 0x489f(%rip), %rsi      # 0x18e25
movq %rbx, %rdi
movl $0x2c39, %edx           # imm = 0x2C39
jmp 0x145d4
leaq 0x48c9(%rip), %rdx      # 0x18e60
pushq $0x10
popq %rsi
movq %rbx, %rdi
callq 0x6c40
leaq 0x487c(%rip), %rsi      # 0x18e25
movq %rbx, %rdi
movl $0x2c41, %edx           # imm = 0x2C41
jmp 0x145d4
leaq 0x48c4(%rip), %rdx      # 0x18e7e
pushq $0x48
popq %rsi
movq %rbx, %rdi
callq 0x6c40
leaq 0x4859(%rip), %rsi      # 0x18e25
movq %rbx, %rdi
movl $0x2c49, %edx           # imm = 0x2C49
callq 0x6e80
pushq $-0xc
jmp 0x143cc