// File: /workspace/github_c_makefile_star2_O3/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 0x7159b
cmpl $0x0, 0xa4e52(%rip)     # 0x116388
je 0x716f6
callq 0x3628d
movl 0xa4e41(%rip), %edx     # 0x116388
leaq 0x59328(%rip), %rsi     # 0xca876
movq %rax, %rdi
xorl %eax, %eax
callq 0x36fb1
movq 0xa4d11(%rip), %rdi     # 0x116270
movq %rax, %rsi
callq 0x2b24b
cmpl $0x0, 0xa4e1a(%rip)     # 0x116388
jle 0x716e7
xorl %ebx, %ebx
leaq 0xa4ce3(%rip), %r14     # 0x116260
movl 0x28(%r14,%rbx,4), %edi
callq 0x70b7f
incq %rbx
movslq 0xa4df7(%rip), %rax     # 0x116388
cmpq %rax, %rbx
jl 0x7157d
jmp 0x716e7
jle 0x716e7
movq %rdi, %rbx
movl %esi, %r13d
movl $0x1, %r12d
leaq 0xa4cac(%rip), %r15     # 0x116260
leaq 0x582fd(%rip), %r14     # 0xc98b8
movq (%rbx,%r12,8), %rbp
movzbl -0x1(%rbp), %esi
movl %esi, %eax
andl $0x7, %eax
cmpl $0x4, %eax
ja 0x715f2
movslq (%r14,%rax,4), %rax
addq %r14, %rax
jmpq *%rax
shrl $0x3, %esi
jmp 0x715f4
movq -0x11(%rbp), %rsi
jmp 0x715f4
movzwl -0x5(%rbp), %esi
jmp 0x715f4
movl -0x9(%rbp), %esi
jmp 0x715f4
movzbl -0x3(%rbp), %esi
jmp 0x715f4
xorl %esi, %esi
movq %rbp, %rdi
movq %rsp, %rdx
callq 0x40170
testl %eax, %eax
je 0x71623
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x71641
jle 0x71654
cmpl $0x40, 0xa4d73(%rip)    # 0x116388
jne 0x7167c
leaq 0x5929b(%rip), %rdi     # 0xca8b9
jmp 0x716c7
callq 0x3628d
movq %rax, %rdi
leaq 0x59258(%rip), %rsi     # 0xca88a
movq %rbp, %rdx
xorl %eax, %eax
callq 0x36fb1
jmp 0x716cc
movl $0x0, 0xa4d3d(%rip)     # 0x116388
leaq 0x5924e(%rip), %rdi     # 0xca8a0
jmp 0x716c7
movslq 0xa4d2d(%rip), %rax     # 0x116388
testq %rax, %rax
jle 0x71673
negl %edi
xorl %ecx, %ecx
cmpl %edi, 0x28(%r15,%rcx,4)
je 0x71694
incq %rcx
cmpq %rcx, %rax
jne 0x71664
leaq 0x59280(%rip), %rdi     # 0xca8fa
jmp 0x716c7
callq 0x70975
testl %eax, %eax
je 0x716c0
movl (%rsp), %edi
movl $0x1, %esi
callq 0x70c2a
jmp 0x716db
leaq (%r15,%rcx,4), %rdi
addq $0x28, %rdi
decl %eax
movl %eax, 0xa4ce4(%rip)     # 0x116388
leaq (%r15,%rcx,4), %rsi
addq $0x2c, %rsi
movslq %eax, %rdx
subq %rcx, %rdx
callq 0x267e0
leaq 0x59228(%rip), %rdi     # 0xca8e6
jmp 0x716c7
leaq 0x5920c(%rip), %rdi     # 0xca8d3
callq 0x362b0
movq 0xa4b9d(%rip), %rdi     # 0x116270
movq %rax, %rsi
callq 0x2b24b
incq %r12
cmpq %r13, %r12
jne 0x715bb
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5914a(%rip), %rdi     # 0xca847
callq 0x362b0
movq 0xa4b67(%rip), %rdi     # 0x116270
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2b24b