	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i2o_scsi_reply
_i2o_scsi_reply:                        ## @i2o_scsi_reply
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rdi, %rbx
	movl	8(%rdx), %edi
	callq	_le32_to_cpu
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_i2o_cntxt_list_get
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_osm_err
	movl	$-1, %eax
	jmp	LBB0_7
LBB0_2:
	movq	(%r14), %rax
	movl	(%rax), %edi
	callq	_le32_to_cpu
	movl	%eax, %r15d
	movl	20(%rbx), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_osm_debug
	movl	%r15d, %eax
	andl	$255, %eax
	movl	%eax, (%rbx)
	je	LBB0_4
## %bb.3:
	movl	16(%rbx), %r12d
	movq	(%r14), %r14
	addq	$12, %r14
	movq	_SCSI_SENSE_BUFFERSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$40, %esi
	callq	_min
	movl	%r12d, %edi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_memcpy
LBB0_4:
	testl	$65280, %r15d                   ## imm = 0xFF00
	je	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_osm_err
LBB0_6:
	movq	%rbx, %rdi
	callq	_scsi_dma_unmap
	movq	%rbx, %rdi
	callq	*8(%rbx)
	movl	$1, %eax
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"NULL reply received!\n"

L_.str.1:                               ## @.str.1
	.asciz	"Completed %ld\n"

	.comm	_SCSI_SENSE_BUFFERSIZE,4,2      ## @SCSI_SENSE_BUFFERSIZE
L_.str.2:                               ## @.str.2
	.asciz	"SCSI error %08x\n"

	.no_dead_strip	_i2o_scsi_reply
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i2o_scsi_reply
_i2o_scsi_reply:                        ; @i2o_scsi_reply
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x2
	mov	x19, x0
	ldr	w0, [x2, #8]
	bl	_le32_to_cpu
	mov	x1, x0
	mov	x0, x19
	bl	_i2o_cntxt_list_get
	mov	x19, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_osm_err
	mov	w0, #-1
	b	LBB0_7
LBB0_2:
	ldr	x8, [x20]
	ldr	w0, [x8]
	bl	_le32_to_cpu
	mov	x21, x0
	ldr	w1, [x19, #20]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_osm_debug
	ands	w8, w21, #0xff
	str	w8, [x19]
	b.eq	LBB0_4
; %bb.3:
	ldr	w22, [x19, #16]
	ldr	x8, [x20]
	add	x20, x8, #12
Lloh4:
	adrp	x8, _SCSI_SENSE_BUFFERSIZE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SCSI_SENSE_BUFFERSIZE@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	mov	w1, #40
	bl	_min
	mov	x2, x0
	mov	x0, x22
	mov	x1, x20
	bl	_memcpy
LBB0_4:
	tst	w21, #0xff00
	b.eq	LBB0_6
; %bb.5:
	str	x21, [sp]
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_osm_err
LBB0_6:
	mov	x0, x19
	bl	_scsi_dma_unmap
	ldr	x8, [x19, #8]
	mov	x0, x19
	blr	x8
	mov	w0, #1
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"NULL reply received!\n"

l_.str.1:                               ; @.str.1
	.asciz	"Completed %ld\n"

	.comm	_SCSI_SENSE_BUFFERSIZE,4,2      ; @SCSI_SENSE_BUFFERSIZE
l_.str.2:                               ; @.str.2
	.asciz	"SCSI error %08x\n"

	.no_dead_strip	_i2o_scsi_reply
.subsections_via_symbols
