	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function drm_surface_setup
_drm_surface_setup:                     ## @drm_surface_setup
	.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
	movss	%xmm0, -52(%rbp)                ## 4-byte Spill
	movl	%r9d, -48(%rbp)                 ## 4-byte Spill
	movl	%r8d, %r15d
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %r13d
	movl	%esi, %ebx
	movq	%rdi, %r14
	movl	$1, %edi
	movl	$56, %esi
	callq	_calloc
	movq	%rax, %r12
	movq	40(%rbp), %rax
	movq	%r12, (%rax)
	movl	24(%rbp), %edi
	movl	%edi, (%r12)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%r12)
	movl	%r15d, %eax
	imull	%ebx, %eax
	movl	%eax, 8(%r12)
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movl	%r15d, 12(%r12)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 48(%r12)
	movl	%ebx, -56(%rbp)                 ## 4-byte Spill
	movl	%ebx, 16(%r12)
	movl	%r13d, 20(%r12)
	movss	-52(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 24(%r12)
	movl	%edi, %ebx
	movl	$32, %esi
	callq	_calloc
	movq	%rax, 40(%r12)
	testl	%ebx, %ebx
	jle	LBB0_9
## %bb.1:
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	$0, (%rax,%rbx)
	movq	%r12, 24(%rax,%rbx)
	movq	%r14, 16(%rax,%rbx)
	xorl	%eax, %eax
	callq	_slock_new
	movl	%eax, %ecx
	movq	40(%r12), %rax
	movl	%ecx, 12(%rax,%rbx)
	incq	%r15
	movslq	(%r12), %rcx
	addq	$32, %rbx
	cmpq	%rcx, %r15
	jl	LBB0_2
## %bb.3:
	testl	%ecx, %ecx
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	jle	LBB0_9
## %bb.4:
	movl	$4, %r14d
	movl	$1, %r15d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%rax,%r14), %rsi
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%rax,%r14)
	movl	%r13d, 4(%rax,%r14)
	movq	_drm@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%ebx, %ecx
	callq	_modeset_create_dumbfb
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	leaq	L_.str(%rip), %rdi
	callq	_RARCH_ERR
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movslq	(%r12), %rax
	cmpq	%rax, %r15
	jge	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	40(%r12), %rax
	addq	$32, %r14
	incq	%r15
	jmp	LBB0_5
LBB0_9:
	movq	$0, 32(%r12)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_drm,4,2                        ## @drm
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DRM: can't create fb\n"

	.no_dead_strip	_drm_surface_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function drm_surface_setup
_drm_surface_setup:                     ; @drm_surface_setup
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-112]!            ; 16-byte Folded Spill
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	mov	x25, x7
	fmov	s8, s0
	mov	x19, x5
	mov	x20, x4
	mov	x26, x3
	mov	x21, x2
	mov	x22, x1
	mov	x24, x0
	ldr	x27, [x29, #24]
	mov	w0, #1
	mov	w1, #56
	bl	_calloc
	mov	x23, x0
	str	x0, [x27]
	stp	w25, w26, [x0]
	mul	w8, w20, w22
	stp	w8, w20, [x0, #8]
	str	w19, [x0, #48]
	stp	w22, w21, [x0, #16]
	str	s8, [x0, #24]
	mov	x0, x25
	mov	w1, #32
	bl	_calloc
	str	x0, [x23, #40]
	cmp	w25, #1
	b.lt	LBB0_9
; %bb.1:
	mov	x25, #0
	mov	x26, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x8, x0, x25
	str	wzr, [x8]
	stp	x24, x23, [x8, #16]
	bl	_slock_new
	mov	x8, x0
	ldr	x0, [x23, #40]
	add	x9, x0, x25
	str	w8, [x9, #12]
	add	x26, x26, #1
	ldrsw	x8, [x23]
	add	x25, x25, #32
	cmp	x26, x8
	b.lt	LBB0_2
; %bb.3:
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.4:
	mov	x25, #0
	mov	w26, #1
Lloh0:
	adrp	x27, _drm@GOTPAGE
Lloh1:
	ldr	x27, [x27, _drm@GOTPAGEOFF]
Lloh2:
	adrp	x24, l_.str@PAGE
Lloh3:
	add	x24, x24, l_.str@PAGEOFF
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, x0, x25
	stp	w22, w21, [x1, #4]!
	ldr	w0, [x27]
	mov	x2, x20
	mov	x3, x19
	bl	_modeset_create_dumbfb
	cbz	w0, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x24
	bl	_RARCH_ERR
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldrsw	x8, [x23]
	cmp	x26, x8
	b.ge	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [x23, #40]
	add	x25, x25, #32
	add	x26, x26, #1
	b	LBB0_5
LBB0_9:
	str	xzr, [x23, #32]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #112              ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_drm,4,2                        ; @drm
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DRM: can't create fb\n"

	.no_dead_strip	_drm_surface_setup
.subsections_via_symbols
