	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function host1x_new_pass
_host1x_new_pass:                       ## @host1x_new_pass
	.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
	subq	$24, %rsp
	.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
	cmpl	$0, (%rax)
	jne	LBB0_26
## %bb.1:
	movq	%rax, %rbx
	movq	_bus_current_pass@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_BUS_PASS_DEFAULT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_2
LBB0_26:
	movl	%r14d, %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bus_generic_new_pass           ## TAILCALL
LBB0_2:
	movl	$1, (%rbx)
	movl	%r14d, %edi
	callq	_ofw_bus_get_node
	movq	%rax, %r15
	movl	$0, -44(%rbp)
	movq	_SYS_RES_IRQ@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_RF_ACTIVE@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	leaq	-44(%rbp), %rdx
	movl	%r14d, %edi
	callq	_bus_alloc_resource_any
	movq	%rax, 32(%rbx)
	testq	%rax, %rax
	je	LBB0_3
## %bb.6:
	movl	$1, -44(%rbp)
	movl	(%r12), %esi
	movl	(%r13), %ecx
	leaq	-44(%rbp), %rdx
	movl	%r14d, %edi
	callq	_bus_alloc_resource_any
	movq	%rax, 48(%rbx)
	testq	%rax, %rax
	je	LBB0_3
## %bb.7:
	movl	56(%rbx), %edi
	leaq	60(%rbx), %r12
	leaq	L_.str.1(%rip), %rdx
	xorl	%esi, %esi
	movq	%r12, %rcx
	callq	_hwreset_get_by_ofw_name
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_4
LBB0_3:
	leaq	L_.str(%rip), %rsi
LBB0_4:
	movl	%r14d, %edi
LBB0_5:
	xorl	%eax, %eax
	callq	_device_printf
LBB0_12:
	movl	%r14d, %edi
	callq	_device_detach
LBB0_25:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	56(%rbx), %edi
	leaq	64(%rbx), %r13
	xorl	%esi, %esi
	xorl	%edx, %edx
	movq	%r13, %rcx
	callq	_clk_get_by_ofw_index
	testl	%eax, %eax
	je	LBB0_13
## %bb.10:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_11
LBB0_13:
	movl	(%r13), %edi
	callq	_clk_enable
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	leaq	L_.str.4(%rip), %rsi
LBB0_11:
	movl	%r14d, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_device_printf
	jmp	LBB0_12
LBB0_15:
	movl	(%r12), %edi
	callq	_hwreset_deassert
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:
	movl	56(%rbx), %edi
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_5
LBB0_17:
	movq	_INTR_TYPE_MISC@GOTPCREL(%rip), %r12
	movq	_INTR_MPSAFE@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	orl	(%r12), %edx
	movq	48(%rbx), %rsi
	movq	_host1x_gen_intr@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	40(%rbx), %rax
	movq	%rax, (%rsp)
	movl	%r14d, %edi
	xorl	%ecx, %ecx
	movq	%rbx, %r9
	callq	_bus_setup_intr
	testl	%eax, %eax
	je	LBB0_19
## %bb.18:
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_4
LBB0_19:
	movl	(%r13), %edx
	orl	(%r12), %edx
	movq	32(%rbx), %rsi
	movq	_host1x_syncpt_intr@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	24(%rbx), %rax
	movq	%rax, (%rsp)
	movl	%r14d, %edi
	xorl	%ecx, %ecx
	movq	%rbx, %r9
	callq	_bus_setup_intr
	testl	%eax, %eax
	je	LBB0_21
## %bb.20:
	leaq	L_.str.7(%rip), %rsi
	jmp	LBB0_4
LBB0_21:
	movl	%r14d, %edi
	xorl	%esi, %esi
	callq	_simplebus_init
	movq	%r15, %rdi
	callq	_OF_child
	testq	%rax, %rax
	jle	LBB0_24
## %bb.22:
	movq	%rax, %r15
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %edi
	movq	%r15, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	_simplebus_add_device
	movq	%r15, %rdi
	callq	_OF_peer
	movq	%rax, %r15
	testq	%rax, %rax
	jg	LBB0_23
LBB0_24:
	movq	_host1x_irq_hook@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rbx, %rdi
	addq	$8, %rdi
	movl	%eax, 16(%rbx)
	movq	%rbx, 8(%rbx)
	callq	_config_intrhook_establish
	movl	%r14d, %edi
	callq	_bus_generic_new_pass
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.comm	_bus_current_pass,8,3           ## @bus_current_pass
	.comm	_BUS_PASS_DEFAULT,8,3           ## @BUS_PASS_DEFAULT
	.comm	_SYS_RES_IRQ,4,2                ## @SYS_RES_IRQ
	.comm	_RF_ACTIVE,4,2                  ## @RF_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot allocate interrupt.\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.1:                               ## @.str.1
	.asciz	"host1x"

L_.str.2:                               ## @.str.2
	.asciz	"Cannot get fuse reset\n"

L_.str.3:                               ## @.str.3
	.asciz	"Cannot get i2c clock: %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"Cannot enable clock: %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"Cannot clear reset\n"

	.comm	_INTR_TYPE_MISC,4,2             ## @INTR_TYPE_MISC
	.comm	_INTR_MPSAFE,4,2                ## @INTR_MPSAFE
	.comm	_host1x_gen_intr,4,2            ## @host1x_gen_intr
L_.str.6:                               ## @.str.6
	.asciz	"Cannot setup gen interrupt.\n"

	.comm	_host1x_syncpt_intr,4,2         ## @host1x_syncpt_intr
L_.str.7:                               ## @.str.7
	.asciz	"Cannot setup syncpt interrupt.\n"

	.comm	_host1x_irq_hook,4,2            ## @host1x_irq_hook
	.no_dead_strip	_host1x_new_pass
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function host1x_new_pass
_host1x_new_pass:                       ; @host1x_new_pass
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x0
	bl	_device_get_softc
	ldr	w8, [x0]
	cbnz	w8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _bus_current_pass@GOTPAGE
Lloh1:
	ldr	x8, [x8, _bus_current_pass@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _BUS_PASS_DEFAULT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BUS_PASS_DEFAULT@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_3
LBB0_2:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_bus_generic_new_pass
LBB0_3:
	mov	x20, x0
	mov	w22, #1
	str	w22, [x0]
	mov	x0, x19
	bl	_ofw_bus_get_node
	mov	x21, x0
	str	wzr, [sp, #12]
Lloh6:
	adrp	x23, _SYS_RES_IRQ@GOTPAGE
Lloh7:
	ldr	x23, [x23, _SYS_RES_IRQ@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh8:
	adrp	x24, _RF_ACTIVE@GOTPAGE
Lloh9:
	ldr	x24, [x24, _RF_ACTIVE@GOTPAGEOFF]
	ldr	w3, [x24]
	add	x2, sp, #12
	mov	x0, x19
	bl	_bus_alloc_resource_any
	str	x0, [x20, #32]
	cbz	x0, LBB0_7
; %bb.4:
	str	w22, [sp, #12]
	ldr	w1, [x23]
	ldr	w3, [x24]
	add	x2, sp, #12
	mov	x0, x19
	bl	_bus_alloc_resource_any
	str	x0, [x20, #48]
	cbz	x0, LBB0_7
; %bb.5:
	ldr	w0, [x20, #56]
	add	x22, x20, #60
Lloh10:
	adrp	x2, l_.str.1@PAGE
Lloh11:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	w1, #0
	mov	x3, x22
	bl	_hwreset_get_by_ofw_name
	cbz	w0, LBB0_11
; %bb.6:
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_7:
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
LBB0_8:
	mov	x0, x19
LBB0_9:
	bl	_device_printf
	mov	x0, x19
	bl	_device_detach
LBB0_10:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_11:
	ldr	w0, [x20, #56]
	add	x23, x20, #64
	mov	w1, #0
	mov	w2, #0
	mov	x3, x23
	bl	_clk_get_by_ofw_index
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_13
; %bb.12:
	str	x0, [sp]
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_8
LBB0_13:
	ldr	w0, [x23]
	bl	_clk_enable
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_15
; %bb.14:
	str	x0, [sp]
Lloh18:
	adrp	x1, l_.str.4@PAGE
Lloh19:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_8
LBB0_15:
	ldr	w0, [x22]
	bl	_hwreset_deassert
	cbz	w0, LBB0_17
; %bb.16:
	ldr	w0, [x20, #56]
Lloh20:
	adrp	x1, l_.str.5@PAGE
Lloh21:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_9
LBB0_17:
	ldr	x1, [x20, #48]
Lloh22:
	adrp	x22, _INTR_TYPE_MISC@GOTPAGE
Lloh23:
	ldr	x22, [x22, _INTR_TYPE_MISC@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh24:
	adrp	x23, _INTR_MPSAFE@GOTPAGE
Lloh25:
	ldr	x23, [x23, _INTR_MPSAFE@GOTPAGEOFF]
	ldr	w9, [x23]
	orr	w2, w9, w8
Lloh26:
	adrp	x8, _host1x_gen_intr@GOTPAGE
Lloh27:
	ldr	x8, [x8, _host1x_gen_intr@GOTPAGEOFF]
Lloh28:
	ldr	w4, [x8]
	add	x6, x20, #40
	mov	x0, x19
	mov	x3, #0
	mov	x5, x20
	bl	_bus_setup_intr
	cbz	w0, LBB0_19
; %bb.18:
Lloh29:
	adrp	x1, l_.str.6@PAGE
Lloh30:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_8
LBB0_19:
	ldr	x1, [x20, #32]
	ldr	w8, [x22]
	ldr	w9, [x23]
	orr	w2, w9, w8
Lloh31:
	adrp	x8, _host1x_syncpt_intr@GOTPAGE
Lloh32:
	ldr	x8, [x8, _host1x_syncpt_intr@GOTPAGEOFF]
Lloh33:
	ldr	w4, [x8]
	add	x6, x20, #24
	mov	x0, x19
	mov	x3, #0
	mov	x5, x20
	bl	_bus_setup_intr
	cbz	w0, LBB0_21
; %bb.20:
Lloh34:
	adrp	x1, l_.str.7@PAGE
Lloh35:
	add	x1, x1, l_.str.7@PAGEOFF
	b	LBB0_8
LBB0_21:
	mov	x0, x19
	mov	w1, #0
	bl	_simplebus_init
	mov	x0, x21
	bl	_OF_child
	cmp	x0, #1
	b.lt	LBB0_24
; %bb.22:
	mov	x21, x0
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	w2, #0
	mov	x3, #0
	mov	w4, #-1
	mov	x5, #0
	bl	_simplebus_add_device
	mov	x0, x21
	bl	_OF_peer
	mov	x21, x0
	cmp	x0, #0
	b.gt	LBB0_23
LBB0_24:
Lloh36:
	adrp	x8, _host1x_irq_hook@GOTPAGE
Lloh37:
	ldr	x8, [x8, _host1x_irq_hook@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	add	x0, x20, #8
	str	w8, [x20, #16]
	str	x20, [x20, #8]
	bl	_config_intrhook_establish
	mov	x0, x19
	bl	_bus_generic_new_pass
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_bus_current_pass,8,3           ; @bus_current_pass
	.comm	_BUS_PASS_DEFAULT,8,3           ; @BUS_PASS_DEFAULT
	.comm	_SYS_RES_IRQ,4,2                ; @SYS_RES_IRQ
	.comm	_RF_ACTIVE,4,2                  ; @RF_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot allocate interrupt.\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.1:                               ; @.str.1
	.asciz	"host1x"

l_.str.2:                               ; @.str.2
	.asciz	"Cannot get fuse reset\n"

l_.str.3:                               ; @.str.3
	.asciz	"Cannot get i2c clock: %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"Cannot enable clock: %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"Cannot clear reset\n"

	.comm	_INTR_TYPE_MISC,4,2             ; @INTR_TYPE_MISC
	.comm	_INTR_MPSAFE,4,2                ; @INTR_MPSAFE
	.comm	_host1x_gen_intr,4,2            ; @host1x_gen_intr
l_.str.6:                               ; @.str.6
	.asciz	"Cannot setup gen interrupt.\n"

	.comm	_host1x_syncpt_intr,4,2         ; @host1x_syncpt_intr
l_.str.7:                               ; @.str.7
	.asciz	"Cannot setup syncpt interrupt.\n"

	.comm	_host1x_irq_hook,4,2            ; @host1x_irq_hook
	.no_dead_strip	_host1x_new_pass
.subsections_via_symbols
