	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pwc_vidioc_fill_fmt
_pwc_vidioc_fill_fmt:                   ## @pwc_vidioc_fill_fmt
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	%rsi, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	20(%r14), %edx
	movl	%edx, (%rbx)
	movl	24(%r14), %ecx
	movl	%ecx, 4(%rbx)
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	(%r14), %rax
	movq	_V4L2_PIX_FMT_YUV420@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rax
	jne	LBB0_2
## %bb.1:
	movl	%eax, 8(%rbx)
	leal	(%rdx,%rdx,2), %edx
	movl	%edx, %esi
	shrl	$31, %esi
	addl	%edx, %esi
	sarl	%esi
	movl	%esi, 12(%rbx)
	imull	%esi, %ecx
	movl	%ecx, 16(%rbx)
	jmp	LBB0_6
LBB0_2:
	movl	8(%r14), %eax
	leal	3(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$2, %ecx
	movl	%ecx, 12(%rbx)
	movl	12(%r14), %eax
	addl	$4, %eax
	movl	%eax, 16(%rbx)
	movl	16(%r14), %edi
	callq	_DEVICE_USE_CODEC1
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_V4L2_PIX_FMT_PWC1@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_4:
	movq	_V4L2_PIX_FMT_PWC2@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
LBB0_6:
	movl	(%rbx), %esi
	movl	4(%rbx), %edx
	movl	12(%rbx), %ecx
	movl	16(%rbx), %r8d
	movzbl	%al, %r9d
	movzbl	%ah, %ebx
	movl	%eax, %edi
	shrl	$16, %edi
	movzbl	%dil, %r10d
	shrl	$24, %eax
	subq	$8, %rsp
	leaq	L_.str(%rip), %rdi
	pushq	%rax
	pushq	%r10
	pushq	%rbx
	callq	_PWC_DEBUG_IOCTL
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_FIELD_NONE,4,2            ## @V4L2_FIELD_NONE
	.comm	_V4L2_PIX_FMT_YUV420,8,3        ## @V4L2_PIX_FMT_YUV420
	.comm	_V4L2_PIX_FMT_PWC1,4,2          ## @V4L2_PIX_FMT_PWC1
	.comm	_V4L2_PIX_FMT_PWC2,4,2          ## @V4L2_PIX_FMT_PWC2
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pwc_vidioc_fill_fmt() width=%d, height=%d, bytesperline=%d, sizeimage=%d, pixelformat=%c%c%c%c\n"

	.no_dead_strip	_pwc_vidioc_fill_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pwc_vidioc_fill_fmt
_pwc_vidioc_fill_fmt:                   ; @pwc_vidioc_fill_fmt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x1
	mov	x20, x0
	mov	x0, x1
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldp	w10, w9, [x20, #20]
	stp	w10, w9, [x19]
Lloh0:
	adrp	x8, _V4L2_FIELD_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_FIELD_NONE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19, #20]
	ldr	x8, [x20]
Lloh3:
	adrp	x11, _V4L2_PIX_FMT_YUV420@GOTPAGE
Lloh4:
	ldr	x11, [x11, _V4L2_PIX_FMT_YUV420@GOTPAGEOFF]
Lloh5:
	ldr	x11, [x11]
	cmp	x8, x11
	b.ne	LBB0_2
; %bb.1:
	add	w10, w10, w10, lsl #1
	cmp	w10, #0
	cinc	w10, w10, lt
	asr	w10, w10, #1
	stp	w8, w10, [x19, #8]
	mul	w9, w9, w10
	str	w9, [x19, #16]
	b	LBB0_6
LBB0_2:
	ldp	w8, w9, [x20, #8]
	add	w10, w8, #3
	cmp	w8, #0
	csel	w8, w10, w8, lt
	asr	w8, w8, #2
	add	w9, w9, #4
	stp	w8, w9, [x19, #12]
	ldr	w0, [x20, #16]
	bl	_DEVICE_USE_CODEC1
	cbz	x0, LBB0_4
; %bb.3:
Lloh6:
	adrp	x8, _V4L2_PIX_FMT_PWC1@GOTPAGE
Lloh7:
	ldr	x8, [x8, _V4L2_PIX_FMT_PWC1@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh8:
	adrp	x8, _V4L2_PIX_FMT_PWC2@GOTPAGE
Lloh9:
	ldr	x8, [x8, _V4L2_PIX_FMT_PWC2@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	str	w8, [x19, #8]
LBB0_6:
	ldp	w1, w2, [x19]
	and	w5, w8, #0xff
	ubfx	w6, w8, #8, #8
	ubfx	w7, w8, #16, #8
	lsr	w8, w8, #24
	ldp	w3, w4, [x19, #12]
	str	w8, [sp]
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_PWC_DEBUG_IOCTL
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_FIELD_NONE,4,2            ; @V4L2_FIELD_NONE
	.comm	_V4L2_PIX_FMT_YUV420,8,3        ; @V4L2_PIX_FMT_YUV420
	.comm	_V4L2_PIX_FMT_PWC1,4,2          ; @V4L2_PIX_FMT_PWC1
	.comm	_V4L2_PIX_FMT_PWC2,4,2          ; @V4L2_PIX_FMT_PWC2
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pwc_vidioc_fill_fmt() width=%d, height=%d, bytesperline=%d, sizeimage=%d, pixelformat=%c%c%c%c\n"

	.no_dead_strip	_pwc_vidioc_fill_fmt
.subsections_via_symbols
