	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pwc_camera_power               ## -- Begin function pwc_camera_power
	.p2align	4, 0x90
_pwc_camera_power:                      ## @pwc_camera_power
	.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
	cmpl	$0, 16(%rdi)
	je	LBB0_5
## %bb.1:
	movl	(%rdi), %eax
	cmpl	$675, %eax                      ## imm = 0x2A3
	jl	LBB0_5
## %bb.2:
	movl	%esi, %ebx
	cmpl	$729, %eax                      ## imm = 0x2D9
	ja	LBB0_4
## %bb.3:
	cmpl	$6, 4(%rdi)
	jl	LBB0_5
LBB0_4:
	xorl	%eax, %eax
	testl	%ebx, %ebx
	movq	8(%rdi), %rcx
	movl	$255, %edx
	cmovnel	%eax, %edx
	movl	%edx, (%rcx)
	movq	_SET_STATUS_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SET_POWER_SAVE_MODE_FORMATTER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$1, %r8d
	callq	_send_control_msg
	testl	%eax, %eax
	js	LBB0_6
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_6:
	testl	%ebx, %ebx
	leaq	L_.str.2(%rip), %rcx
	leaq	L_.str.1(%rip), %rsi
	cmoveq	%rcx, %rsi
	leaq	L_.str(%rip), %rdi
	movl	%eax, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_PWC_ERROR                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SET_STATUS_CTL,4,2             ## @SET_STATUS_CTL
	.comm	_SET_POWER_SAVE_MODE_FORMATTER,4,2 ## @SET_POWER_SAVE_MODE_FORMATTER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to power %s camera (%d)\n"

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

L_.str.2:                               ## @.str.2
	.asciz	"off"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pwc_camera_power               ; -- Begin function pwc_camera_power
	.p2align	2
_pwc_camera_power:                      ; @pwc_camera_power
	.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
	ldr	w8, [x0, #16]
	cbz	w8, LBB0_5
; %bb.1:
	ldr	w8, [x0]
	cmp	w8, #675
	b.lt	LBB0_5
; %bb.2:
	mov	x19, x1
	cmp	w8, #729
	b.hi	LBB0_4
; %bb.3:
	ldr	w8, [x0, #4]
	cmp	w8, #6
	b.lt	LBB0_5
LBB0_4:
	ldr	x3, [x0, #8]
	mov	w8, #255
	cmp	w19, #0
	csel	w8, w8, wzr, eq
	str	w8, [x3]
Lloh0:
	adrp	x8, _SET_STATUS_CTL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SET_STATUS_CTL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _SET_POWER_SAVE_MODE_FORMATTER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SET_POWER_SAVE_MODE_FORMATTER@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	w4, #1
	bl	_send_control_msg
	tbnz	w0, #31, LBB0_6
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	x2, x0
Lloh6:
	adrp	x8, l_.str.1@PAGE
Lloh7:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh8:
	adrp	x9, l_.str.2@PAGE
Lloh9:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w19, #0
	csel	x1, x9, x8, eq
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	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	_PWC_ERROR
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SET_STATUS_CTL,4,2             ; @SET_STATUS_CTL
	.comm	_SET_POWER_SAVE_MODE_FORMATTER,4,2 ; @SET_POWER_SAVE_MODE_FORMATTER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to power %s camera (%d)\n"

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

l_.str.2:                               ; @.str.2
	.asciz	"off"

.subsections_via_symbols
