	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtsx_usb_ep0_write_register    ## -- Begin function rtsx_usb_ep0_write_register
	.p2align	4, 0x90
_rtsx_usb_ep0_write_register:           ## @rtsx_usb_ep0_write_register
	.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
	movl	%ecx, %ebx
	movl	%edx, %r14d
	movq	%rdi, %r15
	movq	_EP0_WRITE_REG_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_EP0_OP_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %edi
	orl	%esi, %edi
	callq	_swab16
	movl	%eax, %r12d
	shll	$8, %ebx
	orl	%r14d, %ebx
	movl	(%r15), %r14d
	movl	%r14d, %edi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	movq	_RTSX_USB_REQ_REG_OP@GOTPCREL(%rip), %rdx
	movq	_USB_DIR_OUT@GOTPCREL(%rip), %rsi
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rsi), %ecx
	movl	(%rdx), %edx
	movq	_USB_RECIP_DEVICE@GOTPCREL(%rip), %rsi
	orl	(%rsi), %ecx
	subq	$8, %rsp
	movl	%r14d, %edi
	movl	%eax, %esi
	movl	%r12d, %r8d
	movl	%ebx, %r9d
	pushq	$100
	pushq	$0
	pushq	$0
	callq	_usb_control_msg
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EP0_WRITE_REG_CMD,4,2          ## @EP0_WRITE_REG_CMD
	.comm	_EP0_OP_SHIFT,4,2               ## @EP0_OP_SHIFT
	.comm	_RTSX_USB_REQ_REG_OP,4,2        ## @RTSX_USB_REQ_REG_OP
	.comm	_USB_DIR_OUT,4,2                ## @USB_DIR_OUT
	.comm	_USB_TYPE_VENDOR,4,2            ## @USB_TYPE_VENDOR
	.comm	_USB_RECIP_DEVICE,4,2           ## @USB_RECIP_DEVICE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtsx_usb_ep0_write_register    ; -- Begin function rtsx_usb_ep0_write_register
	.p2align	2
_rtsx_usb_ep0_write_register:           ; @rtsx_usb_ep0_write_register
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x3
	mov	x20, x2
	mov	x21, x0
Lloh0:
	adrp	x8, _EP0_WRITE_REG_CMD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EP0_WRITE_REG_CMD@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _EP0_OP_SHIFT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _EP0_OP_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	orr	w0, w8, w1
	bl	_swab16
	mov	x22, x0
	orr	w19, w20, w19, lsl #8
	ldr	w20, [x21]
	mov	x0, x20
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x1, x0
Lloh6:
	adrp	x8, _RTSX_USB_REQ_REG_OP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RTSX_USB_REQ_REG_OP@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
Lloh9:
	adrp	x8, _USB_DIR_OUT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _USB_DIR_OUT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _USB_TYPE_VENDOR@GOTPAGE
Lloh13:
	ldr	x9, [x9, _USB_TYPE_VENDOR@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh15:
	adrp	x9, _USB_RECIP_DEVICE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _USB_RECIP_DEVICE@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w3, w8, w9
	mov	w8, #100
	str	w8, [sp]
	mov	x0, x20
	mov	x4, x22
	mov	x5, x19
	mov	x6, #0
	mov	w7, #0
	bl	_usb_control_msg
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EP0_WRITE_REG_CMD,4,2          ; @EP0_WRITE_REG_CMD
	.comm	_EP0_OP_SHIFT,4,2               ; @EP0_OP_SHIFT
	.comm	_RTSX_USB_REQ_REG_OP,4,2        ; @RTSX_USB_REQ_REG_OP
	.comm	_USB_DIR_OUT,4,2                ; @USB_DIR_OUT
	.comm	_USB_TYPE_VENDOR,4,2            ; @USB_TYPE_VENDOR
	.comm	_USB_RECIP_DEVICE,4,2           ; @USB_RECIP_DEVICE
.subsections_via_symbols
