	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function validate_afu
_validate_afu:                          ## @validate_afu
	.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	%rdi, %r14
	movq	8(%rsi), %rax
	movl	(%rax), %edi
	testl	%edi, %edi
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r13
	movq	_OCXL_TEMPL_NAME_LEN@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jle	LBB0_7
## %bb.3:
	callq	_char_allowed
	leaq	L_.str.1(%rip), %r15
	testl	%eax, %eax
	je	LBB0_11
## %bb.4:
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jge	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%r13), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_char_allowed
	incq	%rbx
	testl	%eax, %eax
	jne	LBB0_5
	jmp	LBB0_11
LBB0_1:
	leaq	L_.str(%rip), %r15
LBB0_11:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	(%r13), %eax
	leaq	L_.str.2(%rip), %r15
	cmpl	$4, %eax
	ja	LBB0_11
## %bb.8:
	movl	$21, %ecx
	btl	%eax, %ecx
	jae	LBB0_11
## %bb.9:
	movl	4(%r13), %ecx
	leaq	L_.str.3(%rip), %r15
	cmpl	$4, %ecx
	ja	LBB0_11
## %bb.10:
	xorl	%eax, %eax
	movl	$21, %edx
	btl	%ecx, %edx
	jb	LBB0_12
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Empty AFU name\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_OCXL_TEMPL_NAME_LEN,4,2        ## @OCXL_TEMPL_NAME_LEN
L_.str.1:                               ## @.str.1
	.asciz	"Invalid character in AFU name\n"

L_.str.2:                               ## @.str.2
	.asciz	"Invalid global MMIO bar number\n"

L_.str.3:                               ## @.str.3
	.asciz	"Invalid per-process MMIO bar number\n"

	.no_dead_strip	_validate_afu
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function validate_afu
_validate_afu:                          ; @validate_afu
	.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, x0
	ldr	x8, [x1, #8]
	ldr	w0, [x8]
	cbz	w0, LBB0_6
; %bb.1:
	mov	x21, x1
Lloh0:
	adrp	x22, _OCXL_TEMPL_NAME_LEN@GOTPAGE
Lloh1:
	ldr	x22, [x22, _OCXL_TEMPL_NAME_LEN@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.2:
	bl	_char_allowed
	cbz	w0, LBB0_11
; %bb.3:
	mov	w23, #1
Lloh2:
	adrp	x20, l_.str.1@PAGE
Lloh3:
	add	x20, x20, l_.str.1@PAGEOFF
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x8, [x22]
	cmp	x23, x8
	b.ge	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21, #8]
	ldr	w0, [x8, x23, lsl #2]
	bl	_char_allowed
	add	x23, x23, #1
	cbnz	w0, LBB0_4
	b	LBB0_13
LBB0_6:
Lloh4:
	adrp	x20, l_.str@PAGE
Lloh5:
	add	x20, x20, l_.str@PAGEOFF
	b	LBB0_13
LBB0_7:
	ldr	w8, [x21]
	cmp	w8, #4
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #21
	and	w8, w8, w9
	ccmp	w8, #0, #4, ls
	b.eq	LBB0_12
; %bb.8:
	ldr	w8, [x21, #4]
Lloh6:
	adrp	x20, l_.str.3@PAGE
Lloh7:
	add	x20, x20, l_.str.3@PAGEOFF
	cmp	w8, #4
	b.hi	LBB0_13
; %bb.9:
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #21
	tst	w8, w9
	b.eq	LBB0_13
; %bb.10:
	mov	w0, #0
	b	LBB0_14
LBB0_11:
Lloh8:
	adrp	x20, l_.str.1@PAGE
Lloh9:
	add	x20, x20, l_.str.1@PAGEOFF
	b	LBB0_13
LBB0_12:
Lloh10:
	adrp	x20, l_.str.2@PAGE
Lloh11:
	add	x20, x20, l_.str.2@PAGEOFF
LBB0_13:
	mov	x0, x19
	mov	x1, x20
	bl	_dev_err
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Empty AFU name\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_OCXL_TEMPL_NAME_LEN,4,2        ; @OCXL_TEMPL_NAME_LEN
l_.str.1:                               ; @.str.1
	.asciz	"Invalid character in AFU name\n"

l_.str.2:                               ; @.str.2
	.asciz	"Invalid global MMIO bar number\n"

l_.str.3:                               ; @.str.3
	.asciz	"Invalid per-process MMIO bar number\n"

	.no_dead_strip	_validate_afu
.subsections_via_symbols
