	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rza1_pinctrl_register
_rza1_pinctrl_register:                 ## @rza1_pinctrl_register
	.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	%rdi, %r14
	movl	(%rdi), %edi
	movq	_RZA1_NPINS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	movl	$8, %edx
	callq	_devm_kcalloc
	movq	%rax, %r12
	movl	(%r14), %edi
	movq	_RZA1_NPORTS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %ecx
	movl	$24, %edx
	callq	_devm_kcalloc
	testq	%r12, %r12
	je	LBB0_2
## %bb.1:
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%r12, 40(%r14)
	movq	%r12, 16(%r14)
	movq	_RZA1_NPINS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	movq	%r15, 32(%r14)
	testl	%eax, %eax
	je	LBB0_9
## %bb.4:
	xorl	%ebx, %ebx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	movq	_RZA1_NPINS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %r12
	cmpq	%rax, %rbx
	jae	LBB0_9
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_RZA1_PIN_ID_TO_PIN
	movl	%eax, %r13d
	movl	%ebx, %edi
	callq	_RZA1_PIN_ID_TO_PORT
	movl	%ebx, (%r12)
	movl	(%r14), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str(%rip), %rdx
	movl	%eax, %ecx
	movl	%r13d, %r8d
	callq	_devm_kasprintf
	movl	%eax, 4(%r12)
	testl	%eax, %eax
	je	LBB0_2
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%ebx, %eax
	xorl	%edx, %edx
	movq	_RZA1_PINS_PER_PORT@GOTPCREL(%rip), %rcx
	divl	(%rcx)
	testl	%edx, %edx
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%ebx, %edi
	callq	_RZA1_PIN_ID_TO_PORT
	movl	%eax, %ecx
	leaq	(%rcx,%rcx,2), %rcx
	movl	%eax, (%r15,%rcx,8)
	movl	24(%r14), %eax
	movl	%eax, 16(%r15,%rcx,8)
	movq	%r12, 8(%r15,%rcx,8)
	leaq	(%r15,%rcx,8), %rdi
	addq	$4, %rdi
	callq	_spin_lock_init
	jmp	LBB0_8
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_17
LBB0_9:
	leaq	8(%r14), %rsi
	movl	(%r14), %edi
	leaq	4(%r14), %r15
	movq	%r14, %rdx
	movq	%r15, %rcx
	callq	_devm_pinctrl_register_and_init
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, %ebx
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_16
LBB0_11:
	movl	(%r15), %edi
	callq	_pinctrl_enable
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movl	%eax, %ebx
	movl	(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_16
LBB0_13:
	movq	%r14, %rdi
	callq	_rza1_gpio_register
	testl	%eax, %eax
	je	LBB0_14
## %bb.15:
	movl	%eax, %ebx
	movl	(%r14), %edi
	leaq	L_.str.3(%rip), %rsi
LBB0_16:
	callq	_dev_err
LBB0_17:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	xorl	%ebx, %ebx
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_RZA1_NPINS,4,2                 ## @RZA1_NPINS
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_RZA1_NPORTS,4,2                ## @RZA1_NPORTS
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"P%u-%u"

	.comm	_RZA1_PINS_PER_PORT,4,2         ## @RZA1_PINS_PER_PORT
L_.str.1:                               ## @.str.1
	.asciz	"RZ/A1 pin controller registration failed\n"

L_.str.2:                               ## @.str.2
	.asciz	"RZ/A1 pin controller failed to start\n"

L_.str.3:                               ## @.str.3
	.asciz	"RZ/A1 GPIO registration failed\n"

	.no_dead_strip	_rza1_pinctrl_register
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rza1_pinctrl_register
_rza1_pinctrl_register:                 ; @rza1_pinctrl_register
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x26, _RZA1_NPINS@GOTPAGE
Lloh1:
	ldr	x26, [x26, _RZA1_NPINS@GOTPAGEOFF]
	ldr	w1, [x26]
Lloh2:
	adrp	x27, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x27, [x27, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w3, [x27]
	mov	w2, #8
	bl	_devm_kcalloc
	mov	x20, x0
	ldr	w0, [x19]
Lloh4:
	adrp	x8, _RZA1_NPORTS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _RZA1_NPORTS@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	ldr	w3, [x27]
	mov	w2, #24
	bl	_devm_kcalloc
	cmp	x20, #0
	ccmp	x0, #0, #4, ne
	b.ne	LBB0_2
LBB0_1:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_15
LBB0_2:
	mov	x21, x0
	ldr	w8, [x26]
	mov	x22, x19
	str	w8, [x22, #8]!
	str	x20, [x22, #8]
	stp	x0, x20, [x22, #24]
	cbz	w8, LBB0_8
; %bb.3:
	mov	x23, #0
Lloh10:
	adrp	x28, _RZA1_PINS_PER_PORT@GOTPAGE
Lloh11:
	ldr	x28, [x28, _RZA1_PINS_PER_PORT@GOTPAGEOFF]
Lloh12:
	adrp	x24, l_.str@PAGE
Lloh13:
	add	x24, x24, l_.str@PAGEOFF
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x23, x23, #1
	ldr	w8, [x26]
	add	x20, x20, #8
	cmp	x23, x8
	b.hs	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	bl	_RZA1_PIN_ID_TO_PIN
	mov	x25, x0
	mov	x0, x23
	bl	_RZA1_PIN_ID_TO_PORT
	mov	x3, x0
	str	w23, [x20]
	ldr	w0, [x19]
	ldr	w1, [x27]
	mov	x2, x24
	mov	x4, x25
	bl	_devm_kasprintf
	str	w0, [x20, #4]
	cbz	w0, LBB0_1
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x28]
	udiv	w9, w23, w8
	msub	w8, w9, w8, w23
	cbnz	w8, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x23
	bl	_RZA1_PIN_ID_TO_PORT
	mov	w8, #24
	umaddl	x8, w0, w8, x21
	str	w0, [x8]
	ldr	w9, [x19, #24]
	str	w9, [x8, #16]
	str	x20, [x8, #8]
	add	x0, x8, #4
	bl	_spin_lock_init
	b	LBB0_4
LBB0_8:
	mov	x21, x19
	ldr	w0, [x21], #4
	mov	x1, x22
	mov	x2, x19
	mov	x3, x21
	bl	_devm_pinctrl_register_and_init
	cbz	w0, LBB0_10
; %bb.9:
	mov	x20, x0
	ldr	w0, [x19]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_14
LBB0_10:
	ldr	w0, [x21]
	bl	_pinctrl_enable
	cbz	w0, LBB0_12
; %bb.11:
	mov	x20, x0
	ldr	w0, [x19]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_14
LBB0_12:
	mov	x0, x19
	bl	_rza1_gpio_register
	mov	x20, x0
	cbz	w0, LBB0_15
; %bb.13:
	ldr	w0, [x19]
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_14:
	bl	_dev_err
LBB0_15:
	mov	x0, x20
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_RZA1_NPINS,4,2                 ; @RZA1_NPINS
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_RZA1_NPORTS,4,2                ; @RZA1_NPORTS
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"P%u-%u"

	.comm	_RZA1_PINS_PER_PORT,4,2         ; @RZA1_PINS_PER_PORT
l_.str.1:                               ; @.str.1
	.asciz	"RZ/A1 pin controller registration failed\n"

l_.str.2:                               ; @.str.2
	.asciz	"RZ/A1 pin controller failed to start\n"

l_.str.3:                               ; @.str.3
	.asciz	"RZ/A1 GPIO registration failed\n"

	.no_dead_strip	_rza1_pinctrl_register
.subsections_via_symbols
