	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ReadTransparentPaletteData
_ReadTransparentPaletteData:            ## @ReadTransparentPaletteData
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r14d
	movq	%r8, -120(%rbp)                 ## 8-byte Spill
	movq	%rcx, -112(%rbp)                ## 8-byte Spill
	movl	%edx, %r12d
	movl	%esi, %r13d
	movq	%rdi, %rbx
	movq	_HPDF_OK@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movl	%esi, %edi
	movl	%edx, %esi
	callq	_png_get_image_height
	movl	%eax, %r15d
	movl	%r13d, %edi
	movl	%r12d, %esi
	callq	_png_get_image_width
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %edi
	leal	(,%r15,8), %esi
	callq	_HPDF_GetMem
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movslq	%r15d, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	%r13d, -88(%rbp)                ## 4-byte Spill
	movl	%r13d, %edi
	movl	%r12d, %esi
	callq	_png_get_rowbytes
	movq	%r15, -96(%rbp)                 ## 8-byte Spill
	testl	%r15d, %r15d
	movq	-104(%rbp), %r13                ## 8-byte Reload
	je	LBB0_14
## %bb.3:
	movl	%eax, %r12d
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	cmpq	$2, %rax
	movl	$1, %r15d
	cmovaeq	%rax, %r15
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movl	%r12d, %esi
	callq	_HPDF_GetMem
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	testq	%rax, %rax
	je	LBB0_4
## %bb.12:
	decq	%r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%rbx, %r15
	je	LBB0_14
## %bb.5:                               ##   in Loop: Header=BB0_13 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movl	%r12d, %esi
	callq	_HPDF_GetMem
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, 8(%rcx,%rbx,8)
	incq	%rbx
	testq	%rax, %rax
	jne	LBB0_13
## %bb.6:
	cmpq	-72(%rbp), %rbx                 ## 8-byte Folded Reload
	setb	-80(%rbp)                       ## 1-byte Folded Spill
	jmp	LBB0_7
LBB0_4:
	movb	$1, -80(%rbp)                   ## 1-byte Folded Spill
	xorl	%ebx, %ebx
LBB0_7:
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	testq	%rbx, %rbx
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_11
## %bb.8:
	movl	(%r12), %edi
	movq	%rax, %rsi
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_HPDF_FreeMem
	decq	%rbx
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_10 Depth=1
	movq	(%r15,%rbx,8), %rsi
	movl	(%r12), %edi
	jmp	LBB0_10
LBB0_11:
	movl	(%r12), %edi
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_HPDF_FreeMem
	cmpb	$0, -80(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_14
LBB0_1:
	movq	_HPDF_FAILD_TO_ALLOC_MEM@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	jmp	LBB0_39
LBB0_14:
	movl	-88(%rbp), %edi                 ## 4-byte Reload
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_png_read_image
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	8(%r15), %rax
	movq	(%rax), %rax
	movq	_HPDF_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_31
## %bb.15:
	cmpl	$0, -96(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_38
## %bb.16:
	movl	-60(%rbp), %ebx                 ## 4-byte Reload
	movslq	%ebx, %rcx
	cmpq	$2, %rcx
	movl	$1, %r12d
	cmovaeq	%rcx, %r12
	movl	$1, %edx
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	cmpq	$2, %rax
	cmovaeq	%rax, %rdx
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	movq	%r12, %rax
	movq	%r12, -136(%rbp)                ## 8-byte Spill
	andq	$-2, %r12
	movq	-112(%rbp), %rax                ## 8-byte Reload
	leaq	4(%rax), %r15
	movq	%rcx, -128(%rbp)                ## 8-byte Spill
	leaq	(,%rcx,4), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_17:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_20 Depth 2
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%r13,8), %rsi
	testl	%ebx, %ebx
	je	LBB0_29
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	xorl	%eax, %eax
	cmpl	$1, %ebx
	jne	LBB0_19
LBB0_25:                                ##   in Loop: Header=BB0_17 Depth=1
	testb	$1, -136(%rbp)                  ## 1-byte Folded Reload
	movl	-60(%rbp), %ebx                 ## 4-byte Reload
	je	LBB0_29
## %bb.26:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	%r13, %rcx
	imulq	-128(%rbp), %rcx                ## 8-byte Folded Reload
	movslq	(%rsi,%rax,4), %rdi
	movl	$255, %edx
	cmpl	%r14d, %edi
	jge	LBB0_28
## %bb.27:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	-120(%rbp), %rdx                ## 8-byte Reload
	movl	(%rdx,%rdi,4), %edx
LBB0_28:                                ##   in Loop: Header=BB0_17 Depth=1
	addq	%rcx, %rax
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	movl	%edx, (%rcx,%rax,4)
LBB0_29:                                ##   in Loop: Header=BB0_17 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %edi
	movl	%ebx, %edx
	callq	_HPDF_Stream_Write
	movq	_HPDF_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_30
## %bb.32:                              ##   in Loop: Header=BB0_17 Depth=1
	incq	%r13
	addq	-80(%rbp), %r15                 ## 8-byte Folded Reload
	cmpq	-88(%rbp), %r13                 ## 8-byte Folded Reload
	jne	LBB0_17
	jmp	LBB0_33
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_17 Depth=1
	movq	-120(%rbp), %rbx                ## 8-byte Reload
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_20 Depth=2
	movl	%ecx, (%r15,%rax,4)
	addq	$2, %rax
	cmpq	%rax, %r12
	je	LBB0_25
LBB0_20:                                ##   Parent Loop BB0_17 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movslq	(%rsi,%rax,4), %rdx
	movl	$255, %ecx
	movl	$255, %edi
	cmpl	%r14d, %edx
	jge	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=2
	movl	(%rbx,%rdx,4), %edi
LBB0_22:                                ##   in Loop: Header=BB0_20 Depth=2
	movl	%edi, -4(%r15,%rax,4)
	movslq	4(%rsi,%rax,4), %rdx
	cmpl	%r14d, %edx
	jge	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_20 Depth=2
	movl	(%rbx,%rdx,4), %ecx
	jmp	LBB0_24
LBB0_31:
	movq	_HPDF_INVALID_PNG_IMAGE@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	cmpl	$0, -96(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_36
	jmp	LBB0_38
LBB0_30:
	movq	_HPDF_FILE_IO_ERROR@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	jmp	LBB0_34
LBB0_33:
	movq	-104(%rbp), %r13                ## 8-byte Reload
LBB0_34:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	cmpl	$0, -96(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_38
LBB0_36:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	cmpq	$2, %rax
	movl	$1, %r14d
	cmovaeq	%rax, %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_37:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	movq	(%r12,%rbx,8), %rsi
	xorl	%eax, %eax
	callq	_HPDF_FreeMem
	incq	%rbx
	cmpq	%rbx, %r14
	jne	LBB0_37
LBB0_38:
	movl	(%r15), %edi
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_HPDF_FreeMem
LBB0_39:
	movq	%r13, %rax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HPDF_OK,8,3                    ## @HPDF_OK
	.comm	_HPDF_FAILD_TO_ALLOC_MEM,8,3    ## @HPDF_FAILD_TO_ALLOC_MEM
	.comm	_HPDF_INVALID_PNG_IMAGE,8,3     ## @HPDF_INVALID_PNG_IMAGE
	.comm	_HPDF_FILE_IO_ERROR,8,3         ## @HPDF_FILE_IO_ERROR
	.no_dead_strip	_ReadTransparentPaletteData
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ReadTransparentPaletteData
_ReadTransparentPaletteData:            ; @ReadTransparentPaletteData
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x5
	mov	x23, x4
	mov	x24, x3
	mov	x27, x2
	mov	x26, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _HPDF_OK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HPDF_OK@GOTPAGEOFF]
Lloh2:
	ldr	x19, [x8]
	mov	x0, x1
	mov	x1, x2
	bl	_png_get_image_height
	mov	x28, x0
	mov	x0, x26
	mov	x1, x27
	bl	_png_get_image_width
	mov	x25, x0
	ldr	w0, [x20]
	lsl	w1, w28, #3
	bl	_HPDF_GetMem
	cbz	x0, LBB0_12
; %bb.1:
	mov	x21, x0
	str	x19, [sp, #8]                   ; 8-byte Folded Spill
	sxtw	x19, w28
	str	w26, [sp, #20]                  ; 4-byte Folded Spill
	mov	x0, x26
	mov	x1, x27
	bl	_png_get_rowbytes
	str	x19, [sp, #24]                  ; 8-byte Folded Spill
	cbz	w19, LBB0_13
; %bb.2:
	mov	x27, x0
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	cmp	x8, #1
	csinc	x26, x8, xzr, hi
	ldr	w0, [x20]
	mov	x1, x27
	bl	_HPDF_GetMem
	str	x0, [x21]
	mov	x19, #0
	cbz	x0, LBB0_7
; %bb.3:
	add	x28, x21, #8
	sub	x26, x26, #1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x26, x19
	b.eq	LBB0_13
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x20]
	mov	x1, x27
	bl	_HPDF_GetMem
	str	x0, [x28, x19, lsl #3]
	add	x19, x19, #1
	cbnz	x0, LBB0_4
; %bb.6:
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	cmp	x19, x8
	cset	w27, lo
	cbnz	x19, LBB0_8
	b	LBB0_11
LBB0_7:
	mov	w27, #1
	cbz	x19, LBB0_11
LBB0_8:
	ldr	w8, [x20]
	str	x0, [sp]
	mov	x0, x8
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	bl	_HPDF_FreeMem
	subs	x19, x19, #1
	b.eq	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [x21, x19, lsl #3]
	ldr	w0, [x20]
	str	x8, [sp]
	b	LBB0_9
LBB0_11:
	ldr	w0, [x20]
	str	x21, [sp]
	bl	_HPDF_FreeMem
	tbz	w27, #0, LBB0_13
LBB0_12:
Lloh3:
	adrp	x8, _HPDF_FAILD_TO_ALLOC_MEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HPDF_FAILD_TO_ALLOC_MEM@GOTPAGEOFF]
Lloh5:
	ldr	x23, [x8]
	b	LBB0_32
LBB0_13:
	ldr	w0, [sp, #20]                   ; 4-byte Folded Reload
	mov	x1, x21
	bl	_png_read_image
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _HPDF_OK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _HPDF_OK@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_25
; %bb.14:
	ldr	x9, [sp, #24]                   ; 8-byte Folded Reload
	cbz	w9, LBB0_26
; %bb.15:
	mov	x26, #0
	sxtw	x8, w25
	cmp	x8, #1
	csinc	x27, x8, xzr, hi
	cmp	x9, #1
	csinc	x19, x9, xzr, hi
	sbfiz	x28, x25, #2, #32
LBB0_16:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_20 Depth 2
	ldr	x1, [x21, x26, lsl #3]
	cbz	w25, LBB0_22
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	x8, x1
	mov	x9, x24
	mov	x10, x27
	b	LBB0_20
LBB0_18:                                ;   in Loop: Header=BB0_20 Depth=2
	ldr	w11, [x23, x11, lsl #2]
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=2
	str	w11, [x9], #4
	add	x8, x8, #4
	subs	x10, x10, #1
	b.eq	LBB0_22
LBB0_20:                                ;   Parent Loop BB0_16 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrsw	x11, [x8]
	cmp	w11, w22
	b.lt	LBB0_18
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=2
	mov	w11, #255
	b	LBB0_19
LBB0_22:                                ;   in Loop: Header=BB0_16 Depth=1
	ldr	w0, [x20, #4]
	mov	x2, x25
	bl	_HPDF_Stream_Write
Lloh9:
	adrp	x8, _HPDF_OK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HPDF_OK@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_27
; %bb.23:                               ;   in Loop: Header=BB0_16 Depth=1
	add	x26, x26, #1
	add	x24, x24, x28
	cmp	x26, x19
	b.ne	LBB0_16
; %bb.24:
	ldr	x23, [sp, #8]                   ; 8-byte Folded Reload
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	cbnz	w8, LBB0_29
	b	LBB0_31
LBB0_25:
Lloh12:
	adrp	x8, _HPDF_INVALID_PNG_IMAGE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HPDF_INVALID_PNG_IMAGE@GOTPAGEOFF]
	b	LBB0_28
LBB0_26:
	ldr	x23, [sp, #8]                   ; 8-byte Folded Reload
	b	LBB0_31
LBB0_27:
Lloh14:
	adrp	x8, _HPDF_FILE_IO_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _HPDF_FILE_IO_ERROR@GOTPAGEOFF]
LBB0_28:
	ldr	x23, [x8]
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	cbz	w8, LBB0_31
LBB0_29:
	cmp	x8, #1
	csinc	x19, x8, xzr, hi
	mov	x22, x21
LBB0_30:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	ldr	x8, [x22], #8
	str	x8, [sp]
	bl	_HPDF_FreeMem
	subs	x19, x19, #1
	b.ne	LBB0_30
LBB0_31:
	ldr	w0, [x20]
	str	x21, [sp]
	bl	_HPDF_FreeMem
LBB0_32:
	mov	x0, x23
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_HPDF_OK,8,3                    ; @HPDF_OK
	.comm	_HPDF_FAILD_TO_ALLOC_MEM,8,3    ; @HPDF_FAILD_TO_ALLOC_MEM
	.comm	_HPDF_INVALID_PNG_IMAGE,8,3     ; @HPDF_INVALID_PNG_IMAGE
	.comm	_HPDF_FILE_IO_ERROR,8,3         ; @HPDF_FILE_IO_ERROR
	.no_dead_strip	_ReadTransparentPaletteData
.subsections_via_symbols
