	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function srpt_get_desc_tbl
_srpt_get_desc_tbl:                     ## @srpt_get_desc_tbl
	.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	%r9, -56(%rbp)                  ## 8-byte Spill
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r13
	movq	%rdx, %rbx
	movq	%rsi, %r12
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	24(%rbp), %r15d
	movq	16(%rbp), %r14
	xorl	%edi, %edi
	testq	%rcx, %rcx
	sete	%dil
	callq	_BUG_ON
	xorl	%edi, %edi
	testq	%r14, %r14
	sete	%dil
	callq	_BUG_ON
	movl	(%rbx), %ecx
	cmpl	$16, %ecx
	jae	LBB0_1
## %bb.2:
	movq	_DMA_NONE@GOTPCREL(%rip), %rax
	testb	$15, %cl
	jne	LBB0_4
	jmp	LBB0_5
LBB0_1:
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	testb	$15, %cl
	je	LBB0_5
LBB0_4:
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	movl	%eax, (%r13)
	movl	%eax, 16(%r12)
	movl	(%rbx), %eax
	movl	%eax, %ecx
	andl	$15, %ecx
	movq	_SRP_DATA_DESC_DIRECT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	cmpl	%edx, %ecx
	je	LBB0_7
## %bb.6:
	sarl	$4, %eax
	cmpl	%edx, %eax
	jne	LBB0_8
LBB0_7:
	movq	%rbx, %rdi
	callq	_srpt_get_desc_buf
	movq	%rax, %rbx
	movl	(%rax), %edi
	callq	_be32_to_cpu
	movl	%eax, (%r14)
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	$1, %edx
LBB0_13:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_srpt_alloc_rw_ctxs             ## TAILCALL
LBB0_8:
	movq	_SRP_DATA_DESC_INDIRECT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	cmpl	%edx, %ecx
	je	LBB0_10
## %bb.9:
	cmpl	%edx, %eax
	je	LBB0_10
## %bb.14:
	movq	_SRP_DATA_DESC_IMM@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_25
## %bb.15:
	movq	%rbx, %rdi
	callq	_srpt_get_desc_buf
	movq	%rax, %r13
	movl	(%rax), %edi
	callq	_be32_to_cpu
	movl	%eax, %edx
	addl	%r15d, %edx
	movq	_srp_max_req_size@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %edx
	jle	LBB0_17
## %bb.16:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r15d, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_21
LBB0_10:
	movq	%rbx, %rdi
	callq	_srpt_get_desc_buf
	movq	%rax, %r15
	movl	12(%rax), %edi
	callq	_be32_to_cpu
	movl	%eax, %r13d
	sarl	$2, %r13d
	movl	4(%rbx), %ecx
	movl	8(%rbx), %edx
	leal	(%rdx,%rcx), %eax
	cmpl	%eax, %r13d
	jle	LBB0_12
## %bb.11:
	movl	12(%r15), %edi
	movq	%rcx, %r14
	movq	%rdx, %r15
	callq	_be32_to_cpu
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	movl	$4, %r8d
	movl	%r14d, %esi
	movl	%r15d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_pr_err
LBB0_21:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_27
LBB0_25:
	movl	$0, (%r14)
LBB0_26:
	xorl	%ebx, %ebx
LBB0_27:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movl	8(%r15), %edi
	callq	_be32_to_cpu
	movl	%eax, (%r14)
	movq	(%r15), %rsi
	movq	%r12, %rdi
	movl	%r13d, %edx
	jmp	LBB0_13
LBB0_17:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	(%rdi), %esi
	cmpl	%edx, %esi
	jge	LBB0_19
## %bb.18:
	leaq	L_.str.2(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pr_err
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_27
LBB0_19:
	movslq	%r15d, %rcx
	addq	%rcx, %rbx
	addq	$4, %r13
	cmpq	%rbx, %r13
	jbe	LBB0_22
## %bb.20:
	leaq	L_.str.3(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_21
LBB0_22:
	movl	%eax, (%r14)
	movq	%rdi, 8(%r12)
	movq	%rbx, %rcx
	shlq	$55, %rcx
	je	LBB0_24
## %bb.23:
	leaq	L_.str.4(%rip), %rdi
	callq	_pr_warn_once
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_27
LBB0_24:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_sg_init_one
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r12, (%rax)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_DMA_NONE,4,2                   ## @DMA_NONE
	.comm	_SRP_DATA_DESC_DIRECT,4,2       ## @SRP_DATA_DESC_DIRECT
	.comm	_SRP_DATA_DESC_INDIRECT,4,2     ## @SRP_DATA_DESC_INDIRECT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"received unsupported SRP_CMD request type (%u out + %u in != %u / %zu)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SRP_DATA_DESC_IMM,4,2          ## @SRP_DATA_DESC_IMM
	.comm	_srp_max_req_size,4,2           ## @srp_max_req_size
L_.str.1:                               ## @.str.1
	.asciz	"Immediate data (length %d + %d) exceeds request size %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Received too few data - %d < %d\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.3:                               ## @.str.3
	.asciz	"Received invalid write request\n"

L_.str.4:                               ## @.str.4
	.asciz	"Internal error - the receive buffers are not aligned properly.\n"

	.no_dead_strip	_srpt_get_desc_tbl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function srpt_get_desc_tbl
_srpt_get_desc_tbl:                     ; @srpt_get_desc_tbl
	.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	x24, x7
	mov	x22, x6
	mov	x19, x5
	mov	x20, x4
	mov	x26, x3
	mov	x23, x2
	mov	x21, x1
	mov	x25, x0
	cmp	x3, #0
	cset	w0, eq
	bl	_BUG_ON
	cmp	x22, #0
	cset	w0, eq
	bl	_BUG_ON
Lloh0:
	adrp	x8, _DMA_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_NONE@GOTPAGEOFF]
Lloh2:
	adrp	x9, _DMA_TO_DEVICE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DMA_TO_DEVICE@GOTPAGEOFF]
	ldr	w10, [x23]
	cmp	w10, #16
	csel	x8, x8, x9, lo
Lloh4:
	adrp	x9, _DMA_FROM_DEVICE@GOTPAGE
Lloh5:
	ldr	x9, [x9, _DMA_FROM_DEVICE@GOTPAGEOFF]
	tst	w10, #0xf
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
	str	w8, [x26]
	str	w8, [x21, #16]
	ldr	w8, [x23]
	and	w9, w8, #0xf
Lloh6:
	adrp	x10, _SRP_DATA_DESC_DIRECT@GOTPAGE
Lloh7:
	ldr	x10, [x10, _SRP_DATA_DESC_DIRECT@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	cmp	w9, w10
	asr	w8, w8, #4
	ccmp	w8, w10, #4, ne
	b.ne	LBB0_3
; %bb.1:
	mov	x0, x23
	bl	_srpt_get_desc_buf
	mov	x23, x0
	ldr	w0, [x0]
	bl	_be32_to_cpu
	str	w0, [x22]
	mov	x0, x21
	mov	x1, x23
	mov	w2, #1
LBB0_2:
	mov	x3, x20
	mov	x4, 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
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_srpt_alloc_rw_ctxs
LBB0_3:
Lloh9:
	adrp	x10, _SRP_DATA_DESC_INDIRECT@GOTPAGE
Lloh10:
	ldr	x10, [x10, _SRP_DATA_DESC_INDIRECT@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	cmp	w9, w10
	ccmp	w8, w10, #4, ne
	b.ne	LBB0_6
; %bb.4:
	mov	x0, x23
	bl	_srpt_get_desc_buf
	mov	x24, x0
	ldr	w0, [x0, #12]
	bl	_be32_to_cpu
	asr	w25, w0, #2
	ldp	w26, w23, [x23, #4]
	add	w8, w23, w26
	cmp	w25, w8
	b.le	LBB0_12
; %bb.5:
	ldr	w0, [x24, #12]
	bl	_be32_to_cpu
                                        ; kill: def $w0 killed $w0 def $x0
	mov	w8, #4
	stp	x0, x8, [sp, #16]
	stp	x26, x23, [sp]
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_9
LBB0_6:
Lloh14:
	adrp	x9, _SRP_DATA_DESC_IMM@GOTPAGE
Lloh15:
	ldr	x9, [x9, _SRP_DATA_DESC_IMM@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_13
; %bb.7:
	mov	x0, x23
	bl	_srpt_get_desc_buf
	mov	x26, x0
	ldr	w0, [x0]
	bl	_be32_to_cpu
	mov	x2, x0
Lloh17:
	adrp	x8, _srp_max_req_size@GOTPAGE
Lloh18:
	ldr	x8, [x8, _srp_max_req_size@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x8]
	add	w8, w0, w24
	cmp	w8, w9
	b.le	LBB0_15
; %bb.8:
	stp	x2, x9, [sp, #8]
	str	x24, [sp]
Lloh20:
	adrp	x0, l_.str.1@PAGE
Lloh21:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_9:
	bl	_pr_err
LBB0_10:
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_14
LBB0_12:
	ldr	w0, [x24, #8]
	bl	_be32_to_cpu
	str	w0, [x22]
	ldr	x1, [x24]
	mov	x0, x21
	mov	x2, x25
	b	LBB0_2
LBB0_13:
	mov	w0, #0
	str	wzr, [x22]
LBB0_14:
	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
LBB0_15:
	ldr	w9, [x25]
	cmp	w9, w8
	b.ge	LBB0_17
; %bb.16:
	stp	x9, x8, [sp]
Lloh24:
	adrp	x0, l_.str.2@PAGE
Lloh25:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_err
Lloh26:
	adrp	x8, _EIO@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_11
LBB0_17:
	add	x1, x23, w24, sxtw
	add	x8, x26, #4
	cmp	x8, x1
	b.ls	LBB0_19
; %bb.18:
Lloh28:
	adrp	x0, l_.str.3@PAGE
Lloh29:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_9
LBB0_19:
	str	w2, [x22]
	str	x25, [x21, #8]
	tst	x1, #0x1ff
	b.eq	LBB0_21
; %bb.20:
Lloh30:
	adrp	x0, l_.str.4@PAGE
Lloh31:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_pr_warn_once
	b	LBB0_10
LBB0_21:
	mov	x0, x21
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_sg_init_one
	mov	w0, #0
	str	x21, [x20]
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_DMA_NONE,4,2                   ; @DMA_NONE
	.comm	_SRP_DATA_DESC_DIRECT,4,2       ; @SRP_DATA_DESC_DIRECT
	.comm	_SRP_DATA_DESC_INDIRECT,4,2     ; @SRP_DATA_DESC_INDIRECT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"received unsupported SRP_CMD request type (%u out + %u in != %u / %zu)\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SRP_DATA_DESC_IMM,4,2          ; @SRP_DATA_DESC_IMM
	.comm	_srp_max_req_size,4,2           ; @srp_max_req_size
l_.str.1:                               ; @.str.1
	.asciz	"Immediate data (length %d + %d) exceeds request size %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Received too few data - %d < %d\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.3:                               ; @.str.3
	.asciz	"Received invalid write request\n"

l_.str.4:                               ; @.str.4
	.asciz	"Internal error - the receive buffers are not aligned properly.\n"

	.no_dead_strip	_srpt_get_desc_tbl
.subsections_via_symbols
