	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_camdd_probe_file               ## -- Begin function camdd_probe_file
	.p2align	4, 0x90
_camdd_probe_file:                      ## @camdd_probe_file
	.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
	movl	%ecx, %r8d
	movl	%edx, %ecx
	movq	%rsi, %r14
	movl	%edi, %r15d
	movq	(%rsi), %r13
	movq	_CAMDD_DEV_FILE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_camdd_alloc_dev
	testq	%rax, %rax
	je	LBB0_63
## %bb.1:
	movq	%rax, %r12
	movl	%r15d, 48(%rax)
	movq	56(%rax), %rdi
	movq	8(%r14), %rsi
	movl	$8, %edx
	callq	_strlcpy
	movq	(%r12), %rdi
	movq	8(%r14), %rsi
	movl	$8, %edx
	callq	_strlcpy
	testq	%r13, %r13
	jne	LBB0_3
## %bb.2:
	movq	_CAMDD_FILE_DEFAULT_BLOCK@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
LBB0_3:
	movq	%r13, 8(%r12)
	movl	16(%r14), %esi
	cmpl	$2, %esi
	jb	LBB0_5
## %bb.4:
	movq	8(%r14), %rdx
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_warnx
LBB0_5:
	movq	_CAMDD_FILE_DEFAULT_DEPTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%r12)
	movq	_camdd_file_run@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r12)
	movq	$0, 32(%r12)
	movl	$1, 16(%r12)
	movq	_STDIN_FILENO@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	je	LBB0_57
## %bb.6:
	movq	_STDOUT_FILENO@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	je	LBB0_57
## %bb.7:
	movq	%r12, %rsi
	addq	$72, %rsi
	movl	%r15d, %edi
	callq	_fstat
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movq	(%r12), %rsi
	leaq	L_.str.1(%rip), %rdi
	callq	_warn
	jmp	LBB0_62
LBB0_9:
	movl	76(%r12), %edi
	callq	_S_ISREG
	testq	%rax, %rax
	je	LBB0_22
## %bb.10:
	movl	$129, 64(%r12)
LBB0_11:
	movl	64(%r12), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_57
## %bb.12:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_13:
	movq	(%r12), %rsi
	leaq	-48(%rbp), %rdx
	leaq	-56(%rbp), %rcx
	leaq	-72(%rbp), %r8
	leaq	-64(%rbp), %r9
	movl	%r15d, %edi
	callq	_camdd_probe_tape
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	movq	(%r12), %rdx
	leaq	L_.str.5(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_15:
	movq	8(%r12), %rsi
	movq	-48(%rbp), %rcx
	cmpq	%rcx, %rsi
	jle	LBB0_17
## %bb.16:
	movq	(%r12), %rdx
	leaq	L_.str.6(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_warnx
	movq	-48(%rbp), %rsi
	movq	%rsi, 8(%r12)
LBB0_17:
	movq	-72(%rbp), %rcx
	cmpq	%rcx, %rsi
	jge	LBB0_19
## %bb.18:
	movq	(%r12), %rdx
	leaq	L_.str.7(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_warnx
	movq	-72(%rbp), %rsi
	movq	%rsi, 8(%r12)
LBB0_19:
	movq	-64(%rbp), %rcx
	testq	%rcx, %rcx
	je	LBB0_54
## %bb.20:
	movl	$1, %ebx
                                        ## kill: def $cl killed $cl killed $rcx
	shll	%cl, %ebx
	movslq	%ebx, %rcx
	movq	%rsi, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_51
## %bb.21:
	movq	%rsi, %rax
	cqto
	idivq	%rcx
	jmp	LBB0_52
LBB0_22:
	movl	76(%r12), %edi
	callq	_S_ISCHR
	testq	%rax, %rax
	je	LBB0_38
## %bb.23:
	movq	_FIODTYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movl	%r15d, %edi
	xorl	%eax, %eax
	callq	_ioctl
	cmpl	$-1, %eax
	je	LBB0_41
## %bb.24:
	movl	-48(%rbp), %eax
	movq	_D_TAPE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_46
## %bb.25:
	movl	$128, 64(%r12)
	jmp	LBB0_11
LBB0_26:
	movl	72(%r12), %eax
	xorl	%ecx, %ecx
	subl	$1, %eax
	cmovbl	%ecx, %eax
	movl	%eax, 24(%r12)
LBB0_27:
	movq	_CAMDD_FF_CAN_SEEK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 68(%r12)
	jmp	LBB0_57
LBB0_28:
	movq	_CAMDD_FF_CAN_SEEK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 68(%r12)
	movq	_DIOCGSECTORSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdx
	movl	%r15d, %edi
	xorl	%eax, %eax
	callq	_ioctl
	cmpl	$-1, %eax
	jne	LBB0_30
## %bb.29:
	movq	(%r12), %rdx
	leaq	L_.str.10(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_30:
	cmpl	$0, -56(%rbp)
	jne	LBB0_32
## %bb.31:
	movq	(%r12), %rcx
	leaq	L_.str.11(%rip), %rsi
	movl	$1, %edi
	xorl	%edx, %edx
	xorl	%eax, %eax
	callq	_errx
LBB0_32:
	movq	_DIOCGMEDIASIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movl	%r15d, %edi
	xorl	%eax, %eax
	callq	_ioctl
	cmpl	$-1, %eax
	jne	LBB0_34
## %bb.33:
	movq	(%r12), %rdx
	leaq	L_.str.12(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_34:
	cmpl	$0, -48(%rbp)
	jne	LBB0_36
## %bb.35:
	movq	(%r12), %rcx
	leaq	L_.str.13(%rip), %rsi
	movl	$1, %edi
	xorl	%edx, %edx
	xorl	%eax, %eax
	callq	_errx
LBB0_36:
	movq	8(%r12), %rcx
	movl	-56(%rbp), %r8d
	movq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_42
## %bb.37:
	movq	%rcx, %rax
	cqto
	idivq	%r8
	jmp	LBB0_43
LBB0_38:
	movl	76(%r12), %edi
	callq	_S_ISDIR
	testq	%rax, %rax
	je	LBB0_48
## %bb.39:
	movq	(%r12), %rdx
	leaq	L_.str.3(%rip), %rsi
LBB0_40:
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
	jmp	LBB0_11
LBB0_41:
	movq	(%r12), %rdx
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	callq	_err
	jmp	LBB0_11
LBB0_42:
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%r8d
                                        ## kill: def $edx killed $edx def $rdx
LBB0_43:
	testq	%rdx, %rdx
	je	LBB0_45
## %bb.44:
	movq	(%r12), %rdx
	leaq	L_.str.14(%rip), %rsi
	movl	$1, %edi
                                        ## kill: def $r8d killed $r8d killed $r8
	xorl	%eax, %eax
	callq	_errx
	movl	-56(%rbp), %r8d
LBB0_45:
	movl	%r8d, 16(%r12)
	movl	-48(%rbp), %eax
	xorl	%edx, %edx
	divl	%r8d
	decl	%eax
	movl	%eax, 24(%r12)
	jmp	LBB0_57
LBB0_46:
	movq	_D_DISK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_64
## %bb.47:
	movl	$131, 64(%r12)
	jmp	LBB0_11
LBB0_48:
	movl	76(%r12), %edi
	callq	_S_ISFIFO
	testq	%rax, %rax
	je	LBB0_66
## %bb.49:
	movq	_CAMDD_FILE_PIPE@GOTPCREL(%rip), %rax
LBB0_50:
	movl	(%rax), %eax
	movl	%eax, 64(%r12)
	jmp	LBB0_11
LBB0_51:
	movl	%esi, %eax
	xorl	%edx, %edx
	divl	%ebx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_52:
	testq	%rdx, %rdx
	je	LBB0_54
## %bb.53:
	movq	(%r12), %rdx
	movl	%ebx, %eax
	negl	%eax
	movslq	%eax, %r8
	andq	%rsi, %r8
	leaq	L_.str.8(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_warnx
	movb	-64(%rbp), %cl
	movl	$-1, %eax
	shll	%cl, %eax
	movslq	%eax, %rsi
	andq	8(%r12), %rsi
	movq	%rsi, 8(%r12)
LBB0_54:
	testq	%rsi, %rsi
	jne	LBB0_56
## %bb.55:
	movq	(%r12), %rdx
	leaq	L_.str.9(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
	movq	8(%r12), %rsi
LBB0_56:
	movl	%esi, 16(%r12)
LBB0_57:
	movl	20(%r14), %esi
	testl	%esi, %esi
	je	LBB0_60
## %bb.58:
	movq	_CAMDD_FF_CAN_SEEK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 68(%r12)
	je	LBB0_61
LBB0_60:
	movq	%r12, %rbx
	jmp	LBB0_63
LBB0_61:
	movq	8(%r14), %rcx
	leaq	L_.str.15(%rip), %rdi
	movq	%rcx, %rdx
	xorl	%eax, %eax
	callq	_warnx
LBB0_62:
	movq	%r12, %rdi
	callq	_camdd_free_dev
	xorl	%ebx, %ebx
LBB0_63:
	movq	%rbx, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_64:
	movq	_D_MEM@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_67
## %bb.65:
	movl	$130, 64(%r12)
	jmp	LBB0_11
LBB0_66:
	movq	(%r12), %rdx
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_40
LBB0_67:
	movq	_D_TTY@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_11
## %bb.68:
	movq	_CAMDD_FILE_TTY@GOTPCREL(%rip), %rax
	jmp	LBB0_50
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_26, LBB0_26-LJTI0_0
.set L0_0_set_27, LBB0_27-LJTI0_0
.set L0_0_set_28, LBB0_28-LJTI0_0
LJTI0_0:
	.long	L0_0_set_13
	.long	L0_0_set_26
	.long	L0_0_set_27
	.long	L0_0_set_28
	.end_data_region
                                        ## -- End function
	.comm	_CAMDD_DEV_FILE,4,2             ## @CAMDD_DEV_FILE
	.comm	_CAMDD_FILE_DEFAULT_BLOCK,8,3   ## @CAMDD_FILE_DEFAULT_BLOCK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Queue depth %ju for %s ignored, only 1 outstanding command supported"

	.comm	_CAMDD_FILE_DEFAULT_DEPTH,4,2   ## @CAMDD_FILE_DEFAULT_DEPTH
	.comm	_camdd_file_run,4,2             ## @camdd_file_run
	.comm	_STDIN_FILENO,4,2               ## @STDIN_FILENO
	.comm	_STDOUT_FILENO,4,2              ## @STDOUT_FILENO
L_.str.1:                               ## @.str.1
	.asciz	"Cannot stat %s"

	.comm	_FIODTYPE,4,2                   ## @FIODTYPE
L_.str.2:                               ## @.str.2
	.asciz	"FIODTYPE ioctl failed on %s"

	.comm	_D_TAPE,4,2                     ## @D_TAPE
	.comm	_D_DISK,4,2                     ## @D_DISK
	.comm	_D_MEM,4,2                      ## @D_MEM
	.comm	_D_TTY,4,2                      ## @D_TTY
	.comm	_CAMDD_FILE_TTY,4,2             ## @CAMDD_FILE_TTY
L_.str.3:                               ## @.str.3
	.asciz	"cannot operate on directory %s"

	.comm	_CAMDD_FILE_PIPE,4,2            ## @CAMDD_FILE_PIPE
L_.str.4:                               ## @.str.4
	.asciz	"Cannot determine file type for %s"

	.comm	_CAMDD_FF_CAN_SEEK,4,2          ## @CAMDD_FF_CAN_SEEK
L_.str.5:                               ## @.str.5
	.asciz	"Unable to probe tape %s"

L_.str.6:                               ## @.str.6
	.asciz	"Blocksize %u too big for %s, limiting to %ju"

L_.str.7:                               ## @.str.7
	.asciz	"Blocksize %u too small for %s, increasing to %ju"

L_.str.8:                               ## @.str.8
	.asciz	"Blocksize %u for %s not a multiple of %d, adjusting to %d"

L_.str.9:                               ## @.str.9
	.asciz	"Unable to derive valid blocksize for %s"

	.comm	_DIOCGSECTORSIZE,4,2            ## @DIOCGSECTORSIZE
L_.str.10:                              ## @.str.10
	.asciz	"DIOCGSECTORSIZE ioctl failed on %s"

L_.str.11:                              ## @.str.11
	.asciz	"DIOCGSECTORSIZE ioctl returned invalid sector size %u for %s"

	.comm	_DIOCGMEDIASIZE,4,2             ## @DIOCGMEDIASIZE
L_.str.12:                              ## @.str.12
	.asciz	"DIOCGMEDIASIZE ioctl failed on %s"

L_.str.13:                              ## @.str.13
	.asciz	"DIOCGMEDIASIZE ioctl returned invalid media size %ju for %s"

L_.str.14:                              ## @.str.14
	.asciz	"%s blocksize %u not a multiple of sector size %u"

L_.str.15:                              ## @.str.15
	.asciz	"Offset %ju specified for %s, but we cannot seek on %s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_camdd_probe_file               ; -- Begin function camdd_probe_file
	.p2align	2
_camdd_probe_file:                      ; @camdd_probe_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x4, x3
	mov	x3, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x22, [x1]
Lloh0:
	adrp	x8, _CAMDD_DEV_FILE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CAMDD_DEV_FILE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, #0
	mov	w2, #0
	bl	_camdd_alloc_dev
	mov	x19, x0
	cbz	x0, LBB0_35
; %bb.1:
	str	w21, [x19, #48]
	ldr	x0, [x19, #56]
	ldr	x1, [x20, #8]
	mov	w2, #8
	bl	_strlcpy
	ldr	x0, [x19]
	ldr	x1, [x20, #8]
	mov	w2, #8
	bl	_strlcpy
Lloh3:
	adrp	x8, _CAMDD_FILE_DEFAULT_BLOCK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CAMDD_FILE_DEFAULT_BLOCK@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x22, #0
	csel	x8, x8, x22, eq
	str	x8, [x19, #8]
	ldr	w1, [x20, #16]
	cmp	w1, #2
	b.lo	LBB0_3
; %bb.2:
	ldr	x2, [x20, #8]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warnx
LBB0_3:
Lloh8:
	adrp	x8, _CAMDD_FILE_DEFAULT_DEPTH@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CAMDD_FILE_DEFAULT_DEPTH@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _camdd_file_run@GOTPAGE
Lloh12:
	ldr	x9, [x9, _camdd_file_run@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #40]
	str	xzr, [x19, #32]
	mov	w8, #1
	str	w8, [x19, #16]
Lloh14:
	adrp	x8, _STDIN_FILENO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _STDIN_FILENO@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w8, w21
	b.eq	LBB0_31
; %bb.4:
Lloh17:
	adrp	x8, _STDOUT_FILENO@GOTPAGE
Lloh18:
	ldr	x8, [x8, _STDOUT_FILENO@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	w8, w21
	b.eq	LBB0_31
; %bb.5:
	add	x1, x19, #72
	mov	x0, x21
	bl	_fstat
	cbz	w0, LBB0_7
; %bb.6:
	ldr	x1, [x19]
Lloh20:
	adrp	x0, l_.str.1@PAGE
Lloh21:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warn
	b	LBB0_34
LBB0_7:
	ldr	w0, [x19, #76]
	bl	_S_ISREG
	cbz	x0, LBB0_24
; %bb.8:
	mov	w8, #129
LBB0_9:
	str	w8, [x19, #64]
LBB0_10:
	ldr	w8, [x19, #64]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_31
; %bb.11:
Lloh22:
	adrp	x9, lJTI0_0@PAGE
Lloh23:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_12
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_12:
	ldr	x1, [x19]
	add	x2, sp, #40
	add	x3, sp, #32
	add	x4, sp, #24
	add	x5, sp, #16
	mov	x0, x21
	bl	_camdd_probe_tape
	cbz	w0, LBB0_14
; %bb.13:
	ldr	x2, [x19]
Lloh24:
	adrp	x1, l_.str.5@PAGE
Lloh25:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_14:
	ldr	x1, [x19, #8]
	ldr	x8, [sp, #40]
	cmp	x1, x8
	b.le	LBB0_16
; %bb.15:
	ldr	x2, [x19]
	str	x8, [sp]
Lloh26:
	adrp	x0, l_.str.6@PAGE
Lloh27:
	add	x0, x0, l_.str.6@PAGEOFF
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_warnx
	ldr	x1, [sp, #40]
	str	x1, [x19, #8]
LBB0_16:
	ldr	x8, [sp, #24]
	cmp	x1, x8
	b.ge	LBB0_18
; %bb.17:
	ldr	x2, [x19]
	str	x8, [sp]
Lloh28:
	adrp	x0, l_.str.7@PAGE
Lloh29:
	add	x0, x0, l_.str.7@PAGEOFF
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_warnx
	ldr	x1, [sp, #24]
	str	x1, [x19, #8]
LBB0_18:
	ldr	x8, [sp, #16]
	cbz	x8, LBB0_21
; %bb.19:
	mov	w9, #1
	lsl	w8, w9, w8
	sxtw	x9, w8
	sdiv	x10, x1, x9
	msub	x9, x10, x9, x1
	cbz	x9, LBB0_21
; %bb.20:
	ldr	x2, [x19]
	neg	w9, w8
	sxtw	x9, w9
	and	x9, x1, x9
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	stp	x8, x9, [sp]
Lloh30:
	adrp	x0, l_.str.8@PAGE
Lloh31:
	add	x0, x0, l_.str.8@PAGEOFF
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_warnx
	ldr	w8, [sp, #16]
	mov	w9, #-1
	lsl	w8, w9, w8
	sxtw	x8, w8
	ldr	x9, [x19, #8]
	and	x1, x9, x8
	str	x1, [x19, #8]
LBB0_21:
	cbnz	x1, LBB0_23
; %bb.22:
	ldr	x2, [x19]
Lloh32:
	adrp	x1, l_.str.9@PAGE
Lloh33:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	w0, #1
	bl	_errx
	ldr	x1, [x19, #8]
LBB0_23:
	str	w1, [x19, #16]
	ldr	w1, [x20, #20]
	cbnz	w1, LBB0_32
	b	LBB0_35
LBB0_24:
	ldr	w0, [x19, #76]
	bl	_S_ISCHR
	cbz	x0, LBB0_47
; %bb.25:
Lloh34:
	adrp	x8, _FIODTYPE@GOTPAGE
Lloh35:
	ldr	x8, [x8, _FIODTYPE@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	add	x8, sp, #40
	str	x8, [sp]
	mov	x0, x21
	bl	_ioctl
	cmn	w0, #1
	b.eq	LBB0_50
; %bb.26:
	ldr	w8, [sp, #40]
Lloh37:
	adrp	x9, _D_TAPE@GOTPAGE
Lloh38:
	ldr	x9, [x9, _D_TAPE@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_51
; %bb.27:
	mov	w8, #128
	b	LBB0_9
LBB0_28:
	ldp	w9, w8, [x19, #68]
	sub	w10, w8, #1
	cmp	w8, #0
	csel	w8, wzr, w10, eq
	str	w8, [x19, #24]
Lloh40:
	adrp	x8, _CAMDD_FF_CAN_SEEK@GOTPAGE
Lloh41:
	ldr	x8, [x8, _CAMDD_FF_CAN_SEEK@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	b	LBB0_30
LBB0_29:
Lloh43:
	adrp	x8, _CAMDD_FF_CAN_SEEK@GOTPAGE
Lloh44:
	ldr	x8, [x8, _CAMDD_FF_CAN_SEEK@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	ldr	w9, [x19, #68]
LBB0_30:
	orr	w8, w9, w8
	str	w8, [x19, #68]
LBB0_31:
	ldr	w1, [x20, #20]
	cbz	w1, LBB0_35
LBB0_32:
	ldr	w8, [x19, #68]
Lloh46:
	adrp	x9, _CAMDD_FF_CAN_SEEK@GOTPAGE
Lloh47:
	ldr	x9, [x9, _CAMDD_FF_CAN_SEEK@GOTPAGEOFF]
Lloh48:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_35
; %bb.33:
	ldr	x2, [x20, #8]
	str	x2, [sp]
Lloh49:
	adrp	x0, l_.str.15@PAGE
Lloh50:
	add	x0, x0, l_.str.15@PAGEOFF
	bl	_warnx
LBB0_34:
	mov	x0, x19
	bl	_camdd_free_dev
	mov	x19, #0
LBB0_35:
	mov	x0, x19
	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
	add	sp, sp, #96
	ret
LBB0_36:
Lloh51:
	adrp	x8, _CAMDD_FF_CAN_SEEK@GOTPAGE
Lloh52:
	ldr	x8, [x8, _CAMDD_FF_CAN_SEEK@GOTPAGEOFF]
Lloh53:
	ldr	w8, [x8]
	ldr	w9, [x19, #68]
	orr	w8, w9, w8
	str	w8, [x19, #68]
Lloh54:
	adrp	x8, _DIOCGSECTORSIZE@GOTPAGE
Lloh55:
	ldr	x8, [x8, _DIOCGSECTORSIZE@GOTPAGEOFF]
Lloh56:
	ldr	w1, [x8]
	add	x8, sp, #32
	str	x8, [sp]
	mov	x0, x21
	bl	_ioctl
	cmn	w0, #1
	b.ne	LBB0_38
; %bb.37:
	ldr	x2, [x19]
Lloh57:
	adrp	x1, l_.str.10@PAGE
Lloh58:
	add	x1, x1, l_.str.10@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_38:
	ldr	w8, [sp, #32]
	cbnz	w8, LBB0_40
; %bb.39:
	ldr	x8, [x19]
	str	x8, [sp]
Lloh59:
	adrp	x1, l_.str.11@PAGE
Lloh60:
	add	x1, x1, l_.str.11@PAGEOFF
	mov	w0, #1
	mov	x2, #0
	bl	_errx
LBB0_40:
Lloh61:
	adrp	x8, _DIOCGMEDIASIZE@GOTPAGE
Lloh62:
	ldr	x8, [x8, _DIOCGMEDIASIZE@GOTPAGEOFF]
Lloh63:
	ldr	w1, [x8]
	add	x8, sp, #40
	str	x8, [sp]
	mov	x0, x21
	bl	_ioctl
	cmn	w0, #1
	b.ne	LBB0_42
; %bb.41:
	ldr	x2, [x19]
Lloh64:
	adrp	x1, l_.str.12@PAGE
Lloh65:
	add	x1, x1, l_.str.12@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_42:
	ldr	w8, [sp, #40]
	cbnz	w8, LBB0_44
; %bb.43:
	ldr	x8, [x19]
	str	x8, [sp]
Lloh66:
	adrp	x1, l_.str.13@PAGE
Lloh67:
	add	x1, x1, l_.str.13@PAGEOFF
	mov	w0, #1
	mov	x2, #0
	bl	_errx
LBB0_44:
	ldr	x9, [x19, #8]
	ldr	w8, [sp, #32]
	sdiv	x10, x9, x8
	msub	x10, x10, x8, x9
	cbz	x10, LBB0_46
; %bb.45:
	ldr	x2, [x19]
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	stp	x9, x8, [sp]
Lloh68:
	adrp	x1, l_.str.14@PAGE
Lloh69:
	add	x1, x1, l_.str.14@PAGEOFF
	mov	w0, #1
	bl	_errx
	ldr	w8, [sp, #32]
LBB0_46:
	str	w8, [x19, #16]
	ldr	w9, [sp, #40]
	udiv	w8, w9, w8
	sub	w8, w8, #1
	str	w8, [x19, #24]
	ldr	w1, [x20, #20]
	cbnz	w1, LBB0_32
	b	LBB0_35
LBB0_47:
	ldr	w0, [x19, #76]
	bl	_S_ISDIR
	cbz	x0, LBB0_53
; %bb.48:
	ldr	x2, [x19]
Lloh70:
	adrp	x1, l_.str.3@PAGE
Lloh71:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_49:
	mov	w0, #1
	bl	_errx
	b	LBB0_10
LBB0_50:
	ldr	x2, [x19]
Lloh72:
	adrp	x1, l_.str.2@PAGE
Lloh73:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_err
	b	LBB0_10
LBB0_51:
Lloh74:
	adrp	x9, _D_DISK@GOTPAGE
Lloh75:
	ldr	x9, [x9, _D_DISK@GOTPAGEOFF]
Lloh76:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_56
; %bb.52:
	mov	w8, #131
	b	LBB0_9
LBB0_53:
	ldr	w0, [x19, #76]
	bl	_S_ISFIFO
	cbz	x0, LBB0_58
; %bb.54:
Lloh77:
	adrp	x8, _CAMDD_FILE_PIPE@GOTPAGE
Lloh78:
	ldr	x8, [x8, _CAMDD_FILE_PIPE@GOTPAGEOFF]
LBB0_55:
	ldr	w8, [x8]
	b	LBB0_9
LBB0_56:
Lloh79:
	adrp	x9, _D_MEM@GOTPAGE
Lloh80:
	ldr	x9, [x9, _D_MEM@GOTPAGEOFF]
Lloh81:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_59
; %bb.57:
	mov	w8, #130
	b	LBB0_9
LBB0_58:
	ldr	x2, [x19]
Lloh82:
	adrp	x1, l_.str.4@PAGE
Lloh83:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_49
LBB0_59:
Lloh84:
	adrp	x9, _D_TTY@GOTPAGE
Lloh85:
	ldr	x9, [x9, _D_TTY@GOTPAGEOFF]
Lloh86:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.60:
Lloh87:
	adrp	x8, _CAMDD_FILE_TTY@GOTPAGE
Lloh88:
	ldr	x8, [x8, _CAMDD_FILE_TTY@GOTPAGEOFF]
	b	LBB0_55
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpAdd	Lloh57, Lloh58
	.loh AdrpAdd	Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpAdd	Lloh64, Lloh65
	.loh AdrpAdd	Lloh66, Lloh67
	.loh AdrpAdd	Lloh68, Lloh69
	.loh AdrpAdd	Lloh70, Lloh71
	.loh AdrpAdd	Lloh72, Lloh73
	.loh AdrpLdrGotLdr	Lloh74, Lloh75, Lloh76
	.loh AdrpLdrGot	Lloh77, Lloh78
	.loh AdrpLdrGotLdr	Lloh79, Lloh80, Lloh81
	.loh AdrpAdd	Lloh82, Lloh83
	.loh AdrpLdrGotLdr	Lloh84, Lloh85, Lloh86
	.loh AdrpLdrGot	Lloh87, Lloh88
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_12-LBB0_12)>>2
	.byte	(LBB0_28-LBB0_12)>>2
	.byte	(LBB0_29-LBB0_12)>>2
	.byte	(LBB0_36-LBB0_12)>>2
                                        ; -- End function
	.comm	_CAMDD_DEV_FILE,4,2             ; @CAMDD_DEV_FILE
	.comm	_CAMDD_FILE_DEFAULT_BLOCK,8,3   ; @CAMDD_FILE_DEFAULT_BLOCK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Queue depth %ju for %s ignored, only 1 outstanding command supported"

	.comm	_CAMDD_FILE_DEFAULT_DEPTH,4,2   ; @CAMDD_FILE_DEFAULT_DEPTH
	.comm	_camdd_file_run,4,2             ; @camdd_file_run
	.comm	_STDIN_FILENO,4,2               ; @STDIN_FILENO
	.comm	_STDOUT_FILENO,4,2              ; @STDOUT_FILENO
l_.str.1:                               ; @.str.1
	.asciz	"Cannot stat %s"

	.comm	_FIODTYPE,4,2                   ; @FIODTYPE
l_.str.2:                               ; @.str.2
	.asciz	"FIODTYPE ioctl failed on %s"

	.comm	_D_TAPE,4,2                     ; @D_TAPE
	.comm	_D_DISK,4,2                     ; @D_DISK
	.comm	_D_MEM,4,2                      ; @D_MEM
	.comm	_D_TTY,4,2                      ; @D_TTY
	.comm	_CAMDD_FILE_TTY,4,2             ; @CAMDD_FILE_TTY
l_.str.3:                               ; @.str.3
	.asciz	"cannot operate on directory %s"

	.comm	_CAMDD_FILE_PIPE,4,2            ; @CAMDD_FILE_PIPE
l_.str.4:                               ; @.str.4
	.asciz	"Cannot determine file type for %s"

	.comm	_CAMDD_FF_CAN_SEEK,4,2          ; @CAMDD_FF_CAN_SEEK
l_.str.5:                               ; @.str.5
	.asciz	"Unable to probe tape %s"

l_.str.6:                               ; @.str.6
	.asciz	"Blocksize %u too big for %s, limiting to %ju"

l_.str.7:                               ; @.str.7
	.asciz	"Blocksize %u too small for %s, increasing to %ju"

l_.str.8:                               ; @.str.8
	.asciz	"Blocksize %u for %s not a multiple of %d, adjusting to %d"

l_.str.9:                               ; @.str.9
	.asciz	"Unable to derive valid blocksize for %s"

	.comm	_DIOCGSECTORSIZE,4,2            ; @DIOCGSECTORSIZE
l_.str.10:                              ; @.str.10
	.asciz	"DIOCGSECTORSIZE ioctl failed on %s"

l_.str.11:                              ; @.str.11
	.asciz	"DIOCGSECTORSIZE ioctl returned invalid sector size %u for %s"

	.comm	_DIOCGMEDIASIZE,4,2             ; @DIOCGMEDIASIZE
l_.str.12:                              ; @.str.12
	.asciz	"DIOCGMEDIASIZE ioctl failed on %s"

l_.str.13:                              ; @.str.13
	.asciz	"DIOCGMEDIASIZE ioctl returned invalid media size %ju for %s"

l_.str.14:                              ; @.str.14
	.asciz	"%s blocksize %u not a multiple of sector size %u"

l_.str.15:                              ; @.str.15
	.asciz	"Offset %ju specified for %s, but we cannot seek on %s"

.subsections_via_symbols
