	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_net_connect                    ## -- Begin function net_connect
	.p2align	4, 0x90
_net_connect:                           ## @net_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movl	%edi, %ebx
	callq	_get_socket
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	(%r15), %rax
	movq	_AF_UNSPEC@GOTPCREL(%rip), %rcx
	movslq	%ebx, %r14
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	_SOCKETS_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_LWIP_DEBUGF
	movl	(%r12), %edi
	callq	_netconn_disconnect
	jmp	LBB0_5
LBB0_1:
	movq	_ENOTSOCK@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_4:
	movl	12(%r15), %eax
	movl	%eax, -48(%rbp)
	movl	8(%r15), %r15d
	movq	_SOCKETS_DEBUG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	%r14, %rsi
	callq	_LWIP_DEBUGF
	movl	(%rbx), %edi
	leaq	-48(%rbp), %r13
	movq	%r13, %rsi
	callq	_ip_addr_debug_print
	movl	(%rbx), %ebx
	movl	%r15d, %edi
	callq	_ntohs
	movslq	%eax, %rsi
	movl	%ebx, %edi
	callq	_LWIP_DEBUGF
	movl	(%r12), %ebx
	movl	%r15d, %edi
	callq	_ntohs
	movl	%ebx, %edi
	movq	%r13, %rsi
	movl	%eax, %edx
	callq	_netconn_connect
LBB0_5:
	movq	_ERR_OK@GOTPCREL(%rip), %rcx
	movq	_SOCKETS_DEBUG@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.7:
	movq	%r14, %rsi
	callq	_LWIP_DEBUGF
	movq	_EISCONN@GOTPCREL(%rip), %rcx
LBB0_8:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_6:
	movq	%rax, %rsi
	callq	_LWIP_DEBUGF
	movl	$-1, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOTSOCK,4,2                   ## @ENOTSOCK
	.comm	_AF_UNSPEC,8,3                  ## @AF_UNSPEC
	.comm	_SOCKETS_DEBUG,4,2              ## @SOCKETS_DEBUG
	.comm	_ERR_OK,8,3                     ## @ERR_OK
	.comm	_EISCONN,4,2                    ## @EISCONN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_net_connect                    ; -- Begin function net_connect
	.p2align	2
_net_connect:                           ; @net_connect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x1
	mov	x19, x0
	bl	_get_socket
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _AF_UNSPEC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AF_UNSPEC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x23, _SOCKETS_DEBUG@GOTPAGE
Lloh4:
	ldr	x23, [x23, _SOCKETS_DEBUG@GOTPAGEOFF]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
	ldr	w0, [x23]
	sxtw	x1, w19
	bl	_LWIP_DEBUGF
	ldr	w0, [x20]
	bl	_netconn_disconnect
	b	LBB0_5
LBB0_3:
Lloh5:
	adrp	x8, _ENOTSOCK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOTSOCK@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
	ldp	w21, w8, [x21, #8]
	str	w8, [sp, #8]
	ldr	w0, [x23]
	mov	x8, x19
	sxtw	x1, w8
	bl	_LWIP_DEBUGF
	ldr	w0, [x23]
	add	x1, sp, #8
	bl	_ip_addr_debug_print
	ldr	w22, [x23]
	mov	x0, x21
	bl	_ntohs
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x1, w0
	mov	x0, x22
	bl	_LWIP_DEBUGF
	ldr	w20, [x20]
	mov	x0, x21
	bl	_ntohs
	mov	x2, x0
	add	x1, sp, #8
	mov	x0, x20
	bl	_netconn_connect
LBB0_5:
	mov	x1, x0
Lloh7:
	adrp	x8, _ERR_OK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ERR_OK@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	ldr	w0, [x23]
	cmp	x1, x8
	b.ne	LBB0_8
; %bb.6:
                                        ; kill: def $w19 killed $w19 killed $x19 def $x19
	sxtw	x1, w19
	bl	_LWIP_DEBUGF
Lloh10:
	adrp	x8, _EISCONN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EISCONN@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_8:
	bl	_LWIP_DEBUGF
	mov	w0, #-1
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOTSOCK,4,2                   ; @ENOTSOCK
	.comm	_AF_UNSPEC,8,3                  ; @AF_UNSPEC
	.comm	_SOCKETS_DEBUG,4,2              ; @SOCKETS_DEBUG
	.comm	_ERR_OK,8,3                     ; @ERR_OK
	.comm	_EISCONN,4,2                    ; @EISCONN
.subsections_via_symbols
