	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rmi_spi_manage_pools
_rmi_spi_manage_pools:                  ## @rmi_spi_manage_pools
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	(%rdi), %eax
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_RMI_SPI_DEFAULT_XFER_BUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_2:
	movq	64(%r15), %r14
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%eax, %ecx
	leal	(%rcx,%rcx), %eax
	cmpl	%esi, %ecx
	jl	LBB0_3
## %bb.4:
	movq	_RMI_SPI_XFER_SIZE_LIMIT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	cmpl	%ebx, %ecx
	cmovll	%ecx, %ebx
	movq	48(%r15), %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	movq	_GFP_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	orl	(%r13), %ecx
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	$2, %edx
	callq	_devm_kcalloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, 48(%r15)
	movslq	%ebx, %rcx
	leaq	(%rax,%rcx,4), %rax
	movq	%rax, 56(%r15)
	movl	%ebx, (%r15)
	testq	%r12, %r12
	je	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_devm_kfree
LBB0_8:
	cmpq	$0, 40(%r15)
	movl	$1, %eax
	movl	%ebx, %ecx
	cmovel	%eax, %ecx
	movl	%ecx, 4(%r15)
	cmpq	$0, 32(%r15)
	cmovel	%eax, %ebx
	movl	%ebx, 8(%r15)
	movq	24(%r15), %r12
	addl	%ecx, %ebx
	movl	(%r13), %ecx
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	$4, %edx
	callq	_devm_kcalloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.9:
	movq	%rax, 24(%r15)
	movslq	4(%r15), %rcx
	leaq	(%rax,%rcx,4), %rax
	movq	%rax, 16(%r15)
	xorl	%ebx, %ebx
	testq	%r12, %r12
	je	LBB0_11
## %bb.10:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_devm_kfree
	jmp	LBB0_11
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RMI_SPI_DEFAULT_XFER_BUF_SIZE,4,2 ## @RMI_SPI_DEFAULT_XFER_BUF_SIZE
	.comm	_RMI_SPI_XFER_SIZE_LIMIT,4,2    ## @RMI_SPI_XFER_SIZE_LIMIT
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_GFP_DMA,4,2                    ## @GFP_DMA
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_rmi_spi_manage_pools
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rmi_spi_manage_pools
_rmi_spi_manage_pools:                  ; @rmi_spi_manage_pools
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
	ldr	x19, [x0, #64]
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _RMI_SPI_DEFAULT_XFER_BUF_SIZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RMI_SPI_DEFAULT_XFER_BUF_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, #0
	csel	w9, w9, w8, eq
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x8, x9
	lsl	w9, w9, #1
	cmp	w8, w1
	b.lt	LBB0_1
; %bb.2:
Lloh3:
	adrp	x9, _RMI_SPI_XFER_SIZE_LIMIT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _RMI_SPI_XFER_SIZE_LIMIT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	csel	w21, w8, w9, lt
Lloh6:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	x22, [x20, #48]
	ldr	w8, [x23]
Lloh8:
	adrp	x9, _GFP_DMA@GOTPAGE
Lloh9:
	ldr	x9, [x9, _GFP_DMA@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w3, w9, w8
	mov	x0, x19
	mov	x1, x21
	mov	w2, #2
	bl	_devm_kcalloc
	cbz	x0, LBB0_9
; %bb.3:
	add	x8, x0, w21, sxtw #2
	stp	x0, x8, [x20, #48]
	str	w21, [x20]
	cbz	x22, LBB0_5
; %bb.4:
	mov	x0, x19
	mov	x1, x22
	bl	_devm_kfree
LBB0_5:
	ldp	x9, x8, [x20, #32]
	cmp	x8, #0
	csinc	w8, w21, wzr, ne
	ldr	x22, [x20, #24]
	cmp	x9, #0
	csinc	w9, w21, wzr, ne
	stp	w8, w9, [x20, #4]
	add	w1, w9, w8
	ldr	w3, [x23]
	mov	x0, x19
	mov	w2, #4
	bl	_devm_kcalloc
	cbz	x0, LBB0_9
; %bb.6:
	ldrsw	x8, [x20, #4]
	add	x8, x0, x8, lsl #2
	stp	x8, x0, [x20, #16]
	cbz	x22, LBB0_8
; %bb.7:
	mov	x0, x19
	mov	x1, x22
	bl	_devm_kfree
LBB0_8:
	mov	w0, #0
	b	LBB0_10
LBB0_9:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_RMI_SPI_DEFAULT_XFER_BUF_SIZE,4,2 ; @RMI_SPI_DEFAULT_XFER_BUF_SIZE
	.comm	_RMI_SPI_XFER_SIZE_LIMIT,4,2    ; @RMI_SPI_XFER_SIZE_LIMIT
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_GFP_DMA,4,2                    ; @GFP_DMA
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_rmi_spi_manage_pools
.subsections_via_symbols
