	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_read_sig                   ## -- Begin function png_read_sig
	.p2align	4, 0x90
_png_read_sig:                          ## @png_read_sig
	.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
	movslq	(%rdi), %r12
	cmpq	$7, %r12
	jg	LBB0_9
## %bb.1:
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	$8, %ebx
	subl	%r12d, %ebx
	leaq	(,%r12,4), %rsi
	addq	(%r15), %rsi
	movl	%ebx, %edx
	callq	_png_read_data
	movl	$8, (%r14)
	movq	(%r15), %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	callq	_png_sig_cmp
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	cmpl	$3, %r12d
	jg	LBB0_5
## %bb.3:
	movq	(%r15), %rdi
	movl	$4, %edx
	subl	%r12d, %edx
	movl	%r12d, %esi
	callq	_png_sig_cmp
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_6
LBB0_5:
	leaq	L_.str.1(%rip), %rsi
LBB0_6:
	movq	%r14, %rdi
	callq	_png_error
LBB0_7:
	cmpl	$2, %r12d
	jg	LBB0_9
## %bb.8:
	movq	_PNG_HAVE_PNG_SIGNATURE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%r14)
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Not a PNG file"

L_.str.1:                               ## @.str.1
	.asciz	"PNG file corrupted by ASCII conversion"

	.comm	_PNG_HAVE_PNG_SIGNATURE,4,2     ## @PNG_HAVE_PNG_SIGNATURE
	.comm	_PNG_IO_READING,4,2             ## @PNG_IO_READING
	.comm	_PNG_IO_SIGNATURE,4,2           ## @PNG_IO_SIGNATURE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_read_sig                   ; -- Begin function png_read_sig
	.p2align	2
_png_read_sig:                          ; @png_read_sig
	.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
	ldrsw	x20, [x0]
	cmp	w20, #7
	b.gt	LBB0_9
; %bb.1:
	mov	x21, x1
	mov	x19, x0
	mov	w23, #8
	sub	w22, w23, w20
	ldr	x8, [x1]
	add	x1, x8, x20, lsl #2
	mov	x2, x22
	bl	_png_read_data
	str	w23, [x19]
	ldr	x0, [x21]
	mov	x1, x20
	mov	x2, x22
	bl	_png_sig_cmp
	cbz	x0, LBB0_7
; %bb.2:
	cmp	w20, #3
	b.gt	LBB0_5
; %bb.3:
	ldr	x0, [x21]
	mov	w8, #4
	sub	w2, w8, w20
	mov	x1, x20
	bl	_png_sig_cmp
	cbz	x0, LBB0_5
; %bb.4:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_5:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_6:
	mov	x0, x19
	bl	_png_error
LBB0_7:
	cmp	w20, #2
	b.gt	LBB0_9
; %bb.8:
Lloh4:
	adrp	x8, _PNG_HAVE_PNG_SIGNATURE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PNG_HAVE_PNG_SIGNATURE@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
LBB0_9:
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Not a PNG file"

l_.str.1:                               ; @.str.1
	.asciz	"PNG file corrupted by ASCII conversion"

	.comm	_PNG_HAVE_PNG_SIGNATURE,4,2     ; @PNG_HAVE_PNG_SIGNATURE
	.comm	_PNG_IO_READING,4,2             ; @PNG_IO_READING
	.comm	_PNG_IO_SIGNATURE,4,2           ; @PNG_IO_SIGNATURE
.subsections_via_symbols
