	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iser_calc_scsi_params
_iser_calc_scsi_params:                 ## @iser_calc_scsi_params
	.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
	movl	%esi, %eax
	movq	%rdi, %r15
	movq	24(%rdi), %rcx
	movq	(%rcx), %r13
	movl	(%r13), %ecx
	movq	_IB_DEVICE_MEM_MGT_EXTENSIONS@GOTPCREL(%rip), %r14
	testl	%ecx, (%r14)
	je	LBB0_3
## %bb.1:
	movq	_IB_DEVICE_SG_GAPS_REG@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_3
## %bb.2:
	xorl	%ebx, %ebx
	jmp	LBB0_4
LBB0_3:
	movw	$1, %bx
LBB0_4:
	xorl	%ecx, %ecx
	cmpq	$0, 16(%r15)
	setne	%cl
	movq	8(%r13,%rcx,8), %r12
	shll	$9, %eax
	movq	_SIZE_4K@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_DIV_ROUND_UP
	movl	%eax, %ecx
	movl	(%r14), %eax
	movzwl	%bx, %ebx
	testl	%eax, (%r13)
	je	LBB0_6
## %bb.5:
	movq	_uint@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ISCSI_ISER_MAX_SG_TABLESIZE@GOTPCREL(%rip), %rax
	movzwl	(%rax), %esi
	subq	%rbx, %r12
	movq	%r12, %rdx
	movl	%ecx, %r14d
	callq	_min_t
	movl	%r14d, %ecx
	jmp	LBB0_7
LBB0_6:
	movq	_ISCSI_ISER_MAX_SG_TABLESIZE@GOTPCREL(%rip), %rax
	movzwl	(%rax), %eax
LBB0_7:
	movzwl	%cx, %edi
	movzwl	%ax, %esi
	callq	_min
	movl	%eax, (%r15)
	addl	%eax, %ebx
	movslq	%ebx, %rax
	movq	%rax, 8(%r15)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_DEVICE_MEM_MGT_EXTENSIONS,4,2 ## @IB_DEVICE_MEM_MGT_EXTENSIONS
	.comm	_IB_DEVICE_SG_GAPS_REG,4,2      ## @IB_DEVICE_SG_GAPS_REG
	.comm	_SIZE_4K,4,2                    ## @SIZE_4K
	.comm	_uint,4,2                       ## @uint
	.comm	_ISCSI_ISER_MAX_SG_TABLESIZE,2,1 ## @ISCSI_ISER_MAX_SG_TABLESIZE
	.no_dead_strip	_iser_calc_scsi_params
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iser_calc_scsi_params
_iser_calc_scsi_params:                 ; @iser_calc_scsi_params
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	x8, [x0, #24]
	ldr	x22, [x8]
	ldr	w8, [x22]
Lloh0:
	adrp	x23, _IB_DEVICE_MEM_MGT_EXTENSIONS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _IB_DEVICE_MEM_MGT_EXTENSIONS@GOTPAGEOFF]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
Lloh2:
	adrp	x9, _IB_DEVICE_SG_GAPS_REG@GOTPAGE
Lloh3:
	ldr	x9, [x9, _IB_DEVICE_SG_GAPS_REG@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	mov	w21, #0
	b	LBB0_4
LBB0_3:
	mov	w21, #1
LBB0_4:
	ldr	x8, [x19, #16]
	mov	w9, #16
	mov	w10, #8
	cmp	x8, #0
	csel	x8, x10, x9, eq
	ldr	x24, [x22, x8]
	lsl	w0, w1, #9
Lloh5:
	adrp	x8, _SIZE_4K@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SIZE_4K@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_DIV_ROUND_UP
	mov	x20, x0
	ldr	w8, [x22]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
Lloh8:
	adrp	x8, _uint@GOTPAGE
Lloh9:
	ldr	x8, [x8, _uint@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x8, _ISCSI_ISER_MAX_SG_TABLESIZE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ISCSI_ISER_MAX_SG_TABLESIZE@GOTPAGEOFF]
	ldrh	w1, [x8]
	sub	x2, x24, w21, uxtw
	bl	_min_t
	mov	x1, x0
	b	LBB0_7
LBB0_6:
Lloh13:
	adrp	x8, _ISCSI_ISER_MAX_SG_TABLESIZE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ISCSI_ISER_MAX_SG_TABLESIZE@GOTPAGEOFF]
	ldrh	w1, [x8]
LBB0_7:
	mov	x0, x20
	bl	_min
	str	w0, [x19]
	add	w8, w0, w21
	sxtw	x8, w8
	str	x8, [x19, #8]
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_DEVICE_MEM_MGT_EXTENSIONS,4,2 ; @IB_DEVICE_MEM_MGT_EXTENSIONS
	.comm	_IB_DEVICE_SG_GAPS_REG,4,2      ; @IB_DEVICE_SG_GAPS_REG
	.comm	_SIZE_4K,4,2                    ; @SIZE_4K
	.comm	_uint,4,2                       ; @uint
	.comm	_ISCSI_ISER_MAX_SG_TABLESIZE,2,1 ; @ISCSI_ISER_MAX_SG_TABLESIZE
	.no_dead_strip	_iser_calc_scsi_params
.subsections_via_symbols
