	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad7791_setup
_ad7791_setup:                          ## @ad7791_setup
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_AD7791_MODE_BUFFER@GOTPCREL(%rip), %r8
	movl	(%r8), %ecx
	movl	%ecx, (%rdi)
	movq	_AD7791_FILTER_RATE_16_6@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rdi)
	testq	%rsi, %rsi
	je	LBB0_11
## %bb.1:
	movq	8(%rdi), %rax
	movl	(%rax), %eax
	movq	_AD7791_FLAG_HAS_BUFFER@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_4
## %bb.2:
	cmpl	$0, 16(%rsi)
	jne	LBB0_4
## %bb.3:
	movl	(%r8), %edx
	notl	%edx
	andl	%edx, %ecx
	movl	%ecx, (%rdi)
LBB0_4:
	movq	_AD7791_FLAG_HAS_BURNOUT@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_7
## %bb.5:
	cmpq	$0, 8(%rsi)
	je	LBB0_7
## %bb.6:
	movq	_AD7791_MODE_BURNOUT@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movl	%ecx, (%rdi)
LBB0_7:
	movq	_AD7791_FLAG_HAS_UNIPOLAR@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_10
## %bb.8:
	cmpq	$0, (%rsi)
	je	LBB0_10
## %bb.9:
	movq	_AD7791_MODE_UNIPOLAR@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, (%rdi)
LBB0_10:
	addq	$4, %rdi
	movq	_AD7791_REG_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edx
	popq	%rbp
	jmp	_ad_sd_write_reg                ## TAILCALL
LBB0_11:
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AD7791_MODE_BUFFER,4,2         ## @AD7791_MODE_BUFFER
	.comm	_AD7791_FILTER_RATE_16_6,4,2    ## @AD7791_FILTER_RATE_16_6
	.comm	_AD7791_FLAG_HAS_BUFFER,4,2     ## @AD7791_FLAG_HAS_BUFFER
	.comm	_AD7791_FLAG_HAS_BURNOUT,4,2    ## @AD7791_FLAG_HAS_BURNOUT
	.comm	_AD7791_MODE_BURNOUT,4,2        ## @AD7791_MODE_BURNOUT
	.comm	_AD7791_FLAG_HAS_UNIPOLAR,4,2   ## @AD7791_FLAG_HAS_UNIPOLAR
	.comm	_AD7791_MODE_UNIPOLAR,4,2       ## @AD7791_MODE_UNIPOLAR
	.comm	_AD7791_REG_MODE,4,2            ## @AD7791_REG_MODE
	.no_dead_strip	_ad7791_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad7791_setup
_ad7791_setup:                          ; @ad7791_setup
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x9, _AD7791_MODE_BUFFER@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AD7791_MODE_BUFFER@GOTPAGEOFF]
	ldr	w3, [x9]
	str	w3, [x0]
Lloh2:
	adrp	x8, _AD7791_FILTER_RATE_16_6@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AD7791_FILTER_RATE_16_6@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x0, #16]
	cbz	x1, LBB0_11
; %bb.1:
	ldr	x8, [x0, #8]
	ldr	w8, [x8]
Lloh5:
	adrp	x10, _AD7791_FLAG_HAS_BUFFER@GOTPAGE
Lloh6:
	ldr	x10, [x10, _AD7791_FLAG_HAS_BUFFER@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	tst	w10, w8
	b.eq	LBB0_4
; %bb.2:
	ldr	w10, [x1, #16]
	cbnz	w10, LBB0_4
; %bb.3:
	ldr	w9, [x9]
	bic	w3, w3, w9
	str	w3, [x0]
LBB0_4:
Lloh8:
	adrp	x9, _AD7791_FLAG_HAS_BURNOUT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AD7791_FLAG_HAS_BURNOUT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.5:
	ldr	x9, [x1, #8]
	cbz	x9, LBB0_7
; %bb.6:
Lloh11:
	adrp	x9, _AD7791_MODE_BURNOUT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _AD7791_MODE_BURNOUT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w3, w3, w9
	str	w3, [x0]
LBB0_7:
Lloh14:
	adrp	x9, _AD7791_FLAG_HAS_UNIPOLAR@GOTPAGE
Lloh15:
	ldr	x9, [x9, _AD7791_FLAG_HAS_UNIPOLAR@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.8:
	ldr	x8, [x1]
	cbz	x8, LBB0_10
; %bb.9:
Lloh17:
	adrp	x8, _AD7791_MODE_UNIPOLAR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AD7791_MODE_UNIPOLAR@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	orr	w3, w3, w8
	str	w3, [x0]
LBB0_10:
Lloh20:
	adrp	x8, _AD7791_REG_MODE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _AD7791_REG_MODE@GOTPAGEOFF]
	add	x0, x0, #4
Lloh22:
	ldr	w1, [x8]
	mov	w2, #4
	b	_ad_sd_write_reg
LBB0_11:
	mov	w0, #0
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_AD7791_MODE_BUFFER,4,2         ; @AD7791_MODE_BUFFER
	.comm	_AD7791_FILTER_RATE_16_6,4,2    ; @AD7791_FILTER_RATE_16_6
	.comm	_AD7791_FLAG_HAS_BUFFER,4,2     ; @AD7791_FLAG_HAS_BUFFER
	.comm	_AD7791_FLAG_HAS_BURNOUT,4,2    ; @AD7791_FLAG_HAS_BURNOUT
	.comm	_AD7791_MODE_BURNOUT,4,2        ; @AD7791_MODE_BURNOUT
	.comm	_AD7791_FLAG_HAS_UNIPOLAR,4,2   ; @AD7791_FLAG_HAS_UNIPOLAR
	.comm	_AD7791_MODE_UNIPOLAR,4,2       ; @AD7791_MODE_UNIPOLAR
	.comm	_AD7791_REG_MODE,4,2            ; @AD7791_REG_MODE
	.no_dead_strip	_ad7791_setup
.subsections_via_symbols
