// File: mh0fm4[P]SCDC/src/components/dataprov/dataprov_fs2.cc
// Function: scdc_dataset_fs2_access::do_cmd_sync(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, _scdc_dataset_inout_t*, _scdc_dataset_inout_t*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool do_cmd_sync(const string &params, scdc_dataset_input_t *input, scdc_dataset_output_t *output, scdc_result &result)
    {
      SCDC_TRACE("do_cmd_sync: params: '" << params << "'");

      bool ret = false;

      stringlist psl(' ', params);

      const string sub = (!pwd_file)?psl.front_pop():"";
      string pwd_path, abs_path;

      if (!dataprov_fs2()->make_pwd_path(pwd, sub, pwd_path))
      {
        result = "invalid path";
        SCDC_FAIL(__func__ << ": make path '" << pwd << "' + '" << sub << "' failed: " << result);
        goto do_return;
      }

      dataprov_fs2()->make_abs_path(pwd_path, abs_path);
      SCDC_TRACE("do_cmd_sync: pwd_path: '" << pwd_path << "', abs_path: '" << abs_path << "'");

      if (z_fs_is_directory(abs_path.c_str()))
      {
        result = "syncing not supported";
        SCDC_FAIL(__func__ << ": syncing directory '" << abs_path << "' failed: " << result);

      } else
      {
        FILE *file = open_file(abs_path, false, false);

        if (!file || fsync(fileno(file)) != 0)
        {
          result = "syncing failed";
          SCDC_FAIL(__func__ << ": syncing file '" << abs_path << "' failed: " << result);

        } else ret = true;

        close_file(file);
      }

do_return:
      SCDC_TRACE(__func__ << ": return: " << ret);

      return ret;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x210, %rsp            # imm = 0x210
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x100(%rbp)
jmp 0x747bc
movb $0x0, -0x29(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x78(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0xc270
movq -0x108(%rbp), %rdx
leaq -0x58(%rbp), %rdi
movl $0x20, %esi
callq 0x5ff80
jmp 0x747eb
leaq -0x78(%rbp), %rdi
callq 0xc3e0
movq -0x100(%rbp), %rax
movb 0x38(%rax), %al
movb $0x0, -0xaa(%rbp)
testb $0x1, %al
jne 0x7481d
leaq -0xa8(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x25b00
jmp 0x7481b
jmp 0x74855
leaq -0xa9(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0xcbc0
movq -0x110(%rbp), %rdx
movb $0x1, -0xaa(%rbp)
leaq 0x31d5f(%rip), %rsi     # 0xa65a4
leaq -0xa8(%rbp), %rdi
callq 0x27820
jmp 0x74853
jmp 0x74855
testb $0x1, -0xaa(%rbp)
jne 0x74860
jmp 0x7486c
leaq -0xa9(%rbp), %rdi
callq 0xc730
leaq -0xd0(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0xc960
leaq -0xf0(%rbp), %rdi
callq 0xc960
movq -0x100(%rbp), %rdi
callq 0x77520
movq -0x100(%rbp), %rsi
movq -0x120(%rbp), %rcx
movq %rax, %rdi
addq $0x18, %rsi
leaq -0xa8(%rbp), %rdx
callq 0x714c0
movb %al, -0x111(%rbp)
jmp 0x748c0
movb -0x111(%rbp), %al
testb $0x1, %al
jne 0x74ae1
jmp 0x748d0
movq -0x28(%rbp), %rdi
leaq 0x33753(%rip), %rsi     # 0xa802e
callq 0xc920
jmp 0x748e2
jmp 0x748e4
leaq 0x5fdbd(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x257e0
cmpq $0x0, %rax
je 0x74ad8
leaq 0x5fda4(%rip), %rax     # 0xd46a8
movq %rax, -0x130(%rbp)
movq (%rax), %rdi
callq 0x25800
movq -0x130(%rbp), %rax
movq (%rax), %rdi
callq 0x257e0
movq %rax, %rdi
leaq 0x31884(%rip), %rsi     # 0xa61b0
callq 0xc670
movq %rax, -0x128(%rbp)
jmp 0x7493a
movq -0x128(%rbp), %rdi
leaq 0x33a65(%rip), %rsi     # 0xa83ad
callq 0xc670
movq %rax, -0x138(%rbp)
jmp 0x74956
movq -0x138(%rbp), %rdi
leaq 0x33bfd(%rip), %rsi     # 0xa8561
callq 0xc670
movq %rax, -0x140(%rbp)
jmp 0x74972
movq -0x140(%rbp), %rdi
leaq 0x33a41(%rip), %rsi     # 0xa83c1
callq 0xc670
movq %rax, -0x148(%rbp)
jmp 0x7498e
movq -0x148(%rbp), %rdi
movq -0x100(%rbp), %rsi
addq $0x18, %rsi
callq 0xc5b0
movq %rax, -0x150(%rbp)
jmp 0x749ae
movq -0x150(%rbp), %rdi
leaq 0x33a13(%rip), %rsi     # 0xa83cf
callq 0xc670
movq %rax, -0x158(%rbp)
jmp 0x749ca
movq -0x158(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0xc5b0
movq %rax, -0x160(%rbp)
jmp 0x749e6
movq -0x160(%rbp), %rdi
leaq 0x31fd4(%rip), %rsi     # 0xa69c8
callq 0xc670
movq %rax, -0x168(%rbp)
jmp 0x74a02
movq -0x168(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xc5b0
movq %rax, -0x170(%rbp)
jmp 0x74a1b
movq -0x170(%rbp), %rdi
movq 0x5f597(%rip), %rsi     # 0xd3fc0
callq 0xc6d0
jmp 0x74a30
leaq 0x5fc71(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x25820
jmp 0x74ad8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x78(%rbp), %rdi
callq 0xc3e0
jmp 0x74e7f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x74e76
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
testb $0x1, -0xaa(%rbp)
jne 0x74a8f
jmp 0x74a9b
leaq -0xa9(%rbp), %rdi
callq 0xc730
jmp 0x74e76
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0xc3e0
leaq -0xd0(%rbp), %rdi
callq 0xc3e0
leaq -0xa8(%rbp), %rdi
callq 0xc3e0
jmp 0x74e76
jmp 0x74ada
jmp 0x74adc
jmp 0x74e29
movq -0x100(%rbp), %rdi
callq 0x77520
movq %rax, %rdi
leaq -0xd0(%rbp), %rsi
leaq -0xf0(%rbp), %rdx
callq 0x71620
jmp 0x74b05
jmp 0x74b07
jmp 0x74b09
jmp 0x74b0b
leaq -0xf0(%rbp), %rdi
callq 0xc260
movq %rax, %rdi
callq 0x5d460
movq %rax, -0x178(%rbp)
jmp 0x74b28
movq -0x178(%rbp), %rax
cmpq $0x0, %rax
je 0x74c75
movq -0x28(%rbp), %rdi
leaq 0x33a29(%rip), %rsi     # 0xa856d
callq 0xc920
jmp 0x74b4b
jmp 0x74b4d
leaq 0x5fb54(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x257e0
cmpq $0x0, %rax
je 0x74c6c
leaq 0x5fb3b(%rip), %rax     # 0xd46a8
movq %rax, -0x188(%rbp)
movq (%rax), %rdi
callq 0x25800
movq -0x188(%rbp), %rax
movq (%rax), %rdi
callq 0x257e0
movq %rax, %rdi
leaq 0x3161b(%rip), %rsi     # 0xa61b0
callq 0xc670
movq %rax, -0x180(%rbp)
jmp 0x74ba3
movq -0x180(%rbp), %rdi
leaq 0x337fc(%rip), %rsi     # 0xa83ad
callq 0xc670
movq %rax, -0x190(%rbp)
jmp 0x74bbf
movq -0x190(%rbp), %rdi
leaq 0x33994(%rip), %rsi     # 0xa8561
callq 0xc670
movq %rax, -0x198(%rbp)
jmp 0x74bdb
movq -0x198(%rbp), %rdi
leaq 0x3399a(%rip), %rsi     # 0xa8583
callq 0xc670
movq %rax, -0x1a0(%rbp)
jmp 0x74bf7
movq -0x1a0(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0xc5b0
movq %rax, -0x1a8(%rbp)
jmp 0x74c13
movq -0x1a8(%rbp), %rdi
leaq 0x31da7(%rip), %rsi     # 0xa69c8
callq 0xc670
movq %rax, -0x1b0(%rbp)
jmp 0x74c2f
movq -0x1b0(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xc5b0
movq %rax, -0x1b8(%rbp)
jmp 0x74c48
movq -0x1b8(%rbp), %rdi
movq 0x5f36a(%rip), %rsi     # 0xd3fc0
callq 0xc6d0
jmp 0x74c5d
leaq 0x5fa44(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x25820
jmp 0x74c6e
jmp 0x74c70
jmp 0x74e27
movq -0x100(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x77540
movq %rax, -0x1c0(%rbp)
jmp 0x74c95
movq -0x1c0(%rbp), %rax
movq %rax, -0xf8(%rbp)
cmpq $0x0, -0xf8(%rbp)
je 0x74cd7
movq -0xf8(%rbp), %rdi
callq 0xc6f0
movl %eax, %edi
callq 0xc580
movl %eax, -0x1c4(%rbp)
jmp 0x74cc8
movl -0x1c4(%rbp), %eax
cmpl $0x0, %eax
je 0x74e10
movq -0x28(%rbp), %rdi
leaq 0x338b7(%rip), %rsi     # 0xa8599
callq 0xc920
jmp 0x74ce9
jmp 0x74ceb
leaq 0x5f9b6(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x257e0
cmpq $0x0, %rax
je 0x74e0a
leaq 0x5f99d(%rip), %rax     # 0xd46a8
movq %rax, -0x1d8(%rbp)
movq (%rax), %rdi
callq 0x25800
movq -0x1d8(%rbp), %rax
movq (%rax), %rdi
callq 0x257e0
movq %rax, %rdi
leaq 0x3147d(%rip), %rsi     # 0xa61b0
callq 0xc670
movq %rax, -0x1d0(%rbp)
jmp 0x74d41
movq -0x1d0(%rbp), %rdi
leaq 0x3365e(%rip), %rsi     # 0xa83ad
callq 0xc670
movq %rax, -0x1e0(%rbp)
jmp 0x74d5d
movq -0x1e0(%rbp), %rdi
leaq 0x337f6(%rip), %rsi     # 0xa8561
callq 0xc670
movq %rax, -0x1e8(%rbp)
jmp 0x74d79
movq -0x1e8(%rbp), %rdi
leaq 0x33821(%rip), %rsi     # 0xa85a8
callq 0xc670
movq %rax, -0x1f0(%rbp)
jmp 0x74d95
movq -0x1f0(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0xc5b0
movq %rax, -0x1f8(%rbp)
jmp 0x74db1
movq -0x1f8(%rbp), %rdi
leaq 0x31c09(%rip), %rsi     # 0xa69c8
callq 0xc670
movq %rax, -0x200(%rbp)
jmp 0x74dcd
movq -0x200(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xc5b0
movq %rax, -0x208(%rbp)
jmp 0x74de6
movq -0x208(%rbp), %rdi
movq 0x5f1cc(%rip), %rsi     # 0xd3fc0
callq 0xc6d0
jmp 0x74dfb
leaq 0x5f8a6(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x25820
jmp 0x74e0c
jmp 0x74e0e
jmp 0x74e14
movb $0x1, -0x29(%rbp)
movq -0x100(%rbp), %rdi
movq -0xf8(%rbp), %rsi
callq 0x77710
jmp 0x74e29
jmp 0x74e2b
jmp 0x74e2d
jmp 0x74e2f
movb -0x29(%rbp), %al
movb %al, -0x209(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0xc3e0
leaq -0xd0(%rbp), %rdi
callq 0xc3e0
leaq -0xa8(%rbp), %rdi
callq 0xc3e0
leaq -0x58(%rbp), %rdi
callq 0x25c90
movb -0x209(%rbp), %al
andb $0x1, %al
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
leaq -0x58(%rbp), %rdi
callq 0x25c90
movq -0x80(%rbp), %rdi
callq 0xcba0
nopl (%rax,%rax)