	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx5_fpga_mem_write_i2c
_mlx5_fpga_mem_write_i2c:               ## @mlx5_fpga_mem_write_i2c
	.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	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.3:
	movq	%rdi, %rbx
	cmpl	$0, (%rdi)
	je	LBB0_7
## %bb.4:
	movq	%rsi, %r13
	movq	_MLX5_FPGA_ACCESS_REG_SIZE_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rsi
	subq	%r12, %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_min
	movq	%rax, %r15
	movl	(%rbx), %edi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	(%r12,%rax), %rdx
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r12,8), %rcx
	movq	%r15, %rsi
	movl	$1, %r8d
	callq	_mlx5_fpga_access_reg
	testl	%eax, %eax
	jne	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	addq	%r15, %r12
	cmpq	%r13, %r12
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jb	LBB0_5
## %bb.9:
	xorl	%r14d, %r14d
	jmp	LBB0_10
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_7:
	movq	_ENOTCONN@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_10
LBB0_6:
	movl	%eax, %r14d
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mlx5_fpga_err
LBB0_10:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX5_FPGA_ACCESS_REG_SIZE_MAX,8,3 ## @MLX5_FPGA_ACCESS_REG_SIZE_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOTCONN,4,2                   ## @ENOTCONN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to write FPGA crspace\n"

	.no_dead_strip	_mlx5_fpga_mem_write_i2c
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx5_fpga_mem_write_i2c
_mlx5_fpga_mem_write_i2c:               ; @mlx5_fpga_mem_write_i2c
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	cbz	x1, LBB0_6
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0]
	cbz	w8, LBB0_7
; %bb.2:
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x26, #0
Lloh0:
	adrp	x8, _MLX5_FPGA_ACCESS_REG_SIZE_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLX5_FPGA_ACCESS_REG_SIZE_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x23, [x8]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	sub	x1, x22, x26
	mov	x0, x23
	bl	_min
	mov	x25, x0
	ldr	w0, [x19]
	add	x2, x26, x21
	add	x3, x20, x26, lsl #3
	mov	x1, x25
	mov	w4, #1
	bl	_mlx5_fpga_access_reg
	cbnz	w0, LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x26, x25, x26
	cmp	x26, x22
	b.lo	LBB0_3
; %bb.5:
	mov	w24, #0
	b	LBB0_10
LBB0_6:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh5:
	adrp	x8, _ENOTCONN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOTCONN@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_10
LBB0_9:
	mov	x24, x0
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_mlx5_fpga_err
LBB0_10:
	mov	x0, x24
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX5_FPGA_ACCESS_REG_SIZE_MAX,8,3 ; @MLX5_FPGA_ACCESS_REG_SIZE_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOTCONN,4,2                   ; @ENOTCONN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to write FPGA crspace\n"

	.no_dead_strip	_mlx5_fpga_mem_write_i2c
.subsections_via_symbols
