	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hermesi_program_end
_hermesi_program_end:                   ## @hermesi_program_end
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	_HERMES_PROGRAM_DISABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-40(%rbp), %rcx
	xorl	%edx, %edx
	callq	*(%rax)
	movl	%eax, %ebx
	movl	-28(%rbp), %edx
	movl	-36(%rbp), %r8d
	movl	-32(%rbp), %ecx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pr_debug
	testl	%ebx, %ebx
	jne	LBB0_3
## %bb.1:
	movq	_HERMES_STATUS_CMDCODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-40(%rbp), %eax
	movq	_HERMES_CMD_DOWNLD@GOTPCREL(%rip), %rcx
	movl	$0, %ebx
	cmpl	(%rcx), %eax
	je	LBB0_3
## %bb.2:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_3:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_hermes_aux_control
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pr_debug
	movq	_EVACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$65535, %edx                    ## imm = 0xFFFF
	callq	_hermes_write_regn
	movq	(%r14), %rax
	movq	_HERMES_CMD_INIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	*8(%rax)
	testl	%ebx, %ebx
	cmovel	%r15d, %ebx
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HERMES_PROGRAM_DISABLE,4,2     ## @HERMES_PROGRAM_DISABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PROGRAM_DISABLE returned %d, r0 0x%04x, r1 0x%04x, r2 0x%04x\n"

	.comm	_HERMES_STATUS_CMDCODE,4,2      ## @HERMES_STATUS_CMDCODE
	.comm	_HERMES_CMD_DOWNLD,4,2          ## @HERMES_CMD_DOWNLD
	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"AUX disable returned %d\n"

	.comm	_EVACK,4,2                      ## @EVACK
	.comm	_HERMES_CMD_INIT,4,2            ## @HERMES_CMD_INIT
	.no_dead_strip	_hermesi_program_end
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hermesi_program_end
_hermesi_program_end:                   ; @hermesi_program_end
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	ldr	x8, [x0]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _HERMES_PROGRAM_DISABLE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HERMES_PROGRAM_DISABLE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	add	x3, sp, #32
	mov	w2, #0
	blr	x8
	mov	x20, x0
	ldp	w9, w8, [sp, #40]
	ldr	w10, [sp, #36]
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_pr_debug
	cbnz	w20, LBB0_4
; %bb.1:
	ldr	w8, [sp, #32]
Lloh5:
	adrp	x9, _HERMES_STATUS_CMDCODE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _HERMES_STATUS_CMDCODE@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh8:
	adrp	x9, _HERMES_CMD_DOWNLD@GOTPAGE
Lloh9:
	ldr	x9, [x9, _HERMES_CMD_DOWNLD@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_3
; %bb.2:
	mov	w20, #0
	b	LBB0_4
LBB0_3:
Lloh11:
	adrp	x8, _EIO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_4:
	mov	x0, x19
	mov	w1, #0
	bl	_hermes_aux_control
	mov	x21, x0
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_pr_debug
Lloh16:
	adrp	x8, _EVACK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EVACK@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #65535
	bl	_hermes_write_regn
	ldr	x8, [x19]
	ldr	x8, [x8, #8]
Lloh19:
	adrp	x9, _HERMES_CMD_INIT@GOTPAGE
Lloh20:
	ldr	x9, [x9, _HERMES_CMD_INIT@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x9]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	mov	x5, #0
	blr	x8
	cmp	w20, #0
	csel	w0, w21, w20, eq
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_HERMES_PROGRAM_DISABLE,4,2     ; @HERMES_PROGRAM_DISABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PROGRAM_DISABLE returned %d, r0 0x%04x, r1 0x%04x, r2 0x%04x\n"

	.comm	_HERMES_STATUS_CMDCODE,4,2      ; @HERMES_STATUS_CMDCODE
	.comm	_HERMES_CMD_DOWNLD,4,2          ; @HERMES_CMD_DOWNLD
	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"AUX disable returned %d\n"

	.comm	_EVACK,4,2                      ; @EVACK
	.comm	_HERMES_CMD_INIT,4,2            ; @HERMES_CMD_INIT
	.no_dead_strip	_hermesi_program_end
.subsections_via_symbols
