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

```asm
<_get_zero_arr_size_other>:
  endbr64
  cmp    $0x4,%edi
  je     L154
  ja     L157
  cmp    $0x1,%edi
  je     L2
  cmp    $0x2,%edi
  jne    L122
  xor    %eax,%eax
  test   %rsi,%rsi
  je     L35
  lea    -0x1(%rdx),%eax
  lea    (%rsi,%rax,4),%rcx
  mov    %edx,%eax
  mov    (%rcx),%r10d
  test   %r10d,%r10d
  je     L210
  nopl   0x0(%rax)
L172:
  mov    0x4(%rcx),%r9d
  add    $0x4,%rcx
  add    $0x1,%eax
  test   %r9d,%r9d
  jne    L172
  ret
  nopl   0x0(%rax)
L157:
  cmp    $0x8,%edi
  jne    L124
  xor    %eax,%eax
  test   %rsi,%rsi
  je     L35
  lea    -0x1(%rdx),%eax
  lea    (%rsi,%rax,4),%rcx
  mov    %edx,%eax
  mov    (%rcx),%esi
  test   %esi,%esi
  je     L40
  nopw   0x0(%rax,%rax,1)
L182:
  mov    0x4(%rcx),%edx
  add    $0x4,%rcx
  add    $0x1,%eax
  test   %edx,%edx
  jne    L182
  ret
  nop
L2:
  xor    %eax,%eax
  test   %rsi,%rsi
  jne    L31
L35:
  ret
  nopl   0x0(%rax,%rax,1)
L124:
  cmp    $0x10,%edi
  je     L52
L122:
  sub    $0x8,%rsp
  mov    $0x5f,%esi
  lea    D3(%rip),%rdi
  call   <_throw_null_fn@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  ret
  nopl   (%rax)
L154:
  xor    %eax,%eax
  test   %rsi,%rsi
  je     L35
  lea    -0x1(%rdx),%eax
  lea    (%rsi,%rax,4),%rcx
  mov    %edx,%eax
  mov    (%rcx),%r8d
  test   %r8d,%r8d
  je     L104
  nopl   0x0(%rax)
L212:
  mov    0x4(%rcx),%edi
  add    $0x4,%rcx
  add    $0x1,%eax
  test   %edi,%edi
  jne    L212
  ret
  nopw   0x0(%rax,%rax,1)
L31:
  lea    -0x1(%rdx),%eax
  lea    (%rsi,%rax,4),%rcx
  mov    %edx,%eax
  mov    (%rcx),%edx
  test   %edx,%edx
  je     L56
  nop
L8:
  mov    0x4(%rcx),%r11d
  add    $0x4,%rcx
  add    $0x1,%eax
  test   %r11d,%r11d
  jne    L8
  ret
  nopl   0x0(%rax)
L52:
  xor    %eax,%eax
  test   %rsi,%rsi
  je     L35
  lea    -0x1(%rdx),%eax
  shl    $0x4,%rax
  add    %rax,%rsi
  mov    %edx,%eax
  fldt   (%rsi)
  fldz
  fld    %st(0)
  fxch   %st(2)
  fucomip %st(2),%st
  fstp   %st(1)
  jp     L183
  je     L34
  nop
L183:
  fldt   0x10(%rsi)
  add    $0x10,%rsi
  add    $0x1,%eax
  fld    %st(1)
  fxch   %st(1)
  fucomip %st(1),%st
  fstp   %st(0)
  jp     L183
  jne    L183
  fstp   %st(0)
  ret
  nopl   0x0(%rax)
L40:
  ret
  nopl   0x0(%rax)
L210:
  ret
  nopl   0x0(%rax)
L56:
  ret
  nopl   0x0(%rax)
L104:
  ret
L34:
  fstp   %st(0)
  ret
```

tool_calls: name: unpack_data
arguments: tag: D3
type_guessed: string

tool: D3: runtime_zeroterm.c

assistant: ```c
unsigned _get_zero_arr_size_other(unsigned t, const void *orig_x, unsigned orig_offset) {
  switch (t) {
  case 1: {
    const int8_t *_gres_x = (const int8_t *)orig_x;
    unsigned _gres = 0;
    if (_gres_x != 0) {
      _gres = orig_offset;
      _gres_x += orig_offset - 1;
      while (*_gres_x != 0) {
        _gres_x++;
        _gres++;
      }
    }
    return _gres;
  };
  case 2: {
    const int16_t *_gres_x = (const int16_t *)orig_x;
    unsigned _gres = 0;
    if (_gres_x != 0) {
      _gres = orig_offset;
      _gres_x += orig_offset - 1;
      while (*_gres_x != 0) {
        _gres_x++;
        _gres++;
      }
    }
    return _gres;
  };
  case 4: {
    const int32_t *_gres_x = (const int32_t *)orig_x;
    unsigned _gres = 0;
    if (_gres_x != 0) {
      _gres = orig_offset;
      _gres_x += orig_offset - 1;
      while (*_gres_x != 0) {
        _gres_x++;
        _gres++;
      }
    }
    return _gres;
  };
  case 8: {
    const int64_t *_gres_x = (const int64_t *)orig_x;
    unsigned _gres = 0;
    if (_gres_x != 0) {
      _gres = orig_offset;
      _gres_x += orig_offset - 1;
      while (*_gres_x != 0) {
        _gres_x++;
        _gres++;
      }
    }
    return _gres;
  };
  default:
    if (t == sizeof(long double)) {
      const long double *_gres_x = (const long double *)orig_x;
      unsigned _gres = 0;
      if (_gres_x != 0) {
        _gres = orig_offset;
        _gres_x += orig_offset - 1;
        while (*_gres_x != 0) {
          _gres_x++;
          _gres++;
        }
      }
      return _gres;
    };
    _throw_null_fn("runtime_zeroterm.c", 95);
    return 0;
  }
}
```