	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dma40_config_to_halfchannel
_dma40_config_to_halfchannel:           ## @dma40_config_to_halfchannel
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edx, %ebx
	movq	%rsi, %r14
	callq	_chan_is_logical
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	cmpl	$15, %ebx
	jle	LBB0_3
## %bb.2:
	movq	_STEDMA40_PSIZE_LOG_16@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_8:
	cmpl	$15, %ebx
	jle	LBB0_10
## %bb.9:
	movq	_STEDMA40_PSIZE_PHY_16@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_3:
	cmpl	$7, %ebx
	jle	LBB0_5
## %bb.4:
	movq	_STEDMA40_PSIZE_LOG_8@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_10:
	cmpl	$7, %ebx
	jle	LBB0_12
## %bb.11:
	movq	_STEDMA40_PSIZE_PHY_8@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_5:
	cmpl	$4, %ebx
	jl	LBB0_6
## %bb.7:
	movq	_STEDMA40_PSIZE_LOG_4@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_12:
	cmpl	$4, %ebx
	jl	LBB0_13
## %bb.14:
	movq	_STEDMA40_PSIZE_PHY_4@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_6:
	movq	_STEDMA40_PSIZE_LOG_1@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_13:
	movq	_STEDMA40_PSIZE_PHY_1@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movq	_STEDMA40_NO_FLOW_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STEDMA40_PSIZE_LOG_16,4,2      ## @STEDMA40_PSIZE_LOG_16
	.comm	_STEDMA40_PSIZE_LOG_8,4,2       ## @STEDMA40_PSIZE_LOG_8
	.comm	_STEDMA40_PSIZE_LOG_4,4,2       ## @STEDMA40_PSIZE_LOG_4
	.comm	_STEDMA40_PSIZE_LOG_1,4,2       ## @STEDMA40_PSIZE_LOG_1
	.comm	_STEDMA40_PSIZE_PHY_16,4,2      ## @STEDMA40_PSIZE_PHY_16
	.comm	_STEDMA40_PSIZE_PHY_8,4,2       ## @STEDMA40_PSIZE_PHY_8
	.comm	_STEDMA40_PSIZE_PHY_4,4,2       ## @STEDMA40_PSIZE_PHY_4
	.comm	_STEDMA40_PSIZE_PHY_1,4,2       ## @STEDMA40_PSIZE_PHY_1
	.comm	_STEDMA40_NO_FLOW_CTRL,4,2      ## @STEDMA40_NO_FLOW_CTRL
	.no_dead_strip	_dma40_config_to_halfchannel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dma40_config_to_halfchannel
_dma40_config_to_halfchannel:           ; @dma40_config_to_halfchannel
	.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, x2
	mov	x20, x1
	bl	_chan_is_logical
Lloh0:
	adrp	x8, _STEDMA40_PSIZE_PHY_16@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STEDMA40_PSIZE_PHY_16@GOTPAGEOFF]
Lloh2:
	adrp	x9, _STEDMA40_PSIZE_PHY_8@GOTPAGE
Lloh3:
	ldr	x9, [x9, _STEDMA40_PSIZE_PHY_8@GOTPAGEOFF]
Lloh4:
	adrp	x10, _STEDMA40_PSIZE_PHY_1@GOTPAGE
Lloh5:
	ldr	x10, [x10, _STEDMA40_PSIZE_PHY_1@GOTPAGEOFF]
Lloh6:
	adrp	x11, _STEDMA40_PSIZE_PHY_4@GOTPAGE
Lloh7:
	ldr	x11, [x11, _STEDMA40_PSIZE_PHY_4@GOTPAGEOFF]
	cmp	w19, #3
	csel	x10, x11, x10, gt
	cmp	w19, #7
	csel	x9, x9, x10, gt
	cmp	w19, #15
Lloh8:
	adrp	x10, _STEDMA40_PSIZE_LOG_16@GOTPAGE
Lloh9:
	ldr	x10, [x10, _STEDMA40_PSIZE_LOG_16@GOTPAGEOFF]
Lloh10:
	adrp	x11, _STEDMA40_PSIZE_LOG_8@GOTPAGE
Lloh11:
	ldr	x11, [x11, _STEDMA40_PSIZE_LOG_8@GOTPAGEOFF]
Lloh12:
	adrp	x12, _STEDMA40_PSIZE_LOG_1@GOTPAGE
Lloh13:
	ldr	x12, [x12, _STEDMA40_PSIZE_LOG_1@GOTPAGEOFF]
	csel	x8, x8, x9, gt
Lloh14:
	adrp	x9, _STEDMA40_PSIZE_LOG_4@GOTPAGE
Lloh15:
	ldr	x9, [x9, _STEDMA40_PSIZE_LOG_4@GOTPAGEOFF]
	cmp	w19, #3
	csel	x9, x9, x12, gt
	cmp	w19, #7
	csel	x9, x11, x9, gt
	cmp	w19, #15
	csel	x9, x10, x9, gt
	cmp	x0, #0
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
	str	w8, [x20]
Lloh16:
	adrp	x8, _STEDMA40_NO_FLOW_CTRL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _STEDMA40_NO_FLOW_CTRL@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [x20, #4]
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_STEDMA40_PSIZE_LOG_16,4,2      ; @STEDMA40_PSIZE_LOG_16
	.comm	_STEDMA40_PSIZE_LOG_8,4,2       ; @STEDMA40_PSIZE_LOG_8
	.comm	_STEDMA40_PSIZE_LOG_4,4,2       ; @STEDMA40_PSIZE_LOG_4
	.comm	_STEDMA40_PSIZE_LOG_1,4,2       ; @STEDMA40_PSIZE_LOG_1
	.comm	_STEDMA40_PSIZE_PHY_16,4,2      ; @STEDMA40_PSIZE_PHY_16
	.comm	_STEDMA40_PSIZE_PHY_8,4,2       ; @STEDMA40_PSIZE_PHY_8
	.comm	_STEDMA40_PSIZE_PHY_4,4,2       ; @STEDMA40_PSIZE_PHY_4
	.comm	_STEDMA40_PSIZE_PHY_1,4,2       ; @STEDMA40_PSIZE_PHY_1
	.comm	_STEDMA40_NO_FLOW_CTRL,4,2      ; @STEDMA40_NO_FLOW_CTRL
	.no_dead_strip	_dma40_config_to_halfchannel
.subsections_via_symbols
