	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_lic_attach
_tegra_lic_attach:                      ## @tegra_lic_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	%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	%edi, %r14d
	callq	_device_get_softc
	movq	%rax, %r12
	movl	%r14d, 16(%rax)
	movl	%r14d, %edi
	callq	_ofw_bus_get_node
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rsi
	leaq	-44(%rbp), %rdx
	movl	%eax, %edi
	movl	$4, %ecx
	callq	_OF_getencprop
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	movl	-44(%rbp), %edi
	callq	_OF_device_from_xref
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	_lic_spec@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	(%r12), %rdx
	movl	%r14d, %edi
	callq	_bus_alloc_resources
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_13
LBB0_1:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_13
LBB0_3:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_13
LBB0_6:
	movl	(%r13), %edi
	callq	_nitems
	testl	%eax, %eax
	jle	LBB0_11
## %bb.7:
	xorl	%ebx, %ebx
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	incq	%rbx
	movl	(%r13), %edi
	callq	_nitems
	cltq
	cmpq	%rax, %rbx
	jge	LBB0_11
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	cmpq	$0, (%rax,%rbx,8)
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	_LIC_CPU_IER_CLR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	$-1, %ecx
	callq	_WR4
	movq	_LIC_CPU_IEP_CLASS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	%ebx, %esi
	xorl	%ecx, %ecx
	callq	_WR4
	jmp	LBB0_10
LBB0_11:
	movl	%r15d, %edi
	callq	_OF_xref_from_node
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_intr_pic_register
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_14
## %bb.12:
	leaq	L_.str.4(%rip), %rsi
LBB0_13:
	movl	%r14d, %edi
	callq	_device_printf
	movq	_lic_spec@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r12), %rdx
	movl	%r14d, %edi
	callq	_bus_release_resources
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"interrupt-parent"

L_.str.1:                               ## @.str.1
	.asciz	"Cannot read parent node property\n"

L_.str.2:                               ## @.str.2
	.asciz	"Cannott find parent controller\n"

	.comm	_lic_spec,4,2                   ## @lic_spec
L_.str.3:                               ## @.str.3
	.asciz	"Cannott allocate resources\n"

	.comm	_LIC_CPU_IER_CLR,4,2            ## @LIC_CPU_IER_CLR
	.comm	_LIC_CPU_IEP_CLASS,4,2          ## @LIC_CPU_IEP_CLASS
L_.str.4:                               ## @.str.4
	.asciz	"Cannot register PIC\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.no_dead_strip	_tegra_lic_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_lic_attach
_tegra_lic_attach:                      ; @tegra_lic_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	bl	_device_get_softc
	mov	x20, x0
	str	w19, [x0, #16]
	mov	x0, x19
	bl	_ofw_bus_get_node
	mov	x21, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #12
	mov	w3, #4
	bl	_OF_getencprop
Lloh2:
	adrp	x23, _lic_spec@GOTPAGE
Lloh3:
	ldr	x23, [x23, _lic_spec@GOTPAGEOFF]
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.1:
	ldr	w0, [sp, #12]
	bl	_OF_device_from_xref
	str	x0, [x20, #8]
	cbz	x0, LBB0_5
; %bb.2:
	ldr	w1, [x23]
	ldr	x2, [x20]
	mov	x0, x19
	bl	_bus_alloc_resources
	cbz	x0, LBB0_6
; %bb.3:
Lloh4:
	adrp	x1, l_.str.3@PAGE
Lloh5:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_14
LBB0_4:
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_14
LBB0_5:
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_14
LBB0_6:
	ldr	w0, [x23]
	bl	_nitems
	cmp	w0, #1
	b.lt	LBB0_11
; %bb.7:
	mov	x22, #0
Lloh10:
	adrp	x24, _LIC_CPU_IER_CLR@GOTPAGE
Lloh11:
	ldr	x24, [x24, _LIC_CPU_IER_CLR@GOTPAGEOFF]
Lloh12:
	adrp	x25, _LIC_CPU_IEP_CLASS@GOTPAGE
Lloh13:
	ldr	x25, [x25, _LIC_CPU_IEP_CLASS@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x22, x22, #1
	ldr	w0, [x23]
	bl	_nitems
	cmp	x22, w0, sxtw
	b.ge	LBB0_11
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	ldr	x8, [x8, x22, lsl #3]
	cbz	x8, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w2, [x24]
	mov	x0, x20
	mov	x1, x22
	mov	w3, #-1
	bl	_WR4
	ldr	w2, [x25]
	mov	x0, x20
	mov	x1, x22
	mov	w3, #0
	bl	_WR4
	b	LBB0_8
LBB0_11:
	mov	x0, x21
	bl	_OF_xref_from_node
	mov	x1, x0
	mov	x0, x19
	bl	_intr_pic_register
	cbz	x0, LBB0_13
; %bb.12:
	mov	w0, #0
	b	LBB0_15
LBB0_13:
Lloh14:
	adrp	x1, l_.str.4@PAGE
Lloh15:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_14:
	mov	x0, x19
	bl	_device_printf
	ldr	w1, [x23]
	ldr	x2, [x20]
	mov	x0, x19
	bl	_bus_release_resources
Lloh16:
	adrp	x8, _ENXIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
LBB0_15:
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"interrupt-parent"

l_.str.1:                               ; @.str.1
	.asciz	"Cannot read parent node property\n"

l_.str.2:                               ; @.str.2
	.asciz	"Cannott find parent controller\n"

	.comm	_lic_spec,4,2                   ; @lic_spec
l_.str.3:                               ; @.str.3
	.asciz	"Cannott allocate resources\n"

	.comm	_LIC_CPU_IER_CLR,4,2            ; @LIC_CPU_IER_CLR
	.comm	_LIC_CPU_IEP_CLASS,4,2          ; @LIC_CPU_IEP_CLASS
l_.str.4:                               ; @.str.4
	.asciz	"Cannot register PIC\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	_tegra_lic_attach
.subsections_via_symbols
