user: Converte this assembly snippet into its equivalent C code:

```asm
<TestEmbedChar>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %ecx,%r13d
  push   %r12
  mov    %r8,%r12
  push   %rbp
  movslq %esi,%rbp
  push   %rbx
  mov    %ebp,%esi
  mov    %rdi,%rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rcx
  movq   $0x0,(%rsp)
  call   <embed@plt>
  cmp    %r13d,%eax
  je     L51
  lea    D71(%rip),%rdi
  call   <puts@plt>
  mov    (%rsp),%rdi
  test   %rdi,%rdi
  je     L59
L56:
  call   <free@plt>
L59:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L64
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L51:
  lea    D66(%rip),%rdi
  call   <puts@plt>
  test   %rbx,%rbx
  je     L93
  lea    D78(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  lea    D33(%rip),%rdi
  call   <printf@plt>
  test   %ebp,%ebp
  jle    L93
  xor    %ebx,%ebx
  lea    D72(%rip),%r13
  lea    D16(%rip),%r14
  jmp    L79
  nopl   (%rax)
L30:
  mov    (%rsp),%rax
  movzbl (%r12,%rbx,1),%ecx
  lea    D26(%rip),%r8
  movzbl (%rax,%rbx,1),%edx
  cmp    %cl,%dl
  jne    L9
  mov    %r14,%r8
  mov    %edx,%ecx
L9:
  mov    %r15d,%esi
  mov    %r13,%rdi
  xor    %eax,%eax
  add    $0x1,%rbx
  call   <printf@plt>
  cmp    %rbp,%rbx
  je     L93
L79:
  mov    %ebx,%r15d
  test   $0x7,%bl
  jne    L30
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L30
  nopw   0x0(%rax,%rax,1)
L93:
  lea    D65(%rip),%rdi
  call   <puts@plt>
  mov    (%rsp),%rdi
  test   %rdi,%rdi
  jne    L56
  jmp    L59
L64:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D71
type_infered: string
name: retrieve_data
arguments: label: D66
type_infered: string
name: retrieve_data
arguments: label: D78
type_infered: string
name: retrieve_data
arguments: label: D33
type_infered: string
name: retrieve_data
arguments: label: D72
type_infered: string
name: retrieve_data
arguments: label: D16
type_infered: string
name: retrieve_data
arguments: label: D26
type_infered: string
name: retrieve_data
arguments: label: D65
type_infered: string

tool: D71: Test Failed

tool: D66: Yay it worked! WoooHoo!!!

tool: D78: Compare arrays:

tool: D33:   encode:    result:

tool: D72: %3d: 0x%02x == 0x%02x (%s)


tool: D16: true

tool: D26: false

tool: D65: 


assistant: ```c
void TestEmbedChar(char *image_data, int data_length, char *message, int resultf, char *resultem) {
  char *encoded = NULL;
  int rcembed;
  int idx;
  rcembed = embed(image_data, data_length, message, &encoded);
  if (rcembed != resultf) {
    printf("Test Failed\n");
    if (encoded != NULL) {
      free(encoded);
      encoded = NULL;
    }
    return;
  } else {
    printf("Yay it worked! WoooHoo!!!\n");
  }
  if (image_data != NULL) {
    printf("Compare arrays:\n");
    printf("  encode:    result:");
    for (idx = 0; idx < data_length; idx++) {
      if ((idx % 8) == 0) {
        printf("\n");
      }
      printf("%3d: 0x%02x == 0x%02x (%s)\n", idx, (unsigned char)encoded[idx], (unsigned char)resultem[idx], ((unsigned char)encoded[idx] == (unsigned char)resultem[idx] ? "true" : "false"));
    }
  }
  printf("\n\n");
  if (encoded != NULL) {
    free(encoded);
    encoded = NULL;
  }
}
```