	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __iommu_calculate_agaw
___iommu_calculate_agaw:                ## @__iommu_calculate_agaw
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movl	(%rdi), %edi
	callq	_cap_sagaw
	movq	%rax, -24(%rbp)
	movl	%ebx, %edi
	callq	_width_to_agaw
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_5
## %bb.1:
	leaq	-24(%rbp), %r14
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	movq	%r14, %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	leal	-1(%rbx), %eax
	testl	%ebx, %ebx
	movl	%eax, %ebx
	jg	LBB0_2
## %bb.4:
	movl	$-1, %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	___iommu_calculate_agaw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __iommu_calculate_agaw
___iommu_calculate_agaw:                ; @__iommu_calculate_agaw
	.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, x1
	ldr	w0, [x0]
	bl	_cap_sagaw
	str	x0, [sp, #8]
	mov	x0, x19
	bl	_width_to_agaw
	mov	x19, x0
	tbnz	w0, #31, LBB0_4
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #8
	mov	x0, x19
	bl	_test_bit
	cbnz	x0, LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	sub	w8, w19, #1
	cmp	w19, #0
	mov	x19, x8
	b.gt	LBB0_1
; %bb.3:
	mov	w19, #-1
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	___iommu_calculate_agaw
.subsections_via_symbols
