	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function IFX_MEI_InitDevice
_IFX_MEI_InitDevice:                    ## @IFX_MEI_InitDevice
	.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	_dsl_devices@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	testq	%r12, %r12
	je	LBB0_1
## %bb.2:
	movslq	%edi, %rbx
	movq	%rbx, %r13
	shlq	$5, %r13
	leaq	(%r12,%r13), %r15
	movq	_sDanube_Mei_Private@GOTPCREL(%rip), %rax
	leaq	(,%rbx,4), %rdi
	addq	(%rax), %rdi
	movq	%rdi, 24(%r12,%r13)
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	%r15, %rdi
	callq	_DSL_DEV_PRIVATE
	movq	32(%rax), %rdi
	movq	_MAX_BAR_REGISTERS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	shll	$2, %edx
	xorl	%esi, %esi
	callq	_memset
	testl	%ebx, %ebx
	jne	LBB0_4
## %bb.3:
	movq	_LTQ_MEI_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r15), %rcx
	movq	_IFX_DFEIR@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%eax, (%rcx,%rdx,4)
	movq	_LTQ_MEI_DYING_GASP_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_IFX_DYING_GASP@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%eax, (%rcx,%rdx,4)
	movq	_KSEG1@GOTPCREL(%rip), %rax
	movq	_LTQ_MEI_BASE_ADDR@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	addq	(%rax), %rcx
	movq	%rcx, 16(%r12,%r13)
	movq	_LTQ_PMU_PWDCR@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_ltq_r32
	andl	$-33346, %eax                   ## imm = 0xFFFF7DBE
	movq	(%rbx), %rsi
	movl	%eax, %edi
	callq	_ltq_w32
LBB0_4:
	movq	$0, 8(%r12,%r13)
	movq	%r15, %rdi
	callq	_DSL_DEV_PRIVATE
	movq	$0, 24(%rax)
	movq	%r15, %rdi
	callq	_DSL_DEV_PRIVATE
	movq	$0, 16(%rax)
	movq	%r15, %rdi
	callq	_DSL_DEV_PRIVATE
	movl	8(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_MEI_INIT_WAKELIST
	movq	%r15, %rdi
	callq	_DSL_DEV_PRIVATE
	movl	4(%rax), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_MEI_INIT_WAKELIST
	movq	%r15, %rdi
	callq	_DSL_DEV_PRIVATE
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_MEI_MUTEX_INIT
	movq	(%r15), %rax
	movq	_IFX_DFEIR@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rcx
	movl	(%rax,%rcx,4), %edi
	movq	_IFX_MEI_IrqHandle@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rcx
	xorl	%edx, %edx
	movq	%r15, %r8
	callq	_request_irq
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	(%r15), %rax
	movq	(%rbx), %rcx
	movl	(%rax,%rcx,4), %esi
	leaq	L_.str.3(%rip), %rdi
	callq	_IFX_MEI_EMSG
	movl	$-1, %r14d
	jmp	LBB0_6
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_dsl_devices,8,3                ## @dsl_devices
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_sDanube_Mei_Private,8,3        ## @sDanube_Mei_Private
	.comm	_MAX_BAR_REGISTERS,4,2          ## @MAX_BAR_REGISTERS
	.comm	_LTQ_MEI_INT,4,2                ## @LTQ_MEI_INT
	.comm	_IFX_DFEIR,8,3                  ## @IFX_DFEIR
	.comm	_LTQ_MEI_DYING_GASP_INT,4,2     ## @LTQ_MEI_DYING_GASP_INT
	.comm	_IFX_DYING_GASP,8,3             ## @IFX_DYING_GASP
	.comm	_KSEG1,8,3                      ## @KSEG1
	.comm	_LTQ_MEI_BASE_ADDR,8,3          ## @LTQ_MEI_BASE_ADDR
	.comm	_LTQ_PMU_PWDCR,8,3              ## @LTQ_PMU_PWDCR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"arcq"

L_.str.1:                               ## @.str.1
	.asciz	"arcr"

	.comm	_IFX_MEI_IrqHandle,4,2          ## @IFX_MEI_IrqHandle
L_.str.2:                               ## @.str.2
	.asciz	"DFEIR"

L_.str.3:                               ## @.str.3
	.asciz	"request_irq %d failed!\n"

	.no_dead_strip	_IFX_MEI_InitDevice
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function IFX_MEI_InitDevice
_IFX_MEI_InitDevice:                    ; @IFX_MEI_InitDevice
	.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
Lloh0:
	adrp	x8, _dsl_devices@GOTPAGE
Lloh1:
	ldr	x8, [x8, _dsl_devices@GOTPAGEOFF]
Lloh2:
	ldr	x22, [x8]
	cbz	x22, LBB0_5
; %bb.1:
	mov	x20, x0
	sxtw	x23, w20
	add	x19, x22, x23, lsl #5
Lloh3:
	adrp	x8, _sDanube_Mei_Private@GOTPAGE
Lloh4:
	ldr	x8, [x8, _sDanube_Mei_Private@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	add	x0, x8, x23, lsl #2
	str	x0, [x19, #24]
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	mov	x0, x19
	bl	_DSL_DEV_PRIVATE
	ldr	x0, [x0, #32]
Lloh6:
	adrp	x8, _MAX_BAR_REGISTERS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MAX_BAR_REGISTERS@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	lsl	w2, w8, #2
	mov	w1, #0
	bl	_memset
Lloh9:
	adrp	x21, _IFX_DFEIR@GOTPAGE
Lloh10:
	ldr	x21, [x21, _IFX_DFEIR@GOTPAGEOFF]
	cbnz	w20, LBB0_3
; %bb.2:
Lloh11:
	adrp	x8, _LTQ_MEI_INT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _LTQ_MEI_INT@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	ldr	x9, [x19]
	ldr	x10, [x21]
	str	w8, [x9, x10, lsl #2]
Lloh14:
	adrp	x8, _LTQ_MEI_DYING_GASP_INT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _LTQ_MEI_DYING_GASP_INT@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x10, _IFX_DYING_GASP@GOTPAGE
Lloh18:
	ldr	x10, [x10, _IFX_DYING_GASP@GOTPAGEOFF]
Lloh19:
	ldr	x10, [x10]
	str	w8, [x9, x10, lsl #2]
Lloh20:
	adrp	x8, _KSEG1@GOTPAGE
Lloh21:
	ldr	x8, [x8, _KSEG1@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
Lloh23:
	adrp	x9, _LTQ_MEI_BASE_ADDR@GOTPAGE
Lloh24:
	ldr	x9, [x9, _LTQ_MEI_BASE_ADDR@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	add	x8, x9, x8
	add	x9, x22, x23, lsl #5
	str	x8, [x9, #16]
Lloh26:
	adrp	x20, _LTQ_PMU_PWDCR@GOTPAGE
Lloh27:
	ldr	x20, [x20, _LTQ_PMU_PWDCR@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_ltq_r32
	mov	w8, #-33346
	and	w0, w0, w8
	ldr	x1, [x20]
	bl	_ltq_w32
LBB0_3:
	add	x8, x22, x23, lsl #5
	str	xzr, [x8, #8]
	mov	x0, x19
	bl	_DSL_DEV_PRIVATE
	str	xzr, [x0, #24]
	mov	x0, x19
	bl	_DSL_DEV_PRIVATE
	str	xzr, [x0, #16]
	mov	x0, x19
	bl	_DSL_DEV_PRIVATE
	ldr	w1, [x0, #8]
Lloh28:
	adrp	x0, l_.str@PAGE
Lloh29:
	add	x0, x0, l_.str@PAGEOFF
	bl	_MEI_INIT_WAKELIST
	mov	x0, x19
	bl	_DSL_DEV_PRIVATE
	ldr	w1, [x0, #4]
Lloh30:
	adrp	x0, l_.str.1@PAGE
Lloh31:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_MEI_INIT_WAKELIST
	mov	x0, x19
	bl	_DSL_DEV_PRIVATE
	ldr	w0, [x0]
	mov	w1, #1
	bl	_MEI_MUTEX_INIT
	ldr	x8, [x19]
	ldr	x9, [x21]
	ldr	w0, [x8, x9, lsl #2]
Lloh32:
	adrp	x8, _IFX_MEI_IrqHandle@GOTPAGE
Lloh33:
	ldr	x8, [x8, _IFX_MEI_IrqHandle@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
Lloh35:
	adrp	x3, l_.str.2@PAGE
Lloh36:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	w2, #0
	mov	x4, x19
	bl	_request_irq
	cbz	x0, LBB0_6
; %bb.4:
	ldr	x8, [x19]
	ldr	x9, [x21]
	ldr	w1, [x8, x9, lsl #2]
Lloh37:
	adrp	x0, l_.str.3@PAGE
Lloh38:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_IFX_MEI_EMSG
	mov	w0, #-1
	b	LBB0_6
LBB0_5:
Lloh39:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh40:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh41:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_dsl_devices,8,3                ; @dsl_devices
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_sDanube_Mei_Private,8,3        ; @sDanube_Mei_Private
	.comm	_MAX_BAR_REGISTERS,4,2          ; @MAX_BAR_REGISTERS
	.comm	_LTQ_MEI_INT,4,2                ; @LTQ_MEI_INT
	.comm	_IFX_DFEIR,8,3                  ; @IFX_DFEIR
	.comm	_LTQ_MEI_DYING_GASP_INT,4,2     ; @LTQ_MEI_DYING_GASP_INT
	.comm	_IFX_DYING_GASP,8,3             ; @IFX_DYING_GASP
	.comm	_KSEG1,8,3                      ; @KSEG1
	.comm	_LTQ_MEI_BASE_ADDR,8,3          ; @LTQ_MEI_BASE_ADDR
	.comm	_LTQ_PMU_PWDCR,8,3              ; @LTQ_PMU_PWDCR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"arcq"

l_.str.1:                               ; @.str.1
	.asciz	"arcr"

	.comm	_IFX_MEI_IrqHandle,4,2          ; @IFX_MEI_IrqHandle
l_.str.2:                               ; @.str.2
	.asciz	"DFEIR"

l_.str.3:                               ; @.str.3
	.asciz	"request_irq %d failed!\n"

	.no_dead_strip	_IFX_MEI_InitDevice
.subsections_via_symbols
