	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lookup_phy
_lookup_phy:                            ## @lookup_phy
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	(%rdi), %edi
	callq	_to_mmp_pdma_dev
	movq	%rax, %r12
	leaq	4(%rax), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movl	(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_6
## %bb.1:
	xorl	%ecx, %ecx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rcx
	cmpq	%rax, %rcx
	je	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	testb	$12, %cl
	jne	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r12), %rdx
	cmpq	$0, (%rdx,%rcx,8)
	jne	LBB0_2
## %bb.5:
	leaq	(%rdx,%rcx,8), %rbx
	jmp	LBB0_27
LBB0_6:
	leal	-1(%rax), %ecx
	shrl	$2, %ecx
	andl	$3, %ecx
	je	LBB0_13
## %bb.7:
	testl	%eax, %eax
	jle	LBB0_12
## %bb.8:
	xorl	%edx, %edx
	xorl	%esi, %esi
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_10 Depth=1
	incq	%rsi
	addq	$-8, %rdx
	cmpq	%rsi, %rax
	je	LBB0_12
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	%esi, %edi
	andl	$12, %edi
	cmpl	$4, %edi
	jne	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	8(%r12), %rbx
	cmpq	$0, (%rbx,%rsi,8)
	jne	LBB0_9
	jmp	LBB0_19
LBB0_12:
	cmpl	$1, %ecx
	jne	LBB0_14
LBB0_13:
	xorl	%ebx, %ebx
	jmp	LBB0_28
LBB0_14:
	testl	%eax, %eax
	jle	LBB0_20
## %bb.15:
	xorl	%edx, %edx
	xorl	%esi, %esi
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_17 Depth=1
	incq	%rsi
	addq	$-8, %rdx
	cmpq	%rsi, %rax
	je	LBB0_20
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movl	%esi, %edi
	andl	$12, %edi
	cmpl	$8, %edi
	jne	LBB0_16
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	8(%r12), %rbx
	cmpq	$0, (%rbx,%rsi,8)
	jne	LBB0_16
LBB0_19:
	subq	%rdx, %rbx
LBB0_27:
	movq	%r14, (%rbx)
LBB0_28:
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	xorl	%ebx, %ebx
	cmpl	$2, %ecx
	je	LBB0_28
## %bb.21:
	testl	%eax, %eax
	jle	LBB0_28
## %bb.22:
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_24 Depth=1
	incq	%rdx
	addq	$-8, %rcx
	cmpq	%rdx, %rax
	je	LBB0_13
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movl	%edx, %esi
	notl	%esi
	testb	$12, %sil
	jne	LBB0_23
## %bb.25:                              ##   in Loop: Header=BB0_24 Depth=1
	movq	8(%r12), %rbx
	cmpq	$0, (%rbx,%rdx,8)
	jne	LBB0_23
## %bb.26:
	subq	%rcx, %rbx
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_lookup_phy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lookup_phy
_lookup_phy:                            ; @lookup_phy
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x0
	ldr	w0, [x0]
	bl	_to_mmp_pdma_dev
	mov	x21, x0
	add	x19, x0, #4
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	w8, [x21]
	subs	w9, w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x10, #0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x10, x10, #1
	cmp	x10, x8
	b.eq	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	tst	x10, #0xc
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x11, [x21, #8]
	add	x22, x11, x10, lsl #3
	ldr	x11, [x22]
	cbnz	x11, LBB0_2
	b	LBB0_19
LBB0_5:
	ubfx	w9, w9, #2, #2
	cbz	w9, LBB0_12
; %bb.6:
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.7:
	mov	x10, #0
	mov	x11, #0
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x11, x11, #1
	sub	x10, x10, #8
	cmp	x8, x11
	b.eq	LBB0_11
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	and	x12, x11, #0xc
	cmp	x12, #4
	b.ne	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x12, [x21, #8]
	ldr	x13, [x12, x11, lsl #3]
	cbnz	x13, LBB0_8
	b	LBB0_18
LBB0_11:
	cmp	w9, #1
	b.ne	LBB0_13
LBB0_12:
	mov	x22, #0
	b	LBB0_20
LBB0_13:
	cmp	w8, #1
	b.lt	LBB0_21
; %bb.14:
	mov	x10, #0
	mov	x11, #0
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	add	x11, x11, #1
	sub	x10, x10, #8
	cmp	x8, x11
	b.eq	LBB0_21
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	and	x12, x11, #0xc
	cmp	x12, #8
	b.ne	LBB0_15
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	ldr	x12, [x21, #8]
	ldr	x13, [x12, x11, lsl #3]
	cbnz	x13, LBB0_15
LBB0_18:
	sub	x22, x12, x10
LBB0_19:
	str	x20, [x22]
LBB0_20:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_21:
	mov	x22, #0
	cmp	w9, #2
	b.eq	LBB0_20
; %bb.22:
	cmp	w8, #1
	b.lt	LBB0_20
; %bb.23:
	mov	x9, #0
	mov	x10, #0
	b	LBB0_25
LBB0_24:                                ;   in Loop: Header=BB0_25 Depth=1
	add	x10, x10, #1
	sub	x9, x9, #8
	cmp	x8, x10
	b.eq	LBB0_12
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	mvn	w11, w10
	tst	x11, #0xc
	b.ne	LBB0_24
; %bb.26:                               ;   in Loop: Header=BB0_25 Depth=1
	ldr	x11, [x21, #8]
	ldr	x12, [x11, x10, lsl #3]
	cbnz	x12, LBB0_24
; %bb.27:
	sub	x22, x11, x9
	b	LBB0_19
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_lookup_phy
.subsections_via_symbols
