user: 请从给定的汇编指令推导出C源代码：

```asm
<uRewriteIPAndPortSIPLine>:
  endbr64
  push   %r15
  pxor   %xmm0,%xmm0
  mov    $0xfe,%ecx
  push   %r14
  mov    %rsi,%r14
  mov    $0xd,%esi
  push   %r13
  mov    %rdi,%r13
  push   %r12
  push   %rbp
  mov    %edx,%ebp
  push   %rbx
  sub    $0xa18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xa08(%rsp)
  xor    %eax,%eax
  lea    0x210(%rsp),%rdi
  movaps %xmm0,0x20(%rsp)
  movaps %xmm0,0x30(%rsp)
  movaps %xmm0,0x40(%rsp)
  movaps %xmm0,0x50(%rsp)
  movaps %xmm0,0x60(%rsp)
  movaps %xmm0,0x70(%rsp)
  movaps %xmm0,0x90(%rsp)
  movaps %xmm0,0xa0(%rsp)
  movaps %xmm0,0xb0(%rsp)
  movaps %xmm0,0xc0(%rsp)
  movaps %xmm0,0xd0(%rsp)
  movaps %xmm0,0xe0(%rsp)
  movaps %xmm0,0x100(%rsp)
  movaps %xmm0,0x110(%rsp)
  movaps %xmm0,0x120(%rsp)
  movaps %xmm0,0x130(%rsp)
  movaps %xmm0,0x140(%rsp)
  movaps %xmm0,0x150(%rsp)
  movaps %xmm0,0x160(%rsp)
  movaps %xmm0,0x170(%rsp)
  movaps %xmm0,0x180(%rsp)
  movl   $0x0,0x80(%rsp)
  movl   $0x0,0xf0(%rsp)
  movaps %xmm0,0x190(%rsp)
  rep stos %rax,%es:(%rdi)
  mov    %r13,%rdi
  movaps %xmm0,0x1a0(%rsp)
  movaps %xmm0,0x1b0(%rsp)
  movaps %xmm0,0x1c0(%rsp)
  movaps %xmm0,0x1d0(%rsp)
  movaps %xmm0,0x1e0(%rsp)
  movaps %xmm0,0x1f0(%rsp)
  movaps %xmm0,0x200(%rsp)
  call   <strchr@plt>
  mov    %rax,%rbx
  mov    $0x1,%eax
  test   %rbx,%rbx
  je     L71
  movb   $0x0,(%rbx)
  lea    0x1(%rbx),%rax
  mov    %r13,%rdx
  lea    0x100(%rsp),%r12
  mov    %rax,0x8(%rsp)
  lea    D40(%rip),%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <sprintf@plt>
  movb   $0xd,(%rbx)
  lea    D16(%rip),%rsi
  mov    %r12,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L76
L1:
  lea    D86(%rip),%rsi
  mov    %r12,%rdi
  lea    0x90(%rsp),%r15
  call   <strstr@plt>
  lea    D93(%rip),%r8
  mov    %r15,%rdi
  mov    %r12,%rdx
  movb   $0x0,(%rax)
  mov    %rax,%rbx
  mov    %r8,%rsi
  xor    %eax,%eax
  add    $0x4,%rbx
  call   <sprintf@plt>
  mov    $0x40,%esi
  mov    %rbx,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L86
  movb   $0x0,(%rax)
  lea    D93(%rip),%r8
  mov    %rbx,%rdx
  xor    %eax,%eax
  lea    0x20(%rsp),%rdi
  mov    %r8,%rsi
  call   <sprintf@plt>
L86:
  test   %ebp,%ebp
  mov    $0x13c4,%eax
  cmove  %eax,%ebp
  cmpb   $0x0,0x20(%rsp)
  jne    L38
  mov    %ebp,%r8d
  mov    %r14,%rcx
  mov    %r15,%rdx
  mov    %r12,%rdi
  lea    D97(%rip),%rsi
  xor    %eax,%eax
  call   <sprintf@plt>
L53:
  mov    0x8(%rsp),%rdx
  lea    D105(%rip),%rsi
  xor    %eax,%eax
  lea    0x10(%rsp),%rbp
  lea    0x200(%rsp),%r14
  mov    %r14,%rdi
  call   <sprintf@plt>
  pxor   %xmm0,%xmm0
  mov    %r12,%rdi
  movaps %xmm0,0x10(%rsp)
  call   <strlen@plt>
  mov    $0x7ff,%edx
  lea    D96(%rip),%rsi
  mov    %rbp,%rdi
  sub    %eax,%edx
  xor    %eax,%eax
  call   <sprintf@plt>
  mov    %r14,%rcx
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <sprintf@plt>
  xor    %eax,%eax
L71:
  mov    0xa08(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L59
  add    $0xa18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L38:
  lea    0x20(%rsp),%rcx
  mov    %ebp,%r9d
  mov    %r14,%r8
  mov    %r15,%rdx
  lea    D32(%rip),%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <sprintf@plt>
  jmp    L53
  nopl   0x0(%rax)
L76:
  lea    D29(%rip),%rsi
  mov    %r12,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  jne    L1
  lea    D52(%rip),%rsi
  mov    %r12,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  jne    L1
  mov    $0x2,%eax
  jmp    L71
L59:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D40
datatype: string
name: read_data
arguments: data_label: D16
datatype: string
name: read_data
arguments: data_label: D86
datatype: string
name: read_data
arguments: data_label: D93
datatype: string
name: read_data
arguments: data_label: D97
datatype: string
name: read_data
arguments: data_label: D105
datatype: string
name: read_data
arguments: data_label: D96
datatype: string
name: read_data
arguments: data_label: D32
datatype: string
name: read_data
arguments: data_label: D29
datatype: string
name: read_data
arguments: data_label: D52
datatype: string

tool: D40: %.255s

tool: D16: INVITE 

tool: D86: sip:

tool: D93: %.99s

tool: D97: %ssip:%s:%u SIP/2.0

tool: D105: %.2047s

tool: D96: %%s%%.%us

tool: D32: %ssip:%s@%s:%u SIP/2.0

tool: D29: CANCEL 

tool: D52: OPTIONS 

assistant: ```c
unsigned uRewriteIPAndPortSIPLine(char *cSIPMessage, const char *cNewIP, unsigned uNewPort) {
  char *cp;
  char *cp1;
  char *cpNextLine;
  char cSomething[100] = {""};
  char cPrefix[100] = {""};
  char cSIPLine[256] = {""};
  char cMessage[2048] = {""};
  if ((cp = strchr(cSIPMessage, '\r'))) {
    cpNextLine = cp + 1;
    *cp = 0;
    sprintf(cSIPLine, "%.255s", cSIPMessage);
    *cp = '\r';
  } else
    return (1);
  if (!(strstr(cSIPLine, "INVITE ") || strstr(cSIPLine, "CANCEL ") || strstr(cSIPLine, "OPTIONS ")))
    return (2);
  cp = strstr(cSIPLine, "sip:");
  *cp = 0;
  sprintf(cPrefix, "%.99s", cSIPLine);
  if ((cp1 = strchr(cp + strlen("sip:"), '@'))) {
    *cp1 = 0;
    sprintf(cSomething, "%.99s", cp + strlen("sip:"));
  }
  if (!uNewPort)
    uNewPort = 5060;
  if (cSomething[0])
    sprintf(cSIPLine, "%ssip:%s@%s:%u SIP/2.0\r", cPrefix, cSomething, cNewIP, uNewPort);
  else
    sprintf(cSIPLine, "%ssip:%s:%u SIP/2.0\r", cPrefix, cNewIP, uNewPort);
  sprintf(cMessage, "%.2047s", cpNextLine);
  char cFormat[16] = {""};
  sprintf(cFormat, "%%s%%.%us", (unsigned)(2047 - strlen(cSIPLine)));
  sprintf(cSIPMessage, cFormat, cSIPLine, cMessage);
  return (0);
}
```