	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pptp_connect
_pptp_connect:                          ## @pptp_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	%edx, %ebx
	movq	%rsi, %r12
	movq	(%rdi), %r14
	movq	%r14, %rdi
	callq	_pppox_sk
	cmpl	$15, %ebx
	jbe	LBB0_4
## %bb.1:
	movq	%rax, %r15
	movq	(%r12), %rax
	movq	_PX_PROTO_PPTP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.2:
	movl	8(%r12), %esi
	movl	12(%r12), %edi
	callq	_lookup_chan_dst
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	_EALREADY@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_5:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%r14, %rdi
	callq	_lock_sock
	movl	(%r14), %eax
	movq	_PPPOX_CONNECTED@GOTPCREL(%rip), %r13
	testl	%eax, (%r13)
	je	LBB0_9
## %bb.8:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_9:
	movq	_PPPOX_DEAD@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_11
## %bb.10:
	movq	_EALREADY@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_11:
	cmpl	$0, 40(%r15)
	je	LBB0_15
## %bb.12:
	cmpl	$0, 8(%r12)
	je	LBB0_15
## %bb.13:
	movq	%r14, 24(%r15)
	movq	_pptp_chan_ops@GOTPCREL(%rip), %rax
	movq	%rax, 16(%r15)
	movq	%r14, %rdi
	callq	_sock_net
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	32(%r15), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	40(%r15), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	_IPPROTO_GRE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_RT_CONN_FLAGS
                                        ## kill: def $eax killed $eax def $rax
	leaq	-64(%rbp), %rsi
	xorl	%ebx, %ebx
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	movq	%r14, %rdx
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	movl	-56(%rbp), %r8d                 ## 4-byte Reload
	xorl	%r9d, %r9d
	pushq	$0
	pushq	%rax
	pushq	-48(%rbp)                       ## 8-byte Folded Reload
	pushq	$0
	callq	_ip_route_output_ports
	addq	$32, %rsp
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_19
## %bb.14:
	movq	_EHOSTUNREACH@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_16:
	xorl	%ebx, %ebx
LBB0_17:
	subl	(%rax), %ebx
LBB0_18:
	movq	%r14, %rdi
	callq	_release_sock
	jmp	LBB0_6
LBB0_19:
	movq	%r14, %rdi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_sk_setup_caps
	movq	%rbx, %rdi
	callq	_dst_mtu
	testq	%rax, %rax
	jne	LBB0_21
## %bb.20:
	movq	_PPP_MRU@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_21:
	movq	_PPTP_HEADER_OVERHEAD@GOTPCREL(%rip), %rcx
	subq	(%rcx), %rax
	movq	%rax, 8(%r15)
	movl	$6, (%r15)
	movq	%r15, %rdi
	callq	_ppp_register_channel
	testl	%eax, %eax
	je	LBB0_23
## %bb.22:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_err
	jmp	LBB0_18
LBB0_23:
	movq	8(%r12), %rax
	movq	%rax, 32(%r15)
	movl	(%r13), %eax
	orl	%eax, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PX_PROTO_PPTP,8,3              ## @PX_PROTO_PPTP
	.comm	_EALREADY,4,2                   ## @EALREADY
	.comm	_PPPOX_CONNECTED,4,2            ## @PPPOX_CONNECTED
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_PPPOX_DEAD,4,2                 ## @PPPOX_DEAD
	.comm	_pptp_chan_ops,4,2              ## @pptp_chan_ops
	.comm	_IPPROTO_GRE,4,2                ## @IPPROTO_GRE
	.comm	_EHOSTUNREACH,4,2               ## @EHOSTUNREACH
	.comm	_PPP_MRU,8,3                    ## @PPP_MRU
	.comm	_PPTP_HEADER_OVERHEAD,8,3       ## @PPTP_HEADER_OVERHEAD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PPTP: failed to register PPP channel (%d)\n"

	.no_dead_strip	_pptp_connect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pptp_connect
_pptp_connect:                          ; @pptp_connect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x22, x2
	mov	x20, x1
	ldr	x19, [x0]
	mov	x0, x19
	bl	_pppox_sk
	cmp	w22, #15
	b.ls	LBB0_4
; %bb.1:
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _PX_PROTO_PPTP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PX_PROTO_PPTP@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
	mov	x21, x0
	ldp	w1, w0, [x20, #8]
	bl	_lookup_chan_dst
	cbz	x0, LBB0_7
; %bb.3:
Lloh3:
	adrp	x8, _EALREADY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EALREADY@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_6:
	mov	x0, x22
	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
	add	sp, sp, #96
	ret
LBB0_7:
	mov	x0, x19
	bl	_lock_sock
	ldr	w8, [x19]
Lloh7:
	adrp	x26, _PPPOX_CONNECTED@GOTPAGE
Lloh8:
	ldr	x26, [x26, _PPPOX_CONNECTED@GOTPAGEOFF]
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:
Lloh9:
	adrp	x8, _EBUSY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_16
LBB0_9:
Lloh11:
	adrp	x9, _PPPOX_DEAD@GOTPAGE
Lloh12:
	ldr	x9, [x9, _PPPOX_DEAD@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.10:
Lloh14:
	adrp	x8, _EALREADY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EALREADY@GOTPAGEOFF]
	b	LBB0_16
LBB0_11:
	ldr	w8, [x21, #40]
	cbz	w8, LBB0_15
; %bb.12:
	ldr	w8, [x20, #8]
	cbz	w8, LBB0_15
; %bb.13:
Lloh16:
	adrp	x8, _pptp_chan_ops@GOTPAGE
Lloh17:
	ldr	x8, [x8, _pptp_chan_ops@GOTPAGEOFF]
	stp	x8, x19, [x21, #16]
	mov	x0, x19
	bl	_sock_net
	mov	x22, x0
	ldr	w23, [x21, #32]
	ldr	w24, [x21, #40]
Lloh18:
	adrp	x8, _IPPROTO_GRE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IPPROTO_GRE@GOTPAGEOFF]
Lloh20:
	ldr	w25, [x8]
	mov	x0, x19
	bl	_RT_CONN_FLAGS
	stp	w0, wzr, [sp]
	add	x1, sp, #8
	mov	x0, x22
	mov	x2, x19
	mov	x3, x23
	mov	x4, x24
	mov	w5, #0
	mov	w6, #0
	mov	x7, x25
	bl	_ip_route_output_ports
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_18
; %bb.14:
Lloh21:
	adrp	x8, _EHOSTUNREACH@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EHOSTUNREACH@GOTPAGEOFF]
	b	LBB0_16
LBB0_15:
Lloh23:
	adrp	x8, _EINVAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_17:
	mov	x0, x19
	bl	_release_sock
	b	LBB0_6
LBB0_18:
	mov	x0, x19
	mov	x1, x22
	bl	_sk_setup_caps
	mov	x0, x22
	bl	_dst_mtu
Lloh25:
	adrp	x8, _PPP_MRU@GOTPAGE
Lloh26:
	ldr	x8, [x8, _PPP_MRU@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
Lloh28:
	adrp	x9, _PPTP_HEADER_OVERHEAD@GOTPAGE
Lloh29:
	ldr	x9, [x9, _PPTP_HEADER_OVERHEAD@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x8, x0, eq
Lloh30:
	ldr	x9, [x9]
	sub	x8, x8, x9
	str	x8, [x21, #8]
	mov	w8, #6
	str	w8, [x21]
	mov	x0, x21
	bl	_ppp_register_channel
	mov	x22, x0
	cbz	w0, LBB0_20
; %bb.19:
Lloh31:
	adrp	x0, l_.str@PAGE
Lloh32:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_pr_err
	b	LBB0_17
LBB0_20:
	ldr	x8, [x20, #8]
	str	x8, [x21, #32]
	ldr	w8, [x26]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PX_PROTO_PPTP,8,3              ; @PX_PROTO_PPTP
	.comm	_EALREADY,4,2                   ; @EALREADY
	.comm	_PPPOX_CONNECTED,4,2            ; @PPPOX_CONNECTED
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_PPPOX_DEAD,4,2                 ; @PPPOX_DEAD
	.comm	_pptp_chan_ops,4,2              ; @pptp_chan_ops
	.comm	_IPPROTO_GRE,4,2                ; @IPPROTO_GRE
	.comm	_EHOSTUNREACH,4,2               ; @EHOSTUNREACH
	.comm	_PPP_MRU,8,3                    ; @PPP_MRU
	.comm	_PPTP_HEADER_OVERHEAD,8,3       ; @PPTP_HEADER_OVERHEAD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PPTP: failed to register PPP channel (%d)\n"

	.no_dead_strip	_pptp_connect
.subsections_via_symbols
