	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movl	(%rdi), %edi
	callq	_clk_get_rate
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	_AR9330@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ag71xx_is
	movq	_ar933x_mdio_div_table@GOTPCREL(%rip), %r12
	testq	%rax, %rax
	jne	LBB0_7
## %bb.3:
	movq	_AR9340@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ag71xx_is
	testq	%rax, %rax
	jne	LBB0_7
## %bb.4:
	movq	_AR7240@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ag71xx_is
	testq	%rax, %rax
	jne	LBB0_5
## %bb.6:
	movq	_ar71xx_mdio_div_table@GOTPCREL(%rip), %r12
	jmp	LBB0_7
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_16
LBB0_5:
	movq	_ar7240_mdio_div_table@GOTPCREL(%rip), %r12
LBB0_7:
	movq	(%r12), %r15
	movq	%r15, %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_15
## %bb.8:
	movq	_AG71XX_MDIO_MAX_CLK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, %r8d
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15,%rdi,8), %rsi
	movq	%rbx, %rax
	orq	%rsi, %rax
	shrq	$32, %rax
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%rbx, %rax
	xorl	%edx, %edx
	divq	%rsi
	cmpq	%rcx, %rax
	ja	LBB0_14
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $eax killed $eax def $rax
	cmpq	%rcx, %rax
	jbe	LBB0_13
LBB0_14:                                ##   in Loop: Header=BB0_9 Depth=1
	incq	%rdi
	cmpq	%rdi, %r8
	jne	LBB0_9
LBB0_15:
	movq	_ENOENT@GOTPCREL(%rip), %rcx
LBB0_16:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_17:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	%rdi, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AR9330,4,2                     ## @AR9330
	.comm	_AR9340,4,2                     ## @AR9340
	.comm	_ar933x_mdio_div_table,8,3      ## @ar933x_mdio_div_table
	.comm	_AR7240,4,2                     ## @AR7240
	.comm	_ar7240_mdio_div_table,8,3      ## @ar7240_mdio_div_table
	.comm	_ar71xx_mdio_div_table,8,3      ## @ar71xx_mdio_div_table
	.comm	_AG71XX_MDIO_MAX_CLK,8,3        ## @AG71XX_MDIO_MAX_CLK
	.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	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	x19, x1
	mov	x21, x0
	ldr	w0, [x0]
	bl	_clk_get_rate
	cbz	x0, LBB0_9
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x8, _AR9330@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AR9330@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_ag71xx_is
	cbnz	x0, LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _AR9340@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AR9340@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_ag71xx_is
	cbz	x0, LBB0_13
LBB0_3:
Lloh6:
	adrp	x8, _ar933x_mdio_div_table@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ar933x_mdio_div_table@GOTPAGEOFF]
LBB0_4:
	ldr	x21, [x8]
	mov	x0, x21
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_8
; %bb.5:
	mov	x8, #0
Lloh8:
	adrp	x9, _AG71XX_MDIO_MAX_CLK@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AG71XX_MDIO_MAX_CLK@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	mov	w10, w0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x21, x8, lsl #3]
	udiv	x11, x20, x11
	cmp	x11, x9
	b.ls	LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x8, x8, #1
	cmp	x10, x8
	b.ne	LBB0_6
LBB0_8:
Lloh11:
	adrp	x8, _ENOENT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_11:
	mov	w0, #0
	str	x8, [x19]
LBB0_12:
	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_13:
Lloh15:
	adrp	x8, _AR7240@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AR7240@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_ag71xx_is
Lloh18:
	adrp	x8, _ar7240_mdio_div_table@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ar7240_mdio_div_table@GOTPAGEOFF]
Lloh20:
	adrp	x9, _ar71xx_mdio_div_table@GOTPAGE
Lloh21:
	ldr	x9, [x9, _ar71xx_mdio_div_table@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AR9330,4,2                     ; @AR9330
	.comm	_AR9340,4,2                     ; @AR9340
	.comm	_ar933x_mdio_div_table,8,3      ; @ar933x_mdio_div_table
	.comm	_AR7240,4,2                     ; @AR7240
	.comm	_ar7240_mdio_div_table,8,3      ; @ar7240_mdio_div_table
	.comm	_ar71xx_mdio_div_table,8,3      ; @ar71xx_mdio_div_table
	.comm	_AG71XX_MDIO_MAX_CLK,8,3        ; @AG71XX_MDIO_MAX_CLK
	.comm	_ENOENT,4,2                     ; @ENOENT
	.no_dead_strip	_ag71xx_mdio_get_divider
.subsections_via_symbols
