user: What would the C source look like for the assembly code provided here:

```asm
<edge_hash1>:
  endbr64
  sub    $0x28,%rsp
  mov    %rdi,%rcx
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  movabs $0xb0a090806040301,%rax
  mov    %rax,0xc(%rsp)
  movl   $0x12100f0d,0x14(%rsp)
  movzbl 0x2(%rdi),%edx
  cmp    %al,%dl
  je     L28
  mov    $0x1,%eax
  lea    0xb(%rsp),%rdi
L129:
  mov    %eax,%esi
  add    $0x1,%rax
  cmp    (%rdi,%rax,1),%dl
  jne    L129
  cmp    $0xa,%esi
  jg     L153
L299:
  movslq %esi,%rax
  lea    0xc(%rsp,%rax,1),%rdx
  mov    %rdx,%rax
  mov    %esi,%edi
  sub    %edx,%edi
L124:
  movzbl 0x1(%rax),%edx
  mov    %dl,(%rax)
  add    $0x1,%rax
  lea    (%rdi,%rax,1),%edx
  cmp    $0xa,%edx
  jle    L124
L153:
  movsbl 0x3(%rcx),%eax
  lea    (%rax,%rax,2),%eax
  lea    (%rsi,%rax,4),%r9d
  imul   $0x1b1200,%r9d,%r9d
  movzbl 0x6(%rcx),%edx
  cmp    0xc(%rsp),%dl
  je     L74
  mov    $0x1,%eax
  lea    0xb(%rsp),%rdi
L47:
  mov    %eax,%esi
  add    $0x1,%rax
  cmp    (%rdi,%rax,1),%dl
  jne    L47
  cmp    $0x9,%esi
  jg     L111
L200:
  movslq %esi,%rax
  lea    0xc(%rsp,%rax,1),%rdx
  mov    %rdx,%rax
  mov    %esi,%edi
  sub    %edx,%edi
L42:
  movzbl 0x1(%rax),%edx
  mov    %dl,(%rax)
  add    $0x1,%rax
  lea    (%rdi,%rax,1),%edx
  cmp    $0x9,%edx
  jle    L42
L111:
  movsbl 0x7(%rcx),%eax
  lea    (%rax,%rax,4),%edx
  lea    (%rax,%rdx,2),%r8d
  add    %esi,%r8d
  imul   $0x13b00,%r8d,%r8d
  add    %r9d,%r8d
  movzbl 0x8(%rcx),%edx
  cmp    0xc(%rsp),%dl
  je     L294
  mov    $0x1,%eax
  lea    0xb(%rsp),%rdi
L146:
  mov    %eax,%esi
  add    $0x1,%rax
  cmp    (%rdi,%rax,1),%dl
  jne    L146
  cmp    $0x8,%esi
  jg     L142
L248:
  movslq %esi,%rax
  lea    0xc(%rsp,%rax,1),%rdx
  mov    %rdx,%rax
  mov    %esi,%edi
  sub    %edx,%edi
L270:
  movzbl 0x1(%rax),%edx
  mov    %dl,(%rax)
  add    $0x1,%rax
  lea    (%rdi,%rax,1),%edx
  cmp    $0x8,%edx
  jle    L270
L142:
  movsbl 0x9(%rcx),%eax
  lea    (%rax,%rax,4),%eax
  lea    (%rsi,%rax,2),%r9d
  imul   $0xfc0,%r9d,%r9d
  add    %r8d,%r9d
  movzbl 0xc(%rcx),%edx
  cmp    0xc(%rsp),%dl
  je     L247
  mov    $0x1,%eax
  lea    0xb(%rsp),%rdi
L182:
  mov    %eax,%esi
  add    $0x1,%rax
  cmp    (%rdi,%rax,1),%dl
  jne    L182
  cmp    $0x7,%esi
  jg     L79
L306:
  movslq %esi,%rax
  lea    0xc(%rsp,%rax,1),%rdx
  mov    %rdx,%rax
  mov    %esi,%edi
  sub    %edx,%edi
L202:
  movzbl 0x1(%rax),%edx
  mov    %dl,(%rax)
  add    $0x1,%rax
  lea    (%rdi,%rax,1),%edx
  cmp    $0x7,%edx
  jle    L202
L79:
  movsbl 0xd(%rcx),%eax
  lea    (%rax,%rax,8),%r8d
  add    %esi,%r8d
  imul   $0xe0,%r8d,%r8d
  add    %r9d,%r8d
  movzbl 0x10(%rcx),%edx
  cmp    0xc(%rsp),%dl
  je     L164
  mov    $0x1,%eax
  lea    0xb(%rsp),%rdi
L205:
  mov    %eax,%esi
  add    $0x1,%rax
  cmp    (%rdi,%rax,1),%dl
  jne    L205
  cmp    $0x6,%esi
  jg     L27
L65:
  movslq %esi,%rax
  lea    0xc(%rsp,%rax,1),%rdx
  mov    %rdx,%rax
  mov    %esi,%edi
  sub    %edx,%edi
L36:
  movzbl 0x1(%rax),%edx
  mov    %dl,(%rax)
  add    $0x1,%rax
  lea    (%rdi,%rax,1),%edx
  cmp    $0x6,%edx
  jle    L36
L27:
  movsbl 0x11(%rcx),%eax
  lea    (%rsi,%rax,8),%eax
  imul   $0xe,%eax,%eax
  add    %eax,%r8d
  movzbl 0x12(%rcx),%esi
  cmp    0xc(%rsp),%sil
  je     L288
  mov    $0x1,%eax
  lea    0xb(%rsp),%rdi
L177:
  mov    %eax,%edx
  add    $0x1,%rax
  cmp    (%rdi,%rax,1),%sil
  jne    L177
  cmp    $0x5,%edx
  jg     L187
L240:
  mov    %edx,%eax
L283:
  add    $0x1,%eax
  cmp    $0x5,%eax
  jle    L283
L187:
  movsbl 0x13(%rcx),%ecx
  lea    (%rdx,%rcx,8),%eax
  sub    %ecx,%eax
  add    %r8d,%eax
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L131
  add    $0x28,%rsp
  ret
L28:
  mov    $0x0,%esi
  jmp    L299
L74:
  mov    $0x0,%esi
  jmp    L200
L294:
  mov    $0x0,%esi
  jmp    L248
L247:
  mov    $0x0,%esi
  jmp    L306
L164:
  mov    $0x0,%esi
  jmp    L65
L288:
  mov    $0x0,%edx
  jmp    L240
L131:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int edge_hash1(const char *cubestr) {
  char positions[] = {1, 3, 4, 6, 8, 9, 10, 11, 13, 15, 16, 18};
  int index = 0;
  int pos, rot, num, i;
  const char *cubie;
  cubie = ((char *)cubestr + (1 << 1));
  num = cubie[0];
  pos = 0;
  while (num != positions[pos])
    ++pos;
  for (i = pos; i < 11; ++i)
    positions[i] = positions[i + 1];
  rot = cubie[1] * 12;
  index += (pos + rot) * 1774080;
  cubie = ((char *)cubestr + (3 << 1));
  num = cubie[0];
  pos = 0;
  while (num != positions[pos])
    ++pos;
  for (i = pos; i < 10; ++i)
    positions[i] = positions[i + 1];
  rot = cubie[1] * 11;
  index += (pos + rot) * 80640;
  cubie = ((char *)cubestr + (4 << 1));
  num = cubie[0];
  pos = 0;
  while (num != positions[pos])
    ++pos;
  for (i = pos; i < 9; ++i)
    positions[i] = positions[i + 1];
  rot = cubie[1] * 10;
  index += (pos + rot) * 4032;
  cubie = ((char *)cubestr + (6 << 1));
  num = cubie[0];
  pos = 0;
  while (num != positions[pos])
    ++pos;
  for (i = pos; i < 8; ++i)
    positions[i] = positions[i + 1];
  rot = cubie[1] * 9;
  index += (pos + rot) * 224;
  cubie = ((char *)cubestr + (8 << 1));
  num = cubie[0];
  pos = 0;
  while (num != positions[pos])
    ++pos;
  for (i = pos; i < 7; ++i)
    positions[i] = positions[i + 1];
  rot = cubie[1] * 8;
  index += (pos + rot) * 14;
  cubie = ((char *)cubestr + (9 << 1));
  num = cubie[0];
  pos = 0;
  while (num != positions[pos])
    ++pos;
  for (i = pos; i < 6; ++i)
    positions[i] = positions[i + 1];
  rot = cubie[1] * 7;
  index += (pos + rot);
  return index;
}
```