	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ehca_dereg_internal_maxmr      ## -- Begin function ehca_dereg_internal_maxmr
	.p2align	4, 0x90
_ehca_dereg_internal_maxmr:             ## @ehca_dereg_internal_maxmr
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.1:
	movq	8(%rbx), %r12
	movq	$0, (%r15)
	movq	%rbx, %rdi
	callq	_ehca_dereg_mr
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %r14d
	leaq	8(%r15), %rdi
	movl	(%rbx), %r9d
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	movq	%rbx, %rcx
	movq	%r15, %r8
	xorl	%eax, %eax
	callq	_ehca_err
	movq	%rbx, (%r15)
	jmp	LBB0_6
LBB0_4:
	leaq	8(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_ehca_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	negl	%eax
	movq	(%r15), %rbx
	movl	%eax, %r14d
LBB0_6:
	leaq	8(%r15), %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %edx
	movq	%r15, %rcx
	movq	%rbx, %r8
	xorl	%eax, %eax
	callq	_ehca_err
	jmp	LBB0_7
LBB0_3:
	movq	%r12, %rdi
	callq	_atomic_dec
	xorl	%r14d, %r14d
LBB0_7:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bad call, shca=%p"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"dereg internal max-MR failed, ret=%i e_maxmr=%p shca=%p lkey=%x"

L_.str.2:                               ## @.str.2
	.asciz	"ret=%i shca=%p shca->maxmr=%p"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ehca_dereg_internal_maxmr      ; -- Begin function ehca_dereg_internal_maxmr
	.p2align	2
_ehca_dereg_internal_maxmr:             ; @ehca_dereg_internal_maxmr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	ldr	x20, [x0]
	cbz	x20, LBB0_3
; %bb.1:
	ldr	x22, [x20, #8]
	str	xzr, [x19]
	mov	x0, x20
	bl	_ehca_dereg_mr
	mov	x21, x0
	cbz	w0, LBB0_6
; %bb.2:
	add	x0, x19, #8
	ldr	w8, [x20]
	stp	x19, x8, [sp, #16]
	stp	x21, x20, [sp]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_ehca_err
	str	x20, [x19]
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	b	LBB0_5
LBB0_3:
	add	x0, x19, #8
	str	x19, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_ehca_err
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	cbz	w8, LBB0_7
; %bb.4:
	neg	w21, w8
	ldr	x20, [x19]
LBB0_5:
	add	x0, x19, #8
	stp	x19, x20, [sp, #8]
	str	x21, [sp]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_ehca_err
	b	LBB0_8
LBB0_6:
	mov	x0, x22
	bl	_atomic_dec
	b	LBB0_8
LBB0_7:
	mov	w21, #0
LBB0_8:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bad call, shca=%p"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"dereg internal max-MR failed, ret=%i e_maxmr=%p shca=%p lkey=%x"

l_.str.2:                               ; @.str.2
	.asciz	"ret=%i shca=%p shca->maxmr=%p"

.subsections_via_symbols
