	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bte_hci_initcore_complete      ## -- Begin function bte_hci_initcore_complete
	.p2align	4, 0x90
_bte_hci_initcore_complete:             ## @bte_hci_initcore_complete
	.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
	movl	%r8d, %r15d
	movl	%ecx, %r13d
	movl	%edx, %ebx
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_ERR_OK@GOTPCREL(%rip), %r14
	movq	(%r14), %r12
	movl	l___const.bte_hci_initcore_complete.dev_cod+8(%rip), %eax
	movl	%eax, -56(%rbp)
	movq	l___const.bte_hci_initcore_complete.dev_cod(%rip), %rax
	movq	%rax, -64(%rbp)
	leaq	L_.str(%rip), %rdi
	movl	%edx, %esi
	movl	%ecx, %edx
	callq	_LOG
	cmpl	$129, %ebx
	je	LBB0_14
## %bb.1:
	cmpl	$128, %ebx
	jne	LBB0_29
## %bb.2:
	movq	_HCI_READ_BUFFER_SIZE@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	jne	LBB0_5
## %bb.3:
	movq	_HCI_SUCCESS@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_30
## %bb.4:
	leaq	-64(%rbp), %rdi
	callq	_hci_write_cod
	jmp	LBB0_31
LBB0_14:
	movq	_HCI_RESET@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	jne	LBB0_17
## %bb.15:
	movq	_HCI_SUCCESS@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_30
## %bb.16:
	xorl	%eax, %eax
	callq	_hci_read_buffer_size
	jmp	LBB0_31
LBB0_29:
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	movl	%r13d, %edx
	callq	_LOG
LBB0_30:
	movq	_ERR_CONN@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
LBB0_31:
	cmpq	(%r14), %r12
	je	LBB0_33
## %bb.32:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	___bte_cmdfinish
LBB0_33:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_35
## %bb.34:
	movq	%r12, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_HCI_READ_LOCAL_VERSION@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	jne	LBB0_8
## %bb.6:
	movq	_HCI_SUCCESS@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_30
## %bb.7:
	xorl	%eax, %eax
	callq	_hci_read_bd_addr
	jmp	LBB0_31
LBB0_17:
	movq	_HCI_WRITE_COD@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	jne	LBB0_20
## %bb.18:
	movq	_HCI_SUCCESS@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_30
## %bb.19:
	leaq	L_.str.1(%rip), %rdi
	movl	$1, %esi
	callq	_hci_write_local_name
	jmp	LBB0_31
LBB0_8:
	movq	_HCI_READ_BD_ADDR@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	jne	LBB0_11
## %bb.9:
	movq	_HCI_SUCCESS@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_30
## %bb.10:
	xorl	%eax, %eax
	callq	_hci_read_local_features
	jmp	LBB0_31
LBB0_20:
	movq	_HCI_WRITE_LOCAL_NAME@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	jne	LBB0_23
## %bb.21:
	movq	_HCI_SUCCESS@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_30
## %bb.22:
	xorl	%edi, %edi
	callq	_hci_write_pin_type
	jmp	LBB0_31
LBB0_11:
	movq	_HCI_READ_LOCAL_FEATURES@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	jne	LBB0_31
## %bb.12:
	movq	_HCI_SUCCESS@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_30
## %bb.13:
	movq	_bte_hci_initcore_complete2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_hci_cmd_complete
	movl	$1, %edi
	callq	_hci_write_inquiry_mode
	jmp	LBB0_31
LBB0_23:
	movq	_HCI_WRITE_PIN_TYPE@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	jne	LBB0_26
## %bb.24:
	movq	_HCI_SUCCESS@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_30
## %bb.25:
	xorl	%eax, %eax
	callq	_hci_host_buffer_size
	jmp	LBB0_31
LBB0_26:
	movq	_HCI_HOST_BUF_SIZE@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	jne	LBB0_31
## %bb.27:
	movq	_HCI_SUCCESS@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_30
## %bb.28:
	xorl	%eax, %eax
	callq	_hci_read_local_version
	jmp	LBB0_31
LBB0_35:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ERR_OK,8,3                     ## @ERR_OK
	.section	__TEXT,__const
	.p2align	2                               ## @__const.bte_hci_initcore_complete.dev_cod
l___const.bte_hci_initcore_complete.dev_cod:
	.long	0                               ## 0x0
	.long	31                              ## 0x1f
	.long	0                               ## 0x0

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bte_hci_initcore_complete(%02x,%02x)\n"

	.comm	_HCI_READ_BUFFER_SIZE,4,2       ## @HCI_READ_BUFFER_SIZE
	.comm	_HCI_SUCCESS,4,2                ## @HCI_SUCCESS
	.comm	_ERR_CONN,8,3                   ## @ERR_CONN
	.comm	_HCI_READ_LOCAL_VERSION,4,2     ## @HCI_READ_LOCAL_VERSION
	.comm	_HCI_READ_BD_ADDR,4,2           ## @HCI_READ_BD_ADDR
	.comm	_HCI_READ_LOCAL_FEATURES,4,2    ## @HCI_READ_LOCAL_FEATURES
	.comm	_bte_hci_initcore_complete2,4,2 ## @bte_hci_initcore_complete2
	.comm	_HCI_RESET,4,2                  ## @HCI_RESET
	.comm	_HCI_WRITE_COD,4,2              ## @HCI_WRITE_COD
L_.str.1:                               ## @.str.1
	.space	1

	.comm	_HCI_WRITE_LOCAL_NAME,4,2       ## @HCI_WRITE_LOCAL_NAME
	.comm	_HCI_WRITE_PIN_TYPE,4,2         ## @HCI_WRITE_PIN_TYPE
	.comm	_HCI_HOST_BUF_SIZE,4,2          ## @HCI_HOST_BUF_SIZE
L_.str.2:                               ## @.str.2
	.asciz	"Unknown command complete event. OGF = 0x%x OCF = 0x%x\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bte_hci_initcore_complete      ; -- Begin function bte_hci_initcore_complete
	.p2align	2
_bte_hci_initcore_complete:             ; @bte_hci_initcore_complete
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x21, x4
	mov	x22, x3
	mov	x23, x2
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x24, _ERR_OK@GOTPAGE
Lloh4:
	ldr	x24, [x24, _ERR_OK@GOTPAGEOFF]
	ldr	x20, [x24]
Lloh5:
	adrp	x8, l___const.bte_hci_initcore_complete.dev_cod@PAGE
Lloh6:
	add	x8, x8, l___const.bte_hci_initcore_complete.dev_cod@PAGEOFF
	ldr	x9, [x8]
	str	x9, [sp, #8]
	ldr	w8, [x8, #8]
	str	w8, [sp, #16]
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x2
	mov	x2, x3
	bl	_LOG
	cmp	w23, #129
	b.eq	LBB0_5
; %bb.1:
	cmp	w23, #128
	b.ne	LBB0_8
; %bb.2:
Lloh9:
	adrp	x8, _HCI_READ_BUFFER_SIZE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HCI_READ_BUFFER_SIZE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_14
; %bb.3:
Lloh12:
	adrp	x8, _HCI_SUCCESS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HCI_SUCCESS@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_9
; %bb.4:
	add	x0, sp, #8
	bl	_hci_write_cod
	b	LBB0_10
LBB0_5:
Lloh15:
	adrp	x8, _HCI_RESET@GOTPAGE
Lloh16:
	ldr	x8, [x8, _HCI_RESET@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_17
; %bb.6:
Lloh18:
	adrp	x8, _HCI_SUCCESS@GOTPAGE
Lloh19:
	ldr	x8, [x8, _HCI_SUCCESS@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_9
; %bb.7:
	bl	_hci_read_buffer_size
	b	LBB0_10
LBB0_8:
Lloh21:
	adrp	x0, l_.str.2@PAGE
Lloh22:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x23
	mov	x2, x22
	bl	_LOG
LBB0_9:
Lloh23:
	adrp	x8, _ERR_CONN@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ERR_CONN@GOTPAGEOFF]
Lloh25:
	ldr	x20, [x8]
LBB0_10:
	ldr	x8, [x24]
	cmp	x20, x8
	b.eq	LBB0_12
; %bb.11:
	mov	x0, x19
	mov	x1, x20
	bl	___bte_cmdfinish
LBB0_12:
	ldr	x8, [sp, #24]
Lloh26:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh27:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_35
; %bb.13:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_14:
Lloh29:
	adrp	x8, _HCI_READ_LOCAL_VERSION@GOTPAGE
Lloh30:
	ldr	x8, [x8, _HCI_READ_LOCAL_VERSION@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_20
; %bb.15:
Lloh32:
	adrp	x8, _HCI_SUCCESS@GOTPAGE
Lloh33:
	ldr	x8, [x8, _HCI_SUCCESS@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_9
; %bb.16:
	bl	_hci_read_bd_addr
	b	LBB0_10
LBB0_17:
Lloh35:
	adrp	x8, _HCI_WRITE_COD@GOTPAGE
Lloh36:
	ldr	x8, [x8, _HCI_WRITE_COD@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_23
; %bb.18:
Lloh38:
	adrp	x8, _HCI_SUCCESS@GOTPAGE
Lloh39:
	ldr	x8, [x8, _HCI_SUCCESS@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_9
; %bb.19:
Lloh41:
	adrp	x0, l_.str.1@PAGE
Lloh42:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	w1, #1
	bl	_hci_write_local_name
	b	LBB0_10
LBB0_20:
Lloh43:
	adrp	x8, _HCI_READ_BD_ADDR@GOTPAGE
Lloh44:
	ldr	x8, [x8, _HCI_READ_BD_ADDR@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_26
; %bb.21:
Lloh46:
	adrp	x8, _HCI_SUCCESS@GOTPAGE
Lloh47:
	ldr	x8, [x8, _HCI_SUCCESS@GOTPAGEOFF]
Lloh48:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_9
; %bb.22:
	bl	_hci_read_local_features
	b	LBB0_10
LBB0_23:
Lloh49:
	adrp	x8, _HCI_WRITE_LOCAL_NAME@GOTPAGE
Lloh50:
	ldr	x8, [x8, _HCI_WRITE_LOCAL_NAME@GOTPAGEOFF]
Lloh51:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_29
; %bb.24:
Lloh52:
	adrp	x8, _HCI_SUCCESS@GOTPAGE
Lloh53:
	ldr	x8, [x8, _HCI_SUCCESS@GOTPAGEOFF]
Lloh54:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_9
; %bb.25:
	mov	w0, #0
	bl	_hci_write_pin_type
	b	LBB0_10
LBB0_26:
Lloh55:
	adrp	x8, _HCI_READ_LOCAL_FEATURES@GOTPAGE
Lloh56:
	ldr	x8, [x8, _HCI_READ_LOCAL_FEATURES@GOTPAGEOFF]
Lloh57:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_10
; %bb.27:
Lloh58:
	adrp	x8, _HCI_SUCCESS@GOTPAGE
Lloh59:
	ldr	x8, [x8, _HCI_SUCCESS@GOTPAGEOFF]
Lloh60:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_9
; %bb.28:
Lloh61:
	adrp	x8, _bte_hci_initcore_complete2@GOTPAGE
Lloh62:
	ldr	x8, [x8, _bte_hci_initcore_complete2@GOTPAGEOFF]
Lloh63:
	ldr	w0, [x8]
	bl	_hci_cmd_complete
	mov	w0, #1
	bl	_hci_write_inquiry_mode
	b	LBB0_10
LBB0_29:
Lloh64:
	adrp	x8, _HCI_WRITE_PIN_TYPE@GOTPAGE
Lloh65:
	ldr	x8, [x8, _HCI_WRITE_PIN_TYPE@GOTPAGEOFF]
Lloh66:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_32
; %bb.30:
Lloh67:
	adrp	x8, _HCI_SUCCESS@GOTPAGE
Lloh68:
	ldr	x8, [x8, _HCI_SUCCESS@GOTPAGEOFF]
Lloh69:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_9
; %bb.31:
	bl	_hci_host_buffer_size
	b	LBB0_10
LBB0_32:
Lloh70:
	adrp	x8, _HCI_HOST_BUF_SIZE@GOTPAGE
Lloh71:
	ldr	x8, [x8, _HCI_HOST_BUF_SIZE@GOTPAGEOFF]
Lloh72:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_10
; %bb.33:
Lloh73:
	adrp	x8, _HCI_SUCCESS@GOTPAGE
Lloh74:
	ldr	x8, [x8, _HCI_SUCCESS@GOTPAGEOFF]
Lloh75:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_9
; %bb.34:
	bl	_hci_read_local_version
	b	LBB0_10
LBB0_35:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpLdrGotLdr	Lloh70, Lloh71, Lloh72
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.cfi_endproc
                                        ; -- End function
	.comm	_ERR_OK,8,3                     ; @ERR_OK
	.section	__TEXT,__const
	.p2align	2                               ; @__const.bte_hci_initcore_complete.dev_cod
l___const.bte_hci_initcore_complete.dev_cod:
	.long	0                               ; 0x0
	.long	31                              ; 0x1f
	.long	0                               ; 0x0

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bte_hci_initcore_complete(%02x,%02x)\n"

	.comm	_HCI_READ_BUFFER_SIZE,4,2       ; @HCI_READ_BUFFER_SIZE
	.comm	_HCI_SUCCESS,4,2                ; @HCI_SUCCESS
	.comm	_ERR_CONN,8,3                   ; @ERR_CONN
	.comm	_HCI_READ_LOCAL_VERSION,4,2     ; @HCI_READ_LOCAL_VERSION
	.comm	_HCI_READ_BD_ADDR,4,2           ; @HCI_READ_BD_ADDR
	.comm	_HCI_READ_LOCAL_FEATURES,4,2    ; @HCI_READ_LOCAL_FEATURES
	.comm	_bte_hci_initcore_complete2,4,2 ; @bte_hci_initcore_complete2
	.comm	_HCI_RESET,4,2                  ; @HCI_RESET
	.comm	_HCI_WRITE_COD,4,2              ; @HCI_WRITE_COD
l_.str.1:                               ; @.str.1
	.space	1

	.comm	_HCI_WRITE_LOCAL_NAME,4,2       ; @HCI_WRITE_LOCAL_NAME
	.comm	_HCI_WRITE_PIN_TYPE,4,2         ; @HCI_WRITE_PIN_TYPE
	.comm	_HCI_HOST_BUF_SIZE,4,2          ; @HCI_HOST_BUF_SIZE
l_.str.2:                               ; @.str.2
	.asciz	"Unknown command complete event. OGF = 0x%x OCF = 0x%x\n"

.subsections_via_symbols
