	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ohci_ps3_attach
_ohci_ps3_attach:                       ## @ohci_ps3_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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	callq	_device_get_softc
	movq	%rax, %rbx
	movl	%r14d, 16(%rax)
	movl	60(%rax), %eax
	movl	%eax, 12(%rbx)
	movq	_OHCI_MAX_DEVICES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movl	$32, (%rbx)
	movl	%r14d, %edi
	callq	_USB_GET_DMA_TAG
	movq	_ohci_iterate_hw_softc@GOTPCREL(%rip), %rdx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_usb_bus_mem_alloc_all
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_2:
	movl	$0, -28(%rbp)
	movq	_SYS_RES_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RF_ACTIVE@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	leaq	-28(%rbp), %rdx
	movl	%r14d, %edi
	callq	_bus_alloc_resource_any
	movq	%rax, 48(%rbx)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %rdi
	callq	_rman_get_bustag
	movl	%eax, 24(%rbx)
	movq	48(%rbx), %rdi
	callq	_rman_get_bushandle
	movl	%eax, 20(%rbx)
	movq	48(%rbx), %rdi
	callq	_rman_get_size
	movl	%eax, 56(%rbx)
	movl	$0, -28(%rbp)
	movq	_SYS_RES_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RF_SHAREABLE@GOTPCREL(%rip), %rax
	movl	(%r15), %ecx
	orl	(%rax), %ecx
	leaq	-28(%rbp), %rdx
	movl	%r14d, %edi
	callq	_bus_alloc_resource_any
	movq	%rax, 32(%rbx)
	testq	%rax, %rax
	je	LBB0_5
## %bb.7:
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %edi
	movl	$-1, %edx
	callq	_device_add_child
	movl	%eax, 4(%rbx)
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	movl	%eax, %edi
	movq	%rbx, %rsi
	callq	_device_set_ivars
	movl	40(%rbx), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_sprintf
	movq	_INTR_TYPE_BIO@GOTPCREL(%rip), %rax
	movq	_INTR_MPSAFE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	32(%rbx), %rsi
	movq	_ohci_interrupt@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	movq	%rbx, %rax
	addq	$28, %rax
	movq	%rax, (%rsp)
	movl	%r14d, %edi
	xorl	%ecx, %ecx
	movq	%rbx, %r9
	callq	_bus_setup_intr
	testl	%eax, %eax
	je	LBB0_12
## %bb.10:
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_11
LBB0_3:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_6
LBB0_5:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_6
LBB0_8:
	leaq	L_.str.3(%rip), %rsi
LBB0_6:
	movl	%r14d, %edi
	xorl	%eax, %eax
	callq	_device_printf
	jmp	LBB0_15
LBB0_12:
	movl	20(%rbx), %esi
	movl	24(%rbx), %edi
	movq	_OHCI_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r15d, %r15d
	xorl	%ecx, %ecx
	callq	_bus_space_write_4
	movq	%rbx, %rdi
	callq	_ohci_init
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	leaq	L_.str.6(%rip), %rsi
LBB0_11:
	movl	%r14d, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_device_printf
LBB0_15:
	movq	_ENXIO@GOTPCREL(%rip), %rax
LBB0_16:
	movl	(%rax), %r15d
LBB0_17:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movl	4(%rbx), %edi
	callq	_device_probe_and_attach
	testl	%eax, %eax
	jne	LBB0_15
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_OHCI_MAX_DEVICES,4,2           ## @OHCI_MAX_DEVICES
	.comm	_ohci_iterate_hw_softc,4,2      ## @ohci_iterate_hw_softc
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.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 map memory\n"

	.comm	_SYS_RES_IRQ,4,2                ## @SYS_RES_IRQ
	.comm	_RF_SHAREABLE,4,2               ## @RF_SHAREABLE
L_.str.1:                               ## @.str.1
	.asciz	"Could not allocate irq\n"

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

L_.str.3:                               ## @.str.3
	.asciz	"Could not add USB device\n"

L_.str.4:                               ## @.str.4
	.asciz	"Sony"

	.comm	_INTR_TYPE_BIO,4,2              ## @INTR_TYPE_BIO
	.comm	_INTR_MPSAFE,4,2                ## @INTR_MPSAFE
	.comm	_ohci_interrupt,8,3             ## @ohci_interrupt
L_.str.5:                               ## @.str.5
	.asciz	"Could not setup error irq, %d\n"

	.comm	_OHCI_CONTROL,4,2               ## @OHCI_CONTROL
L_.str.6:                               ## @.str.6
	.asciz	"USB init failed err=%d\n"

	.no_dead_strip	_ohci_ps3_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ohci_ps3_attach
_ohci_ps3_attach:                       ; @ohci_ps3_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	bl	_device_get_softc
	mov	x20, x0
	str	w19, [x0, #16]
Lloh0:
	adrp	x8, _OHCI_MAX_DEVICES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OHCI_MAX_DEVICES@GOTPAGEOFF]
	ldr	w9, [x0, #60]
Lloh2:
	ldr	w8, [x8]
	stp	w8, w9, [x0, #8]
	mov	w8, #32
	str	w8, [x0]
	mov	x0, x19
	bl	_USB_GET_DMA_TAG
	mov	x1, x0
Lloh3:
	adrp	x2, _ohci_iterate_hw_softc@GOTPAGE
Lloh4:
	ldr	x2, [x2, _ohci_iterate_hw_softc@GOTPAGEOFF]
	mov	x0, x20
	bl	_usb_bus_mem_alloc_all
	cbz	x0, LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_14
LBB0_2:
	str	wzr, [sp, #12]
Lloh7:
	adrp	x8, _SYS_RES_MEMORY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SYS_RES_MEMORY@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x21, _RF_ACTIVE@GOTPAGE
Lloh11:
	ldr	x21, [x21, _RF_ACTIVE@GOTPAGEOFF]
	ldr	w3, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_bus_alloc_resource_any
	str	x0, [x20, #48]
	cbz	x0, LBB0_7
; %bb.3:
	bl	_rman_get_bustag
	str	w0, [x20, #24]
	ldr	x0, [x20, #48]
	bl	_rman_get_bushandle
	str	w0, [x20, #20]
	ldr	x0, [x20, #48]
	bl	_rman_get_size
	str	w0, [x20, #56]
	str	wzr, [sp, #12]
Lloh12:
	adrp	x8, _SYS_RES_IRQ@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SYS_RES_IRQ@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _RF_SHAREABLE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _RF_SHAREABLE@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w9, [x21]
	orr	w3, w9, w8
	add	x2, sp, #12
	mov	x0, x19
	bl	_bus_alloc_resource_any
	str	x0, [x20, #32]
	cbz	x0, LBB0_8
; %bb.4:
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	w2, #-1
	bl	_device_add_child
	str	w0, [x20, #4]
	cbz	w0, LBB0_9
; %bb.5:
	mov	x1, x20
	bl	_device_set_ivars
	ldr	w0, [x20, #40]
Lloh20:
	adrp	x1, l_.str.4@PAGE
Lloh21:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_sprintf
	ldr	x1, [x20, #32]
Lloh22:
	adrp	x8, _INTR_TYPE_BIO@GOTPAGE
Lloh23:
	ldr	x8, [x8, _INTR_TYPE_BIO@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
Lloh25:
	adrp	x9, _INTR_MPSAFE@GOTPAGE
Lloh26:
	ldr	x9, [x9, _INTR_MPSAFE@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	orr	w2, w9, w8
Lloh28:
	adrp	x8, _ohci_interrupt@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ohci_interrupt@GOTPAGEOFF]
Lloh30:
	ldr	x4, [x8]
	add	x6, x20, #28
	mov	x0, x19
	mov	x3, #0
	mov	x5, x20
	bl	_bus_setup_intr
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_10
; %bb.6:
	str	x0, [sp]
Lloh31:
	adrp	x1, l_.str.5@PAGE
Lloh32:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_12
LBB0_7:
Lloh33:
	adrp	x1, l_.str@PAGE
Lloh34:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_12
LBB0_8:
Lloh35:
	adrp	x1, l_.str.1@PAGE
Lloh36:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_9:
Lloh37:
	adrp	x1, l_.str.3@PAGE
Lloh38:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_12
LBB0_10:
	ldp	w1, w0, [x20, #20]
Lloh39:
	adrp	x8, _OHCI_CONTROL@GOTPAGE
Lloh40:
	ldr	x8, [x8, _OHCI_CONTROL@GOTPAGEOFF]
Lloh41:
	ldr	w2, [x8]
	mov	w3, #0
	bl	_bus_space_write_4
	mov	x0, x20
	bl	_ohci_init
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_16
; %bb.11:
	str	x0, [sp]
Lloh42:
	adrp	x1, l_.str.6@PAGE
Lloh43:
	add	x1, x1, l_.str.6@PAGEOFF
LBB0_12:
	mov	x0, x19
	bl	_device_printf
LBB0_13:
Lloh44:
	adrp	x8, _ENXIO@GOTPAGE
Lloh45:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
LBB0_14:
	ldr	w0, [x8]
LBB0_15:
	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
	add	sp, sp, #64
	ret
LBB0_16:
	ldr	w0, [x20, #4]
	bl	_device_probe_and_attach
	cbnz	w0, LBB0_13
	b	LBB0_15
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_OHCI_MAX_DEVICES,4,2           ; @OHCI_MAX_DEVICES
	.comm	_ohci_iterate_hw_softc,4,2      ; @ohci_iterate_hw_softc
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.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 map memory\n"

	.comm	_SYS_RES_IRQ,4,2                ; @SYS_RES_IRQ
	.comm	_RF_SHAREABLE,4,2               ; @RF_SHAREABLE
l_.str.1:                               ; @.str.1
	.asciz	"Could not allocate irq\n"

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

l_.str.3:                               ; @.str.3
	.asciz	"Could not add USB device\n"

l_.str.4:                               ; @.str.4
	.asciz	"Sony"

	.comm	_INTR_TYPE_BIO,4,2              ; @INTR_TYPE_BIO
	.comm	_INTR_MPSAFE,4,2                ; @INTR_MPSAFE
	.comm	_ohci_interrupt,8,3             ; @ohci_interrupt
l_.str.5:                               ; @.str.5
	.asciz	"Could not setup error irq, %d\n"

	.comm	_OHCI_CONTROL,4,2               ; @OHCI_CONTROL
l_.str.6:                               ; @.str.6
	.asciz	"USB init failed err=%d\n"

	.no_dead_strip	_ohci_ps3_attach
.subsections_via_symbols
