	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_mode_addfb2                ## -- Begin function drm_mode_addfb2
	.p2align	4, 0x90
_drm_mode_addfb2:                       ## @drm_mode_addfb2
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	_DRIVER_MODESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_drm_core_check_feature
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	(%r15), %esi
	movq	_DRM_MODE_FB_INTERLACED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	testl	%eax, %esi
	je	LBB0_4
## %bb.2:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	jmp	LBB0_14
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_15
LBB0_4:
	movl	16(%r12), %ecx
	movl	20(%r12), %edx
	movl	12(%r15), %esi
	cmpl	%esi, %edx
	jg	LBB0_11
## %bb.5:
	cmpl	%ecx, %esi
	jg	LBB0_11
## %bb.6:
	movl	8(%r12), %ecx
	movl	12(%r12), %edx
	movl	8(%r15), %esi
	cmpl	%esi, %edx
	jg	LBB0_12
## %bb.7:
	cmpl	%ecx, %esi
	jg	LBB0_12
## %bb.8:
	movq	%r15, %rdi
	callq	_framebuffer_check
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_16
## %bb.9:
	movq	(%r12), %rax
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	*(%rax)
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_17
## %bb.10:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_11:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_13
LBB0_12:
	leaq	L_.str.2(%rip), %rdi
LBB0_13:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
LBB0_14:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_15:
	subl	(%rax), %ebx
LBB0_16:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	(%rbx), %eax
	movl	%eax, 4(%r15)
	movq	%rbx, %rdi
	addq	$4, %rdi
	leaq	4(%r14), %rsi
	callq	_list_add
	movl	(%rbx), %esi
	leaq	L_.str.4(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	%r14, %rdi
	callq	_mutex_unlock
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_DRIVER_MODESET,4,2             ## @DRIVER_MODESET
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DRM_MODE_FB_INTERLACED,4,2     ## @DRM_MODE_FB_INTERLACED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bad framebuffer flags 0x%08x\n"

L_.str.1:                               ## @.str.1
	.asciz	"bad framebuffer width %d, should be >= %d && <= %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"bad framebuffer height %d, should be >= %d && <= %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"could not create framebuffer\n"

L_.str.4:                               ## @.str.4
	.asciz	"[FB:%d]\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_mode_addfb2                ; -- Begin function drm_mode_addfb2
	.p2align	2
_drm_mode_addfb2:                       ; @drm_mode_addfb2
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _DRIVER_MODESET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRIVER_MODESET@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_drm_core_check_feature
	cbz	w0, LBB0_12
; %bb.1:
	ldr	w8, [x20]
Lloh3:
	adrp	x9, _DRM_MODE_FB_INTERLACED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DRM_MODE_FB_INTERLACED@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	bics	wzr, w8, w9
	b.eq	LBB0_3
; %bb.2:
	str	x8, [sp]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_11
LBB0_3:
	ldr	w8, [x20, #12]
	ldp	w10, w9, [x21, #16]
	cmp	w9, w8
	ccmp	w8, w10, #0, le
	b.le	LBB0_5
; %bb.4:
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_5:
	ldr	w8, [x20, #8]
	ldp	w10, w9, [x21, #8]
	cmp	w9, w8
	b.gt	LBB0_10
; %bb.6:
	cmp	w8, w10
	b.gt	LBB0_10
; %bb.7:
	mov	x0, x20
	bl	_framebuffer_check
	cbnz	w0, LBB0_13
; %bb.8:
	ldr	x8, [x21]
	ldr	x8, [x8]
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	blr	x8
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_14
; %bb.9:
Lloh10:
	adrp	x0, l_.str.3@PAGE
Lloh11:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_DEBUG_KMS
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_PTR_ERR
LBB0_10:
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_11:
	bl	_DRM_DEBUG_KMS
LBB0_12:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_14:
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x21]
	str	w8, [x20, #4]
	add	x0, x21, #4
	add	x1, x19, #4
	bl	_list_add
	ldr	w8, [x21]
	str	x8, [sp]
Lloh17:
	adrp	x0, l_.str.4@PAGE
Lloh18:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DRM_DEBUG_KMS
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_DRIVER_MODESET,4,2             ; @DRIVER_MODESET
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DRM_MODE_FB_INTERLACED,4,2     ; @DRM_MODE_FB_INTERLACED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bad framebuffer flags 0x%08x\n"

l_.str.1:                               ; @.str.1
	.asciz	"bad framebuffer width %d, should be >= %d && <= %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"bad framebuffer height %d, should be >= %d && <= %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"could not create framebuffer\n"

l_.str.4:                               ; @.str.4
	.asciz	"[FB:%d]\n"

.subsections_via_symbols
