	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl8366rb_setup_cascaded_irq
_rtl8366rb_setup_cascaded_irq:          ## @rtl8366rb_setup_cascaded_irq
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	8(%rdi), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_of_get_child_by_name
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	xorl	%ebx, %ebx
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_of_irq_get
	movl	%eax, %r15d
	testl	%eax, %eax
	jle	LBB0_3
## %bb.4:
	movl	16(%r12), %edi
	movq	_RTL8366RB_INTERRUPT_STATUS_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	movq	8(%r12), %rdi
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_13
LBB0_1:
	movq	8(%r12), %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_23
LBB0_3:
	movq	8(%r12), %rdi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	testl	%r15d, %r15d
	cmovnel	%r15d, %ebx
	jmp	LBB0_22
LBB0_6:
	movl	%r15d, %edi
	callq	_irq_get_irq_data
	movl	%eax, %edi
	callq	_irqd_get_trigger_type
	addq	$-128, %rax
	cmpq	$3, %rax
	ja	LBB0_8
## %bb.7:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_9:
	movq	8(%r12), %rdi
	leaq	L_.str.4(%rip), %rsi
	callq	_dev_info
	movl	$0, -44(%rbp)
	xorl	%ecx, %ecx
	jmp	LBB0_11
LBB0_10:
	movq	8(%r12), %rdi
	leaq	L_.str.5(%rip), %rsi
	callq	_dev_info
	movq	_RTL8366RB_INTERRUPT_POLARITY@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, -44(%rbp)
	jmp	LBB0_11
LBB0_8:
	movl	-44(%rbp), %ecx
LBB0_11:
	movl	16(%r12), %edi
	movq	_RTL8366RB_INTERRUPT_CONTROL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RTL8366RB_INTERRUPT_POLARITY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_regmap_update_bits
	movq	8(%r12), %rdi
	testl	%eax, %eax
	je	LBB0_14
## %bb.12:
	movl	%eax, %ebx
	leaq	L_.str.6(%rip), %rsi
LBB0_13:
	xorl	%eax, %eax
	callq	_dev_err
LBB0_22:
	movq	%r14, %rdi
	callq	_of_node_put
LBB0_23:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_rtl8366rb_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_IRQF_ONESHOT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r12, (%rsp)
	leaq	L_.str.7(%rip), %r9
	movl	%r15d, %esi
	xorl	%edx, %edx
	callq	_devm_request_threaded_irq
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:
	movl	%eax, %ebx
	movq	8(%r12), %rdi
	leaq	L_.str.8(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_22
LBB0_16:
	movq	_RTL8366RB_NUM_INTERRUPT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_rtl8366rb_irqdomain_ops@GOTPCREL(%rip), %rdx
	movq	%r14, %rdi
	movq	%r12, %rcx
	callq	_irq_domain_add_linear
	movl	%eax, 4(%r12)
	testl	%eax, %eax
	je	LBB0_24
## %bb.17:
	cmpl	$0, (%r12)
	jle	LBB0_18
## %bb.19:
	xorl	%ebx, %ebx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_irq_create_mapping
	movl	%eax, %edi
	movl	%r15d, %esi
	callq	_irq_set_parent
	cmpl	$2, (%r12)
	jl	LBB0_22
## %bb.20:
	movl	$1, %r13d
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movl	4(%r12), %edi
	movl	%r13d, %esi
	callq	_irq_create_mapping
	movl	%eax, %edi
	movl	%r15d, %esi
	callq	_irq_set_parent
	incl	%r13d
	cmpl	(%r12), %r13d
	jl	LBB0_21
	jmp	LBB0_22
LBB0_24:
	movq	8(%r12), %rdi
	leaq	L_.str.9(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_22
LBB0_18:
	xorl	%ebx, %ebx
	jmp	LBB0_22
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
LJTI0_0:
	.long	L0_0_set_9
	.long	L0_0_set_10
	.long	L0_0_set_9
	.long	L0_0_set_10
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"interrupt-controller"

L_.str.1:                               ## @.str.1
	.asciz	"missing child interrupt-controller node\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"failed to get parent IRQ\n"

	.comm	_RTL8366RB_INTERRUPT_STATUS_REG,4,2 ## @RTL8366RB_INTERRUPT_STATUS_REG
L_.str.3:                               ## @.str.3
	.asciz	"can't read interrupt status\n"

L_.str.4:                               ## @.str.4
	.asciz	"active high/rising IRQ\n"

L_.str.5:                               ## @.str.5
	.asciz	"active low/falling IRQ\n"

	.comm	_RTL8366RB_INTERRUPT_POLARITY,4,2 ## @RTL8366RB_INTERRUPT_POLARITY
	.comm	_RTL8366RB_INTERRUPT_CONTROL_REG,4,2 ## @RTL8366RB_INTERRUPT_CONTROL_REG
L_.str.6:                               ## @.str.6
	.asciz	"could not configure IRQ polarity\n"

	.comm	_rtl8366rb_irq,4,2              ## @rtl8366rb_irq
	.comm	_IRQF_ONESHOT,4,2               ## @IRQF_ONESHOT
L_.str.7:                               ## @.str.7
	.asciz	"RTL8366RB"

L_.str.8:                               ## @.str.8
	.asciz	"unable to request irq: %d\n"

	.comm	_RTL8366RB_NUM_INTERRUPT,4,2    ## @RTL8366RB_NUM_INTERRUPT
	.comm	_rtl8366rb_irqdomain_ops,4,2    ## @rtl8366rb_irqdomain_ops
L_.str.9:                               ## @.str.9
	.asciz	"failed to create IRQ domain\n"

	.no_dead_strip	_rtl8366rb_setup_cascaded_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl8366rb_setup_cascaded_irq
_rtl8366rb_setup_cascaded_irq:          ; @rtl8366rb_setup_cascaded_irq
	.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	x20, x0
	ldr	x8, [x0, #8]
	ldr	w0, [x8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_of_get_child_by_name
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	mov	w1, #0
	bl	_of_irq_get
	mov	x21, x0
	cmp	w0, #0
	b.le	LBB0_5
; %bb.2:
	ldr	w0, [x20, #16]
Lloh2:
	adrp	x8, _RTL8366RB_INTERRUPT_STATUS_REG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RTL8366RB_INTERRUPT_STATUS_REG@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	cbz	w0, LBB0_6
; %bb.3:
	mov	x22, x0
	ldr	x0, [x20, #8]
Lloh5:
	adrp	x1, l_.str.3@PAGE
Lloh6:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_15
LBB0_4:
	ldr	x0, [x20, #8]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_17
LBB0_5:
	ldr	x0, [x20, #8]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w21, #0
	csneg	w22, w21, w8, ne
	b	LBB0_16
LBB0_6:
	mov	x0, x21
	bl	_irq_get_irq_data
	bl	_irqd_get_trigger_type
	sub	x8, x0, #128
Lloh17:
	adrp	x22, _RTL8366RB_INTERRUPT_POLARITY@GOTPAGE
Lloh18:
	ldr	x22, [x22, _RTL8366RB_INTERRUPT_POLARITY@GOTPAGEOFF]
	cmp	x8, #3
	b.hi	LBB0_10
; %bb.7:
Lloh19:
	adrp	x9, lJTI0_0@PAGE
Lloh20:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_8
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_8:
	ldr	x0, [x20, #8]
Lloh21:
	adrp	x1, l_.str.4@PAGE
Lloh22:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_info
	mov	w3, #0
	str	wzr, [sp, #12]
	b	LBB0_11
LBB0_9:
	ldr	x0, [x20, #8]
Lloh23:
	adrp	x1, l_.str.5@PAGE
Lloh24:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_info
	ldr	w3, [x22]
	str	w3, [sp, #12]
	b	LBB0_11
LBB0_10:
	ldr	w3, [sp, #12]
LBB0_11:
	ldr	w0, [x20, #16]
Lloh25:
	adrp	x8, _RTL8366RB_INTERRUPT_CONTROL_REG@GOTPAGE
Lloh26:
	ldr	x8, [x8, _RTL8366RB_INTERRUPT_CONTROL_REG@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	ldr	w2, [x22]
	bl	_regmap_update_bits
	mov	x22, x0
	ldr	x0, [x20, #8]
	cbz	w22, LBB0_13
; %bb.12:
Lloh28:
	adrp	x1, l_.str.6@PAGE
Lloh29:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_15
LBB0_13:
Lloh30:
	adrp	x8, _rtl8366rb_irq@GOTPAGE
Lloh31:
	ldr	x8, [x8, _rtl8366rb_irq@GOTPAGEOFF]
Lloh32:
	ldr	w3, [x8]
Lloh33:
	adrp	x8, _IRQF_ONESHOT@GOTPAGE
Lloh34:
	ldr	x8, [x8, _IRQF_ONESHOT@GOTPAGEOFF]
Lloh35:
	ldr	w4, [x8]
Lloh36:
	adrp	x5, l_.str.7@PAGE
Lloh37:
	add	x5, x5, l_.str.7@PAGEOFF
	mov	x1, x21
	mov	x2, #0
	mov	x6, x20
	bl	_devm_request_threaded_irq
	cbz	w0, LBB0_18
; %bb.14:
	mov	x22, x0
	ldr	x0, [x20, #8]
	str	x22, [sp]
Lloh38:
	adrp	x1, l_.str.8@PAGE
Lloh39:
	add	x1, x1, l_.str.8@PAGEOFF
LBB0_15:
	bl	_dev_err
LBB0_16:
	mov	x0, x19
	bl	_of_node_put
LBB0_17:
	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
LBB0_18:
Lloh40:
	adrp	x8, _RTL8366RB_NUM_INTERRUPT@GOTPAGE
Lloh41:
	ldr	x8, [x8, _RTL8366RB_NUM_INTERRUPT@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
Lloh43:
	adrp	x2, _rtl8366rb_irqdomain_ops@GOTPAGE
Lloh44:
	ldr	x2, [x2, _rtl8366rb_irqdomain_ops@GOTPAGEOFF]
	mov	x0, x19
	mov	x3, x20
	bl	_irq_domain_add_linear
	str	w0, [x20, #4]
	cbz	w0, LBB0_23
; %bb.19:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_24
; %bb.20:
	mov	w1, #0
	bl	_irq_create_mapping
	mov	x1, x21
	bl	_irq_set_parent
	mov	w22, #0
	ldr	w8, [x20]
	cmp	w8, #2
	b.lt	LBB0_16
; %bb.21:
	mov	w23, #1
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20, #4]
	mov	x1, x23
	bl	_irq_create_mapping
	mov	x1, x21
	bl	_irq_set_parent
	mov	w22, #0
	add	w23, w23, #1
	ldr	w8, [x20]
	cmp	w23, w8
	b.lt	LBB0_22
	b	LBB0_16
LBB0_23:
	ldr	x0, [x20, #8]
Lloh45:
	adrp	x1, l_.str.9@PAGE
Lloh46:
	add	x1, x1, l_.str.9@PAGEOFF
	bl	_dev_err
Lloh47:
	adrp	x8, _EINVAL@GOTPAGE
Lloh48:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh49:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_16
LBB0_24:
	mov	w22, #0
	b	LBB0_16
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpAdd	Lloh45, Lloh46
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_8-LBB0_8)>>2
	.byte	(LBB0_9-LBB0_8)>>2
	.byte	(LBB0_8-LBB0_8)>>2
	.byte	(LBB0_9-LBB0_8)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"interrupt-controller"

l_.str.1:                               ; @.str.1
	.asciz	"missing child interrupt-controller node\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"failed to get parent IRQ\n"

	.comm	_RTL8366RB_INTERRUPT_STATUS_REG,4,2 ; @RTL8366RB_INTERRUPT_STATUS_REG
l_.str.3:                               ; @.str.3
	.asciz	"can't read interrupt status\n"

l_.str.4:                               ; @.str.4
	.asciz	"active high/rising IRQ\n"

l_.str.5:                               ; @.str.5
	.asciz	"active low/falling IRQ\n"

	.comm	_RTL8366RB_INTERRUPT_POLARITY,4,2 ; @RTL8366RB_INTERRUPT_POLARITY
	.comm	_RTL8366RB_INTERRUPT_CONTROL_REG,4,2 ; @RTL8366RB_INTERRUPT_CONTROL_REG
l_.str.6:                               ; @.str.6
	.asciz	"could not configure IRQ polarity\n"

	.comm	_rtl8366rb_irq,4,2              ; @rtl8366rb_irq
	.comm	_IRQF_ONESHOT,4,2               ; @IRQF_ONESHOT
l_.str.7:                               ; @.str.7
	.asciz	"RTL8366RB"

l_.str.8:                               ; @.str.8
	.asciz	"unable to request irq: %d\n"

	.comm	_RTL8366RB_NUM_INTERRUPT,4,2    ; @RTL8366RB_NUM_INTERRUPT
	.comm	_rtl8366rb_irqdomain_ops,4,2    ; @rtl8366rb_irqdomain_ops
l_.str.9:                               ; @.str.9
	.asciz	"failed to create IRQ domain\n"

	.no_dead_strip	_rtl8366rb_setup_cascaded_irq
.subsections_via_symbols
