user: 下面的汇编指令对应的C源代码是什么：

```asm
<main>:
  endbr64
  push   %r15
  mov    %rsi,%r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  cmp    $0x4,%edi
  je     L59
  mov    (%rsi),%rsi
  lea    D98(%rip),%rdi
  call   <printf@plt>
  or     $0xffffffff,%edi
  call   <exit@plt>
L59:
  mov    0x10(%r15),%rdi
  call   <strlen@plt>
  mov    0x10(%r15),%rsi
  mov    %eax,%edx
  cmp    $0xb,%eax
  je     L192
  cmp    $0xc,%eax
  je     L0
  cmp    $0xd,%eax
  jne    L56
  cmpb   $0x2b,(%rsi)
  je     L154
L56:
  lea    D23(%rip),%rdi
  xor    %eax,%eax
  lea    0x2c(%rsp),%rbx
  call   <printf@plt>
  or     $0xffffffff,%edi
  call   <exit@plt>
L148:
  lea    0x38(%rsp),%rbp
  mov    %rbx,%r12
  lea    D18(%rip),%r14
  lea    D37(%rip),%r13
  jmp    L52
  nopl   0x0(%rax,%rax,1)
L234:
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <printf@plt>
L358:
  mov    $0xffffffff,%edi
  call   <exit@plt>
L147:
  add    $0x1,%r12
  cmp    %r12,%rbp
  je     L339
L52:
  movzbl (%r12),%esi
  lea    -0x30(%rsi),%eax
  cmp    $0x9,%al
  jbe    L147
  lea    -0x20(%rsi),%eax
  cmp    $0x5e,%al
  ja     L234
  movsbl %sil,%esi
  mov    %r14,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L358
  nopl   0x0(%rax,%rax,1)
L339:
  mov    0x18(%r15),%rdi
  call   <strlen@plt>
  mov    %eax,0x4(%rsp)
  cmp    $0xa0,%eax
  jg     L340
  mov    0x4(%rsp),%edx
  test   %edx,%edx
  jg     L349
  lea    D55(%rip),%rdi
  call   <puts@plt>
  or     $0xffffffff,%edi
  call   <exit@plt>
L349:
  mov    0x4(%rsp),%eax
  lea    0x0(,%rax,8),%r13d
  sub    %eax,%r13d
  mov    %r13d,%eax
  mov    %r13d,0x1c(%rsp)
  mov    %r13d,%edi
  test   $0x7,%al
  je     L221
  mov    $0x8,%ecx
  cltd
  idiv   %ecx
  sub    %edx,%ecx
  add    %ecx,%edi
  mov    %edi,0x1c(%rsp)
L221:
  mov    0x1c(%rsp),%eax
  test   %eax,%eax
  lea    0x7(%rax),%r12d
  cmovns %eax,%r12d
  sar    $0x3,%r12d
  mov    %r12d,%edi
  call   <malloc@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L295
L287:
  mov    %r12d,%edx
  xor    %esi,%esi
  mov    %r13,%rdi
  call   <memset@plt>
  mov    0x4(%rsp),%eax
  test   %eax,%eax
  jle    L31
  movslq 0x4(%rsp),%r11
  xor    %ecx,%ecx
  xor    %r10d,%r10d
  mov    $0x1,%r14d
  nopl   (%rax)
L259:
  mov    0x18(%r15),%rsi
  add    %rcx,%rsi
  movzbl (%rsi),%eax
  lea    -0x20(%rax),%edi
  cmp    $0x5e,%dil
  ja     L345
L20:
  cmp    $0x24,%al
  je     L60
L129:
  xor    %esi,%esi
  jmp    L140
  nopl   0x0(%rax,%rax,1)
L137:
  mov    0x18(%r15),%rax
  movzbl (%rax,%rcx,1),%eax
L140:
  bt     %esi,%eax
  jae    L48
  movslq %r10d,%rax
  or     %r14b,0x0(%r13,%rax,1)
L48:
  add    %r14d,%r14d
  cmp    $0x100,%r14d
  jne    L256
  add    $0x1,%r10d
  mov    $0x1,%r14d
L256:
  add    $0x1,%esi
  cmp    $0x7,%esi
  jne    L137
  add    $0x1,%rcx
  cmp    %rcx,%r11
  jne    L259
L31:
  mov    0x8(%r15),%rdi
  lea    D154(%rip),%rsi
  call   <fopen@plt>
  mov    %rax,%r14
  test   %rax,%rax
  je     L269
L281:
  mov    %r14,%rcx
  mov    $0xb,%edx
  mov    $0x1,%esi
  lea    D66(%rip),%rdi
  lea    D35(%rip),%r15
  call   <fwrite@plt>
  mov    %r14,%rdi
  call   <fflush@plt>
  lea    0xe(%r12),%edx
  mov    %r14,%rdi
  xor    %eax,%eax
  lea    D115(%rip),%rsi
  call   <fprintf@plt>
  mov    %r14,%rdi
  call   <fflush@plt>
  mov    %r14,%rcx
  mov    $0xa,%edx
  mov    $0x1,%esi
  lea    D100(%rip),%rdi
  call   <fwrite@plt>
  nop
L347:
  movsbl (%rbx),%ecx
  movsbl 0x1(%rbx),%edx
  mov    %r15,%rsi
  mov    %r14,%rdi
  xor    %eax,%eax
  add    $0x2,%rbx
  call   <fprintf@plt>
  cmp    %rbx,%rbp
  jne    L347
  mov    %r14,%rcx
  mov    $0x6,%edx
  mov    $0x1,%esi
  xor    %ebx,%ebx
  lea    D42(%rip),%rdi
  lea    D82(%rip),%rbp
  call   <fwrite@plt>
  mov    0x4(%rsp),%edx
  xor    %eax,%eax
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <fprintf@plt>
  cmpl   $0x7,0x1c(%rsp)
  jle    L172
  nopw   0x0(%rax,%rax,1)
L265:
  movzbl 0x0(%r13,%rbx,1),%edx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  xor    %eax,%eax
  add    $0x1,%rbx
  call   <fprintf@plt>
  cmp    %ebx,%r12d
  jg     L265
L172:
  mov    %r14,%rsi
  mov    $0x1a,%edi
  call   <fputc@plt>
  mov    %r14,%rdi
  call   <fflush@plt>
  mov    %r14,%rdi
  call   <fclose@plt>
  mov    %r13,%rdi
  call   <free@plt>
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L109
  add    $0x48,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L60:
  movb   $0x2,(%rsi)
  mov    0x18(%r15),%rax
  movzbl (%rax,%rcx,1),%eax
  jmp    L129
L345:
  movzbl %al,%esi
  lea    D138(%rip),%rdi
  xor    %eax,%eax
  mov    %rcx,0x10(%rsp)
  mov    %r11,0x8(%rsp)
  mov    %r10d,0x18(%rsp)
  call   <printf@plt>
  mov    $0xffffffff,%edi
  call   <exit@plt>
  mov    0x10(%rsp),%rcx
  mov    0x18(%r15),%rsi
  mov    0x8(%rsp),%r11
  mov    0x18(%rsp),%r10d
  add    %rcx,%rsi
  movzbl (%rsi),%eax
  jmp    L20
L192:
  cmpb   $0x30,(%rsi)
  jne    L56
  add    $0x1,%rsi
  lea    0x2e(%rsp),%rdi
  mov    $0xa,%edx
  movw   $0x3434,0x2c(%rsp)
  call   <memcpy@plt>
  lea    0x2c(%rsp),%rbx
  jmp    L148
L340:
  mov    $0xc,%esi
  lea    D43(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  or     $0xffffffff,%edi
  call   <exit@plt>
  jmp    L349
L0:
  lea    0x2c(%rsp),%rbx
  mov    %rbx,%rdi
  call   <memcpy@plt>
  jmp    L148
L269:
  lea    D132(%rip),%rdi
  call   <perror@plt>
  or     $0xffffffff,%edi
  call   <exit@plt>
  jmp    L281
L295:
  mov    %r12d,%esi
  lea    D99(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  or     $0xffffffff,%edi
  call   <exit@plt>
  jmp    L287
L154:
  lea    0x2c(%rsp),%rbx
  add    $0x1,%rsi
  mov    $0xc,%edx
  mov    %rbx,%rdi
  call   <memcpy@plt>
  jmp    L148
L109:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D98
datatype: string
name: extract_symbolic_data
arguments: label: D23
datatype: string
name: extract_symbolic_data
arguments: label: D18
datatype: string
name: extract_symbolic_data
arguments: label: D37
datatype: string
name: extract_symbolic_data
arguments: label: D55
datatype: string
name: extract_symbolic_data
arguments: label: D154
datatype: string
name: extract_symbolic_data
arguments: label: D66
datatype: string
name: extract_symbolic_data
arguments: label: D35
datatype: string
name: extract_symbolic_data
arguments: label: D115
datatype: string
name: extract_symbolic_data
arguments: label: D100
datatype: string
name: extract_symbolic_data
arguments: label: D42
datatype: string
name: extract_symbolic_data
arguments: label: D82
datatype: string
name: extract_symbolic_data
arguments: label: D138
datatype: string
name: extract_symbolic_data
arguments: label: D43
datatype: string
name: extract_symbolic_data
arguments: label: D132
datatype: string
name: extract_symbolic_data
arguments: label: D99
datatype: string

tool: D98: usage: %s </dev/device> <phone-no> <sms text>


tool: D23: Invalid length for phone number '%s': %i


tool: D18: Invalid char in phone number: '%c'


tool: D37: Invalid char in phone number: 0x'%.2X'


tool: D55: No text supplied for the SMS.

tool: D154: wb

tool: D66: AT+CMGF=0


tool: D35: %c%c

tool: D115: AT+CMGS=%i


tool: D100: 0011000C91

tool: D42: 0000AA

tool: D82: %.2X

tool: D138: Invalid character in text input: 0x'%.2X'


tool: D43: Text is too long at %i chars. Max is 160.


tool: D132: Unable to open output device

tool: D99: Unable to malloc '%i' bytes for variable 'sms_string'


assistant: ```c
int main(int argc, char **argv) {
  FILE *output_device;
  char target_phone[12];
  unsigned char *sms_string;
  int i, l, m, n;
  int intext_length, sms_string_length;
  if (argc != 4) {
    printf("usage: %s </dev/device> <phone-no> <sms text>\n", argv[0]);
    exit(-1);
  }
  i = strlen((argv[2]));
  if (i == 11 && (argv[2])[0] == '0') {
    target_phone[0] = '4';
    target_phone[1] = '4';
    memcpy(target_phone + 2, (argv[2]) + 1, 10);
  } else if (i == 12) {
    memcpy(target_phone, (argv[2]), 12);
  } else if (i == 13 && (argv[2])[0] == '+') {
    memcpy(target_phone, (argv[2]) + 1, 12);
  } else {
    printf("Invalid length for phone number '%s': %i\n", (argv[2]), i);
    exit(-1);
  }
  for (i = 0; i < 12; i++) {
    if (target_phone[i] < '0' || target_phone[i] > '9') {
      if (((unsigned char)target_phone[i]) < 32 || ((unsigned char)target_phone[i]) > 126)
        printf("Invalid char in phone number: 0x'%.2X'\n", (unsigned char)target_phone[i]);
      else
        printf("Invalid char in phone number: '%c'\n", target_phone[i]);
      exit(-1);
    }
  }
  intext_length = strlen((argv[3]));
  if (intext_length > 160) {
    printf("Text is too long at %i chars. Max is 160.\n", i);
    exit(-1);
  }
  if (intext_length < 1) {
    printf("No text supplied for the SMS.\n");
    exit(-1);
  }
  i = intext_length * 7;
  m = i % 8;
  if (m != 0)
    i += (8 - m);
  sms_string_length = i / 8;
  sms_string = malloc(sms_string_length);
  if (sms_string == NULL) {
    printf("Unable to malloc '%i' bytes for variable 'sms_string'\n", sms_string_length);
    exit(-1);
  }
  memset(sms_string, 0, sms_string_length);
  l = 1;
  m = 0;
  for (i = 0; i < intext_length; i++) {
    if (((unsigned char)(argv[3])[i]) < 32 || ((unsigned char)(argv[3])[i]) > 126) {
      printf("Invalid character in text input: 0x'%.2X'\n", (unsigned char)(argv[3])[i]);
      exit(-1);
    }
    if ((argv[3])[i] == '$') {
      (argv[3])[i] = 0x02;
    }
    for (n = 0; n < 7; n++) {
      if (((unsigned char)(argv[3])[i]) & (1 << n)) {
        sms_string[m] |= l;
      }
      l = l << 1;
      if (l == 256) {
        l = 1;
        m++;
      }
    }
  }
  output_device = fopen((argv[1]), "wb");
  if (output_device == NULL) {
    perror("Unable to open output device");
    exit(-1);
  }
  fprintf(output_device, "AT+CMGF=0\r\n");
  fflush(output_device);
  fprintf(output_device, "AT+CMGS=%i\r\n", 14 + sms_string_length);
  fflush(output_device);
  fprintf(output_device, "0011000C91");
  for (i = 0; i < 12; i += 2) {
    fprintf(output_device, "%c%c", target_phone[i + 1], target_phone[i]);
  }
  fprintf(output_device, "0000AA");
  fprintf(output_device, "%.2X", intext_length);
  for (i = 0; i < sms_string_length; i++)
    fprintf(output_device, "%.2X", sms_string[i]);
  fprintf(output_device, "%c", 0x1a);
  fflush(output_device);
  fclose(output_device);
  free(sms_string);
  return 0;
}
```