	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function calc_image_size
_calc_image_size:                       ## @calc_image_size
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	(%rdi), %ebx
	movl	4(%rdi), %eax
	cmpq	$6, %rax
	ja	LBB0_2
## %bb.1:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_6:
	cmpl	$16, %ebx
	je	LBB0_8
## %bb.7:
	cmpl	$8, %ebx
	jne	LBB0_3
LBB0_8:
	leal	(%rbx,%rbx,2), %ebx
	jmp	LBB0_18
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_stop_invalid
	jmp	LBB0_3
LBB0_15:
	leal	-1(%rbx), %eax
	cmpl	$8, %eax
	jae	LBB0_3
## %bb.16:
	movl	$139, %ecx
	btl	%eax, %ecx
	jae	LBB0_3
## %bb.17:
	cltq
	leaq	l_switch.table.calc_image_size(%rip), %rcx
	movl	(%rcx,%rax,4), %ebx
	jmp	LBB0_18
LBB0_9:
	cmpl	$16, %ebx
	je	LBB0_11
## %bb.10:
	cmpl	$8, %ebx
	jne	LBB0_3
LBB0_11:
	addl	%ebx, %ebx
	jmp	LBB0_18
LBB0_12:
	cmpl	$16, %ebx
	je	LBB0_14
## %bb.13:
	cmpl	$8, %ebx
	jne	LBB0_3
LBB0_14:
	shll	$2, %ebx
	jmp	LBB0_18
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_stop_invalid
LBB0_4:
	cmpl	$16, %ebx
	ja	LBB0_3
## %bb.5:
	movl	$65814, %eax                    ## imm = 0x10116
	btl	%ebx, %eax
	jae	LBB0_3
LBB0_18:
	movl	8(%r14), %edi
	testl	%edi, %edi
	jle	LBB0_19
## %bb.20:
	cmpl	$0, 12(%r14)
	jle	LBB0_21
## %bb.22:
	cmpq	$0, 16(%r14)
	je	LBB0_24
## %bb.23:
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_36
LBB0_19:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_36
LBB0_21:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_36
LBB0_24:
	cmpq	$0, 24(%r14)
	je	LBB0_26
## %bb.25:
	leaq	L_.str.5(%rip), %rsi
LBB0_36:
	movq	%r14, %rdi
	callq	_stop_invalid
LBB0_37:
	movl	36(%r14), %eax
	decl	%eax
	xorl	%edi, %edi
	cmpl	$5, %eax
	setb	%dil
	callq	_assert
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_39
## %bb.38:
	movl	$1, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	movl	32(%r14), %eax
	cmpl	$128, %eax
	je	LBB0_34
## %bb.27:
	cmpl	$129, %eax
	jne	LBB0_35
## %bb.28:
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_29:                                ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %esi
	callq	_PNG_PASS_COLS
	testl	%eax, %eax
	jle	LBB0_31
## %bb.30:                              ##   in Loop: Header=BB0_29 Depth=1
	movl	%eax, %r13d
	leaq	-68(%rbp), %rdi
	movl	$7, %esi
	callq	_uarb_set
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movl	%eax, %r12d
	leaq	-56(%rbp), %rdi
	movl	%r13d, %esi
	callq	_uarb_set
	leaq	-68(%rbp), %r13
	movq	%r13, %rdi
	movl	%r12d, %esi
	leaq	-56(%rbp), %rdx
	movl	%eax, %ecx
	movl	%ebx, %r8d
	callq	_uarb_mult_digit
	movq	%r13, %rdi
	movl	%eax, %esi
	movl	$3, %edx
	callq	_uarb_shift
	movq	%r13, %rdi
	movl	%eax, %esi
	movl	$1, %edx
	callq	_uarb_inc
	movl	%eax, %r12d
	movl	12(%r14), %edi
	movl	40(%r14), %r13d
	movl	%r15d, %esi
	callq	_PNG_PASS_ROWS
	movl	%r13d, %edi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	leaq	-68(%rbp), %rdx
	movl	%r12d, %ecx
	movl	%eax, %r8d
	callq	_uarb_mult32
	movq	%rax, %r12
LBB0_31:                                ##   in Loop: Header=BB0_29 Depth=1
	cmpl	$6, %r15d
	je	LBB0_33
## %bb.32:                              ##   in Loop: Header=BB0_29 Depth=1
	movl	8(%r14), %edi
	incl	%r15d
	jmp	LBB0_29
LBB0_34:
	leaq	-68(%rbp), %r15
	movq	%r15, %rdi
	movl	$7, %esi
	callq	_uarb_set
	movl	%eax, %r12d
	movl	8(%r14), %esi
	leaq	-56(%rbp), %r13
	movq	%r13, %rdi
	callq	_uarb_set
	movq	%r15, %rdi
	movl	%r12d, %esi
	movq	%r13, %rdx
	movl	%eax, %ecx
	movl	%ebx, %r8d
	callq	_uarb_mult_digit
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	$3, %edx
	callq	_uarb_shift
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	$1, %edx
	callq	_uarb_inc
	movl	12(%r14), %r8d
	movl	40(%r14), %edi
	xorl	%esi, %esi
	movq	%r15, %rdx
	movl	%eax, %ecx
	callq	_uarb_mult32
	movl	%eax, 36(%r14)
	jmp	LBB0_37
LBB0_33:
	movl	%r12d, 36(%r14)
	jmp	LBB0_37
LBB0_35:
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_36
LBB0_39:
	callq	___stack_chk_fail
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
LJTI0_0:
	.long	L0_0_set_4
	.long	L0_0_set_2
	.long	L0_0_set_6
	.long	L0_0_set_15
	.long	L0_0_set_9
	.long	L0_0_set_2
	.long	L0_0_set_12
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IHDR: colour type"

L_.str.1:                               ## @.str.1
	.asciz	"IHDR: bit depth"

L_.str.2:                               ## @.str.2
	.asciz	"IHDR: width"

L_.str.3:                               ## @.str.3
	.asciz	"IHDR: height"

L_.str.4:                               ## @.str.4
	.asciz	"IHDR: compression method"

L_.str.5:                               ## @.str.5
	.asciz	"IHDR: filter method"

L_.str.6:                               ## @.str.6
	.asciz	"IHDR: interlace method"

	.no_dead_strip	_calc_image_size
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.calc_image_size
l_switch.table.calc_image_size:
	.long	1                               ## 0x1
	.long	2                               ## 0x2
	.long	8                               ## 0x8
	.long	4                               ## 0x4
	.long	8                               ## 0x8
	.long	8                               ## 0x8
	.long	8                               ## 0x8
	.long	8                               ## 0x8

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calc_image_size
_calc_image_size:                       ; @calc_image_size
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldp	w20, w8, [x0]
	cmp	w8, #6
	b.hi	LBB0_4
; %bb.1:
Lloh3:
	adrp	x9, lJTI0_0@PAGE
Lloh4:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	cmp	w20, #16
	ccmp	w20, #8, #4, ne
	b.ne	LBB0_12
; %bb.3:
	add	w20, w20, w20, lsl #1
	b	LBB0_14
LBB0_4:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_stop_invalid
	b	LBB0_12
LBB0_5:
	sub	w8, w20, #1
	cmp	w8, #8
	b.hs	LBB0_12
; %bb.6:
	mov	w9, #139
	lsr	w9, w9, w8
	tbz	w9, #0, LBB0_12
; %bb.7:
Lloh7:
	adrp	x9, l_switch.table.calc_image_size@PAGE
Lloh8:
	add	x9, x9, l_switch.table.calc_image_size@PAGEOFF
	ldr	w20, [x9, w8, sxtw #2]
	b	LBB0_14
LBB0_8:
	cmp	w20, #16
	ccmp	w20, #8, #4, ne
	b.ne	LBB0_12
; %bb.9:
	lsl	w20, w20, #1
	b	LBB0_14
LBB0_10:
	cmp	w20, #16
	ccmp	w20, #8, #4, ne
	b.ne	LBB0_12
; %bb.11:
	lsl	w20, w20, #2
	b	LBB0_14
LBB0_12:
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_stop_invalid
LBB0_13:
	cmp	w20, #16
	mov	w8, #1
	lsl	w8, w8, w20
	mov	w9, #278
	movk	w9, #1, lsl #16
	and	w8, w8, w9
	ccmp	w8, #0, #4, ls
	b.eq	LBB0_12
LBB0_14:
	ldr	w0, [x19, #8]
	cmp	w0, #0
	b.le	LBB0_18
; %bb.15:
	ldr	w8, [x19, #12]
	cmp	w8, #0
	b.le	LBB0_19
; %bb.16:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_20
; %bb.17:
Lloh11:
	adrp	x1, l_.str.4@PAGE
Lloh12:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_22
LBB0_18:
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_22
LBB0_19:
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_22
LBB0_20:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_25
; %bb.21:
Lloh17:
	adrp	x1, l_.str.5@PAGE
Lloh18:
	add	x1, x1, l_.str.5@PAGEOFF
LBB0_22:
	mov	x0, x19
	bl	_stop_invalid
LBB0_23:
	ldr	w8, [x19, #36]
	sub	w8, w8, #1
	cmp	w8, #5
	cset	w0, lo
	bl	_assert
	ldr	x8, [sp, #24]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_35
; %bb.24:
	mov	w0, #1
	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
	add	sp, sp, #96
	ret
LBB0_25:
	ldr	w8, [x19, #32]
	cmp	w8, #128
	b.eq	LBB0_32
; %bb.26:
	cmp	w8, #129
	b.ne	LBB0_34
; %bb.27:
	mov	w21, #0
	mov	w22, #0
LBB0_28:                                ; =>This Inner Loop Header: Depth=1
	mov	x1, x21
	bl	_PNG_PASS_COLS
	cmp	w0, #1
	b.lt	LBB0_30
; %bb.29:                               ;   in Loop: Header=BB0_28 Depth=1
	mov	x23, x0
	add	x0, sp, #4
	mov	w1, #7
	bl	_uarb_set
	mov	x24, x0
	add	x0, sp, #16
	mov	x1, x23
	bl	_uarb_set
	mov	x3, x0
	add	x0, sp, #4
	add	x2, sp, #16
	mov	x1, x24
	mov	x4, x20
	bl	_uarb_mult_digit
	mov	x1, x0
	add	x0, sp, #4
	mov	w2, #3
	bl	_uarb_shift
	mov	x1, x0
	add	x0, sp, #4
	mov	w2, #1
	bl	_uarb_inc
	mov	x23, x0
	ldr	w24, [x19, #40]
	ldr	w0, [x19, #12]
	mov	x1, x21
	bl	_PNG_PASS_ROWS
	mov	x4, x0
	add	x2, sp, #4
	mov	x0, x24
	mov	x1, x22
	mov	x3, x23
	bl	_uarb_mult32
	mov	x22, x0
LBB0_30:                                ;   in Loop: Header=BB0_28 Depth=1
	cmp	w21, #6
	b.eq	LBB0_33
; %bb.31:                               ;   in Loop: Header=BB0_28 Depth=1
	ldr	w0, [x19, #8]
	add	w21, w21, #1
	b	LBB0_28
LBB0_32:
	add	x0, sp, #4
	mov	w1, #7
	bl	_uarb_set
	mov	x21, x0
	ldr	w1, [x19, #8]
	add	x0, sp, #16
	bl	_uarb_set
	mov	x3, x0
	add	x0, sp, #4
	add	x2, sp, #16
	mov	x1, x21
	mov	x4, x20
	bl	_uarb_mult_digit
	mov	x1, x0
	add	x0, sp, #4
	mov	w2, #3
	bl	_uarb_shift
	mov	x1, x0
	add	x0, sp, #4
	mov	w2, #1
	bl	_uarb_inc
	mov	x3, x0
	ldr	w0, [x19, #40]
	ldr	w4, [x19, #12]
	add	x2, sp, #4
	mov	w1, #0
	bl	_uarb_mult32
	str	w0, [x19, #36]
	b	LBB0_23
LBB0_33:
	str	w22, [x19, #36]
	b	LBB0_23
LBB0_34:
Lloh22:
	adrp	x1, l_.str.6@PAGE
Lloh23:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_22
LBB0_35:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_13-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IHDR: colour type"

l_.str.1:                               ; @.str.1
	.asciz	"IHDR: bit depth"

l_.str.2:                               ; @.str.2
	.asciz	"IHDR: width"

l_.str.3:                               ; @.str.3
	.asciz	"IHDR: height"

l_.str.4:                               ; @.str.4
	.asciz	"IHDR: compression method"

l_.str.5:                               ; @.str.5
	.asciz	"IHDR: filter method"

l_.str.6:                               ; @.str.6
	.asciz	"IHDR: interlace method"

	.no_dead_strip	_calc_image_size
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.calc_image_size
l_switch.table.calc_image_size:
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	8                               ; 0x8
	.long	4                               ; 0x4
	.long	8                               ; 0x8
	.long	8                               ; 0x8
	.long	8                               ; 0x8
	.long	8                               ; 0x8

.subsections_via_symbols
