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

```asm
<prediction_em>:
  endbr64
  push   %r15
  pxor   %xmm0,%xmm0
  mov    %rsi,%r11
  mov    %rdi,%r10
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    0x70(%rsp),%rax
  mov    0x48(%rsp),%rcx
  mov    0x60(%rsp),%rdx
  mov    0x4(%rax),%esi
  movups %xmm0,(%rdi)
  mov    (%r9),%edi
  mov    0x38(%rsp),%r9
  cmp    $0x1,%edi
  lea    0x1(%rsi),%r12d
  setle  %bl
  setle  %al
  cmpl   $0x4,(%r11)
  mov    (%r9),%r15d
  movzbl %bl,%ebx
  mov    %ebx,-0x44(%rsp)
  je     L213
  mov    0x50(%rsp),%r9
  cmpl   $0x1,(%r9)
  jle    L259
  test   %r15d,%r15d
  jle    L388
  sub    %ebx,%esi
  mov    %ebx,%r11d
  movzbl %al,%eax
  mov    %r15d,-0x20(%rsp)
  lea    0x1(%rsi),%ebx
  mov    %esi,%edi
  mov    %esi,-0x1c(%rsp)
  xor    %r9d,%r9d
  mov    %ebx,%esi
  mov    %ebx,-0x14(%rsp)
  and    $0xfffffffe,%ebx
  movq   D30(%rip),%xmm3
  mov    %ebx,%r14d
  mov    %ebx,-0x18(%rsp)
  shr    %esi
  mov    %edi,%ebx
  mov    %rax,-0x40(%rsp)
  sub    $0x1,%esi
  lea    0x1(%rax,%rbx,1),%rax
  add    %r11d,%r14d
  add    $0x1,%rsi
  mov    %rbx,-0x28(%rsp)
  xor    %r13d,%r13d
  movsd  D32(%rip),%xmm2
  mov    %rax,-0x10(%rsp)
  shl    $0x4,%rsi
  mov    %r10,-0x38(%rsp)
  mov    %rsi,%rbp
  nopl   0x0(%rax,%rax,1)
L154:
  cmp    -0x44(%rsp),%r12d
  jle    L41
  mov    0x68(%rsp),%rax
  movslq %r9d,%rdi
  lea    (%rax,%rdi,4),%r15
  mov    0x58(%rsp),%rax
  mov    (%rax),%esi
  test   %esi,%esi
  je     L18
  mov    -0x40(%rsp),%rax
  add    %rdi,%rax
  shl    $0x3,%rax
  lea    0x8(%rax),%rsi
  lea    (%rcx,%rax,1),%r10
  lea    (%rdx,%rsi,1),%r11
  cmp    %r11,%r10
  je     L355
  cmpl   $0x2,-0x1c(%rsp)
  jbe    L355
  add    %rdx,%rax
  xor    %esi,%esi
  nopl   0x0(%rax,%rax,1)
L349:
  movupd (%rax,%rsi,1),%xmm5
  movups %xmm5,(%r10,%rsi,1)
  add    $0x10,%rsi
  cmp    %rbp,%rsi
  jne    L349
  mov    -0x14(%rsp),%ebx
  cmp    %ebx,-0x18(%rsp)
  je     L41
  lea    (%r9,%r14,1),%eax
  cltq
  movsd  (%rdx,%rax,8),%xmm0
  movsd  %xmm0,(%rcx,%rax,8)
L41:
  add    $0x1,%r13d
  add    %r12d,%r9d
  cmp    -0x20(%rsp),%r13d
  jne    L154
L388:
  mov    0x58(%rsp),%rax
  movl   $0x0,(%rax)
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L259:
  test   %r15d,%r15d
  jle    L388
  cmp    %ebx,%r12d
  jle    L388
  movslq %r12d,%r13
  xor    %r9d,%r9d
  lea    0x8(%rdx),%r14
  shl    $0x3,%r13
  cmp    $0x1,%edi
  mov    %ebx,%edi
  setle  %r9b
  sub    %ebx,%esi
  lea    0x1(%rsi),%ebx
  shl    $0x3,%r9
  mov    %esi,-0x44(%rsp)
  mov    %ebx,%eax
  mov    %ebx,-0x20(%rsp)
  and    $0xfffffffe,%ebx
  shr    %eax
  add    %ebx,%edi
  mov    %ebx,-0x40(%rsp)
  xor    %ebx,%ebx
  lea    -0x1(%rax),%r10d
  mov    %esi,%eax
  mov    %edi,%r11d
  xor    %esi,%esi
  lea    0x8(,%rax,8),%rax
  add    $0x1,%r10
  lea    (%rcx,%r9,1),%rdi
  mov    %rax,-0x38(%rsp)
  lea    (%r14,%r9,1),%rax
  shl    $0x4,%r10
  cmp    %rax,%rdi
  je     L350
  nopl   0x0(%rax,%rax,1)
L137:
  cmpl   $0x2,-0x44(%rsp)
  lea    (%r9,%rdx,1),%r8
  seta   %bpl
  xor    %eax,%eax
  test   %bpl,%bpl
  je     L350
  nopl   0x0(%rax)
L132:
  movupd (%r8,%rax,1),%xmm4
  movups %xmm4,(%rdi,%rax,1)
  add    $0x10,%rax
  cmp    %r10,%rax
  jne    L132
  mov    -0x40(%rsp),%edi
  cmp    %edi,-0x20(%rsp)
  je     L301
  lea    (%rsi,%r11,1),%eax
  cltq
  movsd  (%rdx,%rax,8),%xmm0
  movsd  %xmm0,(%rcx,%rax,8)
L301:
  add    $0x1,%ebx
  add    %r13,%r9
  add    %r12d,%esi
  cmp    %r15d,%ebx
  je     L388
  lea    (%rcx,%r9,1),%rdi
  lea    (%r14,%r9,1),%rax
  cmp    %rax,%rdi
  jne    L137
L350:
  mov    -0x38(%rsp),%rax
  lea    (%rax,%r9,1),%rdi
  mov    %r9,%rax
L164:
  movsd  (%rdx,%rax,1),%xmm0
  movsd  %xmm0,(%rcx,%rax,1)
  add    $0x8,%rax
  cmp    %rdi,%rax
  jne    L164
  jmp    L301
  nopl   (%rax)
L18:
  mov    -0x40(%rsp),%rbx
  mov    0x40(%rsp),%r11
  shl    $0x3,%rdi
  mov    %r15,-0x30(%rsp)
  lea    (%rdx,%rdi,1),%r10
  mov    %rdx,0x60(%rsp)
  lea    0x1(%rbx),%rsi
  mov    %rbx,%rax
  mov    -0x28(%rsp),%rbx
  add    %rdi,%r11
  add    %rcx,%rdi
  add    %rsi,%rbx
  jmp    L237
  nopl   0x0(%rax,%rax,1)
L226:
  addsd  (%r10,%rax,8),%xmm0
  movsd  %xmm0,(%rdi,%rax,8)
  mov    %rsi,%rax
  cmp    %rbx,%rsi
  je     L258
  add    $0x1,%rsi
L237:
  movsd  (%r8),%xmm0
  mulsd  (%r11,%rax,8),%xmm0
  movapd %xmm0,%xmm1
  andpd  %xmm3,%xmm1
  comisd %xmm2,%xmm1
  jbe    L242
  mulsd  %xmm2,%xmm0
  divsd  %xmm1,%xmm0
L242:
  test   %eax,%eax
  jne    L226
  mov    -0x38(%rsp),%r15
  movapd %xmm0,%xmm1
  andpd  %xmm3,%xmm1
  comisd 0x8(%r15),%xmm1
  jbe    L226
  mov    -0x30(%rsp),%rdx
  mov    (%rdx),%edx
  test   %edx,%edx
  jle    L226
  movsd  %xmm1,0x8(%r15)
  jmp    L226
  nopl   0x0(%rax)
L258:
  mov    0x60(%rsp),%rdx
  jmp    L41
  nopw   0x0(%rax,%rax,1)
L213:
  test   %r15d,%r15d
  jle    L388
  mov    %ebx,%r14d
  cmp    %ebx,%r12d
  jle    L388
  movslq %r12d,%rbx
  mov    %esi,%r13d
  mov    0x68(%rsp),%r11
  mov    0x40(%rsp),%rdi
  movq   D30(%rip),%xmm3
  movsd  D32(%rip),%xmm2
  xor    %ebp,%ebp
  movzbl %al,%r12d
  lea    0x0(,%rbx,8),%r9
  sub    %r14d,%r13d
  shl    $0x2,%rbx
  nopw   0x0(%rax,%rax,1)
L317:
  lea    0x1(%r12),%rsi
  mov    %r12,%rax
  lea    0x0(%r13,%rsi,1),%r14
  jmp    L175
  nopw   0x0(%rax,%rax,1)
L163:
  addsd  (%rdx,%rax,8),%xmm0
  movsd  %xmm0,(%rcx,%rax,8)
  mov    %rsi,%rax
  cmp    %rsi,%r14
  je     L30
  add    $0x1,%rsi
L175:
  movsd  (%r8),%xmm0
  mulsd  (%rdi,%rax,8),%xmm0
  movapd %xmm0,%xmm1
  andpd  %xmm3,%xmm1
  comisd %xmm2,%xmm1
  jbe    L352
  mulsd  %xmm2,%xmm0
  divsd  %xmm1,%xmm0
L352:
  test   %eax,%eax
  jne    L163
  movapd %xmm0,%xmm1
  andpd  %xmm3,%xmm1
  comisd 0x8(%r10),%xmm1
  jbe    L163
  cmpl   $0x0,(%r11)
  jle    L163
  movsd  %xmm1,0x8(%r10)
  jmp    L163
  nopl   0x0(%rax,%rax,1)
L30:
  add    $0x1,%ebp
  add    %r9,%rdx
  add    %r9,%rcx
  add    %rbx,%r11
  add    %r9,%rdi
  cmp    %r15d,%ebp
  jne    L317
  jmp    L388
L355:
  add    -0x10(%rsp),%rdi
  shl    $0x3,%rdi
  jmp    L131
  nopl   0x0(%rax,%rax,1)
L205:
  add    $0x8,%rsi
L131:
  movsd  (%rdx,%rax,1),%xmm0
  movsd  %xmm0,(%rcx,%rax,1)
  mov    %rsi,%rax
  cmp    %rdi,%rsi
  jne    L205
  jmp    L41
```

tool_calls: name: retrieve_data
arguments: tag: D30
data_type: qword
name: retrieve_data
arguments: tag: D32
data_type: f64

tool: D30: 9223372036854775807

tool: D32: 100

assistant: ```c
void prediction_em(double *uam, int *nmethod, double *bet, double *gam, double *dtime, int *ithermal, int *nk, double *veold, double *v, int *iinc, int *idiscon, double *vold, int *nactdof, int *mi) {
  int j, k, mt = mi[1] + 1, jstart;
  double dextrapol;
  uam[0] = 0.;
  uam[1] = 0.;
  if (*ithermal < 2) {
    jstart = 1;
  } else {
    jstart = 0;
  }
  if (*nmethod == 4) {
    for (k = 0; k < *nk; ++k) {
      for (j = jstart; j < mt; j++) {
        dextrapol = *dtime * veold[mt * k + j];
        if (fabs(dextrapol) > 100.)
          dextrapol = 100. * dextrapol / fabs(dextrapol);
        if (j == 0) {
          if ((fabs(dextrapol) > uam[1]) && (nactdof[mt * k] > 0)) {
            uam[1] = fabs(dextrapol);
          }
        }
        v[mt * k + j] = vold[mt * k + j] + dextrapol;
      }
    }
  } else {
    if (*iinc > 1) {
      for (k = 0; k < *nk; ++k) {
        for (j = jstart; j < mt; j++) {
          if (*idiscon == 0) {
            dextrapol = *dtime * veold[mt * k + j];
            if (fabs(dextrapol) > 100.)
              dextrapol = 100. * dextrapol / fabs(dextrapol);
            if (j == 0) {
              if ((fabs(dextrapol) > uam[1]) && (nactdof[mt * k] > 0)) {
                uam[1] = fabs(dextrapol);
              }
            }
            v[mt * k + j] = vold[mt * k + j] + dextrapol;
          } else {
            v[mt * k + j] = vold[mt * k + j];
          }
        }
      }
    } else {
      for (k = 0; k < *nk; ++k) {
        for (j = jstart; j < mt; j++) {
          v[mt * k + j] = vold[mt * k + j];
        }
      }
    }
  }
  *idiscon = 0;
  return;
}
```