	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function g2d_bind
_g2d_bind:                              ## @g2d_bind
	.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
	movq	%rdx, %rbx
	movq	%rdi, %r14
	callq	_dev_get_drvdata
	movq	%rax, %r15
	movq	(%rbx), %r13
	movq	%rbx, (%rax)
	movq	%rax, %rdi
	callq	_g2d_init_cmdlist
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_exynos_drm_register_dma
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	%r14, (%r13)
	movq	_G2D_HW_MAJOR_VER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_G2D_HW_MINOR_VER@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_info
	xorl	%r12d, %r12d
	jmp	LBB0_5
LBB0_1:
	movl	%eax, %r12d
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	jmp	LBB0_5
LBB0_3:
	movl	%eax, %r12d
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	%r15, %rdi
	callq	_g2d_fini_cmdlist
LBB0_5:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cmdlist init failed\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to enable iommu.\n"

L_.str.2:                               ## @.str.2
	.asciz	"The Exynos G2D (ver %d.%d) successfully registered.\n"

	.comm	_G2D_HW_MAJOR_VER,4,2           ## @G2D_HW_MAJOR_VER
	.comm	_G2D_HW_MINOR_VER,4,2           ## @G2D_HW_MINOR_VER
	.no_dead_strip	_g2d_bind
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function g2d_bind
_g2d_bind:                              ; @g2d_bind
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x2
	mov	x19, x0
	bl	_dev_get_drvdata
	mov	x21, x0
	ldr	x23, [x22]
	str	x22, [x0]
	bl	_g2d_init_cmdlist
	tbnz	w0, #31, LBB0_3
; %bb.1:
	mov	x0, x22
	mov	x1, x19
	bl	_exynos_drm_register_dma
	tbnz	w0, #31, LBB0_4
; %bb.2:
	str	x19, [x23]
Lloh0:
	adrp	x8, _G2D_HW_MAJOR_VER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _G2D_HW_MAJOR_VER@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x8, _G2D_HW_MINOR_VER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _G2D_HW_MINOR_VER@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	mov	w20, #0
	b	LBB0_5
LBB0_3:
	mov	x20, x0
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_5
LBB0_4:
	mov	x20, x0
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	x0, x21
	bl	_g2d_fini_cmdlist
LBB0_5:
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cmdlist init failed\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to enable iommu.\n"

l_.str.2:                               ; @.str.2
	.asciz	"The Exynos G2D (ver %d.%d) successfully registered.\n"

	.comm	_G2D_HW_MAJOR_VER,4,2           ; @G2D_HW_MAJOR_VER
	.comm	_G2D_HW_MINOR_VER,4,2           ; @G2D_HW_MINOR_VER
	.no_dead_strip	_g2d_bind
.subsections_via_symbols
