	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv17_tv_create_resources
_nv17_tv_create_resources:              ## @nv17_tv_create_resources
	.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, %r14
	movq	%rdi, %rbx
	movq	(%rdi), %r12
	movq	%r12, %rdi
	callq	_nouveau_drm
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_to_tv_enc
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_nouveau_encoder
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	jne	LBB0_1
## %bb.2:
	movq	_NUM_LD_TV_NORMS@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_NUM_TV_NORMS@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_nouveau_tv_norm@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_11
## %bb.4:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_5
## %bb.6:
	movq	_nv17_tv_norm_names@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_7
## %bb.12:
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	decq	%r13
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%rbx, %r13
	je	LBB0_10
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	_nouveau_tv_norm@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_nv17_tv_norm_names@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	4(%rax,%rbx,4), %edi
	callq	_strcmp
	incq	%rbx
	testl	%eax, %eax
	jne	LBB0_13
	jmp	LBB0_8
LBB0_5:
	xorl	%ebx, %ebx
	cmpl	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	je	LBB0_10
	jmp	LBB0_11
LBB0_7:
	xorl	%ebx, %ebx
LBB0_8:
	movl	%ebx, (%r15)
	cmpl	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	jne	LBB0_11
LBB0_10:
	movq	_nouveau_tv_norm@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	leaq	L_.str(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_NV_WARN
LBB0_11:
	movq	_nv17_tv_norm_names@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r12, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_drm_mode_create_tv_properties
	movl	24(%r12), %esi
	movl	4(%r15), %edx
	movq	%r14, %rdi
	callq	_drm_object_attach_property
	movl	20(%r12), %esi
	movl	8(%r15), %edx
	movq	%r14, %rdi
	callq	_drm_object_attach_property
	movl	16(%r12), %esi
	movl	(%r15), %edx
	movq	%r14, %rdi
	callq	_drm_object_attach_property
	movl	12(%r12), %esi
	movl	12(%r15), %edx
	movq	%r14, %rdi
	callq	_drm_object_attach_property
	movl	8(%r12), %esi
	movl	16(%r15), %edx
	movq	%r14, %rdi
	callq	_drm_object_attach_property
	movl	4(%r12), %esi
	movl	20(%r15), %edx
	movq	%r14, %rdi
	callq	_drm_object_attach_property
	movl	(%r12), %esi
	movl	24(%r15), %edx
	movq	%r14, %rdi
	callq	_drm_object_attach_property
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NUM_TV_NORMS,4,2               ## @NUM_TV_NORMS
	.comm	_NUM_LD_TV_NORMS,4,2            ## @NUM_LD_TV_NORMS
	.comm	_nouveau_tv_norm,8,3            ## @nouveau_tv_norm
	.comm	_nv17_tv_norm_names,8,3         ## @nv17_tv_norm_names
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid TV norm setting \"%s\"\n"

	.no_dead_strip	_nv17_tv_create_resources
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nv17_tv_create_resources
_nv17_tv_create_resources:              ; @nv17_tv_create_resources
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x23, x0
	ldr	x20, [x0]
	mov	x0, x20
	bl	_nouveau_drm
	mov	x22, x0
	mov	x0, x23
	bl	_to_tv_enc
	mov	x21, x0
	mov	x0, x23
	bl	_nouveau_encoder
	ldr	x8, [x0]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _NUM_TV_NORMS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NUM_TV_NORMS@GOTPAGEOFF]
Lloh2:
	adrp	x10, _NUM_LD_TV_NORMS@GOTPAGE
Lloh3:
	ldr	x10, [x10, _NUM_LD_TV_NORMS@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x10, x9, eq
	ldr	w23, [x8]
Lloh4:
	adrp	x25, _nouveau_tv_norm@GOTPAGE
Lloh5:
	ldr	x25, [x25, _nouveau_tv_norm@GOTPAGEOFF]
	ldr	x1, [x25]
Lloh6:
	adrp	x24, _nv17_tv_norm_names@GOTPAGE
Lloh7:
	ldr	x24, [x24, _nv17_tv_norm_names@GOTPAGEOFF]
	cbz	x1, LBB0_11
; %bb.1:
	cmp	w23, #1
	b.lt	LBB0_7
; %bb.2:
	ldr	x8, [x24]
	ldr	w0, [x8]
	bl	_strcmp
	cbz	w0, LBB0_8
; %bb.3:
	mov	w26, #1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x23, x26
	b.eq	LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x1, [x25]
	ldr	x8, [x24]
	ldr	w0, [x8, x26, lsl #2]
	bl	_strcmp
	add	x26, x26, #1
	cbnz	w0, LBB0_4
; %bb.6:
	sub	w8, w26, #1
	b	LBB0_9
LBB0_7:
	mov	w8, #0
	cmp	w8, w23
	b.eq	LBB0_10
	b	LBB0_11
LBB0_8:
	mov	w8, #0
LBB0_9:
	str	w8, [x21]
	cmp	w8, w23
	b.ne	LBB0_11
LBB0_10:
	ldr	x2, [x25]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_NV_WARN
LBB0_11:
	ldr	x2, [x24]
	mov	x0, x20
	mov	x1, x23
	bl	_drm_mode_create_tv_properties
	ldr	w1, [x20, #24]
	ldr	w2, [x21, #4]
	mov	x0, x19
	bl	_drm_object_attach_property
	ldr	w1, [x20, #20]
	ldr	w2, [x21, #8]
	mov	x0, x19
	bl	_drm_object_attach_property
	ldr	w1, [x20, #16]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_drm_object_attach_property
	ldr	w1, [x20, #12]
	ldr	w2, [x21, #12]
	mov	x0, x19
	bl	_drm_object_attach_property
	ldr	w1, [x20, #8]
	ldr	w2, [x21, #16]
	mov	x0, x19
	bl	_drm_object_attach_property
	ldr	w1, [x20, #4]
	ldr	w2, [x21, #20]
	mov	x0, x19
	bl	_drm_object_attach_property
	ldr	w1, [x20]
	ldr	w2, [x21, #24]
	mov	x0, x19
	bl	_drm_object_attach_property
	mov	w0, #0
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_NUM_TV_NORMS,4,2               ; @NUM_TV_NORMS
	.comm	_NUM_LD_TV_NORMS,4,2            ; @NUM_LD_TV_NORMS
	.comm	_nouveau_tv_norm,8,3            ; @nouveau_tv_norm
	.comm	_nv17_tv_norm_names,8,3         ; @nv17_tv_norm_names
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid TV norm setting \"%s\"\n"

	.no_dead_strip	_nv17_tv_create_resources
.subsections_via_symbols
