	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function em28xx_capture_area_set
_em28xx_capture_area_set:               ## @em28xx_capture_area_set
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r14d
	movl	%ecx, %r15d
	movq	%rdi, %rbx
	movl	%esi, -44(%rbp)
	movl	%edx, -40(%rbp)
	movl	%ecx, %eax
	sarl	$2, %eax
	movl	%eax, -36(%rbp)
	movl	%r8d, %eax
	sarl	$2, %eax
	movl	%eax, -32(%rbp)
	movl	%r8d, %eax
	shrl	$9, %eax
	andl	$2, %eax
	movl	%ecx, %edi
	shrl	$10, %edi
	andl	$1, %edi
	leal	(%rax,%rdi), %ecx
	movl	%ecx, -28(%rbp)
	shll	$9, %eax
	movl	%r15d, %ecx
	andl	$-4, %ecx
	orl	%eax, %ecx
	shll	$10, %edi
	andl	$-4, %r8d
	orl	%edi, %r8d
	leaq	L_.str(%rip), %rdi
	callq	_em28xx_videodbg
	movq	_EM28XX_R1C_HSTART@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$1, %ecx
	callq	_em28xx_write_regs
	movq	_EM28XX_R1D_VSTART@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$1, %ecx
	callq	_em28xx_write_regs
	movq	_EM28XX_R1E_CWIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$1, %ecx
	callq	_em28xx_write_regs
	movq	_EM28XX_R1F_CHEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$1, %ecx
	callq	_em28xx_write_regs
	movq	_EM28XX_R1B_OFLOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$1, %ecx
	callq	_em28xx_write_regs
	cmpq	$0, (%rbx)
	je	LBB0_2
## %bb.1:
	sarl	$4, %r15d
	movq	%rbx, %rdi
	movl	$52, %esi
	movl	%r15d, %edx
	callq	_em28xx_write_reg
	sarl	$4, %r14d
	movq	%rbx, %rdi
	movl	$53, %esi
	movl	%r14d, %edx
	callq	_em28xx_write_reg
LBB0_2:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"capture area set to (%d,%d): %dx%d\n"

	.comm	_EM28XX_R1C_HSTART,4,2          ## @EM28XX_R1C_HSTART
	.comm	_EM28XX_R1D_VSTART,4,2          ## @EM28XX_R1D_VSTART
	.comm	_EM28XX_R1E_CWIDTH,4,2          ## @EM28XX_R1E_CWIDTH
	.comm	_EM28XX_R1F_CHEIGHT,4,2         ## @EM28XX_R1F_CHEIGHT
	.comm	_EM28XX_R1B_OFLOW,4,2           ## @EM28XX_R1B_OFLOW
	.no_dead_strip	_em28xx_capture_area_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function em28xx_capture_area_set
_em28xx_capture_area_set:               ; @em28xx_capture_area_set
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x4
	mov	x21, x3
	mov	x20, x0
	stp	w2, w1, [sp, #24]
	asr	w9, w3, #2
	asr	w8, w4, #2
	stp	w8, w9, [sp, #16]
	lsr	w8, w4, #9
	and	w8, w8, #0x2
	ubfx	w9, w3, #10, #1
	and	w10, w3, #0xfffffffc
	orr	w3, w10, w8, lsl #9
	bfxil	w8, w21, #10, #1
	str	w8, [sp, #12]
	and	w8, w4, #0xfffffffc
	orr	w4, w8, w9, lsl #10
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_em28xx_videodbg
Lloh2:
	adrp	x8, _EM28XX_R1C_HSTART@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EM28XX_R1C_HSTART@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	add	x2, sp, #28
	mov	x0, x20
	mov	w3, #1
	bl	_em28xx_write_regs
Lloh5:
	adrp	x8, _EM28XX_R1D_VSTART@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EM28XX_R1D_VSTART@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	x2, sp, #24
	mov	x0, x20
	mov	w3, #1
	bl	_em28xx_write_regs
Lloh8:
	adrp	x8, _EM28XX_R1E_CWIDTH@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EM28XX_R1E_CWIDTH@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	add	x2, sp, #20
	mov	x0, x20
	mov	w3, #1
	bl	_em28xx_write_regs
Lloh11:
	adrp	x8, _EM28XX_R1F_CHEIGHT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EM28XX_R1F_CHEIGHT@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	add	x2, sp, #16
	mov	x0, x20
	mov	w3, #1
	bl	_em28xx_write_regs
Lloh14:
	adrp	x8, _EM28XX_R1B_OFLOW@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EM28XX_R1B_OFLOW@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x20
	mov	w3, #1
	bl	_em28xx_write_regs
	ldr	x8, [x20]
	cbz	x8, LBB0_2
; %bb.1:
	asr	w2, w21, #4
	mov	x0, x20
	mov	w1, #52
	bl	_em28xx_write_reg
	asr	w2, w19, #4
	mov	x0, x20
	mov	w1, #53
	bl	_em28xx_write_reg
LBB0_2:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"capture area set to (%d,%d): %dx%d\n"

	.comm	_EM28XX_R1C_HSTART,4,2          ; @EM28XX_R1C_HSTART
	.comm	_EM28XX_R1D_VSTART,4,2          ; @EM28XX_R1D_VSTART
	.comm	_EM28XX_R1E_CWIDTH,4,2          ; @EM28XX_R1E_CWIDTH
	.comm	_EM28XX_R1F_CHEIGHT,4,2         ; @EM28XX_R1F_CHEIGHT
	.comm	_EM28XX_R1B_OFLOW,4,2           ; @EM28XX_R1B_OFLOW
	.no_dead_strip	_em28xx_capture_area_set
.subsections_via_symbols
