	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function reserve_test
_reserve_test:                          ## @reserve_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movl	%edi, %r15d
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_open
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_5
## %bb.1:
	movq	_VC_CMA_IOC_RESERVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	movl	%r15d, %edx
	callq	_ioctl
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	callq	_printf
	jmp	LBB0_4
LBB0_5:
	leaq	L_.str.3(%rip), %rdi
	movl	%ebx, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_printf                         ## TAILCALL
LBB0_2:
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %esi
	callq	_printf
	movl	%r14d, %edi
	callq	_sleep
LBB0_4:
	movl	%ebx, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_close                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/dev/vc-cma"

	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_VC_CMA_IOC_RESERVE,4,2         ## @VC_CMA_IOC_RESERVE
L_.str.1:                               ## @.str.1
	.asciz	"Sleeping for %d seconds...\n"

L_.str.2:                               ## @.str.2
	.asciz	"* failed to ioctl /dev/vc-cma - rc %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"* failed to open /dev/vc-cma - rc %d\n"

	.no_dead_strip	_reserve_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function reserve_test
_reserve_test:                          ; @reserve_test
	.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	x21, x0
Lloh0:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_open
	mov	x19, x0
	tbnz	w0, #31, LBB0_3
; %bb.1:
Lloh5:
	adrp	x8, _VC_CMA_IOC_RESERVE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _VC_CMA_IOC_RESERVE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_ioctl
	cbz	w0, LBB0_4
; %bb.2:
	mov	x1, x0
Lloh8:
	adrp	x0, l_.str.2@PAGE
Lloh9:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_printf
	b	LBB0_5
LBB0_3:
Lloh10:
	adrp	x0, l_.str.3@PAGE
Lloh11:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x19
	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	_printf
LBB0_4:
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_printf
	mov	x0, x20
	bl	_sleep
LBB0_5:
	mov	x0, x19
	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	_close
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/dev/vc-cma"

	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_VC_CMA_IOC_RESERVE,4,2         ; @VC_CMA_IOC_RESERVE
l_.str.1:                               ; @.str.1
	.asciz	"Sleeping for %d seconds...\n"

l_.str.2:                               ; @.str.2
	.asciz	"* failed to ioctl /dev/vc-cma - rc %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"* failed to open /dev/vc-cma - rc %d\n"

	.no_dead_strip	_reserve_test
.subsections_via_symbols
