	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cpia2_set_fps                  ## -- Begin function cpia2_set_fps
	.p2align	4, 0x90
_cpia2_set_fps:                         ## @cpia2_set_fps
	.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
                                        ## kill: def $esi killed $esi def $rsi
	leal	-128(%rsi), %eax
	cmpl	$5, %eax
	ja	LBB0_4
## %bb.1:
	movq	%rdi, %r14
	movl	$51, %ecx
	btl	%eax, %ecx
	jb	LBB0_5
## %bb.2:
	movq	8(%r14), %rax
	movq	_DEVICE_STV_672@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.3:
	movl	16(%r14), %eax
	movq	_CPIA2_VP_SENSOR_FLAGS_500@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_5
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_5:
	movq	8(%r14), %rax
	movq	_DEVICE_STV_672@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	(%rcx), %rax
	movl	%esi, %ebx
	cmovel	%edx, %ebx
	cmpl	$132, %esi
	cmovnel	%esi, %ebx
	movq	_CPIA2_CMD_FRAMERATE_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TRANSFER_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%ebx, %ecx
	callq	_cpia2_do_command
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movl	%ebx, (%r14)
	xorl	%eax, %eax
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DEVICE_STV_672,8,3             ## @DEVICE_STV_672
	.comm	_CPIA2_VP_SENSOR_FLAGS_500,4,2  ## @CPIA2_VP_SENSOR_FLAGS_500
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CPIA2_CMD_FRAMERATE_REQ,4,2    ## @CPIA2_CMD_FRAMERATE_REQ
	.comm	_TRANSFER_WRITE,4,2             ## @TRANSFER_WRITE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cpia2_set_fps                  ; -- Begin function cpia2_set_fps
	.p2align	2
_cpia2_set_fps:                         ; @cpia2_set_fps
	.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
	sub	w8, w1, #128
	cmp	w8, #5
	b.hi	LBB0_4
; %bb.1:
	mov	x19, x0
	mov	w9, #1
	lsl	w9, w9, w8
	mov	w10, #51
Lloh0:
	adrp	x8, _DEVICE_STV_672@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DEVICE_STV_672@GOTPAGEOFF]
	tst	w9, w10
	b.ne	LBB0_5
; %bb.2:
	ldr	x9, [x19, #8]
	ldr	x10, [x8]
	cmp	x9, x10
	b.ne	LBB0_5
; %bb.3:
	ldr	w9, [x19, #16]
Lloh2:
	adrp	x10, _CPIA2_VP_SENSOR_FLAGS_500@GOTPAGE
Lloh3:
	ldr	x10, [x10, _CPIA2_VP_SENSOR_FLAGS_500@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_5
LBB0_4:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_5:
	ldr	x9, [x19, #8]
	ldr	x8, [x8]
	cmp	x9, x8
	mov	w8, #132
	ccmp	w1, w8, #0, eq
	csel	w20, wzr, w1, eq
Lloh8:
	adrp	x8, _CPIA2_CMD_FRAMERATE_REQ@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CPIA2_CMD_FRAMERATE_REQ@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _TRANSFER_WRITE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TRANSFER_WRITE@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x3, x20
	bl	_cpia2_do_command
	cbnz	w0, LBB0_7
; %bb.6:
	str	w20, [x19]
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_DEVICE_STV_672,8,3             ; @DEVICE_STV_672
	.comm	_CPIA2_VP_SENSOR_FLAGS_500,4,2  ; @CPIA2_VP_SENSOR_FLAGS_500
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CPIA2_CMD_FRAMERATE_REQ,4,2    ; @CPIA2_CMD_FRAMERATE_REQ
	.comm	_TRANSFER_WRITE,4,2             ; @TRANSFER_WRITE
.subsections_via_symbols
