	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function close_con_rpl
_close_con_rpl:                         ## @close_con_rpl
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_cplhdr
	movq	%rax, %rdi
	callq	_GET_TID
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_get_ep_from_tid
	testq	%rax, %rax
	je	LBB0_11
## %bb.1:
	movq	%rax, %rbx
	movl	24(%rax), %edx
	leaq	L_.str(%rip), %rdi
	movq	%rax, %rsi
	callq	_pr_debug
	leaq	4(%rbx), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_CLOSE_CON_RPL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	addq	$20, %rsi
	callq	_set_bit
	movl	(%rbx), %edx
	leal	-128(%rdx), %eax
	cmpl	$3, %eax
	ja	LBB0_8
## %bb.2:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_4:
	movq	%rbx, %rdi
	callq	_stop_ep_timer
	cmpl	$0, 16(%rbx)
	je	LBB0_7
## %bb.5:
	movq	8(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.6:
	movq	_C4IW_QP_STATE_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -24(%rbp)
	movl	(%rsi), %edi
	movq	_C4IW_QP_ATTR_NEXT_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-24(%rbp), %rcx
	movl	$1, %r8d
	callq	_c4iw_modify_qp
LBB0_7:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_close_complete_upcall
	movq	%rbx, %rdi
	movl	$129, %esi
	callq	___state_set
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	%rbx, %rdi
	callq	_release_ep_resources
	jmp	LBB0_10
LBB0_8:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_WARN_ONCE
	jmp	LBB0_9
LBB0_3:
	movq	%rbx, %rdi
	movl	$128, %esi
	callq	___state_set
LBB0_9:
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_10:
	movq	%rbx, %rdi
	callq	_c4iw_put_ep
LBB0_11:
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
LJTI0_0:
	.long	L0_0_set_4
	.long	L0_0_set_9
	.long	L0_0_set_3
	.long	L0_0_set_9
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ep %p tid %u\n"

	.comm	_CLOSE_CON_RPL,4,2              ## @CLOSE_CON_RPL
	.comm	_C4IW_QP_STATE_IDLE,4,2         ## @C4IW_QP_STATE_IDLE
	.comm	_C4IW_QP_ATTR_NEXT_STATE,4,2    ## @C4IW_QP_ATTR_NEXT_STATE
L_.str.1:                               ## @.str.1
	.asciz	"Bad endpoint state %u\n"

	.no_dead_strip	_close_con_rpl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function close_con_rpl
_close_con_rpl:                         ; @close_con_rpl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	mov	x0, x1
	bl	_cplhdr
	bl	_GET_TID
	mov	x1, x0
	mov	x0, x19
	bl	_get_ep_from_tid
	cbz	x0, LBB0_11
; %bb.1:
	mov	x19, x0
	ldr	w2, [x0, #24]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_pr_debug
	add	x20, x19, #4
	mov	x0, x20
	bl	_mutex_lock
Lloh2:
	adrp	x8, _CLOSE_CON_RPL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CLOSE_CON_RPL@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	add	x1, x19, #20
	bl	_set_bit
	ldr	w2, [x19]
	sub	w8, w2, #128
	cmp	w8, #3
	b.hi	LBB0_7
; %bb.2:
Lloh5:
	adrp	x9, lJTI0_0@PAGE
Lloh6:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_3:
	mov	x0, x19
	bl	_stop_ep_timer
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_6
; %bb.4:
	ldr	x1, [x19, #8]
	cbz	x1, LBB0_6
; %bb.5:
Lloh7:
	adrp	x8, _C4IW_QP_STATE_IDLE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _C4IW_QP_STATE_IDLE@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	ldr	w0, [x1]
Lloh10:
	adrp	x8, _C4IW_QP_ATTR_NEXT_STATE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _C4IW_QP_ATTR_NEXT_STATE@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	add	x3, sp, #8
	mov	w4, #1
	bl	_c4iw_modify_qp
LBB0_6:
	mov	x0, x19
	mov	w1, #0
	bl	_close_complete_upcall
	mov	x0, x19
	mov	w1, #129
	bl	___state_set
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x19
	bl	_release_ep_resources
	b	LBB0_10
LBB0_7:
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_WARN_ONCE
	b	LBB0_9
LBB0_8:
	mov	x0, x19
	mov	w1, #128
	bl	___state_set
LBB0_9:
	mov	x0, x20
	bl	_mutex_unlock
LBB0_10:
	mov	x0, x19
	bl	_c4iw_put_ep
LBB0_11:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_9-LBB0_3)>>2
	.byte	(LBB0_8-LBB0_3)>>2
	.byte	(LBB0_9-LBB0_3)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ep %p tid %u\n"

	.comm	_CLOSE_CON_RPL,4,2              ; @CLOSE_CON_RPL
	.comm	_C4IW_QP_STATE_IDLE,4,2         ; @C4IW_QP_STATE_IDLE
	.comm	_C4IW_QP_ATTR_NEXT_STATE,4,2    ; @C4IW_QP_ATTR_NEXT_STATE
l_.str.1:                               ; @.str.1
	.asciz	"Bad endpoint state %u\n"

	.no_dead_strip	_close_con_rpl
.subsections_via_symbols
