	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cxusb_dualdig4_frontend_attach
_cxusb_dualdig4_frontend_attach:        ## @cxusb_dualdig4_frontend_attach
	.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	%r12
	pushq	%rbx
	subq	$64, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movl	$107, -88(%rbp)
	leaq	-64(%rbp), %rax
	movq	%rax, -80(%rbp)
	movl	$4, -72(%rbp)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -68(%rbp)
	movq	(%rdi), %rax
	movl	12(%rax), %edi
	xorl	%esi, %esi
	movl	$1, %edx
	callq	_usb_set_interface
	testq	%rax, %rax
	jns	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_err
LBB0_2:
	movq	(%r14), %rdi
	movq	_CMD_DIGITAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r12d, %r12d
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_cxusb_ctrl_msg
	movq	(%r14), %rdi
	movl	$4, %esi
	xorl	%edx, %edx
	callq	_cxusb_bluebird_gpio_rw
	movq	(%r14), %rdi
	movl	$1, %esi
	movl	$1, %edx
	callq	_cxusb_bluebird_gpio_pulse
	movq	(%r14), %rdi
	movl	$2, %esi
	movl	$1, %edx
	callq	_cxusb_bluebird_gpio_pulse
	movq	_zl10353_attach@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r14), %rdx
	addq	$8, %rdx
	movq	_cxusb_zl10353_xc3028_config_no_i2c_gate@GOTPCREL(%rip), %rsi
	callq	_dvb_attach
	movq	8(%r14), %rcx
	movl	%eax, (%rcx)
	testl	%eax, %eax
	je	LBB0_13
## %bb.3:
	movq	(%r14), %rax
	cmpq	$0, (%rax)
	je	LBB0_11
## %bb.4:
	xorl	%ebx, %ebx
	leaq	-88(%rbp), %r15
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	$20, %edi
	callq	_msleep
	movq	(%r14), %rdi
	addq	$8, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_cxusb_i2c_xfer
	cmpl	$1, %eax
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	-64(%rbp), %eax
	orl	-60(%rbp), %eax
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	-52(%rbp), %eax
	addl	-56(%rbp), %eax
	cmpl	$255, %eax
	jne	LBB0_8
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r14), %rax
	xorl	%r12d, %r12d
	cmpq	$0, (%rax)
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	leal	1(%rbx), %eax
	cmpl	$4, %ebx
	movl	%eax, %ebx
	jb	LBB0_5
	jmp	LBB0_11
LBB0_13:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_11
LBB0_8:
	movq	(%r14), %rax
	movq	$0, (%rax)
	leaq	L_.str.1(%rip), %rdi
	callq	_info
	xorl	%r12d, %r12d
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_14
## %bb.12:
	movl	%r12d, %eax
	addq	$64, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set interface failed"

	.comm	_CMD_DIGITAL,4,2                ## @CMD_DIGITAL
	.comm	_zl10353_attach,4,2             ## @zl10353_attach
	.comm	_cxusb_zl10353_xc3028_config_no_i2c_gate,4,2 ## @cxusb_zl10353_xc3028_config_no_i2c_gate
	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"No IR receiver detected on this device."

	.no_dead_strip	_cxusb_dualdig4_frontend_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cxusb_dualdig4_frontend_attach
_cxusb_dualdig4_frontend_attach:        ; @cxusb_dualdig4_frontend_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	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, #-24]
	mov	w8, #107
	str	w8, [sp]
	add	x8, sp, #24
	str	x8, [sp, #8]
Lloh3:
	adrp	x8, _I2C_M_RD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I2C_M_RD@GOTPAGEOFF]
	mov	w9, #4
Lloh5:
	ldr	w8, [x8]
	stp	w9, w8, [sp, #16]
	ldr	x8, [x0]
	ldr	w0, [x8, #12]
	mov	w1, #0
	mov	w2, #1
	bl	_usb_set_interface
	tbz	x0, #63, LBB0_2
; %bb.1:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_err
LBB0_2:
	ldr	x0, [x19]
Lloh8:
	adrp	x8, _CMD_DIGITAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CMD_DIGITAL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x2, #0
	mov	w3, #0
	mov	x4, #0
	mov	w5, #0
	bl	_cxusb_ctrl_msg
	ldr	x0, [x19]
	mov	w1, #4
	mov	w2, #0
	bl	_cxusb_bluebird_gpio_rw
	ldr	x0, [x19]
	mov	w1, #1
	mov	w2, #1
	bl	_cxusb_bluebird_gpio_pulse
	ldr	x0, [x19]
	mov	w1, #2
	mov	w2, #1
	bl	_cxusb_bluebird_gpio_pulse
Lloh11:
	adrp	x8, _zl10353_attach@GOTPAGE
Lloh12:
	ldr	x8, [x8, _zl10353_attach@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	ldr	x8, [x19]
	add	x2, x8, #8
Lloh14:
	adrp	x1, _cxusb_zl10353_xc3028_config_no_i2c_gate@GOTPAGE
Lloh15:
	ldr	x1, [x1, _cxusb_zl10353_xc3028_config_no_i2c_gate@GOTPAGEOFF]
	bl	_dvb_attach
	ldr	x8, [x19, #8]
	str	w0, [x8]
	cbz	w0, LBB0_25
; %bb.3:
	ldr	x8, [x19]
	ldr	x8, [x8]
	cbz	x8, LBB0_24
; %bb.4:
	mov	w0, #20
	bl	_msleep
	ldr	x8, [x19]
	add	x0, x8, #8
	mov	x1, sp
	mov	w2, #1
	bl	_cxusb_i2c_xfer
	cmp	w0, #1
	b.ne	LBB0_23
; %bb.5:
	ldp	w8, w9, [sp, #24]
	orr	w8, w8, w9
	cbz	w8, LBB0_7
; %bb.6:
	ldp	w8, w9, [sp, #32]
	add	w8, w9, w8
	cmp	w8, #255
	b.ne	LBB0_23
LBB0_7:
	ldr	x8, [x19]
	ldr	x8, [x8]
	cbz	x8, LBB0_24
; %bb.8:
	mov	w0, #20
	bl	_msleep
	ldr	x8, [x19]
	add	x0, x8, #8
	mov	x1, sp
	mov	w2, #1
	bl	_cxusb_i2c_xfer
	cmp	w0, #1
	b.ne	LBB0_23
; %bb.9:
	ldp	w8, w9, [sp, #24]
	orr	w8, w8, w9
	cbz	w8, LBB0_11
; %bb.10:
	ldp	w8, w9, [sp, #32]
	add	w8, w9, w8
	cmp	w8, #255
	b.ne	LBB0_23
LBB0_11:
	ldr	x8, [x19]
	ldr	x8, [x8]
	cbz	x8, LBB0_24
; %bb.12:
	mov	w0, #20
	bl	_msleep
	ldr	x8, [x19]
	add	x0, x8, #8
	mov	x1, sp
	mov	w2, #1
	bl	_cxusb_i2c_xfer
	cmp	w0, #1
	b.ne	LBB0_23
; %bb.13:
	ldp	w8, w9, [sp, #24]
	orr	w8, w8, w9
	cbz	w8, LBB0_15
; %bb.14:
	ldp	w8, w9, [sp, #32]
	add	w8, w9, w8
	cmp	w8, #255
	b.ne	LBB0_23
LBB0_15:
	ldr	x8, [x19]
	ldr	x8, [x8]
	cbz	x8, LBB0_24
; %bb.16:
	mov	w0, #20
	bl	_msleep
	ldr	x8, [x19]
	add	x0, x8, #8
	mov	x1, sp
	mov	w2, #1
	bl	_cxusb_i2c_xfer
	cmp	w0, #1
	b.ne	LBB0_23
; %bb.17:
	ldp	w8, w9, [sp, #24]
	orr	w8, w8, w9
	cbz	w8, LBB0_19
; %bb.18:
	ldp	w8, w9, [sp, #32]
	add	w8, w9, w8
	cmp	w8, #255
	b.ne	LBB0_23
LBB0_19:
	ldr	x8, [x19]
	ldr	x8, [x8]
	cbz	x8, LBB0_24
; %bb.20:
	mov	w0, #20
	bl	_msleep
	ldr	x8, [x19]
	add	x0, x8, #8
	mov	x1, sp
	mov	w2, #1
	bl	_cxusb_i2c_xfer
	cmp	w0, #1
	b.ne	LBB0_23
; %bb.21:
	ldp	w8, w9, [sp, #24]
	orr	w8, w8, w9
	cbz	w8, LBB0_24
; %bb.22:
	ldp	w8, w9, [sp, #32]
	add	w8, w9, w8
	cmp	w8, #255
	b.eq	LBB0_24
LBB0_23:
	ldr	x8, [x19]
	str	xzr, [x8]
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_info
LBB0_24:
	mov	w0, #0
	b	LBB0_26
LBB0_25:
Lloh18:
	adrp	x8, _EIO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_26:
	ldur	x8, [x29, #-24]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_28
; %bb.27:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_28:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set interface failed"

	.comm	_CMD_DIGITAL,4,2                ; @CMD_DIGITAL
	.comm	_zl10353_attach,4,2             ; @zl10353_attach
	.comm	_cxusb_zl10353_xc3028_config_no_i2c_gate,4,2 ; @cxusb_zl10353_xc3028_config_no_i2c_gate
	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"No IR receiver detected on this device."

	.no_dead_strip	_cxusb_dualdig4_frontend_attach
.subsections_via_symbols
