	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fwdownload                     ## -- Begin function fwdownload
	.p2align	4, 0x90
_fwdownload:                            ## @fwdownload
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -56(%rbp)                 ## 4-byte Spill
	movl	%r8d, -84(%rbp)                 ## 4-byte Spill
	movq	%rcx, %r14
	movq	%rdx, %r12
	movl	%esi, %r15d
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	$0, -104(%rbp)
	xorl	%eax, %eax
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	leaq	LJTI0_0(%rip), %rbx
	movq	_optarg@GOTPCREL(%rip), %r13
	xorl	%eax, %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	$0, -88(%rbp)                   ## 4-byte Folded Spill
	xorl	%eax, %eax
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, %eax
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_5 Depth=2
	cmpl	$-1, %eax
	je	LBB0_7
LBB0_5:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r15d, %edi
	movq	%r12, %rsi
	movq	%r14, %rdx
	callq	_getopt
                                        ## kill: def $eax killed $eax def $rax
	leal	-102(%rax), %ecx
	cmpl	$19, %ecx
	ja	LBB0_6
## %bb.15:                              ##   in Loop: Header=BB0_5 Depth=2
	movslq	(%rbx,%rcx,4), %rax
	addq	%rbx, %rax
	jmpq	*%rax
LBB0_16:                                ##   in Loop: Header=BB0_5 Depth=2
	movq	(%r13), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_5
LBB0_1:                                 ##   in Loop: Header=BB0_5 Depth=2
	movl	$1, -88(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_5
LBB0_2:                                 ##   in Loop: Header=BB0_5 Depth=2
	movl	$1, %eax
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	jmp	LBB0_5
LBB0_7:
	cmpq	$0, -80(%rbp)                   ## 8-byte Folded Reload
	jne	LBB0_9
## %bb.8:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_9:
	leaq	-96(%rbp), %r8
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	movl	16(%rbp), %ebx
	movl	%ebx, %esi
	movl	24(%rbp), %edx
	movl	-84(%rbp), %ecx                 ## 4-byte Reload
	callq	_get_device_type
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_11:
	movq	-96(%rbp), %rdx
	movq	_CC_DT_ATA@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_13
## %bb.12:
	movq	_CC_DT_SATL@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_13
## %bb.20:
	movq	_CC_DT_SCSI@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	movl	$0, %ecx
	cmpq	(%rax), %rdx
	je	LBB0_22
## %bb.21:
	leaq	L_.str.3(%rip), %rsi
	xorl	%ebx, %ebx
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
	xorl	%ecx, %ecx
	jmp	LBB0_22
LBB0_13:
	movq	%r13, %rdi
	callq	_cam_getccb
	testq	%rax, %rax
	je	LBB0_14
## %bb.17:
	leaq	-104(%rbp), %r8
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	24(%rbp), %edx
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rcx
	callq	_ata_do_identify
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:
	movl	$1, %r13d
	xorl	%r12d, %r12d
	jmp	LBB0_45
LBB0_14:
	leaq	L_.str.2(%rip), %rdi
	callq	_warnx
	movl	$1, %r13d
	xorl	%r12d, %r12d
	xorl	%edi, %edi
	jmp	LBB0_46
LBB0_19:
	movq	-104(%rbp), %rbx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
LBB0_22:
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_fw_get_vendor
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_24
## %bb.23:
	movq	(%rbx), %rax
	movq	_VENDOR_UNKNOWN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_26
LBB0_24:
	movq	-96(%rbp), %rax
	movq	_CC_DT_SCSI@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_26
## %bb.25:
	leaq	L_.str.4(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_26:
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	16(%rbp), %ebx
	movq	%rbx, %rcx
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	24(%rbp), %r8d
	callq	_fw_get_timeout
	testl	%eax, %eax
	je	LBB0_28
## %bb.27:
	movl	%eax, %ebx
	leaq	L_.str.5(%rip), %rdi
	callq	_warnx
	xorl	%r12d, %r12d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %r13d
	jmp	LBB0_46
LBB0_28:
	subq	$8, %rsp
	leaq	-108(%rbp), %rax
	movq	%r13, %rdi
	movl	16(%rbp), %esi
                                        ## kill: def $esi killed $esi killed $rsi
	movl	24(%rbp), %edx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	movq	-80(%rbp), %r8                  ## 8-byte Reload
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	pushq	%rax
	callq	_fw_read_img
	addq	$16, %rsp
	movl	$1, %r13d
	testq	%rax, %rax
	je	LBB0_29
## %bb.30:
	movq	%rax, %rbx
	cmpl	$0, -120(%rbp)                  ## 4-byte Folded Reload
	je	LBB0_32
## %bb.31:
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	%rbx, %r12
	movl	16(%rbp), %ebx
LBB0_37:
	movl	-88(%rbp), %r15d                ## 4-byte Reload
	testl	%r15d, %r15d
	je	LBB0_40
## %bb.38:
	testl	%r14d, %r14d
	jne	LBB0_40
## %bb.39:
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.11(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_40:
	movl	-108(%rbp), %ecx
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	8(%rsi), %eax
	subq	$8, %rsp
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rdx
	movl	%r15d, %r8d
	movl	-84(%rbp), %r9d                 ## 4-byte Reload
	pushq	-96(%rbp)
	pushq	-80(%rbp)                       ## 8-byte Folded Reload
	pushq	%rax
	pushq	%rbx
	pushq	%r14
	callq	_fw_download_img
	addq	$48, %rsp
	testq	%rax, %rax
	je	LBB0_42
## %bb.41:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.12(%rip), %rsi
LBB0_44:
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_45
LBB0_29:
	xorl	%r12d, %r12d
	jmp	LBB0_45
LBB0_32:
	movq	_stdout@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	leaq	L_.str.6(%rip), %rsi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_fprintf
	movq	-96(%rbp), %rax
	movq	_CC_DT_SCSI@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_35
## %bb.33:
	movq	_MSG_SIMPLE_Q_TAG@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	subq	$8, %rsp
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	movq	%r12, %rdx
	movq	%r14, %rcx
	xorl	%r9d, %r9d
	pushq	$5000                           ## imm = 0x1388
	callq	_scsidoinquiry
	addq	$16, %rsp
	testq	%rax, %rax
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	%rbx, %r12
	je	LBB0_36
## %bb.34:
	leaq	L_.str.7(%rip), %rdi
	callq	_warnx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$1, %r13d
	jmp	LBB0_46
LBB0_42:
	xorl	%r13d, %r13d
	testl	%r14d, %r14d
	jne	LBB0_45
## %bb.43:
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.13(%rip), %rsi
	xorl	%r13d, %r13d
	jmp	LBB0_44
LBB0_35:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	leaq	L_.str.8(%rip), %rdi
	callq	_printf
	movq	-104(%rbp), %rdi
	callq	_ata_print_ident
	movq	%r14, %rdi
	callq	_camxferrate
	movq	-104(%rbp), %rdi
	callq	_free
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	%rbx, %r12
LBB0_36:
	movl	(%r13), %edi
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	8(%rcx), %edx
	movq	_fw_timeout_desc_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	16(%rcx), %rcx
	movq	(%rax,%rcx,8), %rcx
	leaq	L_.str.9(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%r13), %edi
	leaq	L_.str.10(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	xorl	%eax, %eax
	callq	_get_confirmation
	testl	%eax, %eax
	movl	16(%rbp), %ebx
	movl	$1, %r13d
	jne	LBB0_37
LBB0_45:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
LBB0_46:
	callq	_cam_freeccb
	movq	%r12, %rdi
	callq	_free
	movl	%r13d, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_1, LBB0_1-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
LJTI0_0:
	.long	L0_0_set_16
	.long	L0_0_set_5
	.long	L0_0_set_5
	.long	L0_0_set_5
	.long	L0_0_set_5
	.long	L0_0_set_5
	.long	L0_0_set_5
	.long	L0_0_set_5
	.long	L0_0_set_5
	.long	L0_0_set_5
	.long	L0_0_set_5
	.long	L0_0_set_3
	.long	L0_0_set_5
	.long	L0_0_set_1
	.long	L0_0_set_5
	.long	L0_0_set_5
	.long	L0_0_set_5
	.long	L0_0_set_5
	.long	L0_0_set_5
	.long	L0_0_set_2
	.end_data_region
                                        ## -- End function
	.comm	_optarg,8,3                     ## @optarg
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"you must specify a firmware image file using -f option"

L_.str.1:                               ## @.str.1
	.asciz	"Unable to determine device type"

	.comm	_CC_DT_ATA,8,3                  ## @CC_DT_ATA
	.comm	_CC_DT_SATL,8,3                 ## @CC_DT_SATL
L_.str.2:                               ## @.str.2
	.asciz	"couldn't allocate CCB"

	.comm	_CC_DT_SCSI,8,3                 ## @CC_DT_SCSI
L_.str.3:                               ## @.str.3
	.asciz	"Unsupported device type %d"

	.comm	_VENDOR_UNKNOWN,8,3             ## @VENDOR_UNKNOWN
L_.str.4:                               ## @.str.4
	.asciz	"Unsupported device"

L_.str.5:                               ## @.str.5
	.asciz	"Unable to get a firmware download timeout value"

	.comm	_stdout,4,2                     ## @stdout
L_.str.6:                               ## @.str.6
	.asciz	"You are about to download firmware image (%s) into the following device:\n"

	.comm	_MSG_SIMPLE_Q_TAG,4,2           ## @MSG_SIMPLE_Q_TAG
L_.str.7:                               ## @.str.7
	.asciz	"Error sending inquiry"

L_.str.8:                               ## @.str.8
	.asciz	"%s%d: "

L_.str.9:                               ## @.str.9
	.asciz	"Using a timeout of %u ms, which is %s.\n"

	.comm	_fw_timeout_desc_table,8,3      ## @fw_timeout_desc_table
L_.str.10:                              ## @.str.10
	.asciz	"\nIt may damage your drive. "

L_.str.11:                              ## @.str.11
	.asciz	"Running in simulation mode\n"

	.comm	_stderr,4,2                     ## @stderr
L_.str.12:                              ## @.str.12
	.asciz	"Firmware download failed\n"

L_.str.13:                              ## @.str.13
	.asciz	"Firmware download successful\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fwdownload                     ; -- Begin function fwdownload
	.p2align	2
_fwdownload:                            ; @fwdownload
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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	x21, x7
	stp	w5, w6, [sp, #44]               ; 8-byte Folded Spill
	stp	w4, wzr, [sp, #52]              ; 8-byte Folded Spill
	mov	x26, x3
	mov	x27, x2
	mov	x28, x1
	mov	x23, x0
	mov	w25, #0
	mov	x24, #0
	mov	w20, #0
	str	xzr, [sp, #72]
Lloh0:
	adrp	x19, _optarg@GOTPAGE
Lloh1:
	ldr	x19, [x19, _optarg@GOTPAGEOFF]
Lloh2:
	adrp	x22, lJTI0_0@PAGE
Lloh3:
	add	x22, x22, lJTI0_0@PAGEOFF
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	cmn	w0, #1
	b.eq	LBB0_8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x28
	mov	x1, x27
	mov	x2, x26
	bl	_getopt
	sub	w8, w0, #102
	cmp	w8, #19
	b.hi	LBB0_1
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	adr	x9, LBB0_2
	ldrb	w10, [x22, x8]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x24, [x19]
	b	LBB0_2
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	w20, #1
	b	LBB0_2
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	w8, #1
	str	w8, [sp, #56]                   ; 4-byte Folded Spill
	b	LBB0_2
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	w25, #1
	b	LBB0_2
LBB0_8:
	cbnz	x24, LBB0_10
; %bb.9:
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_10:
	add	x4, sp, #64
	mov	x0, x23
	ldp	w22, w3, [sp, #48]              ; 8-byte Folded Reload
	mov	x1, x22
	mov	x2, x21
	bl	_get_device_type
	cbz	w0, LBB0_12
; %bb.11:
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_12:
	ldr	x8, [sp, #64]
Lloh8:
	adrp	x9, _CC_DT_ATA@GOTPAGE
Lloh9:
	ldr	x9, [x9, _CC_DT_ATA@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
Lloh11:
	adrp	x10, _CC_DT_SATL@GOTPAGE
Lloh12:
	ldr	x10, [x10, _CC_DT_SATL@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_16
; %bb.13:
	mov	x0, x23
	bl	_cam_getccb
	mov	x19, x0
	cbz	x0, LBB0_35
; %bb.14:
	add	x4, sp, #72
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	mov	x3, x19
	bl	_ata_do_identify
	cbnz	x0, LBB0_36
; %bb.15:
	str	x19, [sp, #32]                  ; 8-byte Folded Spill
	ldr	x1, [sp, #72]
	b	LBB0_19
LBB0_16:
Lloh14:
	adrp	x9, _CC_DT_SCSI@GOTPAGE
Lloh15:
	ldr	x9, [x9, _CC_DT_SCSI@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_18
; %bb.17:
	str	x8, [sp]
Lloh17:
	adrp	x1, l_.str.3@PAGE
Lloh18:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_18:
	mov	x1, #0
	str	xzr, [sp, #32]                  ; 8-byte Folded Spill
LBB0_19:
	str	w20, [sp, #28]                  ; 4-byte Folded Spill
	mov	x0, x23
	bl	_fw_get_vendor
	mov	x19, x0
	cbz	x0, LBB0_21
; %bb.20:
	ldr	x8, [x19]
Lloh19:
	adrp	x9, _VENDOR_UNKNOWN@GOTPAGE
Lloh20:
	ldr	x9, [x9, _VENDOR_UNKNOWN@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_23
LBB0_21:
	ldr	x8, [sp, #64]
Lloh22:
	adrp	x9, _CC_DT_SCSI@GOTPAGE
Lloh23:
	ldr	x9, [x9, _CC_DT_SCSI@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_23
; %bb.22:
Lloh25:
	adrp	x1, l_.str.4@PAGE
Lloh26:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_23:
	mov	x0, x23
	mov	x1, x19
	ldr	w2, [sp, #44]                   ; 4-byte Folded Reload
	mov	x3, x22
	mov	x4, x21
	bl	_fw_get_timeout
	cbz	w0, LBB0_25
; %bb.24:
	mov	x22, x0
Lloh27:
	adrp	x0, l_.str.5@PAGE
Lloh28:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_warnx
	mov	x21, #0
	b	LBB0_34
LBB0_25:
	mov	x20, x22
	add	x6, sp, #60
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	ldr	w3, [sp, #28]                   ; 4-byte Folded Reload
	mov	x4, x24
	mov	x5, x19
	bl	_fw_read_img
	mov	x21, x0
	cbz	x0, LBB0_33
; %bb.26:
	cbz	w25, LBB0_38
; %bb.27:
	mov	x22, x20
	ldr	w20, [sp, #28]                  ; 4-byte Folded Reload
LBB0_28:
	ldr	w25, [sp, #56]                  ; 4-byte Folded Reload
	cbz	w25, LBB0_31
; %bb.29:
	cbnz	w20, LBB0_31
; %bb.30:
Lloh29:
	adrp	x8, _stdout@GOTPAGE
Lloh30:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
Lloh32:
	adrp	x1, l_.str.11@PAGE
Lloh33:
	add	x1, x1, l_.str.11@PAGEOFF
	bl	_fprintf
LBB0_31:
	ldr	w3, [sp, #60]
	ldr	w8, [x19, #8]
	ldr	x9, [sp, #64]
	stp	x24, x9, [sp, #8]
	str	w8, [sp]
	mov	x0, x23
	mov	x1, x19
	mov	x2, x21
	mov	x4, x25
	ldr	w5, [sp, #52]                   ; 4-byte Folded Reload
	mov	x6, x20
	mov	x7, x22
	bl	_fw_download_img
	cbz	x0, LBB0_41
; %bb.32:
Lloh34:
	adrp	x8, _stderr@GOTPAGE
Lloh35:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
Lloh37:
	adrp	x1, l_.str.12@PAGE
Lloh38:
	add	x1, x1, l_.str.12@PAGEOFF
	bl	_fprintf
LBB0_33:
	mov	w22, #1
LBB0_34:
	ldr	x19, [sp, #32]                  ; 8-byte Folded Reload
	b	LBB0_37
LBB0_35:
Lloh39:
	adrp	x0, l_.str.2@PAGE
Lloh40:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_warnx
LBB0_36:
	mov	x21, #0
	mov	w22, #1
LBB0_37:
	mov	x0, x19
	bl	_cam_freeccb
	mov	x0, x21
	bl	_free
	mov	x0, x22
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_38:
Lloh41:
	adrp	x22, _stdout@GOTPAGE
Lloh42:
	ldr	x22, [x22, _stdout@GOTPAGEOFF]
	ldr	w0, [x22]
	str	x24, [sp]
Lloh43:
	adrp	x1, l_.str.6@PAGE
Lloh44:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_fprintf
	ldr	x8, [sp, #64]
Lloh45:
	adrp	x9, _CC_DT_SCSI@GOTPAGE
Lloh46:
	ldr	x9, [x9, _CC_DT_SCSI@GOTPAGEOFF]
Lloh47:
	ldr	x9, [x9]
	cmp	x8, x9
	ldr	w20, [sp, #28]                  ; 4-byte Folded Reload
	b.ne	LBB0_44
; %bb.39:
Lloh48:
	adrp	x8, _MSG_SIMPLE_Q_TAG@GOTPAGE
Lloh49:
	ldr	x8, [x8, _MSG_SIMPLE_Q_TAG@GOTPAGEOFF]
Lloh50:
	ldr	w4, [x8]
	mov	x0, x23
	mov	x1, x28
	mov	x2, x27
	mov	x3, x26
	mov	w5, #0
	mov	w6, #5000
	bl	_scsidoinquiry
	cbz	x0, LBB0_45
; %bb.40:
Lloh51:
	adrp	x0, l_.str.7@PAGE
Lloh52:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_warnx
	b	LBB0_33
LBB0_41:
	cbnz	w20, LBB0_43
; %bb.42:
Lloh53:
	adrp	x8, _stdout@GOTPAGE
Lloh54:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh55:
	ldr	w0, [x8]
Lloh56:
	adrp	x1, l_.str.13@PAGE
Lloh57:
	add	x1, x1, l_.str.13@PAGEOFF
	bl	_fprintf
LBB0_43:
	mov	w22, #0
	b	LBB0_34
LBB0_44:
	ldr	x1, [x23]
	ldr	w2, [x23, #8]
Lloh58:
	adrp	x0, l_.str.8@PAGE
Lloh59:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_printf
	ldr	x0, [sp, #72]
	bl	_ata_print_ident
	mov	x0, x23
	bl	_camxferrate
	ldr	x0, [sp, #72]
	bl	_free
LBB0_45:
Lloh60:
	adrp	x8, _fw_timeout_desc_table@GOTPAGE
Lloh61:
	ldr	x8, [x8, _fw_timeout_desc_table@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh62:
	ldr	x8, [x8]
	ldr	x9, [x19, #16]
	ldr	x8, [x8, x9, lsl #3]
	ldr	w9, [x19, #8]
	stp	x9, x8, [sp]
Lloh63:
	adrp	x1, l_.str.9@PAGE
Lloh64:
	add	x1, x1, l_.str.9@PAGEOFF
	bl	_fprintf
	ldr	w0, [x22]
Lloh65:
	adrp	x1, l_.str.10@PAGE
Lloh66:
	add	x1, x1, l_.str.10@PAGEOFF
	bl	_fprintf
	bl	_get_confirmation
	ldr	w22, [sp, #48]                  ; 4-byte Folded Reload
	cbnz	w0, LBB0_28
	b	LBB0_33
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpAdd	Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpAdd	Lloh58, Lloh59
	.loh AdrpAdd	Lloh65, Lloh66
	.loh AdrpAdd	Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
                                        ; -- End function
	.comm	_optarg,8,3                     ; @optarg
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"you must specify a firmware image file using -f option"

l_.str.1:                               ; @.str.1
	.asciz	"Unable to determine device type"

	.comm	_CC_DT_ATA,8,3                  ; @CC_DT_ATA
	.comm	_CC_DT_SATL,8,3                 ; @CC_DT_SATL
l_.str.2:                               ; @.str.2
	.asciz	"couldn't allocate CCB"

	.comm	_CC_DT_SCSI,8,3                 ; @CC_DT_SCSI
l_.str.3:                               ; @.str.3
	.asciz	"Unsupported device type %d"

	.comm	_VENDOR_UNKNOWN,8,3             ; @VENDOR_UNKNOWN
l_.str.4:                               ; @.str.4
	.asciz	"Unsupported device"

l_.str.5:                               ; @.str.5
	.asciz	"Unable to get a firmware download timeout value"

	.comm	_stdout,4,2                     ; @stdout
l_.str.6:                               ; @.str.6
	.asciz	"You are about to download firmware image (%s) into the following device:\n"

	.comm	_MSG_SIMPLE_Q_TAG,4,2           ; @MSG_SIMPLE_Q_TAG
l_.str.7:                               ; @.str.7
	.asciz	"Error sending inquiry"

l_.str.8:                               ; @.str.8
	.asciz	"%s%d: "

l_.str.9:                               ; @.str.9
	.asciz	"Using a timeout of %u ms, which is %s.\n"

	.comm	_fw_timeout_desc_table,8,3      ; @fw_timeout_desc_table
l_.str.10:                              ; @.str.10
	.asciz	"\nIt may damage your drive. "

l_.str.11:                              ; @.str.11
	.asciz	"Running in simulation mode\n"

	.comm	_stderr,4,2                     ; @stderr
l_.str.12:                              ; @.str.12
	.asciz	"Firmware download failed\n"

l_.str.13:                              ; @.str.13
	.asciz	"Firmware download successful\n"

.subsections_via_symbols
