	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pwc_get_cmos_sensor            ## -- Begin function pwc_get_cmos_sensor
	.p2align	4, 0x90
_pwc_get_cmos_sensor:                   ## @pwc_get_cmos_sensor
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	(%rdi), %ecx
	cmpl	$675, %ecx                      ## imm = 0x2A3
	jge	LBB0_2
## %bb.1:
	movq	_SENSOR_TYPE_FORMATTER1@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movl	$-1, %eax
	cmpl	$730, %ecx                      ## imm = 0x2DA
	jb	LBB0_6
## %bb.3:
	movq	_SENSOR_TYPE_FORMATTER2@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %edx
	movq	_GET_STATUS_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-17(%rbp), %rcx
	movq	%rbx, %rdi
	movl	$1, %r8d
	callq	_recv_control_msg
	testl	%eax, %eax
	js	LBB0_6
## %bb.5:
	movzbl	-17(%rbp), %eax
	leal	256(%rax), %ecx
	cmpl	$675, (%rbx)                    ## imm = 0x2A3
	cmovgel	%eax, %ecx
	movl	%ecx, (%r14)
	xorl	%eax, %eax
LBB0_6:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SENSOR_TYPE_FORMATTER1,4,2     ## @SENSOR_TYPE_FORMATTER1
	.comm	_SENSOR_TYPE_FORMATTER2,4,2     ## @SENSOR_TYPE_FORMATTER2
	.comm	_GET_STATUS_CTL,4,2             ## @GET_STATUS_CTL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pwc_get_cmos_sensor            ; -- Begin function pwc_get_cmos_sensor
	.p2align	2
_pwc_get_cmos_sensor:                   ; @pwc_get_cmos_sensor
	.cfi_startproc
; %bb.0:
	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, x1
	mov	x20, x0
	ldr	w8, [x0]
	cmp	w8, #675
	b.ge	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _SENSOR_TYPE_FORMATTER1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SENSOR_TYPE_FORMATTER1@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:
	cmp	w8, #730
	b.hs	LBB0_4
; %bb.3:
	mov	w0, #-1
	b	LBB0_7
LBB0_4:
Lloh2:
	adrp	x8, _SENSOR_TYPE_FORMATTER2@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SENSOR_TYPE_FORMATTER2@GOTPAGEOFF]
LBB0_5:
	ldr	w2, [x8]
Lloh4:
	adrp	x8, _GET_STATUS_CTL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _GET_STATUS_CTL@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	add	x3, sp, #15
	mov	x0, x20
	mov	w4, #1
	bl	_recv_control_msg
	tbnz	w0, #31, LBB0_7
; %bb.6:
	mov	w0, #0
	ldr	w8, [x20]
	ldrb	w9, [sp, #15]
	orr	w10, w9, #0x100
	cmp	w8, #675
	csel	w8, w10, w9, lt
	str	w8, [x19]
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_SENSOR_TYPE_FORMATTER1,4,2     ; @SENSOR_TYPE_FORMATTER1
	.comm	_SENSOR_TYPE_FORMATTER2,4,2     ; @SENSOR_TYPE_FORMATTER2
	.comm	_GET_STATUS_CTL,4,2             ; @GET_STATUS_CTL
.subsections_via_symbols
