	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function as3722_pinmux_config_node
_as3722_pinmux_config_node:             ## @as3722_pinmux_config_node
	.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
	movq	%rdx, %r12
	movq	%rsi, %r14
	movq	%rdi, %r13
	movl	(%rdi), %eax
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jle	LBB0_4
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movq	(%rax,%rbx,8), %rax
	movl	4(%rax), %edi
	movq	%r14, %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	incq	%rbx
	movslq	(%r13), %rax
	cmpq	%rax, %rbx
	jl	LBB0_1
LBB0_4:
	cmpl	%eax, %ebx
	jge	LBB0_5
LBB0_8:
	movq	8(%r13), %rax
	movl	%ebx, %edx
	movq	(%rax,%rdx,8), %rax
	movl	(%rax), %ebx
	movl	8(%r12), %ecx
	movl	%ecx, 8(%rax)
	movq	(%r12), %rsi
	xorl	%r14d, %r14d
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.9:
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_as3722_pinmux_get_function
	movl	%eax, %r15d
	leal	-128(%r15), %eax
	cmpl	$11, %eax
	ja	LBB0_10
## %bb.13:
	movl	$3026, %ecx                     ## imm = 0xBD2
	btl	%eax, %ecx
	jae	LBB0_14
## %bb.12:
	movq	_AS3722_GPIO_MODE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_AS3722_GPIO_MODE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	notl	%eax
	andl	%eax, %ebx
	movq	_AS3722_MODE_PUSH_PULL@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_2:
	movl	(%r13), %eax
	cmpl	%eax, %ebx
	jl	LBB0_8
LBB0_5:
	movl	16(%r13), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_device_printf
LBB0_6:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_7
LBB0_14:
	movq	_AS3722_GPIO_MODE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_AS3722_GPIO_MODE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	notl	%eax
	andl	%eax, %ebx
	movq	_AS3722_MODE_INPUT@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %eax
	shll	%cl, %eax
	orl	%eax, %ebx
	movq	-48(%rbp), %r8                  ## 8-byte Reload
LBB0_16:
	movq	_AS3722_GPIO_IOSF_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_AS3722_GPIO_IOSF_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	notl	%eax
	andl	%ebx, %eax
	shll	%cl, %r15d
	orl	%eax, %r15d
	movq	8(%r13), %rax
	movq	(%rax,%r8,8), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_17
LBB0_7:
	movl	%r14d, %eax
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	_AS3722_GPIO0_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r8, %rsi
	movq	%r13, %rdi
	movl	%r15d, %edx
	movq	%r8, %rbx
	callq	_WR1
	movq	8(%r13), %rcx
	movq	(%rcx,%rbx,8), %rcx
	movl	%r15d, (%rcx)
	jmp	LBB0_18
LBB0_10:
	cmpl	$-1, %r15d
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	jne	LBB0_16
## %bb.11:
	movl	16(%r13), %edi
	movq	(%r12), %rdx
	movq	8(%r13), %rax
	movq	(%rax,%r8,8), %rax
	movl	4(%rax), %ecx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_device_printf
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown pin: %s\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.1:                               ## @.str.1
	.asciz	"Unknown function %s for pin %s\n"

	.comm	_AS3722_GPIO_MODE_MASK,4,2      ## @AS3722_GPIO_MODE_MASK
	.comm	_AS3722_GPIO_MODE_SHIFT,4,2     ## @AS3722_GPIO_MODE_SHIFT
	.comm	_AS3722_MODE_PUSH_PULL,4,2      ## @AS3722_MODE_PUSH_PULL
	.comm	_AS3722_MODE_INPUT,4,2          ## @AS3722_MODE_INPUT
	.comm	_AS3722_GPIO_IOSF_MASK,4,2      ## @AS3722_GPIO_IOSF_MASK
	.comm	_AS3722_GPIO_IOSF_SHIFT,4,2     ## @AS3722_GPIO_IOSF_SHIFT
	.comm	_AS3722_GPIO0_CONTROL,8,3       ## @AS3722_GPIO0_CONTROL
	.no_dead_strip	_as3722_pinmux_config_node
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function as3722_pinmux_config_node
_as3722_pinmux_config_node:             ; @as3722_pinmux_config_node
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.1:
	mov	x23, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x23, lsl #3]
	ldr	w0, [x8, #4]
	mov	x1, x21
	bl	_strcmp
	cbz	x0, LBB0_12
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x19]
	cmp	x23, x8
	b.lt	LBB0_2
; %bb.4:
	cmp	w23, w8
	b.ge	LBB0_10
LBB0_5:
	ldr	x8, [x19, #8]
	ldr	x8, [x8, w23, uxtw #3]
	ldr	w22, [x8]
	ldr	w9, [x20, #8]
	str	w9, [x8, #8]
	ldr	x1, [x20]
	cbz	x1, LBB0_16
; %bb.6:
	mov	w21, w23
	mov	x0, x19
	bl	_as3722_pinmux_get_function
	sub	w8, w0, #128
	cmp	w8, #11
	b.hi	LBB0_19
; %bb.7:
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #3026
	tst	w8, w9
	b.eq	LBB0_13
; %bb.8:
Lloh0:
	adrp	x8, _AS3722_GPIO_MODE_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AS3722_GPIO_MODE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _AS3722_GPIO_MODE_SHIFT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AS3722_GPIO_MODE_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	bic	w8, w22, w8
Lloh6:
	adrp	x10, _AS3722_MODE_PUSH_PULL@GOTPAGE
Lloh7:
	ldr	x10, [x10, _AS3722_MODE_PUSH_PULL@GOTPAGEOFF]
	b	LBB0_14
LBB0_9:
	mov	w23, #0
	cmp	w23, w8
	b.lt	LBB0_5
LBB0_10:
	ldr	w0, [x19, #16]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
LBB0_11:
	bl	_device_printf
Lloh10:
	adrp	x8, _ENXIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	b	LBB0_18
LBB0_12:
	ldr	w8, [x19]
	cmp	w23, w8
	b.lt	LBB0_5
	b	LBB0_10
LBB0_13:
Lloh13:
	adrp	x8, _AS3722_GPIO_MODE_MASK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AS3722_GPIO_MODE_MASK@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _AS3722_GPIO_MODE_SHIFT@GOTPAGE
Lloh17:
	ldr	x9, [x9, _AS3722_GPIO_MODE_SHIFT@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	bic	w8, w22, w8
Lloh19:
	adrp	x10, _AS3722_MODE_INPUT@GOTPAGE
Lloh20:
	ldr	x10, [x10, _AS3722_MODE_INPUT@GOTPAGEOFF]
LBB0_14:
	ldr	w10, [x10]
	lsl	w9, w10, w9
	orr	w22, w8, w9
LBB0_15:
Lloh21:
	adrp	x8, _AS3722_GPIO_IOSF_MASK@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AS3722_GPIO_IOSF_MASK@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
Lloh24:
	adrp	x9, _AS3722_GPIO_IOSF_SHIFT@GOTPAGE
Lloh25:
	ldr	x9, [x9, _AS3722_GPIO_IOSF_SHIFT@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	bic	w8, w22, w8
	lsl	w9, w0, w9
	orr	w20, w8, w9
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x21, lsl #3]
	ldr	w8, [x8]
	cmp	w20, w8
	b.ne	LBB0_17
LBB0_16:
	mov	w0, #0
	b	LBB0_18
LBB0_17:
Lloh27:
	adrp	x8, _AS3722_GPIO0_CONTROL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _AS3722_GPIO0_CONTROL@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	add	x1, x8, x21
	mov	x0, x19
	mov	x2, x20
	bl	_WR1
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x21, lsl #3]
	str	w20, [x8]
LBB0_18:
	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
LBB0_19:
	cmn	w0, #1
	b.ne	LBB0_15
; %bb.20:
	ldr	w0, [x19, #16]
	ldr	x2, [x20]
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x21, lsl #3]
	ldr	w8, [x8, #4]
	str	x8, [sp]
Lloh30:
	adrp	x1, l_.str.1@PAGE
Lloh31:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_11
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown pin: %s\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.1:                               ; @.str.1
	.asciz	"Unknown function %s for pin %s\n"

	.comm	_AS3722_GPIO_MODE_MASK,4,2      ; @AS3722_GPIO_MODE_MASK
	.comm	_AS3722_GPIO_MODE_SHIFT,4,2     ; @AS3722_GPIO_MODE_SHIFT
	.comm	_AS3722_MODE_PUSH_PULL,4,2      ; @AS3722_MODE_PUSH_PULL
	.comm	_AS3722_MODE_INPUT,4,2          ; @AS3722_MODE_INPUT
	.comm	_AS3722_GPIO_IOSF_MASK,4,2      ; @AS3722_GPIO_IOSF_MASK
	.comm	_AS3722_GPIO_IOSF_SHIFT,4,2     ; @AS3722_GPIO_IOSF_SHIFT
	.comm	_AS3722_GPIO0_CONTROL,8,3       ; @AS3722_GPIO0_CONTROL
	.no_dead_strip	_as3722_pinmux_config_node
.subsections_via_symbols
