	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bth_init
_bth_init:                              ## @bth_init
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r15
	movq	8(%rdi), %r12
	movl	%esi, 28(%r15,%r12)
	shll	$4, %r8d
	movq	_BTH_PAD_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r8d
	movl	%r8d, (%r15,%r12)
	testl	%edx, %edx
	je	LBB0_2
## %bb.1:
	movq	_BTH_SE_MASK@GOTPCREL(%rip), %rax
	orl	(%rax), %r8d
	movl	%r8d, (%r12,%r15)
LBB0_2:
	movl	32(%rbp), %r13d
	movl	24(%rbp), %r14d
	movl	16(%rbp), %ebx
	testl	%ecx, %ecx
	je	LBB0_4
## %bb.3:
	movq	_BTH_MIG_MASK@GOTPCREL(%rip), %rax
	orl	(%rax), %r8d
	movl	%r8d, (%r12,%r15)
LBB0_4:
	movl	%r9d, %edi
	callq	_cpu_to_be16
	movl	%eax, 24(%r12,%r15)
	movq	_BTH_QPN_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_cpu_to_be32
	movq	%rax, 16(%r12,%r15)
	movq	_BTH_PSN_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r13d
	testl	%r14d, %r14d
	je	LBB0_6
## %bb.5:
	movq	_BTH_ACK_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_6:
	orl	%r13d, %r14d
	movl	%r14d, %edi
	callq	_cpu_to_be32
	movq	%rax, 8(%r12,%r15)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BTH_PAD_MASK,4,2               ## @BTH_PAD_MASK
	.comm	_BTH_SE_MASK,4,2                ## @BTH_SE_MASK
	.comm	_BTH_MIG_MASK,4,2               ## @BTH_MIG_MASK
	.comm	_BTH_QPN_MASK,4,2               ## @BTH_QPN_MASK
	.comm	_BTH_PSN_MASK,4,2               ## @BTH_PSN_MASK
	.comm	_BTH_ACK_MASK,4,2               ## @BTH_ACK_MASK
	.no_dead_strip	_bth_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bth_init
_bth_init:                              ; @bth_init
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x7
	mov	x20, x6
	ldp	x9, x8, [x0]
	add	x21, x9, x8
	str	w1, [x21, #28]
Lloh0:
	adrp	x8, _BTH_PAD_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BTH_PAD_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w8, w8, w4, lsl #4
	str	w8, [x21]
	cbz	w2, LBB0_2
; %bb.1:
Lloh3:
	adrp	x9, _BTH_SE_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BTH_SE_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x21]
LBB0_2:
	ldr	w22, [x29, #16]
	cbz	w3, LBB0_4
; %bb.3:
Lloh6:
	adrp	x9, _BTH_MIG_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BTH_MIG_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x21]
LBB0_4:
	mov	x0, x5
	bl	_cpu_to_be16
	str	w0, [x21, #24]
Lloh9:
	adrp	x8, _BTH_QPN_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BTH_QPN_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	and	w0, w8, w20
	bl	_cpu_to_be32
	str	x0, [x21, #16]
Lloh12:
	adrp	x8, _BTH_PSN_MASK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BTH_PSN_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	and	w8, w8, w22
Lloh15:
	adrp	x9, _BTH_ACK_MASK@GOTPAGE
Lloh16:
	ldr	x9, [x9, _BTH_ACK_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	cmp	w19, #0
	csel	w9, wzr, w9, eq
	orr	w0, w9, w8
	bl	_cpu_to_be32
	str	x0, [x21, #8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_BTH_PAD_MASK,4,2               ; @BTH_PAD_MASK
	.comm	_BTH_SE_MASK,4,2                ; @BTH_SE_MASK
	.comm	_BTH_MIG_MASK,4,2               ; @BTH_MIG_MASK
	.comm	_BTH_QPN_MASK,4,2               ; @BTH_QPN_MASK
	.comm	_BTH_PSN_MASK,4,2               ; @BTH_PSN_MASK
	.comm	_BTH_ACK_MASK,4,2               ; @BTH_ACK_MASK
	.no_dead_strip	_bth_init
.subsections_via_symbols
