#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__ uint64_t;
typedef scalar_t__ uint32_t;

/* Variables and functions */
scalar_t__ fs_univ_archchg(scalar_t__, int /*<<< orphan*/, int, scalar_t__,
                           scalar_t__, scalar_t__, scalar_t__ *, scalar_t__ *,
                           scalar_t__ *);
uint8_t fs_mr_archchg(uint32_t ts, uint32_t inode, uint32_t uid, uint8_t cmd,
                      uint64_t chgchunks, uint64_t notchgchunks,
                      uint32_t nsinodes) {
  uint64_t cc, ncc;
  uint32_t nsi;
  uint8_t status;
  status = fs_univ_archchg(ts, 0, 0x80, inode, uid, cmd, &cc, &ncc, &nsi);
  if (status != 0) {
    return status;
  }
  if (cc != chgchunks || ncc != notchgchunks || nsi != nsinodes) {
    return 32;
  }
  return 0;
}


x86 assembly (clang, -O0):
<fs_mr_archchg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
xor    %esi,%esi
mov    $0x80,%edx
lea    -0x40(%rbp),%r11
lea    -0x48(%rbp),%r10
lea    -0x50(%rbp),%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1030 <fs_univ_archchg@plt>
mov    %rax,-0x58(%rbp)
cmpq   $0x0,-0x58(%rbp)
je     1186 <fs_mr_archchg+0x76>
mov    -0x58(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    11c5 <fs_mr_archchg+0xb5>
mov    -0x40(%rbp),%rax
cmp    -0x30(%rbp),%rax
jne    11b0 <fs_mr_archchg+0xa0>
mov    -0x48(%rbp),%rax
cmp    -0x38(%rbp),%rax
jne    11b0 <fs_mr_archchg+0xa0>
mov    -0x50(%rbp),%rax
cmp    0x10(%rbp),%rax
je     11bd <fs_mr_archchg+0xad>
movq   $0x20,-0x8(%rbp)
jmp    11c5 <fs_mr_archchg+0xb5>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fs_mr_archchg>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %r9,%rbx
mov    %r8,%r14
mov    %rcx,%r9
mov    %rdx,%r8
mov    %rsi,%rcx
sub    $0x8,%rsp
lea    0x8(%rsp),%rax
lea    0x10(%rsp),%r10
lea    0x18(%rsp),%r11
xor    %esi,%esi
mov    $0x80,%edx
push   %rax
push   %r10
push   %r11
call   1030 <fs_univ_archchg@plt>
add    $0x20,%rsp
test   %rax,%rax
jne    1175 <fs_mr_archchg+0x65>
xor    0x10(%rsp),%r14
xor    0x8(%rsp),%rbx
mov    0x30(%rsp),%rcx
or     %r14,%rbx
xor    (%rsp),%rcx
xor    %eax,%eax
or     %rbx,%rcx
setne  %al
shl    $0x5,%rax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i64 @fs_mr_archchg(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6) {
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = bitcast i64* %8 to i8*
%12 = bitcast i64* %9 to i8*
%13 = bitcast i64* %10 to i8*
%14 = call i64 @fs_univ_archchg(i64 %0, i32 0, i32 128, i64 %1, i64 %2, i64 %3, i64* %8, i64* %9, i64* %10)
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %26
16: ; preds = %7
%17 = load i64, i64* %8
%18 = icmp eq i64 %17, %4
%19 = load i64, i64* %9
%20 = icmp eq i64 %19, %5
%21 = select i1 %18, i1 %20, i1 false
%22 = load i64, i64* %10
%23 = icmp eq i64 %22, %6
%24 = select i1 %21, i1 %23, i1 false
%25 = select i1 %24, i64 0, i64 32
br label %26
26: ; preds = %16, %7
%27 = phi i64 [ %14, %7 ], [ %25, %16 ]
ret i64 %27
}