	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ioctl_tests_2
_ioctl_tests_2:                         ## @ioctl_tests_2
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r15d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	-68(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_CAP_ALL
	movq	_CAP_IOCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_cap_rights_clear
	movl	%r15d, %edi
	movq	%rbx, %rsi
	callq	_cap_rights_limit
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_CHECK
	leaq	-64(%rbp), %r14
	movq	%r14, %rdi
	callq	_nitems
	movl	%r15d, %edi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_cap_ioctls_get
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_CHECK
	movq	_FIOCLEX@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	%rax, -64(%rbp)
	movq	_FIONCLEX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)
	movq	_errno@GOTPCREL(%rip), %r12
	movq	$0, (%r12)
	movq	%r14, %rdi
	callq	_nitems
	movl	%r15d, %edi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_cap_ioctls_limit
	xorl	%edi, %edi
	cmpl	$-1, %eax
	sete	%dil
	callq	_CHECK
	movq	(%r12), %rax
	movq	_ENOTCAPABLE@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	movq	%rcx, %rbx
	sete	%dil
	callq	_CHECK
	movq	%r14, %rdi
	callq	_nitems
	movl	%r15d, %edi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_cap_ioctls_get
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_CHECK
	movq	(%r13), %rax
	movq	%rax, -64(%rbp)
	movq	$0, (%r12)
	movl	%r15d, %edi
	movq	%r14, %rsi
	movl	$1, %edx
	callq	_cap_ioctls_limit
	xorl	%edi, %edi
	cmpl	$-1, %eax
	sete	%dil
	callq	_CHECK
	movq	(%r12), %rax
	xorl	%edi, %edi
	cmpq	(%rbx), %rax
	sete	%dil
	callq	_CHECK
	movq	%r14, %rdi
	callq	_nitems
	movl	%r15d, %edi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_cap_ioctls_get
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_CHECK
	movq	_F_GETFD@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movl	%r15d, %edi
	xorl	%eax, %eax
	callq	_fcntl
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_CHECK
	movq	$0, (%r12)
	movq	(%r13), %rsi
	movl	%r15d, %edi
	callq	_ioctl
	xorl	%edi, %edi
	cmpl	$-1, %eax
	sete	%dil
	callq	_CHECK
	movq	(%r12), %rax
	xorl	%edi, %edi
	cmpq	(%rbx), %rax
	sete	%dil
	callq	_CHECK
	movl	(%r14), %esi
	movl	%r15d, %edi
	xorl	%eax, %eax
	callq	_fcntl
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_CHECK
	movq	_F_SETFD@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_FD_CLOEXEC@GOTPCREL(%rip), %r13
	movq	(%r13), %rdx
	movl	%r15d, %edi
	xorl	%eax, %eax
	callq	_fcntl
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_CHECK
	movl	(%r14), %esi
	movl	%r15d, %edi
	xorl	%eax, %eax
	callq	_fcntl
	xorl	%edi, %edi
	cmpq	(%r13), %rax
	sete	%dil
	callq	_CHECK
	movq	$0, (%r12)
	movq	_FIONCLEX@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	%r15d, %edi
	callq	_ioctl
	xorl	%edi, %edi
	cmpl	$-1, %eax
	sete	%dil
	callq	_CHECK
	movq	(%r12), %rax
	xorl	%edi, %edi
	movq	_ENOTCAPABLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_CHECK
	movl	(%r14), %esi
	movl	%r15d, %edi
	xorl	%eax, %eax
	callq	_fcntl
	xorl	%edi, %edi
	cmpq	(%r13), %rax
	sete	%dil
	callq	_CHECK
	movl	(%rbx), %esi
	movl	%r15d, %edi
	xorl	%edx, %edx
	xorl	%eax, %eax
	callq	_fcntl
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_CHECK
	movl	(%r14), %esi
	movl	%r15d, %edi
	xorl	%eax, %eax
	callq	_fcntl
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_CHECK
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_2
## %bb.1:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CAP_IOCTL,4,2                  ## @CAP_IOCTL
	.comm	_FIOCLEX,8,3                    ## @FIOCLEX
	.comm	_FIONCLEX,8,3                   ## @FIONCLEX
	.comm	_errno,8,3                      ## @errno
	.comm	_ENOTCAPABLE,8,3                ## @ENOTCAPABLE
	.comm	_F_GETFD,4,2                    ## @F_GETFD
	.comm	_F_SETFD,4,2                    ## @F_SETFD
	.comm	_FD_CLOEXEC,8,3                 ## @FD_CLOEXEC
	.no_dead_strip	_ioctl_tests_2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ioctl_tests_2
_ioctl_tests_2:                         ; @ioctl_tests_2
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	add	x0, sp, #20
	bl	_CAP_ALL
Lloh3:
	adrp	x8, _CAP_IOCTL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CAP_IOCTL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x0, sp, #20
	bl	_cap_rights_clear
	add	x1, sp, #20
	mov	x0, x19
	bl	_cap_rights_limit
	cmp	x0, #0
	cset	w0, eq
	bl	_CHECK
	add	x0, sp, #24
	bl	_nitems
	mov	x2, x0
	add	x1, sp, #24
	mov	x0, x19
	bl	_cap_ioctls_get
	cmp	x0, #0
	cset	w0, eq
	bl	_CHECK
Lloh6:
	adrp	x24, _FIOCLEX@GOTPAGE
Lloh7:
	ldr	x24, [x24, _FIOCLEX@GOTPAGEOFF]
	ldr	x8, [x24]
Lloh8:
	adrp	x21, _FIONCLEX@GOTPAGE
Lloh9:
	ldr	x21, [x21, _FIONCLEX@GOTPAGEOFF]
	ldr	x9, [x21]
	stp	x8, x9, [sp, #24]
Lloh10:
	adrp	x20, _errno@GOTPAGE
Lloh11:
	ldr	x20, [x20, _errno@GOTPAGEOFF]
	str	xzr, [x20]
	add	x0, sp, #24
	bl	_nitems
	mov	x2, x0
	add	x1, sp, #24
	mov	x0, x19
	bl	_cap_ioctls_limit
	cmn	w0, #1
	cset	w0, eq
	bl	_CHECK
	ldr	x8, [x20]
Lloh12:
	adrp	x22, _ENOTCAPABLE@GOTPAGE
Lloh13:
	ldr	x22, [x22, _ENOTCAPABLE@GOTPAGEOFF]
	ldr	x9, [x22]
	cmp	x8, x9
	cset	w0, eq
	bl	_CHECK
	add	x0, sp, #24
	bl	_nitems
	mov	x2, x0
	add	x1, sp, #24
	mov	x0, x19
	bl	_cap_ioctls_get
	cmp	x0, #0
	cset	w0, eq
	bl	_CHECK
	ldr	x8, [x24]
	str	x8, [sp, #24]
	str	xzr, [x20]
	add	x1, sp, #24
	mov	x0, x19
	mov	w2, #1
	bl	_cap_ioctls_limit
	cmn	w0, #1
	cset	w0, eq
	bl	_CHECK
	ldr	x8, [x20]
	ldr	x9, [x22]
	cmp	x8, x9
	cset	w0, eq
	bl	_CHECK
	add	x0, sp, #24
	bl	_nitems
	mov	x2, x0
	add	x1, sp, #24
	mov	x0, x19
	bl	_cap_ioctls_get
	cmp	x0, #0
	cset	w0, eq
	bl	_CHECK
Lloh14:
	adrp	x23, _F_GETFD@GOTPAGE
Lloh15:
	ldr	x23, [x23, _F_GETFD@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_fcntl
	cmp	x0, #0
	cset	w0, eq
	bl	_CHECK
	str	xzr, [x20]
	ldr	x1, [x24]
	mov	x0, x19
	bl	_ioctl
	cmn	w0, #1
	cset	w0, eq
	bl	_CHECK
	ldr	x8, [x20]
	ldr	x9, [x22]
	cmp	x8, x9
	cset	w0, eq
	bl	_CHECK
	ldr	w1, [x23]
	mov	x0, x19
	bl	_fcntl
	cmp	x0, #0
	cset	w0, eq
	bl	_CHECK
Lloh16:
	adrp	x24, _F_SETFD@GOTPAGE
Lloh17:
	ldr	x24, [x24, _F_SETFD@GOTPAGEOFF]
	ldr	w1, [x24]
Lloh18:
	adrp	x25, _FD_CLOEXEC@GOTPAGE
Lloh19:
	ldr	x25, [x25, _FD_CLOEXEC@GOTPAGEOFF]
	ldr	x8, [x25]
	str	x8, [sp]
	mov	x0, x19
	bl	_fcntl
	cmp	x0, #0
	cset	w0, eq
	bl	_CHECK
	ldr	w1, [x23]
	mov	x0, x19
	bl	_fcntl
	ldr	x8, [x25]
	cmp	x0, x8
	cset	w0, eq
	bl	_CHECK
	str	xzr, [x20]
	ldr	x1, [x21]
	mov	x0, x19
	bl	_ioctl
	cmn	w0, #1
	cset	w0, eq
	bl	_CHECK
	ldr	x8, [x20]
	ldr	x9, [x22]
	cmp	x8, x9
	cset	w0, eq
	bl	_CHECK
	ldr	w1, [x23]
	mov	x0, x19
	bl	_fcntl
	ldr	x8, [x25]
	cmp	x0, x8
	cset	w0, eq
	bl	_CHECK
	ldr	w1, [x24]
	str	xzr, [sp]
	mov	x0, x19
	bl	_fcntl
	cmp	x0, #0
	cset	w0, eq
	bl	_CHECK
	ldr	w1, [x23]
	mov	x0, x19
	bl	_fcntl
	cmp	x0, #0
	cset	w0, eq
	bl	_CHECK
	ldr	x8, [sp, #40]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_2:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CAP_IOCTL,4,2                  ; @CAP_IOCTL
	.comm	_FIOCLEX,8,3                    ; @FIOCLEX
	.comm	_FIONCLEX,8,3                   ; @FIONCLEX
	.comm	_errno,8,3                      ; @errno
	.comm	_ENOTCAPABLE,8,3                ; @ENOTCAPABLE
	.comm	_F_GETFD,4,2                    ; @F_GETFD
	.comm	_F_SETFD,4,2                    ; @F_SETFD
	.comm	_FD_CLOEXEC,8,3                 ; @FD_CLOEXEC
	.no_dead_strip	_ioctl_tests_2
.subsections_via_symbols
