	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gb_svc_request_handler
_gb_svc_request_handler:                ## @gb_svc_request_handler
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	8(%rdi), %rdi
	callq	_gb_connection_get_data
	movq	%rax, %r14
	movl	(%r15), %edx
	cmpl	$128, %edx
	je	LBB0_11
## %bb.1:
	cmpl	$129, %edx
	jne	LBB0_6
## %bb.2:
	movl	4(%r14), %ecx
	movq	_GB_SVC_STATE_RESET@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_7
LBB0_3:
	movq	%r15, %rdi
	callq	_gb_svc_version_request
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_20
## %bb.4:
	movq	_GB_SVC_STATE_PROTOCOL_VERSION@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_11:
	movl	4(%r14), %ecx
	movq	_GB_SVC_STATE_PROTOCOL_VERSION@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_7
LBB0_12:
	movq	%r15, %rdi
	callq	_gb_svc_hello
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_20
## %bb.13:
	movq	_GB_SVC_STATE_SVC_HELLO@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_20
LBB0_6:
	movl	4(%r14), %ecx
	movq	_GB_SVC_STATE_SVC_HELLO@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	je	LBB0_9
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	je	LBB0_9
## %bb.8:
	negl	%ebx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_dev_warn
LBB0_20:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	leal	-128(%rdx), %eax
	cmpl	$6, %eax
	ja	LBB0_19
## %bb.10:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_16:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gb_svc_module_removed_recv     ## TAILCALL
LBB0_19:
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_dev_warn
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_20
LBB0_15:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gb_svc_module_inserted_recv    ## TAILCALL
LBB0_14:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gb_svc_intf_reset_recv         ## TAILCALL
LBB0_18:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gb_svc_intf_oops_recv          ## TAILCALL
LBB0_17:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gb_svc_intf_mailbox_event_recv ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
LJTI0_0:
	.long	L0_0_set_12
	.long	L0_0_set_3
	.long	L0_0_set_16
	.long	L0_0_set_15
	.long	L0_0_set_14
	.long	L0_0_set_18
	.long	L0_0_set_17
	.end_data_region
                                        ## -- End function
	.comm	_GB_SVC_STATE_RESET,4,2         ## @GB_SVC_STATE_RESET
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GB_SVC_STATE_PROTOCOL_VERSION,4,2 ## @GB_SVC_STATE_PROTOCOL_VERSION
	.comm	_GB_SVC_STATE_SVC_HELLO,4,2     ## @GB_SVC_STATE_SVC_HELLO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unexpected request 0x%02x received (state %u)\n"

L_.str.1:                               ## @.str.1
	.asciz	"unsupported request 0x%02x\n"

	.no_dead_strip	_gb_svc_request_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gb_svc_request_handler
_gb_svc_request_handler:                ; @gb_svc_request_handler
	.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, x0
	ldr	x0, [x0, #8]
	bl	_gb_connection_get_data
	mov	x19, x0
	ldr	w2, [x20]
	subs	w8, w2, #128
	b.eq	LBB0_5
; %bb.1:
	cmp	w2, #129
	b.ne	LBB0_9
; %bb.2:
	ldr	w9, [x19, #4]
Lloh0:
	adrp	x10, _GB_SVC_STATE_RESET@GOTPAGE
Lloh1:
	ldr	x10, [x10, _GB_SVC_STATE_RESET@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_10
LBB0_3:
	mov	x0, x20
	bl	_gb_svc_version_request
	mov	x20, x0
	cbnz	w0, LBB0_12
; %bb.4:
Lloh3:
	adrp	x8, _GB_SVC_STATE_PROTOCOL_VERSION@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GB_SVC_STATE_PROTOCOL_VERSION@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:
	ldr	w9, [x19, #4]
Lloh5:
	adrp	x10, _GB_SVC_STATE_PROTOCOL_VERSION@GOTPAGE
Lloh6:
	ldr	x10, [x10, _GB_SVC_STATE_PROTOCOL_VERSION@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_10
LBB0_6:
	mov	x0, x20
	bl	_gb_svc_hello
	mov	x20, x0
	cbnz	w0, LBB0_12
; %bb.7:
Lloh8:
	adrp	x8, _GB_SVC_STATE_SVC_HELLO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GB_SVC_STATE_SVC_HELLO@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	b	LBB0_12
LBB0_9:
	ldr	w9, [x19, #4]
Lloh10:
	adrp	x10, _GB_SVC_STATE_SVC_HELLO@GOTPAGE
Lloh11:
	ldr	x10, [x10, _GB_SVC_STATE_SVC_HELLO@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	cmp	w9, w10
	b.eq	LBB0_13
LBB0_10:
Lloh13:
	adrp	x10, _EINVAL@GOTPAGE
Lloh14:
	ldr	x10, [x10, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	cbz	w10, LBB0_13
; %bb.11:
	neg	w20, w10
	str	x9, [sp]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
LBB0_12:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_13:
	cmp	w8, #6
	b.hi	LBB0_16
; %bb.14:
Lloh18:
	adrp	x9, lJTI0_0@PAGE
Lloh19:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_15:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_gb_svc_module_removed_recv
LBB0_16:
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_12
LBB0_17:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_gb_svc_module_inserted_recv
LBB0_18:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_gb_svc_intf_reset_recv
LBB0_19:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_gb_svc_intf_oops_recv
LBB0_20:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_gb_svc_intf_mailbox_event_recv
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_6-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_15-LBB0_3)>>2
	.byte	(LBB0_17-LBB0_3)>>2
	.byte	(LBB0_18-LBB0_3)>>2
	.byte	(LBB0_19-LBB0_3)>>2
	.byte	(LBB0_20-LBB0_3)>>2
                                        ; -- End function
	.comm	_GB_SVC_STATE_RESET,4,2         ; @GB_SVC_STATE_RESET
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GB_SVC_STATE_PROTOCOL_VERSION,4,2 ; @GB_SVC_STATE_PROTOCOL_VERSION
	.comm	_GB_SVC_STATE_SVC_HELLO,4,2     ; @GB_SVC_STATE_SVC_HELLO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unexpected request 0x%02x received (state %u)\n"

l_.str.1:                               ; @.str.1
	.asciz	"unsupported request 0x%02x\n"

	.no_dead_strip	_gb_svc_request_handler
.subsections_via_symbols
