	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bt848_sat
_bt848_sat:                             ## @bt848_sat
	.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
	movl	%esi, (%rdi)
	movl	4(%rdi), %eax
	movl	$100, %edx
	subl	%eax, %edx
	imull	%esi, %eax
	cltq
	imulq	$1374389535, %rax, %rax         ## imm = 0x51EB851F
	movq	%rax, %rcx
	shrq	$63, %rcx
	shrq	$32, %rax
	sarl	$4, %eax
	addl	%ecx, %eax
	movl	%eax, %ecx
	shrl	$7, %ecx
	imull	%esi, %edx
	movslq	%edx, %rdx
	imulq	$1374389535, %rdx, %rdx         ## imm = 0x51EB851F
	movq	%rdx, %rsi
	shrq	$63, %rsi
	shrq	$32, %rdx
	sarl	$4, %edx
	addl	%esi, %edx
	sarl	$7, %edx
	imull	$180, %edx, %edx
	movslq	%edx, %rbx
	imulq	$-2130574327, %rbx, %rdx        ## imm = 0x81020409
	shrq	$32, %rdx
	addl	%edx, %ebx
	movl	%ebx, %edx
	shrl	$31, %edx
	sarl	$7, %ebx
	addl	%edx, %ebx
	shrl	$14, %eax
	andl	$2, %eax
	movl	%ebx, %r14d
	shrl	$8, %r14d
	andl	$1, %r14d
	orl	%eax, %r14d
	movzbl	%cl, %edi
	movq	_BT848_SAT_U_LO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_btwrite
	movzbl	%bl, %edi
	movq	_BT848_SAT_V_LO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_btwrite
	movq	_BT848_E_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %edi
	movl	$-4, %esi
	callq	_btaor
	movq	_BT848_O_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %edi
	movl	$-4, %esi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_btaor                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BT848_SAT_U_LO,4,2             ## @BT848_SAT_U_LO
	.comm	_BT848_SAT_V_LO,4,2             ## @BT848_SAT_V_LO
	.comm	_BT848_E_CONTROL,4,2            ## @BT848_E_CONTROL
	.comm	_BT848_O_CONTROL,4,2            ## @BT848_O_CONTROL
	.no_dead_strip	_bt848_sat
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bt848_sat
_bt848_sat:                             ; @bt848_sat
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	str	w1, [x0]
	ldr	w8, [x0, #4]
	mul	w9, w8, w1
	mov	w10, #34079
	movk	w10, #20971, lsl #16
	smull	x9, w9, w10
	lsr	x11, x9, #32
	lsr	x9, x9, #63
	add	w9, w9, w11, asr #4
	mov	w11, #100
	sub	w8, w11, w8
	mul	w8, w8, w1
	smull	x8, w8, w10
	lsr	x10, x8, #32
	lsr	x8, x8, #63
	add	w8, w8, w10, asr #4
	asr	w8, w8, #7
	mov	w10, #180
	mul	w8, w8, w10
	mov	w10, #1033
	movk	w10, #33026, lsl #16
	smull	x10, w8, w10
	lsr	x10, x10, #32
	add	w8, w10, w8
	asr	w10, w8, #7
	add	w20, w10, w8, lsr #31
	lsr	w8, w9, #14
	and	w19, w8, #0x2
	bfxil	w19, w20, #8, #1
	ubfx	w0, w9, #7, #8
Lloh0:
	adrp	x8, _BT848_SAT_U_LO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BT848_SAT_U_LO@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_btwrite
	and	w0, w20, #0xff
Lloh3:
	adrp	x8, _BT848_SAT_V_LO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BT848_SAT_V_LO@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_btwrite
Lloh6:
	adrp	x8, _BT848_E_CONTROL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BT848_E_CONTROL@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #-4
	bl	_btaor
Lloh9:
	adrp	x8, _BT848_O_CONTROL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BT848_O_CONTROL@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #-4
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_btaor
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_BT848_SAT_U_LO,4,2             ; @BT848_SAT_U_LO
	.comm	_BT848_SAT_V_LO,4,2             ; @BT848_SAT_V_LO
	.comm	_BT848_E_CONTROL,4,2            ; @BT848_E_CONTROL
	.comm	_BT848_O_CONTROL,4,2            ; @BT848_O_CONTROL
	.no_dead_strip	_bt848_sat
.subsections_via_symbols
