	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ocelot_pinmux_set_mux
_ocelot_pinmux_set_mux:                 ## @ocelot_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
	pushq	%rax
	.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, %r14d
	callq	_pinctrl_dev_get_drvdata
	movq	%rax, %r12
	movq	8(%rax), %rax
	movq	(%rax), %rax
	movl	%ebx, %ecx
	movq	(%rax,%rcx,8), %r15
	movl	(%r15), %r13d
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%r14d, %edx
	callq	_ocelot_pin_function_idx
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%eax, %r14d
	leal	31(%r13), %eax
	testl	%r13d, %r13d
	cmovnsl	%r13d, %eax
	andl	$-32, %eax
	subl	%eax, %r13d
	movl	(%r12), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	(%r15), %edx
	xorl	%edi, %edi
	movq	%r12, %rsi
	callq	_REG_ALT
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%r13d, %edi
	callq	_BIT
	movl	%r14d, %ebx
	movl	%r13d, %ecx
	shll	%cl, %ebx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %edx
	movl	%ebx, %ecx
	callq	_regmap_update_bits
	movl	(%r12), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	(%r15), %edx
	movl	$1, %edi
	movq	%r12, %rsi
	callq	_REG_ALT
	movl	%eax, %ebx
	movl	%r13d, %edi
	callq	_BIT
	leal	-1(%r13), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r14d
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%ebx, %esi
	movl	%eax, %edx
	movl	%r14d, %ecx
	callq	_regmap_update_bits
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ocelot_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 ocelot_pinmux_set_mux
_ocelot_pinmux_set_mux:                 ; @ocelot_pinmux_set_mux
	.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	x20, x2
	mov	x21, x1
	bl	_pinctrl_dev_get_drvdata
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	ldr	x24, [x8, w20, uxtw #3]
	ldr	w22, [x24]
	mov	x1, x20
	mov	x2, x21
	bl	_ocelot_pin_function_idx
	tbnz	w0, #31, LBB0_2
; %bb.1:
	mov	x20, x0
	negs	w8, w22
	and	w8, w8, #0x1f
	and	w9, w22, #0x1f
	csneg	w21, w9, w8, mi
	ldr	w22, [x19]
	ldr	w2, [x24]
	mov	w0, #0
	mov	x1, x19
	bl	_REG_ALT
	mov	x23, x0
	mov	x0, x21
	bl	_BIT
	mov	x2, x0
	lsl	w3, w20, w21
	mov	x0, x22
	mov	x1, x23
	bl	_regmap_update_bits
	ldr	w22, [x19]
	ldr	w2, [x24]
	mov	w0, #1
	mov	x1, x19
	bl	_REG_ALT
	mov	x19, x0
	mov	x0, x21
	bl	_BIT
	mov	x2, x0
	sub	w8, w21, #1
	lsl	w3, w20, w8
	mov	x0, x22
	mov	x1, x19
	bl	_regmap_update_bits
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ocelot_pinmux_set_mux
.subsections_via_symbols
