// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/ddb.c
// Function: backgroundSaveDoneHandlerDisk
void backgroundSaveDoneHandlerDisk(int exitcode, int bysignal) {
    if (!bysignal && exitcode == 0) {
        serverLog(LL_NOTICE,
            "Background saving terminated with success");
        server.dirty = server.dirty - server.dirty_before_bgsave;
        server.lastsave = time(NULL);
        server.lastbgsave_status = C_OK;
    } else if (!bysignal && exitcode != 0) {
        serverLog(LL_WARNING, "Background saving error");
        server.lastbgsave_status = C_ERR;
    } else {
        mstime_t latency;

        serverLog(LL_WARNING,
            "Background saving terminated by signal %d", bysignal);
        latencyStartMonitor(latency);
        ddbRemoveTempFile(server.ddb_child_pid);
        latencyEndMonitor(latency);
        latencyAddSampleIfNeeded("ddb-unlink-temp-file",latency);
        /* SIGUSR1 is whitelisted, so we have a way to kill a child without
         * tirggering an error conditon. */
        if (bysignal != SIGUSR1)
            server.lastbgsave_status = C_ERR;
    }
    server.ddb_child_pid = -1;
    server.ddb_child_type = DDB_CHILD_TYPE_NONE;
    server.ddb_save_time_last = time(NULL)-server.ddb_save_time_start;
    server.ddb_save_time_start = -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
jne 0x3c947
cmpl $0x0, -0x4(%rbp)
jne 0x3c947
movl $0x2, %edi
leaq 0x6cdd2(%rip), %rsi     # 0xa96b8
movb $0x0, %al
callq 0x18b10
leaq 0x827f4(%rip), %rax     # 0xbf0e8
movq 0x6a0(%rax), %rcx
leaq 0x827e6(%rip), %rax     # 0xbf0e8
subq 0x6a8(%rax), %rcx
leaq 0x827d8(%rip), %rax     # 0xbf0e8
movq %rcx, 0x6a0(%rax)
xorl %eax, %eax
movl %eax, %edi
callq 0x12530
movq %rax, %rcx
leaq 0x827be(%rip), %rax     # 0xbf0e8
movq %rcx, 0x6d8(%rax)
leaq 0x827b0(%rip), %rax     # 0xbf0e8
movl $0x0, 0x6fc(%rax)
jmp 0x3ca36
cmpl $0x0, -0x8(%rbp)
jne 0x3c97c
cmpl $0x0, -0x4(%rbp)
je 0x3c97c
movl $0x3, %edi
leaq 0x6cd83(%rip), %rsi     # 0xa96e2
movb $0x0, %al
callq 0x18b10
leaq 0x8277b(%rip), %rax     # 0xbf0e8
movl $0xffffffff, 0x6fc(%rax) # imm = 0xFFFFFFFF
jmp 0x3ca34
movl -0x8(%rbp), %edx
movl $0x3, %edi
leaq 0x6cd6f(%rip), %rsi     # 0xa96fa
movb $0x0, %al
callq 0x18b10
leaq 0x8274f(%rip), %rax     # 0xbf0e8
cmpq $0x0, 0x670(%rax)
je 0x3c9ae
callq 0x18e20
movq %rax, -0x10(%rbp)
jmp 0x3c9b6
movq $0x0, -0x10(%rbp)
leaq 0x8272b(%rip), %rax     # 0xbf0e8
movl 0x6b0(%rax), %edi
callq 0x3c180
leaq 0x82719(%rip), %rax     # 0xbf0e8
cmpq $0x0, 0x670(%rax)
je 0x3c9e6
callq 0x18e20
subq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq 0x826fb(%rip), %rax     # 0xbf0e8
cmpq $0x0, 0x670(%rax)
je 0x3ca1b
movq -0x10(%rbp), %rax
leaq 0x826e6(%rip), %rcx     # 0xbf0e8
cmpq 0x670(%rcx), %rax
jl 0x3ca1b
movq -0x10(%rbp), %rsi
leaq 0x6c117(%rip), %rdi     # 0xa8b2d
callq 0x37f70
cmpl $0xa, -0x8(%rbp)
je 0x3ca32
leaq 0x826c0(%rip), %rax     # 0xbf0e8
movl $0xffffffff, 0x6fc(%rax) # imm = 0xFFFFFFFF
jmp 0x3ca34
jmp 0x3ca36
leaq 0x826ab(%rip), %rax     # 0xbf0e8
movl $0xffffffff, 0x6b0(%rax) # imm = 0xFFFFFFFF
leaq 0x8269a(%rip), %rax     # 0xbf0e8
movl $0x0, 0x6f8(%rax)
xorl %eax, %eax
movl %eax, %edi
callq 0x12530
movq %rax, %rcx
leaq 0x8267d(%rip), %rax     # 0xbf0e8
subq 0x6f0(%rax), %rcx
leaq 0x8266f(%rip), %rax     # 0xbf0e8
movq %rcx, 0x6e8(%rax)
leaq 0x82661(%rip), %rax     # 0xbf0e8
movq $-0x1, 0x6f0(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)