	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ubtbcmfw_read_callback
_ubtbcmfw_read_callback:                ## @ubtbcmfw_read_callback
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	callq	_usbd_xfer_softc
	movq	(%rax), %rax
	movq	_USB_FIFO_RX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %r14
	leaq	-28(%rbp), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_usbd_xfer_status
	movq	%rbx, %rdi
	callq	_USB_GET_STATE
	cmpl	$129, %eax
	je	LBB0_3
## %bb.1:
	cmpl	$128, %eax
	jne	LBB0_6
## %bb.2:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_usbd_xfer_get_frame
	movl	-28(%rbp), %ecx
	movq	%r14, %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	movl	$1, %r8d
	callq	_usb_fifo_put_data
	jmp	LBB0_3
LBB0_6:
	movq	_USB_ERR_CANCELLED@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	je	LBB0_5
## %bb.7:
	movq	%rbx, %rdi
	callq	_usbd_xfer_set_stall
LBB0_3:
	movq	%r14, %rdi
	callq	_usb_fifo_put_bytes_max
	testl	%eax, %eax
	jle	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_usbd_xfer_max_len
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	%eax, %edx
	callq	_usbd_xfer_set_frame_len
	movq	%rbx, %rdi
	callq	_usbd_transfer_submit
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_USB_FIFO_RX,8,3                ## @USB_FIFO_RX
	.comm	_USB_ERR_CANCELLED,4,2          ## @USB_ERR_CANCELLED
	.no_dead_strip	_ubtbcmfw_read_callback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ubtbcmfw_read_callback
_ubtbcmfw_read_callback:                ; @ubtbcmfw_read_callback
	.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
	mov	x21, x1
	mov	x19, x0
	bl	_usbd_xfer_softc
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _USB_FIFO_RX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _USB_FIFO_RX@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	x20, [x8, x9, lsl #3]
	add	x1, sp, #12
	mov	x0, x19
	mov	x2, #0
	mov	x3, #0
	mov	x4, #0
	bl	_usbd_xfer_status
	mov	x0, x19
	bl	_USB_GET_STATE
	cmp	w0, #129
	b.eq	LBB0_5
; %bb.1:
	cmp	w0, #128
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x19
	mov	w1, #0
	bl	_usbd_xfer_get_frame
	mov	x1, x0
	ldr	w3, [sp, #12]
	mov	x0, x20
	mov	w2, #0
	mov	w4, #1
	bl	_usb_fifo_put_data
	b	LBB0_5
LBB0_3:
Lloh3:
	adrp	x8, _USB_ERR_CANCELLED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _USB_ERR_CANCELLED@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w21
	b.eq	LBB0_7
; %bb.4:
	mov	x0, x19
	bl	_usbd_xfer_set_stall
LBB0_5:
	mov	x0, x20
	bl	_usb_fifo_put_bytes_max
	cmp	w0, #1
	b.lt	LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_usbd_xfer_max_len
	mov	x2, x0
	mov	x0, x19
	mov	w1, #0
	bl	_usbd_xfer_set_frame_len
	mov	x0, x19
	bl	_usbd_transfer_submit
LBB0_7:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_USB_FIFO_RX,8,3                ; @USB_FIFO_RX
	.comm	_USB_ERR_CANCELLED,4,2          ; @USB_ERR_CANCELLED
	.no_dead_strip	_ubtbcmfw_read_callback
.subsections_via_symbols
