	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hb_avframe_to_video_buffer     ## -- Begin function hb_avframe_to_video_buffer
	.p2align	4, 0x90
_hb_avframe_to_video_buffer:            ## @hb_avframe_to_video_buffer
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rax
	movl	24(%rdi), %edi
	movl	16(%rax), %edx
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	20(%rax), %esi
	callq	_hb_frame_buffer_init
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	%rbx, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%r14d, %edx
	callq	_hb_avframe_set_video_buffer_flags
	cmpl	$0, 8(%rbx)
	js	LBB0_9
## %bb.2:
	xorl	%ecx, %ecx
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	leaq	1(%rdx), %rax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movslq	8(%rbx), %rcx
	cmpq	%rcx, %rdx
	movq	%rax, %rcx
	jge	LBB0_9
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	movq	(%rbx), %rax
	movq	%rcx, %r14
	shlq	$4, %r14
	movl	(%rax,%r14), %ebx
	movl	4(%rax,%r14), %r15d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movslq	(%rax,%rcx,4), %r13
	movl	%ebx, %r12d
	cmpl	%ebx, %r13d
	jge	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r13d, %edi
	callq	_ABS
	movl	%eax, %r12d
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	testl	%r15d, %r15d
	jle	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movslq	%ebx, %rsi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rax,%rcx,8), %rbx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	8(%rax,%r14), %r14
	shlq	$2, %r13
	shlq	$2, %rsi
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%r12d, %edx
	callq	_memcpy
	addq	%r13, %rbx
	addq	-72(%rbp), %r14                 ## 8-byte Folded Reload
	decl	%r15d
	jne	LBB0_7
	jmp	LBB0_8
LBB0_9:
	movq	%rbx, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hb_avframe_to_video_buffer     ; -- Begin function hb_avframe_to_video_buffer
	.p2align	2
_hb_avframe_to_video_buffer:            ; @hb_avframe_to_video_buffer
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
	mov	x19, x0
	ldr	w0, [x0, #24]
	ldp	w2, w1, [x19, #16]
	bl	_hb_frame_buffer_init
	mov	x20, x0
	cbz	x0, LBB0_9
; %bb.1:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_hb_avframe_set_video_buffer_flags
	ldr	w8, [x20, #8]
	tbnz	w8, #31, LBB0_9
; %bb.2:
	mov	x25, #0
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x25, #1
	ldrsw	x9, [x20, #8]
	cmp	x25, x9
	mov	x25, x8
	b.ge	LBB0_9
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	ldr	x8, [x20]
	add	x8, x8, x25, lsl #4
	ldp	w24, w26, [x8]
	ldr	x8, [x19]
	ldrsw	x22, [x8, x25, lsl #2]
	cmp	w22, w24
	b.ge	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
	bl	_ABS
	mov	x21, x0
	cmp	w26, #1
	b.ge	LBB0_7
	b	LBB0_3
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x21, x24
	cmp	w26, #1
	b.lt	LBB0_3
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #8]
	ldr	x23, [x8, x25, lsl #3]
	sxtw	x8, w24
	ldr	x9, [x20]
	add	x9, x9, x25, lsl #4
	ldr	x24, [x9, #8]
	lsl	x22, x22, #2
	lsl	x27, x8, #2
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x24
	mov	x1, x23
	mov	x2, x21
	bl	_memcpy
	add	x23, x23, x22
	add	x24, x24, x27
	subs	w26, w26, #1
	b.ne	LBB0_8
	b	LBB0_3
LBB0_9:
	mov	x0, x20
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
