	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s2255_fwchunk_complete
_s2255_fwchunk_complete:                ## @s2255_fwchunk_complete
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	16(%rdi), %rbx
	movq	8(%rdi), %r14
	movl	(%rdi), %edx
	testl	%edx, %edx
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_4:
	leaq	8(%rbx), %rdi
	movq	_S2255_FW_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_atomic_set
	addq	$12, %rbx
	movq	%rbx, %rdi
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wake_up                        ## TAILCALL
LBB0_2:
	cmpq	$0, 16(%rbx)
	je	LBB0_3
## %bb.5:
	movl	(%rbx), %eax
	movl	4(%rbx), %ecx
	cmpl	%ecx, %eax
	jge	LBB0_11
## %bb.6:
	leal	512(%rax), %edx
	leal	511(%rcx), %esi
	testl	%ecx, %ecx
	cmovnsl	%ecx, %esi
	andl	$-512, %esi                     ## imm = 0xFE00
	movl	%ecx, %edi
	subl	%esi, %edi
	movl	$512, %r15d                     ## imm = 0x200
	cmpl	%ecx, %edx
	cmovgl	%edi, %r15d
	jle	LBB0_8
## %bb.7:
	movl	24(%rbx), %edi
	xorl	%esi, %esi
	movl	$512, %edx                      ## imm = 0x200
	callq	_memset
	movl	(%rbx), %eax
LBB0_8:
	movl	24(%rbx), %edi
	movq	32(%rbx), %rcx
	movslq	%eax, %rsi
	addq	(%rcx), %rsi
	movl	%r15d, %edx
	callq	_memcpy
	movq	16(%rbx), %r12
	movq	%r14, %rdi
	movl	$2, %esi
	callq	_usb_sndbulkpipe
	movl	24(%rbx), %ecx
	movq	%rbx, (%rsp)
	leaq	_s2255_fwchunk_complete(%rip), %r9
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	movl	$512, %r8d                      ## imm = 0x200
	callq	_usb_fill_bulk_urb
	movq	16(%rbx), %rdi
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_usb_submit_urb
	testq	%rax, %rax
	js	LBB0_9
## %bb.10:
	addl	%r15d, (%rbx)
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_s2255_dev_err
	jmp	LBB0_4
LBB0_11:
	addq	$8, %rbx
	movq	_S2255_FW_LOADED_DSPWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_atomic_set                     ## TAILCALL
LBB0_9:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"URB failed with status %d\n"

	.comm	_S2255_FW_FAILED,4,2            ## @S2255_FW_FAILED
L_.str.1:                               ## @.str.1
	.asciz	"disconnected\n"

	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
L_.str.2:                               ## @.str.2
	.asciz	"failed submit URB\n"

	.comm	_S2255_FW_LOADED_DSPWAIT,4,2    ## @S2255_FW_LOADED_DSPWAIT
	.comm	_CHUNK_SIZE,4,2                 ## @CHUNK_SIZE
	.no_dead_strip	_s2255_fwchunk_complete
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s2255_fwchunk_complete
_s2255_fwchunk_complete:                ; @s2255_fwchunk_complete
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldp	x20, x19, [x0, #8]
	ldr	w8, [x0]
	cbz	w8, LBB0_4
; %bb.1:
	str	x8, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
LBB0_2:
	mov	x0, x20
	bl	_dev_err
LBB0_3:
	add	x0, x19, #8
Lloh2:
	adrp	x8, _S2255_FW_FAILED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _S2255_FW_FAILED@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_atomic_set
	add	x0, x19, #12
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_wake_up
LBB0_4:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_10
; %bb.5:
	ldp	w8, w9, [x19]
	cmp	w8, w9
	b.ge	LBB0_11
; %bb.6:
	add	w10, w8, #512
	negs	w11, w9
	and	w11, w11, #0x1ff
	and	w12, w9, #0x1ff
	csneg	w11, w12, w11, mi
	mov	w12, #512
	cmp	w10, w9
	csel	w21, w11, w12, gt
	b.le	LBB0_8
; %bb.7:
	ldr	w0, [x19, #24]
	mov	w1, #0
	mov	w2, #512
	bl	_memset
	ldr	w8, [x19]
LBB0_8:
	ldr	w0, [x19, #24]
	ldr	x9, [x19, #32]
	ldr	x9, [x9]
	add	x1, x9, w8, sxtw
	mov	x2, x21
	bl	_memcpy
	ldr	x22, [x19, #16]
	mov	x0, x20
	mov	w1, #2
	bl	_usb_sndbulkpipe
	mov	x2, x0
	ldr	w3, [x19, #24]
Lloh5:
	adrp	x5, _s2255_fwchunk_complete@PAGE
Lloh6:
	add	x5, x5, _s2255_fwchunk_complete@PAGEOFF
	mov	x0, x22
	mov	x1, x20
	mov	w4, #512
	mov	x6, x19
	bl	_usb_fill_bulk_urb
	ldr	x0, [x19, #16]
Lloh7:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	bl	_usb_submit_urb
	tbnz	x0, #63, LBB0_12
; %bb.9:
	ldr	w8, [x19]
	add	w8, w8, w21
	str	w8, [x19]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_10:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_s2255_dev_err
	b	LBB0_3
LBB0_11:
	add	x0, x19, #8
Lloh12:
	adrp	x8, _S2255_FW_LOADED_DSPWAIT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _S2255_FW_LOADED_DSPWAIT@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_atomic_set
LBB0_12:
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_2
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"URB failed with status %d\n"

	.comm	_S2255_FW_FAILED,4,2            ; @S2255_FW_FAILED
l_.str.1:                               ; @.str.1
	.asciz	"disconnected\n"

	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
l_.str.2:                               ; @.str.2
	.asciz	"failed submit URB\n"

	.comm	_S2255_FW_LOADED_DSPWAIT,4,2    ; @S2255_FW_LOADED_DSPWAIT
	.comm	_CHUNK_SIZE,4,2                 ; @CHUNK_SIZE
	.no_dead_strip	_s2255_fwchunk_complete
.subsections_via_symbols
