	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tb10x_pctl_set_mux
_tb10x_pctl_set_mux:                    ## @tb10x_pctl_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, %r14d
	callq	_pinctrl_dev_get_drvdata
	movq	%rax, %r13
	movq	24(%rax), %r15
	movl	%r14d, %r14d
	shlq	$5, %r14
	movq	%rax, %rdi
	callq	_mutex_lock
	movq	8(%r13), %rax
	movq	(%r15,%r14), %rsi
	movq	%rsi, %rcx
	shlq	$4, %rcx
	cmpq	$0, 8(%rax,%rcx)
	je	LBB0_3
## %bb.1:
	movq	(%rax,%rcx), %rax
	cmpq	8(%r15,%r14), %rax
	jne	LBB0_2
LBB0_3:
	leaq	(%r15,%r14), %rbx
	cmpl	$0, 16(%r15,%r14)
	jle	LBB0_8
## %bb.4:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	leaq	(%r15,%r14), %rbx
	addq	$16, %rbx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rax
	movl	(%rax,%r12,4), %edi
	movl	16(%r13), %esi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_2
## %bb.5:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%r12
	movslq	(%rbx), %rax
	cmpq	%rax, %r12
	jl	LBB0_6
## %bb.7:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rsi
LBB0_8:
	movq	8(%r15,%r14), %rdx
	movq	%r13, %rdi
	callq	_tb10x_pinctrl_set_config
	movq	8(%r13), %rax
	movq	(%rbx), %rcx
	shlq	$4, %rcx
	incq	8(%rax,%rcx)
	movq	%r13, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_2:
	movq	%r13, %rdi
	callq	_mutex_unlock
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_tb10x_pctl_set_mux
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tb10x_pctl_set_mux
_tb10x_pctl_set_mux:                    ; @tb10x_pctl_set_mux
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x2
	bl	_pinctrl_dev_get_drvdata
	mov	x19, x0
	ldr	x21, [x0, #24]
	mov	w22, w20
	add	x20, x21, x22, lsl #5
	bl	_mutex_lock
	ldr	x8, [x19, #8]
	ldr	x1, [x20]
	add	x9, x8, x1, lsl #4
	ldr	x9, [x9, #8]
	cbz	x9, LBB0_2
; %bb.1:
	lsl	x9, x1, #4
	ldr	x8, [x8, x9]
	ldr	x9, [x20, #8]
	cmp	x8, x9
	b.ne	LBB0_8
LBB0_2:
	mov	x23, x20
	ldr	w8, [x23, #16]!
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.3:
	mov	x24, #0
	add	x8, x21, x22, lsl #5
	add	x25, x8, #24
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25]
	ldr	w0, [x8, x24, lsl #2]
	ldr	w1, [x19, #16]
	bl	_test_bit
	cbnz	x0, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x23]
	cmp	x24, x8
	b.lt	LBB0_4
; %bb.6:
	ldr	x1, [x20]
LBB0_7:
	add	x8, x21, x22, lsl #5
	ldr	x2, [x8, #8]
	mov	x0, x19
	bl	_tb10x_pinctrl_set_config
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	add	x8, x8, x9, lsl #4
	ldr	x9, [x8, #8]
	add	x9, x9, #1
	str	x9, [x8, #8]
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_9
LBB0_8:
	mov	x0, x19
	bl	_mutex_unlock
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_tb10x_pctl_set_mux
.subsections_via_symbols
