	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function au1550_open
_au1550_open:                           ## @au1550_open
	.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	%rsi, %r12
	movl	(%rdi), %edi
	callq	_MINOR
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_wait@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_DECLARE_WAITQUEUE
	movq	_au1550_state@GOTPCREL(%rip), %r14
	movq	%r14, 8(%r12)
	leaq	8(%r14), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movl	4(%r12), %eax
	testl	%eax, (%r14)
	je	LBB0_8
## %bb.1:
	leaq	96(%r14), %rbx
	movq	_wait@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_add_wait_queue
	movq	_TASK_INTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	___set_current_state
	movq	%r15, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	callq	_schedule
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_remove_wait_queue
	movq	_TASK_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_set_current_state
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_signal_pending
	testq	%rax, %rax
	jne	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	callq	_mutex_lock
	movl	4(%r12), %eax
	testl	%eax, (%r14)
	jne	LBB0_2
LBB0_8:
	movq	_au1550_state@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_stop_dac
	movq	%r15, %rdi
	callq	_stop_adc
	movq	_FMODE_READ@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	movabsq	$34359738369, %rbx              ## imm = 0x800000001
	testl	%eax, 4(%r12)
	je	LBB0_11
## %bb.9:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 80(%r15)
	movups	%xmm0, 64(%r15)
	movq	%rbx, 56(%r15)
	movq	%r15, %rdi
	movl	$8000, %esi                     ## imm = 0x1F40
	callq	_set_adc_rate
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	andl	$15, %eax
	movq	_SND_DEV_DSP16@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_11
## %bb.10:
	movl	$16, 60(%r15)
LBB0_11:
	movq	_FMODE_WRITE@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	testl	%eax, 4(%r12)
	je	LBB0_14
## %bb.12:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 40(%r15)
	movups	%xmm0, 24(%r15)
	movq	%rbx, 16(%r15)
	movq	%r15, %rdi
	movl	$8000, %esi                     ## imm = 0x1F40
	callq	_set_dac_rate
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	andl	$15, %ecx
	movq	_SND_DEV_DSP16@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_14
## %bb.13:
	movl	$16, 20(%r15)
LBB0_14:
	movl	4(%r12), %eax
	testl	%eax, (%r14)
	je	LBB0_17
## %bb.15:
	movq	_au1550_state@GOTPCREL(%rip), %rdi
	callq	_prog_dmabuf_adc
	testl	%eax, %eax
	jne	LBB0_21
## %bb.16:
	movl	4(%r12), %eax
LBB0_17:
	movl	(%r13), %ecx
	testl	%eax, %ecx
	je	LBB0_20
## %bb.18:
	movq	_au1550_state@GOTPCREL(%rip), %rdi
	callq	_prog_dmabuf_dac
	testl	%eax, %eax
	jne	LBB0_21
## %bb.19:
	movl	4(%r12), %eax
	movl	(%r13), %ecx
LBB0_20:
	orl	(%r14), %ecx
	andl	%eax, %ecx
	orl	%ecx, (%r15)
	leaq	8(%r15), %rdi
	callq	_mutex_unlock
	addq	$4, %r15
	movq	%r15, %rdi
	callq	_mutex_init
	xorl	%eax, %eax
	jmp	LBB0_21
LBB0_3:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_5:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rcx
LBB0_6:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_21:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_wait,4,2                       ## @wait
	.comm	_current,4,2                    ## @current
	.comm	_au1550_state,104,3             ## @au1550_state
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_TASK_INTERRUPTIBLE,4,2         ## @TASK_INTERRUPTIBLE
	.comm	_TASK_RUNNING,4,2               ## @TASK_RUNNING
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.comm	_FMODE_READ,4,2                 ## @FMODE_READ
	.comm	_SND_DEV_DSP16,4,2              ## @SND_DEV_DSP16
	.comm	_FMODE_WRITE,4,2                ## @FMODE_WRITE
	.no_dead_strip	_au1550_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function au1550_open
lCPI0_0:
	.long	1                               ; 0x1
	.long	8                               ; 0x8
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_au1550_open:                           ; @au1550_open
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	ldr	w0, [x0]
	bl	_MINOR
	mov	x20, x0
Lloh0:
	adrp	x8, _wait@GOTPAGE
Lloh1:
	ldr	x8, [x8, _wait@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x24, _current@GOTPAGE
Lloh4:
	ldr	x24, [x24, _current@GOTPAGEOFF]
	ldr	w1, [x24]
	bl	_DECLARE_WAITQUEUE
Lloh5:
	adrp	x25, _au1550_state@GOTPAGE
Lloh6:
	ldr	x25, [x25, _au1550_state@GOTPAGEOFF]
	str	x25, [x19, #8]
	add	x0, x25, #8
	bl	_mutex_lock
	ldr	w8, [x25]
	ldr	w9, [x19, #4]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.1:
Lloh7:
	adrp	x26, _O_NONBLOCK@GOTPAGE
Lloh8:
	ldr	x26, [x26, _O_NONBLOCK@GOTPAGEOFF]
Lloh9:
	adrp	x21, _wait@GOTPAGE
Lloh10:
	ldr	x21, [x21, _wait@GOTPAGEOFF]
Lloh11:
	adrp	x27, _TASK_INTERRUPTIBLE@GOTPAGE
Lloh12:
	ldr	x27, [x27, _TASK_INTERRUPTIBLE@GOTPAGEOFF]
Lloh13:
	adrp	x28, _TASK_RUNNING@GOTPAGE
Lloh14:
	ldr	x28, [x28, _TASK_RUNNING@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19]
	ldr	w9, [x26]
	tst	w9, w8
	b.ne	LBB0_18
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x23, x25, #96
	mov	x0, x23
	mov	x1, x21
	bl	_add_wait_queue
	ldr	w0, [x27]
	bl	___set_current_state
	add	x22, x25, #8
	mov	x0, x22
	bl	_mutex_unlock
	bl	_schedule
	mov	x0, x23
	mov	x1, x21
	bl	_remove_wait_queue
	ldr	w0, [x28]
	bl	_set_current_state
	ldr	w0, [x24]
	bl	_signal_pending
	cbnz	x0, LBB0_19
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x22
	bl	_mutex_lock
	ldr	w8, [x25]
	ldr	w9, [x19, #4]
	tst	w9, w8
	b.ne	LBB0_2
LBB0_5:
Lloh15:
	adrp	x21, _au1550_state@GOTPAGE
Lloh16:
	ldr	x21, [x21, _au1550_state@GOTPAGEOFF]
	mov	x0, x21
	bl	_stop_dac
	mov	x0, x21
	bl	_stop_adc
Lloh17:
	adrp	x22, _FMODE_READ@GOTPAGE
Lloh18:
	ldr	x22, [x22, _FMODE_READ@GOTPAGEOFF]
	ldr	w8, [x19, #4]
	ldr	w9, [x22]
	adrp	x25, lCPI0_0@PAGE
Lloh19:
	adrp	x24, _SND_DEV_DSP16@GOTPAGE
Lloh20:
	ldr	x24, [x24, _SND_DEV_DSP16@GOTPAGEOFF]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.6:
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [x21, #64]
	ldr	d0, [x25, lCPI0_0@PAGEOFF]
	str	d0, [x21, #56]
	mov	x0, x21
	mov	w1, #8000
	bl	_set_adc_rate
	and	w8, w20, #0xf
	ldr	w9, [x24]
	cmp	w8, w9
	b.ne	LBB0_8
; %bb.7:
	mov	w8, #16
	str	w8, [x21, #60]
LBB0_8:
	ldr	w8, [x19, #4]
Lloh21:
	adrp	x23, _FMODE_WRITE@GOTPAGE
Lloh22:
	ldr	x23, [x23, _FMODE_WRITE@GOTPAGEOFF]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.9:
	movi.2d	v0, #0000000000000000
	stur	q0, [x21, #40]
	stur	q0, [x21, #24]
	ldr	d0, [x25, lCPI0_0@PAGEOFF]
	str	d0, [x21, #16]
	mov	x0, x21
	mov	w1, #8000
	bl	_set_dac_rate
	and	w8, w20, #0xf
	ldr	w9, [x24]
	cmp	w8, w9
	b.ne	LBB0_11
; %bb.10:
	mov	w8, #16
	str	w8, [x21, #20]
LBB0_11:
	ldr	w8, [x19, #4]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.12:
Lloh23:
	adrp	x0, _au1550_state@GOTPAGE
Lloh24:
	ldr	x0, [x0, _au1550_state@GOTPAGEOFF]
	bl	_prog_dmabuf_adc
	cbnz	w0, LBB0_21
; %bb.13:
	ldr	w8, [x19, #4]
LBB0_14:
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_17
; %bb.15:
Lloh25:
	adrp	x0, _au1550_state@GOTPAGE
Lloh26:
	ldr	x0, [x0, _au1550_state@GOTPAGEOFF]
	bl	_prog_dmabuf_dac
	cbnz	w0, LBB0_21
; %bb.16:
	ldr	w8, [x19, #4]
	ldr	w9, [x23]
LBB0_17:
	ldr	w10, [x22]
	orr	w9, w9, w10
	and	w8, w9, w8
	mov	x19, x21
	ldr	w9, [x19], #4
	orr	w8, w8, w9
	str	w8, [x21], #8
	mov	x0, x21
	bl	_mutex_unlock
	mov	x0, x19
	bl	_mutex_init
	mov	w0, #0
	b	LBB0_21
LBB0_18:
	add	x0, x25, #8
	bl	_mutex_unlock
Lloh27:
	adrp	x8, _EBUSY@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_20
LBB0_19:
Lloh29:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
LBB0_20:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_21:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_wait,4,2                       ; @wait
	.comm	_current,4,2                    ; @current
	.comm	_au1550_state,104,3             ; @au1550_state
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_TASK_INTERRUPTIBLE,4,2         ; @TASK_INTERRUPTIBLE
	.comm	_TASK_RUNNING,4,2               ; @TASK_RUNNING
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.comm	_FMODE_READ,4,2                 ; @FMODE_READ
	.comm	_SND_DEV_DSP16,4,2              ; @SND_DEV_DSP16
	.comm	_FMODE_WRITE,4,2                ; @FMODE_WRITE
	.no_dead_strip	_au1550_open
.subsections_via_symbols
