	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function memac_initialization
_memac_initialization:                  ## @memac_initialization
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %r15
	leaq	-32(%rbp), %rsi
	callq	_set_fman_mac_params
	movq	(%r15), %rax
	movq	_SPEED_10000@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_PHY_INTERFACE_MODE_XGMII@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
LBB0_2:
	leaq	-32(%rbp), %rdi
	callq	_memac_config
	movl	%eax, (%r14)
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_fman_get_max_frm
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_memac_cfg_max_frame_len
	testl	%eax, %eax
	js	LBB0_5
## %bb.7:
	movl	(%r14), %edi
	movl	$1, %esi
	callq	_memac_cfg_reset_on_init
	testl	%eax, %eax
	js	LBB0_5
## %bb.8:
	movl	(%r14), %edi
	movl	12(%r15), %esi
	callq	_memac_cfg_fixed_link
	testl	%eax, %eax
	js	LBB0_5
## %bb.9:
	movl	(%r14), %edi
	callq	_memac_init
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_6
## %bb.10:
	movl	8(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_info
	jmp	LBB0_11
LBB0_5:
	movl	%eax, %ebx
LBB0_6:
	movl	(%r14), %edi
	callq	_memac_free
	jmp	LBB0_11
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SPEED_10000,8,3                ## @SPEED_10000
	.comm	_PHY_INTERFACE_MODE_XGMII,4,2   ## @PHY_INTERFACE_MODE_XGMII
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FMan MEMAC\n"

	.no_dead_strip	_memac_initialization
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function memac_initialization
_memac_initialization:                  ; @memac_initialization
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	x21, [x0, #8]
	add	x1, sp, #8
	bl	_set_fman_mac_params
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _SPEED_10000@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SPEED_10000@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _PHY_INTERFACE_MODE_XGMII@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PHY_INTERFACE_MODE_XGMII@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [sp, #8]
LBB0_2:
	add	x0, sp, #8
	bl	_memac_config
	str	w0, [x19]
	cbz	w0, LBB0_10
; %bb.3:
	mov	x20, x0
	bl	_fman_get_max_frm
	mov	x1, x0
	mov	x0, x20
	bl	_memac_cfg_max_frame_len
	tbnz	w0, #31, LBB0_8
; %bb.4:
	ldr	w0, [x19]
	mov	w1, #1
	bl	_memac_cfg_reset_on_init
	tbnz	w0, #31, LBB0_8
; %bb.5:
	ldr	w0, [x19]
	ldr	w1, [x21, #12]
	bl	_memac_cfg_fixed_link
	tbnz	w0, #31, LBB0_8
; %bb.6:
	ldr	w0, [x19]
	bl	_memac_init
	mov	x20, x0
	tbnz	w0, #31, LBB0_9
; %bb.7:
	ldr	w0, [x21, #8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
	b	LBB0_11
LBB0_8:
	mov	x20, x0
LBB0_9:
	ldr	w0, [x19]
	bl	_memac_free
	b	LBB0_11
LBB0_10:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_11:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SPEED_10000,8,3                ; @SPEED_10000
	.comm	_PHY_INTERFACE_MODE_XGMII,4,2   ; @PHY_INTERFACE_MODE_XGMII
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FMan MEMAC\n"

	.no_dead_strip	_memac_initialization
.subsections_via_symbols
