	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt76x2_init_hardware
_mt76x2_init_hardware:                  ## @mt76x2_init_hardware
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_mt76x02_dma_disable
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_mt76x2_reset_wlan
	movq	%r14, %rdi
	callq	_mt76x2_power_on
	movq	%r14, %rdi
	callq	_mt76x2_eeprom_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_mt76x2_mac_reset
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.2:
	movq	_MT_RX_FILTR_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_mt76_rr
	movl	%eax, 4(%r14)
	movq	%r14, %rdi
	callq	_mt76x02_dma_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movq	_MT76_STATE_INITIALIZED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_set_bit
	movq	%r14, %rdi
	callq	_mt76x2_mac_start
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	movq	%r14, %rdi
	callq	_mt76x2_mcu_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_mt76x2_mac_stop
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MT_RX_FILTR_CFG,4,2            ## @MT_RX_FILTR_CFG
	.comm	_MT76_STATE_INITIALIZED,4,2     ## @MT76_STATE_INITIALIZED
	.no_dead_strip	_mt76x2_init_hardware
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt76x2_init_hardware
_mt76x2_init_hardware:                  ; @mt76x2_init_hardware
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_mt76x02_dma_disable
	mov	x0, x19
	mov	w1, #1
	bl	_mt76x2_reset_wlan
	mov	x0, x19
	bl	_mt76x2_power_on
	mov	x0, x19
	bl	_mt76x2_eeprom_init
	cbnz	w0, LBB0_6
; %bb.1:
	mov	x0, x19
	mov	w1, #1
	bl	_mt76x2_mac_reset
	cbnz	w0, LBB0_6
; %bb.2:
Lloh0:
	adrp	x8, _MT_RX_FILTR_CFG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MT_RX_FILTR_CFG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mt76_rr
	str	w0, [x19, #4]
	mov	x0, x19
	bl	_mt76x02_dma_init
	cbnz	w0, LBB0_6
; %bb.3:
Lloh3:
	adrp	x8, _MT76_STATE_INITIALIZED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MT76_STATE_INITIALIZED@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_set_bit
	mov	x0, x19
	bl	_mt76x2_mac_start
	cbnz	w0, LBB0_6
; %bb.4:
	mov	x0, x19
	bl	_mt76x2_mcu_init
	cbnz	w0, LBB0_6
; %bb.5:
	mov	x0, x19
	mov	w1, #0
	bl	_mt76x2_mac_stop
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MT_RX_FILTR_CFG,4,2            ; @MT_RX_FILTR_CFG
	.comm	_MT76_STATE_INITIALIZED,4,2     ; @MT76_STATE_INITIALIZED
	.no_dead_strip	_mt76x2_init_hardware
.subsections_via_symbols
