	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_tv_get_modes
_intel_tv_get_modes:                    ## @intel_tv_get_modes
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	callq	_intel_attached_tv
	movq	%rax, %rdi
	callq	_intel_tv_mode_find
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_input_res_table@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	xorl	%ebx, %ebx
	movl	$8, %r14d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_input_res_table@GOTPCREL(%rip), %r15
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	incq	%rbx
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	cltq
	addq	$12, %r14
	cmpq	%rax, %rbx
	jge	LBB0_11
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rbx
	movq	(%r15), %r15
	movl	-8(%r15,%r14), %r12d
	movl	-4(%r15,%r14), %r13d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%eax, %r12d
	ja	LBB0_10
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$1025, %r12d                    ## imm = 0x401
	jb	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, 20(%rax)
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, 16(%rax)
	je	LBB0_10
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %edi
	callq	_drm_mode_create
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %rbx
	movl	40(%rax), %edi
	movl	(%r15,%r14), %esi
	movq	_DRM_DISPLAY_MODE_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_strncpy
	leal	1(%r12), %eax
	leal	64(%r12), %ecx
	leal	2(%r12), %edx
	cmpl	%eax, %ecx
	cmoval	%ecx, %edx
	movl	%r12d, (%rbx)
	movl	%eax, 4(%rbx)
	movl	%edx, 8(%rbx)
	addl	$96, %r12d
	movl	%r12d, 12(%rbx)
	leal	1(%r13), %eax
	leal	32(%r13), %ecx
	leal	2(%r13), %edx
	cmpl	%eax, %ecx
	cmoval	%ecx, %edx
	movl	%r13d, 16(%rbx)
	movl	%eax, 20(%rbx)
	movl	%edx, 24(%rbx)
	addl	$33, %r13d
	movl	%r13d, 28(%rbx)
	imull	%r12d, %r13d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	imull	8(%rax), %r13d
	movl	%r13d, %edi
	movl	$1000000, %esi                  ## imm = 0xF4240
	callq	_div_u64
	movl	%eax, 32(%rbx)
	movq	_DRM_MODE_TYPE_DRIVER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%rbx)
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_intel_tv_chose_preferred_modes
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_drm_mode_probed_add
	incl	-44(%rbp)                       ## 4-byte Folded Spill
	jmp	LBB0_10
LBB0_1:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_11:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_input_res_table,8,3            ## @input_res_table
	.comm	_DRM_DISPLAY_MODE_LEN,4,2       ## @DRM_DISPLAY_MODE_LEN
	.comm	_DRM_MODE_TYPE_DRIVER,4,2       ## @DRM_MODE_TYPE_DRIVER
	.no_dead_strip	_intel_tv_get_modes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_tv_get_modes
_intel_tv_get_modes:                    ; @intel_tv_get_modes
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	bl	_intel_attached_tv
	bl	_intel_tv_mode_find
	mov	x20, x0
Lloh0:
	adrp	x23, _input_res_table@GOTPAGE
Lloh1:
	ldr	x23, [x23, _input_res_table@GOTPAGEOFF]
	ldr	x0, [x23]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_9
; %bb.1:
	mov	x24, #0
	mov	x25, #0
	mov	w21, #0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x25, x25, #1
	ldr	x0, [x23]
	bl	_ARRAY_SIZE
	add	x24, x24, #12
	cmp	x25, w0, sxtw
	b.ge	LBB0_10
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x27, [x23]
	add	x8, x27, x24
	ldr	w26, [x8]
	ldr	w9, [x20]
	cmp	w9, #0
	ccmp	w26, w9, #0, ne
	b.hi	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w28, [x8, #4]
	cmp	w26, #1025
	b.lo	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x20, #20]
	cbnz	w8, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x20, #16]
	cbz	w8, LBB0_2
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x19]
	bl	_drm_mode_create
	cbz	x0, LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x22, x0
	ldr	w0, [x0, #40]
	add	x8, x27, x24
	ldr	w1, [x8, #8]
Lloh2:
	adrp	x8, _DRM_DISPLAY_MODE_LEN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DRM_DISPLAY_MODE_LEN@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	bl	_strncpy
	add	w8, w26, #1
	stp	w26, w8, [x22]
	add	w9, w26, #64
	add	w10, w26, #2
	cmp	w9, w8
	csel	w8, w9, w10, hi
	add	w9, w26, #96
	stp	w8, w9, [x22, #8]
	add	w8, w28, #1
	stp	w28, w8, [x22, #16]
	add	w10, w28, #32
	add	w11, w28, #2
	cmp	w10, w8
	csel	w8, w10, w11, hi
	add	w10, w28, #33
	stp	w8, w10, [x22, #24]
	ldr	w8, [x20, #8]
	mul	w9, w10, w9
	mul	w0, w9, w8
	mov	w1, #16960
	movk	w1, #15, lsl #16
	bl	_div_u64
Lloh5:
	adrp	x8, _DRM_MODE_TYPE_DRIVER@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DRM_MODE_TYPE_DRIVER@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	stp	w0, w8, [x22, #32]
	mov	x0, x19
	mov	x1, x22
	bl	_intel_tv_chose_preferred_modes
	mov	x0, x19
	mov	x1, x22
	bl	_drm_mode_probed_add
	add	w21, w21, #1
	b	LBB0_2
LBB0_9:
	mov	w21, #0
LBB0_10:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_input_res_table,8,3            ; @input_res_table
	.comm	_DRM_DISPLAY_MODE_LEN,4,2       ; @DRM_DISPLAY_MODE_LEN
	.comm	_DRM_MODE_TYPE_DRIVER,4,2       ; @DRM_MODE_TYPE_DRIVER
	.no_dead_strip	_intel_tv_get_modes
.subsections_via_symbols
