	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_crtc_set_config
_intel_crtc_set_config:                 ## @intel_crtc_set_config
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	xorl	%edi, %edi
	testq	%r13, %r13
	sete	%dil
	callq	_BUG_ON
	xorl	%edi, %edi
	cmpq	$0, 32(%r13)
	sete	%dil
	callq	_BUG_ON
	movq	32(%r13), %rax
	xorl	%edi, %edi
	cmpl	$0, 40(%rax)
	sete	%dil
	callq	_BUG_ON
	xorl	%ebx, %ebx
	cmpq	$0, 24(%r13)
	movl	$0, %edi
	jne	LBB0_2
## %bb.1:
	xorl	%edi, %edi
	cmpq	$0, 8(%r13)
	setne	%dil
LBB0_2:
	callq	_BUG_ON
	cmpq	$0, 8(%r13)
	je	LBB0_4
## %bb.3:
	xorl	%ebx, %ebx
	cmpq	$0, (%r13)
	sete	%bl
LBB0_4:
	movl	%ebx, %edi
	callq	_BUG_ON
	movq	8(%r13), %rax
	movq	32(%r13), %rcx
	movl	(%rcx), %esi
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	(%rax), %edx
	movl	20(%r13), %r8d
	movl	(%r13), %ecx
	movl	16(%r13), %r9d
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	jmp	LBB0_7
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
LBB0_7:
	movq	32(%r13), %rax
	movq	32(%rax), %r15
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kzalloc
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_19
## %bb.8:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_intel_set_config_save_state
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_9
LBB0_19:
	movq	%r14, %rdi
	callq	_intel_set_config_free
LBB0_23:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	32(%r13), %rbx
	movl	20(%rbx), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	16(%rbx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	8(%rbx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_intel_set_config_compute_mode_changes
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%r14, %rdx
	callq	_intel_modeset_stage_output_state
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_10
LBB0_16:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_intel_set_config_restore_state
	cmpq	$0, (%r14)
	je	LBB0_19
## %bb.17:
	leaq	24(%rbx), %rsi
	movq	%rbx, %rdi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	callq	_intel_set_mode
	testl	%eax, %eax
	je	LBB0_19
## %bb.18:
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_19
LBB0_10:
	cmpq	$0, (%r14)
	je	LBB0_20
## %bb.11:
	cmpq	$0, 24(%r13)
	je	LBB0_12
## %bb.13:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	24(%r13), %rdi
	callq	_drm_mode_debug_printmodeline
	movq	24(%r13), %rsi
	jmp	LBB0_14
LBB0_20:
	cmpq	$0, 8(%r14)
	je	LBB0_22
## %bb.21:
	movq	32(%r13), %rdi
	movl	20(%r13), %esi
	movl	16(%r13), %edx
	movq	8(%r13), %rcx
	callq	_intel_pipe_set_base
	jmp	LBB0_22
LBB0_12:
	xorl	%esi, %esi
LBB0_14:
	movq	32(%r13), %rdi
	movl	20(%r13), %edx
	movl	16(%r13), %ecx
	movq	8(%r13), %r8
	callq	_intel_set_mode
	testl	%eax, %eax
	je	LBB0_22
## %bb.15:
	movl	%eax, %r12d
	movq	32(%r13), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_16
LBB0_22:
	movq	%r14, %rdi
	callq	_intel_set_config_free
	xorl	%r12d, %r12d
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[CRTC:%d] [FB:%d] #connectors=%d (x y) (%i %i)\n"

L_.str.1:                               ## @.str.1
	.asciz	"[CRTC:%d] [NOFB]\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.2:                               ## @.str.2
	.asciz	"attempting to set mode from userspace\n"

L_.str.3:                               ## @.str.3
	.asciz	"failed to set mode on [CRTC:%d], err = %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"failed to restore config after modeset failure\n"

	.no_dead_strip	_intel_crtc_set_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_crtc_set_config
_intel_crtc_set_config:                 ; @intel_crtc_set_config
	.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
	mov	x19, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_BUG_ON
	ldr	x8, [x19, #32]
	cmp	x8, #0
	cset	w0, eq
	bl	_BUG_ON
	ldr	x8, [x19, #32]
	ldr	w8, [x8, #40]
	cmp	w8, #0
	cset	w0, eq
	bl	_BUG_ON
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	ldr	x8, [x19, #8]
	cmp	x8, #0
	cset	w0, ne
LBB0_3:
	bl	_BUG_ON
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_5
; %bb.4:
	ldr	x8, [x19]
	cmp	x8, #0
	cset	w0, eq
	b	LBB0_6
LBB0_5:
	mov	w0, #0
LBB0_6:
	bl	_BUG_ON
	ldr	x9, [x19, #8]
	ldr	x8, [x19, #32]
	ldr	w8, [x8]
	cbz	x9, LBB0_8
; %bb.7:
	ldr	x10, [x19]
	ldr	w9, [x9]
	ldp	w12, w11, [x19, #16]
	stp	x11, x12, [sp, #24]
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_9
LBB0_8:
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	str	x8, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_9:
	bl	_DRM_DEBUG_KMS
	ldr	x8, [x19, #32]
	ldr	x21, [x8, #32]
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w22, [x8]
Lloh7:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kzalloc
	mov	x20, x0
	cbz	x0, LBB0_15
; %bb.10:
	mov	x0, x21
	mov	x1, x20
	bl	_intel_set_config_save_state
	mov	x26, x0
	cbnz	w0, LBB0_16
; %bb.11:
	ldr	x25, [x19, #32]
	ldp	w23, w22, [x25, #16]
	ldr	x24, [x25, #8]
	mov	x0, x19
	mov	x1, x20
	bl	_intel_set_config_compute_mode_changes
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	bl	_intel_modeset_stage_output_state
	mov	x26, x0
	cbz	w0, LBB0_18
LBB0_12:
	mov	x0, x21
	mov	x1, x20
	bl	_intel_set_config_restore_state
	ldr	x8, [x20]
	cbz	x8, LBB0_16
; %bb.13:
	add	x1, x25, #24
	mov	x0, x25
	mov	x2, x22
	mov	x3, x23
	mov	x4, x24
	bl	_intel_set_mode
	cbz	w0, LBB0_16
; %bb.14:
Lloh10:
	adrp	x0, l_.str.4@PAGE
Lloh11:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_16
LBB0_15:
	neg	w26, w22
LBB0_16:
	mov	x0, x20
	bl	_intel_set_config_free
LBB0_17:
	mov	x0, x26
	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_18:
	ldr	x8, [x20]
	cbz	x8, LBB0_21
; %bb.19:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_23
; %bb.20:
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_DEBUG_KMS
	ldr	x0, [x19, #24]
	bl	_drm_mode_debug_printmodeline
	ldr	x1, [x19, #24]
	b	LBB0_24
LBB0_21:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_26
; %bb.22:
	ldr	x0, [x19, #32]
	ldp	w2, w1, [x19, #16]
	ldr	x3, [x19, #8]
	bl	_intel_pipe_set_base
	b	LBB0_26
LBB0_23:
	mov	x1, #0
LBB0_24:
	ldr	x0, [x19, #32]
	ldp	w3, w2, [x19, #16]
	ldr	x4, [x19, #8]
	bl	_intel_set_mode
	cbz	w0, LBB0_26
; %bb.25:
	mov	x26, x0
	ldr	x8, [x19, #32]
	ldr	w8, [x8]
	stp	x8, x26, [sp]
Lloh14:
	adrp	x0, l_.str.3@PAGE
Lloh15:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_12
LBB0_26:
	mov	x0, x20
	bl	_intel_set_config_free
	mov	w26, #0
	b	LBB0_17
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[CRTC:%d] [FB:%d] #connectors=%d (x y) (%i %i)\n"

l_.str.1:                               ; @.str.1
	.asciz	"[CRTC:%d] [NOFB]\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.2:                               ; @.str.2
	.asciz	"attempting to set mode from userspace\n"

l_.str.3:                               ; @.str.3
	.asciz	"failed to set mode on [CRTC:%d], err = %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"failed to restore config after modeset failure\n"

	.no_dead_strip	_intel_crtc_set_config
.subsections_via_symbols
