	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_constraints
_check_constraints:                     ## @check_constraints
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_nx842_pseries_constraints@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_IS_ALIGNED
	testl	%eax, %eax
	je	LBB0_6
## %bb.1:
	movl	(%r14), %r8d
	movl	4(%r12), %ecx
	movl	%r8d, %eax
	xorl	%edx, %edx
	divl	%ecx
	testl	%edx, %edx
	je	LBB0_4
## %bb.2:
	testl	%r15d, %r15d
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rsi
	cmoveq	%rax, %rsi
	leaq	L_.str.3(%rip), %rdi
	movl	%r8d, %edx
	callq	_pr_debug
	testl	%r15d, %r15d
	jne	LBB0_8
## %bb.3:
	movl	(%r14), %edi
	movl	4(%r12), %esi
	callq	_round_down
	movl	%eax, %r8d
	movl	%eax, (%r14)
LBB0_4:
	movl	8(%r12), %ecx
	cmpl	%ecx, %r8d
	jae	LBB0_10
## %bb.5:
	testl	%r15d, %r15d
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rsi
	cmoveq	%rax, %rsi
	leaq	L_.str.4(%rip), %rdi
	movl	%r8d, %edx
	jmp	LBB0_7
LBB0_6:
	testl	%r15d, %r15d
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rsi
	cmoveq	%rax, %rsi
	movl	(%r12), %ecx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %edx
LBB0_7:
	callq	_pr_debug
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movl	12(%r12), %ecx
	xorl	%ebx, %ebx
	cmpl	%ecx, %r8d
	jbe	LBB0_9
## %bb.11:
	testl	%r15d, %r15d
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rsi
	cmoveq	%rax, %rsi
	leaq	L_.str.5(%rip), %rdi
	movl	%r8d, %edx
	callq	_pr_debug
	testl	%r15d, %r15d
	jne	LBB0_8
## %bb.12:
	movl	12(%r12), %eax
	movl	%eax, (%r14)
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_nx842_pseries_constraints,16,2 ## @nx842_pseries_constraints
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s buffer 0x%lx not aligned to 0x%x\n"

L_.str.1:                               ## @.str.1
	.asciz	"input"

L_.str.2:                               ## @.str.2
	.asciz	"output"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.3:                               ## @.str.3
	.asciz	"%s buffer len 0x%x not multiple of 0x%x\n"

L_.str.4:                               ## @.str.4
	.asciz	"%s buffer len 0x%x under minimum 0x%x\n"

L_.str.5:                               ## @.str.5
	.asciz	"%s buffer len 0x%x over maximum 0x%x\n"

	.no_dead_strip	_check_constraints
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_constraints
_check_constraints:                     ; @check_constraints
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x22, _nx842_pseries_constraints@GOTPAGE
Lloh1:
	ldr	x22, [x22, _nx842_pseries_constraints@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_IS_ALIGNED
	cbz	w0, LBB0_6
; %bb.1:
	ldr	w2, [x20]
	ldr	w3, [x22, #4]
	udiv	w8, w2, w3
	msub	w8, w8, w3, w2
	cbz	w8, LBB0_4
; %bb.2:
Lloh2:
	adrp	x8, l_.str.1@PAGE
Lloh3:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh4:
	adrp	x9, l_.str.2@PAGE
Lloh5:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w19, #0
	csel	x1, x9, x8, eq
Lloh6:
	adrp	x0, l_.str.3@PAGE
Lloh7:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_debug
	cbnz	w19, LBB0_8
; %bb.3:
	ldr	w0, [x20]
	ldr	w1, [x22, #4]
	bl	_round_down
	mov	x2, x0
	str	w0, [x20]
LBB0_4:
	ldr	w3, [x22, #8]
	cmp	w2, w3
	b.hs	LBB0_10
; %bb.5:
Lloh8:
	adrp	x8, l_.str.1@PAGE
Lloh9:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh10:
	adrp	x9, l_.str.2@PAGE
Lloh11:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w19, #0
	csel	x1, x9, x8, eq
Lloh12:
	adrp	x0, l_.str.4@PAGE
Lloh13:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_7
LBB0_6:
Lloh14:
	adrp	x8, l_.str.1@PAGE
Lloh15:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh16:
	adrp	x9, l_.str.2@PAGE
Lloh17:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w19, #0
	csel	x1, x9, x8, eq
	ldr	w3, [x22]
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x21
LBB0_7:
	bl	_pr_debug
LBB0_8:
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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
LBB0_10:
	ldr	w3, [x22, #12]
	cmp	w2, w3
	b.ls	LBB0_13
; %bb.11:
Lloh23:
	adrp	x8, l_.str.1@PAGE
Lloh24:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh25:
	adrp	x9, l_.str.2@PAGE
Lloh26:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w19, #0
	csel	x1, x9, x8, eq
Lloh27:
	adrp	x0, l_.str.5@PAGE
Lloh28:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_pr_debug
	cbnz	w19, LBB0_8
; %bb.12:
	mov	w0, #0
	ldr	w8, [x22, #12]
	str	w8, [x20]
	b	LBB0_9
LBB0_13:
	mov	w0, #0
	b	LBB0_9
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_nx842_pseries_constraints,16,2 ; @nx842_pseries_constraints
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s buffer 0x%lx not aligned to 0x%x\n"

l_.str.1:                               ; @.str.1
	.asciz	"input"

l_.str.2:                               ; @.str.2
	.asciz	"output"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.3:                               ; @.str.3
	.asciz	"%s buffer len 0x%x not multiple of 0x%x\n"

l_.str.4:                               ; @.str.4
	.asciz	"%s buffer len 0x%x under minimum 0x%x\n"

l_.str.5:                               ; @.str.5
	.asciz	"%s buffer len 0x%x over maximum 0x%x\n"

	.no_dead_strip	_check_constraints
.subsections_via_symbols
