	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function usbvision_adjust_compression
_usbvision_adjust_compression:          ## @usbvision_adjust_compression
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_DBG_IRQ@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_PDEBUG
	movq	_adjust_compression@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.1:
	movl	(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_9
## %bb.2:
	movl	%eax, %ecx
	addl	$-90, %ecx
	shrl	$31, %ecx
	leal	(%rax,%rcx), %edi
	addl	$-90, %edi
	sarl	%edi
	addl	4(%r14), %edi
	movl	%edi, 4(%r14)
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	movl	$100, %edx
	callq	_RESTRICT_TO_RANGE
	movl	4(%r14), %eax
	cmpl	8(%r14), %eax
	je	LBB0_9
## %bb.3:
	movq	16(%r14), %rcx
	movq	_BRIDGE_NT1004@GOTPCREL(%rip), %rsi
	movl	%eax, %edx
	shll	$4, %edx
	movslq	%edx, %rdx
	imulq	$1374389535, %rdx, %rdi         ## imm = 0x51EB851F
	movq	%rdi, %rdx
	shrq	$63, %rdx
	shrq	$37, %rdi
	addl	%edx, %edi
	addb	$4, %dil
	movq	_BRIDGE_NT1005@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movb	%dil, -30(%rbp)
	cmpq	(%rsi), %rcx
	je	LBB0_5
## %bb.4:
	cmpq	%rdx, %rcx
	je	LBB0_5
## %bb.6:
	imull	$253, %eax, %ecx
	movslq	%ecx, %rcx
	imulq	$1374389535, %rcx, %rcx         ## imm = 0x51EB851F
	movq	%rcx, %rdx
	shrq	$63, %rdx
	shrq	$37, %rcx
	addl	%edx, %ecx
	addb	$2, %cl
	imull	$43, %eax, %edx
	movslq	%edx, %rdx
	imulq	$1374389535, %rdx, %rdx         ## imm = 0x51EB851F
	movq	%rdx, %rsi
	shrq	$63, %rsi
	shrq	$37, %rdx
	addl	%esi, %edx
	xorl	%esi, %esi
	xorl	%edi, %edi
	jmp	LBB0_7
LBB0_5:
	imull	$248, %eax, %ecx
	movslq	%ecx, %rcx
	imulq	$1374389535, %rcx, %rcx         ## imm = 0x51EB851F
	movq	%rcx, %rdx
	shrq	$63, %rdx
	shrq	$37, %rcx
	addl	%edx, %ecx
	addb	$7, %cl
	imull	$42, %eax, %edx
	movslq	%edx, %rdx
	imulq	$1374389535, %rdx, %rdx         ## imm = 0x51EB851F
	movq	%rdx, %rsi
	shrq	$63, %rsi
	shrq	$37, %rdx
	addl	%esi, %edx
	incb	%dl
	movl	%ecx, %esi
	movl	%edx, %edi
LBB0_7:
	shll	$3, %eax
	cltq
	imulq	$1374389535, %rax, %rax         ## imm = 0x51EB851F
	movq	%rax, %rbx
	shrq	$63, %rbx
	shrq	$37, %rax
	addl	%ebx, %eax
	addb	$4, %al
	movb	%al, -29(%rbp)
	movb	%cl, -28(%rbp)
	movb	%sil, -27(%rbp)
	movb	%dl, -26(%rbp)
	movb	%dil, -25(%rbp)
	movq	_USBVISION_PCM_THR1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-30(%rbp), %rdx
	movq	%r14, %rdi
	movl	$6, %ecx
	callq	_usbvision_write_reg_irq
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	movl	(%r15), %edi
	movzbl	-30(%rbp), %edx
	movzbl	-29(%rbp), %ecx
	movzbl	-28(%rbp), %r8d
	movzbl	-27(%rbp), %r9d
	movzbl	-26(%rbp), %r10d
	movzbl	-25(%rbp), %r11d
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	pushq	%r11
	pushq	%r10
	callq	_PDEBUG
	addq	$16, %rsp
	movl	4(%r14), %eax
	movl	%eax, 8(%r14)
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DBG_IRQ,4,2                    ## @DBG_IRQ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

	.comm	_adjust_compression,8,3         ## @adjust_compression
	.comm	_BRIDGE_NT1004,8,3              ## @BRIDGE_NT1004
	.comm	_BRIDGE_NT1005,8,3              ## @BRIDGE_NT1005
	.comm	_USBVISION_PCM_THR1,4,2         ## @USBVISION_PCM_THR1
L_.str.1:                               ## @.str.1
	.asciz	"new compr params %#02x %#02x %#02x %#02x %#02x %#02x"

	.no_dead_strip	_usbvision_adjust_compression
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function usbvision_adjust_compression
_usbvision_adjust_compression:          ; @usbvision_adjust_compression
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x20, _DBG_IRQ@GOTPAGE
Lloh1:
	ldr	x20, [x20, _DBG_IRQ@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_PDEBUG
Lloh4:
	adrp	x8, _adjust_compression@GOTPAGE
Lloh5:
	ldr	x8, [x8, _adjust_compression@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.1:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.2:
	sub	w9, w8, #90
	sub	w8, w8, #89
	cmp	w9, #0
	csel	w8, w8, w9, lt
	ldr	w9, [x19, #4]
	add	w0, w9, w8, asr #1
	str	w0, [x19, #4]
	mov	w1, #0
	mov	w2, #100
	bl	_RESTRICT_TO_RANGE
	mov	w0, #0
	ldp	w8, w9, [x19, #4]
	cmp	w8, w9
	b.eq	LBB0_6
; %bb.3:
	ldr	x9, [x19, #16]
Lloh7:
	adrp	x10, _BRIDGE_NT1004@GOTPAGE
Lloh8:
	ldr	x10, [x10, _BRIDGE_NT1004@GOTPAGEOFF]
Lloh9:
	ldr	x10, [x10]
Lloh10:
	adrp	x11, _BRIDGE_NT1005@GOTPAGE
Lloh11:
	ldr	x11, [x11, _BRIDGE_NT1005@GOTPAGEOFF]
Lloh12:
	ldr	x11, [x11]
	lsl	w12, w8, #4
	mov	w13, #34079
	movk	w13, #20971, lsl #16
	smull	x12, w12, w13
	lsr	x14, x12, #63
	lsr	x12, x12, #37
	add	w12, w12, w14
	add	w12, w12, #4
	sturb	w12, [x29, #-22]
	cmp	x9, x10
	ccmp	x9, x11, #4, ne
	mov	w9, #253
	mul	w9, w8, w9
	smull	x9, w9, w13
	lsr	x10, x9, #63
	asr	x9, x9, #37
	add	w9, w9, w10
	add	w9, w9, #2
	mov	w10, #43
	mul	w10, w8, w10
	smull	x10, w10, w13
	lsr	x11, x10, #63
	asr	x10, x10, #37
	add	w10, w10, w11
	mov	w11, #248
	mul	w11, w8, w11
	smull	x11, w11, w13
	lsr	x12, x11, #63
	asr	x11, x11, #37
	add	w11, w11, w12
	add	w11, w11, #7
	mov	w12, #42
	mul	w12, w8, w12
	smull	x12, w12, w13
	lsr	x14, x12, #63
	asr	x12, x12, #37
	add	w12, w12, w14
	csel	w9, w9, w11, ne
	csel	w11, wzr, w11, ne
	csinc	w10, w10, w12, ne
	csinc	w12, wzr, w12, ne
	lsl	w8, w8, #3
	smull	x8, w8, w13
	lsr	x13, x8, #63
	lsr	x8, x8, #37
	add	w8, w8, w13
	add	w8, w8, #4
	sturb	w8, [x29, #-21]
	sturb	w9, [x29, #-20]
	sturb	w11, [x29, #-19]
	sturb	w10, [x29, #-18]
	sturb	w12, [x29, #-17]
Lloh13:
	adrp	x8, _USBVISION_PCM_THR1@GOTPAGE
Lloh14:
	ldr	x8, [x8, _USBVISION_PCM_THR1@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	sub	x2, x29, #22
	mov	x0, x19
	mov	w3, #6
	bl	_usbvision_write_reg_irq
	cbnz	w0, LBB0_6
; %bb.4:
	ldr	w0, [x20]
	ldurb	w8, [x29, #-22]
	ldurb	w9, [x29, #-21]
	ldurb	w10, [x29, #-20]
	ldurb	w11, [x29, #-19]
	ldurb	w12, [x29, #-18]
	ldurb	w13, [x29, #-17]
	stp	x12, x13, [sp, #32]
	stp	x10, x11, [sp, #16]
	stp	x8, x9, [sp]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_PDEBUG
	mov	w0, #0
	ldr	w8, [x19, #4]
	str	w8, [x19, #8]
	b	LBB0_6
LBB0_5:
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_DBG_IRQ,4,2                    ; @DBG_IRQ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

	.comm	_adjust_compression,8,3         ; @adjust_compression
	.comm	_BRIDGE_NT1004,8,3              ; @BRIDGE_NT1004
	.comm	_BRIDGE_NT1005,8,3              ; @BRIDGE_NT1005
	.comm	_USBVISION_PCM_THR1,4,2         ; @USBVISION_PCM_THR1
l_.str.1:                               ; @.str.1
	.asciz	"new compr params %#02x %#02x %#02x %#02x %#02x %#02x"

	.no_dead_strip	_usbvision_adjust_compression
.subsections_via_symbols
