	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function exynos_g2d_init
_exynos_g2d_init:                       ## @exynos_g2d_init
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	_g_drm_fd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_g2d_init
	movl	$-1, %r14d
	testq	%rax, %rax
	je	LBB0_17
## %bb.1:
	movq	%rax, %r12
	movl	$1, %edi
	movl	$40, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_16
## %bb.2:
	movq	_G2D_IMGBUF_GEM@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 32(%rax)
	cmpl	$2, (%r13)
	jne	LBB0_3
## %bb.4:
	movq	_G2D_COLOR_FMT_RGB565@GOTPCREL(%rip), %rdx
	jmp	LBB0_5
LBB0_3:
	movq	_G2D_COLOR_FMT_ARGB8888@GOTPCREL(%rip), %rdx
LBB0_5:
	movq	_G2D_ORDER_AXRGB@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	movl	%ecx, (%rax)
	movl	4(%r13), %ecx
	movl	%ecx, 4(%rax)
	movl	8(%r13), %ecx
	movl	%ecx, 8(%rax)
	movl	12(%r13), %ecx
	movl	%ecx, 12(%rax)
	movl	$-16777216, 16(%rax)            ## imm = 0xFF000000
	movq	_EXYNOS_IMAGE_COUNT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	testl	%r14d, %r14d
	je	LBB0_18
## %bb.6:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	_defaults@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movl	$1, %edi
	movl	$40, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %rbx
	movl	$1, %eax
	movl	$20, %r14d
	movq	%r13, %r12
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%rax, %r15
	movups	(%r12), %xmm0
	extractps	$1, %xmm0, %eax
	imull	12(%r12), %eax
	movl	(%r12), %esi
	extractps	$2, %xmm0, %edx
	imull	%eax, %edx
	extractps	$1, %xmm0, 4(%rbx)
	extractps	$2, %xmm0, 8(%rbx)
	movl	%eax, 12(%rbx)
	movl	-4(%r13,%r14), %eax
	movl	%eax, (%rbx)
	movq	_G2D_IMGBUF_GEM@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%rbx)
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	40(%r12), %rax
	movq	(%rax,%rsi,8), %rax
	movl	(%rax), %eax
	movq	24(%rbx), %rcx
	movl	%eax, (%rcx)
	movq	_G2D_REPEAT_MODE_PAD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	%r12, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_exynos_realloc_buffer
	movq	32(%r12), %rax
	movq	%rbx, -8(%rax,%r15,8)
	movq	_EXYNOS_IMAGE_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	cmpq	%rax, %r15
	jae	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_10 Depth=1
	movq	_defaults@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	leaq	(%r14,%r13), %r12
	movl	$1, %edi
	movl	$40, %esi
	callq	_calloc
	movq	%rax, %rbx
	leaq	1(%r15), %rax
	addq	$20, %r14
	testq	%rbx, %rbx
	jne	LBB0_10
	jmp	LBB0_11
LBB0_7:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
LBB0_11:
	cmpl	%r15d, -56(%rbp)                ## 4-byte Folded Reload
	movl	$-1, %r14d
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	jne	LBB0_12
LBB0_18:
	movq	%rax, 24(%r13)
	movq	%r12, 16(%r13)
	xorl	%r14d, %r14d
	jmp	LBB0_17
LBB0_12:
	testl	%r15d, %r15d
	je	LBB0_15
## %bb.13:
	movl	%r15d, %ebx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	32(%r13), %rax
	movq	-8(%rax,%rbx,8), %rdi
	callq	_free
	movq	32(%r13), %rax
	movq	$0, -8(%rax,%rbx,8)
	decq	%rbx
	jne	LBB0_14
LBB0_15:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_free
LBB0_16:
	movq	%r12, %rdi
	callq	_g2d_fini
LBB0_17:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_g_drm_fd,4,2                   ## @g_drm_fd
	.comm	_G2D_IMGBUF_GEM,8,3             ## @G2D_IMGBUF_GEM
	.comm	_G2D_COLOR_FMT_RGB565,4,2       ## @G2D_COLOR_FMT_RGB565
	.comm	_G2D_ORDER_AXRGB,4,2            ## @G2D_ORDER_AXRGB
	.comm	_G2D_COLOR_FMT_ARGB8888,4,2     ## @G2D_COLOR_FMT_ARGB8888
	.comm	_EXYNOS_IMAGE_COUNT,4,2         ## @EXYNOS_IMAGE_COUNT
	.comm	_defaults,8,3                   ## @defaults
	.comm	_G2D_REPEAT_MODE_PAD,4,2        ## @G2D_REPEAT_MODE_PAD
	.no_dead_strip	_exynos_g2d_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function exynos_g2d_init
_exynos_g2d_init:                       ; @exynos_g2d_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x0
Lloh0:
	adrp	x8, _g_drm_fd@GOTPAGE
Lloh1:
	ldr	x8, [x8, _g_drm_fd@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_g2d_init
	cbz	x0, LBB0_15
; %bb.1:
	mov	x21, x0
	mov	w0, #1
	mov	w1, #40
	bl	_calloc
	cbz	x0, LBB0_14
; %bb.2:
	mov	x25, x0
Lloh3:
	adrp	x8, _G2D_IMGBUF_GEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _G2D_IMGBUF_GEM@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	x8, [x0, #32]
Lloh6:
	adrp	x8, _G2D_COLOR_FMT_RGB565@GOTPAGE
Lloh7:
	ldr	x8, [x8, _G2D_COLOR_FMT_RGB565@GOTPAGEOFF]
Lloh8:
	adrp	x9, _G2D_COLOR_FMT_ARGB8888@GOTPAGE
Lloh9:
	ldr	x9, [x9, _G2D_COLOR_FMT_ARGB8888@GOTPAGEOFF]
	ldr	w10, [x20]
	cmp	w10, #2
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _G2D_ORDER_AXRGB@GOTPAGE
Lloh11:
	ldr	x9, [x9, _G2D_ORDER_AXRGB@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x0]
	ldur	d0, [x20, #4]
	stur	d0, [x0, #4]
	ldr	w8, [x20, #12]
	mov	w9, #-16777216
	stp	w8, w9, [x0, #12]
Lloh13:
	adrp	x8, _EXYNOS_IMAGE_COUNT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EXYNOS_IMAGE_COUNT@GOTPAGEOFF]
Lloh15:
	ldr	w23, [x8]
	cbz	w23, LBB0_8
; %bb.3:
Lloh16:
	adrp	x8, _defaults@GOTPAGE
Lloh17:
	ldr	x8, [x8, _defaults@GOTPAGEOFF]
Lloh18:
	ldr	x26, [x8]
	mov	w0, #1
	mov	w1, #40
	bl	_calloc
	cbz	x0, LBB0_9
; %bb.4:
	mov	x22, x0
	stp	x25, x21, [sp]                  ; 16-byte Folded Spill
	mov	x24, #0
	add	x25, x26, #12
	add	x19, x26, #8
	add	x28, x26, #4
	mov	w27, #16
	mov	x21, x26
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x26]
	ldr	w8, [x28]
	ldr	w9, [x19]
	ldr	w10, [x25]
	mul	w10, w10, w8
	mul	w2, w10, w9
	stp	w9, w10, [x22, #8]
	ldr	w9, [x21, x27]
Lloh19:
	adrp	x10, _G2D_IMGBUF_GEM@GOTPAGE
Lloh20:
	ldr	x10, [x10, _G2D_IMGBUF_GEM@GOTPAGEOFF]
Lloh21:
	ldr	x10, [x10]
	str	x10, [x22, #32]
	ldr	x10, [x20, #40]
	ldr	x10, [x10, x1, lsl #3]
	stp	w9, w8, [x22]
	ldr	w8, [x10]
	ldr	x9, [x22, #24]
	str	w8, [x9]
Lloh22:
	adrp	x8, _G2D_REPEAT_MODE_PAD@GOTPAGE
Lloh23:
	ldr	x8, [x8, _G2D_REPEAT_MODE_PAD@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	str	w8, [x22, #20]
	mov	x0, x20
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_exynos_realloc_buffer
	ldr	x8, [x20, #32]
	str	x22, [x8, x24, lsl #3]
	add	x24, x24, #1
Lloh25:
	adrp	x8, _EXYNOS_IMAGE_COUNT@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EXYNOS_IMAGE_COUNT@GOTPAGEOFF]
Lloh27:
	ldr	w23, [x8]
	cmp	x24, x23
	b.hs	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh28:
	adrp	x8, _defaults@GOTPAGE
Lloh29:
	ldr	x8, [x8, _defaults@GOTPAGEOFF]
Lloh30:
	ldr	x21, [x8]
	mov	w8, #20
	madd	x26, x24, x8, x21
	add	x28, x26, #4
	add	x19, x26, #8
	add	x25, x26, #12
	mov	w0, #1
	mov	w1, #40
	bl	_calloc
	mov	x22, x0
	add	x27, x27, #20
	cbnz	x0, LBB0_5
LBB0_7:
	ldp	x25, x21, [sp]                  ; 16-byte Folded Reload
	cmp	w23, w24
	b.ne	LBB0_10
LBB0_8:
	mov	w0, #0
	stp	x21, x25, [x20, #16]
	b	LBB0_16
LBB0_9:
	mov	x24, #0
	cmp	w23, w24
	b.eq	LBB0_8
LBB0_10:
	cbz	w24, LBB0_13
; %bb.11:
	lsl	x8, x24, #3
	sub	x19, x8, #8
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #32]
	ldr	x0, [x8, x19]
	bl	_free
	ldr	x8, [x20, #32]
	str	xzr, [x8, x19]
	sub	x19, x19, #8
	cmn	x19, #8
	b.ne	LBB0_12
LBB0_13:
	mov	x0, x25
	bl	_free
LBB0_14:
	mov	x0, x21
	bl	_g2d_fini
LBB0_15:
	mov	w0, #-1
LBB0_16:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_g_drm_fd,4,2                   ; @g_drm_fd
	.comm	_G2D_IMGBUF_GEM,8,3             ; @G2D_IMGBUF_GEM
	.comm	_G2D_COLOR_FMT_RGB565,4,2       ; @G2D_COLOR_FMT_RGB565
	.comm	_G2D_ORDER_AXRGB,4,2            ; @G2D_ORDER_AXRGB
	.comm	_G2D_COLOR_FMT_ARGB8888,4,2     ; @G2D_COLOR_FMT_ARGB8888
	.comm	_EXYNOS_IMAGE_COUNT,4,2         ; @EXYNOS_IMAGE_COUNT
	.comm	_defaults,8,3                   ; @defaults
	.comm	_G2D_REPEAT_MODE_PAD,4,2        ; @G2D_REPEAT_MODE_PAD
	.no_dead_strip	_exynos_g2d_init
.subsections_via_symbols
