	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bme680_regmap_spi_select_page
_bme680_regmap_spi_select_page:         ## @bme680_regmap_spi_select_page
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorl	%ebx, %ebx
	testb	$-128, %sil
	sete	%bl
	xorl	%r14d, %r14d
	cmpl	(%rdi), %ebx
	je	LBB0_8
## %bb.1:
	movq	%rdi, %r15
	movq	8(%rdi), %r12
	movq	_BME680_REG_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	leaq	-52(%rbp), %rcx
	leaq	-56(%rbp), %rsi
	movq	%r12, %rdi
	movl	$1, %edx
	movl	$1, %r8d
	callq	_spi_write_then_read
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movq	_BME680_REG_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	_BME680_SPI_MEM_PAGE_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.4:
	orl	-52(%rbp), %eax
	jmp	LBB0_6
LBB0_5:
	notl	%eax
	andl	-52(%rbp), %eax
LBB0_6:
	movl	%eax, -52(%rbp)
	leaq	-56(%rbp), %rsi
	movq	%r12, %rdi
	movl	$2, %edx
	callq	_spi_write
	testl	%eax, %eax
	js	LBB0_2
## %bb.7:
	movl	%ebx, (%r15)
	jmp	LBB0_8
LBB0_2:
	movl	%eax, %r13d
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_dev_err
	movl	%r13d, %r14d
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_10
## %bb.9:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_BME680_REG_STATUS,4,2          ## @BME680_REG_STATUS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to set page %u\n"

	.comm	_BME680_SPI_MEM_PAGE_BIT,4,2    ## @BME680_SPI_MEM_PAGE_BIT
	.no_dead_strip	_bme680_regmap_spi_select_page
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bme680_regmap_spi_select_page
_bme680_regmap_spi_select_page:         ; @bme680_regmap_spi_select_page
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	mov	w8, #1
	bic	w19, w8, w1, lsr #7
	ldr	w8, [x0]
	cmp	w19, w8
	b.ne	LBB0_2
; %bb.1:
	mov	w22, #0
	b	LBB0_9
LBB0_2:
	mov	x20, x0
	ldr	x21, [x0, #8]
Lloh3:
	adrp	x23, _BME680_REG_STATUS@GOTPAGE
Lloh4:
	ldr	x23, [x23, _BME680_REG_STATUS@GOTPAGEOFF]
	ldr	w8, [x23]
	str	w8, [sp]
	mov	x8, sp
	add	x3, x8, #4
	mov	x1, sp
	mov	x0, x21
	mov	w2, #1
	mov	w4, #1
	bl	_spi_write_then_read
	tbnz	w0, #31, LBB0_8
; %bb.3:
	ldr	w8, [x23]
	str	w8, [sp]
Lloh5:
	adrp	x8, _BME680_SPI_MEM_PAGE_BIT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BME680_SPI_MEM_PAGE_BIT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cbz	w19, LBB0_5
; %bb.4:
	ldr	w9, [sp, #4]
	orr	w8, w9, w8
	b	LBB0_6
LBB0_5:
	ldr	w9, [sp, #4]
	bic	w8, w9, w8
LBB0_6:
	str	w8, [sp, #4]
	mov	x1, sp
	mov	x0, x21
	mov	w2, #2
	bl	_spi_write
	tbnz	w0, #31, LBB0_8
; %bb.7:
	mov	w22, #0
	str	w19, [x20]
	b	LBB0_9
LBB0_8:
	mov	x22, x0
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x19
	bl	_dev_err
LBB0_9:
	ldr	x8, [sp, #8]
Lloh10:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_BME680_REG_STATUS,4,2          ; @BME680_REG_STATUS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to set page %u\n"

	.comm	_BME680_SPI_MEM_PAGE_BIT,4,2    ; @BME680_SPI_MEM_PAGE_BIT
	.no_dead_strip	_bme680_regmap_spi_select_page
.subsections_via_symbols
