	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function getbtx
_getbtx:                                ## @getbtx
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rsi, %rbx
	movl	$32, %edx
	xorl	%ecx, %ecx
	callq	_readx
	cmpl	$32, %eax
	jne	LBB0_4
## %bb.1:
	movq	(%rbx), %rax
	movq	(%rax), %rcx
	movq	_BTX_MAG0@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_4
## %bb.2:
	movq	8(%rax), %rcx
	movq	_BTX_MAG1@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_4
## %bb.3:
	movq	16(%rax), %rax
	movq	_BTX_MAG2@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
LBB0_4:
	movq	_fname@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_errx
LBB0_5:
	movq	24(%rbx), %rdi
	callq	_le16toh
	movq	%rax, 24(%rbx)
	movq	16(%rbx), %rdi
	callq	_le16toh
	movq	%rax, 16(%rbx)
	movl	8(%rbx), %edi
	callq	_le32toh
	movl	%eax, 8(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BTX_MAG0,8,3                   ## @BTX_MAG0
	.comm	_BTX_MAG1,8,3                   ## @BTX_MAG1
	.comm	_BTX_MAG2,8,3                   ## @BTX_MAG2
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: Not a BTX kernel"

	.comm	_fname,4,2                      ## @fname
	.no_dead_strip	_getbtx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function getbtx
_getbtx:                                ; @getbtx
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	w2, #32
	mov	w3, #0
	bl	_readx
	cmp	w0, #32
	b.ne	LBB0_4
; %bb.1:
	ldr	x8, [x19]
	ldr	x9, [x8]
Lloh0:
	adrp	x10, _BTX_MAG0@GOTPAGE
Lloh1:
	ldr	x10, [x10, _BTX_MAG0@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_4
; %bb.2:
	ldr	x9, [x8, #8]
Lloh3:
	adrp	x10, _BTX_MAG1@GOTPAGE
Lloh4:
	ldr	x10, [x10, _BTX_MAG1@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [x8, #16]
Lloh6:
	adrp	x9, _BTX_MAG2@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BTX_MAG2@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_5
LBB0_4:
Lloh9:
	adrp	x8, _fname@GOTPAGE
Lloh10:
	ldr	x8, [x8, _fname@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_5:
	ldr	x0, [x19, #24]
	bl	_le16toh
	str	x0, [x19, #24]
	ldr	x0, [x19, #16]
	bl	_le16toh
	str	x0, [x19, #16]
	ldr	w0, [x19, #8]
	bl	_le32toh
	str	w0, [x19, #8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_BTX_MAG0,8,3                   ; @BTX_MAG0
	.comm	_BTX_MAG1,8,3                   ; @BTX_MAG1
	.comm	_BTX_MAG2,8,3                   ; @BTX_MAG2
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: Not a BTX kernel"

	.comm	_fname,4,2                      ; @fname
	.no_dead_strip	_getbtx
.subsections_via_symbols
