	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function exynos_get_device_index
_exynos_get_device_index:               ## @exynos_get_device_index
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movaps	%xmm0, -80(%rbp)
	leaq	L_.str(%rip), %rdx
	leaq	-80(%rbp), %r14
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movl	$32, %esi
	xorl	%ecx, %ecx
	callq	_snprintf
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_open
	movl	%eax, %r14d
	movl	$-1, %eax
	testl	%r14d, %r14d
	js	LBB0_5
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %r13d
	movl	%r14d, %edi
	callq	_drmGetVersion
	movq	%rax, %r12
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_string_is_equal
	movq	%rax, %r15
	xorl	%ebx, %ebx
	testq	%rax, %rax
	sete	%bl
	movq	%r12, %rdi
	callq	_drmFreeVersion
	movl	%r14d, %edi
	callq	_close
	addl	%r13d, %ebx
	testq	%r15, %r15
	jne	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	-80(%rbp), %r14
	movq	%r14, %rdi
	movl	$32, %esi
	leaq	L_.str(%rip), %rdx
	movl	%ebx, %ecx
	callq	_snprintf
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_open
	movl	%eax, %r14d
	testl	%eax, %eax
	jns	LBB0_1
## %bb.3:
	movl	$-1, %eax
	jmp	LBB0_5
LBB0_4:
	movl	%ebx, %eax
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_7
## %bb.6:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/dev/dri/card%d"

	.comm	_O_RDWR,4,2                     ## @O_RDWR
L_.str.1:                               ## @.str.1
	.asciz	"exynos"

	.no_dead_strip	_exynos_get_device_index
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function exynos_get_device_index
_exynos_get_device_index:               ; @exynos_get_device_index
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, sp
	mov	w1, #32
	mov	w3, #0
	bl	_snprintf
Lloh5:
	adrp	x25, _O_RDWR@GOTPAGE
Lloh6:
	ldr	x25, [x25, _O_RDWR@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, sp
	bl	_open
	tbnz	w0, #31, LBB0_4
; %bb.1:
	mov	x22, x0
	mov	w19, #0
Lloh7:
	adrp	x20, l_.str.1@PAGE
Lloh8:
	add	x20, x20, l_.str.1@PAGEOFF
Lloh9:
	adrp	x21, l_.str@PAGE
Lloh10:
	add	x21, x21, l_.str@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_drmGetVersion
	mov	x23, x0
	ldr	w0, [x0]
	mov	x1, x20
	bl	_string_is_equal
	mov	x24, x0
	mov	x0, x23
	bl	_drmFreeVersion
	mov	x0, x22
	bl	_close
	cmp	x24, #0
	cinc	w19, w19, eq
	cbnz	x24, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, sp
	mov	w1, #32
	mov	x2, x21
	mov	x3, x19
	bl	_snprintf
	ldr	w1, [x25]
	mov	x0, sp
	bl	_open
	mov	x22, x0
	tbz	w0, #31, LBB0_2
LBB0_4:
	mov	w19, #-1
LBB0_5:
	ldr	x8, [sp, #40]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/dev/dri/card%d"

	.comm	_O_RDWR,4,2                     ; @O_RDWR
l_.str.1:                               ; @.str.1
	.asciz	"exynos"

	.no_dead_strip	_exynos_get_device_index
.subsections_via_symbols
