	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath6kl_usb_probe
_ath6kl_usb_probe:                      ## @ath6kl_usb_probe
	.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
	callq	_interface_to_usbdev
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_usb_get_dev
	movl	12(%r14), %edi
	callq	_le16_to_cpu
	movl	%eax, %ebx
	movl	8(%r14), %edi
	callq	_le16_to_cpu
	movl	%eax, %r12d
	movq	_ATH6KL_DBG_USB@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_ath6kl_dbg
	movl	(%r13), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_ath6kl_dbg
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	(%r13), %edi
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_ath6kl_dbg
LBB0_2:
	movq	(%r14), %rax
	movq	_USB_SPEED_HIGH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movl	(%r13), %edi
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.4(%rip), %rsi
	cmoveq	%rax, %rsi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_ath6kl_dbg
	movq	%r15, %rdi
	callq	_ath6kl_usb_create
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r15
	movq	8(%rax), %rdi
	callq	_ath6kl_core_create
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %rbx
	movq	%r15, 24(%rax)
	movq	_ATH6KL_HIF_TYPE_USB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	_ath6kl_usb_ops@GOTPCREL(%rip), %rax
	movq	%rax, 8(%rbx)
	movabsq	$68719476988, %rax              ## imm = 0x10000000FC
	movq	%rax, (%rbx)
	movq	%rbx, (%r15)
	movq	_ATH6KL_HTC_TYPE_PIPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ath6kl_core_init
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movl	%eax, %r12d
	leaq	L_.str.6(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_ath6kl_err
	movq	%rbx, %rdi
	callq	_ath6kl_core_destroy
	jmp	LBB0_9
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_10
LBB0_5:
	leaq	L_.str.5(%rip), %rdi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_ath6kl_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
LBB0_9:
	movq	%r15, %rdi
	callq	_ath6kl_usb_destroy
LBB0_10:
	movq	%r14, %rdi
	callq	_usb_put_dev
LBB0_11:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	xorl	%r12d, %r12d
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_ATH6KL_DBG_USB,4,2             ## @ATH6KL_DBG_USB
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vendor_id = %04x\n"

L_.str.1:                               ## @.str.1
	.asciz	"product_id = %04x\n"

L_.str.2:                               ## @.str.2
	.asciz	"USB Interface %d\n"

	.comm	_USB_SPEED_HIGH,8,3             ## @USB_SPEED_HIGH
L_.str.3:                               ## @.str.3
	.asciz	"USB 2.0 Host\n"

L_.str.4:                               ## @.str.4
	.asciz	"USB 1.1 Host\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.5:                               ## @.str.5
	.asciz	"Failed to alloc ath6kl core\n"

	.comm	_ATH6KL_HIF_TYPE_USB,4,2        ## @ATH6KL_HIF_TYPE_USB
	.comm	_ath6kl_usb_ops,4,2             ## @ath6kl_usb_ops
	.comm	_ATH6KL_HTC_TYPE_PIPE,4,2       ## @ATH6KL_HTC_TYPE_PIPE
L_.str.6:                               ## @.str.6
	.asciz	"Failed to init ath6kl core: %d\n"

	.no_dead_strip	_ath6kl_usb_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function ath6kl_usb_probe
lCPI0_0:
	.long	252                             ; 0xfc
	.long	16                              ; 0x10
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_ath6kl_usb_probe:                      ; @ath6kl_usb_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x0
	bl	_interface_to_usbdev
	mov	x19, x0
	bl	_usb_get_dev
	ldr	w0, [x19, #12]
	bl	_le16_to_cpu
	mov	x21, x0
	ldr	w0, [x19, #8]
	bl	_le16_to_cpu
	mov	x22, x0
Lloh0:
	adrp	x23, _ATH6KL_DBG_USB@GOTPAGE
Lloh1:
	ldr	x23, [x23, _ATH6KL_DBG_USB@GOTPAGEOFF]
	ldr	w0, [x23]
	str	x21, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_ath6kl_dbg
	ldr	w0, [x23]
	str	x22, [sp]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_ath6kl_dbg
	ldr	x8, [x20]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w0, [x23]
	ldr	w8, [x8]
	str	x8, [sp]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_ath6kl_dbg
LBB0_2:
	ldr	x8, [x19]
Lloh8:
	adrp	x9, _USB_SPEED_HIGH@GOTPAGE
Lloh9:
	ldr	x9, [x9, _USB_SPEED_HIGH@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	ldr	w0, [x23]
Lloh11:
	adrp	x10, l_.str.4@PAGE
Lloh12:
	add	x10, x10, l_.str.4@PAGEOFF
Lloh13:
	adrp	x11, l_.str.3@PAGE
Lloh14:
	add	x11, x11, l_.str.3@PAGEOFF
	cmp	x8, x9
	csel	x1, x11, x10, eq
	bl	_ath6kl_dbg
	mov	x0, x20
	bl	_ath6kl_usb_create
	cbz	x0, LBB0_6
; %bb.3:
	mov	x20, x0
	ldr	x0, [x0, #8]
	bl	_ath6kl_core_create
	cbz	x0, LBB0_7
; %bb.4:
	mov	x22, x0
	str	x20, [x0, #24]
Lloh15:
	adrp	x8, _ATH6KL_HIF_TYPE_USB@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ATH6KL_HIF_TYPE_USB@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w8, [x0, #16]
Lloh18:
	adrp	x8, _ath6kl_usb_ops@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ath6kl_usb_ops@GOTPAGEOFF]
	str	x8, [x0, #8]
Lloh20:
	adrp	x8, lCPI0_0@PAGE
Lloh21:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x0]
	str	x0, [x20]
Lloh22:
	adrp	x8, _ATH6KL_HTC_TYPE_PIPE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ATH6KL_HTC_TYPE_PIPE@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	bl	_ath6kl_core_init
	mov	x21, x0
	cbz	w0, LBB0_10
; %bb.5:
	str	x21, [sp]
Lloh25:
	adrp	x0, l_.str.6@PAGE
Lloh26:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_ath6kl_err
	mov	x0, x22
	bl	_ath6kl_core_destroy
	b	LBB0_8
LBB0_6:
Lloh27:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_9
LBB0_7:
Lloh30:
	adrp	x0, l_.str.5@PAGE
Lloh31:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_ath6kl_err
Lloh32:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_8:
	mov	x0, x20
	bl	_ath6kl_usb_destroy
LBB0_9:
	mov	x0, x19
	bl	_usb_put_dev
LBB0_10:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdrp	Lloh20, Lloh22
	.loh AdrpLdr	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_ATH6KL_DBG_USB,4,2             ; @ATH6KL_DBG_USB
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vendor_id = %04x\n"

l_.str.1:                               ; @.str.1
	.asciz	"product_id = %04x\n"

l_.str.2:                               ; @.str.2
	.asciz	"USB Interface %d\n"

	.comm	_USB_SPEED_HIGH,8,3             ; @USB_SPEED_HIGH
l_.str.3:                               ; @.str.3
	.asciz	"USB 2.0 Host\n"

l_.str.4:                               ; @.str.4
	.asciz	"USB 1.1 Host\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.5:                               ; @.str.5
	.asciz	"Failed to alloc ath6kl core\n"

	.comm	_ATH6KL_HIF_TYPE_USB,4,2        ; @ATH6KL_HIF_TYPE_USB
	.comm	_ath6kl_usb_ops,4,2             ; @ath6kl_usb_ops
	.comm	_ATH6KL_HTC_TYPE_PIPE,4,2       ; @ATH6KL_HTC_TYPE_PIPE
l_.str.6:                               ; @.str.6
	.asciz	"Failed to init ath6kl core: %d\n"

	.no_dead_strip	_ath6kl_usb_probe
.subsections_via_symbols
