	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ehea_rem_mr                    ## -- Begin function ehea_rem_mr
	.p2align	4, 0x90
_ehea_rem_mr:                           ## @ehea_rem_mr
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	8(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movl	(%rax), %eax
	movl	(%rdi), %esi
	movq	_FORCE_FREE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	callq	_ehea_h_free_resource
	movq	%rax, %rcx
	movq	_H_SUCCESS@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	je	LBB0_6
## %bb.4:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_5:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_FORCE_FREE,4,2                 ## @FORCE_FREE
	.comm	_H_SUCCESS,8,3                  ## @H_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"destroy MR failed\n"

	.comm	_EIO,4,2                        ## @EIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ehea_rem_mr                    ; -- Begin function ehea_rem_mr
	.p2align	2
_ehea_rem_mr:                           ; @ehea_rem_mr
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	cbz	x0, LBB0_4
; %bb.1:
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_4
; %bb.2:
	ldr	w8, [x8]
	ldr	w1, [x0]
Lloh0:
	adrp	x9, _FORCE_FREE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FORCE_FREE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x9]
	mov	x0, x8
	bl	_ehea_h_free_resource
Lloh3:
	adrp	x8, _H_SUCCESS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _H_SUCCESS@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.3:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_4:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh10:
	adrp	x8, _EIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_FORCE_FREE,4,2                 ; @FORCE_FREE
	.comm	_H_SUCCESS,8,3                  ; @H_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"destroy MR failed\n"

	.comm	_EIO,4,2                        ; @EIO
.subsections_via_symbols
