	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx4_en_set_wol
_mlx4_en_set_wol:                       ## @mlx4_en_set_wol
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	callq	_netdev_priv
	movq	%rax, %r15
	movl	$0, -36(%rbp)
	movl	(%rax), %edx
	leal	-3(%rdx), %eax
	cmpl	$-3, %eax
	jbe	LBB0_1
## %bb.3:
	cmpl	$1, %edx
	jne	LBB0_4
## %bb.5:
	movq	_MLX4_DEV_CAP_FLAG_WOL_PORT1@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	movq	_MLX4_DEV_CAP_FLAG_WOL_PORT2@GOTPCREL(%rip), %rax
LBB0_6:
	movq	8(%r15), %rcx
	movq	(%rcx), %rdi
	movl	(%rdi), %ecx
	testl	%ecx, (%rax)
	je	LBB0_1
## %bb.7:
	movq	_WAKE_MAGIC@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	notl	%eax
	testl	%eax, (%r14)
	je	LBB0_9
## %bb.8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_18:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	leaq	-36(%rbp), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_mlx4_wol_read
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_17
LBB0_11:
	movl	(%r12), %eax
	testl	%eax, 4(%r14)
	je	LBB0_13
## %bb.12:
	movq	_MLX4_EN_WOL_DO_MODIFY@GOTPCREL(%rip), %rax
	movq	_MLX4_EN_WOL_ENABLED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_MLX4_EN_WOL_MAGIC@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	orl	-36(%rbp), %esi
	jmp	LBB0_14
LBB0_13:
	movq	_MLX4_EN_WOL_ENABLED@GOTPCREL(%rip), %rax
	movq	_MLX4_EN_WOL_MAGIC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	notl	%esi
	andl	-36(%rbp), %esi
	movq	_MLX4_EN_WOL_DO_MODIFY@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
LBB0_14:
	movl	%esi, -36(%rbp)
	movq	8(%r15), %rax
	movq	(%rax), %rdi
	movl	(%r15), %edx
	callq	_mlx4_wol_write
	testl	%eax, %eax
	je	LBB0_15
## %bb.16:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
LBB0_17:
	movq	%r15, %rdi
	callq	_en_err
	jmp	LBB0_18
LBB0_15:
	xorl	%ebx, %ebx
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_MLX4_DEV_CAP_FLAG_WOL_PORT1,4,2 ## @MLX4_DEV_CAP_FLAG_WOL_PORT1
	.comm	_MLX4_DEV_CAP_FLAG_WOL_PORT2,4,2 ## @MLX4_DEV_CAP_FLAG_WOL_PORT2
	.comm	_WAKE_MAGIC,4,2                 ## @WAKE_MAGIC
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to get WoL info, unable to modify\n"

	.comm	_MLX4_EN_WOL_DO_MODIFY,4,2      ## @MLX4_EN_WOL_DO_MODIFY
	.comm	_MLX4_EN_WOL_ENABLED,4,2        ## @MLX4_EN_WOL_ENABLED
	.comm	_MLX4_EN_WOL_MAGIC,4,2          ## @MLX4_EN_WOL_MAGIC
L_.str.1:                               ## @.str.1
	.asciz	"Failed to set WoL information\n"

	.no_dead_strip	_mlx4_en_set_wol
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx4_en_set_wol
_mlx4_en_set_wol:                       ; @mlx4_en_set_wol
	.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	x20, x1
	bl	_netdev_priv
	str	wzr, [sp, #12]
	ldr	w2, [x0]
	sub	w8, w2, #3
	cmn	w8, #3
	b.ls	LBB0_4
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _MLX4_DEV_CAP_FLAG_WOL_PORT1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLX4_DEV_CAP_FLAG_WOL_PORT1@GOTPAGEOFF]
Lloh2:
	adrp	x9, _MLX4_DEV_CAP_FLAG_WOL_PORT2@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MLX4_DEV_CAP_FLAG_WOL_PORT2@GOTPAGEOFF]
	cmp	w2, #1
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
	ldr	x9, [x0, #8]
	ldr	x0, [x9]
	ldr	w9, [x0]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
	ldr	w8, [x20]
Lloh4:
	adrp	x22, _WAKE_MAGIC@GOTPAGE
Lloh5:
	ldr	x22, [x22, _WAKE_MAGIC@GOTPAGEOFF]
	ldr	w9, [x22]
	bics	wzr, w8, w9
	b.eq	LBB0_7
; %bb.3:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh8:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_6:
	mov	x0, x21
	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
LBB0_7:
	add	x1, sp, #12
	bl	_mlx4_wol_read
	cbz	w0, LBB0_9
; %bb.8:
	mov	x21, x0
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_14
LBB0_9:
	ldr	w8, [x20, #4]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.10:
Lloh12:
	adrp	x8, _MLX4_EN_WOL_DO_MODIFY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MLX4_EN_WOL_DO_MODIFY@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _MLX4_EN_WOL_ENABLED@GOTPAGE
Lloh16:
	ldr	x9, [x9, _MLX4_EN_WOL_ENABLED@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh18:
	adrp	x9, _MLX4_EN_WOL_MAGIC@GOTPAGE
Lloh19:
	ldr	x9, [x9, _MLX4_EN_WOL_MAGIC@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [sp, #12]
	orr	w1, w8, w9
	b	LBB0_12
LBB0_11:
Lloh21:
	adrp	x8, _MLX4_EN_WOL_ENABLED@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MLX4_EN_WOL_ENABLED@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
Lloh24:
	adrp	x9, _MLX4_EN_WOL_MAGIC@GOTPAGE
Lloh25:
	ldr	x9, [x9, _MLX4_EN_WOL_MAGIC@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [sp, #12]
	bic	w8, w9, w8
Lloh27:
	adrp	x9, _MLX4_EN_WOL_DO_MODIFY@GOTPAGE
Lloh28:
	ldr	x9, [x9, _MLX4_EN_WOL_DO_MODIFY@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	orr	w1, w9, w8
LBB0_12:
	str	w1, [sp, #12]
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
	ldr	w2, [x19]
	bl	_mlx4_wol_write
	mov	x21, x0
	cbz	w0, LBB0_6
; %bb.13:
Lloh30:
	adrp	x1, l_.str.1@PAGE
Lloh31:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_14:
	mov	x0, x19
	bl	_en_err
	b	LBB0_6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_MLX4_DEV_CAP_FLAG_WOL_PORT1,4,2 ; @MLX4_DEV_CAP_FLAG_WOL_PORT1
	.comm	_MLX4_DEV_CAP_FLAG_WOL_PORT2,4,2 ; @MLX4_DEV_CAP_FLAG_WOL_PORT2
	.comm	_WAKE_MAGIC,4,2                 ; @WAKE_MAGIC
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to get WoL info, unable to modify\n"

	.comm	_MLX4_EN_WOL_DO_MODIFY,4,2      ; @MLX4_EN_WOL_DO_MODIFY
	.comm	_MLX4_EN_WOL_ENABLED,4,2        ; @MLX4_EN_WOL_ENABLED
	.comm	_MLX4_EN_WOL_MAGIC,4,2          ; @MLX4_EN_WOL_MAGIC
l_.str.1:                               ; @.str.1
	.asciz	"Failed to set WoL information\n"

	.no_dead_strip	_mlx4_en_set_wol
.subsections_via_symbols
