	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath6kl_htc_reset
_ath6kl_htc_reset:                      ## @ath6kl_htc_reset
	.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, %r14
	callq	_reset_ep_state
	movq	8(%r14), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	_HTC_MAX_CTRL_MSG_LEN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r12
	cmpq	%r12, %rax
	cmovgq	%rax, %r12
	movq	_NUM_CONTROL_BUFFERS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_10
## %bb.1:
	movq	_HTC_HDR_LENGTH@GOTPCREL(%rip), %rax
	addq	(%rax), %r12
	leaq	4(%r14), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	movq	%r14, %rsi
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	callq	_list_add_tail
	incl	%r15d
	movq	_NUM_CONTROL_BUFFERS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jge	LBB0_10
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	movl	$40, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rbx
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_kzalloc
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, 32(%rbx)
	movq	_NUM_CONTROL_RX_BUFFERS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r15d
	jge	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	$0, 24(%rbx)
	movq	%rax, 16(%rbx)
	movq	_ENDPOINT_0@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movq	%rbx, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	jmp	LBB0_9
LBB0_10:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_5:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HTC_MAX_CTRL_MSG_LEN,8,3       ## @HTC_MAX_CTRL_MSG_LEN
	.comm	_HTC_HDR_LENGTH,8,3             ## @HTC_HDR_LENGTH
	.comm	_NUM_CONTROL_BUFFERS,4,2        ## @NUM_CONTROL_BUFFERS
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_NUM_CONTROL_RX_BUFFERS,4,2     ## @NUM_CONTROL_RX_BUFFERS
	.comm	_ENDPOINT_0,4,2                 ## @ENDPOINT_0
	.no_dead_strip	_ath6kl_htc_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath6kl_htc_reset
_ath6kl_htc_reset:                      ; @ath6kl_htc_reset
	.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	x19, x0
	bl	_reset_ep_state
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _HTC_MAX_CTRL_MSG_LEN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HTC_MAX_CTRL_MSG_LEN@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	csel	x8, x8, x9, gt
Lloh3:
	adrp	x23, _NUM_CONTROL_BUFFERS@GOTPAGE
Lloh4:
	ldr	x23, [x23, _NUM_CONTROL_BUFFERS@GOTPAGEOFF]
	ldr	w9, [x23]
	cmp	w9, #1
	b.lt	LBB0_8
; %bb.1:
	mov	w24, #0
Lloh5:
	adrp	x9, _HTC_HDR_LENGTH@GOTPAGE
Lloh6:
	ldr	x9, [x9, _HTC_HDR_LENGTH@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	add	x20, x8, x9
	add	x21, x19, #4
Lloh8:
	adrp	x25, _GFP_KERNEL@GOTPAGE
Lloh9:
	ldr	x25, [x25, _GFP_KERNEL@GOTPAGEOFF]
Lloh10:
	adrp	x26, _NUM_CONTROL_RX_BUFFERS@GOTPAGE
Lloh11:
	ldr	x26, [x26, _NUM_CONTROL_RX_BUFFERS@GOTPAGEOFF]
Lloh12:
	adrp	x27, _ENDPOINT_0@GOTPAGE
Lloh13:
	ldr	x27, [x27, _ENDPOINT_0@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
	mov	x1, x19
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	bl	_list_add_tail
	add	w24, w24, #1
	ldr	w8, [x23]
	cmp	w24, w8
	b.ge	LBB0_8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x25]
	mov	w0, #40
	bl	_kzalloc
	cbz	x0, LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x22, x0
	ldr	w1, [x25]
	mov	x0, x20
	bl	_kzalloc
	str	x0, [x22, #8]
	cbz	x0, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	str	x20, [x22, #32]
	ldr	w8, [x26]
	cmp	w24, w8
	b.ge	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	stp	x0, xzr, [x22, #16]
	ldr	w8, [x27]
	str	w8, [x22, #4]
	mov	x0, x22
	mov	x1, x21
	b	LBB0_3
LBB0_8:
	mov	w0, #0
	b	LBB0_11
LBB0_9:
	mov	x0, x22
	bl	_kfree
LBB0_10:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_HTC_MAX_CTRL_MSG_LEN,8,3       ; @HTC_MAX_CTRL_MSG_LEN
	.comm	_HTC_HDR_LENGTH,8,3             ; @HTC_HDR_LENGTH
	.comm	_NUM_CONTROL_BUFFERS,4,2        ; @NUM_CONTROL_BUFFERS
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_NUM_CONTROL_RX_BUFFERS,4,2     ; @NUM_CONTROL_RX_BUFFERS
	.comm	_ENDPOINT_0,4,2                 ; @ENDPOINT_0
	.no_dead_strip	_ath6kl_htc_reset
.subsections_via_symbols
