	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function video_mux_set_format
_video_mux_set_format:                  ## @video_mux_set_format
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r14
	callq	_v4l2_subdev_to_video_mux
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	24(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %r13
	movq	(%r14), %r12
	movl	32(%rbx), %ecx
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	callq	___video_mux_get_pad_format
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	decq	%r12
	movl	32(%rbx), %ecx
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	___video_mux_get_pad_format
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r15
	leaq	8(%rbx), %r14
	leaq	28(%rbx), %rdi
	leaq	24(%rbx), %r8
	subq	$8, %rsp
	movl	$1, %esi
	movl	$65536, %edx                    ## imm = 0x10000
	xorl	%ecx, %ecx
	movl	$1, %r9d
	pushq	$0
	pushq	$0
	pushq	$65536                          ## imm = 0x10000
	callq	_v4l_bound_align_image
	addq	$32, %rsp
	movl	8(%rbx), %eax
	addl	$-128, %eax
	cmpl	$88, %eax
	jb	LBB0_5
## %bb.4:
	movl	$147, (%r14)
LBB0_5:
	movq	16(%rbx), %rax
	movq	_V4L2_FIELD_ANY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jne	LBB0_7
## %bb.6:
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%rbx)
LBB0_7:
	movq	%r12, %rbx
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	shlq	$4, %r13
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	leaq	(%rdi,%r13), %rax
	movq	_MEDIA_PAD_FL_SOURCE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rdi,%r13)
	je	LBB0_9
## %bb.8:
	movq	(%r12), %rcx
	movq	16(%r12), %rdx
	leaq	(%rcx,%rcx,2), %rcx
	movq	16(%rdx,%rcx,8), %rsi
	movq	%rsi, 16(%r14)
	movups	(%rdx,%rcx,8), %xmm0
	movups	%xmm0, (%r14)
LBB0_9:
	movq	16(%r14), %rcx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%rcx, 16(%rdx)
	movups	(%r14), %xmm0
	movups	%xmm0, (%rdx)
	movq	_MEDIA_PAD_FL_SINK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_12
## %bb.10:
	movq	8(%rdi,%r13), %rax
	cmpq	(%r12), %rax
	jne	LBB0_12
## %bb.11:
	movq	16(%r14), %rax
	movq	%rax, 16(%r15)
	movups	(%r14), %xmm0
	movups	%xmm0, (%r15)
LBB0_12:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_FIELD_ANY,8,3             ## @V4L2_FIELD_ANY
	.comm	_V4L2_FIELD_NONE,8,3            ## @V4L2_FIELD_NONE
	.comm	_MEDIA_PAD_FL_SOURCE,4,2        ## @MEDIA_PAD_FL_SOURCE
	.comm	_MEDIA_PAD_FL_SINK,4,2          ## @MEDIA_PAD_FL_SINK
	.no_dead_strip	_video_mux_set_format
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function video_mux_set_format
_video_mux_set_format:                  ; @video_mux_set_format
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x2
	mov	x21, x1
	mov	x24, x0
	bl	_v4l2_subdev_to_video_mux
	mov	x19, x0
	ldr	x25, [x0, #24]
	ldr	x20, [x23]
	ldr	x26, [x24]
	ldr	w3, [x23, #32]
	mov	x0, x24
	mov	x1, x21
	mov	x2, x20
	bl	___video_mux_get_pad_format
	cbz	x0, LBB0_12
; %bb.1:
	mov	x22, x0
	sub	x2, x26, #1
	ldr	w3, [x23, #32]
	mov	x0, x24
	mov	x1, x21
	bl	___video_mux_get_pad_format
	cbz	x0, LBB0_12
; %bb.2:
	mov	x21, x0
	add	x0, x23, #28
	add	x4, x23, #24
	str	wzr, [sp]
	mov	w1, #1
	mov	w2, #65536
	mov	w3, #0
	mov	w5, #1
	mov	w6, #65536
	mov	w7, #0
	bl	_v4l_bound_align_image
	mov	x24, x23
	ldr	w8, [x24, #8]!
	sub	w8, w8, #128
	cmp	w8, #88
	b.lo	LBB0_4
; %bb.3:
	mov	w8, #147
	str	w8, [x24]
LBB0_4:
	ldr	x8, [x23, #16]
Lloh0:
	adrp	x9, _V4L2_FIELD_ANY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_FIELD_ANY@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
Lloh3:
	adrp	x8, _V4L2_FIELD_NONE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V4L2_FIELD_NONE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	x8, [x23, #16]
LBB0_6:
	add	x23, x19, #8
	mov	x0, x23
	bl	_mutex_lock
	add	x8, x25, x20, lsl #4
	ldr	w9, [x8]
Lloh6:
	adrp	x10, _MEDIA_PAD_FL_SOURCE@GOTPAGE
Lloh7:
	ldr	x10, [x10, _MEDIA_PAD_FL_SOURCE@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_8
; %bb.7:
	ldr	x9, [x19]
	ldr	x10, [x19, #16]
	mov	w11, #24
	madd	x9, x9, x11, x10
	ldr	q0, [x9]
	ldr	x9, [x9, #16]
	str	x9, [x24, #16]
	str	q0, [x24]
LBB0_8:
	ldr	q0, [x24]
	ldr	x9, [x24, #16]
	str	x9, [x22, #16]
	str	q0, [x22]
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _MEDIA_PAD_FL_SINK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MEDIA_PAD_FL_SINK@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.9:
	add	x8, x25, x20, lsl #4
	ldr	x8, [x8, #8]
	ldr	x9, [x19]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.10:
	ldr	q0, [x24]
	ldr	x8, [x24, #16]
	str	x8, [x21, #16]
	str	q0, [x21]
LBB0_11:
	mov	x0, x23
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_13
LBB0_12:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_FIELD_ANY,8,3             ; @V4L2_FIELD_ANY
	.comm	_V4L2_FIELD_NONE,8,3            ; @V4L2_FIELD_NONE
	.comm	_MEDIA_PAD_FL_SOURCE,4,2        ; @MEDIA_PAD_FL_SOURCE
	.comm	_MEDIA_PAD_FL_SINK,4,2          ; @MEDIA_PAD_FL_SINK
	.no_dead_strip	_video_mux_set_format
.subsections_via_symbols
