	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_khan_callback                  ## -- Begin function khan_callback
	.p2align	4, 0x90
_khan_callback:                         ## @khan_callback
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $edi killed $edi def $rdi
	addl	$-128, %edi
	cmpl	$5, %edi
	ja	LBB0_16
## %bb.1:
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rdi,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_16:
	xorl	%eax, %eax
	callq	_UNREACHABLE
	jmp	LBB0_17
LBB0_13:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_14
LBB0_15:
	leaq	L_.str.3(%rip), %rsi
LBB0_14:
	xorl	%edi, %edi
	callq	_vcos_assert_msg
	jmp	LBB0_17
LBB0_2:
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	8(%rsi), %r15
	movl	(%r15), %r12d
	xorl	%edi, %edi
	cmpl	$16, (%rsi)
	sete	%dil
	callq	_vcos_assert
	movl	%r14d, %edi
	callq	_vchiq_get_client_id
	movl	4(%r15), %edx
	cmpl	%eax, %edx
	jne	LBB0_3
## %bb.4:
	movq	_ASYNC_COMMAND_DESTROY@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	je	LBB0_12
## %bb.5:
	addq	$4, %r15
	leaq	-36(%rbp), %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_khronos_platform_semaphore_create
	movq	_KHR_SUCCESS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_12
## %bb.6:
	cmpl	$136, %r12d
	je	LBB0_9
## %bb.7:
	cmpl	$135, %r12d
	jne	LBB0_10
## %bb.8:
	leaq	-36(%rbp), %rdi
	callq	_khronos_platform_semaphore_acquire
	jmp	LBB0_11
LBB0_3:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_printf
	jmp	LBB0_17
LBB0_9:
	leaq	-36(%rbp), %rdi
	callq	_khronos_platform_semaphore_release
	jmp	LBB0_11
LBB0_10:
	leaq	L_.str.1(%rip), %rsi
	xorl	%edi, %edi
	callq	_vcos_assert_msg
LBB0_11:
	leaq	-36(%rbp), %rdi
	callq	_khronos_platform_semaphore_destroy
LBB0_12:
	movl	%r14d, %edi
	movq	%rbx, %rsi
	callq	_vchiq_release_message
LBB0_17:
	movq	_VCHIQ_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
LJTI0_0:
	.long	L0_0_set_13
	.long	L0_0_set_15
	.long	L0_0_set_2
	.long	L0_0_set_16
	.long	L0_0_set_16
	.long	L0_0_set_16
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"khan_callback: message for wrong process; pid = %X, msg pid = %X\n"

	.comm	_VCHIQ_SUCCESS,4,2              ## @VCHIQ_SUCCESS
	.comm	_ASYNC_COMMAND_DESTROY,4,2      ## @ASYNC_COMMAND_DESTROY
	.comm	_KHR_SUCCESS,4,2                ## @KHR_SUCCESS
L_.str.1:                               ## @.str.1
	.asciz	"khan_callback: unknown message type"

L_.str.2:                               ## @.str.2
	.asciz	"khan_callback: VCHIQ_SERVICE_OPENED"

L_.str.3:                               ## @.str.3
	.asciz	"khan_callback: VCHIQ_SERVICE_CLOSED"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_khan_callback                  ; -- Begin function khan_callback
	.p2align	2
_khan_callback:                         ; @khan_callback
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	sub	w8, w0, #128
	cmp	w8, #5
	b.hi	LBB0_2
; %bb.1:
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	bl	_UNREACHABLE
	b	LBB0_17
LBB0_3:
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_5
LBB0_4:
Lloh4:
	adrp	x1, l_.str.3@PAGE
Lloh5:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_5:
	mov	w0, #0
	bl	_vcos_assert_msg
	b	LBB0_17
LBB0_6:
	mov	x20, x2
	mov	x19, x1
	ldr	x21, [x1, #8]
	ldr	w22, [x21]
	ldr	w8, [x1]
	cmp	w8, #16
	cset	w0, eq
	bl	_vcos_assert
	mov	x0, x20
	bl	_vchiq_get_client_id
	ldr	w2, [x21, #4]!
	cmp	w2, w0
	b.ne	LBB0_12
; %bb.7:
Lloh6:
	adrp	x8, _ASYNC_COMMAND_DESTROY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ASYNC_COMMAND_DESTROY@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w22, w8
	b.eq	LBB0_16
; %bb.8:
	add	x0, sp, #12
	mov	x1, x21
	mov	w2, #1
	bl	_khronos_platform_semaphore_create
Lloh9:
	adrp	x8, _KHR_SUCCESS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _KHR_SUCCESS@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_16
; %bb.9:
	cmp	w22, #136
	b.eq	LBB0_13
; %bb.10:
	cmp	w22, #135
	b.ne	LBB0_14
; %bb.11:
	add	x0, sp, #12
	bl	_khronos_platform_semaphore_acquire
	b	LBB0_15
LBB0_12:
	mov	x1, x0
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	b	LBB0_17
LBB0_13:
	add	x0, sp, #12
	bl	_khronos_platform_semaphore_release
	b	LBB0_15
LBB0_14:
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #0
	bl	_vcos_assert_msg
LBB0_15:
	add	x0, sp, #12
	bl	_khronos_platform_semaphore_destroy
LBB0_16:
	mov	x0, x20
	mov	x1, x19
	bl	_vchiq_release_message
LBB0_17:
Lloh16:
	adrp	x8, _VCHIQ_SUCCESS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _VCHIQ_SUCCESS@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"khan_callback: message for wrong process; pid = %X, msg pid = %X\n"

	.comm	_VCHIQ_SUCCESS,4,2              ; @VCHIQ_SUCCESS
	.comm	_ASYNC_COMMAND_DESTROY,4,2      ; @ASYNC_COMMAND_DESTROY
	.comm	_KHR_SUCCESS,4,2                ; @KHR_SUCCESS
l_.str.1:                               ; @.str.1
	.asciz	"khan_callback: unknown message type"

l_.str.2:                               ; @.str.2
	.asciz	"khan_callback: VCHIQ_SERVICE_OPENED"

l_.str.3:                               ; @.str.3
	.asciz	"khan_callback: VCHIQ_SERVICE_CLOSED"

.subsections_via_symbols
