task_name
string
source_code
string
compiler_asm
string
object_asm
string
shared_asm
string
program_asm
string
C_1
#include <assert.h> #include <string.h> // Return "Hello, MMCODEEVAL: Masssively Multilingual Code Evaluation" char *hello_mmcodeeval(){ return "Hello, MMCODEEVAL: Masssively Multilingual Code Evaluation"; }
.file "source.c" .text .section .rodata .align 8 .LC0: .string "Hello, MMCODEEVAL: Masssively Multilingual Code Evaluation" .text .globl hello_mmcodeeval .type hello_mmcodeeval, @function hello_mmcodeeval: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/000_C_1/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <hello_mmcodeeval>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8: 48 ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/000_C_1/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d1 2f 00 00 mov 0x2fd1(%rip)...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/000_C_1/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(...
C_10
#include <assert.h> #include <stdio.h> /* Calculate the sum of even numbers in a given list. Parameters: - numbers (list): A list of integers. - size (int): The size of the list. Returns: int: The sum of even numbers in the input list. >>> calculate_even_sum([1,4,3,2,5], 5) 6 */ int calculate_even_s...
.file "source.c" .text .globl calculate_even_sum .type calculate_even_sum, @function calculate_even_sum: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 movq %rdi, -24(%rbp) movl %esi, -28(%rbp) movl $0, -8(%rbp) movl $0, -4(%rbp)...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/001_C_10/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <calculate_even_sum>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8: ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/001_C_10/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d1 2f 00 00 mov 0x2fd1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/001_C_10/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_11
#include <assert.h> #include <stdio.h> /* Determine if two closed intervals intersect. ​ Args: ​ a, b: Representing the first closed interval [a, b] where 0 <= a <= b <= 1000. ​ c, d: Representing the second closed interval [c, d] where 0 <= c <= d <= 1000. ​ Returns: ​ int: 1 if the intervals intersect,...
.file "source.c" .text .globl are_intervals_intersecting .type are_intervals_intersecting, @function are_intervals_intersecting: .LFB0: .cfi_startproc endbr64 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, -12...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/002_C_11/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <are_intervals_intersecting>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rb...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/002_C_11/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d1 2f 00 00 mov 0x2fd1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/002_C_11/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_12
#include <assert.h> #include <math.h> #include <stdbool.h> #include <stdio.h> /* You are given three digits a, b, c. Two of them are equal, but the third one is different from the other two. Find the value that occurs exactly once. >>> extraNumber(0,0,1) 1 >>> extraNumber(4,3,4) 3 */ int extraNumber(int...
.file "source.c" .text .globl extraNumber .type extraNumber, @function extraNumber: .LFB0: .cfi_startproc endbr64 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, -12(%rbp) movl -4(%rbp), %eax cmpl -8(%rbp), %...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/003_C_12/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <extraNumber>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8: 89 7d f...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/003_C_12/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d1 2f 00 00 mov 0x2fd1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/003_C_12/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_13
#include <assert.h> #include <math.h> #include <stdbool.h> #include <stdio.h> #include <string.h> /* Calculate the total score for a student based on the scores in different subjects. Parameters: - subject_scores (list): A list containing the scores for each subject. Returns: int: The total score obtained b...
.file "source.c" .text .globl calculate_total_score .type calculate_total_score, @function calculate_total_score: .LFB0: .cfi_startproc endbr64 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, -12(%rbp) movl %e...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/004_C_13/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <calculate_total_score>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/004_C_13/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d1 2f 00 00 mov 0x2fd1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/004_C_13/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_14
#include <assert.h> #include <stdio.h> #include <string.h> /* Decode a series of numbers to reveal the pattern and understand the actual values each digit represents. 0000=4 8888=8 1234=1 5678=3 9012=2 1357=0 2468=4 Parameters: - data_str: A string representing a series of numbers. Length does not exceed 100. Return...
.file "source.c" .text .globl decode_numbers .type decode_numbers, @function decode_numbers: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 pushq %rbx subq $88, %rsp .cfi_offset 3, -24 movq %rdi, -88(%rbp) movq %fs:40, %rax mov...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/005_C_14/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <decode_numbers>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8: 53 ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/005_C_14/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 c1 2f 00 00 mov 0x2fc1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/005_C_14/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_15
#include <assert.h> #include <stdio.h> /* Counts the number of different coloring methods for n squares with m colors, considering the requirement that adjacent squares and the first/last squares must have different colors. Args: - n (int): The number of squares. - m (int): The number of colors. Returns: in...
.file "source.c" .text .globl count_coloring_methods .type count_coloring_methods, @function count_coloring_methods: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 subq $4096, %rsp orq $0, (%rsp) subq $400, %rsp movl %edi, -4484(...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/006_C_15/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <count_coloring_methods>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/006_C_15/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 c1 2f 00 00 mov 0x2fc1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/006_C_15/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_16
#include <assert.h> #include <math.h> #include <stdbool.h> #include <stdio.h> #include <string.h> /* Count the number of valid coin toss sequences with no consecutive heads in n tosses. ​ Parameters: - n (int): The number of coin tosses. ​ Returns: ​ unsigned long long: The count of valid sequences. >>> co...
.file "source.c" .text .globl count_valid_coin_toss_sequences .type count_valid_coin_toss_sequences, @function count_valid_coin_toss_sequences: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 subq $704, %rsp movl %edi, -692(%rbp) m...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/007_C_16/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <count_valid_coin_toss_sequences>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rs...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/007_C_16/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 c1 2f 00 00 mov 0x2fc1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/007_C_16/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_17
#include <assert.h> #include <math.h> #include <stdbool.h> #include <stdio.h> #include <string.h> /* Find the length of the longest consecutive sequence of 1s in the binary representation of a non-negative integer. ​ Parameters: - n (unsigned long long): A non-negative integer (0 ≀ n ≀ 2^64 - 1). ​ Returns: ​ ...
.file "source.c" .text .globl find_longest_consecutive_ones_length .type find_longest_consecutive_ones_length, @function find_longest_consecutive_ones_length: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 movq %rdi, -24(%rbp) movl...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/008_C_17/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <find_longest_consecutive_ones_length>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/008_C_17/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d1 2f 00 00 mov 0x2fd1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/008_C_17/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_18
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <assert.h> /* Creates an ID by combining two words in a specific manner. ​Parameters: - word1 (char*): The first word to be used in the ID. - word2 (char*): The second word to be used in the ID. ​Returns: ​char*: A divine ID formed by reversing every o...
.file "source.c" .text .globl create_id .type create_id, @function create_id: .LFB6: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 subq $48, %rsp movq %rdi, -40(%rbp) movq %rsi, -48(%rbp) movq -40(%rbp), %rax movq %rax, %rdi call str...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/009_C_18/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <create_id>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8: 48 83 ec ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/009_C_18/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 c1 2f 00 00 mov 0x2fc1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/009_C_18/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_19
#include <assert.h> #include <math.h> #include <stdbool.h> #include <stdio.h> #include <string.h> /* Count the number of different permutation schemes for a binary string of length n, where the number of '1's is m and the number of '0's is n - m. ​ Parameters: - n (int): Length of the binary string. - m (int): Numbe...
.file "source.c" .text .globl count_permutations_of_binary_string .type count_permutations_of_binary_string, @function count_permutations_of_binary_string: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 movl %edi, -52(%rbp) movl %e...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/010_C_19/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <count_permutations_of_binary_string>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/010_C_19/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d1 2f 00 00 mov 0x2fd1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/010_C_19/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_2
#include <assert.h> #include <math.h> #include <stdbool.h> #include <stdio.h> #include <string.h> /* Calculate the area of a triangle given its three sides. ​ Parameters: - a (float): Length of side 'a'. - b (float): Length of side 'b'. - c (float): Length of side 'c'. ​ Returns: - str: If the provided sides form...
.file "source.c" .text .globl calculate_triangle_area .type calculate_triangle_area, @function calculate_triangle_area: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 subq $48, %rsp movsd %xmm0, -24(%rbp) movsd %xmm1, -32(%rbp) m...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/011_C_2/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <calculate_triangle_area>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/011_C_2/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 b9 2f 00 00 mov 0x2fb9(%rip)...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/011_C_2/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(...
C_20
#include <assert.h> #include <math.h> #include <stdbool.h> #include <stdio.h> #include <string.h> /* ​ Answer a series of questions by providing choices A, B, C, or D for each question. ​ Question 1: ​ Constants like 1e6 belong to which data type? ​ A. unsigned int ​ B. int ​ C. float ​ ...
.file "source.c" .text .section .rodata .LC0: .string "DDDBA" .text .globl answer_questions .type answer_questions, @function answer_questions: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 leaq .LC0(%rip), %rax popq %rbp .cfi...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/012_C_20/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <answer_questions>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8: 48...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/012_C_20/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d1 2f 00 00 mov 0x2fd1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/012_C_20/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_21
#include <assert.h> #include <math.h> #include <stdbool.h> #include <stdio.h> #include <string.h> /* The task is to determine if it is possible to assemble the wooden squares from n buckets, where each bucket contains $a_i$ squares with a side length of 1, into a single larger square. Input: length of list, array of nu...
.file "source.c" .text .globl Is_Square .type Is_Square, @function Is_Square: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 subq $32, %rsp movl %edi, -20(%rbp) movq %rsi, -32(%rbp) movq $0, -8(%rbp) movl $0, -16(%rbp) jmp .L2 ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/013_C_21/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <Is_Square>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8: 48 83 ec ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/013_C_21/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 b9 2f 00 00 mov 0x2fb9(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/013_C_21/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_22
#include <assert.h> #include <math.h> #include <stdbool.h> #include <stdio.h> #include <string.h> /* Given integers c and d, where a + b = c and a * b = d, find and return the possible value of a (a <= b). If there are multiple groups, output the group with the smallest a. Parameters: - c (int): The sum of a an...
.file "source.c" .text .globl find_integers .type find_integers, @function find_integers: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 movl %edi, -20(%rbp) movl %esi, -24(%rbp) movl $0, -4(%rbp) jmp .L2 .L6: movl -20(%rbp), %e...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/014_C_22/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <find_integers>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8: 89 7d...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/014_C_22/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d1 2f 00 00 mov 0x2fd1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/014_C_22/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_23
#include <assert.h> #include <math.h> #include <stdbool.h> #include <stdio.h> #include <string.h> #include <stdarg.h> #include <stdlib.h> /* Count the number of acute-angled triangles that can be formed by selecting any 3 edges out of a given set of edges. Args: - edges_count: The number of edges passed. - An arbi...
.file "source.c" .text .globl count_acute_triangles .type count_acute_triangles, @function count_acute_triangles: .LFB6: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 subq $272, %rsp movl %edi, -260(%rbp) movq %rsi, -168(%rbp) movq %rd...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/015_C_23/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <count_acute_triangles>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/015_C_23/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 c1 2f 00 00 mov 0x2fc1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/015_C_23/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_24
#include <assert.h> #include <stdio.h> #include <stdlib.h> #include <string.h> /* Reads an integer and a character, then returns them as a formatted string separated by a comma. Parameters: - integer_value (int): The input integer. - char_value (char): The input character. Returns: - char*: A string containing the inte...
.file "source.c" .text .section .rodata .LC0: .string "Memory allocation failed\n" .LC1: .string "%d,%c" .text .globl process_integer_and_char .type process_integer_and_char, @function process_integer_and_char: .LFB6: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/016_C_24/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <process_integer_and_char>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/016_C_24/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 b9 2f 00 00 mov 0x2fb9(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/016_C_24/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_25
#include <assert.h> #include <math.h> #include <stdbool.h> #include <stdio.h> #include <string.h> /* Shifts all characters by 5 positions in alphabetical order. Only letters are replaced, and all letters are in uppercase. ​ Parameters: ​ text (str): The input text to be processed. ​ ​ Returns: ​ str: The tr...
.file "source.c" .text .globl shift_characters .type shift_characters, @function shift_characters: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 subq $32, %rsp movq %rdi, -24(%rbp) movq -24(%rbp), %rax movq %rax, %rdi call strl...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/017_C_25/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <shift_characters>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8: 48...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/017_C_25/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 c1 2f 00 00 mov 0x2fc1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/017_C_25/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_26
#include <assert.h> #include <math.h> #include <stdbool.h> #include <stdio.h> #include <string.h> /* Classify the integer x based on the following method: If x is a single-digit number, x belongs to its own class. Otherwise, sum the digits of x, get a new x, and iterate until the class is determined. Parameters: - x (c...
.file "source.c" .text .globl classify_integer .type classify_integer, @function classify_integer: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 pushq %rbx subq $40, %rsp .cfi_offset 3, -24 movq %rdi, -40(%rbp) movl $0, -32(%rb...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/018_C_26/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <classify_integer>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8: 53...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/018_C_26/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 c1 2f 00 00 mov 0x2fc1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/018_C_26/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_27
#include <assert.h> #include <stdio.h> /* Transforms the case of a given letter. Parameters: - letter (char): The input letter to be transformed. Returns: - char: The letter with its case reversed. If the input is lowercase, it returns the uppercase version, and if the input is uppercase, it returns the lowerca...
.file "source.c" .text .globl transform_letter_case .type transform_letter_case, @function transform_letter_case: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 movl %edi, %eax movb %al, -4(%rbp) cmpb $64, -4(%rbp) jle .L2 cmpb ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/019_C_27/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <transform_letter_case>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/019_C_27/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d1 2f 00 00 mov 0x2fd1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/019_C_27/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_28
#include <stdio.h> #include <assert.h> /* Display the ASCII information for a given character. ​ Parameters: - character (char): The input character for which ASCII information is to be displayed. ​ Returns: - int: corresponding ASCII code >>> display_ascii_info('A') 65 */ int display_ascii_info(char char...
.file "source.c" .text .globl display_ascii_info .type display_ascii_info, @function display_ascii_info: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 movl %edi, %eax movb %al, -4(%rbp) movsbl -4(%rbp), %eax popq %rbp .cfi_def_...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/020_C_28/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <display_ascii_info>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8: ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/020_C_28/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d1 2f 00 00 mov 0x2fd1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/020_C_28/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_29
#include <assert.h> // Used for testing the function with assertions #include <math.h> // Not needed for this function #include <stdbool.h> // Not needed for this function #include <stdio.h> // Needed for input/output functions #include <string.h> // Not needed for this function /* Evaluate the grade for an input integ...
.file "source.c" .text .globl evaluate_integer_grade .type evaluate_integer_grade, @function evaluate_integer_grade: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 movl %edi, -4(%rbp) cmpl $89, -4(%rbp) jle .L2 cmpl $100, -4(%rbp...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/021_C_29/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <evaluate_integer_grade>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/021_C_29/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d1 2f 00 00 mov 0x2fd1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/021_C_29/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_3
#include <assert.h> #include <math.h> #include <stdbool.h> #include <stdio.h> #include <string.h> /* Calculate the value of the function for a given input. Parameters: - x (int): Input value for the function. Returns: - double or string: If x is not in the defined domain, returns "Not define". Otherwise, return...
.file "source.c" .text .section .rodata .LC1: .string "%.5lf" .LC5: .string "Not define" .text .globl calculate_function_value .type calculate_function_value, @function calculate_function_value: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cf...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/022_C_3/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <calculate_function_value>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/022_C_3/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 c1 2f 00 00 mov 0x2fc1(%rip)...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/022_C_3/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(...
C_30
#include <assert.h> #include <stdbool.h> #include <stdio.h> #include <string.h> /* Checks if a three-character string has exactly two characters that are the same. ​ Args: s (char array): The three-character string to be checked. ​ Returns: str: Returns 'Yes' if the input has exactly two equal characters, other...
.file "source.c" .text .section .rodata .LC0: .string "Yes" .LC1: .string "No" .text .globl check_two_equal_digits .type check_two_equal_digits, @function check_two_equal_digits: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 mo...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/023_C_30/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <check_two_equal_digits>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/023_C_30/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d1 2f 00 00 mov 0x2fd1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/023_C_30/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_31
#include <assert.h> #include <stdio.h> #include <string.h> /* Given a string consisting of lowercase English letters, in each round you can change one of the characters to another character. The question is: what is the minimum number of rounds needed to make the string composed of the same character? For example: ...
.file "source.c" .text .globl minRoundsToSameChar .type minRoundsToSameChar, @function minRoundsToSameChar: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 subq $144, %rsp movq %rdi, -136(%rbp) movq %fs:40, %rax movq %rax, -8(%rbp...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/024_C_31/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <minRoundsToSameChar>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8:...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/024_C_31/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 c1 2f 00 00 mov 0x2fc1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/024_C_31/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_32
#include <assert.h> #include <stdio.h> /* Given a sequence of n events, each occurring with a periodicity of a_i years, the problem is to find the year Y_n when the n-th event occurs, under the condition that the countdown for event i+1 can only commence in the year immediately following the occurrence of event i. ...
.file "source.c" .text .globl apocalypseYear .type apocalypseYear, @function apocalypseYear: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 movl %edi, -20(%rbp) movq %rsi, -32(%rbp) movl $0, -16(%rbp) movl $0, -12(%rbp) jmp .L2 ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/025_C_32/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <apocalypseYear>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8: 89 7...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/025_C_32/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d1 2f 00 00 mov 0x2fd1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/025_C_32/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_33
#include <stdio.h> #include <assert.h> #include <stdbool.h> /* This problem introduces a new modulo operation, denoted by the symbol "βŠ•". When calculating x βŠ• y, if x is not a multiple of y, the result is the remainder of x divided by y. Otherwise, divide x by y repeatedly until x is no longer a multiple of y, denoting...
.file "source.c" .text .globl newModuloFactorial .type newModuloFactorial, @function newModuloFactorial: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 subq $64, %rsp movq %rdi, -56(%rbp) movq %rsi, -64(%rbp) movq %fs:40, %rax m...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/026_C_33/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <newModuloFactorial>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8: ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/026_C_33/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 c1 2f 00 00 mov 0x2fc1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/026_C_33/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_34
#include <stdio.h> #include <assert.h> /* You are given an array a of n integers. You can perform at most one operation where you select three integers i, j, x (1 <= i <= j <= n) and replace all elements from a[i] to a[j] with x, at a cost of (j - i + 1). Find the minimum cost to make all elements in the array equal. ...
.file "source.c" .text .globl makeEqualAgain .type makeEqualAgain, @function makeEqualAgain: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 movl %edi, -36(%rbp) movq %rsi, -48(%rbp) movl $1, -20(%rbp) movl $0, -16(%rbp) movl -36...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/027_C_34/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <makeEqualAgain>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8: 89 7...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/027_C_34/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d1 2f 00 00 mov 0x2fd1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/027_C_34/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_35
#include <assert.h> #include <stdio.h> /* Given a sequence of N piles of stones numbered from 1 to N, with each pile containing a positive number of stones, determine the winner of a game played by Charlie and Dan. Charlie goes first, and they take turns moving a positive number of stones from the leftmost non-empty pi...
.file "source.c" .text .section .rodata .LC0: .string "Charlie" .LC1: .string "Dan" .text .globl gameWinner .type gameWinner, @function gameWinner: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 movl %edi, -20(%rbp) movq %rsi, ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/028_C_35/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <gameWinner>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8: 89 7d ec...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/028_C_35/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d1 2f 00 00 mov 0x2fd1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/028_C_35/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_36
#include <assert.h> #include <stdio.h> /* Given n doors arranged in a circle, the player starts in front of door 1. Each turn, the player can choose a number i and pay a cost C_i to move i steps to the right and then open the door at that position. It is guaranteed that C_i >= C_{i+1} for 1 <= i < n. The task is to det...
.file "source.c" .text .globl minTotalCost .type minTotalCost, @function minTotalCost: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 movl %edi, -4(%rbp) movq %rsi, -16(%rbp) movl -4(%rbp), %eax cltq salq $2, %rax leaq -8(%rax)...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/029_C_36/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <minTotalCost>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8: 89 7d ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/029_C_36/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d1 2f 00 00 mov 0x2fd1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/029_C_36/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_37
#include <assert.h> #include <stdio.h> /* Given a sequence of student IDs entering a classroom, where the IDs range from 0 to N-1, calculate the total number of handshakes that occur. Each student will shake hands with every student already in the classroom with a smaller ID number. The sequence represents the order in...
.file "source.c" .text .globl countHandshakes .type countHandshakes, @function countHandshakes: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 leaq -36864(%rsp), %r11 .LPSRL0: subq $4096, %rsp orq $0, (%rsp) cmpq %r11, %rsp jne ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/030_C_37/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <countHandshakes>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8: 4c ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/030_C_37/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 c1 2f 00 00 mov 0x2fc1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/030_C_37/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_38
#include <assert.h> #include <stdio.h> /* Given n positive integers representing the count of each number from 1 to n, find the maximum sum of the mode (most frequent element) for all prefixes of a sequence constructed from these numbers. The mode is the largest number among the most frequent elements in a sequence....
.file "source.c" .text .globl maxModeSum .type maxModeSum, @function maxModeSum: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 leaq -798720(%rsp), %r11 .LPSRL0: subq $4096, %rsp orq $0, (%rsp) cmpq %r11, %rsp jne .LPSRL0 subq ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/031_C_38/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <maxModeSum>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8: 4c 8d 9c...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/031_C_38/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 c1 2f 00 00 mov 0x2fc1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/031_C_38/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_39
#include <assert.h> #include <stdio.h> /* Given an array A of integers, the task is to calculate the sum of the XOR of all subarrays. A subarray is defined by a pair of indices (L, R) such that 1 <= L <= R <= n, where n is the size of the array. The XOR sum of a subarray is the result of XORing all elements from L to R...
.file "source.c" .text .globl sumOfXorSubarrays .type sumOfXorSubarrays, @function sumOfXorSubarrays: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 leaq -2400256(%rsp), %r11 .LPSRL0: subq $4096, %rsp orq $0, (%rsp) cmpq %r11, %r...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/032_C_39/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <sumOfXorSubarrays>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8: 4...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/032_C_39/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 c1 2f 00 00 mov 0x2fc1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/032_C_39/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_4
#include <assert.h> #include <stdio.h> /* Find the maximum and minimum of three distinct integers. Parameters: a (int): The first integer. b (int): The second integer. c (int): The third integer. Returns: Tuple[int, int]: A tuple is not a concept in C; instead, we will return by reference. >>> Example call: int max,...
.file "source.c" .text .globl find_max_min .type find_max_min, @function find_max_min: .LFB0: .cfi_startproc endbr64 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, -12(%rbp) movq %rcx, -24(%rbp) movq %r8, -3...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/033_C_4/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <find_max_min>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8: 89 7d f...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/033_C_4/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d1 2f 00 00 mov 0x2fd1(%rip)...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/033_C_4/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(...
C_40
#include <assert.h> #include <math.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> /* Given two positive integers n and k, find the number of positive integers x, where 1 <= x <= n, that can be expressed as x = a^b with a and b being positive integers and b >= k. Different legal representations of the sa...
.file "source.c" .text .globl countPowerNumbers .type countPowerNumbers, @function countPowerNumbers: .LFB6: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 pushq %rbx subq $56, %rsp .cfi_offset 3, -24 movl %edi, -52(%rbp) movl %esi, -5...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/034_C_40/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <countPowerNumbers>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8: 5...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/034_C_40/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 c1 2f 00 00 mov 0x2fc1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/034_C_40/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_41
#include <stdio.h> #include <assert.h> /* Given three integers n, m, and k, find the number of sequences consisting of n '(' and m ')', such that the longest balanced subsequence is of length 2 * k. The result should be calculated modulo 1,000,000,007 (10^9 + 7). For example: >>> countBalancedSubsequences(2, 2, 2)...
.file "source.c" .text .globl countBalancedSubsequences .type countBalancedSubsequences, @function countBalancedSubsequences: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 movq %rdi, -40(%rbp) movq %rsi, -48(%rbp) movq %rdx, -56(...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/035_C_41/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <countBalancedSubsequences>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/035_C_41/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d1 2f 00 00 mov 0x2fd1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/035_C_41/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_42
#include <stdio.h> #include <assert.h> /* Given a rectangle paper of size n x m placed on a plane Cartesian coordinate system with its bottom-left corner at (0,0) and top-right corner at (n,m), you need to calculate the expected number of operations to cut the paper such that the remaining area is less than k. In eac...
.file "source.c" .text .globl expectedCuts .type expectedCuts, @function expectedCuts: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 subq $64, %rsp movl %edi, -52(%rbp) movl %esi, -56(%rbp) movq %rdx, -64(%rbp) movq %fs:40, %ra...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/036_C_42/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <expectedCuts>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8: 48 83 ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/036_C_42/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 c1 2f 00 00 mov 0x2fc1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/036_C_42/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_43
#include <stdio.h> #include <assert.h> #include <string.h> /* Given a permutation q of n elements and an integer k, find the number of permutations p of n elements such that f(p) = q, where f(p) is the lexicographically smallest permutation that can be obtained by dividing p into exactly k non-empty contiguous segments...
.file "source.c" .text .globl countPermutations .type countPermutations, @function countPermutations: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 pushq %r13 pushq %r12 pushq %rbx subq $168, %rsp .cfi_offset 13, -24 .cfi_offs...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/037_C_43/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <countPermutations>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8: 4...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/037_C_43/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 c1 2f 00 00 mov 0x2fc1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/037_C_43/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_44
#include <stdio.h> #include <assert.h> #include <stdbool.h> /* Given an array of n distinct integers representing the heights of Kira's friends, find the number of ways to choose a triplet (a, b, c) such that the greatest common divisor (GCD) of the maximum and minimum values of the triplet is 1. >>> countTriplet...
.file "source.c" .text .globl countTriplets .type countTriplets, @function countTriplets: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 movq %rdi, -56(%rbp) movl %esi, -60(%rbp) movl $0, -36(%rbp) movl $0, -32(%rbp) jmp .L2 .L1...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/038_C_44/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <countTriplets>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8: 48 89...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/038_C_44/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d1 2f 00 00 mov 0x2fd1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/038_C_44/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_45
#include <stdio.h> #include <assert.h> /* You are given a 1 by n pixel image, where each pixel has a color represented by an integer. You can perform an operation where you pick a color and change all connected pixels of the same color to the chosen color. Two pixels are connected if they are adjacent and have the same...
.file "source.c" .text .globl minOperations .type minOperations, @function minOperations: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 pushq %rbx subq $120, %rsp .cfi_offset 3, -24 movl %edi, -116(%rbp) movq %rsi, -128(%rbp) ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/039_C_45/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <minOperations>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8: 53 ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/039_C_45/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 c1 2f 00 00 mov 0x2fc1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/039_C_45/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_46
#include <assert.h> #include <stdio.h> /* Given an integer n, write a function to compute the sum of all numbers from 1 to n that are multiples of either 3 or 5. If a number is a multiple of both 3 and 5, it should only be counted once. For example: >>> sumOfMultiples(10) 33 // (3 + 5 + 6 + 9 + 10) */ int sumOf...
.file "source.c" .text .globl sumOfMultiples .type sumOfMultiples, @function sumOfMultiples: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 movl %edi, -20(%rbp) movl $0, -8(%rbp) movl $1, -4(%rbp) jmp .L2 .L5: movl -4(%rbp), %ec...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/040_C_46/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <sumOfMultiples>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8: 89 7...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/040_C_46/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d1 2f 00 00 mov 0x2fd1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/040_C_46/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_47
#include <assert.h> #include <ctype.h> #include <stdbool.h> #include <stdio.h> #include <string.h> /* Determine if a given string is a palindrome. A palindrome is a word, phrase, number, or other sequence of characters that reads the same forward and backward (ignoring spaces, punctuation, and capitalization). >>> ...
.file "source.c" .text .globl isPalindrome .type isPalindrome, @function isPalindrome: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 pushq %rbx subq $40, %rsp .cfi_offset 3, -24 movq %rdi, -40(%rbp) movl $0, -24(%rbp) movq -40...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/041_C_47/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <isPalindrome>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8: 53 ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/041_C_47/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 c1 2f 00 00 mov 0x2fc1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/041_C_47/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_48
#include <assert.h> #include <stdio.h> /* Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: >>> addDigits(38) 2 Because 3 + 8 = 11, and 1 + 1 = 2. Since 2 has only one digit, 2 is the result. */ int addDigits(int num){ while (num >= 10) { ...
.file "source.c" .text .globl addDigits .type addDigits, @function addDigits: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 movl %edi, -20(%rbp) jmp .L2 .L5: movl $0, -4(%rbp) jmp .L3 .L4: movl -20(%rbp), %ecx movslq %ecx, %ra...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/042_C_48/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <addDigits>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8: 89 7d ec ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/042_C_48/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d1 2f 00 00 mov 0x2fd1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/042_C_48/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_49
#include <assert.h> #include <stdbool.h> #include <stdio.h> /* You are playing a game called Nim. In this game, you start with a pile of n stones, and you and your opponent take turns to remove 1 to 3 stones from the pile. The one who removes the last stone wins the game. Given the number of stones n, determine if you ...
.file "source.c" .text .globl canWinNim .type canWinNim, @function canWinNim: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 movl %edi, -4(%rbp) movl -4(%rbp), %eax andl $3, %eax testl %eax, %eax setne %al popq %rbp .cfi_def_c...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/043_C_49/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <canWinNim>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8: 89 7d fc ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/043_C_49/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d1 2f 00 00 mov 0x2fd1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/043_C_49/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_5
#include <assert.h> #include <math.h> #include <stdbool.h> #include <stdio.h> #include <string.h> /* Calculate the distance between two points A (xa, ya) and B (xb, yb). Parameters: - xa (double): x-coordinate of point A. - ya (double): y-coordinate of point A. - xb (double): x-coordinate of point B. - yb (double):...
.file "source.c" .text .globl calculate_distance .type calculate_distance, @function calculate_distance: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 subq $32, %rsp movsd %xmm0, -8(%rbp) movsd %xmm1, -16(%rbp) movsd %xmm2, -24(...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/044_C_5/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <calculate_distance>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8: 4...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/044_C_5/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 b9 2f 00 00 mov 0x2fb9(%rip)...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/044_C_5/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(...
C_50
#include <assert.h> #include <stdio.h> /* Given two integers a and b, return the sum if the sum is even, or return the product of a and b if the sum is odd. >>> evenSumOrOddProduct(2, 3) 6 >>> evenSumOrOddProduct(5, 5) 10 */ int evenSumOrOddProduct(int a, int b);int evenSumOrOddProduct(int a, int b) { ...
.file "source.c" .text .globl evenSumOrOddProduct .type evenSumOrOddProduct, @function evenSumOrOddProduct: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 movl %edi, -20(%rbp) movl %esi, -24(%rbp) movl -20(%rbp), %edx movl -24(%r...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/045_C_50/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <evenSumOrOddProduct>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8:...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/045_C_50/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d1 2f 00 00 mov 0x2fd1(%rip...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/045_C_50/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9...
C_6
#include <assert.h> #include <math.h> #include <stdbool.h> #include <stdio.h> #include <string.h> /* Find the factorial of N and take the modulo 10007 of the result. ​ Parameters: - N (int): An integer representing the input value (N <= 10000). ​ Returns: ​ int: The result after taking the modulo 10007 of the ...
.file "source.c" .text .globl process_request .type process_request, @function process_request: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 pushq %rbx leaq -36864(%rsp), %r11 .LPSRL0: subq $4096, %rsp orq $0, (%rsp) cmpq %r11...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/046_C_6/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <process_request>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8: 53 ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/046_C_6/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 c1 2f 00 00 mov 0x2fc1(%rip)...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/046_C_6/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(...
C_7
#include <assert.h> #include <math.h> #include <stdbool.h> #include <stdio.h> #include <string.h> /* Calculate the area of a triangle given its base and height. ​ Parameters: - base (int): The base length of the triangle. - height (int): The height of the triangle. ​ Returns: ​ float: The calculated area of th...
.file "source.c" .text .globl calculate_triangle_area .type calculate_triangle_area, @function calculate_triangle_area: .LFB0: .cfi_startproc endbr64 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 -4(%rbp), %eax im...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/047_C_7/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <calculate_triangle_area>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/047_C_7/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d1 2f 00 00 mov 0x2fd1(%rip)...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/047_C_7/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(...
C_8
#include <assert.h> #include <stdio.h> /* Calculate the Hamming distance between two integers in binary representation. ​ Parameters: - x (int): The first positive integer (x <= 1,000,000,000). - y (int): The second positive integer (y <= 1,000,000,000). ​ Returns: ​ int: The Hamming distance between x and y, ...
.file "source.c" .text .globl hamming_distance .type hamming_distance, @function hamming_distance: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 movl %edi, -20(%rbp) movl %esi, -24(%rbp) movl $0, -8(%rbp) movl -20(%rbp), %eax x...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/048_C_8/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <hamming_distance>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8: 89 ...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/048_C_8/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d1 2f 00 00 mov 0x2fd1(%rip)...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/048_C_8/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(...
C_9
#include <assert.h> #include <stdarg.h> /* Count the number of odd integers in a given list of numbers. Parameters: - count (int): The count of numbers to evaluate. - ... (int): A sequence of integers. Returns: int: The count of odd numbers in the input list. >>> count_odd_numbers(5, 1, 4, 3, 2, 5) ...
.file "source.c" .text .globl count_odd_numbers .type count_odd_numbers, @function count_odd_numbers: .LFB0: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 subq $240, %rsp movl %edi, -228(%rbp) movq %rsi, -168(%rbp) movq %rdx, -160(%rbp...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/049_C_9/code.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <count_odd_numbers>: 0: f3 0f 1e fa endbr64 4: 55 push %rbp 5: 48 89 e5 mov %rsp,%rbp 8: 48...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/049_C_9/code.so: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 c1 2f 00 00 mov 0x2fc1(%rip)...
/home/alexanderpretko/CodeGeneration/MCEval/generated_mceval_x86_linux/O0/049_C_9/code.program: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(...