// File: /workspace/github_c_makefile_star2_O3/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 %r12
pushq %rbx
subq $0x10, %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 0x114e7
movl %eax, %ebp
leaq 0xf130(%rip), %rsi      # 0x20605
movq %rbx, %rdi
movl $0x2232, %edx           # imm = 0x2232
callq 0x6de0
jmp 0x117c8
movq 0x8(%rsp), %r14
leaq -0x4(%r14), %rax
cmpq $0x1c, %rax
ja 0x11741
leaq 0xceef(%rip), %rcx      # 0x1e3f0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rsp), %r12
leaq 0xeb18(%rip), %rsi      # 0x2002d
movl $0x4, %edx
movq %r12, %rdi
callq 0x60e0
testl %eax, %eax
jne 0x11741
movl $0x1, %eax
jmp 0x11799
movq (%rsp), %r12
leaq 0xeaf3(%rip), %rsi      # 0x20032
movl $0x18, %edx
movq %r12, %rdi
callq 0x60e0
testl %eax, %eax
je 0x11782
leaq 0xeb6b(%rip), %rsi      # 0x200c6
movl $0x18, %edx
movq %r12, %rdi
callq 0x60e0
testl %eax, %eax
jne 0x11741
movl $0xe, %eax
jmp 0x11799
movq (%rsp), %r12
leaq 0xea5e(%rip), %rsi      # 0x1ffe3
movl $0xb, %edx
movq %r12, %rdi
callq 0x60e0
testl %eax, %eax
jne 0x11741
movl $0x2, %eax
jmp 0x11799
movq (%rsp), %r12
leaq 0xea22(%rip), %rsi      # 0x1ffd1
movl $0x11, %edx
movq %r12, %rdi
callq 0x60e0
testl %eax, %eax
je 0x11789
movq (%rsp), %r12
leaq 0xeac0(%rip), %rsi      # 0x2008f
movl $0x11, %edx
movq %r12, %rdi
callq 0x60e0
testl %eax, %eax
je 0x11794
movq (%rsp), %r12
leaq 0xeac5(%rip), %rsi      # 0x200b4
movl $0x11, %edx
movq %r12, %rdi
callq 0x60e0
testl %eax, %eax
jne 0x11741
movl $0xd, %eax
jmp 0x11799
movq (%rsp), %r12
leaq 0xea38(%rip), %rsi      # 0x20051
movl $0x20, %edx
movq %r12, %rdi
callq 0x60e0
testl %eax, %eax
jne 0x11741
movl $0x8, %eax
jmp 0x11799
movq (%rsp), %r12
leaq 0xea08(%rip), %rsi      # 0x2004b
movl $0x5, %edx
movq %r12, %rdi
callq 0x60e0
testl %eax, %eax
jne 0x11741
movl $0x7, %eax
jmp 0x11799
movq (%rsp), %r12
leaq 0xea34(%rip), %rsi      # 0x200a1
movl $0x12, %edx
movq %r12, %rdi
callq 0x60e0
testl %eax, %eax
jne 0x11741
movl $0xc, %eax
jmp 0x11799
movq (%rsp), %r12
leaq 0xe970(%rip), %rsi      # 0x20007
movl $0x14, %edx
movq %r12, %rdi
callq 0x60e0
testl %eax, %eax
jne 0x11741
movl $0x4, %eax
jmp 0x11799
movq (%rsp), %r12
leaq 0xe9b1(%rip), %rsi      # 0x20072
movl $0xc, %edx
movq %r12, %rdi
callq 0x60e0
testl %eax, %eax
jne 0x11741
movl $0x9, %eax
jmp 0x11799
movq (%rsp), %r12
leaq 0xe998(%rip), %rsi      # 0x2007f
movl $0xf, %edx
movq %r12, %rdi
callq 0x60e0
testl %eax, %eax
jne 0x11741
movl $0xa, %eax
jmp 0x11799
movq (%rsp), %r12
leaq 0xe8e2(%rip), %rsi      # 0x1ffef
movl $0x17, %edx
movq %r12, %rdi
callq 0x60e0
testl %eax, %eax
jne 0x11741
movl $0x3, %eax
jmp 0x11799
movq (%rsp), %r12
leaq 0xe8ec(%rip), %rsi      # 0x2001c
movl $0x15, %edx
movq %r12, %rdi
callq 0x60e0
testl %eax, %eax
je 0x1178d
leaq 0xeebd(%rip), %rsi      # 0x20605
movq %rbx, %rdi
movl $0x2273, %edx           # imm = 0x2273
callq 0x6de0
movl $0xfffffffd, %ebp       # imm = 0xFFFFFFFD
testq %rbx, %rbx
je 0x117c8
movq (%rsp), %r15
testq %r15, %r15
je 0x117c8
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq *0x888(%rbx)
movq 0x890(%rbx), %rdi
movq %r15, %rsi
jmp 0x117c2
movl $0x6, %eax
jmp 0x11799
xorl %eax, %eax
jmp 0x11799
movl $0x5, %eax
jmp 0x11799
movl $0xb, %eax
movl %eax, (%r15)
xorl %ebp, %ebp
testq %rbx, %rbx
je 0x117c8
testq %r12, %r12
je 0x117c8
xorl %ebp, %ebp
movq %r12, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq *0x888(%rbx)
movq 0x890(%rbx), %rdi
movq %r12, %rsi
callq *0x878(%rbx)
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq