// File: /workspace/github_c_makefile_star2_O1/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_copy_query_result
void
kmip_copy_query_result(QueryResponse* query_result, QueryResponsePayload *pld)
{
    if(pld != NULL)
    {
        kmip_copy_operations(query_result->operations, &query_result->operations_size, pld->operations, MAX_QUERY_OPS);
        kmip_copy_objects(query_result->objects, &query_result->objects_size, pld->objects, MAX_QUERY_OBJS);

        if(pld->vendor_identification)
        {
            kmip_copy_textstring(query_result->vendor_identification, pld->vendor_identification, sizeof(query_result->vendor_identification)-1);
        }

        if(pld->server_information)
        {
            ServerInformation* srv = pld->server_information;
            query_result->server_information_valid = 1;
            kmip_copy_textstring(query_result->server_name, srv->server_name, MAX_QUERY_LEN-1);
            kmip_copy_textstring(query_result->server_serial_number, srv->server_serial_number, MAX_QUERY_LEN-1);
            kmip_copy_textstring(query_result->server_version, srv->server_version, MAX_QUERY_LEN-1);
            kmip_copy_textstring(query_result->server_load, srv->server_load, MAX_QUERY_LEN-1);
            kmip_copy_textstring(query_result->product_name, srv->product_name, MAX_QUERY_LEN-1);
            kmip_copy_textstring(query_result->build_level, srv->build_level, MAX_QUERY_LEN-1);
            kmip_copy_textstring(query_result->build_date, srv->build_date, MAX_QUERY_LEN-1);
        }
    }
}

// Assembly:
testq %rsi, %rsi
je 0xa2b4
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
testq %rax, %rax
je 0xa069
movq (%rax), %rax
testq %rax, %rax
je 0xa069
movq 0x10(%rax), %rcx
movq %rcx, (%rbx)
movq (%rax), %rax
testq %rax, %rax
je 0xa069
xorl %ecx, %ecx
movq 0x10(%rax), %rdx
movl (%rdx), %edx
movl %edx, 0x8(%rbx,%rcx,4)
cmpq $0x3e, %rcx
ja 0xa069
incq %rcx
movq (%rax), %rax
testq %rax, %rax
jne 0xa04e
movq 0x8(%r14), %rax
testq %rax, %rax
je 0xa0ad
movq (%rax), %rax
testq %rax, %rax
je 0xa0ad
movq 0x10(%rax), %rcx
movq %rcx, 0x108(%rbx)
movq (%rax), %rax
testq %rax, %rax
je 0xa0ad
xorl %ecx, %ecx
movq 0x10(%rax), %rdx
movl (%rdx), %edx
movl %edx, 0x110(%rbx,%rcx,4)
cmpq $0x1e, %rcx
ja 0xa0ad
incq %rcx
movq (%rax), %rax
testq %rax, %rax
jne 0xa08f
movq 0x10(%r14), %rax
testq %rax, %rax
je 0xa0e9
leaq 0x190(%rbx), %r15
movq (%rax), %rsi
testq %rsi, %rsi
je 0xa0e5
movq 0x8(%rax), %rax
cmpq $0x7f, %rax
movl $0x7f, %r12d
cmovbq %rax, %r12
movq %r15, %rdi
movq %r12, %rdx
callq 0x66f0
addq %r12, %r15
movb $0x0, (%r15)
movq 0x18(%r14), %r12
testq %r12, %r12
je 0xa2a9
movl $0x1, 0x210(%rbx)
leaq 0x214(%rbx), %r14
movq (%r12), %rax
testq %rax, %rax
je 0xa138
movq (%rax), %rsi
testq %rsi, %rsi
je 0xa138
movq 0x8(%rax), %rax
cmpq $0x7f, %rax
movl $0x7f, %r15d
cmovbq %rax, %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x66f0
addq %r15, %r14
movb $0x0, (%r14)
leaq 0x294(%rbx), %r14
movq 0x8(%r12), %rax
testq %rax, %rax
je 0xa175
movq (%rax), %rsi
testq %rsi, %rsi
je 0xa175
movq 0x8(%rax), %rax
cmpq $0x7f, %rax
movl $0x7f, %r15d
cmovbq %rax, %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x66f0
addq %r15, %r14
movb $0x0, (%r14)
leaq 0x314(%rbx), %r14
movq 0x10(%r12), %rax
testq %rax, %rax
je 0xa1b2
movq (%rax), %rsi
testq %rsi, %rsi
je 0xa1b2
movq 0x8(%rax), %rax
cmpq $0x7f, %rax
movl $0x7f, %r15d
cmovbq %rax, %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x66f0
addq %r15, %r14
movb $0x0, (%r14)
leaq 0x394(%rbx), %r14
movq 0x18(%r12), %rax
testq %rax, %rax
je 0xa1ef
movq (%rax), %rsi
testq %rsi, %rsi
je 0xa1ef
movq 0x8(%rax), %rax
cmpq $0x7f, %rax
movl $0x7f, %r15d
cmovbq %rax, %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x66f0
addq %r15, %r14
movb $0x0, (%r14)
leaq 0x414(%rbx), %r14
movq 0x20(%r12), %rax
testq %rax, %rax
je 0xa22c
movq (%rax), %rsi
testq %rsi, %rsi
je 0xa22c
movq 0x8(%rax), %rax
cmpq $0x7f, %rax
movl $0x7f, %r15d
cmovbq %rax, %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x66f0
addq %r15, %r14
movb $0x0, (%r14)
leaq 0x494(%rbx), %r14
movq 0x28(%r12), %rax
testq %rax, %rax
je 0xa269
movq (%rax), %rsi
testq %rsi, %rsi
je 0xa269
movq 0x8(%rax), %rax
cmpq $0x7f, %rax
movl $0x7f, %r15d
cmovbq %rax, %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x66f0
addq %r15, %r14
movb $0x0, (%r14)
addq $0x514, %rbx            # imm = 0x514
movq 0x30(%r12), %rax
testq %rax, %rax
je 0xa2a6
movq (%rax), %rsi
testq %rsi, %rsi
je 0xa2a6
movq 0x8(%rax), %rax
cmpq $0x7f, %rax
movl $0x7f, %r14d
cmovbq %rax, %r14
movq %rbx, %rdi
movq %r14, %rdx
callq 0x66f0
addq %r14, %rbx
movb $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq