	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_build_gpiochip
_mtk_build_gpiochip:                    ## @mtk_build_gpiochip
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	leaq	16(%rdi), %r14
	movq	_PINCTRL_PINCTRL_DEV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 76(%rdi)
	movl	(%rdi), %eax
	movl	%eax, 72(%rdi)
	movq	_gpiochip_generic_request@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 68(%rdi)
	movq	_gpiochip_generic_free@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 64(%rdi)
	movq	_mtk_gpio_direction_input@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 60(%rdi)
	movq	_mtk_gpio_direction_output@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%rdi)
	movq	_mtk_gpio_get@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%rdi)
	movq	_mtk_gpio_set@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rdi)
	movq	_mtk_gpio_to_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%rdi)
	movq	_mtk_gpio_set_config@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rdi)
	movl	$-1, 16(%rdi)
	movq	8(%rdi), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rdi)
	movq	%rsi, 32(%rdi)
	movl	$2, 20(%rdi)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_gpiochip_add_data
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	leaq	L_.str(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_of_find_property
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:
	movl	(%rbx), %edi
	callq	_dev_name
	movl	24(%rbx), %r8d
	xorl	%r12d, %r12d
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_gpiochip_add_pin_range
	testl	%eax, %eax
	jns	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_gpiochip_remove
	movl	%ebx, %r12d
	jmp	LBB0_5
LBB0_1:
	movl	%eax, %r12d
LBB0_5:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PINCTRL_PINCTRL_DEV,4,2        ## @PINCTRL_PINCTRL_DEV
	.comm	_gpiochip_generic_request,4,2   ## @gpiochip_generic_request
	.comm	_gpiochip_generic_free,4,2      ## @gpiochip_generic_free
	.comm	_mtk_gpio_direction_input,4,2   ## @mtk_gpio_direction_input
	.comm	_mtk_gpio_direction_output,4,2  ## @mtk_gpio_direction_output
	.comm	_mtk_gpio_get,4,2               ## @mtk_gpio_get
	.comm	_mtk_gpio_set,4,2               ## @mtk_gpio_set
	.comm	_mtk_gpio_to_irq,4,2            ## @mtk_gpio_to_irq
	.comm	_mtk_gpio_set_config,4,2        ## @mtk_gpio_set_config
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gpio-ranges"

	.no_dead_strip	_mtk_build_gpiochip
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function mtk_build_gpiochip
lCPI0_0:
	.long	4294967295                      ; 0xffffffff
	.long	2                               ; 0x2
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_mtk_build_gpiochip:                    ; @mtk_build_gpiochip
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _PINCTRL_PINCTRL_DEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PINCTRL_PINCTRL_DEV@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x0]
	stp	w9, w8, [x0, #72]
Lloh3:
	adrp	x8, _gpiochip_generic_request@GOTPAGE
Lloh4:
	ldr	x8, [x8, _gpiochip_generic_request@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _gpiochip_generic_free@GOTPAGE
Lloh7:
	ldr	x9, [x9, _gpiochip_generic_free@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #64]
Lloh9:
	adrp	x8, _mtk_gpio_direction_input@GOTPAGE
Lloh10:
	ldr	x8, [x8, _mtk_gpio_direction_input@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _mtk_gpio_direction_output@GOTPAGE
Lloh13:
	ldr	x9, [x9, _mtk_gpio_direction_output@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
Lloh15:
	adrp	x10, _mtk_gpio_get@GOTPAGE
Lloh16:
	ldr	x10, [x10, _mtk_gpio_get@GOTPAGEOFF]
	stp	w9, w8, [x0, #56]
Lloh17:
	ldr	w8, [x10]
Lloh18:
	adrp	x9, _mtk_gpio_set@GOTPAGE
Lloh19:
	ldr	x9, [x9, _mtk_gpio_set@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #48]
Lloh21:
	adrp	x8, _mtk_gpio_to_irq@GOTPAGE
Lloh22:
	ldr	x8, [x8, _mtk_gpio_to_irq@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
Lloh24:
	adrp	x9, _mtk_gpio_set_config@GOTPAGE
Lloh25:
	ldr	x9, [x9, _mtk_gpio_set_config@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #40]
	ldr	x8, [x0, #8]
	ldr	w8, [x8]
Lloh27:
	adrp	x9, lCPI0_0@PAGE
Lloh28:
	ldr	d0, [x9, lCPI0_0@PAGEOFF]
	mov	x21, x0
	str	d0, [x21, #16]!
	str	w8, [x0, #24]
	str	x1, [x0, #32]
	mov	x0, x21
	mov	x1, x19
	bl	_gpiochip_add_data
	tbnz	w0, #31, LBB0_5
; %bb.1:
Lloh29:
	adrp	x1, l_.str@PAGE
Lloh30:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, #0
	bl	_of_find_property
	cbz	w0, LBB0_3
; %bb.2:
	mov	w0, #0
	b	LBB0_5
LBB0_3:
	ldr	w0, [x19]
	bl	_dev_name
	mov	x1, x0
	ldr	w4, [x19, #24]
	mov	x0, x21
	mov	w2, #0
	mov	w3, #0
	bl	_gpiochip_add_pin_range
	mov	x19, x0
	mov	w0, #0
	tbz	w19, #31, LBB0_5
; %bb.4:
	mov	x0, x21
	bl	_gpiochip_remove
	mov	x0, x19
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdr	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_PINCTRL_PINCTRL_DEV,4,2        ; @PINCTRL_PINCTRL_DEV
	.comm	_gpiochip_generic_request,4,2   ; @gpiochip_generic_request
	.comm	_gpiochip_generic_free,4,2      ; @gpiochip_generic_free
	.comm	_mtk_gpio_direction_input,4,2   ; @mtk_gpio_direction_input
	.comm	_mtk_gpio_direction_output,4,2  ; @mtk_gpio_direction_output
	.comm	_mtk_gpio_get,4,2               ; @mtk_gpio_get
	.comm	_mtk_gpio_set,4,2               ; @mtk_gpio_set
	.comm	_mtk_gpio_to_irq,4,2            ; @mtk_gpio_to_irq
	.comm	_mtk_gpio_set_config,4,2        ; @mtk_gpio_set_config
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gpio-ranges"

	.no_dead_strip	_mtk_build_gpiochip
.subsections_via_symbols
