	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_write_hIST                 ## -- Begin function png_write_hIST
	.p2align	4, 0x90
_png_write_hIST:                        ## @png_write_hIST
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_png_debug
	movq	(%r12), %rcx
	cmpl	%r15d, %ecx
	jge	LBB0_3
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	movl	$3, %edi
	movl	%r15d, %edx
	callq	_png_debug2
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_8
## %bb.2:
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_png_warning                    ## TAILCALL
LBB0_3:
	movq	_png_hIST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leal	(%r15,%r15), %edx
	movq	%r12, %rdi
	callq	_png_write_chunk_start
	testl	%r15d, %r15d
	jle	LBB0_6
## %bb.4:
	movl	%r15d, %r15d
	xorl	%ebx, %ebx
	leaq	-60(%rbp), %r13
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14,%rbx,4), %esi
	movq	%r13, %rdi
	callq	_png_save_uint_16
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	$2, %edx
	callq	_png_write_chunk_data
	incq	%rbx
	cmpq	%rbx, %r15
	jne	LBB0_5
LBB0_6:
	movq	%r12, %rdi
	callq	_png_write_chunk_end
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"in png_write_hIST\n"

L_.str.1:                               ## @.str.1
	.asciz	"num_hist = %d, num_palette = %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Invalid number of histogram entries specified"

	.comm	_png_hIST,4,2                   ## @png_hIST
	.comm	_PNG_hIST,4,2                   ## @PNG_hIST
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_write_hIST                 ; -- Begin function png_write_hIST
	.p2align	2
_png_write_hIST:                        ; @png_write_hIST
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x2
	mov	x20, x1
	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]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_png_debug
	ldr	x3, [x19]
	cmp	w3, w21
	b.ge	LBB0_3
; %bb.1:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #3
	mov	x2, x21
	bl	_png_debug2
	ldr	x8, [sp, #24]
Lloh7:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh8:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.2:
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_png_warning
LBB0_3:
Lloh12:
	adrp	x8, _png_hIST@GOTPAGE
Lloh13:
	ldr	x8, [x8, _png_hIST@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	lsl	w2, w21, #1
	mov	x0, x19
	bl	_png_write_chunk_start
	cmp	w21, #1
	b.lt	LBB0_6
; %bb.4:
	mov	w21, w21
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x20], #4
	add	x0, sp, #12
	bl	_png_save_uint_16
	add	x1, sp, #12
	mov	x0, x19
	mov	w2, #2
	bl	_png_write_chunk_data
	subs	x21, x21, #1
	b.ne	LBB0_5
LBB0_6:
	mov	x0, x19
	bl	_png_write_chunk_end
	ldr	x8, [sp, #24]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"in png_write_hIST\n"

l_.str.1:                               ; @.str.1
	.asciz	"num_hist = %d, num_palette = %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Invalid number of histogram entries specified"

	.comm	_png_hIST,4,2                   ; @png_hIST
	.comm	_PNG_hIST,4,2                   ; @PNG_hIST
.subsections_via_symbols
