	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hb_preset_delete               ## -- Begin function hb_preset_delete
	.p2align	4, 0x90
_hb_preset_delete:                      ## @hb_preset_delete
	.cfi_startproc
## %bb.0:
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movups	(%rdi), %xmm0
	movaps	%xmm0, -32(%rbp)
	decl	-32(%rbp)
	leaq	-32(%rbp), %rdi
	callq	_hb_presets_get_folder_children
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_hb_value_array_len
	movq	8(%rbx), %rcx
	movslq	(%rbx), %rdx
	movl	-4(%rcx,%rdx,4), %esi
	cmpl	%esi, %eax
	jle	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_hb_value_array_remove
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_5:
	leaq	L_.str(%rip), %rdi
	callq	_hb_error
	movl	$-1, %eax
LBB0_6:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	movl	$-1, %eax
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hb_preset_delete: not found"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hb_preset_delete               ; -- Begin function hb_preset_delete
	.p2align	2
_hb_preset_delete:                      ; @hb_preset_delete
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_6
; %bb.1:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	q0, [x0]
	str	q0, [sp]
	ldr	w8, [sp]
	sub	w8, w8, #1
	str	w8, [sp]
	mov	x0, sp
	bl	_hb_presets_get_folder_children
	cbz	x0, LBB0_4
; %bb.2:
	mov	x20, x0
	bl	_hb_value_array_len
	ldr	x8, [x19, #8]
	ldrsw	x9, [x19]
	add	x8, x8, x9, lsl #2
	ldur	w1, [x8, #-4]
	cmp	w0, w1
	b.le	LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_hb_value_array_remove
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_hb_error
	mov	w0, #-1
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_6:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	mov	w0, #-1
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hb_preset_delete: not found"

.subsections_via_symbols
