	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function expand_buf
_expand_buf:                            ## @expand_buf
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	%edi, %r15d
	addl	$-8, %r15d
	movq	_AV_PIX_FMT_YUV420P16BE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%rsi), %edx
	movl	12(%rsi), %esi
	callq	_hb_frame_buffer_init
	movq	(%r14), %r11
	movq	(%rax), %r8
	movl	(%r11), %r10d
	testl	%r10d, %r10d
	jle	LBB0_7
## %bb.1:
	movq	16(%r8), %rdi
	movq	16(%r11), %rsi
	movl	4(%r11), %ecx
	xorl	%r9d, %r9d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movslq	8(%r11), %rdx
	leaq	(%rsi,%rdx,8), %rsi
	movl	8(%r8), %edx
	movl	%edx, %ebx
	shrl	$31, %ebx
	addl	%edx, %ebx
	sarl	%ebx
	movslq	%ebx, %rdx
	leaq	(%rdi,%rdx,4), %rdi
	incl	%r9d
	cmpl	%r10d, %r9d
	jge	LBB0_7
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	testl	%ecx, %ecx
	jle	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rsi,%rbx,8), %edx
	movl	%r15d, %ecx
	shll	%cl, %edx
	movl	%edx, (%rdi,%rbx,4)
	incq	%rbx
	movslq	4(%r11), %rcx
	cmpq	%rcx, %rbx
	jl	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r11), %r10d
	jmp	LBB0_6
LBB0_7:
	movl	24(%r11), %r10d
	testl	%r10d, %r10d
	jle	LBB0_14
## %bb.8:
	movq	40(%r8), %rdi
	movq	40(%r11), %rsi
	movl	28(%r11), %ecx
	xorl	%r9d, %r9d
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_9 Depth=1
	movslq	32(%r11), %rdx
	leaq	(%rsi,%rdx,8), %rsi
	movl	32(%r8), %edx
	movl	%edx, %ebx
	shrl	$31, %ebx
	addl	%edx, %ebx
	sarl	%ebx
	movslq	%ebx, %rdx
	leaq	(%rdi,%rdx,4), %rdi
	incl	%r9d
	cmpl	%r10d, %r9d
	jge	LBB0_14
LBB0_9:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
	testl	%ecx, %ecx
	jle	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_9 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rsi,%rbx,8), %edx
	movl	%r15d, %ecx
	shll	%cl, %edx
	movl	%edx, (%rdi,%rbx,4)
	incq	%rbx
	movslq	28(%r11), %rcx
	cmpq	%rcx, %rbx
	jl	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	24(%r11), %r10d
	jmp	LBB0_13
LBB0_14:
	movl	48(%r11), %r10d
	testl	%r10d, %r10d
	jle	LBB0_21
## %bb.15:
	movq	64(%r8), %rdi
	movq	64(%r11), %rsi
	movl	52(%r11), %ecx
	xorl	%r9d, %r9d
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_16 Depth=1
	movslq	56(%r11), %rdx
	leaq	(%rsi,%rdx,8), %rsi
	movl	56(%r8), %edx
	movl	%edx, %ebx
	shrl	$31, %ebx
	addl	%edx, %ebx
	sarl	%ebx
	movslq	%ebx, %rdx
	leaq	(%rdi,%rdx,4), %rdi
	incl	%r9d
	cmpl	%r10d, %r9d
	jge	LBB0_21
LBB0_16:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_18 Depth 2
	testl	%ecx, %ecx
	jle	LBB0_20
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_18:                                ##   Parent Loop BB0_16 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rsi,%rbx,8), %edx
	movl	%r15d, %ecx
	shll	%cl, %edx
	movl	%edx, (%rdi,%rbx,4)
	incq	%rbx
	movslq	52(%r11), %rcx
	cmpq	%rcx, %rbx
	jl	LBB0_18
## %bb.19:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	48(%r11), %r10d
	jmp	LBB0_20
LBB0_21:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_PIX_FMT_YUV420P16BE,4,2     ## @AV_PIX_FMT_YUV420P16BE
	.no_dead_strip	_expand_buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function expand_buf
_expand_buf:                            ; @expand_buf
	.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, x1
	sub	w20, w0, #8
Lloh0:
	adrp	x8, _AV_PIX_FMT_YUV420P16BE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_PIX_FMT_YUV420P16BE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w1, [x1, #12]
	ldr	w2, [x19, #8]
	bl	_hb_frame_buffer_init
	ldr	x8, [x19]
	ldr	x9, [x0]
	ldr	w13, [x8]
	cmp	w13, #1
	b.lt	LBB0_7
; %bb.1:
	mov	w10, #0
	ldr	x11, [x9, #16]
	ldr	x12, [x8, #16]
	ldr	w14, [x8, #4]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldrsw	x15, [x8, #8]
	add	x12, x12, x15, lsl #3
	ldr	w15, [x9, #8]
	cmp	w15, #0
	cinc	w15, w15, lt
	asr	w15, w15, #1
	add	x11, x11, w15, sxtw #2
	add	w10, w10, #1
	cmp	w10, w13
	b.ge	LBB0_7
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	cmp	w14, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x13, #0
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x14, [x12, x13, lsl #3]
	lsl	w14, w14, w20
	str	w14, [x11, x13, lsl #2]
	add	x13, x13, #1
	ldrsw	x14, [x8, #4]
	cmp	x13, x14
	b.lt	LBB0_5
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w13, [x8]
	b	LBB0_2
LBB0_7:
	ldr	w13, [x8, #24]
	cmp	w13, #1
	b.lt	LBB0_14
; %bb.8:
	mov	w10, #0
	ldr	x11, [x9, #40]
	ldr	x12, [x8, #40]
	ldr	w14, [x8, #28]
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	ldrsw	x15, [x8, #32]
	add	x12, x12, x15, lsl #3
	ldr	w15, [x9, #32]
	cmp	w15, #0
	cinc	w15, w15, lt
	asr	w15, w15, #1
	add	x11, x11, w15, sxtw #2
	add	w10, w10, #1
	cmp	w10, w13
	b.ge	LBB0_14
LBB0_10:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
	cmp	w14, #1
	b.lt	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x13, #0
LBB0_12:                                ;   Parent Loop BB0_10 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x14, [x12, x13, lsl #3]
	lsl	w14, w14, w20
	str	w14, [x11, x13, lsl #2]
	add	x13, x13, #1
	ldrsw	x14, [x8, #28]
	cmp	x13, x14
	b.lt	LBB0_12
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w13, [x8, #24]
	b	LBB0_9
LBB0_14:
	ldr	w13, [x8, #48]
	cmp	w13, #1
	b.lt	LBB0_21
; %bb.15:
	mov	w10, #0
	ldr	x11, [x9, #64]
	ldr	x12, [x8, #64]
	ldr	w14, [x8, #52]
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=1
	ldrsw	x15, [x8, #56]
	add	x12, x12, x15, lsl #3
	ldr	w15, [x9, #56]
	cmp	w15, #0
	cinc	w15, w15, lt
	asr	w15, w15, #1
	add	x11, x11, w15, sxtw #2
	add	w10, w10, #1
	cmp	w10, w13
	b.ge	LBB0_21
LBB0_17:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_19 Depth 2
	cmp	w14, #1
	b.lt	LBB0_16
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	mov	x13, #0
LBB0_19:                                ;   Parent Loop BB0_17 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x14, [x12, x13, lsl #3]
	lsl	w14, w14, w20
	str	w14, [x11, x13, lsl #2]
	add	x13, x13, #1
	ldrsw	x14, [x8, #52]
	cmp	x13, x14
	b.lt	LBB0_19
; %bb.20:                               ;   in Loop: Header=BB0_17 Depth=1
	ldr	w13, [x8, #48]
	b	LBB0_16
LBB0_21:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_PIX_FMT_YUV420P16BE,4,2     ; @AV_PIX_FMT_YUV420P16BE
	.no_dead_strip	_expand_buf
.subsections_via_symbols
