	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath6kl_usb_alloc_pipe_resources
_ath6kl_usb_alloc_pipe_resources:       ## @ath6kl_usb_alloc_pipe_resources
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	addq	$16, %rdi
	callq	_INIT_LIST_HEAD
	leaq	12(%r14), %rdi
	callq	_init_usb_anchor
	testl	%ebx, %ebx
	jle	LBB0_5
## %bb.1:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movl	$8, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, (%rax)
	incl	(%r14)
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_ath6kl_usb_free_urb_to_pipe
	decl	%ebx
	jne	LBB0_2
LBB0_5:
	movq	_ATH6KL_DBG_USB@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r14), %edx
	movl	(%r14), %r8d
	movl	4(%r14), %ecx
	leaq	L_.str(%rip), %rsi
	callq	_ath6kl_dbg
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ATH6KL_DBG_USB,4,2             ## @ATH6KL_DBG_USB
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ath6kl usb: alloc resources lpipe:%d hpipe:0x%X urbs:%d\n"

	.no_dead_strip	_ath6kl_usb_alloc_pipe_resources
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath6kl_usb_alloc_pipe_resources
_ath6kl_usb_alloc_pipe_resources:       ; @ath6kl_usb_alloc_pipe_resources
	.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	x20, x1
	mov	x19, x0
	add	x0, x0, #16
	bl	_INIT_LIST_HEAD
	add	x0, x19, #12
	bl	_init_usb_anchor
	cmp	w20, #1
	b.lt	LBB0_4
; %bb.1:
Lloh0:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21]
	mov	w0, #8
	bl	_kzalloc
	cbz	x0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x1, x0
	str	x19, [x0]
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	mov	x0, x19
	bl	_ath6kl_usb_free_urb_to_pipe
	subs	w20, w20, #1
	b.ne	LBB0_2
LBB0_4:
Lloh2:
	adrp	x8, _ATH6KL_DBG_USB@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ATH6KL_DBG_USB@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldp	w3, w2, [x19, #4]
	ldr	w4, [x19]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_ath6kl_dbg
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ATH6KL_DBG_USB,4,2             ; @ATH6KL_DBG_USB
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ath6kl usb: alloc resources lpipe:%d hpipe:0x%X urbs:%d\n"

	.no_dead_strip	_ath6kl_usb_alloc_pipe_resources
.subsections_via_symbols
