	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cs_char_open
_cs_char_open:                          ## @cs_char_open
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	_cs_char_data@GOTPCREL(%rip), %r13
	leaq	16(%r13), %r14
	movq	%r14, %rdi
	callq	_spin_lock_bh
	cmpl	$0, (%r13)
	je	LBB0_2
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_2:
	movl	$1, (%r13)
	movq	$0, 40(%r13)
	movq	%r14, %rdi
	callq	_spin_unlock_bh
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_get_zeroed_page
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r12
	movq	24(%r13), %rsi
	movq	_CS_MMAP_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	32(%r13), %rdi
	movq	%r12, %rdx
	callq	_cs_hsi_start
	testl	%eax, %eax
	je	LBB0_9
## %bb.5:
	movl	%eax, %ebx
	movq	24(%r13), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	%r12, %rdi
	callq	_free_page
	jmp	LBB0_6
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_6:
	movq	%r14, %rdi
	callq	_spin_lock_bh
	movl	$0, (%r13)
LBB0_7:
	movq	%r14, %rdi
	callq	_spin_unlock_bh
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r12, 8(%r13)
	movq	_CS_MMAP_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r13)
	movq	%r13, (%r15)
	xorl	%ebx, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_cs_char_data,48,3              ## @cs_char_data
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_CS_MMAP_SIZE,4,2               ## @CS_MMAP_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to initialize HSI\n"

	.no_dead_strip	_cs_char_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cs_char_open
_cs_char_open:                          ; @cs_char_open
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x1
Lloh0:
	adrp	x22, _cs_char_data@GOTPAGE
Lloh1:
	ldr	x22, [x22, _cs_char_data@GOTPAGEOFF]
	add	x21, x22, #16
	mov	x0, x21
	bl	_spin_lock_bh
	ldr	w8, [x22]
	cbz	w8, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w19, w8
	mov	x0, x21
	b	LBB0_7
LBB0_2:
	mov	w8, #1
	str	w8, [x22]
	str	xzr, [x22, #40]
	mov	x0, x21
	bl	_spin_unlock_bh
Lloh5:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_get_zeroed_page
	cbz	x0, LBB0_5
; %bb.3:
	mov	x21, x0
	ldr	x1, [x22, #24]
Lloh8:
	adrp	x23, _CS_MMAP_SIZE@GOTPAGE
Lloh9:
	ldr	x23, [x23, _CS_MMAP_SIZE@GOTPAGEOFF]
	ldr	w3, [x23]
	add	x0, x22, #32
	mov	x2, x21
	bl	_cs_hsi_start
	mov	x19, x0
	cbz	w0, LBB0_9
; %bb.4:
	ldr	x0, [x22, #24]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	mov	x0, x21
	bl	_free_page
	b	LBB0_6
LBB0_5:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_6:
	add	x20, x22, #16
	mov	x0, x20
	bl	_spin_lock_bh
	str	wzr, [x22]
	mov	x0, x20
LBB0_7:
	bl	_spin_unlock_bh
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_9:
	str	x21, [x22, #8]
	ldr	w8, [x23]
	str	w8, [x22, #20]
	str	x22, [x20]
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_cs_char_data,48,3              ; @cs_char_data
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_CS_MMAP_SIZE,4,2               ; @CS_MMAP_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to initialize HSI\n"

	.no_dead_strip	_cs_char_open
.subsections_via_symbols
