user: Translate the below assembly code into C programming language:

```asm
<bollywood_game>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x270,%rsp
  mov    %rdi,-0x268(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movabs $0x4f4f57594c4c4f42,%rax
  mov    $0x44,%edx
  mov    %rax,-0xb0(%rbp)
  mov    %rdx,-0xa8(%rbp)
  movq   $0x0,-0xa0(%rbp)
  movq   $0x0,-0x98(%rbp)
  movq   $0x0,-0x90(%rbp)
  movq   $0x0,-0x88(%rbp)
  movw   $0x0,-0x80(%rbp)
  mov    -0x268(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x250(%rbp)
  movl   $0x20,-0x24c(%rbp)
  movl   $0x0,-0x25c(%rbp)
  jmp    L104
L221:
  mov    -0x25c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x268(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x40,%al
  jle    L115
  mov    -0x25c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x268(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x5a,%al
  jg     L115
  mov    -0x25c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x268(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %eax,%edx
  mov    -0x24c(%rbp),%eax
  lea    (%rdx,%rax,1),%ecx
  mov    -0x25c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x268(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
L115:
  addl   $0x1,-0x25c(%rbp)
L104:
  mov    -0x25c(%rbp),%eax
  cmp    -0x250(%rbp),%eax
  jl     L221
  movl   $0x0,-0x25c(%rbp)
  jmp    L271
L110:
  mov    -0x25c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x268(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  jne    L218
  mov    -0x25c(%rbp),%eax
  cltq
  movl   $0x1,-0x240(%rbp,%rax,4)
  jmp    L61
L218:
  mov    -0x25c(%rbp),%eax
  cltq
  movl   $0x0,-0x240(%rbp,%rax,4)
L61:
  addl   $0x1,-0x25c(%rbp)
L271:
  mov    -0x25c(%rbp),%eax
  cmp    -0x250(%rbp),%eax
  jl     L110
  movl   $0x9,-0x258(%rbp)
  movl   $0x0,-0x254(%rbp)
  jmp    L119
L54:
  lea    D31(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x9,%eax
  sub    -0x258(%rbp),%eax
  mov    %eax,-0x25c(%rbp)
  jmp    L6
L32:
  mov    -0x25c(%rbp),%eax
  cltq
  movzbl -0xb0(%rbp,%rax,1),%eax
  movsbl %al,%eax
  mov    %eax,%esi
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x25c(%rbp)
L6:
  cmpl   $0x8,-0x25c(%rbp)
  jle    L32
  lea    D42(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x25c(%rbp)
  jmp    L203
L239:
  mov    -0x25c(%rbp),%eax
  cltq
  mov    -0x240(%rbp,%rax,4),%eax
  cmp    $0x1,%eax
  jne    L250
  mov    -0x25c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x268(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <putchar@plt>
  jmp    L141
L250:
  mov    $0x5f,%edi
  call   <putchar@plt>
L141:
  mov    $0x20,%edi
  call   <putchar@plt>
  addl   $0x1,-0x25c(%rbp)
L203:
  mov    -0x25c(%rbp),%eax
  cmp    -0x250(%rbp),%eax
  jl     L239
  lea    D24(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x70(%rbp),%rax
  mov    %rax,%rdi
  call   <gets@plt>
  lea    -0x70(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x248(%rbp)
  movl   $0x0,-0x25c(%rbp)
  jmp    L38
L42:
  mov    -0x25c(%rbp),%eax
  cltq
  movzbl -0x70(%rbp,%rax,1),%eax
  cmp    $0x40,%al
  jle    L132
  mov    -0x25c(%rbp),%eax
  cltq
  movzbl -0x70(%rbp,%rax,1),%eax
  cmp    $0x5a,%al
  jg     L132
  mov    -0x25c(%rbp),%eax
  cltq
  movzbl -0x70(%rbp,%rax,1),%eax
  mov    %eax,%edx
  mov    -0x24c(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  mov    -0x25c(%rbp),%eax
  cltq
  mov    %dl,-0x70(%rbp,%rax,1)
L132:
  addl   $0x1,-0x25c(%rbp)
L38:
  mov    -0x25c(%rbp),%eax
  cmp    -0x248(%rbp),%eax
  jl     L42
  mov    -0x248(%rbp),%edx
  lea    -0x70(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <shift_table@plt>
  lea    -0x240(%rbp),%rdx
  lea    -0x70(%rbp),%rcx
  mov    -0x268(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <horspool@plt>
  mov    %eax,-0x244(%rbp)
  cmpl   $0xffffffff,-0x244(%rbp)
  jne    L100
  lea    D55(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  subl   $0x1,-0x258(%rbp)
  jmp    L119
L100:
  movl   $0x0,-0x25c(%rbp)
  movl   $0x1,-0x254(%rbp)
  jmp    L215
L268:
  mov    -0x25c(%rbp),%eax
  cltq
  mov    -0x240(%rbp,%rax,4),%eax
  test   %eax,%eax
  jne    L2
  movl   $0x0,-0x254(%rbp)
L2:
  addl   $0x1,-0x25c(%rbp)
L215:
  mov    -0x25c(%rbp),%eax
  cmp    -0x250(%rbp),%eax
  jl     L268
L119:
  cmpl   $0x0,-0x258(%rbp)
  jle    L170
  cmpl   $0x0,-0x254(%rbp)
  je     L54
L170:
  cmpl   $0x1,-0x254(%rbp)
  jne    L185
  mov    -0x268(%rbp),%rax
  mov    %rax,%rsi
  lea    D66(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L207
L185:
  mov    -0x268(%rbp),%rax
  mov    %rax,%rsi
  lea    D32(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L207:
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L173
  call   <__stack_chk_fail@plt>
L173:
  leave
  ret
```

tool_calls: name: read_data
arguments: label: D31
datatype: string
name: read_data
arguments: label: D10
datatype: string
name: read_data
arguments: label: D42
datatype: string
name: read_data
arguments: label: D24
datatype: string
name: read_data
arguments: label: D55
datatype: string
name: read_data
arguments: label: D66
datatype: string
name: read_data
arguments: label: D32
datatype: string

tool: D31: Number of chances left : 

tool: D10: %c 

tool: D42: 

	Movie name is : 

		

tool: D24: 

Enetr the letter : 

tool: D55: Letter not found!

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

	Movie name : %s

tool: D32: You have run out of chances! Sorry you lose 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);
}
```