	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_mode_dumb_create        ## -- Begin function amdgpu_mode_dumb_create
	.p2align	4, 0x90
_amdgpu_mode_dumb_create:               ## @amdgpu_mode_dumb_create
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rdi, %r14
	movq	_AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED@GOTPCREL(%rip), %rax
	movq	_AMDGPU_GEM_CREATE_CPU_GTT_USWC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	movq	(%rsi), %r12
	xorl	%eax, %eax
	cmpq	$0, (%r12)
	je	LBB0_2
## %bb.1:
	movq	_AMDGPU_GEM_CREATE_VRAM_CLEARED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_2:
	orl	%eax, %ebx
	movl	24(%r15), %edi
	movl	28(%r15), %r13d
	movl	$8, %esi
	callq	_DIV_ROUND_UP
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	callq	_amdgpu_align_pitch
	movq	%rax, 16(%r15)
	imull	4(%r15), %eax
	movl	%eax, (%r15)
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_ALIGN
	movl	%eax, (%r15)
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_amdgpu_display_supported_domains
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_amdgpu_bo_get_preferred_pin_domain
	movl	(%r15), %esi
	movq	_ttm_bo_type_device@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	leaq	-56(%rbp), %r10
	movq	%r12, %rdi
	xorl	%edx, %edx
	movl	%eax, %ecx
	movl	%ebx, %r8d
	pushq	%r10
	pushq	$0
	callq	_amdgpu_gem_object_create
	addq	$16, %rsp
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_4:
	movq	-56(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	callq	_drm_gem_handle_create
	movl	%eax, %ebx
	movq	-56(%rbp), %rdi
	callq	_drm_gem_object_put_unlocked
	testl	%ebx, %ebx
	jne	LBB0_6
## %bb.5:
	movl	-44(%rbp), %eax
	movl	%eax, 8(%r15)
	xorl	%ebx, %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED,4,2 ## @AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED
	.comm	_AMDGPU_GEM_CREATE_CPU_GTT_USWC,4,2 ## @AMDGPU_GEM_CREATE_CPU_GTT_USWC
	.comm	_AMDGPU_GEM_CREATE_VRAM_CLEARED,4,2 ## @AMDGPU_GEM_CREATE_VRAM_CLEARED
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_ttm_bo_type_device,4,2         ## @ttm_bo_type_device
	.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_mode_dumb_create        ; -- Begin function amdgpu_mode_dumb_create
	.p2align	2
_amdgpu_mode_dumb_create:               ; @amdgpu_mode_dumb_create
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x2
	mov	x20, x0
	ldr	x21, [x1]
Lloh0:
	adrp	x8, _AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED@GOTPAGEOFF]
Lloh2:
	adrp	x9, _AMDGPU_GEM_CREATE_CPU_GTT_USWC@GOTPAGE
Lloh3:
	ldr	x9, [x9, _AMDGPU_GEM_CREATE_CPU_GTT_USWC@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	x9, [x21]
Lloh6:
	adrp	x10, _AMDGPU_GEM_CREATE_VRAM_CLEARED@GOTPAGE
Lloh7:
	ldr	x10, [x10, _AMDGPU_GEM_CREATE_VRAM_CLEARED@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	cmp	x9, #0
	csel	w9, wzr, w10, eq
	orr	w22, w8, w9
	ldp	w0, w23, [x2, #24]
	mov	w1, #8
	bl	_DIV_ROUND_UP
	mov	x2, x0
	mov	x0, x21
	mov	x1, x23
	mov	w3, #0
	bl	_amdgpu_align_pitch
	str	x0, [x19, #16]
	ldr	w8, [x19, #4]
	mul	w0, w8, w0
	str	w0, [x19]
Lloh9:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_ALIGN
	str	w0, [x19]
	mov	x0, x21
	mov	x1, x22
	bl	_amdgpu_display_supported_domains
	mov	x1, x0
	mov	x0, x21
	bl	_amdgpu_bo_get_preferred_pin_domain
	mov	x3, x0
	ldr	w1, [x19]
Lloh12:
	adrp	x8, _ttm_bo_type_device@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ttm_bo_type_device@GOTPAGEOFF]
Lloh14:
	ldr	w5, [x8]
	add	x7, sp, #8
	mov	x0, x21
	mov	w2, #0
	mov	x4, x22
	mov	x6, #0
	bl	_amdgpu_gem_object_create
	cbz	w0, LBB0_2
; %bb.1:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_4
LBB0_2:
	ldr	x1, [sp, #8]
	add	x2, sp, #4
	mov	x0, x20
	bl	_drm_gem_handle_create
	mov	x20, x0
	ldr	x0, [sp, #8]
	bl	_drm_gem_object_put_unlocked
	cbnz	w20, LBB0_4
; %bb.3:
	ldr	w8, [sp, #4]
	str	w8, [x19, #8]
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED,4,2 ; @AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED
	.comm	_AMDGPU_GEM_CREATE_CPU_GTT_USWC,4,2 ; @AMDGPU_GEM_CREATE_CPU_GTT_USWC
	.comm	_AMDGPU_GEM_CREATE_VRAM_CLEARED,4,2 ; @AMDGPU_GEM_CREATE_VRAM_CLEARED
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_ttm_bo_type_device,4,2         ; @ttm_bo_type_device
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
