	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm3510_do_hab_cmd
_bcm3510_do_hab_cmd:                    ## @bcm3510_do_hab_cmd
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -72(%rbp)                  ## 8-byte Spill
	movl	%r8d, %r12d
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	movl	%esi, -56(%rbp)                 ## 4-byte Spill
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	movl	16(%rbp), %ebx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_XFER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	shlq	$2, %r13
	movq	%r13, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	%r13, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rcx
	leal	2(%rbx), %r15d
	movslq	%r15d, %rax
	cmpq	%rax, %r13
	jae	LBB0_2
## %bb.1:
	movq	%rbx, %rsi
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
                                        ## kill: def $esi killed $esi killed $rsi
	jmp	LBB0_4
LBB0_2:
	leal	2(%r12), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	cltq
	cmpq	%rax, %r13
	jae	LBB0_8
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r12d, %esi
LBB0_4:
	xorl	%eax, %eax
	callq	_deb_hab
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_5:
	subl	(%rax), %ebx
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.7:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%rcx, %r13
	movl	-56(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r14)
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%r14)
	movq	%r14, %rdi
	addq	$8, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movl	%r12d, %edx
	callq	_memcpy
	leaq	L_.str.2(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_deb_hab
	movq	_deb_hab@GOTPCREL(%rip), %rdx
	movq	%r14, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_dbufout
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_deb_hab
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	js	LBB0_12
## %bb.9:
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_bcm3510_hab_send_request
	testl	%eax, %eax
	js	LBB0_13
## %bb.10:
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	%r15d, %edx
	callq	_bcm3510_hab_get_response
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_14
## %bb.11:
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_deb_hab
	movq	_deb_hab@GOTPCREL(%rip), %rdx
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_dbufout
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_deb_hab
	addq	$8, %r13
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	movl	16(%rbp), %edx
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	jmp	LBB0_14
LBB0_12:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_13:
	movl	%eax, %ebx
LBB0_14:
	movq	%r12, %rdi
	callq	_mutex_unlock
	jmp	LBB0_6
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_XFER_SIZE,4,2              ## @MAX_XFER_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"do_hab_cmd: ilen=%d is too big!\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"do_hab_cmd: olen=%d is too big!\n"

L_.str.2:                               ## @.str.2
	.asciz	"hab snd: "

L_.str.3:                               ## @.str.3
	.asciz	"\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
L_.str.4:                               ## @.str.4
	.asciz	"hab get: "

	.no_dead_strip	_bcm3510_do_hab_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm3510_do_hab_cmd
_bcm3510_do_hab_cmd:                    ; @bcm3510_do_hab_cmd
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #16
	mov	x20, x6
	mov	x21, x5
                                        ; kill: def $w4 killed $w4 def $x4
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, _MAX_XFER_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_XFER_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x12, x10, #0x7fffffff0
	sub	x24, x9, x12
	mov	sp, x24
	mov	x9, x8
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x22, x9, x12
	mov	sp, x22
	add	w23, w6, #2
	cmp	x8, w23, sxtw
	b.hs	LBB0_2
; %bb.1:
	str	x20, [sp, #-16]!
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	add	w25, w4, #2
	cmp	x8, w25, sxtw
	b.hs	LBB0_8
; %bb.3:
	str	x4, [sp, #-16]!
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_4:
	bl	_deb_hab
	add	sp, sp, #16
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_6:
	ldur	x8, [x29, #-72]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.7:
	mov	x0, x24
	sub	sp, x29, #64
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_8:
	stp	w1, w2, [x24]
	add	x0, x24, #8
	mov	x1, x3
	mov	x2, x4
	bl	_memcpy
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_deb_hab
Lloh21:
	adrp	x2, _deb_hab@GOTPAGE
Lloh22:
	ldr	x2, [x2, _deb_hab@GOTPAGEOFF]
	mov	x0, x24
	mov	x1, x25
	bl	_dbufout
Lloh23:
	adrp	x0, l_.str.3@PAGE
Lloh24:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_deb_hab
	mov	x0, x19
	bl	_mutex_lock_interruptible
	tbnz	x0, #63, LBB0_12
; %bb.9:
	mov	x0, x19
	mov	x1, x24
	mov	x2, x25
	bl	_bcm3510_hab_send_request
	tbnz	w0, #31, LBB0_13
; %bb.10:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	bl	_bcm3510_hab_get_response
	mov	x24, x0
	tbnz	w0, #31, LBB0_14
; %bb.11:
Lloh25:
	adrp	x0, l_.str.4@PAGE
Lloh26:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_deb_hab
Lloh27:
	adrp	x2, _deb_hab@GOTPAGE
Lloh28:
	ldr	x2, [x2, _deb_hab@GOTPAGEOFF]
	mov	x0, x22
	mov	x1, x23
	bl	_dbufout
Lloh29:
	adrp	x0, l_.str.3@PAGE
Lloh30:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_deb_hab
	add	x1, x22, #8
	mov	x0, x21
	mov	x2, x20
	bl	_memcpy
	b	LBB0_14
LBB0_12:
Lloh31:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_5
LBB0_13:
	mov	x24, x0
LBB0_14:
	mov	x0, x19
	bl	_mutex_unlock
	b	LBB0_6
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_XFER_SIZE,4,2              ; @MAX_XFER_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"do_hab_cmd: ilen=%d is too big!\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"do_hab_cmd: olen=%d is too big!\n"

l_.str.2:                               ; @.str.2
	.asciz	"hab snd: "

l_.str.3:                               ; @.str.3
	.asciz	"\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
l_.str.4:                               ; @.str.4
	.asciz	"hab get: "

	.no_dead_strip	_bcm3510_do_hab_cmd
.subsections_via_symbols
