	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdp_attach
_sdp_attach:                            ## @sdp_attach
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_sdp_sk
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	movq	%r14, %rsi
	callq	_KASSERT
	cmpq	$0, 32(%r14)
	je	LBB0_2
## %bb.1:
	cmpq	$0, 48(%r14)
	jne	LBB0_3
LBB0_2:
	movq	_sdp_sendspace@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_sdp_recvspace@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_soreserve
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_8
LBB0_3:
	movq	_SB_AUTOSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 56(%r14)
	orl	%eax, 40(%r14)
	movq	_sdp_zone@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_M_NOWAIT@GOTPCREL(%rip), %rax
	movq	_M_ZERO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_uma_zalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %rbx
	movq	%rax, %rdi
	addq	$40, %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_rw_init
	movq	%r14, 32(%rbx)
	movl	24(%r14), %edi
	callq	_crhold
	movl	%eax, 24(%rbx)
	movq	%rbx, 16(%r14)
	movq	%r14, %rdi
	callq	_sdp_init_sock
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rbx)
	movq	_TCPS_CLOSED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mbufq_init
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_SDP_LIST_WLOCK
	movq	_list@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_sdp_list@GOTPCREL(%rip), %rdi
	movq	%rbx, %rsi
	callq	_LIST_INSERT_HEAD
	movq	_sdp_count@GOTPCREL(%rip), %rax
	incl	(%rax)
	xorl	%eax, %eax
	callq	_SDP_LIST_WUNLOCK
	movq	_SO_LINGER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_8
## %bb.6:
	cmpq	$0, 8(%r14)
	jne	LBB0_8
## %bb.7:
	movq	_TCP_LINGERTIME@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r14)
	jmp	LBB0_8
LBB0_4:
	movq	_ENOBUFS@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sdp_sendspace,4,2              ## @sdp_sendspace
	.comm	_sdp_recvspace,4,2              ## @sdp_recvspace
	.comm	_SB_AUTOSIZE,4,2                ## @SB_AUTOSIZE
	.comm	_sdp_zone,4,2                   ## @sdp_zone
	.comm	_M_NOWAIT,4,2                   ## @M_NOWAIT
	.comm	_M_ZERO,4,2                     ## @M_ZERO
	.comm	_ENOBUFS,4,2                    ## @ENOBUFS
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"sdpsock"

	.comm	_TCPS_CLOSED,4,2                ## @TCPS_CLOSED
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.comm	_sdp_list,4,2                   ## @sdp_list
	.comm	_list,4,2                       ## @list
	.comm	_sdp_count,4,2                  ## @sdp_count
	.comm	_SO_LINGER,4,2                  ## @SO_LINGER
	.comm	_TCP_LINGERTIME,8,3             ## @TCP_LINGERTIME
	.no_dead_strip	_sdp_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdp_attach
_sdp_attach:                            ; @sdp_attach
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_sdp_sk
	cmp	x0, #0
	cset	w0, eq
	mov	x1, x19
	bl	_KASSERT
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x19, #48]
	cbnz	x8, LBB0_3
LBB0_2:
Lloh0:
	adrp	x8, _sdp_sendspace@GOTPAGE
Lloh1:
	ldr	x8, [x8, _sdp_sendspace@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _sdp_recvspace@GOTPAGE
Lloh4:
	ldr	x8, [x8, _sdp_recvspace@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_soreserve
	cbnz	w0, LBB0_9
LBB0_3:
Lloh6:
	adrp	x8, _SB_AUTOSIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SB_AUTOSIZE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [x19, #56]
	orr	w9, w9, w8
	str	w9, [x19, #56]
	ldr	w9, [x19, #40]
	orr	w8, w9, w8
	str	w8, [x19, #40]
Lloh9:
	adrp	x8, _sdp_zone@GOTPAGE
Lloh10:
	ldr	x8, [x8, _sdp_zone@GOTPAGEOFF]
Lloh11:
	adrp	x9, _M_NOWAIT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _M_NOWAIT@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	ldr	w8, [x9]
Lloh15:
	adrp	x9, _M_ZERO@GOTPAGE
Lloh16:
	ldr	x9, [x9, _M_ZERO@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_uma_zalloc
	cbz	x0, LBB0_7
; %bb.4:
	mov	x20, x0
	add	x0, x0, #40
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_rw_init
	str	x19, [x20, #32]
	ldr	w0, [x19, #24]
	bl	_crhold
	str	w0, [x20, #24]
	str	x20, [x19, #16]
	mov	x0, x19
	bl	_sdp_init_sock
Lloh20:
	adrp	x8, _TCPS_CLOSED@GOTPAGE
Lloh21:
	ldr	x8, [x8, _TCPS_CLOSED@GOTPAGEOFF]
	stp	xzr, xzr, [x20, #8]
Lloh22:
	ldr	w8, [x8]
	str	w8, [x20, #4]
Lloh23:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh24:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_mbufq_init
	bl	_SDP_LIST_WLOCK
Lloh26:
	adrp	x8, _list@GOTPAGE
Lloh27:
	ldr	x8, [x8, _list@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
Lloh29:
	adrp	x0, _sdp_list@GOTPAGE
Lloh30:
	ldr	x0, [x0, _sdp_list@GOTPAGEOFF]
	mov	x1, x20
	bl	_LIST_INSERT_HEAD
Lloh31:
	adrp	x8, _sdp_count@GOTPAGE
Lloh32:
	ldr	x8, [x8, _sdp_count@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	bl	_SDP_LIST_WUNLOCK
	ldr	w8, [x19]
Lloh33:
	adrp	x9, _SO_LINGER@GOTPAGE
Lloh34:
	ldr	x9, [x9, _SO_LINGER@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_8
LBB0_6:
	mov	w0, #0
	b	LBB0_9
LBB0_7:
Lloh36:
	adrp	x8, _ENOBUFS@GOTPAGE
Lloh37:
	ldr	x8, [x8, _ENOBUFS@GOTPAGEOFF]
Lloh38:
	ldr	w0, [x8]
	b	LBB0_9
LBB0_8:
	mov	w0, #0
Lloh39:
	adrp	x8, _TCP_LINGERTIME@GOTPAGE
Lloh40:
	ldr	x8, [x8, _TCP_LINGERTIME@GOTPAGEOFF]
Lloh41:
	ldr	x8, [x8]
	str	x8, [x19, #8]
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_sdp_sendspace,4,2              ; @sdp_sendspace
	.comm	_sdp_recvspace,4,2              ; @sdp_recvspace
	.comm	_SB_AUTOSIZE,4,2                ; @SB_AUTOSIZE
	.comm	_sdp_zone,4,2                   ; @sdp_zone
	.comm	_M_NOWAIT,4,2                   ; @M_NOWAIT
	.comm	_M_ZERO,4,2                     ; @M_ZERO
	.comm	_ENOBUFS,4,2                    ; @ENOBUFS
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"sdpsock"

	.comm	_TCPS_CLOSED,4,2                ; @TCPS_CLOSED
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.comm	_sdp_list,4,2                   ; @sdp_list
	.comm	_list,4,2                       ; @list
	.comm	_sdp_count,4,2                  ; @sdp_count
	.comm	_SO_LINGER,4,2                  ; @SO_LINGER
	.comm	_TCP_LINGERTIME,8,3             ; @TCP_LINGERTIME
	.no_dead_strip	_sdp_attach
.subsections_via_symbols
