	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_camdd_pass_fetch               ## -- Begin function camdd_pass_fetch
	.p2align	4, 0x90
_camdd_pass_fetch:                      ## @camdd_pass_fetch
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movl	$0, -44(%rbp)
	callq	_pthread_mutex_unlock
	movq	32(%r13), %rax
	movl	(%rax), %edi
	movq	_CAMIOGET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	callq	_ioctl
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.2:
	leaq	20(%r13), %r14
	xorl	%r12d, %r12d
	leaq	-64(%rbp), %r15
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	incl	-44(%rbp)
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rdi
	movq	%rbx, %rsi
	leaq	-44(%rbp), %rdx
	callq	_camdd_complete_buf
	movq	%r13, %rdi
	callq	_pthread_mutex_unlock
	movq	32(%r13), %rax
	movl	(%rax), %edi
	movq	_CAMIOGET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdx
	callq	_ioctl
	incl	%r12d
	cmpl	$-1, %eax
	je	LBB0_16
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %rbx
	movups	-64(%rbp), %xmm0
	movups	%xmm0, 16(%rbx)
	movq	%r13, %rdi
	callq	_pthread_mutex_lock
	movq	_camdd_buf@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_links@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_STAILQ_REMOVE
	decl	16(%r13)
	movq	_CAM_STATUS_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-64(%rbp), %eax
	movq	_CAM_REQ_CMP@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	32(%r13), %rdi
	movq	_CAM_ESF_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_CAM_EPF_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rsi
	callq	_cam_error_print
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	24(%r13), %esi
	cmpl	$129, %esi
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$128, %esi
	jne	LBB0_17
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %rcx
	movq	%rcx, 8(%rbx)
	movq	-56(%rbp), %rax
	subq	%rcx, %rax
	movq	8(%r13), %rcx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	$0, 8(%rbx)
	movq	-64(%rbp), %rcx
	movq	8(%r13), %rax
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	addq	%rax, %rcx
	movq	%rcx, 8(%r13)
	movq	(%rbx), %rax
	movq	_CAMDD_STATUS_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	callq	_camdd_ccb_status
	movq	%rax, (%rbx)
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_CAMDD_STATUS_ERROR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_CAMDD_STATUS_EOF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_CAMDD_DEV_FLAG_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%r13)
	jmp	LBB0_15
LBB0_1:
	xorl	%r12d, %r12d
LBB0_16:
	movq	%r13, %rdi
	callq	_pthread_mutex_lock
	cmpl	$0, -44(%rbp)
	movl	$-1, %eax
	cmovlel	%r12d, %eax
	jmp	LBB0_18
LBB0_17:
	movl	$-1, %eax
LBB0_18:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CAMIOGET,4,2                   ## @CAMIOGET
	.comm	_camdd_buf,4,2                  ## @camdd_buf
	.comm	_links,4,2                      ## @links
	.comm	_CAM_STATUS_MASK,4,2            ## @CAM_STATUS_MASK
	.comm	_CAM_REQ_CMP,4,2                ## @CAM_REQ_CMP
	.comm	_CAM_ESF_ALL,4,2                ## @CAM_ESF_ALL
	.comm	_CAM_EPF_ALL,4,2                ## @CAM_EPF_ALL
	.comm	_stderr,4,2                     ## @stderr
	.comm	_CAMDD_STATUS_NONE,8,3          ## @CAMDD_STATUS_NONE
	.comm	_CAMDD_STATUS_ERROR,8,3         ## @CAMDD_STATUS_ERROR
	.comm	_CAMDD_STATUS_EOF,8,3           ## @CAMDD_STATUS_EOF
	.comm	_CAMDD_DEV_FLAG_EOF,4,2         ## @CAMDD_DEV_FLAG_EOF
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_camdd_pass_fetch               ; -- Begin function camdd_pass_fetch
	.p2align	2
_camdd_pass_fetch:                      ; @camdd_pass_fetch
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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, x0
	str	wzr, [sp, #12]
	bl	_pthread_mutex_unlock
	ldr	x8, [x19, #32]
	ldr	w0, [x8]
Lloh0:
	adrp	x8, _CAMIOGET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CAMIOGET@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #16
	bl	_ioctl
	cmn	w0, #1
	b.eq	LBB0_15
; %bb.1:
	mov	w23, #0
Lloh3:
	adrp	x24, _camdd_buf@GOTPAGE
Lloh4:
	ldr	x24, [x24, _camdd_buf@GOTPAGEOFF]
	add	x20, x19, #20
Lloh5:
	adrp	x25, _links@GOTPAGE
Lloh6:
	ldr	x25, [x25, _links@GOTPAGEOFF]
Lloh7:
	adrp	x26, _CAM_STATUS_MASK@GOTPAGE
Lloh8:
	ldr	x26, [x26, _CAM_STATUS_MASK@GOTPAGEOFF]
Lloh9:
	adrp	x27, _CAM_REQ_CMP@GOTPAGE
Lloh10:
	ldr	x27, [x27, _CAM_REQ_CMP@GOTPAGEOFF]
Lloh11:
	adrp	x28, _CAMDD_STATUS_NONE@GOTPAGE
Lloh12:
	ldr	x28, [x28, _CAMDD_STATUS_NONE@GOTPAGEOFF]
Lloh13:
	adrp	x22, _CAMDD_STATUS_ERROR@GOTPAGE
Lloh14:
	ldr	x22, [x22, _CAMDD_STATUS_ERROR@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [sp, #12]
	add	w8, w8, #1
	str	w8, [sp, #12]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x21
	bl	_camdd_complete_buf
	mov	x0, x19
	bl	_pthread_mutex_unlock
	ldr	x8, [x19, #32]
	ldr	w0, [x8]
Lloh15:
	adrp	x8, _CAMIOGET@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CAMIOGET@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	add	x2, sp, #16
	bl	_ioctl
	add	w23, w23, #1
	cmn	w0, #1
	b.eq	LBB0_16
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x21, [sp, #24]
	ldr	q0, [sp, #16]
	str	q0, [x21, #16]
	mov	x0, x19
	bl	_pthread_mutex_lock
	ldr	w2, [x24]
	ldr	w3, [x25]
	mov	x0, x20
	mov	x1, x21
	bl	_STAILQ_REMOVE
	ldr	w8, [x19, #16]
	sub	w8, w8, #1
	str	w8, [x19, #16]
	ldr	w8, [sp, #16]
	ldr	w9, [x26]
	and	w8, w9, w8
	ldr	w9, [x27]
	cmp	w8, w9
	b.eq	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x19, #32]
Lloh18:
	adrp	x8, _CAM_ESF_ALL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CAM_ESF_ALL@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
Lloh21:
	adrp	x8, _CAM_EPF_ALL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _CAM_EPF_ALL@GOTPAGEOFF]
Lloh23:
	ldr	w3, [x8]
Lloh24:
	adrp	x8, _stderr@GOTPAGE
Lloh25:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh26:
	ldr	w4, [x8]
	add	x1, sp, #16
	bl	_cam_error_print
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x19, #24]
	cmp	w1, #129
	b.eq	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w1, #128
	b.ne	LBB0_17
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [sp, #16]
	str	x8, [x21, #8]
	ldr	x9, [sp, #24]
	sub	x9, x9, x8
	ldr	x8, [x19, #8]
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	str	xzr, [x21, #8]
	ldr	x8, [sp, #16]
	ldr	x9, [x19, #8]
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x9, x8
	str	x8, [x19, #8]
	ldr	x0, [x21]
	ldr	x8, [x28]
	cmp	x0, x8
	b.ne	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x0, sp, #16
	bl	_camdd_ccb_status
	str	x0, [x21]
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x22]
	cmp	x0, x8
	b.eq	LBB0_2
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
Lloh27:
	adrp	x8, _CAMDD_STATUS_EOF@GOTPAGE
Lloh28:
	ldr	x8, [x8, _CAMDD_STATUS_EOF@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_3
; %bb.14:                               ;   in Loop: Header=BB0_4 Depth=1
Lloh30:
	adrp	x8, _CAMDD_DEV_FLAG_EOF@GOTPAGE
Lloh31:
	ldr	x8, [x8, _CAMDD_DEV_FLAG_EOF@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
	b	LBB0_3
LBB0_15:
	mov	w23, #0
LBB0_16:
	mov	x0, x19
	bl	_pthread_mutex_lock
	ldr	w8, [sp, #12]
	cmp	w8, #0
	csinv	w0, w23, wzr, le
	b	LBB0_18
LBB0_17:
	mov	w0, #-1
LBB0_18:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_CAMIOGET,4,2                   ; @CAMIOGET
	.comm	_camdd_buf,4,2                  ; @camdd_buf
	.comm	_links,4,2                      ; @links
	.comm	_CAM_STATUS_MASK,4,2            ; @CAM_STATUS_MASK
	.comm	_CAM_REQ_CMP,4,2                ; @CAM_REQ_CMP
	.comm	_CAM_ESF_ALL,4,2                ; @CAM_ESF_ALL
	.comm	_CAM_EPF_ALL,4,2                ; @CAM_EPF_ALL
	.comm	_stderr,4,2                     ; @stderr
	.comm	_CAMDD_STATUS_NONE,8,3          ; @CAMDD_STATUS_NONE
	.comm	_CAMDD_STATUS_ERROR,8,3         ; @CAMDD_STATUS_ERROR
	.comm	_CAMDD_STATUS_EOF,8,3           ; @CAMDD_STATUS_EOF
	.comm	_CAMDD_DEV_FLAG_EOF,4,2         ; @CAMDD_DEV_FLAG_EOF
.subsections_via_symbols
