	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function arm_smmu_write_s2cr
_arm_smmu_write_s2cr:                   ## @arm_smmu_write_s2cr
	.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
	movq	%rdi, %r15
	movq	16(%rdi), %r14
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movslq	%esi, %rcx
	movq	_S2CR_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	leaq	(%rcx,%rcx,2), %r13
	movl	8(%r14,%r13,4), %esi
	callq	_FIELD_PREP
	movl	%eax, %r12d
	movq	_S2CR_CBNDX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%r14,%r13,4), %esi
	callq	_FIELD_PREP
	movl	%eax, %ebx
	orl	%r12d, %ebx
	movq	_S2CR_PRIVCFG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r14,%r13,4), %esi
	callq	_FIELD_PREP
	movl	%eax, %r12d
	orl	%ebx, %r12d
	movq	_ARM_SMMU_FEAT_EXIDS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_4
## %bb.1:
	movq	8(%r15), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_4
## %bb.3:
	movq	_S2CR_EXIDVALID@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
LBB0_4:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_ARM_SMMU_GR0_S2CR
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	%r12d, %edx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_arm_smmu_gr0_write             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_S2CR_TYPE,4,2                  ## @S2CR_TYPE
	.comm	_S2CR_CBNDX,4,2                 ## @S2CR_CBNDX
	.comm	_S2CR_PRIVCFG,4,2               ## @S2CR_PRIVCFG
	.comm	_ARM_SMMU_FEAT_EXIDS,4,2        ## @ARM_SMMU_FEAT_EXIDS
	.comm	_S2CR_EXIDVALID,4,2             ## @S2CR_EXIDVALID
	.no_dead_strip	_arm_smmu_write_s2cr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function arm_smmu_write_s2cr
_arm_smmu_write_s2cr:                   ; @arm_smmu_write_s2cr
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #16]
Lloh0:
	adrp	x9, _S2CR_TYPE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _S2CR_TYPE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x9]
	mov	w9, #12
	smaddl	x22, w1, w9, x8
	ldr	w1, [x22, #8]
	bl	_FIELD_PREP
	mov	x21, x0
Lloh3:
	adrp	x8, _S2CR_CBNDX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _S2CR_CBNDX@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldr	w1, [x22, #4]
	bl	_FIELD_PREP
	orr	w21, w0, w21
Lloh6:
	adrp	x8, _S2CR_PRIVCFG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _S2CR_PRIVCFG@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldr	w1, [x22]
	bl	_FIELD_PREP
	orr	w21, w21, w0
	ldr	w8, [x19]
Lloh9:
	adrp	x9, _ARM_SMMU_FEAT_EXIDS@GOTPAGE
Lloh10:
	ldr	x9, [x9, _ARM_SMMU_FEAT_EXIDS@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.1:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_4
; %bb.2:
	sxtw	x9, w20
	ldr	x8, [x8, x9, lsl #3]
	cbz	x8, LBB0_4
; %bb.3:
Lloh12:
	adrp	x8, _S2CR_EXIDVALID@GOTPAGE
Lloh13:
	ldr	x8, [x8, _S2CR_EXIDVALID@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	orr	w21, w8, w21
LBB0_4:
	mov	x0, x20
	bl	_ARM_SMMU_GR0_S2CR
	mov	x1, x0
	mov	x0, x19
	mov	x2, x21
	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
	b	_arm_smmu_gr0_write
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_S2CR_TYPE,4,2                  ; @S2CR_TYPE
	.comm	_S2CR_CBNDX,4,2                 ; @S2CR_CBNDX
	.comm	_S2CR_PRIVCFG,4,2               ; @S2CR_PRIVCFG
	.comm	_ARM_SMMU_FEAT_EXIDS,4,2        ; @ARM_SMMU_FEAT_EXIDS
	.comm	_S2CR_EXIDVALID,4,2             ; @S2CR_EXIDVALID
	.no_dead_strip	_arm_smmu_write_s2cr
.subsections_via_symbols
