	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function libopenjpeg_guess_pix_fmt
_libopenjpeg_guess_pix_fmt:             ## @libopenjpeg_guess_pix_fmt
	.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, %r14
	movl	(%rdi), %eax
	addl	$-128, %eax
	cmpl	$2, %eax
	ja	LBB0_1
## %bb.2:
	cltq
	leaq	l_switch.table.libopenjpeg_guess_pix_fmt(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_libopenjpeg_all_pix_fmts@GOTPCREL(%rip), %rax
LBB0_3:
	movq	(%rax), %r12
	movq	%r12, %rdi
	callq	_FF_ARRAY_ELEMS
	movq	_AV_PIX_FMT_NONE@GOTPCREL(%rip), %r15
	testl	%eax, %eax
	jle	LBB0_8
## %bb.4:
	movl	%eax, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_libopenjpeg_matches_pix_fmt
	testq	%rax, %rax
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	addq	$4, %r12
	decq	%rbx
	jne	LBB0_5
	jmp	LBB0_8
LBB0_6:
	movq	%r12, %r15
LBB0_8:
	movl	(%r15), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_libopenjpeg_rgb_pix_fmts,8,3   ## @libopenjpeg_rgb_pix_fmts
	.comm	_libopenjpeg_gray_pix_fmts,8,3  ## @libopenjpeg_gray_pix_fmts
	.comm	_libopenjpeg_yuv_pix_fmts,8,3   ## @libopenjpeg_yuv_pix_fmts
	.comm	_libopenjpeg_all_pix_fmts,8,3   ## @libopenjpeg_all_pix_fmts
	.comm	_AV_PIX_FMT_NONE,4,2            ## @AV_PIX_FMT_NONE
	.no_dead_strip	_libopenjpeg_guess_pix_fmt
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.libopenjpeg_guess_pix_fmt
l_switch.table.libopenjpeg_guess_pix_fmt:
	.quad	_libopenjpeg_yuv_pix_fmts
	.quad	_libopenjpeg_rgb_pix_fmts
	.quad	_libopenjpeg_gray_pix_fmts

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function libopenjpeg_guess_pix_fmt
_libopenjpeg_guess_pix_fmt:             ; @libopenjpeg_guess_pix_fmt
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	w8, [x0]
	sub	w8, w8, #128
	cmp	w8, #2
	b.hi	LBB0_2
; %bb.1:
Lloh0:
	adrp	x9, l_switch.table.libopenjpeg_guess_pix_fmt@PAGE
Lloh1:
	add	x9, x9, l_switch.table.libopenjpeg_guess_pix_fmt@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	b	LBB0_3
LBB0_2:
Lloh2:
	adrp	x8, _libopenjpeg_all_pix_fmts@GOTPAGE
Lloh3:
	ldr	x8, [x8, _libopenjpeg_all_pix_fmts@GOTPAGEOFF]
LBB0_3:
	ldr	x20, [x8]
	mov	x0, x20
	bl	_FF_ARRAY_ELEMS
	cmp	w0, #1
	b.lt	LBB0_8
; %bb.4:
	mov	w22, w0
Lloh4:
	adrp	x21, _AV_PIX_FMT_NONE@GOTPAGE
Lloh5:
	ldr	x21, [x21, _AV_PIX_FMT_NONE@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x20]
	mov	x0, x19
	bl	_libopenjpeg_matches_pix_fmt
	cbnz	x0, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x20, x20, #4
	subs	x22, x22, #1
	b.ne	LBB0_5
; %bb.7:
	mov	x20, x21
	b	LBB0_9
LBB0_8:
Lloh6:
	adrp	x20, _AV_PIX_FMT_NONE@GOTPAGE
Lloh7:
	ldr	x20, [x20, _AV_PIX_FMT_NONE@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x20]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_libopenjpeg_rgb_pix_fmts,8,3   ; @libopenjpeg_rgb_pix_fmts
	.comm	_libopenjpeg_gray_pix_fmts,8,3  ; @libopenjpeg_gray_pix_fmts
	.comm	_libopenjpeg_yuv_pix_fmts,8,3   ; @libopenjpeg_yuv_pix_fmts
	.comm	_libopenjpeg_all_pix_fmts,8,3   ; @libopenjpeg_all_pix_fmts
	.comm	_AV_PIX_FMT_NONE,4,2            ; @AV_PIX_FMT_NONE
	.no_dead_strip	_libopenjpeg_guess_pix_fmt
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.libopenjpeg_guess_pix_fmt
l_switch.table.libopenjpeg_guess_pix_fmt:
	.quad	_libopenjpeg_yuv_pix_fmts
	.quad	_libopenjpeg_rgb_pix_fmts
	.quad	_libopenjpeg_gray_pix_fmts

.subsections_via_symbols
