	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fsocket_spawn                  ## -- Begin function fsocket_spawn
	.p2align	4, 0x90
_fsocket_spawn:                         ## @fsocket_spawn
	.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, %r15d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%rbx), %r8d
	leaq	L_.str(%rip), %rsi
	xorl	%r13d, %r13d
	movl	%r14d, %edx
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_DPRINTK
	movq	_fastsocket_spawn_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	cmpl	$0, 8(%rbx)
	je	LBB0_2
## %bb.1:
	movq	_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_EPRINTK_LIMIT
	movq	_EEXIST@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	jmp	LBB0_15
LBB0_2:
	movq	(%rbx), %r12
	movq	8(%r12), %rax
	movq	(%rax), %rcx
	movq	_TCP_LISTEN@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jne	LBB0_3
## %bb.4:
	movl	%r15d, %edi
	callq	_fsocket_process_affinity_check
	movl	%eax, %r13d
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	movq	$0, -48(%rbp)
	leaq	-48(%rbp), %rdx
	movl	%r14d, %edi
	movq	%r12, %rsi
	callq	_fsocket_spawn_clone
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:
	movq	-48(%rbp), %rdi
	movl	%r13d, %esi
	callq	_fsocket_sk_affinity_set
	leaq	-52(%rbp), %rdi
	callq	_fsocket_set_bind_cap
	movq	_AF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	8(%r12), %rdi
	callq	_inet_sk
	movl	4(%rax), %eax
	movl	%eax, -60(%rbp)
	movq	8(%r12), %rdi
	callq	_inet_sk
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movq	-48(%rbp), %rdi
	movq	(%rdi), %rax
	leaq	-64(%rbp), %rsi
	movl	$12, %edx
	callq	*(%rax)
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:
	leaq	-52(%rbp), %rdi
	callq	_fsocket_reset_bind_cap
	movq	8(%r12), %rax
	movl	8(%rax), %esi
	movq	-48(%rbp), %rdi
	movq	(%rdi), %rax
	callq	*8(%rax)
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_11
## %bb.16:
	movl	%r13d, %edi
	callq	_fsocket_process_affinity_set
	jmp	LBB0_14
LBB0_3:
	movq	_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%r13d, %r13d
	movl	%r14d, %edx
	movq	%rbx, %r8
	xorl	%eax, %eax
	callq	_EPRINTK_LIMIT
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	jmp	LBB0_15
LBB0_5:
	movq	_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_EPRINTK_LIMIT
	jmp	LBB0_15
LBB0_7:
	movl	%eax, %r15d
	movq	_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_EPRINTK_LIMIT
	jmp	LBB0_13
LBB0_9:
	movl	%eax, %r15d
	movq	_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_12
LBB0_11:
	movq	_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.6(%rip), %rsi
LBB0_12:
	movl	%r14d, %edx
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_EPRINTK_LIMIT
	movq	-48(%rbp), %rdi
	callq	_fsocket_sk_affinity_release
	movl	%r14d, %edi
	callq	_fsocket_filp_close_spawn
LBB0_13:
	movl	%r13d, %edi
	callq	_fsocket_process_affinity_restore
LBB0_14:
	movl	%r15d, %r13d
LBB0_15:
	movq	_fastsocket_spawn_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.7(%rip), %rsi
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_DPRINTK
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INFO,4,2                       ## @INFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Listen spawn listen fd %d on CPU %d. filp->sub_file(%p)\n"

	.comm	_fastsocket_spawn_mutex,4,2     ## @fastsocket_spawn_mutex
	.comm	_ERR,4,2                        ## @ERR
L_.str.1:                               ## @.str.1
	.asciz	"Spawn on a already spawned file 0x%p\n"

	.comm	_EEXIST,4,2                     ## @EEXIST
	.comm	_TCP_LISTEN,8,3                 ## @TCP_LISTEN
L_.str.2:                               ## @.str.2
	.asciz	"Spawn on a non-listen socket[%d-%d] file 0x%p\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.3:                               ## @.str.3
	.asciz	"Set CPU affinity for process failed\n"

L_.str.4:                               ## @.str.4
	.asciz	"Clone listen socket failed[%d]\n"

	.comm	_AF_INET,4,2                    ## @AF_INET
L_.str.5:                               ## @.str.5
	.asciz	"Bind spawned socket %d failed[%d]\n"

L_.str.6:                               ## @.str.6
	.asciz	"Listen spawned socket %d failed[%d]\n"

	.comm	_DEBUG,4,2                      ## @DEBUG
L_.str.7:                               ## @.str.7
	.asciz	"fsocket_spawn return value is %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fsocket_spawn                  ; -- Begin function fsocket_spawn
	.p2align	2
_fsocket_spawn:                         ; @fsocket_spawn
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x22, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _INFO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INFO@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w8, [x19, #8]
	stp	x22, x8, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_DPRINTK
Lloh5:
	adrp	x0, _fastsocket_spawn_mutex@GOTPAGE
Lloh6:
	ldr	x0, [x0, _fastsocket_spawn_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_2
; %bb.1:
Lloh7:
	adrp	x8, _ERR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ERR@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	str	x19, [sp]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_EPRINTK_LIMIT
Lloh12:
	adrp	x8, _EEXIST@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EEXIST@GOTPAGEOFF]
	b	LBB0_9
LBB0_2:
	ldr	x21, [x19]
	ldr	x8, [x21, #8]
	ldr	x8, [x8]
Lloh14:
	adrp	x9, _TCP_LISTEN@GOTPAGE
Lloh15:
	ldr	x9, [x9, _TCP_LISTEN@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.3:
	mov	x0, x22
	bl	_fsocket_process_affinity_check
	mov	x19, x0
	tbnz	w0, #31, LBB0_11
; %bb.4:
	stur	xzr, [x29, #-40]
	sub	x2, x29, #40
	mov	x0, x20
	mov	x1, x21
	bl	_fsocket_spawn_clone
	tbnz	w0, #31, LBB0_12
; %bb.5:
	ldur	x0, [x29, #-40]
	mov	x1, x19
	bl	_fsocket_sk_affinity_set
	add	x0, sp, #36
	bl	_fsocket_set_bind_cap
Lloh17:
	adrp	x8, _AF_INET@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AF_INET@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [sp, #48]
	ldr	x0, [x21, #8]
	bl	_inet_sk
	ldr	w8, [x0, #4]
	str	w8, [sp, #44]
	ldr	x0, [x21, #8]
	bl	_inet_sk
	ldr	w8, [x0]
	str	w8, [sp, #40]
	ldur	x0, [x29, #-40]
	ldr	x8, [x0]
	ldr	x8, [x8]
	add	x1, sp, #40
	mov	w2, #12
	blr	x8
	tbnz	w0, #31, LBB0_13
; %bb.6:
	add	x0, sp, #36
	bl	_fsocket_reset_bind_cap
	ldr	x8, [x21, #8]
	ldr	w1, [x8, #8]
	ldur	x0, [x29, #-40]
	ldr	x8, [x0]
	ldr	x8, [x8, #8]
	blr	x8
	mov	x22, x0
	tbnz	w0, #31, LBB0_14
; %bb.7:
	mov	x0, x19
	bl	_fsocket_process_affinity_set
	b	LBB0_17
LBB0_8:
Lloh20:
	adrp	x9, _ERR@GOTPAGE
Lloh21:
	ldr	x9, [x9, _ERR@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x9]
	stp	x8, x19, [sp, #8]
	str	x20, [sp]
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_EPRINTK_LIMIT
Lloh25:
	adrp	x8, _EINVAL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_10:
Lloh27:
	adrp	x0, _fastsocket_spawn_mutex@GOTPAGE
Lloh28:
	ldr	x0, [x0, _fastsocket_spawn_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
Lloh29:
	adrp	x8, _DEBUG@GOTPAGE
Lloh30:
	ldr	x8, [x8, _DEBUG@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
Lloh32:
	adrp	x1, l_.str.7@PAGE
Lloh33:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x2, x19
	bl	_DPRINTK
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_11:
Lloh34:
	adrp	x8, _ERR@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ERR@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
Lloh37:
	adrp	x1, l_.str.3@PAGE
Lloh38:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_EPRINTK_LIMIT
	b	LBB0_10
LBB0_12:
	mov	x22, x0
Lloh39:
	adrp	x8, _ERR@GOTPAGE
Lloh40:
	ldr	x8, [x8, _ERR@GOTPAGEOFF]
Lloh41:
	ldr	w0, [x8]
	str	x22, [sp]
Lloh42:
	adrp	x1, l_.str.4@PAGE
Lloh43:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_EPRINTK_LIMIT
	b	LBB0_16
LBB0_13:
	mov	x22, x0
Lloh44:
	adrp	x8, _ERR@GOTPAGE
Lloh45:
	ldr	x8, [x8, _ERR@GOTPAGEOFF]
Lloh46:
	ldr	w0, [x8]
	mov	x8, x20
	stp	x8, x22, [sp]
Lloh47:
	adrp	x1, l_.str.5@PAGE
Lloh48:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_EPRINTK_LIMIT
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	b	LBB0_15
LBB0_14:
Lloh49:
	adrp	x8, _ERR@GOTPAGE
Lloh50:
	ldr	x8, [x8, _ERR@GOTPAGEOFF]
Lloh51:
	ldr	w0, [x8]
	mov	x8, x22
	mov	x9, x20
	stp	x9, x8, [sp]
Lloh52:
	adrp	x1, l_.str.6@PAGE
Lloh53:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_EPRINTK_LIMIT
LBB0_15:
	ldur	x0, [x29, #-40]
	bl	_fsocket_sk_affinity_release
	mov	x0, x20
	bl	_fsocket_filp_close_spawn
LBB0_16:
	mov	x0, x19
	bl	_fsocket_process_affinity_restore
LBB0_17:
	mov	x19, x22
	b	LBB0_10
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.comm	_INFO,4,2                       ; @INFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Listen spawn listen fd %d on CPU %d. filp->sub_file(%p)\n"

	.comm	_fastsocket_spawn_mutex,4,2     ; @fastsocket_spawn_mutex
	.comm	_ERR,4,2                        ; @ERR
l_.str.1:                               ; @.str.1
	.asciz	"Spawn on a already spawned file 0x%p\n"

	.comm	_EEXIST,4,2                     ; @EEXIST
	.comm	_TCP_LISTEN,8,3                 ; @TCP_LISTEN
l_.str.2:                               ; @.str.2
	.asciz	"Spawn on a non-listen socket[%d-%d] file 0x%p\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.3:                               ; @.str.3
	.asciz	"Set CPU affinity for process failed\n"

l_.str.4:                               ; @.str.4
	.asciz	"Clone listen socket failed[%d]\n"

	.comm	_AF_INET,4,2                    ; @AF_INET
l_.str.5:                               ; @.str.5
	.asciz	"Bind spawned socket %d failed[%d]\n"

l_.str.6:                               ; @.str.6
	.asciz	"Listen spawned socket %d failed[%d]\n"

	.comm	_DEBUG,4,2                      ; @DEBUG
l_.str.7:                               ; @.str.7
	.asciz	"fsocket_spawn return value is %d\n"

.subsections_via_symbols
