// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x1, -0xc(%rbp)
jne 0x8d363
cmpl $0x0, 0xff9cc(%rip)     # 0x18ccb8
jne 0x8d307
leaq 0xb7472(%rip), %rdi     # 0x144767
callq 0x38510
movq %rax, %rdi
callq 0x88530
jmp 0x8d4ba
callq 0x384f0
movq %rax, %rdi
movl 0xff9a3(%rip), %edx     # 0x18ccb8
leaq 0xb747a(%rip), %rsi     # 0x144796
movb $0x0, %al
callq 0x39660
movq %rax, %rdi
callq 0x88530
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl 0xff97d(%rip), %eax     # 0x18ccb8
jge 0x8d35c
movslq -0x10(%rbp), %rcx
leaq 0xff848(%rip), %rax     # 0x18cb90
movl 0x28(%rax,%rcx,4), %edi
callq 0x8c770
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x8d332
jmp 0x8d35e
jmp 0x8d4ba
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x8d4b8
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
callq 0x895c0
movq -0x30(%rbp), %rdi
movq %rax, %rsi
leaq -0x28(%rbp), %rdx
callq 0x47be0
cmpl $0x0, %eax
jne 0x8d3d3
callq 0x384f0
movq %rax, %rdi
movq -0x20(%rbp), %rdx
leaq 0xb73eb(%rip), %rsi     # 0x1447aa
movb $0x0, %al
callq 0x39660
movq %rax, %rdi
callq 0x88530
jmp 0x8d4a8
cmpq $0x0, -0x28(%rbp)
jne 0x8d3fd
movl $0x0, 0xff8d4(%rip)     # 0x18ccb8
leaq 0xb73d5(%rip), %rdi     # 0x1447c0
callq 0x38510
movq %rax, %rdi
callq 0x88530
jmp 0x8d4a6
cmpq $0x0, -0x28(%rbp)
jle 0x8d45d
cmpl $0x40, 0xff8ad(%rip)    # 0x18ccb8
jne 0x8d423
leaq 0xb73c5(%rip), %rdi     # 0x1447d9
callq 0x38510
movq %rax, %rdi
callq 0x88530
jmp 0x8d45b
movq -0x28(%rbp), %rax
movl %eax, %edi
callq 0x8c430
cmpl $0x0, %eax
je 0x8d445
movq -0x28(%rbp), %rax
movl %eax, %edi
movl $0x1, %esi
callq 0x8c830
jmp 0x8d459
leaq 0xb73a7(%rip), %rdi     # 0x1447f3
callq 0x38510
movq %rax, %rdi
callq 0x88530
jmp 0x8d45b
jmp 0x8d4a4
cmpq $0x0, -0x28(%rbp)
jge 0x8d4a2
xorl %eax, %eax
subq -0x28(%rbp), %rax
movl %eax, %edi
callq 0x8c4b0
cmpl $0x0, %eax
je 0x8d48c
leaq 0xb7389(%rip), %rdi     # 0x144806
callq 0x38510
movq %rax, %rdi
callq 0x88530
jmp 0x8d4a0
leaq 0xb7387(%rip), %rdi     # 0x14481a
callq 0x38510
movq %rax, %rdi
callq 0x88530
jmp 0x8d4a2
jmp 0x8d4a4
jmp 0x8d4a6
jmp 0x8d4a8
jmp 0x8d4aa
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x8d36a
jmp 0x8d4ba
addq $0x30, %rsp
popq %rbp
retq