#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef scalar_t__ uint8_t;
typedef scalar_t__ uint32_t;

/* Variables and functions */
scalar_t__ fs_univ_move(scalar_t__, int /*<<< orphan*/, int, scalar_t__,
                        scalar_t__, scalar_t__ const *, scalar_t__, scalar_t__,
                        scalar_t__ const *, int /*<<< orphan*/,
                        int /*<<< orphan*/, int /*<<< orphan*/,
                        int /*<<< orphan*/, int /*<<< orphan*/, scalar_t__ *,
                        int /*<<< orphan*/ *);
uint8_t fs_mr_move(uint32_t ts, uint32_t parent_src, uint32_t nleng_src,
                   const uint8_t *name_src, uint32_t parent_dst,
                   uint32_t nleng_dst, const uint8_t *name_dst,
                   uint32_t inode) {
  uint32_t rinode;
  uint8_t status;
  status =
      fs_univ_move(ts, 0, 0x80, parent_src, nleng_src, name_src, parent_dst,
                   nleng_dst, name_dst, 0, 0, 0, 0, 0, &rinode, NULL);
  if (status != 0) {
    return status;
  }
  if (rinode != inode) {
    return 32;
  }
  return 0;
}


x86 assembly (clang, -O0):
<fs_mr_move>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0xa0,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
mov    %rdx,-0x30(%rbp)
mov    %rcx,-0x38(%rbp)
mov    %r8,-0x40(%rbp)
mov    %r9,-0x48(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
mov    -0x38(%rbp),%r9
mov    -0x40(%rbp),%rbx
mov    -0x48(%rbp),%r11
mov    0x10(%rbp),%r10
xor    %esi,%esi
mov    $0x80,%edx
lea    -0x50(%rbp),%rax
xor    %r14d,%r14d
mov    %rbx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
movl   $0x0,0x18(%rsp)
movl   $0x0,0x20(%rsp)
movl   $0x0,0x28(%rsp)
movl   $0x0,0x30(%rsp)
movl   $0x0,0x38(%rsp)
mov    %rax,0x40(%rsp)
movq   $0x0,0x48(%rsp)
call   1030 <fs_univ_move@plt>
mov    %rax,-0x58(%rbp)
cmpq   $0x0,-0x58(%rbp)
je     11cd <fs_mr_move+0xbd>
mov    -0x58(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    11f0 <fs_mr_move+0xe0>
mov    -0x50(%rbp),%rax
cmp    0x18(%rbp),%rax
je     11e8 <fs_mr_move+0xd8>
movq   $0x20,-0x18(%rbp)
jmp    11f0 <fs_mr_move+0xe0>
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0xa0,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

x86 assembly (clang, -O2):
<fs_mr_move>:
push   %rax
mov    %r9,%rax
mov    %r8,%r10
mov    %rcx,%r9
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %rsp,%r11
xor    %esi,%esi
mov    $0x80,%edx
push   $0x0
push   %r11
push   $0x0
push   $0x0
push   $0x0
push   $0x0
push   $0x0
push   0x48(%rsp)
push   %rax
push   %r10
call   1030 <fs_univ_move@plt>
add    $0x50,%rsp
mov    (%rsp),%rcx
xor    %edx,%edx
cmp    0x18(%rsp),%rcx
setne  %dl
shl    $0x5,%rdx
test   %rax,%rax
cmove  %rdx,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @fs_mr_move(i64 %0, i64 %1, i64 %2, i64* %3, i64 %4, i64 %5, i64* %6, i64 %7) {
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64*
%14 = alloca i64
%15 = alloca i64
%16 = alloca i64*
%17 = alloca i64
%18 = alloca i64
%19 = alloca i64
store i64 %0, i64* %10
store i64 %1, i64* %11
store i64 %2, i64* %12
store i64* %3, i64** %13
store i64 %4, i64* %14
store i64 %5, i64* %15
store i64* %6, i64** %16
store i64 %7, i64* %17
%20 = load i64, i64* %10
%21 = load i64, i64* %11
%22 = load i64, i64* %12
%23 = load i64*, i64** %13
%24 = load i64, i64* %14
%25 = load i64, i64* %15
%26 = load i64*, i64** %16
%27 = call i64 @fs_univ_move(i64 %20, i32 0, i32 128, i64 %21, i64 %22, i64* %23, i64 %24, i64 %25, i64* %26, i32 0, i32 0, i32 0, i32 0, i32 0, i64* %18, i32* null)
store i64 %27, i64* %19
%28 = load i64, i64* %19
%29 = icmp ne i64 %28, 0
br i1 %29, label %30, label %32
30: ; preds = %8
%31 = load i64, i64* %19
store i64 %31, i64* %9
br label %38
32: ; preds = %8
%33 = load i64, i64* %18
%34 = load i64, i64* %17
%35 = icmp ne i64 %33, %34
br i1 %35, label %36, label %37
36: ; preds = %32
store i64 32, i64* %9
br label %38
37: ; preds = %32
store i64 0, i64* %9
br label %38
38: ; preds = %37, %36, %30
%39 = load i64, i64* %9
ret i64 %39
}

LLVM IR (-O2):
define i64 @fs_mr_move(i64 %0, i64 %1, i64 %2, i64* %3, i64 %4, i64 %5, i64* %6, i64 %7) {
%9 = alloca i64
%10 = bitcast i64* %9 to i8*
%11 = call i64 @fs_univ_move(i64 %0, i32 0, i32 128, i64 %1, i64 %2, i64* %3, i64 %4, i64 %5, i64* %6, i32 0, i32 0, i32 0, i32 0, i32 0, i64* %9, i32* null)
%12 = icmp eq i64 %11, 0
%13 = load i64, i64* %9
%14 = icmp eq i64 %13, %7
%15 = select i1 %14, i64 0, i64 32
%16 = select i1 %12, i64 %15, i64 %11
ret i64 %16
}