	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cpqhp_hardware_test            ## -- Begin function cpqhp_hardware_test
	.p2align	4, 0x90
_cpqhp_hardware_test:                   ## @cpqhp_hardware_test
	.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
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	_SLOT_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rbx), %rdi
	callq	_readb
	cmpl	$1, %r15d
	jne	LBB0_5
## %bb.1:
	movl	%eax, %r14d
	andl	$15, %r14d
	movq	_LED_CONTROL@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	addq	(%rbx), %rdi
	callq	_readl
	movl	%eax, %r15d
	movl	$16843009, -44(%rbp)            ## imm = 0x1010101
	leaq	-44(%rbp), %r12
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movq	%r12, %rdx
	xorl	%ecx, %ecx
	callq	_switch_leds
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movq	%r12, %rdx
	movl	$1, %ecx
	callq	_switch_leds
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movq	%r12, %rdx
	xorl	%ecx, %ecx
	callq	_switch_leds
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movq	%r12, %rdx
	movl	$1, %ecx
	callq	_switch_leds
	movl	$16842752, -44(%rbp)            ## imm = 0x1010000
	movq	(%r13), %rsi
	addq	(%rbx), %rsi
	movl	$16842752, %edi                 ## imm = 0x1010000
	callq	_writel
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movq	%r12, %rdx
	xorl	%ecx, %ecx
	callq	_switch_leds
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movq	%r12, %rdx
	movl	$1, %ecx
	callq	_switch_leds
	movl	$257, -44(%rbp)                 ## imm = 0x101
	movq	(%r13), %rsi
	addq	(%rbx), %rsi
	movl	$257, %edi                      ## imm = 0x101
	callq	_writel
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movq	%r12, %rdx
	xorl	%ecx, %ecx
	callq	_switch_leds
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movq	%r12, %rdx
	movl	$1, %ecx
	callq	_switch_leds
	movl	$16842752, -44(%rbp)            ## imm = 0x1010000
	movq	(%r13), %rsi
	addq	(%rbx), %rsi
	movl	$16842752, %edi                 ## imm = 0x1010000
	callq	_writel
	testl	%r14d, %r14d
	je	LBB0_4
## %bb.2:
	movq	_HZ@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_set_SOGO
	movq	%rbx, %rdi
	callq	_wait_for_ctrl_irq
	movl	(%r12), %eax
	leal	(%rax,%rax,2), %eax
	cltq
	imulq	$1717986919, %rax, %rdi         ## imm = 0x66666667
	movq	%rdi, %rax
	shrq	$63, %rax
	sarq	$34, %rdi
	addl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_long_delay
	movswl	-42(%rbp), %edi
	movl	%edi, -44(%rbp)
	movq	(%r13), %rsi
	addq	(%rbx), %rsi
	callq	_writel
	movq	%rbx, %rdi
	callq	_set_SOGO
	movq	%rbx, %rdi
	callq	_wait_for_ctrl_irq
	movl	(%r12), %eax
	leal	(%rax,%rax,2), %eax
	cltq
	imulq	$1717986919, %rax, %rdi         ## imm = 0x66666667
	movq	%rdi, %rax
	shrq	$63, %rax
	sarq	$34, %rdi
	addl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_long_delay
	movl	-44(%rbp), %edi
	shll	$16, %edi
	movl	%edi, -44(%rbp)
	movq	(%r13), %rsi
	addq	(%rbx), %rsi
	callq	_writel
	movl	-44(%rbp), %edi
	addl	%edi, %edi
	movl	%edi, -44(%rbp)
	movq	(%r13), %rsi
	addq	(%rbx), %rsi
	callq	_writel
	decl	%r14d
	jne	LBB0_3
LBB0_4:
	movq	(%r13), %rsi
	addq	(%rbx), %rsi
	movl	%r15d, %edi
	callq	_writel
	movq	%rbx, %rdi
	callq	_set_SOGO
	movq	%rbx, %rdi
	callq	_wait_for_ctrl_irq
LBB0_5:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SLOT_MASK,8,3                  ## @SLOT_MASK
	.comm	_LED_CONTROL,8,3                ## @LED_CONTROL
	.comm	_HZ,4,2                         ## @HZ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cpqhp_hardware_test            ; -- Begin function cpqhp_hardware_test
	.p2align	2
_cpqhp_hardware_test:                   ; @cpqhp_hardware_test
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _SLOT_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SLOT_MASK@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readb
	cmp	w20, #1
	b.ne	LBB0_5
; %bb.1:
	and	w20, w0, #0xf
	ldr	x8, [x19]
Lloh3:
	adrp	x22, _LED_CONTROL@GOTPAGE
Lloh4:
	ldr	x22, [x22, _LED_CONTROL@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
	mov	x21, x0
	mov	w8, #16843009
	str	w8, [sp, #12]
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x20
	mov	w3, #0
	bl	_switch_leds
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x20
	mov	w3, #1
	bl	_switch_leds
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x20
	mov	w3, #0
	bl	_switch_leds
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x20
	mov	w3, #1
	bl	_switch_leds
	mov	w23, #16842752
	str	w23, [sp, #12]
	ldr	x8, [x19]
	ldr	x9, [x22]
	add	x1, x9, x8
	mov	w0, #16842752
	bl	_writel
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x20
	mov	w3, #0
	bl	_switch_leds
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x20
	mov	w3, #1
	bl	_switch_leds
	mov	w8, #257
	str	w8, [sp, #12]
	ldr	x8, [x19]
	ldr	x9, [x22]
	add	x1, x9, x8
	mov	w0, #257
	bl	_writel
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x20
	mov	w3, #0
	bl	_switch_leds
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x20
	mov	w3, #1
	bl	_switch_leds
	str	w23, [sp, #12]
	ldr	x8, [x19]
	ldr	x9, [x22]
	add	x1, x9, x8
	mov	w0, #16842752
	bl	_writel
	cbz	w20, LBB0_4
; %bb.2:
Lloh5:
	adrp	x23, _HZ@GOTPAGE
Lloh6:
	ldr	x23, [x23, _HZ@GOTPAGEOFF]
	mov	w24, #26215
	movk	w24, #26214, lsl #16
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_set_SOGO
	mov	x0, x19
	bl	_wait_for_ctrl_irq
	ldr	w8, [x23]
	add	w8, w8, w8, lsl #1
	smull	x8, w8, w24
	lsr	x9, x8, #63
	asr	x8, x8, #34
	add	w0, w8, w9
	bl	_long_delay
	ldrsh	w0, [sp, #14]
	str	w0, [sp, #12]
	ldr	x8, [x19]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writel
	mov	x0, x19
	bl	_set_SOGO
	mov	x0, x19
	bl	_wait_for_ctrl_irq
	ldr	w8, [x23]
	add	w8, w8, w8, lsl #1
	smull	x8, w8, w24
	lsr	x9, x8, #63
	asr	x8, x8, #34
	add	w0, w8, w9
	bl	_long_delay
	ldr	w8, [sp, #12]
	lsl	w0, w8, #16
	str	w0, [sp, #12]
	ldr	x8, [x19]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writel
	ldr	w8, [sp, #12]
	lsl	w0, w8, #1
	str	w0, [sp, #12]
	ldr	x8, [x19]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writel
	subs	w20, w20, #1
	b.ne	LBB0_3
LBB0_4:
	ldr	x8, [x19]
	ldr	x9, [x22]
	add	x1, x9, x8
	mov	x0, x21
	bl	_writel
	mov	x0, x19
	bl	_set_SOGO
	mov	x0, x19
	bl	_wait_for_ctrl_irq
LBB0_5:
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_SLOT_MASK,8,3                  ; @SLOT_MASK
	.comm	_LED_CONTROL,8,3                ; @LED_CONTROL
	.comm	_HZ,4,2                         ; @HZ
.subsections_via_symbols
