// File: /workspace/github_c_makefile_star2_O0/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_decode_create_response_payload_with_template_attribute
int
test_decode_create_response_payload_with_template_attribute(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 encoding[136] = {
        0x42, 0x00, 0x7C, 0x01, 0x00, 0x00, 0x00, 0x80, 
        0x42, 0x00, 0x57, 0x05, 0x00, 0x00, 0x00, 0x04, 
        0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 
        0x42, 0x00, 0x94, 0x07, 0x00, 0x00, 0x00, 0x24, 
        0x66, 0x62, 0x34, 0x62, 0x35, 0x62, 0x39, 0x63, 
        0x2D, 0x36, 0x31, 0x38, 0x38, 0x2D, 0x34, 0x63, 
        0x36, 0x33, 0x2D, 0x38, 0x31, 0x34, 0x32, 0x2D, 
        0x66, 0x65, 0x39, 0x63, 0x33, 0x32, 0x38, 0x31, 
        0x32, 0x39, 0x66, 0x63, 0x00, 0x00, 0x00, 0x00,
        0x42, 0x00, 0x91, 0x01, 0x00, 0x00, 0x00, 0x38, 
        0x42, 0x00, 0x08, 0x01, 0x00, 0x00, 0x00, 0x30, 
        0x42, 0x00, 0x0A, 0x07, 0x00, 0x00, 0x00, 0x17, 
        0x43, 0x72, 0x79, 0x70, 0x74, 0x6F, 0x67, 0x72, 
        0x61, 0x70, 0x68, 0x69, 0x63, 0x20, 0x41, 0x6C, 
        0x67, 0x6F, 0x72, 0x69, 0x74, 0x68, 0x6D, 0x00, 
        0x42, 0x00, 0x0B, 0x05, 0x00, 0x00, 0x00, 0x04, 
        0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 
    };
    
    struct kmip ctx = {0};
    kmip_init(&ctx, encoding, ARRAY_LENGTH(encoding), KMIP_1_0);
    
    struct text_string uuid = {0};
    uuid.value = "fb4b5b9c-6188-4c63-8142-fe9c328129fc";
    uuid.size = 36;
    
    struct attribute a = {0};
    kmip_init_attribute(&a);
    
    enum cryptographic_algorithm algorithm = KMIP_CRYPTOALG_AES;
    a.type = KMIP_ATTR_CRYPTOGRAPHIC_ALGORITHM;
    a.value = &algorithm;
    
    struct template_attribute ta = {0};
    ta.attributes = &a;
    ta.attribute_count = 1;
    
    struct create_response_payload expected = {0};
    expected.object_type = KMIP_OBJTYPE_SYMMETRIC_KEY;
    expected.unique_identifier = &uuid;
    expected.template_attribute = &ta;
    
    struct create_response_payload observed = {0};
    
    int result = kmip_decode_create_response_payload(&ctx, &observed);
    result = report_decoding_test_result(
        tracker,
        &ctx,
        kmip_compare_create_response_payload(&expected, &observed),
        result,
        __func__);
    kmip_free_create_response_payload(&ctx, &observed);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x9b0, %rsp            # imm = 0x9B0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movw (%rax), %cx
addw $0x1, %cx
movw %cx, (%rax)
leaq -0x90(%rbp), %rdi
leaq 0x35e35(%rip), %rsi     # 0x446a0
movl $0x88, %edx
callq 0x10c0
leaq -0x928(%rbp), %rdi
xorl %esi, %esi
movl $0x898, %edx            # imm = 0x898
callq 0x1090
leaq -0x90(%rbp), %rsi
leaq -0x928(%rbp), %rdi
movl $0x88, %edx
xorl %ecx, %ecx
callq 0x1c6e0
leaq -0x938(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq 0x3194f(%rip), %rax     # 0x4020b
movq %rax, -0x938(%rbp)
movq $0x24, -0x930(%rbp)
leaq -0x948(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x948(%rbp), %rdi
callq 0x1d330
movl $0x3, -0x94c(%rbp)
movl $0x3, -0x948(%rbp)
leaq -0x94c(%rbp), %rax
movq %rax, -0x940(%rbp)
leaq -0x970(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x1090
leaq -0x948(%rbp), %rax
movq %rax, -0x960(%rbp)
movq $0x1, -0x958(%rbp)
leaq -0x988(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x1090
movl $0x2, -0x988(%rbp)
leaq -0x938(%rbp), %rax
movq %rax, -0x980(%rbp)
leaq -0x970(%rbp), %rax
movq %rax, -0x978(%rbp)
leaq -0x9a0(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x1090
leaq -0x928(%rbp), %rdi
leaq -0x9a0(%rbp), %rsi
callq 0x32100
movl %eax, -0x9a4(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x9b0(%rbp)
leaq -0x988(%rbp), %rdi
leaq -0x9a0(%rbp), %rsi
callq 0x226d0
movq -0x9b0(%rbp), %rdi
movl %eax, %edx
movl -0x9a4(%rbp), %ecx
leaq -0x928(%rbp), %rsi
leaq 0x318d9(%rip), %r8      # 0x402b4
callq 0x13a0
movl %eax, -0x9a4(%rbp)
leaq -0x928(%rbp), %rdi
leaq -0x9a0(%rbp), %rsi
callq 0x1e6f0
leaq -0x928(%rbp), %rdi
callq 0x1cab0
movl -0x9a4(%rbp), %eax
addq $0x9b0, %rsp            # imm = 0x9B0
popq %rbp
retq
nopw %cs:(%rax,%rax)