// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/scripting.c
// Function: ldbBreak
void ldbBreak(sds *argv, int argc) {
    if (argc == 1) {
        if (ldb.bpcount == 0) {
            ldbLog(sdsnew("No breakpoints set. Use 'b <line>' to add one."));
            return;
        } else {
            ldbLog(sdscatfmt(sdsempty(),"%i breakpoints set:",ldb.bpcount));
            int j;
            for (j = 0; j < ldb.bpcount; j++)
                ldbLogSourceLine(ldb.bp[j]);
        }
    } else {
        int j;
        for (j = 1; j < argc; j++) {
            char *arg = argv[j];
            long line;
            if (!string2l(arg,sdslen(arg),&line)) {
                ldbLog(sdscatfmt(sdsempty(),"Invalid argument:'%s'",arg));
            } else {
                if (line == 0) {
                    ldb.bpcount = 0;
                    ldbLog(sdsnew("All breakpoints removed."));
                } else if (line > 0) {
                    if (ldb.bpcount == LDB_BREAKPOINTS_MAX) {
                        ldbLog(sdsnew("Too many breakpoints set."));
                    } else if (ldbAddBreakpoint(line)) {
                        ldbList(line,1);
                    } else {
                        ldbLog(sdsnew("Wrong line number."));
                    }
                } else if (line < 0) {
                    if (ldbDelBreakpoint(-line))
                        ldbLog(sdsnew("Breakpoint removed."));
                    else
                        ldbLog(sdsnew("No breakpoint in the specified line."));
                }
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x1, %esi
jne 0x65c26
cmpl $0x0, 0xa87b4(%rip)     # 0x10e388
je 0x65d03
callq 0x3114c
movl 0xa87a3(%rip), %edx     # 0x10e388
leaq 0x55aba(%rip), %rsi     # 0xbb6a6
xorl %ebx, %ebx
movq %rax, %rdi
xorl %eax, %eax
callq 0x31abc
movq %rax, %rdi
callq 0x627e8
leaq 0xa8659(%rip), %r14     # 0x10e260
movslq 0xa877a(%rip), %rax     # 0x10e388
cmpq %rax, %rbx
jge 0x65cf4
movl 0x28(%r14,%rbx,4), %edi
callq 0x653e7
incq %rbx
jmp 0x65c07
movq %rdi, %rbx
movslq %esi, %r13
pushq $0x1
popq %r12
movq %rsp, %r14
leaq 0x55a80(%rip), %r15     # 0xbb6ba
cmpq %r13, %r12
jge 0x65cf4
movq (%rbx,%r12,8), %rbp
movq %rbp, %rdi
callq 0x63370
movq %rbp, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x39976
testl %eax, %eax
je 0x65c7e
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x65c95
jle 0x65ca5
cmpl $0x40, 0xa8715(%rip)    # 0x10e388
jne 0x65cb9
leaq 0x55a6d(%rip), %rdi     # 0xbb6e9
jmp 0x65cdf
callq 0x3114c
movq %rax, %rdi
movq %r15, %rsi
movq %rbp, %rdx
xorl %eax, %eax
callq 0x31abc
jmp 0x65ce4
andl $0x0, 0xa86ec(%rip)     # 0x10e388
leaq 0x55a2d(%rip), %rdi     # 0xbb6d0
jmp 0x65cdf
negl %edi
callq 0x65256
testl %eax, %eax
je 0x65ccf
leaq 0x55a5f(%rip), %rdi     # 0xbb716
jmp 0x65cdf
callq 0x65202
testl %eax, %eax
je 0x65cd8
movl (%rsp), %edi
pushq $0x1
popq %rsi
callq 0x65471
jmp 0x65cec
leaq 0x55a54(%rip), %rdi     # 0xbb72a
jmp 0x65cdf
leaq 0x55a24(%rip), %rdi     # 0xbb703
callq 0x3115a
movq %rax, %rdi
callq 0x627e8
incq %r12
jmp 0x65c3a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5596d(%rip), %rdi     # 0xbb677
callq 0x3115a
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x627e8