user: 请将以下的汇编代码转换成C语言代码：

```asm
<bollywood_game>:
  endbr64
  push   %r15
  xor    %r10d,%r10d
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x278,%rsp
  movdqa D5(%rip),%xmm0
  mov    %rdi,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x268(%rsp)
  xor    %eax,%eax
  movaps %xmm0,0x1c0(%rsp)
  pxor   %xmm0,%xmm0
  mov    %r10w,0x1f0(%rsp)
  movaps %xmm0,0x1d0(%rsp)
  movaps %xmm0,0x1e0(%rsp)
  call   <strlen@plt>
  mov    %eax,0x10(%rsp)
  test   %eax,%eax
  jle    L188
  mov    0x10(%rsp),%edi
  mov    0x8(%rsp),%rcx
  lea    -0x1(%rdi),%edx
  mov    %rcx,%rax
  mov    %rdx,%r12
  lea    0x1(%rcx,%rdx,1),%rsi
  nopl   (%rax)
L183:
  movzbl (%rax),%edx
  lea    -0x41(%rdx),%ecx
  cmp    $0x19,%cl
  ja     L165
  add    $0x20,%edx
  mov    %dl,(%rax)
L165:
  add    $0x1,%rax
  cmp    %rsi,%rax
  jne    L183
  mov    0x10(%rsp),%ecx
  mov    0x8(%rsp),%rsi
  xor    %eax,%eax
  lea    0x30(%rsp),%rbp
  nopl   0x0(%rax)
L154:
  xor    %edx,%edx
  cmpb   $0x20,(%rsi,%rax,1)
  sete   %dl
  mov    %edx,0x0(%rbp,%rax,4)
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L154
L90:
  mov    %r12d,%r12d
  movl   $0x9,0x4(%rsp)
  lea    D65(%rip),%r13
  lea    0x200(%rsp),%r14
  lea    0x34(%rsp,%r12,4),%rax
  mov    %rax,0x28(%rsp)
  lea    0x1c0(%rsp),%rax
  mov    %rax,0x18(%rsp)
  lea    0x1c1(%rsp),%rax
  mov    %rax,0x20(%rsp)
  nopl   0x0(%rax)
L36:
  lea    D21(%rip),%rdi
  xor    %eax,%eax
  mov    $0x9,%ebx
  call   <printf@plt>
  mov    0x4(%rsp),%eax
  mov    0x18(%rsp),%rcx
  sub    %eax,%ebx
  sub    $0x1,%eax
  movslq %ebx,%rbx
  mov    %eax,0x14(%rsp)
  lea    (%rcx,%rbx,1),%r15
  add    0x20(%rsp),%rbx
  add    %rax,%rbx
  nopl   0x0(%rax)
L145:
  movsbl (%r15),%esi
  mov    %r13,%rdi
  xor    %eax,%eax
  add    $0x1,%r15
  call   <printf@plt>
  cmp    %rbx,%r15
  jne    L145
  lea    D12(%rip),%rdi
  xor    %eax,%eax
  xor    %ebx,%ebx
  call   <printf@plt>
  mov    0x10(%rsp),%r9d
  mov    0x8(%rsp),%r15
  test   %r9d,%r9d
  jg     L20
  jmp    L12
L69:
  mov    $0x5f,%edi
  call   <putchar@plt>
L115:
  mov    $0x20,%edi
  call   <putchar@plt>
  lea    0x1(%rbx),%rax
  cmp    %r12,%rbx
  je     L12
  mov    %rax,%rbx
L20:
  cmpl   $0x1,0x0(%rbp,%rbx,4)
  jne    L69
  movsbl (%r15,%rbx,1),%edi
  call   <putchar@plt>
  jmp    L115
  nopl   0x0(%rax,%rax,1)
L12:
  lea    D9(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r14,%rdi
  call   <gets@plt>
  mov    %r14,%rdi
  call   <strlen@plt>
  mov    %eax,%esi
  test   %eax,%eax
  jle    L37
  lea    -0x1(%rax),%eax
  mov    %r14,%rdx
  lea    0x201(%rsp,%rax,1),%r8
  nopw   0x0(%rax,%rax,1)
L2:
  movzbl (%rdx),%eax
  lea    -0x41(%rax),%ecx
  cmp    $0x19,%cl
  ja     L121
  add    $0x20,%eax
  mov    %al,(%rdx)
L121:
  add    $0x1,%rdx
  cmp    %rdx,%r8
  jne    L2
L37:
  mov    %r14,%rdi
  call   <shift_table@plt>
  mov    0x8(%rsp),%rdi
  mov    %rbp,%rdx
  mov    %r14,%rsi
  call   <horspool@plt>
  cmp    $0xffffffff,%eax
  je     L82
  mov    0x10(%rsp),%r8d
  test   %r8d,%r8d
  jle    L67
  mov    0x28(%rsp),%rsi
  mov    %rbp,%rax
  mov    $0x1,%edx
  xor    %ecx,%ecx
  nopw   0x0(%rax,%rax,1)
L126:
  mov    (%rax),%edi
  test   %edi,%edi
  cmove  %ecx,%edx
  add    $0x4,%rax
  cmp    %rax,%rsi
  jne    L126
  mov    %edx,%eax
  xor    $0x1,%eax
  and    $0x1,%eax
L219:
  mov    0x4(%rsp),%ecx
  test   %ecx,%ecx
  jle    L108
  test   %al,%al
  jne    L36
L108:
  cmp    $0x1,%edx
  je     L67
  mov    0x8(%rsp),%rsi
  lea    D28(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
L129:
  mov    0x268(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L138
  add    $0x278,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L82:
  lea    D7(%rip),%rdi
  call   <puts@plt>
  mov    0x14(%rsp),%eax
  xor    %edx,%edx
  mov    %eax,0x4(%rsp)
  mov    $0x1,%eax
  jmp    L219
L67:
  mov    0x8(%rsp),%rsi
  lea    D60(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L129
L188:
  lea    0x30(%rsp),%rbp
  lea    -0x1(%rax),%r12d
  jmp    L90
L138:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D5
type_infered: byte[16]
name: disassemble_data
arguments: data_label: D65
type_infered: string
name: disassemble_data
arguments: data_label: D21
type_infered: string
name: disassemble_data
arguments: data_label: D12
type_infered: string
name: disassemble_data
arguments: data_label: D9
type_infered: string
name: disassemble_data
arguments: data_label: D28
type_infered: string
name: disassemble_data
arguments: data_label: D7
type_infered: string
name: disassemble_data
arguments: data_label: D60
type_infered: string

tool: {"D5": [0x42,0x4f,0x4c,0x4c,0x59,0x57,0x4f,0x4f,0x44,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: D65: %c 

tool: D21: Number of chances left : 

tool: D12: 

	Movie name is : 

		

tool: D9: 

Enetr the letter : 

tool: D28: You have run out of chances! Sorry you lose the game...
	Movie name : %s

tool: D7: Letter not found!

tool: D60: Correct movie! You have won the game! 

	Movie name : %s

assistant: ```c
void bollywood_game(char text[100]) {
  int n, shadow[100], i, chance, win, m, result, temp;
  char pattern[100], name[50] = "BOLLYWOOD";
  n = strlen(text);
  temp = 'a' - 'A';
  for (i = 0; i < n; i++)
    if (text[i] >= 'A' && text[i] <= 'Z')
      text[i] += temp;
  for (i = 0; i < n; i++) {
    if (text[i] == ' ')
      shadow[i] = 1;
    else
      shadow[i] = 0;
  }
  for (chance = 9, win = 0; chance > 0 && win == 0;) {
    printf("Number of chances left : ");
    for (i = 9 - chance; i < 9; i++)
      printf("%c ", name[i]);
    printf("\n\n\tMovie name is : \n\n\t\t");
    for (i = 0; i < n; i++) {
      if (shadow[i] == 1)
        printf("%c", text[i]);
      else
        printf("%c", '_');
      printf(" ");
    }
    printf("\n\nEnetr the letter : ");
    gets(pattern);
    m = strlen(pattern);
    for (i = 0; i < m; i++)
      if (pattern[i] >= 'A' && pattern[i] <= 'Z')
        pattern[i] += temp;
    shift_table(pattern, m);
    result = horspool(text, pattern, shadow);
    if (result == -1) {
      printf("Letter not found!\n");
      chance--;
    } else
      for (i = 0, win = 1; i < n; i++)
        if (shadow[i] == 0)
          win = 0;
  }
  if (win == 1)
    printf("Correct movie! You have won the game! \n\n\tMovie name : %s", text);
  else
    printf("You have run out of chances! Sorry you lose the game...\n\tMovie name : %s", text);
}
```