	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function altera_gpio_probe
_altera_gpio_probe:                     ## @altera_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, %r14
	movq	(%rdi), %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$144, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r13
	leaq	136(%rax), %rdi
	callq	_raw_spin_lock_init
	leaq	L_.str(%rip), %rsi
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	callq	_of_property_read_u32
	movq	_ALTERA_GPIO_MAX_NGPIO@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rcx
	movl	%ecx, %edx
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movl	-44(%rbp), %edx
LBB0_5:
	leaq	16(%r13), %r12
	movl	%edx, 16(%r13)
	movslq	%edx, %rax
	cmpq	%rax, %rcx
	jae	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movq	%rcx, %rdx
	callq	_dev_warn
	movl	(%rbx), %eax
	movl	%eax, (%r12)
LBB0_7:
	movq	_altera_gpio_direction_input@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 88(%r13)
	movq	_altera_gpio_direction_output@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 84(%r13)
	movq	_altera_gpio_get@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 80(%r13)
	movq	_altera_gpio_set@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 76(%r13)
	movq	_THIS_MODULE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 72(%r13)
	movq	%r14, 64(%r13)
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	movq	%rax, (%r13)
	testq	%rax, %rax
	js	LBB0_15
## %bb.8:
	leaq	L_.str.2(%rip), %rsi
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	callq	_of_property_read_u32
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_10:
	movl	-44(%rbp), %eax
	movl	%eax, 8(%r13)
	movq	%r13, %rcx
	addq	$96, %rcx
	leaq	L_.str.4(%rip), %rdx
	movq	%rdx, 96(%r13)
	movq	_altera_gpio_irq_mask@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	%rdx, 128(%r13)
	movq	_altera_gpio_irq_unmask@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movl	%esi, 120(%r13)
	movq	_altera_gpio_irq_set_type@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movl	%esi, 116(%r13)
	movq	_altera_gpio_irq_startup@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movl	%esi, 112(%r13)
	movq	%rdx, 104(%r13)
	movq	%rcx, 56(%r13)
	movq	_IRQ_TYPE_LEVEL_HIGH@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_11
## %bb.12:
	movq	_altera_gpio_irq_leveL_high_handler@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_11:
	movq	_altera_gpio_irq_edge_handler@GOTPCREL(%rip), %rax
LBB0_13:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rax), %eax
	movl	%eax, 48(%r13)
	movl	$1, 24(%r13)
	movl	(%rcx), %ecx
	movq	%r14, %rdi
	movl	$1, %esi
	movl	$8, %edx
	callq	_devm_kcalloc
	movq	%rax, 32(%r13)
	testq	%rax, %rax
	je	LBB0_1
## %bb.14:
	movq	_IRQ_TYPE_NONE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 44(%r13)
	movq	_handle_bad_irq@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 40(%r13)
	movq	(%r13), %rcx
	movq	%rcx, (%rax)
LBB0_15:
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%r13, %rdx
	callq	_of_mm_gpiochip_add_data
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:
	movl	%eax, %ebx
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	jmp	LBB0_18
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_18:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_platform_set_drvdata
	xorl	%ebx, %ebx
	jmp	LBB0_18
	.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	"altr,ngpio"

	.comm	_ALTERA_GPIO_MAX_NGPIO,8,3      ## @ALTERA_GPIO_MAX_NGPIO
L_.str.1:                               ## @.str.1
	.asciz	"ngpio is greater than %d, defaulting to %d\n"

	.comm	_altera_gpio_direction_input,4,2 ## @altera_gpio_direction_input
	.comm	_altera_gpio_direction_output,4,2 ## @altera_gpio_direction_output
	.comm	_altera_gpio_get,4,2            ## @altera_gpio_get
	.comm	_altera_gpio_set,4,2            ## @altera_gpio_set
	.comm	_THIS_MODULE,4,2                ## @THIS_MODULE
L_.str.2:                               ## @.str.2
	.asciz	"altr,interrupt-type"

L_.str.3:                               ## @.str.3
	.asciz	"altr,interrupt-type value not set in device tree\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.4:                               ## @.str.4
	.asciz	"altera-gpio"

	.comm	_altera_gpio_irq_mask,8,3       ## @altera_gpio_irq_mask
	.comm	_altera_gpio_irq_unmask,4,2     ## @altera_gpio_irq_unmask
	.comm	_altera_gpio_irq_set_type,4,2   ## @altera_gpio_irq_set_type
	.comm	_altera_gpio_irq_startup,4,2    ## @altera_gpio_irq_startup
	.comm	_IRQ_TYPE_LEVEL_HIGH,4,2        ## @IRQ_TYPE_LEVEL_HIGH
	.comm	_altera_gpio_irq_leveL_high_handler,4,2 ## @altera_gpio_irq_leveL_high_handler
	.comm	_altera_gpio_irq_edge_handler,4,2 ## @altera_gpio_irq_edge_handler
	.comm	_IRQ_TYPE_NONE,4,2              ## @IRQ_TYPE_NONE
	.comm	_handle_bad_irq,4,2             ## @handle_bad_irq
L_.str.5:                               ## @.str.5
	.asciz	"Failed adding memory mapped gpiochip\n"

	.no_dead_strip	_altera_gpio_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function altera_gpio_probe
_altera_gpio_probe:                     ; @altera_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
	ldr	x21, [x0]
Lloh0:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	w1, #144
	bl	_devm_kzalloc
	cbz	x0, LBB0_10
; %bb.1:
	mov	x20, x0
	add	x0, x0, #136
	bl	_raw_spin_lock_init
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
	ldr	w8, [sp, #12]
Lloh4:
	adrp	x24, _ALTERA_GPIO_MAX_NGPIO@GOTPAGE
Lloh5:
	ldr	x24, [x24, _ALTERA_GPIO_MAX_NGPIO@GOTPAGEOFF]
	ldr	x2, [x24]
	cmp	x0, #0
	csel	w8, w8, w2, eq
	mov	x22, x20
	str	w8, [x22, #16]!
	cmp	x2, w8, sxtw
	b.hs	LBB0_3
; %bb.2:
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x3, x2
	bl	_dev_warn
	ldr	x8, [x24]
	str	w8, [x22]
LBB0_3:
Lloh8:
	adrp	x8, _altera_gpio_direction_input@GOTPAGE
Lloh9:
	ldr	x8, [x8, _altera_gpio_direction_input@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x20, #88]
Lloh11:
	adrp	x8, _altera_gpio_direction_output@GOTPAGE
Lloh12:
	ldr	x8, [x8, _altera_gpio_direction_output@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _altera_gpio_get@GOTPAGE
Lloh15:
	ldr	x9, [x9, _altera_gpio_get@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #80]
Lloh17:
	adrp	x8, _altera_gpio_set@GOTPAGE
Lloh18:
	ldr	x8, [x8, _altera_gpio_set@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _THIS_MODULE@GOTPAGE
Lloh21:
	ldr	x9, [x9, _THIS_MODULE@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #72]
	str	x19, [x20, #64]
	mov	x0, x19
	mov	w1, #0
	bl	_platform_get_irq
	str	x0, [x20]
	tbnz	x0, #63, LBB0_8
; %bb.4:
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x2, sp, #12
	mov	x0, x21
	bl	_of_property_read_u32
	cbz	x0, LBB0_6
; %bb.5:
Lloh25:
	adrp	x1, l_.str.3@PAGE
Lloh26:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh27:
	adrp	x8, _EINVAL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_11
LBB0_6:
	ldr	w8, [sp, #12]
Lloh29:
	adrp	x9, l_.str.4@PAGE
Lloh30:
	add	x9, x9, l_.str.4@PAGEOFF
	mov	x24, x20
	str	x9, [x24, #96]!
	stur	w8, [x24, #-88]
Lloh31:
	adrp	x9, _altera_gpio_irq_mask@GOTPAGE
Lloh32:
	ldr	x9, [x9, _altera_gpio_irq_mask@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	str	x9, [x24, #32]
Lloh34:
	adrp	x10, _altera_gpio_irq_unmask@GOTPAGE
Lloh35:
	ldr	x10, [x10, _altera_gpio_irq_unmask@GOTPAGEOFF]
Lloh36:
	ldr	w10, [x10]
	str	w10, [x24, #24]
Lloh37:
	adrp	x10, _altera_gpio_irq_set_type@GOTPAGE
Lloh38:
	ldr	x10, [x10, _altera_gpio_irq_set_type@GOTPAGEOFF]
Lloh39:
	ldr	w10, [x10]
Lloh40:
	adrp	x11, _altera_gpio_irq_startup@GOTPAGE
Lloh41:
	ldr	x11, [x11, _altera_gpio_irq_startup@GOTPAGEOFF]
Lloh42:
	ldr	w11, [x11]
	stp	w11, w10, [x24, #16]
	str	x9, [x24, #8]
	stur	x24, [x24, #-40]
Lloh43:
	adrp	x9, _IRQ_TYPE_LEVEL_HIGH@GOTPAGE
Lloh44:
	ldr	x9, [x9, _IRQ_TYPE_LEVEL_HIGH@GOTPAGEOFF]
Lloh45:
	ldr	w9, [x9]
Lloh46:
	adrp	x10, _altera_gpio_irq_leveL_high_handler@GOTPAGE
Lloh47:
	ldr	x10, [x10, _altera_gpio_irq_leveL_high_handler@GOTPAGEOFF]
Lloh48:
	adrp	x11, _altera_gpio_irq_edge_handler@GOTPAGE
Lloh49:
	ldr	x11, [x11, _altera_gpio_irq_edge_handler@GOTPAGEOFF]
	cmp	w8, w9
	csel	x8, x10, x11, eq
	ldr	w8, [x8]
	stur	w8, [x24, #-48]
	mov	w8, #1
	stur	w8, [x24, #-72]
	ldr	w3, [x23]
	mov	x0, x19
	mov	w1, #1
	mov	w2, #8
	bl	_devm_kcalloc
	stur	x0, [x24, #-64]
	cbz	x0, LBB0_10
; %bb.7:
Lloh50:
	adrp	x8, _IRQ_TYPE_NONE@GOTPAGE
Lloh51:
	ldr	x8, [x8, _IRQ_TYPE_NONE@GOTPAGEOFF]
Lloh52:
	adrp	x9, _handle_bad_irq@GOTPAGE
Lloh53:
	ldr	x9, [x9, _handle_bad_irq@GOTPAGEOFF]
Lloh54:
	ldr	w8, [x8]
Lloh55:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #40]
	ldr	x8, [x20]
	str	x8, [x0]
LBB0_8:
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	bl	_of_mm_gpiochip_add_data
	mov	x21, x0
	cbz	w0, LBB0_13
; %bb.9:
Lloh56:
	adrp	x1, l_.str.5@PAGE
Lloh57:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_12
LBB0_10:
Lloh58:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh59:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_12:
	mov	x0, x21
	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_13:
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	b	LBB0_12
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh55
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh54
	.loh AdrpAdd	Lloh56, Lloh57
	.loh AdrpLdrGot	Lloh58, Lloh59
	.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	"altr,ngpio"

	.comm	_ALTERA_GPIO_MAX_NGPIO,8,3      ; @ALTERA_GPIO_MAX_NGPIO
l_.str.1:                               ; @.str.1
	.asciz	"ngpio is greater than %d, defaulting to %d\n"

	.comm	_altera_gpio_direction_input,4,2 ; @altera_gpio_direction_input
	.comm	_altera_gpio_direction_output,4,2 ; @altera_gpio_direction_output
	.comm	_altera_gpio_get,4,2            ; @altera_gpio_get
	.comm	_altera_gpio_set,4,2            ; @altera_gpio_set
	.comm	_THIS_MODULE,4,2                ; @THIS_MODULE
l_.str.2:                               ; @.str.2
	.asciz	"altr,interrupt-type"

l_.str.3:                               ; @.str.3
	.asciz	"altr,interrupt-type value not set in device tree\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.4:                               ; @.str.4
	.asciz	"altera-gpio"

	.comm	_altera_gpio_irq_mask,8,3       ; @altera_gpio_irq_mask
	.comm	_altera_gpio_irq_unmask,4,2     ; @altera_gpio_irq_unmask
	.comm	_altera_gpio_irq_set_type,4,2   ; @altera_gpio_irq_set_type
	.comm	_altera_gpio_irq_startup,4,2    ; @altera_gpio_irq_startup
	.comm	_IRQ_TYPE_LEVEL_HIGH,4,2        ; @IRQ_TYPE_LEVEL_HIGH
	.comm	_altera_gpio_irq_leveL_high_handler,4,2 ; @altera_gpio_irq_leveL_high_handler
	.comm	_altera_gpio_irq_edge_handler,4,2 ; @altera_gpio_irq_edge_handler
	.comm	_IRQ_TYPE_NONE,4,2              ; @IRQ_TYPE_NONE
	.comm	_handle_bad_irq,4,2             ; @handle_bad_irq
l_.str.5:                               ; @.str.5
	.asciz	"Failed adding memory mapped gpiochip\n"

	.no_dead_strip	_altera_gpio_probe
.subsections_via_symbols
