	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hb_save_preview                ## -- Begin function hb_save_preview
	.p2align	4, 0x90
_hb_save_preview:                       ## @hb_save_preview
	.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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_hb_get_instance_id
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	callq	_hb_get_temporary_filename
	movq	%rax, %r14
	leaq	L_.str.1(%rip), %rsi
	movq	%rax, %rdi
	callq	_hb_fopen
	movq	%rax, -136(%rbp)                ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	%r14, -144(%rbp)                ## 8-byte Spill
	movl	8(%rbx), %eax
	testl	%eax, %eax
	js	LBB0_16
## %bb.2:
	xorl	%esi, %esi
	movq	%rbx, -152(%rbp)                ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-152(%rbp), %rbx                ## 8-byte Reload
	movl	8(%rbx), %eax
	movq	-160(%rbp), %rsi                ## 8-byte Reload
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	leaq	1(%rsi), %rcx
	movslq	%eax, %rdx
	cmpq	%rdx, %rsi
	movq	%rcx, %rsi
	jge	LBB0_16
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movq	(%rbx), %rcx
	leaq	(%rsi,%rsi,2), %rdx
	movl	8(%rcx,%rdx,8), %r15d
	testl	%r15d, %r15d
	jle	LBB0_15
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rsi, -160(%rbp)                ## 8-byte Spill
	movl	4(%rcx,%rdx,8), %r13d
	movslq	(%rcx,%rdx,8), %r12
	movq	16(%rcx,%rdx,8), %r14
	shlq	$2, %r12
	xorl	%ebx, %ebx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=2
	incl	%ebx
	addq	%r12, %r14
	cmpl	%ebx, %r15d
	je	LBB0_14
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r14, %rdi
	movl	%r13d, %esi
	movl	$1, %edx
	movq	-136(%rbp), %rcx                ## 8-byte Reload
	callq	_fwrite
	cmpl	%r13d, %eax
	jge	LBB0_13
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	-136(%rbp), %rdi                ## 8-byte Reload
	callq	_ferror
	testq	%rax, %rax
	je	LBB0_13
## %bb.7:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-128(%rbp), %rsi
	movl	$79, %edx
	callq	_strerror_r
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.2(%rip), %rsi
	leaq	-128(%rbp), %rdi
	callq	_strcpy
LBB0_9:
	leaq	L_.str.4(%rip), %rdi
	leaq	-128(%rbp), %rcx
	movl	%ebx, %esi
	movq	-144(%rbp), %rdx                ## 8-byte Reload
	xorl	%eax, %eax
	callq	_hb_error
LBB0_16:
	movq	-144(%rbp), %rdi                ## 8-byte Reload
	callq	_free
	movq	-136(%rbp), %rdi                ## 8-byte Reload
	callq	_fclose
	xorl	%eax, %eax
	jmp	LBB0_17
LBB0_10:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-128(%rbp), %rsi
	movl	$79, %edx
	callq	_strerror_r
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	leaq	L_.str.2(%rip), %rsi
	leaq	-128(%rbp), %rdi
	callq	_strcpy
LBB0_12:
	leaq	L_.str.3(%rip), %rdi
	leaq	-128(%rbp), %rdx
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_hb_error
	movq	%r14, %rdi
	callq	_free
	movl	$-1, %eax
LBB0_17:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_19
## %bb.18:
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d_%d_%d"

L_.str.1:                               ## @.str.1
	.asciz	"wb"

	.comm	_errno,4,2                      ## @errno
L_.str.2:                               ## @.str.2
	.asciz	"unknown -- strerror_r() failed"

L_.str.3:                               ## @.str.3
	.asciz	"hb_save_preview: Failed to open %s (reason: %s)"

L_.str.4:                               ## @.str.4
	.asciz	"hb_save_preview: Failed to write line %d to %s (reason: %s). Preview will be incomplete."

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hb_save_preview                ; -- Begin function hb_save_preview
	.p2align	2
_hb_save_preview:                       ; @hb_save_preview
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x28, x27, [sp, #112]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #128]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #144]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.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	x21, x3
	mov	x19, x2
	mov	x20, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	bl	_hb_get_instance_id
	mov	x1, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x20
	mov	x3, x19
	bl	_hb_get_temporary_filename
	mov	x19, x0
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_hb_fopen
	cbz	x0, LBB0_14
; %bb.1:
	mov	x20, x0
	ldr	w8, [x21, #8]
	tbnz	w8, #31, LBB0_13
; %bb.2:
	mov	x24, #0
	mov	w25, #24
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x21, #8]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	cmp	x24, w8, sxtw
	add	x24, x24, #1
	b.ge	LBB0_13
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	ldr	x9, [x21]
	madd	x10, x24, x25, x9
	ldr	w27, [x10, #8]
	cmp	w27, #1
	b.lt	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w26, #0
	ldr	w22, [x10, #4]
	madd	x8, x24, x25, x9
	ldrsw	x9, [x8]
	ldr	x23, [x8, #16]
	lsl	x28, x9, #2
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
	add	w26, w26, #1
	add	x23, x23, x28
	cmp	w27, w26
	b.eq	LBB0_3
LBB0_8:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x23
	mov	x1, x22
	mov	w2, #1
	mov	x3, x20
	bl	_fwrite
	cmp	w0, w22
	b.ge	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	mov	x0, x20
	bl	_ferror
	cbz	x0, LBB0_7
; %bb.10:
Lloh7:
	adrp	x8, _errno@GOTPAGE
Lloh8:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	add	x21, sp, #24
	add	x1, sp, #24
	mov	w2, #79
	bl	_strerror_r
	cbz	x0, LBB0_12
; %bb.11:
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x0, sp, #24
	bl	_strcpy
LBB0_12:
	stp	x19, x21, [sp, #8]
	str	x26, [sp]
Lloh12:
	adrp	x0, l_.str.4@PAGE
Lloh13:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_hb_error
LBB0_13:
	mov	x0, x19
	bl	_free
	mov	x0, x20
	bl	_fclose
	mov	w0, #0
	b	LBB0_17
LBB0_14:
Lloh14:
	adrp	x8, _errno@GOTPAGE
Lloh15:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	add	x20, sp, #24
	add	x1, sp, #24
	mov	w2, #79
	bl	_strerror_r
	cbz	x0, LBB0_16
; %bb.15:
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x0, sp, #24
	bl	_strcpy
LBB0_16:
	stp	x19, x20, [sp]
Lloh19:
	adrp	x0, l_.str.3@PAGE
Lloh20:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_hb_error
	mov	x0, x19
	bl	_free
	mov	w0, #-1
LBB0_17:
	ldur	x8, [x29, #-88]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.18:
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #128]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d_%d_%d"

l_.str.1:                               ; @.str.1
	.asciz	"wb"

	.comm	_errno,4,2                      ; @errno
l_.str.2:                               ; @.str.2
	.asciz	"unknown -- strerror_r() failed"

l_.str.3:                               ; @.str.3
	.asciz	"hb_save_preview: Failed to open %s (reason: %s)"

l_.str.4:                               ; @.str.4
	.asciz	"hb_save_preview: Failed to write line %d to %s (reason: %s). Preview will be incomplete."

.subsections_via_symbols
