xunge/DecIR huggingface dataset:
unsigned short ST7735_Color565(unsigned char r, unsigned char g,
                               unsigned char b) {
  return ((b & 0xF8) << 8) | ((g & 0xFC) << 3) | (r >> 3);
}


x86 assembly (clang, -O0):
<ST7735_Color565>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%eax
and    $0xf8,%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
and    $0xfc,%ecx
shl    $0x3,%ecx
or     %ecx,%eax
movzbl -0x1(%rbp),%ecx
sar    $0x3,%ecx
or     %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ST7735_Color565>:
and    $0xf8,%dl
movzbl %dl,%eax
shl    $0x8,%eax
and    $0xfffffffc,%esi
lea    (%rax,%rsi,8),%ecx
shr    $0x3,%dil
movzbl %dil,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define zeroext i16 @ST7735_Color565(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = and i32 %8, 248
%10 = shl i32 %9, 8
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = and i32 %12, 252
%14 = shl i32 %13, 3
%15 = or i32 %10, %14
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = ashr i32 %17, 3
%19 = or i32 %15, %18
%20 = trunc i32 %19 to i16
ret i16 %20
}

LLVM IR (-O2):
define zeroext i16 @ST7735_Color565(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = and i8 %2, -8
%5 = zext i8 %4 to i16
%6 = shl nuw i16 %5, 8
%7 = and i8 %1, -4
%8 = zext i8 %7 to i16
%9 = shl nuw nsw i16 %8, 3
%10 = or i16 %6, %9
%11 = lshr i8 %0, 3
%12 = zext i8 %11 to i16
%13 = or i16 %10, %12
ret i16 %13
}
void psci_set_ops(struct psci_ops *ops) {}


x86 assembly (clang, -O0):
<psci_set_ops>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<psci_set_ops>:
ret

LLVM IR (-O0):
%struct.psci_ops = type opaque
define void @psci_set_ops(%struct.psci_ops* %0) {
%2 = alloca %struct.psci_ops*
store %struct.psci_ops* %0, %struct.psci_ops** %2
ret void
}

LLVM IR (-O2):
%struct.psci_ops = type opaque
define void @psci_set_ops(%struct.psci_ops* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello world\n");
  printf("computer_architecture_combinatorlambdamarkov_algorithm_compiler\n");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Hello world\0A\00"
@.str.1 = [65 x i8] c"computer_architecture_combinatorlambdamarkov_algorithm_compiler\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [12 x i8] c"Hello world\00"
@str.2 = [64 x i8] c"computer_architecture_combinatorlambdamarkov_algorithm_compiler\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
double aa_tf_invsinc_series2(double);
double aa_tf_invsinc_series(double theta) {
  return aa_tf_invsinc_series2(theta * theta);
}


x86 assembly (clang, -O0):
<aa_tf_invsinc_series>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <aa_tf_invsinc_series2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aa_tf_invsinc_series>:
mulsd  %xmm0,%xmm0
jmp    1030 <aa_tf_invsinc_series2@plt>

LLVM IR (-O0):
define double @aa_tf_invsinc_series(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
%6 = call double @aa_tf_invsinc_series2(double %5)
ret double %6
}

LLVM IR (-O2):
define double @aa_tf_invsinc_series(double %0) {
%2 = fmul double %0, %0
%3 = tail call double @aa_tf_invsinc_series2(double %2)
ret double %3
}
int ptn3460_init(struct drm_device *dev, struct drm_encoder *encoder,
                 struct i2c_client *client, struct device_node *node) {
  return 0;
}


x86 assembly (clang, -O0):
<ptn3460_init>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptn3460_init>:
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.drm_device = type opaque
%struct.drm_encoder = type opaque
%struct.i2c_client = type opaque
%struct.device_node = type opaque
define i32 @ptn3460_init(%struct.drm_device* %0, %struct.drm_encoder* %1, %struct.i2c_client* %2, %struct.device_node* %3) {
%5 = alloca %struct.drm_device*
%6 = alloca %struct.drm_encoder*
%7 = alloca %struct.i2c_client*
%8 = alloca %struct.device_node*
store %struct.drm_device* %0, %struct.drm_device** %5
store %struct.drm_encoder* %1, %struct.drm_encoder** %6
store %struct.i2c_client* %2, %struct.i2c_client** %7
store %struct.device_node* %3, %struct.device_node** %8
ret i32 0
}

LLVM IR (-O2):
%struct.drm_device = type opaque
%struct.drm_encoder = type opaque
%struct.i2c_client = type opaque
%struct.device_node = type opaque
define i32 @ptn3460_init(%struct.drm_device* nocapture readnone %0, %struct.drm_encoder* nocapture readnone %1, %struct.i2c_client* nocapture readnone %2, %struct.device_node* nocapture readnone %3) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
char *readString();
char *new_file() {
  char *name;
  printf("Write file name => ");
  name = readString();
  return name;
}


x86 assembly (clang, -O0):
<new_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <readString@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<new_file>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <readString@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Write file name => \00"
define i8* @new_file() {
%1 = alloca i8*
%2 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%3 = call i8* (...) @readString()
store i8* %3, i8** %1
%4 = load i8*, i8** %1
ret i8* %4
}

LLVM IR (-O2):
@.str = [20 x i8] c"Write file name => \00"
define i8* @new_file() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = tail call i8* (...) @readString()
ret i8* %2
}
void fn3B3A() { return; }


x86 assembly (clang, -O0):
<fn3B3A>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn3B3A>:
ret

LLVM IR (-O0):
define void @fn3B3A() {
ret void
}

LLVM IR (-O2):
define void @fn3B3A() {
ret void
}
/* Variables and functions */
void *createStringObject(char *, unsigned int);
void *listPopSaver(unsigned char *data, unsigned int sz) {
  return createStringObject((char *)data, sz);
}


x86 assembly (clang, -O0):
<listPopSaver>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <createStringObject@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<listPopSaver>:
jmp    1030 <createStringObject@plt>

LLVM IR (-O0):
define i8* @listPopSaver(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i8* @createStringObject(i8* %5, i32 %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @listPopSaver(i8* %0, i32 %1) {
%3 = tail call i8* @createStringObject(i8* %0, i32 %1)
ret i8* %3
}
int __attribute__((weak)) _getpid() { return -1; }


x86 assembly (clang, -O0):
<_getpid>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_getpid>:
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define weak i32 @_getpid() {
ret i32 -1
}

LLVM IR (-O2):
define weak i32 @_getpid() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ __write2(char *);
void wall(char *buf) { __write2(buf); }


x86 assembly (clang, -O0):
<wall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <__write2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wall>:
jmp    1030 <__write2@plt>

LLVM IR (-O0):
define void @wall(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @__write2(i8* %3)
ret void
}

LLVM IR (-O2):
define void @wall(i8* %0) {
%2 = tail call i32 @__write2(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_rwlockattr_t;

/* Variables and functions */
int ENOSYS;
int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *attr, int shared) {
  return -ENOSYS;
}


x86 assembly (clang, -O0):
<pthread_rwlockattr_setpshared>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
mov    0x2ed4(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_rwlockattr_setpshared>:
mov    0x2ee1(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @pthread_rwlockattr_setpshared(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* @ENOSYS
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @pthread_rwlockattr_setpshared(i32* nocapture readnone %0, i32 %1) {
%3 = load i32, i32* @ENOSYS
%4 = sub nsw i32 0, %3
ret i32 %4
}
int foo1() {
  union {
    int l;
    char c[sizeof(int)];
  } k1;
  char *m;
  k1.l = 0;
  m = k1.c;
  k1.c[sizeof(int) - 1] = m[sizeof(int) - 2];
}


x86 assembly (clang, -O0):
<foo1>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x2(%rax),%al
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo1>:
ret

LLVM IR (-O0):
%union.anon = type { i32 }
define i32 @foo1() {
%1 = alloca i32
%2 = alloca %union.anon
%3 = alloca i8*
%4 = bitcast %union.anon* %2 to i32*
store i32 0, i32* %4
%5 = bitcast %union.anon* %2 to [4 x i8]*
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 2
%9 = load i8, i8* %8
%10 = bitcast %union.anon* %2 to [4 x i8]*
%11 = getelementptr inbounds [4 x i8], [4 x i8]* %10, i64 0, i64 3
store i8 %9, i8* %11
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
define i32 @foo1() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ ADC_ETC_IRQ2_DriverIRQHandler();
__attribute__((weak)) void ADC_ETC_IRQ2_IRQHandler(void) {
  ADC_ETC_IRQ2_DriverIRQHandler();
}


x86 assembly (clang, -O0):
<ADC_ETC_IRQ2_IRQHandler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <ADC_ETC_IRQ2_DriverIRQHandler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADC_ETC_IRQ2_IRQHandler>:
xor    %eax,%eax
jmp    1030 <ADC_ETC_IRQ2_DriverIRQHandler@plt>

LLVM IR (-O0):
define weak void @ADC_ETC_IRQ2_IRQHandler() {
%1 = call i32 (...) @ADC_ETC_IRQ2_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @ADC_ETC_IRQ2_IRQHandler() {
%1 = tail call i32 (...) @ADC_ETC_IRQ2_DriverIRQHandler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int print_error(void) {
  puts("Error: Provide an argument to specify which test to run.\r\n");
  puts("1 = Simple testing of the first fit algorithm.\r\n");
  puts("2 = Simple testing of the best fit algorithm.\r\n");
  puts("3 = Peformance testing of both algorithms.\r\n");
  return -1;
}


x86 assembly (clang, -O0):
<print_error>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
lea    0xf14(%rip),%rdi
call   1030 <puts@plt>
lea    0xf39(%rip),%rdi
call   1030 <puts@plt>
lea    0xf5d(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_error>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf17(%rip),%rdi
call   1030 <puts@plt>
lea    0xf3c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf60(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [59 x i8] c"Error: Provide an argument to specify which test to run.\0D\0A\00"
@.str.1 = [49 x i8] c"1 = Simple testing of the first fit algorithm.\0D\0A\00"
@.str.2 = [48 x i8] c"2 = Simple testing of the best fit algorithm.\0D\0A\00"
@.str.3 = [45 x i8] c"3 = Peformance testing of both algorithms.\0D\0A\00"
define i32 @print_error() {
%1 = call i32 @puts(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @puts(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @puts(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.3, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@.str = [59 x i8] c"Error: Provide an argument to specify which test to run.\0D\0A\00"
@.str.1 = [49 x i8] c"1 = Simple testing of the first fit algorithm.\0D\0A\00"
@.str.2 = [48 x i8] c"2 = Simple testing of the best fit algorithm.\0D\0A\00"
@.str.3 = [45 x i8] c"3 = Peformance testing of both algorithms.\0D\0A\00"
define i32 @print_error() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.3, i64 0, i64 0))
ret i32 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_VISIBLESTRING;

/* Variables and functions */
int /*<<< orphan*/ ASN1_VISIBLESTRING_it;
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
ASN1_VISIBLESTRING *ASN1_VISIBLESTRING_new(void) {
  return (ASN1_VISIBLESTRING *)ASN1_item_new(&ASN1_VISIBLESTRING_it);
}


x86 assembly (clang, -O0):
<ASN1_VISIBLESTRING_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rdi
call   1030 <ASN1_item_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ASN1_VISIBLESTRING_new>:
mov    0x2ec9(%rip),%rdi
jmp    1030 <ASN1_item_new@plt>

LLVM IR (-O0):
@ASN1_VISIBLESTRING_it = global i32 0
define i32* @ASN1_VISIBLESTRING_new() {
%1 = call i64 @ASN1_item_new(i32* @ASN1_VISIBLESTRING_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
@ASN1_VISIBLESTRING_it = global i32 0
define i32* @ASN1_VISIBLESTRING_new() {
%1 = tail call i64 @ASN1_item_new(i32* @ASN1_VISIBLESTRING_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
int main(int argc, char *argv[]) {
  int single = (3 * 3 + 4 * 3 + 5 * 3);
  int teen = (6 * 2 + 7 * 2 + 8 * 4 + 9);
  int ten = 3;
  int tens = (6 * 4 + 5 * 3 + 7);
  int and = 3;
  int hundred = 7;
  int one_thousand = 11;
  int sum = single * 9 * 10 + teen * 10 + tens * 10 * 10 + ten * 10 +
            single * 100 + hundred * 900 + and*99 * 9 + one_thousand;
  printf("Sum: %d\n", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x24,-0x14(%rbp)
movl   $0x43,-0x18(%rbp)
movl   $0x3,-0x1c(%rbp)
movl   $0x2e,-0x20(%rbp)
movl   $0x3,-0x24(%rbp)
movl   $0x7,-0x28(%rbp)
movl   $0xb,-0x2c(%rbp)
imul   $0x9,-0x14(%rbp),%eax
imul   $0xa,%eax,%eax
imul   $0xa,-0x18(%rbp),%ecx
add    %ecx,%eax
imul   $0xa,-0x20(%rbp),%ecx
imul   $0xa,%ecx,%ecx
add    %ecx,%eax
imul   $0xa,-0x1c(%rbp),%ecx
add    %ecx,%eax
imul   $0x64,-0x14(%rbp),%ecx
add    %ecx,%eax
imul   $0x384,-0x28(%rbp),%ecx
add    %ecx,%eax
imul   $0x63,-0x24(%rbp),%ecx
imul   $0x9,%ecx,%ecx
add    %ecx,%eax
add    -0x2c(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%esi
lea    0xe65(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x5284,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"Sum: %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 36, i32* %6
store i32 67, i32* %7
store i32 3, i32* %8
store i32 46, i32* %9
store i32 3, i32* %10
store i32 7, i32* %11
store i32 11, i32* %12
%14 = load i32, i32* %6
%15 = mul nsw i32 %14, 9
%16 = mul nsw i32 %15, 10
%17 = load i32, i32* %7
%18 = mul nsw i32 %17, 10
%19 = add nsw i32 %16, %18
%20 = load i32, i32* %9
%21 = mul nsw i32 %20, 10
%22 = mul nsw i32 %21, 10
%23 = add nsw i32 %19, %22
%24 = load i32, i32* %8
%25 = mul nsw i32 %24, 10
%26 = add nsw i32 %23, %25
%27 = load i32, i32* %6
%28 = mul nsw i32 %27, 100
%29 = add nsw i32 %26, %28
%30 = load i32, i32* %11
%31 = mul nsw i32 %30, 900
%32 = add nsw i32 %29, %31
%33 = load i32, i32* %10
%34 = mul nsw i32 %33, 99
%35 = mul nsw i32 %34, 9
%36 = add nsw i32 %32, %35
%37 = load i32, i32* %12
%38 = add nsw i32 %36, %37
store i32 %38, i32* %13
%39 = load i32, i32* %13
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %39)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"Sum: %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 21124)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int strend(char *, char *);
int main() {
  char *s = "This";
  char *t = "is";
  printf("%d\n", strend(s, t));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xec1(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strend@plt>
mov    %eax,%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed3(%rip),%rsi
call   1040 <strend@plt>
lea    0xeca(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"This\00"
@.str.1 = [3 x i8] c"is\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %3
%4 = load i8*, i8** %2
%5 = load i8*, i8** %3
%6 = call i32 @strend(i8* %4, i8* %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"This\00"
@.str.1 = [3 x i8] c"is\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @strend(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %1)
ret i32 0
}
void hash_xxfast_init() {}


x86 assembly (clang, -O0):
<hash_xxfast_init>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_xxfast_init>:
ret

LLVM IR (-O0):
define void @hash_xxfast_init() {
ret void
}

LLVM IR (-O2):
define void @hash_xxfast_init() {
ret void
}
void UARTScratchPadRegWrite(unsigned int baseAdd, unsigned int scratchValue) {
  (*((volatile unsigned int *)(baseAdd + (0x1C)))) &= ~((0x000000FFu));
  (*((volatile unsigned int *)(baseAdd + (0x1C)))) |=
      (scratchValue & (0x000000FFu));
}


x86 assembly (clang, -O0):
<UARTScratchPadRegWrite>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1c,%eax
mov    %eax,%eax
mov    (%rax),%ecx
and    $0xffffff00,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%edx
and    $0xff,%edx
mov    -0x4(%rbp),%eax
add    $0x1c,%eax
mov    %eax,%eax
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTScratchPadRegWrite>:
add    $0x1c,%edi
andl   $0xffffff00,(%rdi)
movzbl %sil,%eax
or     %eax,(%rdi)
ret

LLVM IR (-O0):
define void @UARTScratchPadRegWrite(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = add i32 %5, 28
%7 = zext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
%9 = load volatile i32, i32* %8
%10 = and i32 %9, -256
store volatile i32 %10, i32* %8
%11 = load i32, i32* %4
%12 = and i32 %11, 255
%13 = load i32, i32* %3
%14 = add i32 %13, 28
%15 = zext i32 %14 to i64
%16 = inttoptr i64 %15 to i32*
%17 = load volatile i32, i32* %16
%18 = or i32 %17, %12
store volatile i32 %18, i32* %16
ret void
}

LLVM IR (-O2):
define void @UARTScratchPadRegWrite(i32 %0, i32 %1) {
%3 = add i32 %0, 28
%4 = zext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
%7 = and i32 %6, -256
store volatile i32 %7, i32* %5
%8 = and i32 %1, 255
%9 = load volatile i32, i32* %5
%10 = or i32 %9, %8
store volatile i32 %10, i32* %5
ret void
}
int shift_funktion2(int var, int shift) { return (var >> shift); }


x86 assembly (clang, -O0):
<shift_funktion2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<shift_funktion2>:
mov    %esi,%ecx
mov    %edi,%eax
sar    %cl,%eax
ret

LLVM IR (-O0):
define i32 @shift_funktion2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = ashr i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @shift_funktion2(i32 %0, i32 %1) {
%3 = ashr i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ puts(char *);
void eat(void) {
  printf("Ham - ham...");
  printf("\n\tYummy - yummy");
  puts("\n\n");
}


x86 assembly (clang, -O0):
<eat>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
lea    0xed6(%rip),%rdi
call   1040 <printf@plt>
lea    0xeda(%rip),%rdi
call   1030 <puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<eat>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
lea    0xed9(%rip),%rdi
call   1040 <printf@plt>
lea    0xedd(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"Ham - ham...\00"
@.str.1 = [16 x i8] c"\0A\09Yummy - yummy\00"
@.str.2 = [3 x i8] c"\0A\0A\00"
define void @eat() {
%1 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"Ham - ham...\00"
@.str.1 = [16 x i8] c"\0A\09Yummy - yummy\00"
@.str.2 = [3 x i8] c"\0A\0A\00"
define void @eat() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int MAC_GEN(unsigned char const *, unsigned char const *, unsigned long long,
            unsigned char *, unsigned long long *);
int crypto_mac_gen(unsigned char *c, unsigned long long *clen,
                   const unsigned char *m, unsigned long long mlen,
                   const unsigned char *nsec, const unsigned char *npub,
                   const unsigned char *k) {
  int ret;
  ret = MAC_GEN(k, m, mlen, c, clen);
  return 0;
}


x86 assembly (clang, -O0):
<crypto_mac_gen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%r8
call   1030 <MAC_GEN@plt>
mov    %eax,-0x34(%rbp)
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crypto_mac_gen>:
push   %rax
mov    %rsi,%r8
mov    %rdi,%rax
mov    0x10(%rsp),%rdi
mov    %rdx,%rsi
mov    %rcx,%rdx
mov    %rax,%rcx
call   1030 <MAC_GEN@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @crypto_mac_gen(i8* %0, i64* %1, i8* %2, i64 %3, i8* %4, i8* %5, i8* %6) {
%8 = alloca i8*
%9 = alloca i64*
%10 = alloca i8*
%11 = alloca i64
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i32
store i8* %0, i8** %8
store i64* %1, i64** %9
store i8* %2, i8** %10
store i64 %3, i64* %11
store i8* %4, i8** %12
store i8* %5, i8** %13
store i8* %6, i8** %14
%16 = load i8*, i8** %14
%17 = load i8*, i8** %10
%18 = load i64, i64* %11
%19 = load i8*, i8** %8
%20 = load i64*, i64** %9
%21 = call i32 @MAC_GEN(i8* %16, i8* %17, i64 %18, i8* %19, i64* %20)
store i32 %21, i32* %15
ret i32 0
}

LLVM IR (-O2):
define i32 @crypto_mac_gen(i8* %0, i64* %1, i8* %2, i64 %3, i8* nocapture readnone %4, i8* nocapture readnone %5, i8* %6) {
%8 = tail call i32 @MAC_GEN(i8* %6, i8* %2, i64 %3, i8* %0, i64* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
void QEIVelocityEnable(unsigned long ulBase) {
  DEBUG_ASSERT((ulBase == 0x4002C000) || (ulBase == 0x4002D000));
  (*((volatile unsigned long *)(ulBase + 0x00000000))) |= 0x00000020;
}


x86 assembly (clang, -O0):
<QEIVelocityEnable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%al
cmpq   $0x4002c000,-0x8(%rbp)
40
mov    %al,-0x9(%rbp)
je     113d <QEIVelocityEnable+0x2d>
cmpq   $0x4002d000,-0x8(%rbp)
40
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
or     $0x20,%rcx
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<QEIVelocityEnable>:
push   %rbx
mov    %rdi,%rbx
mov    %rdi,%rax
and    $0xffffffffffffefff,%rax
xor    %edi,%edi
cmp    $0x4002c000,%rax
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
orq    $0x20,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @QEIVelocityEnable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 1073922048
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i64, i64* %2
%7 = icmp eq i64 %6, 1073926144
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
%11 = call i32 @DEBUG_ASSERT(i32 %10)
%12 = load i64, i64* %2
%13 = add i64 %12, 0
%14 = inttoptr i64 %13 to i64*
%15 = load volatile i64, i64* %14
%16 = or i64 %15, 32
store volatile i64 %16, i64* %14
ret void
}

LLVM IR (-O2):
define void @QEIVelocityEnable(i64 %0) {
%2 = and i64 %0, -4097
%3 = icmp eq i64 %2, 1073922048
%4 = zext i1 %3 to i32
%5 = tail call i32 @DEBUG_ASSERT(i32 %4)
%6 = inttoptr i64 %0 to i64*
%7 = load volatile i64, i64* %6
%8 = or i64 %7, 32
store volatile i64 %8, i64* %6
ret void
}
/* Variables and functions */
int archivefile(char *, int);
int /*<<< orphan*/ sprintf(char *, char *, char const *, char const *);
int archivejoin(const char *sub, const char *name, int destfd) {
  char path[256];
  sprintf(path, "%s/%s", sub, name);
  return archivefile(path, destfd);
}


x86 assembly (clang, -O0):
<archivejoin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
lea    -0x120(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeb4(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x120(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <archivefile@plt>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<archivejoin>:
push   %r14
push   %rbx
sub    $0x108,%rsp
mov    %edx,%ebx
mov    %rsi,%rcx
mov    %rdi,%rdx
lea    0xec7(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
call   1040 <sprintf@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <archivefile@plt>
add    $0x108,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s/%s\00"
define i32 @archivejoin(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca [256 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%9 = load i8*, i8** %4
%10 = load i8*, i8** %5
%11 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10)
%12 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%13 = load i32, i32* %6
%14 = call i32 @archivefile(i8* %12, i32 %13)
ret i32 %14
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s/%s\00"
define i32 @archivejoin(i8* %0, i8* %1, i32 %2) {
%4 = alloca [256 x i8]
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%6 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%7 = call i32 @archivefile(i8* %5, i32 %2)
ret i32 %7
}
int do_713() { return 713; }


x86 assembly (clang, -O0):
<do_713>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2c9,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_713>:
mov    $0x2c9,%eax
ret

LLVM IR (-O0):
define i32 @do_713() {
ret i32 713
}

LLVM IR (-O2):
define i32 @do_713() {
ret i32 713
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x36() {
  Assert_real((isascii(54)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isascii.c",
              275, ("isascii should be 1 for 6"));
}


x86 assembly (clang, -O0):
<t_isascii_0x36>:
push   %rbp
mov    %rsp,%rbp
mov    $0x36,%edi
call   1030 <isascii@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x113,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isascii_0x36>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0x113,%edx
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for 6\00"
define void @t_isascii_0x36() {
%1 = call i32 @isascii(i32 54)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 275, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for 6\00"
define void @t_isascii_0x36() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 275, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void Quadrature0_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<Quadrature0_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <Quadrature0_Handler+0x9>
jmp    1109 <Quadrature0_Handler+0x9>

x86 assembly (clang, -O2):
<Quadrature0_Handler>:
jmp    1100 <Quadrature0_Handler>

LLVM IR (-O0):
define void @Quadrature0_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @Quadrature0_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ timlib_is_number(char *);
int /*<<< orphan*/ timlib_strcpy(char *, char *, int /*<<< orphan*/);
char *timlib_trim_character(char *, char *);
char *timlib_remove_thousands_separator(char *destination, char *source) {
  timlib_strcpy(destination, source, 0);
  if (!timlib_is_number(destination)) {
    return destination;
  } else {
    return timlib_trim_character(destination, ",");
  }
}


x86 assembly (clang, -O0):
<timlib_remove_thousands_separator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
xor    %edx,%edx
call   1040 <timlib_strcpy@plt>
mov    -0x10(%rbp),%rdi
call   1030 <timlib_is_number@plt>
cmp    $0x0,%eax
jne    116e <timlib_remove_thousands_separator+0x3e>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1182 <timlib_remove_thousands_separator+0x52>
mov    -0x10(%rbp),%rdi
lea    0xe87(%rip),%rsi
call   1050 <timlib_trim_character@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timlib_remove_thousands_separator>:
push   %rbx
mov    %rdi,%rbx
xor    %edx,%edx
call   1040 <timlib_strcpy@plt>
mov    %rbx,%rdi
call   1030 <timlib_is_number@plt>
test   %eax,%eax
je     1157 <timlib_remove_thousands_separator+0x27>
lea    0xeb2(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <timlib_trim_character@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c",\00"
define i8* @timlib_remove_thousands_separator(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = load i8*, i8** %5
%8 = call i32 @timlib_strcpy(i8* %6, i8* %7, i32 0)
%9 = load i8*, i8** %4
%10 = call i32 @timlib_is_number(i8* %9)
%11 = icmp ne i32 %10, 0
br i1 %11, label %14, label %12
12: ; preds = %2
%13 = load i8*, i8** %4
store i8* %13, i8** %3
br label %17
14: ; preds = %2
%15 = load i8*, i8** %4
%16 = call i8* @timlib_trim_character(i8* %15, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %16, i8** %3
br label %17
17: ; preds = %14, %12
%18 = load i8*, i8** %3
ret i8* %18
}

LLVM IR (-O2):
@.str = [2 x i8] c",\00"
define i8* @timlib_remove_thousands_separator(i8* %0, i8* %1) {
%3 = tail call i32 @timlib_strcpy(i8* %0, i8* %1, i32 0)
%4 = tail call i32 @timlib_is_number(i8* %0)
%5 = icmp eq i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i8* @timlib_trim_character(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %6
%9 = phi i8* [ %7, %6 ], [ %0, %2 ]
ret i8* %9
}
void f70(void) {
a:
  ({
    ({ 0; });
    ({ 0; });
    goto a;
    0;
  });
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  0;
}


x86 assembly (clang, -O0):
<f70>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
jmp    1104 <f70+0x4>

x86 assembly (clang, -O2):
<f70>:
jmp    1100 <f70>

LLVM IR (-O0):
define void @f70() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
br label %4
4: ; preds = %4, %0
store i32 0, i32* %1
%5 = load i32, i32* %1
store i32 0, i32* %2
%6 = load i32, i32* %2
br label %4
}

LLVM IR (-O2):
define void @f70() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int errno;
int sigprocmask(int, int /*<<< orphan*/ const *, int /*<<< orphan*/ *);
int pthread_sigmask(int how, const sigset_t *set, sigset_t *old) {
  int ret = sigprocmask(how, set, old);
  if (ret)
    return errno;
  return 0;
}


x86 assembly (clang, -O0):
<pthread_sigmask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <sigprocmask@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1151 <pthread_sigmask+0x41>
mov    0x2e99(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1158 <pthread_sigmask+0x48>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_sigmask>:
push   %rax
call   1030 <sigprocmask@plt>
test   %eax,%eax
je     1123 <pthread_sigmask+0x13>
mov    0x2ebf(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@errno = global i32 0
define i32 @pthread_sigmask(i32 %0, i32* %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32
store i32 %0, i32* %5
store i32* %1, i32** %6
store i32* %2, i32** %7
%9 = load i32, i32* %5
%10 = load i32*, i32** %6
%11 = load i32*, i32** %7
%12 = call i32 @sigprocmask(i32 %9, i32* %10, i32* %11)
store i32 %12, i32* %8
%13 = load i32, i32* %8
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %3
%16 = load i32, i32* @errno
store i32 %16, i32* %4
br label %18
17: ; preds = %3
store i32 0, i32* %4
br label %18
18: ; preds = %17, %15
%19 = load i32, i32* %4
ret i32 %19
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @pthread_sigmask(i32 %0, i32* %1, i32* %2) {
%4 = tail call i32 @sigprocmask(i32 %0, i32* %1, i32* %2)
%5 = icmp eq i32 %4, 0
%6 = load i32, i32* @errno
%7 = select i1 %5, i32 0, i32 %6
ret i32 %7
}
/* Variables and functions */
unsigned char cmd_number(char const *, char const *, void *);
int /*<<< orphan*/ strcasecmp(char const *, char *);
unsigned char cmd_number_inf(const char *com, const char *val, void *place) {
  if (!strcasecmp(val, "inf")) {
    *(int *)place = 0;
    return 1;
  }
  return cmd_number(com, val, place);
}


x86 assembly (clang, -O0):
<cmd_number_inf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xec1(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    1160 <cmd_number_inf+0x40>
mov    -0x20(%rbp),%rax
movl   $0x0,(%rax)
movb   $0x1,-0x1(%rbp)
jmp    1174 <cmd_number_inf+0x54>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <cmd_number@plt>
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_number_inf>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
lea    0xecb(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     1154 <cmd_number_inf+0x34>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <cmd_number@plt>
movl   $0x0,(%r14)
mov    $0x1,%al
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"inf\00"
define zeroext i8 @cmd_number_inf(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
%8 = load i8*, i8** %6
%9 = call i32 @strcasecmp(i8* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%10 = icmp ne i32 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %3
%12 = load i8*, i8** %7
%13 = bitcast i8* %12 to i32*
store i32 0, i32* %13
store i8 1, i8* %4
br label %19
14: ; preds = %3
%15 = load i8*, i8** %5
%16 = load i8*, i8** %6
%17 = load i8*, i8** %7
%18 = call zeroext i8 @cmd_number(i8* %15, i8* %16, i8* %17)
store i8 %18, i8* %4
br label %19
19: ; preds = %14, %11
%20 = load i8, i8* %4
ret i8 %20
}

LLVM IR (-O2):
@.str = [4 x i8] c"inf\00"
define zeroext i8 @cmd_number_inf(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @strcasecmp(i8* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = bitcast i8* %2 to i32*
store i32 0, i32* %7
br label %10
8: ; preds = %3
%9 = tail call zeroext i8 @cmd_number(i8* %0, i8* %1, i8* %2)
br label %10
10: ; preds = %8, %6
%11 = phi i8 [ %9, %8 ], [ 1, %6 ]
ret i8 %11
}
double sin(double x) {
  __asm__("fsin" : "+t"(x));
  return x;
}


x86 assembly (clang, -O0):
<sin>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
fldl   -0x10(%rbp)
fsin
fstpl  -0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sin>:
movsd  %xmm0,-0x8(%rsp)
fldl   -0x8(%rsp)
fsin
fstpl  -0x10(%rsp)
movsd  -0x10(%rsp),%xmm0
ret

LLVM IR (-O0):
define double @sin(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double asm "fsin", "={st},0,~{dirflag},~{fpsr},~{flags}"(double %3)
store double %4, double* %2
%5 = load double, double* %2
ret double %5
}

LLVM IR (-O2):
define double @sin(double %0) {
%2 = tail call double asm "fsin", "={st},0,~{dirflag},~{fpsr},~{flags}"(double %0)
ret double %2
}
/* Variables and functions */
char *SafeInitialiseString_m(int);
char *ConvertCharToString_m(const char input) {
  if (input == '\0')
    return NULL;
  char *output = SafeInitialiseString_m(1);
  output[0] = input;
  output[1] = '\0';
  return output;
}


x86 assembly (clang, -O0):
<ConvertCharToString_m>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
cmp    $0x0,%eax
jne    1138 <ConvertCharToString_m+0x28>
movq   $0x0,-0x8(%rbp)
jmp    115f <ConvertCharToString_m+0x4f>
mov    $0x1,%edi
call   1030 <SafeInitialiseString_m@plt>
mov    %rax,-0x18(%rbp)
mov    -0x9(%rbp),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
movb   $0x0,0x1(%rax)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ConvertCharToString_m>:
push   %rbx
mov    %edi,%ebx
test   %bl,%bl
je     1129 <ConvertCharToString_m+0x19>
mov    $0x1,%edi
call   1030 <SafeInitialiseString_m@plt>
mov    %bl,(%rax)
movb   $0x0,0x1(%rax)
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @ConvertCharToString_m(i8 signext %0) {
%2 = alloca i8*
%3 = alloca i8
%4 = alloca i8*
store i8 %0, i8* %3
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i8* null, i8** %2
br label %17
9: ; preds = %1
%10 = call i8* @SafeInitialiseString_m(i32 1)
store i8* %10, i8** %4
%11 = load i8, i8* %3
%12 = load i8*, i8** %4
%13 = getelementptr inbounds i8, i8* %12, i64 0
store i8 %11, i8* %13
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8 0, i8* %15
%16 = load i8*, i8** %4
store i8* %16, i8** %2
br label %17
17: ; preds = %9, %8
%18 = load i8*, i8** %2
ret i8* %18
}

LLVM IR (-O2):
define i8* @ConvertCharToString_m(i8 signext %0) {
%2 = icmp eq i8 %0, 0
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i8* @SafeInitialiseString_m(i32 1)
store i8 %0, i8* %4
%5 = getelementptr inbounds i8, i8* %4, i64 1
store i8 0, i8* %5
br label %6
6: ; preds = %1, %3
%7 = phi i8* [ %4, %3 ], [ null, %1 ]
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
int /*<<< orphan*/ strncmp(char const *, char const *, int /*<<< orphan*/);
int startsWith(const char *data, const char *prefix) {
  return !strncmp(data, prefix, strlen(prefix));
}


x86 assembly (clang, -O0):
<startsWith>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<startsWith>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @startsWith(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i32 @strncmp(i8* %5, i8* %6, i32 %8)
%10 = icmp ne i32 %9, 0
%11 = xor i1 %10, true
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @startsWith(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @strncmp(i8* %0, i8* %1, i32 %3)
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
int bitAnd(int x, int y) { return ~((~x) | (~y)); }


x86 assembly (clang, -O0):
<bitAnd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
mov    -0x8(%rbp),%ecx
xor    $0xffffffff,%ecx
or     %ecx,%eax
xor    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitAnd>:
mov    %edi,%eax
and    %esi,%eax
ret

LLVM IR (-O0):
define i32 @bitAnd(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = xor i32 %5, -1
%7 = load i32, i32* %4
%8 = xor i32 %7, -1
%9 = or i32 %6, %8
%10 = xor i32 %9, -1
ret i32 %10
}

LLVM IR (-O2):
define i32 @bitAnd(i32 %0, i32 %1) {
%3 = and i32 %1, %0
ret i32 %3
}
double mafScoreMultizMaxCol(int species) {
  int i, count = 0;
  for (i = 1; i < species; ++i)
    count += i;
  return 100.0 * count;
}


x86 assembly (clang, -O0):
<mafScoreMultizMaxCol>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1138 <mafScoreMultizMaxCol+0x38>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1115 <mafScoreMultizMaxCol+0x15>
cvtsi2sdl -0xc(%rbp),%xmm1
movsd  0xebb(%rip),%xmm0
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mafScoreMultizMaxCol>:
xorpd  %xmm0,%xmm0
cmp    $0x2,%edi
jl     112b <mafScoreMultizMaxCol+0x2b>
lea    -0x2(%rdi),%eax
lea    -0x3(%rdi),%ecx
imul   %rax,%rcx
shr    %rcx
lea    (%rcx,%rdi,2),%eax
add    $0xfffffffd,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xed5(%rip),%xmm0
ret

LLVM IR (-O0):
define double @mafScoreMultizMaxCol(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %4
store i32 1, i32* %3
br label %5
5: ; preds = %13, %1
%6 = load i32, i32* %3
%7 = load i32, i32* %2
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %16
9: ; preds = %5
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = add nsw i32 %11, %10
store i32 %12, i32* %4
br label %13
13: ; preds = %9
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %5
16: ; preds = %5
%17 = load i32, i32* %4
%18 = sitofp i32 %17 to double
%19 = fmul double 1.000000e+02, %18
ret double %19
}

LLVM IR (-O2):
define double @mafScoreMultizMaxCol(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %3, label %16
3: ; preds = %1
%4 = shl nuw i32 %0, 1
%5 = add nsw i32 %0, -2
%6 = zext i32 %5 to i33
%7 = add nsw i32 %0, -3
%8 = zext i32 %7 to i33
%9 = mul i33 %6, %8
%10 = lshr i33 %9, 1
%11 = trunc i33 %10 to i32
%12 = add i32 %4, %11
%13 = add i32 %12, -3
%14 = sitofp i32 %13 to double
%15 = fmul double %14, 1.000000e+02
br label %16
16: ; preds = %3, %1
%17 = phi double [ 0.000000e+00, %1 ], [ %15, %3 ]
ret double %17
}