// File: /workspace/github_c_makefile_star2_O1/OpenKMIP[P]libkmip/demos/demo_create.c
// Function: use_low_level_api
int
use_low_level_api(const char *server_address,
                  const char *server_port,
                  const char *client_certificate,
                  const char *client_key,
                  const char *ca_certificate)
{
    /* Set up the TLS connection to the KMIP server. */
    SSL_CTX *ctx = NULL;
    SSL *ssl = NULL;
    OPENSSL_init_ssl(0, NULL);
    ctx = SSL_CTX_new(TLS_client_method());
    
    printf("\n");
    printf("Loading the client certificate: %s\n", client_certificate);
    if(SSL_CTX_use_certificate_file(ctx, client_certificate, SSL_FILETYPE_PEM) != 1)
    {
        fprintf(stderr, "Loading the client certificate failed\n");
        ERR_print_errors_fp(stderr);
        SSL_CTX_free(ctx);
        return(-1);
    }
    
    printf("Loading the client key: %s\n", client_key);
    if(SSL_CTX_use_PrivateKey_file(ctx, client_key, SSL_FILETYPE_PEM) != 1)
    {
        fprintf(stderr, "Loading the client key failed\n");
        ERR_print_errors_fp(stderr);
        SSL_CTX_free(ctx);
        return(-1);
    }
    
    printf("Loading the CA certificate: %s\n", ca_certificate);
    if(SSL_CTX_load_verify_locations(ctx, ca_certificate, NULL) != 1)
    {
        fprintf(stderr, "Loading the CA certificate failed\n");
        ERR_print_errors_fp(stderr);
        SSL_CTX_free(ctx);
        return(-1);
    }
    
    BIO *bio = NULL;
    bio = BIO_new_ssl_connect(ctx);
    if(bio == NULL)
    {
        fprintf(stderr, "BIO_new_ssl_connect failed\n");
        ERR_print_errors_fp(stderr);
        SSL_CTX_free(ctx);
        return(-1);
    }
    
    BIO_get_ssl(bio, &ssl);
    SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY);
    BIO_set_conn_hostname(bio, server_address);
    BIO_set_conn_port(bio, server_port);
    if(BIO_do_connect(bio) != 1)
    {
        fprintf(stderr, "BIO_do_connect failed\n");
        ERR_print_errors_fp(stderr);
        BIO_free_all(bio);
        SSL_CTX_free(ctx);
        return(-1);
    }
    
    printf("\n");
    
    /* Set up the KMIP context and the initial encoding buffer. */
    KMIP kmip_context = {0};
    kmip_init(&kmip_context, NULL, 0, KMIP_1_0);
    
    size_t buffer_blocks = 1;
    size_t buffer_block_size = 1024;
    size_t buffer_total_size = buffer_blocks * buffer_block_size;
    
    uint8 *encoding = kmip_context.calloc_func(kmip_context.state, buffer_blocks, buffer_block_size);
    if(encoding == NULL)
    {
        kmip_destroy(&kmip_context);
        BIO_free_all(bio);
        SSL_CTX_free(ctx);
        return(KMIP_MEMORY_ALLOC_FAILED);
    }
    kmip_set_buffer(&kmip_context, encoding, buffer_total_size);
    
    /* Build the request message. */
    Attribute a[3] = {0};
    for(int i = 0; i < 3; i++)
        kmip_init_attribute(&a[i]);
    
    enum cryptographic_algorithm algorithm = KMIP_CRYPTOALG_AES;
    a[0].type = KMIP_ATTR_CRYPTOGRAPHIC_ALGORITHM;
    a[0].value = &algorithm;
    
    int32 length = 256;
    a[1].type = KMIP_ATTR_CRYPTOGRAPHIC_LENGTH;
    a[1].value = &length;
    
    int32 mask = KMIP_CRYPTOMASK_ENCRYPT | KMIP_CRYPTOMASK_DECRYPT;
    a[2].type = KMIP_ATTR_CRYPTOGRAPHIC_USAGE_MASK;
    a[2].value = &mask;
    
    TemplateAttribute ta = {0};
    ta.attributes = a;
    ta.attribute_count = ARRAY_LENGTH(a);
    
    ProtocolVersion pv = {0};
    kmip_init_protocol_version(&pv, kmip_context.version);
    
    RequestHeader rh = {0};
    kmip_init_request_header(&rh);
    
    rh.protocol_version = &pv;
    rh.maximum_response_size = kmip_context.max_message_size;
    rh.time_stamp = time(NULL);
    rh.batch_count = 1;
    
    CreateRequestPayload crp = {0};
    crp.object_type = KMIP_OBJTYPE_SYMMETRIC_KEY;
    crp.template_attribute = &ta;

    RequestBatchItem rbi = {0};
    kmip_init_request_batch_item(&rbi);
    rbi.operation = KMIP_OP_CREATE;
    rbi.request_payload = &crp;
    
    RequestMessage rm = {0};
    rm.request_header = &rh;
    rm.batch_items = &rbi;
    rm.batch_count = 1;

    /* Encode the request message. Dynamically resize the encoding buffer */
    /* if it's not big enough. Once encoding succeeds, send the request   */
    /* message.                                                           */
    int encode_result = kmip_encode_request_message(&kmip_context, &rm);
    while(encode_result == KMIP_ERROR_BUFFER_FULL)
    {
        kmip_reset(&kmip_context);
        kmip_context.free_func(kmip_context.state, encoding);
        
        buffer_blocks += 1;
        buffer_total_size = buffer_blocks * buffer_block_size;
        
        encoding = kmip_context.calloc_func(kmip_context.state, buffer_blocks, buffer_block_size);
        if(encoding == NULL)
        {
            printf("Failure: Could not automatically enlarge the encoding ");
            printf("buffer for the Create request.\n");

            kmip_destroy(&kmip_context);
            BIO_free_all(bio);
            SSL_CTX_free(ctx);
            return(KMIP_MEMORY_ALLOC_FAILED);
        }
        
        kmip_set_buffer(&kmip_context, encoding, buffer_total_size);
        encode_result = kmip_encode_request_message(&kmip_context, &rm);
    }
    
    if(encode_result != KMIP_OK)
    {
        printf("An error occurred while encoding the Create request.\n");
        printf("Error Code: %d\n", encode_result);
        printf("Error Name: ");
        kmip_print_error_string(stderr, encode_result);
        printf("\n");
        printf("Context Error: %s\n", kmip_context.error_message);
        printf("Stack trace:\n");
        kmip_print_stack_trace(stderr, &kmip_context);

        kmip_free_buffer(&kmip_context, encoding, buffer_total_size);
        encoding = NULL;
        kmip_set_buffer(&kmip_context, NULL, 0);
        kmip_destroy(&kmip_context);
        BIO_free_all(bio);
        SSL_CTX_free(ctx);
        return(encode_result);
    }
    
    kmip_print_request_message(stdout, &rm);
    printf("\n");
    
    char *response = NULL;
    int response_size = 0;
    
    int result = kmip_bio_send_request_encoding(&kmip_context, bio, (char *)encoding, kmip_context.index - kmip_context.buffer, &response, &response_size);
    
    BIO_free_all(bio);
    SSL_CTX_free(ctx);
    
    printf("\n");
    if(result < 0)
    {
        printf("An error occurred while creating the symmetric key.\n");
        printf("Error Code: %d\n", result);
        printf("Error Name: ");
        kmip_print_error_string(stderr, result);
        printf("\n");
        printf("Context Error: %s\n", kmip_context.error_message);
        printf("Stack trace:\n");
        kmip_print_stack_trace(stderr, &kmip_context);
        
        kmip_free_buffer(&kmip_context, encoding, buffer_total_size);
        kmip_free_buffer(&kmip_context, response, response_size);
        encoding = NULL;
        response = NULL;
        kmip_set_buffer(&kmip_context, NULL, 0);
        kmip_destroy(&kmip_context);
        return(result);
    }
    
    kmip_free_buffer(&kmip_context, encoding, buffer_total_size);
    encoding = NULL;
    kmip_set_buffer(&kmip_context, response, response_size);
    
    /* Decode the response message and retrieve the operation results. */
    ResponseMessage resp_m = {0};
    int decode_result = kmip_decode_response_message(&kmip_context, &resp_m);
    if(decode_result != KMIP_OK)
    {
        printf("An error occurred while decoding the Create response.\n");
        printf("Error Code: %d\n", decode_result);
        printf("Error Name: ");
        kmip_print_error_string(stderr, decode_result);
        printf("\n");
        printf("Context Error: %s\n", kmip_context.error_message);
        printf("Stack trace:\n");
        kmip_print_stack_trace(stderr, &kmip_context);

        kmip_free_response_message(&kmip_context, &resp_m);
        kmip_free_buffer(&kmip_context, response, response_size);
        response = NULL;
        kmip_set_buffer(&kmip_context, NULL, 0);
        kmip_destroy(&kmip_context);
        return(decode_result);
    }
    
    kmip_print_response_message(stdout, &resp_m);
    printf("\n");

    if(resp_m.batch_count != 1 || resp_m.batch_items == NULL)
    {
        printf("Expected to find one batch item in the Create response.\n");
        kmip_free_response_message(&kmip_context, &resp_m);
        kmip_free_buffer(&kmip_context, response, response_size);
        response = NULL;
        kmip_set_buffer(&kmip_context, NULL, 0);
        kmip_destroy(&kmip_context);
        return(KMIP_MALFORMED_RESPONSE);
    }
    
    ResponseBatchItem req = resp_m.batch_items[0];
    enum result_status result_status = req.result_status;
    
    printf("The KMIP operation was executed with no errors.\n");
    printf("Result: ");
    kmip_print_result_status_enum(stdout, result);
    printf(" (%d)\n\n", result);
    
    if(result == KMIP_STATUS_SUCCESS)
    {
        CreateResponsePayload *pld = (CreateResponsePayload *)req.response_payload;
        if(pld != NULL)
        {
            TextString *uuid = pld->unique_identifier;
            
            if(uuid != NULL)
                printf("Symmetric Key ID: %.*s\n", (int)uuid->size, uuid->value);
        }
    }
    
    /* Clean up the response message, the response buffer, and the KMIP */
    /* context.                                                         */
    kmip_free_response_message(&kmip_context, &resp_m);
    kmip_free_buffer(&kmip_context, response, response_size);
    response = NULL;
    kmip_set_buffer(&kmip_context, NULL, 0);
    kmip_destroy(&kmip_context);
    
    return(result_status);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x9f8, %rsp            # imm = 0x9F8
movq %r8, %r14
movq %rcx, %rbx
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r12
movq $0x0, 0x28(%rsp)
xorl %edi, %edi
xorl %esi, %esi
callq 0x2120
callq 0x20b0
movq %rax, %rdi
callq 0x21f0
movq %rax, %rbp
movl $0xa, %edi
callq 0x21e0
leaq 0x1e9ab(%rip), %rdi     # 0x2106c
movq %r13, %rsi
xorl %eax, %eax
callq 0x2040
movq %rbp, %rdi
movq %r13, %rsi
movl $0x1, %edx
callq 0x21d0
cmpl $0x1, %eax
jne 0x2c66
leaq 0x1e9cc(%rip), %rdi     # 0x210b7
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2040
movq %rbp, %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0x2030
cmpl $0x1, %eax
jne 0x2d2b
leaq 0x1e9dd(%rip), %rdi     # 0x210f2
movq %r14, %rsi
xorl %eax, %eax
callq 0x2040
movq %rbp, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x21c0
cmpl $0x1, %eax
jne 0x2d35
movq %rbp, %rdi
callq 0x2160
testq %rax, %rax
je 0x2d3f
movq %rax, %r14
leaq 0x28(%rsp), %rbx
movq %rax, %rdi
movl $0x6e, %esi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x2060
movq (%rbx), %rdi
movl $0x4, %edx
movl $0x21, %esi
xorl %ecx, %ecx
callq 0x2070
movq %r14, %rdi
movl $0x64, %esi
xorl %edx, %edx
movq %r12, %rcx
callq 0x2060
movl $0x1, %edx
movq %r14, %rdi
movl $0x64, %esi
movq %r15, %rcx
callq 0x2060
movq %r14, %rdi
movl $0x65, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2060
cmpq $0x1, %rax
jne 0x2d49
movl $0xa, %edi
callq 0x21e0
leaq 0x160(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x20e0
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3877
movq 0x890(%rbx), %rdi
movl $0x1, %esi
movl $0x400, %edx            # imm = 0x400
callq *0x868(%rbx)
testq %rax, %rax
je 0x2b53
movq %rax, %r15
movq %r14, 0x18(%rsp)
movq %rbp, 0x20(%rsp)
leaq 0x160(%rsp), %rdi
movl $0x400, %edx            # imm = 0x400
movq %rax, %rsi
callq 0x3b42
xorps %xmm0, %xmm0
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
xorl %ebx, %ebx
leaq (%rsp,%rbx), %rdi
addq $0x60, %rdi
callq 0x3f89
addq $0x10, %rbx
cmpq $0x30, %rbx
jne 0x283e
movl $0x3, %eax
leaq 0x3c(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x60(%rsp), %rdx
movl %eax, (%rdx)
movq %rcx, 0x8(%rdx)
leaq 0x38(%rsp), %rax
movl $0x100, (%rax)          # imm = 0x100
movl $0x4, 0x10(%rdx)
movq %rax, 0x18(%rdx)
leaq 0x34(%rsp), %rax
movl $0xc, (%rax)
movl $0x6, 0x20(%rdx)
movq %rax, 0x28(%rdx)
xorps %xmm0, %xmm0
leaq 0xf0(%rsp), %r12
movaps %xmm0, 0x10(%r12)
movaps %xmm0, (%r12)
movq %rdx, 0x10(%r12)
movq $0x3, 0x18(%r12)
leaq 0x58(%rsp), %rbx
movq $0x0, (%rbx)
leaq 0x160(%rsp), %r13
movl 0x18(%r13), %esi
movq %rbx, %rdi
callq 0x3f58
leaq 0x110(%rsp), %r14
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%r14)
movaps %xmm0, 0x30(%r14)
movaps %xmm0, 0x20(%r14)
movaps %xmm0, 0x10(%r14)
movaps %xmm0, (%r14)
movq %r14, %rdi
callq 0x3fee
movq %rbx, (%r14)
movl 0x1c(%r13), %eax
movl %eax, 0x8(%r14)
xorl %edi, %edi
callq 0x2130
movq %rax, 0x20(%r14)
movl $0x1, %ebx
movl %ebx, 0x28(%r14)
leaq 0xd0(%rsp), %rbp
xorps %xmm0, %xmm0
movaps %xmm0, (%rbp)
movaps %xmm0, 0x10(%rbp)
movl $0x2, (%rbp)
movq %r12, 0x8(%rbp)
leaq 0xb0(%rsp), %r12
movaps %xmm0, 0x10(%r12)
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x4048
movl %ebx, (%r12)
movq %rbp, 0x10(%r12)
leaq 0x90(%rsp), %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rbx)
movq %r14, (%rbx)
movq %r12, 0x8(%rbx)
movq $0x1, 0x10(%rbx)
movq %r13, %rdi
movq %rbx, %rsi
callq 0xbf1b
movl %eax, %ebp
movl $0x400, %r12d           # imm = 0x400
movl $0x2, %r14d
cmpl $-0x2, %ebp
jne 0x2a07
movq %r13, %rdi
callq 0x3a89
movq 0x9f0(%rsp), %rdi
movq %r15, %rsi
callq *0x9d8(%rsp)
movq 0x9f0(%rsp), %rdi
movl $0x400, %edx            # imm = 0x400
movq %r14, %rsi
callq *0x9c8(%rsp)
testq %rax, %rax
je 0x2c21
movq %rax, %r15
addq $0x400, %r12            # imm = 0x400
movq %r13, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x3b42
movq %r13, %rdi
movq %rbx, %rsi
callq 0xbf1b
movl %eax, %ebp
incq %r14
jmp 0x299e
testl %ebp, %ebp
jne 0x2b70
movq 0x2b5aa(%rip), %r14     # 0x2dfc0
movq (%r14), %rdi
leaq 0x90(%rsp), %rsi
callq 0x1dd5c
movl $0xa, %edi
callq 0x21e0
leaq 0x10(%rsp), %r8
movq $0x0, (%r8)
leaq 0xc(%rsp), %r9
movl $0x0, (%r9)
leaq 0x160(%rsp), %rdi
movl 0x8(%rdi), %ecx
subl (%rdi), %ecx
movq 0x18(%rsp), %rbx
movq %rbx, %rsi
movq %r15, %rdx
callq 0x20117
movl %eax, %ebp
movq %rbx, %rdi
callq 0x2080
movq 0x20(%rsp), %rdi
callq 0x2050
movl $0xa, %edi
callq 0x21e0
testl %ebp, %ebp
js 0x2c73
leaq 0x160(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x4062
movq 0x10(%rsp), %rsi
movslq 0xc(%rsp), %rdx
movq %rbx, %rdi
callq 0x3b42
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %rsi
movaps %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
movq %rbx, %rdi
callq 0x18f35
testl %eax, %eax
je 0x2d5e
movl %eax, %ebx
leaq 0x1e872(%rip), %rdi     # 0x21351
callq 0x2210
leaq 0x1e6b4(%rip), %rdi     # 0x2119f
movl %ebx, %esi
xorl %eax, %eax
callq 0x2040
leaq 0x1e6b4(%rip), %rdi     # 0x211af
xorl %eax, %eax
callq 0x2040
movq 0x2b4cf(%rip), %r15     # 0x2dfd8
movq (%r15), %rdi
movl %ebx, %esi
callq 0x1a2a4
movl $0xa, %edi
callq 0x21e0
leaq 0x160(%rsp), %r14
movq 0x28(%r14), %rsi
leaq 0x1e68c(%rip), %rdi     # 0x211bc
xorl %eax, %eax
callq 0x2040
leaq 0x1e8b2(%rip), %rdi     # 0x213f0
callq 0x2210
movq (%r15), %rdi
movq %r14, %rsi
callq 0x1a252
jmp 0x2e40
leaq 0x160(%rsp), %rdi
callq 0x3b53
movq %r14, %rdi
callq 0x2080
movq %rbp, %rdi
jmp 0x2c57
leaq 0x1e844(%rip), %rdi     # 0x213bb
callq 0x2210
leaq 0x1e61c(%rip), %rdi     # 0x2119f
movl %ebp, %esi
xorl %eax, %eax
callq 0x2040
leaq 0x1e61c(%rip), %rdi     # 0x211af
xorl %eax, %eax
callq 0x2040
movq 0x2b437(%rip), %r14     # 0x2dfd8
movq (%r14), %rdi
movl %ebp, %esi
callq 0x1a2a4
movl $0xa, %edi
callq 0x21e0
leaq 0x160(%rsp), %rbx
movq 0x28(%rbx), %rsi
leaq 0x1e5f4(%rip), %rdi     # 0x211bc
xorl %eax, %eax
callq 0x2040
leaq 0x1e81a(%rip), %rdi     # 0x213f0
callq 0x2210
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x1a252
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x4062
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3b42
movq %rbx, %rdi
callq 0x3b53
movq 0x18(%rsp), %rdi
callq 0x2080
movq 0x20(%rsp), %rdi
callq 0x2050
jmp 0x2e86
leaq 0x1e540(%rip), %rdi     # 0x21168
xorl %eax, %eax
callq 0x2040
leaq 0x1e7c7(%rip), %rdi     # 0x213fd
callq 0x2210
leaq 0x160(%rsp), %rdi
callq 0x3b53
movq 0x18(%rsp), %rdi
callq 0x2080
movq 0x20(%rsp), %rdi
callq 0x2050
movl $0xfffffff4, %ebp       # imm = 0xFFFFFFF4
jmp 0x2e86
movq %rbp, %rdi
callq 0x2260
jmp 0x2d54
leaq 0x1e70d(%rip), %rdi     # 0x21387
callq 0x2210
leaq 0x1e519(%rip), %rdi     # 0x2119f
movl %ebp, %esi
xorl %eax, %eax
callq 0x2040
leaq 0x1e519(%rip), %rdi     # 0x211af
xorl %eax, %eax
callq 0x2040
movq 0x2b334(%rip), %r14     # 0x2dfd8
movq (%r14), %rdi
movl %ebp, %esi
callq 0x1a2a4
movl $0xa, %edi
callq 0x21e0
leaq 0x160(%rsp), %rbx
movq 0x28(%rbx), %rsi
leaq 0x1e4f1(%rip), %rdi     # 0x211bc
xorl %eax, %eax
callq 0x2040
leaq 0x1e717(%rip), %rdi     # 0x213f0
callq 0x2210
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x1a252
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x4062
movq 0x10(%rsp), %rsi
movslq 0xc(%rsp), %rdx
movq %rbx, %rdi
callq 0x4062
movq $0x0, 0x10(%rsp)
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3b42
movq %rbx, %rdi
callq 0x3b53
jmp 0x2e86
movq %rbp, %rdi
callq 0x229a
jmp 0x2d54
movq %rbp, %rdi
callq 0x22d4
jmp 0x2d54
movq %rbp, %rdi
callq 0x2353
jmp 0x2d54
movq %r14, %rdi
movq %rbp, %rsi
callq 0x230e
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x2e86
movq (%r14), %rdi
leaq 0x40(%rsp), %rbx
movq %rbx, %rsi
callq 0x1ddeb
movl $0xa, %edi
callq 0x21e0
movq 0x8(%rbx), %rax
cmpq $0x1, 0x10(%rbx)
setne %cl
testq %rax, %rax
sete %dl
orb %cl, %dl
cmpb $0x1, %dl
jne 0x2dd7
leaq 0x1e581(%rip), %rdi     # 0x21319
callq 0x2210
leaq 0x160(%rsp), %rbx
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
callq 0x57fe
movq 0x10(%rsp), %rsi
movslq 0xc(%rsp), %rdx
movq %rbx, %rdi
callq 0x4062
movq $0x0, 0x10(%rsp)
movl $0xfffffff1, %ebx       # imm = 0xFFFFFFF1
jmp 0x2e68
movl 0x10(%rax), %ebx
movq 0x28(%rax), %r15
leaq 0x1e504(%rip), %rdi     # 0x212e9
callq 0x2210
leaq 0x1e3de(%rip), %rdi     # 0x211cf
xorl %eax, %eax
callq 0x2040
movq (%r14), %rdi
movl %ebp, %esi
callq 0x1a76f
leaq 0x1e3cf(%rip), %rdi     # 0x211d8
movl %ebp, %esi
xorl %eax, %eax
callq 0x2040
testl %ebp, %ebp
jne 0x2e38
testq %r15, %r15
je 0x2e38
movq 0x8(%r15), %rax
testq %rax, %rax
je 0x2e38
movl 0x8(%rax), %esi
movq (%rax), %rdx
leaq 0x1e3af(%rip), %rdi     # 0x211e0
xorl %eax, %eax
callq 0x2040
leaq 0x160(%rsp), %r14
leaq 0x40(%rsp), %rsi
movq %r14, %rdi
callq 0x57fe
movq 0x10(%rsp), %rsi
movslq 0xc(%rsp), %rdx
movq %r14, %rdi
callq 0x4062
movq $0x0, 0x10(%rsp)
leaq 0x160(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3b42
movq %r14, %rdi
callq 0x3b53
movl %ebx, %ebp
movl %ebp, %eax
addq $0x9f8, %rsp            # imm = 0x9F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq