	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_bo_set_metadata         ## -- Begin function amdgpu_bo_set_metadata
	.p2align	4, 0x90
_amdgpu_bo_set_metadata:                ## @amdgpu_bo_set_metadata
	.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	%rdi, %r14
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.3:
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.6:
	movl	%ecx, %r15d
	movq	%rdx, %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rsi, %rdi
	movq	%rbx, %rsi
	callq	_kmemdup
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %r12
	movq	8(%r14), %rdi
	callq	_kfree
	movl	%r15d, 16(%r14)
	movq	%r12, 8(%r14)
	movq	%rbx, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_1:
	xorl	%ebx, %ebx
	cmpq	$0, (%r14)
	je	LBB0_9
## %bb.2:
	movq	8(%r14), %rdi
	callq	_kfree
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r14)
	jmp	LBB0_9
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_5:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_bo_set_metadata         ; -- Begin function amdgpu_bo_set_metadata
	.p2align	2
_amdgpu_bo_set_metadata:                ; @amdgpu_bo_set_metadata
	.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, x0
	cbz	x2, LBB0_4
; %bb.1:
	cbz	x1, LBB0_6
; %bb.2:
	mov	x21, x3
	mov	x20, x2
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x1
	mov	x1, x20
	bl	_kmemdup
	cbz	x0, LBB0_7
; %bb.3:
	mov	x22, x0
	ldr	x0, [x19, #8]
	bl	_kfree
	mov	w0, #0
	str	w21, [x19, #16]
	stp	x20, x22, [x19]
	b	LBB0_10
LBB0_4:
	ldr	x8, [x19]
	cbz	x8, LBB0_9
; %bb.5:
	ldr	x0, [x19, #8]
	bl	_kfree
	mov	w0, #0
	stp	xzr, xzr, [x19]
	b	LBB0_10
LBB0_6:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_9:
	mov	w0, #0
LBB0_10:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
