	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cb_disc_2                      ## -- Begin function cb_disc_2
	.p2align	4, 0x90
_cb_disc_2:                             ## @cb_disc_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	4(%rsi), %edi
	movq	_CAUSE_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-24(%rbp), %rsi
	callq	_capi_disc_req
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	_last_ref_num@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	leal	1(%rdx), %esi
	movl	%esi, (%rcx)
	andl	$32767, %edx                    ## imm = 0x7FFF
	movl	%edx, (%rbx)
	movq	_MSG_DISC_REQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	-24(%rbp), %rcx
	movq	%r14, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	movl	%eax, %r8d
	callq	_pcbit_l2_write
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_printk
LBB0_3:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CAUSE_NORMAL,4,2               ## @CAUSE_NORMAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"capi_disc_req failed\n"

	.comm	_last_ref_num,4,2               ## @last_ref_num
	.comm	_MSG_DISC_REQ,4,2               ## @MSG_DISC_REQ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cb_disc_2                      ; -- Begin function cb_disc_2
	.p2align	2
_cb_disc_2:                             ; @cb_disc_2
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x1, #4]
Lloh0:
	adrp	x8, _CAUSE_NORMAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CAUSE_NORMAL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	add	x1, sp, #8
	bl	_capi_disc_req
	tbnz	w0, #31, LBB0_2
; %bb.1:
	mov	x4, x0
Lloh3:
	adrp	x8, _last_ref_num@GOTPAGE
Lloh4:
	ldr	x8, [x8, _last_ref_num@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w10, w9, #1
	str	w10, [x8]
	and	w2, w9, #0x7fff
	str	w2, [x20]
Lloh5:
	adrp	x8, _MSG_DISC_REQ@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MSG_DISC_REQ@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	ldr	x3, [sp, #8]
	mov	x0, x19
	bl	_pcbit_l2_write
	b	LBB0_3
LBB0_2:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printk
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_CAUSE_NORMAL,4,2               ; @CAUSE_NORMAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"capi_disc_req failed\n"

	.comm	_last_ref_num,4,2               ; @last_ref_num
	.comm	_MSG_DISC_REQ,4,2               ; @MSG_DISC_REQ
.subsections_via_symbols
