	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function udt_close_if_finished
_udt_close_if_finished:                 ## @udt_close_if_finished
	.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
	movl	16(%rdi), %edi
	callq	_STATE_NEEDS_CLOSING
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	cmpl	$0, 20(%rbx)
	je	LBB0_2
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_2:
	movq	_SSTATE_FINISHED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	cmpq	$0, 8(%rbx)
	movl	4(%rbx), %edi
	je	LBB0_4
## %bb.3:
	movq	_SHUT_WR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_shutdown
	jmp	LBB0_5
LBB0_4:
	callq	_close
LBB0_5:
	movl	(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_transfer_debug                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SSTATE_FINISHED,4,2            ## @SSTATE_FINISHED
	.comm	_SHUT_WR,4,2                    ## @SHUT_WR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Closed %s."

	.no_dead_strip	_udt_close_if_finished
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function udt_close_if_finished
_udt_close_if_finished:                 ; @udt_close_if_finished
	.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
	ldr	w0, [x0, #16]
	bl	_STATE_NEEDS_CLOSING
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w8, [x19, #20]
	cbz	w8, LBB0_3
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_3:
Lloh0:
	adrp	x8, _SSTATE_FINISHED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SSTATE_FINISHED@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	ldr	x8, [x19, #8]
	ldr	w0, [x19, #4]
	cbz	x8, LBB0_5
; %bb.4:
Lloh3:
	adrp	x8, _SHUT_WR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SHUT_WR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_shutdown
	b	LBB0_6
LBB0_5:
	bl	_close
LBB0_6:
	ldr	w1, [x19]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_transfer_debug
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SSTATE_FINISHED,4,2            ; @SSTATE_FINISHED
	.comm	_SHUT_WR,4,2                    ; @SHUT_WR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Closed %s."

	.no_dead_strip	_udt_close_if_finished
.subsections_via_symbols
