	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hermes_aux_control
_hermes_aux_control:                    ## @hermes_aux_control
	.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
	movl	%esi, %r12d
	movq	%rdi, %r15
	testl	%esi, %esi
	jne	LBB0_1
## %bb.2:
	movq	_HERMES_AUX_DISABLED@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_HERMES_AUX_ENABLED@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r13d
	movq	_HERMES_AUX_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_HERMES_AUX_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_HERMES_CONTROL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_hermes_read_reg
	xorl	%ecx, %ecx
	cmpl	%r13d, %eax
	je	LBB0_9
## %bb.4:
	testl	%r12d, %r12d
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	cmovel	%ebx, %r12d
	movq	_HERMES_PARAM0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HERMES_AUX_PW0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_hermes_write_reg
	movq	_HERMES_PARAM1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HERMES_AUX_PW1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_hermes_write_reg
	movq	_HERMES_PARAM2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HERMES_AUX_PW2@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_hermes_write_reg
	movl	(%r14), %esi
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_hermes_write_reg
	movl	$20, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	$10, %edi
	callq	_udelay
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_hermes_read_reg
	cmpl	%r13d, %eax
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_6 Depth=1
	decl	%ebx
	jne	LBB0_6
## %bb.8:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	jmp	LBB0_9
LBB0_7:
	xorl	%ecx, %ecx
LBB0_9:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HERMES_AUX_ENABLED,4,2         ## @HERMES_AUX_ENABLED
	.comm	_HERMES_AUX_DISABLED,4,2        ## @HERMES_AUX_DISABLED
	.comm	_HERMES_AUX_ENABLE,4,2          ## @HERMES_AUX_ENABLE
	.comm	_HERMES_AUX_DISABLE,4,2         ## @HERMES_AUX_DISABLE
	.comm	_HERMES_CONTROL,4,2             ## @HERMES_CONTROL
	.comm	_HERMES_PARAM0,4,2              ## @HERMES_PARAM0
	.comm	_HERMES_AUX_PW0,4,2             ## @HERMES_AUX_PW0
	.comm	_HERMES_PARAM1,4,2              ## @HERMES_PARAM1
	.comm	_HERMES_AUX_PW1,4,2             ## @HERMES_AUX_PW1
	.comm	_HERMES_PARAM2,4,2              ## @HERMES_PARAM2
	.comm	_HERMES_AUX_PW2,4,2             ## @HERMES_AUX_PW2
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_hermes_aux_control
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hermes_aux_control
_hermes_aux_control:                    ; @hermes_aux_control
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _HERMES_AUX_ENABLED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HERMES_AUX_ENABLED@GOTPAGEOFF]
Lloh2:
	adrp	x9, _HERMES_AUX_DISABLED@GOTPAGE
Lloh3:
	ldr	x9, [x9, _HERMES_AUX_DISABLED@GOTPAGEOFF]
	cmp	w1, #0
	csel	x8, x9, x8, eq
	ldr	w21, [x8]
Lloh4:
	adrp	x8, _HERMES_AUX_ENABLE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _HERMES_AUX_ENABLE@GOTPAGEOFF]
Lloh6:
	ldr	w23, [x8]
Lloh7:
	adrp	x8, _HERMES_AUX_DISABLE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _HERMES_AUX_DISABLE@GOTPAGEOFF]
Lloh9:
	ldr	w24, [x8]
Lloh10:
	adrp	x22, _HERMES_CONTROL@GOTPAGE
Lloh11:
	ldr	x22, [x22, _HERMES_CONTROL@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_hermes_read_reg
	cmp	w0, w21
	b.ne	LBB0_2
LBB0_1:
	mov	w0, #0
	b	LBB0_6
LBB0_2:
	cmp	w20, #0
	csel	w20, w24, w23, eq
Lloh12:
	adrp	x8, _HERMES_PARAM0@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HERMES_PARAM0@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _HERMES_AUX_PW0@GOTPAGE
Lloh16:
	ldr	x8, [x8, _HERMES_AUX_PW0@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_hermes_write_reg
Lloh18:
	adrp	x8, _HERMES_PARAM1@GOTPAGE
Lloh19:
	ldr	x8, [x8, _HERMES_PARAM1@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x8, _HERMES_AUX_PW1@GOTPAGE
Lloh22:
	ldr	x8, [x8, _HERMES_AUX_PW1@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_hermes_write_reg
Lloh24:
	adrp	x8, _HERMES_PARAM2@GOTPAGE
Lloh25:
	ldr	x8, [x8, _HERMES_PARAM2@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
Lloh27:
	adrp	x8, _HERMES_AUX_PW2@GOTPAGE
Lloh28:
	ldr	x8, [x8, _HERMES_AUX_PW2@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_hermes_write_reg
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x20
	bl	_hermes_write_reg
	mov	w20, #20
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #10
	bl	_udelay
	ldr	w1, [x22]
	mov	x0, x19
	bl	_hermes_read_reg
	cmp	w0, w21
	b.eq	LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	subs	w20, w20, #1
	b.ne	LBB0_3
; %bb.5:
Lloh30:
	adrp	x8, _EBUSY@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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 AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_HERMES_AUX_ENABLED,4,2         ; @HERMES_AUX_ENABLED
	.comm	_HERMES_AUX_DISABLED,4,2        ; @HERMES_AUX_DISABLED
	.comm	_HERMES_AUX_ENABLE,4,2          ; @HERMES_AUX_ENABLE
	.comm	_HERMES_AUX_DISABLE,4,2         ; @HERMES_AUX_DISABLE
	.comm	_HERMES_CONTROL,4,2             ; @HERMES_CONTROL
	.comm	_HERMES_PARAM0,4,2              ; @HERMES_PARAM0
	.comm	_HERMES_AUX_PW0,4,2             ; @HERMES_AUX_PW0
	.comm	_HERMES_PARAM1,4,2              ; @HERMES_PARAM1
	.comm	_HERMES_AUX_PW1,4,2             ; @HERMES_AUX_PW1
	.comm	_HERMES_PARAM2,4,2              ; @HERMES_PARAM2
	.comm	_HERMES_AUX_PW2,4,2             ; @HERMES_AUX_PW2
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_hermes_aux_control
.subsections_via_symbols
