	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tegra_gart_probe               ## -- Begin function tegra_gart_probe
	.p2align	4, 0x90
_tegra_gart_probe:                      ## @tegra_gart_probe
	.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	%rsi, %r12
	movq	%rdi, %r14
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_GART_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	callq	_BUILD_BUG_ON
	movq	%r14, %rdi
	callq	_to_platform_device
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	movl	$1, %edx
	callq	_platform_get_resource
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$48, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	movq	%rax, %r13
	movq	_gart_handle@GOTPCREL(%rip), %rax
	movq	%r13, (%rax)
	movq	%r14, 40(%r13)
	movq	_GART_REG_BASE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	(%r12), %rax
	movq	%rax, 32(%r13)
	movl	8(%r15), %eax
	movl	%eax, 24(%r13)
	movq	(%r15), %rax
	incq	%rax
	movq	%rax, 16(%r13)
	leaq	12(%r13), %rdi
	callq	_spin_lock_init
	movq	%r13, %rdi
	addq	$8, %rdi
	callq	_spin_lock_init
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_do_gart_setup
	leaq	L_.str.1(%rip), %rcx
	movq	%r13, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_iommu_device_sysfs_add
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.6:
	movq	_gart_iommu_ops@GOTPCREL(%rip), %rsi
	movq	%r13, %rdi
	callq	_iommu_device_set_ops
	movl	(%r14), %esi
	movq	%r13, %rdi
	callq	_iommu_device_set_fwnode
	movq	%r13, %rdi
	callq	_iommu_device_register
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_7
LBB0_9:
	movq	%r13, %rdi
	callq	_iommu_device_sysfs_remove
LBB0_10:
	movq	%r13, %rdi
	callq	_kfree
	jmp	LBB0_11
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_7:
	movq	%r15, %rdi
	callq	_resource_size
	movq	_GART_PAGE_SIZE@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
                                        ## kill: def $eax killed $eax def $rax
	leal	(,%rax,4), %edi
	callq	_vmalloc
	movl	%eax, 4(%r13)
	testl	%eax, %eax
	je	LBB0_8
## %bb.12:
	movq	%r13, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	%r13, %rdi
	callq	_iommu_device_unregister
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
	.comm	_GART_PAGE_SHIFT,8,3            ## @GART_PAGE_SHIFT
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Memory aperture resource unavailable\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_gart_handle,8,3                ## @gart_handle
	.comm	_GART_REG_BASE,8,3              ## @GART_REG_BASE
L_.str.1:                               ## @.str.1
	.asciz	"gart"

	.comm	_gart_iommu_ops,4,2             ## @gart_iommu_ops
	.comm	_GART_PAGE_SIZE,4,2             ## @GART_PAGE_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tegra_gart_probe               ; -- Begin function tegra_gart_probe
	.p2align	2
_tegra_gart_probe:                      ; @tegra_gart_probe
	.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	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _GART_PAGE_SHIFT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _GART_PAGE_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ne
	bl	_BUILD_BUG_ON
	mov	x0, x20
	bl	_to_platform_device
Lloh6:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	w2, #1
	bl	_platform_get_resource
	cbz	x0, LBB0_6
; %bb.1:
	mov	x21, x0
Lloh9:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	w0, #48
	bl	_kzalloc
	cbz	x0, LBB0_7
; %bb.2:
	mov	x19, x0
Lloh12:
	adrp	x8, _gart_handle@GOTPAGE
Lloh13:
	ldr	x8, [x8, _gart_handle@GOTPAGEOFF]
Lloh14:
	str	x0, [x8]
	ldr	x8, [x22]
Lloh15:
	adrp	x9, _GART_REG_BASE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _GART_REG_BASE@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	add	x8, x9, x8
	stp	x8, x20, [x0, #32]
	ldr	w8, [x21, #8]
	str	w8, [x0, #24]
	ldr	x8, [x21]
	add	x8, x8, #1
	str	x8, [x0, #16]
	add	x0, x0, #12
	bl	_spin_lock_init
	add	x0, x19, #8
	bl	_spin_lock_init
	mov	x0, x19
	mov	x1, #0
	bl	_do_gart_setup
Lloh18:
	adrp	x3, l_.str.1@PAGE
Lloh19:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	mov	x2, #0
	bl	_iommu_device_sysfs_add
	mov	x22, x0
	cbnz	w0, LBB0_5
; %bb.3:
Lloh20:
	adrp	x1, _gart_iommu_ops@GOTPAGE
Lloh21:
	ldr	x1, [x1, _gart_iommu_ops@GOTPAGEOFF]
	mov	x0, x19
	bl	_iommu_device_set_ops
	ldr	w1, [x20]
	mov	x0, x19
	bl	_iommu_device_set_fwnode
	mov	x0, x19
	bl	_iommu_device_register
	mov	x22, x0
	cbz	w0, LBB0_10
LBB0_4:
	mov	x0, x19
	bl	_iommu_device_sysfs_remove
LBB0_5:
	mov	x0, x19
	bl	_kfree
	b	LBB0_9
LBB0_6:
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh24:
	adrp	x8, _ENXIO@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh26:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_9:
	mov	x0, x22
	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
	b	_ERR_PTR
LBB0_10:
	mov	x0, x21
	bl	_resource_size
Lloh28:
	adrp	x8, _GART_PAGE_SIZE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _GART_PAGE_SIZE@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	sdiv	w8, w0, w8
	lsl	w0, w8, #2
	bl	_vmalloc
	str	w0, [x19, #4]
	cbz	w0, LBB0_12
; %bb.11:
	mov	x0, x19
	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
LBB0_12:
Lloh31:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	neg	w22, w8
	mov	x0, x19
	bl	_iommu_device_unregister
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotStr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.comm	_GART_PAGE_SHIFT,8,3            ; @GART_PAGE_SHIFT
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Memory aperture resource unavailable\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_gart_handle,8,3                ; @gart_handle
	.comm	_GART_REG_BASE,8,3              ; @GART_REG_BASE
l_.str.1:                               ; @.str.1
	.asciz	"gart"

	.comm	_gart_iommu_ops,4,2             ; @gart_iommu_ops
	.comm	_GART_PAGE_SIZE,4,2             ; @GART_PAGE_SIZE
.subsections_via_symbols
