	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath79_gpio_probe
_ath79_gpio_probe:                      ## @ath79_gpio_probe
	.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, %r12
	callq	_dev_get_platdata
	movq	%rax, %rbx
	movq	(%r12), %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	%r12, %rdi
	movl	$64, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_22
## %bb.1:
	movq	%rax, %r14
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_platform_set_drvdata
	testq	%r15, %r15
	je	LBB0_5
## %bb.2:
	leaq	L_.str(%rip), %rsi
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	callq	_of_property_read_u32
	testl	%eax, %eax
	je	LBB0_11
## %bb.3:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
LBB0_4:
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_24
LBB0_5:
	testq	%rbx, %rbx
	je	LBB0_13
## %bb.6:
	movl	(%rbx), %ecx
	movl	%ecx, -44(%rbp)
	movl	4(%rbx), %eax
	cmpl	$32, %ecx
	jge	LBB0_12
LBB0_7:
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	testq	%rax, %rax
	je	LBB0_15
## %bb.8:
	movl	(%rax), %ebx
	movq	%rax, %rdi
	callq	_resource_size
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_devm_ioremap_nocache
	movq	%rax, 48(%r14)
	testq	%rax, %rax
	je	LBB0_22
## %bb.9:
	movq	%r14, %rdi
	addq	$56, %rdi
	callq	_raw_spin_lock_init
	movq	48(%r14), %rax
	movq	_AR71XX_GPIO_REG_IN@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	leaq	(%rax,%rcx,4), %rcx
	movq	_AR71XX_GPIO_REG_SET@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %rdx
	leaq	(%rax,%rdx,4), %r8
	movq	_AR71XX_GPIO_REG_CLEAR@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %rdx
	leaq	(%rax,%rdx,4), %r9
	xorl	%edx, %edx
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	movq	_AR71XX_GPIO_REG_OE@GOTPCREL(%rip), %rsi
	movslq	(%rsi), %rsi
	leaq	(%rax,%rsi,4), %rax
	movl	$0, %ebx
	cmoveq	%rax, %rbx
	cmoveq	%rdx, %rax
	subq	$8, %rsp
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	pushq	$0
	pushq	%rax
	pushq	%rbx
	callq	_bgpio_init
	addq	$32, %rsp
	testl	%eax, %eax
	je	LBB0_16
## %bb.10:
	movl	%eax, %ebx
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_4
LBB0_11:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_of_device_is_compatible
	movl	-44(%rbp), %ecx
	cmpl	$32, %ecx
	jl	LBB0_7
LBB0_12:
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_14
LBB0_13:
	leaq	L_.str.3(%rip), %rsi
LBB0_14:
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_23
LBB0_16:
	movq	$0, 40(%r14)
	testq	%r15, %r15
	je	LBB0_18
## %bb.17:
	leaq	L_.str.6(%rip), %rsi
	movq	%r15, %rdi
	callq	_of_property_read_bool
	testq	%rax, %rax
	je	LBB0_20
LBB0_18:
	movq	_ath79_gpio_irqchip@GOTPCREL(%rip), %rax
	movq	%rax, 32(%r14)
	movq	_ath79_gpio_irq_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r14)
	movl	$1, (%r14)
	movl	(%r13), %ecx
	movq	%r12, %rdi
	movl	$1, %esi
	movl	$4, %edx
	callq	_devm_kcalloc
	movq	%rax, 16(%r14)
	testq	%rax, %rax
	je	LBB0_22
## %bb.19:
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	movq	16(%r14), %rcx
	movl	%eax, (%rcx)
	movq	_IRQ_TYPE_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	movq	_handle_simple_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
LBB0_20:
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%r14, %rdx
	callq	_devm_gpiochip_add_data
	testl	%eax, %eax
	je	LBB0_25
## %bb.21:
	movl	%eax, %ebx
	leaq	L_.str.7(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_24
LBB0_22:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_23:
	subl	(%rax), %ebx
LBB0_24:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	xorl	%ebx, %ebx
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ngpios"

L_.str.1:                               ## @.str.1
	.asciz	"ngpios property is not valid\n"

L_.str.2:                               ## @.str.2
	.asciz	"qca,ar9340-gpio"

L_.str.3:                               ## @.str.3
	.asciz	"No DT node or platform data found\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.4:                               ## @.str.4
	.asciz	"ngpios must be less than 32\n"

	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.comm	_AR71XX_GPIO_REG_IN,4,2         ## @AR71XX_GPIO_REG_IN
	.comm	_AR71XX_GPIO_REG_SET,4,2        ## @AR71XX_GPIO_REG_SET
	.comm	_AR71XX_GPIO_REG_CLEAR,4,2      ## @AR71XX_GPIO_REG_CLEAR
	.comm	_AR71XX_GPIO_REG_OE,4,2         ## @AR71XX_GPIO_REG_OE
L_.str.5:                               ## @.str.5
	.asciz	"bgpio_init failed\n"

L_.str.6:                               ## @.str.6
	.asciz	"interrupt-controller"

	.comm	_ath79_gpio_irqchip,4,2         ## @ath79_gpio_irqchip
	.comm	_ath79_gpio_irq_handler,4,2     ## @ath79_gpio_irq_handler
	.comm	_IRQ_TYPE_NONE,4,2              ## @IRQ_TYPE_NONE
	.comm	_handle_simple_irq,4,2          ## @handle_simple_irq
L_.str.7:                               ## @.str.7
	.asciz	"cannot add AR71xx GPIO chip, error=%d"

	.no_dead_strip	_ath79_gpio_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath79_gpio_probe
_ath79_gpio_probe:                      ; @ath79_gpio_probe
	.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	x19, x0
	bl	_dev_get_platdata
	mov	x22, x0
	ldr	x21, [x19]
Lloh0:
	adrp	x24, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x24, [x24, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	x0, x19
	mov	w1, #64
	bl	_devm_kzalloc
	cbz	x0, LBB0_22
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	cbz	x21, LBB0_5
; %bb.2:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #12
	mov	x0, x21
	bl	_of_property_read_u32
	cbz	w0, LBB0_11
; %bb.3:
	mov	x22, x0
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_4:
	mov	x0, x19
	bl	_dev_err
	b	LBB0_24
LBB0_5:
	cbz	x22, LBB0_13
; %bb.6:
	ldp	w8, w22, [x22]
	str	w8, [sp, #12]
	cmp	w8, #32
	b.ge	LBB0_12
LBB0_7:
Lloh6:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_platform_get_resource
	cbz	x0, LBB0_15
; %bb.8:
	ldr	w23, [x0]
	bl	_resource_size
	mov	x2, x0
	mov	x0, x19
	mov	x1, x23
	bl	_devm_ioremap_nocache
	str	x0, [x20, #48]
	cbz	x0, LBB0_22
; %bb.9:
	add	x0, x20, #56
	bl	_raw_spin_lock_init
Lloh9:
	adrp	x8, _AR71XX_GPIO_REG_IN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AR71XX_GPIO_REG_IN@GOTPAGEOFF]
	ldr	x9, [x20, #48]
Lloh11:
	ldrsw	x8, [x8]
	add	x3, x9, x8, lsl #2
Lloh12:
	adrp	x8, _AR71XX_GPIO_REG_SET@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AR71XX_GPIO_REG_SET@GOTPAGEOFF]
Lloh14:
	ldrsw	x8, [x8]
	add	x4, x9, x8, lsl #2
Lloh15:
	adrp	x8, _AR71XX_GPIO_REG_CLEAR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AR71XX_GPIO_REG_CLEAR@GOTPAGEOFF]
Lloh17:
	ldrsw	x8, [x8]
Lloh18:
	adrp	x10, _AR71XX_GPIO_REG_OE@GOTPAGE
Lloh19:
	ldr	x10, [x10, _AR71XX_GPIO_REG_OE@GOTPAGEOFF]
	add	x5, x9, x8, lsl #2
Lloh20:
	ldrsw	x8, [x10]
	add	x8, x9, x8, lsl #2
	cmp	w22, #0
	csel	x6, x8, xzr, eq
	csel	x7, xzr, x8, eq
	str	wzr, [sp]
	mov	x0, x20
	mov	x1, x19
	mov	w2, #4
	bl	_bgpio_init
	cbz	w0, LBB0_16
; %bb.10:
	mov	x22, x0
Lloh21:
	adrp	x1, l_.str.5@PAGE
Lloh22:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_4
LBB0_11:
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_of_device_is_compatible
	mov	x22, x0
	ldr	w8, [sp, #12]
	cmp	w8, #32
	b.lt	LBB0_7
LBB0_12:
Lloh25:
	adrp	x1, l_.str.4@PAGE
Lloh26:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_14
LBB0_13:
Lloh27:
	adrp	x1, l_.str.3@PAGE
Lloh28:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_14:
	mov	x0, x19
	bl	_dev_err
LBB0_15:
Lloh29:
	adrp	x8, _EINVAL@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_23
LBB0_16:
	str	xzr, [x20, #40]
	cbz	x21, LBB0_18
; %bb.17:
Lloh31:
	adrp	x1, l_.str.6@PAGE
Lloh32:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x21
	bl	_of_property_read_bool
	cbz	x0, LBB0_20
LBB0_18:
Lloh33:
	adrp	x8, _ath79_gpio_irqchip@GOTPAGE
Lloh34:
	ldr	x8, [x8, _ath79_gpio_irqchip@GOTPAGEOFF]
Lloh35:
	adrp	x9, _ath79_gpio_irq_handler@GOTPAGE
Lloh36:
	ldr	x9, [x9, _ath79_gpio_irq_handler@GOTPAGEOFF]
	str	x8, [x20, #32]
Lloh37:
	ldr	w8, [x9]
	str	w8, [x20, #24]
	mov	w8, #1
	str	w8, [x20]
	ldr	w3, [x24]
	mov	x0, x19
	mov	w1, #1
	mov	w2, #4
	bl	_devm_kcalloc
	str	x0, [x20, #16]
	cbz	x0, LBB0_22
; %bb.19:
	mov	x0, x19
	mov	w1, #0
	bl	_platform_get_irq
	ldr	x8, [x20, #16]
	str	w0, [x8]
Lloh38:
	adrp	x8, _IRQ_TYPE_NONE@GOTPAGE
Lloh39:
	ldr	x8, [x8, _IRQ_TYPE_NONE@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
Lloh41:
	adrp	x9, _handle_simple_irq@GOTPAGE
Lloh42:
	ldr	x9, [x9, _handle_simple_irq@GOTPAGEOFF]
Lloh43:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #4]
LBB0_20:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x20
	bl	_devm_gpiochip_add_data
	mov	x22, x0
	cbz	w0, LBB0_24
; %bb.21:
	str	x22, [sp]
Lloh44:
	adrp	x1, l_.str.7@PAGE
Lloh45:
	add	x1, x1, l_.str.7@PAGEOFF
	b	LBB0_4
LBB0_22:
Lloh46:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh47:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_23:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_24:
	mov	x0, x22
	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
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ngpios"

l_.str.1:                               ; @.str.1
	.asciz	"ngpios property is not valid\n"

l_.str.2:                               ; @.str.2
	.asciz	"qca,ar9340-gpio"

l_.str.3:                               ; @.str.3
	.asciz	"No DT node or platform data found\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.4:                               ; @.str.4
	.asciz	"ngpios must be less than 32\n"

	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.comm	_AR71XX_GPIO_REG_IN,4,2         ; @AR71XX_GPIO_REG_IN
	.comm	_AR71XX_GPIO_REG_SET,4,2        ; @AR71XX_GPIO_REG_SET
	.comm	_AR71XX_GPIO_REG_CLEAR,4,2      ; @AR71XX_GPIO_REG_CLEAR
	.comm	_AR71XX_GPIO_REG_OE,4,2         ; @AR71XX_GPIO_REG_OE
l_.str.5:                               ; @.str.5
	.asciz	"bgpio_init failed\n"

l_.str.6:                               ; @.str.6
	.asciz	"interrupt-controller"

	.comm	_ath79_gpio_irqchip,4,2         ; @ath79_gpio_irqchip
	.comm	_ath79_gpio_irq_handler,4,2     ; @ath79_gpio_irq_handler
	.comm	_IRQ_TYPE_NONE,4,2              ; @IRQ_TYPE_NONE
	.comm	_handle_simple_irq,4,2          ; @handle_simple_irq
l_.str.7:                               ; @.str.7
	.asciz	"cannot add AR71xx GPIO chip, error=%d"

	.no_dead_strip	_ath79_gpio_probe
.subsections_via_symbols
