	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tua6100_set_params
_tua6100_set_params:                    ## @tua6100_set_params
	.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
	subq	$128, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movq	8(%rdi), %rbx
	movq	$0, -72(%rbp)
	movaps	L___const.tua6100_set_params.reg1(%rip), %xmm0
	movaps	%xmm0, -48(%rbp)
	movl	l___const.tua6100_set_params.reg2+8(%rip), %eax
	movl	%eax, -56(%rbp)
	movq	l___const.tua6100_set_params.reg2(%rip), %rax
	movq	%rax, -64(%rbp)
	leaq	-72(%rbp), %rax
	movq	%rax, -144(%rbp)
	movq	$2, -136(%rbp)
	movl	8(%rbx), %eax
	movl	%eax, -128(%rbp)
	leaq	-48(%rbp), %rcx
	movq	%rcx, -120(%rbp)
	movq	$4, -112(%rbp)
	movl	%eax, -104(%rbp)
	leaq	-64(%rbp), %rcx
	movq	%rcx, -96(%rbp)
	movq	$3, -88(%rbp)
	movl	%eax, -80(%rbp)
	movl	16(%rdi), %eax
	cmpl	$1999999, %eax                  ## imm = 0x1E847F
	jg	LBB0_6
## %bb.1:
	movl	$3, -68(%rbp)
	cmpl	$1629999, %eax                  ## imm = 0x18DF2F
	jg	LBB0_7
## %bb.2:
	movl	$4, -56(%rbp)
	movl	$172, %ecx
	cmpl	$1524999, %eax                  ## imm = 0x174507
	jg	LBB0_5
## %bb.3:
	movl	$44, %ecx
	cmpl	$1454999, %eax                  ## imm = 0x163397
	jg	LBB0_5
## %bb.4:
	movl	$28, -60(%rbp)
	movl	$44, %ecx
	jmp	LBB0_8
LBB0_6:
	movl	$7, -68(%rbp)
LBB0_7:
	movl	$140, -44(%rbp)
	movabsq	$17179869212, %rcx              ## imm = 0x40000001C
	movq	%rcx, -60(%rbp)
	movl	$140, %ecx
	jmp	LBB0_8
LBB0_5:
	movl	$12, -60(%rbp)
LBB0_8:
	cltq
	imulq	$274877907, %rax, %rdx          ## imm = 0x10624DD3
	movq	%rdx, %rax
	shrq	$38, %rax
	movq	%rdx, %rsi
	shrq	$63, %rsi
	addl	%esi, %eax
	sarq	$43, %rdx
	addl	%esi, %edx
	movl	%edx, %esi
	shrl	$9, %esi
	andl	$3, %esi
	orl	%ecx, %esi
	movl	%esi, -44(%rbp)
	movl	%edx, %ecx
	sarl	%ecx
	movl	%ecx, -40(%rbp)
	movl	%edx, %ecx
	shll	$7, %ecx
	movl	%ecx, -36(%rbp)
	imull	$32000, %edx, %ecx              ## imm = 0x7D00
	movl	%ecx, (%rbx)
	shll	$5, %edx
	subl	%edx, %eax
	andl	$127, %eax
	orl	%eax, -36(%rbp)
	movq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	*%rax
LBB0_10:
	movl	4(%rbx), %edi
	leaq	-144(%rbp), %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	cmpl	$1, %eax
	jne	LBB0_11
## %bb.12:
	movq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	*%rax
LBB0_14:
	movl	4(%rbx), %edi
	leaq	-96(%rbp), %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	cmpl	$1, %eax
	jne	LBB0_11
## %bb.15:
	movq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	*%rax
LBB0_17:
	movl	4(%rbx), %edi
	leaq	-120(%rbp), %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	cmpl	$1, %eax
	jne	LBB0_11
## %bb.18:
	movq	(%r14), %rcx
	xorl	%ebx, %ebx
	testq	%rcx, %rcx
	je	LBB0_20
## %bb.19:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	*%rcx
	jmp	LBB0_20
LBB0_11:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_20:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_22
## %bb.21:
	movl	%ebx, %eax
	addq	$128, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_22:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## @__const.tua6100_set_params.reg1
L___const.tua6100_set_params.reg1:
	.long	1                               ## 0x1
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0

	.section	__TEXT,__const
	.p2align	2                               ## @__const.tua6100_set_params.reg2
l___const.tua6100_set_params.reg2:
	.long	2                               ## 0x2
	.long	0                               ## 0x0
	.long	0                               ## 0x0

	.comm	_EIO,4,2                        ## @EIO
	.comm	__P_VAL,4,2                     ## @_P_VAL
	.comm	__R_VAL,4,2                     ## @_R_VAL
	.comm	__ri,4,2                        ## @_ri
	.no_dead_strip	_tua6100_set_params
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function tua6100_set_params
lCPI0_0:
	.long	2                               ; 0x2
	.long	0                               ; 0x0
lCPI0_1:
	.long	4                               ; 0x4
	.long	0                               ; 0x0
lCPI0_2:
	.long	3                               ; 0x3
	.long	0                               ; 0x0
lCPI0_3:
	.long	28                              ; 0x1c
	.long	4                               ; 0x4
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_tua6100_set_params:                    ; @tua6100_set_params
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	ldr	x20, [x0, #8]
	str	xzr, [sp, #72]
Lloh3:
	adrp	x8, l___const.tua6100_set_params.reg1@PAGE
Lloh4:
	add	x8, x8, l___const.tua6100_set_params.reg1@PAGEOFF
Lloh5:
	ldr	q0, [x8]
	stur	q0, [x29, #-48]
Lloh6:
	adrp	x8, l___const.tua6100_set_params.reg2@PAGE
Lloh7:
	add	x8, x8, l___const.tua6100_set_params.reg2@PAGEOFF
	ldr	x9, [x8]
	stur	x9, [x29, #-64]
	ldr	w8, [x8, #8]
	stur	w8, [x29, #-56]
	add	x8, sp, #72
	str	x8, [sp, #48]
Lloh8:
	adrp	x8, lCPI0_0@PAGE
Lloh9:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp, #56]
	ldr	w8, [x20, #8]
	str	w8, [sp, #64]
	sub	x9, x29, #48
	str	x9, [sp, #24]
Lloh10:
	adrp	x9, lCPI0_1@PAGE
Lloh11:
	ldr	d0, [x9, lCPI0_1@PAGEOFF]
	str	d0, [sp, #32]
	str	w8, [sp, #40]
	sub	x9, x29, #64
	str	x9, [sp]
Lloh12:
	adrp	x9, lCPI0_2@PAGE
Lloh13:
	ldr	d0, [x9, lCPI0_2@PAGEOFF]
	str	d0, [sp, #8]
	str	w8, [sp, #16]
	ldr	w8, [x0, #16]
	mov	w9, #33919
	movk	w9, #30, lsl #16
	cmp	w8, w9
	b.gt	LBB0_4
; %bb.1:
	mov	w9, #3
	str	w9, [sp, #76]
	mov	w9, #57135
	movk	w9, #24, lsl #16
	cmp	w8, w9
	b.gt	LBB0_5
; %bb.2:
	mov	w9, #4
	stur	w9, [x29, #-56]
	mov	w9, #17671
	movk	w9, #23, lsl #16
	cmp	w8, w9
	b.le	LBB0_6
; %bb.3:
	mov	w9, #172
	b	LBB0_9
LBB0_4:
	mov	w9, #7
	str	w9, [sp, #76]
LBB0_5:
	mov	w9, #140
	stur	w9, [x29, #-44]
Lloh14:
	adrp	x10, lCPI0_3@PAGE
Lloh15:
	ldr	d0, [x10, lCPI0_3@PAGEOFF]
	stur	d0, [x29, #-60]
	b	LBB0_10
LBB0_6:
	mov	w9, #13207
	movk	w9, #22, lsl #16
	cmp	w8, w9
	b.gt	LBB0_8
; %bb.7:
	mov	w9, #28
	stur	w9, [x29, #-60]
	mov	w9, #44
	b	LBB0_10
LBB0_8:
	mov	w9, #44
LBB0_9:
	mov	w10, #12
	stur	w10, [x29, #-60]
LBB0_10:
	mov	w10, #19923
	movk	w10, #4194, lsl #16
	smull	x8, w8, w10
	lsr	x10, x8, #38
	lsr	x11, x8, #63
	add	w10, w10, w11
	asr	x8, x8, #43
	add	w8, w8, w11
	ubfx	w11, w8, #9, #2
	orr	w9, w9, w11
	asr	w11, w8, #1
	stp	w9, w11, [x29, #-44]
	lsl	w9, w8, #7
	stur	w9, [x29, #-36]
	mov	w9, #32000
	mul	w9, w8, w9
	str	w9, [x20]
	sub	w8, w10, w8, lsl #5
	and	w8, w8, #0x7f
	ldur	w9, [x29, #-36]
	orr	w8, w9, w8
	stur	w8, [x29, #-36]
	ldr	x8, [x19]
	cbz	x8, LBB0_12
; %bb.11:
	mov	x0, x19
	mov	w1, #1
	blr	x8
LBB0_12:
	ldr	w0, [x20, #4]
	add	x1, sp, #48
	mov	w2, #1
	bl	_i2c_transfer
	cmp	w0, #1
	b.ne	LBB0_22
; %bb.13:
	ldr	x8, [x19]
	cbz	x8, LBB0_15
; %bb.14:
	mov	x0, x19
	mov	w1, #1
	blr	x8
LBB0_15:
	ldr	w0, [x20, #4]
	mov	x1, sp
	mov	w2, #1
	bl	_i2c_transfer
	cmp	w0, #1
	b.ne	LBB0_22
; %bb.16:
	ldr	x8, [x19]
	cbz	x8, LBB0_18
; %bb.17:
	mov	x0, x19
	mov	w1, #1
	blr	x8
LBB0_18:
	ldr	w0, [x20, #4]
	add	x1, sp, #24
	mov	w2, #1
	bl	_i2c_transfer
	cmp	w0, #1
	b.ne	LBB0_22
; %bb.19:
	ldr	x8, [x19]
	cbz	x8, LBB0_21
; %bb.20:
	mov	x0, x19
	mov	w1, #0
	blr	x8
LBB0_21:
	mov	w0, #0
	b	LBB0_23
LBB0_22:
Lloh16:
	adrp	x8, _EIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_23:
	ldur	x8, [x29, #-24]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_25
; %bb.24:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_25:
	bl	___stack_chk_fail
	.loh AdrpLdr	Lloh12, Lloh13
	.loh AdrpLdr	Lloh10, Lloh11
	.loh AdrpLdr	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAddLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdr	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__literal16,16byte_literals
	.p2align	2                               ; @__const.tua6100_set_params.reg1
l___const.tua6100_set_params.reg1:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0

	.section	__TEXT,__const
	.p2align	2                               ; @__const.tua6100_set_params.reg2
l___const.tua6100_set_params.reg2:
	.long	2                               ; 0x2
	.long	0                               ; 0x0
	.long	0                               ; 0x0

	.comm	_EIO,4,2                        ; @EIO
	.comm	__P_VAL,4,2                     ; @_P_VAL
	.comm	__R_VAL,4,2                     ; @_R_VAL
	.comm	__ri,4,2                        ; @_ri
	.no_dead_strip	_tua6100_set_params
.subsections_via_symbols
