// File: /workspace/github_c_makefile_star2_O0/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_free_request_header
void
kmip_free_request_header(KMIP *ctx, RequestHeader *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->authentication != NULL)
        {
            kmip_free_authentication(ctx, value->authentication);
            ctx->free_func(ctx->state, value->authentication);
            value->authentication = 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_request_header(value);
    }
    
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xb231
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0xb0ea
movq -0x8(%rbp), %rax
movq 0x888(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq *%rax
movq -0x8(%rbp), %rax
movq 0x878(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x890(%rcx), %rdi
movq -0x10(%rbp), %rcx
movq (%rcx), %rsi
callq *%rax
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0xb132
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x60c0
movq -0x8(%rbp), %rax
movq 0x878(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x890(%rcx), %rdi
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rsi
callq *%rax
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0xb198
movq -0x8(%rbp), %rax
movq 0x888(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rdi
movq -0x10(%rbp), %rcx
movq 0x38(%rcx), %rdx
shlq $0x2, %rdx
xorl %esi, %esi
callq *%rax
movq -0x8(%rbp), %rax
movq 0x878(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x890(%rcx), %rdi
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rsi
callq *%rax
movq -0x10(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0xb1e0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rsi
callq 0x6380
movq -0x8(%rbp), %rax
movq 0x878(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x890(%rcx), %rdi
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rsi
callq *%rax
movq -0x10(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0xb228
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rsi
callq 0x6380
movq -0x8(%rbp), %rax
movq 0x878(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x890(%rcx), %rdi
movq -0x10(%rbp), %rcx
movq 0x48(%rcx), %rsi
callq *%rax
movq -0x10(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x10(%rbp), %rdi
callq 0x6870
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)