	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function timeout_connect
_timeout_connect:                       ## @timeout_connect
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movl	%edi, %r15d
	movl	$0, -36(%rbp)
	movl	$4, -40(%rbp)
	cmpl	$0, (%rcx)
	jle	LBB0_1
## %bb.2:
	movq	%rcx, %r12
	movl	%r15d, %edi
	callq	_set_nonblock
	movl	%r15d, %edi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	callq	_connect
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:
	movq	_errno@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	movq	_EINPROGRESS@GOTPCREL(%rip), %rcx
	movl	$-1, %r14d
	cmpl	(%rcx), %eax
	jne	LBB0_10
## %bb.4:
	movl	%r15d, %edi
	movq	%r12, %rsi
	callq	_waitrfd
	cmpl	$-1, %eax
	je	LBB0_10
## %bb.5:
	movq	_SOL_SOCKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SO_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-36(%rbp), %rcx
	leaq	-40(%rbp), %r8
	movl	%r15d, %edi
	callq	_getsockopt
	cmpl	$-1, %eax
	je	LBB0_6
## %bb.7:
	movl	-36(%rbp), %eax
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, (%rbx)
	jmp	LBB0_10
LBB0_1:
	movl	%r15d, %edi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	callq	_connect
	movq	%rax, %r14
	jmp	LBB0_10
LBB0_9:
	movl	%r15d, %edi
	callq	_unset_nonblock
	xorl	%r14d, %r14d
LBB0_10:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	(%rbx), %edi
	callq	_strerror
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_debug
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,4,2                      ## @errno
	.comm	_EINPROGRESS,4,2                ## @EINPROGRESS
	.comm	_SOL_SOCKET,4,2                 ## @SOL_SOCKET
	.comm	_SO_ERROR,4,2                   ## @SO_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"getsockopt: %s"

	.no_dead_strip	_timeout_connect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function timeout_connect
_timeout_connect:                       ; @timeout_connect
	.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	x21, x2
	mov	x22, x1
	mov	x19, x0
	mov	w8, #4
	stp	w8, wzr, [sp, #8]
	ldr	w8, [x3]
	cmp	w8, #0
	b.le	LBB0_7
; %bb.1:
	mov	x20, x3
	mov	x0, x19
	bl	_set_nonblock
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_connect
	cbz	x0, LBB0_8
; %bb.2:
Lloh0:
	adrp	x21, _errno@GOTPAGE
Lloh1:
	ldr	x21, [x21, _errno@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh2:
	adrp	x9, _EINPROGRESS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _EINPROGRESS@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_10
; %bb.3:
	mov	x0, x19
	mov	x1, x20
	bl	_waitrfd
	cmn	w0, #1
	b.eq	LBB0_10
; %bb.4:
Lloh5:
	adrp	x8, _SOL_SOCKET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SOL_SOCKET@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _SO_ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SO_ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	add	x3, sp, #12
	add	x4, sp, #8
	mov	x0, x19
	bl	_getsockopt
	cmn	w0, #1
	b.eq	LBB0_9
; %bb.5:
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_8
; %bb.6:
	str	w8, [x21]
	b	LBB0_10
LBB0_7:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_connect
	b	LBB0_11
LBB0_8:
	mov	x0, x19
	bl	_unset_nonblock
	mov	w0, #0
	b	LBB0_11
LBB0_9:
	ldr	w0, [x21]
	bl	_strerror
	mov	x1, x0
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_debug
LBB0_10:
	mov	w0, #-1
LBB0_11:
                                        ; kill: def $w0 killed $w0 killed $x0
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,4,2                      ; @errno
	.comm	_EINPROGRESS,4,2                ; @EINPROGRESS
	.comm	_SOL_SOCKET,4,2                 ; @SOL_SOCKET
	.comm	_SO_ERROR,4,2                   ; @SO_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"getsockopt: %s"

	.no_dead_strip	_timeout_connect
.subsections_via_symbols
