	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_chassis_plugin_load            ## -- Begin function chassis_plugin_load
	.p2align	4, 0x90
_chassis_plugin_load:                   ## @chassis_plugin_load
	.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	%rdi, %r14
	xorl	%eax, %eax
	callq	_chassis_plugin_new
	movq	%rax, %rbx
	movq	_G_MODULE_BIND_LOCAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_g_module_open
	movl	%eax, 44(%rbx)
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	leaq	-24(%rbp), %rdx
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_g_module_symbol
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movq	%rbx, %rdi
	callq	*-24(%rbp)
	testl	%eax, %eax
	je	LBB0_9
## %bb.6:
	leaq	L_.str.3(%rip), %rdi
LBB0_7:
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_g_critical
	jmp	LBB0_8
LBB0_1:
	xorl	%eax, %eax
	callq	_g_module_error
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_4:
	xorl	%eax, %eax
	callq	_g_module_error
	leaq	L_.str.2(%rip), %rdi
LBB0_2:
	movq	%r14, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_g_critical
LBB0_8:
	movq	%rbx, %rdi
	callq	_chassis_plugin_free
	xorl	%ebx, %ebx
LBB0_19:
	movq	%rbx, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_9:
	movq	(%rbx), %rdx
	movq	_CHASSIS_PLUGIN_MAGIC@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	cmpq	%rcx, %rdx
	jne	LBB0_10
## %bb.11:
	movq	32(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_13
## %bb.12:
	xorl	%eax, %eax
	callq	*%rcx
	movl	%eax, 40(%rbx)
LBB0_13:
	cmpq	$0, 24(%rbx)
	jne	LBB0_15
## %bb.14:
	movq	%r14, %rdi
	callq	_g_strdup
	movq	%rax, 24(%rbx)
LBB0_15:
	cmpl	$0, 20(%rbx)
	je	LBB0_16
## %bb.17:
	movq	8(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_19
## %bb.18:
	xorl	%eax, %eax
	callq	*%rcx
	movl	%eax, 16(%rbx)
	jmp	LBB0_19
LBB0_10:
	leaq	L_.str.4(%rip), %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_g_critical
	jmp	LBB0_8
LBB0_16:
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_G_MODULE_BIND_LOCAL,4,2        ## @G_MODULE_BIND_LOCAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"loading module '%s' failed: %s"

L_.str.1:                               ## @.str.1
	.asciz	"plugin_init"

L_.str.2:                               ## @.str.2
	.asciz	"module '%s' doesn't have a init-function: %s"

L_.str.3:                               ## @.str.3
	.asciz	"init-function for module '%s' failed"

	.comm	_CHASSIS_PLUGIN_MAGIC,8,3       ## @CHASSIS_PLUGIN_MAGIC
L_.str.4:                               ## @.str.4
	.asciz	"plugin '%s' doesn't match the current plugin interface (plugin is %lx, chassis is %lx)"

L_.str.5:                               ## @.str.5
	.asciz	"plugin '%s' doesn't set a version number, refusing to load this plugin"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_chassis_plugin_load            ; -- Begin function chassis_plugin_load
	.p2align	2
_chassis_plugin_load:                   ; @chassis_plugin_load
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x20, x0
	bl	_chassis_plugin_new
	mov	x19, x0
Lloh0:
	adrp	x8, _G_MODULE_BIND_LOCAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _G_MODULE_BIND_LOCAL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_g_module_open
	str	w0, [x19, #44]
	cbz	w0, LBB0_4
; %bb.1:
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x2, sp, #24
	bl	_g_module_symbol
	cbz	w0, LBB0_5
; %bb.2:
	ldr	x8, [sp, #24]
	mov	x0, x19
	blr	x8
	cbz	w0, LBB0_6
; %bb.3:
Lloh5:
	adrp	x0, l_.str.3@PAGE
Lloh6:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_16
LBB0_4:
	bl	_g_module_error
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_16
LBB0_5:
	bl	_g_module_error
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_16
LBB0_6:
	ldr	x8, [x19]
Lloh11:
	adrp	x9, _CHASSIS_PLUGIN_MAGIC@GOTPAGE
Lloh12:
	ldr	x9, [x9, _CHASSIS_PLUGIN_MAGIC@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.7:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_9
; %bb.8:
	blr	x8
	str	w0, [x19, #40]
LBB0_9:
	ldr	x8, [x19, #24]
	cbnz	x8, LBB0_11
; %bb.10:
	mov	x0, x20
	bl	_g_strdup
	str	x0, [x19, #24]
LBB0_11:
	ldr	w8, [x19, #20]
	cbz	w8, LBB0_15
; %bb.12:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_17
; %bb.13:
	blr	x8
	str	w0, [x19, #16]
	b	LBB0_17
LBB0_14:
	stp	x8, x9, [sp]
Lloh14:
	adrp	x0, l_.str.4@PAGE
Lloh15:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_16
LBB0_15:
Lloh16:
	adrp	x0, l_.str.5@PAGE
Lloh17:
	add	x0, x0, l_.str.5@PAGEOFF
LBB0_16:
	mov	x1, x20
	bl	_g_critical
	mov	x0, x19
	bl	_chassis_plugin_free
	mov	x19, #0
LBB0_17:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_G_MODULE_BIND_LOCAL,4,2        ; @G_MODULE_BIND_LOCAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"loading module '%s' failed: %s"

l_.str.1:                               ; @.str.1
	.asciz	"plugin_init"

l_.str.2:                               ; @.str.2
	.asciz	"module '%s' doesn't have a init-function: %s"

l_.str.3:                               ; @.str.3
	.asciz	"init-function for module '%s' failed"

	.comm	_CHASSIS_PLUGIN_MAGIC,8,3       ; @CHASSIS_PLUGIN_MAGIC
l_.str.4:                               ; @.str.4
	.asciz	"plugin '%s' doesn't match the current plugin interface (plugin is %lx, chassis is %lx)"

l_.str.5:                               ; @.str.5
	.asciz	"plugin '%s' doesn't set a version number, refusing to load this plugin"

.subsections_via_symbols
