	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function chipio_write_data
_chipio_write_data:                     ## @chipio_write_data
	.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	%esi, %r14d
	movq	%rdi, %rbx
	movq	(%rdi), %r15
	movq	_VENDOR_CHIPIO_DATA_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzwl	%r14w, %edx
	callq	_chipio_send
	movq	_EIO@GOTPCREL(%rip), %r13
	xorl	%r12d, %r12d
	xorl	%ecx, %ecx
	subl	(%r13), %ecx
	cmpl	%ecx, %eax
	je	LBB0_2
## %bb.1:
	movq	_VENDOR_CHIPIO_DATA_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shrl	$16, %r14d
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_chipio_send
	subl	(%r13), %r12d
	movl	%r12d, %ecx
LBB0_2:
	movl	$-1, %edx
	cmpl	%ecx, %eax
	je	LBB0_4
## %bb.3:
	movl	(%r15), %edx
	addl	$4, %edx
LBB0_4:
	movl	%edx, (%r15)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VENDOR_CHIPIO_DATA_LOW,4,2     ## @VENDOR_CHIPIO_DATA_LOW
	.comm	_EIO,4,2                        ## @EIO
	.comm	_VENDOR_CHIPIO_DATA_HIGH,4,2    ## @VENDOR_CHIPIO_DATA_HIGH
	.no_dead_strip	_chipio_write_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function chipio_write_data
_chipio_write_data:                     ; @chipio_write_data
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x1
	mov	x19, x0
	ldr	x21, [x0]
Lloh0:
	adrp	x8, _VENDOR_CHIPIO_DATA_LOW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VENDOR_CHIPIO_DATA_LOW@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	and	w2, w20, #0xffff
	bl	_chipio_send
Lloh3:
	adrp	x22, _EIO@GOTPAGE
Lloh4:
	ldr	x22, [x22, _EIO@GOTPAGEOFF]
	ldr	w8, [x22]
	cmn	w0, w8
	b.eq	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _VENDOR_CHIPIO_DATA_HIGH@GOTPAGE
Lloh6:
	ldr	x8, [x8, _VENDOR_CHIPIO_DATA_HIGH@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	lsr	w2, w20, #16
	mov	x0, x19
	bl	_chipio_send
	ldr	w8, [x22]
LBB0_2:
	neg	w8, w8
	cmp	w0, w8
	b.ne	LBB0_4
; %bb.3:
	mov	w8, #-1
	b	LBB0_5
LBB0_4:
	ldr	w8, [x21]
	add	w8, w8, #4
LBB0_5:
	str	w8, [x21]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_VENDOR_CHIPIO_DATA_LOW,4,2     ; @VENDOR_CHIPIO_DATA_LOW
	.comm	_EIO,4,2                        ; @EIO
	.comm	_VENDOR_CHIPIO_DATA_HIGH,4,2    ; @VENDOR_CHIPIO_DATA_HIGH
	.no_dead_strip	_chipio_write_data
.subsections_via_symbols
