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

```asm
<str_case_blind_compare_sub_>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %rcx,-0x30(%rbp)
  mov    %r8,-0x38(%rbp)
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x38(%rbp),%rax
  movl   $0x0,(%rax)
  mov    -0x8(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jge    L306
  movl   $0x0,-0xc(%rbp)
  jmp    L67
L96:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0xe(%rbp)
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0xd(%rbp)
  movzbl -0xe(%rbp),%eax
  cmp    -0xd(%rbp),%al
  je     L260
  cmpb   $0x60,-0xe(%rbp)
  jle    L199
  cmpb   $0x7a,-0xe(%rbp)
  jg     L199
  andb   $0xdf,-0xe(%rbp)
L199:
  cmpb   $0x60,-0xd(%rbp)
  jle    L181
  cmpb   $0x7a,-0xd(%rbp)
  jg     L181
  andb   $0xdf,-0xd(%rbp)
L181:
  movzbl -0xe(%rbp),%eax
  cmp    -0xd(%rbp),%al
  jge    L99
  mov    -0x38(%rbp),%rax
  movl   $0xffffffff,(%rax)
  jmp    L294
L99:
  movzbl -0xe(%rbp),%eax
  cmp    -0xd(%rbp),%al
  jle    L260
  mov    -0x38(%rbp),%rax
  movl   $0x1,(%rax)
  jmp    L294
L260:
  addl   $0x1,-0xc(%rbp)
L67:
  mov    -0xc(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  jl     L96
  mov    -0x8(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  jmp    L147
L17:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L233
  mov    -0x38(%rbp),%rax
  movl   $0xffffffff,(%rax)
  jmp    L294
L233:
  addl   $0x1,-0xc(%rbp)
L147:
  mov    -0xc(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jl     L17
  jmp    L109
L306:
  movl   $0x0,-0xc(%rbp)
  jmp    L138
L174:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0xe(%rbp)
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0xd(%rbp)
  movzbl -0xe(%rbp),%eax
  cmp    -0xd(%rbp),%al
  je     L153
  cmpb   $0x60,-0xe(%rbp)
  jle    L40
  cmpb   $0x7a,-0xe(%rbp)
  jg     L40
  andb   $0xdf,-0xe(%rbp)
L40:
  cmpb   $0x60,-0xd(%rbp)
  jle    L60
  cmpb   $0x7a,-0xd(%rbp)
  jg     L60
  andb   $0xdf,-0xd(%rbp)
L60:
  movzbl -0xe(%rbp),%eax
  cmp    -0xd(%rbp),%al
  jge    L30
  mov    -0x38(%rbp),%rax
  movl   $0xffffffff,(%rax)
  jmp    L294
L30:
  movzbl -0xe(%rbp),%eax
  cmp    -0xd(%rbp),%al
  jle    L153
  mov    -0x38(%rbp),%rax
  movl   $0x1,(%rax)
  jmp    L294
L153:
  addl   $0x1,-0xc(%rbp)
L138:
  mov    -0xc(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jl     L174
  mov    -0x4(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  jmp    L261
L159:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L55
  mov    -0x38(%rbp),%rax
  movl   $0x1,(%rax)
  jmp    L294
L55:
  addl   $0x1,-0xc(%rbp)
L261:
  mov    -0xc(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  jl     L159
L109:
  nop
L294:
  pop    %rbp
  ret
```

assistant: ```c
void str_case_blind_compare_sub_(char *test_name, int *len_test, char *model_name, int *len_model, int *result) {
  int i, ltest = *len_test, lmod = *len_model;
  char c1, c2;
  *result = 0;
  if (ltest < lmod) {
    for (i = 0; i < ltest; i++) {
      c1 = test_name[i];
      c2 = model_name[i];
      if (c1 != c2) {
        if (c1 >= 'a' && c1 <= 'z') {
          c1 &= 0xDF;
        }
        if (c2 >= 'a' && c2 <= 'z') {
          c2 &= 0xDF;
        }
        if (c1 < c2) {
          *result = -1;
          return;
        } else if (c1 > c2) {
          *result = 1;
          return;
        }
      }
    }
    for (i = ltest; i < lmod; i++) {
      if (model_name[i] != ' ') {
        *result = -1;
        return;
      }
    }
  } else {
    for (i = 0; i < lmod; i++) {
      c1 = test_name[i];
      c2 = model_name[i];
      if (c1 != c2) {
        if (c1 >= 'a' && c1 <= 'z') {
          c1 &= 0xDF;
        }
        if (c2 >= 'a' && c2 <= 'z') {
          c2 &= 0xDF;
        }
        if (c1 < c2) {
          *result = -1;
          return;
        } else if (c1 > c2) {
          *result = 1;
          return;
        }
      }
    }
    for (i = lmod; i < ltest; i++) {
      if (test_name[i] != ' ') {
        *result = 1;
        return;
      }
    }
  }
  return;
}
```