	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function em28xx_scaler_set
_em28xx_scaler_set:                     ## @em28xx_scaler_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	cmpq	$0, (%rdi)
	je	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	testl	%ebx, %ebx
	setne	%al
	shll	$5, %eax
	xorl	%edx, %edx
	testl	%r14d, %r14d
	setne	%dl
	shll	$4, %edx
	orl	%eax, %edx
	jmp	LBB0_3
LBB0_2:
	movl	%r14d, -48(%rbp)
	movl	%r14d, %eax
	sarl	$8, %eax
	movl	%eax, -44(%rbp)
	movq	_EM28XX_R30_HSCALELOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %r12
	movq	%r15, %rdi
	movq	%r12, %rdx
	movl	$2, %ecx
	callq	_em28xx_write_regs
	movl	%ebx, -48(%rbp)
	movl	%ebx, %eax
	sarl	$8, %eax
	movl	%eax, -44(%rbp)
	movq	_EM28XX_R32_VSCALELOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movq	%r12, %rdx
	movl	$2, %ecx
	callq	_em28xx_write_regs
	xorl	%eax, %eax
	orl	%r14d, %ebx
	movl	$48, %edx
	cmovel	%eax, %edx
LBB0_3:
	movq	_EM28XX_R26_COMPR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_em28xx_write_reg
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_5
## %bb.4:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EM28XX_R30_HSCALELOW,4,2       ## @EM28XX_R30_HSCALELOW
	.comm	_EM28XX_R32_VSCALELOW,4,2       ## @EM28XX_R32_VSCALELOW
	.comm	_EM28XX_R26_COMPR,4,2           ## @EM28XX_R26_COMPR
	.no_dead_strip	_em28xx_scaler_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function em28xx_scaler_set
_em28xx_scaler_set:                     ; @em28xx_scaler_set
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	ldr	x8, [x0]
	cbz	x8, LBB0_2
; %bb.1:
	cmp	w21, #0
	cset	w8, ne
	cmp	w20, #0
	cset	w9, ne
	lsl	w2, w9, #4
	bfi	w2, w8, #5, #1
	b	LBB0_3
LBB0_2:
	asr	w8, w20, #8
	stp	w20, w8, [sp]
Lloh3:
	adrp	x8, _EM28XX_R30_HSCALELOW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EM28XX_R30_HSCALELOW@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x2, sp
	mov	x0, x19
	mov	w3, #2
	bl	_em28xx_write_regs
	asr	w8, w21, #8
	stp	w21, w8, [sp]
Lloh6:
	adrp	x8, _EM28XX_R32_VSCALELOW@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EM28XX_R32_VSCALELOW@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x2, sp
	mov	x0, x19
	mov	w3, #2
	bl	_em28xx_write_regs
	orr	w8, w21, w20
	mov	w9, #48
	cmp	w8, #0
	csel	w2, wzr, w9, eq
LBB0_3:
Lloh9:
	adrp	x8, _EM28XX_R26_COMPR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EM28XX_R26_COMPR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_em28xx_write_reg
	ldr	x8, [sp, #8]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	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
	add	sp, sp, #64
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EM28XX_R30_HSCALELOW,4,2       ; @EM28XX_R30_HSCALELOW
	.comm	_EM28XX_R32_VSCALELOW,4,2       ; @EM28XX_R32_VSCALELOW
	.comm	_EM28XX_R26_COMPR,4,2           ; @EM28XX_R26_COMPR
	.no_dead_strip	_em28xx_scaler_set
.subsections_via_symbols
