// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_free_response_header
void
kmip_free_response_header(KMIP *ctx, ResponseHeader *value)
{
    if(value != NULL)
    {
        if(value->protocol_version != NULL)
        {
            ctx->memset_func(
                value->protocol_version,
                0,
                sizeof(ProtocolVersion));
            ctx->free_func(ctx->state, value->protocol_version);
            value->protocol_version = NULL;
        }
        
        if(value->nonce != NULL)
        {
            kmip_free_nonce(ctx, value->nonce);
            ctx->free_func(ctx->state, value->nonce);
            value->nonce = NULL;
        }

        if(value->server_hashed_password != NULL)
        {
            kmip_free_byte_string(ctx, value->server_hashed_password);
            ctx->free_func(ctx->state, value->server_hashed_password);
            value->server_hashed_password = NULL;
        }

        if(value->attestation_types != NULL)
        {
            ctx->memset_func(
                value->attestation_types,
                0,
                value->attestation_type_count * sizeof(enum attestation_type));
            ctx->free_func(ctx->state, value->attestation_types);
            value->attestation_types = NULL;
        }
        
        value->attestation_type_count = 0;
        
        if(value->client_correlation_value != NULL)
        {
            kmip_free_text_string(ctx, value->client_correlation_value);
            ctx->free_func(ctx->state, value->client_correlation_value);
            value->client_correlation_value = NULL;
        }
        
        if(value->server_correlation_value != NULL)
        {
            kmip_free_text_string(ctx, value->server_correlation_value);
            ctx->free_func(ctx->state, value->server_correlation_value);
            value->server_correlation_value = NULL;
        }
        
        kmip_init_response_header(value);
    }
    
    return;
}

// Assembly:
testq %rsi, %rsi
je 0x9733
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x95fd
movl $0x8, %edx
xorl %esi, %esi
callq *0x888(%r14)
movq 0x890(%r14), %rdi
movq (%rbx), %rsi
callq *0x878(%r14)
movq $0x0, (%rbx)
leaq 0x18(%rbx), %r15
movq 0x18(%rbx), %rsi
testq %rsi, %rsi
je 0x962a
movq %r14, %rdi
callq 0x62d0
movq 0x890(%r14), %rdi
movq (%r15), %rsi
callq *0x878(%r14)
movq $0x0, (%r15)
movq 0x40(%rbx), %r12
testq %r12, %r12
je 0x9685
movq (%r12), %rdi
movq %r12, %rsi
testq %rdi, %rdi
je 0x966b
movq 0x8(%r12), %rdx
xorl %esi, %esi
callq *0x888(%r14)
movq 0x890(%r14), %rdi
movq (%r12), %rsi
callq *0x878(%r14)
movq $0x0, (%r12)
movq 0x40(%rbx), %rsi
xorl %r13d, %r13d
movq %r13, 0x8(%r12)
movq 0x890(%r14), %rdi
callq *0x878(%r14)
movq %r13, 0x40(%rbx)
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x96b9
movq 0x28(%rbx), %rdx
shlq $0x2, %rdx
xorl %esi, %esi
callq *0x888(%r14)
movq 0x890(%r14), %rdi
movq 0x20(%rbx), %rsi
callq *0x878(%r14)
movq $0x0, 0x20(%rbx)
movq $0x0, 0x28(%rbx)
movq 0x30(%rbx), %rsi
testq %rsi, %rsi
je 0x96ec
movq %r14, %rdi
callq 0x6330
movq 0x890(%r14), %rdi
movq 0x30(%rbx), %rsi
callq *0x878(%r14)
movq $0x0, 0x30(%rbx)
movq 0x38(%rbx), %rsi
testq %rsi, %rsi
je 0x970f
movq %r14, %rdi
callq 0x6330
movq 0x890(%r14), %rdi
movq 0x38(%rbx), %rsi
callq *0x878(%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movl $0xffffffff, 0x10(%rbx) # imm = 0xFFFFFFFF
movups %xmm0, 0x20(%r15)
movups %xmm0, 0x10(%r15)
movups %xmm0, (%r15)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq