	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pl08x_phy_alloc_and_start
_pl08x_phy_alloc_and_start:             ## @pl08x_phy_alloc_and_start
	.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
	movq	%rdi, %r15
	movq	24(%rdi), %rbx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_pl08x_get_phy_channel
	movq	(%rbx), %rdi
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movl	(%rax), %edx
	movl	16(%r15), %ecx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	%r14, 8(%r15)
	movq	_PL08X_CHAN_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pl08x_start_next_txd           ## TAILCALL
LBB0_1:
	movl	16(%r15), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_PL08X_CHAN_WAITING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movq	_jiffies@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r15)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no physical channel available for xfer on %s\n"

	.comm	_PL08X_CHAN_WAITING,4,2         ## @PL08X_CHAN_WAITING
	.comm	_jiffies,4,2                    ## @jiffies
L_.str.1:                               ## @.str.1
	.asciz	"allocated physical channel %d for xfer on %s\n"

	.comm	_PL08X_CHAN_RUNNING,4,2         ## @PL08X_CHAN_RUNNING
	.no_dead_strip	_pl08x_phy_alloc_and_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pl08x_phy_alloc_and_start
_pl08x_phy_alloc_and_start:             ; @pl08x_phy_alloc_and_start
	.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	x19, x0
	ldr	x21, [x0, #24]
	mov	x0, x21
	mov	x1, x19
	bl	_pl08x_get_phy_channel
	mov	x20, x0
	ldr	x0, [x21]
	cbz	x20, LBB0_2
; %bb.1:
	ldr	w2, [x20]
	ldr	w8, [x19, #16]
	str	x8, [sp]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	str	x20, [x19, #8]
Lloh2:
	adrp	x8, _PL08X_CHAN_RUNNING@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PL08X_CHAN_RUNNING@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x19]
	mov	x0, 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
	b	_pl08x_start_next_txd
LBB0_2:
	ldr	w2, [x19, #16]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
Lloh7:
	adrp	x8, _PL08X_CHAN_WAITING@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PL08X_CHAN_WAITING@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x19]
Lloh10:
	adrp	x8, _jiffies@GOTPAGE
Lloh11:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	str	w8, [x19, #20]
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no physical channel available for xfer on %s\n"

	.comm	_PL08X_CHAN_WAITING,4,2         ; @PL08X_CHAN_WAITING
	.comm	_jiffies,4,2                    ; @jiffies
l_.str.1:                               ; @.str.1
	.asciz	"allocated physical channel %d for xfer on %s\n"

	.comm	_PL08X_CHAN_RUNNING,4,2         ; @PL08X_CHAN_RUNNING
	.no_dead_strip	_pl08x_phy_alloc_and_start
.subsections_via_symbols
