user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<omb_utils_find_and_mount>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    D11(%rip),%rbx
  mov    %rbx,%rdi
  sub    $0x228,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x218(%rsp)
  xor    %eax,%eax
  call   <opendir@plt>
  test   %rax,%rax
  je     L43
  mov    %rax,%rbp
  xor    %eax,%eax
  lea    D5(%rip),%r12
  call   <omb_utils_create_dir_tree@plt>
  lea    D10(%rip),%r14
  lea    D40(%rip),%r13
  jmp    L29
  nopl   0x0(%rax)
L94:
  mov    (%r15),%rdi
  call   <strlen@plt>
  cmp    $0x4,%eax
  je     L2
L29:
  mov    %rbp,%rdi
  call   <readdir@plt>
  mov    %rax,%r15
  test   %rax,%rax
  jne    L94
  mov    %rbp,%rdi
  call   <closedir@plt>
  mov    $0xffffffff,%eax
L32:
  mov    0x218(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L31
  add    $0x228,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L2:
  mov    (%r15),%rdi
  mov    $0x2,%edx
  mov    %r12,%rsi
  call   <memcmp@plt>
  test   %rax,%rax
  jne    L29
  lea    0x10(%rsp),%r8
  mov    (%r15),%rcx
  mov    %rbx,%rdx
  mov    %r14,%rsi
  mov    %r8,%rdi
  mov    %r8,0x8(%rsp)
  call   <sprintf@plt>
  mov    0x8(%rsp),%rdx
  mov    $0x2,%edi
  lea    D54(%rip),%rsi
  call   <omb_log@plt>
  mov    %r13,%rdi
  call   <omb_utils_umount@plt>
  mov    0x8(%rsp),%rdi
  mov    %r13,%rsi
  call   <omb_utils_mount@plt>
  test   %rax,%rax
  jne    L29
  lea    0x110(%rsp),%r15
  lea    D44(%rip),%rcx
  mov    %r13,%rdx
  mov    %r14,%rsi
  mov    %r15,%rdi
  call   <sprintf@plt>
  mov    %r15,%rdi
  call   <omb_utils_dir_exists@plt>
  mov    0x8(%rsp),%r8
  test   %rax,%rax
  jne    L119
  mov    %r13,%rdi
  call   <omb_utils_umount@plt>
  cmp    $0xffffffff,%eax
  jne    L29
  mov    %r13,%rdx
  lea    D55(%rip),%rsi
  xor    %edi,%edi
  call   <omb_log@plt>
  jmp    L29
L43:
  mov    $0xffffffff,%eax
  jmp    L32
L119:
  mov    %r8,%rdx
  lea    D34(%rip),%rsi
  mov    $0x2,%edi
  call   <omb_log@plt>
  mov    %rbp,%rdi
  call   <closedir@plt>
  xor    %eax,%eax
  jmp    L32
L31:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D11
type_infered: string
name: read_data
arguments: label: D5
type_infered: string
name: read_data
arguments: label: D10
type_infered: string
name: read_data
arguments: label: D40
type_infered: string
name: read_data
arguments: label: D54
type_infered: string
name: read_data
arguments: label: D44
type_infered: string
name: read_data
arguments: label: D55
type_infered: string
name: read_data
arguments: label: D34
type_infered: string

tool: D11: /dev

tool: D5: sd

tool: D10: %s/%s

tool: D40: /omb

tool: D54: check device %s

tool: D44: open-multiboot

tool: D55: cannot umount %s

tool: D34: found data on device %s

assistant: ```c
int omb_utils_find_and_mount() {
  struct dirent *dir;
  DIR *fd = opendir("/dev");
  if (fd) {
    omb_utils_create_dir_tree();
    while ((dir = readdir(fd)) != NULL) {
      if (strlen(dir->d_name) == 4 && memcmp(dir->d_name, "sd", 2) == 0) {
        char device[255];
        sprintf(device, "%s/%s", "/dev", dir->d_name);
        omb_log(2, "check device %s", device);
        omb_utils_umount("/omb");
        if (omb_utils_mount(device, "/omb") == 0) {
          char datadir[255];
          sprintf(datadir, "%s/%s", "/omb", "open-multiboot");
          if (omb_utils_dir_exists(datadir)) {
            omb_log(2, "found data on device %s", device);
            closedir(fd);
            return 0;
          }
          if (omb_utils_umount("/omb") == -1)
            omb_log(0, "cannot umount %s", "/omb");
        }
      }
    }
    closedir(fd);
  }
  return -1;
}
```