	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gdImageColorClosestHWB         ## -- Begin function gdImageColorClosestHWB
	.p2align	4, 0x90
_gdImageColorClosestHWB:                ## @gdImageColorClosestHWB
	.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	%ecx, %r9d
	movl	%edx, %r8d
	movl	%esi, %ecx
	cmpq	$0, 40(%rdi)
	je	LBB0_1
## %bb.9:
	movl	%ecx, %edi
	movl	%r8d, %esi
	movl	%r9d, %edx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gdTrueColor                    ## TAILCALL
LBB0_1:
	movq	%rdi, %r13
	movl	(%rdi), %esi
	movl	$-1, %r15d
	testl	%esi, %esi
	jle	LBB0_8
## %bb.2:
	movl	$1, %r12d
	xorps	%xmm0, %xmm0
	xorl	%r14d, %r14d
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r13), %esi
	xorl	%r12d, %r12d
	movl	%ebx, %r9d
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r14
	movslq	%esi, %rdx
	cmpq	%rdx, %r14
	jge	LBB0_8
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%r13), %rdx
	cmpq	$0, (%rdx,%r14,8)
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	24(%r13), %rdx
	movl	(%rdx,%r14,4), %edi
	movq	8(%r13), %rbx
	movq	16(%r13), %rdx
	movl	(%rdx,%r14,4), %esi
	movl	(%rbx,%r14,4), %edx
	movl	%r9d, %ebx
	movss	%xmm0, -52(%rbp)                ## 4-byte Spill
	callq	_HWB_Diff
	movss	-52(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	testl	%r12d, %r12d
	setne	%dl
	ucomiss	%xmm0, %xmm1
	seta	%cl
	orb	%dl, %cl
	cmovnel	%r14d, %r15d
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movaps	%xmm1, %xmm0
	jmp	LBB0_6
LBB0_8:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gdImageColorClosestHWB         ; -- Begin function gdImageColorClosestHWB
	.p2align	2
_gdImageColorClosestHWB:                ; @gdImageColorClosestHWB
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-96]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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 b8, -88
	.cfi_offset b9, -96
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	ldr	x8, [x0, #40]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #96               ; 16-byte Folded Reload
	b	_gdTrueColor
LBB0_2:
	mov	x22, x0
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.3:
	mov	x24, #0
	mov	w23, #-1
	mov	w25, #1
	movi	d8, #0000000000000000
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x24, x24, #1
	cmp	x24, w8, sxtw
	b.ge	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x22, #32]
	ldr	x9, [x9, x24, lsl #3]
	cbnz	x9, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x22, #24]
	lsl	x9, x24, #2
	ldr	w0, [x8, x9]
	ldp	x10, x8, [x22, #8]
	ldr	w1, [x8, x9]
	ldr	w2, [x10, x9]
	mov	x3, x21
	mov	x4, x20
	mov	x5, x19
	bl	_HWB_Diff
	fcmp	s0, s8
	ccmp	w25, #0, #0, pl
	csel	w23, w24, w23, ne
	fcsel	s8, s0, s8, ne
	ldr	w8, [x22]
	mov	w25, #0
	b	LBB0_4
LBB0_7:
	mov	w23, #-1
LBB0_8:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #96               ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
