// File: /workspace/github_c_makefile_star2_O0/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_decode_key_wrapping_data
int
kmip_decode_key_wrapping_data(KMIP *ctx, KeyWrappingData *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_DATA, 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), "MAC/SignatureKeyInformation structure");
        
        result = kmip_decode_mac_signature_key_information(ctx, value->mac_signature_key_info);
        CHECK_RESULT(ctx, result);
    }
    
    if(kmip_is_tag_next(ctx, KMIP_TAG_MAC_SIGNATURE))
    {
        value->mac_signature = ctx->calloc_func(ctx->state, 1, sizeof(ByteString));
        CHECK_NEW_MEMORY(ctx, value->mac_signature, sizeof(ByteString), "MAC/Signature byte string");
        
        result = kmip_decode_byte_string(ctx, KMIP_TAG_MAC_SIGNATURE, value->mac_signature);
        CHECK_RESULT(ctx, result);
    }
    
    if(kmip_is_tag_next(ctx, KMIP_TAG_IV_COUNTER_NONCE))
    {
        value->iv_counter_nonce = ctx->calloc_func(ctx->state, 1, sizeof(ByteString));
        CHECK_NEW_MEMORY(ctx, value->iv_counter_nonce, sizeof(ByteString), "IV/Counter/Nonce byte string");
        
        result = kmip_decode_byte_string(ctx, KMIP_TAG_IV_COUNTER_NONCE, value->iv_counter_nonce);
        CHECK_RESULT(ctx, result);
    }
    
    if(ctx->version >= KMIP_1_1)
    {
        if(kmip_is_tag_next(ctx, KMIP_TAG_ENCODING_OPTION))
        {
            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 $0x30, %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 0x1c174
movq -0x10(%rbp), %rdi
leaq 0x979c(%rip), %rsi      # 0x258fa
movl $0x2640, %edx           # imm = 0x2640
callq 0x6f20
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x1c6cb
jmp 0x1c176
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 $0x420046, %eax         # imm = 0x420046
je 0x1c1c6
movq -0x10(%rbp), %rdi
leaq 0x974a(%rip), %rsi      # 0x258fa
movl $0x2647, %edx           # imm = 0x2647
callq 0x6f20
movl $0xfffffffc, -0x4(%rbp) # imm = 0xFFFFFFFC
jmp 0x1c6cb
movl -0x20(%rbp), %eax
andl $0xff, %eax
cmpl $0x1, %eax
je 0x1c1f4
movq -0x10(%rbp), %rdi
leaq 0x971c(%rip), %rsi      # 0x258fa
movl $0x2647, %edx           # imm = 0x2647
callq 0x6f20
movl $0xfffffffb, -0x4(%rbp) # imm = 0xFFFFFFFB
jmp 0x1c6cb
jmp 0x1c1f6
jmp 0x1c1f8
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 0x1c24b
movq -0x10(%rbp), %rdi
leaq 0x96c5(%rip), %rsi      # 0x258fa
movl $0x264a, %edx           # imm = 0x264A
callq 0x6f20
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x1c6cb
jmp 0x1c24d
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movl $0x42009e, %esi         # imm = 0x42009E
callq 0x6c00
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x1c288
movq -0x10(%rbp), %rdi
leaq 0x9687(%rip), %rsi      # 0x258fa
movl $0x264d, %edx           # imm = 0x264D
callq 0x6f20
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1c6cb
jmp 0x1c28a
jmp 0x1c28c
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 0x1c2e3
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 0x962c(%rip), %rsi      # 0x258fa
movl $0x264e, %edx           # imm = 0x264E
callq 0x6f20
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1c6cb
jmp 0x1c2e5
movq -0x10(%rbp), %rdi
movl $0x420036, %esi         # imm = 0x420036
callq 0x6300
cmpl $0x0, %eax
je 0x1c3aa
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 0x1c36a
movq -0x10(%rbp), %rdi
movl $0x10, %esi
leaq 0x95d4(%rip), %rdx      # 0x25918
callq 0x6cd0
movq -0x10(%rbp), %rdi
leaq 0x95a6(%rip), %rsi      # 0x258fa
movl $0x2653, %edx           # imm = 0x2653
callq 0x6f20
movl $0xfffffff4, -0x4(%rbp) # imm = 0xFFFFFFF4
jmp 0x1c6cb
jmp 0x1c36c
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x6100
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x1c3a6
movq -0x10(%rbp), %rdi
leaq 0x9569(%rip), %rsi      # 0x258fa
movl $0x2656, %edx           # imm = 0x2656
callq 0x6f20
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1c6cb
jmp 0x1c3a8
jmp 0x1c3aa
movq -0x10(%rbp), %rdi
movl $0x42004e, %esi         # imm = 0x42004E
callq 0x6300
cmpl $0x0, %eax
je 0x1c46f
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 0x1c42f
movq -0x10(%rbp), %rdi
movl $0x10, %esi
leaq 0x9532(%rip), %rdx      # 0x2593b
callq 0x6cd0
movq -0x10(%rbp), %rdi
leaq 0x94e1(%rip), %rsi      # 0x258fa
movl $0x265c, %edx           # imm = 0x265C
callq 0x6f20
movl $0xfffffff4, -0x4(%rbp) # imm = 0xFFFFFFF4
jmp 0x1c6cb
jmp 0x1c431
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x63f0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x1c46b
movq -0x10(%rbp), %rdi
leaq 0x94a4(%rip), %rsi      # 0x258fa
movl $0x265f, %edx           # imm = 0x265F
callq 0x6f20
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1c6cb
jmp 0x1c46d
jmp 0x1c46f
movq -0x10(%rbp), %rdi
movl $0x42004d, %esi         # imm = 0x42004D
callq 0x6300
cmpl $0x0, %eax
je 0x1c539
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, 0x18(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x1c4f4
movq -0x10(%rbp), %rdi
movl $0x10, %esi
leaq 0x9493(%rip), %rdx      # 0x25961
callq 0x6cd0
movq -0x10(%rbp), %rdi
leaq 0x941c(%rip), %rsi      # 0x258fa
movl $0x2665, %edx           # imm = 0x2665
callq 0x6f20
movl $0xfffffff4, -0x4(%rbp) # imm = 0xFFFFFFF4
jmp 0x1c6cb
jmp 0x1c4f6
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdx
movl $0x42004d, %esi         # imm = 0x42004D
callq 0x6df0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x1c535
movq -0x10(%rbp), %rdi
leaq 0x93da(%rip), %rsi      # 0x258fa
movl $0x2668, %edx           # imm = 0x2668
callq 0x6f20
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1c6cb
jmp 0x1c537
jmp 0x1c539
movq -0x10(%rbp), %rdi
movl $0x42003d, %esi         # imm = 0x42003D
callq 0x6300
cmpl $0x0, %eax
je 0x1c603
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, 0x20(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x1c5be
movq -0x10(%rbp), %rdi
movl $0x10, %esi
leaq 0x93e3(%rip), %rdx      # 0x2597b
callq 0x6cd0
movq -0x10(%rbp), %rdi
leaq 0x9352(%rip), %rsi      # 0x258fa
movl $0x266e, %edx           # imm = 0x266E
callq 0x6f20
movl $0xfffffff4, -0x4(%rbp) # imm = 0xFFFFFFF4
jmp 0x1c6cb
jmp 0x1c5c0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdx
movl $0x42003d, %esi         # imm = 0x42003D
callq 0x6df0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x1c5ff
movq -0x10(%rbp), %rdi
leaq 0x9310(%rip), %rsi      # 0x258fa
movl $0x2671, %edx           # imm = 0x2671
callq 0x6f20
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1c6cb
jmp 0x1c601
jmp 0x1c603
movq -0x10(%rbp), %rax
cmpl $0x1, 0x18(%rax)
jb 0x1c6c4
movq -0x10(%rbp), %rdi
movl $0x4200a3, %esi         # imm = 0x4200A3
callq 0x6300
cmpl $0x0, %eax
je 0x1c6c2
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 0x1c664
movq -0x10(%rbp), %rdi
leaq 0x92a8(%rip), %rsi      # 0x258fa
movl $0x2679, %edx           # imm = 0x2679
callq 0x6f20
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1c6cb
jmp 0x1c666
jmp 0x1c668
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, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x1c6be
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x28(%rax), %edx
movl -0x2c(%rbp), %ecx
movl $0x4200a3, %esi         # imm = 0x4200A3
callq 0x6140
movq -0x10(%rbp), %rdi
leaq 0x924e(%rip), %rsi      # 0x258fa
movl $0x267a, %edx           # imm = 0x267A
callq 0x6f20
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1c6cb
jmp 0x1c6c0
jmp 0x1c6c2
jmp 0x1c6c4
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)