	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tsc2007_calculate_resistance   ## -- Begin function tsc2007_calculate_resistance
	.p2align	4, 0x90
_tsc2007_calculate_resistance:          ## @tsc2007_calculate_resistance
	.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	%rsi, %rbx
	movq	%rdi, %r14
	movl	(%rsi), %eax
	movq	_MAX_12BIT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_2
## %bb.1:
	movl	$0, (%rbx)
	xorl	%edi, %edi
	jmp	LBB0_4
LBB0_2:
	xorl	%edi, %edi
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	cmpl	$0, 4(%rbx)
	setne	%dil
LBB0_4:
	callq	_likely
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movl	4(%rbx), %ecx
	movl	8(%rbx), %eax
	subl	%ecx, %eax
	imull	(%rbx), %eax
	imull	(%r14), %eax
	cltd
	idivl	%ecx
	addl	$2047, %eax                     ## imm = 0x7FF
	sarl	$12, %eax
	jmp	LBB0_7
LBB0_5:
	xorl	%eax, %eax
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_12BIT,4,2                  ## @MAX_12BIT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tsc2007_calculate_resistance   ; -- Begin function tsc2007_calculate_resistance
	.p2align	2
_tsc2007_calculate_resistance:          ; @tsc2007_calculate_resistance
	.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	x20, x1
	mov	x19, x0
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _MAX_12BIT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MAX_12BIT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	str	wzr, [x20]
	bl	_likely
	cbnz	x0, LBB0_4
	b	LBB0_5
LBB0_2:
	cbz	w8, LBB0_6
; %bb.3:
	ldr	w8, [x20, #4]
	cmp	w8, #0
	cset	w0, ne
	bl	_likely
	cbz	x0, LBB0_5
LBB0_4:
	ldp	w9, w8, [x20, #4]
	ldr	w10, [x20]
	sub	w8, w8, w9
	mul	w8, w8, w10
	ldr	w10, [x19]
	mul	w8, w8, w10
	sdiv	w8, w8, w9
	add	w8, w8, #2047
	asr	w0, w8, #12
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	w0, #0
	bl	_likely
	cbnz	x0, LBB0_4
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_12BIT,4,2                  ; @MAX_12BIT
.subsections_via_symbols
