	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sunxi_setup_scale
_sunxi_setup_scale:                     ## @sunxi_setup_scale
	.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
	movl	%ecx, %eax
	movl	%edx, %r9d
	movq	%rdi, %r14
	movl	%esi, (%rdi)
	movl	%edx, 4(%rdi)
	movl	%ecx, 8(%rdi)
	xorl	%edx, %edx
	divl	16(%rdi)
	movl	%eax, 12(%rdi)
	movq	_NUMPAGES@GOTPCREL(%rip), %r10
	cmpl	$0, (%r10)
	movq	32(%rdi), %rdi
	movl	(%rdi), %r8d
	movl	4(%rdi), %esi
	jle	LBB0_3
## %bb.1:
	movq	40(%r14), %rdx
	movq	8(%rdi), %r11
	movl	20(%r14), %r15d
	movl	%esi, %r13d
	imull	%r8d, %r13d
	shll	$2, %r13d
	movl	%esi, %r12d
	imull	%r9d, %r12d
	shll	$2, %r12d
	movl	%r15d, %ebx
	imull	%r8d, %ebx
	imull	%r9d, %r15d
	addq	$8, %rdx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r13d, -8(%rdx)
	movl	%ebx, %eax
	andl	$-4, %eax
	addq	%r11, %rax
	movq	%rax, (%rdx)
	incq	%rcx
	movslq	(%r10), %rax
	addl	%r12d, %r13d
	addl	%r15d, %ebx
	addq	$16, %rdx
	cmpq	%rax, %rcx
	jl	LBB0_2
LBB0_3:
	movl	24(%r14), %ecx
	imull	%r8d, %ecx
	subl	%ecx, %esi
	shrl	%esi
	xorl	%edx, %edx
	callq	_sunxi_layer_set_output_window
	movq	32(%r14), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sunxi_layer_show               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NUMPAGES,4,2                   ## @NUMPAGES
	.no_dead_strip	_sunxi_setup_scale
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sunxi_setup_scale
_sunxi_setup_scale:                     ; @sunxi_setup_scale
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	stp	w1, w2, [x0]
	ldr	w8, [x0, #16]
	udiv	w9, w3, w8
Lloh0:
	adrp	x8, _NUMPAGES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NUMPAGES@GOTPAGEOFF]
	stp	w3, w9, [x0, #8]
	ldr	w10, [x8]
	ldr	x0, [x0, #32]
	ldp	w4, w9, [x0]
	cmp	w10, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x10, #0
	ldr	x16, [x19, #40]
	ldr	x11, [x0, #8]
	ldr	w15, [x19, #20]
	mul	w12, w9, w4
	lsl	w12, w12, #2
	mul	w13, w9, w2
	lsl	w13, w13, #2
	mul	w14, w15, w4
	mul	w15, w15, w2
	add	x16, x16, #8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	stur	w12, [x16, #-8]
	and	w17, w14, #0xfffffffc
	add	x17, x11, x17
	str	x17, [x16], #16
	add	x10, x10, #1
	ldrsw	x17, [x8]
	add	w12, w12, w13
	add	w14, w14, w15
	cmp	x10, x17
	b.lt	LBB0_2
LBB0_3:
	ldr	w8, [x19, #24]
	mul	w3, w8, w4
	sub	w8, w9, w3
	lsr	w1, w8, #1
	mov	w2, #0
	bl	_sunxi_layer_set_output_window
	ldr	x0, [x19, #32]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_sunxi_layer_show
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_NUMPAGES,4,2                   ; @NUMPAGES
	.no_dead_strip	_sunxi_setup_scale
.subsections_via_symbols
