	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ubtbcmfw_open
_ubtbcmfw_open:                         ## @ubtbcmfw_open
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	callq	_usb_fifo_softc
	movq	_FREAD@GOTPCREL(%rip), %rcx
	testl	%ebx, (%rcx)
	je	LBB0_2
## %bb.1:
	movq	_UBTBCMFW_INTR_DT_RD@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_2:
	movq	_FWRITE@GOTPCREL(%rip), %rcx
	testl	%ebx, (%rcx)
	je	LBB0_8
## %bb.3:
	movq	_UBTBCMFW_BULK_DT_WR@GOTPCREL(%rip), %rcx
LBB0_4:
	movq	(%rax), %rax
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rdi
	callq	_usbd_xfer_max_len
	movq	_UBTBCMFW_IFQ_MAXLEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_usb_fifo_alloc_buffer
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FREAD,4,2                      ## @FREAD
	.comm	_UBTBCMFW_INTR_DT_RD,8,3        ## @UBTBCMFW_INTR_DT_RD
	.comm	_FWRITE,4,2                     ## @FWRITE
	.comm	_UBTBCMFW_BULK_DT_WR,8,3        ## @UBTBCMFW_BULK_DT_WR
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_UBTBCMFW_IFQ_MAXLEN,4,2        ## @UBTBCMFW_IFQ_MAXLEN
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_ubtbcmfw_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ubtbcmfw_open
_ubtbcmfw_open:                         ; @ubtbcmfw_open
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	bl	_usb_fifo_softc
Lloh0:
	adrp	x8, _FREAD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FREAD@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _UBTBCMFW_INTR_DT_RD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _UBTBCMFW_INTR_DT_RD@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
Lloh5:
	adrp	x8, _FWRITE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FWRITE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_6
; %bb.3:
Lloh8:
	adrp	x8, _UBTBCMFW_BULK_DT_WR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _UBTBCMFW_BULK_DT_WR@GOTPAGEOFF]
LBB0_4:
	ldr	x9, [x0]
	ldr	x8, [x8]
	ldr	x0, [x9, x8, lsl #3]
	bl	_usbd_xfer_max_len
	mov	x1, x0
Lloh10:
	adrp	x8, _UBTBCMFW_IFQ_MAXLEN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _UBTBCMFW_IFQ_MAXLEN@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_usb_fifo_alloc_buffer
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w0, wzr, w8, eq
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_FREAD,4,2                      ; @FREAD
	.comm	_UBTBCMFW_INTR_DT_RD,8,3        ; @UBTBCMFW_INTR_DT_RD
	.comm	_FWRITE,4,2                     ; @FWRITE
	.comm	_UBTBCMFW_BULK_DT_WR,8,3        ; @UBTBCMFW_BULK_DT_WR
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_UBTBCMFW_IFQ_MAXLEN,4,2        ; @UBTBCMFW_IFQ_MAXLEN
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_ubtbcmfw_open
.subsections_via_symbols
