	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmstb_gpio_irq_setup
_brcmstb_gpio_irq_setup:                ## @brcmstb_gpio_irq_setup
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	(%rdi), %r15
	movl	56(%rsi), %esi
	movq	_brcmstb_gpio_irq_domain_ops@GOTPCREL(%rip), %rdx
	movq	%r15, %rdi
	movq	%rbx, %rcx
	callq	_irq_domain_add_linear
	movl	%eax, 8(%rbx)
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_of_property_read_bool
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_platform_get_irq
	movq	%rax, (%rbx)
	testq	%rax, %rax
	js	LBB0_4
## %bb.8:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_device_set_wakeup_capable
	movq	%r14, %rdi
	callq	_device_wakeup_enable
	movq	(%rbx), %rsi
	movq	_brcmstb_gpio_wake_irq_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_IRQF_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.3(%rip), %r8
	movq	%r14, %rdi
	movq	%rbx, %r9
	callq	_devm_request_irq
	testl	%eax, %eax
	jns	LBB0_5
## %bb.9:
	movl	%eax, %r15d
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movl	8(%rbx), %edi
	callq	_irq_domain_remove
	jmp	LBB0_10
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_ENXIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_10
LBB0_4:
	movq	$0, (%rbx)
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_warn
LBB0_5:
	movq	%r14, %rdi
	callq	_dev_name
	movl	%eax, 48(%rbx)
	movq	_brcmstb_gpio_irq_mask@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 40(%rbx)
	movq	%rax, 32(%rbx)
	movq	_brcmstb_gpio_irq_unmask@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movq	_brcmstb_gpio_irq_ack@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	_brcmstb_gpio_irq_set_type@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	cmpq	$0, (%rbx)
	je	LBB0_7
## %bb.6:
	movq	_brcmstb_gpio_irq_set_wake@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
LBB0_7:
	movl	12(%rbx), %edi
	movq	_brcmstb_gpio_irq_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdx
	callq	_irq_set_chained_handler_and_data
	movl	12(%rbx), %edi
	movq	_IRQ_DISABLE_UNLAZY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_irq_set_status_flags
	xorl	%r15d, %r15d
LBB0_10:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_brcmstb_gpio_irq_domain_ops,4,2 ## @brcmstb_gpio_irq_domain_ops
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Couldn't allocate IRQ domain\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.1:                               ## @.str.1
	.asciz	"wakeup-source"

L_.str.2:                               ## @.str.2
	.asciz	"Couldn't get wake IRQ - GPIOs will not be able to wake from sleep"

	.comm	_brcmstb_gpio_wake_irq_handler,4,2 ## @brcmstb_gpio_wake_irq_handler
	.comm	_IRQF_SHARED,4,2                ## @IRQF_SHARED
L_.str.3:                               ## @.str.3
	.asciz	"brcmstb-gpio-wake"

L_.str.4:                               ## @.str.4
	.asciz	"Couldn't request wake IRQ"

	.comm	_brcmstb_gpio_irq_mask,8,3      ## @brcmstb_gpio_irq_mask
	.comm	_brcmstb_gpio_irq_unmask,4,2    ## @brcmstb_gpio_irq_unmask
	.comm	_brcmstb_gpio_irq_ack,4,2       ## @brcmstb_gpio_irq_ack
	.comm	_brcmstb_gpio_irq_set_type,4,2  ## @brcmstb_gpio_irq_set_type
	.comm	_brcmstb_gpio_irq_set_wake,4,2  ## @brcmstb_gpio_irq_set_wake
	.comm	_brcmstb_gpio_irq_handler,4,2   ## @brcmstb_gpio_irq_handler
	.comm	_IRQ_DISABLE_UNLAZY,4,2         ## @IRQ_DISABLE_UNLAZY
	.no_dead_strip	_brcmstb_gpio_irq_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmstb_gpio_irq_setup
_brcmstb_gpio_irq_setup:                ; @brcmstb_gpio_irq_setup
	.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	x19, x1
	mov	x20, x0
	ldr	x21, [x0]
	ldr	w1, [x1, #56]
Lloh0:
	adrp	x2, _brcmstb_gpio_irq_domain_ops@GOTPAGE
Lloh1:
	ldr	x2, [x2, _brcmstb_gpio_irq_domain_ops@GOTPAGEOFF]
	mov	x0, x21
	mov	x3, x19
	bl	_irq_domain_add_linear
	str	w0, [x19, #8]
	cbz	w0, LBB0_5
; %bb.1:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_of_property_read_bool
	cbz	x0, LBB0_7
; %bb.2:
	mov	x0, x20
	mov	w1, #1
	bl	_platform_get_irq
	str	x0, [x19]
	tbnz	x0, #63, LBB0_6
; %bb.3:
	mov	x0, x20
	mov	w1, #1
	bl	_device_set_wakeup_capable
	mov	x0, x20
	bl	_device_wakeup_enable
	ldr	x1, [x19]
Lloh4:
	adrp	x8, _brcmstb_gpio_wake_irq_handler@GOTPAGE
Lloh5:
	ldr	x8, [x8, _brcmstb_gpio_wake_irq_handler@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
Lloh7:
	adrp	x8, _IRQF_SHARED@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IRQF_SHARED@GOTPAGEOFF]
Lloh9:
	ldr	w3, [x8]
Lloh10:
	adrp	x4, l_.str.3@PAGE
Lloh11:
	add	x4, x4, l_.str.3@PAGEOFF
	mov	x0, x20
	mov	x5, x19
	bl	_devm_request_irq
	tbz	w0, #31, LBB0_7
; %bb.4:
	mov	x21, x0
Lloh12:
	adrp	x1, l_.str.4@PAGE
Lloh13:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	w0, [x19, #8]
	bl	_irq_domain_remove
	b	LBB0_10
LBB0_5:
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh16:
	adrp	x8, _ENXIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_10
LBB0_6:
	str	xzr, [x19]
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_warn
LBB0_7:
	mov	x0, x20
	bl	_dev_name
	str	w0, [x19, #48]
Lloh21:
	adrp	x8, _brcmstb_gpio_irq_mask@GOTPAGE
Lloh22:
	ldr	x8, [x8, _brcmstb_gpio_irq_mask@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
Lloh24:
	adrp	x9, _brcmstb_gpio_irq_unmask@GOTPAGE
Lloh25:
	ldr	x9, [x9, _brcmstb_gpio_irq_unmask@GOTPAGEOFF]
	stp	x8, x8, [x19, #32]
Lloh26:
	ldr	w8, [x9]
	str	w8, [x19, #28]
Lloh27:
	adrp	x8, _brcmstb_gpio_irq_ack@GOTPAGE
Lloh28:
	ldr	x8, [x8, _brcmstb_gpio_irq_ack@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
Lloh30:
	adrp	x9, _brcmstb_gpio_irq_set_type@GOTPAGE
Lloh31:
	ldr	x9, [x9, _brcmstb_gpio_irq_set_type@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #20]
	ldr	x8, [x19]
	cbz	x8, LBB0_9
; %bb.8:
Lloh33:
	adrp	x8, _brcmstb_gpio_irq_set_wake@GOTPAGE
Lloh34:
	ldr	x8, [x8, _brcmstb_gpio_irq_set_wake@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	str	w8, [x19, #16]
LBB0_9:
	ldr	w0, [x19, #12]
Lloh36:
	adrp	x8, _brcmstb_gpio_irq_handler@GOTPAGE
Lloh37:
	ldr	x8, [x8, _brcmstb_gpio_irq_handler@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
	mov	x2, x19
	bl	_irq_set_chained_handler_and_data
	ldr	w0, [x19, #12]
Lloh39:
	adrp	x8, _IRQ_DISABLE_UNLAZY@GOTPAGE
Lloh40:
	ldr	x8, [x8, _IRQ_DISABLE_UNLAZY@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
	bl	_irq_set_status_flags
	mov	w21, #0
LBB0_10:
	mov	x0, x21
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_brcmstb_gpio_irq_domain_ops,4,2 ; @brcmstb_gpio_irq_domain_ops
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Couldn't allocate IRQ domain\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.1:                               ; @.str.1
	.asciz	"wakeup-source"

l_.str.2:                               ; @.str.2
	.asciz	"Couldn't get wake IRQ - GPIOs will not be able to wake from sleep"

	.comm	_brcmstb_gpio_wake_irq_handler,4,2 ; @brcmstb_gpio_wake_irq_handler
	.comm	_IRQF_SHARED,4,2                ; @IRQF_SHARED
l_.str.3:                               ; @.str.3
	.asciz	"brcmstb-gpio-wake"

l_.str.4:                               ; @.str.4
	.asciz	"Couldn't request wake IRQ"

	.comm	_brcmstb_gpio_irq_mask,8,3      ; @brcmstb_gpio_irq_mask
	.comm	_brcmstb_gpio_irq_unmask,4,2    ; @brcmstb_gpio_irq_unmask
	.comm	_brcmstb_gpio_irq_ack,4,2       ; @brcmstb_gpio_irq_ack
	.comm	_brcmstb_gpio_irq_set_type,4,2  ; @brcmstb_gpio_irq_set_type
	.comm	_brcmstb_gpio_irq_set_wake,4,2  ; @brcmstb_gpio_irq_set_wake
	.comm	_brcmstb_gpio_irq_handler,4,2   ; @brcmstb_gpio_irq_handler
	.comm	_IRQ_DISABLE_UNLAZY,4,2         ; @IRQ_DISABLE_UNLAZY
	.no_dead_strip	_brcmstb_gpio_irq_setup
.subsections_via_symbols
