	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i2o_hrt_get
_i2o_hrt_get:                           ## @i2o_hrt_get
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	_I2O_HRT_GET_TRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%edx, %edx
	jle	LBB0_10
## %bb.1:
	leaq	8(%r12), %r14
	movq	24(%r12), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %r15
	movq	_I2O_TIMEOUT_MESSAGE_GET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_i2o_msg_get_wait
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_13
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_SGL_OFFSET_4@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SIX_WORD_MSG_SIZE@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	callq	_cpu_to_le32
	movq	8(%rbx), %rcx
	movq	%rax, (%rcx)
	movq	_I2O_CMD_HRT_GET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$24, %eax
	movq	_HOST_TID@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	shll	$12, %edi
	orl	%eax, %edi
	movq	_ADAPTER_TID@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	callq	_cpu_to_le32
	movq	8(%rbx), %rcx
	movq	%rax, 8(%rcx)
	movl	8(%r12), %edi
	movl	$-805306368, %eax               ## imm = 0xD0000000
	orl	%eax, %edi
	callq	_cpu_to_le32
	movq	(%rbx), %rcx
	movq	%rax, (%rcx)
	movl	12(%r12), %edi
	callq	_cpu_to_le32
	movq	(%rbx), %rcx
	movq	%rax, 8(%rcx)
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	$20, %edx
	movq	%r14, %rcx
	callq	_i2o_msg_post_wait_mem
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r15), %edx
	imull	4(%r15), %edx
	shll	$2, %edx
	cmpl	(%r14), %edx
	jle	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_i2o_dma_realloc
	testq	%rax, %rax
	jne	LBB0_8
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	incl	%r13d
	movq	_I2O_HRT_GET_TRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	cmpl	%edx, %r13d
	jl	LBB0_3
LBB0_10:
	movl	(%r12), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_osm_err
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_13:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_5:
	movl	%eax, %ebx
	movl	(%r12), %esi
	movl	%eax, %edx
	negl	%edx
	leaq	L_.str(%rip), %rdi
	callq	_osm_err
	jmp	LBB0_12
LBB0_9:
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_i2o_parse_hrt                  ## TAILCALL
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_11:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2O_HRT_GET_TRIES,4,2          ## @I2O_HRT_GET_TRIES
	.comm	_I2O_TIMEOUT_MESSAGE_GET,4,2    ## @I2O_TIMEOUT_MESSAGE_GET
	.comm	_SIX_WORD_MSG_SIZE,4,2          ## @SIX_WORD_MSG_SIZE
	.comm	_SGL_OFFSET_4,4,2               ## @SGL_OFFSET_4
	.comm	_I2O_CMD_HRT_GET,4,2            ## @I2O_CMD_HRT_GET
	.comm	_HOST_TID,4,2                   ## @HOST_TID
	.comm	_ADAPTER_TID,4,2                ## @ADAPTER_TID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: Unable to get HRT (status=%#x)\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"%s: Unable to get HRT after %d tries, giving up\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_i2o_hrt_get
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i2o_hrt_get
_i2o_hrt_get:                           ; @i2o_hrt_get
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	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
	.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
Lloh0:
	adrp	x23, _I2O_HRT_GET_TRIES@GOTPAGE
Lloh1:
	ldr	x23, [x23, _I2O_HRT_GET_TRIES@GOTPAGEOFF]
	ldr	w2, [x23]
	cmp	w2, #1
	b.lt	LBB0_7
; %bb.1:
	mov	w24, #0
	add	x20, x19, #8
	ldr	x21, [x19, #24]
Lloh2:
	adrp	x26, _HOST_TID@GOTPAGE
Lloh3:
	ldr	x26, [x26, _HOST_TID@GOTPAGEOFF]
	mov	w27, #-805306368
Lloh4:
	adrp	x28, _ADAPTER_TID@GOTPAGE
Lloh5:
	ldr	x28, [x28, _ADAPTER_TID@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x25, [x19, #16]
Lloh6:
	adrp	x8, _I2O_TIMEOUT_MESSAGE_GET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _I2O_TIMEOUT_MESSAGE_GET@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_i2o_msg_get_wait
	mov	x22, x0
	bl	_IS_ERR
	cbnz	x0, LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh9:
	adrp	x8, _SIX_WORD_MSG_SIZE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SIX_WORD_MSG_SIZE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _SGL_OFFSET_4@GOTPAGE
Lloh13:
	ldr	x9, [x9, _SGL_OFFSET_4@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w0, w9, w8
	bl	_cpu_to_le32
	ldr	x8, [x22, #8]
	str	x0, [x8]
Lloh15:
	adrp	x8, _I2O_CMD_HRT_GET@GOTPAGE
Lloh16:
	ldr	x8, [x8, _I2O_CMD_HRT_GET@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w9, [x26]
	lsl	w9, w9, #12
	orr	w8, w9, w8, lsl #24
	ldr	w9, [x28]
	orr	w0, w8, w9
	bl	_cpu_to_le32
	ldr	x8, [x22, #8]
	str	x0, [x8, #8]
	ldr	w8, [x19, #8]
	orr	w0, w8, w27
	bl	_cpu_to_le32
	ldr	x8, [x22]
	str	x0, [x8]
	ldr	w0, [x19, #12]
	bl	_cpu_to_le32
	ldr	x8, [x22]
	str	x0, [x8, #8]
	mov	x0, x19
	mov	x1, x22
	mov	w2, #20
	mov	x3, x20
	bl	_i2o_msg_post_wait_mem
	tbnz	w0, #31, LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldp	w8, w9, [x25]
	mul	w8, w8, w9
	lsl	w2, w8, #2
	ldr	w8, [x20]
	cmp	w2, w8
	b.le	LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	mov	x1, x20
	bl	_i2o_dma_realloc
	cbnz	x0, LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w24, w24, #1
	ldr	w2, [x23]
	cmp	w24, w2
	b.lt	LBB0_2
LBB0_7:
	ldr	w1, [x19]
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_osm_err
Lloh20:
	adrp	x8, _EBUSY@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_12
LBB0_8:
	mov	x0, x22
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_9:
	mov	x22, x0
	ldr	w1, [x19]
	neg	w2, w0
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
	bl	_osm_err
	b	LBB0_13
LBB0_10:
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_i2o_parse_hrt
LBB0_11:
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_13:
	mov	x0, x22
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_I2O_HRT_GET_TRIES,4,2          ; @I2O_HRT_GET_TRIES
	.comm	_I2O_TIMEOUT_MESSAGE_GET,4,2    ; @I2O_TIMEOUT_MESSAGE_GET
	.comm	_SIX_WORD_MSG_SIZE,4,2          ; @SIX_WORD_MSG_SIZE
	.comm	_SGL_OFFSET_4,4,2               ; @SGL_OFFSET_4
	.comm	_I2O_CMD_HRT_GET,4,2            ; @I2O_CMD_HRT_GET
	.comm	_HOST_TID,4,2                   ; @HOST_TID
	.comm	_ADAPTER_TID,4,2                ; @ADAPTER_TID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: Unable to get HRT (status=%#x)\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"%s: Unable to get HRT after %d tries, giving up\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_i2o_hrt_get
.subsections_via_symbols
