	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ati_remote_initialize
_ati_remote_initialize:                 ## @ati_remote_initialize
	.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	72(%rdi), %r14
	addq	$68, %rdi
	callq	_init_waitqueue_head
	movq	56(%rbx), %rax
	movl	4(%rax), %esi
	movq	%r14, %rdi
	callq	_usb_rcvintpipe
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_usb_pipeout
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_usb_maxpacket
	movq	_DATA_BUFSIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %r8d
	cmpl	%r8d, %eax
	cmovll	%eax, %r8d
	movl	64(%rbx), %ecx
	movq	_ati_remote_irq_in@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	40(%rbx), %rdi
	movq	56(%rbx), %rax
	movl	(%rax), %eax
	movq	%r14, %rsi
	movl	%r15d, %edx
	pushq	%rax
	pushq	%rbx
	callq	_usb_fill_int_urb
	addq	$16, %rsp
	movl	48(%rbx), %eax
	movq	40(%rbx), %rcx
	movl	%eax, 4(%rcx)
	movq	_URB_NO_TRANSFER_DMA_MAP@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	orl	%eax, (%rcx)
	movq	24(%rbx), %rax
	movl	4(%rax), %esi
	movq	%r14, %rdi
	callq	_usb_sndintpipe
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_usb_pipeout
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_usb_maxpacket
	movl	(%r12), %r8d
	cmpl	%r8d, %eax
	cmovll	%eax, %r8d
	movl	32(%rbx), %ecx
	movq	_ati_remote_irq_out@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	8(%rbx), %rdi
	movq	24(%rbx), %rax
	movl	(%rax), %eax
	movq	%r14, %rsi
	movl	%r15d, %edx
	pushq	%rax
	pushq	%rbx
	callq	_usb_fill_int_urb
	addq	$16, %rsp
	movl	16(%rbx), %eax
	movq	8(%rbx), %rcx
	movl	%eax, 4(%rcx)
	movl	(%r13), %eax
	orl	%eax, (%rcx)
	movq	_init1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$32772, %esi                    ## imm = 0x8004
	callq	_ati_remote_sendpacket
	testq	%rax, %rax
	jne	LBB0_3
## %bb.1:
	movq	_init2@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$32775, %esi                    ## imm = 0x8007
	callq	_ati_remote_sendpacket
	testq	%rax, %rax
	je	LBB0_2
LBB0_3:
	movq	(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	xorl	%eax, %eax
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_DATA_BUFSIZE,4,2               ## @DATA_BUFSIZE
	.comm	_ati_remote_irq_in,4,2          ## @ati_remote_irq_in
	.comm	_URB_NO_TRANSFER_DMA_MAP,4,2    ## @URB_NO_TRANSFER_DMA_MAP
	.comm	_ati_remote_irq_out,4,2         ## @ati_remote_irq_out
	.comm	_init1,4,2                      ## @init1
	.comm	_init2,4,2                      ## @init2
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Initializing ati_remote hardware failed.\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_ati_remote_initialize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ati_remote_initialize
_ati_remote_initialize:                 ; @ati_remote_initialize
	.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	x19, x0
	ldr	x20, [x0, #72]
	add	x0, x0, #68
	bl	_init_waitqueue_head
	ldr	x8, [x19, #56]
	ldr	w1, [x8, #4]
	mov	x0, x20
	bl	_usb_rcvintpipe
	mov	x21, x0
	bl	_usb_pipeout
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_usb_maxpacket
Lloh0:
	adrp	x22, _DATA_BUFSIZE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _DATA_BUFSIZE@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w0, w8
	csel	w4, w0, w8, lt
	ldr	x0, [x19, #40]
	ldr	w3, [x19, #64]
Lloh2:
	adrp	x8, _ati_remote_irq_in@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ati_remote_irq_in@GOTPAGEOFF]
Lloh4:
	ldr	w5, [x8]
	ldr	x8, [x19, #56]
	ldr	w7, [x8]
	mov	x1, x20
	mov	x2, x21
	mov	x6, x19
	bl	_usb_fill_int_urb
	ldr	w8, [x19, #48]
	ldr	x9, [x19, #40]
Lloh5:
	adrp	x23, _URB_NO_TRANSFER_DMA_MAP@GOTPAGE
Lloh6:
	ldr	x23, [x23, _URB_NO_TRANSFER_DMA_MAP@GOTPAGEOFF]
	ldr	w10, [x23]
	ldr	w11, [x9]
	orr	w10, w11, w10
	stp	w10, w8, [x9]
	ldr	x8, [x19, #24]
	ldr	w1, [x8, #4]
	mov	x0, x20
	bl	_usb_sndintpipe
	mov	x21, x0
	bl	_usb_pipeout
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_usb_maxpacket
	ldr	w8, [x22]
	cmp	w0, w8
	csel	w4, w0, w8, lt
	ldr	x0, [x19, #8]
	ldr	w3, [x19, #32]
Lloh7:
	adrp	x8, _ati_remote_irq_out@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ati_remote_irq_out@GOTPAGEOFF]
Lloh9:
	ldr	w5, [x8]
	ldr	x8, [x19, #24]
	ldr	w7, [x8]
	mov	x1, x20
	mov	x2, x21
	mov	x6, x19
	bl	_usb_fill_int_urb
	ldr	w8, [x19, #16]
	ldr	x9, [x19, #8]
	ldr	w10, [x23]
	ldr	w11, [x9]
	orr	w10, w11, w10
	stp	w10, w8, [x9]
Lloh10:
	adrp	x8, _init1@GOTPAGE
Lloh11:
	ldr	x8, [x8, _init1@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #32772
	bl	_ati_remote_sendpacket
	cbnz	x0, LBB0_2
; %bb.1:
Lloh13:
	adrp	x8, _init2@GOTPAGE
Lloh14:
	ldr	x8, [x8, _init2@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #32775
	bl	_ati_remote_sendpacket
	cbz	x0, LBB0_3
LBB0_2:
	ldr	x0, [x19]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh18:
	adrp	x8, _EIO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_DATA_BUFSIZE,4,2               ; @DATA_BUFSIZE
	.comm	_ati_remote_irq_in,4,2          ; @ati_remote_irq_in
	.comm	_URB_NO_TRANSFER_DMA_MAP,4,2    ; @URB_NO_TRANSFER_DMA_MAP
	.comm	_ati_remote_irq_out,4,2         ; @ati_remote_irq_out
	.comm	_init1,4,2                      ; @init1
	.comm	_init2,4,2                      ; @init2
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Initializing ati_remote hardware failed.\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_ati_remote_initialize
.subsections_via_symbols
