	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sub2video_prepare
_sub2video_prepare:                     ## @sub2video_prepare
	.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	%rsi, %r15
	movq	%rdi, %r14
	movq	_input_files@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rdi), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	(%rax), %rbx
	movl	(%rsi), %r13d
	movl	4(%rsi), %r12d
	testl	%r13d, %r13d
	je	LBB0_2
## %bb.1:
	testl	%r12d, %r12d
	jne	LBB0_11
LBB0_2:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %eax
	testl	%eax, %eax
	jle	LBB0_7
## %bb.3:
	xorl	%r14d, %r14d
	movq	_AVMEDIA_TYPE_VIDEO@GOTPCREL(%rip), %r15
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%r14
	movslq	%eax, %rcx
	cmpq	%rcx, %r14
	jge	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rcx
	movq	(%rcx,%r14,8), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rdx
	cmpq	(%r15), %rdx
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	8(%rcx), %esi
	movl	%r13d, %edi
	callq	_FFMAX
	movl	%eax, %r13d
	movq	8(%rbx), %rax
	movq	(%rax,%r14,8), %rax
	movq	(%rax), %rax
	movl	12(%rax), %esi
	movl	%r12d, %edi
	callq	_FFMAX
	movl	%eax, %r12d
	movl	(%rbx), %eax
	jmp	LBB0_6
LBB0_7:
	testl	%r13d, %r13d
	je	LBB0_9
## %bb.8:
	testl	%r12d, %r12d
	jne	LBB0_10
LBB0_9:
	movl	%r13d, %edi
	movl	$720, %esi                      ## imm = 0x2D0
	callq	_FFMAX
	movl	%eax, %r13d
	movl	%r12d, %edi
	movl	$576, %esi                      ## imm = 0x240
	callq	_FFMAX
	movl	%eax, %r12d
LBB0_10:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	_AV_LOG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	movl	%r13d, %ecx
	movl	%r12d, %r8d
	callq	_av_log
LBB0_11:
	movl	%r13d, 8(%r14)
	movl	%r12d, 12(%r14)
	movq	40(%r14), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	cmovel	%r13d, %ecx
	movl	%ecx, (%r15)
	movl	4(%rax), %eax
	testl	%eax, %eax
	cmovel	%r12d, %eax
	movl	%eax, 4(%r15)
	movq	_AV_PIX_FMT_RGB32@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	xorl	%eax, %eax
	callq	_av_frame_alloc
	movl	%eax, 32(%r14)
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movq	_INT64_MIN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%r14)
	movq	%rax, 16(%r14)
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_input_files,8,3                ## @input_files
	.comm	_AVMEDIA_TYPE_VIDEO,8,3         ## @AVMEDIA_TYPE_VIDEO
	.comm	_AV_LOG_INFO,4,2                ## @AV_LOG_INFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sub2video: using %dx%d canvas\n"

	.comm	_AV_PIX_FMT_RGB32,4,2           ## @AV_PIX_FMT_RGB32
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_INT64_MIN,8,3                  ## @INT64_MIN
	.no_dead_strip	_sub2video_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sub2video_prepare
_sub2video_prepare:                     ; @sub2video_prepare
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x19, x0
	ldp	w21, w22, [x1]
	cmp	w21, #0
	ccmp	w22, #0, #4, ne
	b.ne	LBB0_10
; %bb.1:
Lloh0:
	adrp	x8, _input_files@GOTPAGE
Lloh1:
	ldr	x8, [x8, _input_files@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x9, [x19]
	ldr	x8, [x8, x9, lsl #3]
	ldr	x23, [x8]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.2:
	mov	x24, #0
Lloh3:
	adrp	x25, _AVMEDIA_TYPE_VIDEO@GOTPAGE
Lloh4:
	ldr	x25, [x25, _AVMEDIA_TYPE_VIDEO@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x24, x24, #1
	cmp	x24, w8, sxtw
	b.ge	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x23, #8]
	ldr	x9, [x9, x24, lsl #3]
	ldr	x9, [x9]
	ldr	x10, [x9]
	ldr	x11, [x25]
	cmp	x10, x11
	b.ne	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x9, #8]
	mov	x0, x21
	bl	_FFMAX
	mov	x21, x0
	ldr	x8, [x23, #8]
	ldr	x8, [x8, x24, lsl #3]
	ldr	x8, [x8]
	ldr	w1, [x8, #12]
	mov	x0, x22
	bl	_FFMAX
	mov	x22, x0
	ldr	w8, [x23]
	b	LBB0_3
LBB0_6:
	cbz	w21, LBB0_8
; %bb.7:
	cbnz	w22, LBB0_9
LBB0_8:
	mov	x0, x21
	mov	w1, #720
	bl	_FFMAX
	mov	x21, x0
	mov	x0, x22
	mov	w1, #576
	bl	_FFMAX
	mov	x22, x0
LBB0_9:
Lloh5:
	adrp	x8, _AV_LOG_INFO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AV_LOG_INFO@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x23
	mov	x3, x21
	mov	x4, x22
	bl	_av_log
LBB0_10:
	stp	w21, w22, [x19, #8]
	ldr	x8, [x19, #40]
	ldp	w9, w8, [x8]
	cmp	w9, #0
	csel	w9, w21, w9, eq
	cmp	w8, #0
	csel	w8, w22, w8, eq
	stp	w9, w8, [x20]
Lloh10:
	adrp	x8, _AV_PIX_FMT_RGB32@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AV_PIX_FMT_RGB32@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	str	w8, [x20, #8]
	bl	_av_frame_alloc
	str	w0, [x19, #32]
	cbz	w0, LBB0_12
; %bb.11:
Lloh13:
	adrp	x8, _INT64_MIN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _INT64_MIN@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	stp	x8, x8, [x19, #16]
	mov	w0, #0
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_12:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_AVERROR
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_input_files,8,3                ; @input_files
	.comm	_AVMEDIA_TYPE_VIDEO,8,3         ; @AVMEDIA_TYPE_VIDEO
	.comm	_AV_LOG_INFO,4,2                ; @AV_LOG_INFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sub2video: using %dx%d canvas\n"

	.comm	_AV_PIX_FMT_RGB32,4,2           ; @AV_PIX_FMT_RGB32
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_INT64_MIN,8,3                  ; @INT64_MIN
	.no_dead_strip	_sub2video_prepare
.subsections_via_symbols
