	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mthca_array_clear              ## -- Begin function mthca_array_clear
	.p2align	4, 0x90
_mthca_array_clear:                     ## @mthca_array_clear
	.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
	movl	%esi, %r14d
	movslq	%esi, %r12
	shlq	$3, %r12
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shrq	%cl, %r12
	movq	%rdi, %r15
	movq	(%rdi), %rax
	movslq	%r12d, %rbx
	shlq	$4, %rbx
	decq	(%rax,%rbx)
	movq	8(%rax,%rbx), %rdi
	je	LBB0_1
## %bb.2:
	movq	_MTHCA_ARRAY_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r14d, %eax
	cltq
	movq	$0, (%rdi,%rax,8)
	movq	(%r15), %rax
	jmp	LBB0_3
LBB0_1:
	callq	_free_page
	movq	(%r15), %rax
	movq	$0, 8(%rax,%rbx)
LBB0_3:
	movq	(%rax,%rbx), %r8
	testq	%r8, %r8
	js	LBB0_5
## %bb.4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	movl	%r12d, %ecx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pr_debug                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_MTHCA_ARRAY_MASK,4,2           ## @MTHCA_ARRAY_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Array %p index %d page %d with ref count %d < 0\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mthca_array_clear              ; -- Begin function mthca_array_clear
	.p2align	2
_mthca_array_clear:                     ; @mthca_array_clear
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x1
	mov	x20, x0
	sbfiz	x8, x19, #3, #32
Lloh0:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	lsr	x21, x8, x9
	ldr	x8, [x0]
	lsl	x9, x21, #32
	sxtw	x22, w21
	add	x8, x8, x9, asr #28
	ldp	x9, x0, [x8]
	subs	x9, x9, #1
	str	x9, [x8]
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _MTHCA_ARRAY_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MTHCA_ARRAY_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w8, w8, w19
	str	xzr, [x0, w8, sxtw #3]
	ldr	x8, [x20]
	b	LBB0_3
LBB0_2:
	bl	_free_page
	ldr	x8, [x20]
	add	x9, x8, x22, lsl #4
	str	xzr, [x9, #8]
LBB0_3:
	lsl	x9, x22, #4
	ldr	x4, [x8, x9]
	tbnz	x4, #63, LBB0_5
; %bb.4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x2, x19
	mov	x3, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_pr_debug
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_MTHCA_ARRAY_MASK,4,2           ; @MTHCA_ARRAY_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Array %p index %d page %d with ref count %d < 0\n"

.subsections_via_symbols
