// File: /workspace/github_c_makefile_star2_O0/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_decode_key_wrapping_specification
int
kmip_decode_key_wrapping_specification(KMIP *ctx, KeyWrappingSpecification *value)
{
    CHECK_BUFFER_FULL(ctx, 8);
    
    int result = 0;
    int32 tag_type = 0;
    uint32 length = 0;
    
    kmip_decode_int32_be(ctx, &tag_type);
    CHECK_TAG_TYPE(ctx, tag_type, KMIP_TAG_KEY_WRAPPING_SPECIFICATION, KMIP_TYPE_STRUCTURE);
    
    kmip_decode_length(ctx, &length);
    CHECK_BUFFER_FULL(ctx, length);
    
    result = kmip_decode_enum(ctx, KMIP_TAG_WRAPPING_METHOD, &value->wrapping_method);
    CHECK_RESULT(ctx, result);
    CHECK_ENUM(ctx, KMIP_TAG_WRAPPING_METHOD, value->wrapping_method);
    
    if(kmip_is_tag_next(ctx, KMIP_TAG_ENCRYPTION_KEY_INFORMATION))
    {
        value->encryption_key_info = ctx->calloc_func(ctx->state, 1, sizeof(EncryptionKeyInformation));
        CHECK_NEW_MEMORY(ctx, value->encryption_key_info, sizeof(EncryptionKeyInformation), "EncryptionKeyInformation structure");
        result = kmip_decode_encryption_key_information(ctx, value->encryption_key_info);
        CHECK_RESULT(ctx, result);
    }
    
    if(kmip_is_tag_next(ctx, KMIP_TAG_MAC_SIGNATURE_KEY_INFORMATION))
    {
        value->mac_signature_key_info = ctx->calloc_func(ctx->state, 1, sizeof(MACSignatureKeyInformation));
        CHECK_NEW_MEMORY(ctx, value->mac_signature_key_info, sizeof(MACSignatureKeyInformation), "MACSignatureKeyInformation structure");
        result = kmip_decode_mac_signature_key_information(ctx, value->mac_signature_key_info);
        CHECK_RESULT(ctx, result);
    }
    
    value->attribute_name_count = kmip_get_num_items_next(ctx, KMIP_TAG_ATTRIBUTE_NAME);
    if(value->attribute_name_count > 0)
    {
        value->attribute_names = ctx->calloc_func(ctx->state, value->attribute_name_count, sizeof(TextString));
        CHECK_NEW_MEMORY(ctx, value->attribute_names, value->attribute_name_count * sizeof(TextString), "sequence of AttributeName text strings");
        
        for(size_t i = 0; i < value->attribute_name_count; i++)
        {
            result = kmip_decode_text_string(ctx, KMIP_TAG_ATTRIBUTE_NAME, &value->attribute_names[i]);
            CHECK_RESULT(ctx, result);
        }
    }
    
    if(ctx->version >= KMIP_1_1)
    {
        result = kmip_decode_enum(ctx, KMIP_TAG_ENCODING_OPTION, &value->encoding_option);
        CHECK_RESULT(ctx, result);
        CHECK_ENUM(ctx, KMIP_TAG_ENCODING_OPTION, value->encoding_option);
    }
    
    return(KMIP_OK);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x10(%rbp), %rdx
movq (%rdx), %rdx
subq %rdx, %rcx
subq %rcx, %rax
cmpq $0x8, %rax
jae 0x1d2a4
movq -0x10(%rbp), %rdi
leaq 0x87be(%rip), %rsi      # 0x25a4c
movl $0x2711, %edx           # imm = 0x2711
callq 0x6f20
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x1d764
jmp 0x1d2a6
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x6b10
movl -0x20(%rbp), %eax
sarl $0x8, %eax
cmpl $0x420047, %eax         # imm = 0x420047
je 0x1d2f6
movq -0x10(%rbp), %rdi
leaq 0x876c(%rip), %rsi      # 0x25a4c
movl $0x2718, %edx           # imm = 0x2718
callq 0x6f20
movl $0xfffffffc, -0x4(%rbp) # imm = 0xFFFFFFFC
jmp 0x1d764
movl -0x20(%rbp), %eax
andl $0xff, %eax
cmpl $0x1, %eax
je 0x1d324
movq -0x10(%rbp), %rdi
leaq 0x873e(%rip), %rsi      # 0x25a4c
movl $0x2718, %edx           # imm = 0x2718
callq 0x6f20
movl $0xfffffffb, -0x4(%rbp) # imm = 0xFFFFFFFB
jmp 0x1d764
jmp 0x1d326
jmp 0x1d328
movq -0x10(%rbp), %rdi
leaq -0x24(%rbp), %rsi
callq 0x6520
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x10(%rbp), %rdx
movq (%rdx), %rdx
subq %rdx, %rcx
subq %rcx, %rax
movl -0x24(%rbp), %ecx
cmpq %rcx, %rax
jae 0x1d37b
movq -0x10(%rbp), %rdi
leaq 0x86e7(%rip), %rsi      # 0x25a4c
movl $0x271b, %edx           # imm = 0x271B
callq 0x6f20
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x1d764
jmp 0x1d37d
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movl $0x42009e, %esi         # imm = 0x42009E
callq 0x6c00
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x1d3b8
movq -0x10(%rbp), %rdi
leaq 0x86a9(%rip), %rsi      # 0x25a4c
movl $0x271e, %edx           # imm = 0x271E
callq 0x6f20
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1d764
jmp 0x1d3ba
jmp 0x1d3bc
movq -0x10(%rbp), %rax
movl 0x18(%rax), %edi
movq -0x18(%rbp), %rax
movl (%rax), %edx
movl $0x42009e, %esi         # imm = 0x42009E
callq 0x63a0
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
je 0x1d413
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl (%rax), %edx
movl -0x28(%rbp), %ecx
movl $0x42009e, %esi         # imm = 0x42009E
callq 0x6140
movq -0x10(%rbp), %rdi
leaq 0x864e(%rip), %rsi      # 0x25a4c
movl $0x271f, %edx           # imm = 0x271F
callq 0x6f20
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1d764
jmp 0x1d415
movq -0x10(%rbp), %rdi
movl $0x420036, %esi         # imm = 0x420036
callq 0x6300
cmpl $0x0, %eax
je 0x1d4da
movq -0x10(%rbp), %rax
movq 0x868(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x890(%rcx), %rdi
movl $0x1, %esi
movl $0x10, %edx
callq *%rax
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x1d49a
movq -0x10(%rbp), %rdi
movl $0x10, %esi
leaq 0x84a4(%rip), %rdx      # 0x25918
callq 0x6cd0
movq -0x10(%rbp), %rdi
leaq 0x85c8(%rip), %rsi      # 0x25a4c
movl $0x2724, %edx           # imm = 0x2724
callq 0x6f20
movl $0xfffffff4, -0x4(%rbp) # imm = 0xFFFFFFF4
jmp 0x1d764
jmp 0x1d49c
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x6100
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x1d4d6
movq -0x10(%rbp), %rdi
leaq 0x858b(%rip), %rsi      # 0x25a4c
movl $0x2726, %edx           # imm = 0x2726
callq 0x6f20
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1d764
jmp 0x1d4d8
jmp 0x1d4da
movq -0x10(%rbp), %rdi
movl $0x42004e, %esi         # imm = 0x42004E
callq 0x6300
cmpl $0x0, %eax
je 0x1d59f
movq -0x10(%rbp), %rax
movq 0x868(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x890(%rcx), %rdi
movl $0x1, %esi
movl $0x10, %edx
callq *%rax
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x1d55f
movq -0x10(%rbp), %rdi
movl $0x10, %esi
leaq 0x853a(%rip), %rdx      # 0x25a73
callq 0x6cd0
movq -0x10(%rbp), %rdi
leaq 0x8503(%rip), %rsi      # 0x25a4c
movl $0x272c, %edx           # imm = 0x272C
callq 0x6f20
movl $0xfffffff4, -0x4(%rbp) # imm = 0xFFFFFFF4
jmp 0x1d764
jmp 0x1d561
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x63f0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x1d59b
movq -0x10(%rbp), %rdi
leaq 0x84c6(%rip), %rsi      # 0x25a4c
movl $0x272e, %edx           # imm = 0x272E
callq 0x6f20
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1d764
jmp 0x1d59d
jmp 0x1d59f
movq -0x10(%rbp), %rdi
movl $0x42000a, %esi         # imm = 0x42000A
callq 0x6340
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jbe 0x1d6b5
movq -0x10(%rbp), %rax
movq 0x868(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x890(%rcx), %rdi
movq -0x18(%rbp), %rcx
movq 0x20(%rcx), %rsi
movl $0x10, %edx
callq *%rax
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x1d63f
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rsi
shlq $0x4, %rsi
leaq 0x847f(%rip), %rdx      # 0x25a98
callq 0x6cd0
movq -0x10(%rbp), %rdi
leaq 0x8423(%rip), %rsi      # 0x25a4c
movl $0x2735, %edx           # imm = 0x2735
callq 0x6f20
movl $0xfffffff4, -0x4(%rbp) # imm = 0xFFFFFFF4
jmp 0x1d764
jmp 0x1d641
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jae 0x1d6b3
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdx
movq -0x30(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdx
movl $0x42000a, %esi         # imm = 0x42000A
callq 0x65b0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x1d6a1
movq -0x10(%rbp), %rdi
leaq 0x83c0(%rip), %rsi      # 0x25a4c
movl $0x273a, %edx           # imm = 0x273A
callq 0x6f20
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1d764
jmp 0x1d6a3
jmp 0x1d6a5
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x1d649
jmp 0x1d6b5
movq -0x10(%rbp), %rax
cmpl $0x1, 0x18(%rax)
jb 0x1d75d
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
addq $0x28, %rdx
movl $0x4200a3, %esi         # imm = 0x4200A3
callq 0x6c00
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x1d6ff
movq -0x10(%rbp), %rdi
leaq 0x835f(%rip), %rsi      # 0x25a4c
movl $0x2741, %edx           # imm = 0x2741
callq 0x6f20
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1d764
jmp 0x1d701
jmp 0x1d703
movq -0x10(%rbp), %rax
movl 0x18(%rax), %edi
movq -0x18(%rbp), %rax
movl 0x28(%rax), %edx
movl $0x4200a3, %esi         # imm = 0x4200A3
callq 0x63a0
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
je 0x1d759
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x28(%rax), %edx
movl -0x34(%rbp), %ecx
movl $0x4200a3, %esi         # imm = 0x4200A3
callq 0x6140
movq -0x10(%rbp), %rdi
leaq 0x8305(%rip), %rsi      # 0x25a4c
movl $0x2742, %edx           # imm = 0x2742
callq 0x6f20
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1d764
jmp 0x1d75b
jmp 0x1d75d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)