	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidioc_encoder_cmd
_vidioc_encoder_cmd:                    ## @vidioc_encoder_cmd
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rdi, %r15
	callq	_video_drvdata
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_mutex_lock
	movq	$0, 8(%rbx)
	movl	(%rbx), %r8d
	cmpl	$128, %r8d
	je	LBB0_9
## %bb.1:
	cmpl	$129, %r8d
	jne	LBB0_14
## %bb.2:
	movq	8(%r14), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	cmpq	%rax, (%r15)
	jne	LBB0_4
LBB0_5:
	movl	16(%r14), %eax
	movq	_STATUS_STREAMING@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpl	(%rcx), %eax
	je	LBB0_16
## %bb.6:
	movq	%r14, %rdi
	callq	_hdpvr_start_streaming
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movq	_STATUS_IDLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 16(%r14)
	movl	%eax, %ebx
	jmp	LBB0_16
LBB0_9:
	movq	8(%r14), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	cmpq	%rax, (%r15)
	je	LBB0_11
LBB0_4:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_14:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_hdpvr_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdx
	addq	$4, %rdx
	leaq	L_.str(%rip), %rcx
	callq	_v4l2_dbg
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_15:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_16:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	16(%r14), %eax
	movq	_STATUS_IDLE@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpl	(%rcx), %eax
	je	LBB0_16
## %bb.12:
	movq	%r14, %rdi
	callq	_hdpvr_stop_streaming
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_16
## %bb.13:
	movq	$0, 8(%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_16
LBB0_7:
	movq	(%r15), %rax
	movq	%rax, 8(%r14)
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_STATUS_STREAMING,4,2           ## @STATUS_STREAMING
	.comm	_STATUS_IDLE,4,2                ## @STATUS_IDLE
	.comm	_MSG_INFO,4,2                   ## @MSG_INFO
	.comm	_hdpvr_debug,4,2                ## @hdpvr_debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported encoder cmd %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_vidioc_encoder_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vidioc_encoder_cmd
_vidioc_encoder_cmd:                    ; @vidioc_encoder_cmd
	.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
	mov	x21, x2
	mov	x20, x0
	bl	_video_drvdata
	mov	x19, x0
	bl	_mutex_lock
	str	xzr, [x21, #8]
	ldr	w4, [x21]
	cmp	w4, #128
	b.eq	LBB0_7
; %bb.1:
	cmp	w4, #129
	b.ne	LBB0_10
; %bb.2:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	x9, [x20]
	cmp	x9, x8
	b.ne	LBB0_9
LBB0_4:
	ldr	w8, [x19, #16]
Lloh0:
	adrp	x9, _STATUS_STREAMING@GOTPAGE
Lloh1:
	ldr	x9, [x9, _STATUS_STREAMING@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_13
; %bb.5:
	mov	x0, x19
	bl	_hdpvr_start_streaming
	mov	x21, x0
	cbz	w0, LBB0_16
; %bb.6:
Lloh3:
	adrp	x8, _STATUS_IDLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _STATUS_IDLE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	b	LBB0_17
LBB0_7:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_12
; %bb.8:
	ldr	x9, [x20]
	cmp	x9, x8
	b.eq	LBB0_12
LBB0_9:
Lloh6:
	adrp	x8, _EBUSY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh8:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x8, _hdpvr_debug@GOTPAGE
Lloh12:
	ldr	x8, [x8, _hdpvr_debug@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	add	x2, x19, #4
Lloh14:
	adrp	x3, l_.str@PAGE
Lloh15:
	add	x3, x3, l_.str@PAGEOFF
	bl	_v4l2_dbg
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_17
LBB0_12:
	ldr	w8, [x19, #16]
Lloh18:
	adrp	x9, _STATUS_IDLE@GOTPAGE
Lloh19:
	ldr	x9, [x9, _STATUS_IDLE@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_14
LBB0_13:
	mov	w21, #0
	b	LBB0_17
LBB0_14:
	mov	x0, x19
	bl	_hdpvr_stop_streaming
	mov	x21, x0
	cbnz	w0, LBB0_17
; %bb.15:
	str	xzr, [x19, #8]
	b	LBB0_17
LBB0_16:
	ldr	x8, [x20]
	str	x8, [x19, #8]
LBB0_17:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_STATUS_STREAMING,4,2           ; @STATUS_STREAMING
	.comm	_STATUS_IDLE,4,2                ; @STATUS_IDLE
	.comm	_MSG_INFO,4,2                   ; @MSG_INFO
	.comm	_hdpvr_debug,4,2                ; @hdpvr_debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported encoder cmd %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_vidioc_encoder_cmd
.subsections_via_symbols
