	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pwc_set_shutter_speed          ## -- Begin function pwc_set_shutter_speed
	.p2align	4, 0x90
_pwc_set_shutter_speed:                 ## @pwc_set_shutter_speed
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movl	%esi, %ebx
	movq	%rdi, %r14
	testl	%esi, %esi
	sete	%al
	negb	%al
	movb	%al, -34(%rbp)
	movq	_SET_LUM_CTL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_SHUTTER_MODE_FORMATTER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-34(%rbp), %rcx
	movl	$1, %r8d
	callq	_send_control_msg
	testl	%ebx, %ebx
	jne	LBB0_7
## %bb.1:
	testl	%eax, %eax
	js	LBB0_7
## %bb.2:
	xorl	%eax, %eax
	testl	%r15d, %r15d
	cmovgl	%r15d, %eax
	cmpl	$65535, %eax                    ## imm = 0xFFFF
	movl	$65535, %ebx                    ## imm = 0xFFFF
	cmovbl	%eax, %ebx
	movl	(%r14), %edi
	callq	_DEVICE_USE_CODEC2
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movzwl	%bx, %eax
	shrl	$2, %eax
	imull	$5243, %eax, %eax               ## imm = 0x147B
	shrl	$17, %eax
	movw	%ax, -34(%rbp)
	jmp	LBB0_6
LBB0_4:
	movl	(%r14), %edi
	callq	_DEVICE_USE_CODEC3
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movb	$0, -33(%rbp)
	movb	%bh, -34(%rbp)
LBB0_6:
	movl	(%r12), %esi
	movq	_PRESET_SHUTTER_FORMATTER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-34(%rbp), %rcx
	movq	%r14, %rdi
	movl	$2, %r8d
	callq	_send_control_msg
LBB0_7:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SET_LUM_CTL,4,2                ## @SET_LUM_CTL
	.comm	_SHUTTER_MODE_FORMATTER,4,2     ## @SHUTTER_MODE_FORMATTER
	.comm	_PRESET_SHUTTER_FORMATTER,4,2   ## @PRESET_SHUTTER_FORMATTER
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pwc_set_shutter_speed          ; -- Begin function pwc_set_shutter_speed
	.p2align	2
_pwc_set_shutter_speed:                 ; @pwc_set_shutter_speed
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	cmp	w1, #0
	csetm	w8, eq
	strb	w8, [sp, #14]
Lloh0:
	adrp	x22, _SET_LUM_CTL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SET_LUM_CTL@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh2:
	adrp	x8, _SHUTTER_MODE_FORMATTER@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SHUTTER_MODE_FORMATTER@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	add	x3, sp, #14
	mov	w4, #1
	bl	_send_control_msg
	cbnz	w21, LBB0_7
; %bb.1:
	tbnz	w0, #31, LBB0_7
; %bb.2:
	cmp	w20, #0
	csel	w8, w20, wzr, gt
	mov	w9, #65535
	cmp	w8, w9
	csel	w20, w8, w9, lo
	ldr	w0, [x19]
	bl	_DEVICE_USE_CODEC2
	cbz	x0, LBB0_4
; %bb.3:
	ubfx	w8, w20, #2, #14
	mov	w9, #5243
	mul	w8, w8, w9
	lsr	w8, w8, #17
	strh	w8, [sp, #14]
	b	LBB0_6
LBB0_4:
	ldr	w0, [x19]
	bl	_DEVICE_USE_CODEC3
	cbz	x0, LBB0_6
; %bb.5:
	strb	wzr, [sp, #15]
	lsr	w8, w20, #8
	strb	w8, [sp, #14]
LBB0_6:
	ldr	w1, [x22]
Lloh5:
	adrp	x8, _PRESET_SHUTTER_FORMATTER@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PRESET_SHUTTER_FORMATTER@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	add	x3, sp, #14
	mov	x0, x19
	mov	w4, #2
	bl	_send_control_msg
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SET_LUM_CTL,4,2                ; @SET_LUM_CTL
	.comm	_SHUTTER_MODE_FORMATTER,4,2     ; @SHUTTER_MODE_FORMATTER
	.comm	_PRESET_SHUTTER_FORMATTER,4,2   ; @PRESET_SHUTTER_FORMATTER
.subsections_via_symbols
