	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function arm_smmu_test_smr_masks
_arm_smmu_test_smr_masks:               ## @arm_smmu_test_smr_masks
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, 16(%rdi)
	je	LBB0_2
## %bb.1:
	movq	%rdi, %rbx
	movq	_SMR_ID@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	8(%rbx), %rsi
	callq	_FIELD_PREP
	movl	%eax, %r14d
	xorl	%edi, %edi
	callq	_ARM_SMMU_GR0_SMR
	movq	%rbx, %rdi
	movl	%eax, %esi
	movl	%r14d, %edx
	callq	_arm_smmu_gr0_write
	xorl	%edi, %edi
	callq	_ARM_SMMU_GR0_SMR
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_arm_smmu_gr0_read
	movl	(%r15), %edi
	movl	%eax, %esi
	callq	_FIELD_GET
	movq	%rax, 8(%rbx)
	movq	_SMR_MASK@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	%rax, %rsi
	callq	_FIELD_PREP
	movl	%eax, %r14d
	xorl	%edi, %edi
	callq	_ARM_SMMU_GR0_SMR
	movq	%rbx, %rdi
	movl	%eax, %esi
	movl	%r14d, %edx
	callq	_arm_smmu_gr0_write
	xorl	%edi, %edi
	callq	_ARM_SMMU_GR0_SMR
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_arm_smmu_gr0_read
	movl	(%r15), %edi
	movl	%eax, %esi
	callq	_FIELD_GET
	movq	%rax, (%rbx)
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SMR_ID,4,2                     ## @SMR_ID
	.comm	_SMR_MASK,4,2                   ## @SMR_MASK
	.no_dead_strip	_arm_smmu_test_smr_masks
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function arm_smmu_test_smr_masks
_arm_smmu_test_smr_masks:               ; @arm_smmu_test_smr_masks
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	ldr	w8, [x0, #16]
	cbz	w8, LBB0_2
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x21, _SMR_ID@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SMR_ID@GOTPAGEOFF]
	ldr	w0, [x21]
	ldr	x1, [x19, #8]
	bl	_FIELD_PREP
	mov	x20, x0
	mov	w0, #0
	bl	_ARM_SMMU_GR0_SMR
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	bl	_arm_smmu_gr0_write
	mov	w0, #0
	bl	_ARM_SMMU_GR0_SMR
	mov	x1, x0
	mov	x0, x19
	bl	_arm_smmu_gr0_read
	mov	x1, x0
	ldr	w0, [x21]
	bl	_FIELD_GET
	mov	x1, x0
	str	x0, [x19, #8]
Lloh2:
	adrp	x21, _SMR_MASK@GOTPAGE
Lloh3:
	ldr	x21, [x21, _SMR_MASK@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_FIELD_PREP
	mov	x20, x0
	mov	w0, #0
	bl	_ARM_SMMU_GR0_SMR
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	bl	_arm_smmu_gr0_write
	mov	w0, #0
	bl	_ARM_SMMU_GR0_SMR
	mov	x1, x0
	mov	x0, x19
	bl	_arm_smmu_gr0_read
	mov	x1, x0
	ldr	w0, [x21]
	bl	_FIELD_GET
	str	x0, [x19]
LBB0_2:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_SMR_ID,4,2                     ; @SMR_ID
	.comm	_SMR_MASK,4,2                   ; @SMR_MASK
	.no_dead_strip	_arm_smmu_test_smr_masks
.subsections_via_symbols
