	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function drm_setversion
_drm_setversion:                        ## @drm_setversion
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r14
	callq	_mutex_lock
	movl	(%rbx), %edi
	cmpl	$-1, %edi
	je	LBB0_6
## %bb.1:
	movq	_DRM_IF_MAJOR@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edi
	jne	LBB0_10
## %bb.2:
	movl	4(%rbx), %esi
	testl	%esi, %esi
	js	LBB0_10
## %bb.3:
	movq	_DRM_IF_MINOR@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	jg	LBB0_10
## %bb.4:
	callq	_DRM_IF_VERSION
	movl	16(%r14), %esi
	movl	%eax, %edi
	callq	_max
	movl	%eax, 16(%r14)
	cmpl	$0, 4(%rbx)
	jle	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_drm_set_busid
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_11
LBB0_6:
	movl	8(%rbx), %ecx
	xorl	%r15d, %r15d
	cmpl	$-1, %ecx
	je	LBB0_11
## %bb.7:
	movq	8(%r14), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_10
## %bb.8:
	movq	16(%rbx), %rcx
	testq	%rcx, %rcx
	js	LBB0_10
## %bb.9:
	cmpq	8(%rax), %rcx
	jle	LBB0_11
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_11:
	movq	_DRM_IF_MAJOR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movq	_DRM_IF_MINOR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movq	8(%r14), %rax
	movl	(%rax), %ecx
	movl	%ecx, 8(%rbx)
	movq	8(%rax), %rax
	movq	%rax, 16(%rbx)
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_IF_MAJOR,4,2               ## @DRM_IF_MAJOR
	.comm	_DRM_IF_MINOR,4,2               ## @DRM_IF_MINOR
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_drm_setversion
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function drm_setversion
_drm_setversion:                        ; @drm_setversion
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	bl	_mutex_lock
	ldr	w0, [x20]
Lloh0:
	adrp	x23, _DRM_IF_MAJOR@GOTPAGE
Lloh1:
	ldr	x23, [x23, _DRM_IF_MAJOR@GOTPAGEOFF]
Lloh2:
	adrp	x22, _DRM_IF_MINOR@GOTPAGE
Lloh3:
	ldr	x22, [x22, _DRM_IF_MINOR@GOTPAGEOFF]
	cmn	w0, #1
	b.eq	LBB0_6
; %bb.1:
	ldr	w8, [x23]
	cmp	w0, w8
	b.ne	LBB0_10
; %bb.2:
	ldr	w1, [x20, #4]
	tbnz	w1, #31, LBB0_10
; %bb.3:
	ldr	w8, [x22]
	cmp	w1, w8
	b.gt	LBB0_10
; %bb.4:
	bl	_DRM_IF_VERSION
	ldr	w1, [x19, #16]
	bl	_max
	str	w0, [x19, #16]
	ldr	w8, [x20, #4]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.5:
	mov	x0, x19
	mov	x1, x21
	bl	_drm_set_busid
	mov	x21, x0
	cbnz	w0, LBB0_12
LBB0_6:
	ldr	w9, [x20, #8]
	cmn	w9, #1
	b.eq	LBB0_11
; %bb.7:
	ldr	x8, [x19, #8]
	ldr	w10, [x8]
	cmp	w9, w10
	b.ne	LBB0_10
; %bb.8:
	ldr	x9, [x20, #16]
	tbnz	x9, #63, LBB0_10
; %bb.9:
	ldr	x8, [x8, #8]
	cmp	x9, x8
	b.le	LBB0_11
LBB0_10:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_12
LBB0_11:
	mov	w21, #0
LBB0_12:
	ldr	w8, [x23]
	str	w8, [x20]
	ldr	w8, [x22]
	ldr	x9, [x19, #8]
	ldr	w10, [x9]
	stp	w8, w10, [x20, #4]
	ldr	x8, [x9, #8]
	str	x8, [x20, #16]
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	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 AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_IF_MAJOR,4,2               ; @DRM_IF_MAJOR
	.comm	_DRM_IF_MINOR,4,2               ; @DRM_IF_MINOR
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_drm_setversion
.subsections_via_symbols
