	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max31722_set_mode
_max31722_set_mode:                     ## @max31722_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	_MAX31722_REG_CFG@GOTPCREL(%rip), %rax
	movq	_MAX31722_WRITE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	8(%rdi), %r15
	movl	%ecx, -48(%rbp)
	movq	_MAX31722_MODE_MASK@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	andl	(%rdi), %eax
	orl	%esi, %eax
	movl	%eax, -44(%rbp)
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	movl	$8, %edx
	callq	_spi_write
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	(%r13), %eax
	andl	(%r12), %eax
	orl	%r14d, %eax
	movl	%eax, (%r12)
	xorl	%ebx, %ebx
	jmp	LBB0_3
LBB0_1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
LBB0_3:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX31722_REG_CFG,4,2           ## @MAX31722_REG_CFG
	.comm	_MAX31722_WRITE_MASK,4,2        ## @MAX31722_WRITE_MASK
	.comm	_MAX31722_MODE_MASK,4,2         ## @MAX31722_MODE_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to set sensor mode.\n"

	.no_dead_strip	_max31722_set_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max31722_set_mode
_max31722_set_mode:                     ; @max31722_set_mode
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _MAX31722_REG_CFG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX31722_REG_CFG@GOTPAGEOFF]
Lloh2:
	adrp	x9, _MAX31722_WRITE_MASK@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MAX31722_WRITE_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x0]
Lloh6:
	adrp	x23, _MAX31722_MODE_MASK@GOTPAGE
Lloh7:
	ldr	x23, [x23, _MAX31722_MODE_MASK@GOTPAGEOFF]
	ldr	w10, [x23]
	and	w9, w10, w9
	ldr	x22, [x0, #8]
	orr	w9, w9, w1
	stp	w8, w9, [sp, #8]
	add	x1, sp, #8
	mov	x0, x22
	mov	w2, #8
	bl	_spi_write
	tbnz	w0, #31, LBB0_2
; %bb.1:
	mov	w21, #0
	ldr	w8, [x19]
	ldr	w9, [x23]
	and	w8, w9, w8
	orr	w8, w8, w20
	str	w8, [x19]
	b	LBB0_3
LBB0_2:
	mov	x21, x0
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_dev_err
LBB0_3:
	mov	x0, x21
	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
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX31722_REG_CFG,4,2           ; @MAX31722_REG_CFG
	.comm	_MAX31722_WRITE_MASK,4,2        ; @MAX31722_WRITE_MASK
	.comm	_MAX31722_MODE_MASK,4,2         ; @MAX31722_MODE_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to set sensor mode.\n"

	.no_dead_strip	_max31722_set_mode
.subsections_via_symbols
