	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function modeset_create_dumbfb
_modeset_create_dumbfb:                 ## @modeset_create_dumbfb
	.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
	subq	$224, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movq	%rsi, %rbx
	movl	%edi, %r14d
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	movaps	%xmm0, -112(%rbp)
	movq	$0, -48(%rbp)
	movaps	%xmm0, -208(%rbp)
	movaps	%xmm0, -224(%rbp)
	movaps	%xmm0, -240(%rbp)
	movaps	%xmm0, -256(%rbp)
	movq	$0, -192(%rbp)
	movups	%xmm0, -128(%rbp)
	movups	%xmm0, -144(%rbp)
	movups	%xmm0, -160(%rbp)
	movups	%xmm0, -176(%rbp)
	movl	44(%rsi), %eax
	movl	%eax, -64(%rbp)
	movl	40(%rsi), %eax
	movl	%eax, -68(%rbp)
	shll	$3, %edx
	movl	%edx, -112(%rbp)
	movq	$0, -56(%rbp)
	movaps	%xmm0, -96(%rbp)
	movq	$0, -80(%rbp)
	movq	_drm@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	_DRM_IOCTL_MODE_CREATE_DUMB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-112(%rbp), %rdx
	callq	_drmIoctl
	movq	-68(%rbp), %rax
	movq	%rax, -140(%rbp)
	movl	-112(%rbp), %eax
	movl	%eax, -184(%rbp)
	movq	-80(%rbp), %rax
	movq	%rax, -152(%rbp)
	movq	-96(%rbp), %rax
	movq	%rax, -168(%rbp)
	movl	$24, -180(%rbp)
	movl	(%r12), %edi
	movq	_DRM_IOCTL_MODE_ADDFB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-184(%rbp), %rdx
	callq	_drmIoctl
	movq	-96(%rbp), %rax
	movq	%rax, -240(%rbp)
	movl	(%r12), %edi
	movq	_DRM_IOCTL_MODE_MAP_DUMB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-256(%rbp), %rdx
	callq	_drmIoctl
	movl	%r15d, 36(%rbx)
	movl	-144(%rbp), %eax
	movl	%eax, 32(%rbx)
	movq	-80(%rbp), %rax
	movq	%rax, 24(%rbx)
	movq	-88(%rbp), %rsi
	movq	%rsi, 8(%rbx)
	movq	-96(%rbp), %rax
	movq	%rax, 16(%rbx)
	movq	_PROT_READ@GOTPCREL(%rip), %rax
	movq	_PROT_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_MAP_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	-248(%rbp), %r9d
	xorl	%edi, %edi
	movl	%r14d, %r8d
	callq	_mmap
	movl	%eax, (%rbx)
	movq	_MAP_FAILED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_RARCH_ERR
LBB0_2:
	xorl	%eax, %eax
	addq	$224, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_drm,4,2                        ## @drm
	.comm	_DRM_IOCTL_MODE_CREATE_DUMB,4,2 ## @DRM_IOCTL_MODE_CREATE_DUMB
	.comm	_DRM_IOCTL_MODE_ADDFB,4,2       ## @DRM_IOCTL_MODE_ADDFB
	.comm	_DRM_IOCTL_MODE_MAP_DUMB,4,2    ## @DRM_IOCTL_MODE_MAP_DUMB
	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_PROT_WRITE,4,2                 ## @PROT_WRITE
	.comm	_MAP_SHARED,4,2                 ## @MAP_SHARED
	.comm	_MAP_FAILED,4,2                 ## @MAP_FAILED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DRM: cannot mmap dumb buffer\n"

	.no_dead_strip	_modeset_create_dumbfb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function modeset_create_dumbfb
_modeset_create_dumbfb:                 ; @modeset_create_dumbfb
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #304
	.cfi_def_cfa_offset 304
	stp	x24, x23, [sp, #240]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #256]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #272]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #288]            ; 16-byte Folded Spill
	add	x29, sp, #288
	.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	x21, x3
	mov	x19, x1
	mov	x20, x0
	stur	xzr, [x29, #-64]
	sub	x22, x29, #128
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [x22, #32]
	stp	q0, q0, [x22]
	str	xzr, [sp, #144]
	stp	q0, q0, [sp, #112]
	stp	q0, q0, [sp, #80]
	stp	q0, q0, [sp, #48]
	stp	q0, q0, [sp, #16]
	ldr	d0, [x1, #40]
	stur	d0, [x22, #44]
	lsl	w8, w2, #3
	stur	w8, [x29, #-128]
	stp	xzr, xzr, [x29, #-112]
	stur	xzr, [x29, #-72]
	stur	xzr, [x29, #-96]
Lloh0:
	adrp	x23, _drm@GOTPAGE
Lloh1:
	ldr	x23, [x23, _drm@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh2:
	adrp	x8, _DRM_IOCTL_MODE_CREATE_DUMB@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DRM_IOCTL_MODE_CREATE_DUMB@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	sub	x2, x29, #128
	bl	_drmIoctl
	ldur	d0, [x22, #44]
	stur	d0, [sp, #52]
	ldur	w8, [x29, #-128]
	ldur	x9, [x29, #-96]
	ldur	x10, [x29, #-112]
	str	x9, [sp, #40]
	str	x10, [sp, #24]
	mov	w9, #24
	stp	w8, w9, [sp, #8]
	ldr	w0, [x23]
Lloh5:
	adrp	x8, _DRM_IOCTL_MODE_ADDFB@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DRM_IOCTL_MODE_ADDFB@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_drmIoctl
	ldur	x8, [x29, #-112]
	str	x8, [sp, #96]
	ldr	w0, [x23]
Lloh8:
	adrp	x8, _DRM_IOCTL_MODE_MAP_DUMB@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DRM_IOCTL_MODE_MAP_DUMB@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	add	x2, sp, #80
	bl	_drmIoctl
	ldr	w8, [sp, #48]
	stp	w8, w21, [x19, #32]
	ldp	x1, x10, [x29, #-104]
	ldur	x8, [x29, #-112]
	str	x1, [x19, #8]
	stp	x8, x10, [x19, #16]
Lloh11:
	adrp	x8, _PROT_READ@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PROT_READ@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _PROT_WRITE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _PROT_WRITE@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w2, w9, w8
Lloh17:
	adrp	x8, _MAP_SHARED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MAP_SHARED@GOTPAGEOFF]
Lloh19:
	ldr	w3, [x8]
	ldr	w5, [sp, #88]
	mov	w0, #0
	mov	x4, x20
	bl	_mmap
	str	w0, [x19]
Lloh20:
	adrp	x8, _MAP_FAILED@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MAP_FAILED@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_2
; %bb.1:
Lloh23:
	adrp	x0, l_.str@PAGE
Lloh24:
	add	x0, x0, l_.str@PAGEOFF
	bl	_RARCH_ERR
LBB0_2:
	mov	w0, #0
	ldp	x29, x30, [sp, #288]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #272]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #256]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #240]            ; 16-byte Folded Reload
	add	sp, sp, #304
	ret
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_drm,4,2                        ; @drm
	.comm	_DRM_IOCTL_MODE_CREATE_DUMB,4,2 ; @DRM_IOCTL_MODE_CREATE_DUMB
	.comm	_DRM_IOCTL_MODE_ADDFB,4,2       ; @DRM_IOCTL_MODE_ADDFB
	.comm	_DRM_IOCTL_MODE_MAP_DUMB,4,2    ; @DRM_IOCTL_MODE_MAP_DUMB
	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_PROT_WRITE,4,2                 ; @PROT_WRITE
	.comm	_MAP_SHARED,4,2                 ; @MAP_SHARED
	.comm	_MAP_FAILED,4,2                 ; @MAP_FAILED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DRM: cannot mmap dumb buffer\n"

	.no_dead_strip	_modeset_create_dumbfb
.subsections_via_symbols
