	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sdp_sendmsg_zcopy              ## -- Begin function sdp_sendmsg_zcopy
	.p2align	4, 0x90
_sdp_sendmsg_zcopy:                     ## @sdp_sendmsg_zcopy
	.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	%rdx, %r12
	movq	%rsi, %r15
	movq	%rsi, %rdi
	callq	_sdp_sk
	movq	%rax, %r14
	movq	(%r12), %rcx
	movq	8(%r12), %rdx
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_sdp_dbg_data
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	_sdp_prf1
	cmpq	$0, 8(%r14)
	je	LBB0_2
## %bb.1:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_sdp_dbg_data
	jmp	LBB0_17
LBB0_2:
	movl	(%r14), %edi
	movq	_SOCK_REF_ZCOPY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_sock_hold
	movq	_sendmsg_zcopy_segment@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SDPSTATS_COUNTER_INC
	movq	_SDP_SRCAVAIL_ADV_TIMEOUT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r13
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	(%r12), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	-64(%rbp), %r14
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_tx_sa_reset
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	movq	%r14, %rcx
	callq	_do_sdp_sendmsg_zcopy
	movl	%eax, %ebx
	movq	(%r12), %rdx
	testq	%rdx, %rdx
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_sdp_zcopy_thresh@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jb	LBB0_7
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	testl	%ebx, %ebx
	jne	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	testq	%rdx, %rdx
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$0, (%r13)
	je	LBB0_5
## %bb.11:
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_3:
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	callq	_sdp_warn
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_7:
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_sdp_dbg_data
LBB0_12:
	movq	%r13, %rdi
	callq	_kfree
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	-48(%rbp), %r13                 ## 8-byte Reload
LBB0_13:
	subl	(%r12), %r13d
	leaq	L_.str.5(%rip), %rdx
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%ebx, %ecx
	movl	%r13d, %r8d
	xorl	%eax, %eax
	callq	_sdp_prf1
	movl	(%r14), %edi
	movq	_SOCK_REF_ZCOPY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_sock_put
	testl	%ebx, %ebx
	jns	LBB0_16
## %bb.14:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%ebx, %eax
	je	LBB0_16
## %bb.15:
	movq	_ETIME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%ebx, %eax
	jne	LBB0_17
LBB0_16:
	movl	%r13d, %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Sending iov: %p, iov_len: 0x%lx\n"

L_.str.1:                               ## @.str.1
	.asciz	"sdp_sendmsg_zcopy start"

L_.str.2:                               ## @.str.2
	.asciz	"Deadlock prevent: crossing SrcAvail\n"

	.comm	_SOCK_REF_ZCOPY,4,2             ## @SOCK_REF_ZCOPY
	.comm	_sendmsg_zcopy_segment,4,2      ## @sendmsg_zcopy_segment
	.comm	_SDP_SRCAVAIL_ADV_TIMEOUT,8,3   ## @SDP_SRCAVAIL_ADV_TIMEOUT
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.3:                               ## @.str.3
	.asciz	"Error allocating zcopy context\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_sdp_zcopy_thresh,8,3           ## @sdp_zcopy_thresh
L_.str.4:                               ## @.str.4
	.asciz	"0x%lx bytes left, switching to bcopy\n"

L_.str.5:                               ## @.str.5
	.asciz	"sdp_sendmsg_zcopy end rc: %d copied: %d"

	.comm	_ETIME,4,2                      ## @ETIME
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sdp_sendmsg_zcopy              ; -- Begin function sdp_sendmsg_zcopy
	.p2align	2
_sdp_sendmsg_zcopy:                     ; @sdp_sendmsg_zcopy
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x2
	mov	x19, x1
	mov	x0, x1
	bl	_sdp_sk
	mov	x20, x0
	ldp	x9, x8, [x21]
	stp	x8, x9, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_sdp_dbg_data
Lloh2:
	adrp	x2, l_.str.1@PAGE
Lloh3:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x1, #0
	bl	_sdp_prf1
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_sdp_dbg_data
	mov	w22, #0
	b	LBB0_16
LBB0_2:
	ldr	w0, [x20]
Lloh6:
	adrp	x24, _SOCK_REF_ZCOPY@GOTPAGE
Lloh7:
	ldr	x24, [x24, _SOCK_REF_ZCOPY@GOTPAGEOFF]
	ldr	w1, [x24]
	bl	_sock_hold
Lloh8:
	adrp	x8, _sendmsg_zcopy_segment@GOTPAGE
Lloh9:
	ldr	x8, [x8, _sendmsg_zcopy_segment@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_SDPSTATS_COUNTER_INC
Lloh11:
	adrp	x8, _SDP_SRCAVAIL_ADV_TIMEOUT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SDP_SRCAVAIL_ADV_TIMEOUT@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh14:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	w0, #4
	bl	_kmalloc
	cbz	x0, LBB0_9
; %bb.3:
	mov	x23, x0
	ldr	x25, [x21]
Lloh17:
	adrp	x26, _sdp_zcopy_thresh@GOTPAGE
Lloh18:
	ldr	x26, [x26, _sdp_zcopy_thresh@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	bl	_tx_sa_reset
	add	x3, sp, #24
	mov	x0, x19
	mov	x1, x23
	mov	x2, x21
	bl	_do_sdp_sendmsg_zcopy
	mov	x22, x0
	ldr	x8, [x21]
	ldr	x9, [x26]
	cmp	x8, #0
	ccmp	x8, x9, #2, ne
	b.lo	LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cbnz	w22, LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	cbz	x8, LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x23]
	cbz	w8, LBB0_4
; %bb.8:
	mov	w22, #0
	b	LBB0_11
LBB0_9:
Lloh19:
	adrp	x1, l_.str.3@PAGE
Lloh20:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_sdp_warn
	mov	x25, #0
Lloh21:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_12
LBB0_10:
	str	x8, [sp]
Lloh24:
	adrp	x1, l_.str.4@PAGE
Lloh25:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_sdp_dbg_data
LBB0_11:
	mov	x0, x23
	bl	_kfree
LBB0_12:
	ldr	x8, [x21]
	sub	x21, x25, x8
	stp	x22, x21, [sp]
Lloh26:
	adrp	x2, l_.str.5@PAGE
Lloh27:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x0, x19
	mov	x1, #0
	bl	_sdp_prf1
	ldr	w0, [x20]
	ldr	w1, [x24]
	bl	_sock_put
	tbz	w22, #31, LBB0_15
; %bb.13:
Lloh28:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	cmn	w22, w8
	b.eq	LBB0_15
; %bb.14:
Lloh31:
	adrp	x8, _ETIME@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ETIME@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	cmn	w22, w8
	b.ne	LBB0_16
LBB0_15:
	mov	x22, x21
LBB0_16:
	mov	x0, x22
	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
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Sending iov: %p, iov_len: 0x%lx\n"

l_.str.1:                               ; @.str.1
	.asciz	"sdp_sendmsg_zcopy start"

l_.str.2:                               ; @.str.2
	.asciz	"Deadlock prevent: crossing SrcAvail\n"

	.comm	_SOCK_REF_ZCOPY,4,2             ; @SOCK_REF_ZCOPY
	.comm	_sendmsg_zcopy_segment,4,2      ; @sendmsg_zcopy_segment
	.comm	_SDP_SRCAVAIL_ADV_TIMEOUT,8,3   ; @SDP_SRCAVAIL_ADV_TIMEOUT
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.3:                               ; @.str.3
	.asciz	"Error allocating zcopy context\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_sdp_zcopy_thresh,8,3           ; @sdp_zcopy_thresh
l_.str.4:                               ; @.str.4
	.asciz	"0x%lx bytes left, switching to bcopy\n"

l_.str.5:                               ; @.str.5
	.asciz	"sdp_sendmsg_zcopy end rc: %d copied: %d"

	.comm	_ETIME,4,2                      ; @ETIME
.subsections_via_symbols
