	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sun4i_ddc_calc_divider
_sun4i_ddc_calc_divider:                ## @sun4i_ddc_calc_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
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -80(%rbp)                  ## 8-byte Spill
	movl	%edx, %ebx
	movq	%rsi, %rax
	movq	%rdi, %r15
	movslq	%edx, %rsi
	movq	%rax, %rdx
	orq	%rsi, %rdx
	shrq	$32, %rdx
	movq	%r9, -88(%rbp)                  ## 8-byte Spill
	je	LBB0_1
## %bb.2:
	xorl	%edx, %edx
	divq	%rsi
	jmp	LBB0_3
LBB0_1:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ebx
                                        ## kill: def $eax killed $eax def $rax
LBB0_3:
	movabsq	$-3689348814741910323, %rdx     ## imm = 0xCCCCCCCCCCCCCCCD
	mulq	%rdx
	movq	%rdx, %r10
	movq	%rdx, %r14
	shrq	$3, %r14
	movslq	%ecx, %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	%rdx, %rsi
	shrq	$4, %rsi
	movq	%rdx, %rax
	shrq	$5, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rdx, %rax
	shrq	$6, %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, %rax
	shrq	$7, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r13
	shrq	$8, %r13
	movq	%rdx, %r12
	shrq	$9, %r12
	shrq	$10, %r10
	xorl	%r9d, %r9d
	xorl	%ebx, %ebx
	xorl	%r8d, %r8d
	xorl	%ecx, %ecx
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_44:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	incq	%r9
	cmpq	$8, %r9
	je	LBB0_45
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r9), %r11
	movq	%r14, %rax
	orq	%r11, %rax
	shrq	$32, %rax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %rax
	xorl	%edx, %edx
	divq	%r11
	cmpq	%r15, %rax
	ja	LBB0_9
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	subq	%rax, %rdi
	movq	%rdi, %rdx
	negq	%rdx
	cmovsq	%rdi, %rdx
	movq	%r14, %rsi
	movq	%r15, %r14
	subq	%rbx, %r14
	movq	%r14, %rdi
	negq	%rdi
	cmovsq	%r14, %rdi
	movq	%rsi, %r14
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	cmpq	%rdi, %rdx
	cmovbl	%r9d, %ecx
	movl	$0, %edx
	cmovbl	%edx, %r8d
	cmovbq	%rax, %rbx
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%rsi, %rax
	orq	%r11, %rax
	shrq	$32, %rax
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%rsi, %rax
	xorl	%edx, %edx
	divq	%r11
	cmpq	%r15, %rax
	ja	LBB0_14
LBB0_13:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdx
	subq	%rax, %rdx
	movq	%rdx, %rdi
	negq	%rdi
	cmovsq	%rdx, %rdi
	movq	%r15, %rsi
	subq	%rbx, %rsi
	movq	%rsi, %rdx
	negq	%rdx
	cmovsq	%rsi, %rdx
	cmpq	%rdx, %rdi
	cmovbl	%r9d, %ecx
	movl	$1, %edx
	cmovbl	%edx, %r8d
	cmovbq	%rax, %rbx
LBB0_14:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, %rdx
	orq	%r11, %rdx
	shrq	$32, %rdx
	je	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_4 Depth=1
	xorl	%edx, %edx
	divq	%r11
	cmpq	%r15, %rax
	ja	LBB0_19
LBB0_18:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdx
	subq	%rax, %rdx
	movq	%rdx, %rsi
	negq	%rsi
	cmovsq	%rdx, %rsi
	movq	%r15, %rdx
	subq	%rbx, %rdx
	movq	%rdx, %rdi
	negq	%rdi
	cmovsq	%rdx, %rdi
	cmpq	%rdi, %rsi
	cmovbl	%r9d, %ecx
	movl	$2, %edx
	cmovbl	%edx, %r8d
	cmovbq	%rax, %rbx
LBB0_19:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, %rdx
	orq	%r11, %rdx
	shrq	$32, %rdx
	je	LBB0_20
## %bb.21:                              ##   in Loop: Header=BB0_4 Depth=1
	xorl	%edx, %edx
	divq	%r11
	cmpq	%r15, %rax
	ja	LBB0_24
LBB0_23:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdx
	subq	%rax, %rdx
	movq	%rdx, %rsi
	negq	%rsi
	cmovsq	%rdx, %rsi
	movq	%r15, %rdx
	subq	%rbx, %rdx
	movq	%rdx, %rdi
	negq	%rdi
	cmovsq	%rdx, %rdi
	cmpq	%rdi, %rsi
	cmovbl	%r9d, %ecx
	movl	$3, %edx
	cmovbl	%edx, %r8d
	cmovbq	%rax, %rbx
LBB0_24:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, %rdx
	orq	%r11, %rdx
	shrq	$32, %rdx
	je	LBB0_25
## %bb.26:                              ##   in Loop: Header=BB0_4 Depth=1
	xorl	%edx, %edx
	divq	%r11
	cmpq	%r15, %rax
	ja	LBB0_29
LBB0_28:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdx
	subq	%rax, %rdx
	movq	%rdx, %rsi
	negq	%rsi
	cmovsq	%rdx, %rsi
	movq	%r15, %rdx
	subq	%rbx, %rdx
	movq	%rdx, %rdi
	negq	%rdi
	cmovsq	%rdx, %rdi
	cmpq	%rdi, %rsi
	cmovbl	%r9d, %ecx
	movl	$4, %edx
	cmovbl	%edx, %r8d
	cmovbq	%rax, %rbx
LBB0_29:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r13, %rax
	orq	%r11, %rax
	shrq	$32, %rax
	je	LBB0_30
## %bb.31:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%r13, %rax
	xorl	%edx, %edx
	divq	%r11
	cmpq	%r15, %rax
	ja	LBB0_34
LBB0_33:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdx
	subq	%rax, %rdx
	movq	%rdx, %rsi
	negq	%rsi
	cmovsq	%rdx, %rsi
	movq	%r15, %rdx
	subq	%rbx, %rdx
	movq	%rdx, %rdi
	negq	%rdi
	cmovsq	%rdx, %rdi
	cmpq	%rdi, %rsi
	cmovbl	%r9d, %ecx
	movl	$5, %edx
	cmovbl	%edx, %r8d
	cmovbq	%rax, %rbx
LBB0_34:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rax
	orq	%r11, %rax
	shrq	$32, %rax
	je	LBB0_35
## %bb.36:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rax
	xorl	%edx, %edx
	divq	%r11
	cmpq	%r15, %rax
	ja	LBB0_39
LBB0_38:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdx
	subq	%rax, %rdx
	movq	%rdx, %rsi
	negq	%rsi
	cmovsq	%rdx, %rsi
	movq	%r15, %rdx
	subq	%rbx, %rdx
	movq	%rdx, %rdi
	negq	%rdi
	cmovsq	%rdx, %rdi
	cmpq	%rdi, %rsi
	cmovbl	%r9d, %ecx
	movl	$6, %edx
	cmovbl	%edx, %r8d
	cmovbq	%rax, %rbx
LBB0_39:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r10, %rax
	orq	%r11, %rax
	shrq	$32, %rax
	je	LBB0_40
## %bb.41:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%r10, %rax
	xorl	%edx, %edx
	divq	%r11
	cmpq	%r15, %rax
	ja	LBB0_44
	jmp	LBB0_43
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%r11d
                                        ## kill: def $eax killed $eax def $rax
	cmpq	%r15, %rax
	jbe	LBB0_8
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	%esi, %eax
	xorl	%edx, %edx
	divl	%r11d
                                        ## kill: def $eax killed $eax def $rax
	cmpq	%r15, %rax
	jbe	LBB0_13
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_4 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r11d
                                        ## kill: def $eax killed $eax def $rax
	cmpq	%r15, %rax
	jbe	LBB0_18
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_4 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r11d
                                        ## kill: def $eax killed $eax def $rax
	cmpq	%r15, %rax
	jbe	LBB0_23
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_4 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r11d
                                        ## kill: def $eax killed $eax def $rax
	cmpq	%r15, %rax
	jbe	LBB0_28
	jmp	LBB0_29
	.p2align	4, 0x90
LBB0_30:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	%r13d, %eax
	xorl	%edx, %edx
	divl	%r11d
                                        ## kill: def $eax killed $eax def $rax
	cmpq	%r15, %rax
	jbe	LBB0_33
	jmp	LBB0_34
	.p2align	4, 0x90
LBB0_35:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	%r12d, %eax
	xorl	%edx, %edx
	divl	%r11d
                                        ## kill: def $eax killed $eax def $rax
	cmpq	%r15, %rax
	jbe	LBB0_38
	jmp	LBB0_39
	.p2align	4, 0x90
LBB0_40:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	%r10d, %eax
	xorl	%edx, %edx
	divl	%r11d
                                        ## kill: def $eax killed $eax def $rax
	cmpq	%r15, %rax
	ja	LBB0_44
LBB0_43:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdx
	subq	%rax, %rdx
	movq	%rdx, %rsi
	negq	%rsi
	cmovsq	%rdx, %rsi
	movq	%r15, %rdx
	subq	%rbx, %rdx
	movq	%rdx, %rdi
	negq	%rdi
	cmovsq	%rdx, %rdi
	cmpq	%rdi, %rsi
	cmovbl	%r9d, %ecx
	movl	$7, %edx
	cmovbl	%edx, %r8d
	cmovbq	%rax, %rbx
	jmp	LBB0_44
LBB0_45:
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	testq	%rdx, %rdx
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	je	LBB0_48
## %bb.46:
	testq	%rax, %rax
	je	LBB0_48
## %bb.47:
	movl	%ecx, (%rdx)
	movl	%r8d, (%rax)
LBB0_48:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_sun4i_ddc_calc_divider
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sun4i_ddc_calc_divider
_sun4i_ddc_calc_divider:                ; @sun4i_ddc_calc_divider
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	.cfi_offset w19, -8
	.cfi_offset w20, -16
	.cfi_offset w21, -24
	.cfi_offset w22, -32
	.cfi_offset w23, -40
	.cfi_offset w24, -48
	.cfi_offset w25, -56
	.cfi_offset w26, -64
                                        ; kill: def $w3 killed $w3 def $x3
                                        ; kill: def $w2 killed $w2 def $x2
	mov	x8, x0
	mov	x11, #0
	mov	x0, #0
	mov	w9, #0
	mov	w10, #0
	sxtw	x12, w2
	udiv	x12, x1, x12
	mov	x13, #-3689348814741910324
	movk	x13, #52429
	umulh	x6, x12, x13
	lsr	x12, x6, #3
	sxtw	x13, w3
	lsr	x14, x6, #4
	lsr	x15, x6, #5
	lsr	x16, x6, #6
	lsr	x17, x6, #7
	lsr	x1, x6, #8
	lsr	x2, x6, #9
	lsr	x3, x6, #10
	mov	w6, #7
	mov	w7, #6
	mov	w19, #5
	mov	w20, #4
	mov	w21, #3
	mov	w22, #2
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	x11, x11, #1
	cmp	x11, #8
	b.eq	LBB0_18
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x23, x13, x11
	udiv	x24, x12, x23
	cmp	x24, x8
	b.hi	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	subs	x25, x8, x24
	cneg	x25, x25, mi
	subs	x26, x8, x0
	cneg	x26, x26, mi
	cmp	x25, x26
	csel	x0, x24, x0, lo
	csel	w10, w11, w10, lo
	csel	w9, wzr, w9, lo
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	udiv	x24, x14, x23
	cmp	x24, x8
	b.hi	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	subs	x25, x8, x24
	cneg	x25, x25, mi
	subs	x26, x8, x0
	cneg	x26, x26, mi
	cmp	x25, x26
	csel	x0, x24, x0, lo
	csel	w10, w11, w10, lo
	csinc	w9, w9, wzr, hs
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	udiv	x24, x15, x23
	cmp	x24, x8
	b.hi	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	subs	x25, x8, x24
	cneg	x25, x25, mi
	subs	x26, x8, x0
	cneg	x26, x26, mi
	cmp	x25, x26
	csel	x0, x24, x0, lo
	csel	w10, w11, w10, lo
	csel	w9, w22, w9, lo
LBB0_8:                                 ;   in Loop: Header=BB0_2 Depth=1
	udiv	x24, x16, x23
	cmp	x24, x8
	b.hi	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	subs	x25, x8, x24
	cneg	x25, x25, mi
	subs	x26, x8, x0
	cneg	x26, x26, mi
	cmp	x25, x26
	csel	x0, x24, x0, lo
	csel	w10, w11, w10, lo
	csel	w9, w21, w9, lo
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
	udiv	x24, x17, x23
	cmp	x24, x8
	b.hi	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_2 Depth=1
	subs	x25, x8, x24
	cneg	x25, x25, mi
	subs	x26, x8, x0
	cneg	x26, x26, mi
	cmp	x25, x26
	csel	x0, x24, x0, lo
	csel	w10, w11, w10, lo
	csel	w9, w20, w9, lo
LBB0_12:                                ;   in Loop: Header=BB0_2 Depth=1
	udiv	x24, x1, x23
	cmp	x24, x8
	b.hi	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_2 Depth=1
	subs	x25, x8, x24
	cneg	x25, x25, mi
	subs	x26, x8, x0
	cneg	x26, x26, mi
	cmp	x25, x26
	csel	x0, x24, x0, lo
	csel	w10, w11, w10, lo
	csel	w9, w19, w9, lo
LBB0_14:                                ;   in Loop: Header=BB0_2 Depth=1
	udiv	x24, x2, x23
	cmp	x24, x8
	b.hi	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_2 Depth=1
	subs	x25, x8, x24
	cneg	x25, x25, mi
	subs	x26, x8, x0
	cneg	x26, x26, mi
	cmp	x25, x26
	csel	x0, x24, x0, lo
	csel	w10, w11, w10, lo
	csel	w9, w7, w9, lo
LBB0_16:                                ;   in Loop: Header=BB0_2 Depth=1
	udiv	x23, x3, x23
	cmp	x23, x8
	b.hi	LBB0_1
; %bb.17:                               ;   in Loop: Header=BB0_2 Depth=1
	subs	x24, x8, x23
	cneg	x24, x24, mi
	subs	x25, x8, x0
	cneg	x25, x25, mi
	cmp	x24, x25
	csel	x0, x23, x0, lo
	csel	w10, w11, w10, lo
	csel	w9, w6, w9, lo
	b	LBB0_1
LBB0_18:
	cbz	x4, LBB0_21
; %bb.19:
	cbz	x5, LBB0_21
; %bb.20:
	str	w10, [x4]
	str	w9, [x5]
LBB0_21:
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #64             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_sun4i_ddc_calc_divider
.subsections_via_symbols
