	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hw_atl_utils_init_ucp
_hw_atl_utils_init_ucp:                 ## @hw_atl_utils_init_ucp
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	$880, %esi                      ## imm = 0x370
	callq	_aq_hw_read_reg
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movl	$0, -12(%rbp)
	leaq	-12(%rbp), %rdi
	movl	$4, %esi
	callq	_get_random_bytes
	movl	$-50529028, %edx                ## imm = 0xFCFCFCFC
	andl	-12(%rbp), %edx
	orl	$33686018, %edx                 ## imm = 0x2020202
	movq	_HW_ATL_UCP_0X370_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_aq_hw_write_reg
LBB0_2:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$25, %edx
	callq	_hw_atl_reg_glb_cpu_scratch_scp_set
	movq	_hw_atl_scrpad25_get@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %edx
	xorl	%ecx, %ecx
	testl	%edx, %edx
	setne	%cl
	movq	%rbx, %rsi
	movl	$1000, %r8d                     ## imm = 0x3E8
	movl	$10000, %r9d                    ## imm = 0x2710
	callq	_readx_poll_timeout_atomic
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HW_ATL_UCP_0X370_REG,4,2       ## @HW_ATL_UCP_0X370_REG
	.comm	_hw_atl_scrpad25_get,4,2        ## @hw_atl_scrpad25_get
	.no_dead_strip	_hw_atl_utils_init_ucp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hw_atl_utils_init_ucp
_hw_atl_utils_init_ucp:                 ; @hw_atl_utils_init_ucp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	mov	w1, #880
	bl	_aq_hw_read_reg
	cbnz	w0, LBB0_2
; %bb.1:
	str	wzr, [sp, #12]
	add	x0, sp, #12
	mov	w1, #4
	bl	_get_random_bytes
	ldr	w8, [sp, #12]
	and	w8, w8, #0xfcfcfcfc
	orr	w2, w8, #0x2020202
Lloh0:
	adrp	x8, _HW_ATL_UCP_0X370_REG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HW_ATL_UCP_0X370_REG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_aq_hw_write_reg
LBB0_2:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #25
	bl	_hw_atl_reg_glb_cpu_scratch_scp_set
Lloh3:
	adrp	x8, _hw_atl_scrpad25_get@GOTPAGE
Lloh4:
	ldr	x8, [x8, _hw_atl_scrpad25_get@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldr	w2, [x19]
	cmp	w2, #0
	cset	w3, ne
	mov	x1, x19
	mov	w4, #1000
	mov	w5, #10000
	bl	_readx_poll_timeout_atomic
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_HW_ATL_UCP_0X370_REG,4,2       ; @HW_ATL_UCP_0X370_REG
	.comm	_hw_atl_scrpad25_get,4,2        ; @hw_atl_scrpad25_get
	.no_dead_strip	_hw_atl_utils_init_ucp
.subsections_via_symbols
