	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tzic_attach
_tzic_attach:                           ## @tzic_attach
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	callq	_device_get_softc
	movq	%rax, %rbx
	movq	_tzic_sc@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_11
## %bb.1:
	movq	%rbx, (%rax)
	movl	%r14d, 8(%rbx)
	movl	$0, -28(%rbp)
	movq	_SYS_RES_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RF_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-28(%rbp), %rdx
	movl	%r14d, %edi
	callq	_bus_alloc_resource_any
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_13
## %bb.2:
	movl	$0, -28(%rbp)
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	callq	_TZIC_INTSEC
	movq	%rbx, %rdi
	movl	%eax, %esi
	movl	$-1, %edx
	callq	_tzic_write_4
	movl	-28(%rbp), %eax
	leal	1(%rax), %edi
	movl	%edi, -28(%rbp)
	cmpl	$3, %eax
	jl	LBB0_3
## %bb.4:
	movl	$0, -28(%rbp)
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	callq	_TZIC_ENCLEAR
	movq	%rbx, %rdi
	movl	%eax, %esi
	movl	$-1, %edx
	callq	_tzic_write_4
	movl	-28(%rbp), %eax
	leal	1(%rax), %edi
	movl	%edi, -28(%rbp)
	cmpl	$3, %eax
	jl	LBB0_5
## %bb.6:
	movl	$0, -28(%rbp)
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	callq	_TZIC_PRIORITY
	movq	%rbx, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_tzic_write_4
	movl	-28(%rbp), %eax
	leal	1(%rax), %edi
	movl	%edi, -28(%rbp)
	cmpl	$31, %eax
	jl	LBB0_7
## %bb.8:
	movq	_TZIC_PRIOMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$255, %edx
	callq	_tzic_write_4
	movq	_TZIC_SYNCCTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_tzic_write_4
	movq	_TZIC_INTCNTL@GOTPCREL(%rip), %rax
	movq	_INTCNTL_NSEN_MASK@GOTPCREL(%rip), %rcx
	movq	_INTCNTL_NSEN@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movl	(%rax), %esi
	movq	_INTCNTL_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_tzic_write_4
	movq	%rbx, %rdi
	callq	_tzic_pic_attach
	testq	%rax, %rax
	je	LBB0_12
## %bb.9:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_10
LBB0_13:
	leaq	L_.str(%rip), %rsi
LBB0_10:
	movl	%r14d, %edi
	callq	_device_printf
LBB0_11:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_12:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_tzic_sc,8,3                    ## @tzic_sc
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_SYS_RES_MEMORY,4,2             ## @SYS_RES_MEMORY
	.comm	_RF_ACTIVE,4,2                  ## @RF_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not allocate resources\n"

	.comm	_TZIC_PRIOMASK,4,2              ## @TZIC_PRIOMASK
	.comm	_TZIC_SYNCCTRL,4,2              ## @TZIC_SYNCCTRL
	.comm	_TZIC_INTCNTL,4,2               ## @TZIC_INTCNTL
	.comm	_INTCNTL_NSEN_MASK,4,2          ## @INTCNTL_NSEN_MASK
	.comm	_INTCNTL_NSEN,4,2               ## @INTCNTL_NSEN
	.comm	_INTCNTL_EN,4,2                 ## @INTCNTL_EN
L_.str.1:                               ## @.str.1
	.asciz	"could not attach PIC\n"

	.no_dead_strip	_tzic_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tzic_attach
_tzic_attach:                           ; @tzic_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	bl	_device_get_softc
Lloh0:
	adrp	x8, _tzic_sc@GOTPAGE
Lloh1:
	ldr	x8, [x8, _tzic_sc@GOTPAGEOFF]
	ldr	x9, [x8]
	cbnz	x9, LBB0_12
; %bb.1:
	mov	x20, x0
	str	x0, [x8]
	str	w19, [x0, #8]
	str	wzr, [sp, #12]
Lloh2:
	adrp	x8, _SYS_RES_MEMORY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SYS_RES_MEMORY@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _RF_ACTIVE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RF_ACTIVE@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_bus_alloc_resource_any
	str	x0, [x20]
	cbz	x0, LBB0_10
; %bb.2:
	mov	w0, #0
	str	wzr, [sp, #12]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	bl	_TZIC_INTSEC
	mov	x1, x0
	mov	x0, x20
	mov	w2, #-1
	bl	_tzic_write_4
	ldr	w8, [sp, #12]
	add	w0, w8, #1
	str	w0, [sp, #12]
	cmp	w8, #3
	b.lt	LBB0_3
; %bb.4:
	mov	w0, #0
	str	wzr, [sp, #12]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	bl	_TZIC_ENCLEAR
	mov	x1, x0
	mov	x0, x20
	mov	w2, #-1
	bl	_tzic_write_4
	ldr	w8, [sp, #12]
	add	w0, w8, #1
	str	w0, [sp, #12]
	cmp	w8, #3
	b.lt	LBB0_5
; %bb.6:
	mov	w0, #0
	str	wzr, [sp, #12]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	bl	_TZIC_PRIORITY
	mov	x1, x0
	mov	x0, x20
	mov	w2, #0
	bl	_tzic_write_4
	ldr	w8, [sp, #12]
	add	w0, w8, #1
	str	w0, [sp, #12]
	cmp	w8, #31
	b.lt	LBB0_7
; %bb.8:
Lloh8:
	adrp	x8, _TZIC_PRIOMASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TZIC_PRIOMASK@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #255
	bl	_tzic_write_4
Lloh11:
	adrp	x8, _TZIC_SYNCCTRL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TZIC_SYNCCTRL@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_tzic_write_4
Lloh14:
	adrp	x8, _TZIC_INTCNTL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _TZIC_INTCNTL@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x8, _INTCNTL_NSEN_MASK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _INTCNTL_NSEN_MASK@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _INTCNTL_NSEN@GOTPAGE
Lloh21:
	ldr	x9, [x9, _INTCNTL_NSEN@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh23:
	adrp	x9, _INTCNTL_EN@GOTPAGE
Lloh24:
	ldr	x9, [x9, _INTCNTL_EN@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x20
	bl	_tzic_write_4
	mov	x0, x20
	bl	_tzic_pic_attach
	cbz	x0, LBB0_13
; %bb.9:
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_10:
Lloh28:
	adrp	x1, l_.str@PAGE
Lloh29:
	add	x1, x1, l_.str@PAGEOFF
LBB0_11:
	mov	x0, x19
	bl	_device_printf
LBB0_12:
Lloh30:
	adrp	x8, _ENXIO@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
LBB0_13:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.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 AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_tzic_sc,8,3                    ; @tzic_sc
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_SYS_RES_MEMORY,4,2             ; @SYS_RES_MEMORY
	.comm	_RF_ACTIVE,4,2                  ; @RF_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not allocate resources\n"

	.comm	_TZIC_PRIOMASK,4,2              ; @TZIC_PRIOMASK
	.comm	_TZIC_SYNCCTRL,4,2              ; @TZIC_SYNCCTRL
	.comm	_TZIC_INTCNTL,4,2               ; @TZIC_INTCNTL
	.comm	_INTCNTL_NSEN_MASK,4,2          ; @INTCNTL_NSEN_MASK
	.comm	_INTCNTL_NSEN,4,2               ; @INTCNTL_NSEN
	.comm	_INTCNTL_EN,4,2                 ; @INTCNTL_EN
l_.str.1:                               ; @.str.1
	.asciz	"could not attach PIC\n"

	.no_dead_strip	_tzic_attach
.subsections_via_symbols
