	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function maxvalue_test
_maxvalue_test:                         ## @maxvalue_test
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_SEM_VALUE_MAX@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-12(%rbp), %rdi
	callq	_ksem_init
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movl	-12(%rbp), %edi
	leaq	-16(%rbp), %rsi
	callq	_ksem_getvalue
	testq	%rax, %rax
	js	LBB0_3
## %bb.4:
	movl	-16(%rbp), %eax
	cmpl	(%rbx), %eax
	jne	LBB0_5
## %bb.8:
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:
	movl	-12(%rbp), %edi
	callq	_ksem_destroy
	testq	%rax, %rax
	js	LBB0_11
## %bb.12:
	xorl	%eax, %eax
	callq	_pass
	jmp	LBB0_13
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_fail_errno
	jmp	LBB0_13
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	callq	_fail_errno
	jmp	LBB0_7
LBB0_5:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_6
LBB0_9:
	leaq	L_.str.3(%rip), %rdi
LBB0_6:
	callq	_fail_err
LBB0_7:
	movl	-12(%rbp), %edi
	callq	_ksem_destroy
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_11:
	leaq	L_.str.4(%rip), %rdi
	callq	_fail_errno
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_SEM_VALUE_MAX,4,2              ## @SEM_VALUE_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ksem_init"

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

L_.str.2:                               ## @.str.2
	.asciz	"value %d != SEM_VALUE_MAX"

L_.str.3:                               ## @.str.3
	.asciz	"value < 0"

L_.str.4:                               ## @.str.4
	.asciz	"ksem_destroy"

	.no_dead_strip	_maxvalue_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function maxvalue_test
_maxvalue_test:                         ; @maxvalue_test
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
Lloh0:
	adrp	x19, _SEM_VALUE_MAX@GOTPAGE
Lloh1:
	ldr	x19, [x19, _SEM_VALUE_MAX@GOTPAGEOFF]
	ldr	w1, [x19]
	add	x0, sp, #12
	bl	_ksem_init
	tbnz	x0, #63, LBB0_6
; %bb.1:
	ldr	w0, [sp, #12]
	add	x1, sp, #8
	bl	_ksem_getvalue
	tbnz	x0, #63, LBB0_7
; %bb.2:
	ldr	w8, [sp, #8]
	ldr	w9, [x19]
	cmp	w8, w9
	b.ne	LBB0_8
; %bb.3:
	tbnz	w8, #31, LBB0_9
; %bb.4:
	ldr	w0, [sp, #12]
	bl	_ksem_destroy
	tbnz	x0, #63, LBB0_13
; %bb.5:
	bl	_pass
	b	LBB0_12
LBB0_6:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_fail_errno
	b	LBB0_12
LBB0_7:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_fail_errno
	b	LBB0_11
LBB0_8:
Lloh6:
	adrp	x0, l_.str.2@PAGE
Lloh7:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_9:
Lloh8:
	adrp	x0, l_.str.3@PAGE
Lloh9:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_10:
	bl	_fail_err
LBB0_11:
	ldr	w0, [sp, #12]
	bl	_ksem_destroy
LBB0_12:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_13:
Lloh10:
	adrp	x0, l_.str.4@PAGE
Lloh11:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_fail_errno
	b	LBB0_12
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SEM_VALUE_MAX,4,2              ; @SEM_VALUE_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ksem_init"

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

l_.str.2:                               ; @.str.2
	.asciz	"value %d != SEM_VALUE_MAX"

l_.str.3:                               ; @.str.3
	.asciz	"value < 0"

l_.str.4:                               ; @.str.4
	.asciz	"ksem_destroy"

	.no_dead_strip	_maxvalue_test
.subsections_via_symbols
