	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cpia_usb_transferCmd
_cpia_usb_transferCmd:                  ## @cpia_usb_transferCmd
	.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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.3:
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.5:
	movq	%rdx, %r14
	movl	28(%rsi), %r15d
	shll	$8, %r15d
	orl	24(%rsi), %r15d
	movl	(%rsi), %eax
	movq	_DATA_IN@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_11
## %bb.6:
	testq	%r14, %r14
	je	LBB0_7
## %bb.8:
	leaq	-64(%rbp), %rdx
	movl	$8, %ecx
	callq	_ReadPacket
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:
	leaq	-64(%rbp), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_memcpy
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_2
LBB0_11:
	movq	_DATA_OUT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_13
## %bb.12:
	movq	%r14, %rdx
	movl	%r15d, %ecx
	callq	_WritePacket
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_13:
	leaq	L_.str.3(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DBG
	jmp	LBB0_14
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
LBB0_2:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DBG
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_16
## %bb.15:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	%eax, %ebx
	jmp	LBB0_14
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Internal driver error: udev is NULL\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Internal driver error: command is NULL\n"

	.comm	_DATA_IN,4,2                    ## @DATA_IN
L_.str.2:                               ## @.str.2
	.asciz	"Internal driver error: data is NULL\n"

	.comm	_DATA_OUT,4,2                   ## @DATA_OUT
L_.str.3:                               ## @.str.3
	.asciz	"Unexpected first byte of command: %x\n"

	.no_dead_strip	_cpia_usb_transferCmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cpia_usb_transferCmd
_cpia_usb_transferCmd:                  ; @cpia_usb_transferCmd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	ldr	x0, [x0]
	cbz	x0, LBB0_6
; %bb.1:
	cbz	x1, LBB0_7
; %bb.2:
	mov	x19, x2
	ldp	w9, w8, [x1, #24]
	orr	w20, w9, w8, lsl #8
	ldr	w8, [x1]
Lloh3:
	adrp	x9, _DATA_IN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DATA_IN@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_8
; %bb.3:
	cbz	x19, LBB0_12
; %bb.4:
	add	x2, sp, #8
	mov	w3, #8
	bl	_ReadPacket
	tbnz	w0, #31, LBB0_14
; %bb.5:
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x20
	bl	_memcpy
	b	LBB0_11
LBB0_6:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_13
LBB0_7:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_13
LBB0_8:
Lloh10:
	adrp	x9, _DATA_OUT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _DATA_OUT@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_10
; %bb.9:
	mov	x2, x19
	mov	x3, x20
	bl	_WritePacket
	b	LBB0_11
LBB0_10:
	str	x8, [sp]
Lloh13:
	adrp	x0, l_.str.3@PAGE
Lloh14:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DBG
LBB0_11:
	mov	w0, #0
	b	LBB0_14
LBB0_12:
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_13:
	bl	_DBG
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	ldur	x8, [x29, #-24]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Internal driver error: udev is NULL\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Internal driver error: command is NULL\n"

	.comm	_DATA_IN,4,2                    ; @DATA_IN
l_.str.2:                               ; @.str.2
	.asciz	"Internal driver error: data is NULL\n"

	.comm	_DATA_OUT,4,2                   ; @DATA_OUT
l_.str.3:                               ; @.str.3
	.asciz	"Unexpected first byte of command: %x\n"

	.no_dead_strip	_cpia_usb_transferCmd
.subsections_via_symbols
