	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function srpt_close_ch
_srpt_close_ch:                         ## @srpt_close_ch
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_CH_DRAINING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_srpt_set_ch_state
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	callq	_kref_get
	movq	%rbx, %rdi
	callq	_srpt_ch_qp_err
	testl	%eax, %eax
	jns	LBB0_4
## %bb.3:
	movl	16(%rbx), %esi
	movq	8(%rbx), %rcx
	movl	(%rcx), %edx
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %ecx
	callq	_pr_err
LBB0_4:
	movq	%rbx, %rdi
	callq	_srpt_zerolength_write
	testl	%eax, %eax
	jns	LBB0_8
## %bb.5:
	movl	16(%rbx), %esi
	movq	8(%rbx), %rcx
	movl	(%rcx), %edx
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %ecx
	callq	_pr_err
	movq	_CH_DISCONNECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_srpt_set_ch_state
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	leaq	4(%rbx), %rdi
	callq	_schedule_work
	jmp	LBB0_8
LBB0_1:
	movl	16(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_pr_debug
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_7:
	movl	$1, %edi
	callq	_WARN_ON_ONCE
LBB0_8:
	movq	_srpt_free_ch@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_kref_put
	movl	$1, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CH_DRAINING,4,2                ## @CH_DRAINING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: already closed\n"

L_.str.1:                               ## @.str.1
	.asciz	"%s-%d: changing queue pair into error state failed: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"%s-%d: queuing zero-length write failed: %d\n"

	.comm	_CH_DISCONNECTED,4,2            ## @CH_DISCONNECTED
	.comm	_srpt_free_ch,4,2               ## @srpt_free_ch
	.no_dead_strip	_srpt_close_ch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function srpt_close_ch
_srpt_close_ch:                         ; @srpt_close_ch
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _CH_DRAINING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CH_DRAINING@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_srpt_set_ch_state
	cbz	x0, LBB0_6
; %bb.1:
	mov	x0, x19
	bl	_kref_get
	mov	x0, x19
	bl	_srpt_ch_qp_err
	tbz	w0, #31, LBB0_3
; %bb.2:
	mov	x3, x0
	ldr	w1, [x19, #16]
	ldr	x8, [x19, #8]
	ldr	w2, [x8]
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
LBB0_3:
	mov	x0, x19
	bl	_srpt_zerolength_write
	tbz	w0, #31, LBB0_8
; %bb.4:
	mov	x3, x0
	ldr	w1, [x19, #16]
	ldr	x8, [x19, #8]
	ldr	w2, [x8]
Lloh5:
	adrp	x0, l_.str.2@PAGE
Lloh6:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_err
Lloh7:
	adrp	x8, _CH_DISCONNECTED@GOTPAGE
Lloh8:
	ldr	x8, [x8, _CH_DISCONNECTED@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_srpt_set_ch_state
	cbz	x0, LBB0_7
; %bb.5:
	add	x0, x19, #4
	bl	_schedule_work
	b	LBB0_8
LBB0_6:
	ldr	w1, [x19, #16]
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	mov	w0, #0
	b	LBB0_9
LBB0_7:
	mov	w0, #1
	bl	_WARN_ON_ONCE
LBB0_8:
Lloh12:
	adrp	x8, _srpt_free_ch@GOTPAGE
Lloh13:
	ldr	x8, [x8, _srpt_free_ch@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_kref_put
	mov	w0, #1
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_CH_DRAINING,4,2                ; @CH_DRAINING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: already closed\n"

l_.str.1:                               ; @.str.1
	.asciz	"%s-%d: changing queue pair into error state failed: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"%s-%d: queuing zero-length write failed: %d\n"

	.comm	_CH_DISCONNECTED,4,2            ; @CH_DISCONNECTED
	.comm	_srpt_free_ch,4,2               ; @srpt_free_ch
	.no_dead_strip	_srpt_close_ch
.subsections_via_symbols
