	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ghb_live_reset                 ## -- Begin function ghb_live_reset
	.p2align	4, 0x90
_ghb_live_reset:                        ## @ghb_live_reset
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	(%rdi), %rax
	cmpl	$0, (%rax)
	js	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_ghb_stop_live_encode
	movq	(%r14), %rax
LBB0_2:
	movq	$-1, (%rax)
	cmpl	$0, 32(%rax)
	jne	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	callq	_live_preview_stop
	movq	(%r14), %rax
LBB0_4:
	movq	24(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	callq	_g_free
	movq	(%r14), %rax
	movq	$0, 24(%rax)
LBB0_6:
	movq	8(%rax), %rcx
	movq	16(%rax), %rdi
	movq	_GHB_PREVIEW_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	shll	$3, %edx
	movq	(%rdi,%rcx,8), %rbx
	xorl	%esi, %esi
	callq	_memset
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.8:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_ghb_set_preview_image          ## TAILCALL
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GHB_PREVIEW_MAX,4,2            ## @GHB_PREVIEW_MAX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ghb_live_reset                 ; -- Begin function ghb_live_reset
	.p2align	2
_ghb_live_reset:                        ; @ghb_live_reset
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.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	x8, [x0]
	ldr	w9, [x8]
	tbnz	w9, #31, LBB0_2
; %bb.1:
	bl	_ghb_stop_live_encode
	ldr	x8, [x19]
LBB0_2:
	movi.2d	v0, #0xffffffffffffffff
	str	d0, [x8]
	ldr	w9, [x8, #32]
	cbz	w9, LBB0_7
; %bb.3:
	ldr	x0, [x8, #24]
	cbz	x0, LBB0_5
LBB0_4:
	bl	_g_free
	ldr	x8, [x19]
	str	xzr, [x8, #24]
LBB0_5:
	ldp	x8, x0, [x8, #8]
	ldr	x20, [x0, x8, lsl #3]
Lloh0:
	adrp	x8, _GHB_PREVIEW_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GHB_PREVIEW_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	lsl	w2, w8, #3
	mov	w1, #0
	bl	_memset
	cbz	x20, LBB0_8
; %bb.6:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ghb_set_preview_image
LBB0_7:
	mov	x0, x19
	bl	_live_preview_stop
	ldr	x8, [x19]
	ldr	x0, [x8, #24]
	cbnz	x0, LBB0_4
	b	LBB0_5
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_GHB_PREVIEW_MAX,4,2            ; @GHB_PREVIEW_MAX
.subsections_via_symbols
