	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kfd_mmap
_kfd_mmap:                              ## @kfd_mmap
	.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	%rsi, %r14
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_kfd_get_process
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.16:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	(%r14), %rbx
	movq	%rbx, %rdi
	callq	_KFD_MMAP_OFFSET_VALUE_GET
	movq	%rax, (%r14)
	movq	%rbx, %rdi
	callq	_KFD_MMAP_GPU_ID_GET
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movl	%eax, %edi
	callq	_kfd_device_by_id
	jmp	LBB0_4
LBB0_2:
	xorl	%eax, %eax
LBB0_4:
	movq	_KFD_MMAP_TYPE_MASK@GOTPCREL(%rip), %rcx
	andq	(%rcx), %rbx
	addq	$-128, %rbx
	cmpq	$3, %rbx
	ja	LBB0_14
## %bb.5:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rbx,4), %rdx
	addq	%rcx, %rdx
	jmpq	*%rdx
LBB0_10:
	testq	%rax, %rax
	je	LBB0_7
## %bb.11:
	movq	%rax, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfd_reserved_mem_mmap          ## TAILCALL
LBB0_14:
	movq	_EFAULT@GOTPCREL(%rip), %rcx
	jmp	LBB0_15
LBB0_12:
	testq	%rax, %rax
	je	LBB0_7
## %bb.13:
	movq	%rax, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfd_mmio_mmap                  ## TAILCALL
LBB0_9:
	movq	%r15, %rdi
	movq	%r14, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfd_event_mmap                 ## TAILCALL
LBB0_6:
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfd_doorbell_mmap              ## TAILCALL
LBB0_7:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
LBB0_15:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
LJTI0_0:
	.long	L0_0_set_10
	.long	L0_0_set_12
	.long	L0_0_set_9
	.long	L0_0_set_6
	.end_data_region
                                        ## -- End function
	.comm	_current,4,2                    ## @current
	.comm	_KFD_MMAP_TYPE_MASK,8,3         ## @KFD_MMAP_TYPE_MASK
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_EFAULT,4,2                     ## @EFAULT
	.no_dead_strip	_kfd_mmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kfd_mmap
_kfd_mmap:                              ; @kfd_mmap
	.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, x1
Lloh0:
	adrp	x8, _current@GOTPAGE
Lloh1:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_kfd_get_process
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	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	_PTR_ERR
LBB0_2:
	ldr	x21, [x19]
	mov	x0, x21
	bl	_KFD_MMAP_OFFSET_VALUE_GET
	str	x0, [x19]
	mov	x0, x21
	bl	_KFD_MMAP_GPU_ID_GET
	cbz	w0, LBB0_4
; %bb.3:
	bl	_kfd_device_by_id
	b	LBB0_5
LBB0_4:
	mov	x0, #0
LBB0_5:
Lloh3:
	adrp	x8, _KFD_MMAP_TYPE_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _KFD_MMAP_TYPE_MASK@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	and	x8, x8, x21
	sub	x8, x8, #128
	cmp	x8, #3
	b.hi	LBB0_9
; %bb.6:
Lloh6:
	adrp	x9, lJTI0_0@PAGE
Lloh7:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_7
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_7:
	cbz	x0, LBB0_15
; %bb.8:
	mov	x1, x20
	mov	x2, 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
	b	_kfd_reserved_mem_mmap
LBB0_9:
Lloh8:
	adrp	x8, _EFAULT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_16
LBB0_10:
	cbz	x0, LBB0_15
; %bb.11:
	mov	x1, x20
	mov	x2, 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
	b	_kfd_mmio_mmap
LBB0_12:
	mov	x0, x20
	mov	x1, 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
	b	_kfd_event_mmap
LBB0_13:
	cbz	x0, LBB0_15
; %bb.14:
	mov	x1, x20
	mov	x2, 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
	b	_kfd_doorbell_mmap
LBB0_15:
Lloh10:
	adrp	x8, _ENODEV@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	neg	w0, w8
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_7-LBB0_7)>>2
	.byte	(LBB0_10-LBB0_7)>>2
	.byte	(LBB0_12-LBB0_7)>>2
	.byte	(LBB0_13-LBB0_7)>>2
                                        ; -- End function
	.comm	_current,4,2                    ; @current
	.comm	_KFD_MMAP_TYPE_MASK,8,3         ; @KFD_MMAP_TYPE_MASK
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_EFAULT,4,2                     ; @EFAULT
	.no_dead_strip	_kfd_mmap
.subsections_via_symbols
