	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sub2video_update               ## -- Begin function sub2video_update
	.p2align	4, 0x90
_sub2video_update:                      ## @sub2video_update
	.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	8(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.1:
	movq	%rsi, %r15
	movq	%rdi, %r12
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.2:
	imulq	$1000, (%r15), %rdi             ## imm = 0x3E8
	addq	32(%r15), %rdi
	movq	_AV_TIME_BASE_Q@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	24(%r12), %rax
	movl	(%rax), %edx
	callq	_av_rescale_q
	imulq	$1000, 8(%r15), %rdi            ## imm = 0x3E8
	addq	32(%r15), %rdi
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	(%r14), %esi
	movq	24(%r12), %rax
	movl	(%rax), %edx
	callq	_av_rescale_q
	movl	%eax, %r14d
	movl	16(%r15), %r13d
	jmp	LBB0_4
LBB0_3:
	movl	(%r12), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_INT64_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	xorl	%r13d, %r13d
LBB0_4:
	movq	%r12, %rdi
	callq	_sub2video_get_blank_frame
	testq	%rax, %rax
	js	LBB0_10
## %bb.5:
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	testl	%r13d, %r13d
	jle	LBB0_8
## %bb.6:
	movq	%r15, %r12
	movq	(%rbx), %rax
	movq	16(%rbx), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	(%rax), %r15d
	movl	%r13d, %r14d
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%rbx), %ecx
	movl	12(%rbx), %edx
	movq	24(%r12), %rax
	movl	(%rax,%r13,4), %r8d
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	callq	_sub2video_copy_rect
	incq	%r13
	cmpq	%r13, %r14
	jne	LBB0_7
LBB0_8:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_sub2video_push_ref
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rbx)
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movl	16(%r12), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_av_log                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_TIME_BASE_Q,4,2             ## @AV_TIME_BASE_Q
	.comm	_INT64_MAX,4,2                  ## @INT64_MAX
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Impossible to get a blank canvas.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sub2video_update               ; -- Begin function sub2video_update
	.p2align	2
_sub2video_update:                      ; @sub2video_update
	.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
	ldr	x25, [x0, #8]
	cbz	x25, LBB0_9
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	cbz	x1, LBB0_3
; %bb.2:
	ldr	x8, [x20, #32]
	ldr	x9, [x20]
	mov	w22, #1000
	madd	x0, x9, x22, x8
Lloh0:
	adrp	x23, _AV_TIME_BASE_Q@GOTPAGE
Lloh1:
	ldr	x23, [x23, _AV_TIME_BASE_Q@GOTPAGEOFF]
	ldr	w1, [x23]
	ldr	x8, [x19, #24]
	ldr	w2, [x8]
	bl	_av_rescale_q
	mov	x21, x0
	ldr	x8, [x20, #32]
	ldr	x9, [x20, #8]
	madd	x0, x9, x22, x8
	ldr	w1, [x23]
	ldr	x8, [x19, #24]
	ldr	w2, [x8]
	bl	_av_rescale_q
	mov	x22, x0
	ldr	w26, [x20, #16]
	b	LBB0_4
LBB0_3:
	mov	w26, #0
	ldr	w21, [x19]
Lloh2:
	adrp	x8, _INT64_MAX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _INT64_MAX@GOTPAGEOFF]
Lloh4:
	ldr	w22, [x8]
LBB0_4:
	mov	x0, x19
	bl	_sub2video_get_blank_frame
	tbnz	x0, #63, LBB0_10
; %bb.5:
	cmp	w26, #1
	b.lt	LBB0_8
; %bb.6:
	mov	x27, #0
	ldr	x8, [x25, #16]
	ldr	x23, [x8]
	ldr	x8, [x25]
	ldr	w24, [x8]
	mov	w8, w26
	lsl	x26, x8, #2
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w3, w2, [x25, #8]
	ldr	x8, [x20, #24]
	ldr	w4, [x8, x27]
	mov	x0, x23
	mov	x1, x24
	bl	_sub2video_copy_rect
	add	x27, x27, #4
	cmp	x26, x27
	b.ne	LBB0_7
LBB0_8:
	mov	x0, x19
	mov	x1, x21
	bl	_sub2video_push_ref
	str	w22, [x19]
LBB0_9:
	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
LBB0_10:
	ldr	w0, [x19, #16]
Lloh5:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	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
	b	_av_log
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_TIME_BASE_Q,4,2             ; @AV_TIME_BASE_Q
	.comm	_INT64_MAX,4,2                  ; @INT64_MAX
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Impossible to get a blank canvas.\n"

.subsections_via_symbols
