	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function x25_connect
_x25_connect:                           ## @x25_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r13d
	movl	%edx, %r15d
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r14
	movq	8(%rdi), %r12
	movq	%r12, %rdi
	callq	_x25_sk
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_lock_sock
	movq	(%r12), %rax
	movq	_TCP_ESTABLISHED@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, %rax
	jne	LBB0_3
## %bb.1:
	movq	(%r14), %rdx
	movq	_SS_CONNECTING@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_3
## %bb.2:
	movq	_SS_CONNECTED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
	xorl	%r13d, %r13d
	jmp	LBB0_25
LBB0_3:
	movl	%r13d, -60(%rbp)                ## 4-byte Spill
	xorl	%r13d, %r13d
	movq	_TCP_CLOSE@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	%rdx, %rax
	jne	LBB0_6
## %bb.4:
	movq	(%r14), %rsi
	movq	_SS_CONNECTING@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rsi
	jne	LBB0_6
## %bb.5:
	movq	_ECONNREFUSED@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	movq	_SS_UNCONNECTED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
	jmp	LBB0_25
LBB0_6:
	cmpq	%rcx, %rax
	jne	LBB0_8
## %bb.7:
	movq	_EISCONN@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	jmp	LBB0_25
LBB0_8:
	movq	%rdx, (%r12)
	movq	_SS_UNCONNECTED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	cmpl	$16, %r15d
	jne	LBB0_25
## %bb.9:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	(%r15), %rax
	movq	_AF_X25@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_25
## %bb.10:
	movq	_ENETUNREACH@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	addq	$8, %r15
	movq	%r15, %rdi
	callq	_x25_get_route
	testq	%rax, %rax
	je	LBB0_25
## %bb.11:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	(%rax), %edi
	callq	_x25_get_neigh
	movl	%eax, (%rbx)
	testl	%eax, %eax
	je	LBB0_24
## %bb.12:
	movq	%rbx, %r15
	leaq	20(%rbx), %rdi
	movl	%eax, %esi
	callq	_x25_limit_facilities
	movl	(%rbx), %edi
	callq	_x25_new_lci
	movl	%eax, 16(%rbx)
	testl	%eax, %eax
	je	LBB0_19
## %bb.13:
	xorl	%r13d, %r13d
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	movq	_SOCK_ZAPPED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_sock_flag
	testq	%rax, %rax
	je	LBB0_14
LBB0_19:
	testl	%r13d, %r13d
	je	LBB0_23
LBB0_20:
	movl	(%rbx), %edi
	callq	_x25_neigh_put
	jmp	LBB0_24
LBB0_14:
	movq	%rbx, %r15
	movl	12(%rbx), %edi
	movq	_null_x25_address@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_strcmp
	testl	%eax, %eax
	jne	LBB0_16
## %bb.15:
	movq	%r15, %rdi
	addq	$12, %rdi
	movq	_X25_ADDR_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_memset
LBB0_16:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	movq	_SS_CONNECTING@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
	movq	_TCP_SYN_SENT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r12)
	movq	_X25_STATE_1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r15)
	movq	_X25_CALL_REQUEST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_x25_write_internal
	movq	%r12, %rdi
	callq	_x25_start_heartbeat
	movq	%r12, %rdi
	callq	_x25_start_t21timer
	movq	(%r12), %rax
	movq	_TCP_ESTABLISHED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	je	LBB0_21
## %bb.17:
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_21
## %bb.18:
	movq	_EINPROGRESS@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	testl	%r13d, %r13d
	jne	LBB0_20
	jmp	LBB0_23
LBB0_21:
	movq	%r12, %rdi
	callq	_x25_wait_for_connection_establishment
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_20
## %bb.22:
	movq	_SS_CONNECTED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
LBB0_23:
	xorl	%r13d, %r13d
LBB0_24:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_x25_route_put
LBB0_25:
	movq	%r12, %rdi
	callq	_release_sock
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TCP_ESTABLISHED,8,3            ## @TCP_ESTABLISHED
	.comm	_SS_CONNECTING,8,3              ## @SS_CONNECTING
	.comm	_SS_CONNECTED,8,3               ## @SS_CONNECTED
	.comm	_ECONNREFUSED,4,2               ## @ECONNREFUSED
	.comm	_TCP_CLOSE,8,3                  ## @TCP_CLOSE
	.comm	_SS_UNCONNECTED,8,3             ## @SS_UNCONNECTED
	.comm	_EISCONN,4,2                    ## @EISCONN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AF_X25,8,3                     ## @AF_X25
	.comm	_ENETUNREACH,4,2                ## @ENETUNREACH
	.comm	_SOCK_ZAPPED,4,2                ## @SOCK_ZAPPED
	.comm	_null_x25_address,4,2           ## @null_x25_address
	.comm	_X25_ADDR_LEN,4,2               ## @X25_ADDR_LEN
	.comm	_TCP_SYN_SENT,8,3               ## @TCP_SYN_SENT
	.comm	_X25_STATE_1,4,2                ## @X25_STATE_1
	.comm	_X25_CALL_REQUEST,4,2           ## @X25_CALL_REQUEST
	.comm	_EINPROGRESS,4,2                ## @EINPROGRESS
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
	.no_dead_strip	_x25_connect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function x25_connect
_x25_connect:                           ; @x25_connect
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x3
	mov	x25, x2
	mov	x23, x1
	mov	x20, x0
	ldr	x19, [x0, #8]
	mov	x0, x19
	bl	_x25_sk
	mov	x21, x0
	mov	x0, x19
	bl	_lock_sock
	ldr	x8, [x19]
Lloh0:
	adrp	x26, _TCP_ESTABLISHED@GOTPAGE
Lloh1:
	ldr	x26, [x26, _TCP_ESTABLISHED@GOTPAGEOFF]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	ldr	x10, [x20]
Lloh2:
	adrp	x11, _SS_CONNECTING@GOTPAGE
Lloh3:
	ldr	x11, [x11, _SS_CONNECTING@GOTPAGEOFF]
Lloh4:
	ldr	x11, [x11]
	cmp	x10, x11
	b.ne	LBB0_3
; %bb.2:
	mov	w24, #0
Lloh5:
	adrp	x8, _SS_CONNECTED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SS_CONNECTED@GOTPAGEOFF]
	b	LBB0_6
LBB0_3:
Lloh7:
	adrp	x10, _TCP_CLOSE@GOTPAGE
Lloh8:
	ldr	x10, [x10, _TCP_CLOSE@GOTPAGEOFF]
Lloh9:
	ldr	x10, [x10]
	cmp	x8, x10
	b.ne	LBB0_7
; %bb.4:
	ldr	x11, [x20]
Lloh10:
	adrp	x12, _SS_CONNECTING@GOTPAGE
Lloh11:
	ldr	x12, [x12, _SS_CONNECTING@GOTPAGEOFF]
Lloh12:
	ldr	x12, [x12]
	cmp	x11, x12
	b.ne	LBB0_7
; %bb.5:
Lloh13:
	adrp	x8, _ECONNREFUSED@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ECONNREFUSED@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w24, w8
Lloh16:
	adrp	x8, _SS_UNCONNECTED@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SS_UNCONNECTED@GOTPAGEOFF]
LBB0_6:
	ldr	x8, [x8]
	str	x8, [x20]
	b	LBB0_19
LBB0_7:
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.8:
Lloh18:
	adrp	x8, _EISCONN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EISCONN@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_19
LBB0_9:
	str	x10, [x19]
Lloh21:
	adrp	x8, _SS_UNCONNECTED@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SS_UNCONNECTED@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	str	x8, [x20]
Lloh24:
	adrp	x27, _EINVAL@GOTPAGE
Lloh25:
	ldr	x27, [x27, _EINVAL@GOTPAGEOFF]
	ldr	w8, [x27]
	neg	w24, w8
	cmp	w25, #16
	b.ne	LBB0_19
; %bb.10:
	ldr	x8, [x23]
Lloh26:
	adrp	x9, _AF_X25@GOTPAGE
Lloh27:
	ldr	x9, [x9, _AF_X25@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_19
; %bb.11:
Lloh29:
	adrp	x8, _ENETUNREACH@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ENETUNREACH@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	neg	w24, w8
	add	x25, x23, #8
	mov	x0, x25
	bl	_x25_get_route
	cbz	x0, LBB0_19
; %bb.12:
	mov	x23, x0
	ldr	w0, [x0]
	bl	_x25_get_neigh
	str	w0, [x21]
	cbz	w0, LBB0_18
; %bb.13:
	mov	x1, x0
	add	x0, x21, #20
	bl	_x25_limit_facilities
	ldr	w0, [x21]
	bl	_x25_new_lci
	str	w0, [x21, #16]
	cbz	w0, LBB0_16
; %bb.14:
	ldr	w24, [x27]
Lloh32:
	adrp	x8, _SOCK_ZAPPED@GOTPAGE
Lloh33:
	ldr	x8, [x8, _SOCK_ZAPPED@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_sock_flag
	cbz	x0, LBB0_20
; %bb.15:
	neg	w24, w24
LBB0_16:
	cbz	w24, LBB0_18
LBB0_17:
	ldr	w0, [x21]
	bl	_x25_neigh_put
LBB0_18:
	mov	x0, x23
	bl	_x25_route_put
LBB0_19:
	mov	x0, x19
	bl	_release_sock
	mov	x0, x24
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_20:
	mov	x24, x21
	ldr	w0, [x24, #12]!
Lloh35:
	adrp	x8, _null_x25_address@GOTPAGE
Lloh36:
	ldr	x8, [x8, _null_x25_address@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	bl	_strcmp
	cbnz	w0, LBB0_22
; %bb.21:
Lloh38:
	adrp	x8, _X25_ADDR_LEN@GOTPAGE
Lloh39:
	ldr	x8, [x8, _X25_ADDR_LEN@GOTPAGEOFF]
Lloh40:
	ldr	w2, [x8]
	mov	x0, x24
	mov	w1, #0
	bl	_memset
LBB0_22:
	ldr	w8, [x25]
Lloh41:
	adrp	x9, _SS_CONNECTING@GOTPAGE
Lloh42:
	ldr	x9, [x9, _SS_CONNECTING@GOTPAGEOFF]
Lloh43:
	ldr	x9, [x9]
	str	x9, [x20]
Lloh44:
	adrp	x9, _TCP_SYN_SENT@GOTPAGE
Lloh45:
	ldr	x9, [x9, _TCP_SYN_SENT@GOTPAGEOFF]
Lloh46:
	ldr	x9, [x9]
	str	x9, [x19]
Lloh47:
	adrp	x9, _X25_STATE_1@GOTPAGE
Lloh48:
	ldr	x9, [x9, _X25_STATE_1@GOTPAGEOFF]
Lloh49:
	ldr	w9, [x9]
	stp	w9, w8, [x21, #4]
Lloh50:
	adrp	x8, _X25_CALL_REQUEST@GOTPAGE
Lloh51:
	ldr	x8, [x8, _X25_CALL_REQUEST@GOTPAGEOFF]
Lloh52:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_x25_write_internal
	mov	x0, x19
	bl	_x25_start_heartbeat
	mov	x0, x19
	bl	_x25_start_t21timer
	ldr	x8, [x19]
	ldr	x9, [x26]
	cmp	x8, x9
	b.eq	LBB0_25
; %bb.23:
Lloh53:
	adrp	x8, _O_NONBLOCK@GOTPAGE
Lloh54:
	ldr	x8, [x8, _O_NONBLOCK@GOTPAGEOFF]
Lloh55:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_25
; %bb.24:
Lloh56:
	adrp	x8, _EINPROGRESS@GOTPAGE
Lloh57:
	ldr	x8, [x8, _EINPROGRESS@GOTPAGEOFF]
Lloh58:
	ldr	w8, [x8]
	neg	w24, w8
	cbnz	w24, LBB0_17
	b	LBB0_18
LBB0_25:
	mov	x0, x19
	bl	_x25_wait_for_connection_establishment
	mov	x24, x0
	cbnz	w0, LBB0_17
; %bb.26:
Lloh59:
	adrp	x8, _SS_CONNECTED@GOTPAGE
Lloh60:
	ldr	x8, [x8, _SS_CONNECTED@GOTPAGEOFF]
Lloh61:
	ldr	x8, [x8]
	str	x8, [x20]
	b	LBB0_18
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.cfi_endproc
                                        ; -- End function
	.comm	_TCP_ESTABLISHED,8,3            ; @TCP_ESTABLISHED
	.comm	_SS_CONNECTING,8,3              ; @SS_CONNECTING
	.comm	_SS_CONNECTED,8,3               ; @SS_CONNECTED
	.comm	_ECONNREFUSED,4,2               ; @ECONNREFUSED
	.comm	_TCP_CLOSE,8,3                  ; @TCP_CLOSE
	.comm	_SS_UNCONNECTED,8,3             ; @SS_UNCONNECTED
	.comm	_EISCONN,4,2                    ; @EISCONN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AF_X25,8,3                     ; @AF_X25
	.comm	_ENETUNREACH,4,2                ; @ENETUNREACH
	.comm	_SOCK_ZAPPED,4,2                ; @SOCK_ZAPPED
	.comm	_null_x25_address,4,2           ; @null_x25_address
	.comm	_X25_ADDR_LEN,4,2               ; @X25_ADDR_LEN
	.comm	_TCP_SYN_SENT,8,3               ; @TCP_SYN_SENT
	.comm	_X25_STATE_1,4,2                ; @X25_STATE_1
	.comm	_X25_CALL_REQUEST,4,2           ; @X25_CALL_REQUEST
	.comm	_EINPROGRESS,4,2                ; @EINPROGRESS
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
	.no_dead_strip	_x25_connect
.subsections_via_symbols
