	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function madera_pin_conf_get
_madera_pin_conf_get:                   ## @madera_pin_conf_get
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movl	%esi, %r13d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_pinctrl_dev_get_drvdata
	movq	%rax, %r12
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rdi
	callq	_pinconf_to_config_param
	movl	%eax, %r15d
	movq	_MADERA_GPIO1_CTRL_1@GOTPCREL(%rip), %rax
	leal	(%r13,%r13), %r14d
	addl	(%rax), %r14d
	movq	8(%r12), %rax
	movl	(%rax), %edi
	leaq	-56(%rbp), %rdx
	movl	%r14d, %esi
	callq	_regmap_read
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	8(%r12), %rax
	movl	(%rax), %edi
	incl	%r14d
	leaq	-52(%rbp), %rdx
	movl	%r14d, %esi
	callq	_regmap_read
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_3
LBB0_2:
	movl	(%r12), %edi
	incl	%r13d
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	movl	%ebx, %ecx
	callq	_dev_err
LBB0_22:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_24
## %bb.23:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	leal	-128(%r15), %eax
	cmpl	$11, %eax
	ja	LBB0_19
## %bb.4:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_15:
	movq	_MADERA_GP1_IP_CFG_MASK@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_19:
	movq	_ENOTSUPP@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_22
LBB0_16:
	movq	_MADERA_GP1_DIR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -52(%rbp)
	je	LBB0_17
## %bb.18:
	movq	_MADERA_GP1_LVL_MASK@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_14:
	movq	_MADERA_GP1_DIR_MASK@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_13:
	movq	_MADERA_GP1_DB_MASK@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_20:
	movl	-52(%rbp), %esi
	movq	%r12, %rdi
	callq	_madera_pin_unmake_drv_str
	movl	%eax, %esi
	jmp	LBB0_21
LBB0_11:
	movq	_MADERA_GP1_OP_CFG_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%esi, %esi
	testl	%eax, -56(%rbp)
	sete	%sil
	jmp	LBB0_21
LBB0_9:
	movq	_MADERA_GP1_OP_CFG_MASK@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
	xorl	%esi, %esi
	testl	%eax, -56(%rbp)
	setne	%sil
LBB0_21:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	%r15d, %edi
	callq	_pinconf_to_config_packed
	movq	%rax, (%rbx)
	xorl	%ebx, %ebx
	jmp	LBB0_22
LBB0_8:
	movq	_MADERA_GP1_PU_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_MADERA_GP1_PD_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%eax, %ecx
	andl	-52(%rbp), %ecx
	movl	%ecx, -52(%rbp)
	xorl	%esi, %esi
	cmpl	%eax, %ecx
	sete	%sil
	jmp	LBB0_21
LBB0_7:
	movq	_MADERA_GP1_PU_MASK@GOTPCREL(%rip), %rax
	movq	_MADERA_GP1_PD_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	(%rax), %eax
	orl	%ecx, %eax
	andl	-52(%rbp), %eax
	movl	%eax, -52(%rbp)
	xorl	%esi, %esi
	cmpl	%ecx, %eax
	sete	%sil
	jmp	LBB0_21
LBB0_6:
	movq	_MADERA_GP1_PU_MASK@GOTPCREL(%rip), %rax
	movq	_MADERA_GP1_PD_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	xorl	%esi, %esi
	andl	%ecx, -52(%rbp)
	sete	%sil
	jmp	LBB0_21
LBB0_5:
	movq	_MADERA_GP1_PU_MASK@GOTPCREL(%rip), %rax
	movq	_MADERA_GP1_PD_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	andl	-52(%rbp), %ecx
	movq	_MADERA_GP1_PU@GOTPCREL(%rip), %rax
	movq	_MADERA_GP1_PD@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rax), %edx
	movl	%ecx, -52(%rbp)
	xorl	%esi, %esi
	cmpl	%edx, %ecx
	sete	%sil
	jmp	LBB0_21
LBB0_17:
	xorl	%esi, %esi
	jmp	LBB0_21
LBB0_24:
	callq	___stack_chk_fail
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_20, LBB0_20-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
LJTI0_0:
	.long	L0_0_set_16
	.long	L0_0_set_15
	.long	L0_0_set_15
	.long	L0_0_set_14
	.long	L0_0_set_13
	.long	L0_0_set_20
	.long	L0_0_set_11
	.long	L0_0_set_9
	.long	L0_0_set_8
	.long	L0_0_set_7
	.long	L0_0_set_6
	.long	L0_0_set_5
	.end_data_region
                                        ## -- End function
	.comm	_MADERA_GPIO1_CTRL_1,4,2        ## @MADERA_GPIO1_CTRL_1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to read GP%d conf (%d)\n"

	.comm	_MADERA_GP1_PU_MASK,4,2         ## @MADERA_GP1_PU_MASK
	.comm	_MADERA_GP1_PD_MASK,4,2         ## @MADERA_GP1_PD_MASK
	.comm	_MADERA_GP1_PU,4,2              ## @MADERA_GP1_PU
	.comm	_MADERA_GP1_PD,4,2              ## @MADERA_GP1_PD
	.comm	_MADERA_GP1_OP_CFG_MASK,4,2     ## @MADERA_GP1_OP_CFG_MASK
	.comm	_MADERA_GP1_DB_MASK,4,2         ## @MADERA_GP1_DB_MASK
	.comm	_MADERA_GP1_DIR_MASK,4,2        ## @MADERA_GP1_DIR_MASK
	.comm	_MADERA_GP1_IP_CFG_MASK,4,2     ## @MADERA_GP1_IP_CFG_MASK
	.comm	_MADERA_GP1_LVL_MASK,4,2        ## @MADERA_GP1_LVL_MASK
	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.no_dead_strip	_madera_pin_conf_get
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function madera_pin_conf_get
_madera_pin_conf_get:                   ; @madera_pin_conf_get
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x19, x2
	mov	x22, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	bl	_pinctrl_dev_get_drvdata
	mov	x21, x0
	ldr	x0, [x19]
	bl	_pinconf_to_config_param
	mov	x20, x0
Lloh3:
	adrp	x8, _MADERA_GPIO1_CTRL_1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MADERA_GPIO1_CTRL_1@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	add	w24, w8, w22, lsl #1
	ldr	x8, [x21, #8]
	ldr	w0, [x8]
	mov	x25, sp
	mov	x2, sp
	mov	x1, x24
	bl	_regmap_read
	mov	x23, x0
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	x8, [x21, #8]
	ldr	w0, [x8]
	add	w1, w24, #1
	add	x2, x25, #4
	bl	_regmap_read
	mov	x23, x0
	cbz	w0, LBB0_5
LBB0_2:
	ldr	w0, [x21]
	add	w2, w22, #1
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x23
	bl	_dev_err
LBB0_3:
	ldr	x8, [sp, #8]
Lloh8:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh9:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_25
; %bb.4:
	mov	x0, x23
	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
	add	sp, sp, #96
	ret
LBB0_5:
	sub	w8, w20, #128
	cmp	w8, #11
	b.hi	LBB0_8
; %bb.6:
Lloh11:
	adrp	x9, lJTI0_0@PAGE
Lloh12:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_7
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_7:
	ldr	w8, [sp]
Lloh13:
	adrp	x9, _MADERA_GP1_IP_CFG_MASK@GOTPAGE
Lloh14:
	ldr	x9, [x9, _MADERA_GP1_IP_CFG_MASK@GOTPAGEOFF]
	b	LBB0_16
LBB0_8:
Lloh15:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_3
LBB0_9:
	ldr	w8, [sp, #4]
Lloh18:
	adrp	x9, _MADERA_GP1_DIR_MASK@GOTPAGE
Lloh19:
	ldr	x9, [x9, _MADERA_GP1_DIR_MASK@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_24
; %bb.10:
	ldr	w8, [sp]
Lloh21:
	adrp	x9, _MADERA_GP1_LVL_MASK@GOTPAGE
Lloh22:
	ldr	x9, [x9, _MADERA_GP1_LVL_MASK@GOTPAGEOFF]
	b	LBB0_16
LBB0_11:
	ldr	w8, [sp]
Lloh23:
	adrp	x9, _MADERA_GP1_DIR_MASK@GOTPAGE
Lloh24:
	ldr	x9, [x9, _MADERA_GP1_DIR_MASK@GOTPAGEOFF]
	b	LBB0_16
LBB0_12:
	ldr	w8, [sp]
Lloh25:
	adrp	x9, _MADERA_GP1_DB_MASK@GOTPAGE
Lloh26:
	ldr	x9, [x9, _MADERA_GP1_DB_MASK@GOTPAGEOFF]
	b	LBB0_16
LBB0_13:
	ldr	w1, [sp, #4]
	mov	x0, x21
	bl	_madera_pin_unmake_drv_str
	mov	x1, x0
	b	LBB0_23
LBB0_14:
	ldr	w8, [sp]
Lloh27:
	adrp	x9, _MADERA_GP1_OP_CFG_MASK@GOTPAGE
Lloh28:
	ldr	x9, [x9, _MADERA_GP1_OP_CFG_MASK@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	tst	w9, w8
	b	LBB0_22
LBB0_15:
	ldr	w8, [sp]
Lloh30:
	adrp	x9, _MADERA_GP1_OP_CFG_MASK@GOTPAGE
Lloh31:
	ldr	x9, [x9, _MADERA_GP1_OP_CFG_MASK@GOTPAGEOFF]
LBB0_16:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w1, ne
	b	LBB0_23
LBB0_17:
Lloh32:
	adrp	x8, _MADERA_GP1_PU_MASK@GOTPAGE
Lloh33:
	ldr	x8, [x8, _MADERA_GP1_PU_MASK@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
Lloh35:
	adrp	x9, _MADERA_GP1_PD_MASK@GOTPAGE
Lloh36:
	ldr	x9, [x9, _MADERA_GP1_PD_MASK@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	orr	w9, w9, w8
	ldr	w10, [sp, #4]
	and	w9, w10, w9
	str	w9, [sp, #4]
	cmp	w9, w8
	b	LBB0_22
LBB0_18:
Lloh38:
	adrp	x8, _MADERA_GP1_PU_MASK@GOTPAGE
Lloh39:
	ldr	x8, [x8, _MADERA_GP1_PU_MASK@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
Lloh41:
	adrp	x9, _MADERA_GP1_PD_MASK@GOTPAGE
Lloh42:
	ldr	x9, [x9, _MADERA_GP1_PD_MASK@GOTPAGEOFF]
Lloh43:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w10, [sp, #4]
	and	w8, w10, w8
	str	w8, [sp, #4]
	b	LBB0_21
LBB0_19:
Lloh44:
	adrp	x8, _MADERA_GP1_PU_MASK@GOTPAGE
Lloh45:
	ldr	x8, [x8, _MADERA_GP1_PU_MASK@GOTPAGEOFF]
Lloh46:
	ldr	w8, [x8]
Lloh47:
	adrp	x9, _MADERA_GP1_PD_MASK@GOTPAGE
Lloh48:
	ldr	x9, [x9, _MADERA_GP1_PD_MASK@GOTPAGEOFF]
Lloh49:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [sp, #4]
	ands	w8, w9, w8
	str	w8, [sp, #4]
	b	LBB0_22
LBB0_20:
Lloh50:
	adrp	x8, _MADERA_GP1_PU_MASK@GOTPAGE
Lloh51:
	ldr	x8, [x8, _MADERA_GP1_PU_MASK@GOTPAGEOFF]
Lloh52:
	ldr	w8, [x8]
Lloh53:
	adrp	x9, _MADERA_GP1_PD_MASK@GOTPAGE
Lloh54:
	ldr	x9, [x9, _MADERA_GP1_PD_MASK@GOTPAGEOFF]
Lloh55:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [sp, #4]
	and	w8, w9, w8
	str	w8, [sp, #4]
Lloh56:
	adrp	x9, _MADERA_GP1_PU@GOTPAGE
Lloh57:
	ldr	x9, [x9, _MADERA_GP1_PU@GOTPAGEOFF]
Lloh58:
	ldr	w9, [x9]
Lloh59:
	adrp	x10, _MADERA_GP1_PD@GOTPAGE
Lloh60:
	ldr	x10, [x10, _MADERA_GP1_PD@GOTPAGEOFF]
Lloh61:
	ldr	w10, [x10]
	orr	w9, w10, w9
LBB0_21:
	cmp	w8, w9
LBB0_22:
	cset	w1, eq
LBB0_23:
	mov	x0, x20
	bl	_pinconf_to_config_packed
	mov	w23, #0
	str	x0, [x19]
	b	LBB0_3
LBB0_24:
	mov	w1, #0
	b	LBB0_23
LBB0_25:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_9-LBB0_7)>>2
	.byte	(LBB0_7-LBB0_7)>>2
	.byte	(LBB0_7-LBB0_7)>>2
	.byte	(LBB0_11-LBB0_7)>>2
	.byte	(LBB0_12-LBB0_7)>>2
	.byte	(LBB0_13-LBB0_7)>>2
	.byte	(LBB0_14-LBB0_7)>>2
	.byte	(LBB0_15-LBB0_7)>>2
	.byte	(LBB0_17-LBB0_7)>>2
	.byte	(LBB0_18-LBB0_7)>>2
	.byte	(LBB0_19-LBB0_7)>>2
	.byte	(LBB0_20-LBB0_7)>>2
                                        ; -- End function
	.comm	_MADERA_GPIO1_CTRL_1,4,2        ; @MADERA_GPIO1_CTRL_1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to read GP%d conf (%d)\n"

	.comm	_MADERA_GP1_PU_MASK,4,2         ; @MADERA_GP1_PU_MASK
	.comm	_MADERA_GP1_PD_MASK,4,2         ; @MADERA_GP1_PD_MASK
	.comm	_MADERA_GP1_PU,4,2              ; @MADERA_GP1_PU
	.comm	_MADERA_GP1_PD,4,2              ; @MADERA_GP1_PD
	.comm	_MADERA_GP1_OP_CFG_MASK,4,2     ; @MADERA_GP1_OP_CFG_MASK
	.comm	_MADERA_GP1_DB_MASK,4,2         ; @MADERA_GP1_DB_MASK
	.comm	_MADERA_GP1_DIR_MASK,4,2        ; @MADERA_GP1_DIR_MASK
	.comm	_MADERA_GP1_IP_CFG_MASK,4,2     ; @MADERA_GP1_IP_CFG_MASK
	.comm	_MADERA_GP1_LVL_MASK,4,2        ; @MADERA_GP1_LVL_MASK
	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.no_dead_strip	_madera_pin_conf_get
.subsections_via_symbols
