	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad5758_init
_ad5758_init:                           ## @ad5758_init
	.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
	movq	%rdi, %rbx
	movq	24(%rdi), %rdi
	movq	_GPIOD_OUT_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	callq	_devm_gpiod_get_optional
	movl	%eax, 20(%rbx)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.14:
	movl	20(%rbx), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	%rbx, %rdi
	callq	_ad5758_crc_disable
	testl	%eax, %eax
	js	LBB0_13
## %bb.2:
	movq	%rbx, %rdi
	callq	_ad5758_reset
	testl	%eax, %eax
	js	LBB0_13
## %bb.3:
	movq	%rbx, %rdi
	callq	_ad5758_crc_disable
	testl	%eax, %eax
	js	LBB0_13
## %bb.4:
	movq	%rbx, %rdi
	callq	_ad5758_calib_mem_refresh
	testl	%eax, %eax
	js	LBB0_13
## %bb.5:
	movq	_AD5758_DIGITAL_DIAG_RESULTS@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_ad5758_spi_reg_read
	testl	%eax, %eax
	js	LBB0_13
## %bb.6:
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_ad5758_spi_reg_write
	testl	%eax, %eax
	js	LBB0_13
## %bb.7:
	movl	16(%rbx), %esi
	movq	%rbx, %rdi
	callq	_ad5758_set_dc_dc_ilim
	testl	%eax, %eax
	js	LBB0_13
## %bb.8:
	movl	12(%rbx), %esi
	movq	%rbx, %rdi
	callq	_ad5758_set_dc_dc_conv_mode
	testl	%eax, %eax
	js	LBB0_13
## %bb.9:
	movl	8(%rbx), %esi
	movq	%rbx, %rdi
	callq	_ad5758_set_out_range
	testl	%eax, %eax
	js	LBB0_13
## %bb.10:
	cmpq	$0, (%rbx)
	je	LBB0_12
## %bb.11:
	movq	%rbx, %rdi
	callq	_ad5758_slew_rate_config
	testl	%eax, %eax
	js	LBB0_13
LBB0_12:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ad5758_internal_buffers_en
	testl	%eax, %eax
	js	LBB0_13
## %bb.15:
	movq	_AD5758_DAC_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_AD5758_DAC_CONFIG_OUT_EN_MSK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	$1, %edi
	callq	_AD5758_DAC_CONFIG_OUT_EN_MODE
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	movl	%eax, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ad5758_spi_write_mask          ## TAILCALL
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reset"

	.comm	_GPIOD_OUT_HIGH,4,2             ## @GPIOD_OUT_HIGH
	.comm	_AD5758_DIGITAL_DIAG_RESULTS,4,2 ## @AD5758_DIGITAL_DIAG_RESULTS
	.comm	_AD5758_DAC_CONFIG,4,2          ## @AD5758_DAC_CONFIG
	.comm	_AD5758_DAC_CONFIG_OUT_EN_MSK,4,2 ## @AD5758_DAC_CONFIG_OUT_EN_MSK
	.no_dead_strip	_ad5758_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad5758_init
_ad5758_init:                           ; @ad5758_init
	.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	x19, x0
	ldr	x0, [x0, #24]
Lloh0:
	adrp	x8, _GPIOD_OUT_HIGH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GPIOD_OUT_HIGH@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_devm_gpiod_get_optional
	str	w0, [x19, #20]
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w0, [x19, #20]
	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	_PTR_ERR
LBB0_2:
	mov	x0, x19
	bl	_ad5758_crc_disable
	tbnz	w0, #31, LBB0_15
; %bb.3:
	mov	x0, x19
	bl	_ad5758_reset
	tbnz	w0, #31, LBB0_15
; %bb.4:
	mov	x0, x19
	bl	_ad5758_crc_disable
	tbnz	w0, #31, LBB0_15
; %bb.5:
	mov	x0, x19
	bl	_ad5758_calib_mem_refresh
	tbnz	w0, #31, LBB0_15
; %bb.6:
Lloh5:
	adrp	x20, _AD5758_DIGITAL_DIAG_RESULTS@GOTPAGE
Lloh6:
	ldr	x20, [x20, _AD5758_DIGITAL_DIAG_RESULTS@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_ad5758_spi_reg_read
	mov	x2, x0
	tbnz	w0, #31, LBB0_16
; %bb.7:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_ad5758_spi_reg_write
	tbnz	w0, #31, LBB0_15
; %bb.8:
	ldr	w1, [x19, #16]
	mov	x0, x19
	bl	_ad5758_set_dc_dc_ilim
	tbnz	w0, #31, LBB0_15
; %bb.9:
	ldr	w1, [x19, #12]
	mov	x0, x19
	bl	_ad5758_set_dc_dc_conv_mode
	tbnz	w0, #31, LBB0_15
; %bb.10:
	ldr	w1, [x19, #8]
	mov	x0, x19
	bl	_ad5758_set_out_range
	tbnz	w0, #31, LBB0_15
; %bb.11:
	ldr	x8, [x19]
	cbz	x8, LBB0_13
; %bb.12:
	mov	x0, x19
	bl	_ad5758_slew_rate_config
	tbnz	w0, #31, LBB0_15
LBB0_13:
	mov	x0, x19
	mov	w1, #1
	bl	_ad5758_internal_buffers_en
	tbnz	w0, #31, LBB0_15
; %bb.14:
Lloh7:
	adrp	x8, _AD5758_DAC_CONFIG@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AD5758_DAC_CONFIG@GOTPAGEOFF]
Lloh9:
	ldr	w20, [x8]
Lloh10:
	adrp	x8, _AD5758_DAC_CONFIG_OUT_EN_MSK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AD5758_DAC_CONFIG_OUT_EN_MSK@GOTPAGEOFF]
Lloh12:
	ldr	w21, [x8]
	mov	w0, #1
	bl	_AD5758_DAC_CONFIG_OUT_EN_MODE
	mov	x3, x0
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	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	_ad5758_spi_write_mask
LBB0_15:
	mov	x2, x0
LBB0_16:
	mov	x0, x2
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reset"

	.comm	_GPIOD_OUT_HIGH,4,2             ; @GPIOD_OUT_HIGH
	.comm	_AD5758_DIGITAL_DIAG_RESULTS,4,2 ; @AD5758_DIGITAL_DIAG_RESULTS
	.comm	_AD5758_DAC_CONFIG,4,2          ; @AD5758_DAC_CONFIG
	.comm	_AD5758_DAC_CONFIG_OUT_EN_MSK,4,2 ; @AD5758_DAC_CONFIG_OUT_EN_MSK
	.no_dead_strip	_ad5758_init
.subsections_via_symbols
