	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dw210x_op_rw
_dw210x_op_rw:                          ## @dw210x_op_rw
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %ebx
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movl	16(%rbp), %r15d
	movq	_DW210X_READ_MSG@GOTPCREL(%rip), %r14
	cmpl	%r15d, (%r14)
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	jne	LBB0_2
## %bb.1:
	xorl	%esi, %esi
	callq	_usb_rcvctrlpipe
	jmp	LBB0_3
LBB0_2:
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
LBB0_3:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	cmpl	%r15d, (%r14)
	jne	LBB0_4
## %bb.5:
	movq	_USB_DIR_IN@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	movq	_USB_DIR_OUT@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %r13d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %r14
	movl	%ebx, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %r12
	movq	_DW210X_WRITE_MSG@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_10
## %bb.9:
	movq	%r12, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%r14d, %edx
	callq	_memcpy
LBB0_10:
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
	subq	$8, %rsp
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	%r13d, %ecx
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	movl	-56(%rbp), %r9d                 ## 4-byte Reload
	pushq	$2000                           ## imm = 0x7D0
	pushq	%r14
	pushq	%r12
	callq	_usb_control_msg
	addq	$32, %rsp
	movl	%eax, %ebx
	movq	_DW210X_READ_MSG@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_12
## %bb.11:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movl	%r14d, %edx
	callq	_memcpy
LBB0_12:
	movq	%r12, %rdi
	callq	_kfree
	jmp	LBB0_13
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DW210X_READ_MSG,4,2            ## @DW210X_READ_MSG
	.comm	_USB_DIR_IN,4,2                 ## @USB_DIR_IN
	.comm	_USB_DIR_OUT,4,2                ## @USB_DIR_OUT
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DW210X_WRITE_MSG,4,2           ## @DW210X_WRITE_MSG
	.comm	_USB_TYPE_VENDOR,4,2            ## @USB_TYPE_VENDOR
	.no_dead_strip	_dw210x_op_rw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dw210x_op_rw
_dw210x_op_rw:                          ; @dw210x_op_rw
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x5
	str	x4, [sp, #8]                    ; 8-byte Folded Spill
	mov	x22, x3
	mov	x23, x2
	mov	x24, x1
	mov	x25, x0
Lloh0:
	adrp	x28, _DW210X_READ_MSG@GOTPAGE
Lloh1:
	ldr	x28, [x28, _DW210X_READ_MSG@GOTPAGEOFF]
	ldr	w8, [x28]
	cmp	w8, w6
	b.ne	LBB0_2
; %bb.1:
	mov	w1, #0
	bl	_usb_rcvctrlpipe
	b	LBB0_3
LBB0_2:
	mov	w1, #0
	bl	_usb_sndctrlpipe
LBB0_3:
	mov	x27, x0
	ldr	w8, [x28]
Lloh2:
	adrp	x9, _USB_DIR_IN@GOTPAGE
Lloh3:
	ldr	x9, [x9, _USB_DIR_IN@GOTPAGEOFF]
Lloh4:
	adrp	x10, _USB_DIR_OUT@GOTPAGE
Lloh5:
	ldr	x10, [x10, _USB_DIR_OUT@GOTPAGEOFF]
	cmp	w8, w21
	csel	x8, x9, x10, eq
	ldr	w20, [x8]
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_kmalloc
	cbz	x0, LBB0_9
; %bb.4:
	mov	x26, x0
Lloh9:
	adrp	x8, _DW210X_WRITE_MSG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DW210X_WRITE_MSG@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_6
; %bb.5:
	mov	x0, x26
	ldr	x1, [sp, #8]                    ; 8-byte Folded Reload
	mov	x2, x19
	bl	_memcpy
LBB0_6:
Lloh12:
	adrp	x8, _USB_TYPE_VENDOR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _USB_TYPE_VENDOR@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	orr	w3, w8, w20
	mov	w8, #2000
	str	w8, [sp]
	mov	x0, x25
	mov	x1, x27
	mov	x2, x24
	mov	x4, x23
	mov	x5, x22
	mov	x6, x26
	mov	x7, x19
	bl	_usb_control_msg
	mov	x22, x0
	ldr	w8, [x28]
	cmp	w8, w21
	b.ne	LBB0_8
; %bb.7:
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	mov	x1, x26
	mov	x2, x19
	bl	_memcpy
LBB0_8:
	mov	x0, x26
	bl	_kfree
	b	LBB0_10
LBB0_9:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_10:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_DW210X_READ_MSG,4,2            ; @DW210X_READ_MSG
	.comm	_USB_DIR_IN,4,2                 ; @USB_DIR_IN
	.comm	_USB_DIR_OUT,4,2                ; @USB_DIR_OUT
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DW210X_WRITE_MSG,4,2           ; @DW210X_WRITE_MSG
	.comm	_USB_TYPE_VENDOR,4,2            ; @USB_TYPE_VENDOR
	.no_dead_strip	_dw210x_op_rw
.subsections_via_symbols
