	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hpc_check_cmd_status
_hpc_check_cmd_status:                  ## @hpc_check_cmd_status
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_CMD_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_shpc_readw
	andl	$15, %eax
	movl	%eax, %ebx
	shrl	%ebx
	cmpl	$4, %ebx
	ja	LBB0_6
## %bb.1:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rbx,4), %rdx
	addq	%rcx, %rdx
	jmpq	*%rdx
LBB0_2:
	movq	_SWITCH_OPEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_3
LBB0_4:
	movq	_INVALID_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_3
LBB0_6:
	movl	%eax, %ebx
	jmp	LBB0_7
LBB0_5:
	movq	_INVALID_SPEED_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str.2(%rip), %rsi
LBB0_3:
	movq	%r14, %rdi
	callq	_ctrl_err
LBB0_7:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
LJTI0_0:
	.long	L0_0_set_7
	.long	L0_0_set_2
	.long	L0_0_set_4
	.long	L0_0_set_6
	.long	L0_0_set_5
	.end_data_region
                                        ## -- End function
	.comm	_CMD_STATUS,4,2                 ## @CMD_STATUS
	.comm	_SWITCH_OPEN,4,2                ## @SWITCH_OPEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Switch opened!\n"

	.comm	_INVALID_CMD,4,2                ## @INVALID_CMD
L_.str.1:                               ## @.str.1
	.asciz	"Invalid HPC command!\n"

	.comm	_INVALID_SPEED_MODE,4,2         ## @INVALID_SPEED_MODE
L_.str.2:                               ## @.str.2
	.asciz	"Invalid bus speed/mode!\n"

	.no_dead_strip	_hpc_check_cmd_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hpc_check_cmd_status
_hpc_check_cmd_status:                  ; @hpc_check_cmd_status
	.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
	mov	x20, x0
Lloh0:
	adrp	x8, _CMD_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CMD_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_shpc_readw
	ubfx	w19, w0, #1, #3
	cmp	w19, #4
	b.hi	LBB0_4
; %bb.1:
Lloh3:
	adrp	x8, lJTI0_0@PAGE
Lloh4:
	add	x8, x8, lJTI0_0@PAGEOFF
	adr	x9, LBB0_2
	ldrb	w10, [x8, x19]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_2:
Lloh5:
	adrp	x8, _SWITCH_OPEN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SWITCH_OPEN@GOTPAGEOFF]
Lloh7:
	ldr	w19, [x8]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_3:
Lloh10:
	adrp	x8, _INVALID_CMD@GOTPAGE
Lloh11:
	ldr	x8, [x8, _INVALID_CMD@GOTPAGEOFF]
Lloh12:
	ldr	w19, [x8]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_4:
	and	w19, w0, #0xf
	b	LBB0_7
LBB0_5:
Lloh15:
	adrp	x8, _INVALID_SPEED_MODE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _INVALID_SPEED_MODE@GOTPAGEOFF]
Lloh17:
	ldr	w19, [x8]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_6:
	mov	x0, x20
	bl	_ctrl_err
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
                                        ; -- End function
	.comm	_CMD_STATUS,4,2                 ; @CMD_STATUS
	.comm	_SWITCH_OPEN,4,2                ; @SWITCH_OPEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Switch opened!\n"

	.comm	_INVALID_CMD,4,2                ; @INVALID_CMD
l_.str.1:                               ; @.str.1
	.asciz	"Invalid HPC command!\n"

	.comm	_INVALID_SPEED_MODE,4,2         ; @INVALID_SPEED_MODE
l_.str.2:                               ; @.str.2
	.asciz	"Invalid bus speed/mode!\n"

	.no_dead_strip	_hpc_check_cmd_status
.subsections_via_symbols
