	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_mode_set_crtcinfo          ## -- Begin function drm_mode_set_crtcinfo
	.p2align	4, 0x90
_drm_mode_set_crtcinfo:                 ## @drm_mode_set_crtcinfo
	.cfi_startproc
## %bb.0:
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.1:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	4(%rdi), %r8d
	movl	12(%rdi), %eax
	movl	%r8d, (%rdi)
	movl	%eax, 8(%rdi)
	movl	20(%rdi), %eax
	movl	%eax, 16(%rdi)
	movl	28(%rdi), %eax
	movl	%eax, 24(%rdi)
	movl	36(%rdi), %eax
	movl	%eax, 32(%rdi)
	movl	112(%rdi), %eax
	movl	%eax, 116(%rdi)
	movl	44(%rdi), %ecx
	movl	%ecx, 40(%rdi)
	movl	52(%rdi), %edi
	movl	%edi, 48(%rbx)
	movl	60(%rbx), %r10d
	movl	%r10d, 56(%rbx)
	movl	68(%rbx), %r11d
	movl	%r11d, 64(%rbx)
	movl	72(%rbx), %r9d
	movq	_DRM_MODE_FLAG_INTERLACE@GOTPCREL(%rip), %rax
	testl	%r9d, (%rax)
	je	LBB0_4
## %bb.2:
	movq	_CRTC_INTERLACE_HALVE_V@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_4
## %bb.3:
	movl	%ecx, %eax
	shrl	$31, %eax
	addl	%ecx, %eax
	sarl	%eax
	movl	%eax, 40(%rbx)
	movl	%edi, %ecx
	shrl	$31, %ecx
	addl	%edi, %ecx
	sarl	%ecx
	movl	%ecx, 48(%rbx)
	movl	%r10d, %edi
	shrl	$31, %edi
	addl	%r10d, %edi
	sarl	%edi
	movl	%edi, 56(%rbx)
	movl	%r11d, %edx
	shrl	$31, %edx
	addl	%r11d, %edx
	sarl	%edx
	movl	%edx, 64(%rbx)
	movl	%edx, %r11d
	movl	%edi, %r10d
	movl	%ecx, %edi
	movl	%eax, %ecx
LBB0_4:
	movq	_CRTC_NO_DBLSCAN@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	jne	LBB0_7
## %bb.5:
	movq	_DRM_MODE_FLAG_DBLSCAN@GOTPCREL(%rip), %rax
	testl	%r9d, (%rax)
	je	LBB0_7
## %bb.6:
	addl	%ecx, %ecx
	movl	%ecx, 40(%rbx)
	addl	%edi, %edi
	movl	%edi, 48(%rbx)
	addl	%r10d, %r10d
	movl	%r10d, 56(%rbx)
	addl	%r11d, %r11d
	movl	%r11d, 64(%rbx)
LBB0_7:
	movq	_CRTC_NO_VSCAN@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	jne	LBB0_10
## %bb.8:
	movl	76(%rbx), %eax
	cmpl	$2, %eax
	jl	LBB0_10
## %bb.9:
	imull	%eax, %ecx
	movl	%ecx, 40(%rbx)
	imull	%eax, %edi
	movl	%edi, 48(%rbx)
	imull	%eax, %r10d
	movl	%r10d, 56(%rbx)
	imull	%eax, %r11d
	movl	%r11d, 64(%rbx)
LBB0_10:
	movq	_CRTC_STEREO_DOUBLE@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_13
## %bb.11:
	movq	_DRM_MODE_FLAG_3D_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r9d
	cmpl	$128, %r9d
	jne	LBB0_13
## %bb.12:
	addl	%r8d, %r8d
	movl	%r8d, (%rbx)
	addl	%r11d, %ecx
	movl	%ecx, 40(%rbx)
	addl	%r11d, %edi
	movl	%edi, 48(%rbx)
	addl	%r11d, %r10d
	movl	%r10d, 56(%rbx)
	addl	%r11d, %r11d
	movl	%r11d, 64(%rbx)
LBB0_13:
	movl	%ecx, %esi
	callq	_min
	movq	%rax, 104(%rbx)
	movl	56(%rbx), %edi
	movl	64(%rbx), %esi
	callq	_max
	movq	%rax, 96(%rbx)
	movl	8(%rbx), %esi
	movl	16(%rbx), %edi
	callq	_min
	movq	%rax, 88(%rbx)
	movl	24(%rbx), %edi
	movl	32(%rbx), %esi
	callq	_max
	movq	%rax, 80(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
LBB0_14:
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ## @DRM_MODE_FLAG_INTERLACE
	.comm	_CRTC_INTERLACE_HALVE_V,4,2     ## @CRTC_INTERLACE_HALVE_V
	.comm	_CRTC_NO_DBLSCAN,4,2            ## @CRTC_NO_DBLSCAN
	.comm	_DRM_MODE_FLAG_DBLSCAN,4,2      ## @DRM_MODE_FLAG_DBLSCAN
	.comm	_CRTC_NO_VSCAN,4,2              ## @CRTC_NO_VSCAN
	.comm	_CRTC_STEREO_DOUBLE,4,2         ## @CRTC_STEREO_DOUBLE
	.comm	_DRM_MODE_FLAG_3D_MASK,4,2      ## @DRM_MODE_FLAG_3D_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_mode_set_crtcinfo          ; -- Begin function drm_mode_set_crtcinfo
	.p2align	2
_drm_mode_set_crtcinfo:                 ; @drm_mode_set_crtcinfo
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_14
; %bb.1:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x8, x1
	mov	x19, x0
	ldr	w9, [x0, #4]
	str	w9, [x0]
	ldr	w10, [x0, #12]
	str	w10, [x0, #8]
	ldr	w10, [x0, #20]
	str	w10, [x0, #16]
	ldr	w10, [x0, #28]
	str	w10, [x0, #24]
	ldr	w10, [x0, #36]
	str	w10, [x0, #32]
	ldr	w10, [x0, #112]
	str	w10, [x0, #116]
	ldr	w1, [x0, #44]
	str	w1, [x0, #40]
	ldr	w0, [x0, #52]
	str	w0, [x19, #48]
	ldr	w10, [x19, #60]
	str	w10, [x19, #56]
	ldp	w11, w12, [x19, #68]
	str	w11, [x19, #64]
Lloh0:
	adrp	x13, _DRM_MODE_FLAG_INTERLACE@GOTPAGE
Lloh1:
	ldr	x13, [x13, _DRM_MODE_FLAG_INTERLACE@GOTPAGEOFF]
Lloh2:
	ldr	w13, [x13]
	tst	w13, w12
	b.eq	LBB0_4
; %bb.2:
Lloh3:
	adrp	x13, _CRTC_INTERLACE_HALVE_V@GOTPAGE
Lloh4:
	ldr	x13, [x13, _CRTC_INTERLACE_HALVE_V@GOTPAGEOFF]
Lloh5:
	ldr	w13, [x13]
	tst	w13, w8
	b.eq	LBB0_4
; %bb.3:
	cmp	w1, #0
	cinc	w13, w1, lt
	asr	w1, w13, #1
	str	w1, [x19, #40]
	cmp	w0, #0
	cinc	w13, w0, lt
	asr	w0, w13, #1
	str	w0, [x19, #48]
	cmp	w10, #0
	cinc	w10, w10, lt
	asr	w10, w10, #1
	str	w10, [x19, #56]
	cmp	w11, #0
	cinc	w11, w11, lt
	asr	w11, w11, #1
	str	w11, [x19, #64]
LBB0_4:
Lloh6:
	adrp	x13, _CRTC_NO_DBLSCAN@GOTPAGE
Lloh7:
	ldr	x13, [x13, _CRTC_NO_DBLSCAN@GOTPAGEOFF]
Lloh8:
	ldr	w13, [x13]
	tst	w13, w8
	b.ne	LBB0_7
; %bb.5:
Lloh9:
	adrp	x13, _DRM_MODE_FLAG_DBLSCAN@GOTPAGE
Lloh10:
	ldr	x13, [x13, _DRM_MODE_FLAG_DBLSCAN@GOTPAGEOFF]
Lloh11:
	ldr	w13, [x13]
	tst	w13, w12
	b.eq	LBB0_7
; %bb.6:
	lsl	w1, w1, #1
	str	w1, [x19, #40]
	lsl	w0, w0, #1
	str	w0, [x19, #48]
	lsl	w10, w10, #1
	str	w10, [x19, #56]
	lsl	w11, w11, #1
	str	w11, [x19, #64]
LBB0_7:
Lloh12:
	adrp	x13, _CRTC_NO_VSCAN@GOTPAGE
Lloh13:
	ldr	x13, [x13, _CRTC_NO_VSCAN@GOTPAGEOFF]
Lloh14:
	ldr	w13, [x13]
	tst	w13, w8
	b.ne	LBB0_10
; %bb.8:
	ldr	w13, [x19, #76]
	cmp	w13, #2
	b.lt	LBB0_10
; %bb.9:
	mul	w1, w1, w13
	str	w1, [x19, #40]
	mul	w0, w0, w13
	str	w0, [x19, #48]
	mul	w10, w10, w13
	str	w10, [x19, #56]
	mul	w11, w11, w13
	str	w11, [x19, #64]
LBB0_10:
Lloh15:
	adrp	x13, _CRTC_STEREO_DOUBLE@GOTPAGE
Lloh16:
	ldr	x13, [x13, _CRTC_STEREO_DOUBLE@GOTPAGEOFF]
Lloh17:
	ldr	w13, [x13]
	tst	w13, w8
	b.eq	LBB0_13
; %bb.11:
Lloh18:
	adrp	x8, _DRM_MODE_FLAG_3D_MASK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _DRM_MODE_FLAG_3D_MASK@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	and	w8, w8, w12
	cmp	w8, #128
	b.ne	LBB0_13
; %bb.12:
	lsl	w8, w9, #1
	str	w8, [x19]
	add	w1, w1, w11
	str	w1, [x19, #40]
	add	w0, w0, w11
	str	w0, [x19, #48]
	add	w8, w10, w11
	str	w8, [x19, #56]
	lsl	w8, w11, #1
	str	w8, [x19, #64]
LBB0_13:
	bl	_min
	str	x0, [x19, #104]
	ldr	w0, [x19, #56]
	ldr	w1, [x19, #64]
	bl	_max
	str	x0, [x19, #96]
	ldr	w0, [x19, #16]
	ldr	w1, [x19, #8]
	bl	_min
	str	x0, [x19, #88]
	ldr	w0, [x19, #24]
	ldr	w1, [x19, #32]
	bl	_max
	str	x0, [x19, #80]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
LBB0_14:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ; @DRM_MODE_FLAG_INTERLACE
	.comm	_CRTC_INTERLACE_HALVE_V,4,2     ; @CRTC_INTERLACE_HALVE_V
	.comm	_CRTC_NO_DBLSCAN,4,2            ; @CRTC_NO_DBLSCAN
	.comm	_DRM_MODE_FLAG_DBLSCAN,4,2      ; @DRM_MODE_FLAG_DBLSCAN
	.comm	_CRTC_NO_VSCAN,4,2              ; @CRTC_NO_VSCAN
	.comm	_CRTC_STEREO_DOUBLE,4,2         ; @CRTC_STEREO_DOUBLE
	.comm	_DRM_MODE_FLAG_3D_MASK,4,2      ; @DRM_MODE_FLAG_3D_MASK
.subsections_via_symbols
