	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ag71xx_mdio_get_divider
_ag71xx_mdio_get_divider:               ## @ag71xx_mdio_get_divider
	.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	8(%rdi), %rcx
	movq	(%rcx), %rbx
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.1:
	movq	8(%rcx), %r12
	testq	%r12, %r12
	je	LBB0_2
## %bb.3:
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_ar933x_mdio_div_table@GOTPCREL(%rip), %rax
	cmpq	$0, 32(%rcx)
	jne	LBB0_8
## %bb.4:
	cmpq	$0, 24(%rcx)
	jne	LBB0_8
## %bb.5:
	cmpq	$0, 16(%rcx)
	jne	LBB0_6
## %bb.7:
	movq	_ar71xx_mdio_div_table@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_17
LBB0_6:
	movq	_ar7240_mdio_div_table@GOTPCREL(%rip), %rax
LBB0_8:
	movq	(%rax), %r13
	movq	%r13, %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_16
## %bb.9:
	movl	%eax, %ecx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13,%rsi,8), %rdi
	movq	%rbx, %rax
	orq	%rdi, %rax
	shrq	$32, %rax
	je	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%rbx, %rax
	xorl	%edx, %edx
	divq	%rdi
	cmpq	%r12, %rax
	ja	LBB0_15
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%edi
                                        ## kill: def $eax killed $eax def $rax
	cmpq	%r12, %rax
	jbe	LBB0_14
LBB0_15:                                ##   in Loop: Header=BB0_10 Depth=1
	incq	%rsi
	cmpq	%rsi, %rcx
	jne	LBB0_10
LBB0_16:
	movq	(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	movq	%r12, %rcx
	callq	_dev_err
	movq	_ENOENT@GOTPCREL(%rip), %rcx
LBB0_17:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	%rsi, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ar933x_mdio_div_table,8,3      ## @ar933x_mdio_div_table
	.comm	_ar7240_mdio_div_table,8,3      ## @ar7240_mdio_div_table
	.comm	_ar71xx_mdio_div_table,8,3      ## @ar71xx_mdio_div_table
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no divider found for %lu/%lu\n"

	.comm	_ENOENT,4,2                     ## @ENOENT
	.no_dead_strip	_ag71xx_mdio_get_divider
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ag71xx_mdio_get_divider
_ag71xx_mdio_get_divider:               ; @ag71xx_mdio_get_divider
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	x8, [x0, #8]
	ldp	x19, x20, [x8]
	cmp	x19, #0
	ccmp	x20, #0, #4, ne
	b.ne	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_10
LBB0_2:
	mov	x22, x1
	mov	x21, x0
	ldr	x9, [x8, #32]
	cbnz	x9, LBB0_4
; %bb.3:
	ldr	x9, [x8, #24]
	cbz	x9, LBB0_13
LBB0_4:
Lloh2:
	adrp	x8, _ar933x_mdio_div_table@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ar933x_mdio_div_table@GOTPAGEOFF]
LBB0_5:
	ldr	x23, [x8]
	mov	x0, x23
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_9
; %bb.6:
	mov	x8, #0
	mov	w9, w0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x23, x8, lsl #3]
	udiv	x10, x19, x10
	cmp	x10, x20
	b.ls	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x8, x8, #1
	cmp	x9, x8
	b.ne	LBB0_7
LBB0_9:
	ldr	x0, [x21]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	mov	x3, x20
	bl	_dev_err
Lloh6:
	adrp	x8, _ENOENT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_12:
	mov	w0, #0
	str	x8, [x22]
	b	LBB0_11
LBB0_13:
	ldr	x8, [x8, #16]
Lloh8:
	adrp	x9, _ar7240_mdio_div_table@GOTPAGE
Lloh9:
	ldr	x9, [x9, _ar7240_mdio_div_table@GOTPAGEOFF]
Lloh10:
	adrp	x10, _ar71xx_mdio_div_table@GOTPAGE
Lloh11:
	ldr	x10, [x10, _ar71xx_mdio_div_table@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x10, x9, eq
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ar933x_mdio_div_table,8,3      ; @ar933x_mdio_div_table
	.comm	_ar7240_mdio_div_table,8,3      ; @ar7240_mdio_div_table
	.comm	_ar71xx_mdio_div_table,8,3      ; @ar71xx_mdio_div_table
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no divider found for %lu/%lu\n"

	.comm	_ENOENT,4,2                     ; @ENOENT
	.no_dead_strip	_ag71xx_mdio_get_divider
.subsections_via_symbols
