	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dev_open
_dev_open:                              ## @dev_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, %r14
	callq	_iminor
	movq	_dev@GOTPCREL(%rip), %r15
	cmpl	(%r15), %eax
	jne	LBB0_14
## %bb.1:
	movl	(%r14), %eax
	movq	_FMODE_WRITE@GOTPCREL(%rip), %r13
	testl	%eax, (%r13)
	je	LBB0_4
## %bb.2:
	movq	_F_AUDIO_WRITE_INUSE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	16(%r15), %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_6
## %bb.3:
	movl	(%r14), %eax
LBB0_4:
	movq	_FMODE_READ@GOTPCREL(%rip), %r12
	testl	%eax, (%r12)
	je	LBB0_7
## %bb.5:
	movq	_F_AUDIO_READ_INUSE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	16(%r15), %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_7
LBB0_6:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_14:
	xorl	%ebx, %ebx
	cmpl	12(%r15), %eax
	je	LBB0_17
## %bb.15:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_16:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%r14, %rdi
	callq	_dsp_open
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_17
## %bb.8:
	movq	$0, 24(%r15)
	movl	(%r13), %eax
	testl	%eax, (%r14)
	je	LBB0_12
## %bb.9:
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_set_default_play_audio_parameters
	movq	_F_DISABLE_WRITE_NDELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	16(%r15), %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_11
## %bb.10:
	movq	_O_NDELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r13d, %r13d
	testl	%eax, 4(%r14)
	setne	%r13b
LBB0_11:
	movl	%r13d, 4(%r15)
LBB0_12:
	movl	(%r12), %eax
	testl	%eax, (%r14)
	je	LBB0_17
## %bb.13:
	xorl	%eax, %eax
	callq	_set_default_rec_audio_parameters
	movq	_O_NDELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ecx, %ecx
	andl	4(%r14), %eax
	setne	%cl
	movl	%ecx, 8(%r15)
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_dev,32,3                       ## @dev
	.comm	_FMODE_WRITE,4,2                ## @FMODE_WRITE
	.comm	_F_AUDIO_WRITE_INUSE,4,2        ## @F_AUDIO_WRITE_INUSE
	.comm	_FMODE_READ,4,2                 ## @FMODE_READ
	.comm	_F_AUDIO_READ_INUSE,4,2         ## @F_AUDIO_READ_INUSE
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_F_DISABLE_WRITE_NDELAY,4,2     ## @F_DISABLE_WRITE_NDELAY
	.comm	_O_NDELAY,4,2                   ## @O_NDELAY
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_dev_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dev_open
_dev_open:                              ; @dev_open
	.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, x1
	bl	_iminor
Lloh0:
	adrp	x21, _dev@GOTPAGE
Lloh1:
	ldr	x21, [x21, _dev@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w0, w8
	b.ne	LBB0_7
; %bb.1:
	ldr	w8, [x19]
Lloh2:
	adrp	x23, _FMODE_WRITE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _FMODE_WRITE@GOTPAGEOFF]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
Lloh4:
	adrp	x8, _F_AUDIO_WRITE_INUSE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _F_AUDIO_WRITE_INUSE@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	add	x1, x21, #16
	bl	_test_bit
	cbnz	x0, LBB0_6
; %bb.3:
	ldr	w8, [x19]
LBB0_4:
Lloh7:
	adrp	x22, _FMODE_READ@GOTPAGE
Lloh8:
	ldr	x22, [x22, _FMODE_READ@GOTPAGEOFF]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.5:
Lloh9:
	adrp	x8, _F_AUDIO_READ_INUSE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _F_AUDIO_READ_INUSE@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	add	x1, x21, #16
	bl	_test_bit
	cbz	x0, LBB0_12
LBB0_6:
Lloh12:
	adrp	x8, _EBUSY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_10
LBB0_7:
	ldr	w8, [x21, #12]
	cmp	w0, w8
	b.ne	LBB0_9
; %bb.8:
	mov	w20, #0
	b	LBB0_11
LBB0_9:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_11:
	mov	x0, x20
	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
	ret
LBB0_12:
	mov	x0, x19
	bl	_dsp_open
	mov	x20, x0
	tbnz	w0, #31, LBB0_11
; %bb.13:
	str	xzr, [x21, #24]
	ldr	w8, [x19]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_18
; %bb.14:
	bl	_set_default_play_audio_parameters
Lloh16:
	adrp	x8, _F_DISABLE_WRITE_NDELAY@GOTPAGE
Lloh17:
	ldr	x8, [x8, _F_DISABLE_WRITE_NDELAY@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	add	x1, x21, #16
	bl	_test_bit
	cbz	x0, LBB0_16
; %bb.15:
	mov	w8, #0
	b	LBB0_17
LBB0_16:
	ldr	w8, [x19, #4]
Lloh19:
	adrp	x9, _O_NDELAY@GOTPAGE
Lloh20:
	ldr	x9, [x9, _O_NDELAY@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w8, ne
LBB0_17:
	str	w8, [x21, #4]
LBB0_18:
	ldr	w8, [x19]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.19:
	bl	_set_default_rec_audio_parameters
	ldr	w8, [x19, #4]
Lloh22:
	adrp	x9, _O_NDELAY@GOTPAGE
Lloh23:
	ldr	x9, [x9, _O_NDELAY@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w8, ne
	str	w8, [x21, #8]
	b	LBB0_11
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_dev,32,3                       ; @dev
	.comm	_FMODE_WRITE,4,2                ; @FMODE_WRITE
	.comm	_F_AUDIO_WRITE_INUSE,4,2        ; @F_AUDIO_WRITE_INUSE
	.comm	_FMODE_READ,4,2                 ; @FMODE_READ
	.comm	_F_AUDIO_READ_INUSE,4,2         ; @F_AUDIO_READ_INUSE
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_F_DISABLE_WRITE_NDELAY,4,2     ; @F_DISABLE_WRITE_NDELAY
	.comm	_O_NDELAY,4,2                   ; @O_NDELAY
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_dev_open
.subsections_via_symbols
