	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_mode_dumb_create        ## -- Begin function radeon_mode_dumb_create
	.p2align	4, 0x90
_radeon_mode_dumb_create:               ## @radeon_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, %rbx
	movq	%rdi, %r15
	movq	(%rsi), %r12
	movl	16(%rdx), %edi
	movl	20(%rdx), %r13d
	movl	$8, %esi
	callq	_DIV_ROUND_UP
	xorl	%r14d, %r14d
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	callq	_radeon_align_pitch
	movl	%eax, (%rbx)
	imull	8(%rbx), %eax
	movl	%eax, 4(%rbx)
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_ALIGN
	movl	%eax, 4(%rbx)
	movq	_RADEON_GEM_DOMAIN_VRAM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leaq	-56(%rbp), %rdx
	movq	%rdx, (%rsp)
	movq	%r12, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_radeon_gem_object_create
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_4
LBB0_2:
	movq	-56(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	callq	_drm_gem_handle_create
	movl	%eax, %r14d
	movq	-56(%rbp), %rdi
	callq	_drm_gem_object_put_unlocked
	testl	%r14d, %r14d
	jne	LBB0_4
## %bb.3:
	movl	-44(%rbp), %eax
	movl	%eax, 12(%rbx)
	xorl	%r14d, %r14d
LBB0_4:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_RADEON_GEM_DOMAIN_VRAM,4,2     ## @RADEON_GEM_DOMAIN_VRAM
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_mode_dumb_create        ; -- Begin function radeon_mode_dumb_create
	.p2align	2
_radeon_mode_dumb_create:               ; @radeon_mode_dumb_create
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x2
	mov	x20, x0
	ldr	x21, [x1]
	ldp	w0, w22, [x2, #16]
	mov	w1, #8
	bl	_DIV_ROUND_UP
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	mov	w3, #0
	bl	_radeon_align_pitch
	ldr	w8, [x19, #8]
	mul	w8, w8, w0
	stp	w0, w8, [x19]
Lloh0:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	mov	x0, x8
	bl	_ALIGN
	mov	x1, x0
	str	w0, [x19, #4]
Lloh3:
	adrp	x8, _RADEON_GEM_DOMAIN_VRAM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RADEON_GEM_DOMAIN_VRAM@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	add	x6, sp, #8
	mov	x0, x21
	mov	w2, #0
	mov	w4, #0
	mov	w5, #0
	bl	_radeon_gem_object_create
	cbz	w0, LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	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, #12]
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_RADEON_GEM_DOMAIN_VRAM,4,2     ; @RADEON_GEM_DOMAIN_VRAM
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
