// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/src/num/fft.c
// Function: ifft_stage
static void ifft_stage(double (*x)[2], int stage, uint N,
		double (*tbl)[2], int delta)
{
	const int idx_step = 1 << (stage - 1);
	int idx;
	double tmp[2];

	const int tbl_step = delta * (N >> stage);
	idx = idx_step;
	for (int i = 0; i < (N >> stage); i++) {
		int tbl_idx = 0;
		for (int j = 0; j < idx_step; j++) {
			tmp[0] = tbl[tbl_idx][0];
			tmp[1] = -tbl[tbl_idx][1];
			tt_complex_mul(x[idx], x[idx], tmp);
			idx++;
			tbl_idx += tbl_step;
		}
		idx += idx_step;
	}

	idx = 0;
	for (int i = 0; i < (N >> stage); i++) {
		for (int j = 0; j < idx_step; j++) {
			tt_complex_add(tmp, x[idx], x[idx+idx_step]);
			tt_complex_sub(x[idx+idx_step], x[idx], x[idx+idx_step]);
			tt_complex_set(x[idx], tmp);
			idx++;
		}
		idx += idx_step;
	}
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movl %esi, 0x4c(%rsp)
movl %edx, 0x48(%rsp)
movq %rcx, 0x40(%rsp)
movl %r8d, 0x3c(%rsp)
movl 0x4c(%rsp), %ecx
subl $0x1, %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, 0x38(%rsp)
movl 0x3c(%rsp), %eax
movl 0x48(%rsp), %edx
movl 0x4c(%rsp), %ecx
shrl %cl, %edx
movl %edx, %ecx
imull %ecx, %eax
movl %eax, 0x1c(%rsp)
movl 0x38(%rsp), %eax
movl %eax, 0x34(%rsp)
movl $0x0, 0x18(%rsp)
movl 0x18(%rsp), %eax
movl 0x48(%rsp), %edx
movl 0x4c(%rsp), %ecx
shrl %cl, %edx
movl %edx, %ecx
cmpl %ecx, %eax
jae 0x2f27
movl $0x0, 0x14(%rsp)
movl $0x0, 0x10(%rsp)
movl 0x10(%rsp), %eax
cmpl 0x38(%rsp), %eax
jge 0x2f0b
movq 0x40(%rsp), %rax
movslq 0x14(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
movq 0x40(%rsp), %rax
movslq 0x14(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, 0x28(%rsp)
movq 0x50(%rsp), %rdi
movslq 0x34(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rdi
movq 0x50(%rsp), %rsi
movslq 0x34(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rsi
leaq 0x20(%rsp), %rdx
callq 0x3280
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
movl 0x1c(%rsp), %eax
addl 0x14(%rsp), %eax
movl %eax, 0x14(%rsp)
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x2e5c
movl 0x38(%rsp), %eax
addl 0x34(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x2e34
movl $0x0, 0x34(%rsp)
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl 0x48(%rsp), %edx
movl 0x4c(%rsp), %ecx
shrl %cl, %edx
movl %edx, %ecx
cmpl %ecx, %eax
jae 0x302a
movl $0x0, 0x8(%rsp)
movl 0x8(%rsp), %eax
cmpl 0x38(%rsp), %eax
jge 0x300e
leaq 0x20(%rsp), %rdi
movq 0x50(%rsp), %rsi
movslq 0x34(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rsi
movq 0x50(%rsp), %rdx
movl 0x34(%rsp), %eax
addl 0x38(%rsp), %eax
cltq
shlq $0x4, %rax
addq %rax, %rdx
callq 0x3310
movq 0x50(%rsp), %rdi
movl 0x34(%rsp), %eax
addl 0x38(%rsp), %eax
cltq
shlq $0x4, %rax
addq %rax, %rdi
movq 0x50(%rsp), %rsi
movslq 0x34(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rsi
movq 0x50(%rsp), %rdx
movl 0x34(%rsp), %eax
addl 0x38(%rsp), %eax
cltq
shlq $0x4, %rax
addq %rax, %rdx
callq 0x3360
movq 0x50(%rsp), %rdi
movslq 0x34(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rdi
leaq 0x20(%rsp), %rsi
callq 0x3240
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x2f57
movl 0x38(%rsp), %eax
addl 0x34(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x2f37
addq $0x58, %rsp
retq
nop