	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function imon_init_intf1
_imon_init_intf1:                       ## @imon_init_intf1
	.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	%rsi, %r12
	movq	%rdi, %r13
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	callq	_usb_alloc_urb
	testq	%rax, %rax
	je	LBB0_11
## %bb.1:
	movq	%rax, %r14
	leaq	16(%r12), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	(%r12), %rax
	movq	_IMON_DISPLAY_TYPE_VGA@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	jne	LBB0_3
## %bb.2:
	leaq	52(%r12), %rdi
	movq	_imon_touch_display_timeout@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_timer_setup
LBB0_3:
	movq	%r13, %rdi
	callq	_interface_to_usbdev
	movl	%eax, %edi
	callq	_usb_get_dev
	movl	%eax, 20(%r12)
	movq	%r14, 32(%r12)
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	(%r13), %rsi
	movq	%r12, %rdi
	callq	_imon_find_endpoints
	testl	%eax, %eax
	je	LBB0_10
## %bb.4:
	movq	(%r12), %rax
	cmpq	(%r15), %rax
	jne	LBB0_6
## %bb.5:
	movq	%r12, %rdi
	callq	_imon_init_touch
	movq	%rax, 24(%r12)
	testq	%rax, %rax
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	jne	LBB0_7
	jmp	LBB0_10
LBB0_6:
	movq	$0, 24(%r12)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
LBB0_7:
	movq	32(%r12), %r13
	movl	20(%r12), %ebx
	movq	40(%r12), %rax
	movl	4(%rax), %esi
	movl	%ebx, %edi
	callq	_usb_rcvintpipe
	movl	48(%r12), %ecx
	movq	_usb_rx_callback_intf1@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r9d
	movq	40(%r12), %rdx
	movl	(%rdx), %r10d
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	movl	$4, %r8d
	pushq	%r10
	pushq	%r12
	callq	_usb_fill_int_urb
	addq	$16, %rsp
	movq	32(%r12), %rdi
	movl	(%r15), %esi
	callq	_usb_submit_urb
	testl	%eax, %eax
	je	LBB0_13
## %bb.8:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_err
	movq	24(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.9:
	callq	_input_unregister_device
LBB0_10:
	movl	20(%r12), %edi
	callq	_usb_put_dev
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movq	%r14, %rdi
	callq	_usb_free_urb
LBB0_11:
	movl	12(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_err
	xorl	%r12d, %r12d
LBB0_12:
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movl	$1, 8(%r12)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_IMON_DISPLAY_TYPE_VGA,8,3      ## @IMON_DISPLAY_TYPE_VGA
	.comm	_imon_touch_display_timeout,4,2 ## @imon_touch_display_timeout
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_usb_rx_callback_intf1,4,2      ## @usb_rx_callback_intf1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"usb_submit_urb failed for intf1 (%d)\n"

L_.str.1:                               ## @.str.1
	.asciz	"unable to initialize intf1, err %d\n"

	.no_dead_strip	_imon_init_intf1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function imon_init_intf1
_imon_init_intf1:                       ; @imon_init_intf1
	.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
	mov	x19, x1
	mov	x23, x0
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
Lloh3:
	adrp	x24, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x24, [x24, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	w0, #0
	bl	_usb_alloc_urb
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
	add	x21, x19, #16
	mov	x0, x21
	bl	_mutex_lock
	ldr	x8, [x19]
Lloh5:
	adrp	x25, _IMON_DISPLAY_TYPE_VGA@GOTPAGE
Lloh6:
	ldr	x25, [x25, _IMON_DISPLAY_TYPE_VGA@GOTPAGEOFF]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	add	x0, x19, #52
Lloh7:
	adrp	x8, _imon_touch_display_timeout@GOTPAGE
Lloh8:
	ldr	x8, [x8, _imon_touch_display_timeout@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_timer_setup
LBB0_3:
	mov	x0, x23
	bl	_interface_to_usbdev
	bl	_usb_get_dev
	str	w0, [x19, #20]
	str	x20, [x19, #32]
Lloh10:
	adrp	x8, _ENODEV@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w22, w8
	ldr	x1, [x23]
	mov	x0, x19
	bl	_imon_find_endpoints
	cbz	w0, LBB0_11
; %bb.4:
	ldr	x8, [x19]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.5:
	mov	x0, x19
	bl	_imon_init_touch
	str	x0, [x19, #24]
	cbnz	x0, LBB0_8
	b	LBB0_11
LBB0_6:
	neg	w22, w21
	b	LBB0_12
LBB0_7:
	str	xzr, [x19, #24]
LBB0_8:
	ldr	w22, [x19, #20]
	ldp	x23, x8, [x19, #32]
	ldr	w1, [x8, #4]
	mov	x0, x22
	bl	_usb_rcvintpipe
	mov	x2, x0
	ldr	w3, [x19, #48]
Lloh13:
	adrp	x8, _usb_rx_callback_intf1@GOTPAGE
Lloh14:
	ldr	x8, [x8, _usb_rx_callback_intf1@GOTPAGEOFF]
Lloh15:
	ldr	w5, [x8]
	ldr	x8, [x19, #40]
	ldr	w7, [x8]
	mov	x0, x23
	mov	x1, x22
	mov	w4, #4
	mov	x6, x19
	bl	_usb_fill_int_urb
	ldr	x0, [x19, #32]
	ldr	w1, [x24]
	bl	_usb_submit_urb
	cbz	w0, LBB0_14
; %bb.9:
	mov	x22, x0
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_pr_err
	ldr	x0, [x19, #24]
	cbz	x0, LBB0_11
; %bb.10:
	bl	_input_unregister_device
LBB0_11:
	ldr	w0, [x19, #20]
	bl	_usb_put_dev
	mov	x0, x21
	bl	_mutex_unlock
	mov	x0, x20
	bl	_usb_free_urb
LBB0_12:
	ldr	w0, [x19, #12]
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x22
	bl	_dev_err
	mov	x19, #0
LBB0_13:
	mov	x0, x19
	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_14:
	mov	w8, #1
	str	w8, [x19, #8]
	mov	x0, x21
	bl	_mutex_unlock
	b	LBB0_13
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_IMON_DISPLAY_TYPE_VGA,8,3      ; @IMON_DISPLAY_TYPE_VGA
	.comm	_imon_touch_display_timeout,4,2 ; @imon_touch_display_timeout
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_usb_rx_callback_intf1,4,2      ; @usb_rx_callback_intf1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"usb_submit_urb failed for intf1 (%d)\n"

l_.str.1:                               ; @.str.1
	.asciz	"unable to initialize intf1, err %d\n"

	.no_dead_strip	_imon_init_intf1
.subsections_via_symbols
