	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function psb_intel_sdvo_tv_create_property
_psb_intel_sdvo_tv_create_property:     ## @psb_intel_sdvo_tv_create_property
	.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	%rsi, %r13
	movq	%rdi, %r14
	movq	8(%rdi), %rbx
	movl	%edx, %esi
	callq	_psb_intel_sdvo_set_target_output
	xorl	%r15d, %r15d
	testl	%eax, %eax
	je	LBB0_13
## %bb.1:
	movl	$1, %edi
	callq	_BUILD_BUG_ON
	movq	_SDVO_CMD_GET_SUPPORTED_TV_FORMATS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	movl	$4, %ecx
	callq	_psb_intel_sdvo_get_value
	testl	%eax, %eax
	je	LBB0_13
## %bb.2:
	movl	$4, %edi
	movl	$4, %esi
	callq	_min
	leaq	-44(%rbp), %rdi
	leaq	-48(%rbp), %rsi
	movl	%eax, %edx
	callq	_memcpy
	cmpl	$0, -44(%rbp)
	je	LBB0_13
## %bb.3:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	$0, (%r13)
	movq	_tv_format_names@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_8
## %bb.4:
	xorl	%ebx, %ebx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	incl	%ebx
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %ebx
	jge	LBB0_8
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	-44(%rbp), %eax
	btl	%ebx, %eax
	jae	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%r13), %rax
	movslq	(%r13), %rcx
	leal	1(%rcx), %edx
	movl	%edx, (%r13)
	movl	%ebx, (%rax,%rcx,4)
	jmp	LBB0_7
LBB0_8:
	movq	_DRM_MODE_PROP_ENUM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %ecx
	leaq	L_.str(%rip), %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_drm_property_create
	movl	%eax, 16(%r13)
	testl	%eax, %eax
	je	LBB0_13
## %bb.9:
	cmpl	$0, (%r13)
	jle	LBB0_12
## %bb.10:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rcx
	movq	8(%r13), %rdx
	movslq	(%rdx,%rbx,4), %rdx
	movl	(%rcx,%rdx,4), %edx
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_drm_property_add_enum
	incq	%rbx
	movslq	(%r13), %rcx
	movl	16(%r13), %eax
	cmpq	%rcx, %rbx
	jl	LBB0_11
LBB0_12:
	movq	8(%r13), %rcx
	movslq	(%rcx), %rcx
	movq	%rcx, (%r14)
	addq	$20, %r13
	movq	%r13, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_drm_object_attach_property
	movl	$1, %r15d
LBB0_13:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SDVO_CMD_GET_SUPPORTED_TV_FORMATS,4,2 ## @SDVO_CMD_GET_SUPPORTED_TV_FORMATS
	.comm	_tv_format_names,8,3            ## @tv_format_names
	.comm	_DRM_MODE_PROP_ENUM,4,2         ## @DRM_MODE_PROP_ENUM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mode"

	.no_dead_strip	_psb_intel_sdvo_tv_create_property
.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_tv_create_property
_psb_intel_sdvo_tv_create_property:     ; @psb_intel_sdvo_tv_create_property
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x20, x0
	ldr	x21, [x0, #8]
	mov	x1, x2
	bl	_psb_intel_sdvo_set_target_output
	cbz	w0, LBB0_14
; %bb.1:
	mov	w0, #1
	bl	_BUILD_BUG_ON
Lloh0:
	adrp	x8, _SDVO_CMD_GET_SUPPORTED_TV_FORMATS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SDVO_CMD_GET_SUPPORTED_TV_FORMATS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x20
	mov	w3, #4
	bl	_psb_intel_sdvo_get_value
	cbz	w0, LBB0_14
; %bb.2:
	mov	w0, #4
	mov	w1, #4
	bl	_min
	mov	x2, x0
	add	x0, sp, #4
	add	x1, sp, #8
	bl	_memcpy
	ldr	w8, [sp, #4]
	cbz	w8, LBB0_13
; %bb.3:
	str	wzr, [x19]
Lloh3:
	adrp	x22, _tv_format_names@GOTPAGE
Lloh4:
	ldr	x22, [x22, _tv_format_names@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_8
; %bb.4:
	mov	w23, #0
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	w23, w23, #1
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	w23, w0
	b.ge	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [sp, #4]
	lsr	w8, w8, w23
	tbz	w8, #0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x19, #8]
	ldrsw	x9, [x19]
	add	w10, w9, #1
	str	w10, [x19]
	str	w23, [x8, x9, lsl #2]
	b	LBB0_5
LBB0_8:
Lloh5:
	adrp	x8, _DRM_MODE_PROP_ENUM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DRM_MODE_PROP_ENUM@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	ldr	w3, [x19]
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	bl	_drm_property_create
	str	w0, [x19, #16]
	cbz	w0, LBB0_14
; %bb.9:
	mov	x1, x0
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.10:
	mov	x21, #0
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	ldr	x9, [x19, #8]
	ldrsw	x9, [x9, x21, lsl #2]
	ldr	w2, [x8, x9, lsl #2]
	mov	x0, x1
	mov	x1, x21
	bl	_drm_property_add_enum
	add	x21, x21, #1
	ldrsw	x8, [x19]
	ldr	w1, [x19, #16]
	cmp	x21, x8
	b.lt	LBB0_11
LBB0_12:
	ldr	x8, [x19, #8]
	ldrsw	x8, [x8]
	str	x8, [x20]
	add	x0, x19, #20
	mov	w2, #0
	bl	_drm_object_attach_property
	mov	w0, #1
	b	LBB0_14
LBB0_13:
	mov	w0, #0
LBB0_14:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SDVO_CMD_GET_SUPPORTED_TV_FORMATS,4,2 ; @SDVO_CMD_GET_SUPPORTED_TV_FORMATS
	.comm	_tv_format_names,8,3            ; @tv_format_names
	.comm	_DRM_MODE_PROP_ENUM,4,2         ; @DRM_MODE_PROP_ENUM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mode"

	.no_dead_strip	_psb_intel_sdvo_tv_create_property
.subsections_via_symbols
