Program: indirect-test

x86 assembly:
	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_foo                            ## -- Begin function foo
	.p2align	4, 0x90
_foo:                                   ## @foo
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	imull	-4(%rbp), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.globl	_bar                            ## -- Begin function bar
	.p2align	4, 0x90
_bar:                                   ## @bar
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	_aglobal(%rip), %edi
	callq	*%rax
	movl	%eax, _aglobal(%rip)
	movl	_aglobal(%rip), %eax
                                        ## kill: def $rax killed $eax
                                        ## kill: def $eax killed $eax killed $rax
	andl	$7, %eax
                                        ## kill: def $rax killed $eax
	movq	%rax, -16(%rbp)                 ## 8-byte Spill
	subl	$4, %eax
	ja	LBB1_6
## %bb.8:
	movq	-16(%rbp), %rax                 ## 8-byte Reload
	leaq	LJTI1_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB1_1:
	movl	_aglobal(%rip), %eax
	addl	$1, %eax
	movl	%eax, _aglobal(%rip)
	jmp	LBB1_7
LBB1_2:
	movl	_aglobal(%rip), %eax
	addl	$-1, %eax
	movl	%eax, _aglobal(%rip)
	jmp	LBB1_7
LBB1_3:
	movl	_aglobal(%rip), %eax
	shll	$1, %eax
	movl	%eax, _aglobal(%rip)
	jmp	LBB1_7
LBB1_4:
	movl	_aglobal(%rip), %eax
	movl	$2, %ecx
	cltd
	idivl	%ecx
	movl	%eax, _aglobal(%rip)
	jmp	LBB1_7
LBB1_5:
	movl	_aglobal(%rip), %eax
	movl	$2, %ecx
	cltd
	idivl	%ecx
	movl	%edx, _aglobal(%rip)
	jmp	LBB1_7
LBB1_6:
	xorl	%eax, %eax
	subl	_aglobal(%rip), %eax
	movl	%eax, _aglobal(%rip)
LBB1_7:
	addq	$16, %rsp
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L1_0_set_1, LBB1_1-LJTI1_0
.set L1_0_set_2, LBB1_2-LJTI1_0
.set L1_0_set_3, LBB1_3-LJTI1_0
.set L1_0_set_4, LBB1_4-LJTI1_0
.set L1_0_set_5, LBB1_5-LJTI1_0
LJTI1_0:
	.long	L1_0_set_1
	.long	L1_0_set_2
	.long	L1_0_set_3
	.long	L1_0_set_4
	.long	L1_0_set_5
	.end_data_region
                                        ## -- End function
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$16, %rsp
	movl	$0, -4(%rbp)
	leaq	_foo(%rip), %rax
	movq	%rax, -16(%rbp)
	movq	_pbar(%rip), %rax
	movq	-16(%rbp), %rdi
	callq	*%rax
	movq	_pbar(%rip), %rax
	movq	-16(%rbp), %rdi
	callq	*%rax
	movq	_pbar(%rip), %rax
	movq	-16(%rbp), %rdi
	callq	*%rax
	movl	_aglobal(%rip), %esi
	leaq	L_.str(%rip), %rdi
	movb	$0, %al
	callq	_libmin_printf
	callq	_libmin_success
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__DATA,__data
	.globl	_aglobal                        ## @aglobal
	.p2align	2
_aglobal:
	.long	56                              ## 0x38

	.globl	_pbar                           ## @pbar
	.p2align	3
_pbar:
	.quad	_bar

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"aglobal = %d\n"

.subsections_via_symbols


ARM64 assembly:
	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_foo                            ; -- Begin function foo
	.p2align	2
_foo:                                   ; @foo
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #16
	.cfi_def_cfa_offset 16
	str	w0, [sp, #12]
	ldr	w8, [sp, #12]
	ldr	w9, [sp, #12]
	mul	w0, w8, w9
	add	sp, sp, #16
	ret
	.cfi_endproc
                                        ; -- End function
	.globl	_bar                            ; -- Begin function bar
	.p2align	2
_bar:                                   ; @bar
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	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
	stur	x0, [x29, #-8]
	ldur	x8, [x29, #-8]
	adrp	x9, _aglobal@PAGE
	str	x9, [sp, #8]                    ; 8-byte Folded Spill
	ldr	w0, [x9, _aglobal@PAGEOFF]
	blr	x8
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	str	w0, [x8, _aglobal@PAGEOFF]
	ldr	w8, [x8, _aglobal@PAGEOFF]
	and	w8, w8, #0x7
	subs	w8, w8, #0
                                        ; kill: def $x8 killed $w8
	str	x8, [sp, #16]                   ; 8-byte Folded Spill
	subs	x8, x8, #4
	cset	w8, hi
	tbnz	w8, #0, LBB1_7
; %bb.1:
	ldr	x11, [sp, #16]                  ; 8-byte Folded Reload
	adrp	x10, lJTI1_0@PAGE
	add	x10, x10, lJTI1_0@PAGEOFF
Ltmp1:
	adr	x8, Ltmp1
	ldrsw	x9, [x10, x11, lsl #2]
	add	x8, x8, x9
	br	x8
LBB1_2:
	adrp	x9, _aglobal@PAGE
	ldr	w8, [x9, _aglobal@PAGEOFF]
	add	w8, w8, #1
	str	w8, [x9, _aglobal@PAGEOFF]
	b	LBB1_8
LBB1_3:
	adrp	x9, _aglobal@PAGE
	ldr	w8, [x9, _aglobal@PAGEOFF]
	subs	w8, w8, #1
	str	w8, [x9, _aglobal@PAGEOFF]
	b	LBB1_8
LBB1_4:
	adrp	x9, _aglobal@PAGE
	ldr	w8, [x9, _aglobal@PAGEOFF]
	lsl	w8, w8, #1
	str	w8, [x9, _aglobal@PAGEOFF]
	b	LBB1_8
LBB1_5:
	adrp	x9, _aglobal@PAGE
	ldr	w8, [x9, _aglobal@PAGEOFF]
	mov	w10, #2
	sdiv	w8, w8, w10
	str	w8, [x9, _aglobal@PAGEOFF]
	b	LBB1_8
LBB1_6:
	adrp	x9, _aglobal@PAGE
	ldr	w8, [x9, _aglobal@PAGEOFF]
	mov	w11, #2
	sdiv	w10, w8, w11
	mul	w10, w10, w11
	subs	w8, w8, w10
	str	w8, [x9, _aglobal@PAGEOFF]
	b	LBB1_8
LBB1_7:
	adrp	x9, _aglobal@PAGE
	ldr	w10, [x9, _aglobal@PAGEOFF]
	mov	w8, #0
	subs	w8, w8, w10
	str	w8, [x9, _aglobal@PAGEOFF]
	b	LBB1_8
LBB1_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.cfi_endproc
	.p2align	2
lJTI1_0:
	.long	LBB1_2-Ltmp1
	.long	LBB1_3-Ltmp1
	.long	LBB1_4-Ltmp1
	.long	LBB1_5-Ltmp1
	.long	LBB1_6-Ltmp1
                                        ; -- End function
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	w8, #0
	stur	w8, [x29, #-20]                 ; 4-byte Folded Spill
	stur	wzr, [x29, #-4]
	adrp	x8, _foo@PAGE
	add	x8, x8, _foo@PAGEOFF
	stur	x8, [x29, #-16]
	adrp	x8, _pbar@PAGE
	str	x8, [sp, #16]                   ; 8-byte Folded Spill
	ldr	x8, [x8, _pbar@PAGEOFF]
	ldur	x0, [x29, #-16]
	blr	x8
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	ldr	x8, [x8, _pbar@PAGEOFF]
	ldur	x0, [x29, #-16]
	blr	x8
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	ldr	x8, [x8, _pbar@PAGEOFF]
	ldur	x0, [x29, #-16]
	blr	x8
	adrp	x8, _aglobal@PAGE
	ldr	w9, [x8, _aglobal@PAGEOFF]
                                        ; implicit-def: $x8
	mov	x8, x9
	mov	x9, sp
	str	x8, [x9]
	adrp	x0, l_.str@PAGE
	add	x0, x0, l_.str@PAGEOFF
	bl	_libmin_printf
	bl	_libmin_success
	ldur	w0, [x29, #-20]                 ; 4-byte Folded Reload
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__data
	.globl	_aglobal                        ; @aglobal
	.p2align	2
_aglobal:
	.long	56                              ; 0x38

	.globl	_pbar                           ; @pbar
	.p2align	3
_pbar:
	.quad	_bar

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"aglobal = %d\n"

.subsections_via_symbols