	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_hv_vhca_agent_write       ## -- Begin function mlx5_hv_vhca_agent_write
	.p2align	4, 0x90
_mlx5_hv_vhca_agent_write:              ## @mlx5_hv_vhca_agent_write
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	_HV_CONFIG_BLOCK_SIZE_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	imull	(%rdi), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	$0, -60(%rbp)
	testl	%edx, %edx
	je	LBB0_6
## %bb.1:
	movl	%edx, %ecx
	xorl	%r13d, %r13d
	leaq	-48(%rbp), %r12
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	$0, -48(%rbp)
	movslq	%r13d, %rdx
	addq	-80(%rbp), %rdx                 ## 8-byte Folded Reload
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	leaq	-60(%rbp), %r8
	callq	_mlx5_hv_vhca_data_block_prepare
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %r15d
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	movq	%r12, %r14
	movq	%r12, %rsi
	movl	$4, %edx
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	callq	_mlx5_hv_write_config
	testl	%eax, %eax
	jne	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	addl	%r15d, %r13d
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	subl	%r15d, %ecx
	movq	%r14, %r12
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_2
LBB0_6:
	movq	%rbx, %rdi
	callq	_mlx5_hv_vhca_agent_seq_update
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HV_CONFIG_BLOCK_SIZE_MAX,4,2   ## @HV_CONFIG_BLOCK_SIZE_MAX
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_hv_vhca_agent_write       ; -- Begin function mlx5_hv_vhca_agent_write
	.p2align	2
_mlx5_hv_vhca_agent_write:              ; @mlx5_hv_vhca_agent_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	w8, [x0]
Lloh0:
	adrp	x9, _HV_CONFIG_BLOCK_SIZE_MAX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HV_CONFIG_BLOCK_SIZE_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	str	wzr, [sp, #12]
	cbz	w2, LBB0_5
; %bb.1:
	mov	x20, x2
	mov	x21, x1
	mov	w24, #0
	mul	w22, w9, w8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	str	wzr, [sp, #8]
	add	x2, x21, w24, sxtw
	add	x1, sp, #8
	add	x4, sp, #12
	mov	x0, x19
	mov	x3, x20
	bl	_mlx5_hv_vhca_data_block_prepare
	cbz	w0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x23, x0
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	add	x1, sp, #8
	mov	w2, #4
	mov	x3, x22
	bl	_mlx5_hv_write_config
	cbnz	w0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w24, w23, w24
	subs	w20, w20, w23
	b.ne	LBB0_2
LBB0_5:
	mov	x0, x19
	bl	_mlx5_hv_vhca_agent_seq_update
	mov	w0, #0
	b	LBB0_7
LBB0_6:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_HV_CONFIG_BLOCK_SIZE_MAX,4,2   ; @HV_CONFIG_BLOCK_SIZE_MAX
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
