	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_camera_state
_set_camera_state:                      ## @set_camera_state
	.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	_COMMAND_SETCOMPRESSION@GOTPCREL(%rip), %rcx
	movq	_COMMAND_SETCOMPRESSIONTARGET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	movq	_COMMAND_SETCOLOURPARAMS@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_COMMAND_SETFORMAT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_COMMAND_SETYUVTHRESH@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_COMMAND_SETECPTIMING@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_COMMAND_SETCOMPRESSIONPARAMS@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_COMMAND_SETEXPOSURE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_COMMAND_SETCOLOURBALANCE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_COMMAND_SETSENSORFPS@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_COMMAND_SETAPCOR@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	%rdi, %rbx
	movq	_COMMAND_SETFLICKERCTRL@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_COMMAND_SETVLOFFSET@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%rdi)
	movq	_CPIA_COMMAND_SetGrabMode@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CPIA_GRAB_SINGLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r14d, %r14d
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_do_command
	movq	%rbx, %rdi
	callq	_dispatch_commands
	cmpq	$0, 16(%rbx)
	movl	$240, %eax
	movl	$198, %edi
	cmovel	%eax, %edi
	movb	8(%rbx), %cl
	shll	%cl, %edi
	addl	$10, %edi
	callq	_msleep_interruptible
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_signal_pending
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EINTR@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_3
LBB0_2:
	movq	%rbx, %rdi
	callq	_save_camera_state
LBB0_3:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_COMMAND_SETCOMPRESSION,4,2     ## @COMMAND_SETCOMPRESSION
	.comm	_COMMAND_SETCOMPRESSIONTARGET,4,2 ## @COMMAND_SETCOMPRESSIONTARGET
	.comm	_COMMAND_SETCOLOURPARAMS,4,2    ## @COMMAND_SETCOLOURPARAMS
	.comm	_COMMAND_SETFORMAT,4,2          ## @COMMAND_SETFORMAT
	.comm	_COMMAND_SETYUVTHRESH,4,2       ## @COMMAND_SETYUVTHRESH
	.comm	_COMMAND_SETECPTIMING,4,2       ## @COMMAND_SETECPTIMING
	.comm	_COMMAND_SETCOMPRESSIONPARAMS,4,2 ## @COMMAND_SETCOMPRESSIONPARAMS
	.comm	_COMMAND_SETEXPOSURE,4,2        ## @COMMAND_SETEXPOSURE
	.comm	_COMMAND_SETCOLOURBALANCE,4,2   ## @COMMAND_SETCOLOURBALANCE
	.comm	_COMMAND_SETSENSORFPS,4,2       ## @COMMAND_SETSENSORFPS
	.comm	_COMMAND_SETAPCOR,4,2           ## @COMMAND_SETAPCOR
	.comm	_COMMAND_SETFLICKERCTRL,4,2     ## @COMMAND_SETFLICKERCTRL
	.comm	_COMMAND_SETVLOFFSET,4,2        ## @COMMAND_SETVLOFFSET
	.comm	_CPIA_COMMAND_SetGrabMode,4,2   ## @CPIA_COMMAND_SetGrabMode
	.comm	_CPIA_GRAB_SINGLE,4,2           ## @CPIA_GRAB_SINGLE
	.comm	_current,4,2                    ## @current
	.comm	_EINTR,4,2                      ## @EINTR
	.no_dead_strip	_set_camera_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_camera_state
_set_camera_state:                      ; @set_camera_state
	.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
Lloh0:
	adrp	x8, _COMMAND_SETCOMPRESSION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _COMMAND_SETCOMPRESSION@GOTPAGEOFF]
Lloh2:
	adrp	x9, _COMMAND_SETCOMPRESSIONTARGET@GOTPAGE
Lloh3:
	ldr	x9, [x9, _COMMAND_SETCOMPRESSIONTARGET@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _COMMAND_SETCOLOURPARAMS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _COMMAND_SETCOLOURPARAMS@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh9:
	adrp	x9, _COMMAND_SETFORMAT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _COMMAND_SETFORMAT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
Lloh12:
	adrp	x10, _COMMAND_SETYUVTHRESH@GOTPAGE
Lloh13:
	ldr	x10, [x10, _COMMAND_SETYUVTHRESH@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh14:
	ldr	w9, [x10]
	orr	w8, w8, w9
Lloh15:
	adrp	x9, _COMMAND_SETECPTIMING@GOTPAGE
Lloh16:
	ldr	x9, [x9, _COMMAND_SETECPTIMING@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh18:
	adrp	x9, _COMMAND_SETCOMPRESSIONPARAMS@GOTPAGE
Lloh19:
	ldr	x9, [x9, _COMMAND_SETCOMPRESSIONPARAMS@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
Lloh21:
	adrp	x10, _COMMAND_SETEXPOSURE@GOTPAGE
Lloh22:
	ldr	x10, [x10, _COMMAND_SETEXPOSURE@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh23:
	ldr	w9, [x10]
	orr	w8, w8, w9
Lloh24:
	adrp	x9, _COMMAND_SETCOLOURBALANCE@GOTPAGE
Lloh25:
	ldr	x9, [x9, _COMMAND_SETCOLOURBALANCE@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh27:
	adrp	x9, _COMMAND_SETSENSORFPS@GOTPAGE
Lloh28:
	ldr	x9, [x9, _COMMAND_SETSENSORFPS@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
Lloh30:
	adrp	x10, _COMMAND_SETAPCOR@GOTPAGE
Lloh31:
	ldr	x10, [x10, _COMMAND_SETAPCOR@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh32:
	ldr	w9, [x10]
	orr	w8, w8, w9
Lloh33:
	adrp	x9, _COMMAND_SETFLICKERCTRL@GOTPAGE
Lloh34:
	ldr	x9, [x9, _COMMAND_SETFLICKERCTRL@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh36:
	adrp	x9, _COMMAND_SETVLOFFSET@GOTPAGE
Lloh37:
	ldr	x9, [x9, _COMMAND_SETVLOFFSET@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x0]
Lloh39:
	adrp	x8, _CPIA_COMMAND_SetGrabMode@GOTPAGE
Lloh40:
	ldr	x8, [x8, _CPIA_COMMAND_SetGrabMode@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
Lloh42:
	adrp	x8, _CPIA_GRAB_SINGLE@GOTPAGE
Lloh43:
	ldr	x8, [x8, _CPIA_GRAB_SINGLE@GOTPAGEOFF]
Lloh44:
	ldr	w2, [x8]
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	bl	_do_command
	mov	x0, x19
	bl	_dispatch_commands
	ldr	x8, [x19, #16]
	cmp	x8, #0
	mov	w8, #198
	mov	w9, #240
	csel	w8, w9, w8, eq
	ldr	w9, [x19, #8]
	lsl	w8, w8, w9
	add	w0, w8, #10
	bl	_msleep_interruptible
Lloh45:
	adrp	x8, _current@GOTPAGE
Lloh46:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh47:
	ldr	w0, [x8]
	bl	_signal_pending
	cbz	x0, LBB0_2
; %bb.1:
Lloh48:
	adrp	x8, _EINTR@GOTPAGE
Lloh49:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
Lloh50:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	bl	_save_camera_state
	mov	w0, #0
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.cfi_endproc
                                        ; -- End function
	.comm	_COMMAND_SETCOMPRESSION,4,2     ; @COMMAND_SETCOMPRESSION
	.comm	_COMMAND_SETCOMPRESSIONTARGET,4,2 ; @COMMAND_SETCOMPRESSIONTARGET
	.comm	_COMMAND_SETCOLOURPARAMS,4,2    ; @COMMAND_SETCOLOURPARAMS
	.comm	_COMMAND_SETFORMAT,4,2          ; @COMMAND_SETFORMAT
	.comm	_COMMAND_SETYUVTHRESH,4,2       ; @COMMAND_SETYUVTHRESH
	.comm	_COMMAND_SETECPTIMING,4,2       ; @COMMAND_SETECPTIMING
	.comm	_COMMAND_SETCOMPRESSIONPARAMS,4,2 ; @COMMAND_SETCOMPRESSIONPARAMS
	.comm	_COMMAND_SETEXPOSURE,4,2        ; @COMMAND_SETEXPOSURE
	.comm	_COMMAND_SETCOLOURBALANCE,4,2   ; @COMMAND_SETCOLOURBALANCE
	.comm	_COMMAND_SETSENSORFPS,4,2       ; @COMMAND_SETSENSORFPS
	.comm	_COMMAND_SETAPCOR,4,2           ; @COMMAND_SETAPCOR
	.comm	_COMMAND_SETFLICKERCTRL,4,2     ; @COMMAND_SETFLICKERCTRL
	.comm	_COMMAND_SETVLOFFSET,4,2        ; @COMMAND_SETVLOFFSET
	.comm	_CPIA_COMMAND_SetGrabMode,4,2   ; @CPIA_COMMAND_SetGrabMode
	.comm	_CPIA_GRAB_SINGLE,4,2           ; @CPIA_GRAB_SINGLE
	.comm	_current,4,2                    ; @current
	.comm	_EINTR,4,2                      ; @EINTR
	.no_dead_strip	_set_camera_state
.subsections_via_symbols
