	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pwc_s_fmt_vid_cap
_pwc_s_fmt_vid_cap:                     ## @pwc_s_fmt_vid_cap
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	callq	_video_drvdata
	movq	%rax, %r15
	movl	$0, -36(%rbp)
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	_pwc_vidioc_try_fmt
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	leaq	16(%r15), %rdi
	callq	_vb2_is_busy
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_5
LBB0_1:
	movl	%eax, %ebx
	jmp	LBB0_5
LBB0_4:
	movl	8(%r14), %esi
	movl	(%r14), %ebx
	movl	4(%r14), %edx
	movl	12(%r15), %ecx
	movzbl	%bl, %r8d
	movzbl	%bh, %eax
	movl	%ebx, %edi
	movl	%ebx, %r12d
	shrl	$16, %edi
	movzbl	%dil, %r10d
	shrl	$24, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %r9d
	xorl	%eax, %eax
	pushq	%rbx
	pushq	%r10
	callq	_PWC_DEBUG_IOCTL
	addq	$16, %rsp
	movl	4(%r14), %edx
	movl	8(%r14), %esi
	subq	$8, %rsp
	leaq	-36(%rbp), %r9
	movq	%r15, %rdi
	movl	%r12d, %ecx
	movl	$30, %r8d
	pushq	$0
	callq	_pwc_set_video_mode
	addq	$16, %rsp
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_PWC_DEBUG_IOCTL
	movl	8(%r15), %esi
	movl	(%r15), %ecx
	movl	4(%r15), %edx
	movq	%r14, %rdi
	callq	_pwc_vidioc_fill_fmt
LBB0_5:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Trying to set format to: width=%d height=%d fps=%d format=%c%c%c%c\n"

L_.str.1:                               ## @.str.1
	.asciz	"pwc_set_video_mode(), return=%d\n"

	.no_dead_strip	_pwc_s_fmt_vid_cap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pwc_s_fmt_vid_cap
_pwc_s_fmt_vid_cap:                     ; @pwc_s_fmt_vid_cap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x2
	bl	_video_drvdata
	mov	x20, x0
	stur	wzr, [x29, #-36]
	mov	x1, x19
	bl	_pwc_vidioc_try_fmt
	tbnz	w0, #31, LBB0_3
; %bb.1:
	add	x0, x20, #16
	bl	_vb2_is_busy
	cbz	x0, LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_5
LBB0_3:
	mov	x21, x0
	b	LBB0_5
LBB0_4:
	ldp	w8, w1, [x19, #4]
	ldr	w21, [x19]
	and	w9, w21, #0xff
	ubfx	w10, w21, #8, #8
	ubfx	w11, w21, #16, #8
	lsr	w12, w21, #24
	ldr	w13, [x20, #12]
	stp	x11, x12, [sp, #32]
	stp	x9, x10, [sp, #16]
	stp	x8, x13, [sp]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_PWC_DEBUG_IOCTL
	ldp	w2, w1, [x19, #4]
	sub	x5, x29, #36
	mov	x0, x20
	mov	x3, x21
	mov	w4, #30
	mov	w6, #0
	bl	_pwc_set_video_mode
	mov	x21, x0
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_PWC_DEBUG_IOCTL
	ldp	w2, w1, [x20, #4]
	ldr	w3, [x20]
	mov	x0, x19
	bl	_pwc_vidioc_fill_fmt
LBB0_5:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Trying to set format to: width=%d height=%d fps=%d format=%c%c%c%c\n"

l_.str.1:                               ; @.str.1
	.asciz	"pwc_set_video_mode(), return=%d\n"

	.no_dead_strip	_pwc_s_fmt_vid_cap
.subsections_via_symbols
