	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad7791_set_mode
_ad7791_set_mode:                       ## @ad7791_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, %ebx
	movq	%rdi, %r14
	callq	_ad_sigma_delta_to_ad7791
	movq	%rax, %r15
	leal	-129(%rbx), %eax
	cmpl	$2, %eax
	jb	LBB0_5
## %bb.1:
	cmpl	$128, %ebx
	je	LBB0_4
## %bb.2:
	cmpl	$131, %ebx
	jne	LBB0_7
## %bb.3:
	movq	_AD7791_MODE_CONTINUOUS@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movq	_AD7791_MODE_POWERDOWN@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	movq	_AD7791_MODE_SINGLE@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %ebx
LBB0_7:
	movq	_AD7791_MODE_SEL_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, (%r15)
	movl	%ebx, %edi
	callq	_AD7791_MODE_SEL
	orl	(%r15), %eax
	movl	%eax, (%r15)
	movq	_AD7791_REG_MODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r14, %rdi
	movl	$4, %edx
	movl	%eax, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ad_sd_write_reg                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AD7791_MODE_CONTINUOUS,4,2     ## @AD7791_MODE_CONTINUOUS
	.comm	_AD7791_MODE_SINGLE,4,2         ## @AD7791_MODE_SINGLE
	.comm	_AD7791_MODE_POWERDOWN,4,2      ## @AD7791_MODE_POWERDOWN
	.comm	_AD7791_MODE_SEL_MASK,4,2       ## @AD7791_MODE_SEL_MASK
	.comm	_AD7791_REG_MODE,4,2            ## @AD7791_REG_MODE
	.no_dead_strip	_ad7791_set_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad7791_set_mode
_ad7791_set_mode:                       ; @ad7791_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	x21, x1
	mov	x19, x0
	bl	_ad_sigma_delta_to_ad7791
	mov	x20, x0
	sub	w8, w21, #129
	cmp	w8, #2
	b.lo	LBB0_4
; %bb.1:
	cmp	w21, #128
	b.eq	LBB0_5
; %bb.2:
	cmp	w21, #131
	b.ne	LBB0_7
; %bb.3:
Lloh0:
	adrp	x8, _AD7791_MODE_CONTINUOUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AD7791_MODE_CONTINUOUS@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
Lloh2:
	adrp	x8, _AD7791_MODE_POWERDOWN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AD7791_MODE_POWERDOWN@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh4:
	adrp	x8, _AD7791_MODE_SINGLE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AD7791_MODE_SINGLE@GOTPAGEOFF]
LBB0_6:
	ldr	w21, [x8]
LBB0_7:
Lloh6:
	adrp	x8, _AD7791_MODE_SEL_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AD7791_MODE_SEL_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [x20]
	bic	w8, w9, w8
	str	w8, [x20]
	mov	x0, x21
	bl	_AD7791_MODE_SEL
	ldr	w8, [x20]
	orr	w3, w8, w0
Lloh9:
	adrp	x8, _AD7791_REG_MODE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AD7791_REG_MODE@GOTPAGEOFF]
	str	w3, [x20]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #4
	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
	b	_ad_sd_write_reg
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_AD7791_MODE_CONTINUOUS,4,2     ; @AD7791_MODE_CONTINUOUS
	.comm	_AD7791_MODE_SINGLE,4,2         ; @AD7791_MODE_SINGLE
	.comm	_AD7791_MODE_POWERDOWN,4,2      ; @AD7791_MODE_POWERDOWN
	.comm	_AD7791_MODE_SEL_MASK,4,2       ; @AD7791_MODE_SEL_MASK
	.comm	_AD7791_REG_MODE,4,2            ; @AD7791_REG_MODE
	.no_dead_strip	_ad7791_set_mode
.subsections_via_symbols
