	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hifn_init_pubrng
_hifn_init_pubrng:                      ## @hifn_init_pubrng
	.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	%rdi, %r13
	movq	_HIFN_1_PUB_RESET@GOTPCREL(%rip), %r15
	movl	(%r15), %r14d
	movl	%r14d, %esi
	callq	_hifn_read_1
	movq	_HIFN_PUBRST_RESET@GOTPCREL(%rip), %r12
	orl	(%r12), %eax
	movq	%r13, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_hifn_write_1
	movl	$101, %ebx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	callq	_mdelay
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_hifn_read_1
	testl	%eax, (%r12)
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	decl	%ebx
	cmpl	$1, %ebx
	ja	LBB0_1
## %bb.3:
	movq	8(%r13), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_5
LBB0_4:
	movq	_HIFN_1_PUB_IEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HIFN_PUBIEN_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_hifn_write_1
	movq	_HIFN_DMAIER_PUBDONE@GOTPCREL(%rip), %rax
	movl	(%r13), %edx
	orl	(%rax), %edx
	movl	%edx, (%r13)
	movq	_HIFN_1_DMA_IER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_hifn_write_1
	movq	8(%r13), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_dbg
LBB0_5:
	movq	_HIFN_1_RNG_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_hifn_read_1
	movq	_HIFN_RNGCFG_ENA@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	%r13, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_hifn_write_1
	movq	8(%r13), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_dbg
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HIFN_1_PUB_RESET,4,2           ## @HIFN_1_PUB_RESET
	.comm	_HIFN_PUBRST_RESET,4,2          ## @HIFN_PUBRST_RESET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to initialise public key engine.\n"

	.comm	_HIFN_1_PUB_IEN,4,2             ## @HIFN_1_PUB_IEN
	.comm	_HIFN_PUBIEN_DONE,4,2           ## @HIFN_PUBIEN_DONE
	.comm	_HIFN_DMAIER_PUBDONE,4,2        ## @HIFN_DMAIER_PUBDONE
	.comm	_HIFN_1_DMA_IER,4,2             ## @HIFN_1_DMA_IER
L_.str.1:                               ## @.str.1
	.asciz	"Public key engine has been successfully initialised.\n"

	.comm	_HIFN_1_RNG_CONFIG,4,2          ## @HIFN_1_RNG_CONFIG
	.comm	_HIFN_RNGCFG_ENA,4,2            ## @HIFN_RNGCFG_ENA
L_.str.2:                               ## @.str.2
	.asciz	"RNG engine has been successfully initialised.\n"

	.comm	_HIFN_1_RNG_DATA,4,2            ## @HIFN_1_RNG_DATA
	.no_dead_strip	_hifn_init_pubrng
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hifn_init_pubrng
_hifn_init_pubrng:                      ; @hifn_init_pubrng
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
Lloh0:
	adrp	x21, _HIFN_1_PUB_RESET@GOTPAGE
Lloh1:
	ldr	x21, [x21, _HIFN_1_PUB_RESET@GOTPAGEOFF]
	ldr	w20, [x21]
	mov	x1, x20
	bl	_hifn_read_1
Lloh2:
	adrp	x22, _HIFN_PUBRST_RESET@GOTPAGE
Lloh3:
	ldr	x22, [x22, _HIFN_PUBRST_RESET@GOTPAGEOFF]
	ldr	w8, [x22]
	orr	w2, w8, w0
	mov	x0, x19
	mov	x1, x20
	bl	_hifn_write_1
	mov	w20, #101
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #1
	bl	_mdelay
	ldr	w1, [x21]
	mov	x0, x19
	bl	_hifn_read_1
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	sub	w20, w20, #1
	cmp	w20, #1
	b.hi	LBB0_1
; %bb.3:
	ldr	x0, [x19, #8]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_5
LBB0_4:
Lloh6:
	adrp	x8, _HIFN_1_PUB_IEN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HIFN_1_PUB_IEN@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _HIFN_PUBIEN_DONE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HIFN_PUBIEN_DONE@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_hifn_write_1
Lloh12:
	adrp	x8, _HIFN_DMAIER_PUBDONE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HIFN_DMAIER_PUBDONE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w2, w9, w8
	str	w2, [x19]
Lloh15:
	adrp	x8, _HIFN_1_DMA_IER@GOTPAGE
Lloh16:
	ldr	x8, [x8, _HIFN_1_DMA_IER@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_hifn_write_1
	ldr	x0, [x19, #8]
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
LBB0_5:
Lloh20:
	adrp	x8, _HIFN_1_RNG_CONFIG@GOTPAGE
Lloh21:
	ldr	x8, [x8, _HIFN_1_RNG_CONFIG@GOTPAGEOFF]
Lloh22:
	ldr	w20, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_hifn_read_1
Lloh23:
	adrp	x8, _HIFN_RNGCFG_ENA@GOTPAGE
Lloh24:
	ldr	x8, [x8, _HIFN_RNGCFG_ENA@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	orr	w2, w8, w0
	mov	x0, x19
	mov	x1, x20
	bl	_hifn_write_1
	ldr	x0, [x19, #8]
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_dbg
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_HIFN_1_PUB_RESET,4,2           ; @HIFN_1_PUB_RESET
	.comm	_HIFN_PUBRST_RESET,4,2          ; @HIFN_PUBRST_RESET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to initialise public key engine.\n"

	.comm	_HIFN_1_PUB_IEN,4,2             ; @HIFN_1_PUB_IEN
	.comm	_HIFN_PUBIEN_DONE,4,2           ; @HIFN_PUBIEN_DONE
	.comm	_HIFN_DMAIER_PUBDONE,4,2        ; @HIFN_DMAIER_PUBDONE
	.comm	_HIFN_1_DMA_IER,4,2             ; @HIFN_1_DMA_IER
l_.str.1:                               ; @.str.1
	.asciz	"Public key engine has been successfully initialised.\n"

	.comm	_HIFN_1_RNG_CONFIG,4,2          ; @HIFN_1_RNG_CONFIG
	.comm	_HIFN_RNGCFG_ENA,4,2            ; @HIFN_RNGCFG_ENA
l_.str.2:                               ; @.str.2
	.asciz	"RNG engine has been successfully initialised.\n"

	.comm	_HIFN_1_RNG_DATA,4,2            ; @HIFN_1_RNG_DATA
	.no_dead_strip	_hifn_init_pubrng
.subsections_via_symbols
