	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _dln2_transfer
__dln2_transfer:                        ## @_dln2_transfer
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r15
	movl	%r8d, -56(%rbp)                 ## 4-byte Spill
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r13
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	32(%rdi), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_DLN2_USB_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	24(%rbx), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	leaq	16(%rbx), %r14
	movq	%r14, %rdi
	callq	_spin_lock
	cmpq	$0, 8(%rbx)
	je	LBB0_1
## %bb.5:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%r14, %rdi
	callq	_spin_unlock
	testl	%r12d, %r12d
	je	LBB0_2
## %bb.6:
	negl	%r12d
	jmp	LBB0_26
LBB0_1:
	incl	20(%rbx)
	movq	%r14, %rdi
	callq	_spin_unlock
LBB0_2:
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_alloc_rx_slot
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_24
## %bb.3:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	movl	%r12d, %ecx
	movq	-96(%rbp), %r8                  ## 8-byte Reload
	movl	-56(%rbp), %r9d                 ## 4-byte Reload
	callq	_dln2_send_wait
	testl	%eax, %eax
	js	LBB0_4
## %bb.7:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%r15,8), %rax
	movl	%r12d, %r15d
	shlq	$4, %r15
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	(%rax,%r15), %rdi
	addq	$8, %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	callq	_wait_for_completion_interruptible_timeout
	testl	%eax, %eax
	jle	LBB0_8
## %bb.11:
	cmpq	$0, 8(%rbx)
	je	LBB0_14
## %bb.12:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_4:
	movl	%eax, %r13d
	leaq	L_.str(%rip), %rsi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_23
LBB0_8:
	movl	%eax, %r13d
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_23
## %bb.9:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_14:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%r15), %rax
	movq	(%rax), %r13
	movl	4(%r13), %edi
	callq	_le16_to_cpu
	cmpl	$7, %eax
	ja	LBB0_16
## %bb.15:
	movq	_EPROTO@GOTPCREL(%rip), %rax
LBB0_13:
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_22:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_23
LBB0_16:
	movl	%eax, %r15d
	movl	(%r13), %edi
	callq	_le16_to_cpu
	cmpl	$129, %eax
	jl	LBB0_18
## %bb.17:
	movl	(%r13), %edi
	callq	_le16_to_cpu
	leaq	L_.str.1(%rip), %rsi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdx
	movl	%eax, %ecx
	callq	_dev_dbg
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
LBB0_10:
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_23:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	%r12d, %edx
	callq	_free_rx_slot
	movl	%r13d, %r12d
LBB0_24:
	movq	%r14, %rdi
	callq	_spin_lock
	decl	20(%rbx)
	movq	%r14, %rdi
	callq	_spin_unlock
	cmpq	$0, 8(%rbx)
	je	LBB0_26
## %bb.25:
	movq	%rbx, %rdi
	callq	_wake_up
LBB0_26:
	movl	%r12d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movq	%r13, %rsi
	xorl	%r13d, %r13d
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_22
## %bb.19:
	movq	16(%rbp), %rcx
	movslq	%r15d, %rax
	movl	(%rcx), %edx
	addq	$-8, %rax
	cmpq	%rdx, %rax
	jae	LBB0_21
## %bb.20:
	movl	%eax, (%rcx)
	movl	%eax, %edx
LBB0_21:
	addq	$8, %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_DLN2_USB_TIMEOUT,4,2           ## @DLN2_USB_TIMEOUT
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"USB write failed: %d\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_EPROTO,4,2                     ## @EPROTO
L_.str.1:                               ## @.str.1
	.asciz	"%d received response with error %d\n"

	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
	.no_dead_strip	__dln2_transfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _dln2_transfer
__dln2_transfer:                        ; @_dln2_transfer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	stp	x6, x5, [sp]                    ; 16-byte Folded Spill
	mov	x27, x4
	mov	x28, x3
	mov	x23, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x25, [x0, #32]
Lloh0:
	adrp	x8, _DLN2_USB_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DLN2_USB_TIMEOUT@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	mov	x26, x0
	ldr	x24, [x19, #24]
	add	x20, x19, #16
	mov	x0, x20
	bl	_spin_lock
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _ENODEV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
	mov	x0, x20
	bl	_spin_unlock
	cbz	w22, LBB0_4
; %bb.2:
	neg	w22, w22
	b	LBB0_20
LBB0_3:
	ldr	w8, [x19, #20]
	add	w8, w8, #1
	str	w8, [x19, #20]
	mov	x0, x20
	bl	_spin_unlock
LBB0_4:
	mov	x0, x19
	mov	x1, x21
	bl	_alloc_rx_slot
	mov	x22, x0
	tbnz	w0, #31, LBB0_18
; %bb.5:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x23
	mov	x3, x22
	mov	x4, x28
	mov	x5, x27
	bl	_dln2_send_wait
	tbnz	w0, #31, LBB0_9
; %bb.6:
	ldr	x24, [x24, x21, lsl #3]
	add	x8, x24, w22, uxtw #4
	add	x0, x8, #8
	mov	x1, x26
	bl	_wait_for_completion_interruptible_timeout
	cmp	w0, #0
	b.le	LBB0_10
; %bb.7:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_12
; %bb.8:
Lloh6:
	adrp	x8, _ENODEV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_16
LBB0_9:
	mov	x23, x0
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x25
	mov	x2, x23
	bl	_dev_err
	b	LBB0_17
LBB0_10:
	mov	x23, x0
	cbnz	w0, LBB0_17
; %bb.11:
Lloh10:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
	b	LBB0_16
LBB0_12:
	mov	w8, w22
	lsl	x8, x8, #4
	ldr	x8, [x24, x8]
	ldr	x24, [x8]
	ldr	w0, [x24, #4]
	bl	_le16_to_cpu
	cmp	w0, #7
	b.hi	LBB0_14
; %bb.13:
Lloh12:
	adrp	x8, _EPROTO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EPROTO@GOTPAGEOFF]
	b	LBB0_16
LBB0_14:
	mov	x23, x0
	ldr	w0, [x24]
	bl	_le16_to_cpu
	cmp	w0, #129
	b.lt	LBB0_21
; %bb.15:
	ldr	w0, [x24]
	bl	_le16_to_cpu
	mov	x3, x0
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x25
	mov	x2, x21
	bl	_dev_dbg
Lloh16:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_17:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_free_rx_slot
	mov	x22, x23
LBB0_18:
	mov	x0, x20
	bl	_spin_lock
	ldr	w8, [x19, #20]
	sub	w8, w8, #1
	str	w8, [x19, #20]
	mov	x0, x20
	bl	_spin_unlock
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_20
; %bb.19:
	mov	x0, x19
	bl	_wake_up
LBB0_20:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_21:
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	cbz	x0, LBB0_25
; %bb.22:
	sxtw	x8, w23
	ldr	x9, [sp]                        ; 8-byte Folded Reload
	ldr	w2, [x9]
	sub	x8, x8, #8
	cmp	x8, x2
	b.hs	LBB0_24
; %bb.23:
	str	w8, [x9]
	mov	x2, x8
LBB0_24:
	add	x1, x24, #8
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_memcpy
LBB0_25:
	mov	w23, #0
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_DLN2_USB_TIMEOUT,4,2           ; @DLN2_USB_TIMEOUT
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"USB write failed: %d\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_EPROTO,4,2                     ; @EPROTO
l_.str.1:                               ; @.str.1
	.asciz	"%d received response with error %d\n"

	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
	.no_dead_strip	__dln2_transfer
.subsections_via_symbols
