	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt76x2u_register_device        ## -- Begin function mt76x2u_register_device
	.p2align	4, 0x90
_mt76x2u_register_device:               ## @mt76x2u_register_device
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_mt76_hw
	movq	%rax, %r14
	leaq	24(%r15), %rdi
	movq	_mt76x2u_phy_calibrate@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_DELAYED_WORK
	movq	%r15, %rdi
	callq	_mt76x02_init_device
	movq	%r15, %rdi
	callq	_mt76x2u_init_eeprom
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	%r15, %rdi
	callq	_mt76u_alloc_queues
	testl	%eax, %eax
	js	LBB0_3
## %bb.5:
	movq	%r15, %rdi
	callq	_mt76x2u_init_hardware
	testl	%eax, %eax
	js	LBB0_3
## %bb.6:
	movq	_mt76x02_rates@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	movl	$1, %r12d
	movq	%r15, %rdi
	movl	$1, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_mt76_register_device
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.7:
	cmpq	$0, 16(%r15)
	je	LBB0_9
## %bb.8:
	movq	_MT_TX_SG_MAX_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_9:
	movl	%r12d, (%r14)
	movq	_MT76_STATE_INITIALIZED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%r15), %rsi
	callq	_set_bit
	movq	%r15, %rdi
	callq	_mt76x02_init_debugfs
	leaq	4(%r15), %rsi
	movq	%r15, %rdi
	callq	_mt76x2_init_txpower
	movq	%r15, %rdi
	movq	%r15, %rsi
	callq	_mt76x2_init_txpower
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_3:
	movl	%eax, %ebx
LBB0_4:
	movq	%r15, %rdi
	callq	_mt76x2u_cleanup
	jmp	LBB0_10
LBB0_1:
	movl	%eax, %ebx
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mt76x2u_phy_calibrate,4,2      ## @mt76x2u_phy_calibrate
	.comm	_mt76x02_rates,4,2              ## @mt76x02_rates
	.comm	_MT_TX_SG_MAX_SIZE,4,2          ## @MT_TX_SG_MAX_SIZE
	.comm	_MT76_STATE_INITIALIZED,4,2     ## @MT76_STATE_INITIALIZED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt76x2u_register_device        ; -- Begin function mt76x2u_register_device
	.p2align	2
_mt76x2u_register_device:               ; @mt76x2u_register_device
	.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
	bl	_mt76_hw
	mov	x20, x0
	add	x0, x19, #24
Lloh0:
	adrp	x8, _mt76x2u_phy_calibrate@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mt76x2u_phy_calibrate@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_INIT_DELAYED_WORK
	mov	x0, x19
	bl	_mt76x02_init_device
	mov	x0, x19
	bl	_mt76x2u_init_eeprom
	tbnz	w0, #31, LBB0_7
; %bb.1:
	mov	x0, x19
	bl	_mt76u_alloc_queues
	tbnz	w0, #31, LBB0_5
; %bb.2:
	mov	x0, x19
	bl	_mt76x2u_init_hardware
	tbnz	w0, #31, LBB0_5
; %bb.3:
Lloh3:
	adrp	x8, _mt76x02_rates@GOTPAGE
Lloh4:
	ldr	x8, [x8, _mt76x02_rates@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
	mov	x0, x21
	bl	_ARRAY_SIZE
	mov	x3, x0
	mov	x0, x19
	mov	w1, #1
	mov	x2, x21
	bl	_mt76_register_device
	mov	x21, x0
	cbnz	w0, LBB0_6
; %bb.4:
	ldr	x8, [x19, #16]
Lloh6:
	adrp	x9, _MT_TX_SG_MAX_SIZE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MT_TX_SG_MAX_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	x8, #0
	csinc	w8, w9, wzr, ne
	str	w8, [x20]
Lloh9:
	adrp	x8, _MT76_STATE_INITIALIZED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MT76_STATE_INITIALIZED@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	add	x1, x19, #8
	bl	_set_bit
	mov	x0, x19
	bl	_mt76x02_init_debugfs
	add	x1, x19, #4
	mov	x0, x19
	bl	_mt76x2_init_txpower
	mov	x0, x19
	mov	x1, x19
	bl	_mt76x2_init_txpower
	b	LBB0_8
LBB0_5:
	mov	x21, x0
LBB0_6:
	mov	x0, x19
	bl	_mt76x2u_cleanup
	b	LBB0_8
LBB0_7:
	mov	x21, x0
LBB0_8:
	mov	x0, x21
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_mt76x2u_phy_calibrate,4,2      ; @mt76x2u_phy_calibrate
	.comm	_mt76x02_rates,4,2              ; @mt76x02_rates
	.comm	_MT_TX_SG_MAX_SIZE,4,2          ; @MT_TX_SG_MAX_SIZE
	.comm	_MT76_STATE_INITIALIZED,4,2     ; @MT76_STATE_INITIALIZED
.subsections_via_symbols
