	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cpia2_set_flicker_mode         ## -- Begin function cpia2_set_flicker_mode
	.p2align	4, 0x90
_cpia2_set_flicker_mode:                ## @cpia2_set_flicker_mode
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	16(%rdi), %rax
	movq	_DEVICE_STV_672@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_20
## %bb.1:
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	_CPIA2_CMD_GET_FLICKER_MODES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TRANSFER_READ@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	xorl	%ecx, %ecx
	callq	_cpia2_do_command
	testl	%eax, %eax
	jne	LBB0_21
## %bb.2:
	movb	(%rbx), %al
	cmpl	$130, %r14d
	je	LBB0_6
## %bb.3:
	cmpl	$129, %r14d
	je	LBB0_7
## %bb.4:
	cmpl	$128, %r14d
	jne	LBB0_20
## %bb.5:
	movq	_CPIA2_VP_FLICKER_MODES_NEVER_FLICKER@GOTPCREL(%rip), %rcx
	orb	(%rcx), %al
	movq	_CPIA2_VP_FLICKER_MODES_50HZ@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	notb	%cl
	andb	%al, %cl
	jmp	LBB0_9
LBB0_6:
	movq	_CPIA2_VP_FLICKER_MODES_NEVER_FLICKER@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	notb	%cl
	andb	%cl, %al
	movq	_CPIA2_VP_FLICKER_MODES_50HZ@GOTPCREL(%rip), %rcx
	orb	(%rcx), %al
	jmp	LBB0_8
LBB0_7:
	movq	_CPIA2_VP_FLICKER_MODES_NEVER_FLICKER@GOTPCREL(%rip), %rcx
	movq	_CPIA2_VP_FLICKER_MODES_50HZ@GOTPCREL(%rip), %rdx
	movb	(%rdx), %dl
	orb	(%rcx), %dl
	notb	%dl
	andb	%dl, %al
LBB0_8:
	movl	%eax, %ecx
LBB0_9:
	movq	_CPIA2_CMD_SET_FLICKER_MODES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TRANSFER_WRITE@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movzbl	%cl, %ecx
	movq	%rbx, %rdi
	callq	_cpia2_do_command
	testl	%eax, %eax
	jne	LBB0_21
## %bb.10:
	movq	_CPIA2_CMD_GET_VP_EXP_MODES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_cpia2_do_command
	testl	%eax, %eax
	jne	LBB0_21
## %bb.11:
	movb	12(%rbx), %al
	movq	_CPIA2_VP_EXPOSURE_MODES_INHIBIT_FLICKER@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%ecx, %edx
	orb	%al, %dl
	notb	%cl
	andb	%al, %cl
	cmpl	$128, %r14d
	movzbl	%dl, %eax
	movzbl	%cl, %ecx
	cmovel	%eax, %ecx
	movq	_CPIA2_CMD_SET_VP_EXP_MODES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	movzbl	%cl, %ecx
	movq	%rbx, %rdi
	callq	_cpia2_do_command
	testl	%eax, %eax
	jne	LBB0_21
## %bb.12:
	movq	_CPIA2_CMD_REHASH_VP4@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	movq	%rbx, %rdi
	movl	$1, %ecx
	callq	_cpia2_do_command
	testl	%eax, %eax
	jne	LBB0_21
## %bb.13:
	cmpl	$130, %r14d
	je	LBB0_19
## %bb.14:
	cmpl	$129, %r14d
	je	LBB0_17
## %bb.15:
	cmpl	$128, %r14d
	jne	LBB0_20
## %bb.16:
	movl	$128, 4(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_21
LBB0_20:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_21:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movabsq	$214748364930, %rax             ## imm = 0x3200000082
	jmp	LBB0_18
LBB0_17:
	movabsq	$257698037889, %rax             ## imm = 0x3C00000081
LBB0_18:
	movq	%rax, 4(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_DEVICE_STV_672,8,3             ## @DEVICE_STV_672
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CPIA2_CMD_GET_FLICKER_MODES,4,2 ## @CPIA2_CMD_GET_FLICKER_MODES
	.comm	_TRANSFER_READ,4,2              ## @TRANSFER_READ
	.comm	_CPIA2_VP_FLICKER_MODES_NEVER_FLICKER,1,0 ## @CPIA2_VP_FLICKER_MODES_NEVER_FLICKER
	.comm	_CPIA2_VP_FLICKER_MODES_50HZ,1,0 ## @CPIA2_VP_FLICKER_MODES_50HZ
	.comm	_CPIA2_CMD_SET_FLICKER_MODES,4,2 ## @CPIA2_CMD_SET_FLICKER_MODES
	.comm	_TRANSFER_WRITE,4,2             ## @TRANSFER_WRITE
	.comm	_CPIA2_CMD_GET_VP_EXP_MODES,4,2 ## @CPIA2_CMD_GET_VP_EXP_MODES
	.comm	_CPIA2_VP_EXPOSURE_MODES_INHIBIT_FLICKER,1,0 ## @CPIA2_VP_EXPOSURE_MODES_INHIBIT_FLICKER
	.comm	_CPIA2_CMD_SET_VP_EXP_MODES,4,2 ## @CPIA2_CMD_SET_VP_EXP_MODES
	.comm	_CPIA2_CMD_REHASH_VP4,4,2       ## @CPIA2_CMD_REHASH_VP4
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function cpia2_set_flicker_mode
lCPI0_0:
	.long	130                             ; 0x82
	.long	50                              ; 0x32
lCPI0_1:
	.long	129                             ; 0x81
	.long	60                              ; 0x3c
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_cpia2_set_flicker_mode
	.p2align	2
_cpia2_set_flicker_mode:                ; @cpia2_set_flicker_mode
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	ldr	x8, [x0, #16]
Lloh0:
	adrp	x9, _DEVICE_STV_672@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DEVICE_STV_672@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.1:
	mov	x20, x1
	mov	x19, x0
Lloh3:
	adrp	x8, _CPIA2_CMD_GET_FLICKER_MODES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CPIA2_CMD_GET_FLICKER_MODES@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x21, _TRANSFER_READ@GOTPAGE
Lloh7:
	ldr	x21, [x21, _TRANSFER_READ@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	w3, #0
	bl	_cpia2_do_command
	cbnz	w0, LBB0_18
; %bb.2:
	ldrb	w8, [x19]
	cmp	w20, #130
	b.eq	LBB0_6
; %bb.3:
	cmp	w20, #129
	b.eq	LBB0_7
; %bb.4:
	cmp	w20, #128
	b.ne	LBB0_17
; %bb.5:
Lloh8:
	adrp	x9, _CPIA2_VP_FLICKER_MODES_NEVER_FLICKER@GOTPAGE
Lloh9:
	ldr	x9, [x9, _CPIA2_VP_FLICKER_MODES_NEVER_FLICKER@GOTPAGEOFF]
	ldrb	w9, [x9]
	orr	w8, w9, w8
Lloh10:
	adrp	x9, _CPIA2_VP_FLICKER_MODES_50HZ@GOTPAGE
Lloh11:
	ldr	x9, [x9, _CPIA2_VP_FLICKER_MODES_50HZ@GOTPAGEOFF]
	ldrb	w9, [x9]
	b	LBB0_8
LBB0_6:
Lloh12:
	adrp	x9, _CPIA2_VP_FLICKER_MODES_NEVER_FLICKER@GOTPAGE
Lloh13:
	ldr	x9, [x9, _CPIA2_VP_FLICKER_MODES_NEVER_FLICKER@GOTPAGEOFF]
	ldrb	w9, [x9]
	bic	w8, w8, w9
Lloh14:
	adrp	x9, _CPIA2_VP_FLICKER_MODES_50HZ@GOTPAGE
Lloh15:
	ldr	x9, [x9, _CPIA2_VP_FLICKER_MODES_50HZ@GOTPAGEOFF]
	ldrb	w9, [x9]
	orr	w8, w8, w9
	b	LBB0_9
LBB0_7:
Lloh16:
	adrp	x9, _CPIA2_VP_FLICKER_MODES_NEVER_FLICKER@GOTPAGE
Lloh17:
	ldr	x9, [x9, _CPIA2_VP_FLICKER_MODES_NEVER_FLICKER@GOTPAGEOFF]
	ldrb	w9, [x9]
Lloh18:
	adrp	x10, _CPIA2_VP_FLICKER_MODES_50HZ@GOTPAGE
Lloh19:
	ldr	x10, [x10, _CPIA2_VP_FLICKER_MODES_50HZ@GOTPAGEOFF]
	ldrb	w10, [x10]
	orr	w9, w10, w9
LBB0_8:
	bic	w8, w8, w9
LBB0_9:
Lloh20:
	adrp	x9, _CPIA2_CMD_SET_FLICKER_MODES@GOTPAGE
Lloh21:
	ldr	x9, [x9, _CPIA2_CMD_SET_FLICKER_MODES@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x9]
Lloh23:
	adrp	x22, _TRANSFER_WRITE@GOTPAGE
Lloh24:
	ldr	x22, [x22, _TRANSFER_WRITE@GOTPAGEOFF]
	ldr	w2, [x22]
	and	w3, w8, #0xff
	mov	x0, x19
	bl	_cpia2_do_command
	cbnz	w0, LBB0_18
; %bb.10:
Lloh25:
	adrp	x8, _CPIA2_CMD_GET_VP_EXP_MODES@GOTPAGE
Lloh26:
	ldr	x8, [x8, _CPIA2_CMD_GET_VP_EXP_MODES@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	ldr	w2, [x21]
	mov	x0, x19
	mov	w3, #0
	bl	_cpia2_do_command
	cbnz	w0, LBB0_18
; %bb.11:
	ldrb	w8, [x19, #12]
Lloh28:
	adrp	x9, _CPIA2_VP_EXPOSURE_MODES_INHIBIT_FLICKER@GOTPAGE
Lloh29:
	ldr	x9, [x9, _CPIA2_VP_EXPOSURE_MODES_INHIBIT_FLICKER@GOTPAGEOFF]
	ldrb	w9, [x9]
	orr	w10, w9, w8
	bic	w8, w8, w9
	cmp	w20, #128
	csel	w8, w10, w8, eq
Lloh30:
	adrp	x9, _CPIA2_CMD_SET_VP_EXP_MODES@GOTPAGE
Lloh31:
	ldr	x9, [x9, _CPIA2_CMD_SET_VP_EXP_MODES@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x9]
	ldr	w2, [x22]
	and	w3, w8, #0xff
	mov	x0, x19
	bl	_cpia2_do_command
	cbnz	w0, LBB0_18
; %bb.12:
Lloh33:
	adrp	x8, _CPIA2_CMD_REHASH_VP4@GOTPAGE
Lloh34:
	ldr	x8, [x8, _CPIA2_CMD_REHASH_VP4@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	ldr	w2, [x22]
	mov	x0, x19
	mov	w3, #1
	bl	_cpia2_do_command
	cbnz	w0, LBB0_18
; %bb.13:
	cmp	w20, #130
	b.eq	LBB0_19
; %bb.14:
	cmp	w20, #129
	b.eq	LBB0_20
; %bb.15:
	cmp	w20, #128
	b.ne	LBB0_17
; %bb.16:
	mov	w0, #0
	mov	w8, #128
	str	w8, [x19, #4]
	b	LBB0_18
LBB0_17:
Lloh36:
	adrp	x8, _EINVAL@GOTPAGE
Lloh37:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_18:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_19:
	mov	w0, #0
Lloh39:
	adrp	x8, lCPI0_0@PAGE
Lloh40:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	stur	d0, [x19, #4]
	b	LBB0_18
LBB0_20:
	mov	w0, #0
Lloh41:
	adrp	x8, lCPI0_1@PAGE
Lloh42:
	ldr	d0, [x8, lCPI0_1@PAGEOFF]
	stur	d0, [x19, #4]
	b	LBB0_18
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdr	Lloh39, Lloh40
	.loh AdrpLdr	Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_DEVICE_STV_672,8,3             ; @DEVICE_STV_672
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CPIA2_CMD_GET_FLICKER_MODES,4,2 ; @CPIA2_CMD_GET_FLICKER_MODES
	.comm	_TRANSFER_READ,4,2              ; @TRANSFER_READ
	.comm	_CPIA2_VP_FLICKER_MODES_NEVER_FLICKER,1,0 ; @CPIA2_VP_FLICKER_MODES_NEVER_FLICKER
	.comm	_CPIA2_VP_FLICKER_MODES_50HZ,1,0 ; @CPIA2_VP_FLICKER_MODES_50HZ
	.comm	_CPIA2_CMD_SET_FLICKER_MODES,4,2 ; @CPIA2_CMD_SET_FLICKER_MODES
	.comm	_TRANSFER_WRITE,4,2             ; @TRANSFER_WRITE
	.comm	_CPIA2_CMD_GET_VP_EXP_MODES,4,2 ; @CPIA2_CMD_GET_VP_EXP_MODES
	.comm	_CPIA2_VP_EXPOSURE_MODES_INHIBIT_FLICKER,1,0 ; @CPIA2_VP_EXPOSURE_MODES_INHIBIT_FLICKER
	.comm	_CPIA2_CMD_SET_VP_EXP_MODES,4,2 ; @CPIA2_CMD_SET_VP_EXP_MODES
	.comm	_CPIA2_CMD_REHASH_VP4,4,2       ; @CPIA2_CMD_REHASH_VP4
.subsections_via_symbols
