	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_zd_iowrite16a_locked           ## -- Begin function zd_iowrite16a_locked
	.p2align	4, 0x90
_zd_iowrite16a_locked:                  ## @zd_iowrite16a_locked
	.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
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %rbx
	addq	$4, %rdi
	callq	_mutex_is_locked
	movl	%eax, %edi
	callq	_ZD_ASSERT
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_zd_usb_iowrite16v_async_start
	testl	%r15d, %r15d
	je	LBB0_10
## %bb.1:
	xorl	%r14d, %r14d
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movl	%r15d, %ecx
	subl	%r14d, %ecx
	movq	_USB_MAX_IOWRITE16_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ecx
	cmovael	%eax, %ecx
	movl	%r14d, %eax
	movl	$0, %ebx
	movl	$0, %r15d
	testl	%ecx, %ecx
	je	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%ecx, %edx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	leal	(%rax,%rbx), %esi
	cmpl	$0, (%r12,%rsi,4)
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	incq	%rbx
	cmpq	%rbx, %rdx
	jne	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%ecx, %ebx
	xorl	%r15d, %r15d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %r15d
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%r12,%rax,4), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %edx
	callq	_zd_usb_iowrite16v_async
	testl	%eax, %eax
	jne	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	addl	%r14d, %ebx
	addl	%r15d, %ebx
	movl	%ebx, %r14d
	movl	-52(%rbp), %r15d                ## 4-byte Reload
	cmpl	%r15d, %ebx
	jb	LBB0_2
LBB0_10:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$50, %esi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_zd_usb_iowrite16v_async_end    ## TAILCALL
LBB0_11:
	movl	%eax, %r13d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_zd_usb_iowrite16v_async_end
	movq	%rbx, %rdi
	callq	_zd_chip_dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	movl	%r13d, %edx
	callq	_dev_dbg_f
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_USB_MAX_IOWRITE16_COUNT,4,2    ## @USB_MAX_IOWRITE16_COUNT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error zd_usb_iowrite16v. Error number %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_zd_iowrite16a_locked           ; -- Begin function zd_iowrite16a_locked
	.p2align	2
_zd_iowrite16a_locked:                  ; @zd_iowrite16a_locked
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	add	x0, x0, #4
	bl	_mutex_is_locked
	bl	_ZD_ASSERT
	mov	x0, x19
	bl	_zd_usb_iowrite16v_async_start
	cbz	w20, LBB0_10
; %bb.1:
	mov	w24, #0
Lloh0:
	adrp	x25, _USB_MAX_IOWRITE16_COUNT@GOTPAGE
Lloh1:
	ldr	x25, [x25, _USB_MAX_IOWRITE16_COUNT@GOTPAGEOFF]
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
	ldr	w8, [x25]
	sub	w9, w20, w24
	cmp	w9, w8
	csel	w22, w9, w8, lo
	cbz	w22, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x8, #0
	mov	w9, w24
LBB0_4:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w10, w9, w8
	ldr	w10, [x21, w10, uxtw #2]
	cbz	w10, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=2
	add	x8, x8, #1
	cmp	x22, x8
	b.ne	LBB0_4
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	w26, #0
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	w26, #1
	mov	x22, x8
LBB0_8:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	x1, x21, w24, uxtw #2
	mov	x0, x19
	mov	x2, x22
	bl	_zd_usb_iowrite16v_async
	cbnz	w0, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w8, w22, w24
	add	w24, w8, w26
	cmp	w24, w20
	b.lo	LBB0_2
LBB0_10:
	mov	x0, x19
	mov	w1, #50
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_zd_usb_iowrite16v_async_end
LBB0_11:
	mov	x23, x0
	mov	x0, x19
	mov	w1, #0
	bl	_zd_usb_iowrite16v_async_end
	mov	x0, x19
	bl	_zd_chip_dev
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x23
	bl	_dev_dbg_f
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_USB_MAX_IOWRITE16_COUNT,4,2    ; @USB_MAX_IOWRITE16_COUNT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error zd_usb_iowrite16v. Error number %d\n"

.subsections_via_symbols
