	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath6kl_sdio_alloc_prep_scat_req
_ath6kl_sdio_alloc_prep_scat_req:       ## @ath6kl_sdio_alloc_prep_scat_req
	.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, %ebx
                                        ## kill: def $esi killed $esi def $rsi
	leal	(,%rsi,4), %r8d
	movq	_L1_CACHE_BYTES@GOTPCREL(%rip), %rdx
	movl	(%rdx), %eax
	addl	%eax, %eax
	movq	_ATH6KL_MAX_TRANSFER_SIZE_PER_SCATTER@GOTPCREL(%rip), %rdx
	addl	(%rdx), %eax
	testl	%ecx, %ecx
	cmovel	%r8d, %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	testl	%ebx, %ebx
	jle	LBB0_13
## %bb.1:
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	leal	32(,%rsi,4), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r14
	movq	%r12, %r15
	movl	(%r12), %esi
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	callq	_kzalloc
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	testl	%r12d, %r12d
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	testq	%rax, %rax
	je	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rdi
	callq	_L1_CACHE_ALIGN
	movq	%rax, 16(%r14)
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, 24(%r14)
	testq	%rax, %rax
	je	LBB0_6
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	callq	_ath6kl_sdio_alloc_busreq
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, (%rax)
	movq	%rax, 8(%r14)
	movl	%r12d, (%r14)
	movl	(%r13), %edi
	movq	%r14, %rsi
	callq	_hif_scatter_req_add
	decl	%ebx
	movq	%r15, %r12
	jne	LBB0_2
## %bb.12:
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_10:
	movq	24(%r14), %rdi
	callq	_kfree
	movq	16(%r14), %rdi
	callq	_kfree
LBB0_6:
	movq	%r14, %rdi
	callq	_kfree
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_L1_CACHE_BYTES,4,2             ## @L1_CACHE_BYTES
	.comm	_ATH6KL_MAX_TRANSFER_SIZE_PER_SCATTER,4,2 ## @ATH6KL_MAX_TRANSFER_SIZE_PER_SCATTER
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_ath6kl_sdio_alloc_prep_scat_req
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath6kl_sdio_alloc_prep_scat_req
_ath6kl_sdio_alloc_prep_scat_req:       ; @ath6kl_sdio_alloc_prep_scat_req
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	lsl	w8, w1, #2
Lloh0:
	adrp	x9, _L1_CACHE_BYTES@GOTPAGE
Lloh1:
	ldr	x9, [x9, _L1_CACHE_BYTES@GOTPAGEOFF]
Lloh2:
	adrp	x10, _ATH6KL_MAX_TRANSFER_SIZE_PER_SCATTER@GOTPAGE
Lloh3:
	ldr	x10, [x10, _ATH6KL_MAX_TRANSFER_SIZE_PER_SCATTER@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	ldr	w10, [x10]
	add	w9, w10, w9, lsl #1
	cmp	w3, #0
	csel	w22, w8, w9, eq
	cmp	w2, #1
	b.lt	LBB0_9
; %bb.1:
	mov	x19, x3
	mov	x20, x2
	mov	x21, x0
	add	w23, w8, #32
Lloh6:
	adrp	x25, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x25, [x25, _GFP_KERNEL@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x25]
	mov	x0, x23
	bl	_kzalloc
	cbz	x0, LBB0_12
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x24, x0
	ldr	w1, [x25]
	mov	x0, x22
	bl	_kzalloc
	cbz	w19, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	cbz	x0, LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_L1_CACHE_ALIGN
	str	x0, [x24, #16]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	str	x0, [x24, #24]
	cbz	x0, LBB0_11
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	bl	_ath6kl_sdio_alloc_busreq
	cbz	x0, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	str	x24, [x0]
	str	x0, [x24, #8]
	str	w19, [x24]
	ldr	w0, [x21]
	mov	x1, x24
	bl	_hif_scatter_req_add
	subs	w20, w20, #1
	b.ne	LBB0_2
LBB0_9:
	mov	w0, #0
	b	LBB0_13
LBB0_10:
	ldr	x0, [x24, #24]
	bl	_kfree
	ldr	x0, [x24, #16]
	bl	_kfree
LBB0_11:
	mov	x0, x24
	bl	_kfree
LBB0_12:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_L1_CACHE_BYTES,4,2             ; @L1_CACHE_BYTES
	.comm	_ATH6KL_MAX_TRANSFER_SIZE_PER_SCATTER,4,2 ; @ATH6KL_MAX_TRANSFER_SIZE_PER_SCATTER
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_ath6kl_sdio_alloc_prep_scat_req
.subsections_via_symbols
