// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x75046
cmpl $0x0, 0xa6347(%rip)     # 0x11b328
je 0x751a1
callq 0x39222
movl 0xa6336(%rip), %edx     # 0x11b328
leaq 0x587e5(%rip), %rsi     # 0xcd7de
movq %rax, %rdi
xorl %eax, %eax
callq 0x39f3b
movq 0xa6206(%rip), %rdi     # 0x11b210
movq %rax, %rsi
callq 0x2e40f
cmpl $0x0, 0xa630f(%rip)     # 0x11b328
jle 0x75192
xorl %ebx, %ebx
leaq 0xa61d8(%rip), %r14     # 0x11b200
movl 0x28(%r14,%rbx,4), %edi
callq 0x74619
incq %rbx
movslq 0xa62ec(%rip), %rax     # 0x11b328
cmpq %rax, %rbx
jl 0x75028
jmp 0x75192
jle 0x75192
movq %rdi, %rbx
movl %esi, %r13d
movl $0x1, %r12d
leaq 0xa61a1(%rip), %r15     # 0x11b200
leaq 0x577ba(%rip), %r14     # 0xcc820
movq (%rbx,%r12,8), %rbp
movzbl -0x1(%rbp), %esi
movl %esi, %eax
andl $0x7, %eax
cmpl $0x4, %eax
ja 0x7509d
movslq (%r14,%rax,4), %rax
addq %r14, %rax
jmpq *%rax
shrl $0x3, %esi
jmp 0x7509f
movq -0x11(%rbp), %rsi
jmp 0x7509f
movzwl -0x5(%rbp), %esi
jmp 0x7509f
movl -0x9(%rbp), %esi
jmp 0x7509f
movzbl -0x3(%rbp), %esi
jmp 0x7509f
xorl %esi, %esi
movq %rbp, %rdi
movq %rsp, %rdx
callq 0x435b3
testl %eax, %eax
je 0x750ce
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x750ec
jle 0x750ff
cmpl $0x40, 0xa6268(%rip)    # 0x11b328
jne 0x75127
leaq 0x58758(%rip), %rdi     # 0xcd821
jmp 0x75172
callq 0x39222
movq %rax, %rdi
leaq 0x58715(%rip), %rsi     # 0xcd7f2
movq %rbp, %rdx
xorl %eax, %eax
callq 0x39f3b
jmp 0x75177
movl $0x0, 0xa6232(%rip)     # 0x11b328
leaq 0x5870b(%rip), %rdi     # 0xcd808
jmp 0x75172
movslq 0xa6222(%rip), %rax     # 0x11b328
testq %rax, %rax
jle 0x7511e
negl %edi
xorl %ecx, %ecx
cmpl %edi, 0x28(%r15,%rcx,4)
je 0x7513f
incq %rcx
cmpq %rcx, %rax
jne 0x7510f
leaq 0x5873d(%rip), %rdi     # 0xcd862
jmp 0x75172
callq 0x743e0
testl %eax, %eax
je 0x7516b
movl (%rsp), %edi
movl $0x1, %esi
callq 0x746d4
jmp 0x75186
decl %eax
movl %eax, 0xa61e1(%rip)     # 0x11b328
leaq (%r15,%rcx,4), %rdi
addq $0x28, %rdi
leaq (%r15,%rcx,4), %rsi
addq $0x2c, %rsi
movslq %eax, %rdx
subq %rcx, %rdx
callq 0x267f0
leaq 0x586e5(%rip), %rdi     # 0xcd84e
jmp 0x75172
leaq 0x586c9(%rip), %rdi     # 0xcd83b
callq 0x39245
movq 0xa6092(%rip), %rdi     # 0x11b210
movq %rax, %rsi
callq 0x2e40f
incq %r12
cmpq %r13, %r12
jne 0x75066
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x58607(%rip), %rdi     # 0xcd7af
callq 0x39245
movq 0xa605c(%rip), %rdi     # 0x11b210
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2e40f