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

    /* This encoding matches the following value:
    *  Unique Identifier - fb4b5b9c-6188-4c63-8142-fe9c328129fc
    */
    uint8 encoding[48] = {
        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
    };

    KMIP ctx = {0};
    kmip_init(&ctx, encoding, ARRAY_LENGTH(encoding), KMIP_2_0);

    Attribute expected = {0};
    kmip_init_attribute(&expected);
    TextString unique_identifier = {0};
    unique_identifier.value = "fb4b5b9c-6188-4c63-8142-fe9c328129fc";
    unique_identifier.size = 36;
    expected.type = KMIP_ATTR_UNIQUE_IDENTIFIER;
    expected.value = &unique_identifier;

    Attribute observed = {0};
    int result = kmip_decode_attribute_v2(&ctx, &observed);
    int comparison = kmip_compare_attribute(&expected, &observed);
    if(!comparison)
    {
        kmip_print_attribute(stderr, 1, &expected);
        kmip_print_attribute(stderr, 1, &observed);
    }
    result = report_decoding_test_result(tracker, &ctx, comparison, result, __func__);

    kmip_free_attribute(&ctx, &observed);
    kmip_destroy(&ctx);

    return(result);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x910, %rsp            # imm = 0x910
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movw (%rax), %cx
addw $0x1, %cx
movw %cx, (%rax)
leaq -0x40(%rbp), %rdi
leaq 0x31928(%rip), %rsi     # 0x45790
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
movl $0x5, %ecx
callq 0x1c6e0
leaq -0x8e8(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x8e8(%rbp), %rdi
callq 0x1d330
leaq -0x8f8(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq 0x2c333(%rip), %rax     # 0x4020b
movq %rax, -0x8f8(%rbp)
movq $0x24, -0x8f0(%rbp)
movl $0x0, -0x8e8(%rbp)
leaq -0x8f8(%rbp), %rax
movq %rax, -0x8e0(%rbp)
leaq -0x908(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x8d8(%rbp), %rdi
leaq -0x908(%rbp), %rsi
callq 0x2e350
movl %eax, -0x90c(%rbp)
leaq -0x8e8(%rbp), %rdi
leaq -0x908(%rbp), %rsi
callq 0x20f80
movl %eax, -0x910(%rbp)
cmpl $0x0, -0x910(%rbp)
jne 0x13f86
movq 0x400a1(%rip), %rax     # 0x53ff8
movq (%rax), %rdi
movl $0x1, %esi
leaq -0x8e8(%rbp), %rdx
callq 0x3c210
movq 0x40086(%rip), %rax     # 0x53ff8
movq (%rax), %rdi
movl $0x1, %esi
leaq -0x908(%rbp), %rdx
callq 0x3c210
movq -0x8(%rbp), %rdi
movl -0x910(%rbp), %edx
movl -0x90c(%rbp), %ecx
leaq -0x8d8(%rbp), %rsi
leaq 0x2cc4a(%rip), %r8      # 0x40bee
callq 0x13a0
movl %eax, -0x90c(%rbp)
leaq -0x8d8(%rbp), %rdi
leaq -0x908(%rbp), %rsi
callq 0x1d8e0
leaq -0x8d8(%rbp), %rdi
callq 0x1cab0
movl -0x90c(%rbp), %eax
addq $0x910, %rsp            # imm = 0x910
popq %rbp
retq
nopl (%rax)