	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cx24120_message_sendrcv
_cx24120_message_sendrcv:               ## @cx24120_message_sendrcv
	.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
	movl	%edx, %r12d
	movq	_CX24120_MAX_CMD_LEN@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jge	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	callq	_err
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_6
LBB0_2:
	movq	%rsi, %r13
	movq	%rdi, %r14
	callq	_cx24120_message_send
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	xorl	%r15d, %r15d
	testl	%r12d, %r12d
	jle	LBB0_6
## %bb.4:
	movl	%r12d, %r12d
	negq	%r12
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rsi
	addq	%rbx, %rsi
	movq	%r14, %rdi
	callq	_cx24120_readreg
	movq	8(%r13), %rcx
	movl	%eax, -4(%rcx,%rbx,4)
	leaq	(%r12,%rbx), %rax
	incq	%rax
	incq	%rbx
	cmpq	$1, %rax
	jne	LBB0_5
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CX24120_MAX_CMD_LEN,4,2        ## @CX24120_MAX_CMD_LEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Too many registers to read. cmd->reg = %d"

	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
	.no_dead_strip	_cx24120_message_sendrcv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cx24120_message_sendrcv
_cx24120_message_sendrcv:               ; @cx24120_message_sendrcv
	.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	x21, x2
Lloh0:
	adrp	x8, _CX24120_MAX_CMD_LEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CX24120_MAX_CMD_LEN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w2
	b.ge	LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_err
Lloh5:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_2:
	mov	x19, x1
	mov	x20, x0
	bl	_cx24120_message_send
	cbnz	w0, LBB0_7
; %bb.3:
	cmp	w21, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x22, #0
	mov	w21, w21
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	add	x23, x22, #1
	add	x8, x22, x8
	add	x1, x8, #1
	mov	x0, x20
	bl	_cx24120_readreg
	ldr	x8, [x19, #8]
	str	w0, [x8, x22, lsl #2]
	mov	x22, x23
	cmp	x21, x23
	b.ne	LBB0_5
LBB0_6:
	mov	w0, #0
LBB0_7:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_CX24120_MAX_CMD_LEN,4,2        ; @CX24120_MAX_CMD_LEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Too many registers to read. cmd->reg = %d"

	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
	.no_dead_strip	_cx24120_message_sendrcv
.subsections_via_symbols
