	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ibmvnic_send_req_caps
_ibmvnic_send_req_caps:                 ## @ibmvnic_send_req_caps
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	testl	%esi, %esi
	je	LBB0_1
LBB0_22:
	leaq	-48(%rbp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movq	_IBMVNIC_CRQ_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -28(%rbp)
	movq	_REQUEST_CAPABILITY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	movq	_REQ_TX_QUEUES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_be16
	movq	%rax, -40(%rbp)
	movl	28(%rbx), %edi
	callq	_cpu_to_be64
	movq	%rax, -48(%rbp)
	leaq	52(%rbx), %r14
	movq	%r14, %rdi
	callq	_atomic_inc
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_ibmvnic_send_crq
	movq	_REQ_RX_QUEUES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_be16
	movq	%rax, -40(%rbp)
	movl	36(%rbx), %edi
	callq	_cpu_to_be64
	movq	%rax, -48(%rbp)
	movq	%r14, %rdi
	callq	_atomic_inc
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_ibmvnic_send_crq
	movq	_REQ_RX_ADD_QUEUES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_be16
	movq	%rax, -40(%rbp)
	movl	44(%rbx), %edi
	callq	_cpu_to_be64
	movq	%rax, -48(%rbp)
	movq	%r14, %rdi
	callq	_atomic_inc
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_ibmvnic_send_crq
	movq	_REQ_TX_ENTRIES_PER_SUBCRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_be16
	movq	%rax, -40(%rbp)
	movl	20(%rbx), %edi
	callq	_cpu_to_be64
	movq	%rax, -48(%rbp)
	movq	%r14, %rdi
	callq	_atomic_inc
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_ibmvnic_send_crq
	movq	_REQ_RX_ADD_ENTRIES_PER_SUBCRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_be16
	movq	%rax, -40(%rbp)
	movl	24(%rbx), %edi
	callq	_cpu_to_be64
	movq	%rax, -48(%rbp)
	movq	%r14, %rdi
	callq	_atomic_inc
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_ibmvnic_send_crq
	movq	_REQ_MTU@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_be16
	movq	%rax, -40(%rbp)
	movl	8(%rbx), %edi
	callq	_cpu_to_be64
	movq	%rax, -48(%rbp)
	movq	%r14, %rdi
	callq	_atomic_inc
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_ibmvnic_send_crq
	movq	64(%rbx), %rax
	movq	_IFF_PROMISC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 4(%rax)
	je	LBB0_25
## %bb.23:
	cmpq	$0, 56(%rbx)
	je	LBB0_27
## %bb.24:
	movq	_PROMISC_REQUESTED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_be16
	movq	%rax, -40(%rbp)
	movl	$1, %edi
	jmp	LBB0_26
LBB0_1:
	movq	96(%rbx), %rdi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	sarl	$2, %eax
	cmpl	%eax, (%rbx)
	jg	LBB0_28
## %bb.2:
	cmpl	%eax, 4(%rbx)
	jle	LBB0_3
LBB0_28:
	leaq	L_.str(%rip), %rsi
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
LBB0_25:
	movq	_PROMISC_REQUESTED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_be16
	movq	%rax, -40(%rbp)
	xorl	%edi, %edi
LBB0_26:
	callq	_cpu_to_be64
	movq	%rax, -48(%rbp)
	movq	%r14, %rdi
	callq	_atomic_inc
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_ibmvnic_send_crq
LBB0_27:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	72(%rbx), %esi
	testl	%esi, %esi
	jne	LBB0_5
## %bb.4:
	movq	64(%rbx), %rax
	movq	_ETH_HLEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	addl	(%rax), %esi
LBB0_5:
	movl	%esi, 8(%rbx)
	movl	76(%rbx), %r8d
	testl	%r8d, %r8d
	jne	LBB0_7
## %bb.6:
	movl	12(%rbx), %r8d
	movl	%r8d, 76(%rbx)
LBB0_7:
	movl	80(%rbx), %edi
	testl	%edi, %edi
	jne	LBB0_9
## %bb.8:
	movl	16(%rbx), %edi
	movl	%edi, 80(%rbx)
LBB0_9:
	movq	_IBMVNIC_MAX_LTB_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_IBMVNIC_BUFFER_HLEN@GOTPCREL(%rip), %rax
	addl	(%rax), %esi
	movl	%ecx, %eax
	cltd
	idivl	%esi
	movl	%r8d, %edx
	imull	%esi, %edx
	cmpl	%ecx, %edx
	jle	LBB0_11
## %bb.10:
	movl	%eax, 76(%rbx)
	movl	%eax, %r8d
LBB0_11:
	imull	%edi, %esi
	cmpl	%ecx, %esi
	jle	LBB0_13
## %bb.12:
	movl	%eax, 80(%rbx)
	movl	%eax, %edi
LBB0_13:
	testl	%r8d, %r8d
	jne	LBB0_15
## %bb.14:
	movl	12(%rbx), %r8d
LBB0_15:
	movl	%r8d, 20(%rbx)
	testl	%edi, %edi
	jne	LBB0_17
## %bb.16:
	movl	16(%rbx), %edi
LBB0_17:
	movl	%edi, 24(%rbx)
	movl	84(%rbx), %eax
	testl	%eax, %eax
	jne	LBB0_19
## %bb.18:
	movl	32(%rbx), %eax
LBB0_19:
	movl	%eax, 28(%rbx)
	movl	88(%rbx), %eax
	testl	%eax, %eax
	jne	LBB0_21
## %bb.20:
	movl	40(%rbx), %eax
LBB0_21:
	movl	%eax, 36(%rbx)
	movl	48(%rbx), %eax
	movl	%eax, 44(%rbx)
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Fatal, invalid entries per sub-crq\n"

	.comm	_ETH_HLEN,4,2                   ## @ETH_HLEN
	.comm	_IBMVNIC_MAX_LTB_SIZE,4,2       ## @IBMVNIC_MAX_LTB_SIZE
	.comm	_IBMVNIC_BUFFER_HLEN,4,2        ## @IBMVNIC_BUFFER_HLEN
	.comm	_IBMVNIC_CRQ_CMD,4,2            ## @IBMVNIC_CRQ_CMD
	.comm	_REQUEST_CAPABILITY,4,2         ## @REQUEST_CAPABILITY
	.comm	_REQ_TX_QUEUES,4,2              ## @REQ_TX_QUEUES
	.comm	_REQ_RX_QUEUES,4,2              ## @REQ_RX_QUEUES
	.comm	_REQ_RX_ADD_QUEUES,4,2          ## @REQ_RX_ADD_QUEUES
	.comm	_REQ_TX_ENTRIES_PER_SUBCRQ,4,2  ## @REQ_TX_ENTRIES_PER_SUBCRQ
	.comm	_REQ_RX_ADD_ENTRIES_PER_SUBCRQ,4,2 ## @REQ_RX_ADD_ENTRIES_PER_SUBCRQ
	.comm	_REQ_MTU,4,2                    ## @REQ_MTU
	.comm	_IFF_PROMISC,4,2                ## @IFF_PROMISC
	.comm	_PROMISC_REQUESTED,4,2          ## @PROMISC_REQUESTED
	.no_dead_strip	_ibmvnic_send_req_caps
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ibmvnic_send_req_caps
_ibmvnic_send_req_caps:                 ; @ibmvnic_send_req_caps
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x0
	cbz	w1, LBB0_4
LBB0_1:
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #24
	bl	_memset
Lloh0:
	adrp	x8, _IBMVNIC_CRQ_CMD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IBMVNIC_CRQ_CMD@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _REQUEST_CAPABILITY@GOTPAGE
Lloh4:
	ldr	x9, [x9, _REQUEST_CAPABILITY@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #24]
Lloh6:
	adrp	x8, _REQ_TX_QUEUES@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REQ_TX_QUEUES@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_cpu_to_be16
	str	x0, [sp, #16]
	ldr	w0, [x19, #28]
	bl	_cpu_to_be64
	str	x0, [sp, #8]
	add	x20, x19, #52
	mov	x0, x20
	bl	_atomic_inc
	add	x1, sp, #8
	mov	x0, x19
	bl	_ibmvnic_send_crq
Lloh9:
	adrp	x8, _REQ_RX_QUEUES@GOTPAGE
Lloh10:
	ldr	x8, [x8, _REQ_RX_QUEUES@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_cpu_to_be16
	str	x0, [sp, #16]
	ldr	w0, [x19, #36]
	bl	_cpu_to_be64
	str	x0, [sp, #8]
	mov	x0, x20
	bl	_atomic_inc
	add	x1, sp, #8
	mov	x0, x19
	bl	_ibmvnic_send_crq
Lloh12:
	adrp	x8, _REQ_RX_ADD_QUEUES@GOTPAGE
Lloh13:
	ldr	x8, [x8, _REQ_RX_ADD_QUEUES@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_cpu_to_be16
	str	x0, [sp, #16]
	ldr	w0, [x19, #44]
	bl	_cpu_to_be64
	str	x0, [sp, #8]
	mov	x0, x20
	bl	_atomic_inc
	add	x1, sp, #8
	mov	x0, x19
	bl	_ibmvnic_send_crq
Lloh15:
	adrp	x8, _REQ_TX_ENTRIES_PER_SUBCRQ@GOTPAGE
Lloh16:
	ldr	x8, [x8, _REQ_TX_ENTRIES_PER_SUBCRQ@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_cpu_to_be16
	str	x0, [sp, #16]
	ldr	w0, [x19, #20]
	bl	_cpu_to_be64
	str	x0, [sp, #8]
	mov	x0, x20
	bl	_atomic_inc
	add	x1, sp, #8
	mov	x0, x19
	bl	_ibmvnic_send_crq
Lloh18:
	adrp	x8, _REQ_RX_ADD_ENTRIES_PER_SUBCRQ@GOTPAGE
Lloh19:
	ldr	x8, [x8, _REQ_RX_ADD_ENTRIES_PER_SUBCRQ@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_cpu_to_be16
	str	x0, [sp, #16]
	ldr	w0, [x19, #24]
	bl	_cpu_to_be64
	str	x0, [sp, #8]
	mov	x0, x20
	bl	_atomic_inc
	add	x1, sp, #8
	mov	x0, x19
	bl	_ibmvnic_send_crq
Lloh21:
	adrp	x8, _REQ_MTU@GOTPAGE
Lloh22:
	ldr	x8, [x8, _REQ_MTU@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	bl	_cpu_to_be16
	str	x0, [sp, #16]
	ldr	w0, [x19, #8]
	bl	_cpu_to_be64
	str	x0, [sp, #8]
	mov	x0, x20
	bl	_atomic_inc
	add	x1, sp, #8
	mov	x0, x19
	bl	_ibmvnic_send_crq
	ldr	x8, [x19, #64]
	ldr	w8, [x8, #4]
Lloh24:
	adrp	x9, _IFF_PROMISC@GOTPAGE
Lloh25:
	ldr	x9, [x9, _IFF_PROMISC@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.2:
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_9
; %bb.3:
Lloh27:
	adrp	x8, _PROMISC_REQUESTED@GOTPAGE
Lloh28:
	ldr	x8, [x8, _PROMISC_REQUESTED@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	bl	_cpu_to_be16
	str	x0, [sp, #16]
	mov	w0, #1
	b	LBB0_8
LBB0_4:
	ldr	x0, [x19, #96]
Lloh30:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh31:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	asr	w8, w8, #2
	ldr	w9, [x19]
	cmp	w9, w8
	b.gt	LBB0_6
; %bb.5:
	ldr	w9, [x19, #4]
	cmp	w9, w8
	b.le	LBB0_10
LBB0_6:
Lloh33:
	adrp	x1, l_.str@PAGE
Lloh34:
	add	x1, x1, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_dev_err
LBB0_7:
Lloh35:
	adrp	x8, _PROMISC_REQUESTED@GOTPAGE
Lloh36:
	ldr	x8, [x8, _PROMISC_REQUESTED@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
	bl	_cpu_to_be16
	str	x0, [sp, #16]
	mov	w0, #0
LBB0_8:
	bl	_cpu_to_be64
	str	x0, [sp, #8]
	mov	x0, x20
	bl	_atomic_inc
	add	x1, sp, #8
	mov	x0, x19
	bl	_ibmvnic_send_crq
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_10:
	ldr	w10, [x19, #72]
	cbnz	w10, LBB0_12
; %bb.11:
	ldr	x8, [x19, #64]
	ldr	w8, [x8]
Lloh38:
	adrp	x9, _ETH_HLEN@GOTPAGE
Lloh39:
	ldr	x9, [x9, _ETH_HLEN@GOTPAGEOFF]
Lloh40:
	ldr	w9, [x9]
	add	w10, w9, w8
LBB0_12:
	str	w10, [x19, #8]
	ldr	w8, [x19, #76]
	cbnz	w8, LBB0_14
; %bb.13:
	ldr	w8, [x19, #12]
	str	w8, [x19, #76]
LBB0_14:
	ldr	w9, [x19, #80]
	cbnz	w9, LBB0_16
; %bb.15:
	ldr	w9, [x19, #16]
	str	w9, [x19, #80]
LBB0_16:
Lloh41:
	adrp	x11, _IBMVNIC_MAX_LTB_SIZE@GOTPAGE
Lloh42:
	ldr	x11, [x11, _IBMVNIC_MAX_LTB_SIZE@GOTPAGEOFF]
Lloh43:
	adrp	x12, _IBMVNIC_BUFFER_HLEN@GOTPAGE
Lloh44:
	ldr	x12, [x12, _IBMVNIC_BUFFER_HLEN@GOTPAGEOFF]
Lloh45:
	ldr	w11, [x11]
Lloh46:
	ldr	w12, [x12]
	add	w12, w12, w10
	sdiv	w10, w11, w12
	mul	w13, w8, w12
	cmp	w13, w11
	b.le	LBB0_18
; %bb.17:
	str	w10, [x19, #76]
	mov	x8, x10
LBB0_18:
	mul	w12, w9, w12
	cmp	w12, w11
	b.gt	LBB0_26
; %bb.19:
	cbz	w8, LBB0_27
LBB0_20:
	str	w8, [x19, #20]
	cbz	w9, LBB0_28
LBB0_21:
	str	w9, [x19, #24]
	ldr	w8, [x19, #84]
	cbnz	w8, LBB0_23
; %bb.22:
	ldr	w8, [x19, #32]
LBB0_23:
	str	w8, [x19, #28]
	ldr	w8, [x19, #88]
	cbnz	w8, LBB0_25
; %bb.24:
	ldr	w8, [x19, #40]
LBB0_25:
	str	w8, [x19, #36]
	ldr	w8, [x19, #48]
	str	w8, [x19, #44]
	b	LBB0_1
LBB0_26:
	str	w10, [x19, #80]
	mov	x9, x10
	cbnz	w8, LBB0_20
LBB0_27:
	ldr	w8, [x19, #12]
	str	w8, [x19, #20]
	cbnz	w9, LBB0_21
LBB0_28:
	ldr	w9, [x19, #16]
	b	LBB0_21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Fatal, invalid entries per sub-crq\n"

	.comm	_ETH_HLEN,4,2                   ; @ETH_HLEN
	.comm	_IBMVNIC_MAX_LTB_SIZE,4,2       ; @IBMVNIC_MAX_LTB_SIZE
	.comm	_IBMVNIC_BUFFER_HLEN,4,2        ; @IBMVNIC_BUFFER_HLEN
	.comm	_IBMVNIC_CRQ_CMD,4,2            ; @IBMVNIC_CRQ_CMD
	.comm	_REQUEST_CAPABILITY,4,2         ; @REQUEST_CAPABILITY
	.comm	_REQ_TX_QUEUES,4,2              ; @REQ_TX_QUEUES
	.comm	_REQ_RX_QUEUES,4,2              ; @REQ_RX_QUEUES
	.comm	_REQ_RX_ADD_QUEUES,4,2          ; @REQ_RX_ADD_QUEUES
	.comm	_REQ_TX_ENTRIES_PER_SUBCRQ,4,2  ; @REQ_TX_ENTRIES_PER_SUBCRQ
	.comm	_REQ_RX_ADD_ENTRIES_PER_SUBCRQ,4,2 ; @REQ_RX_ADD_ENTRIES_PER_SUBCRQ
	.comm	_REQ_MTU,4,2                    ; @REQ_MTU
	.comm	_IFF_PROMISC,4,2                ; @IFF_PROMISC
	.comm	_PROMISC_REQUESTED,4,2          ; @PROMISC_REQUESTED
	.no_dead_strip	_ibmvnic_send_req_caps
.subsections_via_symbols
