	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlxsw_env_get_module_eeprom    ## -- Begin function mlxsw_env_get_module_eeprom
	.p2align	4, 0x90
_mlxsw_env_get_module_eeprom:           ## @mlxsw_env_get_module_eeprom
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movl	4(%rcx), %edx
	testl	%edx, %edx
	je	LBB0_1
## %bb.2:
	movq	%r8, %r15
	movq	%rcx, %rbx
	movq	%rdi, %r13
	movl	(%rcx), %r14d
	xorl	%r12d, %r12d
	movq	%r8, %rdi
	xorl	%esi, %esi
	callq	_memset
	movl	4(%rbx), %ecx
	testl	%ecx, %ecx
	jle	LBB0_8
## %bb.3:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	subl	%r13d, %ecx
	movslq	%r13d, %rax
	leaq	(%r15,%rax,4), %r8
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r14d, %edx
	leaq	-48(%rbp), %r9
	callq	_mlxsw_env_query_module_eeprom
	testl	%eax, %eax
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	-48(%rbp), %eax
	addl	%eax, %r13d
	addl	%eax, %r14d
	movl	4(%rbx), %ecx
	cmpl	%r13d, %ecx
	jg	LBB0_4
## %bb.7:
	xorl	%r12d, %r12d
	jmp	LBB0_8
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_8
LBB0_5:
	movl	%eax, %r12d
	leaq	L_.str(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_netdev_err
LBB0_8:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Eeprom query failed\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlxsw_env_get_module_eeprom    ; -- Begin function mlxsw_env_get_module_eeprom
	.p2align	2
_mlxsw_env_get_module_eeprom:           ; @mlxsw_env_get_module_eeprom
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x22, x2
	ldr	w2, [x3, #4]
	cbz	w2, LBB0_6
; %bb.1:
	mov	x20, x4
	mov	x21, x3
	mov	x23, x1
	mov	x19, x0
	ldr	w24, [x3]
	mov	x0, x4
	mov	w1, #0
	bl	_memset
	ldr	w8, [x21, #4]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.2:
	mov	w26, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	sub	w3, w8, w26
	add	x4, x20, w26, sxtw #2
	add	x5, sp, #12
	mov	x0, x23
	mov	x1, x22
	mov	x2, x24
	bl	_mlxsw_env_query_module_eeprom
	cbnz	w0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w9, [sp, #12]
	add	w24, w9, w24
	ldr	w8, [x21, #4]
	add	w26, w9, w26
	cmp	w8, w26
	b.gt	LBB0_3
LBB0_5:
	mov	w25, #0
	b	LBB0_8
LBB0_6:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_8
LBB0_7:
	mov	x25, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
LBB0_8:
	mov	x0, x25
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Eeprom query failed\n"

.subsections_via_symbols
