// File: /workspace/github_c_makefile_star2_O0/seojangho[P]clee/clee.c
// Function: clee_set_trigger
void (*clee_set_trigger(clee_events ev, void (*handler)()))() {
    void (*old_handler)();
    switch (ev) {
        case syscall_entry:
            old_handler = event_handlers.syscall_entry;
            event_handlers.syscall_entry = handler;
            return old_handler;
        case syscall_exit:
            old_handler = event_handlers.syscall_exit;
            event_handlers.syscall_exit = handler;
            return old_handler;
        case exited:
            old_handler = event_handlers.exited;
            event_handlers.exited = handler;
            return old_handler;
        case terminated:
            old_handler = event_handlers.terminated;
            event_handlers.terminated = handler;
            return old_handler;
        case continued:
            old_handler = event_handlers.continued;
            event_handlers.continued = handler;
            return old_handler;
        case stopped:
            old_handler = event_handlers.stopped;
            event_handlers.stopped = handler;
            return old_handler;
        case new_process:
            old_handler = event_handlers.new_process;
            event_handlers.new_process = handler;
            return old_handler;
        case syscall_clone:
            old_handler = event_handlers.syscall_clone;
            event_handlers.syscall_clone = handler;
            return old_handler;
        case syscall_fork:
            old_handler = event_handlers.syscall_fork;
            event_handlers.syscall_fork = handler;
            return old_handler;
        case syscall_vfork:
            old_handler = event_handlers.syscall_vfork;
            event_handlers.syscall_vfork = handler;
            return old_handler;
        case syscall_seccomp:
            old_handler = event_handlers.syscall_seccomp;
            event_handlers.syscall_seccomp = handler;
            return old_handler;
        case successful_exec:
            old_handler = event_handlers.successful_exec;
            event_handlers.successful_exec = handler;
            return old_handler;
        default:
            CLEE_ERROR;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x28(%rbp)
subq $0xb, %rax
ja 0x3f4c
movq -0x28(%rbp), %rax
leaq 0x429d(%rip), %rcx      # 0x8048
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x83fd(%rip), %rax      # 0xc1b8
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, 0x83ee(%rip)      # 0xc1b8
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3f6b
movq 0x83e2(%rip), %rax      # 0xc1c0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, 0x83d3(%rip)      # 0xc1c0
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3f6b
movq 0x83c7(%rip), %rax      # 0xc1c8
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, 0x83b8(%rip)      # 0xc1c8
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3f6b
movq 0x83ac(%rip), %rax      # 0xc1d0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, 0x839d(%rip)      # 0xc1d0
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3f6b
movq 0x8391(%rip), %rax      # 0xc1d8
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, 0x8382(%rip)      # 0xc1d8
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3f6b
movq 0x8376(%rip), %rax      # 0xc1e0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, 0x8367(%rip)      # 0xc1e0
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3f6b
movq 0x835b(%rip), %rax      # 0xc1e8
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, 0x834c(%rip)      # 0xc1e8
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3f6b
movq 0x8340(%rip), %rax      # 0xc1f0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, 0x8331(%rip)      # 0xc1f0
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3f6b
movq 0x8325(%rip), %rax      # 0xc1f8
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, 0x8316(%rip)      # 0xc1f8
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3f6b
movq 0x830d(%rip), %rax      # 0xc200
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, 0x82fe(%rip)      # 0xc200
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3f6b
movq 0x82f5(%rip), %rax      # 0xc208
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, 0x82e6(%rip)      # 0xc208
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3f6b
movq 0x82dd(%rip), %rax      # 0xc210
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, 0x82ce(%rip)      # 0xc210
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3f6b
leaq 0x4155(%rip), %rdi      # 0x80a8
leaq 0x4150(%rip), %rsi      # 0x80aa
movl $0x160, %edx            # imm = 0x160
leaq 0x420b(%rip), %rcx      # 0x8171
callq 0x30c0
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)