// File: /workspace/github_c_makefile_star2_O1/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_decode_enum
int
kmip_decode_enum(KMIP *ctx, enum tag t, void *value)
{
    CHECK_BUFFER_FULL(ctx, 16);
    
    int32 tag_type = 0;
    uint32 length = 0;
    int32 *v = (int32*)value;
    int32 padding = 0;
    
    kmip_decode_int32_be(ctx, &tag_type);
    CHECK_TAG_TYPE(ctx, tag_type, t, KMIP_TYPE_ENUMERATION);
    
    kmip_decode_length(ctx, &length);
    CHECK_LENGTH(ctx, length, 4);
    
    kmip_decode_int32_be(ctx, v);
    
    kmip_decode_int32_be(ctx, &padding);
    CHECK_PADDING(ctx, padding);
    
    return(KMIP_OK);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x10(%rdi), %rax
subq 0x8(%rdi), %rax
addq (%rdi), %rax
cmpq $0xf, %rax
ja 0x10938
leaq 0x38(%rbx), %rdi
xorl %r14d, %r14d
cmpl $0x0, 0x64(%rdi,%r14)
je 0x109d6
addq $0x68, %r14
cmpq $0x820, %r14            # imm = 0x820
jne 0x1091a
jmp 0x109fd
movq %rdx, %r14
movl %esi, %ebp
xorl %eax, %eax
leaq 0x14(%rsp), %r15
movl %eax, (%r15)
movl %eax, 0x10(%rsp)
movl %eax, 0xc(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6a10
movl (%r15), %eax
movl %eax, %ecx
sarl $0x8, %ecx
cmpl %ebp, %ecx
jne 0x10a07
cmpb $0x5, %al
jne 0x10a56
leaq 0x10(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x64b0
cmpl $0x4, (%r15)
jne 0x10aa2
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6a10
leaq 0xc(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6a10
cmpl $0x0, (%r14)
je 0x10aee
leaq 0x38(%rbx), %rdi
xorl %r14d, %r14d
cmpl $0x0, 0x64(%rdi,%r14)
je 0x10af2
addq $0x68, %r14
cmpq $0x820, %r14            # imm = 0x820
jne 0x109b8
jmp 0x10b19
addq %r14, %rdi
movq %rdi, 0x860(%rbx)
leaq 0xf3dd(%rip), %rsi      # 0x1fdc4
movl $0x63, %edx
callq 0x66f0
movl $0x2172, 0x9c(%rbx,%r14) # imm = 0x2172
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
jmp 0x10b1e
leaq 0x38(%rbx), %rdi
xorl %r14d, %r14d
cmpl $0x0, 0x64(%rdi,%r14)
je 0x10a25
addq $0x68, %r14
cmpq $0x820, %r14            # imm = 0x820
jne 0x10a0e
jmp 0x10a4c
addq %r14, %rdi
movq %rdi, 0x860(%rbx)
leaq 0xf38e(%rip), %rsi      # 0x1fdc4
movl $0x63, %edx
callq 0x66f0
movl $0x217a, 0x9c(%rbx,%r14) # imm = 0x217A
movl $0xfffffffc, %eax       # imm = 0xFFFFFFFC
jmp 0x10b1e
leaq 0x38(%rbx), %rdi
xorl %r14d, %r14d
cmpl $0x0, 0x64(%rdi,%r14)
je 0x10a74
addq $0x68, %r14
cmpq $0x820, %r14            # imm = 0x820
jne 0x10a5d
jmp 0x10a9b
addq %r14, %rdi
movq %rdi, 0x860(%rbx)
leaq 0xf33f(%rip), %rsi      # 0x1fdc4
movl $0x63, %edx
callq 0x66f0
movl $0x217a, 0x9c(%rbx,%r14) # imm = 0x217A
movl $0xfffffffb, %eax       # imm = 0xFFFFFFFB
jmp 0x10b1e
leaq 0x38(%rbx), %rdi
xorl %r14d, %r14d
cmpl $0x0, 0x64(%rdi,%r14)
je 0x10ac0
addq $0x68, %r14
cmpq $0x820, %r14            # imm = 0x820
jne 0x10aa9
jmp 0x10ae7
addq %r14, %rdi
movq %rdi, 0x860(%rbx)
leaq 0xf2f3(%rip), %rsi      # 0x1fdc4
movl $0x63, %edx
callq 0x66f0
movl $0x217d, 0x9c(%rbx,%r14) # imm = 0x217D
movl $0xfffffffa, %eax       # imm = 0xFFFFFFFA
jmp 0x10b1e
xorl %eax, %eax
jmp 0x10b1e
addq %r14, %rdi
movq %rdi, 0x860(%rbx)
leaq 0xf2c1(%rip), %rsi      # 0x1fdc4
movl $0x63, %edx
callq 0x66f0
movl $0x2182, 0x9c(%rbx,%r14) # imm = 0x2182
movl $0xfffffff9, %eax       # imm = 0xFFFFFFF9
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq