	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad1848_init_hw
_ad1848_init_hw:                        ## @ad1848_init_hw
	.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
	movq	%rdi, %r13
	movq	(%rdi), %rax
	movq	_MD_4236@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	xorl	%r15d, %r15d
	xorl	%edx, %edx
	cmpq	%rcx, %rax
	movl	$138, %eax
	movl	$224, %r14d
	cmovll	%eax, %r14d
	setge	%dl
	movl	$12, %eax
	cmovll	%eax, %r15d
	leal	2(,%rdx,4), %r12d
	xorl	%esi, %esi
	movl	$168, %edx
	callq	_ad_write
	movq	%r13, %rdi
	movl	$1, %esi
	movl	$168, %edx
	callq	_ad_write
	movq	%r13, %rdi
	movl	$2, %esi
	movl	$8, %edx
	callq	_ad_write
	movq	%r13, %rdi
	movl	$3, %esi
	movl	$8, %edx
	callq	_ad_write
	movq	%r13, %rdi
	movl	$4, %esi
	movl	$8, %edx
	callq	_ad_write
	movq	%r13, %rdi
	movl	$5, %esi
	movl	$8, %edx
	callq	_ad_write
	movq	%r13, %rdi
	movl	$6, %esi
	xorl	%edx, %edx
	callq	_ad_write
	movq	%r13, %rdi
	movl	$7, %esi
	xorl	%edx, %edx
	callq	_ad_write
	movq	%r13, %rdi
	movl	$8, %esi
	xorl	%edx, %edx
	callq	_ad_write
	movq	%r13, %rdi
	movl	$9, %esi
	movl	%r15d, %edx
	callq	_ad_write
	movq	%r13, %rdi
	movl	$10, %esi
	movl	%r12d, %edx
	callq	_ad_write
	movq	%r13, %rdi
	movl	$11, %esi
	xorl	%edx, %edx
	callq	_ad_write
	movq	%r13, %rdi
	movl	$12, %esi
	movl	%r14d, %edx
	callq	_ad_write
	movq	%r13, %rdi
	movl	$13, %esi
	movl	$1, %edx
	callq	_ad_write
	movq	%r13, %rdi
	movl	$14, %esi
	xorl	%edx, %edx
	callq	_ad_write
	movq	%r13, %rdi
	movl	$15, %esi
	xorl	%edx, %edx
	callq	_ad_write
	movq	%r13, %rdi
	callq	_ad_mute
	movq	%r13, %rdi
	callq	_ad_unmute
	movq	(%r13), %rax
	movq	_MD_1848@GOTPCREL(%rip), %r14
	cmpq	(%r14), %rax
	jle	LBB0_7
## %bb.1:
	movq	_MD_1845_SSCAPE@GOTPCREL(%rip), %r15
	xorl	%ebx, %ebx
	cmpq	(%r15), %rax
	sete	%bl
	movq	%r13, %rdi
	movl	$12, %esi
	callq	_ad_read
	shll	$4, %ebx
	orl	%eax, %ebx
	orl	$64, %ebx
	movq	%r13, %rdi
	movl	$12, %esi
	movl	%ebx, %edx
	callq	_ad_write
	movq	(%r13), %rax
	movq	_MD_IWAVE@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	je	LBB0_2
## %bb.3:
	cmpq	(%r15), %rax
	jne	LBB0_4
LBB0_5:
	cmpq	(%rbx), %rax
	jne	LBB0_7
LBB0_6:
	movq	%r13, %rdi
	movl	$16, %esi
	movl	$48, %edx
	callq	_ad_write
	movq	(%r13), %rax
LBB0_7:
	cmpq	(%r14), %rax
	jle	LBB0_13
## %bb.8:
	movq	_DMA_DUPLEX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ebx, %ebx
	andl	8(%r13), %eax
	sete	%bl
	movq	%r13, %rdi
	movl	$9, %esi
	callq	_ad_read
                                        ## kill: def $eax killed $eax def $rax
	andl	$-5, %eax
	leal	(%rax,%rbx,4), %edx
	movq	%r13, %rdi
	movl	$9, %esi
	callq	_ad_write
	movq	(%r13), %rax
	movq	_MD_1845@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_10
## %bb.9:
	movq	_MD_1845_SSCAPE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
LBB0_10:
	movq	%r13, %rdi
	movl	$27, %esi
	callq	_ad_read
	orl	$8, %eax
	movq	%r13, %rdi
	movl	$27, %esi
	movl	%eax, %edx
	callq	_ad_write
	movq	(%r13), %rax
LBB0_11:
	movq	_MD_IWAVE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.12:
	movq	%r13, %rdi
	movl	$12, %esi
	movl	$108, %edx
	callq	_ad_write
	movq	%r13, %rdi
	movl	$16, %esi
	movl	$48, %edx
	callq	_ad_write
	movq	%r13, %rdi
	movl	$17, %esi
	movl	$194, %edx
	jmp	LBB0_15
LBB0_13:
	movq	_DMA_DUPLEX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 8(%r13)
	movq	%r13, %rdi
	movl	$9, %esi
	callq	_ad_read
	orl	$4, %eax
	movq	%r13, %rdi
	movl	$9, %esi
	movl	%eax, %edx
	callq	_ad_write
	movq	_soundpro@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_16
## %bb.14:
	movq	%r13, %rdi
	movl	$12, %esi
	callq	_ad_read
	orl	$64, %eax
	movq	%r13, %rdi
	movl	$12, %esi
	movl	%eax, %edx
LBB0_15:
	callq	_ad_write
LBB0_16:
	movq	%r13, %rdi
	callq	_io_Status
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_outb
	movq	%r13, %rdi
	callq	_ad_enter_MCE
	movq	%r13, %rdi
	callq	_ad_leave_MCE
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ad1848_mixer_reset             ## TAILCALL
LBB0_2:
	movq	%r13, %rdi
	movl	$12, %esi
	movl	$108, %edx
	callq	_ad_write
	movq	(%r13), %rax
	cmpq	(%r15), %rax
	je	LBB0_5
LBB0_4:
	movq	%r13, %rdi
	movl	$16, %esi
	movl	$128, %edx
	callq	_ad_write
	movq	%r13, %rdi
	movl	$17, %esi
	xorl	%edx, %edx
	callq	_ad_write
	movq	%r13, %rdi
	movl	$18, %esi
	movl	$16, %edx
	callq	_ad_write
	movq	%r13, %rdi
	movl	$19, %esi
	movl	$16, %edx
	callq	_ad_write
	movq	%r13, %rdi
	movl	$20, %esi
	xorl	%edx, %edx
	callq	_ad_write
	movq	%r13, %rdi
	movl	$21, %esi
	xorl	%edx, %edx
	callq	_ad_write
	movq	%r13, %rdi
	movl	$22, %esi
	movl	$31, %edx
	callq	_ad_write
	movq	%r13, %rdi
	movl	$23, %esi
	movl	$64, %edx
	callq	_ad_write
	movq	%r13, %rdi
	movl	$24, %esi
	xorl	%edx, %edx
	callq	_ad_write
	movq	%r13, %rdi
	movl	$25, %esi
	xorl	%edx, %edx
	callq	_ad_write
	movq	%r13, %rdi
	movl	$26, %esi
	xorl	%edx, %edx
	callq	_ad_write
	movq	%r13, %rdi
	movl	$27, %esi
	xorl	%edx, %edx
	callq	_ad_write
	movq	%r13, %rdi
	movl	$28, %esi
	xorl	%edx, %edx
	callq	_ad_write
	movq	%r13, %rdi
	movl	$29, %esi
	xorl	%edx, %edx
	callq	_ad_write
	movq	%r13, %rdi
	movl	$30, %esi
	xorl	%edx, %edx
	callq	_ad_write
	movq	%r13, %rdi
	movl	$31, %esi
	xorl	%edx, %edx
	callq	_ad_write
	movq	(%r13), %rax
	cmpq	(%rbx), %rax
	je	LBB0_6
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_MD_4236,8,3                    ## @MD_4236
	.comm	_MD_1848,8,3                    ## @MD_1848
	.comm	_MD_1845_SSCAPE,8,3             ## @MD_1845_SSCAPE
	.comm	_MD_IWAVE,8,3                   ## @MD_IWAVE
	.comm	_DMA_DUPLEX,4,2                 ## @DMA_DUPLEX
	.comm	_MD_1845,8,3                    ## @MD_1845
	.comm	_soundpro,8,3                   ## @soundpro
	.no_dead_strip	_ad1848_init_hw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad1848_init_hw
_ad1848_init_hw:                        ; @ad1848_init_hw
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x0
	ldr	x20, [x0]
Lloh0:
	adrp	x8, _MD_4236@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MD_4236@GOTPAGEOFF]
Lloh2:
	ldr	x21, [x8]
	mov	w1, #0
	mov	w2, #168
	bl	_ad_write
	mov	x0, x19
	mov	w1, #1
	mov	w2, #168
	bl	_ad_write
	mov	w22, #2
	mov	x0, x19
	mov	w1, #2
	mov	w2, #8
	bl	_ad_write
	mov	x0, x19
	mov	w1, #3
	mov	w2, #8
	bl	_ad_write
	mov	x0, x19
	mov	w1, #4
	mov	w2, #8
	bl	_ad_write
	mov	x0, x19
	mov	w1, #5
	mov	w2, #8
	bl	_ad_write
	mov	w23, #6
	mov	x0, x19
	mov	w1, #6
	mov	w2, #0
	bl	_ad_write
	mov	x0, x19
	mov	w1, #7
	mov	w2, #0
	bl	_ad_write
	mov	x0, x19
	mov	w1, #8
	mov	w2, #0
	bl	_ad_write
	cmp	x20, x21
	mov	w8, #12
	csel	w2, w8, wzr, lt
	csel	w20, w22, w23, lt
	mov	w8, #224
	mov	w9, #138
	csel	w21, w9, w8, lt
	mov	x0, x19
	mov	w1, #9
	bl	_ad_write
	mov	x0, x19
	mov	w1, #10
	mov	x2, x20
	bl	_ad_write
	mov	x0, x19
	mov	w1, #11
	mov	w2, #0
	bl	_ad_write
	mov	x0, x19
	mov	w1, #12
	mov	x2, x21
	bl	_ad_write
	mov	x0, x19
	mov	w1, #13
	mov	w2, #1
	bl	_ad_write
	mov	x0, x19
	mov	w1, #14
	mov	w2, #0
	bl	_ad_write
	mov	x0, x19
	mov	w1, #15
	mov	w2, #0
	bl	_ad_write
	mov	x0, x19
	bl	_ad_mute
	mov	x0, x19
	bl	_ad_unmute
	ldr	x23, [x19]
Lloh3:
	adrp	x22, _MD_1848@GOTPAGE
Lloh4:
	ldr	x22, [x22, _MD_1848@GOTPAGEOFF]
	ldr	x8, [x22]
Lloh5:
	adrp	x21, _MD_1845_SSCAPE@GOTPAGE
Lloh6:
	ldr	x21, [x21, _MD_1845_SSCAPE@GOTPAGEOFF]
Lloh7:
	adrp	x20, _MD_IWAVE@GOTPAGE
Lloh8:
	ldr	x20, [x20, _MD_IWAVE@GOTPAGEOFF]
	cmp	x23, x8
	b.le	LBB0_7
; %bb.1:
	ldr	x24, [x21]
	mov	x0, x19
	mov	w1, #12
	bl	_ad_read
	cmp	x23, x24
	mov	w8, #64
	mov	w9, #80
	csel	w8, w9, w8, eq
	orr	w2, w0, w8
	mov	x0, x19
	mov	w1, #12
	bl	_ad_write
	ldr	x23, [x19]
	ldr	x8, [x20]
	cmp	x23, x8
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x19
	mov	w1, #12
	mov	w2, #108
	bl	_ad_write
	ldr	x23, [x19]
LBB0_3:
	ldr	x8, [x21]
	cmp	x23, x8
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x19
	mov	w1, #16
	mov	w2, #128
	bl	_ad_write
	mov	x0, x19
	mov	w1, #17
	mov	w2, #0
	bl	_ad_write
	mov	x0, x19
	mov	w1, #18
	mov	w2, #16
	bl	_ad_write
	mov	x0, x19
	mov	w1, #19
	mov	w2, #16
	bl	_ad_write
	mov	x0, x19
	mov	w1, #20
	mov	w2, #0
	bl	_ad_write
	mov	x0, x19
	mov	w1, #21
	mov	w2, #0
	bl	_ad_write
	mov	x0, x19
	mov	w1, #22
	mov	w2, #31
	bl	_ad_write
	mov	x0, x19
	mov	w1, #23
	mov	w2, #64
	bl	_ad_write
	mov	x0, x19
	mov	w1, #24
	mov	w2, #0
	bl	_ad_write
	mov	x0, x19
	mov	w1, #25
	mov	w2, #0
	bl	_ad_write
	mov	x0, x19
	mov	w1, #26
	mov	w2, #0
	bl	_ad_write
	mov	x0, x19
	mov	w1, #27
	mov	w2, #0
	bl	_ad_write
	mov	x0, x19
	mov	w1, #28
	mov	w2, #0
	bl	_ad_write
	mov	x0, x19
	mov	w1, #29
	mov	w2, #0
	bl	_ad_write
	mov	x0, x19
	mov	w1, #30
	mov	w2, #0
	bl	_ad_write
	mov	x0, x19
	mov	w1, #31
	mov	w2, #0
	bl	_ad_write
	ldr	x23, [x19]
LBB0_5:
	ldr	x8, [x20]
	cmp	x23, x8
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x19
	mov	w1, #16
	mov	w2, #48
	bl	_ad_write
	ldr	x23, [x19]
LBB0_7:
	ldr	x8, [x22]
	cmp	x23, x8
	b.le	LBB0_13
; %bb.8:
	ldr	w8, [x19, #8]
Lloh9:
	adrp	x9, _DMA_DUPLEX@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DMA_DUPLEX@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w22, eq
	mov	x0, x19
	mov	w1, #9
	bl	_ad_read
	mov	x2, x0
	bfi	w2, w22, #2, #1
	mov	x0, x19
	mov	w1, #9
	bl	_ad_write
	ldr	x8, [x19]
Lloh12:
	adrp	x9, _MD_1845@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MD_1845@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_10
; %bb.9:
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_11
LBB0_10:
	mov	x0, x19
	mov	w1, #27
	bl	_ad_read
	orr	w2, w0, #0x8
	mov	x0, x19
	mov	w1, #27
	bl	_ad_write
	ldr	x8, [x19]
LBB0_11:
	ldr	x9, [x20]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.12:
	mov	x0, x19
	mov	w1, #12
	mov	w2, #108
	bl	_ad_write
	mov	x0, x19
	mov	w1, #16
	mov	w2, #48
	bl	_ad_write
	mov	x0, x19
	mov	w1, #17
	mov	w2, #194
	b	LBB0_15
LBB0_13:
Lloh15:
	adrp	x8, _DMA_DUPLEX@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DMA_DUPLEX@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	bic	w8, w9, w8
	str	w8, [x19, #8]
	mov	x0, x19
	mov	w1, #9
	bl	_ad_read
	orr	w2, w0, #0x4
	mov	x0, x19
	mov	w1, #9
	bl	_ad_write
Lloh18:
	adrp	x8, _soundpro@GOTPAGE
Lloh19:
	ldr	x8, [x8, _soundpro@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	cbz	x8, LBB0_16
; %bb.14:
	mov	x0, x19
	mov	w1, #12
	bl	_ad_read
	orr	w2, w0, #0x40
	mov	x0, x19
	mov	w1, #12
LBB0_15:
	bl	_ad_write
LBB0_16:
	mov	x0, x19
	bl	_io_Status
	mov	x1, x0
	mov	w0, #0
	bl	_outb
	mov	x0, x19
	bl	_ad_enter_MCE
	mov	x0, x19
	bl	_ad_leave_MCE
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ad1848_mixer_reset
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_MD_4236,8,3                    ; @MD_4236
	.comm	_MD_1848,8,3                    ; @MD_1848
	.comm	_MD_1845_SSCAPE,8,3             ; @MD_1845_SSCAPE
	.comm	_MD_IWAVE,8,3                   ; @MD_IWAVE
	.comm	_DMA_DUPLEX,4,2                 ; @DMA_DUPLEX
	.comm	_MD_1845,8,3                    ; @MD_1845
	.comm	_soundpro,8,3                   ; @soundpro
	.no_dead_strip	_ad1848_init_hw
.subsections_via_symbols
