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

```asm
<ElemanSil>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %edx,-0x30(%rbp)
  movl   $0xffffffff,-0x1c(%rbp)
  mov    -0x30(%rbp),%edx
  mov    -0x2c(%rbp),%ecx
  mov    -0x28(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <CocuguVarMi@plt>
  mov    %eax,-0x18(%rbp)
  cmpl   $0x1,-0x18(%rbp)
  jne    L6
  mov    -0x30(%rbp),%eax
  add    $0x1,%eax
  lea    (%rax,%rax,1),%ecx
  mov    -0x2c(%rbp),%edx
  mov    -0x28(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <EnKucukBul@plt>
  mov    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    -0x30(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x14(%rbp),%edx
  mov    -0x2c(%rbp),%ecx
  mov    -0x28(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <ElemanSil>
  jmp    L69
L6:
  cmpl   $0x2,-0x18(%rbp)
  jne    L58
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x30(%rbp),%eax
  add    %eax,%eax
  lea    0x1(%rax),%edx
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  lea    (%rcx,%rax,1),%rbx
  mov    -0x2c(%rbp),%ecx
  mov    -0x28(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <ElemanSil>
  mov    %eax,(%rbx)
  mov    -0x1c(%rbp),%eax
  jmp    L3
L58:
  cmpl   $0x3,-0x18(%rbp)
  jne    L21
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x30(%rbp),%eax
  add    $0x1,%eax
  lea    (%rax,%rax,1),%edx
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  lea    (%rcx,%rax,1),%rbx
  mov    -0x2c(%rbp),%ecx
  mov    -0x28(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <ElemanSil>
  mov    %eax,(%rbx)
  mov    -0x1c(%rbp),%eax
  jmp    L3
L21:
  cmpl   $0x4,-0x18(%rbp)
  jne    L69
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movl   $0xffffffff,(%rax)
  mov    -0x1c(%rbp),%eax
  jmp    L3
L69:
  mov    -0x1c(%rbp),%eax
L3:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
int ElemanSil(int *BST, int elemanSayisi, int index) {
  int temp = -1;
  int cocukVarMi = CocuguVarMi(BST, elemanSayisi, index);
  int sagdakiEnKucukIndex;
  if (cocukVarMi == 1) {
    sagdakiEnKucukIndex = EnKucukBul(BST, 2 * index + 2, elemanSayisi);
    BST[index] = BST[sagdakiEnKucukIndex];
    ElemanSil(BST, elemanSayisi, sagdakiEnKucukIndex);
  } else if (cocukVarMi == 2) {
    temp = BST[index];
    BST[index] = ElemanSil(BST, elemanSayisi, 2 * index + 1);
    return temp;
  } else if (cocukVarMi == 3) {
    temp = BST[index];
    BST[index] = ElemanSil(BST, elemanSayisi, 2 * index + 2);
    return temp;
  } else if (cocukVarMi == 4) {
    temp = BST[index];
    BST[index] = -1;
    return temp;
  }
  return temp;
}
```