	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function periph_set_mux
_periph_set_mux:                        ## @periph_set_mux
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	callq	_clknode_get_softc
	movq	%rax, %rbx
	movq	_DCF_HAVE_MUX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_1
## %bb.2:
	movl	%r14d, 4(%rbx)
	movq	%rbx, %rdi
	callq	_DEVICE_LOCK
	movl	8(%rbx), %esi
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_RD4
	movq	_PERLCK_MUX_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_PERLCK_MUX_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%edi, %edx
	movl	%eax, %ecx
	shll	%cl, %edx
	notl	%edx
	andl	-20(%rbp), %edx
	movq	_DCF_IS_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%rbx), %ecx
	movq	_DCF_IS_AUDIO@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %ecx
	jne	LBB0_5
## %bb.3:
	movq	_PERLCK_AMUX_SHIFT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%esi, %ecx
	shll	%cl, %edi
	movq	_PERLCK_AMUX_DIS@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edi
	notl	%edi
	andl	%edi, %edx
	cmpl	$7, %r14d
	jg	LBB0_4
LBB0_5:
	movl	%eax, %ecx
	shll	%cl, %r14d
	jmp	LBB0_6
LBB0_1:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_7
LBB0_4:
	movl	$7, %edi
	movl	%eax, %ecx
	shll	%cl, %edi
	addl	$-8, %r14d
	movl	%esi, %ecx
	shll	%cl, %r14d
	orl	%edi, %r14d
LBB0_6:
	orl	%r14d, %edx
	movl	%edx, -20(%rbp)
	movl	8(%rbx), %esi
	movq	%rbx, %rdi
	callq	_WR4
	movq	%rbx, %rdi
	callq	_DEVICE_UNLOCK
	xorl	%eax, %eax
LBB0_7:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DCF_HAVE_MUX,4,2               ## @DCF_HAVE_MUX
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_PERLCK_MUX_MASK,4,2            ## @PERLCK_MUX_MASK
	.comm	_PERLCK_MUX_SHIFT,4,2           ## @PERLCK_MUX_SHIFT
	.comm	_DCF_IS_MASK,4,2                ## @DCF_IS_MASK
	.comm	_DCF_IS_AUDIO,4,2               ## @DCF_IS_AUDIO
	.comm	_PERLCK_AMUX_DIS,4,2            ## @PERLCK_AMUX_DIS
	.comm	_PERLCK_AMUX_SHIFT,4,2          ## @PERLCK_AMUX_SHIFT
	.no_dead_strip	_periph_set_mux
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function periph_set_mux
_periph_set_mux:                        ; @periph_set_mux
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	bl	_clknode_get_softc
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _DCF_HAVE_MUX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DCF_HAVE_MUX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.1:
	mov	x19, x0
	str	w20, [x0, #4]
	bl	_DEVICE_LOCK
	ldr	w1, [x19, #8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_RD4
Lloh3:
	adrp	x8, _PERLCK_MUX_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PERLCK_MUX_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x8]
Lloh6:
	adrp	x8, _PERLCK_MUX_SHIFT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PERLCK_MUX_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	lsl	w10, w9, w8
	ldr	w11, [sp, #12]
	bic	w10, w11, w10
	ldr	w11, [x19]
Lloh9:
	adrp	x12, _DCF_IS_MASK@GOTPAGE
Lloh10:
	ldr	x12, [x12, _DCF_IS_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w12, [x12]
	and	w11, w12, w11
Lloh12:
	adrp	x12, _DCF_IS_AUDIO@GOTPAGE
Lloh13:
	ldr	x12, [x12, _DCF_IS_AUDIO@GOTPAGEOFF]
Lloh14:
	ldr	w12, [x12]
	cmp	w11, w12
	b.ne	LBB0_5
; %bb.2:
Lloh15:
	adrp	x11, _PERLCK_AMUX_DIS@GOTPAGE
Lloh16:
	ldr	x11, [x11, _PERLCK_AMUX_DIS@GOTPAGEOFF]
Lloh17:
	adrp	x12, _PERLCK_AMUX_SHIFT@GOTPAGE
Lloh18:
	ldr	x12, [x12, _PERLCK_AMUX_SHIFT@GOTPAGEOFF]
Lloh19:
	ldr	w13, [x11]
Lloh20:
	ldr	w11, [x12]
	lsl	w9, w9, w11
	orr	w9, w13, w9
	bic	w9, w10, w9
	cmp	w20, #7
	b.gt	LBB0_6
; %bb.3:
	lsl	w8, w20, w8
	orr	w2, w9, w8
	b	LBB0_7
LBB0_4:
Lloh21:
	adrp	x8, _ENXIO@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	b	LBB0_8
LBB0_5:
	lsl	w8, w20, w8
	orr	w2, w10, w8
	b	LBB0_7
LBB0_6:
	mov	w10, #7
	lsl	w8, w10, w8
	sub	w10, w20, #8
	lsl	w10, w10, w11
	orr	w8, w10, w8
	orr	w2, w8, w9
LBB0_7:
	str	w2, [sp, #12]
	ldr	w1, [x19, #8]
	mov	x0, x19
	bl	_WR4
	mov	x0, x19
	bl	_DEVICE_UNLOCK
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh19
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_DCF_HAVE_MUX,4,2               ; @DCF_HAVE_MUX
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_PERLCK_MUX_MASK,4,2            ; @PERLCK_MUX_MASK
	.comm	_PERLCK_MUX_SHIFT,4,2           ; @PERLCK_MUX_SHIFT
	.comm	_DCF_IS_MASK,4,2                ; @DCF_IS_MASK
	.comm	_DCF_IS_AUDIO,4,2               ; @DCF_IS_AUDIO
	.comm	_PERLCK_AMUX_DIS,4,2            ; @PERLCK_AMUX_DIS
	.comm	_PERLCK_AMUX_SHIFT,4,2          ; @PERLCK_AMUX_SHIFT
	.no_dead_strip	_periph_set_mux
.subsections_via_symbols
