// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x940, %rsp            # imm = 0x940
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movw (%rax), %cx
addw $0x1, %cx
movw %cx, (%rax)
leaq -0x40(%rbp), %rdi
leaq 0x36b98(%rip), %rsi     # 0x42660
movl $0x30, %edx
callq 0x10c0
leaq -0x8d8(%rbp), %rdi
xorl %esi, %esi
movl $0x898, %edx            # imm = 0x898
callq 0x1090
leaq -0x40(%rbp), %rsi
leaq -0x8d8(%rbp), %rdi
movl $0x30, %edx
xorl %ecx, %ecx
callq 0x1c6e0
movq 0x3b75d(%rip), %rax     # 0x47260
movq %rax, -0x900(%rbp)
movq 0x3b757(%rip), %rax     # 0x47268
movq %rax, -0x8f8(%rbp)
movq 0x3b751(%rip), %rax     # 0x47270
movq %rax, -0x8f0(%rbp)
movq 0x3b74b(%rip), %rax     # 0x47278
movq %rax, -0x8e8(%rbp)
leaq -0x910(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x900(%rbp), %rax
movq %rax, -0x910(%rbp)
movq $0x20, -0x908(%rbp)
leaq -0x918(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x1090
leaq -0x910(%rbp), %rax
movq %rax, -0x918(%rbp)
leaq -0x918(%rbp), %rax
movq %rax, -0x920(%rbp)
movq $0x0, -0x928(%rbp)
leaq -0x8d8(%rbp), %rdi
movl $0x7, %esi
leaq -0x928(%rbp), %rdx
callq 0x2fbb0
movl %eax, -0x92c(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x938(%rbp)
movl $0x7, %edi
leaq -0x920(%rbp), %rsi
leaq -0x928(%rbp), %rdx
callq 0x219a0
movq -0x938(%rbp), %rdi
movl %eax, %edx
movl -0x92c(%rbp), %ecx
leaq -0x8d8(%rbp), %rsi
leaq 0x34319(%rip), %r8      # 0x3ff11
callq 0x13a0
movl %eax, -0x92c(%rbp)
leaq -0x8d8(%rbp), %rdi
movl $0x7, %esi
leaq -0x928(%rbp), %rdx
callq 0x1de00
leaq -0x8d8(%rbp), %rdi
callq 0x1cab0
movl -0x92c(%rbp), %eax
addq $0x940, %rsp            # imm = 0x940
popq %rbp
retq
nopw %cs:(%rax,%rax)