	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function socket_create
_socket_create:                         ## @socket_create
	.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
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r15
	movl	%edx, %ebx
	movl	%esi, %r12d
	movq	%rdi, %r13
	movq	$0, -48(%rbp)
	callq	_VALID_MANAGER
	movl	%eax, %edi
	callq	_REQUIRE
	xorl	%edi, %edi
	testq	%r15, %r15
	je	LBB0_2
## %bb.1:
	cmpq	$0, (%r15)
	sete	%dil
LBB0_2:
	callq	_REQUIRE
	movq	_isc_sockettype_fdwatch@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	%ebx, (%rax)
	setne	%dil
	callq	_REQUIRE
	leaq	-48(%rbp), %rdx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_allocate_socket
	movq	%rax, %rbx
	movq	_ISC_R_SUCCESS@GOTPCREL(%rip), %r14
	cmpq	(%r14), %rax
	jne	LBB0_18
## %bb.3:
	movq	-48(%rbp), %rsi
	movl	(%rsi), %eax
	cmpl	$128, %eax
	je	LBB0_13
## %bb.4:
	cmpl	$130, %eax
	je	LBB0_10
## %bb.5:
	cmpl	$129, %eax
	jne	LBB0_14
## %bb.6:
	movq	_AF_INET@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jne	LBB0_7
## %bb.8:
	movq	_upd4statsindex@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_13:
	movq	_unixstatsindex@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_10:
	movq	_AF_INET@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jne	LBB0_11
## %bb.12:
	movq	_tcp4statsindex@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_14:
	xorl	%edi, %edi
	callq	_INSIST
	movq	-48(%rbp), %rsi
	jmp	LBB0_15
LBB0_11:
	movq	_tcp6statsindex@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_upd6statsindex@GOTPCREL(%rip), %rax
LBB0_9:
	movq	(%rax), %rax
	movq	%rax, 40(%rsi)
LBB0_15:
	movl	%r12d, 4(%rsi)
	movq	%r13, %rdi
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdx
	callq	_opensocket
	cmpq	(%r14), %rax
	jne	LBB0_16
## %bb.17:
	movq	-48(%rbp), %rax
	movq	_socketmethods@GOTPCREL(%rip), %rcx
	movq	%rcx, 32(%rax)
	movl	$1, 8(%rax)
	movq	%rax, (%r15)
	movq	16(%rax), %rdi
	callq	_FDLOCK_ID
	movslq	%eax, %rbx
	shlq	$2, %rbx
	movq	16(%r13), %rdi
	addq	%rbx, %rdi
	callq	_LOCK
	movq	-48(%rbp), %rax
	movq	32(%r13), %rcx
	movq	16(%rax), %rdx
	movq	%rax, (%rcx,%rdx,8)
	movq	_MANAGED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	24(%r13), %rcx
	movq	-48(%rbp), %rdx
	movq	16(%rdx), %rdx
	movl	%eax, (%rcx,%rdx,4)
	addq	16(%r13), %rbx
	movq	%rbx, %rdi
	callq	_UNLOCK
	leaq	8(%r13), %rbx
	movq	%rbx, %rdi
	callq	_LOCK
	movl	12(%r13), %edi
	movq	-48(%rbp), %rsi
	movq	_link@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_ISC_LIST_APPEND
	movq	%rbx, %rdi
	callq	_UNLOCK
	movq	-48(%rbp), %rdi
	movq	_CREATION@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_isc_msgcat@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_ISC_MSGSET_SOCKET@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_ISC_MSG_CREATED@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	testq	%r12, %r12
	leaq	L_.str(%rip), %rax
	leaq	L_.str.1(%rip), %rsi
	cmoveq	%rax, %rsi
	movq	%rsi, (%rsp)
	xorl	%esi, %esi
	callq	_socket_log
	movq	(%r14), %rbx
	jmp	LBB0_18
LBB0_16:
	movq	%rax, %rbx
	movl	40(%r13), %edi
	movq	-48(%rbp), %rax
	movq	40(%rax), %rax
	movq	_STATID_OPENFAIL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %esi
	callq	_inc_stats
	leaq	-48(%rbp), %rdi
	callq	_free_socket
LBB0_18:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_isc_sockettype_fdwatch,4,2     ## @isc_sockettype_fdwatch
	.comm	_ISC_R_SUCCESS,8,3              ## @ISC_R_SUCCESS
	.comm	_AF_INET,4,2                    ## @AF_INET
	.comm	_upd4statsindex,8,3             ## @upd4statsindex
	.comm	_upd6statsindex,8,3             ## @upd6statsindex
	.comm	_tcp4statsindex,8,3             ## @tcp4statsindex
	.comm	_tcp6statsindex,8,3             ## @tcp6statsindex
	.comm	_unixstatsindex,8,3             ## @unixstatsindex
	.comm	_STATID_OPENFAIL,8,3            ## @STATID_OPENFAIL
	.comm	_socketmethods,4,2              ## @socketmethods
	.comm	_MANAGED,4,2                    ## @MANAGED
	.comm	_link,4,2                       ## @link
	.comm	_CREATION,4,2                   ## @CREATION
	.comm	_isc_msgcat,4,2                 ## @isc_msgcat
	.comm	_ISC_MSGSET_SOCKET,4,2          ## @ISC_MSGSET_SOCKET
	.comm	_ISC_MSG_CREATED,4,2            ## @ISC_MSG_CREATED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dupped"

L_.str.1:                               ## @.str.1
	.asciz	"created"

	.no_dead_strip	_socket_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function socket_create
_socket_create:                         ; @socket_create
	.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	x19, x4
	mov	x21, x3
	mov	x23, x2
	mov	x22, x1
	mov	x20, x0
	str	xzr, [sp, #8]
	bl	_VALID_MANAGER
	bl	_REQUIRE
	cbz	x21, LBB0_2
; %bb.1:
	ldr	x8, [x21]
	cmp	x8, #0
	cset	w0, eq
	b	LBB0_3
LBB0_2:
	mov	w0, #0
LBB0_3:
	bl	_REQUIRE
Lloh0:
	adrp	x8, _isc_sockettype_fdwatch@GOTPAGE
Lloh1:
	ldr	x8, [x8, _isc_sockettype_fdwatch@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w23
	cset	w0, ne
	bl	_REQUIRE
	add	x2, sp, #8
	mov	x0, x20
	mov	x1, x23
	bl	_allocate_socket
	mov	x23, x0
Lloh3:
	adrp	x24, _ISC_R_SUCCESS@GOTPAGE
Lloh4:
	ldr	x24, [x24, _ISC_R_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_16
; %bb.4:
	ldr	x1, [sp, #8]
	ldr	w8, [x1]
	cmp	w8, #128
	b.eq	LBB0_8
; %bb.5:
	cmp	w8, #130
	b.eq	LBB0_9
; %bb.6:
	cmp	w8, #129
	b.ne	LBB0_12
; %bb.7:
Lloh5:
	adrp	x8, _AF_INET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AF_INET@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _upd4statsindex@GOTPAGE
Lloh9:
	ldr	x9, [x9, _upd4statsindex@GOTPAGEOFF]
Lloh10:
	adrp	x10, _upd6statsindex@GOTPAGE
Lloh11:
	ldr	x10, [x10, _upd6statsindex@GOTPAGEOFF]
	b	LBB0_10
LBB0_8:
Lloh12:
	adrp	x8, _unixstatsindex@GOTPAGE
Lloh13:
	ldr	x8, [x8, _unixstatsindex@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:
Lloh14:
	adrp	x8, _AF_INET@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AF_INET@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _tcp4statsindex@GOTPAGE
Lloh18:
	ldr	x9, [x9, _tcp4statsindex@GOTPAGEOFF]
Lloh19:
	adrp	x10, _tcp6statsindex@GOTPAGE
Lloh20:
	ldr	x10, [x10, _tcp6statsindex@GOTPAGEOFF]
LBB0_10:
	cmp	w8, w22
	csel	x8, x9, x10, eq
LBB0_11:
	ldr	x8, [x8]
	str	x8, [x1, #40]
	b	LBB0_13
LBB0_12:
	mov	w0, #0
	bl	_INSIST
	ldr	x1, [sp, #8]
LBB0_13:
	str	w22, [x1, #4]
	mov	x0, x20
	mov	x2, x19
	bl	_opensocket
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_15
; %bb.14:
Lloh21:
	adrp	x8, _socketmethods@GOTPAGE
Lloh22:
	ldr	x8, [x8, _socketmethods@GOTPAGEOFF]
	ldr	x9, [sp, #8]
	str	x8, [x9, #32]
	mov	w8, #1
	str	w8, [x9, #8]
	str	x9, [x21]
	ldr	x0, [x9, #16]
	bl	_FDLOCK_ID
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	x8, [x20, #16]
	sbfiz	x21, x0, #2, #32
	add	x0, x8, x21
	bl	_LOCK
	ldr	x8, [sp, #8]
	ldr	x9, [x20, #32]
	ldr	x10, [x8, #16]
	str	x8, [x9, x10, lsl #3]
Lloh23:
	adrp	x8, _MANAGED@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MANAGED@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	ldr	x9, [sp, #8]
	ldr	x9, [x9, #16]
	ldp	x11, x10, [x20, #16]
	str	w8, [x10, x9, lsl #2]
	add	x0, x11, x21
	bl	_UNLOCK
	add	x21, x20, #8
	mov	x0, x21
	bl	_LOCK
	ldr	w0, [x20, #12]
	ldr	x1, [sp, #8]
Lloh26:
	adrp	x8, _link@GOTPAGE
Lloh27:
	ldr	x8, [x8, _link@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	bl	_ISC_LIST_APPEND
	mov	x0, x21
	bl	_UNLOCK
	ldr	x0, [sp, #8]
Lloh29:
	adrp	x8, _CREATION@GOTPAGE
Lloh30:
	ldr	x8, [x8, _CREATION@GOTPAGEOFF]
Lloh31:
	ldr	w2, [x8]
Lloh32:
	adrp	x8, _isc_msgcat@GOTPAGE
Lloh33:
	ldr	x8, [x8, _isc_msgcat@GOTPAGEOFF]
Lloh34:
	ldr	w3, [x8]
Lloh35:
	adrp	x8, _ISC_MSGSET_SOCKET@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ISC_MSGSET_SOCKET@GOTPAGEOFF]
Lloh37:
	ldr	w4, [x8]
Lloh38:
	adrp	x8, _ISC_MSG_CREATED@GOTPAGE
Lloh39:
	ldr	x8, [x8, _ISC_MSG_CREATED@GOTPAGEOFF]
Lloh40:
	ldr	w5, [x8]
Lloh41:
	adrp	x8, l_.str.1@PAGE
Lloh42:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh43:
	adrp	x9, l_.str@PAGE
Lloh44:
	add	x9, x9, l_.str@PAGEOFF
	cmp	x19, #0
	csel	x6, x9, x8, eq
	mov	x1, #0
	bl	_socket_log
	ldr	x23, [x24]
	b	LBB0_16
LBB0_15:
	mov	x23, x0
	ldr	w0, [x20, #40]
	ldr	x8, [sp, #8]
	ldr	x8, [x8, #40]
Lloh45:
	adrp	x9, _STATID_OPENFAIL@GOTPAGE
Lloh46:
	ldr	x9, [x9, _STATID_OPENFAIL@GOTPAGEOFF]
Lloh47:
	ldr	x9, [x9]
	ldr	w1, [x8, x9, lsl #2]
	bl	_inc_stats
	add	x0, sp, #8
	bl	_free_socket
LBB0_16:
	mov	x0, x23
	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	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.comm	_isc_sockettype_fdwatch,4,2     ; @isc_sockettype_fdwatch
	.comm	_ISC_R_SUCCESS,8,3              ; @ISC_R_SUCCESS
	.comm	_AF_INET,4,2                    ; @AF_INET
	.comm	_upd4statsindex,8,3             ; @upd4statsindex
	.comm	_upd6statsindex,8,3             ; @upd6statsindex
	.comm	_tcp4statsindex,8,3             ; @tcp4statsindex
	.comm	_tcp6statsindex,8,3             ; @tcp6statsindex
	.comm	_unixstatsindex,8,3             ; @unixstatsindex
	.comm	_STATID_OPENFAIL,8,3            ; @STATID_OPENFAIL
	.comm	_socketmethods,4,2              ; @socketmethods
	.comm	_MANAGED,4,2                    ; @MANAGED
	.comm	_link,4,2                       ; @link
	.comm	_CREATION,4,2                   ; @CREATION
	.comm	_isc_msgcat,4,2                 ; @isc_msgcat
	.comm	_ISC_MSGSET_SOCKET,4,2          ; @ISC_MSGSET_SOCKET
	.comm	_ISC_MSG_CREATED,4,2            ; @ISC_MSG_CREATED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dupped"

l_.str.1:                               ; @.str.1
	.asciz	"created"

	.no_dead_strip	_socket_create
.subsections_via_symbols
