	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtsx_usb_seq_read_register
_rtsx_usb_seq_read_register:            ## @rtsx_usb_seq_read_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movl	%edx, %r15d
	movl	%esi, %r13d
	movq	%rdi, %r14
	movl	%edx, %edi
	movl	$4, %esi
	callq	_round_down
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movq	_SEQ_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movl	%r13d, %esi
	movl	%r15d, %edx
	callq	_rtsx_usb_seq_cmd_hdr
	movl	(%r14), %edi
	movq	_EP_BULK_OUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_usb_sndbulkpipe
	movq	8(%r14), %rdx
	movl	$100, (%rsp)
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	$12, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_rtsx_usb_transfer_data
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_10
## %bb.4:
	movl	(%r14), %edi
	movq	_EP_BULK_IN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_usb_rcvbulkpipe
	movl	$100, (%rsp)
	movq	%r14, %rdi
	movl	%eax, %esi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	%ebx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_rtsx_usb_transfer_data
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_10
LBB0_5:
	subl	%ebx, %r15d
	xorl	%r12d, %r12d
	testl	%r15d, %r15d
	jle	LBB0_10
## %bb.6:
	addl	%ebx, %r13d
	movslq	%ebx, %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rbx
	movl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%r13d, %esi
	movq	%rbx, %rdx
	callq	_rtsx_usb_read_register
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_8 Depth=1
	incl	%r13d
	addq	$4, %rbx
	decq	%r15
	jne	LBB0_8
	jmp	LBB0_10
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_10
LBB0_9:
	movl	%eax, %r12d
LBB0_10:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SEQ_READ,4,2                   ## @SEQ_READ
	.comm	_EP_BULK_OUT,4,2                ## @EP_BULK_OUT
	.comm	_EP_BULK_IN,4,2                 ## @EP_BULK_IN
	.no_dead_strip	_rtsx_usb_seq_read_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_read_register
_rtsx_usb_seq_read_register:            ; @rtsx_usb_seq_read_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	x20, x3
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	mov	x0, x2
	mov	w1, #4
	bl	_round_down
	cbz	x20, LBB0_9
; %bb.1:
	mov	x23, x0
	cbz	w0, LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _SEQ_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SEQ_READ@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_rtsx_usb_seq_cmd_hdr
	ldr	w0, [x19]
Lloh3:
	adrp	x8, _EP_BULK_OUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EP_BULK_OUT@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_usb_sndbulkpipe
	mov	x1, x0
	ldr	x2, [x19, #8]
	mov	x0, x19
	mov	w3, #12
	mov	w4, #0
	mov	x5, #0
	mov	w6, #100
	bl	_rtsx_usb_transfer_data
	cbnz	w0, LBB0_10
; %bb.3:
	ldr	w0, [x19]
Lloh6:
	adrp	x8, _EP_BULK_IN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EP_BULK_IN@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_usb_rcvbulkpipe
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	mov	x3, x23
	mov	w4, #0
	mov	x5, #0
	mov	w6, #100
	bl	_rtsx_usb_transfer_data
	cbnz	w0, LBB0_10
LBB0_4:
	sub	w22, w22, w23
	cmp	w22, #1
	b.lt	LBB0_8
; %bb.5:
	add	w21, w23, w21
	add	x20, x20, w23, sxtw #2
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_rtsx_usb_read_register
	cbnz	w0, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w21, w21, #1
	add	x20, x20, #4
	subs	x22, x22, #1
	b.ne	LBB0_6
LBB0_8:
	mov	w0, #0
	b	LBB0_10
LBB0_9:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SEQ_READ,4,2                   ; @SEQ_READ
	.comm	_EP_BULK_OUT,4,2                ; @EP_BULK_OUT
	.comm	_EP_BULK_IN,4,2                 ; @EP_BULK_IN
	.no_dead_strip	_rtsx_usb_seq_read_register
.subsections_via_symbols
