	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_mem_free                ## -- Begin function radeon_mem_free
	.p2align	4, 0x90
_radeon_mem_free:                       ## @radeon_mem_free
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movl	4(%rsi), %esi
	callq	_get_heap
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.6:
	movl	(%rbx), %esi
	callq	_find_block
	testq	%rax, %rax
	je	LBB0_4
## %bb.7:
	cmpq	%r14, (%rax)
	je	LBB0_9
## %bb.8:
	movq	_EPERM@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_4:
	movq	_EFAULT@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_5:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_9:
	movq	%rax, %rdi
	callq	_free_block
	xorl	%eax, %eax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"called with no initialization\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_EPERM,4,2                      ## @EPERM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_mem_free                ; -- Begin function radeon_mem_free
	.p2align	2
_radeon_mem_free:                       ; @radeon_mem_free
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x0, [x0]
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	ldr	w1, [x1, #4]
	bl	_get_heap
	cbz	x0, LBB0_6
; %bb.2:
	ldr	x0, [x0]
	cbz	x0, LBB0_6
; %bb.3:
	ldr	w1, [x20]
	bl	_find_block
	cbz	x0, LBB0_6
; %bb.4:
	ldr	x8, [x0]
	cmp	x8, x19
	b.eq	LBB0_10
; %bb.5:
Lloh0:
	adrp	x8, _EPERM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
Lloh2:
	adrp	x8, _EFAULT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_10:
	bl	_free_block
	mov	w0, #0
	b	LBB0_9
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"called with no initialization\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_EPERM,4,2                      ; @EPERM
.subsections_via_symbols
