	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hw_reset_dac
_hw_reset_dac:                          ## @hw_reset_dac
	.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
	callq	_i2c_unlock
	movq	%rax, %rcx
	movl	$-1, %eax
	testq	%rcx, %rcx
	jne	LBB0_3
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movl	$236, %esi
	callq	_hw_read_pci
	testl	$8388608, %eax                  ## imm = 0x800000
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	movl	$236, %esi
	movl	$5, %edx
	callq	_hw_write_pci
	movl	$100, %edi
	callq	_mdelay
	movq	_GPIO@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_hw_read_20kx
	movq	%rax, %r14
	andl	$65533, %r14d                   ## imm = 0xFFFD
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_hw_write_20kx
	movl	$1, %edi
	callq	_mdelay
	movl	(%r15), %esi
	orl	$2, %r14d
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_hw_write_20kx
	movl	$100, %edi
	callq	_mdelay
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_hw_read_20kx
	movq	%rax, %r14
	andl	$65533, %r14d                   ## imm = 0xFFFD
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_hw_write_20kx
	movl	$1, %edi
	callq	_mdelay
	movl	(%r15), %esi
	orl	$2, %r14d
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_hw_write_20kx
	movq	%rbx, %rdi
	movl	$1572992, %esi                  ## imm = 0x180080
	movl	$1, %edx
	movl	$128, %ecx
	callq	_i2c_write
	movq	%rbx, %rdi
	movl	$1572992, %esi                  ## imm = 0x180080
	movl	$2, %edx
	movl	$16, %ecx
	callq	_i2c_write
	movq	%rbx, %rdi
	callq	_i2c_lock
	xorl	%eax, %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GPIO,4,2                       ## @GPIO
	.no_dead_strip	_hw_reset_dac
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hw_reset_dac
_hw_reset_dac:                          ; @hw_reset_dac
	.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
	bl	_i2c_unlock
	cbz	x0, LBB0_2
; %bb.1:
	mov	w0, #-1
	b	LBB0_4
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	w1, #236
	bl	_hw_read_pci
	tbz	w0, #23, LBB0_2
; %bb.3:
	mov	x0, x19
	mov	w1, #236
	mov	w2, #5
	bl	_hw_write_pci
	mov	w0, #100
	bl	_mdelay
Lloh0:
	adrp	x21, _GPIO@GOTPAGE
Lloh1:
	ldr	x21, [x21, _GPIO@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_hw_read_20kx
	mov	w22, #65533
	and	w20, w0, w22
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x20
	bl	_hw_write_20kx
	mov	w0, #1
	bl	_mdelay
	ldr	w1, [x21]
	orr	w2, w20, #0x2
	mov	x0, x19
	bl	_hw_write_20kx
	mov	w0, #100
	bl	_mdelay
	ldr	w1, [x21]
	mov	x0, x19
	bl	_hw_read_20kx
	and	w20, w0, w22
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x20
	bl	_hw_write_20kx
	mov	w0, #1
	bl	_mdelay
	ldr	w1, [x21]
	orr	w2, w20, #0x2
	mov	x0, x19
	bl	_hw_write_20kx
	mov	x0, x19
	mov	w1, #128
	movk	w1, #24, lsl #16
	mov	w2, #1
	mov	w3, #128
	bl	_i2c_write
	mov	x0, x19
	mov	w1, #128
	movk	w1, #24, lsl #16
	mov	w2, #2
	mov	w3, #16
	bl	_i2c_write
	mov	x0, x19
	bl	_i2c_lock
	mov	w0, #0
LBB0_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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_GPIO,4,2                       ; @GPIO
	.no_dead_strip	_hw_reset_dac
.subsections_via_symbols
