#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ time_t;
struct tm {
  size_t tm_year;
  size_t tm_mon;
  size_t tm_mday;
  size_t tm_sec;
  size_t tm_min;
  size_t tm_hour;
};

/* Variables and functions */
int /*<<< orphan*/ ds1307_halt(int, int);
int /*<<< orphan*/ ds1307_set_hfmt(int, int);
int i2bcd(size_t);
int i2c_read_byte(int, int, int *);
int i2c_write_byte(int, int, int const);
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int ds1307_sync_time(int file) {
  int res;
  uint8_t reg;
  bool h12, halt;
  time_t t = time(NULL);
  struct tm tm = *localtime(&t);
  if ((res = i2c_read_byte(file, (0x00), &reg)) < 0) {
    return res;
  }
  halt = (reg & (1 << 7)) ? true : false;
  if ((res = i2c_read_byte(file, (0x02), &reg)) < 0) {
    return res;
  }
  h12 = (reg & (1 << 6)) ? true : false;
  if ((res = i2c_write_byte(file, (0x06), i2bcd(tm.tm_year + 1900 - 2000))) <
      0) {
    return res;
  }
  if ((res = i2c_write_byte(file, (0x05), i2bcd(tm.tm_mon + 1))) < 0) {
    return res;
  }
  if ((res = i2c_write_byte(file, (0x04), i2bcd(tm.tm_mday))) < 0) {
    return res;
  }
  const uint8_t dow_table[] = {2, 3, 4, 5, 6, 7, 1};
  if ((res = i2c_write_byte(file, (0x04), dow_table[tm.tm_mday])) < 0) {
    return res;
  }
  if ((res = i2c_write_byte(file, (0x00), (1 << 7) | i2bcd(tm.tm_sec))) < 0) {
    return res;
  }
  if ((res = i2c_write_byte(file, (0x01), i2bcd(tm.tm_min))) < 0) {
    return res;
  }
  if ((res = i2c_write_byte(file, (0x02), i2bcd(tm.tm_hour))) < 0) {
    return res;
  }
  if (h12) {
    ds1307_set_hfmt(file, h12);
  }
  if (!halt) {
    ds1307_halt(file, halt);
  }
  return 0;
}


x86 assembly (clang, -O0):
<ds1307_sync_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %edi,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,-0x1c(%rbp)
lea    -0x1c(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,%rsi
lea    -0x50(%rbp),%rdi
mov    $0x30,%edx
call   1040 <memcpy@plt>
mov    -0x8(%rbp),%edi
xor    %esi,%esi
lea    -0x10(%rbp),%rdx
call   1080 <i2c_read_byte@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jge    11d9 <ds1307_sync_time+0x59>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1416 <ds1307_sync_time+0x296>
mov    -0x10(%rbp),%edx
and    $0x80,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x2,%esi
lea    -0x10(%rbp),%rdx
call   1080 <i2c_read_byte@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jge    121a <ds1307_sync_time+0x9a>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1416 <ds1307_sync_time+0x296>
mov    -0x10(%rbp),%edx
and    $0x40,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x74(%rbp)
mov    -0x50(%rbp),%rdi
add    $0x76c,%rdi
sub    $0x7d0,%rdi
call   1060 <i2bcd@plt>
mov    -0x74(%rbp),%edi
mov    %eax,%edx
mov    $0x6,%esi
call   10a0 <i2c_write_byte@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jge    1273 <ds1307_sync_time+0xf3>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1416 <ds1307_sync_time+0x296>
mov    -0x8(%rbp),%eax
mov    %eax,-0x78(%rbp)
mov    -0x48(%rbp),%rdi
add    $0x1,%rdi
call   1060 <i2bcd@plt>
mov    -0x78(%rbp),%edi
mov    %eax,%edx
mov    $0x5,%esi
call   10a0 <i2c_write_byte@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jge    12ac <ds1307_sync_time+0x12c>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1416 <ds1307_sync_time+0x296>
mov    -0x8(%rbp),%eax
mov    %eax,-0x7c(%rbp)
mov    -0x40(%rbp),%rdi
call   1060 <i2bcd@plt>
mov    -0x7c(%rbp),%edi
mov    %eax,%edx
mov    $0x4,%esi
call   10a0 <i2c_write_byte@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jge    12e1 <ds1307_sync_time+0x161>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1416 <ds1307_sync_time+0x296>
mov    0xd18(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0xd15(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    0xd12(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xd10(%rip),%eax
mov    %eax,-0x58(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x40(%rbp),%rax
mov    -0x70(%rbp,%rax,4),%edx
mov    $0x4,%esi
call   10a0 <i2c_write_byte@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jge    1337 <ds1307_sync_time+0x1b7>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1416 <ds1307_sync_time+0x296>
mov    -0x8(%rbp),%eax
mov    %eax,-0x80(%rbp)
mov    -0x38(%rbp),%rdi
call   1060 <i2bcd@plt>
mov    -0x80(%rbp),%edi
mov    %eax,%edx
or     $0x80,%edx
xor    %esi,%esi
call   10a0 <i2c_write_byte@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jge    136f <ds1307_sync_time+0x1ef>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1416 <ds1307_sync_time+0x296>
mov    -0x8(%rbp),%eax
mov    %eax,-0x84(%rbp)
mov    -0x30(%rbp),%rdi
call   1060 <i2bcd@plt>
mov    -0x84(%rbp),%edi
mov    %eax,%edx
mov    $0x1,%esi
call   10a0 <i2c_write_byte@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jge    13aa <ds1307_sync_time+0x22a>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1416 <ds1307_sync_time+0x296>
mov    -0x8(%rbp),%eax
mov    %eax,-0x88(%rbp)
mov    -0x28(%rbp),%rdi
call   1060 <i2bcd@plt>
mov    -0x88(%rbp),%edi
mov    %eax,%edx
mov    $0x2,%esi
call   10a0 <i2c_write_byte@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jge    13e5 <ds1307_sync_time+0x265>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1416 <ds1307_sync_time+0x296>
cmpl   $0x0,-0x14(%rbp)
je     13fa <ds1307_sync_time+0x27a>
mov    -0x8(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1090 <ds1307_set_hfmt@plt>
cmpl   $0x0,-0x18(%rbp)
jne    140f <ds1307_sync_time+0x28f>
mov    -0x8(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1070 <ds1307_halt@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ds1307_sync_time>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %edi,%ebx
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,0x14(%rsp)
lea    0x14(%rsp),%rdi
call   1030 <localtime@plt>
mov    (%rax),%r12
mov    0x8(%rax),%r15
mov    0x10(%rax),%rbp
mov    0x18(%rax),%r13
mov    0x20(%rax),%rcx
mov    %rcx,0x20(%rsp)
mov    0x28(%rax),%rax
mov    %rax,0x18(%rsp)
lea    0x8(%rsp),%rdx
mov    %ebx,%edi
xor    %esi,%esi
call   1070 <i2c_read_byte@plt>
test   %eax,%eax
js     12fa <ds1307_sync_time+0x18a>
mov    0x8(%rsp),%eax
mov    %eax,0x10(%rsp)
lea    0x8(%rsp),%rdx
mov    %ebx,%edi
mov    $0x2,%esi
call   1070 <i2c_read_byte@plt>
test   %eax,%eax
js     12fa <ds1307_sync_time+0x18a>
mov    0x8(%rsp),%eax
mov    %eax,0xc(%rsp)
add    $0xffffffffffffff9c,%r12
mov    %r12,%rdi
call   1050 <i2bcd@plt>
mov    %ebx,%edi
mov    $0x6,%esi
mov    %eax,%edx
call   1090 <i2c_write_byte@plt>
test   %eax,%eax
js     12fa <ds1307_sync_time+0x18a>
add    $0x1,%r15
mov    %r15,%rdi
call   1050 <i2bcd@plt>
mov    %ebx,%edi
mov    $0x5,%esi
mov    %eax,%edx
call   1090 <i2c_write_byte@plt>
test   %eax,%eax
js     12fa <ds1307_sync_time+0x18a>
mov    %rbp,%rdi
call   1050 <i2bcd@plt>
mov    %ebx,%edi
mov    $0x4,%esi
mov    %eax,%edx
call   1090 <i2c_write_byte@plt>
test   %eax,%eax
js     12fa <ds1307_sync_time+0x18a>
lea    0xda2(%rip),%rax
mov    (%rax,%rbp,4),%edx
mov    %ebx,%edi
mov    $0x4,%esi
call   1090 <i2c_write_byte@plt>
test   %eax,%eax
js     12fa <ds1307_sync_time+0x18a>
mov    %r13,%rdi
call   1050 <i2bcd@plt>
or     $0x80,%eax
mov    %ebx,%edi
xor    %esi,%esi
mov    %eax,%edx
call   1090 <i2c_write_byte@plt>
test   %eax,%eax
js     12fa <ds1307_sync_time+0x18a>
mov    0x20(%rsp),%rdi
call   1050 <i2bcd@plt>
mov    %ebx,%edi
mov    $0x1,%esi
mov    %eax,%edx
call   1090 <i2c_write_byte@plt>
test   %eax,%eax
js     12fa <ds1307_sync_time+0x18a>
mov    0x18(%rsp),%rdi
call   1050 <i2bcd@plt>
mov    %ebx,%edi
mov    $0x2,%esi
mov    %eax,%edx
call   1090 <i2c_write_byte@plt>
test   %eax,%eax
js     12fa <ds1307_sync_time+0x18a>
mov    0xc(%rsp),%esi
test   $0x40,%sil
je     12e0 <ds1307_sync_time+0x170>
and    $0x40,%esi
shr    $0x6,%esi
mov    %ebx,%edi
call   1080 <ds1307_set_hfmt@plt>
xor    %r14d,%r14d
mov    0x10(%rsp),%eax
test   $0x80,%al
jne    12fd <ds1307_sync_time+0x18d>
movzbl %al,%esi
shr    $0x7,%esi
mov    %ebx,%edi
call   1060 <ds1307_halt@plt>
jmp    12fd <ds1307_sync_time+0x18d>
mov    %eax,%r14d
mov    %r14d,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.tm = type { i64, i64, i64, i64, i64, i64 }
@__const.ds1307_sync_time.dow_table = [7 x i32] [i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 1]
define i32 @ds1307_sync_time(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca %struct.tm
%10 = alloca [7 x i32]
store i32 %0, i32* %3
%11 = call i32 @time(i32* null)
store i32 %11, i32* %8
%12 = call %struct.tm* @localtime(i32* %8)
%13 = bitcast %struct.tm* %9 to i8*
%14 = bitcast %struct.tm* %12 to i8*
%15 = load i32, i32* %3
%16 = call i32 @i2c_read_byte(i32 %15, i32 0, i32* %5)
store i32 %16, i32* %4
%17 = icmp slt i32 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %1
%19 = load i32, i32* %4
store i32 %19, i32* %2
br label %120
20: ; preds = %1
%21 = load i32, i32* %5
%22 = and i32 %21, 128
%23 = icmp ne i32 %22, 0
%24 = zext i1 %23 to i64
%25 = select i1 %23, i32 1, i32 0
store i32 %25, i32* %7
%26 = load i32, i32* %3
%27 = call i32 @i2c_read_byte(i32 %26, i32 2, i32* %5)
store i32 %27, i32* %4
%28 = icmp slt i32 %27, 0
br i1 %28, label %29, label %31
29: ; preds = %20
%30 = load i32, i32* %4
store i32 %30, i32* %2
br label %120
31: ; preds = %20
%32 = load i32, i32* %5
%33 = and i32 %32, 64
%34 = icmp ne i32 %33, 0
%35 = zext i1 %34 to i64
%36 = select i1 %34, i32 1, i32 0
store i32 %36, i32* %6
%37 = load i32, i32* %3
%38 = getelementptr inbounds %struct.tm, %struct.tm* %9, i32 0, i32 0
%39 = load i64, i64* %38
%40 = add i64 %39, 1900
%41 = sub i64 %40, 2000
%42 = call i32 @i2bcd(i64 %41)
%43 = call i32 @i2c_write_byte(i32 %37, i32 6, i32 %42)
store i32 %43, i32* %4
%44 = icmp slt i32 %43, 0
br i1 %44, label %45, label %47
45: ; preds = %31
%46 = load i32, i32* %4
store i32 %46, i32* %2
br label %120
47: ; preds = %31
%48 = load i32, i32* %3
%49 = getelementptr inbounds %struct.tm, %struct.tm* %9, i32 0, i32 1
%50 = load i64, i64* %49
%51 = add i64 %50, 1
%52 = call i32 @i2bcd(i64 %51)
%53 = call i32 @i2c_write_byte(i32 %48, i32 5, i32 %52)
store i32 %53, i32* %4
%54 = icmp slt i32 %53, 0
br i1 %54, label %55, label %57
55: ; preds = %47
%56 = load i32, i32* %4
store i32 %56, i32* %2
br label %120
57: ; preds = %47
%58 = load i32, i32* %3
%59 = getelementptr inbounds %struct.tm, %struct.tm* %9, i32 0, i32 2
%60 = load i64, i64* %59
%61 = call i32 @i2bcd(i64 %60)
%62 = call i32 @i2c_write_byte(i32 %58, i32 4, i32 %61)
store i32 %62, i32* %4
%63 = icmp slt i32 %62, 0
br i1 %63, label %64, label %66
64: ; preds = %57
%65 = load i32, i32* %4
store i32 %65, i32* %2
br label %120
66: ; preds = %57
%67 = bitcast [7 x i32]* %10 to i8*
%68 = load i32, i32* %3
%69 = getelementptr inbounds %struct.tm, %struct.tm* %9, i32 0, i32 2
%70 = load i64, i64* %69
%71 = getelementptr inbounds [7 x i32], [7 x i32]* %10, i64 0, i64 %70
%72 = load i32, i32* %71
%73 = call i32 @i2c_write_byte(i32 %68, i32 4, i32 %72)
store i32 %73, i32* %4
%74 = icmp slt i32 %73, 0
br i1 %74, label %75, label %77
75: ; preds = %66
%76 = load i32, i32* %4
store i32 %76, i32* %2
br label %120
77: ; preds = %66
%78 = load i32, i32* %3
%79 = getelementptr inbounds %struct.tm, %struct.tm* %9, i32 0, i32 3
%80 = load i64, i64* %79
%81 = call i32 @i2bcd(i64 %80)
%82 = or i32 128, %81
%83 = call i32 @i2c_write_byte(i32 %78, i32 0, i32 %82)
store i32 %83, i32* %4
%84 = icmp slt i32 %83, 0
br i1 %84, label %85, label %87
85: ; preds = %77
%86 = load i32, i32* %4
store i32 %86, i32* %2
br label %120
87: ; preds = %77
%88 = load i32, i32* %3
%89 = getelementptr inbounds %struct.tm, %struct.tm* %9, i32 0, i32 4
%90 = load i64, i64* %89
%91 = call i32 @i2bcd(i64 %90)
%92 = call i32 @i2c_write_byte(i32 %88, i32 1, i32 %91)
store i32 %92, i32* %4
%93 = icmp slt i32 %92, 0
br i1 %93, label %94, label %96
94: ; preds = %87
%95 = load i32, i32* %4
store i32 %95, i32* %2
br label %120
96: ; preds = %87
%97 = load i32, i32* %3
%98 = getelementptr inbounds %struct.tm, %struct.tm* %9, i32 0, i32 5
%99 = load i64, i64* %98
%100 = call i32 @i2bcd(i64 %99)
%101 = call i32 @i2c_write_byte(i32 %97, i32 2, i32 %100)
store i32 %101, i32* %4
%102 = icmp slt i32 %101, 0
br i1 %102, label %103, label %105
103: ; preds = %96
%104 = load i32, i32* %4
store i32 %104, i32* %2
br label %120
105: ; preds = %96
%106 = load i32, i32* %6
%107 = icmp ne i32 %106, 0
br i1 %107, label %108, label %112
108: ; preds = %105
%109 = load i32, i32* %3
%110 = load i32, i32* %6
%111 = call i32 @ds1307_set_hfmt(i32 %109, i32 %110)
br label %112
112: ; preds = %108, %105
%113 = load i32, i32* %7
%114 = icmp ne i32 %113, 0
br i1 %114, label %119, label %115
115: ; preds = %112
%116 = load i32, i32* %3
%117 = load i32, i32* %7
%118 = call i32 @ds1307_halt(i32 %116, i32 %117)
br label %119
119: ; preds = %115, %112
store i32 0, i32* %2
br label %120
120: ; preds = %119, %103, %94, %85, %75, %64, %55, %45, %29, %18
%121 = load i32, i32* %2
ret i32 %121
}

LLVM IR (-O2):
%struct.tm = type { i64, i64, i64, i64, i64, i64 }
@__const.ds1307_sync_time.dow_table = [7 x i32] [i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 1]
define i32 @ds1307_sync_time(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %2 to i8*
%5 = bitcast i32* %3 to i8*
%6 = tail call i32 @time(i32* null)
store i32 %6, i32* %3
%7 = call %struct.tm* @localtime(i32* %3)
%8 = getelementptr inbounds %struct.tm, %struct.tm* %7, i64 0, i32 0
%9 = load i64, i64* %8
%10 = getelementptr inbounds %struct.tm, %struct.tm* %7, i64 0, i32 1
%11 = load i64, i64* %10
%12 = getelementptr inbounds %struct.tm, %struct.tm* %7, i64 0, i32 2
%13 = load i64, i64* %12
%14 = getelementptr inbounds %struct.tm, %struct.tm* %7, i64 0, i32 3
%15 = load i64, i64* %14
%16 = getelementptr inbounds %struct.tm, %struct.tm* %7, i64 0, i32 4
%17 = load i64, i64* %16
%18 = getelementptr inbounds %struct.tm, %struct.tm* %7, i64 0, i32 5
%19 = load i64, i64* %18
%20 = call i32 @i2c_read_byte(i32 %0, i32 0, i32* %2)
%21 = icmp slt i32 %20, 0
br i1 %21, label %73, label %22
22: ; preds = %1
%23 = load i32, i32* %2
%24 = and i32 %23, 128
%25 = icmp eq i32 %24, 0
%26 = xor i1 %25, true
%27 = zext i1 %26 to i32
%28 = call i32 @i2c_read_byte(i32 %0, i32 2, i32* %2)
%29 = icmp slt i32 %28, 0
br i1 %29, label %73, label %30
30: ; preds = %22
%31 = load i32, i32* %2
%32 = and i32 %31, 64
%33 = icmp eq i32 %32, 0
%34 = xor i1 %33, true
%35 = zext i1 %34 to i32
%36 = add i64 %9, -100
%37 = call i32 @i2bcd(i64 %36)
%38 = call i32 @i2c_write_byte(i32 %0, i32 6, i32 %37)
%39 = icmp slt i32 %38, 0
br i1 %39, label %73, label %40
40: ; preds = %30
%41 = add i64 %11, 1
%42 = call i32 @i2bcd(i64 %41)
%43 = call i32 @i2c_write_byte(i32 %0, i32 5, i32 %42)
%44 = icmp slt i32 %43, 0
br i1 %44, label %73, label %45
45: ; preds = %40
%46 = call i32 @i2bcd(i64 %13)
%47 = call i32 @i2c_write_byte(i32 %0, i32 4, i32 %46)
%48 = icmp slt i32 %47, 0
br i1 %48, label %73, label %49
49: ; preds = %45
%50 = getelementptr inbounds [7 x i32], [7 x i32]* @__const.ds1307_sync_time.dow_table, i64 0, i64 %13
%51 = load i32, i32* %50
%52 = call i32 @i2c_write_byte(i32 %0, i32 4, i32 %51)
%53 = icmp slt i32 %52, 0
br i1 %53, label %73, label %54
54: ; preds = %49
%55 = call i32 @i2bcd(i64 %15)
%56 = or i32 %55, 128
%57 = call i32 @i2c_write_byte(i32 %0, i32 0, i32 %56)
%58 = icmp slt i32 %57, 0
br i1 %58, label %73, label %59
59: ; preds = %54
%60 = call i32 @i2bcd(i64 %17)
%61 = call i32 @i2c_write_byte(i32 %0, i32 1, i32 %60)
%62 = icmp slt i32 %61, 0
br i1 %62, label %73, label %63
63: ; preds = %59
%64 = call i32 @i2bcd(i64 %19)
%65 = call i32 @i2c_write_byte(i32 %0, i32 2, i32 %64)
%66 = icmp slt i32 %65, 0
br i1 %66, label %73, label %67
67: ; preds = %63
br i1 %33, label %70, label %68
68: ; preds = %67
%69 = call i32 @ds1307_set_hfmt(i32 %0, i32 %35)
br label %70
70: ; preds = %68, %67
br i1 %25, label %71, label %73
71: ; preds = %70
%72 = call i32 @ds1307_halt(i32 %0, i32 %27)
br label %73
73: ; preds = %49, %54, %59, %63, %71, %70, %45, %40, %30, %22, %1
%74 = phi i32 [ %20, %1 ], [ %28, %22 ], [ %38, %30 ], [ %43, %40 ], [ %47, %45 ], [ %52, %49 ], [ %57, %54 ], [ %61, %59 ], [ %65, %63 ], [ 0, %71 ], [ 0, %70 ]
ret i32 %74
}