	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function process_chunk
_process_chunk:                         ## @process_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movl	%edx, %r15d
	movl	%esi, %r13d
	movq	%rdi, %rbx
	movl	(%rdi), %r12d
	movq	96(%rdi), %rax
	cmpl	$2, (%rax)
	jl	LBB0_2
## %bb.1:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movl	%r15d, %r12d
	movl	%r14d, %r15d
	movq	_stderr@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	L_.str(%rip), %rdi
	callq	_fputs
	movl	(%rbx), %edi
	movl	(%r14), %esi
	callq	_type_name
	movl	(%r14), %edi
	movl	%r15d, %r14d
	movl	%r12d, %r15d
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movslq	4(%rbx), %rdx
	movl	8(%rbx), %ecx
	notl	%ecx
	leaq	L_.str.1(%rip), %rsi
	movl	%r13d, %r8d
	callq	_fprintf
LBB0_2:
	movl	8(%rbx), %eax
	notl	%eax
	cmpl	%r13d, %eax
	je	LBB0_7
## %bb.3:
	movq	_CRC_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 104(%rbx)
	movq	96(%rbx), %rax
	movq	8(%rax), %rax
	movq	_SKIP_BAD_CRC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.5:
	movl	%r12d, %edi
	callq	_CRITICAL
	testq	%rax, %rax
	je	LBB0_25
## %bb.6:
	movq	_READ_ERROR_CODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%rbx, %rdi
	callq	_stop
	jmp	LBB0_7
LBB0_4:
	leaq	L_.str.2(%rip), %rdx
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_type_message
LBB0_7:
	movq	96(%rbx), %rdi
	movl	%r12d, %esi
	callq	_skip_chunk_type
	testq	%rax, %rax
	je	LBB0_8
LBB0_26:
	movl	%r15d, 4(%rbx)
	movl	%r14d, (%rbx)
	movq	%rbx, %rdi
	callq	_getpos
LBB0_22:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_read_chunk                     ## TAILCALL
LBB0_8:
	cmpl	$132, %r12d
	jne	LBB0_14
## %bb.9:
	cmpq	$0, 88(%rbx)
	je	LBB0_10
## %bb.11:
	xorl	%edi, %edi
	cmpq	$0, 16(%rbx)
	setne	%dil
	callq	_assert
	movq	16(%rbx), %rax
	xorl	%edi, %edi
	cmpl	$132, (%rax)
	sete	%dil
	callq	_assert
	movl	4(%rbx), %eax
	movq	16(%rbx), %rcx
	movl	%eax, 4(%rcx)
	jmp	LBB0_12
LBB0_14:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	*80(%rbx)
	movl	%r15d, 4(%rbx)
	movl	%r14d, (%rbx)
	movq	%rbx, %rdi
	callq	_getpos
	movq	16(%rbx), %r15
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%r15)
	addl	$-128, %r12d
	cmpl	$3, %r12d
	ja	LBB0_24
## %bb.15:
	leaq	16(%rbx), %r14
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%r12,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_19:
	movq	%rbx, %rdi
	callq	_process_zTXt_iCCP
	testl	%eax, %eax
	jne	LBB0_24
	jmp	LBB0_21
LBB0_25:
	leaq	L_.str.4(%rip), %rdx
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_type_message
	jmp	LBB0_26
LBB0_10:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	*80(%rbx)
LBB0_12:
	movl	%r15d, 4(%rbx)
	movl	%r14d, (%rbx)
	movq	%rbx, %rdi
	callq	_getpos
	movq	16(%rbx), %rax
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rax)
	movq	%rbx, %rdi
	callq	_process_IDAT
	testl	%eax, %eax
	je	LBB0_13
LBB0_24:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	xorl	%edi, %edi
	cmpl	$132, %r14d
	sete	%dil
	callq	_assert
	jmp	LBB0_22
LBB0_23:
	movq	%rbx, %rdi
	callq	_process_iTXt
	testl	%eax, %eax
	jne	LBB0_24
LBB0_21:
	movq	%r14, %rdi
	callq	_chunk_end
	leaq	12(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_file_setpos
	jmp	LBB0_22
LBB0_16:
	cmpl	$13, 4(%r15)
	je	LBB0_18
## %bb.17:
	leaq	L_.str.5(%rip), %rsi
	movq	%rbx, %rdi
	callq	_stop_invalid
LBB0_18:
	movq	%r15, %rdi
	callq	_setpos
	movq	%rbx, %rdi
	callq	_reread_4
	movq	%rax, 72(%rbx)
	movq	%rbx, %rdi
	callq	_reread_4
	movq	%rax, 64(%rbx)
	movq	%rbx, %rdi
	callq	_reread_byte
	movq	%rax, 56(%rbx)
	movq	%rbx, %rdi
	callq	_reread_byte
	movq	%rax, 48(%rbx)
	movq	%rbx, %rdi
	callq	_reread_byte
	movq	%rax, 40(%rbx)
	movq	%rbx, %rdi
	callq	_reread_byte
	movq	%rax, 32(%rbx)
	movq	%rbx, %rdi
	callq	_reread_byte
	movq	%rax, 24(%rbx)
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_calc_image_size                ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_19, LBB0_19-LJTI0_0
.set L0_0_set_23, LBB0_23-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
LJTI0_0:
	.long	L0_0_set_19
	.long	L0_0_set_23
	.long	L0_0_set_19
	.long	L0_0_set_16
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"  "

	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	" %lu 0x%.8x 0x%.8x\n"

	.comm	_CRC_ERROR,4,2                  ## @CRC_ERROR
	.comm	_SKIP_BAD_CRC,8,3               ## @SKIP_BAD_CRC
L_.str.2:                               ## @.str.2
	.asciz	"bad CRC"

	.comm	_READ_ERROR_CODE,4,2            ## @READ_ERROR_CODE
L_.str.3:                               ## @.str.3
	.asciz	"bad CRC in critical chunk"

L_.str.4:                               ## @.str.4
	.asciz	"skipped: bad CRC"

L_.str.5:                               ## @.str.5
	.asciz	"IHDR length"

	.no_dead_strip	_process_chunk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function process_chunk
_process_chunk:                         ; @process_chunk
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x3
	mov	x21, x2
	mov	x23, x1
	mov	x19, x0
	ldr	w22, [x0]
	ldr	x8, [x0, #96]
	ldr	w8, [x8]
	cmp	w8, #2
	b.lt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x24, _stderr@GOTPAGE
Lloh1:
	ldr	x24, [x24, _stderr@GOTPAGEOFF]
	ldr	w1, [x24]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_fputs
	ldr	w0, [x19]
	ldr	w1, [x24]
	bl	_type_name
	ldr	w0, [x24]
	ldp	w2, w8, [x19, #4]
                                        ; kill: def $w2 killed $w2 def $x2
	sxtw	x2, w2
	mvn	w3, w8
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x4, x23
	bl	_fprintf
LBB0_2:
	ldr	w8, [x19, #8]
	mvn	w8, w8
	cmp	w8, w23
	b.eq	LBB0_7
; %bb.3:
Lloh6:
	adrp	x8, _CRC_ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CRC_ERROR@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [x19, #104]
	orr	w8, w9, w8
	str	w8, [x19, #104]
	ldr	x8, [x19, #96]
	ldr	x8, [x8, #8]
Lloh9:
	adrp	x9, _SKIP_BAD_CRC@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SKIP_BAD_CRC@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.4:
	mov	x0, x22
	bl	_CRITICAL
	cbz	x0, LBB0_16
; %bb.5:
Lloh12:
	adrp	x8, _READ_ERROR_CODE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _READ_ERROR_CODE@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x2, l_.str.3@PAGE
Lloh16:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_stop
	b	LBB0_7
LBB0_6:
Lloh17:
	adrp	x2, l_.str.2@PAGE
Lloh18:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x1, x22
	bl	_type_message
LBB0_7:
	ldr	x0, [x19, #96]
	mov	x1, x22
	bl	_skip_chunk_type
	cbz	x0, LBB0_10
LBB0_8:
	stp	w20, w21, [x19]
	mov	x0, x19
	bl	_getpos
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_read_chunk
LBB0_10:
	cmp	w22, #132
	b.ne	LBB0_13
; %bb.11:
	ldr	x8, [x19, #88]
	cbz	x8, LBB0_17
; %bb.12:
	ldr	x8, [x19, #16]
	cmp	x8, #0
	cset	w0, ne
	bl	_assert
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
	cmp	w8, #132
	cset	w0, eq
	bl	_assert
	ldr	w8, [x19, #4]
	ldr	x9, [x19, #16]
	str	w8, [x9, #4]
	b	LBB0_18
LBB0_13:
	ldr	x8, [x19, #80]
	mov	x0, x19
	mov	w1, #0
	blr	x8
	stp	w20, w21, [x19]
	mov	x0, x19
	bl	_getpos
	mov	x20, x19
	ldr	x21, [x20, #16]!
	stp	xzr, xzr, [x21, #8]
	sub	w8, w22, #128
	cmp	w8, #3
	b.hi	LBB0_19
; %bb.14:
Lloh19:
	adrp	x9, lJTI0_0@PAGE
Lloh20:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_15
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_15:
	mov	x0, x19
	bl	_process_zTXt_iCCP
	cbnz	w0, LBB0_19
	b	LBB0_22
LBB0_16:
Lloh21:
	adrp	x2, l_.str.4@PAGE
Lloh22:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x19
	mov	x1, x22
	bl	_type_message
	b	LBB0_8
LBB0_17:
	ldr	x8, [x19, #80]
	mov	x0, x19
	mov	w1, #1
	blr	x8
LBB0_18:
	stp	w20, w21, [x19]
	mov	x0, x19
	bl	_getpos
	ldr	x8, [x19, #16]
	stp	xzr, xzr, [x8, #8]
	mov	x0, x19
	bl	_process_IDAT
	cbz	w0, LBB0_20
LBB0_19:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_20:
	cmp	w20, #132
	cset	w0, eq
	bl	_assert
	b	LBB0_9
LBB0_21:
	mov	x0, x19
	bl	_process_iTXt
	cbnz	w0, LBB0_19
LBB0_22:
	mov	x0, x20
	bl	_chunk_end
	add	x1, x19, #12
	mov	x0, x19
	bl	_file_setpos
	b	LBB0_9
LBB0_23:
	ldr	w8, [x21, #4]
	cmp	w8, #13
	b.eq	LBB0_25
; %bb.24:
Lloh23:
	adrp	x1, l_.str.5@PAGE
Lloh24:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_stop_invalid
LBB0_25:
	mov	x0, x21
	bl	_setpos
	mov	x0, x19
	bl	_reread_4
	str	x0, [x19, #72]
	mov	x0, x19
	bl	_reread_4
	str	x0, [x19, #64]
	mov	x0, x19
	bl	_reread_byte
	str	x0, [x19, #56]
	mov	x0, x19
	bl	_reread_byte
	str	x0, [x19, #48]
	mov	x0, x19
	bl	_reread_byte
	str	x0, [x19, #40]
	mov	x0, x19
	bl	_reread_byte
	str	x0, [x19, #32]
	mov	x0, x19
	bl	_reread_byte
	str	x0, [x19, #24]
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_calc_image_size
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_15-LBB0_15)>>2
	.byte	(LBB0_21-LBB0_15)>>2
	.byte	(LBB0_15-LBB0_15)>>2
	.byte	(LBB0_23-LBB0_15)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"  "

	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	" %lu 0x%.8x 0x%.8x\n"

	.comm	_CRC_ERROR,4,2                  ; @CRC_ERROR
	.comm	_SKIP_BAD_CRC,8,3               ; @SKIP_BAD_CRC
l_.str.2:                               ; @.str.2
	.asciz	"bad CRC"

	.comm	_READ_ERROR_CODE,4,2            ; @READ_ERROR_CODE
l_.str.3:                               ; @.str.3
	.asciz	"bad CRC in critical chunk"

l_.str.4:                               ; @.str.4
	.asciz	"skipped: bad CRC"

l_.str.5:                               ; @.str.5
	.asciz	"IHDR length"

	.no_dead_strip	_process_chunk
.subsections_via_symbols
