	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_get_encoder                ## -- Begin function drm_get_encoder
	.p2align	4, 0x90
_drm_get_encoder:                       ## @drm_get_encoder
	.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	_g_drm_resources@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	cmpl	$0, (%rax)
	jle	LBB0_7
## %bb.1:
	movl	%edi, %r15d
	xorl	%ebx, %ebx
	movq	_g_drm_encoder@GOTPCREL(%rip), %r12
	movq	_g_drm_connector@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rdi
	callq	_drmModeFreeEncoder
	movq	$0, (%r12)
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movq	(%r14), %rax
	movslq	(%rax), %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rax), %rax
	movl	(%rax,%rbx,4), %esi
	movl	%r15d, %edi
	callq	_drmModeGetEncoder
	movq	%rax, (%r12)
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rax), %rcx
	movq	(%r13), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_4
	jmp	LBB0_8
LBB0_7:
	movq	_g_drm_encoder@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
LBB0_8:
	movq	_g_drm_connector@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movl	$1, %r14d
	cmpl	$0, 8(%rax)
	jle	LBB0_11
## %bb.9:
	movl	$12, %ebx
	xorl	%r13d, %r13d
	leaq	L_.str.1(%rip), %r15
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%rax), %rax
	movl	(%rax,%rbx), %edx
	movl	-4(%rax,%rbx), %ecx
	movl	-12(%rax,%rbx), %r9d
	movl	-8(%rax,%rbx), %r8d
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_RARCH_LOG
	incq	%r13
	movq	(%r12), %rax
	movslq	8(%rax), %rcx
	addq	$16, %rbx
	cmpq	%rcx, %r13
	jl	LBB0_10
	jmp	LBB0_11
LBB0_6:
	leaq	L_.str(%rip), %rdi
	callq	_RARCH_WARN
	xorl	%r14d, %r14d
LBB0_11:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_g_drm_resources,8,3            ## @g_drm_resources
	.comm	_g_drm_encoder,8,3              ## @g_drm_encoder
	.comm	_g_drm_connector,8,3            ## @g_drm_connector
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[DRM]: Couldn't find DRM encoder.\n"

L_.str.1:                               ## @.str.1
	.asciz	"[DRM]: Mode %d: (%s) %d x %d, %u Hz\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_get_encoder                ; -- Begin function drm_get_encoder
	.p2align	2
_drm_get_encoder:                       ; @drm_get_encoder
	.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
Lloh0:
	adrp	x20, _g_drm_resources@GOTPAGE
Lloh1:
	ldr	x20, [x20, _g_drm_resources@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	w9, [x8]
Lloh2:
	adrp	x21, _g_drm_connector@GOTPAGE
Lloh3:
	ldr	x21, [x21, _g_drm_connector@GOTPAGEOFF]
	cmp	w9, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x19, x0
	mov	x22, #0
Lloh4:
	adrp	x23, _g_drm_encoder@GOTPAGE
Lloh5:
	ldr	x23, [x23, _g_drm_encoder@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	bl	_drmModeFreeEncoder
	str	xzr, [x23]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x22, #1
	ldr	x8, [x20]
	ldrsw	x9, [x8]
	cmp	x22, x9
	b.ge	LBB0_11
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x8, #8]
	ldr	w1, [x8, x22, lsl #2]
	mov	x0, x19
	bl	_drmModeGetEncoder
	str	x0, [x23]
	cbz	x0, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x0]
	ldr	x9, [x21]
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
	b	LBB0_7
LBB0_6:
Lloh6:
	adrp	x8, _g_drm_encoder@GOTPAGE
Lloh7:
	ldr	x8, [x8, _g_drm_encoder@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cbz	x8, LBB0_11
LBB0_7:
	ldr	x8, [x21]
	ldr	w9, [x8, #8]
	cmp	w9, #1
	b.lt	LBB0_10
; %bb.8:
	mov	x22, #0
	mov	x19, #0
Lloh9:
	adrp	x20, l_.str.1@PAGE
Lloh10:
	add	x20, x20, l_.str.1@PAGEOFF
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x8, #16]
	add	x8, x8, x22
	ldp	w3, w2, [x8, #8]
	ldp	w5, w4, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_RARCH_LOG
	add	x19, x19, #1
	ldr	x8, [x21]
	ldrsw	x9, [x8, #8]
	add	x22, x22, #16
	cmp	x19, x9
	b.lt	LBB0_9
LBB0_10:
	mov	w0, #1
	b	LBB0_12
LBB0_11:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_RARCH_WARN
	mov	w0, #0
LBB0_12:
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_g_drm_resources,8,3            ; @g_drm_resources
	.comm	_g_drm_encoder,8,3              ; @g_drm_encoder
	.comm	_g_drm_connector,8,3            ; @g_drm_connector
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[DRM]: Couldn't find DRM encoder.\n"

l_.str.1:                               ; @.str.1
	.asciz	"[DRM]: Mode %d: (%s) %d x %d, %u Hz\n"

.subsections_via_symbols
