	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_atomic_set_mode_for_crtc   ## -- Begin function drm_atomic_set_mode_for_crtc
	.p2align	4, 0x90
_drm_atomic_set_mode_for_crtc:          ## @drm_atomic_set_mode_for_crtc
	.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	%rdi, %rbx
	movq	16(%rdi), %r13
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.1:
	movq	%rsi, %r14
	leaq	4(%rbx), %r15
	movq	%r15, %rdi
	movl	$4, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	8(%rbx), %rdi
	callq	_drm_property_blob_put
	movq	$0, 8(%rbx)
	leaq	-48(%rbp), %r12
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_drm_mode_convert_to_umode
	movq	16(%rbx), %rax
	movl	8(%rax), %edi
	movl	$4, %esi
	movq	%r12, %rdx
	callq	_drm_property_create_blob
	movq	%rax, 8(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	8(%rbx), %rdi
	callq	_PTR_ERR
	movl	%eax, %r14d
	jmp	LBB0_7
LBB0_6:
	movq	8(%rbx), %rdi
	callq	_drm_property_blob_put
	movq	$0, 8(%rbx)
	leaq	4(%rbx), %rdi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	$0, (%rbx)
	movl	(%r13), %edx
	movl	4(%r13), %esi
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_ATOMIC
	jmp	LBB0_7
LBB0_2:
	xorl	%r14d, %r14d
	jmp	LBB0_7
LBB0_5:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_drm_mode_copy
	movl	$1, (%rbx)
	movl	(%r14), %esi
	movl	4(%r13), %edx
	movslq	(%r13), %rcx
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	movq	%rbx, %r8
	xorl	%eax, %eax
	callq	_DRM_DEBUG_ATOMIC
LBB0_7:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Set [MODE:%s] for [CRTC:%d:%s] state %p\n"

L_.str.1:                               ## @.str.1
	.asciz	"Set [NOMODE] for [CRTC:%d:%s] state %p\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_atomic_set_mode_for_crtc   ; -- Begin function drm_atomic_set_mode_for_crtc
	.p2align	2
_drm_atomic_set_mode_for_crtc:          ; @drm_atomic_set_mode_for_crtc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	x22, [x0, #16]
	cbz	x1, LBB0_4
; %bb.1:
	mov	x20, x1
	add	x21, x19, #4
	mov	x0, x21
	mov	w2, #4
	bl	_memcmp
	cbz	x0, LBB0_7
; %bb.2:
	ldr	x0, [x19, #8]
	bl	_drm_property_blob_put
	str	xzr, [x19, #8]
	add	x0, sp, #8
	mov	x1, x20
	bl	_drm_mode_convert_to_umode
	ldr	x8, [x19, #16]
	ldr	w0, [x8, #8]
	add	x2, sp, #8
	mov	w1, #4
	bl	_drm_property_create_blob
	str	x0, [x19, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_5
; %bb.3:
	ldr	x0, [x19, #8]
	bl	_PTR_ERR
	b	LBB0_7
LBB0_4:
	ldr	x0, [x19, #8]
	bl	_drm_property_blob_put
	str	xzr, [x19, #8]
	add	x0, x19, #4
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	str	wzr, [x19]
	ldp	w2, w1, [x22]
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x3, x19
	b	LBB0_6
LBB0_5:
	mov	x0, x21
	mov	x1, x20
	bl	_drm_mode_copy
	mov	w8, #1
	str	w8, [x19]
	ldr	w1, [x20]
	ldp	w3, w2, [x22]
                                        ; kill: def $w3 killed $w3 def $x3
	sxtw	x3, w3
	str	x19, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
LBB0_6:
	bl	_DRM_DEBUG_ATOMIC
	mov	w0, #0
LBB0_7:
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Set [MODE:%s] for [CRTC:%d:%s] state %p\n"

l_.str.1:                               ; @.str.1
	.asciz	"Set [NOMODE] for [CRTC:%d:%s] state %p\n"

.subsections_via_symbols
