// File: /workspace/github_cpp_makefile_star2_O1/trapexit[P]bbf/src/bbf_fsthrash.cpp
// Function: l::fsthrash(Options const&)
AppError
  fsthrash(const Options &opts_)
  {
    FSThrashState state(opts_.device);
    int rv;
    pthread_t thread_id;
    std::vector<pthread_t> threads;

    state.verbose = !opts_.quiet;
    l::spawn_thread(l::create_thread,&state,&threads);
    l::spawn_thread(l::open_thread,&state,&threads);
    l::spawn_thread(l::mkdir_thread,&state,&threads);
    l::spawn_thread(l::write_thread,&state,&threads);
    l::spawn_thread(l::read_thread,&state,&threads);
    l::spawn_thread(l::unlink_thread,&state,&threads);
    l::spawn_thread(l::rmdir_thread,&state,&threads);
    l::spawn_thread(l::close_thread,&state,&threads);
    l::spawn_thread(l::readdir_thread,&state,&threads);
    l::spawn_thread(l::stat_thread,&state,&threads);
    l::spawn_thread(l::chmod_thread,&state,&threads);
    l::spawn_thread(l::chown_thread,&state,&threads);
    l::spawn_thread(l::link_thread,&state,&threads);
    l::spawn_thread(l::symlink_thread,&state,&threads);

    printf("CTRL-C to exit...\n");
    pause();
    printf("Cleaning up...\n");

    l::disable_signals();
    state.is_finished = true;
    for(size_t i = 0; i < threads.size(); i++)
      pthread_join(threads[i],NULL);

    return AppError::success();
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x28(%rsp), %rdi
movw $0x0, -0x8(%rdi)
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x8(%rsi), %rsi
movq 0x10(%r15), %rdx
addq %rsi, %rdx
callq 0x9b42
leaq 0x48(%rsp), %r14
movl $0xc0, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x4280
xorps %xmm0, %xmm0
movq %rsp, %rdx
movaps %xmm0, (%rdx)
movq $0x0, 0x10(%rdx)
cmpl $0x0, 0x28(%r15)
sete -0x27(%r14)
leaq 0x2b5(%rip), %rdi       # 0x887c
leaq 0x20(%rsp), %rsi
callq 0x87e9
leaq 0x3f1(%rip), %rdi       # 0x89c9
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
callq 0x87e9
leaq 0x507(%rip), %rdi       # 0x8af3
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
callq 0x87e9
leaq 0x646(%rip), %rdi       # 0x8c46
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
callq 0x87e9
leaq 0x711(%rip), %rdi       # 0x8d25
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
callq 0x87e9
leaq 0x82b(%rip), %rdi       # 0x8e53
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
callq 0x87e9
leaq 0x9d3(%rip), %rdi       # 0x900f
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
callq 0x87e9
leaq 0xb7b(%rip), %rdi       # 0x91cb
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
callq 0x87e9
leaq 0xc17(%rip), %rdi       # 0x927b
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
callq 0x87e9
leaq 0xcab(%rip), %rdi       # 0x9323
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
callq 0x87e9
leaq 0xdcf(%rip), %rdi       # 0x945b
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
callq 0x87e9
leaq 0xeee(%rip), %rdi       # 0x958e
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
callq 0x87e9
leaq 0x1021(%rip), %rdi      # 0x96d5
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
callq 0x87e9
leaq 0x11e8(%rip), %rdi      # 0x98b0
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
callq 0x87e9
leaq 0xdb2b(%rip), %rdi      # 0x16207
callq 0x4630
callq 0x40a0
leaq 0xdce0(%rip), %rdi      # 0x163cd
callq 0x4630
leaq 0x108(%rsp), %r15
movq %r15, %rdi
callq 0x4180
movl $0x2, %edi
movq %r15, %rsi
xorl %edx, %edx
callq 0x40f0
movb $0x1, 0x20(%rsp)
movq (%rsp), %rax
cmpq %rax, 0x8(%rsp)
je 0x8747
xorl %r15d, %r15d
movq (%rax,%r15,8), %rdi
xorl %esi, %esi
callq 0x4420
incq %r15
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r15
jb 0x8724
movq %rbx, %rdi
callq 0xdd7c
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x8765
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x44b0
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0x877f
movq 0x88(%rsp), %rsi
subq %rdi, %rsi
callq 0x44b0
leaq 0x60(%rsp), %r15
movq %r15, %rdi
callq 0xa590
movq %r14, %rdi
callq 0xa590
movq -0x38(%r15), %rdi
cmpq %r12, %rdi
je 0x87aa
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x44b0
movq %rbx, %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x87be
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x87d7
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x44b0
leaq 0x20(%rsp), %rdi
callq 0x9afc
movq %rbx, %rdi
callq 0x46f0