	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_iopl
_do_iopl:                               ## @do_iopl
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	cmpl	$4, %edi
	jb	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_3:
	movq	%rsi, %r14
	movl	%edi, %ebx
	movl	(%rsi), %eax
	movl	%eax, %ecx
	shrl	$12, %ecx
	andl	$3, %ecx
	cmpl	%edi, %ecx
	jae	LBB0_6
## %bb.4:
	movq	_CAP_SYS_RAWIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_capable
	testl	%eax, %eax
	je	LBB0_8
## %bb.5:
	movl	(%r14), %eax
LBB0_6:
	movq	_X86_EFLAGS_IOPL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	shll	$12, %ebx
	orl	%ecx, %ebx
	movl	%ebx, (%r14)
	xorl	%eax, %eax
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_8:
	movq	_EPERM@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CAP_SYS_RAWIO,4,2              ## @CAP_SYS_RAWIO
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_X86_EFLAGS_IOPL,4,2            ## @X86_EFLAGS_IOPL
	.no_dead_strip	_do_iopl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_iopl
_do_iopl:                               ; @do_iopl
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cmp	w0, #4
	b.lo	LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_3:
	mov	x19, x1
	mov	x20, x0
	ldr	w8, [x1]
	ubfx	w9, w8, #12, #2
	cmp	w9, w0
	b.hs	LBB0_6
; %bb.4:
Lloh2:
	adrp	x8, _CAP_SYS_RAWIO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CAP_SYS_RAWIO@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_capable
	cbz	w0, LBB0_8
; %bb.5:
	ldr	w8, [x19]
LBB0_6:
	mov	w0, #0
Lloh5:
	adrp	x9, _X86_EFLAGS_IOPL@GOTPAGE
Lloh6:
	ldr	x9, [x9, _X86_EFLAGS_IOPL@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	bic	w8, w8, w9
	orr	w8, w8, w20, lsl #12
	str	w8, [x19]
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_8:
Lloh8:
	adrp	x8, _EPERM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CAP_SYS_RAWIO,4,2              ; @CAP_SYS_RAWIO
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_X86_EFLAGS_IOPL,4,2            ; @X86_EFLAGS_IOPL
	.no_dead_strip	_do_iopl
.subsections_via_symbols
