	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function establish_connection
_establish_connection:                  ## @establish_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_AF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	movq	_fd_serv@GOTPCREL(%rip), %r12
	movl	%eax, (%r12)
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, %ebx
	movq	_F_SETFL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_F_GETFL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	xorl	%edx, %edx
	callq	_fcntl
	orl	%eax, %r15d
	movl	%ebx, %edi
	movl	%r14d, %esi
	movl	%r15d, %edx
	callq	_fcntl
	xorl	%eax, %eax
	callq	_resolve_func
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_pending_connection@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	(%r12), %edi
	movq	_srv_addr@GOTPCREL(%rip), %rsi
	movl	$4, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_connect                        ## TAILCALL
LBB0_1:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AF_INET,4,2                    ## @AF_INET
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.comm	_fd_serv,4,2                    ## @fd_serv
	.comm	_F_SETFL,4,2                    ## @F_SETFL
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
	.comm	_F_GETFL,4,2                    ## @F_GETFL
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_pending_connection,4,2         ## @pending_connection
	.comm	_srv_addr,4,2                   ## @srv_addr
	.comm	_errno,4,2                      ## @errno
	.no_dead_strip	_establish_connection
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function establish_connection
_establish_connection:                  ; @establish_connection
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
Lloh0:
	adrp	x8, _AF_INET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AF_INET@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
Lloh6:
	adrp	x21, _fd_serv@GOTPAGE
Lloh7:
	ldr	x21, [x21, _fd_serv@GOTPAGEOFF]
	str	w0, [x21]
	cmn	w0, #1
	b.eq	LBB0_2
; %bb.1:
	mov	x19, x0
Lloh8:
	adrp	x8, _F_SETFL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _F_SETFL@GOTPAGEOFF]
Lloh10:
	ldr	w20, [x8]
Lloh11:
	adrp	x8, _O_NONBLOCK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _O_NONBLOCK@GOTPAGEOFF]
Lloh13:
	ldr	w22, [x8]
Lloh14:
	adrp	x8, _F_GETFL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _F_GETFL@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_fcntl
	orr	w2, w0, w22
	mov	x0, x19
	mov	x1, x20
	bl	_fcntl
	bl	_resolve_func
Lloh17:
	adrp	x8, _TRUE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _pending_connection@GOTPAGE
Lloh21:
	ldr	x9, [x9, _pending_connection@GOTPAGEOFF]
Lloh22:
	str	w8, [x9]
	ldr	w0, [x21]
Lloh23:
	adrp	x1, _srv_addr@GOTPAGE
Lloh24:
	ldr	x1, [x1, _srv_addr@GOTPAGEOFF]
	mov	w2, #4
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_connect
LBB0_2:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotStr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_AF_INET,4,2                    ; @AF_INET
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.comm	_fd_serv,4,2                    ; @fd_serv
	.comm	_F_SETFL,4,2                    ; @F_SETFL
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
	.comm	_F_GETFL,4,2                    ; @F_GETFL
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_pending_connection,4,2         ; @pending_connection
	.comm	_srv_addr,4,2                   ; @srv_addr
	.comm	_errno,4,2                      ; @errno
	.no_dead_strip	_establish_connection
.subsections_via_symbols
