// File: /workspace/github_c_makefile_star2_O0/debbiemarkslab[P]plmc/src/lib/lbfgs.c
// Function: owlqn_pseudo_gradient
static void owlqn_pseudo_gradient(
    lbfgsfloatval_t* pg,
    const lbfgsfloatval_t* x,
    const lbfgsfloatval_t* g,
    const int n,
    const lbfgsfloatval_t c,
    const int start,
    const int end
    )
{
    int i;

    /* Compute the negative of gradients. */
    for (i = 0;i < start;++i) {
        pg[i] = g[i];
    }

    /* Compute the psuedo-gradients. */
    for (i = start;i < end;++i) {
        if (x[i] < 0.) {
            /* Differentiable. */
            pg[i] = g[i] - c;
        } else if (0. < x[i]) {
            /* Differentiable. */
            pg[i] = g[i] + c;
        } else {
            if (g[i] < -c) {
                /* Take the right partial derivative. */
                pg[i] = g[i] + c;
            } else if (c < g[i]) {
                /* Take the left partial derivative. */
                pg[i] = g[i] - c;
            } else {
                pg[i] = 0.;
            }
        }
    }

    for (i = end;i < n;++i) {
        pg[i] = g[i];
    }
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq %rdx, -0x18(%rsp)
movl %ecx, -0x1c(%rsp)
movsd %xmm0, -0x28(%rsp)
movl %r8d, -0x2c(%rsp)
movl %r9d, -0x30(%rsp)
movl $0x0, -0x34(%rsp)
movl -0x34(%rsp), %eax
cmpl -0x2c(%rsp), %eax
jge 0x3df0
movq -0x18(%rsp), %rax
movslq -0x34(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x8(%rsp), %rax
movslq -0x34(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rsp)
jmp 0x3dbb
movl -0x2c(%rsp), %eax
movl %eax, -0x34(%rsp)
movl -0x34(%rsp), %eax
cmpl -0x30(%rsp), %eax
jge 0x3f47
movq -0x10(%rsp), %rax
movslq -0x34(%rsp), %rcx
xorps %xmm0, %xmm0
ucomisd (%rax,%rcx,8), %xmm0
jbe 0x3e43
movq -0x18(%rsp), %rax
movslq -0x34(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
subsd -0x28(%rsp), %xmm0
movq -0x8(%rsp), %rax
movslq -0x34(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x3f35
movq -0x10(%rsp), %rax
movslq -0x34(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x3e84
movq -0x18(%rsp), %rax
movslq -0x34(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
addsd -0x28(%rsp), %xmm0
movq -0x8(%rsp), %rax
movslq -0x34(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x3f33
movq -0x18(%rsp), %rax
movslq -0x34(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
movsd -0x28(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x3edc
movq -0x18(%rsp), %rax
movslq -0x34(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
addsd -0x28(%rsp), %xmm0
movq -0x8(%rsp), %rax
movslq -0x34(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x3f31
movsd -0x28(%rsp), %xmm1
movq -0x18(%rsp), %rax
movslq -0x34(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x3f1d
movq -0x18(%rsp), %rax
movslq -0x34(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
subsd -0x28(%rsp), %xmm0
movq -0x8(%rsp), %rax
movslq -0x34(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x3f2f
movq -0x8(%rsp), %rax
movslq -0x34(%rsp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
jmp 0x3f31
jmp 0x3f33
jmp 0x3f35
jmp 0x3f37
movl -0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rsp)
jmp 0x3df8
movl -0x30(%rsp), %eax
movl %eax, -0x34(%rsp)
movl -0x34(%rsp), %eax
cmpl -0x1c(%rsp), %eax
jge 0x3f84
movq -0x18(%rsp), %rax
movslq -0x34(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x8(%rsp), %rax
movslq -0x34(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rsp)
jmp 0x3f4f
retq
nopw %cs:(%rax,%rax)