// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::encode_msm_lock_ex(bamboo::rtcm_t*, int, double const*, int)
static int encode_msm_lock_ex(rtcm_t *rtcm, int i, const double *lock,
                              int ncell)
{
    int j,lock_val;
    
    for (j=0;j<ncell;j++) {
        lock_val=to_msm_lock_ex(lock[j]);
        setbitu(rtcm->buff,i,10,lock_val); i+=10;
    }
    return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rdx, %r15
movl %esi, %r14d
movq %rdi, %r12
addq $0x9f0c4, %r12          # imm = 0x9F0C4
xorl %r13d, %r13d
testl %ecx, %ecx
cmovlel %r13d, %ebx
cmpq %r13, %rbx
je 0x45265
movsd (%r15,%r13,8), %xmm0
movapd %xmm0, %xmm1
mulsd 0x1c478(%rip), %xmm1    # 0x61468
xorl %ecx, %ecx
xorpd %xmm2, %xmm2
ucomisd %xmm0, %xmm2
ja 0x450a7
cvttsd2si %xmm1, %eax
movsd 0x1cd84(%rip), %xmm1    # 0x61d90
ucomisd %xmm0, %xmm1
ja 0x450a5
movsd 0x20c52(%rip), %xmm1    # 0x65c70
ucomisd %xmm0, %xmm1
jbe 0x4502c
addl $0x40, %eax
cltd
pushq $0x2
jmp 0x450a2
movsd 0x20c44(%rip), %xmm1    # 0x65c78
ucomisd %xmm0, %xmm1
jbe 0x45044
addl $0x100, %eax            # imm = 0x100
cltd
pushq $0x4
jmp 0x450a2
movsd 0x20c34(%rip), %xmm1    # 0x65c80
ucomisd %xmm0, %xmm1
jbe 0x4505c
addl $0x300, %eax            # imm = 0x300
cltd
pushq $0x8
jmp 0x450a2
movsd 0x20c24(%rip), %xmm1    # 0x65c88
ucomisd %xmm0, %xmm1
jbe 0x45074
addl $0x800, %eax            # imm = 0x800
cltd
pushq $0x10
jmp 0x450a2
movsd 0x20c14(%rip), %xmm1    # 0x65c90
ucomisd %xmm0, %xmm1
jbe 0x4508c
addl $0x1400, %eax           # imm = 0x1400
cltd
pushq $0x20
jmp 0x450a2
movsd 0x20c04(%rip), %xmm1    # 0x65c98
ucomisd %xmm0, %xmm1
jbe 0x450c1
addl $0x3000, %eax           # imm = 0x3000
cltd
pushq $0x40
popq %rcx
idivl %ecx
movl %eax, %ecx
movq %r12, %rdi
movl %r14d, %esi
pushq $0xa
popq %rdx
callq 0x45a69
addl $0xa, %r14d
incq %r13
jmp 0x44fd5
movsd 0x20bd7(%rip), %xmm1    # 0x65ca0
ucomisd %xmm0, %xmm1
jbe 0x450dc
addl $0x7000, %eax           # imm = 0x7000
cltd
movl $0x80, %ecx
jmp 0x450a3
movsd 0x20bc4(%rip), %xmm1    # 0x65ca8
ucomisd %xmm0, %xmm1
jbe 0x450f7
addl $0x10000, %eax          # imm = 0x10000
cltd
movl $0x100, %ecx            # imm = 0x100
jmp 0x450a3
movsd 0x20bb1(%rip), %xmm1    # 0x65cb0
ucomisd %xmm0, %xmm1
jbe 0x45112
addl $0x24000, %eax          # imm = 0x24000
cltd
movl $0x200, %ecx            # imm = 0x200
jmp 0x450a3
movsd 0x20b9e(%rip), %xmm1    # 0x65cb8
ucomisd %xmm0, %xmm1
jbe 0x45130
addl $0x50000, %eax          # imm = 0x50000
cltd
movl $0x400, %ecx            # imm = 0x400
jmp 0x450a3
movsd 0x20b88(%rip), %xmm1    # 0x65cc0
ucomisd %xmm0, %xmm1
jbe 0x4514e
addl $0xb0000, %eax          # imm = 0xB0000
cltd
movl $0x800, %ecx            # imm = 0x800
jmp 0x450a3
movsd 0x20b72(%rip), %xmm1    # 0x65cc8
ucomisd %xmm0, %xmm1
jbe 0x4516c
addl $0x180000, %eax         # imm = 0x180000
cltd
movl $0x1000, %ecx           # imm = 0x1000
jmp 0x450a3
movsd 0x20b5c(%rip), %xmm1    # 0x65cd0
ucomisd %xmm0, %xmm1
jbe 0x4518a
addl $0x340000, %eax         # imm = 0x340000
cltd
movl $0x2000, %ecx           # imm = 0x2000
jmp 0x450a3
movsd 0x20b56(%rip), %xmm1    # 0x65ce8
ucomisd %xmm0, %xmm1
jbe 0x451a8
addl $0x700000, %eax         # imm = 0x700000
cltd
movl $0x4000, %ecx           # imm = 0x4000
jmp 0x450a3
movsd 0x20b40(%rip), %xmm1    # 0x65cf0
ucomisd %xmm0, %xmm1
jbe 0x451c6
addl $0xf00000, %eax         # imm = 0xF00000
cltd
movl $0x8000, %ecx           # imm = 0x8000
jmp 0x450a3
movsd 0x20b2a(%rip), %xmm1    # 0x65cf8
ucomisd %xmm0, %xmm1
jbe 0x451e4
addl $0x2000000, %eax        # imm = 0x2000000
cltd
movl $0x10000, %ecx          # imm = 0x10000
jmp 0x450a3
movsd 0x20b14(%rip), %xmm1    # 0x65d00
ucomisd %xmm0, %xmm1
jbe 0x45202
addl $0x4400000, %eax        # imm = 0x4400000
cltd
movl $0x20000, %ecx          # imm = 0x20000
jmp 0x450a3
movsd 0x20afe(%rip), %xmm1    # 0x65d08
ucomisd %xmm0, %xmm1
jbe 0x45220
addl $0x9000000, %eax        # imm = 0x9000000
cltd
movl $0x40000, %ecx          # imm = 0x40000
jmp 0x450a3
movsd 0x20ae8(%rip), %xmm1    # 0x65d10
ucomisd %xmm0, %xmm1
jbe 0x4523e
addl $0x13000000, %eax       # imm = 0x13000000
cltd
movl $0x80000, %ecx          # imm = 0x80000
jmp 0x450a3
movl $0x2c0, %ecx            # imm = 0x2C0
movsd 0x20acd(%rip), %xmm1    # 0x65d18
ucomisd %xmm0, %xmm1
jbe 0x450a7
addl $0x28000000, %eax       # imm = 0x28000000
cltd
movl $0x100000, %ecx         # imm = 0x100000
jmp 0x450a3
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq