	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function venus_enumerate_codecs
_venus_enumerate_codecs:                ## @venus_enumerate_codecs
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$0, -48(%rbp)
	movq	16(%rdi), %rax
	movq	(%rax), %rax
	movq	_HFI_VERSION_1XX@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.1:
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.2:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_mutex_init
	movq	%rbx, 16(%r14)
	movq	%r12, 8(%r14)
	movq	_VIDC_SESSION_TYPE_DEC@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	cmpq	%r12, (%rax)
	setne	%cl
	movq	(%rbx,%rcx,8), %r12
	leaq	-48(%rbp), %rsi
	movq	%r14, %rdi
	callq	_hfi_session_create
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_15
## %bb.3:
	movq	_MAX_CODEC_NUM@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	testl	%eax, %eax
	je	LBB0_11
## %bb.4:
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=1
	incq	%rbx
	movl	%eax, %ecx
	cmpq	%rcx, %rbx
	jae	LBB0_11
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	movl	%ebx, %ecx
	shlq	%cl, %rdi
	andq	%r12, %rdi
	je	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	callq	_to_v4l2_codec_type
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_hfi_session_init
	testl	%eax, %eax
	jne	LBB0_13
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r14, %rdi
	callq	_hfi_session_deinit
	testl	%eax, %eax
	jne	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	(%r13), %eax
	jmp	LBB0_5
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_16
LBB0_11:
	xorl	%r15d, %r15d
	jmp	LBB0_14
LBB0_13:
	movl	%eax, %r15d
LBB0_14:
	movq	%r14, %rdi
	callq	_hfi_session_destroy
LBB0_15:
	movq	%r14, %rdi
	callq	_mutex_destroy
	movq	%r14, %rdi
	callq	_kfree
LBB0_16:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HFI_VERSION_1XX,8,3            ## @HFI_VERSION_1XX
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_VIDC_SESSION_TYPE_DEC,8,3      ## @VIDC_SESSION_TYPE_DEC
	.comm	_MAX_CODEC_NUM,4,2              ## @MAX_CODEC_NUM
	.no_dead_strip	_venus_enumerate_codecs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function venus_enumerate_codecs
_venus_enumerate_codecs:                ; @venus_enumerate_codecs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	w20, #0
	str	wzr, [sp, #8]
	ldr	x8, [x0, #16]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _HFI_VERSION_1XX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HFI_VERSION_1XX@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.1:
	mov	x22, x1
	mov	x21, x0
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_10
; %bb.2:
	mov	x19, x0
	bl	_mutex_init
Lloh6:
	adrp	x8, _VIDC_SESSION_TYPE_DEC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VIDC_SESSION_TYPE_DEC@GOTPAGEOFF]
	stp	x22, x21, [x19, #8]
Lloh8:
	ldr	x8, [x8]
	cmp	x8, x22
	cset	w8, ne
	ldr	x21, [x21, w8, uxtw #3]
	add	x1, sp, #8
	mov	x0, x19
	bl	_hfi_session_create
	mov	x20, x0
	cbnz	w0, LBB0_14
; %bb.3:
Lloh9:
	adrp	x22, _MAX_CODEC_NUM@GOTPAGE
Lloh10:
	ldr	x22, [x22, _MAX_CODEC_NUM@GOTPAGEOFF]
	ldr	w8, [x22]
	cbz	w8, LBB0_11
; %bb.4:
	mov	x23, #0
	mov	w24, #1
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x23, x23, #1
	cmp	x23, w8, uxtw
	b.hs	LBB0_11
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x9, x24, x23
	ands	x0, x9, x21
	b.eq	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	bl	_to_v4l2_codec_type
	mov	x1, x0
	mov	x0, x19
	bl	_hfi_session_init
	cbnz	w0, LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	bl	_hfi_session_deinit
	cbnz	w0, LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x22]
	b	LBB0_5
LBB0_10:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_15
LBB0_11:
	mov	w20, #0
	b	LBB0_13
LBB0_12:
	mov	x20, x0
LBB0_13:
	mov	x0, x19
	bl	_hfi_session_destroy
LBB0_14:
	mov	x0, x19
	bl	_mutex_destroy
	mov	x0, x19
	bl	_kfree
LBB0_15:
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_HFI_VERSION_1XX,8,3            ; @HFI_VERSION_1XX
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_VIDC_SESSION_TYPE_DEC,8,3      ; @VIDC_SESSION_TYPE_DEC
	.comm	_MAX_CODEC_NUM,4,2              ; @MAX_CODEC_NUM
	.no_dead_strip	_venus_enumerate_codecs
.subsections_via_symbols
