	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bmc150_magn_compensate_y
_bmc150_magn_compensate_y:              ## @bmc150_magn_compensate_y
	.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
	movl	%edx, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r15
	movl	32(%rdi), %edi
	callq	_le16_to_cpu
	movq	_BMC150_MAGN_XY_OVERFLOW_VAL@GOTPCREL(%rip), %rcx
	cmpq	%r14, (%rcx)
	jne	LBB0_2
## %bb.1:
	movq	_S32_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_3
LBB0_2:
	testl	%ebx, %ebx
	cmovel	%eax, %ebx
	shll	$14, %eax
	cltd
	idivl	%ebx
	addl	$-16384, %eax                   ## imm = 0xC000
	movl	%eax, %ecx
	imull	%eax, %ecx
	shrl	$7, %ecx
	imull	24(%r15), %ecx
	imull	16(%r15), %eax
	shll	$7, %eax
	addl	%ecx, %eax
	sarl	$9, %eax
	addl	$1048576, %eax                  ## imm = 0x100000
	movl	$160, %ecx
	addl	8(%r15), %ecx
	imull	%eax, %ecx
	sarl	$12, %ecx
	imull	%r14d, %ecx
	sarl	$13, %ecx
	movl	(%r15), %eax
	leal	(%rcx,%rax,8), %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BMC150_MAGN_XY_OVERFLOW_VAL,8,3 ## @BMC150_MAGN_XY_OVERFLOW_VAL
	.comm	_S32_MIN,4,2                    ## @S32_MIN
	.no_dead_strip	_bmc150_magn_compensate_y
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bmc150_magn_compensate_y
_bmc150_magn_compensate_y:              ; @bmc150_magn_compensate_y
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x0, #32]
	bl	_le16_to_cpu
Lloh0:
	adrp	x8, _BMC150_MAGN_XY_OVERFLOW_VAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BMC150_MAGN_XY_OVERFLOW_VAL@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x20
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _S32_MIN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _S32_MIN@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	b	LBB0_3
LBB0_2:
	cmp	w21, #0
	csel	w8, w0, w21, eq
	lsl	w9, w0, #14
	sdiv	w8, w9, w8
	sub	w8, w8, #4, lsl #12             ; =16384
	ldr	w9, [x19, #24]
	mul	w10, w8, w8
	lsr	w10, w10, #7
	mul	w9, w10, w9
	ldr	w10, [x19, #16]
	mul	w8, w8, w10
	add	w8, w9, w8, lsl #7
	asr	w8, w8, #9
	add	w8, w8, #256, lsl #12           ; =1048576
	ldr	w9, [x19, #8]
	add	w9, w9, #160
	mul	w8, w8, w9
	asr	w8, w8, #12
	mul	w8, w8, w20
	asr	w8, w8, #13
	ldr	w9, [x19]
	add	w0, w8, w9, lsl #3
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_BMC150_MAGN_XY_OVERFLOW_VAL,8,3 ; @BMC150_MAGN_XY_OVERFLOW_VAL
	.comm	_S32_MIN,4,2                    ; @S32_MIN
	.no_dead_strip	_bmc150_magn_compensate_y
.subsections_via_symbols
