#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_CUR;
int /*<<< orphan*/ _IOFBF;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
scalar_t__ getc(int /*<<< orphan*/ *);
int /*<<< orphan*/ putc(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ setvbuf(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                           int /*<<< orphan*/, int);
void mp_mul_f_cmul_swap(int nfft, char *f_name_inout, double dinout[]) {
  int n_j, j, k;
  double xr, xi, yr, yi, din[2 * 512 + 1];
  char *cin, *cout;
  FILE *f_inout;
  f_inout = fopen(f_name_inout, "rb+");
  setvbuf(f_inout, NULL, _IOFBF, (int)sizeof(double) * (2 * 512 + 1));
  cin = (char *)din;
  for (k = 0; k < 3 * (int)sizeof(double); k++) {
    cin[k] = (char)getc(f_inout);
  }
  cout = (char *)dinout;
  fseek(f_inout, -3 * (int)sizeof(double), SEEK_CUR);
  for (k = 0; k < 3 * (int)sizeof(double); k++) {
    putc((int)cout[k], f_inout);
  }
  fflush(f_inout);
  dinout[0] += din[0];
  dinout[1] *= din[1];
  dinout[2] *= din[2];
  j = 3;
  while (j < nfft + 1 - 2 * 512) {
    for (k = 0; k < 2 * 512 * (int)sizeof(double); k++) {
      cin[k] = (char)getc(f_inout);
    }
    cout = (char *)(&dinout[j]);
    fseek(f_inout, -2 * 512 * (int)sizeof(double), SEEK_CUR);
    for (k = 0; k < 2 * 512 * (int)sizeof(double); k++) {
      putc((int)cout[k], f_inout);
    }
    fflush(f_inout);
    for (k = 0; k < 2 * 512; k += 2) {
      xr = din[k];
      xi = din[k + 1];
      yr = dinout[j + k];
      yi = dinout[j + k + 1];
      dinout[j + k] = xr * yr - xi * yi;
      dinout[j + k + 1] = xr * yi + xi * yr;
    }
    j += 2 * 512;
  }
  n_j = nfft + 1 - j;
  if (n_j > 0) {
    for (k = 0; k < n_j * (int)sizeof(double); k++) {
      cin[k] = (char)getc(f_inout);
    }
    cout = (char *)(&dinout[j]);
    fseek(f_inout, -n_j * (int)sizeof(double), SEEK_CUR);
    for (k = 0; k < n_j * (int)sizeof(double); k++) {
      putc((int)cout[k], f_inout);
    }
    fflush(f_inout);
    for (k = 0; k < n_j; k += 2) {
      xr = din[k];
      xi = din[k + 1];
      yr = dinout[j + k];
      yi = dinout[j + k + 1];
      dinout[j + k] = xr * yr - xi * yi;
      dinout[j + k + 1] = xr * yi + xi * yr;
    }
  }
  for (k = 0; k < (int)sizeof(double); k++) {
    cin[k] = (char)getc(f_inout);
  }
  cout = (char *)(&dinout[nfft + 1]);
  fseek(f_inout, -((int)sizeof(double)), SEEK_CUR);
  for (k = 0; k < (int)sizeof(double); k++) {
    putc((int)cout[k], f_inout);
  }
  dinout[nfft + 1] *= din[0];
  fclose(f_inout);
}


x86 assembly (clang, -O0):
<mp_mul_f_cmul_swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2070,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe6f(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x2068(%rbp)
mov    -0x2068(%rbp),%rdi
mov    0x2e2d(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
mov    $0x2008,%ecx
call   1070 <setvbuf@plt>
lea    -0x2050(%rbp),%rax
mov    %rax,-0x2058(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x18,-0x24(%rbp)
jge    1204 <mp_mul_f_cmul_swap+0x94>
mov    -0x2068(%rbp),%rdi
call   1090 <getc@plt>
mov    %al,%dl
mov    -0x2058(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11d0 <mp_mul_f_cmul_swap+0x60>
mov    -0x18(%rbp),%rax
mov    %rax,-0x2060(%rbp)
mov    -0x2068(%rbp),%rdi
mov    0x2dcb(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffe8,%esi
call   1060 <fseek@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0x18,-0x24(%rbp)
jge    1263 <mp_mul_f_cmul_swap+0xf3>
mov    -0x2060(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
mov    -0x2068(%rbp),%rsi
call   1040 <putc@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1230 <mp_mul_f_cmul_swap+0xc0>
mov    -0x2068(%rbp),%rdi
call   1050 <fflush@plt>
movsd  -0x2050(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x2048(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
mulsd  0x8(%rax),%xmm0
movsd  %xmm0,0x8(%rax)
movsd  -0x2040(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
mulsd  0x10(%rax),%xmm0
movsd  %xmm0,0x10(%rax)
movl   $0x3,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
sub    $0x400,%ecx
cmp    %ecx,%eax
jge    1485 <mp_mul_f_cmul_swap+0x315>
movl   $0x0,-0x24(%rbp)
cmpl   $0x2000,-0x24(%rbp)
jge    130b <mp_mul_f_cmul_swap+0x19b>
mov    -0x2068(%rbp),%rdi
call   1090 <getc@plt>
mov    %al,%dl
mov    -0x2058(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    12d4 <mp_mul_f_cmul_swap+0x164>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x2060(%rbp)
mov    -0x2068(%rbp),%rdi
mov    0x2cb9(%rip),%rax
mov    (%rax),%edx
mov    $0xffffe000,%esi
call   1060 <fseek@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0x2000,-0x24(%rbp)
jge    1378 <mp_mul_f_cmul_swap+0x208>
mov    -0x2060(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
mov    -0x2068(%rbp),%rsi
call   1040 <putc@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1342 <mp_mul_f_cmul_swap+0x1d2>
mov    -0x2068(%rbp),%rdi
call   1050 <fflush@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0x400,-0x24(%rbp)
jge    1475 <mp_mul_f_cmul_swap+0x305>
movslq -0x24(%rbp),%rax
movsd  -0x2050(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x30(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
cltq
movsd  -0x2050(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x38(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
add    -0x24(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
add    -0x24(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
add    -0x24(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x30(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
mulsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
add    -0x24(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x24(%rbp)
jmp    138b <mp_mul_f_cmul_swap+0x21b>
mov    -0x20(%rbp),%eax
add    $0x400,%eax
mov    %eax,-0x20(%rbp)
jmp    12b6 <mp_mul_f_cmul_swap+0x146>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
sub    -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jle    1652 <mp_mul_f_cmul_swap+0x4e2>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    -0x1c(%rbp),%ecx
shl    $0x3,%ecx
cmp    %ecx,%eax
jge    14dd <mp_mul_f_cmul_swap+0x36d>
mov    -0x2068(%rbp),%rdi
call   1090 <getc@plt>
mov    %al,%dl
mov    -0x2058(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    14a2 <mp_mul_f_cmul_swap+0x332>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x2060(%rbp)
mov    -0x2068(%rbp),%rdi
xor    %esi,%esi
sub    -0x1c(%rbp),%esi
shl    $0x3,%esi
mov    0x2adf(%rip),%rax
mov    (%rax),%edx
call   1060 <fseek@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    -0x1c(%rbp),%ecx
shl    $0x3,%ecx
cmp    %ecx,%eax
jge    1551 <mp_mul_f_cmul_swap+0x3e1>
mov    -0x2060(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
mov    -0x2068(%rbp),%rsi
call   1040 <putc@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1517 <mp_mul_f_cmul_swap+0x3a7>
mov    -0x2068(%rbp),%rdi
call   1050 <fflush@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    164d <mp_mul_f_cmul_swap+0x4dd>
movslq -0x24(%rbp),%rax
movsd  -0x2050(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x30(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
cltq
movsd  -0x2050(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x38(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
add    -0x24(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
add    -0x24(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
add    -0x24(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x30(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
mulsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
add    -0x24(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x24(%rbp)
jmp    1564 <mp_mul_f_cmul_swap+0x3f4>
jmp    1652 <mp_mul_f_cmul_swap+0x4e2>
movl   $0x0,-0x24(%rbp)
cmpl   $0x8,-0x24(%rbp)
jge    168d <mp_mul_f_cmul_swap+0x51d>
mov    -0x2068(%rbp),%rdi
call   1090 <getc@plt>
mov    %al,%dl
mov    -0x2058(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1659 <mp_mul_f_cmul_swap+0x4e9>
mov    -0x18(%rbp),%rax
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x2060(%rbp)
mov    -0x2068(%rbp),%rdi
mov    0x2932(%rip),%rax
mov    (%rax),%edx
mov    $0xfffffff8,%esi
call   1060 <fseek@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0x8,-0x24(%rbp)
jge    16fc <mp_mul_f_cmul_swap+0x58c>
mov    -0x2060(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
mov    -0x2068(%rbp),%rsi
call   1040 <putc@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    16c9 <mp_mul_f_cmul_swap+0x559>
movsd  -0x2050(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2068(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x2070,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp_mul_f_cmul_swap>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2028,%rsp
mov    %rdx,%r12
mov    %rsi,%rax
mov    %edi,%ebp
lea    0xe80(%rip),%rsi
mov    %rax,%rdi
call   1080 <fopen@plt>
mov    %rax,%rbx
mov    0x2e36(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x2008,%ecx
call   1070 <setvbuf@plt>
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x20(%rsp)
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x21(%rsp)
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x22(%rsp)
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x23(%rsp)
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x24(%rsp)
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x25(%rsp)
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x26(%rsp)
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x27(%rsp)
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x28(%rsp)
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x29(%rsp)
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x2a(%rsp)
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x2b(%rsp)
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x2c(%rsp)
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x2d(%rsp)
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x2e(%rsp)
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x2f(%rsp)
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x30(%rsp)
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x31(%rsp)
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x32(%rsp)
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x33(%rsp)
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x34(%rsp)
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x35(%rsp)
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x36(%rsp)
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x37(%rsp)
mov    0x2d0e(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    $0xffffffe8,%esi
call   1060 <fseek@plt>
movsbl (%r12),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
movsbl 0x1(%r12),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
movsbl 0x2(%r12),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
movsbl 0x3(%r12),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
movsbl 0x4(%r12),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
movsbl 0x5(%r12),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
movsbl 0x6(%r12),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
movsbl 0x7(%r12),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
movsbl 0x8(%r12),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
movsbl 0x9(%r12),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
movsbl 0xa(%r12),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
movsbl 0xb(%r12),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
movsbl 0xc(%r12),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
movsbl 0xd(%r12),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
movsbl 0xe(%r12),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
movsbl 0xf(%r12),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
movsbl 0x10(%r12),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
movsbl 0x11(%r12),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
movsbl 0x12(%r12),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
movsbl 0x13(%r12),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
movsbl 0x14(%r12),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
movsbl 0x15(%r12),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
movsbl 0x16(%r12),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
movsbl 0x17(%r12),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
mov    %rbx,%rdi
call   1050 <fflush@plt>
movapd 0x20(%rsp),%xmm0
movupd (%r12),%xmm1
movapd %xmm0,%xmm2
addpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm0
movsd  %xmm2,%xmm0
movupd %xmm0,(%r12)
movsd  0x30(%rsp),%xmm0
mulsd  0x10(%r12),%xmm0
movsd  %xmm0,0x10(%r12)
mov    $0x3,%r14d
cmp    $0x403,%ebp
jl     15ae <mp_mul_f_cmul_swap+0x43e>
mov    %rbp,0x10(%rsp)
lea    -0x3ff(%rbp),%r13d
lea    0x18(%r12),%r15
mov    $0x3,%r14d
nop
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x20(%rsp,%rbp,1)
add    $0x1,%rbp
cmp    $0x2000,%rbp
jne    14b0 <mp_mul_f_cmul_swap+0x340>
mov    0x2b18(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    $0xffffe000,%esi
call   1060 <fseek@plt>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl (%r15,%rbp,1),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
add    $0x1,%rbp
cmp    $0x2000,%rbp
jne    14f0 <mp_mul_f_cmul_swap+0x380>
mov    %rbx,%rdi
call   1050 <fflush@plt>
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movapd 0x20(%rsp,%rax,1),%xmm0
movapd 0x30(%rsp,%rax,1),%xmm1
movapd %xmm0,%xmm2
unpcklpd %xmm1,%xmm2
unpckhpd %xmm1,%xmm0
movupd (%r15,%rax,1),%xmm1
movupd 0x10(%r15,%rax,1),%xmm3
movapd %xmm1,%xmm4
unpcklpd %xmm3,%xmm4
unpckhpd %xmm3,%xmm1
movapd %xmm1,%xmm3
mulpd  %xmm0,%xmm3
mulpd  %xmm2,%xmm1
mulpd  %xmm4,%xmm2
subpd  %xmm3,%xmm2
mulpd  %xmm0,%xmm4
addpd  %xmm4,%xmm1
movapd %xmm2,%xmm0
unpckhpd %xmm1,%xmm0
unpcklpd %xmm1,%xmm2
movupd %xmm2,(%r15,%rax,1)
movupd %xmm0,0x10(%r15,%rax,1)
add    $0x20,%rax
cmp    $0x2000,%rax
jne    1520 <mp_mul_f_cmul_swap+0x3b0>
add    $0x400,%r14
add    $0x2000,%r15
cmp    %r14d,%r13d
jg     14a0 <mp_mul_f_cmul_swap+0x330>
mov    0x10(%rsp),%rbp
add    $0x1,%ebp
mov    %ebp,%eax
sub    %r14d,%eax
jle    1762 <mp_mul_f_cmul_swap+0x5f2>
mov    %rbp,0x10(%rsp)
mov    %r12,0x8(%rsp)
mov    %rax,0x18(%rsp)
lea    0x0(,%rax,8),%r13d
cmp    $0x2,%r13d
mov    $0x1,%r12d
cmovge %r13d,%r12d
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x20(%rsp,%r15,1)
add    $0x1,%r15
cmp    %r15,%r12
jne    15f0 <mp_mul_f_cmul_swap+0x480>
mov    %r14d,%eax
mov    0x8(%rsp),%rcx
lea    (%rcx,%rax,8),%r15
neg    %r13d
mov    0x29cc(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    %r13d,%esi
call   1060 <fseek@plt>
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
movsbl (%r15,%rbp,1),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
add    $0x1,%rbp
cmp    %rbp,%r12
jne    1630 <mp_mul_f_cmul_swap+0x4c0>
mov    %rbx,%rdi
call   1050 <fflush@plt>
movslq 0x18(%rsp),%rax
cmp    $0x3,%rax
mov    $0x2,%edx
cmovge %rax,%rdx
add    $0xffffffffffffffff,%rdx
cmp    $0x2,%rdx
mov    0x10(%rsp),%rbp
jae    167b <mp_mul_f_cmul_swap+0x50b>
xor    %ecx,%ecx
mov    0x8(%rsp),%r12
jmp    1715 <mp_mul_f_cmul_swap+0x5a5>
shr    %rdx
add    $0x1,%rdx
movabs $0x7ffffffffffffffe,%r8
ff ff 7f
and    %rdx,%r8
lea    (%r8,%r8,1),%rcx
xor    %edi,%edi
mov    %r8,%rsi
mov    0x8(%rsp),%r12
nopl   (%rax)
movapd 0x20(%rsp,%rdi,1),%xmm0
movapd 0x30(%rsp,%rdi,1),%xmm1
movapd %xmm0,%xmm2
unpcklpd %xmm1,%xmm2
unpckhpd %xmm1,%xmm0
movupd (%r15,%rdi,1),%xmm1
movupd 0x10(%r15,%rdi,1),%xmm3
movapd %xmm1,%xmm4
unpcklpd %xmm3,%xmm4
unpckhpd %xmm3,%xmm1
movapd %xmm1,%xmm3
mulpd  %xmm0,%xmm3
mulpd  %xmm2,%xmm1
mulpd  %xmm4,%xmm2
subpd  %xmm3,%xmm2
mulpd  %xmm0,%xmm4
addpd  %xmm4,%xmm1
movapd %xmm2,%xmm0
unpckhpd %xmm1,%xmm0
unpcklpd %xmm1,%xmm2
movupd %xmm2,(%r15,%rdi,1)
movupd %xmm0,0x10(%r15,%rdi,1)
add    $0x20,%rdi
add    $0xfffffffffffffffe,%rsi
jne    16a0 <mp_mul_f_cmul_swap+0x530>
cmp    %r8,%rdx
je     1762 <mp_mul_f_cmul_swap+0x5f2>
movapd 0x8e3(%rip),%xmm0
nopl   (%rax)
movupd (%r15,%rcx,8),%xmm1
movsd  0x20(%rsp,%rcx,8),%xmm2
movsd  0x28(%rsp,%rcx,8),%xmm3
movapd %xmm3,%xmm4
xorpd  %xmm0,%xmm4
unpcklpd %xmm3,%xmm4
unpcklpd %xmm2,%xmm2
mulpd  %xmm1,%xmm2
shufpd $0x1,%xmm1,%xmm1
mulpd  %xmm4,%xmm1
addpd  %xmm1,%xmm2
movupd %xmm2,(%r15,%rcx,8)
add    $0x2,%rcx
cmp    %rax,%rcx
jl     1720 <mp_mul_f_cmul_swap+0x5b0>
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x20(%rsp)
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x21(%rsp)
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x22(%rsp)
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x23(%rsp)
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x24(%rsp)
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x25(%rsp)
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x26(%rsp)
mov    %rbx,%rdi
call   1090 <getc@plt>
mov    %al,0x27(%rsp)
movslq %ebp,%rbp
mov    0x281c(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    $0xfffffff8,%esi
call   1060 <fseek@plt>
movsbl (%r12,%rbp,8),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
movsbl 0x1(%r12,%rbp,8),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
movsbl 0x2(%r12,%rbp,8),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
movsbl 0x3(%r12,%rbp,8),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
movsbl 0x4(%r12,%rbp,8),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
movsbl 0x5(%r12,%rbp,8),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
movsbl 0x6(%r12,%rbp,8),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
movsbl 0x7(%r12,%rbp,8),%edi
mov    %rbx,%rsi
call   1040 <putc@plt>
movsd  0x20(%rsp),%xmm0
mulsd  (%r12,%rbp,8),%xmm0
movsd  %xmm0,(%r12,%rbp,8)
mov    %rbx,%rdi
add    $0x2028,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"rb+\00"
@_IOFBF = global i32 0
@SEEK_CUR = global i32 0
define void @mp_mul_f_cmul_swap(i32 %0, i8* %1, double* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca double*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca [1025 x double]
%15 = alloca i8*
%16 = alloca i8*
%17 = alloca i32*
store i32 %0, i32* %4
store i8* %1, i8** %5
store double* %2, double** %6
%18 = load i8*, i8** %5
%19 = call i32* @fopen(i8* %18, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i32* %19, i32** %17
%20 = load i32*, i32** %17
%21 = load i32, i32* @_IOFBF
%22 = call i32 @setvbuf(i32* %20, i32* null, i32 %21, i32 8200)
%23 = getelementptr inbounds [1025 x double], [1025 x double]* %14, i64 0, i64 0
%24 = bitcast double* %23 to i8*
store i8* %24, i8** %15
store i32 0, i32* %9
br label %25
25: ; preds = %36, %3
%26 = load i32, i32* %9
%27 = icmp slt i32 %26, 24
br i1 %27, label %28, label %39
28: ; preds = %25
%29 = load i32*, i32** %17
%30 = call i64 @getc(i32* %29)
%31 = trunc i64 %30 to i8
%32 = load i8*, i8** %15
%33 = load i32, i32* %9
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds i8, i8* %32, i64 %34
store i8 %31, i8* %35
br label %36
36: ; preds = %28
%37 = load i32, i32* %9
%38 = add nsw i32 %37, 1
store i32 %38, i32* %9
br label %25
39: ; preds = %25
%40 = load double*, double** %6
%41 = bitcast double* %40 to i8*
store i8* %41, i8** %16
%42 = load i32*, i32** %17
%43 = load i32, i32* @SEEK_CUR
%44 = call i32 @fseek(i32* %42, i32 -24, i32 %43)
store i32 0, i32* %9
br label %45
45: ; preds = %57, %39
%46 = load i32, i32* %9
%47 = icmp slt i32 %46, 24
br i1 %47, label %48, label %60
48: ; preds = %45
%49 = load i8*, i8** %16
%50 = load i32, i32* %9
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds i8, i8* %49, i64 %51
%53 = load i8, i8* %52
%54 = sext i8 %53 to i32
%55 = load i32*, i32** %17
%56 = call i32 @putc(i32 %54, i32* %55)
br label %57
57: ; preds = %48
%58 = load i32, i32* %9
%59 = add nsw i32 %58, 1
store i32 %59, i32* %9
br label %45
60: ; preds = %45
%61 = load i32*, i32** %17
%62 = call i32 @fflush(i32* %61)
%63 = getelementptr inbounds [1025 x double], [1025 x double]* %14, i64 0, i64 0
%64 = load double, double* %63
%65 = load double*, double** %6
%66 = getelementptr inbounds double, double* %65, i64 0
%67 = load double, double* %66
%68 = fadd double %67, %64
store double %68, double* %66
%69 = getelementptr inbounds [1025 x double], [1025 x double]* %14, i64 0, i64 1
%70 = load double, double* %69
%71 = load double*, double** %6
%72 = getelementptr inbounds double, double* %71, i64 1
%73 = load double, double* %72
%74 = fmul double %73, %70
store double %74, double* %72
%75 = getelementptr inbounds [1025 x double], [1025 x double]* %14, i64 0, i64 2
%76 = load double, double* %75
%77 = load double*, double** %6
%78 = getelementptr inbounds double, double* %77, i64 2
%79 = load double, double* %78
%80 = fmul double %79, %76
store double %80, double* %78
store i32 3, i32* %8
br label %81
81: ; preds = %186, %60
%82 = load i32, i32* %8
%83 = load i32, i32* %4
%84 = add nsw i32 %83, 1
%85 = sub nsw i32 %84, 1024
%86 = icmp slt i32 %82, %85
br i1 %86, label %87, label %189
87: ; preds = %81
store i32 0, i32* %9
br label %88
88: ; preds = %99, %87
%89 = load i32, i32* %9
%90 = icmp slt i32 %89, 8192
br i1 %90, label %91, label %102
91: ; preds = %88
%92 = load i32*, i32** %17
%93 = call i64 @getc(i32* %92)
%94 = trunc i64 %93 to i8
%95 = load i8*, i8** %15
%96 = load i32, i32* %9
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds i8, i8* %95, i64 %97
store i8 %94, i8* %98
br label %99
99: ; preds = %91
%100 = load i32, i32* %9
%101 = add nsw i32 %100, 1
store i32 %101, i32* %9
br label %88
102: ; preds = %88
%103 = load double*, double** %6
%104 = load i32, i32* %8
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds double, double* %103, i64 %105
%107 = bitcast double* %106 to i8*
store i8* %107, i8** %16
%108 = load i32*, i32** %17
%109 = load i32, i32* @SEEK_CUR
%110 = call i32 @fseek(i32* %108, i32 -8192, i32 %109)
store i32 0, i32* %9
br label %111
111: ; preds = %123, %102
%112 = load i32, i32* %9
%113 = icmp slt i32 %112, 8192
br i1 %113, label %114, label %126
114: ; preds = %111
%115 = load i8*, i8** %16
%116 = load i32, i32* %9
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds i8, i8* %115, i64 %117
%119 = load i8, i8* %118
%120 = sext i8 %119 to i32
%121 = load i32*, i32** %17
%122 = call i32 @putc(i32 %120, i32* %121)
br label %123
123: ; preds = %114
%124 = load i32, i32* %9
%125 = add nsw i32 %124, 1
store i32 %125, i32* %9
br label %111
126: ; preds = %111
%127 = load i32*, i32** %17
%128 = call i32 @fflush(i32* %127)
store i32 0, i32* %9
br label %129
129: ; preds = %183, %126
%130 = load i32, i32* %9
%131 = icmp slt i32 %130, 1024
br i1 %131, label %132, label %186
132: ; preds = %129
%133 = load i32, i32* %9
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds [1025 x double], [1025 x double]* %14, i64 0, i64 %134
%136 = load double, double* %135
store double %136, double* %10
%137 = load i32, i32* %9
%138 = add nsw i32 %137, 1
%139 = sext i32 %138 to i64
%140 = getelementptr inbounds [1025 x double], [1025 x double]* %14, i64 0, i64 %139
%141 = load double, double* %140
store double %141, double* %11
%142 = load double*, double** %6
%143 = load i32, i32* %8
%144 = load i32, i32* %9
%145 = add nsw i32 %143, %144
%146 = sext i32 %145 to i64
%147 = getelementptr inbounds double, double* %142, i64 %146
%148 = load double, double* %147
store double %148, double* %12
%149 = load double*, double** %6
%150 = load i32, i32* %8
%151 = load i32, i32* %9
%152 = add nsw i32 %150, %151
%153 = add nsw i32 %152, 1
%154 = sext i32 %153 to i64
%155 = getelementptr inbounds double, double* %149, i64 %154
%156 = load double, double* %155
store double %156, double* %13
%157 = load double, double* %10
%158 = load double, double* %12
%159 = load double, double* %11
%160 = load double, double* %13
%161 = fmul double %159, %160
%162 = fneg double %161
%163 = call double @llvm.fmuladd.f64(double %157, double %158, double %162)
%164 = load double*, double** %6
%165 = load i32, i32* %8
%166 = load i32, i32* %9
%167 = add nsw i32 %165, %166
%168 = sext i32 %167 to i64
%169 = getelementptr inbounds double, double* %164, i64 %168
store double %163, double* %169
%170 = load double, double* %10
%171 = load double, double* %13
%172 = load double, double* %11
%173 = load double, double* %12
%174 = fmul double %172, %173
%175 = call double @llvm.fmuladd.f64(double %170, double %171, double %174)
%176 = load double*, double** %6
%177 = load i32, i32* %8
%178 = load i32, i32* %9
%179 = add nsw i32 %177, %178
%180 = add nsw i32 %179, 1
%181 = sext i32 %180 to i64
%182 = getelementptr inbounds double, double* %176, i64 %181
store double %175, double* %182
br label %183
183: ; preds = %132
%184 = load i32, i32* %9
%185 = add nsw i32 %184, 2
store i32 %185, i32* %9
br label %129
186: ; preds = %129
%187 = load i32, i32* %8
%188 = add nsw i32 %187, 1024
store i32 %188, i32* %8
br label %81
189: ; preds = %81
%190 = load i32, i32* %4
%191 = add nsw i32 %190, 1
%192 = load i32, i32* %8
%193 = sub nsw i32 %191, %192
store i32 %193, i32* %7
%194 = load i32, i32* %7
%195 = icmp sgt i32 %194, 0
br i1 %195, label %196, label %304
196: ; preds = %189
store i32 0, i32* %9
br label %197
197: ; preds = %210, %196
%198 = load i32, i32* %9
%199 = load i32, i32* %7
%200 = mul nsw i32 %199, 8
%201 = icmp slt i32 %198, %200
br i1 %201, label %202, label %213
202: ; preds = %197
%203 = load i32*, i32** %17
%204 = call i64 @getc(i32* %203)
%205 = trunc i64 %204 to i8
%206 = load i8*, i8** %15
%207 = load i32, i32* %9
%208 = sext i32 %207 to i64
%209 = getelementptr inbounds i8, i8* %206, i64 %208
store i8 %205, i8* %209
br label %210
210: ; preds = %202
%211 = load i32, i32* %9
%212 = add nsw i32 %211, 1
store i32 %212, i32* %9
br label %197
213: ; preds = %197
%214 = load double*, double** %6
%215 = load i32, i32* %8
%216 = sext i32 %215 to i64
%217 = getelementptr inbounds double, double* %214, i64 %216
%218 = bitcast double* %217 to i8*
store i8* %218, i8** %16
%219 = load i32*, i32** %17
%220 = load i32, i32* %7
%221 = sub nsw i32 0, %220
%222 = mul nsw i32 %221, 8
%223 = load i32, i32* @SEEK_CUR
%224 = call i32 @fseek(i32* %219, i32 %222, i32 %223)
store i32 0, i32* %9
br label %225
225: ; preds = %239, %213
%226 = load i32, i32* %9
%227 = load i32, i32* %7
%228 = mul nsw i32 %227, 8
%229 = icmp slt i32 %226, %228
br i1 %229, label %230, label %242
230: ; preds = %225
%231 = load i8*, i8** %16
%232 = load i32, i32* %9
%233 = sext i32 %232 to i64
%234 = getelementptr inbounds i8, i8* %231, i64 %233
%235 = load i8, i8* %234
%236 = sext i8 %235 to i32
%237 = load i32*, i32** %17
%238 = call i32 @putc(i32 %236, i32* %237)
br label %239
239: ; preds = %230
%240 = load i32, i32* %9
%241 = add nsw i32 %240, 1
store i32 %241, i32* %9
br label %225
242: ; preds = %225
%243 = load i32*, i32** %17
%244 = call i32 @fflush(i32* %243)
store i32 0, i32* %9
br label %245
245: ; preds = %300, %242
%246 = load i32, i32* %9
%247 = load i32, i32* %7
%248 = icmp slt i32 %246, %247
br i1 %248, label %249, label %303
249: ; preds = %245
%250 = load i32, i32* %9
%251 = sext i32 %250 to i64
%252 = getelementptr inbounds [1025 x double], [1025 x double]* %14, i64 0, i64 %251
%253 = load double, double* %252
store double %253, double* %10
%254 = load i32, i32* %9
%255 = add nsw i32 %254, 1
%256 = sext i32 %255 to i64
%257 = getelementptr inbounds [1025 x double], [1025 x double]* %14, i64 0, i64 %256
%258 = load double, double* %257
store double %258, double* %11
%259 = load double*, double** %6
%260 = load i32, i32* %8
%261 = load i32, i32* %9
%262 = add nsw i32 %260, %261
%263 = sext i32 %262 to i64
%264 = getelementptr inbounds double, double* %259, i64 %263
%265 = load double, double* %264
store double %265, double* %12
%266 = load double*, double** %6
%267 = load i32, i32* %8
%268 = load i32, i32* %9
%269 = add nsw i32 %267, %268
%270 = add nsw i32 %269, 1
%271 = sext i32 %270 to i64
%272 = getelementptr inbounds double, double* %266, i64 %271
%273 = load double, double* %272
store double %273, double* %13
%274 = load double, double* %10
%275 = load double, double* %12
%276 = load double, double* %11
%277 = load double, double* %13
%278 = fmul double %276, %277
%279 = fneg double %278
%280 = call double @llvm.fmuladd.f64(double %274, double %275, double %279)
%281 = load double*, double** %6
%282 = load i32, i32* %8
%283 = load i32, i32* %9
%284 = add nsw i32 %282, %283
%285 = sext i32 %284 to i64
%286 = getelementptr inbounds double, double* %281, i64 %285
store double %280, double* %286
%287 = load double, double* %10
%288 = load double, double* %13
%289 = load double, double* %11
%290 = load double, double* %12
%291 = fmul double %289, %290
%292 = call double @llvm.fmuladd.f64(double %287, double %288, double %291)
%293 = load double*, double** %6
%294 = load i32, i32* %8
%295 = load i32, i32* %9
%296 = add nsw i32 %294, %295
%297 = add nsw i32 %296, 1
%298 = sext i32 %297 to i64
%299 = getelementptr inbounds double, double* %293, i64 %298
store double %292, double* %299
br label %300
300: ; preds = %249
%301 = load i32, i32* %9
%302 = add nsw i32 %301, 2
store i32 %302, i32* %9
br label %245
303: ; preds = %245
br label %304
304: ; preds = %303, %189
store i32 0, i32* %9
br label %305
305: ; preds = %316, %304
%306 = load i32, i32* %9
%307 = icmp slt i32 %306, 8
br i1 %307, label %308, label %319
308: ; preds = %305
%309 = load i32*, i32** %17
%310 = call i64 @getc(i32* %309)
%311 = trunc i64 %310 to i8
%312 = load i8*, i8** %15
%313 = load i32, i32* %9
%314 = sext i32 %313 to i64
%315 = getelementptr inbounds i8, i8* %312, i64 %314
store i8 %311, i8* %315
br label %316
316: ; preds = %308
%317 = load i32, i32* %9
%318 = add nsw i32 %317, 1
store i32 %318, i32* %9
br label %305
319: ; preds = %305
%320 = load double*, double** %6
%321 = load i32, i32* %4
%322 = add nsw i32 %321, 1
%323 = sext i32 %322 to i64
%324 = getelementptr inbounds double, double* %320, i64 %323
%325 = bitcast double* %324 to i8*
store i8* %325, i8** %16
%326 = load i32*, i32** %17
%327 = load i32, i32* @SEEK_CUR
%328 = call i32 @fseek(i32* %326, i32 -8, i32 %327)
store i32 0, i32* %9
br label %329
329: ; preds = %341, %319
%330 = load i32, i32* %9
%331 = icmp slt i32 %330, 8
br i1 %331, label %332, label %344
332: ; preds = %329
%333 = load i8*, i8** %16
%334 = load i32, i32* %9
%335 = sext i32 %334 to i64
%336 = getelementptr inbounds i8, i8* %333, i64 %335
%337 = load i8, i8* %336
%338 = sext i8 %337 to i32
%339 = load i32*, i32** %17
%340 = call i32 @putc(i32 %338, i32* %339)
br label %341
341: ; preds = %332
%342 = load i32, i32* %9
%343 = add nsw i32 %342, 1
store i32 %343, i32* %9
br label %329
344: ; preds = %329
%345 = getelementptr inbounds [1025 x double], [1025 x double]* %14, i64 0, i64 0
%346 = load double, double* %345
%347 = load double*, double** %6
%348 = load i32, i32* %4
%349 = add nsw i32 %348, 1
%350 = sext i32 %349 to i64
%351 = getelementptr inbounds double, double* %347, i64 %350
%352 = load double, double* %351
%353 = fmul double %352, %346
store double %353, double* %351
%354 = load i32*, i32** %17
%355 = call i32 @fclose(i32* %354)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"rb+\00"
@_IOFBF = global i32 0
@SEEK_CUR = global i32 0
define void @mp_mul_f_cmul_swap(i32 %0, i8* nocapture %1, double* nocapture %2) {
%4 = alloca [1025 x double]
%5 = bitcast [1025 x double]* %4 to i8*
%6 = tail call i32* @fopen(i8* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @_IOFBF
%8 = tail call i32 @setvbuf(i32* %6, i32* null, i32 %7, i32 8200)
%9 = tail call i64 @getc(i32* %6)
%10 = trunc i64 %9 to i8
store i8 %10, i8* %5
%11 = tail call i64 @getc(i32* %6)
%12 = trunc i64 %11 to i8
%13 = getelementptr inbounds i8, i8* %5, i64 1
store i8 %12, i8* %13
%14 = tail call i64 @getc(i32* %6)
%15 = trunc i64 %14 to i8
%16 = getelementptr inbounds i8, i8* %5, i64 2
store i8 %15, i8* %16
%17 = tail call i64 @getc(i32* %6)
%18 = trunc i64 %17 to i8
%19 = getelementptr inbounds i8, i8* %5, i64 3
store i8 %18, i8* %19
%20 = tail call i64 @getc(i32* %6)
%21 = trunc i64 %20 to i8
%22 = getelementptr inbounds i8, i8* %5, i64 4
store i8 %21, i8* %22
%23 = tail call i64 @getc(i32* %6)
%24 = trunc i64 %23 to i8
%25 = getelementptr inbounds i8, i8* %5, i64 5
store i8 %24, i8* %25
%26 = tail call i64 @getc(i32* %6)
%27 = trunc i64 %26 to i8
%28 = getelementptr inbounds i8, i8* %5, i64 6
store i8 %27, i8* %28
%29 = tail call i64 @getc(i32* %6)
%30 = trunc i64 %29 to i8
%31 = getelementptr inbounds i8, i8* %5, i64 7
store i8 %30, i8* %31
%32 = tail call i64 @getc(i32* %6)
%33 = trunc i64 %32 to i8
%34 = getelementptr inbounds [1025 x double], [1025 x double]* %4, i64 0, i64 1
%35 = bitcast double* %34 to i8*
store i8 %33, i8* %35
%36 = tail call i64 @getc(i32* %6)
%37 = trunc i64 %36 to i8
%38 = getelementptr inbounds i8, i8* %5, i64 9
store i8 %37, i8* %38
%39 = tail call i64 @getc(i32* %6)
%40 = trunc i64 %39 to i8
%41 = getelementptr inbounds i8, i8* %5, i64 10
store i8 %40, i8* %41
%42 = tail call i64 @getc(i32* %6)
%43 = trunc i64 %42 to i8
%44 = getelementptr inbounds i8, i8* %5, i64 11
store i8 %43, i8* %44
%45 = tail call i64 @getc(i32* %6)
%46 = trunc i64 %45 to i8
%47 = getelementptr inbounds i8, i8* %5, i64 12
store i8 %46, i8* %47
%48 = tail call i64 @getc(i32* %6)
%49 = trunc i64 %48 to i8
%50 = getelementptr inbounds i8, i8* %5, i64 13
store i8 %49, i8* %50
%51 = tail call i64 @getc(i32* %6)
%52 = trunc i64 %51 to i8
%53 = getelementptr inbounds i8, i8* %5, i64 14
store i8 %52, i8* %53
%54 = tail call i64 @getc(i32* %6)
%55 = trunc i64 %54 to i8
%56 = getelementptr inbounds i8, i8* %5, i64 15
store i8 %55, i8* %56
%57 = tail call i64 @getc(i32* %6)
%58 = trunc i64 %57 to i8
%59 = getelementptr inbounds [1025 x double], [1025 x double]* %4, i64 0, i64 2
%60 = bitcast double* %59 to i8*
store i8 %58, i8* %60
%61 = tail call i64 @getc(i32* %6)
%62 = trunc i64 %61 to i8
%63 = getelementptr inbounds i8, i8* %5, i64 17
store i8 %62, i8* %63
%64 = tail call i64 @getc(i32* %6)
%65 = trunc i64 %64 to i8
%66 = getelementptr inbounds i8, i8* %5, i64 18
store i8 %65, i8* %66
%67 = tail call i64 @getc(i32* %6)
%68 = trunc i64 %67 to i8
%69 = getelementptr inbounds i8, i8* %5, i64 19
store i8 %68, i8* %69
%70 = tail call i64 @getc(i32* %6)
%71 = trunc i64 %70 to i8
%72 = getelementptr inbounds i8, i8* %5, i64 20
store i8 %71, i8* %72
%73 = tail call i64 @getc(i32* %6)
%74 = trunc i64 %73 to i8
%75 = getelementptr inbounds i8, i8* %5, i64 21
store i8 %74, i8* %75
%76 = tail call i64 @getc(i32* %6)
%77 = trunc i64 %76 to i8
%78 = getelementptr inbounds i8, i8* %5, i64 22
store i8 %77, i8* %78
%79 = tail call i64 @getc(i32* %6)
%80 = trunc i64 %79 to i8
%81 = getelementptr inbounds i8, i8* %5, i64 23
store i8 %80, i8* %81
%82 = bitcast double* %2 to i8*
%83 = load i32, i32* @SEEK_CUR
%84 = tail call i32 @fseek(i32* %6, i32 -24, i32 %83)
%85 = load i8, i8* %82
%86 = sext i8 %85 to i32
%87 = tail call i32 @putc(i32 %86, i32* %6)
%88 = getelementptr inbounds i8, i8* %82, i64 1
%89 = load i8, i8* %88
%90 = sext i8 %89 to i32
%91 = tail call i32 @putc(i32 %90, i32* %6)
%92 = getelementptr inbounds i8, i8* %82, i64 2
%93 = load i8, i8* %92
%94 = sext i8 %93 to i32
%95 = tail call i32 @putc(i32 %94, i32* %6)
%96 = getelementptr inbounds i8, i8* %82, i64 3
%97 = load i8, i8* %96
%98 = sext i8 %97 to i32
%99 = tail call i32 @putc(i32 %98, i32* %6)
%100 = getelementptr inbounds i8, i8* %82, i64 4
%101 = load i8, i8* %100
%102 = sext i8 %101 to i32
%103 = tail call i32 @putc(i32 %102, i32* %6)
%104 = getelementptr inbounds i8, i8* %82, i64 5
%105 = load i8, i8* %104
%106 = sext i8 %105 to i32
%107 = tail call i32 @putc(i32 %106, i32* %6)
%108 = getelementptr inbounds i8, i8* %82, i64 6
%109 = load i8, i8* %108
%110 = sext i8 %109 to i32
%111 = tail call i32 @putc(i32 %110, i32* %6)
%112 = getelementptr inbounds i8, i8* %82, i64 7
%113 = load i8, i8* %112
%114 = sext i8 %113 to i32
%115 = tail call i32 @putc(i32 %114, i32* %6)
%116 = getelementptr inbounds double, double* %2, i64 1
%117 = bitcast double* %116 to i8*
%118 = load i8, i8* %117
%119 = sext i8 %118 to i32
%120 = tail call i32 @putc(i32 %119, i32* %6)
%121 = getelementptr inbounds i8, i8* %82, i64 9
%122 = load i8, i8* %121
%123 = sext i8 %122 to i32
%124 = tail call i32 @putc(i32 %123, i32* %6)
%125 = getelementptr inbounds i8, i8* %82, i64 10
%126 = load i8, i8* %125
%127 = sext i8 %126 to i32
%128 = tail call i32 @putc(i32 %127, i32* %6)
%129 = getelementptr inbounds i8, i8* %82, i64 11
%130 = load i8, i8* %129
%131 = sext i8 %130 to i32
%132 = tail call i32 @putc(i32 %131, i32* %6)
%133 = getelementptr inbounds i8, i8* %82, i64 12
%134 = load i8, i8* %133
%135 = sext i8 %134 to i32
%136 = tail call i32 @putc(i32 %135, i32* %6)
%137 = getelementptr inbounds i8, i8* %82, i64 13
%138 = load i8, i8* %137
%139 = sext i8 %138 to i32
%140 = tail call i32 @putc(i32 %139, i32* %6)
%141 = getelementptr inbounds i8, i8* %82, i64 14
%142 = load i8, i8* %141
%143 = sext i8 %142 to i32
%144 = tail call i32 @putc(i32 %143, i32* %6)
%145 = getelementptr inbounds i8, i8* %82, i64 15
%146 = load i8, i8* %145
%147 = sext i8 %146 to i32
%148 = tail call i32 @putc(i32 %147, i32* %6)
%149 = getelementptr inbounds double, double* %2, i64 2
%150 = bitcast double* %149 to i8*
%151 = load i8, i8* %150
%152 = sext i8 %151 to i32
%153 = tail call i32 @putc(i32 %152, i32* %6)
%154 = getelementptr inbounds i8, i8* %82, i64 17
%155 = load i8, i8* %154
%156 = sext i8 %155 to i32
%157 = tail call i32 @putc(i32 %156, i32* %6)
%158 = getelementptr inbounds i8, i8* %82, i64 18
%159 = load i8, i8* %158
%160 = sext i8 %159 to i32
%161 = tail call i32 @putc(i32 %160, i32* %6)
%162 = getelementptr inbounds i8, i8* %82, i64 19
%163 = load i8, i8* %162
%164 = sext i8 %163 to i32
%165 = tail call i32 @putc(i32 %164, i32* %6)
%166 = getelementptr inbounds i8, i8* %82, i64 20
%167 = load i8, i8* %166
%168 = sext i8 %167 to i32
%169 = tail call i32 @putc(i32 %168, i32* %6)
%170 = getelementptr inbounds i8, i8* %82, i64 21
%171 = load i8, i8* %170
%172 = sext i8 %171 to i32
%173 = tail call i32 @putc(i32 %172, i32* %6)
%174 = getelementptr inbounds i8, i8* %82, i64 22
%175 = load i8, i8* %174
%176 = sext i8 %175 to i32
%177 = tail call i32 @putc(i32 %176, i32* %6)
%178 = getelementptr inbounds i8, i8* %82, i64 23
%179 = load i8, i8* %178
%180 = sext i8 %179 to i32
%181 = tail call i32 @putc(i32 %180, i32* %6)
%182 = tail call i32 @fflush(i32* %6)
%183 = bitcast [1025 x double]* %4 to <2 x double>*
%184 = load <2 x double>, <2 x double>* %183
%185 = bitcast double* %2 to <2 x double>*
%186 = load <2 x double>, <2 x double>* %185
%187 = fadd <2 x double> %184, %186
%188 = fmul <2 x double> %184, %186
%189 = shufflevector <2 x double> %187, <2 x double> %188, <2 x i32> <i32 0, i32 3>
%190 = bitcast double* %2 to <2 x double>*
store <2 x double> %189, <2 x double>* %190
%191 = getelementptr inbounds [1025 x double], [1025 x double]* %4, i64 0, i64 2
%192 = load double, double* %191
%193 = getelementptr inbounds double, double* %2, i64 2
%194 = load double, double* %193
%195 = fmul double %192, %194
store double %195, double* %193
%196 = add nsw i32 %0, -1023
%197 = icmp sgt i32 %0, 1026
br i1 %197, label %198, label %252
198: ; preds = %3, %246
%199 = phi i64 [ %247, %246 ], [ 3, %3 ]
br label %200
200: ; preds = %198, %200
%201 = phi i64 [ 0, %198 ], [ %205, %200 ]
%202 = tail call i64 @getc(i32* %6)
%203 = trunc i64 %202 to i8
%204 = getelementptr inbounds i8, i8* %5, i64 %201
store i8 %203, i8* %204
%205 = add nuw nsw i64 %201, 1
%206 = icmp eq i64 %205, 8192
br i1 %206, label %207, label %200
207: ; preds = %200
%208 = getelementptr inbounds double, double* %2, i64 %199
%209 = bitcast double* %208 to i8*
%210 = load i32, i32* @SEEK_CUR
%211 = tail call i32 @fseek(i32* %6, i32 -8192, i32 %210)
br label %212
212: ; preds = %207, %212
%213 = phi i64 [ 0, %207 ], [ %218, %212 ]
%214 = getelementptr inbounds i8, i8* %209, i64 %213
%215 = load i8, i8* %214
%216 = sext i8 %215 to i32
%217 = tail call i32 @putc(i32 %216, i32* %6)
%218 = add nuw nsw i64 %213, 1
%219 = icmp eq i64 %218, 8192
br i1 %219, label %220, label %212
220: ; preds = %212
%221 = tail call i32 @fflush(i32* %6)
br label %222
222: ; preds = %222, %220
%223 = phi i64 [ 0, %220 ], [ %244, %222 ]
%224 = shl i64 %223, 1
%225 = getelementptr inbounds [1025 x double], [1025 x double]* %4, i64 0, i64 %224
%226 = bitcast double* %225 to <4 x double>*
%227 = load <4 x double>, <4 x double>* %226
%228 = shufflevector <4 x double> %227, <4 x double> poison, <2 x i32> <i32 0, i32 2>
%229 = shufflevector <4 x double> %227, <4 x double> poison, <2 x i32> <i32 1, i32 3>
%230 = add nuw nsw i64 %224, %199
%231 = getelementptr inbounds double, double* %2, i64 %230
%232 = bitcast double* %231 to <4 x double>*
%233 = load <4 x double>, <4 x double>* %232
%234 = shufflevector <4 x double> %233, <4 x double> poison, <2 x i32> <i32 0, i32 2>
%235 = shufflevector <4 x double> %233, <4 x double> poison, <2 x i32> <i32 1, i32 3>
%236 = fneg <2 x double> %229
%237 = fmul <2 x double> %235, %236
%238 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %228, <2 x double> %234, <2 x double> %237)
%239 = fmul <2 x double> %229, %234
%240 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %228, <2 x double> %235, <2 x double> %239)
%241 = getelementptr inbounds double, double* %2, i64 %230
%242 = bitcast double* %241 to <4 x double>*
%243 = shufflevector <2 x double> %238, <2 x double> %240, <4 x i32> <i32 0, i32 2, i32 1, i32 3>
store <4 x double> %243, <4 x double>* %242
%244 = add nuw i64 %223, 2
%245 = icmp eq i64 %244, 512
br i1 %245, label %246, label %222
246: ; preds = %222
%247 = add nuw i64 %199, 1024
%248 = trunc i64 %247 to i32
%249 = icmp sgt i32 %196, %248
br i1 %249, label %198, label %250
250: ; preds = %246
%251 = trunc i64 %247 to i32
br label %252
252: ; preds = %250, %3
%253 = phi i32 [ 3, %3 ], [ %251, %250 ]
%254 = add nsw i32 %0, 1
%255 = sub nsw i32 %254, %253
%256 = icmp sgt i32 %255, 0
br i1 %256, label %257, label %346
257: ; preds = %252
%258 = shl i32 %255, 3
%259 = call i32 @llvm.smax.i32(i32 %258, i32 1)
%260 = zext i32 %259 to i64
br label %261
261: ; preds = %257, %261
%262 = phi i64 [ 0, %257 ], [ %266, %261 ]
%263 = tail call i64 @getc(i32* %6)
%264 = trunc i64 %263 to i8
%265 = getelementptr inbounds i8, i8* %5, i64 %262
store i8 %264, i8* %265
%266 = add nuw nsw i64 %262, 1
%267 = icmp eq i64 %266, %260
br i1 %267, label %268, label %261
268: ; preds = %261
%269 = zext i32 %253 to i64
%270 = getelementptr inbounds double, double* %2, i64 %269
%271 = bitcast double* %270 to i8*
%272 = mul i32 %255, -8
%273 = load i32, i32* @SEEK_CUR
%274 = tail call i32 @fseek(i32* %6, i32 %272, i32 %273)
%275 = call i32 @llvm.smax.i32(i32 %258, i32 1)
%276 = zext i32 %275 to i64
br label %277
277: ; preds = %268, %277
%278 = phi i64 [ 0, %268 ], [ %283, %277 ]
%279 = getelementptr inbounds i8, i8* %271, i64 %278
%280 = load i8, i8* %279
%281 = sext i8 %280 to i32
%282 = tail call i32 @putc(i32 %281, i32* %6)
%283 = add nuw nsw i64 %278, 1
%284 = icmp eq i64 %283, %276
br i1 %284, label %285, label %277
285: ; preds = %277
%286 = tail call i32 @fflush(i32* %6)
%287 = sext i32 %255 to i64
%288 = call i64 @llvm.smax.i64(i64 %287, i64 2)
%289 = add nsw i64 %288, -1
%290 = lshr i64 %289, 1
%291 = add nuw nsw i64 %290, 1
%292 = icmp ult i64 %289, 2
br i1 %292, label %322, label %293
293: ; preds = %285
%294 = and i64 %291, 9223372036854775806
%295 = shl nuw i64 %294, 1
br label %296
296: ; preds = %296, %293
%297 = phi i64 [ 0, %293 ], [ %318, %296 ]
%298 = shl i64 %297, 1
%299 = getelementptr inbounds [1025 x double], [1025 x double]* %4, i64 0, i64 %298
%300 = bitcast double* %299 to <4 x double>*
%301 = load <4 x double>, <4 x double>* %300
%302 = shufflevector <4 x double> %301, <4 x double> poison, <2 x i32> <i32 0, i32 2>
%303 = shufflevector <4 x double> %301, <4 x double> poison, <2 x i32> <i32 1, i32 3>
%304 = add nuw nsw i64 %298, %269
%305 = getelementptr inbounds double, double* %2, i64 %304
%306 = bitcast double* %305 to <4 x double>*
%307 = load <4 x double>, <4 x double>* %306
%308 = shufflevector <4 x double> %307, <4 x double> poison, <2 x i32> <i32 0, i32 2>
%309 = shufflevector <4 x double> %307, <4 x double> poison, <2 x i32> <i32 1, i32 3>
%310 = fneg <2 x double> %303
%311 = fmul <2 x double> %309, %310
%312 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %302, <2 x double> %308, <2 x double> %311)
%313 = fmul <2 x double> %303, %308
%314 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %302, <2 x double> %309, <2 x double> %313)
%315 = getelementptr inbounds double, double* %2, i64 %304
%316 = bitcast double* %315 to <4 x double>*
%317 = shufflevector <2 x double> %312, <2 x double> %314, <4 x i32> <i32 0, i32 2, i32 1, i32 3>
store <4 x double> %317, <4 x double>* %316
%318 = add nuw i64 %297, 2
%319 = icmp eq i64 %318, %294
br i1 %319, label %320, label %296
320: ; preds = %296
%321 = icmp eq i64 %291, %294
br i1 %321, label %346, label %322
322: ; preds = %285, %320
%323 = phi i64 [ 0, %285 ], [ %295, %320 ]
br label %324
324: ; preds = %322, %324
%325 = phi i64 [ %344, %324 ], [ %323, %322 ]
%326 = getelementptr inbounds [1025 x double], [1025 x double]* %4, i64 0, i64 %325
%327 = load double, double* %326
%328 = or i64 %325, 1
%329 = getelementptr inbounds [1025 x double], [1025 x double]* %4, i64 0, i64 %328
%330 = load double, double* %329
%331 = add nuw nsw i64 %325, %269
%332 = getelementptr inbounds double, double* %2, i64 %331
%333 = bitcast double* %332 to <2 x double>*
%334 = load <2 x double>, <2 x double>* %333
%335 = fneg double %330
%336 = insertelement <2 x double> poison, double %330, i64 0
%337 = insertelement <2 x double> %336, double %335, i64 1
%338 = fmul <2 x double> %334, %337
%339 = shufflevector <2 x double> %338, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%340 = insertelement <2 x double> poison, double %327, i64 0
%341 = shufflevector <2 x double> %340, <2 x double> poison, <2 x i32> zeroinitializer
%342 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %341, <2 x double> %334, <2 x double> %339)
%343 = bitcast double* %332 to <2 x double>*
store <2 x double> %342, <2 x double>* %343
%344 = add nuw nsw i64 %325, 2
%345 = icmp slt i64 %344, %287
br i1 %345, label %324, label %346
346: ; preds = %324, %320, %252
%347 = getelementptr inbounds [1025 x double], [1025 x double]* %4, i64 0, i64 0
%348 = tail call i64 @getc(i32* %6)
%349 = trunc i64 %348 to i8
store i8 %349, i8* %5
%350 = tail call i64 @getc(i32* %6)
%351 = trunc i64 %350 to i8
store i8 %351, i8* %13
%352 = tail call i64 @getc(i32* %6)
%353 = trunc i64 %352 to i8
store i8 %353, i8* %16
%354 = tail call i64 @getc(i32* %6)
%355 = trunc i64 %354 to i8
store i8 %355, i8* %19
%356 = tail call i64 @getc(i32* %6)
%357 = trunc i64 %356 to i8
store i8 %357, i8* %22
%358 = tail call i64 @getc(i32* %6)
%359 = trunc i64 %358 to i8
store i8 %359, i8* %25
%360 = tail call i64 @getc(i32* %6)
%361 = trunc i64 %360 to i8
store i8 %361, i8* %28
%362 = tail call i64 @getc(i32* %6)
%363 = trunc i64 %362 to i8
store i8 %363, i8* %31
%364 = sext i32 %254 to i64
%365 = getelementptr inbounds double, double* %2, i64 %364
%366 = bitcast double* %365 to i8*
%367 = load i32, i32* @SEEK_CUR
%368 = tail call i32 @fseek(i32* %6, i32 -8, i32 %367)
%369 = load i8, i8* %366
%370 = sext i8 %369 to i32
%371 = tail call i32 @putc(i32 %370, i32* %6)
%372 = getelementptr inbounds i8, i8* %366, i64 1
%373 = load i8, i8* %372
%374 = sext i8 %373 to i32
%375 = tail call i32 @putc(i32 %374, i32* %6)
%376 = getelementptr inbounds i8, i8* %366, i64 2
%377 = load i8, i8* %376
%378 = sext i8 %377 to i32
%379 = tail call i32 @putc(i32 %378, i32* %6)
%380 = getelementptr inbounds i8, i8* %366, i64 3
%381 = load i8, i8* %380
%382 = sext i8 %381 to i32
%383 = tail call i32 @putc(i32 %382, i32* %6)
%384 = getelementptr inbounds i8, i8* %366, i64 4
%385 = load i8, i8* %384
%386 = sext i8 %385 to i32
%387 = tail call i32 @putc(i32 %386, i32* %6)
%388 = getelementptr inbounds i8, i8* %366, i64 5
%389 = load i8, i8* %388
%390 = sext i8 %389 to i32
%391 = tail call i32 @putc(i32 %390, i32* %6)
%392 = getelementptr inbounds i8, i8* %366, i64 6
%393 = load i8, i8* %392
%394 = sext i8 %393 to i32
%395 = tail call i32 @putc(i32 %394, i32* %6)
%396 = getelementptr inbounds i8, i8* %366, i64 7
%397 = load i8, i8* %396
%398 = sext i8 %397 to i32
%399 = tail call i32 @putc(i32 %398, i32* %6)
%400 = load double, double* %347
%401 = load double, double* %365
%402 = fmul double %400, %401
store double %402, double* %365
%403 = tail call i32 @fclose(i32* %6)
ret void
}