	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mv88e6xxx_g1_atu_set_age_time  ## -- Begin function mv88e6xxx_g1_atu_set_age_time
	.p2align	4, 0x90
_mv88e6xxx_g1_atu_set_age_time:         ## @mv88e6xxx_g1_atu_set_age_time
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %rax
	movl	(%rax), %ebx
	cmpl	%esi, %ebx
	ja	LBB0_2
## %bb.1:
	movl	%ebx, %eax
	shll	$8, %eax
	subl	%ebx, %eax
	cmpl	%esi, %eax
	jb	LBB0_2
## %bb.3:
	movq	%rdi, %r14
	movl	%ebx, %eax
	shrl	%eax
	addl	%esi, %eax
	xorl	%edx, %edx
	divl	%ebx
	movl	%eax, %r15d
	movq	_MV88E6XXX_G1_ATU_CTL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-36(%rbp), %rdx
	callq	_mv88e6xxx_g1_read
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	movl	$-4081, %eax                    ## imm = 0xF00F
	andl	-36(%rbp), %eax
	movl	%r15d, %edx
	shll	$4, %edx
	orl	%eax, %edx
	movl	%edx, -36(%rbp)
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_mv88e6xxx_g1_write
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movl	(%r14), %edi
	imull	%r15d, %ebx
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	movl	%ebx, %ecx
	callq	_dev_dbg
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_2:
	movq	_ERANGE@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ERANGE,4,2                     ## @ERANGE
	.comm	_MV88E6XXX_G1_ATU_CTL,4,2       ## @MV88E6XXX_G1_ATU_CTL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"AgeTime set to 0x%02x (%d ms)\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mv88e6xxx_g1_atu_set_age_time  ; -- Begin function mv88e6xxx_g1_atu_set_age_time
	.p2align	2
_mv88e6xxx_g1_atu_set_age_time:         ; @mv88e6xxx_g1_atu_set_age_time
	.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
	ldr	x8, [x0, #8]
	ldr	w21, [x8]
	lsl	w8, w21, #8
	sub	w8, w8, w21
	cmp	w21, w1
	ccmp	w8, w1, #0, ls
	b.hs	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ERANGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_2:
	mov	x20, x1
	mov	x19, x0
Lloh3:
	adrp	x22, _MV88E6XXX_G1_ATU_CTL@GOTPAGE
Lloh4:
	ldr	x22, [x22, _MV88E6XXX_G1_ATU_CTL@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #12
	bl	_mv88e6xxx_g1_read
	cbnz	w0, LBB0_5
; %bb.3:
	add	w8, w20, w21, lsr #1
	udiv	w20, w8, w21
	ldr	w8, [sp, #12]
	and	w8, w8, #0xfffff00f
	orr	w2, w8, w20, lsl #4
	str	w2, [sp, #12]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_mv88e6xxx_g1_write
	cbnz	w0, LBB0_5
; %bb.4:
	ldr	w0, [x19]
	mul	w3, w20, w21
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_dbg
	mov	w0, #0
LBB0_5:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_ERANGE,4,2                     ; @ERANGE
	.comm	_MV88E6XXX_G1_ATU_CTL,4,2       ; @MV88E6XXX_G1_ATU_CTL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"AgeTime set to 0x%02x (%d ms)\n"

.subsections_via_symbols
