	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lm63_set_convrate
_lm63_set_convrate:                     ## @lm63_set_convrate
	.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
	movq	%rdi, %r14
	movq	8(%rdi), %rdi
	movq	_LM63_MAX_CONVRATE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_1
## %bb.2:
	shll	$6, %esi
	movl	$64000, %eax                    ## imm = 0xFA00
	shll	%cl, %eax
	cltd
	idivl	(%r14)
                                        ## kill: def $eax killed $eax def $rax
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	leal	(%rax,%rax,2), %edx
	shrl	$2, %edx
	cmpl	%edx, %esi
	jae	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incl	%ebx
	shrl	%eax
	cmpl	%ebx, %ecx
	jne	LBB0_3
## %bb.5:
	movl	%ecx, %ebx
	jmp	LBB0_6
LBB0_1:
	xorl	%ebx, %ebx
LBB0_6:
	movq	_LM63_REG_CONVRATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edx
	callq	_i2c_smbus_write_byte_data
	movl	(%r14), %edi
	movl	%ebx, %esi
	callq	_UPDATE_INTERVAL
	movl	%eax, 4(%r14)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LM63_MAX_CONVRATE,4,2          ## @LM63_MAX_CONVRATE
	.comm	_LM63_REG_CONVRATE,4,2          ## @LM63_REG_CONVRATE
	.no_dead_strip	_lm63_set_convrate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lm63_set_convrate
_lm63_set_convrate:                     ; @lm63_set_convrate
	.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
	mov	x19, x0
	ldr	x0, [x0, #8]
Lloh0:
	adrp	x8, _LM63_MAX_CONVRATE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LM63_MAX_CONVRATE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	w20, #0
	lsl	w9, w1, #6
	mov	w10, #64000
	lsl	w10, w10, w8
	ldr	w11, [x19]
	sdiv	w10, w10, w11
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	w11, w10, w10, lsl #1
	cmp	w9, w11, lsr #2
	b.hs	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w20, w20, #1
	lsr	w10, w10, #1
	cmp	w8, w20
	b.ne	LBB0_2
; %bb.4:
	mov	x20, x8
	b	LBB0_6
LBB0_5:
	mov	w20, #0
LBB0_6:
Lloh3:
	adrp	x8, _LM63_REG_CONVRATE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LM63_REG_CONVRATE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_i2c_smbus_write_byte_data
	ldr	w0, [x19]
	mov	x1, x20
	bl	_UPDATE_INTERVAL
	str	w0, [x19, #4]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_LM63_MAX_CONVRATE,4,2          ; @LM63_MAX_CONVRATE
	.comm	_LM63_REG_CONVRATE,4,2          ; @LM63_REG_CONVRATE
	.no_dead_strip	_lm63_set_convrate
.subsections_via_symbols
