// File: /workspace/github_c_makefile_star2_O0/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_encode_attribute_name
int
kmip_encode_attribute_name(KMIP *ctx, enum attribute_type value)
{
    int result = 0;
    enum tag t = KMIP_TAG_ATTRIBUTE_NAME;
    TextString attribute_name = {0};
    
    switch(value)
    {
        case KMIP_ATTR_UNIQUE_IDENTIFIER:
        attribute_name.value = "Unique Identifier";
        attribute_name.size = 17;
        break;
        
        case KMIP_ATTR_NAME:
        attribute_name.value = "Name";
        attribute_name.size = 4;
        break;
        
        case KMIP_ATTR_OBJECT_TYPE:
        attribute_name.value = "Object Type";
        attribute_name.size = 11;
        break;
        
        case KMIP_ATTR_CRYPTOGRAPHIC_ALGORITHM:
        attribute_name.value = "Cryptographic Algorithm";
        attribute_name.size = 23;
        break;
        
        case KMIP_ATTR_CRYPTOGRAPHIC_LENGTH:
        attribute_name.value = "Cryptographic Length";
        attribute_name.size = 20;
        break;
        
        case KMIP_ATTR_OPERATION_POLICY_NAME:
        attribute_name.value = "Operation Policy Name";
        attribute_name.size = 21;
        break;
        
        case KMIP_ATTR_CRYPTOGRAPHIC_USAGE_MASK:
        attribute_name.value = "Cryptographic Usage Mask";
        attribute_name.size = 24;
        break;
        
        case KMIP_ATTR_STATE:
        attribute_name.value = "State";
        attribute_name.size = 5;
        break;

        case KMIP_ATTR_APPLICATION_SPECIFIC_INFORMATION:
        {
            attribute_name.value = "Application Specific Information";
            attribute_name.size = 32;
        }
        break;

        case KMIP_ATTR_OBJECT_GROUP:
        {
            attribute_name.value = "Object Group";
            attribute_name.size = 12;
        }
        break;

        case KMIP_ATTR_ACTIVATION_DATE:
        {
            attribute_name.value = "Activation Date";
            attribute_name.size = 15;
        } break;

        case KMIP_ATTR_DEACTIVATION_DATE:
        {
            attribute_name.value = "Deactivation Date";
            attribute_name.size = 17;
        } break;

        case KMIP_ATTR_PROCESS_START_DATE:
        {
            attribute_name.value = "Process Start Date";
            attribute_name.size = 18;
        } break;

        case KMIP_ATTR_PROTECT_STOP_DATE:
        {
            attribute_name.value = "Protect Stop Date";
            attribute_name.size = 17;
        } break;

        case KMIP_ATTR_CRYPTOGRAPHIC_PARAMETERS:
        {
            attribute_name.value = "Cryptographic Parameters";
            attribute_name.size = 24;
        } break;
        
        default:
        kmip_push_error_frame(ctx, __func__, __LINE__);
        return(KMIP_ERROR_ATTR_UNSUPPORTED);
        break;
    };
    
    result = kmip_encode_text_string(ctx, t, &attribute_name);
    CHECK_RESULT(ctx, result);
    
    return(KMIP_OK);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x42000a, -0x1c(%rbp)  # imm = 0x42000A
xorps %xmm0, %xmm0
movaps %xmm0, -0x30(%rbp)
movl -0x14(%rbp), %eax
movq %rax, -0x38(%rbp)
subq $0xe, %rax
ja 0x114e2
movq -0x38(%rbp), %rax
leaq 0x13480(%rip), %rcx     # 0x24800
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x138ba(%rip), %rax     # 0x24c4a
movq %rax, -0x30(%rbp)
movq $0x11, -0x28(%rbp)
jmp 0x11500
leaq 0x138fe(%rip), %rax     # 0x24ca6
movq %rax, -0x30(%rbp)
movq $0x4, -0x28(%rbp)
jmp 0x11500
leaq 0x1389c(%rip), %rax     # 0x24c5c
movq %rax, -0x30(%rbp)
movq $0xb, -0x28(%rbp)
jmp 0x11500
leaq 0x13890(%rip), %rax     # 0x24c68
movq %rax, -0x30(%rbp)
movq $0x17, -0x28(%rbp)
jmp 0x11500
leaq 0x13890(%rip), %rax     # 0x24c80
movq %rax, -0x30(%rbp)
movq $0x14, -0x28(%rbp)
jmp 0x11500
leaq 0x1388d(%rip), %rax     # 0x24c95
movq %rax, -0x30(%rbp)
movq $0x15, -0x28(%rbp)
jmp 0x11500
leaq 0x1388b(%rip), %rax     # 0x24cab
movq %rax, -0x30(%rbp)
movq $0x18, -0x28(%rbp)
jmp 0x11500
leaq 0x1388c(%rip), %rax     # 0x24cc4
movq %rax, -0x30(%rbp)
movq $0x5, -0x28(%rbp)
jmp 0x11500
leaq 0x1387a(%rip), %rax     # 0x24cca
movq %rax, -0x30(%rbp)
movq $0x20, -0x28(%rbp)
jmp 0x11500
leaq 0x13883(%rip), %rax     # 0x24ceb
movq %rax, -0x30(%rbp)
movq $0xc, -0x28(%rbp)
jmp 0x11500
leaq 0x13878(%rip), %rax     # 0x24cf8
movq %rax, -0x30(%rbp)
movq $0xf, -0x28(%rbp)
jmp 0x11500
leaq 0x13873(%rip), %rax     # 0x24d08
movq %rax, -0x30(%rbp)
movq $0x11, -0x28(%rbp)
jmp 0x11500
leaq 0x13870(%rip), %rax     # 0x24d1a
movq %rax, -0x30(%rbp)
movq $0x12, -0x28(%rbp)
jmp 0x11500
leaq 0x1386e(%rip), %rax     # 0x24d2d
movq %rax, -0x30(%rbp)
movq $0x11, -0x28(%rbp)
jmp 0x11500
leaq 0x1386b(%rip), %rax     # 0x24d3f
movq %rax, -0x30(%rbp)
movq $0x18, -0x28(%rbp)
jmp 0x11500
movq -0x10(%rbp), %rdi
leaq 0x1386b(%rip), %rsi     # 0x24d58
movl $0x195d, %edx           # imm = 0x195D
callq 0x6f20
movl $0xfffffffd, -0x4(%rbp) # imm = 0xFFFFFFFD
jmp 0x1153f
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
leaq -0x30(%rbp), %rdx
callq 0x66f0
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x11536
movq -0x10(%rbp), %rdi
leaq 0x13834(%rip), %rsi     # 0x24d58
movl $0x1963, %edx           # imm = 0x1963
callq 0x6f20
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1153f
jmp 0x11538
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)