	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function au1550_read
_au1550_read:                           ## @au1550_read
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	8(%rdi), %rbx
	movq	_wait@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_DECLARE_WAITQUEUE
	cmpq	$0, 64(%rbx)
	je	LBB0_3
## %bb.1:
	movq	_ENXIO@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_31
LBB0_3:
	movq	_VERIFY_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_access_ok
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	imulq	8(%rbx), %r12
	movq	%rbx, %rdi
	callq	_mutex_lock
	leaq	48(%rbx), %rdi
	movq	_wait@GOTPCREL(%rip), %rsi
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	callq	_add_wait_queue
	testq	%r12, %r12
	je	LBB0_6
## %bb.7:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	leaq	8(%rbx), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	4(%rbx), %r13
	xorl	%r15d, %r15d
LBB0_8:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_8 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r13, %rdi
	callq	_spin_lock_irqsave
	cmpq	$0, 56(%rbx)
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=2
	movq	%rbx, %rdi
	callq	_start_adc
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=2
	movl	16(%rbx), %r12d
	testl	%r12d, %r12d
	jg	LBB0_20
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=2
	movq	_TASK_INTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	___set_current_state
	movq	%r13, %rdi
	callq	_spin_unlock_irqrestore
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	jne	LBB0_13
## %bb.16:                              ##   in Loop: Header=BB0_9 Depth=2
	movq	%rbx, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	callq	_schedule
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_signal_pending
	testq	%rax, %rax
	jne	LBB0_17
## %bb.19:                              ##   in Loop: Header=BB0_9 Depth=2
	movq	%rbx, %rdi
	callq	_mutex_lock
	jmp	LBB0_9
LBB0_20:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%r13, %rdi
	callq	_spin_unlock_irqrestore
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	cmpq	%r12, %rax
	cmovbq	%rax, %r12
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%r12d, %edx
	movl	$1, %ecx
	callq	_copy_dmabuf_user
	testl	%eax, %eax
	js	LBB0_21
## %bb.23:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	%eax, %r12d
	movq	%r13, %rdi
	callq	_spin_lock_irqsave
	subl	%r12d, 16(%rbx)
	movl	%r12d, %ecx
	movq	24(%rbx), %rax
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	addq	%rcx, %rax
	movq	%rax, 24(%rbx)
	movq	40(%rbx), %rcx
	movq	32(%rbx), %rdx
	addq	%rcx, %rdx
	cmpq	%rdx, %rax
	jl	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_8 Depth=1
	subq	%rcx, %rax
	movq	%rax, 24(%rbx)
LBB0_25:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%r13, %rdi
	callq	_spin_unlock_irqrestore
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	subq	%rdx, %r12
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rcx
	cmpq	%rcx, %rdx
	jb	LBB0_26
## %bb.27:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%rdx, %rax
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	jmp	LBB0_28
LBB0_26:                                ##   in Loop: Header=BB0_8 Depth=1
	xorl	%eax, %eax
LBB0_28:                                ##   in Loop: Header=BB0_8 Depth=1
	addq	%rax, -56(%rbp)                 ## 8-byte Folded Spill
	addl	%eax, %r15d
	testq	%r12, %r12
	jne	LBB0_8
	jmp	LBB0_29
LBB0_4:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_6:
	xorl	%r15d, %r15d
	jmp	LBB0_29
LBB0_13:
	testl	%r15d, %r15d
	jne	LBB0_29
## %bb.14:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
LBB0_15:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_29:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_30
LBB0_17:
	testl	%r15d, %r15d
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	jne	LBB0_30
## %bb.18:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_30:
	movq	_wait@GOTPCREL(%rip), %rsi
	callq	_remove_wait_queue
	movq	_TASK_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_set_current_state
LBB0_31:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	testl	%r15d, %r15d
	jne	LBB0_29
## %bb.22:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_wait,4,2                       ## @wait
	.comm	_current,4,2                    ## @current
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_VERIFY_WRITE,4,2               ## @VERIFY_WRITE
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_TASK_INTERRUPTIBLE,4,2         ## @TASK_INTERRUPTIBLE
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.comm	_TASK_RUNNING,4,2               ## @TASK_RUNNING
	.no_dead_strip	_au1550_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function au1550_read
_au1550_read:                           ; @au1550_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x2
	mov	x22, x1
	mov	x23, x0
	ldr	x19, [x0, #8]
Lloh0:
	adrp	x8, _wait@GOTPAGE
Lloh1:
	ldr	x8, [x8, _wait@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x27, _current@GOTPAGE
Lloh4:
	ldr	x27, [x27, _current@GOTPAGEOFF]
	ldr	w1, [x27]
	bl	_DECLARE_WAITQUEUE
	ldr	x8, [x19, #64]
	cbz	x8, LBB0_3
; %bb.1:
Lloh5:
	adrp	x8, _ENXIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_24
LBB0_3:
Lloh7:
	adrp	x8, _VERIFY_WRITE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _VERIFY_WRITE@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	mov	x1, x22
	mov	x2, x20
	bl	_access_ok
	cbz	w0, LBB0_16
; %bb.4:
	ldr	x8, [x19, #8]
	mul	x28, x8, x20
	mov	x0, x19
	bl	_mutex_lock
	add	x0, x19, #48
Lloh10:
	adrp	x1, _wait@GOTPAGE
Lloh11:
	ldr	x1, [x1, _wait@GOTPAGEOFF]
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	bl	_add_wait_queue
	mov	w21, #0
	cbz	x28, LBB0_20
; %bb.5:
	add	x8, x19, #8
	str	x8, [sp]                        ; 8-byte Folded Spill
	add	x25, x19, #4
Lloh12:
	adrp	x24, _TASK_INTERRUPTIBLE@GOTPAGE
Lloh13:
	ldr	x24, [x24, _TASK_INTERRUPTIBLE@GOTPAGEOFF]
Lloh14:
	adrp	x20, _O_NONBLOCK@GOTPAGE
Lloh15:
	ldr	x20, [x20, _O_NONBLOCK@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x25
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	bl	_start_adc
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w26, [x19, #16]
	cmp	w26, #0
	b.gt	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x24]
	bl	___set_current_state
	mov	x0, x25
	bl	_spin_unlock_irqrestore
	ldr	w8, [x23]
	ldr	w9, [x20]
	tst	w9, w8
	b.ne	LBB0_17
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	bl	_mutex_unlock
	bl	_schedule
	ldr	w0, [x27]
	bl	_signal_pending
	cbnz	x0, LBB0_21
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	bl	_mutex_lock
	b	LBB0_6
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x25
	bl	_spin_unlock_irqrestore
	cmp	x28, x26
	csel	x2, x28, x26, lo
	ldr	x0, [sp]                        ; 8-byte Folded Reload
	mov	x1, x22
                                        ; kill: def $w2 killed $w2 killed $x2
	mov	w3, #1
	bl	_copy_dmabuf_user
	tbnz	w0, #31, LBB0_25
; %bb.13:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x26, x0
	mov	x0, x25
	bl	_spin_lock_irqsave
	ldr	w8, [x19, #16]
	sub	w8, w8, w26
	str	w8, [x19, #16]
	mov	w26, w26
	ldp	x8, x10, [x19, #24]
	add	x8, x8, x26
	str	x8, [x19, #24]
	ldr	x9, [x19, #40]
	add	x10, x9, x10
	cmp	x8, x10
	b.lt	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_6 Depth=1
	sub	x8, x8, x9
	str	x8, [x19, #24]
LBB0_15:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x25
	bl	_spin_unlock_irqrestore
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	ldr	x8, [x8]
	udiv	x8, x26, x8
	add	x22, x22, x8
	add	w21, w21, w8
	subs	x28, x28, x26
	b.ne	LBB0_6
	b	LBB0_20
LBB0_16:
Lloh16:
	adrp	x8, _EFAULT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_2
LBB0_17:
	cbnz	w21, LBB0_20
; %bb.18:
Lloh18:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
LBB0_19:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_20:
	mov	x0, x19
	bl	_mutex_unlock
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	b	LBB0_23
LBB0_21:
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	cbnz	w21, LBB0_23
; %bb.22:
Lloh20:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_23:
Lloh23:
	adrp	x1, _wait@GOTPAGE
Lloh24:
	ldr	x1, [x1, _wait@GOTPAGEOFF]
	bl	_remove_wait_queue
Lloh25:
	adrp	x8, _TASK_RUNNING@GOTPAGE
Lloh26:
	ldr	x8, [x8, _TASK_RUNNING@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	bl	_set_current_state
LBB0_24:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_25:
	cbnz	w21, LBB0_20
; %bb.26:
Lloh28:
	adrp	x8, _EFAULT@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_19
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_wait,4,2                       ; @wait
	.comm	_current,4,2                    ; @current
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_VERIFY_WRITE,4,2               ; @VERIFY_WRITE
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_TASK_INTERRUPTIBLE,4,2         ; @TASK_INTERRUPTIBLE
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.comm	_TASK_RUNNING,4,2               ; @TASK_RUNNING
	.no_dead_strip	_au1550_read
.subsections_via_symbols
