	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function psb_intel_sdvo_get_tv_modes
_psb_intel_sdvo_get_tv_modes:           ## @psb_intel_sdvo_get_tv_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_intel_attached_sdvo
	movq	%rax, %rbx
	movl	$0, -36(%rbp)
	movb	(%rax), %cl
	movl	$1, %eax
	shll	%cl, %eax
	movl	%eax, -44(%rbp)
	movl	$4, %edi
	movl	$4, %esi
	callq	_min
	leaq	-40(%rbp), %rdi
	leaq	-44(%rbp), %rsi
	movl	%eax, %edx
	callq	_memcpy
	movl	4(%rbx), %esi
	movq	%rbx, %rdi
	callq	_psb_intel_sdvo_set_target_output
	testl	%eax, %eax
	je	LBB0_9
## %bb.1:
	movl	$1, %edi
	callq	_BUILD_BUG_ON
	movq	_SDVO_CMD_GET_SDTV_RESOLUTION_SUPPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$4, %ecx
	callq	_psb_intel_sdvo_write_cmd
	testl	%eax, %eax
	je	LBB0_9
## %bb.2:
	leaq	-36(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$3, %edx
	callq	_psb_intel_sdvo_read_response
	testl	%eax, %eax
	je	LBB0_9
## %bb.3:
	movq	_sdvo_tv_modes@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_9
## %bb.4:
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	cltq
	addq	$4, %r12
	cmpq	%rax, %rbx
	jge	LBB0_9
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	-36(%rbp), %eax
	btl	%ebx, %eax
	jae	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r14), %edi
	movq	(%r15), %rsi
	addq	%r12, %rsi
	callq	_drm_mode_duplicate
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_drm_mode_probed_add
	jmp	LBB0_8
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SDVO_CMD_GET_SDTV_RESOLUTION_SUPPORT,4,2 ## @SDVO_CMD_GET_SDTV_RESOLUTION_SUPPORT
	.comm	_sdvo_tv_modes,8,3              ## @sdvo_tv_modes
	.no_dead_strip	_psb_intel_sdvo_get_tv_modes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function psb_intel_sdvo_get_tv_modes
_psb_intel_sdvo_get_tv_modes:           ; @psb_intel_sdvo_get_tv_modes
	.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
	bl	_intel_attached_sdvo
	mov	x20, x0
	str	wzr, [sp, #4]
	ldr	w8, [x0]
	mov	w9, #1
	lsl	w8, w9, w8
	str	w8, [sp]
	mov	w0, #4
	mov	w1, #4
	bl	_min
	mov	x2, x0
	add	x0, sp, #8
	mov	x1, sp
	bl	_memcpy
	ldr	w1, [x20, #4]
	mov	x0, x20
	bl	_psb_intel_sdvo_set_target_output
	cbz	w0, LBB0_9
; %bb.1:
	mov	w0, #1
	bl	_BUILD_BUG_ON
Lloh0:
	adrp	x8, _SDVO_CMD_GET_SDTV_RESOLUTION_SUPPORT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SDVO_CMD_GET_SDTV_RESOLUTION_SUPPORT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x20
	mov	w3, #4
	bl	_psb_intel_sdvo_write_cmd
	cbz	w0, LBB0_9
; %bb.2:
	add	x1, sp, #4
	mov	x0, x20
	mov	w2, #3
	bl	_psb_intel_sdvo_read_response
	cbz	w0, LBB0_9
; %bb.3:
Lloh3:
	adrp	x20, _sdvo_tv_modes@GOTPAGE
Lloh4:
	ldr	x20, [x20, _sdvo_tv_modes@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_9
; %bb.4:
	mov	x21, #0
	mov	x22, #0
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x22, x22, #1
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	add	x21, x21, #4
	cmp	x22, w0, sxtw
	b.ge	LBB0_9
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [sp, #4]
	lsr	w8, w8, w22
	tbz	w8, #0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x19]
	ldr	x8, [x20]
	add	x1, x8, x21
	bl	_drm_mode_duplicate
	cbz	x0, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x1, x0
	mov	x0, x19
	bl	_drm_mode_probed_add
	b	LBB0_5
LBB0_9:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_SDVO_CMD_GET_SDTV_RESOLUTION_SUPPORT,4,2 ; @SDVO_CMD_GET_SDTV_RESOLUTION_SUPPORT
	.comm	_sdvo_tv_modes,8,3              ; @sdvo_tv_modes
	.no_dead_strip	_psb_intel_sdvo_get_tv_modes
.subsections_via_symbols
