	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_change_encoder_mode            ## -- Begin function change_encoder_mode
	.p2align	4, 0x90
_change_encoder_mode:                   ## @change_encoder_mode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	%edi, %ebx
	xorl	%eax, %eax
	callq	_pre_encoder_mode_change
	movq	_enabled_encoder_modes@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jne	LBB0_2
## %bb.1:
	movl	$31, (%rax)
	movl	$31, %ecx
LBB0_2:
	movq	_encoder_mode@GOTPCREL(%rip), %rsi
	movl	(%rsi), %eax
	movq	__NUM_ENCODER_MODES@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	incl	%eax
	cltd
	idivl	%edi
	movl	%edx, %eax
	btl	%eax, %ecx
	jb	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	testl	%eax, %eax
	cmovel	%edi, %eax
	decl	%eax
	btl	%eax, %ecx
	jae	LBB0_3
LBB0_7:
	movl	%eax, (%rsi)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_post_encoder_mode_change       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_enabled_encoder_modes,4,2      ## @enabled_encoder_modes
	.comm	_encoder_mode,4,2               ## @encoder_mode
	.comm	__NUM_ENCODER_MODES,4,2         ## @_NUM_ENCODER_MODES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_change_encoder_mode            ; -- Begin function change_encoder_mode
	.p2align	2
_change_encoder_mode:                   ; @change_encoder_mode
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_pre_encoder_mode_change
Lloh0:
	adrp	x9, _enabled_encoder_modes@GOTPAGE
Lloh1:
	ldr	x9, [x9, _enabled_encoder_modes@GOTPAGEOFF]
	ldr	w8, [x9]
	cbnz	w8, LBB0_2
; %bb.1:
	mov	w8, #31
	str	w8, [x9]
LBB0_2:
Lloh2:
	adrp	x9, _encoder_mode@GOTPAGE
Lloh3:
	ldr	x9, [x9, _encoder_mode@GOTPAGEOFF]
	ldr	w10, [x9]
Lloh4:
	adrp	x11, __NUM_ENCODER_MODES@GOTPAGE
Lloh5:
	ldr	x11, [x11, __NUM_ENCODER_MODES@GOTPAGEOFF]
Lloh6:
	ldr	w11, [x11]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w10, w10, #1
	sdiv	w12, w10, w11
	msub	w10, w12, w11, w10
	lsr	w12, w8, w10
	tbnz	w12, #0, LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cbz	w19, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w10, #0
	csel	w10, w11, w10, eq
	sub	w10, w10, #1
	lsr	w12, w8, w10
	tbz	w12, #0, LBB0_4
LBB0_6:
	str	w10, [x9]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_post_encoder_mode_change
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_enabled_encoder_modes,4,2      ; @enabled_encoder_modes
	.comm	_encoder_mode,4,2               ; @encoder_mode
	.comm	__NUM_ENCODER_MODES,4,2         ; @_NUM_ENCODER_MODES
.subsections_via_symbols
