	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtsx_usb_seq_write_register
_rtsx_usb_seq_write_register:           ## @rtsx_usb_seq_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movq	%rdx, %rbx
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	_SEQ_WRITE_DATA_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	%rdx, %rdi
	movl	$4, %esi
	callq	_ALIGN
	testq	%r12, %r12
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	_IOBUF_SIZE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jle	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_4
LBB0_3:
	movq	_SEQ_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	callq	_rtsx_usb_seq_cmd_hdr
	movq	_SEQ_WRITE_DATA_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r15), %rdi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	callq	_memcpy
	movl	8(%r15), %edi
	movq	_EP_BULK_OUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_usb_sndbulkpipe
	movq	(%r15), %rdx
	movl	$100, (%rsp)
	movq	%r15, %rdi
	movl	%eax, %esi
	movq	%r14, %rcx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_rtsx_usb_transfer_data
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SEQ_WRITE_DATA_OFFSET,8,3      ## @SEQ_WRITE_DATA_OFFSET
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IOBUF_SIZE,8,3                 ## @IOBUF_SIZE
	.comm	_SEQ_WRITE,4,2                  ## @SEQ_WRITE
	.comm	_EP_BULK_OUT,4,2                ## @EP_BULK_OUT
	.no_dead_strip	_rtsx_usb_seq_write_register
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtsx_usb_seq_write_register
_rtsx_usb_seq_write_register:           ; @rtsx_usb_seq_write_register
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x3
	mov	x21, x2
	mov	x23, x1
	mov	x19, x0
Lloh0:
	adrp	x24, _SEQ_WRITE_DATA_OFFSET@GOTPAGE
Lloh1:
	ldr	x24, [x24, _SEQ_WRITE_DATA_OFFSET@GOTPAGEOFF]
	ldr	x8, [x24]
	add	x0, x8, x2
	mov	w1, #4
	bl	_ALIGN
	cbz	x22, LBB0_2
; %bb.1:
	mov	x20, x0
Lloh2:
	adrp	x8, _IOBUF_SIZE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IOBUF_SIZE@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x0, x8
	b.le	LBB0_3
LBB0_2:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_3:
Lloh8:
	adrp	x8, _SEQ_WRITE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SEQ_WRITE@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x23
	mov	x2, x21
	bl	_rtsx_usb_seq_cmd_hdr
	ldr	x8, [x19]
	ldr	x9, [x24]
	add	x0, x9, x8
	mov	x1, x22
	mov	x2, x21
	bl	_memcpy
	ldr	w0, [x19, #8]
Lloh11:
	adrp	x8, _EP_BULK_OUT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EP_BULK_OUT@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	bl	_usb_sndbulkpipe
	mov	x1, x0
	ldr	x2, [x19]
	mov	x0, x19
	mov	x3, x20
	mov	w4, #0
	mov	x5, #0
	mov	w6, #100
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_rtsx_usb_transfer_data
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SEQ_WRITE_DATA_OFFSET,8,3      ; @SEQ_WRITE_DATA_OFFSET
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IOBUF_SIZE,8,3                 ; @IOBUF_SIZE
	.comm	_SEQ_WRITE,4,2                  ; @SEQ_WRITE
	.comm	_EP_BULK_OUT,4,2                ; @EP_BULK_OUT
	.no_dead_strip	_rtsx_usb_seq_write_register
.subsections_via_symbols
