	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __command_write_data
___command_write_data:                  ## @__command_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
	subq	$296, %rsp                      ## imm = 0x128
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	40(%rdi), %edi
	movl	56(%r12), %esi
	callq	_usb_sndbulkpipe
	movslq	(%r12), %r15
	movl	%r15d, %r13d
	cmpq	$63, %r15
	movl	%eax, -316(%rbp)                ## 4-byte Spill
	jg	LBB0_4
## %bb.1:
	movq	%rbx, -312(%rbp)                ## 8-byte Spill
	movl	4(%r14), %esi
	movl	8(%r14), %edi
	movq	8(%r12), %rdx
	movl	$8, %ebx
	movl	$8, %ecx
	callq	_sg_copy_to_buffer
	addq	8(%r12), %r15
	subl	%r13d, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_memset
	movq	8(%r12), %rdx
	leaq	-304(%rbp), %r8
	movq	%r12, %rdi
	movl	-316(%rbp), %esi                ## 4-byte Reload
	movl	$8, %ecx
	movl	$2000, %r9d                     ## imm = 0x7D0
	callq	_vub300_usb_bulk_msg
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movl	(%r12), %eax
	movl	%eax, (%r14)
	jmp	LBB0_22
LBB0_4:
	movq	%r13, -328(%rbp)                ## 8-byte Spill
	movq	48(%r12), %rax
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	movl	%r15d, %ecx
	andl	$63, %ecx
	jne	LBB0_8
LBB0_6:
	testq	%rax, %rax
	je	LBB0_14
## %bb.7:
	movl	%r15d, %eax
	andl	$448, %eax                      ## imm = 0x1C0
	jne	LBB0_14
LBB0_8:
	movq	%rbx, -312(%rbp)                ## 8-byte Spill
	movq	%r14, %rbx
	addl	$63, %r15d
	movl	%r15d, %r14d
	andl	$-64, %r14d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_13
## %bb.9:
	movq	%rax, %r13
	movl	4(%rbx), %esi
	movl	8(%rbx), %edi
	movq	%rax, %rdx
	movl	%r14d, %ecx
	callq	_sg_copy_to_buffer
	movq	%r13, %rdi
	movq	-328(%rbp), %rax                ## 8-byte Reload
	addq	%rax, %rdi
	movl	%r14d, %edx
	subl	%eax, %edx
	xorl	%esi, %esi
	callq	_memset
	shrl	$14, %r15d
	addl	$2000, %r15d                    ## imm = 0x7D0
	leaq	-304(%rbp), %r8
	movq	%r12, %rdi
	movl	-316(%rbp), %esi                ## 4-byte Reload
	movq	%r13, %rdx
	movl	%r14d, %ecx
	movl	%r15d, %r9d
	callq	_vub300_usb_bulk_msg
	movl	%eax, %r14d
	movq	%r13, %rdi
	callq	_kfree
	testl	%r14d, %r14d
	js	LBB0_10
## %bb.11:
	movl	(%r12), %eax
	movl	%eax, (%rbx)
	jmp	LBB0_21
LBB0_2:
	movq	-312(%rbp), %rcx                ## 8-byte Reload
	movl	%eax, (%rcx)
	xorl	%eax, %eax
	movl	%eax, (%r14)
	jmp	LBB0_22
LBB0_13:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movq	-312(%rbp), %rax                ## 8-byte Reload
	movl	%ecx, (%rax)
	movl	$0, (%rbx)
	jmp	LBB0_21
LBB0_14:
	movl	4(%r14), %esi
	movl	8(%r14), %edi
	leaq	-304(%rbp), %rdx
	movl	$256, %ecx                      ## imm = 0x100
	callq	_sg_copy_to_buffer
	leaq	16(%r12), %r15
	movl	40(%r12), %esi
	movl	4(%r14), %r9d
	movq	%r14, -312(%rbp)                ## 8-byte Spill
	movl	8(%r14), %r8d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r13d, %r13d
	movq	%r15, %rdi
	movl	-316(%rbp), %edx                ## 4-byte Reload
	xorl	%ecx, %ecx
	pushq	%rax
	pushq	$0
	callq	_usb_sg_init
	addq	$16, %rsp
	testl	%eax, %eax
	js	LBB0_15
## %bb.16:
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	-328(%rbp), %rax                ## 8-byte Reload
	movl	%eax, %edi
	shrl	$14, %edi
	addl	$2000, %edi                     ## imm = 0x7D0
	callq	_msecs_to_jiffies
	addq	%r14, %rax
	leaq	24(%r12), %r14
	movq	%rax, 24(%r12)
	movq	%r14, %rdi
	callq	_add_timer
	movq	%r15, %rdi
	callq	_usb_sg_wait
	cmpl	$0, (%rbx)
	jne	LBB0_20
## %bb.17:
	movq	%r14, %rdi
	callq	_del_timer
	movl	(%r15), %eax
	testl	%eax, %eax
	js	LBB0_18
## %bb.19:
	movl	(%r12), %r13d
	jmp	LBB0_20
LBB0_10:
	movq	-312(%rbp), %rax                ## 8-byte Reload
	movl	%r14d, (%rax)
	xorl	%eax, %eax
	movl	%eax, (%rbx)
	jmp	LBB0_21
LBB0_15:
	movl	%eax, %r14d
	movl	36(%r12), %edi
	callq	_usb_unlink_urb
	movl	32(%r12), %edi
	callq	_usb_unlink_urb
	movl	%r14d, (%rbx)
LBB0_20:
	movq	-312(%rbp), %rax                ## 8-byte Reload
	movl	%r13d, (%rax)
LBB0_21:
	movq	-328(%rbp), %r13                ## 8-byte Reload
LBB0_22:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_24
## %bb.23:
	movl	%r13d, %eax
	addq	$296, %rsp                      ## imm = 0x128
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movl	%eax, (%rbx)
	jmp	LBB0_20
LBB0_24:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_jiffies,8,3                    ## @jiffies
	.no_dead_strip	___command_write_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __command_write_data
___command_write_data:                  ; @__command_write_data
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #368
	.cfi_def_cfa_offset 368
	stp	x28, x27, [sp, #272]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #288]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #304]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #320]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #336]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #352]            ; 16-byte Folded Spill
	add	x29, sp, #352
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	ldr	w0, [x0, #40]
	ldr	w1, [x22, #56]
	bl	_usb_sndbulkpipe
	mov	x23, x0
	ldrsw	x19, [x22]
	and	x26, x19, #0xffffffff
	cmp	w19, #63
	b.gt	LBB0_3
; %bb.1:
	ldp	w1, w0, [x20, #4]
	ldr	x2, [x22, #8]
	mov	w24, #8
	mov	w3, #8
	bl	_sg_copy_to_buffer
	ldr	x8, [x22, #8]
	add	x0, x8, x19
	sub	w2, w24, w26
	mov	w1, #0
	bl	_memset
	ldr	x2, [x22, #8]
	add	x4, sp, #8
	mov	x0, x22
	mov	x1, x23
	mov	w3, #8
	mov	w5, #2000
	bl	_vub300_usb_bulk_msg
	tbz	w0, #31, LBB0_8
; %bb.2:
	str	w0, [x21]
	str	wzr, [x20]
	b	LBB0_10
LBB0_3:
	and	w9, w26, #0x3f
	ldr	x8, [x22, #48]
	cmp	x8, #0
	ccmp	w9, #0, #4, eq
	b.ne	LBB0_6
; %bb.4:
	cbz	x8, LBB0_13
; %bb.5:
	and	w8, w19, #0x1c0
	cbnz	w8, LBB0_13
LBB0_6:
	add	w27, w26, #63
	and	w24, w27, #0xffffffc0
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x24
	bl	_kmalloc
	cbz	x0, LBB0_12
; %bb.7:
	mov	x25, x0
	ldp	w1, w0, [x20, #4]
	mov	x2, x25
	mov	x3, x24
	bl	_sg_copy_to_buffer
	add	x0, x25, x26
	sub	w2, w24, w19
	mov	w1, #0
	bl	_memset
	lsr	w8, w27, #14
	add	w5, w8, #2000
	add	x4, sp, #8
	mov	x0, x22
	mov	x1, x23
	mov	x2, x25
	mov	x3, x24
	bl	_vub300_usb_bulk_msg
	mov	x23, x0
	mov	x0, x25
	bl	_kfree
	tbnz	w23, #31, LBB0_16
LBB0_8:
	ldr	w8, [x22]
LBB0_9:
	str	w8, [x20]
LBB0_10:
	ldur	x8, [x29, #-88]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_20
; %bb.11:
	mov	x0, x19
	ldp	x29, x30, [sp, #352]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #336]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #320]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #304]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #288]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #272]            ; 16-byte Folded Reload
	add	sp, sp, #368
	ret
LBB0_12:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w8, w8
	str	w8, [x21]
	str	wzr, [x20]
	b	LBB0_10
LBB0_13:
	ldp	w1, w0, [x20, #4]
	add	x2, sp, #8
	mov	w3, #256
	bl	_sg_copy_to_buffer
	add	x24, x22, #16
	ldr	w1, [x22, #40]
	ldp	w5, w4, [x20, #4]
Lloh12:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh14:
	ldr	w7, [x8]
	mov	x0, x24
	mov	x2, x23
	mov	w3, #0
	mov	w6, #0
	bl	_usb_sg_init
	tbnz	w0, #31, LBB0_17
; %bb.14:
Lloh15:
	adrp	x8, _jiffies@GOTPAGE
Lloh16:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh17:
	ldr	x23, [x8]
	ubfx	x8, x19, #14, #18
	add	w0, w8, #2000
	bl	_msecs_to_jiffies
	add	x8, x0, x23
	mov	x23, x22
	str	x8, [x23, #24]!
	mov	x0, x23
	bl	_add_timer
	mov	x0, x24
	bl	_usb_sg_wait
	ldr	w8, [x21]
	cbz	w8, LBB0_18
; %bb.15:
	mov	w8, #0
	b	LBB0_9
LBB0_16:
	str	w23, [x21]
	str	wzr, [x20]
	b	LBB0_10
LBB0_17:
	mov	x23, x0
	ldr	w0, [x22, #36]
	bl	_usb_unlink_urb
	ldr	w0, [x22, #32]
	bl	_usb_unlink_urb
	mov	w8, #0
	str	w23, [x21]
	b	LBB0_9
LBB0_18:
	mov	x0, x23
	bl	_del_timer
	ldr	w9, [x24]
	tbz	w9, #31, LBB0_8
; %bb.19:
	mov	w8, #0
	str	w9, [x21]
	b	LBB0_9
LBB0_20:
	bl	___stack_chk_fail
	.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 AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_jiffies,8,3                    ; @jiffies
	.no_dead_strip	___command_write_data
.subsections_via_symbols
