// File: /workspace/github_c_makefile_star2_O2/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, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %rdx
movaps %xmm0, (%rdx)
movl $0x42000a, %esi         # imm = 0x42000A
callq 0x6560
testl %eax, %eax
je 0xf7fd
movl %eax, %ebp
leaq 0x867a(%rip), %rsi      # 0x17e65
movq %rbx, %rdi
movl $0x2232, %edx           # imm = 0x2232
callq 0x6e80
jmp 0xfa2a
movq 0x8(%rsp), %rax
addq $-0x4, %rax
cmpq $0x1c, %rax
ja 0xf9e7
leaq 0x7c35(%rip), %rcx      # 0x1744c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rsp), %rdi
leaq 0x7f17(%rip), %rsi      # 0x17742
pushq $0x4
popq %rdx
callq 0x60e0
testl %eax, %eax
jne 0xf9e7
pushq $0x1
jmp 0xfa19
movq (%rsp), %r15
leaq 0x7efa(%rip), %rsi      # 0x17747
pushq $0x18
popq %rdx
movq %r15, %rdi
callq 0x60e0
testl %eax, %eax
je 0xfa0b
leaq 0x7f74(%rip), %rsi      # 0x177db
pushq $0x18
popq %rdx
movq %r15, %rdi
callq 0x60e0
testl %eax, %eax
jne 0xf9e7
pushq $0xe
jmp 0xfa19
movq (%rsp), %rdi
leaq 0x7e6c(%rip), %rsi      # 0x176f8
pushq $0xb
popq %rdx
callq 0x60e0
testl %eax, %eax
jne 0xf9e7
pushq $0x2
jmp 0xfa19
movq (%rsp), %rdi
leaq 0x7e38(%rip), %rsi      # 0x176e6
pushq $0x11
popq %rdx
callq 0x60e0
testl %eax, %eax
je 0xfa0f
movq (%rsp), %rdi
leaq 0x7edb(%rip), %rsi      # 0x177a4
pushq $0x11
popq %rdx
callq 0x60e0
testl %eax, %eax
je 0xfa17
movq (%rsp), %rdi
leaq 0x7ee5(%rip), %rsi      # 0x177c9
pushq $0x11
popq %rdx
callq 0x60e0
testl %eax, %eax
jne 0xf9e7
pushq $0xd
jmp 0xfa19
movq (%rsp), %rdi
leaq 0x7e60(%rip), %rsi      # 0x17766
pushq $0x20
popq %rdx
callq 0x60e0
testl %eax, %eax
jne 0xf9e7
pushq $0x8
jmp 0xfa19
movq (%rsp), %rdi
leaq 0x7e38(%rip), %rsi      # 0x17760
pushq $0x5
popq %rdx
callq 0x60e0
testl %eax, %eax
jne 0xf9e7
pushq $0x7
jmp 0xfa19
movq (%rsp), %rdi
leaq 0x7e6c(%rip), %rsi      # 0x177b6
pushq $0x12
popq %rdx
callq 0x60e0
testl %eax, %eax
jne 0xf9e7
pushq $0xc
jmp 0xfa19
movq (%rsp), %rdi
leaq 0x7db0(%rip), %rsi      # 0x1771c
pushq $0x14
popq %rdx
callq 0x60e0
testl %eax, %eax
jne 0xf9e7
pushq $0x4
jmp 0xfa19
movq (%rsp), %rdi
leaq 0x7dfd(%rip), %rsi      # 0x17787
pushq $0xc
popq %rdx
callq 0x60e0
testl %eax, %eax
jne 0xf9e7
pushq $0x9
jmp 0xfa19
movq (%rsp), %rdi
leaq 0x7def(%rip), %rsi      # 0x17794
pushq $0xf
popq %rdx
callq 0x60e0
testl %eax, %eax
jne 0xf9e7
pushq $0xa
jmp 0xfa19
movq (%rsp), %rdi
leaq 0x7d44(%rip), %rsi      # 0x17704
pushq $0x17
popq %rdx
callq 0x60e0
testl %eax, %eax
jne 0xf9e7
pushq $0x3
jmp 0xfa19
movq (%rsp), %rdi
leaq 0x7d56(%rip), %rsi      # 0x17731
pushq $0x15
popq %rdx
callq 0x60e0
testl %eax, %eax
je 0xfa13
leaq 0x8477(%rip), %rsi      # 0x17e65
movq %rbx, %rdi
movl $0x2273, %edx           # imm = 0x2273
callq 0x6e80
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x6350
pushq $-0x3
popq %rbp
jmp 0xfa2a
pushq $0x6
jmp 0xfa19
xorl %eax, %eax
jmp 0xfa1a
pushq $0x5
jmp 0xfa19
pushq $0xb
popq %rax
movl %eax, (%r14)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x6350
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq