	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gsc_hw_set_global_alpha        ## -- Begin function gsc_hw_set_global_alpha
	.p2align	4, 0x90
_gsc_hw_set_global_alpha:               ## @gsc_hw_set_global_alpha
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movq	16(%rdi), %r15
	movl	(%rax), %edi
	callq	_is_rgb
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_GSC_OUT_CON@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	(%r15), %rdi
	callq	_readl
	movq	_GSC_OUT_GLOBAL_ALPHA_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	notl	%ebx
	andl	%eax, %ebx
	movq	(%r14), %rax
	movl	(%rax), %edi
	callq	_GSC_OUT_GLOBAL_ALPHA
	orl	%eax, %ebx
	movq	(%r12), %rsi
	addq	(%r15), %rsi
	movl	%ebx, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
LBB0_1:
	leaq	L_.str(%rip), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pr_debug                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Not a RGB format"

	.comm	_GSC_OUT_CON,8,3                ## @GSC_OUT_CON
	.comm	_GSC_OUT_GLOBAL_ALPHA_MASK,4,2  ## @GSC_OUT_GLOBAL_ALPHA_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gsc_hw_set_global_alpha        ; -- Begin function gsc_hw_set_global_alpha
	.p2align	2
_gsc_hw_set_global_alpha:               ; @gsc_hw_set_global_alpha
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldp	x8, x20, [x0, #8]
	ldr	w0, [x8]
	bl	_is_rgb
	cbz	w0, LBB0_2
; %bb.1:
	ldr	x8, [x20]
Lloh0:
	adrp	x21, _GSC_OUT_CON@GOTPAGE
Lloh1:
	ldr	x21, [x21, _GSC_OUT_CON@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_readl
Lloh2:
	adrp	x8, _GSC_OUT_GLOBAL_ALPHA_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GSC_OUT_GLOBAL_ALPHA_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	bic	w22, w0, w8
	ldr	x8, [x19]
	ldr	w0, [x8]
	bl	_GSC_OUT_GLOBAL_ALPHA
	orr	w0, w0, w22
	ldr	x8, [x20]
	ldr	x9, [x21]
	add	x1, x9, x8
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_writel
LBB0_2:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_pr_debug
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Not a RGB format"

	.comm	_GSC_OUT_CON,8,3                ; @GSC_OUT_CON
	.comm	_GSC_OUT_GLOBAL_ALPHA_MASK,4,2  ; @GSC_OUT_GLOBAL_ALPHA_MASK
.subsections_via_symbols
