	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rockchip_drm_init_iommu
_rockchip_drm_init_iommu:               ## @rockchip_drm_init_iommu
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_is_support_iommu@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	cmpl	$0, (%rax)
	je	LBB0_4
## %bb.1:
	movq	(%rdi), %r14
	movq	_platform_bus_type@GOTPCREL(%rip), %rdi
	callq	_iommu_domain_alloc
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	(%rax), %rbx
	movq	8(%rax), %r12
	leaq	L_.str(%rip), %rdi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	callq	_DRM_DEBUG
	leaq	4(%r14), %rdi
	subq	%r12, %rbx
	incq	%rbx
	movq	%r12, %rsi
	movq	%rbx, %rdx
	callq	_drm_mm_init
	movq	%r14, %rdi
	callq	_mutex_init
	jmp	LBB0_4
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_4:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_is_support_iommu,4,2           ## @is_support_iommu
	.comm	_platform_bus_type,4,2          ## @platform_bus_type
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IOMMU context initialized (aperture: %#llx-%#llx)\n"

	.no_dead_strip	_rockchip_drm_init_iommu
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rockchip_drm_init_iommu
_rockchip_drm_init_iommu:               ; @rockchip_drm_init_iommu
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x8, _is_support_iommu@GOTPAGE
Lloh1:
	ldr	x8, [x8, _is_support_iommu@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_3
; %bb.1:
	ldr	x19, [x0]
Lloh3:
	adrp	x0, _platform_bus_type@GOTPAGE
Lloh4:
	ldr	x0, [x0, _platform_bus_type@GOTPAGEOFF]
	bl	_iommu_domain_alloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_4
; %bb.2:
	ldp	x21, x20, [x0]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x2, x21
	bl	_DRM_DEBUG
	add	x0, x19, #4
	sub	x8, x21, x20
	add	x2, x8, #1
	mov	x1, x20
	bl	_drm_mm_init
	mov	x0, x19
	bl	_mutex_init
LBB0_3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_is_support_iommu,4,2           ; @is_support_iommu
	.comm	_platform_bus_type,4,2          ; @platform_bus_type
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IOMMU context initialized (aperture: %#llx-%#llx)\n"

	.no_dead_strip	_rockchip_drm_init_iommu
.subsections_via_symbols
