	.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	%rsi, %r14
	movq	%rdi, %r15
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_of_clk_get
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_2:
	movq	%r13, %rdi
	callq	_clk_get_rate
	movq	%rax, %r12
	movq	%r13, %rdi
	callq	_clk_put
	leaq	L_.str(%rip), %rsi
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	callq	_of_property_read_u32
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_of_property_read_bool
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	$5000000, -48(%rbp)             ## imm = 0x4C4B40
	jmp	LBB0_6
LBB0_5:
	movq	$2000000, -48(%rbp)             ## imm = 0x1E8480
LBB0_6:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_of_device_is_compatible
	movq	_ar933x_mdio_div_table@GOTPCREL(%rip), %rbx
	testq	%rax, %rax
	jne	LBB0_11
## %bb.7:
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	callq	_of_device_is_compatible
	testq	%rax, %rax
	jne	LBB0_11
## %bb.8:
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	callq	_of_device_is_compatible
	testq	%rax, %rax
	jne	LBB0_9
## %bb.10:
	movq	_ar71xx_mdio_div_table@GOTPCREL(%rip), %rbx
	jmp	LBB0_11
LBB0_9:
	movq	_ar7240_mdio_div_table@GOTPCREL(%rip), %rbx
LBB0_11:
	movq	(%rbx), %r15
	movq	%r15, %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_19
## %bb.12:
	movq	-48(%rbp), %rcx
	movl	%eax, %esi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r15,%rdi,8), %rbx
	movq	%r12, %rax
	orq	%rbx, %rax
	shrq	$32, %rax
	je	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	%r12, %rax
	xorl	%edx, %edx
	divq	%rbx
	cmpq	%rcx, %rax
	ja	LBB0_18
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	%r12d, %eax
	xorl	%edx, %edx
	divl	%ebx
                                        ## kill: def $eax killed $eax def $rax
	cmpq	%rcx, %rax
	jbe	LBB0_17
LBB0_18:                                ##   in Loop: Header=BB0_13 Depth=1
	incq	%rdi
	cmpq	%rdi, %rsi
	jne	LBB0_13
LBB0_19:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_20:
	subl	(%rax), %ebx
LBB0_21:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	%rdi, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"qca,mdio-max-frequency"

L_.str.1:                               ## @.str.1
	.asciz	"builtin-switch"

L_.str.2:                               ## @.str.2
	.asciz	"qca,ar9330-mdio"

L_.str.3:                               ## @.str.3
	.asciz	"qca,ar9340-mdio"

	.comm	_ar933x_mdio_div_table,8,3      ## @ar933x_mdio_div_table
L_.str.4:                               ## @.str.4
	.asciz	"qca,ar7240-mdio"

	.comm	_ar7240_mdio_div_table,8,3      ## @ar7240_mdio_div_table
	.comm	_ar71xx_mdio_div_table,8,3      ## @ar71xx_mdio_div_table
	.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:
	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, x1
	mov	x21, x0
	mov	w1, #0
	bl	_of_clk_get
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_15
LBB0_2:
	mov	x0, x22
	bl	_clk_get_rate
	mov	x20, x0
	mov	x0, x22
	bl	_clk_put
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #8
	mov	x0, x21
	bl	_of_property_read_u32
	cbz	x0, LBB0_7
; %bb.3:
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_of_property_read_bool
	cbz	x0, LBB0_5
; %bb.4:
	mov	w8, #19264
	movk	w8, #76, lsl #16
	b	LBB0_6
LBB0_5:
	mov	w8, #33920
	movk	w8, #30, lsl #16
LBB0_6:
	str	x8, [sp, #8]
LBB0_7:
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_of_device_is_compatible
	cbnz	x0, LBB0_9
; %bb.8:
Lloh8:
	adrp	x1, l_.str.3@PAGE
Lloh9:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_of_device_is_compatible
	cbz	x0, LBB0_18
LBB0_9:
Lloh10:
	adrp	x8, _ar933x_mdio_div_table@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ar933x_mdio_div_table@GOTPAGEOFF]
LBB0_10:
	ldr	x21, [x8]
	mov	x0, x21
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_14
; %bb.11:
	mov	x8, #0
	ldr	x9, [sp, #8]
	mov	w10, w0
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x21, x8, lsl #3]
	udiv	x11, x20, x11
	cmp	x11, x9
	b.ls	LBB0_17
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x8, x8, #1
	cmp	x10, x8
	b.ne	LBB0_12
LBB0_14:
Lloh12:
	adrp	x8, _ENOENT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_16:
	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
LBB0_17:
	mov	w0, #0
	str	x8, [x19]
	b	LBB0_16
LBB0_18:
Lloh14:
	adrp	x1, l_.str.4@PAGE
Lloh15:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
	bl	_of_device_is_compatible
Lloh16:
	adrp	x8, _ar7240_mdio_div_table@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ar7240_mdio_div_table@GOTPAGEOFF]
Lloh18:
	adrp	x9, _ar71xx_mdio_div_table@GOTPAGE
Lloh19:
	ldr	x9, [x9, _ar71xx_mdio_div_table@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"qca,mdio-max-frequency"

l_.str.1:                               ; @.str.1
	.asciz	"builtin-switch"

l_.str.2:                               ; @.str.2
	.asciz	"qca,ar9330-mdio"

l_.str.3:                               ; @.str.3
	.asciz	"qca,ar9340-mdio"

	.comm	_ar933x_mdio_div_table,8,3      ; @ar933x_mdio_div_table
l_.str.4:                               ; @.str.4
	.asciz	"qca,ar7240-mdio"

	.comm	_ar7240_mdio_div_table,8,3      ; @ar7240_mdio_div_table
	.comm	_ar71xx_mdio_div_table,8,3      ; @ar71xx_mdio_div_table
	.comm	_ENOENT,4,2                     ; @ENOENT
	.no_dead_strip	_ag71xx_mdio_get_divider
.subsections_via_symbols
