	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hb_system_sleep_private_disable ## -- Begin function hb_system_sleep_private_disable
	.p2align	4, 0x90
_hb_system_sleep_private_disable:       ## @hb_system_sleep_private_disable
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.1:
	movq	%rdi, %rbx
	cmpl	$-1, (%rdi)
	je	LBB0_2
## %bb.4:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_5:
	leaq	L_.str(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_hb_error                       ## TAILCALL
LBB0_2:
	leaq	L_.str.1(%rip), %rdi
	callq	_CFSTR
	movq	_kIOPMAssertPreventUserIdleSystemSleep@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_kIOPMAssertionLevelOn@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edx
	movq	%rbx, %rcx
	callq	_IOPMAssertionCreateWithName
	movq	_kIOReturnSuccess@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.6:
	movl	(%rbx), %edx
	leaq	L_.str.2(%rip), %rsi
	movl	$3, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_hb_deep_log                    ## TAILCALL
LBB0_3:
	leaq	L_.str.3(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_hb_log                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hb_system_sleep: opaque is NULL"

L_.str.1:                               ## @.str.1
	.asciz	"HandBrake is currently scanning and/or encoding"

	.comm	_kIOPMAssertPreventUserIdleSystemSleep,4,2 ## @kIOPMAssertPreventUserIdleSystemSleep
	.comm	_kIOPMAssertionLevelOn,4,2      ## @kIOPMAssertionLevelOn
	.comm	_kIOReturnSuccess,8,3           ## @kIOReturnSuccess
L_.str.2:                               ## @.str.2
	.asciz	"hb_system_sleep: assertion %d created, sleep prevented"

L_.str.3:                               ## @.str.3
	.asciz	"hb_system_sleep: failed to prevent system sleep"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hb_system_sleep_private_disable ; -- Begin function hb_system_sleep_private_disable
	.p2align	2
_hb_system_sleep_private_disable:       ; @hb_system_sleep_private_disable
	.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
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0]
	cmn	w8, #1
	b.eq	LBB0_4
; %bb.2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_3:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_hb_error
LBB0_4:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_CFSTR
	mov	x2, x0
Lloh4:
	adrp	x8, _kIOPMAssertPreventUserIdleSystemSleep@GOTPAGE
Lloh5:
	ldr	x8, [x8, _kIOPMAssertPreventUserIdleSystemSleep@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
Lloh7:
	adrp	x8, _kIOPMAssertionLevelOn@GOTPAGE
Lloh8:
	ldr	x8, [x8, _kIOPMAssertionLevelOn@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x3, x19
	bl	_IOPMAssertionCreateWithName
Lloh10:
	adrp	x8, _kIOReturnSuccess@GOTPAGE
Lloh11:
	ldr	x8, [x8, _kIOReturnSuccess@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.5:
	ldr	w2, [x19]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #3
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_hb_deep_log
LBB0_6:
Lloh15:
	adrp	x0, l_.str.3@PAGE
Lloh16:
	add	x0, x0, l_.str.3@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_hb_log
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hb_system_sleep: opaque is NULL"

l_.str.1:                               ; @.str.1
	.asciz	"HandBrake is currently scanning and/or encoding"

	.comm	_kIOPMAssertPreventUserIdleSystemSleep,4,2 ; @kIOPMAssertPreventUserIdleSystemSleep
	.comm	_kIOPMAssertionLevelOn,4,2      ; @kIOPMAssertionLevelOn
	.comm	_kIOReturnSuccess,8,3           ; @kIOReturnSuccess
l_.str.2:                               ; @.str.2
	.asciz	"hb_system_sleep: assertion %d created, sleep prevented"

l_.str.3:                               ; @.str.3
	.asciz	"hb_system_sleep: failed to prevent system sleep"

.subsections_via_symbols
