	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt753x_hw_reset
_mt753x_hw_reset:                       ## @mt753x_hw_reset
	.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	%rdi, %r14
	movq	8(%rdi), %rax
	movq	(%rax), %rbx
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_of_property_read_bool
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movq	8(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_devm_reset_control_get
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_IS_ERR
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movq	8(%r14), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_9
LBB0_4:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_of_get_named_gpio
	movl	%eax, (%r14)
	movq	8(%r14), %rdi
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	leaq	L_.str.5(%rip), %rdx
	movl	%eax, %esi
	callq	_devm_gpio_request
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %r15d
	movq	8(%r14), %rdi
	movl	(%r14), %edx
	leaq	L_.str.6(%rip), %rsi
	callq	_dev_info
	jmp	LBB0_9
LBB0_3:
	movq	%rbx, %rdi
	callq	_reset_control_assert
	movl	$30, %edi
	callq	_msleep
	movq	%rbx, %rdi
	callq	_reset_control_deassert
	movl	$-1, (%r14)
	xorl	%r15d, %r15d
	jmp	LBB0_9
LBB0_5:
	leaq	L_.str.4(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_9
LBB0_8:
	movl	(%r14), %edi
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	callq	_gpio_direction_output
	movl	$30, %edi
	callq	_msleep
	movl	(%r14), %edi
	movl	$1, %esi
	callq	_gpio_set_value
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_msleep
LBB0_9:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mediatek,mcm"

L_.str.1:                               ## @.str.1
	.asciz	"mcm"

L_.str.2:                               ## @.str.2
	.asciz	"Missing reset ctrl of switch\n"

L_.str.3:                               ## @.str.3
	.asciz	"reset-gpios"

L_.str.4:                               ## @.str.4
	.asciz	"Missing reset pin of switch\n"

L_.str.5:                               ## @.str.5
	.asciz	"mt753x-reset"

L_.str.6:                               ## @.str.6
	.asciz	"Failed to request gpio %d\n"

	.no_dead_strip	_mt753x_hw_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt753x_hw_reset
_mt753x_hw_reset:                       ; @mt753x_hw_reset
	.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
	ldr	x8, [x0, #8]
	ldr	x20, [x8]
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_of_property_read_bool
	cbz	w0, LBB0_3
; %bb.1:
	ldr	x0, [x19, #8]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_devm_reset_control_get
	mov	x21, x0
	bl	_IS_ERR
	mov	x20, x0
	mov	x0, x21
	bl	_IS_ERR
	cbz	w0, LBB0_6
; %bb.2:
	ldr	x0, [x19, #8]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	b	LBB0_9
LBB0_3:
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	mov	w2, #0
	bl	_of_get_named_gpio
	mov	x1, x0
	str	w0, [x19]
	ldr	x0, [x19, #8]
	tbnz	w1, #31, LBB0_7
; %bb.4:
Lloh11:
	adrp	x2, l_.str.5@PAGE
Lloh12:
	add	x2, x2, l_.str.5@PAGEOFF
	bl	_devm_gpio_request
	mov	x20, x0
	cbz	w0, LBB0_8
; %bb.5:
	ldr	x0, [x19, #8]
	ldr	w2, [x19]
Lloh13:
	adrp	x1, l_.str.6@PAGE
Lloh14:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_dev_info
	b	LBB0_9
LBB0_6:
	mov	x0, x21
	bl	_reset_control_assert
	mov	w0, #30
	bl	_msleep
	mov	x0, x21
	bl	_reset_control_deassert
	mov	w20, #0
	mov	w8, #-1
	str	w8, [x19]
	b	LBB0_9
LBB0_7:
	neg	w20, w21
Lloh15:
	adrp	x1, l_.str.4@PAGE
Lloh16:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_err
	b	LBB0_9
LBB0_8:
	ldr	w0, [x19]
	mov	w1, #0
	bl	_gpio_direction_output
	mov	w0, #30
	bl	_msleep
	ldr	w0, [x19]
	mov	w1, #1
	bl	_gpio_set_value
	mov	w0, #500
	bl	_msleep
LBB0_9:
	mov	x0, x20
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mediatek,mcm"

l_.str.1:                               ; @.str.1
	.asciz	"mcm"

l_.str.2:                               ; @.str.2
	.asciz	"Missing reset ctrl of switch\n"

l_.str.3:                               ; @.str.3
	.asciz	"reset-gpios"

l_.str.4:                               ; @.str.4
	.asciz	"Missing reset pin of switch\n"

l_.str.5:                               ; @.str.5
	.asciz	"mt753x-reset"

l_.str.6:                               ; @.str.6
	.asciz	"Failed to request gpio %d\n"

	.no_dead_strip	_mt753x_hw_reset
.subsections_via_symbols
