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

    uint8 encoding[48] = {
        0x42, 0x00, 0x43, 0x01, 0x00, 0x00, 0x00, 0x28, 
        0x42, 0x00, 0x3F, 0x08, 0x00, 0x00, 0x00, 0x20, 
        0x00, 0x00, 0x11, 0x11, 0x22, 0x22, 0x33, 0x33, 
        0x44, 0x44, 0x55, 0x55, 0x66, 0x66, 0x77, 0x77,
        0x88, 0x88, 0x99, 0x99, 0xAA, 0xAA, 0xBB, 0xBB,
        0xCC, 0xCC, 0xDD, 0xDD, 0xEE, 0xEE, 0xFF, 0xFF
    };
    
    struct kmip ctx = {0};
    kmip_init(&ctx, encoding, ARRAY_LENGTH(encoding), KMIP_1_0);
    
    uint8 value[32] = {
        0x00, 0x00, 0x11, 0x11, 0x22, 0x22, 0x33, 0x33, 
        0x44, 0x44, 0x55, 0x55, 0x66, 0x66, 0x77, 0x77,
        0x88, 0x88, 0x99, 0x99, 0xAA, 0xAA, 0xBB, 0xBB,
        0xCC, 0xCC, 0xDD, 0xDD, 0xEE, 0xEE, 0xFF, 0xFF
    };
    struct byte_string key = {0};
    key.value = value;
    key.size = ARRAY_LENGTH(value);
    struct transparent_symmetric_key expected = {0};
    expected.key = &key;
    
    struct transparent_symmetric_key *expected_ptr = &expected;
    struct transparent_symmetric_key *observed_ptr = NULL;
    
    int result = kmip_decode_key_material(
        &ctx,
        KMIP_KEYFORMAT_TRANS_SYMMETRIC_KEY,
        (void**)&observed_ptr);
    result = report_decoding_test_result(
        tracker,
        &ctx,
        kmip_compare_key_material(KMIP_KEYFORMAT_TRANS_SYMMETRIC_KEY, (void**)&expected_ptr, (void**)&observed_ptr),
        result,
        __func__);
    kmip_free_key_material(
        &ctx,
        KMIP_KEYFORMAT_TRANS_SYMMETRIC_KEY,
        (void**)&observed_ptr);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x918, %rsp            # imm = 0x918
movq %rdi, %r14
incw (%rdi)
movaps 0x2106c(%rip), %xmm0    # 0x29130
leaq 0x50(%rsp), %r15
movaps %xmm0, 0x20(%r15)
movaps 0x2104b(%rip), %xmm0    # 0x29120
movaps %xmm0, 0x10(%r15)
movaps 0x2102f(%rip), %xmm0    # 0x29110
movaps %xmm0, (%r15)
leaq 0x80(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
pushq $0x30
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x128ed
movaps 0x23a4d(%rip), %xmm0    # 0x2bb60
leaq 0x30(%rsp), %rax
movaps %xmm0, 0x10(%rax)
movaps 0x23a2d(%rip), %xmm0    # 0x2bb50
movaps %xmm0, (%rax)
leaq 0x20(%rsp), %rcx
movq %rax, (%rcx)
movq $0x20, 0x8(%rcx)
leaq 0x18(%rsp), %rax
movq %rcx, (%rax)
leaq 0x10(%rsp), %r15
movq %rax, (%r15)
leaq 0x8(%rsp), %r12
andq $0x0, (%r12)
pushq $0x7
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x1cd79
movl %eax, %r13d
movl %ebp, %edi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1510f
leaq 0x1ee52(%rip), %r8      # 0x26fc9
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %edx
movl %r13d, %ecx
callq 0x134d
movl %eax, %r14d
movq %rbx, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x13351
movq %rbx, %rdi
callq 0x12ade
movl %r14d, %eax
addq $0x918, %rsp            # imm = 0x918
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq