	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mthca_array_set                ## -- Begin function mthca_array_set
	.p2align	4, 0x90
_mthca_array_set:                       ## @mthca_array_set
	.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	%rdx, %r14
	movl	%esi, %r12d
	movq	%rdi, %r15
	movslq	%esi, %rax
	shlq	$3, %rax
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shrq	%cl, %rax
	movq	(%rdi), %rcx
	movslq	%eax, %rbx
	shlq	$4, %rbx
	movq	(%rcx,%rbx), %rax
	testq	%rax, %rax
	jne	LBB0_3
## %bb.1:
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_get_zeroed_page
	movq	(%r15), %rcx
	movq	%rax, (%rcx,%rbx)
	testq	%rax, %rax
	je	LBB0_2
LBB0_3:
	movq	_MTHCA_ARRAY_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %r12d
	movslq	%r12d, %rcx
	movq	%r14, (%rax,%rcx,8)
	movq	(%r15), %rax
	incl	8(%rax,%rbx)
	xorl	%eax, %eax
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MTHCA_ARRAY_MASK,4,2           ## @MTHCA_ARRAY_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mthca_array_set                ; -- Begin function mthca_array_set
	.p2align	2
_mthca_array_set:                       ; @mthca_array_set
	.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, x2
	mov	x21, x1
	mov	x20, x0
	sbfiz	x8, x21, #3, #32
Lloh0:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	lsr	x8, x8, x9
	ldr	x9, [x0]
	sxtw	x22, w8
	sbfiz	x8, x8, #4, #32
	ldr	x8, [x9, x8]
	cbnz	x8, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_get_zeroed_page
	mov	x8, x0
	ldr	x9, [x20]
	lsl	x10, x22, #4
	str	x0, [x9, x10]
	cbz	x0, LBB0_4
LBB0_2:
	mov	w0, #0
Lloh6:
	adrp	x9, _MTHCA_ARRAY_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MTHCA_ARRAY_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w9, w9, w21
	str	x19, [x8, w9, sxtw #3]
	ldr	x8, [x20]
	add	x8, x8, x22, lsl #4
	ldr	w9, [x8, #8]
	add	w9, w9, #1
	str	w9, [x8, #8]
LBB0_3:
	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_4:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MTHCA_ARRAY_MASK,4,2           ; @MTHCA_ARRAY_MASK
.subsections_via_symbols
