	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_smbios_build                   ## -- Begin function smbios_build
	.p2align	4, 0x90
_smbios_build:                          ## @smbios_build
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_vm_get_lowmem_size
	movq	_guest_lomem@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	%rbx, %rdi
	callq	_vm_get_highmem_size
	movq	_guest_himem@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_SMBIOS_BASE@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	movq	_SMBIOS_MAX_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_paddr_guest2host
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	(%r14), %rsi
	addq	$4, %rsi
	movq	%rax, %rdi
	callq	_smbios_ep_initializer
	leaq	4(%r15), %r12
	movq	$0, -48(%rbp)
	movq	_smbios_template@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_3
## %bb.4:
	xorl	%r13d, %r13d
	leaq	-72(%rbp), %r15
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx,%r13), %rsi
	movq	%r12, %rdx
	leaq	-80(%rbp), %rcx
	leaq	-48(%rbp), %r8
	movq	%r15, %r9
	callq	*8(%rbx,%r13)
	testl	%eax, %eax
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-72(%rbp), %rax
	movq	-80(%rbp), %r12
	cmpq	%r14, %rax
	cmovgq	%rax, %r14
	movq	_smbios_template@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	40(%rbx,%r13), %rdi
	addq	$24, %r13
	testq	%rdi, %rdi
	jne	LBB0_5
	jmp	LBB0_8
LBB0_1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_fprintf
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_9
LBB0_3:
	xorl	%r14d, %r14d
LBB0_8:
	movq	%r12, %rax
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	subq	%rbx, %rax
	movq	_SMBIOS_MAX_LENGTH@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	xorl	%edi, %edi
	cmpq	%rcx, %rax
	setl	%dil
	callq	_assert
	subl	-56(%rbp), %r12d                ## 4-byte Folded Reload
	movq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movq	%r14, %rcx
	callq	_smbios_ep_finalizer
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_6:
                                        ## kill: def $eax killed $eax def $rax
LBB0_9:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_guest_lomem,4,2                ## @guest_lomem
	.comm	_guest_himem,4,2                ## @guest_himem
	.comm	_SMBIOS_BASE,8,3                ## @SMBIOS_BASE
	.comm	_SMBIOS_MAX_LENGTH,4,2          ## @SMBIOS_MAX_LENGTH
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"smbios table requires mapped mem\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_smbios_template,8,3            ## @smbios_template
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_smbios_build                   ; -- Begin function smbios_build
	.p2align	2
_smbios_build:                          ; @smbios_build
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	bl	_vm_get_lowmem_size
Lloh0:
	adrp	x8, _guest_lomem@GOTPAGE
Lloh1:
	ldr	x8, [x8, _guest_lomem@GOTPAGEOFF]
Lloh2:
	str	w0, [x8]
	mov	x0, x19
	bl	_vm_get_highmem_size
Lloh3:
	adrp	x8, _guest_himem@GOTPAGE
Lloh4:
	ldr	x8, [x8, _guest_himem@GOTPAGEOFF]
Lloh5:
	str	w0, [x8]
Lloh6:
	adrp	x20, _SMBIOS_BASE@GOTPAGE
Lloh7:
	ldr	x20, [x20, _SMBIOS_BASE@GOTPAGEOFF]
	ldr	x1, [x20]
Lloh8:
	adrp	x22, _SMBIOS_MAX_LENGTH@GOTPAGE
Lloh9:
	ldr	x22, [x22, _SMBIOS_MAX_LENGTH@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x19
	bl	_paddr_guest2host
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	ldr	x8, [x20]
	add	x1, x8, #4
	bl	_smbios_ep_initializer
	add	x23, x19, #4
	str	xzr, [sp, #24]
Lloh10:
	adrp	x24, _smbios_template@GOTPAGE
Lloh11:
	ldr	x24, [x24, _smbios_template@GOTPAGEOFF]
	ldr	x8, [x24]
	ldr	x0, [x8, #16]
	cbz	x0, LBB0_6
; %bb.2:
	mov	x25, #0
	mov	x20, #0
	mov	x21, x23
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x8, x8, x25
	ldp	x1, x8, [x8]
	add	x3, sp, #16
	add	x4, sp, #24
	add	x5, sp, #8
	mov	x2, x21
	blr	x8
	cbnz	w0, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldp	x8, x21, [sp, #8]
	cmp	x8, x20
	csel	x20, x8, x20, gt
	ldr	x8, [x24]
	add	x9, x8, x25
	ldr	x0, [x9, #40]
	add	x25, x25, #24
	cbnz	x0, LBB0_3
	b	LBB0_7
LBB0_5:
Lloh12:
	adrp	x8, _stderr@GOTPAGE
Lloh13:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	b	LBB0_8
LBB0_6:
	mov	x20, #0
	mov	x21, x23
LBB0_7:
	ldrsw	x8, [x22]
	sub	x9, x21, x19
	cmp	x9, x8
	cset	w0, lt
	bl	_assert
	sub	w1, w21, w23
	ldr	x2, [sp, #24]
	mov	x0, x19
	mov	x3, x20
	bl	_smbios_ep_finalizer
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_guest_lomem,4,2                ; @guest_lomem
	.comm	_guest_himem,4,2                ; @guest_himem
	.comm	_SMBIOS_BASE,8,3                ; @SMBIOS_BASE
	.comm	_SMBIOS_MAX_LENGTH,4,2          ; @SMBIOS_MAX_LENGTH
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"smbios table requires mapped mem\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_smbios_template,8,3            ; @smbios_template
.subsections_via_symbols
