	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad1938_set_tdm_slot
_ad1938_set_tdm_slot:                   ## @ad1938_set_tdm_slot
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movq	(%rdi), %r15
	movq	_AD1938_DAC_CTRL1@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	*(%r15)
	movl	%eax, %r14d
	movq	_AD1938_ADC_CTRL2@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	*(%r15)
	addl	$-2, %ebx
	rorl	%ebx
	cmpl	$8, %ebx
	jae	LBB0_1
## %bb.2:
	movl	$139, %ecx
	btl	%ebx, %ecx
	jb	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_4
LBB0_3:
	movq	_AD1938_DAC_CHAN_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, %r14d
	movslq	%ebx, %rcx
	leaq	l_switch.table.ad1938_set_tdm_slot(%rip), %rdx
	movq	(%rdx,%rcx,8), %rdx
	leaq	l_switch.table.ad1938_set_tdm_slot.1(%rip), %rsi
	movq	(%rsi,%rcx,8), %rsi
	movl	(%rdx), %edx
	movq	_AD1938_DAC_CHAN_SHFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	movq	_AD1938_ADC_CHAN_SHFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movq	_AD1938_ADC_CHAN_MASK@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	notl	%edi
	movl	(%rsi), %ebx
	shll	%cl, %ebx
	andl	%edi, %eax
	orl	%r14d, %edx
	orl	%eax, %ebx
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	*8(%r15)
	movl	(%r13), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	*8(%r15)
	xorl	%eax, %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AD1938_DAC_CTRL1,4,2           ## @AD1938_DAC_CTRL1
	.comm	_AD1938_ADC_CTRL2,4,2           ## @AD1938_ADC_CTRL2
	.comm	_AD1938_DAC_CHAN_MASK,4,2       ## @AD1938_DAC_CHAN_MASK
	.comm	_AD1938_ADC_CHAN_MASK,4,2       ## @AD1938_ADC_CHAN_MASK
	.comm	_AD1938_DAC_2_CHANNELS,4,2      ## @AD1938_DAC_2_CHANNELS
	.comm	_AD1938_DAC_CHAN_SHFT,4,2       ## @AD1938_DAC_CHAN_SHFT
	.comm	_AD1938_ADC_2_CHANNELS,4,2      ## @AD1938_ADC_2_CHANNELS
	.comm	_AD1938_ADC_CHAN_SHFT,4,2       ## @AD1938_ADC_CHAN_SHFT
	.comm	_AD1938_DAC_4_CHANNELS,4,2      ## @AD1938_DAC_4_CHANNELS
	.comm	_AD1938_ADC_4_CHANNELS,4,2      ## @AD1938_ADC_4_CHANNELS
	.comm	_AD1938_DAC_8_CHANNELS,4,2      ## @AD1938_DAC_8_CHANNELS
	.comm	_AD1938_ADC_8_CHANNELS,4,2      ## @AD1938_ADC_8_CHANNELS
	.comm	_AD1938_DAC_16_CHANNELS,4,2     ## @AD1938_DAC_16_CHANNELS
	.comm	_AD1938_ADC_16_CHANNELS,4,2     ## @AD1938_ADC_16_CHANNELS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ad1938_set_tdm_slot
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.ad1938_set_tdm_slot
l_switch.table.ad1938_set_tdm_slot:
	.quad	_AD1938_DAC_2_CHANNELS
	.quad	_AD1938_DAC_4_CHANNELS
	.quad	_AD1938_DAC_2_CHANNELS
	.quad	_AD1938_DAC_8_CHANNELS
	.quad	_AD1938_DAC_2_CHANNELS
	.quad	_AD1938_DAC_2_CHANNELS
	.quad	_AD1938_DAC_2_CHANNELS
	.quad	_AD1938_DAC_16_CHANNELS

	.p2align	3                               ## @switch.table.ad1938_set_tdm_slot.1
l_switch.table.ad1938_set_tdm_slot.1:
	.quad	_AD1938_ADC_2_CHANNELS
	.quad	_AD1938_ADC_4_CHANNELS
	.quad	_AD1938_ADC_2_CHANNELS
	.quad	_AD1938_ADC_8_CHANNELS
	.quad	_AD1938_ADC_2_CHANNELS
	.quad	_AD1938_ADC_2_CHANNELS
	.quad	_AD1938_ADC_2_CHANNELS
	.quad	_AD1938_ADC_16_CHANNELS

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad1938_set_tdm_slot
_ad1938_set_tdm_slot:                   ; @ad1938_set_tdm_slot
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x3
	ldr	x19, [x0]
	ldr	x8, [x19]
Lloh0:
	adrp	x22, _AD1938_DAC_CTRL1@GOTPAGE
Lloh1:
	ldr	x22, [x22, _AD1938_DAC_CTRL1@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	blr	x8
	mov	x20, x0
	ldr	x8, [x19]
Lloh2:
	adrp	x23, _AD1938_ADC_CTRL2@GOTPAGE
Lloh3:
	ldr	x23, [x23, _AD1938_ADC_CTRL2@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	blr	x8
	sub	w8, w21, #2
	ror	w8, w8, #1
	cmp	w8, #8
	b.hs	LBB0_2
; %bb.1:
	mov	w9, #139
	lsr	w9, w9, w8
	tbnz	w9, #0, LBB0_3
LBB0_2:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_4
LBB0_3:
Lloh7:
	adrp	x9, _AD1938_DAC_CHAN_MASK@GOTPAGE
Lloh8:
	ldr	x9, [x9, _AD1938_DAC_CHAN_MASK@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	bic	w9, w20, w9
Lloh10:
	adrp	x10, _AD1938_ADC_CHAN_MASK@GOTPAGE
Lloh11:
	ldr	x10, [x10, _AD1938_ADC_CHAN_MASK@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	bic	w10, w0, w10
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	sbfiz	x8, x8, #3, #32
Lloh13:
	adrp	x11, l_switch.table.ad1938_set_tdm_slot@PAGE
Lloh14:
	add	x11, x11, l_switch.table.ad1938_set_tdm_slot@PAGEOFF
	ldr	x11, [x11, x8]
Lloh15:
	adrp	x12, l_switch.table.ad1938_set_tdm_slot.1@PAGE
Lloh16:
	add	x12, x12, l_switch.table.ad1938_set_tdm_slot.1@PAGEOFF
	ldr	x8, [x12, x8]
Lloh17:
	adrp	x12, _AD1938_DAC_CHAN_SHFT@GOTPAGE
Lloh18:
	ldr	x12, [x12, _AD1938_DAC_CHAN_SHFT@GOTPAGEOFF]
	ldr	w11, [x11]
Lloh19:
	ldr	w12, [x12]
	lsl	w11, w11, w12
	ldr	w8, [x8]
Lloh20:
	adrp	x12, _AD1938_ADC_CHAN_SHFT@GOTPAGE
Lloh21:
	ldr	x12, [x12, _AD1938_ADC_CHAN_SHFT@GOTPAGEOFF]
Lloh22:
	ldr	w12, [x12]
	lsl	w8, w8, w12
	orr	w20, w8, w10
	orr	w2, w11, w9
	ldr	x8, [x19, #8]
	ldr	w1, [x22]
	mov	x0, x19
	blr	x8
	ldr	x8, [x19, #8]
	ldr	w1, [x23]
	mov	x0, x19
	mov	x2, x20
	blr	x8
	mov	w0, #0
LBB0_4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_AD1938_DAC_CTRL1,4,2           ; @AD1938_DAC_CTRL1
	.comm	_AD1938_ADC_CTRL2,4,2           ; @AD1938_ADC_CTRL2
	.comm	_AD1938_DAC_CHAN_MASK,4,2       ; @AD1938_DAC_CHAN_MASK
	.comm	_AD1938_ADC_CHAN_MASK,4,2       ; @AD1938_ADC_CHAN_MASK
	.comm	_AD1938_DAC_2_CHANNELS,4,2      ; @AD1938_DAC_2_CHANNELS
	.comm	_AD1938_DAC_CHAN_SHFT,4,2       ; @AD1938_DAC_CHAN_SHFT
	.comm	_AD1938_ADC_2_CHANNELS,4,2      ; @AD1938_ADC_2_CHANNELS
	.comm	_AD1938_ADC_CHAN_SHFT,4,2       ; @AD1938_ADC_CHAN_SHFT
	.comm	_AD1938_DAC_4_CHANNELS,4,2      ; @AD1938_DAC_4_CHANNELS
	.comm	_AD1938_ADC_4_CHANNELS,4,2      ; @AD1938_ADC_4_CHANNELS
	.comm	_AD1938_DAC_8_CHANNELS,4,2      ; @AD1938_DAC_8_CHANNELS
	.comm	_AD1938_ADC_8_CHANNELS,4,2      ; @AD1938_ADC_8_CHANNELS
	.comm	_AD1938_DAC_16_CHANNELS,4,2     ; @AD1938_DAC_16_CHANNELS
	.comm	_AD1938_ADC_16_CHANNELS,4,2     ; @AD1938_ADC_16_CHANNELS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ad1938_set_tdm_slot
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.ad1938_set_tdm_slot
l_switch.table.ad1938_set_tdm_slot:
	.quad	_AD1938_DAC_2_CHANNELS
	.quad	_AD1938_DAC_4_CHANNELS
	.quad	_AD1938_DAC_2_CHANNELS
	.quad	_AD1938_DAC_8_CHANNELS
	.quad	_AD1938_DAC_2_CHANNELS
	.quad	_AD1938_DAC_2_CHANNELS
	.quad	_AD1938_DAC_2_CHANNELS
	.quad	_AD1938_DAC_16_CHANNELS

	.p2align	3                               ; @switch.table.ad1938_set_tdm_slot.1
l_switch.table.ad1938_set_tdm_slot.1:
	.quad	_AD1938_ADC_2_CHANNELS
	.quad	_AD1938_ADC_4_CHANNELS
	.quad	_AD1938_ADC_2_CHANNELS
	.quad	_AD1938_ADC_8_CHANNELS
	.quad	_AD1938_ADC_2_CHANNELS
	.quad	_AD1938_ADC_2_CHANNELS
	.quad	_AD1938_ADC_2_CHANNELS
	.quad	_AD1938_ADC_16_CHANNELS

.subsections_via_symbols
