	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cgx_fwi_event_handler
_cgx_fwi_event_handler:                 ## @cgx_fwi_event_handler
	.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	8(%rsi), %rdi
	movl	4(%rsi), %esi
	movq	_CGX_EVENT_REG@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	callq	_cgx_read
	movl	%eax, %r14d
	movq	_EVTREG_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, %esi
	callq	_FIELD_GET
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_EVTREG_EVT_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, %esi
	callq	_FIELD_GET
	cmpl	$129, %eax
	je	LBB0_7
## %bb.3:
	cmpl	$128, %eax
	jne	LBB0_9
## %bb.4:
	movl	%r14d, 20(%rbx)
	xorl	%eax, %eax
	callq	_smp_wmb
	movl	%r14d, %edi
	callq	_cgx_cmdresp_is_linkevent
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%r14d, %edi
	movq	%rbx, %rsi
	callq	_cgx_link_change_handler
LBB0_6:
	movl	$0, (%rbx)
	leaq	16(%rbx), %rdi
	callq	_wake_up_interruptible
	jmp	LBB0_9
LBB0_1:
	movq	_IRQ_NONE@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_7:
	movl	%r14d, %edi
	callq	_cgx_event_is_linkevent
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%r14d, %edi
	movq	%rbx, %rsi
	callq	_cgx_link_change_handler
LBB0_9:
	movq	8(%rbx), %rdi
	movl	4(%rbx), %esi
	movl	(%r15), %edx
	xorl	%ecx, %ecx
	callq	_cgx_write
	movq	8(%rbx), %rdi
	movl	4(%rbx), %esi
	movq	_CGXX_CMRX_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_FW_CGX_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_cgx_write
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CGX_EVENT_REG,4,2              ## @CGX_EVENT_REG
	.comm	_EVTREG_ACK,4,2                 ## @EVTREG_ACK
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.comm	_EVTREG_EVT_TYPE,4,2            ## @EVTREG_EVT_TYPE
	.comm	_CGXX_CMRX_INT,4,2              ## @CGXX_CMRX_INT
	.comm	_FW_CGX_INT,4,2                 ## @FW_CGX_INT
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_cgx_fwi_event_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cgx_fwi_event_handler
_cgx_fwi_event_handler:                 ; @cgx_fwi_event_handler
	.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
	ldr	x0, [x1, #8]
	ldr	w1, [x1, #4]
Lloh0:
	adrp	x21, _CGX_EVENT_REG@GOTPAGE
Lloh1:
	ldr	x21, [x21, _CGX_EVENT_REG@GOTPAGEOFF]
	ldr	w2, [x21]
	bl	_cgx_read
	mov	x20, x0
Lloh2:
	adrp	x8, _EVTREG_ACK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EVTREG_ACK@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_FIELD_GET
	cbz	w0, LBB0_6
; %bb.1:
Lloh5:
	adrp	x8, _EVTREG_EVT_TYPE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EVTREG_EVT_TYPE@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_FIELD_GET
	cmp	w0, #129
	b.eq	LBB0_7
; %bb.2:
	cmp	w0, #128
	b.ne	LBB0_9
; %bb.3:
	str	w20, [x19, #20]
	bl	_smp_wmb
	mov	x0, x20
	bl	_cgx_cmdresp_is_linkevent
	cbz	w0, LBB0_5
; %bb.4:
	mov	x0, x20
	mov	x1, x19
	bl	_cgx_link_change_handler
LBB0_5:
	mov	x0, x19
	str	wzr, [x0], #16
	bl	_wake_up_interruptible
	b	LBB0_9
LBB0_6:
Lloh8:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
	b	LBB0_10
LBB0_7:
	mov	x0, x20
	bl	_cgx_event_is_linkevent
	cbz	w0, LBB0_9
; %bb.8:
	mov	x0, x20
	mov	x1, x19
	bl	_cgx_link_change_handler
LBB0_9:
	ldr	x0, [x19, #8]
	ldr	w1, [x19, #4]
	ldr	w2, [x21]
	mov	w3, #0
	bl	_cgx_write
	ldr	x0, [x19, #8]
	ldr	w1, [x19, #4]
Lloh10:
	adrp	x8, _CGXX_CMRX_INT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CGXX_CMRX_INT@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
Lloh13:
	adrp	x8, _FW_CGX_INT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _FW_CGX_INT@GOTPAGEOFF]
Lloh15:
	ldr	w3, [x8]
	bl	_cgx_write
Lloh16:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
LBB0_10:
	ldr	w0, [x8]
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_CGX_EVENT_REG,4,2              ; @CGX_EVENT_REG
	.comm	_EVTREG_ACK,4,2                 ; @EVTREG_ACK
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.comm	_EVTREG_EVT_TYPE,4,2            ; @EVTREG_EVT_TYPE
	.comm	_CGXX_CMRX_INT,4,2              ; @CGXX_CMRX_INT
	.comm	_FW_CGX_INT,4,2                 ; @FW_CGX_INT
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_cgx_fwi_event_handler
.subsections_via_symbols
