	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap2_iommu_enable
_omap2_iommu_enable:                    ## @omap2_iommu_enable
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	_SZ_16K@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_IS_ALIGNED
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movq	16(%rbx), %rdi
	callq	_virt_to_phys
	movl	%eax, %r14d
	movl	(%r15), %esi
	movl	%eax, %edi
	callq	_IS_ALIGNED
	testl	%eax, %eax
	je	LBB0_2
## %bb.4:
	movq	_MMU_REVISION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_iommu_read_reg
	movl	8(%rbx), %edx
	movl	12(%rbx), %edi
	movl	%eax, %ecx
	shrl	$4, %ecx
	andl	$15, %ecx
	andl	$15, %eax
	leaq	L_.str(%rip), %rsi
	movl	%eax, %r8d
	callq	_dev_info
	movq	_MMU_TTB@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_iommu_write_reg
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_dra7_cfg_dspsys_mmu
	cmpq	$0, (%rbx)
	je	LBB0_6
## %bb.5:
	movq	_MMU_GP_REG_BUS_ERR_BACK_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MMU_GP_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_iommu_write_reg
LBB0_6:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	___iommu_set_twl
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SZ_16K,4,2                     ## @SZ_16K
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MMU_REVISION,4,2               ## @MMU_REVISION
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: version %d.%d\n"

	.comm	_MMU_TTB,4,2                    ## @MMU_TTB
	.comm	_MMU_GP_REG_BUS_ERR_BACK_EN,4,2 ## @MMU_GP_REG_BUS_ERR_BACK_EN
	.comm	_MMU_GP_REG,4,2                 ## @MMU_GP_REG
	.no_dead_strip	_omap2_iommu_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap2_iommu_enable
_omap2_iommu_enable:                    ; @omap2_iommu_enable
	.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
	mov	x19, x0
	ldr	x0, [x0, #16]
	cbz	x0, LBB0_6
; %bb.1:
Lloh0:
	adrp	x21, _SZ_16K@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SZ_16K@GOTPAGEOFF]
	ldr	w1, [x21]
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_IS_ALIGNED
	cbz	w0, LBB0_6
; %bb.2:
	ldr	x0, [x19, #16]
	bl	_virt_to_phys
	mov	x20, x0
	ldr	w1, [x21]
	bl	_IS_ALIGNED
	cbz	w0, LBB0_6
; %bb.3:
Lloh2:
	adrp	x8, _MMU_REVISION@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MMU_REVISION@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_iommu_read_reg
	ldp	w2, w8, [x19, #8]
	ubfx	w3, w0, #4, #4
	and	w4, w0, #0xf
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x8
	bl	_dev_info
Lloh7:
	adrp	x8, _MMU_TTB@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MMU_TTB@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_iommu_write_reg
	mov	x0, x19
	mov	w1, #1
	bl	_dra7_cfg_dspsys_mmu
	ldr	x8, [x19]
	cbz	x8, LBB0_5
; %bb.4:
Lloh10:
	adrp	x8, _MMU_GP_REG_BUS_ERR_BACK_EN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MMU_GP_REG_BUS_ERR_BACK_EN@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x8, _MMU_GP_REG@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MMU_GP_REG@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_iommu_write_reg
LBB0_5:
	mov	x0, x19
	mov	w1, #1
	bl	___iommu_set_twl
	mov	w0, #0
	b	LBB0_7
LBB0_6:
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_SZ_16K,4,2                     ; @SZ_16K
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MMU_REVISION,4,2               ; @MMU_REVISION
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: version %d.%d\n"

	.comm	_MMU_TTB,4,2                    ; @MMU_TTB
	.comm	_MMU_GP_REG_BUS_ERR_BACK_EN,4,2 ; @MMU_GP_REG_BUS_ERR_BACK_EN
	.comm	_MMU_GP_REG,4,2                 ; @MMU_GP_REG
	.no_dead_strip	_omap2_iommu_enable
.subsections_via_symbols
