	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function exynos_setup_scale
LCPI0_0:
	.long	0x7fffffff                      ## float NaN
	.long	0x7fffffff                      ## float NaN
	.long	0x7fffffff                      ## float NaN
	.long	0x7fffffff                      ## float NaN
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2
LCPI0_1:
	.long	0x38d1b717                      ## float 9.99999974E-5
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_exynos_setup_scale:                    ## @exynos_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
	movq	40(%rdi), %r8
	movq	_EXYNOS_IMAGE_FRAME@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r8,%rax,8), %r8
	movl	%esi, %eax
	cvtsi2ss	%rax, %xmm0
	movl	%edx, %eax
	cvtsi2ss	%rax, %xmm1
	divss	%xmm1, %xmm0
	movl	%esi, (%r8)
	movl	%edx, 4(%r8)
	cmpl	$2, %ecx
	jne	LBB0_1
## %bb.2:
	movq	_G2D_COLOR_FMT_RGB565@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_1:
	movq	_G2D_COLOR_FMT_XRGB8888@GOTPCREL(%rip), %rcx
LBB0_3:
	movq	_G2D_ORDER_AXRGB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	movl	%eax, 8(%r8)
	movss	(%rdi), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	movaps	%xmm1, %xmm2
	subss	%xmm0, %xmm2
	andps	LCPI0_0(%rip), %xmm2
	movss	LCPI0_1(%rip), %xmm3            ## xmm3 = mem[0],zero,zero,zero
	ucomiss	%xmm2, %xmm3
	jbe	LBB0_5
## %bb.4:
	movl	4(%rdi), %eax
	movl	8(%rdi), %r8d
	jmp	LBB0_8
LBB0_5:
	ucomiss	%xmm0, %xmm1
	movl	4(%rdi), %eax
	jbe	LBB0_7
## %bb.6:
	movl	%eax, %ecx
	xorps	%xmm2, %xmm2
	cvtsi2ss	%rcx, %xmm2
	mulss	%xmm2, %xmm0
	divss	%xmm1, %xmm0
	cvttss2si	%xmm0, %r9
	movl	8(%rdi), %r8d
	jmp	LBB0_9
LBB0_7:
	movl	8(%rdi), %ecx
	xorps	%xmm2, %xmm2
	cvtsi2ss	%rcx, %xmm2
	mulss	%xmm2, %xmm1
	divss	%xmm0, %xmm1
	cvttss2si	%xmm1, %r8
LBB0_8:
	movl	%eax, %r9d
LBB0_9:
	subl	%r9d, %eax
	shrl	%eax
	movq	16(%rdi), %rcx
	movl	%eax, (%rcx)
	movl	8(%rdi), %eax
	subl	%r8d, %eax
	shrl	%eax
	movl	%eax, 4(%rcx)
	movl	%r9d, 8(%rcx)
	movl	%r8d, 12(%rcx)
	movl	%esi, 16(%rcx)
	movl	%edx, 20(%rcx)
	movl	24(%rdi), %edx
	testq	%rdx, %rdx
	je	LBB0_11
## %bb.10:
	movq	32(%rdi), %rdi
	shlq	$2, %rdx
	leaq	L_.memset_pattern(%rip), %rsi
	callq	_memset_pattern16
LBB0_11:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EXYNOS_IMAGE_FRAME,8,3         ## @EXYNOS_IMAGE_FRAME
	.comm	_G2D_COLOR_FMT_RGB565,4,2       ## @G2D_COLOR_FMT_RGB565
	.comm	_G2D_ORDER_AXRGB,4,2            ## @G2D_ORDER_AXRGB
	.comm	_G2D_COLOR_FMT_XRGB8888,4,2     ## @G2D_COLOR_FMT_XRGB8888
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## @.memset_pattern
L_.memset_pattern:
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1

	.no_dead_strip	_exynos_setup_scale
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function exynos_setup_scale
_exynos_setup_scale:                    ; @exynos_setup_scale
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldr	x8, [x0, #40]
Lloh0:
	adrp	x9, _EXYNOS_IMAGE_FRAME@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EXYNOS_IMAGE_FRAME@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	x8, [x8, x9, lsl #3]
	ucvtf	s0, w1
	ucvtf	s1, w2
	fdiv	s0, s0, s1
	stp	w1, w2, [x8]
Lloh3:
	adrp	x9, _G2D_COLOR_FMT_RGB565@GOTPAGE
Lloh4:
	ldr	x9, [x9, _G2D_COLOR_FMT_RGB565@GOTPAGEOFF]
Lloh5:
	adrp	x10, _G2D_COLOR_FMT_XRGB8888@GOTPAGE
Lloh6:
	ldr	x10, [x10, _G2D_COLOR_FMT_XRGB8888@GOTPAGEOFF]
	cmp	w3, #2
	csel	x9, x9, x10, eq
	ldr	w9, [x9]
Lloh7:
	adrp	x10, _G2D_ORDER_AXRGB@GOTPAGE
Lloh8:
	ldr	x10, [x10, _G2D_ORDER_AXRGB@GOTPAGEOFF]
Lloh9:
	ldr	w10, [x10]
	orr	w9, w10, w9
	str	w9, [x8, #8]
	ldr	s1, [x0]
	fabd	s2, s1, s0
	mov	w8, #46871
	movk	w8, #14545, lsl #16
	fmov	s3, w8
	fcmp	s2, s3
	b.pl	LBB0_2
; %bb.1:
	ldp	w8, w9, [x0, #4]
	b	LBB0_5
LBB0_2:
	ldr	w8, [x0, #4]
	fcmp	s1, s0
	b.le	LBB0_4
; %bb.3:
	ucvtf	s2, w8
	fmul	s0, s0, s2
	fdiv	s0, s0, s1
	fcvtzu	w10, s0
	ldr	w9, [x0, #8]
	b	LBB0_6
LBB0_4:
	ldr	s2, [x0, #8]
	ucvtf	s2, s2
	fmul	s1, s1, s2
	fdiv	s0, s1, s0
	fcvtzu	w9, s0
LBB0_5:
	mov	x10, x8
LBB0_6:
	sub	w8, w8, w10
	lsr	w8, w8, #1
	ldr	x11, [x0, #16]
	str	w8, [x11]
	ldr	w8, [x0, #8]
	sub	w8, w8, w9
	lsr	w8, w8, #1
	stp	w8, w10, [x11, #4]
	stp	w9, w1, [x11, #12]
	str	w2, [x11, #20]
	ldr	w8, [x0, #24]
	cbz	w8, LBB0_8
; %bb.7:
	ldr	x0, [x0, #32]
	lsl	x2, x8, #2
Lloh10:
	adrp	x1, l_.memset_pattern@PAGE
Lloh11:
	add	x1, x1, l_.memset_pattern@PAGEOFF
	bl	_memset_pattern16
LBB0_8:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EXYNOS_IMAGE_FRAME,8,3         ; @EXYNOS_IMAGE_FRAME
	.comm	_G2D_COLOR_FMT_RGB565,4,2       ; @G2D_COLOR_FMT_RGB565
	.comm	_G2D_ORDER_AXRGB,4,2            ; @G2D_ORDER_AXRGB
	.comm	_G2D_COLOR_FMT_XRGB8888,4,2     ; @G2D_COLOR_FMT_XRGB8888
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; @.memset_pattern
l_.memset_pattern:
	.long	1                               ; 0x1
	.long	1                               ; 0x1
	.long	1                               ; 0x1
	.long	1                               ; 0x1

	.no_dead_strip	_exynos_setup_scale
.subsections_via_symbols
