// File: /workspace/github_c_makefile_star2_O0/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_decode_attestation_credential
int
kmip_decode_attestation_credential(KMIP *ctx, AttestationCredential *value)
{
    CHECK_BUFFER_FULL(ctx, 8);
    
    int result = 0;
    int32 tag_type = 0;
    uint32 length = 0;
    
    kmip_decode_int32_be(ctx, &tag_type);
    CHECK_TAG_TYPE(ctx, tag_type, KMIP_TAG_CREDENTIAL_VALUE, KMIP_TYPE_STRUCTURE);
    
    kmip_decode_length(ctx, &length);
    CHECK_BUFFER_FULL(ctx, length);
    
    value->nonce = ctx->calloc_func(ctx->state, 1, sizeof(Nonce));
    CHECK_NEW_MEMORY(ctx, value->nonce, sizeof(Nonce), "Nonce structure");
    
    result = kmip_decode_nonce(ctx, value->nonce);
    CHECK_RESULT(ctx, result);
    
    result = kmip_decode_enum(ctx, KMIP_TAG_ATTESTATION_TYPE, &value->attestation_type);
    CHECK_RESULT(ctx, result);
    CHECK_ENUM(ctx, KMIP_TAG_ATTESTATION_TYPE, value->attestation_type);
    
    if(kmip_is_tag_next(ctx, KMIP_TAG_ATTESTATION_MEASUREMENT))
    {
        value->attestation_measurement = ctx->calloc_func(ctx->state, 1, sizeof(ByteString));
        CHECK_NEW_MEMORY(ctx, value->attestation_measurement, sizeof(ByteString), "AttestationMeasurement byte string");
        
        result = kmip_decode_byte_string(ctx, KMIP_TAG_ATTESTATION_MEASUREMENT, value->attestation_measurement);
        CHECK_RESULT(ctx, result);
    }
    
    if(kmip_is_tag_next(ctx, KMIP_TAG_ATTESTATION_ASSERTION))
    {
        value->attestation_assertion = ctx->calloc_func(ctx->state, 1, sizeof(ByteString));
        CHECK_NEW_MEMORY(ctx, value->attestation_assertion, sizeof(ByteString), "AttestationAssertion byte string");
        
        result = kmip_decode_byte_string(ctx, KMIP_TAG_ATTESTATION_ASSERTION, value->attestation_assertion);
        CHECK_RESULT(ctx, result);
    }
    
    return(KMIP_OK);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x10(%rbp), %rdx
movq (%rdx), %rdx
subq %rdx, %rcx
subq %rcx, %rax
cmpq $0x8, %rax
jae 0x20db4
movq -0x10(%rbp), %rdi
leaq 0x5166(%rip), %rsi      # 0x25f04
movl $0x299f, %edx           # imm = 0x299F
callq 0x6f20
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x21169
jmp 0x20db6
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x6b10
movl -0x20(%rbp), %eax
sarl $0x8, %eax
cmpl $0x420025, %eax         # imm = 0x420025
je 0x20e06
movq -0x10(%rbp), %rdi
leaq 0x5114(%rip), %rsi      # 0x25f04
movl $0x29a6, %edx           # imm = 0x29A6
callq 0x6f20
movl $0xfffffffc, -0x4(%rbp) # imm = 0xFFFFFFFC
jmp 0x21169
movl -0x20(%rbp), %eax
andl $0xff, %eax
cmpl $0x1, %eax
je 0x20e34
movq -0x10(%rbp), %rdi
leaq 0x50e6(%rip), %rsi      # 0x25f04
movl $0x29a6, %edx           # imm = 0x29A6
callq 0x6f20
movl $0xfffffffb, -0x4(%rbp) # imm = 0xFFFFFFFB
jmp 0x21169
jmp 0x20e36
jmp 0x20e38
movq -0x10(%rbp), %rdi
leaq -0x24(%rbp), %rsi
callq 0x6520
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x10(%rbp), %rdx
movq (%rdx), %rdx
subq %rdx, %rcx
subq %rcx, %rax
movl -0x24(%rbp), %ecx
cmpq %rcx, %rax
jae 0x20e8b
movq -0x10(%rbp), %rdi
leaq 0x508f(%rip), %rsi      # 0x25f04
movl $0x29a9, %edx           # imm = 0x29A9
callq 0x6f20
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x21169
jmp 0x20e8d
movq -0x10(%rbp), %rax
movq 0x868(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x890(%rcx), %rdi
movl $0x1, %esi
movl $0x10, %edx
callq *%rax
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x20ef9
movq -0x10(%rbp), %rdi
movl $0x10, %esi
leaq 0x5054(%rip), %rdx      # 0x25f27
callq 0x6cd0
movq -0x10(%rbp), %rdi
leaq 0x5021(%rip), %rsi      # 0x25f04
movl $0x29ac, %edx           # imm = 0x29AC
callq 0x6f20
movl $0xfffffff4, -0x4(%rbp) # imm = 0xFFFFFFF4
jmp 0x21169
jmp 0x20efb
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0x65d0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x20f34
movq -0x10(%rbp), %rdi
leaq 0x4fe5(%rip), %rsi      # 0x25f04
movl $0x29af, %edx           # imm = 0x29AF
callq 0x6f20
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x21169
jmp 0x20f36
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
addq $0x8, %rdx
movl $0x4200c7, %esi         # imm = 0x4200C7
callq 0x6c00
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x20f75
movq -0x10(%rbp), %rdi
leaq 0x4fa4(%rip), %rsi      # 0x25f04
movl $0x29b2, %edx           # imm = 0x29B2
callq 0x6f20
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x21169
jmp 0x20f77
jmp 0x20f79
movq -0x10(%rbp), %rax
movl 0x18(%rax), %edi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %edx
movl $0x4200c7, %esi         # imm = 0x4200C7
callq 0x63a0
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
je 0x20fd2
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %edx
movl -0x28(%rbp), %ecx
movl $0x4200c7, %esi         # imm = 0x4200C7
callq 0x6140
movq -0x10(%rbp), %rdi
leaq 0x4f47(%rip), %rsi      # 0x25f04
movl $0x29b3, %edx           # imm = 0x29B3
callq 0x6f20
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x21169
jmp 0x20fd4
movq -0x10(%rbp), %rdi
movl $0x4200cb, %esi         # imm = 0x4200CB
callq 0x6300
cmpl $0x0, %eax
je 0x2109e
movq -0x10(%rbp), %rax
movq 0x868(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x890(%rcx), %rdi
movl $0x1, %esi
movl $0x10, %edx
callq *%rax
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x21059
movq -0x10(%rbp), %rdi
movl $0x10, %esi
leaq 0x4f04(%rip), %rdx      # 0x25f37
callq 0x6cd0
movq -0x10(%rbp), %rdi
leaq 0x4ec1(%rip), %rsi      # 0x25f04
movl $0x29b8, %edx           # imm = 0x29B8
callq 0x6f20
movl $0xfffffff4, -0x4(%rbp) # imm = 0xFFFFFFF4
jmp 0x21169
jmp 0x2105b
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdx
movl $0x4200cb, %esi         # imm = 0x4200CB
callq 0x6df0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x2109a
movq -0x10(%rbp), %rdi
leaq 0x4e7f(%rip), %rsi      # 0x25f04
movl $0x29bb, %edx           # imm = 0x29BB
callq 0x6f20
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x21169
jmp 0x2109c
jmp 0x2109e
movq -0x10(%rbp), %rdi
movl $0x4200cc, %esi         # imm = 0x4200CC
callq 0x6300
cmpl $0x0, %eax
je 0x21162
movq -0x10(%rbp), %rax
movq 0x868(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x890(%rcx), %rdi
movl $0x1, %esi
movl $0x10, %edx
callq *%rax
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x21120
movq -0x10(%rbp), %rdi
movl $0x10, %esi
leaq 0x4e5d(%rip), %rdx      # 0x25f5a
callq 0x6cd0
movq -0x10(%rbp), %rdi
leaq 0x4df7(%rip), %rsi      # 0x25f04
movl $0x29c1, %edx           # imm = 0x29C1
callq 0x6f20
movl $0xfffffff4, -0x4(%rbp) # imm = 0xFFFFFFF4
jmp 0x21169
jmp 0x21122
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdx
movl $0x4200cc, %esi         # imm = 0x4200CC
callq 0x6df0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x2115e
movq -0x10(%rbp), %rdi
leaq 0x4db8(%rip), %rsi      # 0x25f04
movl $0x29c4, %edx           # imm = 0x29C4
callq 0x6f20
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x21169
jmp 0x21160
jmp 0x21162
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)