	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hci_set_event_filter           ## -- Begin function hci_set_event_filter
	.p2align	4, 0x90
_hci_set_event_filter:                  ## @hci_set_event_filter
	.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
	movl	%esi, %r15d
	movl	%edi, %r12d
	cmpl	$2, %edi
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_6
## %bb.1:
	cmpl	$1, %r12d
	jne	LBB0_2
## %bb.3:
	cmpl	$2, %r15d
	je	LBB0_5
## %bb.4:
	cmpl	$1, %r15d
	jne	LBB0_2
LBB0_5:
	movl	$6, %r13d
	jmp	LBB0_11
LBB0_6:
	cmpl	$2, %r15d
	je	LBB0_10
## %bb.7:
	cmpl	$1, %r15d
	je	LBB0_10
## %bb.8:
	testl	%r15d, %r15d
	jne	LBB0_2
## %bb.9:
	movl	$1, %r13d
	jmp	LBB0_11
LBB0_2:
	xorl	%r14d, %r14d
	xorl	%r13d, %r13d
	jmp	LBB0_12
LBB0_10:
	movl	$7, %r13d
LBB0_11:
	movb	$1, %r14b
LBB0_12:
	movq	_PBUF_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_HCI_SET_EV_FILTER_PLEN@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	addq	%r13, %rsi
	movq	_PBUF_RAM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_btpbuf_alloc
	testq	%rax, %rax
	je	LBB0_13
## %bb.14:
	movq	_HCI_SET_EV_FILTER_OCF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_HCI_HC_BB_OGF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	(%rbx), %rcx
	addq	%r13, %rcx
	movq	%rax, %rdi
	callq	_hci_cmd_ass
	movq	%rax, %rbx
	movq	8(%rax), %rdi
	movl	%r12d, 16(%rdi)
	movl	%r15d, 20(%rdi)
	testb	%r14b, %r14b
	je	LBB0_16
## %bb.15:
	addq	$6, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%r13, %rdx
	callq	_memcpy
LBB0_16:
	movl	(%rbx), %esi
	movq	%rbx, %rdi
	callq	_physbusif_output
	movq	%rbx, %rdi
	callq	_btpbuf_free
	movq	_ERR_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_13:
	leaq	L_.str(%rip), %rdi
	callq	_ERROR
	movq	_ERR_MEM@GOTPCREL(%rip), %rax
LBB0_17:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PBUF_RAW,4,2                   ## @PBUF_RAW
	.comm	_HCI_SET_EV_FILTER_PLEN,8,3     ## @HCI_SET_EV_FILTER_PLEN
	.comm	_PBUF_RAM,4,2                   ## @PBUF_RAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hci_set_event_filter: Could not allocate memory for pbuf\n"

	.comm	_ERR_MEM,4,2                    ## @ERR_MEM
	.comm	_HCI_SET_EV_FILTER_OCF,4,2      ## @HCI_SET_EV_FILTER_OCF
	.comm	_HCI_HC_BB_OGF,4,2              ## @HCI_HC_BB_OGF
	.comm	_ERR_OK,4,2                     ## @ERR_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hci_set_event_filter           ; -- Begin function hci_set_event_filter
	.p2align	2
_hci_set_event_filter:                  ; @hci_set_event_filter
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	w8, #1
	mov	w9, #7
	mov	w10, #1
	mov	w11, #7
	mov	w12, #1
	cmp	w1, #0
	csel	w13, wzr, w12, ne
	csel	x12, xzr, x12, ne
	cmp	w1, #1
	csel	w10, w10, w13, eq
	csel	x11, x11, x12, eq
	cmp	w1, #2
	csel	w8, w8, w10, eq
	csel	x9, x9, x11, eq
	mov	w10, #1
	mov	w11, #6
	mov	w12, #1
	mov	w13, #6
	cmp	w1, #1
	csel	w12, wzr, w12, ne
	csel	x13, xzr, x13, ne
	cmp	w1, #2
	csel	w10, w10, w12, eq
	csel	x11, x11, x13, eq
	cmp	w0, #1
	csel	w10, wzr, w10, ne
	csel	x11, xzr, x11, ne
	cmp	w0, #2
	csel	w24, w8, w10, eq
	csel	x22, x9, x11, eq
Lloh0:
	adrp	x8, _PBUF_RAW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PBUF_RAW@GOTPAGEOFF]
Lloh2:
	adrp	x23, _HCI_SET_EV_FILTER_PLEN@GOTPAGE
Lloh3:
	ldr	x23, [x23, _HCI_SET_EV_FILTER_PLEN@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldr	x8, [x23]
	add	x1, x8, x22
Lloh5:
	adrp	x8, _PBUF_RAM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PBUF_RAM@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	bl	_btpbuf_alloc
	cbz	x0, LBB0_4
; %bb.1:
Lloh8:
	adrp	x8, _HCI_SET_EV_FILTER_OCF@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HCI_SET_EV_FILTER_OCF@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _HCI_HC_BB_OGF@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HCI_HC_BB_OGF@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	ldr	x8, [x23]
	add	x3, x8, x22
	bl	_hci_cmd_ass
	mov	x23, x0
	ldr	x8, [x0, #8]
	stp	w21, w20, [x8, #16]
	cbz	w24, LBB0_3
; %bb.2:
	add	x0, x8, #6
	mov	x1, x19
	mov	x2, x22
	bl	_memcpy
LBB0_3:
	ldr	w1, [x23]
	mov	x0, x23
	bl	_physbusif_output
	mov	x0, x23
	bl	_btpbuf_free
Lloh14:
	adrp	x8, _ERR_OK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ERR_OK@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ERROR
Lloh18:
	adrp	x8, _ERR_MEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ERR_MEM@GOTPAGEOFF]
LBB0_5:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_PBUF_RAW,4,2                   ; @PBUF_RAW
	.comm	_HCI_SET_EV_FILTER_PLEN,8,3     ; @HCI_SET_EV_FILTER_PLEN
	.comm	_PBUF_RAM,4,2                   ; @PBUF_RAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hci_set_event_filter: Could not allocate memory for pbuf\n"

	.comm	_ERR_MEM,4,2                    ; @ERR_MEM
	.comm	_HCI_SET_EV_FILTER_OCF,4,2      ; @HCI_SET_EV_FILTER_OCF
	.comm	_HCI_HC_BB_OGF,4,2              ; @HCI_HC_BB_OGF
	.comm	_ERR_OK,4,2                     ; @ERR_OK
.subsections_via_symbols
