	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt7601u_vendor_request         ## -- Begin function mt7601u_vendor_request
	.p2align	4, 0x90
_mt7601u_vendor_request:                ## @mt7601u_vendor_request
	.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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -104(%rbp)                 ## 8-byte Spill
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movl	%ecx, -72(%rbp)                 ## 4-byte Spill
	movl	%edx, %r14d
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_mt7601u_to_usb_dev
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	%r14d, %edx
	movq	_USB_RECIP_DEVICE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movl	%edx, -68(%rbp)                 ## 4-byte Spill
	movq	%rax, %rbx
	movq	_USB_DIR_IN@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_usb_rcvctrlpipe
	jmp	LBB0_3
LBB0_2:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
LBB0_3:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addq	$4, %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movl	-48(%rbp), %r13d                ## 4-byte Reload
	movl	-68(%rbp), %r12d                ## 4-byte Reload
	movl	-72(%rbp), %r15d                ## 4-byte Reload
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	movq	_MT_VEND_REQ_TOUT_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subq	$8, %rsp
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r13d, %edx
	movl	%r12d, %ecx
	movl	%r15d, %r8d
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %r9d
	pushq	%rax
	movq	16(%rbp), %rax
	pushq	%rax
	movq	-104(%rbp), %r14                ## 8-byte Reload
	pushq	%r14
	callq	_usb_control_msg
	addq	$32, %rsp
                                        ## kill: def $eax killed $eax def $rax
	subq	$8, %rsp
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r13d, %edx
	movl	%r12d, %ecx
	movl	%r15d, %r8d
	movl	%ebx, %r9d
	pushq	%rax
	pushq	16(%rbp)
	pushq	%r14
	movq	%rax, %r14
	movq	_ENODEV@GOTPCREL(%rip), %rbx
	callq	_trace_mt_vend_req
	addq	$32, %rsp
	movl	(%rbx), %eax
	addl	%r14d, %eax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_MT7601U_STATE_REMOVED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	callq	_set_bit
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	testl	%r14d, %r14d
	jns	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	(%rbx), %eax
	addl	%r14d, %eax
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$5, %edi
	callq	_msleep
	movl	-76(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
	movq	_MT_VEND_REQ_MAX_RETRY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	jl	LBB0_4
## %bb.9:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movl	%r14d, %r8d
	callq	_dev_err
LBB0_10:
	movl	%r14d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_USB_TYPE_VENDOR,4,2            ## @USB_TYPE_VENDOR
	.comm	_USB_RECIP_DEVICE,4,2           ## @USB_RECIP_DEVICE
	.comm	_USB_DIR_IN,4,2                 ## @USB_DIR_IN
	.comm	_MT_VEND_REQ_MAX_RETRY,4,2      ## @MT_VEND_REQ_MAX_RETRY
	.comm	_MT_VEND_REQ_TOUT_MS,4,2        ## @MT_VEND_REQ_TOUT_MS
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_MT7601U_STATE_REMOVED,4,2      ## @MT7601U_STATE_REMOVED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Vendor request req:%02x off:%04x failed:%d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt7601u_vendor_request         ; -- Begin function mt7601u_vendor_request
	.p2align	2
_mt7601u_vendor_request:                ; @mt7601u_vendor_request
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x6
	mov	x22, x5
	mov	x19, x4
	mov	x23, x3
	mov	x27, x2
	mov	x20, x1
	str	x0, [sp, #24]                   ; 8-byte Folded Spill
	bl	_mt7601u_to_usb_dev
Lloh0:
	adrp	x8, _USB_TYPE_VENDOR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _USB_TYPE_VENDOR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	orr	w8, w8, w27
Lloh3:
	adrp	x9, _USB_RECIP_DEVICE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _USB_RECIP_DEVICE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w26, w8, w9
Lloh6:
	adrp	x8, _USB_DIR_IN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _USB_DIR_IN@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, w27
	str	x0, [sp, #16]                   ; 8-byte Folded Spill
	mov	w1, #0
	b.ne	LBB0_2
; %bb.1:
	bl	_usb_rcvctrlpipe
	b	LBB0_3
LBB0_2:
	bl	_usb_sndctrlpipe
LBB0_3:
	mov	x27, x0
	mov	w25, #0
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	add	x8, x8, #4
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
Lloh9:
	adrp	x24, _ENODEV@GOTPAGE
Lloh10:
	ldr	x24, [x24, _ENODEV@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
Lloh11:
	adrp	x8, _MT_VEND_REQ_TOUT_MS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MT_VEND_REQ_TOUT_MS@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [sp]
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	mov	x1, x27
	mov	x2, x20
	mov	x3, x26
	mov	x4, x23
	mov	x5, x19
	mov	x6, x22
	mov	x7, x21
	bl	_usb_control_msg
	mov	x28, x0
	str	w0, [sp]
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
	mov	x1, x27
	mov	x2, x20
	mov	x3, x26
	mov	x4, x23
	mov	x5, x19
	mov	x6, x22
	mov	x7, x21
	bl	_trace_mt_vend_req
	ldr	w8, [x24]
	cmn	w28, w8
	b.ne	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh14:
	adrp	x8, _MT7601U_STATE_REMOVED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MT7601U_STATE_REMOVED@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldr	x1, [sp, #8]                    ; 8-byte Folded Reload
	bl	_set_bit
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	tbz	w28, #31, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x24]
	cmn	w28, w8
	b.eq	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #5
	bl	_msleep
	add	w25, w25, #1
Lloh17:
	adrp	x8, _MT_VEND_REQ_MAX_RETRY@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MT_VEND_REQ_MAX_RETRY@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	w25, w8
	b.lt	LBB0_4
; %bb.9:
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	ldr	w0, [x8]
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	mov	x3, x19
	mov	x4, x28
	bl	_dev_err
LBB0_10:
	mov	x0, x28
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_USB_TYPE_VENDOR,4,2            ; @USB_TYPE_VENDOR
	.comm	_USB_RECIP_DEVICE,4,2           ; @USB_RECIP_DEVICE
	.comm	_USB_DIR_IN,4,2                 ; @USB_DIR_IN
	.comm	_MT_VEND_REQ_MAX_RETRY,4,2      ; @MT_VEND_REQ_MAX_RETRY
	.comm	_MT_VEND_REQ_TOUT_MS,4,2        ; @MT_VEND_REQ_TOUT_MS
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_MT7601U_STATE_REMOVED,4,2      ; @MT7601U_STATE_REMOVED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Vendor request req:%02x off:%04x failed:%d\n"

.subsections_via_symbols
