	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function reconfig_encoder
_reconfig_encoder:                      ## @reconfig_encoder
	.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	$64, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	24(%rdi), %rbx
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movaps	%xmm0, -80(%rbp)
	movq	_NV_ENC_RECONFIGURE_PARAMS_VER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movups	32(%rbx), %xmm0
	movups	%xmm0, -72(%rbp)
	leaq	-40(%rbp), %rsi
	leaq	-36(%rbp), %rdx
	callq	_compute_dar
	movl	-40(%rbp), %r9d
	movl	32(%rbx), %ecx
	cmpl	%ecx, %r9d
	jne	LBB0_1
## %bb.2:
	movl	-36(%rbp), %eax
	movl	36(%rbx), %r8d
	movb	$1, %r15b
	cmpl	%r8d, %eax
	jne	LBB0_3
	jmp	LBB0_4
LBB0_1:
	movl	36(%rbx), %r8d
	movl	-36(%rbp), %eax
LBB0_3:
	movq	_AV_LOG_VERBOSE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	movl	%eax, (%rsp)
	leaq	L_.str(%rip), %rdx
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movl	-36(%rbp), %eax
	movl	%eax, -68(%rbp)
	movl	-40(%rbp), %eax
	movl	%eax, -72(%rbp)
LBB0_4:
	movq	(%rbx), %rax
	movq	_NV_ENC_PARAMS_RC_CONSTQP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_17
## %bb.5:
	cmpq	$0, 56(%rbx)
	je	LBB0_17
## %bb.6:
	movq	16(%r14), %r8
	xorl	%eax, %eax
	testq	%r8, %r8
	jle	LBB0_9
## %bb.7:
	movq	-64(%rbp), %r12
	movq	16(%r12), %rcx
	cmpq	%r8, %rcx
	je	LBB0_9
## %bb.8:
	movq	_AV_LOG_VERBOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
                                        ## kill: def $ecx killed $ecx killed $rcx
                                        ## kill: def $r8d killed $r8d killed $r8
	xorl	%eax, %eax
	callq	_av_log
	movq	16(%r14), %rax
	movq	%rax, 16(%r12)
	movl	$1, %eax
LBB0_9:
	movq	8(%r14), %r8
	testq	%r8, %r8
	jle	LBB0_12
## %bb.10:
	cmpq	%r8, 16(%rbx)
	je	LBB0_12
## %bb.11:
	movq	_AV_LOG_VERBOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-64(%rbp), %r12
	movl	8(%r12), %ecx
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rdi
                                        ## kill: def $r8d killed $r8d killed $r8
	xorl	%eax, %eax
	callq	_av_log
	movq	8(%r14), %rax
	movq	%rax, 8(%r12)
	movl	$1, %eax
LBB0_12:
	movq	(%r14), %r8
	testq	%r8, %r8
	jle	LBB0_15
## %bb.13:
	cmpq	%r8, 8(%rbx)
	jne	LBB0_14
LBB0_15:
	testl	%eax, %eax
	jne	LBB0_16
LBB0_17:
	movq	$0, -64(%rbp)
	movb	$1, %r12b
	testb	%r15b, %r15b
	je	LBB0_18
	jmp	LBB0_24
LBB0_14:
	movq	_AV_LOG_VERBOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-64(%rbp), %r12
	movl	(%r12), %ecx
	leaq	L_.str.3(%rip), %rdx
	movq	%r14, %rdi
                                        ## kill: def $r8d killed $r8d killed $r8
	xorl	%eax, %eax
	callq	_av_log
	movq	(%r14), %rax
	movq	%rax, (%r12)
LBB0_16:
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, -80(%rbp)
	xorl	%r12d, %r12d
LBB0_18:
	movl	48(%rbx), %edi
	leaq	-80(%rbp), %rsi
	callq	*64(%rbx)
	movq	_NV_ENC_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_19
## %bb.20:
	testb	%r15b, %r15b
	jne	LBB0_22
## %bb.21:
	movl	-36(%rbp), %eax
	movl	%eax, 36(%rbx)
	movl	-40(%rbp), %eax
	movl	%eax, 32(%rbx)
LBB0_22:
	testb	%r12b, %r12b
	jne	LBB0_24
## %bb.23:
	movq	-64(%rbp), %rax
	movq	16(%rax), %rcx
	movq	%rcx, 24(%rbx)
	movups	(%rax), %xmm0
	movups	%xmm0, 8(%rbx)
	jmp	LBB0_24
LBB0_19:
	leaq	L_.str.4(%rip), %rdx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_nvenc_print_error
LBB0_24:
	addq	$64, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NV_ENC_RECONFIGURE_PARAMS_VER,4,2 ## @NV_ENC_RECONFIGURE_PARAMS_VER
	.comm	_AV_LOG_VERBOSE,4,2             ## @AV_LOG_VERBOSE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"aspect ratio change (DAR): %d:%d -> %d:%d\n"

	.comm	_NV_ENC_PARAMS_RC_CONSTQP,8,3   ## @NV_ENC_PARAMS_RC_CONSTQP
L_.str.1:                               ## @.str.1
	.asciz	"avg bitrate change: %d -> %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"max bitrate change: %d -> %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"vbv buffer size change: %d -> %d\n"

	.comm	_NV_ENC_SUCCESS,8,3             ## @NV_ENC_SUCCESS
L_.str.4:                               ## @.str.4
	.asciz	"failed to reconfigure nvenc"

	.no_dead_strip	_reconfig_encoder
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function reconfig_encoder
_reconfig_encoder:                      ; @reconfig_encoder
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	ldr	x20, [x0, #24]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #32]
Lloh0:
	adrp	x8, _NV_ENC_RECONFIGURE_PARAMS_VER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NV_ENC_RECONFIGURE_PARAMS_VER@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #56]
	ldr	q0, [x20, #32]
	stur	q0, [sp, #40]
	add	x1, sp, #28
	add	x2, sp, #24
	bl	_compute_dar
	ldr	w8, [sp, #28]
	ldr	w3, [x20, #32]
	cmp	w8, w3
	b.ne	LBB0_3
; %bb.1:
	ldr	w9, [sp, #24]
	ldr	w4, [x20, #36]
	cmp	w9, w4
	b.ne	LBB0_4
; %bb.2:
	mov	w21, #1
	b	LBB0_5
LBB0_3:
	ldr	w4, [x20, #36]
	ldr	w9, [sp, #24]
LBB0_4:
Lloh3:
	adrp	x10, _AV_LOG_VERBOSE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _AV_LOG_VERBOSE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x10]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	stp	x8, x9, [sp]
	mov	x0, x19
	bl	_av_log
	mov	w21, #0
	ldp	w8, w9, [sp, #24]
	stp	w9, w8, [sp, #40]
LBB0_5:
	ldr	x8, [x20]
Lloh8:
	adrp	x9, _NV_ENC_PARAMS_RC_CONSTQP@GOTPAGE
Lloh9:
	ldr	x9, [x9, _NV_ENC_PARAMS_RC_CONSTQP@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_17
; %bb.6:
	ldr	x8, [x20, #56]
	cbz	x8, LBB0_17
; %bb.7:
	ldr	x4, [x19, #16]
	cmp	x4, #1
	b.lt	LBB0_9
; %bb.8:
	ldr	x22, [sp, #48]
	ldr	x3, [x22, #16]
	cmp	x3, x4
	b.ne	LBB0_10
LBB0_9:
	mov	w8, #0
	b	LBB0_11
LBB0_10:
Lloh11:
	adrp	x8, _AV_LOG_VERBOSE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AV_LOG_VERBOSE@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x2, l_.str.1@PAGE
Lloh15:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
                                        ; kill: def $w3 killed $w3 killed $x3
                                        ; kill: def $w4 killed $w4 killed $x4
	bl	_av_log
	ldr	x8, [x19, #16]
	str	x8, [x22, #16]
	mov	w8, #1
LBB0_11:
	ldr	x4, [x19, #8]
	cmp	x4, #1
	b.lt	LBB0_14
; %bb.12:
	ldr	x9, [x20, #16]
	cmp	x9, x4
	b.eq	LBB0_14
; %bb.13:
Lloh16:
	adrp	x8, _AV_LOG_VERBOSE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AV_LOG_VERBOSE@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	ldr	x22, [sp, #48]
	ldr	w3, [x22, #8]
Lloh19:
	adrp	x2, l_.str.2@PAGE
Lloh20:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
                                        ; kill: def $w4 killed $w4 killed $x4
	bl	_av_log
	ldr	x8, [x19, #8]
	str	x8, [x22, #8]
	mov	w8, #1
LBB0_14:
	ldr	x4, [x19]
	cmp	x4, #1
	b.lt	LBB0_16
; %bb.15:
	ldr	x9, [x20, #8]
	cmp	x9, x4
	b.ne	LBB0_19
LBB0_16:
	cbnz	w8, LBB0_20
LBB0_17:
	str	xzr, [sp, #48]
	tbnz	w21, #0, LBB0_27
; %bb.18:
	mov	w22, #1
	b	LBB0_21
LBB0_19:
Lloh21:
	adrp	x8, _AV_LOG_VERBOSE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AV_LOG_VERBOSE@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	ldr	x22, [sp, #48]
	ldr	w3, [x22]
Lloh24:
	adrp	x2, l_.str.3@PAGE
Lloh25:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
                                        ; kill: def $w4 killed $w4 killed $x4
	bl	_av_log
	ldr	x8, [x19]
	str	x8, [x22]
LBB0_20:
	mov	w22, #0
	movi.2s	v0, #1
	str	d0, [sp, #32]
LBB0_21:
	ldr	x8, [x20, #64]
	ldr	w0, [x20, #48]
	add	x1, sp, #32
	blr	x8
Lloh26:
	adrp	x8, _NV_ENC_SUCCESS@GOTPAGE
Lloh27:
	ldr	x8, [x8, _NV_ENC_SUCCESS@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_26
; %bb.22:
	tbnz	w21, #0, LBB0_24
; %bb.23:
	ldp	w8, w9, [sp, #24]
	stp	w9, w8, [x20, #32]
LBB0_24:
	tbnz	w22, #0, LBB0_27
; %bb.25:
	ldr	x8, [sp, #48]
	ldr	x9, [x8, #16]
	str	x9, [x20, #24]
	ldr	q0, [x8]
	stur	q0, [x20, #8]
	b	LBB0_27
LBB0_26:
	mov	x1, x0
Lloh29:
	adrp	x2, l_.str.4@PAGE
Lloh30:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_nvenc_print_error
LBB0_27:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_NV_ENC_RECONFIGURE_PARAMS_VER,4,2 ; @NV_ENC_RECONFIGURE_PARAMS_VER
	.comm	_AV_LOG_VERBOSE,4,2             ; @AV_LOG_VERBOSE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"aspect ratio change (DAR): %d:%d -> %d:%d\n"

	.comm	_NV_ENC_PARAMS_RC_CONSTQP,8,3   ; @NV_ENC_PARAMS_RC_CONSTQP
l_.str.1:                               ; @.str.1
	.asciz	"avg bitrate change: %d -> %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"max bitrate change: %d -> %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"vbv buffer size change: %d -> %d\n"

	.comm	_NV_ENC_SUCCESS,8,3             ; @NV_ENC_SUCCESS
l_.str.4:                               ; @.str.4
	.asciz	"failed to reconfigure nvenc"

	.no_dead_strip	_reconfig_encoder
.subsections_via_symbols
