	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function tegra_drm_load
LCPI0_0:
	.long	4096                            ## 0x1000
	.long	4096                            ## 0x1000
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_tegra_drm_load:                        ## @tegra_drm_load
	.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, %r12
	movl	72(%rdi), %edi
	callq	_to_host1x_device
	movq	%rax, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$56, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	_platform_bus_type@GOTPCREL(%rip), %rdi
	callq	_iommu_present
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	_platform_bus_type@GOTPCREL(%rip), %rdi
	callq	_iommu_domain_alloc
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	xorl	%eax, %eax
	callq	_iova_cache_get
	testl	%eax, %eax
	js	LBB0_6
LBB0_7:
	leaq	52(%r14), %rdi
	callq	_mutex_init
	leaq	48(%r14), %rdi
	callq	_INIT_LIST_HEAD
	movq	%r14, 64(%r12)
	movq	%r12, 40(%r14)
	movq	%r12, %rdi
	callq	_drm_mode_config_init
	xorps	%xmm0, %xmm0
	movups	%xmm0, 48(%r12)
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [4096,4096,1,1]
	movups	%xmm0, 8(%r12)
	movq	_tegra_drm_mode_config_funcs@GOTPCREL(%rip), %rax
	movq	%rax, 40(%r12)
	movq	_tegra_drm_mode_config_helpers@GOTPCREL(%rip), %rax
	movq	%rax, 32(%r12)
	movq	%r12, %rdi
	callq	_tegra_drm_fb_prepare
	testl	%eax, %eax
	js	LBB0_8
## %bb.9:
	movq	%r12, %rdi
	callq	_drm_kms_helper_poll_init
	movq	%r15, %rdi
	callq	_host1x_device_init
	testl	%eax, %eax
	js	LBB0_10
## %bb.11:
	cmpq	$0, (%r14)
	je	LBB0_13
## %bb.12:
	movq	%r15, %rdi
	callq	_dma_get_mask
	movl	%eax, %r13d
	movq	(%r14), %rax
	movl	4(%rax), %edx
	andl	%r13d, %edx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	andl	8(%rax), %r13d
	movq	_CARVEOUT_SZ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%ecx, %edx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%r13d, %edx
	subl	%ecx, %edx
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	leal	1(%rdx), %ebx
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	(%rax), %edi
	callq	___ffs
	movq	%rax, %rcx
	movl	$1, %esi
	shlq	%cl, %rsi
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	leaq	16(%r14), %r15
                                        ## kill: def $cl killed $cl killed $rcx
	sarl	%cl, %ebx
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_init_iova_domain
	movq	%r15, %rdi
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	callq	_iova_shift
	movl	%eax, 8(%r14)
	movl	%r13d, %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, 12(%r14)
	leaq	20(%r14), %rdi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	negl	%eax
	leal	(%rax,%r13), %edx
	incl	%edx
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	%ebx, %esi
	callq	_drm_mm_init
	leaq	24(%r14), %rdi
	callq	_mutex_init
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	leaq	L_.str.2(%rip), %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_DRM_DEBUG
LBB0_13:
	movq	32(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.14:
	callq	_tegra_display_hub_prepare
	testl	%eax, %eax
	js	LBB0_15
LBB0_16:
	movabsq	$-4294967295, %rax              ## imm = 0xFFFFFFFF00000001
	movq	%rax, (%r12)
	movl	24(%r12), %esi
	movq	%r12, %rdi
	callq	_drm_vblank_init
	testl	%eax, %eax
	js	LBB0_18
## %bb.17:
	movq	%r12, %rdi
	callq	_drm_mode_config_reset
	movq	%r12, %rdi
	callq	_tegra_drm_fb_init
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jns	LBB0_27
LBB0_18:
	movl	%eax, %ebx
	movq	32(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_20
## %bb.19:
	callq	_tegra_display_hub_cleanup
	jmp	LBB0_20
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_27
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_26
LBB0_8:
	movl	%eax, %ebx
	jmp	LBB0_22
LBB0_6:
	movl	%eax, %ebx
	jmp	LBB0_24
LBB0_10:
	movl	%eax, %ebx
	jmp	LBB0_21
LBB0_15:
	movl	%eax, %ebx
LBB0_20:
	movq	%r15, %rdi
	callq	_host1x_device_exit
LBB0_21:
	movq	%r12, %rdi
	callq	_drm_kms_helper_poll_fini
	movq	%r12, %rdi
	callq	_tegra_drm_fb_free
LBB0_22:
	movq	%r12, %rdi
	callq	_drm_mode_config_cleanup
	cmpq	$0, (%r14)
	je	LBB0_24
## %bb.23:
	leaq	24(%r14), %rdi
	callq	_mutex_destroy
	leaq	20(%r14), %rdi
	callq	_drm_mm_takedown
	movq	%r14, %rdi
	addq	$16, %rdi
	callq	_put_iova_domain
	xorl	%eax, %eax
	callq	_iova_cache_put
LBB0_24:
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_26
## %bb.25:
	callq	_iommu_domain_free
LBB0_26:
	movq	%r14, %rdi
	callq	_kfree
LBB0_27:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_platform_bus_type,4,2          ## @platform_bus_type
	.comm	_tegra_drm_mode_config_funcs,4,2 ## @tegra_drm_mode_config_funcs
	.comm	_tegra_drm_mode_config_helpers,4,2 ## @tegra_drm_mode_config_helpers
	.comm	_CARVEOUT_SZ,4,2                ## @CARVEOUT_SZ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IOMMU apertures:\n"

L_.str.1:                               ## @.str.1
	.asciz	"  GEM: %#llx-%#llx\n"

L_.str.2:                               ## @.str.2
	.asciz	"  Carveout: %#llx-%#llx\n"

	.no_dead_strip	_tegra_drm_load
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function tegra_drm_load
lCPI0_0:
	.long	4096                            ; 0x1000
	.long	4096                            ; 0x1000
	.long	1                               ; 0x1
	.long	1                               ; 0x1
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3
lCPI0_1:
	.long	1                               ; 0x1
	.long	4294967295                      ; 0xffffffff
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_tegra_drm_load:                        ; @tegra_drm_load
	.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
	ldr	w0, [x0, #72]
	bl	_to_host1x_device
	mov	x21, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #56
	bl	_kzalloc
	cbz	x0, LBB0_13
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x0, _platform_bus_type@GOTPAGE
Lloh4:
	ldr	x0, [x0, _platform_bus_type@GOTPAGEOFF]
	bl	_iommu_present
	cbz	x0, LBB0_4
; %bb.2:
Lloh5:
	adrp	x0, _platform_bus_type@GOTPAGE
Lloh6:
	ldr	x0, [x0, _platform_bus_type@GOTPAGEOFF]
	bl	_iommu_domain_alloc
	str	x0, [x19]
	cbz	x0, LBB0_14
; %bb.3:
	bl	_iova_cache_get
	tbnz	w0, #31, LBB0_16
LBB0_4:
	add	x0, x19, #52
	bl	_mutex_init
	add	x0, x19, #48
	bl	_INIT_LIST_HEAD
	str	x19, [x20, #64]
	str	x20, [x19, #40]
	mov	x0, x20
	bl	_drm_mode_config_init
	stp	xzr, xzr, [x20, #48]
Lloh7:
	adrp	x8, lCPI0_0@PAGE
Lloh8:
	ldr	q0, [x8, lCPI0_0@PAGEOFF]
	stur	q0, [x20, #8]
Lloh9:
	adrp	x8, _tegra_drm_mode_config_funcs@GOTPAGE
Lloh10:
	ldr	x8, [x8, _tegra_drm_mode_config_funcs@GOTPAGEOFF]
Lloh11:
	adrp	x9, _tegra_drm_mode_config_helpers@GOTPAGE
Lloh12:
	ldr	x9, [x9, _tegra_drm_mode_config_helpers@GOTPAGEOFF]
	stp	x9, x8, [x20, #32]
	mov	x0, x20
	bl	_tegra_drm_fb_prepare
	tbnz	w0, #31, LBB0_15
; %bb.5:
	mov	x0, x20
	bl	_drm_kms_helper_poll_init
	mov	x0, x21
	bl	_host1x_device_init
	tbnz	w0, #31, LBB0_17
; %bb.6:
	ldr	x8, [x19]
	cbz	x8, LBB0_8
; %bb.7:
	mov	x0, x21
	bl	_dma_get_mask
	ldr	x9, [x19]
	ldp	w8, w10, [x9]
	and	w22, w10, w0
	ldr	w9, [x9, #8]
	and	w24, w9, w0
Lloh13:
	adrp	x9, _CARVEOUT_SZ@GOTPAGE
Lloh14:
	ldr	x9, [x9, _CARVEOUT_SZ@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	add	w25, w22, w9
	sub	w26, w24, w9
	add	w27, w26, #1
	mov	x0, x8
	bl	___ffs
	add	x23, x19, #16
	mov	w8, #1
	lsl	x1, x8, x0
	asr	w2, w27, w0
	mov	x0, x23
	bl	_init_iova_domain
	mov	x0, x23
	bl	_iova_shift
	asr	w8, w24, w0
	stp	w0, w8, [x19, #8]
	add	x0, x19, #20
	sub	w8, w24, w25
	add	w2, w8, #1
	mov	x1, x22
	bl	_drm_mm_init
	add	x0, x19, #24
	bl	_mutex_init
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
	stp	x22, x26, [sp]
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG
	stp	x27, x24, [sp]
Lloh20:
	adrp	x0, l_.str.2@PAGE
Lloh21:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_DEBUG
LBB0_8:
	ldr	x0, [x19, #32]
	cbz	x0, LBB0_10
; %bb.9:
	bl	_tegra_display_hub_prepare
	tbnz	w0, #31, LBB0_20
LBB0_10:
Lloh22:
	adrp	x8, lCPI0_1@PAGE
Lloh23:
	ldr	d0, [x8, lCPI0_1@PAGEOFF]
	str	d0, [x20]
	ldr	w1, [x20, #24]
	mov	x0, x20
	bl	_drm_vblank_init
	tbnz	w0, #31, LBB0_18
; %bb.11:
	mov	x0, x20
	bl	_drm_mode_config_reset
	mov	x0, x20
	bl	_tegra_drm_fb_init
	tbnz	w0, #31, LBB0_18
; %bb.12:
	mov	w22, #0
	b	LBB0_28
LBB0_13:
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_28
LBB0_14:
Lloh27:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_27
LBB0_15:
	mov	x22, x0
	b	LBB0_23
LBB0_16:
	mov	x22, x0
	b	LBB0_25
LBB0_17:
	mov	x22, x0
	b	LBB0_22
LBB0_18:
	mov	x22, x0
	ldr	x0, [x19, #32]
	cbz	x0, LBB0_21
; %bb.19:
	bl	_tegra_display_hub_cleanup
	b	LBB0_21
LBB0_20:
	mov	x22, x0
LBB0_21:
	mov	x0, x21
	bl	_host1x_device_exit
LBB0_22:
	mov	x0, x20
	bl	_drm_kms_helper_poll_fini
	mov	x0, x20
	bl	_tegra_drm_fb_free
LBB0_23:
	mov	x0, x20
	bl	_drm_mode_config_cleanup
	ldr	x8, [x19]
	cbz	x8, LBB0_25
; %bb.24:
	add	x0, x19, #24
	bl	_mutex_destroy
	add	x0, x19, #20
	bl	_drm_mm_takedown
	add	x0, x19, #16
	bl	_put_iova_domain
	bl	_iova_cache_put
LBB0_25:
	ldr	x0, [x19]
	cbz	x0, LBB0_27
; %bb.26:
	bl	_iommu_domain_free
LBB0_27:
	mov	x0, x19
	bl	_kfree
LBB0_28:
	mov	x0, x22
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdrp	Lloh7, Lloh9
	.loh AdrpLdr	Lloh7, Lloh8
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdr	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_platform_bus_type,4,2          ; @platform_bus_type
	.comm	_tegra_drm_mode_config_funcs,4,2 ; @tegra_drm_mode_config_funcs
	.comm	_tegra_drm_mode_config_helpers,4,2 ; @tegra_drm_mode_config_helpers
	.comm	_CARVEOUT_SZ,4,2                ; @CARVEOUT_SZ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IOMMU apertures:\n"

l_.str.1:                               ; @.str.1
	.asciz	"  GEM: %#llx-%#llx\n"

l_.str.2:                               ; @.str.2
	.asciz	"  Carveout: %#llx-%#llx\n"

	.no_dead_strip	_tegra_drm_load
.subsections_via_symbols
