	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tilcdc_crtc_mode_valid
_tilcdc_crtc_mode_valid:                ## @tilcdc_crtc_mode_valid
	.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	%rsi, %r13
	movq	(%rdi), %rax
	movq	(%rax), %r12
	movl	(%rsi), %ebx
	callq	_tilcdc_crtc_max_width
	movq	_MODE_VIRTUAL_X@GOTPCREL(%rip), %r15
	cmpl	%eax, %ebx
	jg	LBB0_24
## %bb.1:
	movl	(%r13), %r14d
	testb	$15, %r14b
	jne	LBB0_24
## %bb.2:
	movl	4(%r13), %r15d
	cmpl	$2048, %r15d                    ## imm = 0x800
	jle	LBB0_4
## %bb.3:
	movq	_MODE_VIRTUAL_Y@GOTPCREL(%rip), %r15
	jmp	LBB0_24
LBB0_4:
	movq	%r13, %rdi
	callq	_drm_mode_vrefresh
	movq	8(%r13), %r8
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_DBG
	movl	20(%r13), %ecx
	movl	%ecx, %eax
	notl	%eax
	addl	16(%r13), %eax
	movq	_MODE_HBLANK_WIDE@GOTPCREL(%rip), %r15
	cmpl	$1023, %eax                     ## imm = 0x3FF
	ja	LBB0_5
## %bb.6:
	movl	24(%r13), %edx
	movl	(%r13), %eax
	movl	%eax, %esi
	notl	%esi
	addl	%edx, %esi
	cmpl	$1023, %esi                     ## imm = 0x3FF
	ja	LBB0_7
## %bb.8:
	notl	%edx
	addl	%edx, %ecx
	cmpl	$1023, %ecx                     ## imm = 0x3FF
	ja	LBB0_9
## %bb.10:
	movl	28(%r13), %edx
	movl	32(%r13), %ecx
	subl	%ecx, %edx
	movq	_MODE_VBLANK_WIDE@GOTPCREL(%rip), %r15
	cmpl	$255, %edx
	ja	LBB0_11
## %bb.12:
	movl	4(%r13), %r14d
	movl	36(%r13), %edx
	movl	%edx, %esi
	subl	%r14d, %esi
	cmpl	$255, %esi
	ja	LBB0_13
## %bb.14:
	notl	%edx
	addl	%edx, %ecx
	cmpl	$63, %ecx
	ja	LBB0_15
## %bb.16:
	movq	8(%r13), %rcx
	cmpq	(%r12), %rcx
	jle	LBB0_18
## %bb.17:
	movq	_MODE_CLOCK_HIGH@GOTPCREL(%rip), %r15
	leaq	L_.str.7(%rip), %rdi
	jmp	LBB0_23
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_23
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_23
LBB0_9:
	movq	_MODE_HSYNC_WIDE@GOTPCREL(%rip), %r15
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_23
LBB0_11:
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_23
LBB0_13:
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_23
LBB0_15:
	movq	_MODE_VSYNC_WIDE@GOTPCREL(%rip), %r15
	leaq	L_.str.6(%rip), %rdi
LBB0_23:
	xorl	%eax, %eax
	callq	_DBG
LBB0_24:
	movl	(%r15), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	cmpl	8(%r12), %eax
	jle	LBB0_20
## %bb.19:
	movq	_MODE_BAD_WIDTH@GOTPCREL(%rip), %r15
	jmp	LBB0_24
LBB0_20:
	imull	%eax, %r14d
	movq	%r13, %rdi
	callq	_drm_mode_vrefresh
	imull	%r14d, %eax
	cmpl	12(%r12), %eax
	jbe	LBB0_21
## %bb.22:
	movq	_MODE_BAD@GOTPCREL(%rip), %r15
	leaq	L_.str.8(%rip), %rdi
	jmp	LBB0_23
LBB0_21:
	movq	_MODE_OK@GOTPCREL(%rip), %r15
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.comm	_MODE_VIRTUAL_X,4,2             ## @MODE_VIRTUAL_X
	.comm	_MODE_VIRTUAL_Y,4,2             ## @MODE_VIRTUAL_Y
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Processing mode %dx%d@%d with pixel clock %d"

L_.str.1:                               ## @.str.1
	.asciz	"Pruning mode: Horizontal Back Porch out of range"

	.comm	_MODE_HBLANK_WIDE,4,2           ## @MODE_HBLANK_WIDE
L_.str.2:                               ## @.str.2
	.asciz	"Pruning mode: Horizontal Front Porch out of range"

L_.str.3:                               ## @.str.3
	.asciz	"Pruning mode: Horizontal Sync Width out of range"

	.comm	_MODE_HSYNC_WIDE,4,2            ## @MODE_HSYNC_WIDE
L_.str.4:                               ## @.str.4
	.asciz	"Pruning mode: Vertical Back Porch out of range"

	.comm	_MODE_VBLANK_WIDE,4,2           ## @MODE_VBLANK_WIDE
L_.str.5:                               ## @.str.5
	.asciz	"Pruning mode: Vertical Front Porch out of range"

L_.str.6:                               ## @.str.6
	.asciz	"Pruning mode: Vertical Sync Width out of range"

	.comm	_MODE_VSYNC_WIDE,4,2            ## @MODE_VSYNC_WIDE
L_.str.7:                               ## @.str.7
	.asciz	"Pruning mode: pixel clock too high"

	.comm	_MODE_CLOCK_HIGH,4,2            ## @MODE_CLOCK_HIGH
	.comm	_MODE_BAD_WIDTH,4,2             ## @MODE_BAD_WIDTH
L_.str.8:                               ## @.str.8
	.asciz	"Pruning mode: exceeds defined bandwidth limit"

	.comm	_MODE_BAD,4,2                   ## @MODE_BAD
	.comm	_MODE_OK,4,2                    ## @MODE_OK
	.no_dead_strip	_tilcdc_crtc_mode_valid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tilcdc_crtc_mode_valid
_tilcdc_crtc_mode_valid:                ; @tilcdc_crtc_mode_valid
	.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, x1
	ldr	x8, [x0]
	ldr	x20, [x8]
	ldr	w21, [x1]
	bl	_tilcdc_crtc_max_width
	cmp	w21, w0
	b.gt	LBB0_2
; %bb.1:
	ldr	w21, [x19]
	tst	w21, #0xf
	b.eq	LBB0_4
LBB0_2:
Lloh0:
	adrp	x19, _MODE_VIRTUAL_X@GOTPAGE
Lloh1:
	ldr	x19, [x19, _MODE_VIRTUAL_X@GOTPAGEOFF]
LBB0_3:
	ldr	w0, [x19]
	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_4:
	ldr	w22, [x19, #4]
	cmp	w22, #2048
	b.le	LBB0_6
; %bb.5:
Lloh2:
	adrp	x19, _MODE_VIRTUAL_Y@GOTPAGE
Lloh3:
	ldr	x19, [x19, _MODE_VIRTUAL_Y@GOTPAGEOFF]
	b	LBB0_3
LBB0_6:
	mov	x0, x19
	bl	_drm_mode_vrefresh
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	x8, [x19, #8]
	stp	x0, x8, [sp, #16]
	stp	x21, x22, [sp]
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DBG
	ldp	w8, w9, [x19, #16]
	mvn	w10, w9
	add	w8, w8, w10
	cmp	w8, #1023
	b.hi	LBB0_14
; %bb.7:
	ldr	w10, [x19, #24]
	ldr	w8, [x19]
	mvn	w11, w8
	add	w11, w10, w11
	cmp	w11, #1023
	b.hi	LBB0_15
; %bb.8:
	mvn	w10, w10
	add	w9, w9, w10
	cmp	w9, #1023
	b.hi	LBB0_16
; %bb.9:
	ldp	w9, w10, [x19, #28]
	sub	w9, w9, w10
	cmp	w9, #255
	b.hi	LBB0_17
; %bb.10:
	ldr	w11, [x19, #36]
	ldr	w9, [x19, #4]
	sub	w12, w11, w9
	cmp	w12, #255
	b.hi	LBB0_18
; %bb.11:
	mvn	w11, w11
	add	w10, w10, w11
	cmp	w10, #63
	b.hi	LBB0_19
; %bb.12:
	ldr	x10, [x19, #8]
	ldr	x11, [x20]
	cmp	x10, x11
	b.le	LBB0_21
; %bb.13:
Lloh6:
	adrp	x19, _MODE_CLOCK_HIGH@GOTPAGE
Lloh7:
	ldr	x19, [x19, _MODE_CLOCK_HIGH@GOTPAGEOFF]
Lloh8:
	adrp	x0, l_.str.7@PAGE
Lloh9:
	add	x0, x0, l_.str.7@PAGEOFF
	b	LBB0_20
LBB0_14:
Lloh10:
	adrp	x19, _MODE_HBLANK_WIDE@GOTPAGE
Lloh11:
	ldr	x19, [x19, _MODE_HBLANK_WIDE@GOTPAGEOFF]
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_20
LBB0_15:
Lloh14:
	adrp	x19, _MODE_HBLANK_WIDE@GOTPAGE
Lloh15:
	ldr	x19, [x19, _MODE_HBLANK_WIDE@GOTPAGEOFF]
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_20
LBB0_16:
Lloh18:
	adrp	x19, _MODE_HSYNC_WIDE@GOTPAGE
Lloh19:
	ldr	x19, [x19, _MODE_HSYNC_WIDE@GOTPAGEOFF]
Lloh20:
	adrp	x0, l_.str.3@PAGE
Lloh21:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_20
LBB0_17:
Lloh22:
	adrp	x19, _MODE_VBLANK_WIDE@GOTPAGE
Lloh23:
	ldr	x19, [x19, _MODE_VBLANK_WIDE@GOTPAGEOFF]
Lloh24:
	adrp	x0, l_.str.4@PAGE
Lloh25:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_20
LBB0_18:
Lloh26:
	adrp	x19, _MODE_VBLANK_WIDE@GOTPAGE
Lloh27:
	ldr	x19, [x19, _MODE_VBLANK_WIDE@GOTPAGEOFF]
Lloh28:
	adrp	x0, l_.str.5@PAGE
Lloh29:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_20
LBB0_19:
Lloh30:
	adrp	x19, _MODE_VSYNC_WIDE@GOTPAGE
Lloh31:
	ldr	x19, [x19, _MODE_VSYNC_WIDE@GOTPAGEOFF]
Lloh32:
	adrp	x0, l_.str.6@PAGE
Lloh33:
	add	x0, x0, l_.str.6@PAGEOFF
LBB0_20:
	bl	_DBG
	b	LBB0_3
LBB0_21:
	ldr	w10, [x20, #8]
	cmp	w8, w10
	b.le	LBB0_23
; %bb.22:
Lloh34:
	adrp	x19, _MODE_BAD_WIDTH@GOTPAGE
Lloh35:
	ldr	x19, [x19, _MODE_BAD_WIDTH@GOTPAGEOFF]
	b	LBB0_3
LBB0_23:
	mul	w21, w9, w8
	mov	x0, x19
	bl	_drm_mode_vrefresh
	mul	w8, w21, w0
	ldr	w9, [x20, #12]
	cmp	w8, w9
	b.ls	LBB0_25
; %bb.24:
Lloh36:
	adrp	x19, _MODE_BAD@GOTPAGE
Lloh37:
	ldr	x19, [x19, _MODE_BAD@GOTPAGEOFF]
Lloh38:
	adrp	x0, l_.str.8@PAGE
Lloh39:
	add	x0, x0, l_.str.8@PAGEOFF
	b	LBB0_20
LBB0_25:
Lloh40:
	adrp	x19, _MODE_OK@GOTPAGE
Lloh41:
	ldr	x19, [x19, _MODE_OK@GOTPAGEOFF]
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_MODE_VIRTUAL_X,4,2             ; @MODE_VIRTUAL_X
	.comm	_MODE_VIRTUAL_Y,4,2             ; @MODE_VIRTUAL_Y
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Processing mode %dx%d@%d with pixel clock %d"

l_.str.1:                               ; @.str.1
	.asciz	"Pruning mode: Horizontal Back Porch out of range"

	.comm	_MODE_HBLANK_WIDE,4,2           ; @MODE_HBLANK_WIDE
l_.str.2:                               ; @.str.2
	.asciz	"Pruning mode: Horizontal Front Porch out of range"

l_.str.3:                               ; @.str.3
	.asciz	"Pruning mode: Horizontal Sync Width out of range"

	.comm	_MODE_HSYNC_WIDE,4,2            ; @MODE_HSYNC_WIDE
l_.str.4:                               ; @.str.4
	.asciz	"Pruning mode: Vertical Back Porch out of range"

	.comm	_MODE_VBLANK_WIDE,4,2           ; @MODE_VBLANK_WIDE
l_.str.5:                               ; @.str.5
	.asciz	"Pruning mode: Vertical Front Porch out of range"

l_.str.6:                               ; @.str.6
	.asciz	"Pruning mode: Vertical Sync Width out of range"

	.comm	_MODE_VSYNC_WIDE,4,2            ; @MODE_VSYNC_WIDE
l_.str.7:                               ; @.str.7
	.asciz	"Pruning mode: pixel clock too high"

	.comm	_MODE_CLOCK_HIGH,4,2            ; @MODE_CLOCK_HIGH
	.comm	_MODE_BAD_WIDTH,4,2             ; @MODE_BAD_WIDTH
l_.str.8:                               ; @.str.8
	.asciz	"Pruning mode: exceeds defined bandwidth limit"

	.comm	_MODE_BAD,4,2                   ; @MODE_BAD
	.comm	_MODE_OK,4,2                    ; @MODE_OK
	.no_dead_strip	_tilcdc_crtc_mode_valid
.subsections_via_symbols
