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

    uint8 expected[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, 
    };
    
    uint8 observed[136] = {0};
    struct kmip ctx = {0};
    kmip_init(&ctx, observed, ARRAY_LENGTH(observed), 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 crp = {0};
    crp.object_type = KMIP_OBJTYPE_SYMMETRIC_KEY;
    crp.unique_identifier = &uuid;
    crp.template_attribute = &ta;
    
    int result = kmip_encode_create_response_payload(&ctx, &crp);
    result = report_encoding_test_result(
        tracker,
        &ctx,
        expected,
        observed,
        result,
        __func__);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa20, %rsp            # imm = 0xA20
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movw (%rax), %cx
addw $0x1, %cx
movw %cx, (%rax)
leaq -0x90(%rbp), %rdi
leaq 0x35f55(%rip), %rsi     # 0x44610
movl $0x88, %edx
callq 0x10c0
leaq -0x120(%rbp), %rdi
xorl %esi, %esi
movl $0x88, %edx
callq 0x1090
leaq -0x9b8(%rbp), %rdi
xorl %esi, %esi
movl $0x898, %edx            # imm = 0x898
callq 0x1090
leaq -0x120(%rbp), %rsi
leaq -0x9b8(%rbp), %rdi
movl $0x88, %edx
xorl %ecx, %ecx
callq 0x1c6e0
leaq -0x9c8(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq 0x31aec(%rip), %rax     # 0x4020b
movq %rax, -0x9c8(%rbp)
movq $0x24, -0x9c0(%rbp)
leaq -0x9d8(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x9d8(%rbp), %rdi
callq 0x1d330
movl $0x3, -0x9dc(%rbp)
movl $0x3, -0x9d8(%rbp)
leaq -0x9dc(%rbp), %rax
movq %rax, -0x9d0(%rbp)
leaq -0xa00(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x1090
leaq -0x9d8(%rbp), %rax
movq %rax, -0x9f0(%rbp)
movq $0x1, -0x9e8(%rbp)
leaq -0xa18(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x1090
movl $0x2, -0xa18(%rbp)
leaq -0x9c8(%rbp), %rax
movq %rax, -0xa10(%rbp)
leaq -0xa00(%rbp), %rax
movq %rax, -0xa08(%rbp)
leaq -0x9b8(%rbp), %rdi
leaq -0xa18(%rbp), %rsi
callq 0x284c0
movl %eax, -0xa1c(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x90(%rbp), %rdx
leaq -0x120(%rbp), %rcx
movl -0xa1c(%rbp), %r8d
leaq -0x9b8(%rbp), %rsi
leaq 0x31a61(%rip), %r9      # 0x40278
callq 0x11f0
movl %eax, -0xa1c(%rbp)
leaq -0x9b8(%rbp), %rdi
callq 0x1cab0
movl -0xa1c(%rbp), %eax
addq $0xa20, %rsp            # imm = 0xA20
popq %rbp
retq
nopl (%rax)