	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_bo_dumb_map_offset
_tegra_bo_dumb_map_offset:              ## @tegra_bo_dumb_map_offset
	.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	%rcx, %r14
	movl	%edx, %r12d
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_DRM_LOCK
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r12d, %edx
	callq	_drm_gem_object_lookup
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_drm_gem_create_mmap_offset
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_drm_gem_object_unreference
	movq	%r15, %rdi
	callq	_DRM_UNLOCK
	jmp	LBB0_5
LBB0_1:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_device_printf
	movq	%r15, %rdi
	callq	_DRM_UNLOCK
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_5
LBB0_3:
	movl	(%r12), %edi
	callq	_DRM_GEM_MAPPING_OFF
	movq	_DRM_GEM_MAPPING_KEY@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%r14)
	movq	%r12, %rdi
	callq	_drm_gem_object_unreference
	movq	%r15, %rdi
	callq	_DRM_UNLOCK
	xorl	%ebx, %ebx
LBB0_5:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Object not found\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DRM_GEM_MAPPING_KEY,4,2        ## @DRM_GEM_MAPPING_KEY
	.no_dead_strip	_tegra_bo_dumb_map_offset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_bo_dumb_map_offset
_tegra_bo_dumb_map_offset:              ; @tegra_bo_dumb_map_offset
	.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	x20, x3
	mov	x21, x2
	mov	x19, x1
	mov	x22, x0
	mov	x0, x1
	bl	_DRM_LOCK
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_drm_gem_object_lookup
	cbz	x0, LBB0_4
; %bb.1:
	mov	x21, x0
	bl	_drm_gem_create_mmap_offset
	mov	x22, x0
	cbnz	w0, LBB0_3
; %bb.2:
	ldr	w0, [x21]
	bl	_DRM_GEM_MAPPING_OFF
Lloh0:
	adrp	x8, _DRM_GEM_MAPPING_KEY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRM_GEM_MAPPING_KEY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	orr	w8, w8, w0
	str	w8, [x20]
LBB0_3:
	mov	x0, x21
	bl	_drm_gem_object_unreference
	mov	x0, x19
	bl	_DRM_UNLOCK
	b	LBB0_5
LBB0_4:
	ldr	w0, [x19]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_device_printf
	mov	x0, x19
	bl	_DRM_UNLOCK
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_5:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Object not found\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DRM_GEM_MAPPING_KEY,4,2        ; @DRM_GEM_MAPPING_KEY
	.no_dead_strip	_tegra_bo_dumb_map_offset
.subsections_via_symbols
