// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb0, %rsp
movq %r8, %rbx
movq %rdi, %r14
leaq 0x78(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
leaq 0x68(%rsp), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x1d0a0
leaq 0x88(%rsp), %rdi
movl $0x20, %esi
movq %r15, %rdx
callq 0x37a30
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x47954
movq 0x78(%rsp), %rsi
incq %rsi
callq 0xb510
cmpb $0x0, 0x38(%r14)
je 0x4797a
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x23bc2(%rip), %rdx     # 0x6b52d
leaq 0x28(%rsp), %rdi
movq %rdx, %rsi
callq 0x1be38
jmp 0x4798c
leaq 0x28(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x1b878
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
xorl %eax, %eax
movq %rax, -0x8(%r12)
movb %al, (%r12)
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq %rax, -0x8(%r13)
movb %al, (%r13)
leaq 0x18(%r14), %rsi
leaq 0x28(%rsp), %rdx
leaq 0x48(%rsp), %rcx
callq 0x45584
testb %al, %al
je 0x47ad7
movq 0x8(%r14), %rdi
leaq 0x48(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x456e0
movq 0x8(%rsp), %rdi
callq 0x35787
testq %rax, %rax
je 0x47c6e
movq 0x8(%rbx), %rdx
leaq 0x24b6f(%rip), %rcx     # 0x6c56d
movl $0x15, %r8d
movq %rbx, %rdi
xorl %esi, %esi
callq 0xb870
leaq 0x44b5b(%rip), %r14     # 0x8c570
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x47c03
addq $0x20, %rdi
callq 0xb7d0
movq (%r14), %rax
movq 0x8(%rax), %r14
leaq 0x2276e(%rip), %rsi     # 0x6a1a8
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x2495f(%rip), %rsi     # 0x6c3ad
movl $0x13, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x24aff(%rip), %rsi     # 0x6c561
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x24b0d(%rip), %rsi     # 0x6c583
movl $0x15, %edx
movq %r14, %rdi
callq 0xb5f0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r14, %rdi
callq 0xb5f0
movq %rax, %r14
leaq 0x22f71(%rip), %rsi     # 0x6aa10
movl $0xa, %edx
movq %rax, %rdi
callq 0xb5f0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0xb5f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb4d0
jmp 0x47bdd
movq 0x8(%rbx), %rdx
leaq 0x24544(%rip), %rcx     # 0x6c026
movl $0xc, %r8d
movq %rbx, %rdi
xorl %esi, %esi
callq 0xb870
leaq 0x44a77(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x47c03
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x8(%rax), %r15
leaq 0x2268a(%rip), %rsi     # 0x6a1a8
movl $0xb, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x2487b(%rip), %rsi     # 0x6c3ad
movl $0x13, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x24a1b(%rip), %rsi     # 0x6c561
movl $0xb, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x24867(%rip), %rsi     # 0x6c3c1
movl $0xd, %edx
movq %r15, %rdi
callq 0xb5f0
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdx
movq %r15, %rdi
callq 0xb5f0
movq %rax, %r14
leaq 0x2484e(%rip), %rsi     # 0x6c3cf
movl $0x5, %edx
movq %rax, %rdi
callq 0xb5f0
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %r14, %rdi
callq 0xb5f0
movq %rax, %r14
leaq 0x22e66(%rip), %rsi     # 0x6aa10
movl $0xa, %edx
movq %rax, %rdi
callq 0xb5f0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0xb5f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
leaq 0x44979(%rip), %rax     # 0x8c570
movq (%rax), %rdi
addq $0x20, %rdi
callq 0xb3b0
xorl %ebx, %ebx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x47c1c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x47c33
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x47c4e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x88(%rsp), %rdi
callq 0x1bad0
movl %ebx, %eax
addq $0xb0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x4a290
testq %rax, %rax
je 0x47c9b
movq %rax, %rdi
callq 0xb560
movl %eax, %edi
callq 0xb440
testl %eax, %eax
je 0x47d92
movq 0x8(%rbx), %rdx
leaq 0x248f3(%rip), %rcx     # 0x6c599
movl $0xe, %r8d
movq %rbx, %rdi
xorl %esi, %esi
callq 0xb870
leaq 0x448b3(%rip), %r14     # 0x8c570
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x47c03
addq $0x20, %rdi
callq 0xb7d0
movq (%r14), %rax
movq 0x8(%rax), %r14
leaq 0x224c6(%rip), %rsi     # 0x6a1a8
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x246b7(%rip), %rsi     # 0x6c3ad
movl $0x13, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x24857(%rip), %rsi     # 0x6c561
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x2488a(%rip), %rsi     # 0x6c5a8
movl $0x10, %edx
movq %r14, %rdi
callq 0xb5f0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r14, %rdi
callq 0xb5f0
movq %rax, %r14
leaq 0x22cc9(%rip), %rsi     # 0x6aa10
movl $0xa, %edx
movq %rax, %rdi
callq 0xb5f0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0xb5f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
jmp 0x47bf0
movb $0x1, %bl
jmp 0x47c05
jmp 0x47d9b
movq %rax, %rbx
jmp 0x47e0a
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x47e17
movq 0x78(%rsp), %rsi
incq %rsi
callq 0xb510
jmp 0x47e17
jmp 0x47dbe
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x47dd8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x47def
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x47e0a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x88(%rsp), %rdi
callq 0x1bad0
movq %rbx, %rdi
callq 0xb9c0
nop