	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_linux_iopl                     ## -- Begin function linux_iopl
	.p2align	4, 0x90
_linux_iopl:                            ## @linux_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, (%rsi)
	jb	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_5
LBB0_2:
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_PRIV_IO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_priv_check
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:
	movl	8(%rbx), %edi
	xorl	%esi, %esi
	callq	_securelevel_gt
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movq	(%rbx), %rax
	movq	_PSL_IOPL@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	imulq	$1431655766, %rcx, %rdx         ## imm = 0x55555556
                                        ## kill: def $ecx killed $ecx killed $rcx
	notl	%ecx
	andl	(%rax), %ecx
	movq	%rdx, %rsi
	shrq	$63, %rsi
	shrq	$32, %rdx
	addl	%esi, %edx
	imull	(%r14), %edx
	orl	%ecx, %edx
	movl	%edx, (%rax)
	xorl	%eax, %eax
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PRIV_IO,4,2                    ## @PRIV_IO
	.comm	_PSL_IOPL,4,2                   ## @PSL_IOPL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_linux_iopl                     ; -- Begin function linux_iopl
	.p2align	2
_linux_iopl:                            ; @linux_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
	ldr	w8, [x1]
	cmp	w8, #4
	b.lo	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_5
LBB0_2:
	mov	x19, x1
	mov	x20, x0
Lloh3:
	adrp	x8, _PRIV_IO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PRIV_IO@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_priv_check
	cbnz	w0, LBB0_5
; %bb.3:
	ldr	w0, [x20, #8]
	mov	w1, #0
	bl	_securelevel_gt
	cbnz	w0, LBB0_5
; %bb.4:
	ldr	x8, [x20]
Lloh6:
	adrp	x9, _PSL_IOPL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PSL_IOPL@GOTPAGEOFF]
	ldr	w10, [x8]
Lloh8:
	ldrsw	x9, [x9]
	bic	w10, w10, w9
	mov	w11, #21846
	movk	w11, #21845, lsl #16
	mul	x9, x9, x11
	lsr	x11, x9, #63
	lsr	x9, x9, #32
	add	w9, w9, w11
	ldr	w11, [x19]
	mul	w9, w11, w9
	orr	w9, w9, w10
	str	w9, [x8]
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PRIV_IO,4,2                    ; @PRIV_IO
	.comm	_PSL_IOPL,4,2                   ; @PSL_IOPL
.subsections_via_symbols
