// File: /workspace/github_cpp_makefile_star2_O3/FR13ndSDP[P]NHT/Solver.cpp
// Function: jacobi(std::vector<double, std::allocator<double>>, std::vector<double, std::allocator<double>>, std::vector<double, std::allocator<double>>, std::vector<double, std::allocator<double>>, double)
Vec jacobi(Vec aW, Vec aP, Vec aE, Vec Su, double p)
{
    int n = aW.size();
    Vec phi(n,1);
    Vec phi0(n,0);
    Vec errList(n,1);
    // whith origin value as 0
    while (maxabs(errList) > p)
    {
        phi[0] = (aE[0]*phi0[1]+Su[0])/aP[0];
        for (int i =1; i<n-1; i++)
        {
            phi[i] = (aW[i]*phi0[i-1]+aE[i]*phi0[i+1]+Su[i])/aP[i];
        }
        phi[n-1] = (aW[n-1]*phi0[n-2]+Su[n-1])/aP[n-1];
        for (int i=0; i<n; i++)
        {
            errList[i] = phi0[i] - phi[i];
            phi0[i] = phi[i];
        }
    }
    return phi;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movsd %xmm0, -0xa0(%rbp)
movq %r8, -0x90(%rbp)
movq %rcx, -0x88(%rbp)
movq %rdx, -0x80(%rbp)
movq 0x8(%rsi), %r14
movq %rsi, -0x78(%rbp)
subq (%rsi), %r14
movq %r14, %rbx
shrq $0x3, %rbx
movslq %ebx, %r15
movabsq $0x3ff0000000000000, %r12 # imm = 0x3FF0000000000000
leaq -0x68(%rbp), %rdx
movq %r12, (%rdx)
leaq -0x50(%rbp), %r13
movq %rdi, -0x38(%rbp)
movq %r15, %rsi
movq %r13, %rcx
callq 0x32ea
movq $0x0, (%r13)
leaq -0x68(%rbp), %rdi
leaq -0x50(%rbp), %rdx
leaq -0xb0(%rbp), %rcx
movq %r15, %rsi
callq 0x32ea
leaq -0xb0(%rbp), %rdx
movq %r12, (%rdx)
leaq -0x50(%rbp), %rdi
leaq -0x29(%rbp), %rcx
movq %r15, %rsi
callq 0x32ea
shlq $0x1d, %r14
leal -0x1(%rbx), %r15d
movslq %r15d, %r12
movabsq $-0x200000000, %rax     # imm = 0xFFFFFFFE00000000
addq %r14, %rax
sarq $0x1d, %rax
movq %rax, -0x70(%rbp)
movq %rbx, -0x98(%rbp)
movl %ebx, %r14d
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
decq %r15
leaq -0xc8(%rbp), %r13
movq %r13, %rdi
leaq -0x50(%rbp), %rsi
callq 0x3376
movq %r13, %rbx
movq %r13, %rdi
callq 0x40ec
movq -0xc8(%rbp), %rdi
testq %rdi, %rdi
je 0x449e
movq -0xb8(%rbp), %rsi
subq %rdi, %rsi
movsd %xmm0, -0xa8(%rbp)
callq 0x21c0
movsd -0xa8(%rbp), %xmm0
ucomisd -0xa0(%rbp), %xmm0
movq -0x98(%rbp), %r10
jbe 0x4593
movq -0x88(%rbp), %rax
movq (%rax), %rdi
movsd (%rdi), %xmm0
movq -0x68(%rbp), %rax
movq -0x90(%rbp), %rcx
movq (%rcx), %rdx
mulsd 0x8(%rax), %xmm0
addsd (%rdx), %xmm0
movq -0x80(%rbp), %rcx
movq (%rcx), %rsi
divsd (%rsi), %xmm0
movq -0x38(%rbp), %rcx
movq (%rcx), %rcx
movsd %xmm0, (%rcx)
movq -0x78(%rbp), %r8
movq (%r8), %r8
cmpl $0x3, %r10d
jl 0x453a
xorl %r9d, %r9d
movsd 0x8(%rdi,%r9,8), %xmm0
mulsd 0x10(%rax,%r9,8), %xmm0
movsd 0x8(%r8,%r9,8), %xmm1
mulsd (%rax,%r9,8), %xmm1
addsd %xmm0, %xmm1
addsd 0x8(%rdx,%r9,8), %xmm1
divsd 0x8(%rsi,%r9,8), %xmm1
movsd %xmm1, 0x8(%rcx,%r9,8)
incq %r9
cmpq %r9, %r15
jne 0x44fe
movsd (%r8,%r12,8), %xmm0
movq -0x70(%rbp), %rdi
mulsd (%rax,%rdi), %xmm0
addsd (%rdx,%r12,8), %xmm0
divsd (%rsi,%r12,8), %xmm0
movsd %xmm0, (%rcx,%r12,8)
testl %r10d, %r10d
movq %rbx, %r13
jle 0x445c
movq -0x50(%rbp), %rdx
xorl %esi, %esi
movsd (%rax,%rsi,8), %xmm0
subsd (%rcx,%rsi,8), %xmm0
movsd %xmm0, (%rdx,%rsi,8)
movsd (%rcx,%rsi,8), %xmm0
movsd %xmm0, (%rax,%rsi,8)
incq %rsi
cmpq %rsi, %r14
jne 0x456d
jmp 0x445c
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x45a8
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x21c0
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0x45bd
movq -0x58(%rbp), %rsi
subq %rdi, %rsi
callq 0x21c0
movq -0x38(%rbp), %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x45f5
movq %rax, %rbx
jmp 0x460a
movq %rax, %rbx
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x45f5
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x21c0
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0x460a
movq -0x58(%rbp), %rsi
subq %rdi, %rsi
callq 0x21c0
movq -0x38(%rbp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x4626
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rsi
subq %rdi, %rsi
callq 0x21c0
movq %rbx, %rdi
callq 0x2280