	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ergo_inithardware              ## -- Begin function ergo_inithardware
	.p2align	4, 0x90
_ergo_inithardware:                     ## @ergo_inithardware
	.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
	movq	%rdi, %rbx
	movq	_PCI9050_INTR_REG@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	addq	56(%rbx), %rdi
	leaq	L_.str(%rip), %rdx
	movl	$1, %esi
	callq	_request_region
	movl	$-1, %r14d
	testl	%eax, %eax
	je	LBB0_9
## %bb.1:
	movq	_PCI9050_USER_IO@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	56(%rbx), %rdi
	leaq	L_.str(%rip), %rdx
	movl	$1, %esi
	callq	_request_region
	testl	%eax, %eax
	je	LBB0_2
## %bb.4:
	movq	64(%rbx), %rdi
	movq	_ERG_DPRAM_PAGE_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	(%rdi,%rsi), %rax
	decq	%rax
	movq	%rax, 80(%rbx)
	callq	_ioremap
	movl	%eax, 72(%rbx)
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movq	%rbx, %rdi
	callq	_ergo_stopcard
	movl	48(%rbx), %edi
	movq	_ergo_interrupt@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IRQF_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rcx
	movq	%rbx, %r8
	callq	_request_irq
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	_ergo_releasehardware
	jmp	LBB0_9
LBB0_2:
	movq	(%r15), %rdi
	jmp	LBB0_3
LBB0_5:
	movq	(%r15), %rdi
	addq	56(%rbx), %rdi
	movl	$1, %esi
	callq	_release_region
	movq	(%r12), %rdi
LBB0_3:
	addq	56(%rbx), %rdi
	movl	$1, %esi
	callq	_release_region
	jmp	LBB0_9
LBB0_8:
	movq	_ergo_stopcard@GOTPCREL(%rip), %rax
	movq	%rax, 40(%rbx)
	movq	_ergo_releasehardware@GOTPCREL(%rip), %rax
	movq	%rax, 32(%rbx)
	movq	_ergo_testram@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	_ergo_writebootimg@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_ergo_writebootseq@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	_ergo_waitpofready@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movq	_ergo_set_errlog_state@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	leaq	4(%rbx), %rdi
	movq	_ergo_irq_bh@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	movq	%rbx, %rdi
	callq	_spin_lock_init
	xorl	%r14d, %r14d
LBB0_9:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI9050_INTR_REG,8,3           ## @PCI9050_INTR_REG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HYSDN"

	.comm	_PCI9050_USER_IO,8,3            ## @PCI9050_USER_IO
	.comm	_ERG_DPRAM_PAGE_SIZE,8,3        ## @ERG_DPRAM_PAGE_SIZE
	.comm	_ergo_interrupt,4,2             ## @ergo_interrupt
	.comm	_IRQF_SHARED,4,2                ## @IRQF_SHARED
	.comm	_ergo_testram,4,2               ## @ergo_testram
	.comm	_ergo_writebootimg,4,2          ## @ergo_writebootimg
	.comm	_ergo_writebootseq,4,2          ## @ergo_writebootseq
	.comm	_ergo_waitpofready,4,2          ## @ergo_waitpofready
	.comm	_ergo_set_errlog_state,4,2      ## @ergo_set_errlog_state
	.comm	_ergo_irq_bh,4,2                ## @ergo_irq_bh
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ergo_inithardware              ; -- Begin function ergo_inithardware
	.p2align	2
_ergo_inithardware:                     ; @ergo_inithardware
	.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
	ldr	x8, [x0, #56]
Lloh0:
	adrp	x20, _PCI9050_INTR_REG@GOTPAGE
Lloh1:
	ldr	x20, [x20, _PCI9050_INTR_REG@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #1
	bl	_request_region
	cbz	w0, LBB0_5
; %bb.1:
	ldr	x8, [x19, #56]
Lloh4:
	adrp	x21, _PCI9050_USER_IO@GOTPAGE
Lloh5:
	ldr	x21, [x21, _PCI9050_USER_IO@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #1
	bl	_request_region
	cbz	w0, LBB0_6
; %bb.2:
	ldr	x0, [x19, #64]
Lloh8:
	adrp	x8, _ERG_DPRAM_PAGE_SIZE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERG_DPRAM_PAGE_SIZE@GOTPAGEOFF]
Lloh10:
	ldr	x1, [x8]
	add	x8, x0, x1
	sub	x8, x8, #1
	str	x8, [x19, #80]
	bl	_ioremap
	str	w0, [x19, #72]
	cbz	w0, LBB0_7
; %bb.3:
	mov	x0, x19
	bl	_ergo_stopcard
	ldr	w0, [x19, #48]
Lloh11:
	adrp	x8, _ergo_interrupt@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ergo_interrupt@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x8, _IRQF_SHARED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IRQF_SHARED@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
Lloh17:
	adrp	x3, l_.str@PAGE
Lloh18:
	add	x3, x3, l_.str@PAGEOFF
	mov	x4, x19
	bl	_request_irq
	cbz	x0, LBB0_9
; %bb.4:
	mov	x0, x19
	bl	_ergo_releasehardware
LBB0_5:
	mov	w0, #-1
	b	LBB0_10
LBB0_6:
	ldr	x8, [x19, #56]
	ldr	x9, [x20]
	b	LBB0_8
LBB0_7:
	ldr	x8, [x19, #56]
	ldr	x9, [x20]
	add	x0, x9, x8
	mov	w1, #1
	bl	_release_region
	ldr	x8, [x19, #56]
	ldr	x9, [x21]
LBB0_8:
	add	x0, x9, x8
	mov	w1, #1
	bl	_release_region
	mov	w0, #-1
	b	LBB0_10
LBB0_9:
Lloh19:
	adrp	x8, _ergo_stopcard@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ergo_stopcard@GOTPAGEOFF]
Lloh21:
	adrp	x9, _ergo_releasehardware@GOTPAGE
Lloh22:
	ldr	x9, [x9, _ergo_releasehardware@GOTPAGEOFF]
	stp	x9, x8, [x19, #32]
Lloh23:
	adrp	x8, _ergo_testram@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ergo_testram@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	str	w8, [x19, #24]
Lloh26:
	adrp	x8, _ergo_writebootimg@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ergo_writebootimg@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
Lloh29:
	adrp	x9, _ergo_writebootseq@GOTPAGE
Lloh30:
	ldr	x9, [x9, _ergo_writebootseq@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #16]
Lloh32:
	adrp	x8, _ergo_waitpofready@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ergo_waitpofready@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
Lloh35:
	adrp	x9, _ergo_set_errlog_state@GOTPAGE
Lloh36:
	ldr	x9, [x9, _ergo_set_errlog_state@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #8]
	add	x0, x19, #4
Lloh38:
	adrp	x8, _ergo_irq_bh@GOTPAGE
Lloh39:
	ldr	x8, [x8, _ergo_irq_bh@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
	bl	_INIT_WORK
	mov	x0, x19
	bl	_spin_lock_init
	mov	w0, #0
LBB0_10:
	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 AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI9050_INTR_REG,8,3           ; @PCI9050_INTR_REG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HYSDN"

	.comm	_PCI9050_USER_IO,8,3            ; @PCI9050_USER_IO
	.comm	_ERG_DPRAM_PAGE_SIZE,8,3        ; @ERG_DPRAM_PAGE_SIZE
	.comm	_ergo_interrupt,4,2             ; @ergo_interrupt
	.comm	_IRQF_SHARED,4,2                ; @IRQF_SHARED
	.comm	_ergo_testram,4,2               ; @ergo_testram
	.comm	_ergo_writebootimg,4,2          ; @ergo_writebootimg
	.comm	_ergo_writebootseq,4,2          ; @ergo_writebootseq
	.comm	_ergo_waitpofready,4,2          ; @ergo_waitpofready
	.comm	_ergo_set_errlog_state,4,2      ; @ergo_set_errlog_state
	.comm	_ergo_irq_bh,4,2                ; @ergo_irq_bh
.subsections_via_symbols
