	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function streamzap_init_rc_dev
_streamzap_init_rc_dev:                 ## @streamzap_init_rc_dev
	.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, %rbx
	movq	16(%rdi), %r14
	movq	_RC_DRIVER_IR_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_rc_allocate_device
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	12(%rbx), %r12d
	movq	(%rbx), %rax
	movl	4(%rax), %edi
	callq	_le16_to_cpu
	movl	%eax, %r13d
	movq	(%rbx), %rax
	movl	(%rax), %edi
	callq	_le16_to_cpu
	leaq	L_.str.1(%rip), %rdx
	movl	%r12d, %edi
	movl	$4, %esi
	movl	%r13d, %ecx
	movl	%eax, %r8d
	callq	_snprintf
	movq	(%rbx), %rdi
	movl	8(%rbx), %esi
	movl	$4, %edx
	callq	_usb_make_path
	movl	8(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	$4, %edx
	callq	_strlcat
	movl	12(%rbx), %eax
	movl	%eax, 40(%r15)
	movl	8(%rbx), %eax
	movl	%eax, 36(%r15)
	movq	(%rbx), %rdi
	movq	%r15, %rsi
	addq	$32, %rsi
	callq	_usb_to_input_id
	movq	%r14, 24(%r15)
	movq	%rbx, 16(%r15)
	movq	_RC_PROTO_BIT_ALL_IR_DECODER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	movq	_DRIVER_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r15)
	movq	_RC_MAP_STREAMZAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movq	%r15, %rdi
	callq	_rc_register_device
	testl	%eax, %eax
	jns	LBB0_5
## %bb.3:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_4
LBB0_1:
	leaq	L_.str(%rip), %rsi
LBB0_4:
	movq	%r14, %rdi
	callq	_dev_err
	movq	%r15, %rdi
	callq	_rc_free_device
	xorl	%r15d, %r15d
LBB0_5:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RC_DRIVER_IR_RAW,4,2           ## @RC_DRIVER_IR_RAW
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"remote dev allocation failed\n"

L_.str.1:                               ## @.str.1
	.asciz	"Streamzap PC Remote Infrared Receiver (%04x:%04x)"

L_.str.2:                               ## @.str.2
	.asciz	"/input0"

	.comm	_RC_PROTO_BIT_ALL_IR_DECODER,4,2 ## @RC_PROTO_BIT_ALL_IR_DECODER
	.comm	_DRIVER_NAME,4,2                ## @DRIVER_NAME
	.comm	_RC_MAP_STREAMZAP,4,2           ## @RC_MAP_STREAMZAP
L_.str.3:                               ## @.str.3
	.asciz	"remote input device register failed\n"

	.no_dead_strip	_streamzap_init_rc_dev
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function streamzap_init_rc_dev
_streamzap_init_rc_dev:                 ; @streamzap_init_rc_dev
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x0
	ldr	x20, [x0, #16]
Lloh0:
	adrp	x8, _RC_DRIVER_IR_RAW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RC_DRIVER_IR_RAW@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_rc_allocate_device
	mov	x19, x0
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w22, [x21, #12]
	ldr	x8, [x21]
	ldr	w0, [x8, #4]
	bl	_le16_to_cpu
	mov	x23, x0
	ldr	x8, [x21]
	ldr	w0, [x8]
	bl	_le16_to_cpu
	mov	x4, x0
Lloh3:
	adrp	x2, l_.str.1@PAGE
Lloh4:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x22
	mov	w1, #4
	mov	x3, x23
	bl	_snprintf
	ldr	x0, [x21]
	ldr	w1, [x21, #8]
	mov	w2, #4
	bl	_usb_make_path
	ldr	w0, [x21, #8]
Lloh5:
	adrp	x1, l_.str.2@PAGE
Lloh6:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w2, #4
	bl	_strlcat
	ldr	d0, [x21, #8]
	stur	d0, [x19, #36]
	ldr	x0, [x21]
	add	x1, x19, #32
	bl	_usb_to_input_id
	stp	x21, x20, [x19, #16]
Lloh7:
	adrp	x8, _RC_PROTO_BIT_ALL_IR_DECODER@GOTPAGE
Lloh8:
	ldr	x8, [x8, _RC_PROTO_BIT_ALL_IR_DECODER@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x19, #8]
Lloh10:
	adrp	x8, _DRIVER_NAME@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DRIVER_NAME@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _RC_MAP_STREAMZAP@GOTPAGE
Lloh14:
	ldr	x9, [x9, _RC_MAP_STREAMZAP@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	stp	w9, w8, [x19]
	mov	x0, x19
	bl	_rc_register_device
	tbz	w0, #31, LBB0_5
; %bb.2:
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_4
LBB0_3:
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
LBB0_4:
	mov	x0, x20
	bl	_dev_err
	mov	x0, x19
	bl	_rc_free_device
	mov	x19, #0
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_RC_DRIVER_IR_RAW,4,2           ; @RC_DRIVER_IR_RAW
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"remote dev allocation failed\n"

l_.str.1:                               ; @.str.1
	.asciz	"Streamzap PC Remote Infrared Receiver (%04x:%04x)"

l_.str.2:                               ; @.str.2
	.asciz	"/input0"

	.comm	_RC_PROTO_BIT_ALL_IR_DECODER,4,2 ; @RC_PROTO_BIT_ALL_IR_DECODER
	.comm	_DRIVER_NAME,4,2                ; @DRIVER_NAME
	.comm	_RC_MAP_STREAMZAP,4,2           ; @RC_MAP_STREAMZAP
l_.str.3:                               ; @.str.3
	.asciz	"remote input device register failed\n"

	.no_dead_strip	_streamzap_init_rc_dev
.subsections_via_symbols
