	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_physbusif_output               ## -- Begin function physbusif_output
	.p2align	4, 0x90
_physbusif_output:                      ## @physbusif_output
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___usbdev@GOTPCREL(%rip), %rax
	cmpl	$2, (%rax)
	jne	LBB0_15
## %bb.1:
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	8(%rdi), %rax
	movq	(%rax), %rax
	movq	_HCI_COMMAND_DATA_PACKET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movq	_ctrlbufs@GOTPCREL(%rip), %rdi
	jmp	LBB0_5
LBB0_3:
	movq	_HCI_ACL_DATA_PACKET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.4:
	movq	_aclbufs@GOTPCREL(%rip), %rdi
LBB0_5:
	callq	_btmemb_alloc
	testq	%rax, %rax
	je	LBB0_15
## %bb.6:
	movq	%rax, %r14
	leaq	-1(%rbx), %r13
	movq	%r13, 8(%rax)
	movq	%rax, %rdi
	addq	$16, %rdi
	callq	_ROUNDUP32
	movq	%rax, (%r14)
	cmpq	$2, %rbx
	jl	LBB0_12
## %bb.7:
	movq	(%r15), %rdx
	movq	8(%r15), %rsi
	incq	%rsi
	decq	%rdx
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_memcpy
	movq	16(%r15), %r12
	testq	%r12, %r12
	je	LBB0_12
## %bb.8:
	movq	(%r15), %rax
	decq	%rax
	subq	%rax, %r13
	testq	%r13, %r13
	jle	LBB0_12
## %bb.9:
	leaq	(%rbx,%rax,8), %rbx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdx
	movq	8(%r12), %rsi
	movq	%rbx, %rdi
	callq	_memcpy
	movq	16(%r12), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	(%r12), %rcx
	leaq	(%rbx,%rcx,8), %rbx
	subq	%rcx, %r13
	movq	%rax, %r12
	testq	%r13, %r13
	jg	LBB0_10
LBB0_12:
	movq	8(%r15), %rax
	movq	(%rax), %rax
	movq	_HCI_COMMAND_DATA_PACKET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.13:
	movq	___usbdev@GOTPCREL(%rip), %rax
	movl	8(%rax), %edi
	movq	8(%r14), %r9
	movq	___writectrlmsgCB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subq	$8, %rsp
	movl	$32, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	pushq	%r14
	pushq	%rax
	pushq	(%r14)
	callq	_USB_WriteCtrlMsgAsync
	addq	$40, %rsp
	jmp	LBB0_16
LBB0_14:
	movq	_HCI_ACL_DATA_PACKET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	___usbdev@GOTPCREL(%rip), %rax
	jne	LBB0_15
## %bb.17:
	movl	4(%rax), %esi
	movl	8(%rax), %edi
	movq	(%r14), %rcx
	movq	8(%r14), %rdx
	movq	___writebulkmsgCB@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, %r9
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_USB_WriteBlkMsgAsync           ## TAILCALL
LBB0_15:
	addq	$8, %rsp
LBB0_16:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	___usbdev,12,2                  ## @__usbdev
	.comm	_HCI_COMMAND_DATA_PACKET,8,3    ## @HCI_COMMAND_DATA_PACKET
	.comm	_ctrlbufs,4,2                   ## @ctrlbufs
	.comm	_HCI_ACL_DATA_PACKET,8,3        ## @HCI_ACL_DATA_PACKET
	.comm	_aclbufs,4,2                    ## @aclbufs
	.comm	___writectrlmsgCB,4,2           ## @__writectrlmsgCB
	.comm	___writebulkmsgCB,4,2           ## @__writebulkmsgCB
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_physbusif_output               ; -- Begin function physbusif_output
	.p2align	2
_physbusif_output:                      ; @physbusif_output
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
Lloh0:
	adrp	x23, ___usbdev@GOTPAGE
Lloh1:
	ldr	x23, [x23, ___usbdev@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #2
	b.ne	LBB0_14
; %bb.1:
	mov	x21, x1
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
Lloh2:
	adrp	x24, _HCI_COMMAND_DATA_PACKET@GOTPAGE
Lloh3:
	ldr	x24, [x24, _HCI_COMMAND_DATA_PACKET@GOTPAGEOFF]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
Lloh4:
	adrp	x0, _ctrlbufs@GOTPAGE
Lloh5:
	ldr	x0, [x0, _ctrlbufs@GOTPAGEOFF]
	bl	_btmemb_alloc
	cbnz	x0, LBB0_5
	b	LBB0_14
LBB0_3:
Lloh6:
	adrp	x9, _HCI_ACL_DATA_PACKET@GOTPAGE
Lloh7:
	ldr	x9, [x9, _HCI_ACL_DATA_PACKET@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.4:
Lloh9:
	adrp	x0, _aclbufs@GOTPAGE
Lloh10:
	ldr	x0, [x0, _aclbufs@GOTPAGEOFF]
	bl	_btmemb_alloc
	cbz	x0, LBB0_14
LBB0_5:
	mov	x20, x0
	sub	x26, x21, #1
	str	x26, [x0, #8]
	add	x0, x0, #16
	bl	_ROUNDUP32
	str	x0, [x20]
	cmp	x21, #2
	b.lt	LBB0_10
; %bb.6:
	mov	x22, x0
	ldp	x9, x8, [x19]
	add	x1, x8, #1
	sub	x2, x9, #1
	bl	_memcpy
	ldr	x25, [x19, #16]
	cbz	x25, LBB0_10
; %bb.7:
	ldr	x8, [x19]
	sub	x8, x8, #1
	sub	x26, x26, x8
	cmp	x26, #1
	b.lt	LBB0_10
; %bb.8:
	add	x21, x22, x8, lsl #3
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x2, x1, [x25]
	mov	x0, x21
	bl	_memcpy
	ldr	x8, [x25]
	add	x21, x21, x8, lsl #3
	sub	x26, x26, x8
	ldr	x25, [x25, #16]
	cmp	x25, #0
	ccmp	x26, #0, #4, ne
	b.gt	LBB0_9
LBB0_10:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.11:
	ldr	w0, [x23, #8]
	ldp	x6, x5, [x20]
Lloh11:
	adrp	x8, ___writectrlmsgCB@GOTPAGE
Lloh12:
	ldr	x8, [x8, ___writectrlmsgCB@GOTPAGEOFF]
Lloh13:
	ldr	w7, [x8]
	str	x20, [sp]
	mov	w1, #32
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	bl	_USB_WriteCtrlMsgAsync
	b	LBB0_14
LBB0_12:
Lloh14:
	adrp	x9, _HCI_ACL_DATA_PACKET@GOTPAGE
Lloh15:
	ldr	x9, [x9, _HCI_ACL_DATA_PACKET@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.13:
	ldp	w1, w0, [x23, #4]
	ldp	x3, x2, [x20]
Lloh17:
	adrp	x8, ___writebulkmsgCB@GOTPAGE
Lloh18:
	ldr	x8, [x8, ___writebulkmsgCB@GOTPAGEOFF]
Lloh19:
	ldr	w4, [x8]
	mov	x5, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_USB_WriteBlkMsgAsync
LBB0_14:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	___usbdev,12,2                  ; @__usbdev
	.comm	_HCI_COMMAND_DATA_PACKET,8,3    ; @HCI_COMMAND_DATA_PACKET
	.comm	_ctrlbufs,4,2                   ; @ctrlbufs
	.comm	_HCI_ACL_DATA_PACKET,8,3        ; @HCI_ACL_DATA_PACKET
	.comm	_aclbufs,4,2                    ; @aclbufs
	.comm	___writectrlmsgCB,4,2           ; @__writectrlmsgCB
	.comm	___writebulkmsgCB,4,2           ; @__writebulkmsgCB
.subsections_via_symbols
