	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ivtv_decoder_ioctls
_ivtv_decoder_ioctls:                   ## @ivtv_decoder_ioctls
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %ebx
	movl	4(%rdi), %edi
	callq	_fh2id
	movq	16(%rax), %r15
	cmpl	$139, %ebx
	je	LBB0_8
## %bb.1:
	cmpl	$140, %ebx
	jne	LBB0_10
## %bb.2:
	movq	%rax, %r13
	movq	(%rax), %r12
	shlq	$3, %r12
	addq	48(%r15), %r12
	leaq	L_.str(%rip), %rdi
	callq	_IVTV_DEBUG_IOCTL
	movq	_V4L2_CAP_VIDEO_OUTPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_10
## %bb.3:
	movl	8(%r14), %eax
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_10
## %bb.4:
	movl	40(%r15), %eax
	movq	_OUT_UDMA_YUV@GOTPCREL(%rip), %rbx
	cmpl	(%rbx), %eax
	jne	LBB0_6
## %bb.5:
	cmpq	$0, (%r14)
	je	LBB0_16
LBB0_6:
	movq	(%r13), %rsi
	movq	%r13, %rdi
	callq	_ivtv_start_decoding
	testl	%eax, %eax
	je	LBB0_13
## %bb.7:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_11
LBB0_8:
	leaq	L_.str.1(%rip), %rdi
	callq	_IVTV_DEBUG_IOCTL
	movq	_V4L2_CAP_VIDEO_OUTPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_10
## %bb.9:
	xorl	%esi, %esi
	cmpl	$0, (%r14)
	setne	%sil
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ivtv_passthrough_mode          ## TAILCALL
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_11:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_ivtv_set_output_mode
	cmpl	(%rbx), %eax
	jne	LBB0_17
## %bb.14:
	movl	$1, 8(%r13)
	cmpq	$0, (%r14)
	je	LBB0_16
## %bb.15:
	movq	%r15, %rdi
	movq	%r14, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ivtv_yuv_prep_frame            ## TAILCALL
LBB0_16:
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_17:
	movq	%r12, %rdi
	callq	_ivtv_release_stream
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IVTV_IOC_DMA_FRAME\n"

	.comm	_V4L2_CAP_VIDEO_OUTPUT,4,2      ## @V4L2_CAP_VIDEO_OUTPUT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,4,2 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT
	.comm	_OUT_UDMA_YUV,4,2               ## @OUT_UDMA_YUV
	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.1:                               ## @.str.1
	.asciz	"IVTV_IOC_PASSTHROUGH_MODE\n"

	.comm	_AUDIO_STEREO_SWAPPED,8,3       ## @AUDIO_STEREO_SWAPPED
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_EINTR,4,2                      ## @EINTR
	.comm	_IVTV_DEC_STREAM_TYPE_MPG,4,2   ## @IVTV_DEC_STREAM_TYPE_MPG
	.comm	_IVTV_F_I_EV_DEC_STOPPED,4,2    ## @IVTV_F_I_EV_DEC_STOPPED
	.comm	_IVTV_F_I_EV_VSYNC,4,2          ## @IVTV_F_I_EV_VSYNC
	.comm	_IVTV_F_I_EV_VSYNC_ENABLED,4,2  ## @IVTV_F_I_EV_VSYNC_ENABLED
	.comm	_IVTV_F_I_EV_VSYNC_FIELD,4,2    ## @IVTV_F_I_EV_VSYNC_FIELD
	.comm	_IVTV_YUV_MODE_MASK,4,2         ## @IVTV_YUV_MODE_MASK
	.comm	_IVTV_YUV_MODE_PROGRESSIVE,4,2  ## @IVTV_YUV_MODE_PROGRESSIVE
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
	.comm	_TASK_INTERRUPTIBLE,4,2         ## @TASK_INTERRUPTIBLE
	.comm	_V4L2_DEC_CMD_PAUSE,4,2         ## @V4L2_DEC_CMD_PAUSE
	.comm	_V4L2_DEC_CMD_RESUME,4,2        ## @V4L2_DEC_CMD_RESUME
	.comm	_V4L2_DEC_CMD_START,4,2         ## @V4L2_DEC_CMD_START
	.comm	_V4L2_DEC_CMD_STOP,4,2          ## @V4L2_DEC_CMD_STOP
	.comm	_V4L2_DEC_CMD_STOP_IMMEDIATELY,4,2 ## @V4L2_DEC_CMD_STOP_IMMEDIATELY
	.comm	_V4L2_DEC_CMD_STOP_TO_BLACK,4,2 ## @V4L2_DEC_CMD_STOP_TO_BLACK
	.comm	_VIDEO_EVENT_DECODER_STOPPED,4,2 ## @VIDEO_EVENT_DECODER_STOPPED
	.comm	_VIDEO_EVENT_VSYNC,4,2          ## @VIDEO_EVENT_VSYNC
	.comm	_VIDEO_SOURCE_DEMUX,8,3         ## @VIDEO_SOURCE_DEMUX
	.comm	_VIDEO_VSYNC_FIELD_EVEN,1,0     ## @VIDEO_VSYNC_FIELD_EVEN
	.comm	_VIDEO_VSYNC_FIELD_ODD,1,0      ## @VIDEO_VSYNC_FIELD_ODD
	.comm	_VIDEO_VSYNC_FIELD_PROGRESSIVE,1,0 ## @VIDEO_VSYNC_FIELD_PROGRESSIVE
	.comm	_current,4,2                    ## @current
	.comm	_wait,4,2                       ## @wait
	.no_dead_strip	_ivtv_decoder_ioctls
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ivtv_decoder_ioctls
_ivtv_decoder_ioctls:                   ; @ivtv_decoder_ioctls
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x2
	mov	x22, x1
	ldr	w0, [x0, #4]
	bl	_fh2id
	ldr	x20, [x0, #16]
	cmp	w22, #139
	b.eq	LBB0_10
; %bb.1:
	cmp	w22, #140
	b.ne	LBB0_12
; %bb.2:
	mov	x21, x0
	ldr	x22, [x20, #48]
	ldr	x23, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IVTV_DEBUG_IOCTL
	ldr	w8, [x20]
Lloh2:
	adrp	x9, _V4L2_CAP_VIDEO_OUTPUT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _V4L2_CAP_VIDEO_OUTPUT@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.3:
	ldr	w8, [x19, #8]
Lloh5:
	adrp	x9, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_12
; %bb.4:
	ldr	w8, [x20, #40]
Lloh8:
	adrp	x24, _OUT_UDMA_YUV@GOTPAGE
Lloh9:
	ldr	x24, [x24, _OUT_UDMA_YUV@GOTPAGEOFF]
	ldr	w9, [x24]
	cmp	w8, w9
	b.ne	LBB0_6
; %bb.5:
	ldr	x8, [x19]
	cbz	x8, LBB0_15
LBB0_6:
	ldr	x1, [x21]
	mov	x0, x21
	bl	_ivtv_start_decoding
	cbnz	w0, LBB0_17
; %bb.7:
	ldr	w1, [x24]
	mov	x0, x20
	bl	_ivtv_set_output_mode
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_16
; %bb.8:
	mov	w8, #1
	str	w8, [x21, #8]
	ldr	x8, [x19]
	cbz	x8, LBB0_15
; %bb.9:
	mov	x0, x20
	mov	x1, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ivtv_yuv_prep_frame
LBB0_10:
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_IVTV_DEBUG_IOCTL
	ldr	w8, [x20]
Lloh12:
	adrp	x9, _V4L2_CAP_VIDEO_OUTPUT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _V4L2_CAP_VIDEO_OUTPUT@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.11:
	ldr	w8, [x19]
	cmp	w8, #0
	cset	w1, ne
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ivtv_passthrough_mode
LBB0_12:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_15:
	mov	w0, #0
	b	LBB0_14
LBB0_16:
	add	x0, x22, x23, lsl #3
	bl	_ivtv_release_stream
LBB0_17:
Lloh17:
	adrp	x8, _EBUSY@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IVTV_IOC_DMA_FRAME\n"

	.comm	_V4L2_CAP_VIDEO_OUTPUT,4,2      ; @V4L2_CAP_VIDEO_OUTPUT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,4,2 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT
	.comm	_OUT_UDMA_YUV,4,2               ; @OUT_UDMA_YUV
	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.1:                               ; @.str.1
	.asciz	"IVTV_IOC_PASSTHROUGH_MODE\n"

	.comm	_AUDIO_STEREO_SWAPPED,8,3       ; @AUDIO_STEREO_SWAPPED
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_EINTR,4,2                      ; @EINTR
	.comm	_IVTV_DEC_STREAM_TYPE_MPG,4,2   ; @IVTV_DEC_STREAM_TYPE_MPG
	.comm	_IVTV_F_I_EV_DEC_STOPPED,4,2    ; @IVTV_F_I_EV_DEC_STOPPED
	.comm	_IVTV_F_I_EV_VSYNC,4,2          ; @IVTV_F_I_EV_VSYNC
	.comm	_IVTV_F_I_EV_VSYNC_ENABLED,4,2  ; @IVTV_F_I_EV_VSYNC_ENABLED
	.comm	_IVTV_F_I_EV_VSYNC_FIELD,4,2    ; @IVTV_F_I_EV_VSYNC_FIELD
	.comm	_IVTV_YUV_MODE_MASK,4,2         ; @IVTV_YUV_MODE_MASK
	.comm	_IVTV_YUV_MODE_PROGRESSIVE,4,2  ; @IVTV_YUV_MODE_PROGRESSIVE
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
	.comm	_TASK_INTERRUPTIBLE,4,2         ; @TASK_INTERRUPTIBLE
	.comm	_V4L2_DEC_CMD_PAUSE,4,2         ; @V4L2_DEC_CMD_PAUSE
	.comm	_V4L2_DEC_CMD_RESUME,4,2        ; @V4L2_DEC_CMD_RESUME
	.comm	_V4L2_DEC_CMD_START,4,2         ; @V4L2_DEC_CMD_START
	.comm	_V4L2_DEC_CMD_STOP,4,2          ; @V4L2_DEC_CMD_STOP
	.comm	_V4L2_DEC_CMD_STOP_IMMEDIATELY,4,2 ; @V4L2_DEC_CMD_STOP_IMMEDIATELY
	.comm	_V4L2_DEC_CMD_STOP_TO_BLACK,4,2 ; @V4L2_DEC_CMD_STOP_TO_BLACK
	.comm	_VIDEO_EVENT_DECODER_STOPPED,4,2 ; @VIDEO_EVENT_DECODER_STOPPED
	.comm	_VIDEO_EVENT_VSYNC,4,2          ; @VIDEO_EVENT_VSYNC
	.comm	_VIDEO_SOURCE_DEMUX,8,3         ; @VIDEO_SOURCE_DEMUX
	.comm	_VIDEO_VSYNC_FIELD_EVEN,1,0     ; @VIDEO_VSYNC_FIELD_EVEN
	.comm	_VIDEO_VSYNC_FIELD_ODD,1,0      ; @VIDEO_VSYNC_FIELD_ODD
	.comm	_VIDEO_VSYNC_FIELD_PROGRESSIVE,1,0 ; @VIDEO_VSYNC_FIELD_PROGRESSIVE
	.comm	_current,4,2                    ; @current
	.comm	_wait,4,2                       ; @wait
	.no_dead_strip	_ivtv_decoder_ioctls
.subsections_via_symbols
