	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gsw_interrupt_mt7620
_gsw_interrupt_mt7620:                  ## @gsw_interrupt_mt7620
	.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	%rsi, %r12
	movq	8(%rsi), %rax
	movq	(%rax), %r14
	movq	(%r14), %r13
	movq	_PORT4_EPHY@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	_GSW_REG_ISR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_mtk_switch_r32
	movq	_PORT_IRQ_ST_CHG@GOTPCREL(%rip), %rcx
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.1:
	xorl	%r15d, %r15d
	cmpq	%rbx, %r13
	sete	%r15b
	orq	$4, %r15
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r13d, (%rcx,%rbx,4)
	incq	%rbx
	cmpq	%rbx, %r15
	je	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_GSW_REG_PORT_STATUS
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_mtk_switch_r32
	movl	%eax, %r13d
	andl	$1, %r13d
	movq	(%r12), %rcx
	cmpl	(%rcx,%rbx,4), %r13d
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %ecx
	shrl	$2, %ecx
	andl	$3, %ecx
	andl	$2, %eax
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%r13d, %edx
	movl	%eax, %r8d
	callq	_mt7620_print_link_state
	movq	(%r12), %rcx
	jmp	LBB0_4
LBB0_5:
	movq	%r12, %rdi
	callq	_mt7620_handle_carrier
	movq	_GSW_REG_ISR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_mtk_switch_w32
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PORT4_EPHY,8,3                 ## @PORT4_EPHY
	.comm	_GSW_REG_ISR,4,2                ## @GSW_REG_ISR
	.comm	_PORT_IRQ_ST_CHG,4,2            ## @PORT_IRQ_ST_CHG
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_gsw_interrupt_mt7620
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gsw_interrupt_mt7620
_gsw_interrupt_mt7620:                  ; @gsw_interrupt_mt7620
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	ldr	x8, [x1, #8]
	ldr	x19, [x8]
	ldr	x24, [x19]
Lloh0:
	adrp	x8, _PORT4_EPHY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PORT4_EPHY@GOTPAGEOFF]
Lloh2:
	ldr	x25, [x8]
Lloh3:
	adrp	x23, _GSW_REG_ISR@GOTPAGE
Lloh4:
	ldr	x23, [x23, _GSW_REG_ISR@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_mtk_switch_r32
	mov	x21, x0
Lloh5:
	adrp	x8, _PORT_IRQ_ST_CHG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PORT_IRQ_ST_CHG@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_13
; %bb.1:
	mov	w0, #0
	bl	_GSW_REG_PORT_STATUS
	mov	x1, x0
	mov	x0, x19
	bl	_mtk_switch_r32
	and	w22, w0, #0x1
	ldr	x8, [x20]
	ldr	w9, [x8]
	cmp	w22, w9
	b.eq	LBB0_3
; %bb.2:
	ubfx	w3, w0, #2, #2
	and	w4, w0, #0x2
	mov	x0, x20
	mov	w1, #0
	mov	x2, x22
	bl	_mt7620_print_link_state
	ldr	x8, [x20]
LBB0_3:
	str	w22, [x8]
	mov	w0, #1
	bl	_GSW_REG_PORT_STATUS
	mov	x1, x0
	mov	x0, x19
	bl	_mtk_switch_r32
	and	w22, w0, #0x1
	ldr	x8, [x20]
	ldr	w9, [x8, #4]
	cmp	w22, w9
	b.eq	LBB0_5
; %bb.4:
	ubfx	w3, w0, #2, #2
	and	w4, w0, #0x2
	mov	x0, x20
	mov	w1, #1
	mov	x2, x22
	bl	_mt7620_print_link_state
	ldr	x8, [x20]
LBB0_5:
	str	w22, [x8, #4]
	mov	w0, #2
	bl	_GSW_REG_PORT_STATUS
	mov	x1, x0
	mov	x0, x19
	bl	_mtk_switch_r32
	and	w22, w0, #0x1
	ldr	x8, [x20]
	ldr	w9, [x8, #8]
	cmp	w22, w9
	b.eq	LBB0_7
; %bb.6:
	ubfx	w3, w0, #2, #2
	and	w4, w0, #0x2
	mov	x0, x20
	mov	w1, #2
	mov	x2, x22
	bl	_mt7620_print_link_state
	ldr	x8, [x20]
LBB0_7:
	str	w22, [x8, #8]
	mov	w0, #3
	bl	_GSW_REG_PORT_STATUS
	mov	x1, x0
	mov	x0, x19
	bl	_mtk_switch_r32
	and	w22, w0, #0x1
	ldr	x8, [x20]
	ldr	w9, [x8, #12]
	cmp	w22, w9
	b.eq	LBB0_9
; %bb.8:
	ubfx	w3, w0, #2, #2
	and	w4, w0, #0x2
	mov	x0, x20
	mov	w1, #3
	mov	x2, x22
	bl	_mt7620_print_link_state
	ldr	x8, [x20]
LBB0_9:
	str	w22, [x8, #12]
	cmp	x24, x25
	b.ne	LBB0_13
; %bb.10:
	mov	w0, #4
	bl	_GSW_REG_PORT_STATUS
	mov	x1, x0
	mov	x0, x19
	bl	_mtk_switch_r32
	and	w22, w0, #0x1
	ldr	x8, [x20]
	ldr	w9, [x8, #16]
	cmp	w22, w9
	b.eq	LBB0_12
; %bb.11:
	ubfx	w3, w0, #2, #2
	and	w4, w0, #0x2
	mov	x0, x20
	mov	w1, #4
	mov	x2, x22
	bl	_mt7620_print_link_state
	ldr	x8, [x20]
LBB0_12:
	str	w22, [x8, #16]
LBB0_13:
	mov	x0, x20
	bl	_mt7620_handle_carrier
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x21
	bl	_mtk_switch_w32
Lloh8:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_PORT4_EPHY,8,3                 ; @PORT4_EPHY
	.comm	_GSW_REG_ISR,4,2                ; @GSW_REG_ISR
	.comm	_PORT_IRQ_ST_CHG,4,2            ; @PORT_IRQ_ST_CHG
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_gsw_interrupt_mt7620
.subsections_via_symbols
