	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function decode_trns_chunk
_decode_trns_chunk:                     ## @decode_trns_chunk
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rsi), %eax
	movq	_PNG_IHDR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_1
## %bb.4:
	movq	%rsi, %r12
	movq	_PNG_IDAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 4(%rsi)
	je	LBB0_6
## %bb.5:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_2
LBB0_1:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
LBB0_2:
	callq	_av_log
LBB0_3:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_24:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	%edx, %r14d
	movq	8(%r12), %rcx
	movq	_PNG_COLOR_TYPE_PALETTE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_12
## %bb.7:
	cmpl	$256, %r14d                     ## imm = 0x100
	jg	LBB0_3
## %bb.8:
	movq	_PNG_PLTE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_3
## %bb.9:
	testl	%r14d, %r14d
	jle	LBB0_23
## %bb.10:
	leaq	44(%r12), %r15
	movl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_bytestream2_get_byte
	movq	16(%r12), %rcx
	movb	%al, 3(%rcx,%rbx,4)
	incq	%rbx
	cmpq	%rbx, %r14
	jne	LBB0_11
	jmp	LBB0_23
LBB0_12:
	movq	_PNG_COLOR_TYPE_GRAY@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_PNG_COLOR_TYPE_RGB@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	%rax, %rcx
	je	LBB0_14
## %bb.13:
	cmpq	%rdx, %rcx
	jne	LBB0_3
LBB0_14:
	cmpq	%rdx, %rcx
	sete	%dl
	cmpq	%rax, %rcx
	sete	%cl
	cmpl	$2, %r14d
	setne	%bl
	cmpl	$6, %r14d
	setne	%al
	testb	%cl, %bl
	jne	LBB0_3
## %bb.15:
	andb	%dl, %al
	jne	LBB0_3
## %bb.16:
	cmpl	$1, 24(%r12)
	je	LBB0_3
## %bb.17:
	cmpl	$2, %r14d
	jl	LBB0_23
## %bb.18:
	shrl	%r14d
	leaq	44(%r12), %r15
	xorl	%ebx, %ebx
	jmp	LBB0_19
LBB0_21:                                ##   in Loop: Header=BB0_19 Depth=1
	movl	%eax, (%rcx,%rbx,4)
LBB0_22:                                ##   in Loop: Header=BB0_19 Depth=1
	incq	%rbx
	cmpq	%r14, %rbx
	je	LBB0_23
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_bytestream2_get_be16
	movl	24(%r12), %esi
	movl	%eax, %edi
	callq	_av_mod_uintp2
	cmpl	$9, 24(%r12)
	movq	32(%r12), %rcx
	jl	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	leaq	(%rcx,%rbx,8), %rdi
	movl	%eax, %esi
	callq	_AV_WB16
	jmp	LBB0_22
LBB0_23:
	leaq	44(%r12), %rdi
	movl	$4, %esi
	callq	_bytestream2_skip
	movl	$1, 40(%r12)
	xorl	%eax, %eax
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.comm	_PNG_IHDR,4,2                   ## @PNG_IHDR
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"trns before IHDR\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_PNG_IDAT,4,2                   ## @PNG_IDAT
L_.str.1:                               ## @.str.1
	.asciz	"trns after IDAT\n"

	.comm	_PNG_COLOR_TYPE_PALETTE,8,3     ## @PNG_COLOR_TYPE_PALETTE
	.comm	_PNG_PLTE,4,2                   ## @PNG_PLTE
	.comm	_PNG_COLOR_TYPE_GRAY,8,3        ## @PNG_COLOR_TYPE_GRAY
	.comm	_PNG_COLOR_TYPE_RGB,8,3         ## @PNG_COLOR_TYPE_RGB
	.no_dead_strip	_decode_trns_chunk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function decode_trns_chunk
_decode_trns_chunk:                     ; @decode_trns_chunk
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _PNG_IHDR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PNG_IHDR@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
	mov	x19, x1
	ldr	w9, [x1, #4]
Lloh3:
	adrp	x10, _PNG_IDAT@GOTPAGE
Lloh4:
	ldr	x10, [x10, _PNG_IDAT@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_7
; %bb.2:
Lloh6:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x2, l_.str.1@PAGE
Lloh10:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_3:
Lloh11:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x2, l_.str@PAGE
Lloh15:
	add	x2, x2, l_.str@PAGEOFF
LBB0_4:
	bl	_av_log
LBB0_5:
Lloh16:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldr	x9, [x19, #8]
Lloh19:
	adrp	x10, _PNG_COLOR_TYPE_PALETTE@GOTPAGE
Lloh20:
	ldr	x10, [x10, _PNG_COLOR_TYPE_PALETTE@GOTPAGEOFF]
Lloh21:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_13
; %bb.8:
	cmp	w2, #256
	b.gt	LBB0_5
; %bb.9:
Lloh22:
	adrp	x9, _PNG_PLTE@GOTPAGE
Lloh23:
	ldr	x9, [x9, _PNG_PLTE@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.10:
	cmp	w2, #1
	b.lt	LBB0_23
; %bb.11:
	mov	x21, #0
	add	x20, x19, #44
	mov	w8, w2
	lsl	x22, x8, #2
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_bytestream2_get_byte
	ldr	x8, [x19, #16]
	add	x8, x8, x21
	strb	w0, [x8, #3]
	add	x21, x21, #4
	cmp	x22, x21
	b.ne	LBB0_12
	b	LBB0_23
LBB0_13:
Lloh25:
	adrp	x8, _PNG_COLOR_TYPE_GRAY@GOTPAGE
Lloh26:
	ldr	x8, [x8, _PNG_COLOR_TYPE_GRAY@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
Lloh28:
	adrp	x10, _PNG_COLOR_TYPE_RGB@GOTPAGE
Lloh29:
	ldr	x10, [x10, _PNG_COLOR_TYPE_RGB@GOTPAGEOFF]
Lloh30:
	ldr	x10, [x10]
	cmp	x9, x8
	ccmp	x9, x10, #4, ne
	b.ne	LBB0_5
; %bb.14:
	cmp	w2, #6
	ccmp	x9, x10, #0, ne
	cset	w10, eq
	cmp	x9, x8
	ccmp	w2, #2, #4, eq
	b.ne	LBB0_5
; %bb.15:
	tbnz	w10, #0, LBB0_5
; %bb.16:
	ldr	w8, [x19, #24]
	cmp	w8, #1
	b.eq	LBB0_5
; %bb.17:
	cmp	w2, #2
	b.lt	LBB0_23
; %bb.18:
	mov	x21, #0
	lsr	w22, w2, #1
	add	x20, x19, #44
	b	LBB0_21
LBB0_19:                                ;   in Loop: Header=BB0_21 Depth=1
	str	w1, [x8, x21, lsl #2]
LBB0_20:                                ;   in Loop: Header=BB0_21 Depth=1
	add	x21, x21, #1
	cmp	x21, x22
	b.eq	LBB0_23
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_bytestream2_get_be16
	ldr	w1, [x19, #24]
	bl	_av_mod_uintp2
	mov	x1, x0
	ldr	w9, [x19, #24]
	ldr	x8, [x19, #32]
	cmp	w9, #9
	b.lt	LBB0_19
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=1
	add	x0, x8, x21, lsl #3
	bl	_AV_WB16
	b	LBB0_20
LBB0_23:
	add	x0, x19, #44
	mov	w1, #4
	bl	_bytestream2_skip
	mov	w0, #0
	mov	w8, #1
	str	w8, [x19, #40]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_PNG_IHDR,4,2                   ; @PNG_IHDR
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"trns before IHDR\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_PNG_IDAT,4,2                   ; @PNG_IDAT
l_.str.1:                               ; @.str.1
	.asciz	"trns after IDAT\n"

	.comm	_PNG_COLOR_TYPE_PALETTE,8,3     ; @PNG_COLOR_TYPE_PALETTE
	.comm	_PNG_PLTE,4,2                   ; @PNG_PLTE
	.comm	_PNG_COLOR_TYPE_GRAY,8,3        ; @PNG_COLOR_TYPE_GRAY
	.comm	_PNG_COLOR_TYPE_RGB,8,3         ; @PNG_COLOR_TYPE_RGB
	.no_dead_strip	_decode_trns_chunk
.subsections_via_symbols
