xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int int32_t;
typedef int int16_t;

/* Variables and functions */
int16_t clamp16(int32_t sample) {
  if ((sample >> 15) ^ (sample >> 31))
    sample = 0x7FFF ^ (sample >> 31);
  return sample;
}


x86 assembly (clang, -O0):
<clamp16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0xf,%eax
mov    -0x4(%rbp),%ecx
sar    $0x1f,%ecx
xor    %ecx,%eax
cmp    $0x0,%eax
je     112c <clamp16+0x2c>
mov    -0x4(%rbp),%eax
sar    $0x1f,%eax
xor    $0x7fff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clamp16>:
mov    %edi,%ecx
sar    $0xf,%ecx
mov    %edi,%edx
sar    $0x1f,%edx
mov    %edx,%eax
xor    $0x7fff,%eax
cmp    %edx,%ecx
cmove  %edi,%eax
ret

LLVM IR (-O0):
define i32 @clamp16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 15
%5 = load i32, i32* %2
%6 = ashr i32 %5, 31
%7 = xor i32 %4, %6
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %1
%10 = load i32, i32* %2
%11 = ashr i32 %10, 31
%12 = xor i32 32767, %11
store i32 %12, i32* %2
br label %13
13: ; preds = %9, %1
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @clamp16(i32 %0) {
%2 = ashr i32 %0, 15
%3 = ashr i32 %0, 31
%4 = icmp eq i32 %2, %3
%5 = xor i32 %3, 32767
%6 = select i1 %4, i32 %0, i32 %5
ret i32 %6
}
/* Variables and functions */
scalar_t__ isspace(char);
void spaceToUnderbar(char *s) {
  char c;
  while ((c = *s) != 0) {
    if (isspace(c))
      *s = '_';
    ++s;
  }
}


x86 assembly (clang, -O0):
<spaceToUnderbar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
je     115c <spaceToUnderbar+0x4c>
movsbl -0x9(%rbp),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     114b <spaceToUnderbar+0x3b>
mov    -0x8(%rbp),%rax
movb   $0x5f,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <spaceToUnderbar+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spaceToUnderbar>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     113e <spaceToUnderbar+0x2e>
mov    %rdi,%rbx
add    $0x1,%rbx
jmp    112b <spaceToUnderbar+0x1b>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
je     113e <spaceToUnderbar+0x2e>
movsbl %al,%edi
call   1030 <isspace@plt>
test   %rax,%rax
je     1120 <spaceToUnderbar+0x10>
movb   $0x5f,-0x1(%rbx)
jmp    1120 <spaceToUnderbar+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @spaceToUnderbar(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %10
%5 = phi i8 [ %12, %10 ], [ %2, %1 ]
%6 = phi i8* [ %11, %10 ], [ %0, %1 ]
%7 = tail call i64 @isspace(i8 signext %5)
%8 = icmp eq i64 %7, 0
br i1 %8, label %10, label %9
9: ; preds = %4
store i8 95, i8* %6
br label %10
10: ; preds = %9, %4
%11 = getelementptr inbounds i8, i8* %6, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %10, %1
ret void
}
/* Type definitions */
struct tun_t {
  int dummy;
};
struct in_addr {
  int dummy;
};

/* Variables and functions */
int tun_route(struct tun_t *, struct in_addr *, struct in_addr *,
              struct in_addr *, int);
int tun_delroute(struct tun_t *this, struct in_addr *dst,
                 struct in_addr *gateway, struct in_addr *mask) {
  return tun_route(this, dst, gateway, mask, 1);
}


x86 assembly (clang, -O0):
<tun_delroute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1,%r8d
call   1030 <tun_route@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tun_delroute>:
mov    $0x1,%r8d
jmp    1030 <tun_route@plt>

LLVM IR (-O0):
%struct.tun_t = type { i32 }
%struct.in_addr = type { i32 }
define i32 @tun_delroute(%struct.tun_t* %0, %struct.in_addr* %1, %struct.in_addr* %2, %struct.in_addr* %3) {
%5 = alloca %struct.tun_t*
%6 = alloca %struct.in_addr*
%7 = alloca %struct.in_addr*
%8 = alloca %struct.in_addr*
store %struct.tun_t* %0, %struct.tun_t** %5
store %struct.in_addr* %1, %struct.in_addr** %6
store %struct.in_addr* %2, %struct.in_addr** %7
store %struct.in_addr* %3, %struct.in_addr** %8
%9 = load %struct.tun_t*, %struct.tun_t** %5
%10 = load %struct.in_addr*, %struct.in_addr** %6
%11 = load %struct.in_addr*, %struct.in_addr** %7
%12 = load %struct.in_addr*, %struct.in_addr** %8
%13 = call i32 @tun_route(%struct.tun_t* %9, %struct.in_addr* %10, %struct.in_addr* %11, %struct.in_addr* %12, i32 1)
ret i32 %13
}

LLVM IR (-O2):
%struct.tun_t = type { i32 }
%struct.in_addr = type { i32 }
define i32 @tun_delroute(%struct.tun_t* %0, %struct.in_addr* %1, %struct.in_addr* %2, %struct.in_addr* %3) {
%5 = tail call i32 @tun_route(%struct.tun_t* %0, %struct.in_addr* %1, %struct.in_addr* %2, %struct.in_addr* %3, i32 1)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ set_ticker(int /*<<< orphan*/);
int /*<<< orphan*/ tty_mode(int);
void wrap_up(void) {
  tty_mode(1);
  set_ticker(0);
  endwin();
}


x86 assembly (clang, -O0):
<wrap_up>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1050 <tty_mode@plt>
xor    %edi,%edi
call   1030 <set_ticker@plt>
mov    $0x0,%al
call   1040 <endwin@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrap_up>:
push   %rax
mov    $0x1,%edi
call   1050 <tty_mode@plt>
xor    %edi,%edi
call   1030 <set_ticker@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <endwin@plt>

LLVM IR (-O0):
define void @wrap_up() {
%1 = call i32 @tty_mode(i32 1)
%2 = call i32 @set_ticker(i32 0)
%3 = call i32 (...) @endwin()
ret void
}

LLVM IR (-O2):
define void @wrap_up() {
%1 = tail call i32 @tty_mode(i32 1)
%2 = tail call i32 @set_ticker(i32 0)
%3 = tail call i32 (...) @endwin()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ radio_get_bl();
int /*<<< orphan*/ rom_write(int, int /*<<< orphan*/);
void radio_write_rom_hcc(void) { rom_write(55, radio_get_bl()); }


x86 assembly (clang, -O0):
<radio_write_rom_hcc>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <radio_get_bl@plt>
mov    %eax,%esi
mov    $0x37,%edi
call   1040 <rom_write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<radio_write_rom_hcc>:
push   %rax
xor    %eax,%eax
call   1030 <radio_get_bl@plt>
mov    $0x37,%edi
mov    %eax,%esi
pop    %rax
jmp    1040 <rom_write@plt>

LLVM IR (-O0):
define void @radio_write_rom_hcc() {
%1 = call i32 (...) @radio_get_bl()
%2 = call i32 @rom_write(i32 55, i32 %1)
ret void
}

LLVM IR (-O2):
define void @radio_write_rom_hcc() {
%1 = tail call i32 (...) @radio_get_bl()
%2 = tail call i32 @rom_write(i32 55, i32 %1)
ret void
}
void acxusb_irq_work(struct work_struct *work) {}


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

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

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

LLVM IR (-O2):
%struct.work_struct = type opaque
define void @acxusb_irq_work(%struct.work_struct* nocapture %0) {
ret void
}
void br_multicast_deliver(struct net_bridge_mdb_entry *mdst,
                          struct sk_buff *skb) {}


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

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

LLVM IR (-O0):
%struct.net_bridge_mdb_entry = type opaque
%struct.sk_buff = type opaque
define void @br_multicast_deliver(%struct.net_bridge_mdb_entry* %0, %struct.sk_buff* %1) {
%3 = alloca %struct.net_bridge_mdb_entry*
%4 = alloca %struct.sk_buff*
store %struct.net_bridge_mdb_entry* %0, %struct.net_bridge_mdb_entry** %3
store %struct.sk_buff* %1, %struct.sk_buff** %4
ret void
}

LLVM IR (-O2):
%struct.net_bridge_mdb_entry = type opaque
%struct.sk_buff = type opaque
define void @br_multicast_deliver(%struct.net_bridge_mdb_entry* nocapture %0, %struct.sk_buff* nocapture %1) {
ret void
}
/* Type definitions */
union i2c_smbus_data {
  int word;
};

/* Variables and functions */
int /*<<< orphan*/ I2C_SMBUS_READ;
int /*<<< orphan*/ I2C_SMBUS_WORD_DATA;
scalar_t__ i2c_smbus_access(int, int /*<<< orphan*/, int, int /*<<< orphan*/,
                            union i2c_smbus_data *);
int wiringPiI2CReadReg16(int fd, int reg) {
  union i2c_smbus_data data;
  if (i2c_smbus_access(fd, I2C_SMBUS_READ, reg, I2C_SMBUS_WORD_DATA, &data))
    return -1;
  else
    return data.word & 0xFFFF;
}


x86 assembly (clang, -O0):
<wiringPiI2CReadReg16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
mov    -0xc(%rbp),%edx
mov    0x2eac(%rip),%rax
mov    (%rax),%ecx
lea    -0x10(%rbp),%r8
call   1030 <i2c_smbus_access@plt>
cmp    $0x0,%rax
je     1155 <wiringPiI2CReadReg16+0x45>
movl   $0xffffffff,-0x4(%rbp)
jmp    1160 <wiringPiI2CReadReg16+0x50>
mov    -0x10(%rbp),%eax
and    $0xffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wiringPiI2CReadReg16>:
push   %rax
mov    %esi,%edx
mov    0x2ece(%rip),%rax
mov    (%rax),%esi
mov    0x2ebd(%rip),%rax
mov    (%rax),%ecx
mov    %rsp,%r8
call   1030 <i2c_smbus_access@plt>
movzwl (%rsp),%ecx
neg    %rax
sbb    %eax,%eax
or     %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%union.i2c_smbus_data = type { i32 }
@I2C_SMBUS_READ = global i32 0
@I2C_SMBUS_WORD_DATA = global i32 0
define i32 @wiringPiI2CReadReg16(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca %union.i2c_smbus_data
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = load i32, i32* %4
%8 = load i32, i32* @I2C_SMBUS_READ
%9 = load i32, i32* %5
%10 = load i32, i32* @I2C_SMBUS_WORD_DATA
%11 = call i64 @i2c_smbus_access(i32 %7, i32 %8, i32 %9, i32 %10, %union.i2c_smbus_data* %6)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 -1, i32* %3
br label %18
14: ; preds = %2
%15 = bitcast %union.i2c_smbus_data* %6 to i32*
%16 = load i32, i32* %15
%17 = and i32 %16, 65535
store i32 %17, i32* %3
br label %18
18: ; preds = %14, %13
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
%union.i2c_smbus_data = type { i32 }
@I2C_SMBUS_READ = global i32 0
@I2C_SMBUS_WORD_DATA = global i32 0
define i32 @wiringPiI2CReadReg16(i32 %0, i32 %1) {
%3 = alloca %union.i2c_smbus_data
%4 = bitcast %union.i2c_smbus_data* %3 to i8*
%5 = load i32, i32* @I2C_SMBUS_READ
%6 = load i32, i32* @I2C_SMBUS_WORD_DATA
%7 = call i64 @i2c_smbus_access(i32 %0, i32 %5, i32 %1, i32 %6, %union.i2c_smbus_data* %3)
%8 = icmp eq i64 %7, 0
%9 = getelementptr inbounds %union.i2c_smbus_data, %union.i2c_smbus_data* %3, i64 0, i32 0
%10 = load i32, i32* %9
%11 = and i32 %10, 65535
%12 = select i1 %8, i32 %11, i32 -1
ret i32 %12
}
/* Variables and functions */
int strlen(const char *str) {
  int len_of_str = 0;
  const char *str_iter = str;
  while (*str_iter != '\0') {
    len_of_str++;
    str_iter++;
  }
  return len_of_str;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1141 <strlen+0x41>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1117 <strlen+0x17>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
cmpb   $0x0,(%rdi)
je     111c <strlen+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @strlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %8, %4 ], [ %0, %1 ]
%6 = phi i32 [ %7, %4 ], [ 0, %1 ]
%7 = add nuw nsw i32 %6, 1
%8 = getelementptr inbounds i8, i8* %5, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ err(int, char *);
void *malloc(size_t);
void *xmalloc(size_t size) {
  void *p;
  if ((p = malloc(size)) == NULL)
    err(1, "xmalloc");
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1154 <xmalloc+0x34>
mov    $0x1,%edi
lea    0xeb1(%rip),%rsi
call   1030 <err@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113f <xmalloc+0x1f>
lea    0xecb(%rip),%rsi
mov    $0x1,%edi
call   1030 <err@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"xmalloc\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @err(i32 1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
@.str = [8 x i8] c"xmalloc\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int /*<<< orphan*/);
int /*<<< orphan*/ TimerBaseValid(unsigned long);
void TimerIntClear(unsigned long ulBase, unsigned long ulIntFlags) {
  DEBUG_ASSERT(TimerBaseValid(ulBase));
  (*((volatile unsigned long *)(ulBase + 0x00000024))) = ulIntFlags;
}


x86 assembly (clang, -O0):
<TimerIntClear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <TimerBaseValid@plt>
mov    %eax,%edi
call   1040 <DEBUG_ASSERT@plt>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x24(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerIntClear>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <TimerBaseValid@plt>
mov    %eax,%edi
call   1040 <DEBUG_ASSERT@plt>
mov    %r14,0x24(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @TimerIntClear(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = call i32 @TimerBaseValid(i64 %5)
%7 = call i32 @DEBUG_ASSERT(i32 %6)
%8 = load i64, i64* %4
%9 = load i64, i64* %3
%10 = add i64 %9, 36
%11 = inttoptr i64 %10 to i64*
store volatile i64 %8, i64* %11
ret void
}

LLVM IR (-O2):
define void @TimerIntClear(i64 %0, i64 %1) {
%3 = tail call i32 @TimerBaseValid(i64 %0)
%4 = tail call i32 @DEBUG_ASSERT(i32 %3)
%5 = add i64 %0, 36
%6 = inttoptr i64 %5 to i64*
store volatile i64 %1, i64* %6
ret void
}
/* Variables and functions */
int xh_ptr_hash(const void *key, void *data) {
  (void)data;
  return (int)(size_t) * (const void **)key;
}


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

x86 assembly (clang, -O2):
<xh_ptr_hash>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @xh_ptr_hash(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i8**
%8 = load i8*, i8** %7
%9 = ptrtoint i8* %8 to i64
%10 = trunc i64 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @xh_ptr_hash(i8* nocapture %0, i8* nocapture readnone %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = ptrtoint i8* %4 to i64
%6 = trunc i64 %5 to i32
ret i32 %6
}
void soru_6(float sayi, char *isaret, int *tam, float *ondalik) {
  int tam_kisim = sayi;
  *tam = tam_kisim;
  *ondalik = (sayi - tam_kisim);
  if (sayi < 0) {
    *isaret = '-';
  } else {
    *isaret = '+';
  }
}


x86 assembly (clang, -O0):
<soru_6>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cvttss2si -0x4(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movss  -0x4(%rbp),%xmm0
cvtsi2ssl -0x24(%rbp),%xmm1
subss  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,(%rax)
xorps  %xmm0,%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    1155 <soru_6+0x55>
mov    -0x10(%rbp),%rax
movb   $0x2d,(%rax)
jmp    115c <soru_6+0x5c>
mov    -0x10(%rbp),%rax
movb   $0x2b,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<soru_6>:
cvttss2si %xmm0,%eax
mov    %eax,(%rsi)
cvttps2dq %xmm0,%xmm1
xorps  %xmm2,%xmm2
ucomiss %xmm0,%xmm2
cvtdq2ps %xmm1,%xmm1
subss  %xmm1,%xmm0
seta   %al
movss  %xmm0,(%rdx)
add    %al,%al
add    $0x2b,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @soru_6(float %0, i8* %1, i32* %2, float* %3) {
%5 = alloca float
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca float*
%9 = alloca i32
store float %0, float* %5
store i8* %1, i8** %6
store i32* %2, i32** %7
store float* %3, float** %8
%10 = load float, float* %5
%11 = fptosi float %10 to i32
store i32 %11, i32* %9
%12 = load i32, i32* %9
%13 = load i32*, i32** %7
store i32 %12, i32* %13
%14 = load float, float* %5
%15 = load i32, i32* %9
%16 = sitofp i32 %15 to float
%17 = fsub float %14, %16
%18 = load float*, float** %8
store float %17, float* %18
%19 = load float, float* %5
%20 = fcmp olt float %19, 0.000000e+00
br i1 %20, label %21, label %23
21: ; preds = %4
%22 = load i8*, i8** %6
store i8 45, i8* %22
br label %25
23: ; preds = %4
%24 = load i8*, i8** %6
store i8 43, i8* %24
br label %25
25: ; preds = %23, %21
ret void
}

LLVM IR (-O2):
define void @soru_6(float %0, i8* nocapture writeonly %1, i32* nocapture writeonly %2, float* nocapture writeonly %3) {
%5 = fptosi float %0 to i32
store i32 %5, i32* %2
%6 = sitofp i32 %5 to float
%7 = fsub float %0, %6
store float %7, float* %3
%8 = fcmp olt float %0, 0.000000e+00
%9 = select i1 %8, i8 45, i8 43
store i8 %9, i8* %1
ret void
}
void gtk_tree_view_get_drag_dest_row() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_get_drag_dest_row() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int const);
void print_array(const int array[], const size_t array_size) {
  for (int i = 0; i < array_size; ++i) {
    printf("%d\t", array[i]);
  }
}


x86 assembly (clang, -O0):
<print_array>:
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    115a <print_array+0x4a>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <print_array+0x17>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d\09\00"
define void @print_array(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
%5 = alloca i32
store i32* %0, i32** %3
store i64 %1, i64* %4
store i32 0, i32* %5
br label %6
6: ; preds = %18, %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 %21
11: ; preds = %6
%12 = load i32*, i32** %3
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
%16 = load i32, i32* %15
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %11
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %6
21: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\09\00"
define void @print_array(i32* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %4, label %5
4: ; preds = %5, %2
ret void
5: ; preds = %2, %5
%6 = phi i64 [ %10, %5 ], [ 0, %2 ]
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
%9 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = add nuw i64 %6, 1
%11 = icmp eq i64 %10, %1
br i1 %11, label %4, label %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int key = 2;
  switch (key)
    for (int i = 0; i < 10; ++i) {
      key = i;
    case 2:
      printf("case 2: key is %d\n", key);
    case 4:
      printf("case 4: key is %d\n", key);
    }
  return 0;
}


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   $0x2,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
sub    $0x2,%eax
je     1162 <main+0x52>
jmp    1141 <main+0x31>
mov    -0x1c(%rbp),%eax
sub    $0x4,%eax
je     1171 <main+0x61>
jmp    1193 <main+0x83>
cmpl   $0xa,-0x18(%rbp)
jge    118e <main+0x7e>
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1152 <main+0x42>
jmp    1193 <main+0x83>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [19 x i8] c"case 2: key is %d\0A\00"
@.str.1 = [19 x i8] c"case 4: key is %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
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 2, i32* %6
%8 = load i32, i32* %6
switch i32 %8, label %25 [
i32 2, label %15
i32 4, label %18
]
9: ; No predecessors!
store i32 0, i32* %7
br label %10
10: ; preds = %21, %9
%11 = load i32, i32* %7
%12 = icmp slt i32 %11, 10
br i1 %12, label %13, label %24
13: ; preds = %10
%14 = load i32, i32* %7
store i32 %14, i32* %6
br label %15
15: ; preds = %2, %13
%16 = load i32, i32* %6
%17 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %2, %15
%19 = load i32, i32* %6
%20 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %19)
br label %21
21: ; preds = %18
%22 = load i32, i32* %7
%23 = add nsw i32 %22, 1
store i32 %23, i32* %7
br label %10
24: ; preds = %10
br label %25
25: ; preds = %24, %2
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"case 2: key is %d\0A\00"
@.str.1 = [19 x i8] c"case 4: key is %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float, int);
int main() {
  int int_to_float = 5;
  printf("%f %d\n", (float)int_to_float, int_to_float);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"%f %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), float 5.000000e+00, i32 5)
ret i32 0
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ printf(char *, size_t, void *);
void *verbose_malloc(size_t size) {
  void *buf = malloc(size);
  printf("malloc (%zu) => %p\n", size, buf);
  return buf;
}


x86 assembly (clang, -O0):
<verbose_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<verbose_malloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <malloc@plt>
mov    %rax,%rbx
lea    0xeca(%rip),%rdi
mov    %r14,%rsi
mov    %rax,%rdx
call   1030 <printf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [20 x i8] c"malloc (%zu) => %p\0A\00"
define i8* @verbose_malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i64, i64* %2
%7 = load i8*, i8** %3
%8 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i64 %6, i8* %7)
%9 = load i8*, i8** %3
ret i8* %9
}

LLVM IR (-O2):
@.str = [20 x i8] c"malloc (%zu) => %p\0A\00"
define i8* @verbose_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i64 %0, i8* %2)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ http_run();
void init_http() { http_run(); }


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

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

LLVM IR (-O0):
define void @init_http() {
%1 = call i32 (...) @http_run()
ret void
}

LLVM IR (-O2):
define void @init_http() {
%1 = tail call i32 (...) @http_run()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ stgwrite(char *);
void endexpr(void) { stgwrite("\t;^;\n"); }


x86 assembly (clang, -O0):
<endexpr>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <stgwrite@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"\09;^;\0A\00"
define void @endexpr() {
%1 = call i32 @stgwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"\09;^;\0A\00"
define void @endexpr() {
%1 = tail call i32 @stgwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
void str_replace(char *s, char c1, char c2) {
  while (*s) {
    if (*s == c1)
      *s = c2;
    s++;
  }
}


x86 assembly (clang, -O0):
<str_replace>:
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
cmpb   $0x0,(%rax)
je     114d <str_replace+0x4d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
jne    113c <str_replace+0x3c>
mov    -0xa(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1113 <str_replace+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_replace>:
mov    (%rdi),%al
test   %al,%al
je     1125 <str_replace+0x25>
add    $0x1,%rdi
jmp    111b <str_replace+0x1b>
nopl   0x0(%rax)
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
je     1125 <str_replace+0x25>
cmp    %sil,%al
jne    1110 <str_replace+0x10>
mov    %dl,-0x1(%rdi)
jmp    1110 <str_replace+0x10>
ret

LLVM IR (-O0):
define void @str_replace(i8* %0, i8 signext %1, i8 signext %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
br label %7
7: ; preds = %21, %3
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = icmp ne i8 %9, 0
br i1 %10, label %11, label %24
11: ; preds = %7
%12 = load i8*, i8** %4
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = load i8, i8* %5
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %14, %16
br i1 %17, label %18, label %21
18: ; preds = %11
%19 = load i8, i8* %6
%20 = load i8*, i8** %4
store i8 %19, i8* %20
br label %21
21: ; preds = %18, %11
%22 = load i8*, i8** %4
%23 = getelementptr inbounds i8, i8* %22, i32 1
store i8* %23, i8** %4
br label %7
24: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @str_replace(i8* nocapture %0, i8 signext %1, i8 signext %2) {
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %15, label %6
6: ; preds = %3, %11
%7 = phi i8 [ %13, %11 ], [ %4, %3 ]
%8 = phi i8* [ %12, %11 ], [ %0, %3 ]
%9 = icmp eq i8 %7, %1
br i1 %9, label %10, label %11
10: ; preds = %6
store i8 %2, i8* %8
br label %11
11: ; preds = %10, %6
%12 = getelementptr inbounds i8, i8* %8, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %6
15: ; preds = %11, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main(void) { printf("Hello World!"); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i8] c"Hello World!\00"
define void @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello World!\00"
define void @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}
bbackline(f, n) { return (backline(f, n, 0)); }


x86 assembly (clang, -O0):
<bbackline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
xor    %edx,%edx
mov    $0x0,%al
call   1030 <backline@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bbackline>:
xor    %edx,%edx
xor    %eax,%eax
jmp    1030 <backline@plt>

LLVM IR (-O0):
define i32 @bbackline(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 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @backline to i32 (i32, i32, i32, ...)*)(i32 %5, i32 %6, i32 0)
ret i32 %7
}

LLVM IR (-O2):
define i32 @bbackline(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @backline to i32 (i32, i32, i32, ...)*)(i32 %0, i32 %1, i32 0)
ret i32 %3
}
unsigned getval_441() { return 1455675017U; }


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

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

LLVM IR (-O0):
define i32 @getval_441() {
ret i32 1455675017
}

LLVM IR (-O2):
define i32 @getval_441() {
ret i32 1455675017
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int soma_impares(int);
int main(void) {
  int num;
  printf("Informe o número: ");
  scanf("%d", &num);
  printf("O resultado é %d\n", soma_impares(num));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec0(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <soma_impares@plt>
mov    %eax,%esi
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <soma_impares@plt>
lea    0xeb7(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Informe o n\C3\BAmero: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [19 x i8] c"O resultado \C3\A9 %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 @soma_impares(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"Informe o n\C3\BAmero: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [19 x i8] c"O resultado \C3\A9 %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @soma_impares(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}
int xisminff(float x) { return x == -__builtin_inff(); }


x86 assembly (clang, -O0):
<xisminff>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xeea(%rip),%xmm1
ucomiss %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xisminff>:
movss  0xef8(%rip),%xmm1
xor    %eax,%eax
ucomiss %xmm0,%xmm1
setae  %al
ret

LLVM IR (-O0):
define i32 @xisminff(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp oeq float %3, 0xFFF0000000000000
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @xisminff(float %0) {
%2 = fcmp oeq float %0, 0xFFF0000000000000
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  void *font_set;
};
typedef TYPE_1__ XmbTextItem;

/* Variables and functions */
void set_XmbTextItem_font_set(void *_p, void *_v) {
  ((XmbTextItem *)_p)->font_set = (void *)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i8* }
define void @set_XmbTextItem_font_set(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i8* %5, i8** %8
ret void
}

LLVM IR (-O2):
define void @set_XmbTextItem_font_set(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
store i8* %1, i8** %3
ret void
}
char f() {
  typedef int unused_word_type;
  unused_word_type ok;
  return 1;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%al
movsbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i8 @f() {
%1 = alloca i32
ret i8 1
}

LLVM IR (-O2):
define signext i8 @f() {
ret i8 1
}
/* Variables and functions */
int /*<<< orphan*/ DeinitFields();
void SwitchFrom_sc14xxx(void) { DeinitFields(); }


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

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

LLVM IR (-O0):
define void @SwitchFrom_sc14xxx() {
%1 = call i32 (...) @DeinitFields()
ret void
}

LLVM IR (-O2):
define void @SwitchFrom_sc14xxx() {
%1 = tail call i32 (...) @DeinitFields()
ret void
}
/* Type definitions */
struct dnaSeq {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ nibOutput(int, struct dnaSeq *, char *);
void nibWriteMasked(int options, struct dnaSeq *seq, char *fileName) {
  nibOutput(options, seq, fileName);
}


x86 assembly (clang, -O0):
<nibWriteMasked>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <nibOutput@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nibWriteMasked>:
jmp    1030 <nibOutput@plt>

LLVM IR (-O0):
%struct.dnaSeq = type { i32 }
define void @nibWriteMasked(i32 %0, %struct.dnaSeq* %1, i8* %2) {
%4 = alloca i32
%5 = alloca %struct.dnaSeq*
%6 = alloca i8*
store i32 %0, i32* %4
store %struct.dnaSeq* %1, %struct.dnaSeq** %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load %struct.dnaSeq*, %struct.dnaSeq** %5
%9 = load i8*, i8** %6
%10 = call i32 @nibOutput(i32 %7, %struct.dnaSeq* %8, i8* %9)
ret void
}

LLVM IR (-O2):
%struct.dnaSeq = type { i32 }
define void @nibWriteMasked(i32 %0, %struct.dnaSeq* %1, i8* %2) {
%4 = tail call i32 @nibOutput(i32 %0, %struct.dnaSeq* %1, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_parsehex() {
  printf("NOT IMPLEMENTED:"
         "pa_parsehex"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [28 x i8] c"NOT IMPLEMENTED:pa_parsehex\00"
define i32 @pa_parsehex() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ uart_putchar_raw(int, char);
void uart_putchar(int offset, char c) {
  if (c == '\n')
    uart_putchar_raw(offset, '\r');
  uart_putchar_raw(offset, c);
}


x86 assembly (clang, -O0):
<uart_putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0xa,%eax
jne    113b <uart_putchar+0x2b>
mov    -0x4(%rbp),%edi
mov    $0xd,%esi
call   1030 <uart_putchar_raw@plt>
mov    -0x4(%rbp),%edi
movsbl -0x5(%rbp),%esi
call   1030 <uart_putchar_raw@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_putchar>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %edi,%ebx
cmp    $0xa,%bpl
jne    1129 <uart_putchar+0x19>
mov    %ebx,%edi
mov    $0xd,%esi
call   1030 <uart_putchar_raw@plt>
movsbl %bpl,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <uart_putchar_raw@plt>

LLVM IR (-O0):
define void @uart_putchar(i32 %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 10
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* %3
%10 = call i32 @uart_putchar_raw(i32 %9, i8 signext 13)
br label %11
11: ; preds = %8, %2
%12 = load i32, i32* %3
%13 = load i8, i8* %4
%14 = call i32 @uart_putchar_raw(i32 %12, i8 signext %13)
ret void
}

LLVM IR (-O2):
define void @uart_putchar(i32 %0, i8 signext %1) {
%3 = icmp eq i8 %1, 10
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @uart_putchar_raw(i32 %0, i8 signext 13)
br label %6
6: ; preds = %4, %2
%7 = tail call i32 @uart_putchar_raw(i32 %0, i8 signext %1)
ret void
}
/* Type definitions */
struct chunk {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/);
int /*<<< orphan*/ srgb_chunk(struct chunk *);
void srgb_free(struct chunk *chunk) { free(srgb_chunk(chunk)); }


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

x86 assembly (clang, -O2):
<srgb_free>:
push   %rax
call   1040 <srgb_chunk@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.chunk = type { i32 }
define void @srgb_free(%struct.chunk* %0) {
%2 = tail call i32 @srgb_chunk(%struct.chunk* %0)
%3 = tail call i32 @free(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *const);
void bferror(char const *const str) { printf("[BAREFLANK ERROR] %s", str); }


x86 assembly (clang, -O0):
<bferror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bferror>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"[BAREFLANK ERROR] %s\00"
define void @bferror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"[BAREFLANK ERROR] %s\00"
define void @bferror(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void av_timecode_make_mpeg_tc_string() {}


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

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

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

LLVM IR (-O2):
define void @av_timecode_make_mpeg_tc_string() {
ret void
}
void g(int *a, int *b, int *c) {
  ++*a;
  --*b;
  *c = *a * *b;
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0xffffffff,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
imul   (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
addl   $0x1,(%rdi)
mov    (%rsi),%eax
add    $0xffffffff,%eax
mov    %eax,(%rsi)
imul   (%rdi),%eax
mov    %eax,(%rdx)
ret

LLVM IR (-O0):
define void @g(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = add nsw i32 %8, 1
store i32 %9, i32* %7
%10 = load i32*, i32** %5
%11 = load i32, i32* %10
%12 = add nsw i32 %11, -1
store i32 %12, i32* %10
%13 = load i32*, i32** %4
%14 = load i32, i32* %13
%15 = load i32*, i32** %5
%16 = load i32, i32* %15
%17 = mul nsw i32 %14, %16
%18 = load i32*, i32** %6
store i32 %17, i32* %18
ret void
}

LLVM IR (-O2):
define void @g(i32* nocapture %0, i32* nocapture %1, i32* nocapture writeonly %2) {
%4 = load i32, i32* %0
%5 = add nsw i32 %4, 1
store i32 %5, i32* %0
%6 = load i32, i32* %1
%7 = add nsw i32 %6, -1
store i32 %7, i32* %1
%8 = load i32, i32* %0
%9 = mul nsw i32 %8, %7
store i32 %9, i32* %2
ret void
}
hoc_close_plot() {}


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

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

LLVM IR (-O0):
define i32 @hoc_close_plot() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @hoc_close_plot() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, size_t, char *, char *, char const *);
void logger_set_devname(char *buf, size_t len, const char *devid) {
  snprintf(buf, len, "%s%s", "/dev/input/event", devid);
}


x86 assembly (clang, -O0):
<logger_set_devname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%r8
lea    0xec9(%rip),%rdx
lea    0xec7(%rip),%rcx
call   1030 <snprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logger_set_devname>:
mov    %rdx,%r8
lea    0xee6(%rip),%rdx
lea    0xee4(%rip),%rcx
jmp    1030 <snprintf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%s%s\00"
@.str.1 = [17 x i8] c"/dev/input/event\00"
define void @logger_set_devname(i8* %0, i64 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i64, i64* %5
%9 = load i8*, i8** %6
%10 = call i32 @snprintf(i8* %7, i64 %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%s%s\00"
@.str.1 = [17 x i8] c"/dev/input/event\00"
define void @logger_set_devname(i8* %0, i64 %1, i8* %2) {
%4 = tail call i32 @snprintf(i8* %0, i64 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret void
}