	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_load_image                  ## -- Begin function ff_load_image
	.p2align	4, 0x90
_ff_load_image:                         ## @ff_load_image
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r12
	movq	%r8, -80(%rbp)                  ## 8-byte Spill
	movq	%rcx, -112(%rbp)                ## 8-byte Spill
	movq	%rdx, %r13
	movq	%rsi, %r14
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	movq	16(%rbp), %r15
	movq	$0, -56(%rbp)
	movq	$0, -96(%rbp)
	leaq	-44(%rbp), %rdi
	callq	_av_init_packet
	leaq	L_.str(%rip), %rdi
	callq	_av_find_input_format
	leaq	-56(%rbp), %rdi
	movq	%r12, %rsi
	movq	%rax, %rdx
	xorl	%ecx, %ecx
	callq	_avformat_open_input
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	-56(%rbp), %rdi
	xorl	%esi, %esi
	callq	_avformat_find_stream_info
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	(%rax), %rbx
	movl	(%rbx), %edi
	callq	_avcodec_find_decoder
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_avcodec_alloc_context3
	movq	%rax, -128(%rbp)
	testq	%rax, %rax
	je	LBB0_7
## %bb.10:
	movq	%rax, %r15
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_avcodec_parameters_to_context
	testl	%eax, %eax
	js	LBB0_11
## %bb.13:
	leaq	L_.str.6(%rip), %rsi
	leaq	L_.str.7(%rip), %rdx
	leaq	-96(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_av_dict_set
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_avcodec_open2
	testl	%eax, %eax
	js	LBB0_14
## %bb.15:
	xorl	%eax, %eax
	callq	_av_frame_alloc
	movq	%rax, -120(%rbp)
	testq	%rax, %rax
	je	LBB0_16
## %bb.17:
	movq	%rax, %r14
	movq	-56(%rbp), %rdi
	leaq	-44(%rbp), %rsi
	callq	_av_read_frame
	testl	%eax, %eax
	js	LBB0_18
## %bb.19:
	leaq	-60(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movq	%r15, %rdi
	movq	%r14, %rbx
	movq	%r14, %rsi
	callq	_avcodec_decode_video2
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_21
## %bb.20:
	cmpl	$0, -60(%rbp)
	je	LBB0_21
## %bb.22:
	movq	%rbx, %r14
	movl	(%rbx), %eax
	movq	%r13, %rcx
	movl	%eax, (%r13)
	movl	4(%rbx), %eax
	movq	-112(%rbp), %r13                ## 8-byte Reload
	movl	%eax, (%r13)
	movl	8(%rbx), %r8d
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	%r8d, (%rax)
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	movl	(%rcx), %edx
	movl	(%r13), %ecx
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	$16, %r9d
	callq	_av_image_alloc
	testl	%eax, %eax
	movq	16(%rbp), %r15
	js	LBB0_23
## %bb.24:
	movq	16(%r14), %rdx
	movl	12(%r14), %ecx
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r8d
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movl	(%rax), %r9d
	movl	(%r13), %eax
	movl	%eax, (%rsp)
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_av_image_copy
	xorl	%ebx, %ebx
	jmp	LBB0_25
LBB0_1:
	movl	%eax, %ebx
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_27
LBB0_3:
	movl	%eax, %ebx
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_28
LBB0_5:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.4(%rip), %rdx
LBB0_8:
	movq	16(%rbp), %r15
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %ebx
	jmp	LBB0_25
LBB0_11:
	movl	%eax, %ebx
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.5(%rip), %rdx
	jmp	LBB0_12
LBB0_14:
	movl	%eax, %ebx
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.8(%rip), %rdx
	jmp	LBB0_12
LBB0_16:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.9(%rip), %rdx
	jmp	LBB0_8
LBB0_18:
	movl	%eax, %ebx
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.10(%rip), %rdx
LBB0_12:
	movq	16(%rbp), %r15
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_av_log
LBB0_25:
	leaq	-44(%rbp), %rdi
	callq	_av_packet_unref
	leaq	-128(%rbp), %rdi
	callq	_avcodec_free_context
	leaq	-56(%rbp), %rdi
	callq	_avformat_close_input
	leaq	-120(%rbp), %rdi
	callq	_av_frame_free
	leaq	-96(%rbp), %rdi
	callq	_av_dict_free
	testl	%ebx, %ebx
	jns	LBB0_28
## %bb.26:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.12(%rip), %rdx
LBB0_27:
	movq	%r15, %rdi
	movq	%r12, %rcx
	xorl	%eax, %eax
	callq	_av_log
LBB0_28:
	movl	%ebx, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.11(%rip), %rdx
	movq	16(%rbp), %r15
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_av_log
	cmpl	$-1, %r14d
	movl	$-1, %ebx
	cmovll	%r14d, %ebx
	jmp	LBB0_25
LBB0_23:
	movl	%eax, %ebx
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"image2pipe"

	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"Failed to open input file '%s'\n"

L_.str.2:                               ## @.str.2
	.asciz	"Find stream info failed\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to find codec\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.4:                               ## @.str.4
	.asciz	"Failed to alloc video decoder context\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.5:                               ## @.str.5
	.asciz	"Failed to copy codec parameters to decoder context\n"

L_.str.6:                               ## @.str.6
	.asciz	"thread_type"

L_.str.7:                               ## @.str.7
	.asciz	"slice"

L_.str.8:                               ## @.str.8
	.asciz	"Failed to open codec\n"

L_.str.9:                               ## @.str.9
	.asciz	"Failed to alloc frame\n"

L_.str.10:                              ## @.str.10
	.asciz	"Failed to read frame from file\n"

L_.str.11:                              ## @.str.11
	.asciz	"Failed to decode image from file\n"

L_.str.12:                              ## @.str.12
	.asciz	"Error loading image file '%s'\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_load_image                  ; -- Begin function ff_load_image
	.p2align	2
_ff_load_image:                         ; @ff_load_image
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x19, x6
	mov	x20, x5
	mov	x24, x4
	mov	x22, x3
	mov	x25, x2
	mov	x21, x1
	mov	x23, x0
	str	xzr, [sp, #40]
	str	xzr, [sp, #8]
	add	x0, sp, #16
	bl	_av_init_packet
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_av_find_input_format
	mov	x2, x0
	add	x0, sp, #40
	mov	x1, x20
	mov	x3, #0
	bl	_avformat_open_input
	tbnz	w0, #31, LBB0_12
; %bb.1:
	ldr	x0, [sp, #40]
	mov	x1, #0
	bl	_avformat_find_stream_info
	tbnz	w0, #31, LBB0_13
; %bb.2:
	ldr	x8, [sp, #40]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	x26, [x8]
	ldr	w0, [x26]
	bl	_avcodec_find_decoder
	cbz	x0, LBB0_14
; %bb.3:
	mov	x28, x0
	bl	_avcodec_alloc_context3
	str	x0, [sp, #32]
	cbz	x0, LBB0_15
; %bb.4:
	mov	x27, x0
	mov	x1, x26
	bl	_avcodec_parameters_to_context
	tbnz	w0, #31, LBB0_18
; %bb.5:
Lloh2:
	adrp	x1, l_.str.6@PAGE
Lloh3:
	add	x1, x1, l_.str.6@PAGEOFF
Lloh4:
	adrp	x2, l_.str.7@PAGE
Lloh5:
	add	x2, x2, l_.str.7@PAGEOFF
	add	x0, sp, #8
	mov	w3, #0
	bl	_av_dict_set
	add	x2, sp, #8
	mov	x0, x27
	mov	x1, x28
	bl	_avcodec_open2
	tbnz	w0, #31, LBB0_19
; %bb.6:
	bl	_av_frame_alloc
	str	x0, [sp, #24]
	cbz	x0, LBB0_20
; %bb.7:
	mov	x28, x0
	ldr	x0, [sp, #40]
	add	x1, sp, #16
	bl	_av_read_frame
	tbnz	w0, #31, LBB0_21
; %bb.8:
	add	x2, sp, #20
	add	x3, sp, #16
	mov	x0, x27
	mov	x1, x28
	bl	_avcodec_decode_video2
	mov	x26, x0
	tbnz	w0, #31, LBB0_27
; %bb.9:
	ldr	w8, [sp, #20]
	cbz	w8, LBB0_27
; %bb.10:
	ldr	w8, [x28]
	str	w8, [x25]
	ldr	w8, [x28, #4]
	str	w8, [x22]
	ldr	w4, [x28, #8]
	str	w4, [x24]
	ldr	w2, [x25]
	ldr	w3, [x22]
	mov	x0, x23
	mov	x1, x21
	mov	w5, #16
	bl	_av_image_alloc
	tbnz	w0, #31, LBB0_28
; %bb.11:
	ldr	x2, [x28, #16]
	ldr	w3, [x28, #12]
	ldr	w4, [x24]
	ldr	w5, [x25]
	ldr	w6, [x22]
	mov	x0, x23
	mov	x1, x21
	bl	_av_image_copy
	mov	w26, #0
	b	LBB0_23
LBB0_12:
	mov	x26, x0
Lloh6:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	str	x20, [sp]
Lloh9:
	adrp	x2, l_.str.1@PAGE
Lloh10:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_25
LBB0_13:
	mov	x26, x0
Lloh11:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x2, l_.str.2@PAGE
Lloh15:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_25
LBB0_14:
Lloh16:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x2, l_.str.3@PAGE
Lloh20:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_av_log
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_17
LBB0_15:
Lloh23:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
Lloh26:
	adrp	x2, l_.str.4@PAGE
Lloh27:
	add	x2, x2, l_.str.4@PAGEOFF
LBB0_16:
	mov	x0, x19
	bl	_av_log
Lloh28:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_17:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x26, x0
	b	LBB0_23
LBB0_18:
	mov	x26, x0
Lloh30:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh31:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
Lloh33:
	adrp	x2, l_.str.5@PAGE
Lloh34:
	add	x2, x2, l_.str.5@PAGEOFF
	b	LBB0_22
LBB0_19:
	mov	x26, x0
Lloh35:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh36:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
Lloh38:
	adrp	x2, l_.str.8@PAGE
Lloh39:
	add	x2, x2, l_.str.8@PAGEOFF
	b	LBB0_22
LBB0_20:
Lloh40:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh41:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
Lloh43:
	adrp	x2, l_.str.9@PAGE
Lloh44:
	add	x2, x2, l_.str.9@PAGEOFF
	b	LBB0_16
LBB0_21:
	mov	x26, x0
Lloh45:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh46:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh47:
	ldr	w1, [x8]
Lloh48:
	adrp	x2, l_.str.10@PAGE
Lloh49:
	add	x2, x2, l_.str.10@PAGEOFF
LBB0_22:
	mov	x0, x19
	bl	_av_log
LBB0_23:
	add	x0, sp, #16
	bl	_av_packet_unref
	add	x0, sp, #32
	bl	_avcodec_free_context
	add	x0, sp, #40
	bl	_avformat_close_input
	add	x0, sp, #24
	bl	_av_frame_free
	add	x0, sp, #8
	bl	_av_dict_free
	tbz	w26, #31, LBB0_26
; %bb.24:
Lloh50:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh51:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh52:
	ldr	w1, [x8]
	str	x20, [sp]
Lloh53:
	adrp	x2, l_.str.12@PAGE
Lloh54:
	add	x2, x2, l_.str.12@PAGEOFF
LBB0_25:
	mov	x0, x19
	bl	_av_log
LBB0_26:
	mov	x0, x26
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_27:
Lloh55:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh56:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh57:
	ldr	w1, [x8]
Lloh58:
	adrp	x2, l_.str.11@PAGE
Lloh59:
	add	x2, x2, l_.str.11@PAGEOFF
	mov	x0, x19
	bl	_av_log
	cmn	w26, #1
	csinv	w26, w26, wzr, lt
	b	LBB0_23
LBB0_28:
	mov	x26, x0
	b	LBB0_23
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpAdd	Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpAdd	Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"image2pipe"

	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"Failed to open input file '%s'\n"

l_.str.2:                               ; @.str.2
	.asciz	"Find stream info failed\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to find codec\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.4:                               ; @.str.4
	.asciz	"Failed to alloc video decoder context\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.5:                               ; @.str.5
	.asciz	"Failed to copy codec parameters to decoder context\n"

l_.str.6:                               ; @.str.6
	.asciz	"thread_type"

l_.str.7:                               ; @.str.7
	.asciz	"slice"

l_.str.8:                               ; @.str.8
	.asciz	"Failed to open codec\n"

l_.str.9:                               ; @.str.9
	.asciz	"Failed to alloc frame\n"

l_.str.10:                              ; @.str.10
	.asciz	"Failed to read frame from file\n"

l_.str.11:                              ; @.str.11
	.asciz	"Failed to decode image from file\n"

l_.str.12:                              ; @.str.12
	.asciz	"Error loading image file '%s'\n"

.subsections_via_symbols
