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

```asm
<main>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x40,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  lea    D33(%rip),%rdi
  call   <puts@plt>
  lea    0x8(%rsp),%rsi
  lea    D14(%rip),%rdi
  call   <scanf@plt>
  lea    D60(%rip),%rdi
  call   <puts@plt>
  mov    0x8(%rsp),%r9d
  test   %r9d,%r9d
  jle    L150
  lea    0x10(%rsp),%rbp
  mov    $0x0,%ebx
  lea    D14(%rip),%r12
L44:
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <scanf@plt>
  add    $0x1,%ebx
  mov    0x8(%rsp),%r9d
  add    $0x4,%rbp
  cmp    %ebx,%r9d
  jg     L44
L150:
  cmp    $0x1,%r9d
  jle    L123
  lea    0x10(%rsp),%r11
  lea    -0x2(%r9),%r10d
  add    $0x2,%r10
  mov    %r11,%rsi
  mov    $0x1,%r8d
  lea    -0x1(%r9),%ebx
  lea    0x14(%rsp),%r11
  jmp    L145
L184:
  add    $0x4,%rax
  cmp    %rdi,%rax
  je     L122
L13:
  mov    (%rsi),%edx
  mov    0x4(%rax),%ecx
  cmp    %ecx,%edx
  jle    L184
  mov    %ecx,(%rsi)
  mov    %edx,0x4(%rax)
  jmp    L184
L122:
  add    $0x1,%r8
  add    $0x4,%rsi
  cmp    %r10,%r8
  je     L123
L145:
  cmp    %r8d,%r9d
  jle    L122
  mov    %ebx,%eax
  sub    %r8d,%eax
  lea    -0x1(%r8,%rax,1),%rax
  lea    (%r11,%rax,4),%rdi
  mov    %rsi,%rax
  jmp    L13
L123:
  lea    D81(%rip),%rdi
  call   <puts@plt>
  cmpl   $0x0,0x8(%rsp)
  jle    L15
  mov    $0x0,%ebx
  lea    D92(%rip),%rbp
L189:
  mov    0x10(%rsp,%rbx,4),%esi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x1,%rbx
  cmp    %ebx,0x8(%rsp)
  jg     L189
L15:
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    D45(%rip),%rdi
  call   <puts@plt>
  lea    0xc(%rsp),%rsi
  lea    D14(%rip),%rdi
  call   <scanf@plt>
  mov    0x8(%rsp),%ecx
  sub    $0x1,%ecx
  js     L155
  mov    0xc(%rsp),%edi
  mov    $0x0,%esi
  jmp    L151
L11:
  lea    0x1(%rax),%esi
L84:
  cmp    %esi,%ecx
  jl     L155
L151:
  lea    (%rsi,%rcx,1),%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  movslq %eax,%rdx
  mov    0x10(%rsp,%rdx,4),%edx
  cmp    %edi,%edx
  je     L10
  jle    L11
  lea    -0x1(%rax),%ecx
  jmp    L84
L10:
  lea    0x1(%rax),%edx
  mov    %edi,%esi
  lea    D20(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L45
L155:
  lea    D96(%rip),%rdi
  call   <puts@plt>
L45:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L133
  mov    $0x0,%eax
  add    $0x40,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L133:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D33
type: string
name: parse_data
arguments: tag: D14
type: string
name: parse_data
arguments: tag: D60
type: string
name: parse_data
arguments: tag: D81
type: string
name: parse_data
arguments: tag: D92
type: string
name: parse_data
arguments: tag: D45
type: string
name: parse_data
arguments: tag: D20
type: string
name: parse_data
arguments: tag: D96
type: string

tool: D33: 
Enter no of elements

tool: D14: %d

tool: D60: 
Enter the elements

tool: D81: 
The Sorted array is 

tool: D92: %d	

tool: D45: 
Enter the Key element

tool: D20: 
Key element %d found at position %d


tool: D96: 
Key element not found

assistant: ```c
int main(void) {
  int iNum, i, j, k, iaArr[10], iTemp, iKey, iPos, iLow, iHigh, iMid, iFound;
  printf("\nEnter no of elements\n");
  scanf("%d", &iNum);
  printf("\nEnter the elements\n");
  for (i = 0; i < iNum; i++)
    scanf("%d", &iaArr[i]);
  for (i = 0; i < iNum - 1; i++) {
    for (j = i + 1; j < iNum; j++) {
      if (iaArr[i] > iaArr[j]) {
        iTemp = iaArr[i];
        iaArr[i] = iaArr[j];
        iaArr[j] = iTemp;
      }
    }
  }
  printf("\nThe Sorted array is \n");
  for (i = 0; i < iNum; i++)
    printf("%d\t", iaArr[i]);
  printf("\n");
  printf("\nEnter the Key element\n");
  scanf("%d", &iKey);
  iFound = 0;
  iLow = 0;
  iHigh = iNum - 1;
  while (iLow <= iHigh) {
    iMid = (iLow + iHigh) / 2;
    if (iKey == iaArr[iMid]) {
      iPos = iMid;
      iFound = 1;
      break;
    } else if (iKey < iaArr[iMid])
      iHigh = iMid - 1;
    else
      iLow = iMid + 1;
  }
  if (iFound)
    printf("\nKey element %d found at position %d\n", iKey, iPos + 1);
  else
    printf("\nKey element not found\n");
  return 0;
}
```