	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bme680_set_mode
_bme680_set_mode:                       ## @bme680_set_mode
	.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	%esi, %r15d
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	callq	_regmap_get_device
	movq	%rax, %r14
	movl	(%rbx), %edi
	movq	_BME680_REG_CTRL_MEAS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BME680_MODE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%r15d, %r15d
	je	LBB0_3
## %bb.1:
	movq	_BME680_MODE_FORCED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_regmap_write_bits
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_6
## %bb.2:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_5
LBB0_3:
	movq	_BME680_MODE_SLEEP@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_regmap_write_bits
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_6
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
LBB0_5:
	movq	%r14, %rdi
	callq	_dev_err
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BME680_REG_CTRL_MEAS,4,2       ## @BME680_REG_CTRL_MEAS
	.comm	_BME680_MODE_MASK,4,2           ## @BME680_MODE_MASK
	.comm	_BME680_MODE_FORCED,4,2         ## @BME680_MODE_FORCED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to set forced mode\n"

	.comm	_BME680_MODE_SLEEP,4,2          ## @BME680_MODE_SLEEP
L_.str.1:                               ## @.str.1
	.asciz	"failed to set sleep mode\n"

	.no_dead_strip	_bme680_set_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bme680_set_mode
_bme680_set_mode:                       ; @bme680_set_mode
	.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	x20, x1
	mov	x21, x0
	ldr	w0, [x0]
	bl	_regmap_get_device
	mov	x19, x0
	ldr	w0, [x21]
Lloh0:
	adrp	x8, _BME680_REG_CTRL_MEAS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BME680_REG_CTRL_MEAS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _BME680_MODE_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BME680_MODE_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	cbz	w20, LBB0_3
; %bb.1:
Lloh6:
	adrp	x8, _BME680_MODE_FORCED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BME680_MODE_FORCED@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	bl	_regmap_write_bits
	mov	x20, x0
	tbz	w0, #31, LBB0_6
; %bb.2:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_5
LBB0_3:
Lloh11:
	adrp	x8, _BME680_MODE_SLEEP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BME680_MODE_SLEEP@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	bl	_regmap_write_bits
	mov	x20, x0
	tbz	w0, #31, LBB0_6
; %bb.4:
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_5:
	mov	x0, x19
	bl	_dev_err
LBB0_6:
	mov	x0, x20
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_BME680_REG_CTRL_MEAS,4,2       ; @BME680_REG_CTRL_MEAS
	.comm	_BME680_MODE_MASK,4,2           ; @BME680_MODE_MASK
	.comm	_BME680_MODE_FORCED,4,2         ; @BME680_MODE_FORCED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to set forced mode\n"

	.comm	_BME680_MODE_SLEEP,4,2          ; @BME680_MODE_SLEEP
l_.str.1:                               ; @.str.1
	.asciz	"failed to set sleep mode\n"

	.no_dead_strip	_bme680_set_mode
.subsections_via_symbols
