	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bmc150_magn_set_power_mode
_bmc150_magn_set_power_mode:            ## @bmc150_magn_set_power_mode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	cmpl	$130, %esi
	je	LBB0_7
## %bb.1:
	cmpl	$129, %esi
	je	LBB0_5
## %bb.2:
	cmpl	$128, %esi
	jne	LBB0_8
## %bb.3:
	movl	(%rdi), %edi
	movq	_BMC150_MAGN_REG_POWER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BMC150_MAGN_MASK_POWER_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ecx, %ecx
	testl	%edx, %edx
	sete	%cl
	movl	%eax, %edx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_9
## %bb.4:
	movq	_BMC150_MAGN_START_UP_TIME_MS@GOTPCREL(%rip), %rax
	imull	$1000, (%rax), %edi             ## imm = 0x3E8
	movl	$20000, %esi                    ## imm = 0x4E20
	callq	_usleep_range
	xorl	%eax, %eax
	popq	%rbp
	retq
LBB0_7:
	movl	(%rdi), %edi
	movq	_BMC150_MAGN_REG_OPMODE_ODR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BMC150_MAGN_MASK_OPMODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_BMC150_MAGN_MODE_NORMAL@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movl	(%rdi), %edi
	movq	_BMC150_MAGN_REG_OPMODE_ODR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BMC150_MAGN_MASK_OPMODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_BMC150_MAGN_MODE_SLEEP@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
	movq	_BMC150_MAGN_SHIFT_OPMODE@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movl	%eax, %ecx
	popq	%rbp
	jmp	_regmap_update_bits             ## TAILCALL
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BMC150_MAGN_REG_POWER,4,2      ## @BMC150_MAGN_REG_POWER
	.comm	_BMC150_MAGN_MASK_POWER_CTL,4,2 ## @BMC150_MAGN_MASK_POWER_CTL
	.comm	_BMC150_MAGN_START_UP_TIME_MS,4,2 ## @BMC150_MAGN_START_UP_TIME_MS
	.comm	_BMC150_MAGN_REG_OPMODE_ODR,4,2 ## @BMC150_MAGN_REG_OPMODE_ODR
	.comm	_BMC150_MAGN_MASK_OPMODE,4,2    ## @BMC150_MAGN_MASK_OPMODE
	.comm	_BMC150_MAGN_MODE_SLEEP,4,2     ## @BMC150_MAGN_MODE_SLEEP
	.comm	_BMC150_MAGN_SHIFT_OPMODE,4,2   ## @BMC150_MAGN_SHIFT_OPMODE
	.comm	_BMC150_MAGN_MODE_NORMAL,4,2    ## @BMC150_MAGN_MODE_NORMAL
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_bmc150_magn_set_power_mode
.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_power_mode
_bmc150_magn_set_power_mode:            ; @bmc150_magn_set_power_mode
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	cmp	w1, #130
	b.eq	LBB0_5
; %bb.1:
	cmp	w1, #129
	b.eq	LBB0_6
; %bb.2:
	cmp	w1, #128
	b.ne	LBB0_8
; %bb.3:
	ldr	w0, [x0]
Lloh0:
	adrp	x8, _BMC150_MAGN_REG_POWER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BMC150_MAGN_REG_POWER@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _BMC150_MAGN_MASK_POWER_CTL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BMC150_MAGN_MASK_POWER_CTL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w2, #0
	cset	w3, eq
	mov	x2, x8
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_9
; %bb.4:
Lloh6:
	adrp	x8, _BMC150_MAGN_START_UP_TIME_MS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BMC150_MAGN_START_UP_TIME_MS@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	mov	w9, #1000
	mul	w0, w8, w9
	mov	w1, #20000
	bl	_usleep_range
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldr	w0, [x0]
Lloh9:
	adrp	x8, _BMC150_MAGN_REG_OPMODE_ODR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BMC150_MAGN_REG_OPMODE_ODR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _BMC150_MAGN_MASK_OPMODE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BMC150_MAGN_MASK_OPMODE@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
Lloh15:
	adrp	x8, _BMC150_MAGN_MODE_NORMAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BMC150_MAGN_MODE_NORMAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
	ldr	w0, [x0]
Lloh17:
	adrp	x8, _BMC150_MAGN_REG_OPMODE_ODR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _BMC150_MAGN_REG_OPMODE_ODR@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x8, _BMC150_MAGN_MASK_OPMODE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _BMC150_MAGN_MASK_OPMODE@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
Lloh23:
	adrp	x8, _BMC150_MAGN_MODE_SLEEP@GOTPAGE
Lloh24:
	ldr	x8, [x8, _BMC150_MAGN_MODE_SLEEP@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
Lloh25:
	adrp	x9, _BMC150_MAGN_SHIFT_OPMODE@GOTPAGE
Lloh26:
	ldr	x9, [x9, _BMC150_MAGN_SHIFT_OPMODE@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	lsl	w3, w8, w9
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_regmap_update_bits
LBB0_8:
Lloh28:
	adrp	x8, _EINVAL@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_BMC150_MAGN_REG_POWER,4,2      ; @BMC150_MAGN_REG_POWER
	.comm	_BMC150_MAGN_MASK_POWER_CTL,4,2 ; @BMC150_MAGN_MASK_POWER_CTL
	.comm	_BMC150_MAGN_START_UP_TIME_MS,4,2 ; @BMC150_MAGN_START_UP_TIME_MS
	.comm	_BMC150_MAGN_REG_OPMODE_ODR,4,2 ; @BMC150_MAGN_REG_OPMODE_ODR
	.comm	_BMC150_MAGN_MASK_OPMODE,4,2    ; @BMC150_MAGN_MASK_OPMODE
	.comm	_BMC150_MAGN_MODE_SLEEP,4,2     ; @BMC150_MAGN_MODE_SLEEP
	.comm	_BMC150_MAGN_SHIFT_OPMODE,4,2   ; @BMC150_MAGN_SHIFT_OPMODE
	.comm	_BMC150_MAGN_MODE_NORMAL,4,2    ; @BMC150_MAGN_MODE_NORMAL
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_bmc150_magn_set_power_mode
.subsections_via_symbols
