	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function occ_open
_occ_open:                              ## @occ_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	$24, %edi
	callq	_kzalloc
	movq	%rax, %rbx
	movq	(%r14), %rdi
	callq	_to_occ
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movl	(%r12), %edi
	callq	___get_free_page
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%r15, 8(%rbx)
	movq	%rbx, %rdi
	callq	_mutex_init
	movq	%rbx, (%r14)
	movq	_OCC_CMD_DATA_BYTES@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	$3, %rax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rbx
	xorl	%edi, %edi
	cmpq	(%rbx), %rax
	setg	%dil
	callq	_BUILD_BUG_ON
	movq	_OCC_RESP_DATA_BYTES@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	$7, %rax
	xorl	%edi, %edi
	cmpq	(%rbx), %rax
	setg	%dil
	callq	_BUILD_BUG_ON
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_3:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_OCC_CMD_DATA_BYTES,8,3         ## @OCC_CMD_DATA_BYTES
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_OCC_RESP_DATA_BYTES,8,3        ## @OCC_RESP_DATA_BYTES
	.no_dead_strip	_occ_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function occ_open
_occ_open:                              ; @occ_open
	.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	x19, x1
Lloh0:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	w0, #24
	bl	_kzalloc
	mov	x20, x0
	ldr	x0, [x19]
	bl	_to_occ
	cbz	x20, LBB0_4
; %bb.1:
	mov	x21, x0
	ldr	w0, [x22]
	bl	___get_free_page
	str	x0, [x20, #16]
	cbz	x0, LBB0_3
; %bb.2:
	str	x21, [x20, #8]
	mov	x0, x20
	bl	_mutex_init
	str	x20, [x19]
Lloh2:
	adrp	x8, _OCC_CMD_DATA_BYTES@GOTPAGE
Lloh3:
	ldr	x8, [x8, _OCC_CMD_DATA_BYTES@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	add	x8, x8, #3
Lloh5:
	adrp	x19, _PAGE_SIZE@GOTPAGE
Lloh6:
	ldr	x19, [x19, _PAGE_SIZE@GOTPAGEOFF]
	ldr	x9, [x19]
	cmp	x8, x9
	cset	w0, gt
	bl	_BUILD_BUG_ON
Lloh7:
	adrp	x8, _OCC_RESP_DATA_BYTES@GOTPAGE
Lloh8:
	ldr	x8, [x8, _OCC_RESP_DATA_BYTES@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	add	x8, x8, #7
	ldr	x9, [x19]
	cmp	x8, x9
	cset	w0, gt
	bl	_BUILD_BUG_ON
	mov	w0, #0
	b	LBB0_5
LBB0_3:
	mov	x0, x20
	bl	_kfree
LBB0_4:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_OCC_CMD_DATA_BYTES,8,3         ; @OCC_CMD_DATA_BYTES
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_OCC_RESP_DATA_BYTES,8,3        ; @OCC_RESP_DATA_BYTES
	.no_dead_strip	_occ_open
.subsections_via_symbols
