	.file	"extr_gsw_mt7621.c_mtk_gsw_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"gsw"
	.text
	.p2align 4
	.globl	mtk_gsw_init
	.type	mtk_gsw_init, @function
mtk_gsw_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	r12, QWORD PTR 8[rdi]
	mov	rbx, rdi
	mov	rdi, r12
	call	of_find_device_by_node@PLT
	test	rax, rax
	je	.L13
	mov	rbp, rax
	mov	rax, QWORD PTR mediatek_gsw_match[rip]
	mov	rdi, r12
	mov	esi, DWORD PTR [rax]
	call	of_device_is_compatible@PLT
	test	eax, eax
	jne	.L4
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
.L1:
	mov	eax, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	rdi, rbp
	call	platform_get_drvdata@PLT
	mov	rbp, rax
	mov	rax, QWORD PTR [rbx]
	mov	rdi, QWORD PTR 0[rbp]
	mov	QWORD PTR [rax], rbp
	test	rdi, rdi
	jne	.L14
.L5:
	mov	rsi, r12
	mov	rdi, rbp
	xor	r12d, r12d
	call	mt7621_hw_init@PLT
	mov	rdi, QWORD PTR 0[rbp]
	test	rdi, rdi
	je	.L1
	call	enable_irq@PLT
	mov	eax, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	r12d, DWORD PTR ENODEV[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	mov	esi, DWORD PTR gsw_interrupt_mt7621[rip]
	mov	r8, rbx
	lea	rcx, .LC0[rip]
	xor	edx, edx
	call	request_irq@PLT
	mov	rdi, QWORD PTR 0[rbp]
	call	disable_irq@PLT
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	mtk_gsw_init, .-mtk_gsw_init
	.comm	mediatek_gsw_match,8,8
	.comm	gsw_interrupt_mt7621,4,4
	.comm	ENODEV,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_gsw_mt7621.c_mtk_gsw_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"gsw\000"
	.text
	.align	2
	.global	mtk_gsw_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	mtk_gsw_init, %function
mtk_gsw_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r6, [r0, #4]
	mov	r4, r0
	sub	sp, sp, #8
	mov	r0, r6
	bl	of_find_device_by_node
	subs	r5, r0, #0
	beq	.L14
	ldr	r3, .L16
	mov	r0, r6
	ldr	r3, [r3]
	ldr	r1, [r3]
	bl	of_device_is_compatible
	cmp	r0, #0
	bne	.L4
	ldr	r3, .L16+4
	ldr	r0, [r3]
	rsb	r0, r0, #0
.L1:
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L4:
	mov	r0, r5
	bl	platform_get_drvdata
	mov	r5, r0
	ldr	r0, [r0]
	ldr	r3, [r4]
	cmp	r0, #0
	str	r5, [r3]
	bne	.L15
.L5:
	mov	r1, r6
	mov	r0, r5
	bl	mt7621_hw_init
	ldr	r0, [r5]
	cmp	r0, #0
	beq	.L1
	bl	enable_irq
	mov	r0, #0
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L14:
	ldr	r3, .L16+8
	ldr	r0, [r3]
	rsb	r0, r0, #0
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L15:
	ldr	r3, .L16+12
	str	r4, [sp]
	ldr	r1, [r3]
	mov	r2, #0
	ldr	r3, .L16+16
	bl	request_irq
	ldr	r0, [r5]
	bl	disable_irq
	b	.L5
.L17:
	.align	2
.L16:
	.word	mediatek_gsw_match
	.word	EINVAL
	.word	ENODEV
	.word	gsw_interrupt_mt7621
	.word	.LC0
	.size	mtk_gsw_init, .-mtk_gsw_init
	.comm	mediatek_gsw_match,4,4
	.comm	gsw_interrupt_mt7621,4,4
	.comm	ENODEV,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
