// File: /workspace/github_c_makefile_star2_O0/randyrossi[P]fisher-modem/mkfilter/src/mkshape.C
// Function: compute_rc()
static void compute_rc() /* (Root?) Raised Cosine */
{
  complex vec[SEQLEN], temp[SEQLEN];
  double f1 = (options & opt_i) ? 0.5 : (1.0 - beta) * alpha;
  double f2 = (options & opt_i) ? 0.5 : (1.0 + beta) * alpha;
  double tau = (options & opt_i) ? 1.0 : 0.5 / alpha;
  for (int i = 0; i <= SEQLEN / 2; i++) {
    double f = (double)i / (double)SEQLEN;
    vec[i] =
        (f <= f1) ? 1.0 : (f <= f2)
                              ? 0.5 * (1.0 + cos((PI * tau / beta) * (f - f1)))
                              : 0.0;
  }
  if (options & opt_r) {
    for (int i = 0; i <= SEQLEN / 2; i++)
      vec[i].re = sqrt(vec[i].re);
  }
  if (options & opt_x) {
    for (int i = 1; i <= SEQLEN / 2; i++) {
      double x = PI * (double)i / (double)SEQLEN;
      vec[i].re *= (x / sin(x));
    }
  }
  for (int i = 0; i <= SEQLEN / 2; i++)
    vec[i].re *= tau;
  for (int i = 1; i < SEQLEN / 2; i++)
    vec[SEQLEN - i] = vec[i];
  fft(vec, temp, SEQLEN); /* inverse fft */
  int h = (numcoeffs - 1) / 2;
  for (int i = 0; i < numcoeffs; i++) {
    int j = (SEQLEN - h + i) % SEQLEN;
    xcoeffs[i] = vec[j].re / (double)SEQLEN;
  }
}

// Assembly:
subq $0x100c8, %rsp          # imm = 0x100C8
leaq 0x80c0(%rsp), %rax
movq %rax, %rcx
addq $0x8000, %rcx           # imm = 0x8000
movq %rcx, 0x50(%rsp)
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x27d0
movq 0x48(%rsp), %rax
movq 0x50(%rsp), %rcx
addq $0x10, %rax
cmpq %rcx, %rax
movq %rax, 0x58(%rsp)
jne 0x1bb3
leaq 0xc0(%rsp), %rax
movq %rax, %rcx
addq $0x8000, %rcx           # imm = 0x8000
movq %rcx, 0x38(%rsp)
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x27d0
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
addq $0x10, %rax
cmpq %rcx, %rax
movq %rax, 0x40(%rsp)
jne 0x1bf6
movl 0x748d(%rip), %eax      # 0x90b0
andl $0x10, %eax
cmpl $0x0, %eax
je 0x1c3b
movsd 0x142d(%rip), %xmm0     # 0x3060
movsd %xmm0, 0x28(%rsp)
jmp 0x1c59
movsd 0x1415(%rip), %xmm0     # 0x3058
subsd 0x747d(%rip), %xmm0     # 0x90c8
mulsd 0x746d(%rip), %xmm0     # 0x90c0
movsd %xmm0, 0x28(%rsp)
movsd 0x28(%rsp), %xmm0
movsd %xmm0, 0xb8(%rsp)
movl 0x7442(%rip), %eax      # 0x90b0
andl $0x10, %eax
cmpl $0x0, %eax
je 0x1c86
movsd 0x13e2(%rip), %xmm0     # 0x3060
movsd %xmm0, 0x20(%rsp)
jmp 0x1ca4
movsd 0x13ca(%rip), %xmm0     # 0x3058
addsd 0x7432(%rip), %xmm0     # 0x90c8
mulsd 0x7422(%rip), %xmm0     # 0x90c0
movsd %xmm0, 0x20(%rsp)
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0xb0(%rsp)
movl 0x73f7(%rip), %eax      # 0x90b0
andl $0x10, %eax
cmpl $0x0, %eax
je 0x1cd1
movsd 0x138f(%rip), %xmm0     # 0x3058
movsd %xmm0, 0x18(%rsp)
jmp 0x1ce7
movsd 0x1387(%rip), %xmm0     # 0x3060
divsd 0x73df(%rip), %xmm0     # 0x90c0
movsd %xmm0, 0x18(%rsp)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0xa8(%rsp)
movl $0x0, 0xa4(%rsp)
cmpl $0x400, 0xa4(%rsp) # imm = 0x400
jg 0x1e38
cvtsi2sdl 0xa4(%rsp), %xmm0
movsd 0x1325(%rip), %xmm1     # 0x3048
divsd %xmm1, %xmm0
movsd %xmm0, 0x98(%rsp)
movsd 0x98(%rsp), %xmm1
movsd 0xb8(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x1d5b
movsd 0x1308(%rip), %xmm0     # 0x3058
movsd %xmm0, 0x10(%rsp)
jmp 0x1dde
movsd 0x98(%rsp), %xmm1
movsd 0xb0(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x1dc7
movsd 0x12ed(%rip), %xmm0     # 0x3068
mulsd 0xa8(%rsp), %xmm0
divsd 0x733c(%rip), %xmm0     # 0x90c8
movsd 0x98(%rsp), %xmm1
subsd 0xb8(%rsp), %xmm1
mulsd %xmm1, %xmm0
callq 0x1100
movsd 0x12a9(%rip), %xmm1     # 0x3058
addsd %xmm0, %xmm1
movsd 0x12a5(%rip), %xmm0     # 0x3060
mulsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
jmp 0x1dd2
xorps %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
jmp 0x1dd2
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x10(%rsp), %xmm0
leaq 0x88(%rsp), %rdi
xorps %xmm1, %xmm1
callq 0x27e0
movslq 0xa4(%rsp), %rcx
leaq 0x80c0(%rsp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x88(%rsp), %rcx
movq %rcx, (%rax)
movq 0x90(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl 0xa4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xa4(%rsp)
jmp 0x1d01
movl 0x7272(%rip), %eax      # 0x90b0
andl $0x4, %eax
cmpl $0x0, %eax
je 0x1eae
movl $0x0, 0x84(%rsp)
cmpl $0x400, 0x84(%rsp) # imm = 0x400
jg 0x1eac
movslq 0x84(%rsp), %rcx
leaq 0x80c0(%rsp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
callq 0x1060
movslq 0x84(%rsp), %rcx
leaq 0x80c0(%rsp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
movsd %xmm0, (%rax)
movl 0x84(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x84(%rsp)
jmp 0x1e51
jmp 0x1eae
movl 0x71fc(%rip), %eax      # 0x90b0
andl $0x40, %eax
cmpl $0x0, %eax
je 0x1f58
movl $0x1, 0x80(%rsp)
cmpl $0x400, 0x80(%rsp) # imm = 0x400
jg 0x1f56
cvtsi2sdl 0x80(%rsp), %xmm1
movsd 0x117f(%rip), %xmm0     # 0x3068
mulsd %xmm1, %xmm0
movsd 0x1153(%rip), %xmm1     # 0x3048
divsd %xmm1, %xmm0
movsd %xmm0, 0x78(%rsp)
movsd 0x78(%rsp), %xmm0
movsd %xmm0, (%rsp)
movsd 0x78(%rsp), %xmm0
callq 0x1040
movaps %xmm0, %xmm1
movsd (%rsp), %xmm0
divsd %xmm1, %xmm0
movslq 0x80(%rsp), %rcx
leaq 0x80c0(%rsp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
mulsd (%rax), %xmm0
movsd %xmm0, (%rax)
movl 0x80(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x80(%rsp)
jmp 0x1ecb
jmp 0x1f58
movl $0x0, 0x74(%rsp)
cmpl $0x400, 0x74(%rsp)      # imm = 0x400
jg 0x1f9c
movsd 0xa8(%rsp), %xmm0
movslq 0x74(%rsp), %rcx
leaq 0x80c0(%rsp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
mulsd (%rax), %xmm0
movsd %xmm0, (%rax)
movl 0x74(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x74(%rsp)
jmp 0x1f60
movl $0x1, 0x70(%rsp)
cmpl $0x400, 0x70(%rsp)      # imm = 0x400
jge 0x1ff8
movslq 0x70(%rsp), %rax
leaq 0x80c0(%rsp), %rcx
shlq $0x4, %rax
addq %rax, %rcx
movl $0x800, %eax            # imm = 0x800
subl 0x70(%rsp), %eax
movslq %eax, %rdx
leaq 0x80c0(%rsp), %rax
shlq $0x4, %rdx
addq %rdx, %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movl 0x70(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x70(%rsp)
jmp 0x1fa4
leaq 0x80c0(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
movl $0x800, %edx            # imm = 0x800
callq 0x23b0
movl 0x70a0(%rip), %eax      # 0x90b8
subl $0x1, %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, 0x6c(%rsp)
movl $0x0, 0x68(%rsp)
movl 0x68(%rsp), %eax
cmpl 0x707f(%rip), %eax      # 0x90b8
jge 0x2096
movl $0x800, %eax            # imm = 0x800
subl 0x6c(%rsp), %eax
addl 0x68(%rsp), %eax
movl $0x800, %ecx            # imm = 0x800
cltd
idivl %ecx
movl %edx, 0x64(%rsp)
movslq 0x64(%rsp), %rcx
leaq 0x80c0(%rsp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
movsd 0xfd4(%rip), %xmm1      # 0x3048
divsd %xmm1, %xmm0
movslq 0x68(%rsp), %rcx
leaq 0x704c(%rip), %rax      # 0x90d0
movsd %xmm0, (%rax,%rcx,8)
movl 0x68(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x68(%rsp)
jmp 0x202f
addq $0x100c8, %rsp          # imm = 0x100C8
retq
nop