	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx231xx_send_usb_command       ## -- Begin function cx231xx_send_usb_command
	.p2align	4, 0x90
_cx231xx_send_usb_command:              ## @cx231xx_send_usb_command
	.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	%rsi, %r15
	movl	(%rdi), %ebx
	movl	4(%rdi), %esi
	movl	8(%rdi), %ecx
	movl	(%r15), %r10d
	movl	4(%r15), %edx
	shll	$9, %edx
	shll	$4, %ebx
	cmpl	$1, %r10d
	jne	LBB0_2
## %bb.1:
	addl	%esi, %esi
	movq	_I2C_SYNC@GOTPCREL(%rip), %r9
	movl	%edx, %r8d
	movl	(%r9), %edx
	movl	$4, %r9d
	jmp	LBB0_3
LBB0_2:
	leal	(,%r10,4), %r8d
	movl	%esi, %eax
	addl	%esi, %eax
	movq	_I2C_SYNC@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r9d
	movl	%ebx, %esi
	movl	%eax, %ebx
LBB0_3:
	orl	%r9d, %edx
	orl	%ebx, %esi
	movq	24(%rdi), %r14
	shll	$6, %ecx
	orl	%r8d, %ecx
	orl	%esi, %ecx
	orl	%edx, %ecx
	movl	%ecx, -64(%rbp)
	movl	8(%r15), %ecx
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ecx, %eax
	movq	16(%rdi), %rdx
	leaq	4(%rdx), %rsi
	testl	%eax, %eax
	cmoveq	%rdx, %rsi
	movq	%rsi, -32(%rbp)
	testl	%r10d, %r10d
	je	LBB0_8
## %bb.4:
	cmpl	$2, %r10d
	je	LBB0_7
## %bb.5:
	cmpl	$1, %r10d
	jne	LBB0_9
## %bb.6:
	movzbl	12(%r15), %r10d
	jmp	LBB0_8
LBB0_7:
	movl	12(%r15), %r10d
LBB0_8:
	movl	%r10d, -60(%rbp)
LBB0_9:
	movl	20(%r15), %edx
	movl	%edx, -48(%rbp)
	movq	$0, -40(%rbp)
	testl	%ecx, %ecx
	je	LBB0_11
## %bb.10:
	movq	_USB_DIR_IN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	16(%r15), %edi
	xorl	%esi, %esi
	callq	_memset
	jmp	LBB0_12
LBB0_11:
	movq	_USB_DIR_OUT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_12:
	movl	%ebx, -52(%rbp)
	movl	16(%r15), %eax
	movl	%eax, -56(%rbp)
	leaq	-64(%rbp), %rsi
	movq	%r14, %rdi
	callq	_cx231xx_send_vendor_cmd
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_14
## %bb.13:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_cx231xx_info
LBB0_14:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_SYNC,4,2                   ## @I2C_SYNC
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_USB_DIR_IN,4,2                 ## @USB_DIR_IN
	.comm	_USB_DIR_OUT,4,2                ## @USB_DIR_OUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"UsbInterface::sendCommand, failed with status -%d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx231xx_send_usb_command       ; -- Begin function cx231xx_send_usb_command
	.p2align	2
_cx231xx_send_usb_command:              ; @cx231xx_send_usb_command
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x1
	ldp	w11, w14, [x0]
	ldr	w9, [x0, #8]
	ldp	w8, w10, [x1]
	lsl	w10, w10, #9
	lsl	w11, w11, #4
	cmp	w8, #1
	b.ne	LBB0_2
; %bb.1:
	lsl	w12, w14, #1
Lloh0:
	adrp	x14, _I2C_SYNC@GOTPAGE
Lloh1:
	ldr	x14, [x14, _I2C_SYNC@GOTPAGEOFF]
	mov	x13, x10
Lloh2:
	ldr	w10, [x14]
	mov	w14, #4
	b	LBB0_3
LBB0_2:
	lsl	w13, w8, #2
	mov	x12, x11
	lsl	w11, w14, #1
Lloh3:
	adrp	x14, _I2C_SYNC@GOTPAGE
Lloh4:
	ldr	x14, [x14, _I2C_SYNC@GOTPAGEOFF]
Lloh5:
	ldr	w14, [x14]
LBB0_3:
	orr	w11, w11, w12
	orr	w9, w11, w9, lsl #6
	orr	w9, w9, w13
	orr	w9, w9, w10
	orr	w9, w9, w14
	str	w9, [sp, #8]
	ldr	w9, [x19, #8]
Lloh6:
	adrp	x10, _I2C_M_RD@GOTPAGE
Lloh7:
	ldr	x10, [x10, _I2C_M_RD@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	ldp	x11, x20, [x0, #16]
	add	x12, x11, #4
	tst	w10, w9
	csel	x10, x11, x12, eq
	str	x10, [sp, #40]
	cbz	w8, LBB0_8
; %bb.4:
	cmp	w8, #2
	b.eq	LBB0_7
; %bb.5:
	cmp	w8, #1
	b.ne	LBB0_9
; %bb.6:
	ldrb	w8, [x19, #12]
	b	LBB0_8
LBB0_7:
	ldr	w8, [x19, #12]
LBB0_8:
	str	w8, [sp, #12]
LBB0_9:
	ldr	w2, [x19, #20]
	str	w2, [sp, #24]
	str	xzr, [sp, #32]
	cbz	w9, LBB0_11
; %bb.10:
Lloh9:
	adrp	x8, _USB_DIR_IN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _USB_DIR_IN@GOTPAGEOFF]
Lloh11:
	ldr	w21, [x8]
	ldr	w0, [x19, #16]
	mov	w1, #0
	bl	_memset
	b	LBB0_12
LBB0_11:
Lloh12:
	adrp	x8, _USB_DIR_OUT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _USB_DIR_OUT@GOTPAGEOFF]
Lloh14:
	ldr	w21, [x8]
LBB0_12:
	ldr	w8, [x19, #16]
	stp	w8, w21, [sp, #16]
	add	x1, sp, #8
	mov	x0, x20
	bl	_cx231xx_send_vendor_cmd
	mov	x19, x0
	tbz	w0, #31, LBB0_14
; %bb.13:
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_cx231xx_info
LBB0_14:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_SYNC,4,2                   ; @I2C_SYNC
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_USB_DIR_IN,4,2                 ; @USB_DIR_IN
	.comm	_USB_DIR_OUT,4,2                ; @USB_DIR_OUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"UsbInterface::sendCommand, failed with status -%d\n"

.subsections_via_symbols
