// File: /workspace/github_cpp_makefile_star2_O2/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 $0x88, %rsp
movsd %xmm0, -0x70(%rbp)
movq %r8, -0x68(%rbp)
movq %rcx, -0x60(%rbp)
movq %rdx, -0x58(%rbp)
movq %rsi, %r13
movq 0x8(%rsi), %r15
subq (%rsi), %r15
movq %r15, %r12
shrq $0x3, %r12
movslq %r12d, %rbx
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
leaq -0x98(%rbp), %rdx
movq %rax, (%rdx)
leaq -0x50(%rbp), %r14
movq %rdi, -0x38(%rbp)
movq %rbx, %rsi
movq %r14, %rcx
callq 0x2d7e
andq $0x0, (%r14)
leaq -0x98(%rbp), %rdi
leaq -0x50(%rbp), %rdx
leaq -0x80(%rbp), %rcx
movq %rbx, %rsi
callq 0x2d7e
leaq -0x80(%rbp), %rdx
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, (%rdx)
leaq -0x50(%rbp), %rdi
leaq -0x29(%rbp), %rcx
movq %rbx, %rsi
callq 0x2d7e
shlq $0x1d, %r15
movl %r12d, %eax
decl %eax
movabsq $-0x200000000, %r14     # imm = 0xFFFFFFFE00000000
addq %r15, %r14
sarq $0x1d, %r14
xorl %r15d, %r15d
testl %r12d, %r12d
cmovgl %r12d, %r15d
movslq %eax, %r12
leaq -0xb0(%rbp), %rbx
movq %rbx, %rdi
leaq -0x50(%rbp), %rsi
callq 0x2dde
movq %rbx, %rdi
callq 0x3a9c
movsd %xmm0, -0x78(%rbp)
movq %rbx, %rdi
callq 0x2e7e
movsd -0x78(%rbp), %xmm0
ucomisd -0x70(%rbp), %xmm0
jbe 0x3e48
movq -0x60(%rbp), %rax
movq (%rax), %rsi
movsd (%rsi), %xmm0
movq -0x98(%rbp), %rax
movq -0x68(%rbp), %rcx
movq (%rcx), %rdx
mulsd 0x8(%rax), %xmm0
addsd (%rdx), %xmm0
movq -0x58(%rbp), %rcx
movq (%rcx), %rdi
divsd (%rdi), %xmm0
movq -0x38(%rbp), %rcx
movq (%rcx), %rcx
movsd %xmm0, (%rcx)
movq (%r13), %r8
pushq $0x1
popq %r9
cmpq %r12, %r9
jge 0x3dfd
movsd (%rsi,%r9,8), %xmm0
mulsd 0x8(%rax,%r9,8), %xmm0
movsd (%r8,%r9,8), %xmm1
mulsd -0x8(%rax,%r9,8), %xmm1
addsd %xmm0, %xmm1
addsd (%rdx,%r9,8), %xmm1
divsd (%rdi,%r9,8), %xmm1
movsd %xmm1, (%rcx,%r9,8)
incq %r9
jmp 0x3dc3
movsd (%r8,%r12,8), %xmm0
mulsd (%rax,%r14), %xmm0
addsd (%rdx,%r12,8), %xmm0
divsd (%rdi,%r12,8), %xmm0
movsd %xmm0, (%rcx,%r12,8)
movq -0x50(%rbp), %rdx
xorl %esi, %esi
cmpq %rsi, %r15
je 0x3d52
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
jmp 0x3e21
leaq -0x50(%rbp), %rdi
callq 0x2e7e
leaq -0x98(%rbp), %rdi
callq 0x2e7e
movq -0x38(%rbp), %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x3e9a
movq %rax, %rbx
jmp 0x3ea6
movq %rax, %rbx
jmp 0x3e91
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
callq 0x2e7e
leaq -0x50(%rbp), %rdi
callq 0x2e7e
leaq -0x98(%rbp), %rdi
callq 0x2e7e
movq -0x38(%rbp), %rdi
callq 0x2e7e
movq %rbx, %rdi
callq 0x2290