	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt2800usb_autorun_detect
_rt2800usb_autorun_detect:              ## @rt2800usb_autorun_detect
	.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, %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	_USB_DEVICE_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_USB_VENDOR_REQUEST_IN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_USB_MODE_AUTORUN@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_REGISTER_TIMEOUT_FIRMWARE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	movq	%r14, %r9
	pushq	%rax
	pushq	$4
	callq	_rt2x00usb_vendor_request
	addq	$16, %rsp
	movl	%eax, %ebx
	movl	(%r14), %edi
	callq	_le32_to_cpu
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_kfree
	testl	%ebx, %ebx
	js	LBB0_4
## %bb.3:
	andl	$3, %r15d
	xorl	%ebx, %ebx
	cmpl	$2, %r15d
	sete	%bl
	jmp	LBB0_4
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_USB_DEVICE_MODE,4,2            ## @USB_DEVICE_MODE
	.comm	_USB_VENDOR_REQUEST_IN,4,2      ## @USB_VENDOR_REQUEST_IN
	.comm	_USB_MODE_AUTORUN,4,2           ## @USB_MODE_AUTORUN
	.comm	_REGISTER_TIMEOUT_FIRMWARE,4,2  ## @REGISTER_TIMEOUT_FIRMWARE
	.no_dead_strip	_rt2800usb_autorun_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt2800usb_autorun_detect
_rt2800usb_autorun_detect:              ; @rt2800usb_autorun_detect
	.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	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #4
	bl	_kmalloc
	cbz	x0, LBB0_2
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x8, _USB_DEVICE_MODE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _USB_DEVICE_MODE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _USB_VENDOR_REQUEST_IN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _USB_VENDOR_REQUEST_IN@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
Lloh9:
	adrp	x8, _USB_MODE_AUTORUN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _USB_MODE_AUTORUN@GOTPAGEOFF]
Lloh11:
	ldr	w4, [x8]
Lloh12:
	adrp	x8, _REGISTER_TIMEOUT_FIRMWARE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _REGISTER_TIMEOUT_FIRMWARE@GOTPAGEOFF]
Lloh14:
	ldr	w7, [x8]
	mov	x0, x20
	mov	w3, #0
	mov	x5, x19
	mov	w6, #4
	bl	_rt2x00usb_vendor_request
	mov	x20, x0
	ldr	w0, [x19]
	bl	_le32_to_cpu
	mov	x21, x0
	mov	x0, x19
	bl	_kfree
	and	w8, w21, #0x3
	cmp	w8, #2
	cset	w8, eq
	tst	w20, #0x80000000
	csel	w0, w20, w8, ne
	b	LBB0_3
LBB0_2:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_USB_DEVICE_MODE,4,2            ; @USB_DEVICE_MODE
	.comm	_USB_VENDOR_REQUEST_IN,4,2      ; @USB_VENDOR_REQUEST_IN
	.comm	_USB_MODE_AUTORUN,4,2           ; @USB_MODE_AUTORUN
	.comm	_REGISTER_TIMEOUT_FIRMWARE,4,2  ; @REGISTER_TIMEOUT_FIRMWARE
	.no_dead_strip	_rt2800usb_autorun_detect
.subsections_via_symbols
