// File: mouda[P]LTE_random_access-simulate/alglibinternal.cpp
// Function: alglib_impl::armijocreate(long, alglib_impl::ae_vector*, double, alglib_impl::ae_vector*, double, double, long, alglib_impl::armijostate*, alglib_impl::ae_state*)
void armijocreate(ae_int_t n,
     /* Real    */ ae_vector* x,
     double f,
     /* Real    */ ae_vector* s,
     double stp,
     double stpmax,
     ae_int_t fmax,
     armijostate* state,
     ae_state *_state)
{


    if( state->x.cnt<n )
    {
        ae_vector_set_length(&state->x, n, _state);
    }
    if( state->xbase.cnt<n )
    {
        ae_vector_set_length(&state->xbase, n, _state);
    }
    if( state->s.cnt<n )
    {
        ae_vector_set_length(&state->s, n, _state);
    }
    state->stpmax = stpmax;
    state->fmax = fmax;
    state->stplen = stp;
    state->fcur = f;
    state->n = n;
    ae_v_move(&state->xbase.ptr.p_double[0], 1, &x->ptr.p_double[0], 1, ae_v_len(0,n-1));
    ae_v_move(&state->s.ptr.p_double[0], 1, &s->ptr.p_double[0], 1, ae_v_len(0,n-1));
    ae_vector_set_length(&state->rstate.ia, 0+1, _state);
    ae_vector_set_length(&state->rstate.ra, 0+1, _state);
    state->rstate.stage = -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movsd %xmm0, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movsd %xmm1, -0x28(%rbp)
movsd %xmm2, -0x30(%rbp)
movq %rcx, -0x38(%rbp)
movq %r8, -0x40(%rbp)
movq %r9, -0x48(%rbp)
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x8(%rbp), %rax
jge 0x333f2
movq -0x40(%rbp), %rdi
addq $0x8, %rdi
movq -0x8(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x3b620
movq -0x40(%rbp), %rax
movq 0x48(%rax), %rax
cmpq -0x8(%rbp), %rax
jge 0x33415
movq -0x40(%rbp), %rdi
addq $0x48, %rdi
movq -0x8(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x3b620
movq -0x40(%rbp), %rax
movq 0x78(%rax), %rax
cmpq -0x8(%rbp), %rax
jge 0x33438
movq -0x40(%rbp), %rdi
addq $0x78, %rdi
movq -0x8(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x3b620
movsd -0x30(%rbp), %xmm0
movq -0x40(%rbp), %rax
movsd %xmm0, 0xb8(%rax)
movq -0x38(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0xc0(%rax)
movsd -0x28(%rbp), %xmm0
movq -0x40(%rbp), %rax
movsd %xmm0, 0xa8(%rax)
movsd -0x18(%rbp), %xmm0
movq -0x40(%rbp), %rax
movsd %xmm0, 0xb0(%rax)
movq -0x8(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x40(%rbp), %rax
movq 0x70(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rsi
subq $0x1, %rsi
xorl %eax, %eax
movl %eax, %edi
callq 0x42370
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rdx
movq %rax, %r8
movl $0x1, %ecx
movq %rcx, %rsi
callq 0x41b10
movq -0x40(%rbp), %rax
movq 0xa0(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rsi
subq $0x1, %rsi
xorl %eax, %eax
movl %eax, %edi
callq 0x42370
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rdx
movq %rax, %r8
movl $0x1, %ecx
movq %rcx, %rsi
callq 0x41b10
movq -0x40(%rbp), %rdi
addq $0xd8, %rdi
addq $0x8, %rdi
movq -0x48(%rbp), %rdx
movl $0x1, %esi
callq 0x3b620
movq -0x40(%rbp), %rdi
addq $0xd8, %rdi
addq $0x68, %rdi
movq -0x48(%rbp), %rdx
movl $0x1, %esi
callq 0x3b620
movq -0x40(%rbp), %rax
movl $0xffffffff, 0xd8(%rax) # imm = 0xFFFFFFFF
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)