	.file	"extr_pngrutil.c_png_handle_sBIT.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"in png_handle_sBIT"
.LC1:
	.string	"missing IHDR"
.LC2:
	.string	"out of place"
.LC3:
	.string	"duplicate"
.LC4:
	.string	"invalid"
	.text
	.p2align 4
	.globl	png_handle_sBIT
	.type	png_handle_sBIT, @function
png_handle_sBIT:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, edx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rsi
	lea	rsi, .LC0[rip]
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	mov	edi, 1
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	call	png_debug@PLT
	mov	edx, DWORD PTR 0[rbp]
	test	DWORD PTR PNG_HAVE_IHDR[rip], edx
	je	.L35
	mov	eax, DWORD PTR PNG_HAVE_IDAT[rip]
	or	eax, DWORD PTR PNG_HAVE_PLTE[rip]
	test	eax, edx
	jne	.L36
.L3:
	test	r13, r13
	je	.L5
	mov	eax, DWORD PTR 0[r13]
	test	DWORD PTR PNG_INFO_sBIT[rip], eax
	jne	.L37
.L5:
	mov	eax, DWORD PTR PNG_COLOR_TYPE_PALETTE[rip]
	cmp	DWORD PTR 4[rbp], eax
	je	.L17
	mov	r15d, DWORD PTR 8[rbp]
	mov	r12, QWORD PTR 56[rbp]
	cmp	r15d, r14d
	jne	.L18
.L40:
	cmp	r14d, 4
	ja	.L18
	mov	rbx, rsp
	mov	rdi, rbp
	mov	edx, r15d
	mov	QWORD PTR 24[rsp], r12
	mov	rsi, rbx
	mov	QWORD PTR 16[rsp], r12
	mov	QWORD PTR 8[rsp], r12
	mov	QWORD PTR [rsp], r12
	call	png_crc_read@PLT
	xor	esi, esi
	mov	rdi, rbp
	call	png_crc_finish@PLT
	test	rax, rax
	jne	.L1
	test	r15d, r15d
	je	.L9
	lea	edx, -1[r15]
	mov	rax, rbx
	lea	rcx, 8[rsp+rdx*8]
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L38:
	cmp	rdx, r12
	ja	.L19
	add	rax, 8
	cmp	rcx, rax
	je	.L9
.L12:
	mov	rdx, QWORD PTR [rax]
	test	rdx, rdx
	jne	.L38
.L19:
	lea	rsi, .LC4[rip]
	mov	rdi, rbp
	call	png_chunk_benign_error@PLT
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L39
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	r15d, 3
	mov	r12d, 8
	cmp	r15d, r14d
	je	.L40
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rdi, rbp
	lea	rsi, .LC4[rip]
	call	png_chunk_benign_error@PLT
	mov	esi, r14d
	mov	rdi, rbp
	call	png_crc_finish@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L35:
	lea	rsi, .LC1[rip]
	mov	rdi, rbp
	call	png_chunk_error@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L37:
	mov	esi, r14d
	mov	rdi, rbp
	call	png_crc_finish@PLT
	lea	rsi, .LC3[rip]
	mov	rdi, rbp
	call	png_chunk_benign_error@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L36:
	mov	esi, r14d
	mov	rdi, rbp
	call	png_crc_finish@PLT
	lea	rsi, .LC2[rip]
	mov	rdi, rbp
	call	png_chunk_benign_error@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rax, QWORD PTR [rsp]
	mov	rdx, QWORD PTR 8[rsp]
	mov	ecx, DWORD PTR 4[rbp]
	test	DWORD PTR PNG_COLOR_MASK_COLOR[rip], ecx
	je	.L13
	mov	QWORD PTR 40[rbp], rax
	mov	rax, QWORD PTR 16[rsp]
	mov	QWORD PTR 32[rbp], rdx
	mov	QWORD PTR 24[rbp], rax
	mov	rax, QWORD PTR 24[rsp]
	mov	QWORD PTR 16[rbp], rax
.L14:
	lea	rdx, 16[rbp]
	mov	rsi, r13
	mov	rdi, rbp
	call	png_set_sBIT@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L13:
	mov	QWORD PTR 48[rbp], rax
	mov	QWORD PTR 40[rbp], rax
	mov	QWORD PTR 32[rbp], rax
	mov	QWORD PTR 24[rbp], rax
	mov	QWORD PTR 16[rbp], rdx
	jmp	.L14
.L39:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	png_handle_sBIT, .-png_handle_sBIT
	.comm	PNG_INFO_sBIT,4,4
	.comm	PNG_HAVE_PLTE,4,4
	.comm	PNG_HAVE_IHDR,4,4
	.comm	PNG_HAVE_IDAT,4,4
	.comm	PNG_COLOR_TYPE_PALETTE,4,4
	.comm	PNG_COLOR_MASK_COLOR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_pngrutil.c_png_handle_sBIT.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"in png_handle_sBIT\000"
	.align	2
.LC1:
	.ascii	"missing IHDR\000"
	.align	2
.LC2:
	.ascii	"out of place\000"
	.align	2
.LC3:
	.ascii	"duplicate\000"
	.align	2
.LC4:
	.ascii	"invalid\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	png_handle_sBIT
	.syntax unified
	.arm
	.fpu softvfp
	.type	png_handle_sBIT, %function
png_handle_sBIT:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r4, r0
	ldr	r3, .L36
	sub	sp, sp, #28
	mov	r5, r1
	mov	r0, #1
	ldr	r1, .L36+4
	mov	r8, r2
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	bl	png_debug
	ldr	r3, .L36+8
	ldr	r2, [r4]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L31
	ldr	r3, .L36+12
	ldr	r1, .L36+16
	ldr	r3, [r3]
	ldr	r1, [r1]
	orr	r3, r3, r1
	tst	r3, r2
	bne	.L32
.L3:
	cmp	r5, #0
	beq	.L5
	ldr	r3, .L36+20
	ldr	r2, [r5]
	ldr	r3, [r3]
	tst	r2, r3
	bne	.L33
.L5:
	ldr	r3, .L36+24
	ldr	r2, [r4, #4]
	ldr	r3, [r3]
	cmp	r2, r3
	moveq	r7, #3
	ldrne	r7, [r4, #8]
	moveq	r6, #8
	ldrne	r6, [r4, #32]
	cmp	r8, #4
	cmpls	r7, r8
	movne	r9, #1
	moveq	r9, #0
	bne	.L34
	mov	r2, r7
	add	r1, sp, #4
	mov	r0, r4
	str	r6, [sp, #16]
	str	r6, [sp, #12]
	str	r6, [sp, #8]
	str	r6, [sp, #4]
	bl	png_crc_read
	mov	r1, r9
	mov	r0, r4
	bl	png_crc_finish
	subs	ip, r0, #0
	bne	.L1
	cmp	r7, #0
	beq	.L8
	add	r2, sp, #4
	b	.L10
.L9:
	add	ip, ip, #1
	cmp	r7, ip
	beq	.L8
.L10:
	ldr	r0, [r2], #4
	cmp	r0, r6
	movls	r3, #0
	movhi	r3, #1
	cmp	r0, #0
	moveq	r3, #1
	cmp	r3, #0
	beq	.L9
	mov	r0, r4
	ldr	r1, .L36+28
	bl	png_chunk_benign_error
	b	.L1
.L34:
	ldr	r1, .L36+28
	mov	r0, r4
	bl	png_chunk_benign_error
	mov	r1, r8
	mov	r0, r4
	bl	png_crc_finish
.L1:
	ldr	r3, .L36
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L35
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L31:
	mov	r0, r4
	ldr	r1, .L36+32
	bl	png_chunk_error
	b	.L3
.L33:
	mov	r1, r8
	mov	r0, r4
	bl	png_crc_finish
	mov	r0, r4
	ldr	r1, .L36+36
	bl	png_chunk_benign_error
	b	.L1
.L32:
	mov	r1, r8
	mov	r0, r4
	bl	png_crc_finish
	mov	r0, r4
	ldr	r1, .L36+40
	bl	png_chunk_benign_error
	b	.L1
.L8:
	ldr	r3, .L36+44
	ldr	r1, [r4, #4]
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	tst	r1, r2
	ldr	r2, [sp, #8]
	beq	.L11
	ldr	r0, [sp, #12]
	ldr	r1, [sp, #16]
	str	r3, [r4, #24]
	str	r2, [r4, #20]
	str	r0, [r4, #16]
	str	r1, [r4, #12]
.L12:
	mov	r1, r5
	mov	r0, r4
	add	r2, r4, #12
	bl	png_set_sBIT
	b	.L1
.L11:
	str	r3, [r4, #28]
	str	r3, [r4, #24]
	str	r3, [r4, #20]
	str	r3, [r4, #16]
	str	r2, [r4, #12]
	b	.L12
.L35:
	bl	__stack_chk_fail
.L37:
	.align	2
.L36:
	.word	.LC5
	.word	.LC0
	.word	PNG_HAVE_IHDR
	.word	PNG_HAVE_IDAT
	.word	PNG_HAVE_PLTE
	.word	PNG_INFO_sBIT
	.word	PNG_COLOR_TYPE_PALETTE
	.word	.LC4
	.word	.LC1
	.word	.LC3
	.word	.LC2
	.word	PNG_COLOR_MASK_COLOR
	.size	png_handle_sBIT, .-png_handle_sBIT
	.comm	PNG_INFO_sBIT,4,4
	.comm	PNG_HAVE_PLTE,4,4
	.comm	PNG_HAVE_IHDR,4,4
	.comm	PNG_HAVE_IDAT,4,4
	.comm	PNG_COLOR_TYPE_PALETTE,4,4
	.comm	PNG_COLOR_MASK_COLOR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
