	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx2341x_handler_setup          ## -- Begin function cx2341x_handler_setup
	.p2align	4, 0x90
_cx2341x_handler_setup:                 ## @cx2341x_handler_setup
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	(%rdi), %xmm0                   ## xmm0 = mem[0],zero
	movdqa	%xmm0, -32(%rbp)                ## 16-byte Spill
	movq	_CX2341X_ENC_SET_OUTPUT_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%rdi), %ecx
	movl	$2, %edx
	xorl	%r8d, %r8d
	xorl	%eax, %eax
	callq	_cx2341x_hdl_api
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	movq	_CX2341X_ENC_SET_FRAME_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	20(%rbx), %ecx
	movq	%rbx, %rdi
	movl	$1, %edx
	xorl	%eax, %eax
	callq	_cx2341x_hdl_api
	testl	%eax, %eax
	jne	LBB0_6
## %bb.2:
	movl	16(%rbx), %edi
	callq	_v4l2_ctrl_g_ctrl
	movq	_V4L2_MPEG_VIDEO_ENCODING_MPEG_1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.4:
	movdqa	-32(%rbp), %xmm1                ## 16-byte Reload
	movdqa	%xmm1, %xmm0
	psrld	$31, %xmm0
	paddd	%xmm1, %xmm0
	psrad	$1, %xmm0
	jmp	LBB0_5
LBB0_3:
	movdqa	-32(%rbp), %xmm0                ## 16-byte Reload
LBB0_5:
	movq	_CX2341X_ENC_SET_FRAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movd	%xmm0, %ecx
	pextrd	$1, %xmm0, %r8d
	movq	%rbx, %rdi
	movl	$2, %edx
	xorl	%eax, %eax
	callq	_cx2341x_hdl_api
	testl	%eax, %eax
	je	LBB0_7
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_7:
	addq	$12, %rbx
	movq	%rbx, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_v4l2_ctrl_handler_setup        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CX2341X_ENC_SET_OUTPUT_PORT,4,2 ## @CX2341X_ENC_SET_OUTPUT_PORT
	.comm	_CX2341X_ENC_SET_FRAME_RATE,4,2 ## @CX2341X_ENC_SET_FRAME_RATE
	.comm	_V4L2_MPEG_VIDEO_ENCODING_MPEG_1,8,3 ## @V4L2_MPEG_VIDEO_ENCODING_MPEG_1
	.comm	_CX2341X_ENC_SET_FRAME_SIZE,4,2 ## @CX2341X_ENC_SET_FRAME_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx2341x_handler_setup          ; -- Begin function cx2341x_handler_setup
	.p2align	2
_cx2341x_handler_setup:                 ; @cx2341x_handler_setup
	.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	x19, x0
	ldp	w20, w21, [x0]
Lloh0:
	adrp	x8, _CX2341X_ENC_SET_OUTPUT_PORT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CX2341X_ENC_SET_OUTPUT_PORT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	w3, [x0, #8]
	str	xzr, [sp]
	mov	w2, #2
	bl	_cx2341x_hdl_api
	cbnz	w0, LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _CX2341X_ENC_SET_FRAME_RATE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CX2341X_ENC_SET_FRAME_RATE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	w3, [x19, #20]
	mov	x0, x19
	mov	w2, #1
	bl	_cx2341x_hdl_api
	cbnz	w0, LBB0_3
; %bb.2:
	ldr	w0, [x19, #16]
	bl	_v4l2_ctrl_g_ctrl
Lloh6:
	adrp	x8, _V4L2_MPEG_VIDEO_ENCODING_MPEG_1@GOTPAGE
Lloh7:
	ldr	x8, [x8, _V4L2_MPEG_VIDEO_ENCODING_MPEG_1@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	w21, #0
	cinc	w9, w21, lt
	asr	w9, w9, #1
	cmp	w20, #0
	cinc	w10, w20, lt
	asr	w10, w10, #1
	cmp	x0, x8
	csel	w3, w20, w10, ne
	csel	w8, w21, w9, ne
Lloh9:
	adrp	x9, _CX2341X_ENC_SET_FRAME_SIZE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CX2341X_ENC_SET_FRAME_SIZE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x9]
	str	x8, [sp]
	mov	x0, x19
	mov	w2, #2
	bl	_cx2341x_hdl_api
	cbz	w0, LBB0_4
LBB0_3:
	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
LBB0_4:
	add	x0, x19, #12
	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
	b	_v4l2_ctrl_handler_setup
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_CX2341X_ENC_SET_OUTPUT_PORT,4,2 ; @CX2341X_ENC_SET_OUTPUT_PORT
	.comm	_CX2341X_ENC_SET_FRAME_RATE,4,2 ; @CX2341X_ENC_SET_FRAME_RATE
	.comm	_V4L2_MPEG_VIDEO_ENCODING_MPEG_1,8,3 ; @V4L2_MPEG_VIDEO_ENCODING_MPEG_1
	.comm	_CX2341X_ENC_SET_FRAME_SIZE,4,2 ; @CX2341X_ENC_SET_FRAME_SIZE
.subsections_via_symbols
