	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function p9_fd_create_tcp
_p9_fd_create_tcp:                      ## @p9_fd_create_tcp
	.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	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	leaq	-48(%rbp), %rsi
	movq	%rdx, %rdi
	callq	_parse_opts
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	%r15, %rdi
	callq	_valid_ipaddr4
	testq	%rax, %rax
	js	LBB0_3
## %bb.4:
	movq	$0, -40(%rbp)
	movq	_AF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	%r15, %rdi
	callq	_in_aton
	movl	%eax, -60(%rbp)
	movl	-48(%rbp), %edi
	callq	_htons
	movl	%eax, -64(%rbp)
	movq	_PF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IPPROTO_TCP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-40(%rbp), %rcx
	callq	_sock_create_kern
	movq	-40(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.6:
	movq	(%rdi), %rax
	leaq	-64(%rbp), %rsi
	movl	$12, %edx
	xorl	%ecx, %ecx
	callq	*(%rax)
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:
	movq	-40(%rbp), %rsi
	movq	%r14, %rdi
	callq	_p9_socket_open
	xorl	%ebx, %ebx
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:
	movq	(%r14), %r12
	movq	%r14, %rdi
	callq	_p9_conn_create
	movq	%rax, (%r12)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_15
## %bb.11:
	movq	(%r12), %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	movq	$0, (%r12)
	jmp	LBB0_12
LBB0_1:
	movl	%eax, %ebx
	jmp	LBB0_15
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_5:
	movq	_KERN_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_P9_EPRINTK
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_7:
	movl	%eax, %ebx
	movq	_KERN_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_P9_EPRINTK
	jmp	LBB0_12
LBB0_9:
	xorl	%r12d, %r12d
	movl	%eax, %ebx
LBB0_12:
	movq	-40(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.13:
	callq	_sock_release
LBB0_14:
	movq	%r12, %rdi
	callq	_kfree
LBB0_15:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AF_INET,4,2                    ## @AF_INET
	.comm	_PF_INET,4,2                    ## @PF_INET
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.comm	_IPPROTO_TCP,4,2                ## @IPPROTO_TCP
	.comm	_KERN_ERR,4,2                   ## @KERN_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"p9_trans_tcp: problem creating socket\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"p9_trans_tcp: problem connecting socket to %s\n"

	.no_dead_strip	_p9_fd_create_tcp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function p9_fd_create_tcp
_p9_fd_create_tcp:                      ; @p9_fd_create_tcp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x1
	mov	x19, x0
	add	x1, sp, #16
	mov	x0, x2
	bl	_parse_opts
	tbnz	w0, #31, LBB0_7
; %bb.1:
	mov	x0, x20
	bl	_valid_ipaddr4
	tbnz	x0, #63, LBB0_8
; %bb.2:
	str	xzr, [sp, #40]
Lloh0:
	adrp	x8, _AF_INET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AF_INET@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #32]
	mov	x0, x20
	bl	_in_aton
	str	w0, [sp, #28]
	ldr	w0, [sp, #16]
	bl	_htons
	str	w0, [sp, #24]
Lloh3:
	adrp	x8, _PF_INET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PF_INET@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _IPPROTO_TCP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IPPROTO_TCP@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	add	x3, sp, #40
	bl	_sock_create_kern
	ldr	x0, [sp, #40]
	cbz	x0, LBB0_9
; %bb.3:
	ldr	x8, [x0]
	ldr	x8, [x8]
	add	x1, sp, #24
	mov	w2, #12
	mov	w3, #0
	blr	x8
	tbnz	w0, #31, LBB0_13
; %bb.4:
	ldr	x1, [sp, #40]
	mov	x0, x19
	bl	_p9_socket_open
	tbnz	w0, #31, LBB0_14
; %bb.5:
	ldr	x20, [x19]
	mov	x0, x19
	bl	_p9_conn_create
	str	x0, [x20]
	bl	_IS_ERR
	cbz	x0, LBB0_16
; %bb.6:
	ldr	x0, [x20]
	bl	_PTR_ERR
	mov	x21, x0
	str	xzr, [x20]
	ldr	x0, [sp, #40]
	cbnz	x0, LBB0_10
	b	LBB0_11
LBB0_7:
	mov	x21, x0
	b	LBB0_12
LBB0_8:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_12
LBB0_9:
Lloh15:
	adrp	x8, _KERN_ERR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _KERN_ERR@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	bl	_P9_EPRINTK
	mov	x20, #0
Lloh20:
	adrp	x8, _EIO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w21, w8
	ldr	x0, [sp, #40]
	cbz	x0, LBB0_11
LBB0_10:
	bl	_sock_release
LBB0_11:
	mov	x0, x20
	bl	_kfree
LBB0_12:
	mov	x0, x21
	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
	add	sp, sp, #96
	ret
LBB0_13:
	mov	x21, x0
Lloh23:
	adrp	x8, _KERN_ERR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _KERN_ERR@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	str	x20, [sp]
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_P9_EPRINTK
	b	LBB0_15
LBB0_14:
	mov	x21, x0
LBB0_15:
	mov	x20, #0
	ldr	x0, [sp, #40]
	cbnz	x0, LBB0_10
	b	LBB0_11
LBB0_16:
	mov	w21, #0
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AF_INET,4,2                    ; @AF_INET
	.comm	_PF_INET,4,2                    ; @PF_INET
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.comm	_IPPROTO_TCP,4,2                ; @IPPROTO_TCP
	.comm	_KERN_ERR,4,2                   ; @KERN_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"p9_trans_tcp: problem creating socket\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"p9_trans_tcp: problem connecting socket to %s\n"

	.no_dead_strip	_p9_fd_create_tcp
.subsections_via_symbols
