	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i40iw_get_vmalloc_mem
_i40iw_get_vmalloc_mem:                 ## @i40iw_get_vmalloc_mem
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	(%rdi), %r13
	leal	(,%r14,8), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	movq	%rax, 16(%r12)
	testq	%rax, %rax
	je	LBB0_12
## %bb.1:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	imull	%r14d, %ebx
	movl	%ebx, %edi
	callq	_vmalloc
	movq	%rax, 24(%r12)
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%r14, %rcx
	movq	%rax, %r14
	movl	%ebx, (%r12)
	xorl	%eax, %eax
	movl	$0, %ebx
	testl	%ecx, %ecx
	jle	LBB0_10
## %bb.4:
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	%ecx, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_vmalloc_to_page
	testq	%rax, %rax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r15
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r15), %ecx
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	movq	%r13, %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_dma_map_page
	movq	16(%r12), %rcx
	movl	%eax, (%rcx,%rbx,4)
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_dma_mapping_error
	testq	%rax, %rax
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movslq	(%r15), %rax
	leaq	(%r14,%rax,4), %r14
	incq	%rbx
	cmpq	%rbx, -48(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_5
## %bb.8:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, 4(%r12)
	movq	_I40IW_VMALLOC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r12)
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_2:
	movq	16(%r12), %rdi
	callq	_kfree
	movq	$0, 16(%r12)
	jmp	LBB0_12
LBB0_9:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	xorl	%eax, %eax
LBB0_10:
	movl	%ebx, 4(%r12)
	movq	_I40IW_VMALLOC@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 8(%r12)
	cmpl	%ecx, %ebx
	je	LBB0_13
## %bb.11:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_i40iw_free_vmalloc_mem
LBB0_12:
	movq	_I40IW_ERR_NO_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_I40IW_ERR_NO_MEMORY,4,2        ## @I40IW_ERR_NO_MEMORY
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.comm	_I40IW_VMALLOC,4,2              ## @I40IW_VMALLOC
	.no_dead_strip	_i40iw_get_vmalloc_mem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i40iw_get_vmalloc_mem
_i40iw_get_vmalloc_mem:                 ; @i40iw_get_vmalloc_mem
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x22, [x0]
	lsl	w0, w2, #3
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_kzalloc
	str	x0, [x19, #16]
	cbz	x0, LBB0_13
; %bb.1:
Lloh3:
	adrp	x25, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x25, [x25, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w8, [x25]
	mul	w24, w8, w21
	mov	x0, x24
	bl	_vmalloc
	str	x0, [x19, #24]
	cbz	x0, LBB0_8
; %bb.2:
	str	w24, [x19]
	cmp	w21, #1
	b.lt	LBB0_9
; %bb.3:
	mov	x23, x0
	mov	x24, #0
	mov	w26, w21
Lloh5:
	adrp	x27, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh6:
	ldr	x27, [x27, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	bl	_vmalloc_to_page
	cbz	x0, LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x1, x0
	ldr	w3, [x25]
	ldr	w4, [x27]
	mov	x0, x22
	mov	w2, #0
	bl	_dma_map_page
	mov	x1, x0
	ldr	x8, [x19, #16]
	str	w0, [x8, x24, lsl #2]
	mov	x0, x22
	bl	_dma_mapping_error
	cbnz	x0, LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldrsw	x8, [x25]
	add	x23, x23, x8, lsl #2
	add	x24, x24, #1
	cmp	x26, x24
	b.ne	LBB0_4
; %bb.7:
	mov	w0, #0
Lloh7:
	adrp	x8, _I40IW_VMALLOC@GOTPAGE
Lloh8:
	ldr	x8, [x8, _I40IW_VMALLOC@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	stp	w26, w8, [x19, #4]
	b	LBB0_14
LBB0_8:
	ldr	x0, [x19, #16]
	bl	_kfree
	str	xzr, [x19, #16]
	b	LBB0_13
LBB0_9:
	mov	w24, #0
LBB0_10:
Lloh10:
	adrp	x8, _I40IW_VMALLOC@GOTPAGE
Lloh11:
	ldr	x8, [x8, _I40IW_VMALLOC@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	stp	w24, w8, [x19, #4]
	cmp	w24, w21
	b.ne	LBB0_12
; %bb.11:
	mov	w0, #0
	b	LBB0_14
LBB0_12:
	mov	x0, x20
	mov	x1, x19
	bl	_i40iw_free_vmalloc_mem
LBB0_13:
Lloh13:
	adrp	x8, _I40IW_ERR_NO_MEMORY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _I40IW_ERR_NO_MEMORY@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
LBB0_14:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_I40IW_ERR_NO_MEMORY,4,2        ; @I40IW_ERR_NO_MEMORY
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.comm	_I40IW_VMALLOC,4,2              ; @I40IW_VMALLOC
	.no_dead_strip	_i40iw_get_vmalloc_mem
.subsections_via_symbols
