// File: /workspace/github_c_makefile_star2_O2/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 0x8fda
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x8eea
pushq $0x8
popq %rdx
xorl %esi, %esi
callq *0x888(%r14)
movq 0x890(%r14), %rdi
movq (%rbx), %rsi
callq *0x878(%r14)
andq $0x0, (%rbx)
leaq 0x18(%rbx), %r15
movq 0x18(%rbx), %rsi
testq %rsi, %rsi
je 0x8f14
movq %r14, %rdi
callq 0x62f0
movq 0x890(%r14), %rdi
movq (%r15), %rsi
callq *0x878(%r14)
andq $0x0, (%r15)
movq 0x40(%rbx), %rsi
testq %rsi, %rsi
je 0x8f3c
movq %r14, %rdi
callq 0x6100
movq 0x890(%r14), %rdi
movq 0x40(%rbx), %rsi
callq *0x878(%r14)
andq $0x0, 0x40(%rbx)
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x8f6d
movq 0x28(%rbx), %rdx
shlq $0x2, %rdx
xorl %esi, %esi
callq *0x888(%r14)
movq 0x890(%r14), %rdi
movq 0x20(%rbx), %rsi
callq *0x878(%r14)
andq $0x0, 0x20(%rbx)
andq $0x0, 0x28(%rbx)
movq 0x30(%rbx), %rsi
testq %rsi, %rsi
je 0x8f9a
movq %r14, %rdi
callq 0x6350
movq 0x890(%r14), %rdi
movq 0x30(%rbx), %rsi
callq *0x878(%r14)
andq $0x0, 0x30(%rbx)
movq 0x38(%rbx), %rsi
testq %rsi, %rsi
je 0x8fbd
movq %r14, %rdi
callq 0x6350
movq 0x890(%r14), %rdi
movq 0x38(%rbx), %rsi
callq *0x878(%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
orl $-0x1, 0x10(%rbx)
movups %xmm0, 0x20(%r15)
movups %xmm0, 0x10(%r15)
movups %xmm0, (%r15)
popq %rbx
popq %r14
popq %r15
retq