// File: /workspace/github_c_makefile_star2_O1/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_decode_attribute_name
int
kmip_decode_attribute_name(KMIP *ctx, enum attribute_type *value)
{
    int result = 0;
    enum tag t = KMIP_TAG_ATTRIBUTE_NAME;
    TextString n = {0};
    
    result = kmip_decode_text_string(ctx, t, &n);
    CHECK_RESULT(ctx, result);
    
    if((n.size == 32) && (strncmp(n.value, "Application Specific Information", 32) == 0))
    {
        *value = KMIP_ATTR_APPLICATION_SPECIFIC_INFORMATION;
    }
    else if((n.size == 17) && (strncmp(n.value, "Unique Identifier", 17) == 0))
    {
        *value = KMIP_ATTR_UNIQUE_IDENTIFIER;
    }
    else if((n.size == 4) && (strncmp(n.value, "Name", 4) == 0))
    {
        *value = KMIP_ATTR_NAME;
    }
    else if((n.size == 11) && (strncmp(n.value, "Object Type", 11) == 0))
    {
        *value = KMIP_ATTR_OBJECT_TYPE;
    }
    else if((n.size == 23) && (strncmp(n.value, "Cryptographic Algorithm", 23) == 0))
    {
        *value = KMIP_ATTR_CRYPTOGRAPHIC_ALGORITHM;
    }
    else if((n.size == 20) && (strncmp(n.value, "Cryptographic Length", 20) == 0))
    {
        *value = KMIP_ATTR_CRYPTOGRAPHIC_LENGTH;
    }
    else if((n.size == 21) && (strncmp(n.value, "Operation Policy Name", 21) == 0))
    {
        *value = KMIP_ATTR_OPERATION_POLICY_NAME;
    }
    else if((n.size == 24) && (strncmp(n.value, "Cryptographic Usage Mask", 24) == 0))
    {
        *value = KMIP_ATTR_CRYPTOGRAPHIC_USAGE_MASK;
    }
    else if((n.size == 5) && (strncmp(n.value, "State", 5) == 0))
    {
        *value = KMIP_ATTR_STATE;
    }
    else if((n.size == 12) && (strncmp(n.value, "Object Group", 12) == 0))
    {
        *value = KMIP_ATTR_OBJECT_GROUP;
    }
    else if((n.size == 15) && (strncmp(n.value, "Activation Date", 15) == 0))
    {
        *value = KMIP_ATTR_ACTIVATION_DATE;
    }
    else if((n.size == 17) && (strncmp(n.value, "Deactivation Date", 17) == 0))
    {
        *value = KMIP_ATTR_DEACTIVATION_DATE;
    }
    else if((18 == n.size) && (strncmp(n.value, "Process Start Date", 18) == 0))
    {
        *value = KMIP_ATTR_PROCESS_START_DATE;
    }
    else if((17 == n.size) && (strncmp(n.value, "Protect Stop Date", 17) == 0))
    {
        *value = KMIP_ATTR_PROTECT_STOP_DATE;
    }
    else if((24 == n.size) && (strncmp(n.value, "Cryptographic Parameters", 24) == 0))
    {
        *value = KMIP_ATTR_CRYPTOGRAPHIC_PARAMETERS;
    }
    /* TODO (ph) Add all remaining attributes here. */
    else
    {
        kmip_push_error_frame(ctx, __func__, __LINE__);
        kmip_free_text_string(ctx, &n);
        return(KMIP_ERROR_ATTR_UNSUPPORTED);
    }
    
    kmip_free_text_string(ctx, &n);
    return(KMIP_OK);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %rdx
movaps %xmm0, (%rdx)
movl $0x42000a, %esi         # imm = 0x42000A
callq 0x6540
testl %eax, %eax
je 0x11974
movl %eax, %ebp
leaq 0xfc33(%rip), %rsi      # 0x21595
movq %rbx, %rdi
movl $0x2232, %edx           # imm = 0x2232
callq 0x6de0
jmp 0x11c97
movq 0x8(%rsp), %r14
cmpq $0x20, %r14
jne 0x1199c
movq (%rsp), %rdi
leaq 0xf657(%rip), %rsi      # 0x20fe1
movl $0x20, %edx
callq 0x60e0
testl %eax, %eax
je 0x11a3e
cmpq $0x11, %r14
jne 0x119bf
movq (%rsp), %rdi
leaq 0xf5b4(%rip), %rsi      # 0x20f61
movl $0x11, %edx
callq 0x60e0
testl %eax, %eax
je 0x11a48
cmpq $0x13, %r14
jle 0x11a0b
cmpq $0x14, %r14
je 0x11a82
cmpq $0x15, %r14
je 0x11aa5
cmpq $0x17, %r14
jne 0x11ac2
movq (%rsp), %rdi
leaq 0xf591(%rip), %rsi      # 0x20f7f
movl $0x17, %edx
callq 0x60e0
testl %eax, %eax
je 0x11c18
cmpq $0x15, %r14
jne 0x11a7c
jmp 0x11aa5
cmpq $0x4, %r14
je 0x11a4f
cmpq $0xb, %r14
jne 0x11ac2
movq (%rsp), %rdi
leaq 0xf54d(%rip), %rsi      # 0x20f73
movl $0xb, %edx
callq 0x60e0
testl %eax, %eax
jne 0x119c5
movl $0x2, %eax
jmp 0x11c55
movl $0x8, %eax
jmp 0x11c55
xorl %eax, %eax
jmp 0x11c55
movq (%rsp), %rdi
leaq 0xf563(%rip), %rsi      # 0x20fbd
movl $0x4, %edx
callq 0x60e0
testl %eax, %eax
je 0x11c26
cmpq $0x14, %r14
jg 0x119cf
cmpq $0xb, %r14
je 0x11a1b
cmpq $0x14, %r14
jne 0x11ac2
movq (%rsp), %rdi
leaq 0xf50a(%rip), %rsi      # 0x20f97
movl $0x14, %edx
callq 0x60e0
testl %eax, %eax
je 0x11c11
cmpq $0x15, %r14
jne 0x11ac2
movq (%rsp), %rdi
leaq 0xf4fc(%rip), %rsi      # 0x20fac
movl $0x15, %edx
callq 0x60e0
testl %eax, %eax
je 0x11c03
cmpq $0x18, %r14
jne 0x11ae5
movq (%rsp), %rdi
leaq 0xf4ef(%rip), %rsi      # 0x20fc2
movl $0x18, %edx
callq 0x60e0
testl %eax, %eax
je 0x11c0a
cmpq $0xf, %r14
je 0x11b43
cmpq $0xc, %r14
je 0x11b20
cmpq $0x5, %r14
jne 0x11b60
movq (%rsp), %rdi
leaq 0xf4d9(%rip), %rsi      # 0x20fdb
movl $0x5, %edx
callq 0x60e0
testl %eax, %eax
je 0x11c42
cmpq $0xf, %r14
je 0x11b43
cmpq $0xc, %r14
jne 0x11b60
movq (%rsp), %rdi
leaq 0xf4d7(%rip), %rsi      # 0x21002
movl $0xc, %edx
callq 0x60e0
testl %eax, %eax
je 0x11c34
cmpq $0xf, %r14
jne 0x11b60
movq (%rsp), %rdi
leaq 0xf4c1(%rip), %rsi      # 0x2100f
movl $0xf, %edx
callq 0x60e0
testl %eax, %eax
je 0x11c1f
cmpq $0x11, %r14
jne 0x11b83
movq (%rsp), %rdi
leaq 0xf4ae(%rip), %rsi      # 0x2101f
movl $0x11, %edx
callq 0x60e0
testl %eax, %eax
je 0x11c2d
cmpq $0x12, %r14
jne 0x11ba6
movq (%rsp), %rdi
leaq 0xf49d(%rip), %rsi      # 0x21031
movl $0x12, %edx
callq 0x60e0
testl %eax, %eax
je 0x11c3b
cmpq $0x11, %r14
jne 0x11bc9
movq (%rsp), %rdi
leaq 0xf48d(%rip), %rsi      # 0x21044
movl $0x11, %edx
callq 0x60e0
testl %eax, %eax
je 0x11c49
cmpq $0x18, %r14
jne 0x11be8
movq (%rsp), %rdi
leaq 0xf47c(%rip), %rsi      # 0x21056
movl $0x18, %edx
callq 0x60e0
testl %eax, %eax
je 0x11c50
leaq 0xf9a6(%rip), %rsi      # 0x21595
movq %rbx, %rdi
movl $0x2273, %edx           # imm = 0x2273
callq 0x6de0
movl $0xfffffffd, %ebp       # imm = 0xFFFFFFFD
jmp 0x11c5a
movl $0x5, %eax
jmp 0x11c55
movl $0x6, %eax
jmp 0x11c55
movl $0x4, %eax
jmp 0x11c55
movl $0x3, %eax
jmp 0x11c55
movl $0xa, %eax
jmp 0x11c55
movl $0x1, %eax
jmp 0x11c55
movl $0xb, %eax
jmp 0x11c55
movl $0x9, %eax
jmp 0x11c55
movl $0xc, %eax
jmp 0x11c55
movl $0x7, %eax
jmp 0x11c55
movl $0xd, %eax
jmp 0x11c55
movl $0xe, %eax
movl %eax, (%r15)
xorl %ebp, %ebp
testq %rbx, %rbx
je 0x11c97
movq (%rsp), %r15
testq %r15, %r15
je 0x11c8e
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq *0x888(%rbx)
movq 0x890(%rbx), %rdi
movq %r15, %rsi
callq *0x878(%rbx)
movq $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq