	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function scsiserial
_scsiserial:                            ## @scsiserial
	.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
	movl	%ecx, %r14d
	movl	%edx, %r12d
	movl	%esi, %r13d
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_SVPD_SERIAL_NUM_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	incl	%eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_cam_getccb
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	%rax, %rbx
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_CCB_CLEAR_ALL_EXCEPT_HDR
	movl	$16, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_11
## %bb.2:
	movq	%rax, %r15
	movq	_SVPD_UNIT_SERIAL_NUMBER@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	movq	_SSD_FULL_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r11d
	testl	%r14d, %r14d
	movl	$5000, %eax                     ## imm = 0x1388
	cmovnel	%r14d, %eax
	movq	%rbx, %rdi
	movl	%r12d, %esi
	xorl	%edx, %edx
	movl	%r13d, %ecx
	movq	%r15, %r8
	movl	$16, %r9d
	pushq	%rax
	pushq	%r11
	pushq	%r10
	pushq	$1
	callq	_scsi_inquiry
	addq	$32, %rsp
	movq	_CAM_DEV_QFRZDIS@GOTPCREL(%rip), %rcx
	movl	4(%rbx), %eax
	orl	(%rcx), %eax
	movl	%eax, 4(%rbx)
	movq	_arglist@GOTPCREL(%rip), %r14
	movq	_CAM_ARG_ERR_RECOVER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r14)
	je	LBB0_4
## %bb.3:
	movq	_CAM_PASS_ERR_RECOVER@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 4(%rbx)
LBB0_4:
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_cam_send_ccb
	testq	%rax, %rax
	js	LBB0_13
## %bb.5:
	movq	_CAM_STATUS_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%rbx), %eax
	movq	_CAM_REQ_CMP@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_14
## %bb.6:
	movq	%rbx, %rdi
	callq	_cam_freeccb
	movl	8(%r15), %edi
	movq	(%r15), %rdx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_bcopy
	movq	(%r15), %rax
	movb	$0, (%rbx,%rax)
	movl	(%r14), %eax
	movq	_CAM_ARG_GET_STDINQ@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_8
## %bb.7:
	movq	_CAM_ARG_GET_XFERRATE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_9
LBB0_8:
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r12), %rdx
	movl	8(%r12), %ecx
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_9:
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%ebx, %ebx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_fprintf
	movq	%r15, %rdi
	callq	_free
	jmp	LBB0_18
LBB0_10:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_12
LBB0_11:
	movq	%rbx, %rdi
	callq	_cam_freeccb
	leaq	L_.str.1(%rip), %rdi
LBB0_12:
	callq	_warnx
	jmp	LBB0_17
LBB0_13:
	leaq	L_.str.2(%rip), %rdi
	callq	_warn
	jmp	LBB0_16
LBB0_14:
	movq	_CAM_ARG_VERBOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_16
## %bb.15:
	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	%r12, %rdi
	movq	%rbx, %rsi
	callq	_cam_error_print
LBB0_16:
	movq	%rbx, %rdi
	callq	_cam_freeccb
	movq	%r15, %rdi
	callq	_free
LBB0_17:
	movl	$1, %ebx
LBB0_18:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_20
## %bb.19:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SVPD_SERIAL_NUM_SIZE,4,2       ## @SVPD_SERIAL_NUM_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"couldn't allocate CCB"

L_.str.1:                               ## @.str.1
	.asciz	"can't malloc memory for serial number"

	.comm	_SVPD_UNIT_SERIAL_NUMBER,4,2    ## @SVPD_UNIT_SERIAL_NUMBER
	.comm	_SSD_FULL_SIZE,4,2              ## @SSD_FULL_SIZE
	.comm	_CAM_DEV_QFRZDIS,4,2            ## @CAM_DEV_QFRZDIS
	.comm	_arglist,4,2                    ## @arglist
	.comm	_CAM_ARG_ERR_RECOVER,4,2        ## @CAM_ARG_ERR_RECOVER
	.comm	_CAM_PASS_ERR_RECOVER,4,2       ## @CAM_PASS_ERR_RECOVER
L_.str.2:                               ## @.str.2
	.asciz	"error sending INQUIRY command"

	.comm	_CAM_STATUS_MASK,4,2            ## @CAM_STATUS_MASK
	.comm	_CAM_REQ_CMP,4,2                ## @CAM_REQ_CMP
	.comm	_CAM_ARG_VERBOSE,4,2            ## @CAM_ARG_VERBOSE
	.comm	_CAM_ESF_ALL,4,2                ## @CAM_ESF_ALL
	.comm	_CAM_EPF_ALL,4,2                ## @CAM_EPF_ALL
	.comm	_stderr,4,2                     ## @stderr
	.comm	_CAM_ARG_GET_STDINQ,4,2         ## @CAM_ARG_GET_STDINQ
	.comm	_CAM_ARG_GET_XFERRATE,4,2       ## @CAM_ARG_GET_XFERRATE
	.comm	_stdout,4,2                     ## @stdout
L_.str.3:                               ## @.str.3
	.asciz	"%s%d: Serial Number "

L_.str.4:                               ## @.str.4
	.asciz	"%.60s\n"

	.no_dead_strip	_scsiserial
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function scsiserial
_scsiserial:                            ; @scsiserial
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	sub	sp, sp, #16
	mov	x25, x3
	mov	x24, x2
	mov	x23, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, _SVPD_SERIAL_NUM_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SVPD_SERIAL_NUM_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	add	w8, w8, #1
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	bl	_cam_getccb
	cbz	x0, LBB0_10
; %bb.1:
	mov	x22, x0
	bl	_CCB_CLEAR_ALL_EXCEPT_HDR
	mov	w0, #16
	bl	_malloc
	cbz	x0, LBB0_11
; %bb.2:
	mov	x19, x0
Lloh8:
	adrp	x8, _SVPD_UNIT_SERIAL_NUMBER@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SVPD_UNIT_SERIAL_NUMBER@GOTPAGEOFF]
Lloh10:
	ldr	w7, [x8]
Lloh11:
	adrp	x8, _SSD_FULL_SIZE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SSD_FULL_SIZE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	mov	w9, #5000
	cmp	w25, #0
	csel	w9, w9, w25, eq
	stp	w8, w9, [sp, #-16]!
	mov	x0, x22
	mov	x1, x24
	mov	x2, #0
	mov	x3, x23
	mov	x4, x19
	mov	w5, #16
	mov	w6, #1
	bl	_scsi_inquiry
	add	sp, sp, #16
Lloh14:
	adrp	x8, _CAM_DEV_QFRZDIS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CAM_DEV_QFRZDIS@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	ldr	w9, [x22, #4]
	orr	w8, w9, w8
Lloh17:
	adrp	x23, _arglist@GOTPAGE
Lloh18:
	ldr	x23, [x23, _arglist@GOTPAGEOFF]
	str	w8, [x22, #4]
	ldr	w9, [x23]
Lloh19:
	adrp	x10, _CAM_ARG_ERR_RECOVER@GOTPAGE
Lloh20:
	ldr	x10, [x10, _CAM_ARG_ERR_RECOVER@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_4
; %bb.3:
Lloh22:
	adrp	x9, _CAM_PASS_ERR_RECOVER@GOTPAGE
Lloh23:
	ldr	x9, [x9, _CAM_PASS_ERR_RECOVER@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x22, #4]
LBB0_4:
	mov	x0, x20
	mov	x1, x22
	bl	_cam_send_ccb
	tbnz	x0, #63, LBB0_13
; %bb.5:
	ldr	w8, [x22]
Lloh25:
	adrp	x9, _CAM_STATUS_MASK@GOTPAGE
Lloh26:
	ldr	x9, [x9, _CAM_STATUS_MASK@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh28:
	adrp	x9, _CAM_REQ_CMP@GOTPAGE
Lloh29:
	ldr	x9, [x9, _CAM_REQ_CMP@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_14
; %bb.6:
	mov	x0, x22
	bl	_cam_freeccb
	ldr	w0, [x19, #8]
	ldr	x2, [x19]
	mov	x1, x21
	bl	_bcopy
	ldr	x8, [x19]
	strb	wzr, [x21, x8]
	ldr	w8, [x23]
Lloh31:
	adrp	x9, _CAM_ARG_GET_STDINQ@GOTPAGE
Lloh32:
	ldr	x9, [x9, _CAM_ARG_GET_STDINQ@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
Lloh34:
	adrp	x22, _stdout@GOTPAGE
Lloh35:
	ldr	x22, [x22, _stdout@GOTPAGEOFF]
	tst	w9, w8
	b.ne	LBB0_8
; %bb.7:
Lloh36:
	adrp	x9, _CAM_ARG_GET_XFERRATE@GOTPAGE
Lloh37:
	ldr	x9, [x9, _CAM_ARG_GET_XFERRATE@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
LBB0_8:
	ldr	w0, [x22]
	ldr	x2, [x20]
	ldr	w8, [x20, #8]
	str	x8, [sp, #-16]!
Lloh39:
	adrp	x1, l_.str.3@PAGE
Lloh40:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_fprintf
	add	sp, sp, #16
LBB0_9:
	ldr	w0, [x22]
Lloh41:
	adrp	x1, l_.str.4@PAGE
Lloh42:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x2, x21
	bl	_fprintf
	mov	x0, x19
	bl	_free
	mov	w0, #0
	b	LBB0_18
LBB0_10:
Lloh43:
	adrp	x0, l_.str@PAGE
Lloh44:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_12
LBB0_11:
	mov	x0, x22
	bl	_cam_freeccb
Lloh45:
	adrp	x0, l_.str.1@PAGE
Lloh46:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_12:
	bl	_warnx
	b	LBB0_17
LBB0_13:
Lloh47:
	adrp	x0, l_.str.2@PAGE
Lloh48:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_warn
	b	LBB0_16
LBB0_14:
	ldr	w8, [x23]
Lloh49:
	adrp	x9, _CAM_ARG_VERBOSE@GOTPAGE
Lloh50:
	ldr	x9, [x9, _CAM_ARG_VERBOSE@GOTPAGEOFF]
Lloh51:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_16
; %bb.15:
Lloh52:
	adrp	x8, _CAM_ESF_ALL@GOTPAGE
Lloh53:
	ldr	x8, [x8, _CAM_ESF_ALL@GOTPAGEOFF]
Lloh54:
	ldr	w2, [x8]
Lloh55:
	adrp	x8, _CAM_EPF_ALL@GOTPAGE
Lloh56:
	ldr	x8, [x8, _CAM_EPF_ALL@GOTPAGEOFF]
Lloh57:
	ldr	w3, [x8]
Lloh58:
	adrp	x8, _stderr@GOTPAGE
Lloh59:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh60:
	ldr	w4, [x8]
	mov	x0, x20
	mov	x1, x22
	bl	_cam_error_print
LBB0_16:
	mov	x0, x22
	bl	_cam_freeccb
	mov	x0, x19
	bl	_free
LBB0_17:
	mov	w0, #1
LBB0_18:
	ldur	x8, [x29, #-72]
Lloh61:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh62:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh63:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_20
; %bb.19:
	sub	sp, x29, #64
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_20:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.cfi_endproc
                                        ; -- End function
	.comm	_SVPD_SERIAL_NUM_SIZE,4,2       ; @SVPD_SERIAL_NUM_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"couldn't allocate CCB"

l_.str.1:                               ; @.str.1
	.asciz	"can't malloc memory for serial number"

	.comm	_SVPD_UNIT_SERIAL_NUMBER,4,2    ; @SVPD_UNIT_SERIAL_NUMBER
	.comm	_SSD_FULL_SIZE,4,2              ; @SSD_FULL_SIZE
	.comm	_CAM_DEV_QFRZDIS,4,2            ; @CAM_DEV_QFRZDIS
	.comm	_arglist,4,2                    ; @arglist
	.comm	_CAM_ARG_ERR_RECOVER,4,2        ; @CAM_ARG_ERR_RECOVER
	.comm	_CAM_PASS_ERR_RECOVER,4,2       ; @CAM_PASS_ERR_RECOVER
l_.str.2:                               ; @.str.2
	.asciz	"error sending INQUIRY command"

	.comm	_CAM_STATUS_MASK,4,2            ; @CAM_STATUS_MASK
	.comm	_CAM_REQ_CMP,4,2                ; @CAM_REQ_CMP
	.comm	_CAM_ARG_VERBOSE,4,2            ; @CAM_ARG_VERBOSE
	.comm	_CAM_ESF_ALL,4,2                ; @CAM_ESF_ALL
	.comm	_CAM_EPF_ALL,4,2                ; @CAM_EPF_ALL
	.comm	_stderr,4,2                     ; @stderr
	.comm	_CAM_ARG_GET_STDINQ,4,2         ; @CAM_ARG_GET_STDINQ
	.comm	_CAM_ARG_GET_XFERRATE,4,2       ; @CAM_ARG_GET_XFERRATE
	.comm	_stdout,4,2                     ; @stdout
l_.str.3:                               ; @.str.3
	.asciz	"%s%d: Serial Number "

l_.str.4:                               ; @.str.4
	.asciz	"%.60s\n"

	.no_dead_strip	_scsiserial
.subsections_via_symbols
