	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function chv_gpio_irq_startup
_chv_gpio_irq_startup:                  ## @chv_gpio_irq_startup
	.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	%rdi, %r12
	callq	_irqd_get_trigger_type
	movq	_IRQ_TYPE_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.1:
	movq	%r12, %rdi
	callq	_irq_data_get_irq_chip_data
	movq	%rax, %rdi
	callq	_gpiochip_get_data
	movq	%rax, %r14
	movq	%r12, %rdi
	callq	_irqd_to_hwirq
	movl	%eax, %r15d
	movq	_chv_lock@GOTPCREL(%rip), %rdi
	callq	_raw_spin_lock_irqsave
	movq	_CHV_PADCTRL0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_chv_padreg
	movl	%eax, %edi
	callq	_readl
	movl	%eax, %ebx
	movq	_CHV_PADCTRL0_INTSEL_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movq	_CHV_PADCTRL0_INTSEL_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %ebx
	movq	_CHV_PADCTRL1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_chv_padreg
	movl	%eax, %edi
	callq	_readl
	movq	(%r14), %rcx
	movslq	%ebx, %rbx
	cmpl	$0, (%rcx,%rbx,4)
	jne	LBB0_6
## %bb.2:
	movq	_CHV_PADCTRL1_INTWAKECFG_LEVEL@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	jne	LBB0_3
## %bb.4:
	movq	_handle_edge_irq@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_handle_level_irq@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_irq_set_handler_locked
	movq	(%r14), %rax
	movl	%r15d, (%rax,%rbx,4)
LBB0_6:
	movq	_chv_lock@GOTPCREL(%rip), %rdi
	callq	_raw_spin_unlock_irqrestore
LBB0_7:
	movq	%r12, %rdi
	callq	_chv_gpio_irq_unmask
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_TYPE_NONE,8,3              ## @IRQ_TYPE_NONE
	.comm	_chv_lock,4,2                   ## @chv_lock
	.comm	_CHV_PADCTRL0,4,2               ## @CHV_PADCTRL0
	.comm	_CHV_PADCTRL0_INTSEL_MASK,4,2   ## @CHV_PADCTRL0_INTSEL_MASK
	.comm	_CHV_PADCTRL0_INTSEL_SHIFT,4,2  ## @CHV_PADCTRL0_INTSEL_SHIFT
	.comm	_CHV_PADCTRL1,4,2               ## @CHV_PADCTRL1
	.comm	_CHV_PADCTRL1_INTWAKECFG_LEVEL,4,2 ## @CHV_PADCTRL1_INTWAKECFG_LEVEL
	.comm	_handle_level_irq,4,2           ## @handle_level_irq
	.comm	_handle_edge_irq,4,2            ## @handle_edge_irq
	.no_dead_strip	_chv_gpio_irq_startup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function chv_gpio_irq_startup
_chv_gpio_irq_startup:                  ; @chv_gpio_irq_startup
	.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, x0
	bl	_irqd_get_trigger_type
Lloh0:
	adrp	x8, _IRQ_TYPE_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IRQ_TYPE_NONE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.1:
	mov	x0, x19
	bl	_irq_data_get_irq_chip_data
	bl	_gpiochip_get_data
	mov	x20, x0
	mov	x0, x19
	bl	_irqd_to_hwirq
	mov	x21, x0
Lloh3:
	adrp	x0, _chv_lock@GOTPAGE
Lloh4:
	ldr	x0, [x0, _chv_lock@GOTPAGEOFF]
	bl	_raw_spin_lock_irqsave
Lloh5:
	adrp	x8, _CHV_PADCTRL0@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CHV_PADCTRL0@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_chv_padreg
	bl	_readl
Lloh8:
	adrp	x8, _CHV_PADCTRL0_INTSEL_MASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CHV_PADCTRL0_INTSEL_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _CHV_PADCTRL0_INTSEL_SHIFT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _CHV_PADCTRL0_INTSEL_SHIFT@GOTPAGEOFF]
	and	w8, w8, w0
Lloh13:
	ldr	w9, [x9]
	asr	w22, w8, w9
Lloh14:
	adrp	x8, _CHV_PADCTRL1@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CHV_PADCTRL1@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_chv_padreg
	bl	_readl
	ldr	x8, [x20]
	ldr	w8, [x8, w22, sxtw #2]
	cbnz	w8, LBB0_3
; %bb.2:
	sxtw	x22, w22
Lloh17:
	adrp	x8, _CHV_PADCTRL1_INTWAKECFG_LEVEL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _CHV_PADCTRL1_INTWAKECFG_LEVEL@GOTPAGEOFF]
Lloh19:
	adrp	x9, _handle_edge_irq@GOTPAGE
Lloh20:
	ldr	x9, [x9, _handle_edge_irq@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
Lloh22:
	adrp	x10, _handle_level_irq@GOTPAGE
Lloh23:
	ldr	x10, [x10, _handle_level_irq@GOTPAGEOFF]
	tst	w8, w0
	csel	x8, x9, x10, eq
	ldr	w1, [x8]
	mov	x0, x19
	bl	_irq_set_handler_locked
	ldr	x8, [x20]
	str	w21, [x8, x22, lsl #2]
LBB0_3:
Lloh24:
	adrp	x0, _chv_lock@GOTPAGE
Lloh25:
	ldr	x0, [x0, _chv_lock@GOTPAGEOFF]
	bl	_raw_spin_unlock_irqrestore
LBB0_4:
	mov	x0, x19
	bl	_chv_gpio_irq_unmask
	mov	w0, #0
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh21
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_TYPE_NONE,8,3              ; @IRQ_TYPE_NONE
	.comm	_chv_lock,4,2                   ; @chv_lock
	.comm	_CHV_PADCTRL0,4,2               ; @CHV_PADCTRL0
	.comm	_CHV_PADCTRL0_INTSEL_MASK,4,2   ; @CHV_PADCTRL0_INTSEL_MASK
	.comm	_CHV_PADCTRL0_INTSEL_SHIFT,4,2  ; @CHV_PADCTRL0_INTSEL_SHIFT
	.comm	_CHV_PADCTRL1,4,2               ; @CHV_PADCTRL1
	.comm	_CHV_PADCTRL1_INTWAKECFG_LEVEL,4,2 ; @CHV_PADCTRL1_INTWAKECFG_LEVEL
	.comm	_handle_level_irq,4,2           ; @handle_level_irq
	.comm	_handle_edge_irq,4,2            ; @handle_edge_irq
	.no_dead_strip	_chv_gpio_irq_startup
.subsections_via_symbols
