	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ehea_set_portspeed             ## -- Begin function ehea_set_portspeed
	.p2align	4, 0x90
_ehea_set_portspeed:                    ## @ehea_set_portspeed
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_get_zeroed_page
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %r14
	movl	%ebx, (%rax)
	movl	16(%r15), %edi
	callq	_netif_carrier_off
	movq	40(%r15), %rax
	movl	(%rax), %edi
	movl	32(%r15), %esi
	movq	_H_PORT_CB4@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_H_PORT_CB4_SPEED@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movq	%r14, %r8
	callq	_ehea_h_modify_ehea_port
	movq	_H_SUCCESS@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jne	LBB0_7
## %bb.2:
	movq	_EHEA_SPEED_AUTONEG@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	cmpq	%rbx, (%rax)
	sete	%cl
	movl	%ecx, (%r15)
	movq	40(%r15), %rax
	movl	(%rax), %edi
	movl	32(%r15), %esi
	movq	_H_PORT_CB4@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r13), %ecx
	movq	%r14, %r8
	callq	_ehea_h_query_ehea_port
	cmpq	(%r12), %rax
	jne	LBB0_9
## %bb.3:
	movl	(%r14), %eax
	addl	$-128, %eax
	cmpl	$5, %eax
	ja	LBB0_12
## %bb.4:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_5:
	movq	_EHEA_SPEED_1G@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_6:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_26
LBB0_7:
	movq	_H_AUTHORITY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.8:
	leaq	L_.str.2(%rip), %rdi
	callq	_pr_info
	movq	_EPERM@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_9:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_10:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_22
LBB0_11:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	leaq	L_.str.3(%rip), %rdi
	callq	_pr_err
	jmp	LBB0_22
LBB0_12:
	movq	$0, 24(%r15)
	jmp	LBB0_18
LBB0_13:
	movq	_EHEA_SPEED_10M@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_14:
	movq	_EHEA_SPEED_10M@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_15:
	movq	_EHEA_SPEED_10G@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_16:
	movq	_EHEA_SPEED_100M@GOTPCREL(%rip), %rax
LBB0_17:
	movq	(%rax), %rax
	movq	%rax, 24(%r15)
LBB0_18:
	movl	$0, 4(%r15)
	jmp	LBB0_21
LBB0_19:
	movq	_EHEA_SPEED_100M@GOTPCREL(%rip), %rax
LBB0_20:
	movq	(%rax), %rax
	movq	%rax, 24(%r15)
	movl	$1, 4(%r15)
LBB0_21:
	xorl	%ebx, %ebx
LBB0_22:
	movq	_prop_carrier_state@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_24
## %bb.23:
	movq	8(%r15), %rax
	movq	_EHEA_PHY_LINK_UP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_25
LBB0_24:
	movl	16(%r15), %edi
	callq	_netif_carrier_on
LBB0_25:
	movq	%r14, %rdi
	callq	_free_page
LBB0_26:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_19, LBB0_19-LJTI0_0
LJTI0_0:
	.long	L0_0_set_5
	.long	L0_0_set_13
	.long	L0_0_set_14
	.long	L0_0_set_15
	.long	L0_0_set_16
	.long	L0_0_set_19
	.end_data_region
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no mem for cb4\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_H_PORT_CB4,4,2                 ## @H_PORT_CB4
	.comm	_H_PORT_CB4_SPEED,4,2           ## @H_PORT_CB4_SPEED
	.comm	_H_SUCCESS,8,3                  ## @H_SUCCESS
	.comm	_EHEA_SPEED_AUTONEG,8,3         ## @EHEA_SPEED_AUTONEG
	.comm	_EHEA_SPEED_10M,8,3             ## @EHEA_SPEED_10M
	.comm	_EHEA_SPEED_100M,8,3            ## @EHEA_SPEED_100M
	.comm	_EHEA_SPEED_1G,8,3              ## @EHEA_SPEED_1G
	.comm	_EHEA_SPEED_10G,8,3             ## @EHEA_SPEED_10G
L_.str.1:                               ## @.str.1
	.asciz	"Failed sensing port speed\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_H_AUTHORITY,8,3                ## @H_AUTHORITY
L_.str.2:                               ## @.str.2
	.asciz	"Hypervisor denied setting port speed\n"

	.comm	_EPERM,4,2                      ## @EPERM
L_.str.3:                               ## @.str.3
	.asciz	"Failed setting port speed\n"

	.comm	_prop_carrier_state,4,2         ## @prop_carrier_state
	.comm	_EHEA_PHY_LINK_UP,8,3           ## @EHEA_PHY_LINK_UP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ehea_set_portspeed             ; -- Begin function ehea_set_portspeed
	.p2align	2
_ehea_set_portspeed:                    ; @ehea_set_portspeed
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_get_zeroed_page
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
	str	w21, [x0]
	ldr	w0, [x19, #16]
	bl	_netif_carrier_off
	ldr	x8, [x19, #40]
	ldr	w0, [x8]
	ldr	w1, [x19, #32]
Lloh3:
	adrp	x22, _H_PORT_CB4@GOTPAGE
Lloh4:
	ldr	x22, [x22, _H_PORT_CB4@GOTPAGEOFF]
	ldr	w2, [x22]
Lloh5:
	adrp	x23, _H_PORT_CB4_SPEED@GOTPAGE
Lloh6:
	ldr	x23, [x23, _H_PORT_CB4_SPEED@GOTPAGEOFF]
	ldr	w3, [x23]
	mov	x4, x20
	bl	_ehea_h_modify_ehea_port
Lloh7:
	adrp	x24, _H_SUCCESS@GOTPAGE
Lloh8:
	ldr	x24, [x24, _H_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.2:
Lloh9:
	adrp	x8, _EHEA_SPEED_AUTONEG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EHEA_SPEED_AUTONEG@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x8, x21
	cset	w8, eq
	str	w8, [x19]
	ldr	x8, [x19, #40]
	ldr	w0, [x8]
	ldr	w1, [x19, #32]
	ldr	w2, [x22]
	ldr	w3, [x23]
	mov	x4, x20
	bl	_ehea_h_query_ehea_port
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.3:
	ldr	w8, [x20]
	sub	w8, w8, #128
	cmp	w8, #5
	b.hi	LBB0_12
; %bb.4:
Lloh12:
	adrp	x9, lJTI0_0@PAGE
Lloh13:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_5
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_5:
	mov	w21, #0
Lloh14:
	adrp	x8, _EHEA_SPEED_1G@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EHEA_SPEED_1G@GOTPAGEOFF]
	b	LBB0_19
LBB0_6:
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_24
LBB0_7:
Lloh21:
	adrp	x8, _H_AUTHORITY@GOTPAGE
Lloh22:
	ldr	x8, [x8, _H_AUTHORITY@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.8:
Lloh24:
	adrp	x0, l_.str.2@PAGE
Lloh25:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_info
Lloh26:
	adrp	x8, _EPERM@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh28:
	adrp	x0, l_.str.1@PAGE
Lloh29:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
Lloh30:
	adrp	x8, _EIO@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_20
LBB0_11:
Lloh32:
	adrp	x8, _EIO@GOTPAGE
Lloh33:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	neg	w21, w8
Lloh35:
	adrp	x0, l_.str.3@PAGE
Lloh36:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_err
	b	LBB0_20
LBB0_12:
	mov	w21, #0
	str	xzr, [x19, #24]
	str	wzr, [x19, #4]
	b	LBB0_20
LBB0_13:
	mov	w21, #0
Lloh37:
	adrp	x8, _EHEA_SPEED_10M@GOTPAGE
Lloh38:
	ldr	x8, [x8, _EHEA_SPEED_10M@GOTPAGEOFF]
	b	LBB0_17
LBB0_14:
	mov	w21, #0
Lloh39:
	adrp	x8, _EHEA_SPEED_10M@GOTPAGE
Lloh40:
	ldr	x8, [x8, _EHEA_SPEED_10M@GOTPAGEOFF]
	b	LBB0_19
LBB0_15:
	mov	w21, #0
Lloh41:
	adrp	x8, _EHEA_SPEED_10G@GOTPAGE
Lloh42:
	ldr	x8, [x8, _EHEA_SPEED_10G@GOTPAGEOFF]
	b	LBB0_19
LBB0_16:
	mov	w21, #0
Lloh43:
	adrp	x8, _EHEA_SPEED_100M@GOTPAGE
Lloh44:
	ldr	x8, [x8, _EHEA_SPEED_100M@GOTPAGEOFF]
LBB0_17:
	ldr	x8, [x8]
	str	x8, [x19, #24]
	str	wzr, [x19, #4]
	b	LBB0_20
LBB0_18:
	mov	w21, #0
Lloh45:
	adrp	x8, _EHEA_SPEED_100M@GOTPAGE
Lloh46:
	ldr	x8, [x8, _EHEA_SPEED_100M@GOTPAGEOFF]
LBB0_19:
	ldr	x8, [x8]
	str	x8, [x19, #24]
	mov	w8, #1
	str	w8, [x19, #4]
LBB0_20:
Lloh47:
	adrp	x8, _prop_carrier_state@GOTPAGE
Lloh48:
	ldr	x8, [x8, _prop_carrier_state@GOTPAGEOFF]
Lloh49:
	ldr	w8, [x8]
	cbz	w8, LBB0_22
; %bb.21:
	ldr	x8, [x19, #8]
Lloh50:
	adrp	x9, _EHEA_PHY_LINK_UP@GOTPAGE
Lloh51:
	ldr	x9, [x9, _EHEA_PHY_LINK_UP@GOTPAGEOFF]
Lloh52:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_23
LBB0_22:
	ldr	w0, [x19, #16]
	bl	_netif_carrier_on
LBB0_23:
	mov	x0, x20
	bl	_free_page
LBB0_24:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_13-LBB0_5)>>2
	.byte	(LBB0_14-LBB0_5)>>2
	.byte	(LBB0_15-LBB0_5)>>2
	.byte	(LBB0_16-LBB0_5)>>2
	.byte	(LBB0_18-LBB0_5)>>2
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no mem for cb4\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_H_PORT_CB4,4,2                 ; @H_PORT_CB4
	.comm	_H_PORT_CB4_SPEED,4,2           ; @H_PORT_CB4_SPEED
	.comm	_H_SUCCESS,8,3                  ; @H_SUCCESS
	.comm	_EHEA_SPEED_AUTONEG,8,3         ; @EHEA_SPEED_AUTONEG
	.comm	_EHEA_SPEED_10M,8,3             ; @EHEA_SPEED_10M
	.comm	_EHEA_SPEED_100M,8,3            ; @EHEA_SPEED_100M
	.comm	_EHEA_SPEED_1G,8,3              ; @EHEA_SPEED_1G
	.comm	_EHEA_SPEED_10G,8,3             ; @EHEA_SPEED_10G
l_.str.1:                               ; @.str.1
	.asciz	"Failed sensing port speed\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_H_AUTHORITY,8,3                ; @H_AUTHORITY
l_.str.2:                               ; @.str.2
	.asciz	"Hypervisor denied setting port speed\n"

	.comm	_EPERM,4,2                      ; @EPERM
l_.str.3:                               ; @.str.3
	.asciz	"Failed setting port speed\n"

	.comm	_prop_carrier_state,4,2         ; @prop_carrier_state
	.comm	_EHEA_PHY_LINK_UP,8,3           ; @EHEA_PHY_LINK_UP
.subsections_via_symbols
