	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hva_h264_open
_hva_h264_open:                         ## @hva_h264_open
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	callq	_ctx_to_dev
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_ctx_to_hdev
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	24(%r12), %r13
	movq	32(%r12), %rbx
	movq	%r13, %rdi
	callq	_SEARCH_WINDOW_BUFFER_MAX_SIZE
	movq	%rax, %r14
	movq	%r13, %rdi
	callq	_LOCAL_RECONSTRUCTED_BUFFER_MAX_SIZE
	movq	%rax, %r15
	addq	%r14, %r15
	movq	%rbx, %r14
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_max
	movl	%eax, %edi
	callq	_CTX_MB_BUFFER_MAX_SIZE
	movq	%rax, %rbx
	addq	%r15, %rbx
	movq	%r13, %rdi
	callq	_CABAC_CONTEXT_BUFFER_MAX_SIZE
	addq	%rbx, %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	cmpq	%rax, %rcx
	jge	LBB0_2
## %bb.1:
	movl	16(%r12), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, %r8
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_15
LBB0_2:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movl	$16, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %rbx
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_DATA_SIZE
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%rax), %esi
	movq	_SLICE_HEADER_SIZE@GOTPCREL(%rip), %rax
	addl	(%rax), %esi
	movq	_BRC_DATA_SIZE@GOTPCREL(%rip), %rax
	addl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rdi
	movq	%rbx, %rcx
	callq	_hva_mem_alloc
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r14d
	movl	16(%r12), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_14
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_15
LBB0_6:
	imulq	%r14, %r13
	leaq	(,%r13,2), %rax
	addq	%r13, %rax
	movq	%rax, %r15
	shrq	$63, %r15
	addq	%rax, %r15
	shrq	%r15
	leaq	4(%rbx), %r13
	leaq	L_.str.3(%rip), %rdx
	movq	%r12, %rdi
	movl	%r15d, %esi
	movq	%r13, %rcx
	callq	_hva_mem_alloc
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %r14d
	movl	16(%r12), %edx
	leaq	L_.str.4(%rip), %rsi
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_13
LBB0_8:
	leaq	8(%rbx), %rax
	leaq	L_.str.5(%rip), %rdx
	movq	%r12, %rdi
	movl	%r15d, %esi
	movq	%rax, %r15
	movq	%rax, %rcx
	callq	_hva_mem_alloc
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %r14d
	movl	16(%r12), %edx
	leaq	L_.str.6(%rip), %rsi
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_12
LBB0_10:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rcx
	addq	$12, %rcx
	leaq	L_.str.7(%rip), %rdx
	movq	%r12, %rdi
	movl	$4, %esi
	callq	_hva_mem_alloc
	testl	%eax, %eax
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_17
## %bb.11:
	movl	%eax, %r14d
	movl	16(%r12), %edx
	leaq	L_.str.8(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_hva_mem_free
LBB0_12:
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_hva_mem_free
LBB0_13:
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_hva_mem_free
LBB0_14:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_devm_kfree
LBB0_15:
	incl	(%r12)
LBB0_16:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	%rbx, 8(%r12)
	xorl	%r14d, %r14d
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s   not enough esram (max:%d request:%d)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_SLICE_HEADER_SIZE,4,2          ## @SLICE_HEADER_SIZE
	.comm	_BRC_DATA_SIZE,4,2              ## @BRC_DATA_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"hva sequence info"

L_.str.2:                               ## @.str.2
	.asciz	"%s   failed to allocate sequence info buffer\n"

L_.str.3:                               ## @.str.3
	.asciz	"hva reference frame"

L_.str.4:                               ## @.str.4
	.asciz	"%s   failed to allocate reference frame buffer\n"

L_.str.5:                               ## @.str.5
	.asciz	"hva reconstructed frame"

L_.str.6:                               ## @.str.6
	.asciz	"%s   failed to allocate reconstructed frame buffer\n"

L_.str.7:                               ## @.str.7
	.asciz	"hva task descriptor"

L_.str.8:                               ## @.str.8
	.asciz	"%s   failed to allocate task descriptor\n"

	.no_dead_strip	_hva_h264_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hva_h264_open
_hva_h264_open:                         ; @hva_h264_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	bl	_ctx_to_dev
	mov	x20, x0
	mov	x0, x19
	bl	_ctx_to_hdev
	mov	x21, x0
	ldp	x23, x24, [x19, #24]
	mov	x0, x23
	bl	_SEARCH_WINDOW_BUFFER_MAX_SIZE
	mov	x22, x0
	mov	x0, x23
	bl	_LOCAL_RECONSTRUCTED_BUFFER_MAX_SIZE
	add	x22, x0, x22
	mov	x0, x23
	mov	x1, x24
	bl	_max
	bl	_CTX_MB_BUFFER_MAX_SIZE
	add	x22, x22, x0
	mov	x0, x23
	bl	_CABAC_CONTEXT_BUFFER_MAX_SIZE
	ldr	x8, [x21]
	add	x9, x22, x0
	cmp	x8, x9
	b.ge	LBB0_2
; %bb.1:
	ldr	w2, [x19, #16]
	stp	x8, x9, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
LBB0_2:
Lloh4:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #16
	bl	_devm_kzalloc
	cbz	x0, LBB0_5
; %bb.3:
	mov	x21, x0
	mov	x0, x23
	mov	x1, x24
	bl	_DATA_SIZE
Lloh7:
	adrp	x8, _SLICE_HEADER_SIZE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SLICE_HEADER_SIZE@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	add	w8, w8, w0, lsl #1
Lloh10:
	adrp	x9, _BRC_DATA_SIZE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _BRC_DATA_SIZE@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	add	w1, w8, w9
Lloh13:
	adrp	x2, l_.str.1@PAGE
Lloh14:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x3, x21
	bl	_hva_mem_alloc
	cbz	w0, LBB0_7
; %bb.4:
	mov	x22, x0
	ldr	w2, [x19, #16]
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_15
LBB0_5:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_16
LBB0_7:
	mul	x8, x23, x24
	add	x8, x8, x8, lsl #1
	cmp	x8, #0
	cinc	x8, x8, lt
	lsr	x25, x8, #1
	add	x23, x21, #4
Lloh19:
	adrp	x2, l_.str.3@PAGE
Lloh20:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x1, x25
	mov	x3, x23
	bl	_hva_mem_alloc
	cbz	w0, LBB0_9
; %bb.8:
	mov	x22, x0
	ldr	w2, [x19, #16]
Lloh21:
	adrp	x1, l_.str.4@PAGE
Lloh22:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_14
LBB0_9:
	add	x24, x21, #8
Lloh23:
	adrp	x2, l_.str.5@PAGE
Lloh24:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x0, x19
	mov	x1, x25
	mov	x3, x24
	bl	_hva_mem_alloc
	cbz	w0, LBB0_11
; %bb.10:
	mov	x22, x0
	ldr	w2, [x19, #16]
Lloh25:
	adrp	x1, l_.str.6@PAGE
Lloh26:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_13
LBB0_11:
	add	x3, x21, #12
Lloh27:
	adrp	x2, l_.str.7@PAGE
Lloh28:
	add	x2, x2, l_.str.7@PAGEOFF
	mov	x0, x19
	mov	w1, #4
	bl	_hva_mem_alloc
	mov	x22, x0
	cbz	w0, LBB0_18
; %bb.12:
	ldr	w2, [x19, #16]
Lloh29:
	adrp	x1, l_.str.8@PAGE
Lloh30:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	w1, [x24]
	mov	x0, x19
	bl	_hva_mem_free
LBB0_13:
	ldr	w1, [x23]
	mov	x0, x19
	bl	_hva_mem_free
LBB0_14:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_hva_mem_free
LBB0_15:
	mov	x0, x20
	mov	x1, x21
	bl	_devm_kfree
LBB0_16:
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
LBB0_17:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_18:
	str	x21, [x19, #8]
	b	LBB0_17
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s   not enough esram (max:%d request:%d)\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_SLICE_HEADER_SIZE,4,2          ; @SLICE_HEADER_SIZE
	.comm	_BRC_DATA_SIZE,4,2              ; @BRC_DATA_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"hva sequence info"

l_.str.2:                               ; @.str.2
	.asciz	"%s   failed to allocate sequence info buffer\n"

l_.str.3:                               ; @.str.3
	.asciz	"hva reference frame"

l_.str.4:                               ; @.str.4
	.asciz	"%s   failed to allocate reference frame buffer\n"

l_.str.5:                               ; @.str.5
	.asciz	"hva reconstructed frame"

l_.str.6:                               ; @.str.6
	.asciz	"%s   failed to allocate reconstructed frame buffer\n"

l_.str.7:                               ; @.str.7
	.asciz	"hva task descriptor"

l_.str.8:                               ; @.str.8
	.asciz	"%s   failed to allocate task descriptor\n"

	.no_dead_strip	_hva_h264_open
.subsections_via_symbols
