	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___open_cached_connection       ## -- Begin function __open_cached_connection
	.p2align	4, 0x90
___open_cached_connection:              ## @__open_cached_connection
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	xorl	%edi, %edi
	testq	%rbx, %rbx
	setne	%dil
	callq	_assert
	movq	_PF_LOCAL@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movq	_SOCK_CLOEXEC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	xorl	%edx, %edx
	callq	__socket
	movl	%eax, %r14d
	movl	(%r15), %eax
	movl	%eax, -28(%rbp)
	movl	(%rbx), %esi
	movl	$4, %edx
	callq	_strncpy
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	leal	5(%rax), %edx
	leaq	-32(%rbp), %rsi
	movl	%r14d, %edi
	callq	__connect
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.2:
	movq	_F_SETFL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %edi
	callq	__fcntl
	movl	$12, %edi
	callq	_malloc
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	callq	_assert
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$12, %edx
	callq	_memset
	movl	%r14d, (%rbx)
	xorl	%eax, %eax
	callq	_kqueue
	movl	%eax, 4(%rbx)
	xorl	%edi, %edi
	cmpl	$-1, %eax
	setne	%dil
	callq	_assert
	movl	(%rbx), %esi
	movq	_EVFILT_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_EV_ADD@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	movq	$0, (%rsp)
	leaq	-40(%rbp), %r14
	movq	%r14, %rdi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_EV_SET
	movl	4(%rbx), %edi
	movq	%r14, %rsi
	movl	$1, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__kevent
	xorl	%eax, %eax
	callq	_kqueue
	movl	%eax, 8(%rbx)
	xorl	%edi, %edi
	cmpl	$-1, %eax
	setne	%dil
	callq	_assert
	movl	(%rbx), %esi
	movq	_EVFILT_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r15), %ecx
	movq	$0, (%rsp)
	movq	%r14, %rdi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_EV_SET
	movl	8(%rbx), %edi
	movq	%r14, %rsi
	movl	$1, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__kevent
	jmp	LBB0_3
LBB0_1:
	movl	%r14d, %edi
	callq	__close
	xorl	%ebx, %ebx
LBB0_3:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PF_LOCAL,4,2                   ## @PF_LOCAL
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.comm	_SOCK_CLOEXEC,4,2               ## @SOCK_CLOEXEC
	.comm	_F_SETFL,4,2                    ## @F_SETFL
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
	.comm	_EVFILT_WRITE,4,2               ## @EVFILT_WRITE
	.comm	_EV_ADD,4,2                     ## @EV_ADD
	.comm	_EVFILT_READ,4,2                ## @EVFILT_READ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___open_cached_connection       ; -- Begin function __open_cached_connection
	.p2align	2
___open_cached_connection:              ; @__open_cached_connection
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
Lloh0:
	adrp	x21, _PF_LOCAL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _PF_LOCAL@GOTPAGEOFF]
Lloh2:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _SOCK_CLOEXEC@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SOCK_CLOEXEC@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	w2, #0
	bl	__socket
	mov	x20, x0
	ldr	w8, [x21]
	str	w8, [sp, #4]
	ldr	w1, [x19]
	mov	w2, #4
	bl	_strncpy
	bl	_strlen
	add	w2, w0, #5
	mov	x1, sp
	mov	x0, x20
	bl	__connect
	cmn	w0, #1
	b.eq	LBB0_2
; %bb.1:
Lloh8:
	adrp	x8, _F_SETFL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _F_SETFL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _O_NONBLOCK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _O_NONBLOCK@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x20
	bl	__fcntl
	mov	w0, #12
	bl	_malloc
	mov	x19, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
	mov	x0, x19
	mov	w1, #0
	mov	w2, #12
	bl	_memset
	str	w20, [x19]
	bl	_kqueue
	str	w0, [x19, #4]
	cmn	w0, #1
	cset	w0, ne
	bl	_assert
	ldr	w1, [x19]
Lloh14:
	adrp	x8, _EVFILT_WRITE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EVFILT_WRITE@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
Lloh17:
	adrp	x20, _EV_ADD@GOTPAGE
Lloh18:
	ldr	x20, [x20, _EV_ADD@GOTPAGEOFF]
	ldr	w3, [x20]
	add	x0, sp, #8
	mov	w4, #0
	mov	w5, #0
	mov	x6, #0
	bl	_EV_SET
	ldr	w0, [x19, #4]
	add	x1, sp, #8
	mov	w2, #1
	mov	x3, #0
	mov	w4, #0
	mov	x5, #0
	bl	__kevent
	bl	_kqueue
	str	w0, [x19, #8]
	cmn	w0, #1
	cset	w0, ne
	bl	_assert
	ldr	w1, [x19]
Lloh19:
	adrp	x8, _EVFILT_READ@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EVFILT_READ@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	ldr	w3, [x20]
	add	x0, sp, #8
	mov	w4, #0
	mov	w5, #0
	mov	x6, #0
	bl	_EV_SET
	ldr	w0, [x19, #8]
	add	x1, sp, #8
	mov	w2, #1
	mov	x3, #0
	mov	w4, #0
	mov	x5, #0
	bl	__kevent
	b	LBB0_3
LBB0_2:
	mov	x0, x20
	bl	__close
	mov	x19, #0
LBB0_3:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_PF_LOCAL,4,2                   ; @PF_LOCAL
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.comm	_SOCK_CLOEXEC,4,2               ; @SOCK_CLOEXEC
	.comm	_F_SETFL,4,2                    ; @F_SETFL
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
	.comm	_EVFILT_WRITE,4,2               ; @EVFILT_WRITE
	.comm	_EV_ADD,4,2                     ; @EV_ADD
	.comm	_EVFILT_READ,4,2                ; @EVFILT_READ
.subsections_via_symbols
