	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_st5481_setup_b                 ## -- Begin function st5481_setup_b
	.p2align	4, 0x90
_st5481_setup_b:                        ## @st5481_setup_b
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rsi
	movl	$4, %edi
	callq	_DBG
	movq	%r14, %rdi
	callq	_st5481_setup_b_out
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movq	_HSCX_BUFMAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r14)
	movq	_NUM_ISO_PACKETS_B@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%r14)
	movq	_SIZE_ISO_PACKETS_B_IN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r14)
	cmpq	$0, 48(%r14)
	movq	_EP_B2_IN@GOTPCREL(%rip), %rax
	cmoveq	_EP_B1_IN@GOTPCREL(%rip), %rax
	movq	_IN_B2_COUNTER@GOTPCREL(%rip), %rcx
	cmoveq	_IN_B1_COUNTER@GOTPCREL(%rip), %rcx
	movl	(%rax), %eax
	movq	_USB_DIR_IN@GOTPCREL(%rip), %rdx
	orl	(%rdx), %eax
	movl	%eax, (%r14)
	movl	(%rcx), %eax
	movl	%eax, 20(%r14)
	movl	44(%r14), %eax
	movl	%eax, 16(%r14)
	leaq	40(%r14), %rax
	movq	%rax, 8(%r14)
	movq	%r14, %rdi
	callq	_st5481_setup_in
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_st5481_release_b_out
	jmp	LBB0_4
LBB0_2:
	xorl	%ebx, %ebx
LBB0_4:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

	.comm	_HSCX_BUFMAX,4,2                ## @HSCX_BUFMAX
	.comm	_NUM_ISO_PACKETS_B,4,2          ## @NUM_ISO_PACKETS_B
	.comm	_SIZE_ISO_PACKETS_B_IN,4,2      ## @SIZE_ISO_PACKETS_B_IN
	.comm	_EP_B2_IN,4,2                   ## @EP_B2_IN
	.comm	_EP_B1_IN,4,2                   ## @EP_B1_IN
	.comm	_USB_DIR_IN,4,2                 ## @USB_DIR_IN
	.comm	_IN_B2_COUNTER,4,2              ## @IN_B2_COUNTER
	.comm	_IN_B1_COUNTER,4,2              ## @IN_B1_COUNTER
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_st5481_setup_b                 ; -- Begin function st5481_setup_b
	.p2align	2
_st5481_setup_b:                        ; @st5481_setup_b
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #4
	bl	_DBG
	mov	x0, x19
	bl	_st5481_setup_b_out
	mov	x20, x0
	cbnz	w0, LBB0_3
; %bb.1:
Lloh2:
	adrp	x8, _HSCX_BUFMAX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HSCX_BUFMAX@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x19, #32]
Lloh5:
	adrp	x8, _NUM_ISO_PACKETS_B@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NUM_ISO_PACKETS_B@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _SIZE_ISO_PACKETS_B_IN@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SIZE_ISO_PACKETS_B_IN@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #24]
	ldr	x8, [x19, #48]
Lloh11:
	adrp	x9, _EP_B2_IN@GOTPAGE
Lloh12:
	ldr	x9, [x9, _EP_B2_IN@GOTPAGEOFF]
Lloh13:
	adrp	x10, _EP_B1_IN@GOTPAGE
Lloh14:
	ldr	x10, [x10, _EP_B1_IN@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x10, x9, eq
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _USB_DIR_IN@GOTPAGE
Lloh16:
	ldr	x9, [x9, _USB_DIR_IN@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19]
Lloh18:
	adrp	x8, _IN_B2_COUNTER@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IN_B2_COUNTER@GOTPAGEOFF]
Lloh20:
	adrp	x9, _IN_B1_COUNTER@GOTPAGE
Lloh21:
	ldr	x9, [x9, _IN_B1_COUNTER@GOTPAGEOFF]
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
	ldr	w9, [x19, #44]
	stp	w9, w8, [x19, #16]
	add	x8, x19, #40
	str	x8, [x19, #8]
	mov	x0, x19
	bl	_st5481_setup_in
	mov	x20, x0
	cbz	w0, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_st5481_release_b_out
LBB0_3:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

	.comm	_HSCX_BUFMAX,4,2                ; @HSCX_BUFMAX
	.comm	_NUM_ISO_PACKETS_B,4,2          ; @NUM_ISO_PACKETS_B
	.comm	_SIZE_ISO_PACKETS_B_IN,4,2      ; @SIZE_ISO_PACKETS_B_IN
	.comm	_EP_B2_IN,4,2                   ; @EP_B2_IN
	.comm	_EP_B1_IN,4,2                   ; @EP_B1_IN
	.comm	_USB_DIR_IN,4,2                 ; @USB_DIR_IN
	.comm	_IN_B2_COUNTER,4,2              ; @IN_B2_COUNTER
	.comm	_IN_B1_COUNTER,4,2              ; @IN_B1_COUNTER
.subsections_via_symbols
