	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ps3_iommu_map
_ps3_iommu_map:                         ## @ps3_iommu_map
	.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	%rdx, %r14
	movq	%rsi, %r13
	callq	_device_get_softc
	cmpl	$0, (%r14)
	jle	LBB0_10
## %bb.1:
	movq	%rax, %r15
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %r12d
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movzbl	%cl, %edi
	andl	$1, %edi
	callq	_KASSERT
	movq	24(%rbp), %rax
	movq	(%rax), %rax
	movl	%r12d, %ecx
	movq	(%r13,%rbx,8), %rdx
	addq	(%rax,%rcx,8), %rdx
	movq	8(%r15), %rax
	shlq	$4, %rcx
	subq	(%rax,%rcx), %rdx
	movq	%rdx, (%r13,%rbx,8)
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jge	LBB0_10
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movl	(%r15), %eax
	movq	(%r13,%rbx,8), %rsi
	testl	%eax, %eax
	jle	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r15), %rdx
	addq	$8, %rdx
	movb	$1, %cl
	xorl	%r12d, %r12d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=2
	incq	%r12
	cmpq	%rax, %r12
	setb	%cl
	addq	$16, %rdx
	cmpq	%r12, %rax
	je	LBB0_8
LBB0_5:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-8(%rdx), %rdi
	cmpq	%rdi, %rsi
	jl	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	addq	(%rdx), %rdi
	cmpq	%rdi, %rsi
	jge	LBB0_7
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r12d, %r12d
	xorl	%ecx, %ecx
	jmp	LBB0_9
LBB0_10:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_ps3_iommu_map
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ps3_iommu_map
_ps3_iommu_map:                         ; @ps3_iommu_map
	.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
	mov	x19, x7
	mov	x20, x2
	mov	x21, x1
	bl	_device_get_softc
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.1:
	mov	x22, x0
	mov	x23, #0
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x24, x8
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	and	w0, w9, #0x1
	bl	_KASSERT
	ldr	x8, [x19]
	ldr	x8, [x8, w24, uxtw #3]
	lsl	x9, x23, #3
	ldr	x10, [x21, x9]
	mov	w11, w24
	ldr	x12, [x22, #8]
	lsl	x11, x11, #4
	ldr	x11, [x12, x11]
	add	x8, x10, x8
	sub	x8, x8, x11
	str	x8, [x21, x9]
	add	x23, x23, #1
	ldrsw	x8, [x20]
	cmp	x23, x8
	b.ge	LBB0_10
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	ldr	w8, [x22]
	ldr	x1, [x21, x23, lsl #3]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x24, #0
	ldr	x9, [x22, #8]
	add	x10, x9, #8
	mov	w9, #1
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	add	x24, x24, #1
	cmp	x24, x8
	cset	w9, lo
	add	x10, x10, #16
	cmp	x8, x24
	b.eq	LBB0_2
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldur	x11, [x10, #-8]
	cmp	x1, x11
	b.lt	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	ldr	x12, [x10]
	add	x11, x12, x11
	cmp	x1, x11
	b.ge	LBB0_6
	b	LBB0_3
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w24, #0
	mov	w9, #0
	b	LBB0_3
LBB0_10:
	mov	w0, #0
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_ps3_iommu_map
.subsections_via_symbols
