	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function arm_smmu_domain_set_attr
_arm_smmu_domain_set_attr:              ## @arm_smmu_domain_set_attr
	.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, %r15
	movl	%esi, %r13d
	movq	%rdi, %rbx
	callq	_to_smmu_domain
	movq	%rax, %r14
	movq	%rax, %r12
	addq	$4, %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movl	(%rbx), %eax
	cmpl	$129, %eax
	je	LBB0_9
## %bb.1:
	cmpl	$128, %eax
	jne	LBB0_12
## %bb.2:
	cmpl	$130, %r13d
	jne	LBB0_11
## %bb.3:
	cmpl	$0, 12(%r14)
	je	LBB0_5
## %bb.4:
	movq	_EPERM@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_9:
	cmpl	$131, %r13d
	jne	LBB0_11
## %bb.10:
	movl	(%r15), %eax
	movl	%eax, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_12:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_11:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_13:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_14:
	movq	%r12, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	cmpl	$0, (%r15)
	je	LBB0_8
## %bb.6:
	movq	_ARM_SMMU_DOMAIN_NESTED@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_8:
	movq	_ARM_SMMU_DOMAIN_S1@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_ARM_SMMU_DOMAIN_NESTED,4,2     ## @ARM_SMMU_DOMAIN_NESTED
	.comm	_ARM_SMMU_DOMAIN_S1,4,2         ## @ARM_SMMU_DOMAIN_S1
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_arm_smmu_domain_set_attr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function arm_smmu_domain_set_attr
_arm_smmu_domain_set_attr:              ; @arm_smmu_domain_set_attr
	.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	x22, x2
	mov	x20, x1
	mov	x23, x0
	bl	_to_smmu_domain
	mov	x21, x0
	add	x19, x0, #4
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x23]
	cmp	w8, #129
	b.eq	LBB0_5
; %bb.1:
	cmp	w8, #128
	b.ne	LBB0_7
; %bb.2:
	cmp	w20, #130
	b.ne	LBB0_8
; %bb.3:
	ldr	w8, [x21, #12]
	cbz	w8, LBB0_11
; %bb.4:
Lloh0:
	adrp	x8, _EPERM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
	b	LBB0_9
LBB0_5:
	cmp	w20, #131
	b.ne	LBB0_8
; %bb.6:
	mov	w20, #0
	ldr	w8, [x22]
	str	w8, [x21]
	b	LBB0_10
LBB0_7:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh4:
	adrp	x8, _ENODEV@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_10:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	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
LBB0_11:
	ldr	w8, [x22]
	cbz	w8, LBB0_13
; %bb.12:
	mov	w20, #0
Lloh6:
	adrp	x8, _ARM_SMMU_DOMAIN_NESTED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ARM_SMMU_DOMAIN_NESTED@GOTPAGEOFF]
	b	LBB0_14
LBB0_13:
	mov	w20, #0
Lloh8:
	adrp	x8, _ARM_SMMU_DOMAIN_S1@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ARM_SMMU_DOMAIN_S1@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
	str	w8, [x21, #8]
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_ARM_SMMU_DOMAIN_NESTED,4,2     ; @ARM_SMMU_DOMAIN_NESTED
	.comm	_ARM_SMMU_DOMAIN_S1,4,2         ; @ARM_SMMU_DOMAIN_S1
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_arm_smmu_domain_set_attr
.subsections_via_symbols
