	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_emad_alloc
_mlxsw_emad_alloc:                      ## @mlxsw_emad_alloc
	.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	_MLXSW_EMAD_ETH_HDR_LEN@GOTPCREL(%rip), %rax
	addq	(%rax), %rsi
	movq	(%rdi), %rax
	addq	(%rax), %rsi
	movq	_MLXSW_EMAD_OP_TLV_LEN@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	_MLXSW_EMAD_END_TLV_LEN@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	addq	%rax, %rcx
	leaq	(%rsi,%rcx,4), %rbx
	addq	$4, %rbx
	movq	_MLXSW_EMAD_MAX_FRAME_LEN@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jle	LBB0_2
## %bb.1:
	xorl	%r15d, %r15d
	jmp	LBB0_4
LBB0_2:
	xorl	%r15d, %r15d
	xorl	%edi, %edi
	movq	%rbx, %rsi
	callq	_netdev_alloc_skb
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rax, %r14
	movl	(%rax), %edi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	callq	_memset
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_skb_reserve
	movq	%r14, %r15
LBB0_4:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLXSW_EMAD_ETH_HDR_LEN,8,3     ## @MLXSW_EMAD_ETH_HDR_LEN
	.comm	_MLXSW_EMAD_OP_TLV_LEN,4,2      ## @MLXSW_EMAD_OP_TLV_LEN
	.comm	_MLXSW_EMAD_END_TLV_LEN,4,2     ## @MLXSW_EMAD_END_TLV_LEN
	.comm	_MLXSW_EMAD_MAX_FRAME_LEN,8,3   ## @MLXSW_EMAD_MAX_FRAME_LEN
	.no_dead_strip	_mlxsw_emad_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxsw_emad_alloc
_mlxsw_emad_alloc:                      ; @mlxsw_emad_alloc
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _MLXSW_EMAD_ETH_HDR_LEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLXSW_EMAD_ETH_HDR_LEN@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x9, [x0]
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _MLXSW_EMAD_OP_TLV_LEN@GOTPAGE
Lloh4:
	ldr	x10, [x10, _MLXSW_EMAD_OP_TLV_LEN@GOTPAGEOFF]
	add	x8, x1, x8
	add	x8, x8, x9
Lloh5:
	ldr	w9, [x10]
Lloh6:
	adrp	x10, _MLXSW_EMAD_END_TLV_LEN@GOTPAGE
Lloh7:
	ldr	x10, [x10, _MLXSW_EMAD_END_TLV_LEN@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	add	w9, w10, w9
	add	x8, x8, w9, sxtw #2
	add	x19, x8, #4
Lloh9:
	adrp	x8, _MLXSW_EMAD_MAX_FRAME_LEN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MLXSW_EMAD_MAX_FRAME_LEN@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x19, x8
	b.le	LBB0_2
; %bb.1:
	mov	x20, #0
	b	LBB0_4
LBB0_2:
	mov	x0, #0
	mov	x1, x19
	bl	_netdev_alloc_skb
	mov	x20, x0
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w0, [x20]
	mov	w1, #0
	mov	x2, x19
	bl	_memset
	mov	x0, x20
	mov	x1, x19
	bl	_skb_reserve
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MLXSW_EMAD_ETH_HDR_LEN,8,3     ; @MLXSW_EMAD_ETH_HDR_LEN
	.comm	_MLXSW_EMAD_OP_TLV_LEN,4,2      ; @MLXSW_EMAD_OP_TLV_LEN
	.comm	_MLXSW_EMAD_END_TLV_LEN,4,2     ; @MLXSW_EMAD_END_TLV_LEN
	.comm	_MLXSW_EMAD_MAX_FRAME_LEN,8,3   ; @MLXSW_EMAD_MAX_FRAME_LEN
	.no_dead_strip	_mlxsw_emad_alloc
.subsections_via_symbols
