	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function coda_enc_param_change
_coda_enc_param_change:                 ## @coda_enc_param_change
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	56(%rdi), %r14
	cmpl	$0, (%rdi)
	je	LBB0_1
## %bb.2:
	movq	_CODA_PARAM_CHANGE_RC_GOP@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	4(%rbx), %esi
	movq	_CODA_CMD_ENC_PARAM_RC_GOP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_coda_write
	movslq	4(%rbx), %rax
	decq	%rax
	movq	%rax, 48(%rbx)
	movl	$0, (%rbx)
	cmpl	$0, 8(%rbx)
	jne	LBB0_4
	jmp	LBB0_7
LBB0_1:
	xorl	%r15d, %r15d
	cmpl	$0, 8(%rbx)
	je	LBB0_7
LBB0_4:
	movl	12(%rbx), %ecx
	leaq	L_.str(%rip), %rdx
	movl	$1, %edi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_coda_dbg
	cmpl	$0, 16(%rbx)
	je	LBB0_6
## %bb.5:
	movq	_CODA_PARAM_CHANGE_RC_INTRA_QP@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	movl	12(%rbx), %esi
	movq	_CODA_CMD_ENC_PARAM_RC_INTRA_QP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_coda_write
LBB0_6:
	movl	$0, 8(%rbx)
LBB0_7:
	cmpl	$0, 20(%rbx)
	je	LBB0_9
## %bb.8:
	movl	16(%rbx), %ecx
	leaq	L_.str.1(%rip), %rdx
	movl	$1, %edi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_coda_dbg
	movq	_CODA_PARAM_CHANGE_RC_BITRATE@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	movl	16(%rbx), %esi
	movq	_CODA_CMD_ENC_PARAM_RC_BITRATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_coda_write
	movl	$0, 20(%rbx)
LBB0_9:
	cmpl	$0, 24(%rbx)
	je	LBB0_11
## %bb.10:
	movl	28(%rbx), %r8d
	movzwl	%r8w, %ecx
	sarl	$16, %r8d
	incl	%r8d
	leaq	L_.str.2(%rip), %rdx
	movl	$1, %edi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_coda_dbg
	movq	_CODA_PARAM_CHANGE_RC_FRAME_RATE@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	movl	28(%rbx), %esi
	movq	_CODA_CMD_ENC_PARAM_RC_FRAME_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_coda_write
	movl	$0, 24(%rbx)
LBB0_11:
	cmpl	$0, 32(%rbx)
	je	LBB0_13
## %bb.12:
	movl	36(%rbx), %ecx
	leaq	L_.str.3(%rip), %rdx
	movl	$1, %edi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_coda_dbg
	movq	_CODA_PARAM_CHANGE_INTRA_MB_NUM@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	movl	36(%rbx), %esi
	movq	_CODA_CMD_ENC_PARAM_INTRA_MB_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_coda_write
	movl	$0, 32(%rbx)
LBB0_13:
	cmpl	$0, 40(%rbx)
	je	LBB0_15
## %bb.14:
	movq	_CODA_PARAM_CHANGE_SLICE_MODE@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	movq	%rbx, %rdi
	callq	_coda_slice_mode
	movq	_CODA_CMD_ENC_PARAM_SLICE_MODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_coda_write
	movl	$0, 40(%rbx)
LBB0_15:
	xorl	%r12d, %r12d
	testl	%r15d, %r15d
	je	LBB0_20
## %bb.16:
	movq	_CODA_CMD_ENC_PARAM_CHANGE_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_coda_write
	movq	_CODA_COMMAND_RC_CHANGE_PARAMETER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_coda_command_sync
	testl	%eax, %eax
	js	LBB0_17
## %bb.18:
	movq	_CODA_RET_ENC_PARAM_CHANGE_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_coda_read
	cmpl	$1, %eax
	je	LBB0_20
## %bb.19:
	leaq	L_.str.4(%rip), %rdx
	xorl	%r12d, %r12d
	movl	$1, %edi
	movq	%rbx, %rsi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_coda_dbg
	jmp	LBB0_20
LBB0_17:
	movl	%eax, %r12d
LBB0_20:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CODA_PARAM_CHANGE_RC_GOP,4,2   ## @CODA_PARAM_CHANGE_RC_GOP
	.comm	_CODA_CMD_ENC_PARAM_RC_GOP,4,2  ## @CODA_CMD_ENC_PARAM_RC_GOP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"parameter change: intra Qp %u\n"

	.comm	_CODA_PARAM_CHANGE_RC_INTRA_QP,4,2 ## @CODA_PARAM_CHANGE_RC_INTRA_QP
	.comm	_CODA_CMD_ENC_PARAM_RC_INTRA_QP,4,2 ## @CODA_CMD_ENC_PARAM_RC_INTRA_QP
L_.str.1:                               ## @.str.1
	.asciz	"parameter change: bitrate %u kbit/s\n"

	.comm	_CODA_PARAM_CHANGE_RC_BITRATE,4,2 ## @CODA_PARAM_CHANGE_RC_BITRATE
	.comm	_CODA_CMD_ENC_PARAM_RC_BITRATE,4,2 ## @CODA_CMD_ENC_PARAM_RC_BITRATE
L_.str.2:                               ## @.str.2
	.asciz	"parameter change: frame rate %u/%u Hz\n"

	.comm	_CODA_PARAM_CHANGE_RC_FRAME_RATE,4,2 ## @CODA_PARAM_CHANGE_RC_FRAME_RATE
	.comm	_CODA_CMD_ENC_PARAM_RC_FRAME_RATE,4,2 ## @CODA_CMD_ENC_PARAM_RC_FRAME_RATE
L_.str.3:                               ## @.str.3
	.asciz	"parameter change: intra refresh MBs %u\n"

	.comm	_CODA_PARAM_CHANGE_INTRA_MB_NUM,4,2 ## @CODA_PARAM_CHANGE_INTRA_MB_NUM
	.comm	_CODA_CMD_ENC_PARAM_INTRA_MB_NUM,4,2 ## @CODA_CMD_ENC_PARAM_INTRA_MB_NUM
	.comm	_CODA_PARAM_CHANGE_SLICE_MODE,4,2 ## @CODA_PARAM_CHANGE_SLICE_MODE
	.comm	_CODA_CMD_ENC_PARAM_SLICE_MODE,4,2 ## @CODA_CMD_ENC_PARAM_SLICE_MODE
	.comm	_CODA_CMD_ENC_PARAM_CHANGE_ENABLE,4,2 ## @CODA_CMD_ENC_PARAM_CHANGE_ENABLE
	.comm	_CODA_COMMAND_RC_CHANGE_PARAMETER,4,2 ## @CODA_COMMAND_RC_CHANGE_PARAMETER
	.comm	_CODA_RET_ENC_PARAM_CHANGE_SUCCESS,4,2 ## @CODA_RET_ENC_PARAM_CHANGE_SUCCESS
L_.str.4:                               ## @.str.4
	.asciz	"parameter change failed: %u\n"

	.no_dead_strip	_coda_enc_param_change
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function coda_enc_param_change
_coda_enc_param_change:                 ; @coda_enc_param_change
	.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
	ldr	x20, [x0, #56]
	ldr	w8, [x0]
	cbz	w8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _CODA_PARAM_CHANGE_RC_GOP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CODA_PARAM_CHANGE_RC_GOP@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	ldr	w1, [x19, #4]
Lloh3:
	adrp	x8, _CODA_CMD_ENC_PARAM_RC_GOP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CODA_CMD_ENC_PARAM_RC_GOP@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_coda_write
	ldrsw	x8, [x19, #4]
	sub	x8, x8, #1
	str	x8, [x19, #48]
	str	wzr, [x19]
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_3
	b	LBB0_6
LBB0_2:
	mov	w21, #0
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_6
LBB0_3:
	ldr	w3, [x19, #12]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	w0, #1
	mov	x1, x19
	bl	_coda_dbg
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_5
; %bb.4:
Lloh8:
	adrp	x8, _CODA_PARAM_CHANGE_RC_INTRA_QP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CODA_PARAM_CHANGE_RC_INTRA_QP@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	orr	w21, w8, w21
	ldr	w1, [x19, #12]
Lloh11:
	adrp	x8, _CODA_CMD_ENC_PARAM_RC_INTRA_QP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CODA_CMD_ENC_PARAM_RC_INTRA_QP@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_coda_write
LBB0_5:
	str	wzr, [x19, #8]
LBB0_6:
	ldr	w8, [x19, #20]
	cbz	w8, LBB0_8
; %bb.7:
	ldr	w3, [x19, #16]
Lloh14:
	adrp	x2, l_.str.1@PAGE
Lloh15:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	w0, #1
	mov	x1, x19
	bl	_coda_dbg
Lloh16:
	adrp	x8, _CODA_PARAM_CHANGE_RC_BITRATE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CODA_PARAM_CHANGE_RC_BITRATE@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	orr	w21, w8, w21
	ldr	w1, [x19, #16]
Lloh19:
	adrp	x8, _CODA_CMD_ENC_PARAM_RC_BITRATE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _CODA_CMD_ENC_PARAM_RC_BITRATE@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_coda_write
	str	wzr, [x19, #20]
LBB0_8:
	ldr	w8, [x19, #24]
	cbz	w8, LBB0_10
; %bb.9:
	ldr	w8, [x19, #28]
	and	w3, w8, #0xffff
	asr	w8, w8, #16
	add	w8, w8, #1
	str	x8, [sp]
Lloh22:
	adrp	x2, l_.str.2@PAGE
Lloh23:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	w0, #1
	mov	x1, x19
	bl	_coda_dbg
Lloh24:
	adrp	x8, _CODA_PARAM_CHANGE_RC_FRAME_RATE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _CODA_PARAM_CHANGE_RC_FRAME_RATE@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	orr	w21, w8, w21
	ldr	w1, [x19, #28]
Lloh27:
	adrp	x8, _CODA_CMD_ENC_PARAM_RC_FRAME_RATE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _CODA_CMD_ENC_PARAM_RC_FRAME_RATE@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_coda_write
	str	wzr, [x19, #24]
LBB0_10:
	ldr	w8, [x19, #32]
	cbz	w8, LBB0_12
; %bb.11:
	ldr	w3, [x19, #36]
Lloh30:
	adrp	x2, l_.str.3@PAGE
Lloh31:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	w0, #1
	mov	x1, x19
	bl	_coda_dbg
Lloh32:
	adrp	x8, _CODA_PARAM_CHANGE_INTRA_MB_NUM@GOTPAGE
Lloh33:
	ldr	x8, [x8, _CODA_PARAM_CHANGE_INTRA_MB_NUM@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	orr	w21, w8, w21
	ldr	w1, [x19, #36]
Lloh35:
	adrp	x8, _CODA_CMD_ENC_PARAM_INTRA_MB_NUM@GOTPAGE
Lloh36:
	ldr	x8, [x8, _CODA_CMD_ENC_PARAM_INTRA_MB_NUM@GOTPAGEOFF]
Lloh37:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_coda_write
	str	wzr, [x19, #32]
LBB0_12:
	ldr	w8, [x19, #40]
	cbz	w8, LBB0_14
; %bb.13:
Lloh38:
	adrp	x8, _CODA_PARAM_CHANGE_SLICE_MODE@GOTPAGE
Lloh39:
	ldr	x8, [x8, _CODA_PARAM_CHANGE_SLICE_MODE@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	orr	w21, w8, w21
	mov	x0, x19
	bl	_coda_slice_mode
	mov	x1, x0
Lloh41:
	adrp	x8, _CODA_CMD_ENC_PARAM_SLICE_MODE@GOTPAGE
Lloh42:
	ldr	x8, [x8, _CODA_CMD_ENC_PARAM_SLICE_MODE@GOTPAGEOFF]
Lloh43:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_coda_write
	str	wzr, [x19, #40]
LBB0_14:
	cbz	w21, LBB0_18
; %bb.15:
Lloh44:
	adrp	x8, _CODA_CMD_ENC_PARAM_CHANGE_ENABLE@GOTPAGE
Lloh45:
	ldr	x8, [x8, _CODA_CMD_ENC_PARAM_CHANGE_ENABLE@GOTPAGEOFF]
Lloh46:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_coda_write
Lloh47:
	adrp	x8, _CODA_COMMAND_RC_CHANGE_PARAMETER@GOTPAGE
Lloh48:
	ldr	x8, [x8, _CODA_COMMAND_RC_CHANGE_PARAMETER@GOTPAGEOFF]
Lloh49:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_coda_command_sync
	tbnz	w0, #31, LBB0_19
; %bb.16:
Lloh50:
	adrp	x8, _CODA_RET_ENC_PARAM_CHANGE_SUCCESS@GOTPAGE
Lloh51:
	ldr	x8, [x8, _CODA_RET_ENC_PARAM_CHANGE_SUCCESS@GOTPAGEOFF]
Lloh52:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_coda_read
	cmp	w0, #1
	b.eq	LBB0_18
; %bb.17:
	mov	x3, x0
Lloh53:
	adrp	x2, l_.str.4@PAGE
Lloh54:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	w0, #1
	mov	x1, x19
	bl	_coda_dbg
LBB0_18:
	mov	w0, #0
LBB0_19:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpAdd	Lloh53, Lloh54
	.cfi_endproc
                                        ; -- End function
	.comm	_CODA_PARAM_CHANGE_RC_GOP,4,2   ; @CODA_PARAM_CHANGE_RC_GOP
	.comm	_CODA_CMD_ENC_PARAM_RC_GOP,4,2  ; @CODA_CMD_ENC_PARAM_RC_GOP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"parameter change: intra Qp %u\n"

	.comm	_CODA_PARAM_CHANGE_RC_INTRA_QP,4,2 ; @CODA_PARAM_CHANGE_RC_INTRA_QP
	.comm	_CODA_CMD_ENC_PARAM_RC_INTRA_QP,4,2 ; @CODA_CMD_ENC_PARAM_RC_INTRA_QP
l_.str.1:                               ; @.str.1
	.asciz	"parameter change: bitrate %u kbit/s\n"

	.comm	_CODA_PARAM_CHANGE_RC_BITRATE,4,2 ; @CODA_PARAM_CHANGE_RC_BITRATE
	.comm	_CODA_CMD_ENC_PARAM_RC_BITRATE,4,2 ; @CODA_CMD_ENC_PARAM_RC_BITRATE
l_.str.2:                               ; @.str.2
	.asciz	"parameter change: frame rate %u/%u Hz\n"

	.comm	_CODA_PARAM_CHANGE_RC_FRAME_RATE,4,2 ; @CODA_PARAM_CHANGE_RC_FRAME_RATE
	.comm	_CODA_CMD_ENC_PARAM_RC_FRAME_RATE,4,2 ; @CODA_CMD_ENC_PARAM_RC_FRAME_RATE
l_.str.3:                               ; @.str.3
	.asciz	"parameter change: intra refresh MBs %u\n"

	.comm	_CODA_PARAM_CHANGE_INTRA_MB_NUM,4,2 ; @CODA_PARAM_CHANGE_INTRA_MB_NUM
	.comm	_CODA_CMD_ENC_PARAM_INTRA_MB_NUM,4,2 ; @CODA_CMD_ENC_PARAM_INTRA_MB_NUM
	.comm	_CODA_PARAM_CHANGE_SLICE_MODE,4,2 ; @CODA_PARAM_CHANGE_SLICE_MODE
	.comm	_CODA_CMD_ENC_PARAM_SLICE_MODE,4,2 ; @CODA_CMD_ENC_PARAM_SLICE_MODE
	.comm	_CODA_CMD_ENC_PARAM_CHANGE_ENABLE,4,2 ; @CODA_CMD_ENC_PARAM_CHANGE_ENABLE
	.comm	_CODA_COMMAND_RC_CHANGE_PARAMETER,4,2 ; @CODA_COMMAND_RC_CHANGE_PARAMETER
	.comm	_CODA_RET_ENC_PARAM_CHANGE_SUCCESS,4,2 ; @CODA_RET_ENC_PARAM_CHANGE_SUCCESS
l_.str.4:                               ; @.str.4
	.asciz	"parameter change failed: %u\n"

	.no_dead_strip	_coda_enc_param_change
.subsections_via_symbols
