	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hermes_init
_hermes_init:                           ## @hermes_init
	.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, %r15
	movl	$0, (%rdi)
	movq	_INTEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_hermes_write_regn
	movq	_EVACK@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r15, %rdi
	movl	$65535, %edx                    ## imm = 0xFFFF
	callq	_hermes_write_regn
	movq	_CMD_BUSY_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_CMD@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_hermes_read_regn
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.1:
	movq	_HERMES_CMD_BUSY@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	andl	%eax, %ecx
	je	LBB0_6
## %bb.2:
	decl	%ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$65535, %eax                    ## imm = 0xFFFF
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %edi
	callq	_udelay
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_hermes_read_regn
	addl	$-1, %ebx
	jae	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %ecx
	andl	(%r13), %ecx
	jne	LBB0_3
LBB0_6:
	movq	_EVSTAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_hermes_read_regn
	movl	(%r14), %esi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_hermes_write_regn
	movq	_HERMES_CMD_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hermes_doicmd_wait             ## TAILCALL
LBB0_7:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INTEN,4,2                      ## @INTEN
	.comm	_EVACK,4,2                      ## @EVACK
	.comm	_CMD_BUSY_TIMEOUT,4,2           ## @CMD_BUSY_TIMEOUT
	.comm	_CMD,4,2                        ## @CMD
	.comm	_HERMES_CMD_BUSY,4,2            ## @HERMES_CMD_BUSY
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_EVSTAT,4,2                     ## @EVSTAT
	.comm	_HERMES_CMD_INIT,4,2            ## @HERMES_CMD_INIT
	.no_dead_strip	_hermes_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hermes_init
_hermes_init:                           ; @hermes_init
	.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	x19, x0
	str	wzr, [x0]
Lloh0:
	adrp	x8, _INTEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INTEN@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_hermes_write_regn
Lloh3:
	adrp	x20, _EVACK@GOTPAGE
Lloh4:
	ldr	x20, [x20, _EVACK@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	w21, #65535
	mov	x0, x19
	mov	w2, #65535
	bl	_hermes_write_regn
Lloh5:
	adrp	x8, _CMD_BUSY_TIMEOUT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CMD_BUSY_TIMEOUT@GOTPAGEOFF]
Lloh7:
	ldr	w24, [x8]
Lloh8:
	adrp	x22, _CMD@GOTPAGE
Lloh9:
	ldr	x22, [x22, _CMD@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_hermes_read_regn
Lloh10:
	adrp	x23, _HERMES_CMD_BUSY@GOTPAGE
Lloh11:
	ldr	x23, [x23, _HERMES_CMD_BUSY@GOTPAGEOFF]
	ldr	w8, [x23]
	and	w8, w8, w0
	cmp	w24, #0
	ccmp	w8, #0, #4, ne
	b.ne	LBB0_2
LBB0_1:
Lloh12:
	adrp	x8, _EVSTAT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EVSTAT@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_hermes_read_regn
	mov	x2, x0
	ldr	w1, [x20]
	mov	x0, x19
	bl	_hermes_write_regn
Lloh15:
	adrp	x8, _HERMES_CMD_INIT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _HERMES_CMD_INIT@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	mov	x5, #0
	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
	b	_hermes_doicmd_wait
LBB0_2:
	sub	w24, w24, #1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w0, w21
	b.eq	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #1
	bl	_udelay
	ldr	w1, [x22]
	mov	x0, x19
	bl	_hermes_read_regn
	subs	w24, w24, #1
	b.lo	LBB0_1
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x23]
	and	w8, w8, w0
	cbnz	w8, LBB0_3
	b	LBB0_1
LBB0_6:
Lloh18:
	adrp	x8, _ENODEV@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
	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 AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_INTEN,4,2                      ; @INTEN
	.comm	_EVACK,4,2                      ; @EVACK
	.comm	_CMD_BUSY_TIMEOUT,4,2           ; @CMD_BUSY_TIMEOUT
	.comm	_CMD,4,2                        ; @CMD
	.comm	_HERMES_CMD_BUSY,4,2            ; @HERMES_CMD_BUSY
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_EVSTAT,4,2                     ; @EVSTAT
	.comm	_HERMES_CMD_INIT,4,2            ; @HERMES_CMD_INIT
	.no_dead_strip	_hermes_init
.subsections_via_symbols
