Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .file "example.c"
- .text
- .Ltext0:
- .globl integerOperation
- .type integerOperation, @function
- integerOperation:
- .LFB0:
- .file 1 "/tmp/gcc-explorer-compiler117812-1939-14s5zlb/example.c"
- .loc 1 3 0
- .cfi_startproc
- pushq %rbp
- .cfi_def_cfa_offset 16
- .cfi_offset 6, -16
- movq %rsp, %rbp
- .cfi_def_cfa_register 6
- movl %edi, -4(%rbp)
- movl %esi, -8(%rbp)
- movl %edx, %eax
- movb %al, -12(%rbp)
- .loc 1 4 0
- movsbl -12(%rbp), %eax
- subl $37, %eax
- cmpl $10, %eax
- ja .L2
- movl %eax, %eax
- movq .L4(,%rax,8), %rax
- jmp *%rax
- .section .rodata
- .align 8
- .align 4
- .L4:
- .quad .L3
- .quad .L2
- .quad .L2
- .quad .L2
- .quad .L2
- .quad .L5
- .quad .L6
- .quad .L2
- .quad .L7
- .quad .L2
- .quad .L8
- .text
- .L6:
- .loc 1 6 0
- movl -8(%rbp), %eax
- movl -4(%rbp), %edx
- addl %edx, %eax
- jmp .L9
- .L7:
- .loc 1 8 0
- movl -8(%rbp), %eax
- movl -4(%rbp), %edx
- subl %eax, %edx
- movl %edx, %eax
- jmp .L9
- .L5:
- .loc 1 10 0
- movl -4(%rbp), %eax
- imull -8(%rbp), %eax
- jmp .L9
- .L8:
- .loc 1 12 0
- movl -4(%rbp), %eax
- cltd
- idivl -8(%rbp)
- jmp .L9
- .L3:
- .loc 1 14 0
- movl -4(%rbp), %eax
- cltd
- idivl -8(%rbp)
- movl %edx, %eax
- jmp .L9
- .L2:
- .loc 1 16 0
- movl $0, %eax
- .L9:
- .loc 1 18 0
- popq %rbp
- .cfi_def_cfa 7, 8
- ret
- .cfi_endproc
- .LFE0:
- .size integerOperation, .-integerOperation
- .globl doubleOperation
- .type doubleOperation, @function
- doubleOperation:
- .LFB1:
- .loc 1 20 0
- .cfi_startproc
- pushq %rbp
- .cfi_def_cfa_offset 16
- .cfi_offset 6, -16
- movq %rsp, %rbp
- .cfi_def_cfa_register 6
- movsd %xmm0, -8(%rbp)
- movsd %xmm1, -16(%rbp)
- movl %edi, %eax
- movb %al, -20(%rbp)
- .loc 1 21 0
- movsbl -20(%rbp), %eax
- cmpl $43, %eax
- je .L12
- cmpl $43, %eax
- jg .L13
- cmpl $42, %eax
- je .L14
- jmp .L11
- .L13:
- cmpl $45, %eax
- je .L15
- cmpl $47, %eax
- je .L16
- jmp .L11
- .L12:
- .loc 1 23 0
- movsd -8(%rbp), %xmm0
- addsd -16(%rbp), %xmm0
- jmp .L17
- .L15:
- .loc 1 25 0
- movsd -8(%rbp), %xmm0
- subsd -16(%rbp), %xmm0
- jmp .L17
- .L14:
- .loc 1 27 0
- movsd -8(%rbp), %xmm0
- mulsd -16(%rbp), %xmm0
- jmp .L17
- .L16:
- .loc 1 29 0
- movsd -8(%rbp), %xmm0
- divsd -16(%rbp), %xmm0
- jmp .L17
- .L11:
- .loc 1 31 0
- xorpd %xmm0, %xmm0
- .L17:
- movsd %xmm0, -32(%rbp)
- movq -32(%rbp), %rax
- .loc 1 33 0
- movq %rax, -32(%rbp)
- movsd -32(%rbp), %xmm0
- popq %rbp
- .cfi_def_cfa 7, 8
- ret
- .cfi_endproc
- .LFE1:
- .size doubleOperation, .-doubleOperation
- .section .rodata
- .align 8
- .LC1:
- .string "1) Print author info\n2) Run Integer operation\n3) Run floating point operation\n4) Exit"
- .LC2:
- .string "%d"
- .align 8
- .LC3:
- .string "Benjamin 'The Coding Goblin' Simon\n2685814"
- .LC4:
- .string "Enter an operation:"
- .LC5:
- .string "%d%c%d"
- .LC6:
- .string "%d %c %d = %lf\n"
- .LC7:
- .string "%lf%c%lf"
- .LC8:
- .string "%lf %c %lf = %lf\n"
- .text
- .globl main
- .type main, @function
- main:
- .LFB2:
- .loc 1 35 0
- .cfi_startproc
- pushq %rbp
- .cfi_def_cfa_offset 16
- .cfi_offset 6, -16
- movq %rsp, %rbp
- .cfi_def_cfa_register 6
- subq $64, %rsp
- .loc 1 41 0
- movl $.LC1, %edi
- call puts
- .loc 1 42 0
- leaq -28(%rbp), %rax
- movq %rax, %rsi
- movl $.LC2, %edi
- movl $0, %eax
- call __isoc99_scanf
- .loc 1 44 0
- movl -28(%rbp), %eax
- cmpl $2, %eax
- je .L20
- cmpl $2, %eax
- jg .L21
- cmpl $1, %eax
- je .L22
- .loc 1 68 0
- jmp .L25
- .L21:
- .loc 1 44 0
- cmpl $3, %eax
- je .L23
- cmpl $4, %eax
- je .L24
- .loc 1 68 0
- jmp .L25
- .L22:
- .loc 1 46 0
- movl $.LC3, %edi
- call puts
- .loc 1 47 0
- jmp .L25
- .L20:
- .loc 1 49 0
- movl $.LC4, %edi
- call puts
- .loc 1 50 0
- leaq -32(%rbp), %rcx
- leaq -37(%rbp), %rdx
- leaq -36(%rbp), %rax
- movq %rax, %rsi
- movl $.LC5, %edi
- movl $0, %eax
- call __isoc99_scanf
- .loc 1 52 0
- movzbl -37(%rbp), %eax
- movsbl %al, %edx
- movl -32(%rbp), %ecx
- movl -36(%rbp), %eax
- movl %ecx, %esi
- movl %eax, %edi
- call integerOperation
- cvtsi2sd %eax, %xmm0
- movsd %xmm0, -8(%rbp)
- .loc 1 54 0
- movl -32(%rbp), %ecx
- movzbl -37(%rbp), %eax
- movsbl %al, %edx
- movl -36(%rbp), %esi
- movq -8(%rbp), %rax
- movq %rax, -56(%rbp)
- movsd -56(%rbp), %xmm0
- movl $.LC6, %edi
- movl $1, %eax
- call printf
- .loc 1 55 0
- jmp .L25
- .L23:
- .loc 1 57 0
- movl $.LC4, %edi
- call puts
- .loc 1 58 0
- leaq -16(%rbp), %rcx
- leaq -37(%rbp), %rdx
- leaq -24(%rbp), %rax
- movq %rax, %rsi
- movl $.LC7, %edi
- movl $0, %eax
- call __isoc99_scanf
- .loc 1 60 0
- movzbl -37(%rbp), %eax
- movsbl %al, %ecx
- movq -16(%rbp), %rdx
- movq -24(%rbp), %rax
- movl %ecx, %edi
- movq %rdx, -56(%rbp)
- movsd -56(%rbp), %xmm1
- movq %rax, -56(%rbp)
- movsd -56(%rbp), %xmm0
- call doubleOperation
- movsd %xmm0, -56(%rbp)
- movq -56(%rbp), %rax
- movq %rax, -8(%rbp)
- .loc 1 62 0
- movq -16(%rbp), %rdx
- movzbl -37(%rbp), %eax
- movsbl %al, %esi
- movq -24(%rbp), %rax
- movq -8(%rbp), %rcx
- movq %rcx, -56(%rbp)
- movsd -56(%rbp), %xmm2
- movq %rdx, -56(%rbp)
- movsd -56(%rbp), %xmm1
- movq %rax, -56(%rbp)
- movsd -56(%rbp), %xmm0
- movl $.LC8, %edi
- movl $3, %eax
- call printf
- .loc 1 63 0
- jmp .L25
- .L24:
- .loc 1 65 0
- movl $10, %edi
- call putchar
- .loc 1 66 0
- nop
- .L25:
- .loc 1 71 0
- movl $0, %eax
- .loc 1 72 0
- leave
- .cfi_def_cfa 7, 8
- ret
- .cfi_endproc
- .LFE2:
- .size main, .-main
- .Letext0:
- .section .debug_info,"",@progbits
- .Ldebug_info0:
- .long 0x18f
- .value 0x4
- .long .Ldebug_abbrev0
- .byte 0x8
- .uleb128 0x1
- .long .LASF21
- .byte 0x1
- .long .LASF22
- .long .LASF23
- .quad .Ltext0
- .quad .Letext0-.Ltext0
- .long .Ldebug_line0
- .uleb128 0x2
- .byte 0x8
- .byte 0x7
- .long .LASF0
- .uleb128 0x2
- .byte 0x1
- .byte 0x8
- .long .LASF1
- .uleb128 0x2
- .byte 0x2
- .byte 0x7
- .long .LASF2
- .uleb128 0x2
- .byte 0x4
- .byte 0x7
- .long .LASF3
- .uleb128 0x2
- .byte 0x1
- .byte 0x6
- .long .LASF4
- .uleb128 0x2
- .byte 0x2
- .byte 0x5
- .long .LASF5
- .uleb128 0x3
- .byte 0x4
- .byte 0x5
- .string "int"
- .uleb128 0x2
- .byte 0x8
- .byte 0x5
- .long .LASF6
- .uleb128 0x2
- .byte 0x8
- .byte 0x7
- .long .LASF7
- .uleb128 0x2
- .byte 0x1
- .byte 0x6
- .long .LASF8
- .uleb128 0x4
- .long .LASF12
- .byte 0x1
- .byte 0x3
- .long 0x57
- .quad .LFB0
- .quad .LFE0-.LFB0
- .uleb128 0x1
- .byte 0x9c
- .long 0xbf
- .uleb128 0x5
- .long .LASF9
- .byte 0x1
- .byte 0x3
- .long 0x57
- .uleb128 0x2
- .byte 0x91
- .sleb128 -20
- .uleb128 0x5
- .long .LASF10
- .byte 0x1
- .byte 0x3
- .long 0x57
- .uleb128 0x2
- .byte 0x91
- .sleb128 -24
- .uleb128 0x5
- .long .LASF11
- .byte 0x1
- .byte 0x3
- .long 0x6c
- .uleb128 0x2
- .byte 0x91
- .sleb128 -28
- .byte 0
- .uleb128 0x4
- .long .LASF13
- .byte 0x1
- .byte 0x14
- .long 0x10b
- .quad .LFB1
- .quad .LFE1-.LFB1
- .uleb128 0x1
- .byte 0x9c
- .long 0x10b
- .uleb128 0x5
- .long .LASF9
- .byte 0x1
- .byte 0x14
- .long 0x10b
- .uleb128 0x2
- .byte 0x91
- .sleb128 -24
- .uleb128 0x5
- .long .LASF10
- .byte 0x1
- .byte 0x14
- .long 0x10b
- .uleb128 0x2
- .byte 0x91
- .sleb128 -32
- .uleb128 0x5
- .long .LASF11
- .byte 0x1
- .byte 0x14
- .long 0x6c
- .uleb128 0x2
- .byte 0x91
- .sleb128 -36
- .byte 0
- .uleb128 0x2
- .byte 0x8
- .byte 0x4
- .long .LASF14
- .uleb128 0x6
- .long .LASF24
- .byte 0x1
- .byte 0x23
- .long 0x57
- .quad .LFB2
- .quad .LFE2-.LFB2
- .uleb128 0x1
- .byte 0x9c
- .uleb128 0x7
- .long .LASF15
- .byte 0x1
- .byte 0x25
- .long 0x57
- .uleb128 0x2
- .byte 0x91
- .sleb128 -52
- .uleb128 0x7
- .long .LASF16
- .byte 0x1
- .byte 0x25
- .long 0x57
- .uleb128 0x2
- .byte 0x91
- .sleb128 -48
- .uleb128 0x7
- .long .LASF17
- .byte 0x1
- .byte 0x25
- .long 0x57
- .uleb128 0x2
- .byte 0x91
- .sleb128 -44
- .uleb128 0x7
- .long .LASF18
- .byte 0x1
- .byte 0x26
- .long 0x10b
- .uleb128 0x2
- .byte 0x91
- .sleb128 -40
- .uleb128 0x7
- .long .LASF19
- .byte 0x1
- .byte 0x26
- .long 0x10b
- .uleb128 0x2
- .byte 0x91
- .sleb128 -32
- .uleb128 0x7
- .long .LASF20
- .byte 0x1
- .byte 0x26
- .long 0x10b
- .uleb128 0x2
- .byte 0x91
- .sleb128 -24
- .uleb128 0x7
- .long .LASF11
- .byte 0x1
- .byte 0x27
- .long 0x6c
- .uleb128 0x2
- .byte 0x91
- .sleb128 -53
- .byte 0
- .byte 0
- .section .debug_abbrev,"",@progbits
- .Ldebug_abbrev0:
- .uleb128 0x1
- .uleb128 0x11
- .byte 0x1
- .uleb128 0x25
- .uleb128 0xe
- .uleb128 0x13
- .uleb128 0xb
- .uleb128 0x3
- .uleb128 0xe
- .uleb128 0x1b
- .uleb128 0xe
- .uleb128 0x11
- .uleb128 0x1
- .uleb128 0x12
- .uleb128 0x7
- .uleb128 0x10
- .uleb128 0x17
- .byte 0
- .byte 0
- .uleb128 0x2
- .uleb128 0x24
- .byte 0
- .uleb128 0xb
- .uleb128 0xb
- .uleb128 0x3e
- .uleb128 0xb
- .uleb128 0x3
- .uleb128 0xe
- .byte 0
- .byte 0
- .uleb128 0x3
- .uleb128 0x24
- .byte 0
- .uleb128 0xb
- .uleb128 0xb
- .uleb128 0x3e
- .uleb128 0xb
- .uleb128 0x3
- .uleb128 0x8
- .byte 0
- .byte 0
- .uleb128 0x4
- .uleb128 0x2e
- .byte 0x1
- .uleb128 0x3f
- .uleb128 0x19
- .uleb128 0x3
- .uleb128 0xe
- .uleb128 0x3a
- .uleb128 0xb
- .uleb128 0x3b
- .uleb128 0xb
- .uleb128 0x27
- .uleb128 0x19
- .uleb128 0x49
- .uleb128 0x13
- .uleb128 0x11
- .uleb128 0x1
- .uleb128 0x12
- .uleb128 0x7
- .uleb128 0x40
- .uleb128 0x18
- .uleb128 0x2117
- .uleb128 0x19
- .uleb128 0x1
- .uleb128 0x13
- .byte 0
- .byte 0
- .uleb128 0x5
- .uleb128 0x5
- .byte 0
- .uleb128 0x3
- .uleb128 0xe
- .uleb128 0x3a
- .uleb128 0xb
- .uleb128 0x3b
- .uleb128 0xb
- .uleb128 0x49
- .uleb128 0x13
- .uleb128 0x2
- .uleb128 0x18
- .byte 0
- .byte 0
- .uleb128 0x6
- .uleb128 0x2e
- .byte 0x1
- .uleb128 0x3f
- .uleb128 0x19
- .uleb128 0x3
- .uleb128 0xe
- .uleb128 0x3a
- .uleb128 0xb
- .uleb128 0x3b
- .uleb128 0xb
- .uleb128 0x49
- .uleb128 0x13
- .uleb128 0x11
- .uleb128 0x1
- .uleb128 0x12
- .uleb128 0x7
- .uleb128 0x40
- .uleb128 0x18
- .uleb128 0x2116
- .uleb128 0x19
- .byte 0
- .byte 0
- .uleb128 0x7
- .uleb128 0x34
- .byte 0
- .uleb128 0x3
- .uleb128 0xe
- .uleb128 0x3a
- .uleb128 0xb
- .uleb128 0x3b
- .uleb128 0xb
- .uleb128 0x49
- .uleb128 0x13
- .uleb128 0x2
- .uleb128 0x18
- .byte 0
- .byte 0
- .byte 0
- .section .debug_aranges,"",@progbits
- .long 0x2c
- .value 0x2
- .long .Ldebug_info0
- .byte 0x8
- .byte 0
- .value 0
- .value 0
- .quad .Ltext0
- .quad .Letext0-.Ltext0
- .quad 0
- .quad 0
- .section .debug_line,"",@progbits
- .Ldebug_line0:
- .section .debug_str,"MS",@progbits,1
- .LASF3:
- .string "unsigned int"
- .LASF15:
- .string "intArgumentOne"
- .LASF0:
- .string "long unsigned int"
- .LASF16:
- .string "intArgumentTwo"
- .LASF19:
- .string "doubleArgumentTwo"
- .LASF11:
- .string "operator"
- .LASF12:
- .string "integerOperation"
- .LASF8:
- .string "char"
- .LASF1:
- .string "unsigned char"
- .LASF24:
- .string "main"
- .LASF20:
- .string "result"
- .LASF9:
- .string "argumentOne"
- .LASF17:
- .string "menuChoice"
- .LASF14:
- .string "double"
- .LASF6:
- .string "long int"
- .LASF21:
- .string "GNU C 4.8.5 -mtune=generic -march=x86-64 -g -std=gnu99 -fstack-protector"
- .LASF23:
- .string "/home/ubuntu/gcc-explorer"
- .LASF22:
- .string "/tmp/gcc-explorer-compiler117812-1939-14s5zlb/example.c"
- .LASF2:
- .string "short unsigned int"
- .LASF4:
- .string "signed char"
- .LASF10:
- .string "argumentTwo"
- .LASF18:
- .string "doubleArgumentOne"
- .LASF13:
- .string "doubleOperation"
- .LASF5:
- .string "short int"
- .LASF7:
- .string "sizetype"
- .ident "GCC: (Ubuntu 4.8.5-4ubuntu2) 4.8.5"
- .section .note.GNU-stack,"",@progbits
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement