	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bmc150_magn_set_max_odr
_bmc150_magn_set_max_odr:               ## @bmc150_magn_set_max_odr
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movl	%edx, %r15d
	movl	%esi, %ebx
	movq	%rdi, %r14
	movl	%ecx, -40(%rbp)
	testl	%esi, %esi
	jle	LBB0_5
## %bb.1:
	testl	%r15d, %r15d
	jle	LBB0_7
LBB0_2:
	testl	%r12d, %r12d
	jg	LBB0_9
LBB0_3:
	leaq	-40(%rbp), %rsi
	movq	%r14, %rdi
	callq	_bmc150_magn_get_odr
	testl	%eax, %eax
	js	LBB0_14
## %bb.4:
	movl	-40(%rbp), %r12d
	jmp	LBB0_9
LBB0_5:
	movl	8(%r14), %edi
	movq	_BMC150_MAGN_REG_REP_XY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_14
## %bb.6:
	movl	-36(%rbp), %edi
	callq	_BMC150_MAGN_REGVAL_TO_REPXY
	movl	%eax, %ebx
	testl	%r15d, %r15d
	jg	LBB0_2
LBB0_7:
	movl	8(%r14), %edi
	movq	_BMC150_MAGN_REG_REP_Z@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_14
## %bb.8:
	movl	-36(%rbp), %edi
	callq	_BMC150_MAGN_REGVAL_TO_REPZ
	movl	%eax, %r15d
	testl	%r12d, %r12d
	jle	LBB0_3
LBB0_9:
	imull	$145, %ebx, %eax
	imull	$500, %r15d, %ecx               ## imm = 0x1F4
	leal	(%rax,%rcx), %esi
	addl	$980, %esi                      ## imm = 0x3D4
	xorl	%ecx, %ecx
	movl	$1000000, %eax                  ## imm = 0xF4240
	xorl	%edx, %edx
	idivl	%esi
	cmpl	%eax, %r12d
	jle	LBB0_11
## %bb.10:
	movl	4(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	jmp	LBB0_15
LBB0_14:
	movl	%eax, %ecx
	jmp	LBB0_15
LBB0_11:
	movl	%eax, (%r14)
LBB0_15:
	movl	%ecx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BMC150_MAGN_REG_REP_XY,4,2     ## @BMC150_MAGN_REG_REP_XY
	.comm	_BMC150_MAGN_REG_REP_Z,4,2      ## @BMC150_MAGN_REG_REP_Z
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't set oversampling with sampling freq %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_bmc150_magn_set_max_odr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bmc150_magn_set_max_odr
_bmc150_magn_set_max_odr:               ; @bmc150_magn_set_max_odr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x3
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	str	w3, [sp, #12]
	cmp	w1, #0
	b.le	LBB0_3
; %bb.1:
	cmp	w22, #0
	b.le	LBB0_5
LBB0_2:
	cmp	w20, #0
	b.gt	LBB0_9
	b	LBB0_7
LBB0_3:
	ldr	w0, [x19, #8]
Lloh0:
	adrp	x8, _BMC150_MAGN_REG_REP_XY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BMC150_MAGN_REG_REP_XY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_regmap_read
	tbnz	w0, #31, LBB0_12
; %bb.4:
	ldr	w0, [sp, #8]
	bl	_BMC150_MAGN_REGVAL_TO_REPXY
	mov	x21, x0
	cmp	w22, #0
	b.gt	LBB0_2
LBB0_5:
	ldr	w0, [x19, #8]
Lloh3:
	adrp	x8, _BMC150_MAGN_REG_REP_Z@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BMC150_MAGN_REG_REP_Z@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_regmap_read
	tbnz	w0, #31, LBB0_12
; %bb.6:
	ldr	w0, [sp, #8]
	bl	_BMC150_MAGN_REGVAL_TO_REPZ
	mov	x22, x0
	cmp	w20, #0
	b.gt	LBB0_9
LBB0_7:
	add	x1, sp, #12
	mov	x0, x19
	bl	_bmc150_magn_get_odr
	tbnz	w0, #31, LBB0_12
; %bb.8:
	ldr	w20, [sp, #12]
LBB0_9:
	mov	w8, #145
	mov	w9, #500
	mul	w9, w22, w9
	madd	w8, w21, w8, w9
	add	w8, w8, #980
	mov	w9, #16960
	movk	w9, #15, lsl #16
	sdiv	w8, w9, w8
	cmp	w20, w8
	b.le	LBB0_11
; %bb.10:
	ldr	w0, [x19, #4]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_11:
	mov	w0, #0
	str	w8, [x19]
LBB0_12:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_BMC150_MAGN_REG_REP_XY,4,2     ; @BMC150_MAGN_REG_REP_XY
	.comm	_BMC150_MAGN_REG_REP_Z,4,2      ; @BMC150_MAGN_REG_REP_Z
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't set oversampling with sampling freq %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_bmc150_magn_set_max_odr
.subsections_via_symbols
