	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hermesi_program_init
_hermesi_program_init:                  ## @hermesi_program_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_EVACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$65535, %edx                    ## imm = 0xFFFF
	callq	_hermes_write_regn
	movq	(%r15), %rax
	movq	_HERMES_CMD_INIT@GOTPCREL(%rip), %r12
	movl	$256, %esi                      ## imm = 0x100
	orl	(%r12), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	*(%rax)
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movq	(%r15), %rax
	movl	(%r12), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	*(%rax)
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.2:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_hermes_aux_control
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_debug
	testl	%ebx, %ebx
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %esi
	callq	_pr_debug
	movq	(%r15), %rax
	movq	_HERMES_PROGRAM_ENABLE_VOLATILE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movzwl	%r14w, %edx
	sarl	$16, %r14d
	movq	%r15, %rdi
	movl	%r14d, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	*(%rax)
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_debug
LBB0_4:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EVACK,4,2                      ## @EVACK
	.comm	_HERMES_CMD_INIT,4,2            ## @HERMES_CMD_INIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"AUX enable returned %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Enabling volatile, EP 0x%08x\n"

	.comm	_HERMES_PROGRAM_ENABLE_VOLATILE,4,2 ## @HERMES_PROGRAM_ENABLE_VOLATILE
L_.str.2:                               ## @.str.2
	.asciz	"PROGRAM_ENABLE returned %d\n"

	.no_dead_strip	_hermesi_program_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hermesi_program_init
_hermesi_program_init:                  ; @hermesi_program_init
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _EVACK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EVACK@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #65535
	bl	_hermes_write_regn
	ldr	x8, [x19]
	ldr	x8, [x8]
Lloh3:
	adrp	x22, _HERMES_CMD_INIT@GOTPAGE
Lloh4:
	ldr	x22, [x22, _HERMES_CMD_INIT@GOTPAGEOFF]
	ldr	w9, [x22]
	orr	w1, w9, #0x100
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	mov	x5, #0
	blr	x8
	mov	x21, x0
	cbnz	w0, LBB0_4
; %bb.1:
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	mov	x5, #0
	blr	x8
	mov	x21, x0
	cbnz	w0, LBB0_4
; %bb.2:
	mov	x0, x19
	mov	w1, #1
	bl	_hermes_aux_control
	mov	x21, x0
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_pr_debug
	cbnz	w21, LBB0_4
; %bb.3:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_pr_debug
	ldr	x8, [x19]
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _HERMES_PROGRAM_ENABLE_VOLATILE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _HERMES_PROGRAM_ENABLE_VOLATILE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x9]
	and	w2, w20, #0xffff
	asr	w3, w20, #16
	mov	x0, x19
	mov	w4, #0
	mov	x5, #0
	blr	x8
	mov	x21, x0
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	bl	_pr_debug
LBB0_4:
	mov	x0, x21
	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	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EVACK,4,2                      ; @EVACK
	.comm	_HERMES_CMD_INIT,4,2            ; @HERMES_CMD_INIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"AUX enable returned %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Enabling volatile, EP 0x%08x\n"

	.comm	_HERMES_PROGRAM_ENABLE_VOLATILE,4,2 ; @HERMES_PROGRAM_ENABLE_VOLATILE
l_.str.2:                               ; @.str.2
	.asciz	"PROGRAM_ENABLE returned %d\n"

	.no_dead_strip	_hermesi_program_init
.subsections_via_symbols
