	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bm1880_pinmux_set_mux
_bm1880_pinmux_set_mux:                 ## @bm1880_pinmux_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movl	%esi, %r15d
	callq	_pinctrl_dev_get_drvdata
	movq	%rax, %r14
	movq	16(%rax), %rax
	movl	%ebx, %ecx
	shlq	$4, %rcx
	cmpl	$0, (%rax,%rcx)
	jle	LBB0_3
## %bb.1:
	leaq	(%rax,%rcx), %rdx
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movl	%r15d, %edx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	8(%r14), %rdx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	addq	%rcx, %rax
	addq	$8, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	movq	_BM1880_REG_MUX@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	(%rax,%r12,4), %ebx
	leal	(%rbx,%rbx), %r15d
	andl	$-4, %r15d
	shll	$4, %ebx
	movl	(%r13), %edi
	addl	(%r14), %edi
	addl	%r15d, %edi
	callq	_readl_relaxed
	andb	$16, %bl
	orb	$4, %bl
	movl	$3, %edx
	movl	%ebx, %ecx
	shll	%cl, %edx
	notl	%edx
	andl	%eax, %edx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx,%rax,4), %edi
	movl	%ebx, %ecx
	shll	%cl, %edi
	orl	%edx, %edi
	addl	(%r14), %r15d
	addl	(%r13), %r15d
	movl	%r15d, %esi
	callq	_writel_relaxed
	incq	%r12
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movslq	(%rax), %rax
	cmpq	%rax, %r12
	jl	LBB0_2
LBB0_3:
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BM1880_REG_MUX,4,2             ## @BM1880_REG_MUX
	.no_dead_strip	_bm1880_pinmux_set_mux
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bm1880_pinmux_set_mux
_bm1880_pinmux_set_mux:                 ; @bm1880_pinmux_set_mux
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x2
	mov	x20, x1
	bl	_pinctrl_dev_get_drvdata
	ldr	x8, [x0, #16]
	add	x22, x8, w21, uxtw #4
	ldr	w9, [x22]
	cmp	w9, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x19, x0
	mov	x23, #0
	mov	w9, w21
	mov	w20, w20
	ldr	x21, [x0, #8]
	add	x8, x8, x9, lsl #4
	add	x24, x8, #8
Lloh0:
	adrp	x25, _BM1880_REG_MUX@GOTPAGE
Lloh1:
	ldr	x25, [x25, _BM1880_REG_MUX@GOTPAGEOFF]
	mov	w26, #3
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	ldr	w8, [x8, x23, lsl #2]
	lsl	w9, w8, #1
	and	w27, w9, #0xfffffffc
	mov	w28, #4
	bfi	w28, w8, #4, #1
	ldr	w8, [x19]
	ldr	w9, [x25]
	add	w8, w9, w8
	add	w0, w8, w27
	bl	_readl_relaxed
	lsl	w8, w26, w28
	bic	w8, w0, w8
	ldr	w9, [x21, x20, lsl #2]
	lsl	w9, w9, w28
	orr	w0, w8, w9
	ldr	w8, [x19]
	ldr	w9, [x25]
	add	w8, w8, w27
	add	w1, w8, w9
	bl	_writel_relaxed
	add	x23, x23, #1
	ldrsw	x8, [x22]
	cmp	x23, x8
	b.lt	LBB0_2
LBB0_3:
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_BM1880_REG_MUX,4,2             ; @BM1880_REG_MUX
	.no_dead_strip	_bm1880_pinmux_set_mux
.subsections_via_symbols
