	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function drm_fb_get_from_bo
_drm_fb_get_from_bo:                    ## @drm_fb_get_from_bo
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	$1, %edi
	movl	$16, %esi
	callq	_calloc
	movq	%rax, %r14
	movq	%rbx, 8(%rax)
	movq	%rbx, %rdi
	callq	_gbm_bo_get_width
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_gbm_bo_get_height
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_gbm_bo_get_stride
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_gbm_bo_get_handle
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	movl	%r13d, %ecx
	callq	_RARCH_LOG
	movq	_g_drm_fd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	movl	%r12d, %edx
	movl	$24, %ecx
	movl	$32, %r8d
	movl	%r13d, %r9d
	pushq	%r14
	pushq	-48(%rbp)                       ## 8-byte Folded Reload
	callq	_drmModeAddFB
	addq	$16, %rsp
	testl	%eax, %eax
	js	LBB0_2
## %bb.1:
	movq	_drm_fb_destroy_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_gbm_bo_set_user_data
	jmp	LBB0_3
LBB0_2:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_RARCH_ERR
	movq	%r14, %rdi
	callq	_free
	xorl	%r14d, %r14d
LBB0_3:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[KMS]: New FB: %ux%u (stride: %u).\n"

	.comm	_g_drm_fd,4,2                   ## @g_drm_fd
	.comm	_drm_fb_destroy_callback,4,2    ## @drm_fb_destroy_callback
L_.str.1:                               ## @.str.1
	.asciz	"[KMS]: Failed to create FB: %s\n"

	.comm	_errno,4,2                      ## @errno
	.no_dead_strip	_drm_fb_get_from_bo
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function drm_fb_get_from_bo
_drm_fb_get_from_bo:                    ; @drm_fb_get_from_bo
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
	mov	w0, #1
	mov	w1, #16
	bl	_calloc
	mov	x19, x0
	str	x20, [x0, #8]
	mov	x0, x20
	bl	_gbm_bo_get_width
	mov	x21, x0
	mov	x0, x20
	bl	_gbm_bo_get_height
	mov	x22, x0
	mov	x0, x20
	bl	_gbm_bo_get_stride
	mov	x23, x0
	mov	x0, x20
	bl	_gbm_bo_get_handle
	mov	x24, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	mov	x2, x22
	mov	x3, x23
	bl	_RARCH_LOG
Lloh2:
	adrp	x8, _g_drm_fd@GOTPAGE
Lloh3:
	ldr	x8, [x8, _g_drm_fd@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	mov	x1, x21
	mov	x2, x22
	mov	w3, #24
	mov	w4, #32
	mov	x5, x23
	mov	x6, x24
	mov	x7, x19
	bl	_drmModeAddFB
	tbnz	w0, #31, LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _drm_fb_destroy_callback@GOTPAGE
Lloh6:
	ldr	x8, [x8, _drm_fb_destroy_callback@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_gbm_bo_set_user_data
	b	LBB0_3
LBB0_2:
Lloh8:
	adrp	x8, _errno@GOTPAGE
Lloh9:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_strerror
	mov	x1, x0
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_RARCH_ERR
	mov	x0, x19
	bl	_free
	mov	x19, #0
LBB0_3:
	mov	x0, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[KMS]: New FB: %ux%u (stride: %u).\n"

	.comm	_g_drm_fd,4,2                   ; @g_drm_fd
	.comm	_drm_fb_destroy_callback,4,2    ; @drm_fb_destroy_callback
l_.str.1:                               ; @.str.1
	.asciz	"[KMS]: Failed to create FB: %s\n"

	.comm	_errno,4,2                      ; @errno
	.no_dead_strip	_drm_fb_get_from_bo
.subsections_via_symbols
