xunge/DecIR huggingface dataset:
/* Variables and functions */
int GET32(int);
unsigned int uart_recv(void) {
  while (1) {
    if (GET32((0x20000000 + 0x00215054)) & 0x01)
      break;
  }
  return (GET32((0x20000000 + 0x00215040)) & 0xFF);
}


x86 assembly (clang, -O0):
<uart_recv>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <uart_recv+0x9>
mov    $0x20215054,%edi
call   1030 <GET32@plt>
and    $0x1,%eax
cmp    $0x0,%eax
je     1134 <uart_recv+0x24>
jmp    1139 <uart_recv+0x29>
jmp    1119 <uart_recv+0x9>
mov    $0x20215040,%edi
call   1030 <GET32@plt>
and    $0xff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_recv>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x20215054,%edi
call   1030 <GET32@plt>
test   $0x1,%al
je     1120 <uart_recv+0x10>
mov    $0x20215040,%edi
call   1030 <GET32@plt>
movzbl %al,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @uart_recv() {
br label %1
1: ; preds = %0, %6
%2 = call i32 @GET32(i32 539054164)
%3 = and i32 %2, 1
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %7
6: ; preds = %1
br label %1
7: ; preds = %5
%8 = call i32 @GET32(i32 539054144)
%9 = and i32 %8, 255
ret i32 %9
}

LLVM IR (-O2):
define i32 @uart_recv() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @GET32(i32 539054164)
%3 = and i32 %2, 1
%4 = icmp eq i32 %3, 0
br i1 %4, label %1, label %5
5: ; preds = %1
%6 = tail call i32 @GET32(i32 539054144)
%7 = and i32 %6, 255
ret i32 %7
}
void checkHeap() {}


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

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

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

LLVM IR (-O2):
define void @checkHeap() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getNumber(double *);
double sqrt(double);
double raizCuadrada(double a) {
  getNumber(&a);
  return (sqrt(a));
}


x86 assembly (clang, -O0):
<raizCuadrada>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <getNumber@plt>
movsd  -0x8(%rbp),%xmm0
call   1040 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<raizCuadrada>:
push   %rax
movsd  %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <getNumber@plt>
movsd  (%rsp),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1143 <raizCuadrada+0x23>
sqrtsd %xmm0,%xmm0
pop    %rax
ret
call   1040 <sqrt@plt>
pop    %rax
ret

LLVM IR (-O0):
define double @raizCuadrada(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i32 @getNumber(double* %2)
%4 = load double, double* %2
%5 = call double @sqrt(double %4)
ret double %5
}

LLVM IR (-O2):
define double @raizCuadrada(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i32 @getNumber(double* %2)
%4 = load double, double* %2
%5 = call double @sqrt(double %4)
ret double %5
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char *);
int stdio_filename_p(const char *name) { return (strcmp(name, "-") == 0); }


x86 assembly (clang, -O0):
<stdio_filename_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdio_filename_p>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"-\00"
define i32 @stdio_filename_p(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
@.str = [2 x i8] c"-\00"
define i32 @stdio_filename_p(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t I2CMasterErr(uint32_t ui32Base) {
  uint32_t ui32Err;
  ;
  ui32Err = (*((volatile unsigned long *)(ui32Base + 0x00000004)));
  if (ui32Err & 0x00000001) {
    return (0);
  }
  if (ui32Err & (0x00000002 | 0x00000010)) {
    return (ui32Err & (0x00000010 | 0x00000008 | 0x00000004));
  } else {
    return (0);
  }
}


x86 assembly (clang, -O0):
<I2CMasterErr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x4,%eax
cltq
mov    (%rax),%rax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1130 <I2CMasterErr+0x30>
movl   $0x0,-0x4(%rbp)
jmp    1154 <I2CMasterErr+0x54>
mov    -0xc(%rbp),%eax
and    $0x12,%eax
cmp    $0x0,%eax
je     114d <I2CMasterErr+0x4d>
mov    -0xc(%rbp),%eax
and    $0x1c,%eax
mov    %eax,-0x4(%rbp)
jmp    1154 <I2CMasterErr+0x54>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CMasterErr>:
movslq %edi,%rax
mov    0x4(%rax),%rcx
mov    %ecx,%eax
and    $0x12,%eax
mov    %ecx,%edx
and    $0x1c,%edx
test   %eax,%eax
cmove  %eax,%edx
xor    %eax,%eax
test   $0x1,%cl
cmove  %edx,%eax
ret

LLVM IR (-O0):
define i32 @I2CMasterErr(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = add nsw i32 %5, 4
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
%10 = trunc i64 %9 to i32
store i32 %10, i32* %4
%11 = load i32, i32* %4
%12 = and i32 %11, 1
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %1
store i32 0, i32* %2
br label %23
15: ; preds = %1
%16 = load i32, i32* %4
%17 = and i32 %16, 18
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %22
19: ; preds = %15
%20 = load i32, i32* %4
%21 = and i32 %20, 28
store i32 %21, i32* %2
br label %23
22: ; preds = %15
store i32 0, i32* %2
br label %23
23: ; preds = %22, %19, %14
%24 = load i32, i32* %2
ret i32 %24
}

LLVM IR (-O2):
define i32 @I2CMasterErr(i32 %0) {
%2 = add nsw i32 %0, 4
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i64*
%5 = load volatile i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = and i32 %6, 1
%8 = icmp ne i32 %7, 0
%9 = and i32 %6, 18
%10 = icmp eq i32 %9, 0
%11 = or i1 %8, %10
%12 = and i32 %6, 28
%13 = select i1 %11, i32 0, i32 %12
ret i32 %13
}
int hashFunction(char a[20]) { return (int)a[0]; }


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

x86 assembly (clang, -O2):
<hashFunction>:
movsbl (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @hashFunction(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @hashFunction(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
ret i32 %3
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int multprec_Newton_Laurent_step(int deci) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc(329, &deci, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<multprec_Newton_Laurent_step>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x149,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<multprec_Newton_Laurent_step>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x149,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @multprec_Newton_Laurent_step(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32 %0, i32* %2
%6 = load i32*, i32** %3
%7 = load double*, double** %5
%8 = call i32 @_ada_use_c2phc(i32 329, i32* %2, i32* %6, double* %7, i32 0)
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @multprec_Newton_Laurent_step(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc(i32 329, i32* %2, i32* undef, double* undef, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ clog_set_buffer_len(int *);
void clog_set_buffer_len_(int *w) { clog_set_buffer_len(w); }


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

x86 assembly (clang, -O2):
<clog_set_buffer_len_>:
jmp    1030 <clog_set_buffer_len@plt>

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

LLVM IR (-O2):
define void @clog_set_buffer_len_(i32* %0) {
%2 = tail call i32 @clog_set_buffer_len(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printer(char *);
void *func1(void *arg) {
  char *p = "hello";
  printer(p);
}


x86 assembly (clang, -O0):
<func1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
lea    0xedd(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <printer@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func1>:
lea    0xee9(%rip),%rdi
jmp    1030 <printer@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"hello\00"
define i8* @func1(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @printer(i8* %5)
%7 = load i8*, i8** %2
ret i8* %7
}

LLVM IR (-O2):
@.str = [6 x i8] c"hello\00"
define noalias i8* @func1(i8* nocapture readnone %0) {
%2 = tail call i32 @printer(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ test_configfile_addrbuf_eq_remote_ip_mask();
int main(void) {
  test_configfile_addrbuf_eq_remote_ip_mask();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_configfile_addrbuf_eq_remote_ip_mask@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_configfile_addrbuf_eq_remote_ip_mask()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_configfile_addrbuf_eq_remote_ip_mask()
ret i32 0
}
/* Type definitions */
struct globber {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct globber *);
void free_globber(struct globber *old) { free(old); }


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

x86 assembly (clang, -O2):
<free_globber>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.globber = type { i32 }
define void @free_globber(%struct.globber* %0) {
%2 = alloca %struct.globber*
store %struct.globber* %0, %struct.globber** %2
%3 = load %struct.globber*, %struct.globber** %2
%4 = call i32 @free(%struct.globber* %3)
ret void
}

LLVM IR (-O2):
%struct.globber = type { i32 }
define void @free_globber(%struct.globber* nocapture %0) {
%2 = tail call i32 @free(%struct.globber* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
scalar_t__ _mm_extract_epi8(int /*<<< orphan*/, int);
int foo8(__m128i x) { return (char)_mm_extract_epi8(x, 4); }


x86 assembly (clang, -O0):
<foo8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x4,%esi
call   1030 <_mm_extract_epi8@plt>
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo8>:
push   %rax
mov    $0x4,%esi
call   1030 <_mm_extract_epi8@plt>
movsbl %al,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @foo8(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @_mm_extract_epi8(i32 %3, i32 4)
%5 = trunc i64 %4 to i8
%6 = sext i8 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @foo8(i32 %0) {
%2 = tail call i64 @_mm_extract_epi8(i32 %0, i32 4)
%3 = trunc i64 %2 to i32
%4 = shl i32 %3, 24
%5 = ashr exact i32 %4, 24
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ NRF24_InsRead(int, int /*<<< orphan*/ *, int);
void NRF24_RXFIFO_Read(uint8_t *pbuff, uint32_t num) {
  NRF24_InsRead(0x61, pbuff, num <= 32 ? num : 32);
}


x86 assembly (clang, -O0):
<NRF24_RXFIFO_Read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x20,-0xc(%rbp)
jg     113c <NRF24_RXFIFO_Read+0x2c>
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    1149 <NRF24_RXFIFO_Read+0x39>
mov    $0x20,%eax
mov    %eax,-0x1c(%rbp)
jmp    1149 <NRF24_RXFIFO_Read+0x39>
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    $0x61,%edi
call   1030 <NRF24_InsRead@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NRF24_RXFIFO_Read>:
mov    %rdi,%rax
cmp    $0x20,%esi
mov    $0x20,%edx
cmovl  %esi,%edx
mov    $0x61,%edi
mov    %rax,%rsi
jmp    1030 <NRF24_InsRead@plt>

LLVM IR (-O0):
define void @NRF24_RXFIFO_Read(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 = icmp sle i32 %6, 32
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %4
br label %11
10: ; preds = %2
br label %11
11: ; preds = %10, %8
%12 = phi i32 [ %9, %8 ], [ 32, %10 ]
%13 = call i32 @NRF24_InsRead(i32 97, i32* %5, i32 %12)
ret void
}

LLVM IR (-O2):
define void @NRF24_RXFIFO_Read(i32* %0, i32 %1) {
%3 = icmp slt i32 %1, 32
%4 = select i1 %3, i32 %1, i32 32
%5 = tail call i32 @NRF24_InsRead(i32 97, i32* %0, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
int magellan_init(int fd, unsigned long *id, unsigned long *extra) {
  write(fd, "m3\rpBB\rz\r", 9);
  return 0;
}


x86 assembly (clang, -O0):
<magellan_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
lea    0xed3(%rip),%rsi
mov    $0x9,%edx
call   1030 <write@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<magellan_init>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x9,%edx
call   1030 <write@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"m3\0DpBB\0Dz\0D\00"
define i32 @magellan_init(i32 %0, i64* %1, i64* %2) {
%4 = alloca i32
%5 = alloca i64*
%6 = alloca i64*
store i32 %0, i32* %4
store i64* %1, i64** %5
store i64* %2, i64** %6
%7 = load i32, i32* %4
%8 = call i32 @write(i32 %7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 9)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"m3\0DpBB\0Dz\0D\00"
define i32 @magellan_init(i32 %0, i64* nocapture readnone %1, i64* nocapture readnone %2) {
%4 = tail call i32 @write(i32 %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int, int /*<<< orphan*/);
int /*<<< orphan*/ b_pawns_able_to_push(int, int);
void b_pawns_able_to_push_test(void **state) {
  assert_int_equal(
      0x00A3140000000000ul,
      b_pawns_able_to_push(0x00E3140800000000ul, 0x0000A31400000000ul));
}


x86 assembly (clang, -O0):
<b_pawns_able_to_push_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %esi,%esi
mov    %esi,%edi
call   1030 <b_pawns_able_to_push@plt>
mov    %eax,%esi
xor    %edi,%edi
call   1040 <assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_pawns_able_to_push_test>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1030 <b_pawns_able_to_push@plt>
xor    %edi,%edi
mov    %eax,%esi
pop    %rax
jmp    1040 <assert_int_equal@plt>

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

LLVM IR (-O2):
define void @b_pawns_able_to_push_test(i8** nocapture readnone %0) {
%2 = tail call i32 @b_pawns_able_to_push(i32 0, i32 0)
%3 = tail call i32 @assert_int_equal(i32 0, i32 %2)
ret void
}
int egsygcm_csr_dataout1_set(unsigned int dev_id,
                             union egsygcm_csr_dataout1_u *value) {
  return 1;
}


x86 assembly (clang, -O0):
<egsygcm_csr_dataout1_set>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%union.egsygcm_csr_dataout1_u = type opaque
define i32 @egsygcm_csr_dataout1_set(i32 %0, %union.egsygcm_csr_dataout1_u* %1) {
%3 = alloca i32
%4 = alloca %union.egsygcm_csr_dataout1_u*
store i32 %0, i32* %3
store %union.egsygcm_csr_dataout1_u* %1, %union.egsygcm_csr_dataout1_u** %4
ret i32 1
}

LLVM IR (-O2):
%union.egsygcm_csr_dataout1_u = type opaque
define i32 @egsygcm_csr_dataout1_set(i32 %0, %union.egsygcm_csr_dataout1_u* nocapture readnone %1) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ yyIndent();
yyNextArg() {
  printf(",\n");
  yyIndent();
}


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

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

LLVM IR (-O0):
@.str = [3 x i8] c",\0A\00"
define i32 @yyNextArg() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @yyIndent()
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@str = [2 x i8] c",\00"
define i32 @yyNextArg() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @yyIndent()
ret i32 undef
}
/* Variables and functions */
__attribute__((weak)) void rgblight_decrease_val(void) {}


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

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

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

LLVM IR (-O2):
define weak void @rgblight_decrease_val() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_sort(int);
int main() {
  int i = 0;
  for (i = 16; i <= 1024 * 16; i *= 2) {
    test_sort(i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x10,-0x8(%rbp)
cmpl   $0x4000,-0x8(%rbp)
jg     1150 <main+0x40>
mov    -0x8(%rbp),%edi
call   1030 <test_sort@plt>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x10,%edi
call   1030 <test_sort@plt>
mov    $0x20,%edi
call   1030 <test_sort@plt>
mov    $0x40,%edi
call   1030 <test_sort@plt>
mov    $0x80,%edi
call   1030 <test_sort@plt>
mov    $0x100,%edi
call   1030 <test_sort@plt>
mov    $0x200,%edi
call   1030 <test_sort@plt>
mov    $0x400,%edi
call   1030 <test_sort@plt>
mov    $0x800,%edi
call   1030 <test_sort@plt>
mov    $0x1000,%edi
call   1030 <test_sort@plt>
mov    $0x2000,%edi
call   1030 <test_sort@plt>
mov    $0x4000,%edi
call   1030 <test_sort@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 16, i32* %2
br label %3
3: ; preds = %9, %0
%4 = load i32, i32* %2
%5 = icmp sle i32 %4, 16384
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = load i32, i32* %2
%8 = call i32 @test_sort(i32 %7)
br label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = mul nsw i32 %10, 2
store i32 %11, i32* %2
br label %3
12: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @test_sort(i32 16)
%2 = tail call i32 @test_sort(i32 32)
%3 = tail call i32 @test_sort(i32 64)
%4 = tail call i32 @test_sort(i32 128)
%5 = tail call i32 @test_sort(i32 256)
%6 = tail call i32 @test_sort(i32 512)
%7 = tail call i32 @test_sort(i32 1024)
%8 = tail call i32 @test_sort(i32 2048)
%9 = tail call i32 @test_sort(i32 4096)
%10 = tail call i32 @test_sort(i32 8192)
%11 = tail call i32 @test_sort(i32 16384)
ret i32 0
}
void rop3_174_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = ~T;
  stk2 = S & stk3;
  stk1 = *D | stk2;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


x86 assembly (clang, -O0):
<rop3_174_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xd(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movzbl -0xa(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0xa(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @rop3_174_1_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %6
%11 = zext i8 %10 to i32
%12 = xor i32 %11, -1
%13 = trunc i32 %12 to i8
store i8 %13, i8* %9
%14 = load i8, i8* %5
%15 = zext i8 %14 to i32
%16 = load i8, i8* %9
%17 = zext i8 %16 to i32
%18 = and i32 %15, %17
%19 = trunc i32 %18 to i8
store i8 %19, i8* %8
%20 = load i8*, i8** %4
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
%23 = load i8, i8* %8
%24 = zext i8 %23 to i32
%25 = or i32 %22, %24
%26 = trunc i32 %25 to i8
store i8 %26, i8* %7
%27 = load i8, i8* %7
%28 = zext i8 %27 to i32
%29 = load i8, i8* %5
%30 = zext i8 %29 to i32
%31 = xor i32 %30, -1
%32 = and i32 %28, %31
%33 = load i8, i8* %6
%34 = zext i8 %33 to i32
%35 = xor i32 %34, -1
%36 = and i32 %32, %35
%37 = load i8*, i8** %4
%38 = load i8, i8* %37
%39 = zext i8 %38 to i32
%40 = load i8, i8* %5
%41 = zext i8 %40 to i32
%42 = and i32 %39, %41
%43 = or i32 %36, %42
%44 = load i8*, i8** %4
%45 = load i8, i8* %44
%46 = zext i8 %45 to i32
%47 = load i8, i8* %6
%48 = zext i8 %47 to i32
%49 = and i32 %46, %48
%50 = or i32 %43, %49
%51 = trunc i32 %50 to i8
%52 = load i8*, i8** %4
store i8 %51, i8* %52
ret void
}

LLVM IR (-O2):
define void @rop3_174_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
ret void
}
int ld_eq_mr1(long double *a1, long double a2) { return (((*a1) == (a2))); }


x86 assembly (clang, -O0):
<ld_eq_mr1>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
mov    %rdi,-0x8(%rbp)
fstpt  -0x20(%rbp)
mov    -0x8(%rbp),%rax
fldt   (%rax)
fldt   -0x20(%rbp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setnp  %cl
sete   %al
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_eq_mr1>:
fldt   0x8(%rsp)
fldt   (%rdi)
fucomip %st(1),%st
fstp   %st(0)
setnp  %al
sete   %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @ld_eq_mr1(x86_fp80* %0, x86_fp80 %1) {
%3 = alloca x86_fp80*
%4 = alloca x86_fp80
store x86_fp80* %0, x86_fp80** %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80*, x86_fp80** %3
%6 = load x86_fp80, x86_fp80* %5
%7 = load x86_fp80, x86_fp80* %4
%8 = fcmp oeq x86_fp80 %6, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @ld_eq_mr1(x86_fp80* nocapture %0, x86_fp80 %1) {
%3 = load x86_fp80, x86_fp80* %0
%4 = fcmp oeq x86_fp80 %3, %1
%5 = zext i1 %4 to i32
ret i32 %5
}
void setPerf(short cpu, short mem, short gpu) {}


x86 assembly (clang, -O0):
<setPerf>:
push   %rbp
mov    %rsp,%rbp
mov    %dx,%ax
mov    %si,%cx
mov    %di,%dx
mov    %dx,-0x2(%rbp)
mov    %cx,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @setPerf(i16 signext %0, i16 signext %1, i16 signext %2) {
%4 = alloca i16
%5 = alloca i16
%6 = alloca i16
store i16 %0, i16* %4
store i16 %1, i16* %5
store i16 %2, i16* %6
ret void
}

LLVM IR (-O2):
define void @setPerf(i16 signext %0, i16 signext %1, i16 signext %2) {
ret void
}
int hwlogdummy() { return 0; }


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

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

LLVM IR (-O0):
define i32 @hwlogdummy() {
ret i32 0
}

LLVM IR (-O2):
define i32 @hwlogdummy() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ respawn(char *);
int main(int argc, char **argv) {
  for (int i = 1; i < argc; ++i)
    respawn(argv[i]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1158 <main+0x48>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <respawn@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
cmp    $0x2,%edi
jl     1142 <main+0x32>
mov    %rsi,%r14
mov    %edi,%r15d
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r14,%rbx,8),%rdi
call   1030 <respawn@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %6
br label %7
7: ; preds = %18, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %21
11: ; preds = %7
%12 = load i8**, i8*** %5
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8*, i8** %12, i64 %14
%16 = load i8*, i8** %15
%17 = call i32 @respawn(i8* %16)
br label %18
18: ; preds = %11
%19 = load i32, i32* %6
%20 = add nsw i32 %19, 1
store i32 %20, i32* %6
br label %7
21: ; preds = %7
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %7
6: ; preds = %7, %2
ret i32 0
7: ; preds = %4, %7
%8 = phi i64 [ 1, %4 ], [ %12, %7 ]
%9 = getelementptr inbounds i8*, i8** %1, i64 %8
%10 = load i8*, i8** %9
%11 = tail call i32 @respawn(i8* %10)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %6, label %7
}
int verify_benchmark(int r) {
  int expected = 900;
  if (r != expected)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<verify_benchmark>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x384,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1126 <verify_benchmark+0x26>
movl   $0x0,-0x4(%rbp)
jmp    112d <verify_benchmark+0x2d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<verify_benchmark>:
xor    %eax,%eax
cmp    $0x384,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @verify_benchmark(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 900, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp ne i32 %5, %6
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %2
br label %10
9: ; preds = %1
store i32 1, i32* %2
br label %10
10: ; preds = %9, %8
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @verify_benchmark(i32 %0) {
%2 = icmp eq i32 %0, 900
%3 = zext i1 %2 to i32
ret i32 %3
}
_Bool f(float a) {
  if (a == 5)
    ;
  return 0;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xeea(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    112a <f+0x2a>
jp     112a <f+0x2a>
jmp    112a <f+0x2a>
xor    %eax,%eax
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i1 @f(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp oeq float %3, 5.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %1
br label %6
6: ; preds = %5, %1
ret i1 false
}

LLVM IR (-O2):
define zeroext i1 @f(float %0) {
ret i1 false
}
int((parameter_compat_info_dump))(struct ss7 *ss7, int messagetype,
                                  unsigned char *parm, int len) {
  return len;
}


x86 assembly (clang, -O0):
<parameter_compat_info_dump>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<parameter_compat_info_dump>:
mov    %ecx,%eax
ret

LLVM IR (-O0):
%struct.ss7 = type opaque
define i32 @parameter_compat_info_dump(%struct.ss7* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca %struct.ss7*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store %struct.ss7* %0, %struct.ss7** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i32, i32* %8
ret i32 %9
}

LLVM IR (-O2):
%struct.ss7 = type opaque
define i32 @parameter_compat_info_dump(%struct.ss7* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i32 returned %3) {
ret i32 %3
}
void UI_ChooseServerTypeMenu_Cache(void) {}


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

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

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

LLVM IR (-O2):
define void @UI_ChooseServerTypeMenu_Cache() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int minutos, segundos;
  scanf("%d", &minutos);
  segundos = 60 * minutos;
  printf("%d\n", segundos);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
imul   $0x3c,-0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
imul   $0x3c,0x4(%rsp),%esi
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = mul nsw i32 %4, 60
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ gpio_set(int, int);
void set_16_inv(const int on) { gpio_set(16, !on); }


x86 assembly (clang, -O0):
<set_16_inv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%esi
mov    $0x10,%edi
call   1030 <gpio_set@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_16_inv>:
xor    %esi,%esi
test   %edi,%edi
sete   %sil
mov    $0x10,%edi
jmp    1030 <gpio_set@plt>

LLVM IR (-O0):
define void @set_16_inv(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
%7 = call i32 @gpio_set(i32 16, i32 %6)
ret void
}

LLVM IR (-O2):
define void @set_16_inv(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @gpio_set(i32 16, i32 %3)
ret void
}
void rop3_135_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D & S;
  stk1 = T ^ stk2;
  stk1 = ~stk1;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


x86 assembly (clang, -O0):
<rop3_135_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movzbl -0xa(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0xa(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_135_1_1>:
mov    (%rdi),%al
mov    %eax,%ecx
and    %sil,%cl
or     %dl,%sil
not    %sil
or     %cl,%sil
and    %dl,%al
or     %sil,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_135_1_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i8, i8* %5
%13 = zext i8 %12 to i32
%14 = and i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %8
%16 = load i8, i8* %6
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = xor i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = xor i32 %23, -1
%25 = trunc i32 %24 to i8
store i8 %25, i8* %7
%26 = load i8, i8* %7
%27 = zext i8 %26 to i32
%28 = load i8, i8* %5
%29 = zext i8 %28 to i32
%30 = xor i32 %29, -1
%31 = and i32 %27, %30
%32 = load i8, i8* %6
%33 = zext i8 %32 to i32
%34 = xor i32 %33, -1
%35 = and i32 %31, %34
%36 = load i8*, i8** %4
%37 = load i8, i8* %36
%38 = zext i8 %37 to i32
%39 = load i8, i8* %5
%40 = zext i8 %39 to i32
%41 = and i32 %38, %40
%42 = or i32 %35, %41
%43 = load i8*, i8** %4
%44 = load i8, i8* %43
%45 = zext i8 %44 to i32
%46 = load i8, i8* %6
%47 = zext i8 %46 to i32
%48 = and i32 %45, %47
%49 = or i32 %42, %48
%50 = trunc i32 %49 to i8
%51 = load i8*, i8** %4
store i8 %50, i8* %51
ret void
}

LLVM IR (-O2):
define void @rop3_135_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = and i8 %4, %1
%6 = or i8 %2, %1
%7 = xor i8 %6, -1
%8 = or i8 %5, %7
%9 = and i8 %4, %2
%10 = or i8 %8, %9
store i8 %10, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ leitura();
int /*<<< orphan*/ listagem();
int main() {
  leitura();
  listagem();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <leitura@plt>
mov    $0x0,%al
call   1030 <listagem@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <leitura@plt>
xor    %eax,%eax
call   1030 <listagem@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @leitura()
%3 = call i32 (...) @listagem()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @leitura()
%2 = tail call i32 (...) @listagem()
ret i32 0
}
void exchange_ptr(char **p1, char **p2) {
  char *t;
  t = *p1;
  *p1 = *p2;
  *p2 = t;
}


x86 assembly (clang, -O0):
<exchange_ptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<exchange_ptr>:
mov    (%rdi),%rax
mov    (%rsi),%rcx
mov    %rcx,(%rdi)
mov    %rax,(%rsi)
ret

LLVM IR (-O0):
define void @exchange_ptr(i8** %0, i8** %1) {
%3 = alloca i8**
%4 = alloca i8**
%5 = alloca i8*
store i8** %0, i8*** %3
store i8** %1, i8*** %4
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
store i8* %7, i8** %5
%8 = load i8**, i8*** %4
%9 = load i8*, i8** %8
%10 = load i8**, i8*** %3
store i8* %9, i8** %10
%11 = load i8*, i8** %5
%12 = load i8**, i8*** %4
store i8* %11, i8** %12
ret void
}

LLVM IR (-O2):
define void @exchange_ptr(i8** nocapture %0, i8** nocapture %1) {
%3 = load i8*, i8** %0
%4 = load i8*, i8** %1
store i8* %4, i8** %0
store i8* %3, i8** %1
ret void
}
/* Type definitions */
struct volume {
  int dummy;
};
struct mosaic {
  int dummy;
};

/* Variables and functions */
int umount_ploop(struct mosaic *, struct volume *, int /*<<< orphan*/ *,
                 int /*<<< orphan*/);
int detach_ploop(struct mosaic *m, struct volume *t) {
  return umount_ploop(m, t, NULL, 0);
}


x86 assembly (clang, -O0):
<detach_ploop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
xor    %ecx,%ecx
call   1030 <umount_ploop@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<detach_ploop>:
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <umount_ploop@plt>

LLVM IR (-O0):
%struct.mosaic = type { i32 }
%struct.volume = type { i32 }
define i32 @detach_ploop(%struct.mosaic* %0, %struct.volume* %1) {
%3 = alloca %struct.mosaic*
%4 = alloca %struct.volume*
store %struct.mosaic* %0, %struct.mosaic** %3
store %struct.volume* %1, %struct.volume** %4
%5 = load %struct.mosaic*, %struct.mosaic** %3
%6 = load %struct.volume*, %struct.volume** %4
%7 = call i32 @umount_ploop(%struct.mosaic* %5, %struct.volume* %6, i32* null, i32 0)
ret i32 %7
}

LLVM IR (-O2):
%struct.mosaic = type { i32 }
%struct.volume = type { i32 }
define i32 @detach_ploop(%struct.mosaic* %0, %struct.volume* %1) {
%3 = tail call i32 @umount_ploop(%struct.mosaic* %0, %struct.volume* %1, i32* null, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int Check_Val(int *Item_Ptr) {
  int Good_Value = 1;
  Item_Ptr++;
  if (*Item_Ptr != 1) {
    printf("\nError in input!\n");
    Item_Ptr--;
    Good_Value = 0;
  }
  return Good_Value;
}


x86 assembly (clang, -O0):
<Check_Val>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x1,(%rax)
je     115b <Check_Val+0x4b>
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Check_Val>:
push   %rax
mov    $0x1,%eax
cmpl   $0x1,0x4(%rdi)
je     112a <Check_Val+0x1a>
lea    0xedd(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [17 x i8] c"\0AError in input!\00"
define i32 @Check_Val(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
%8 = phi i32 [ 0, %5 ], [ 1, %1 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
void print_hex(const char *input, size_t size) {
  int i;
  for (i = 0; i < size; i++) {
    printf("%02x", (unsigned int)(unsigned char)input[i]);
  }
}


x86 assembly (clang, -O0):
<print_hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movslq -0x14(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    115b <print_hex+0x4b>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movzbl (%rax,%rcx,1),%esi
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <print_hex+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_hex>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rsi,%rsi
je     1146 <print_hex+0x36>
mov    %rsi,%r12
mov    %rdi,%r14
xor    %ebx,%ebx
lea    0xed4(%rip),%r15
nopl   0x0(%rax)
movzbl (%r14,%rbx,1),%esi
mov    %r15,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <print_hex+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%02x\00"
define void @print_hex(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
store i8* %0, i8** %3
store i64 %1, i64* %4
store i32 0, i32* %5
br label %6
6: ; preds = %19, %2
%7 = load i32, i32* %5
%8 = sext i32 %7 to i64
%9 = load i64, i64* %4
%10 = icmp ult i64 %8, %9
br i1 %10, label %11, label %22
11: ; preds = %6
%12 = load i8*, i8** %3
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %17)
br label %19
19: ; preds = %11
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
br label %6
22: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%02x\00"
define void @print_hex(i8* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %12, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %10, %4 ], [ 0, %2 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = add nuw i64 %5, 1
%11 = icmp eq i64 %10, %1
br i1 %11, label %12, label %4
12: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void d_free(void *ptr) { free((char *)ptr); }


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

x86 assembly (clang, -O2):
<d_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @d_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
int test_imm_0Buint8_mem(unsigned char *val) {
  return ((*val) & (0x0B << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_0Buint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0xb,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_0Buint8_mem>:
testb  $0xb,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_0Buint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, 11
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_0Buint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 11
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_usage() {
  fprintf(stderr, "Usage: "
                  "make [-C dir]... [-f makefile] "
                  "[-j jobs] [target]...\n");
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [61 x i8] c"Usage: make [-C dir]... [-f makefile] [-j jobs] [target]...\0A\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [61 x i8] c"Usage: make [-C dir]... [-f makefile] [-j jobs] [target]...\0A\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int spi_command_read(int, char *, int, char *);
int nrf_read_rx_payload(char *rxpayload, int length, char *retstatus) {
  return spi_command_read(0x61, rxpayload, length, retstatus);
}


x86 assembly (clang, -O0):
<nrf_read_rx_payload>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    $0x61,%edi
call   1030 <spi_command_read@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrf_read_rx_payload>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0x61,%edi
jmp    1030 <spi_command_read@plt>

LLVM IR (-O0):
define i32 @nrf_read_rx_payload(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
%10 = call i32 @spi_command_read(i32 97, i8* %7, i32 %8, i8* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @nrf_read_rx_payload(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @spi_command_read(i32 97, i8* %0, i32 %1, i8* %2)
ret i32 %4
}
void _Unwind_GetCFA() {}


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

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

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

LLVM IR (-O2):
define void @_Unwind_GetCFA() {
ret void
}