	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function palmas_pinctrl_get_pin_mux
_palmas_pinctrl_get_pin_mux:            ## @palmas_pinctrl_get_pin_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
	cmpl	$0, (%rdi)
	jle	LBB0_7
## %bb.1:
	movq	%rdi, %r12
	movl	$4, %ebx
	xorl	%r13d, %r13d
	movq	_PALMAS_NONE_BASE@GOTPCREL(%rip), %rdx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r12), %rcx
	movl	%eax, (%rcx,%r13,4)
	incq	%r13
	movslq	(%r12), %rax
	addq	$6, %rbx
	cmpq	%rax, %r13
	jge	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r12), %r14
	movq	-16(%r14,%rbx,4), %rsi
	movl	$0, %eax
	cmpq	(%rdx), %rsi
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	20(%r12), %edi
	movl	(%r14,%rbx,4), %edx
	leaq	-44(%rbp), %rcx
	callq	_palmas_read
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %eax
	andl	-8(%r14,%rbx,4), %eax
	movl	%eax, -44(%rbp)
	movzbl	-4(%r14,%rbx,4), %ecx
	shrl	%cl, %eax
	movq	_PALMAS_NONE_BASE@GOTPCREL(%rip), %rdx
	jmp	LBB0_6
LBB0_7:
	xorl	%r15d, %r15d
	jmp	LBB0_8
LBB0_4:
	movl	%eax, %r15d
	movl	16(%r12), %edi
	movl	(%r14,%rbx,4), %edx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %ecx
	callq	_dev_err
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PALMAS_NONE_BASE,8,3           ## @PALMAS_NONE_BASE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mux_reg 0x%02x read failed: %d\n"

	.no_dead_strip	_palmas_pinctrl_get_pin_mux
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function palmas_pinctrl_get_pin_mux
_palmas_pinctrl_get_pin_mux:            ; @palmas_pinctrl_get_pin_mux
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x19, x0
	mov	x21, #0
	mov	x22, #0
Lloh0:
	adrp	x23, _PALMAS_NONE_BASE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _PALMAS_NONE_BASE@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w8, #0
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x19, #8]
	str	w8, [x9, x22, lsl #2]
	add	x22, x22, #1
	ldrsw	x8, [x19]
	add	x21, x21, #24
	cmp	x22, x8
	b.ge	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #24]
	ldr	x1, [x8, x21]
	ldr	x9, [x23]
	cmp	x1, x9
	b.eq	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x19, #20]
	add	x24, x8, x21
	ldr	w2, [x24, #16]
	add	x3, sp, #12
	bl	_palmas_read
	tbnz	w0, #31, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x24, #8]
	ldr	w9, [sp, #12]
	and	w8, w9, w8
	str	w8, [sp, #12]
	ldr	w9, [x24, #12]
	lsr	w8, w8, w9
	b	LBB0_3
LBB0_7:
	mov	w20, #0
	b	LBB0_9
LBB0_8:
	mov	x20, x0
	ldr	w0, [x19, #16]
	ldr	w2, [x24, #16]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x20
	bl	_dev_err
LBB0_9:
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_PALMAS_NONE_BASE,8,3           ; @PALMAS_NONE_BASE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mux_reg 0x%02x read failed: %d\n"

	.no_dead_strip	_palmas_pinctrl_get_pin_mux
.subsections_via_symbols
