	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function image_transform_png_set_gray_to_rgb_mod
_image_transform_png_set_gray_to_rgb_mod: ## @image_transform_png_set_gray_to_rgb_mod
	.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
	movq	%rcx, %r15
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movl	(%rsi), %eax
	movq	_PNG_COLOR_MASK_COLOR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_3
## %bb.1:
	cmpq	$0, 16(%rbx)
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_image_pixel_add_alpha
	movl	(%rbx), %eax
LBB0_3:
	movq	_PNG_COLOR_TYPE_GRAY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_6
## %bb.4:
	movq	_PNG_COLOR_TYPE_RGB@GOTPCREL(%rip), %rax
	cmpl	$7, 4(%rbx)
	jg	LBB0_8
## %bb.5:
	movabsq	$34359738376, %rcx              ## imm = 0x800000008
	movq	%rcx, 4(%rbx)
	jmp	LBB0_8
LBB0_6:
	movq	_PNG_COLOR_TYPE_GRAY_ALPHA@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_9
## %bb.7:
	movq	_PNG_COLOR_TYPE_RGB_ALPHA@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
	movl	%eax, (%rbx)
LBB0_9:
	movq	(%r12), %rdi
	movq	(%rdi), %rax
	movq	%rbx, %rsi
	movl	%r14d, %edx
	movq	%r15, %rcx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PNG_COLOR_MASK_COLOR,4,2       ## @PNG_COLOR_MASK_COLOR
	.comm	_PNG_COLOR_TYPE_GRAY,4,2        ## @PNG_COLOR_TYPE_GRAY
	.comm	_PNG_COLOR_TYPE_RGB,4,2         ## @PNG_COLOR_TYPE_RGB
	.comm	_PNG_COLOR_TYPE_GRAY_ALPHA,4,2  ## @PNG_COLOR_TYPE_GRAY_ALPHA
	.comm	_PNG_COLOR_TYPE_RGB_ALPHA,4,2   ## @PNG_COLOR_TYPE_RGB_ALPHA
	.no_dead_strip	_image_transform_png_set_gray_to_rgb_mod
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function image_transform_png_set_gray_to_rgb_mod
_image_transform_png_set_gray_to_rgb_mod: ; @image_transform_png_set_gray_to_rgb_mod
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _PNG_COLOR_MASK_COLOR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PNG_COLOR_MASK_COLOR@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_3
; %bb.1:
	ldr	x9, [x21, #16]
	cbz	x9, LBB0_3
; %bb.2:
	mov	x0, x21
	mov	x1, x19
	mov	w2, #0
	bl	_image_pixel_add_alpha
	ldr	w8, [x21]
LBB0_3:
Lloh3:
	adrp	x9, _PNG_COLOR_TYPE_GRAY@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PNG_COLOR_TYPE_GRAY@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_7
; %bb.4:
	ldr	w8, [x21, #4]
	cmp	w8, #7
	b.gt	LBB0_6
; %bb.5:
	movi.2s	v0, #8
	stur	d0, [x21, #4]
LBB0_6:
Lloh6:
	adrp	x8, _PNG_COLOR_TYPE_RGB@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PNG_COLOR_TYPE_RGB@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
Lloh8:
	adrp	x9, _PNG_COLOR_TYPE_GRAY_ALPHA@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PNG_COLOR_TYPE_GRAY_ALPHA@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_10
; %bb.8:
Lloh11:
	adrp	x8, _PNG_COLOR_TYPE_RGB_ALPHA@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PNG_COLOR_TYPE_RGB_ALPHA@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	str	w8, [x21]
LBB0_10:
	ldr	x0, [x22]
	ldr	x4, [x0]
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	br	x4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_PNG_COLOR_MASK_COLOR,4,2       ; @PNG_COLOR_MASK_COLOR
	.comm	_PNG_COLOR_TYPE_GRAY,4,2        ; @PNG_COLOR_TYPE_GRAY
	.comm	_PNG_COLOR_TYPE_RGB,4,2         ; @PNG_COLOR_TYPE_RGB
	.comm	_PNG_COLOR_TYPE_GRAY_ALPHA,4,2  ; @PNG_COLOR_TYPE_GRAY_ALPHA
	.comm	_PNG_COLOR_TYPE_RGB_ALPHA,4,2   ; @PNG_COLOR_TYPE_RGB_ALPHA
	.no_dead_strip	_image_transform_png_set_gray_to_rgb_mod
.subsections_via_symbols
